Clear Filters
Clear Filters

Complex multiplication giving wrong answer

2 views (last 30 days)
I am trying to extract positive sequence currents using method of symmetrical components .However I am getting wrong answer. The following is my test code.
a=exp(i*2*pi/3)
P1=[1 a a^2]
%Balanced Voltages and Unbalanced Currents
Va=5*exp(j*53*pi/180);
Vb=7*exp(-j*164*pi/180);
Vc=7*exp(j*105*pi/180);
V1=(1/3)*P1*[Va Vb Vc]'
Va1=(1/3)*(Va+a*Vb+a^2*Vc)
Though V1 and Va1 should be same, I am getting different answers. Please tell me whats wrong in the calculation of V1 ( Va1 calculation method gives correct answer)

Accepted Answer

Roger Stafford
Roger Stafford on 30 May 2016
Edited: Stephen23 on 30 May 2016
The trouble lies in the line
V1=(1/3)*P1*[Va Vb Vc]'
You should have used this:
V1=(1/3)*P1*[Va Vb Vc].
As you have written it, [Va Vb Vc]' not only takes the transpose of [Va Vb Vc], it also changes each element to its complex conjugate, which you don’t want in this example. Read about it at:

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!