Effacer les filtres
Effacer les filtres

Complex multiplication giving wrong answer

2 vues (au cours des 30 derniers jours)
SACHIN DEVASSY
SACHIN DEVASSY le 30 Mai 2016
Modifié(e) : Stephen23 le 30 Mai 2016
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)

Réponse acceptée

Roger Stafford
Roger Stafford le 30 Mai 2016
Modifié(e) : Stephen23 le 30 Mai 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:

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by