Finding positive-, negative- and zero-sequence components in Matlab
Ältere Kommentare anzeigen
Why the positive and negative sequence values are the same? What is wrong with the fortescue calculation and how to correct it? Up and Un should not be equal.
Code and plot:
f1=50; %Hz
w1 = 2*pi*f1;
hatUa = 25000*sqrt(2)/sqrt(3);
t = linspace(0,1,100000);
a = cos(2*pi/3) + 1i*sin(2*pi/3);
Ua = (hatUa.*(exp(1i.*w1.*t)+exp(-1i.*w1.*t))./2);
Ub = (hatUa.*(exp(1i.*w1.*t + 1i.*2*pi/3)+exp(-1i.*w1.*t - 1i.*2*pi/3))./2);
Uc = (0.5.*hatUa.*(exp(1i.*w1.*t - 1i.*2*pi/3)+exp(-1i.*w1.*t + 1i.*2*pi/3))./2);
Up = real(Ua + (a*Ub) + (a.*a*Uc))./3;
Un = real(Ua + (a.*a.*Ub) + (a.*Uc))./3;
U0 = real(Ua + Ub + Uc)./3;
subplot(2,1,1),plot(t,Ua,'LineWidth',2)
xlim([0 0.1])
xlabel ('Time [s]')
ylim([-hatUa*1.1 hatUa*1.1])
ylabel ('Three-phase Voltage (V)')
hold on
subplot(2,1,1),plot(t,Ub,'LineWidth',2)
hold on
subplot(2,1,1),plot(t,Uc,'LineWidth',2)
legend( 'Ua', 'Ub', 'Uc')
hold on
subplot(2,1,2),plot(t,Up,'LineWidth',2)
xlim([0 0.1])
xlabel ('Time [s]')
ylim([-hatUa*1.1 hatUa*1.1])
ylabel ('P, N and 0 Voltages (V)')
hold on
subplot(2,1,2),plot(t,Un,'LineWidth',2)
hold on
subplot(2,1,2),plot(t,U0,'LineWidth',2)
legend( 'Up', 'Un', 'U0')
5 Kommentare
Image Analyst
am 7 Sep. 2023
You need to assign w1, as the error indicates.
Here is a simplified version of the code that retains the essence of the question. (Up and Un are equal at all points, to within floating-point precision, and therefore plot on top of each other.)
I changed and/or removed some constants, e.g. setting hatUa to 1 (effectively and then actually removing it).
I have not debugged further, but I think a logical next step would be to calculate the real and imaginary parts separately. I think this will more directly reveal that Up and Un are equal.
@Ygor Marca, do you have a reference for these equations?
w1=pi;
t = linspace(0,1,100);
a = cos(2*pi/3) + 1i*sin(2*pi/3);
Ua = ((exp(1i.*w1.*t)+exp(-1i.*w1.*t))./2);
Ub = ((exp(1i.*w1.*t + 1i.*2*pi/3)+exp(-1i.*w1.*t - 1i.*2*pi/3))./2);
Uc = (0.5.*(exp(1i.*w1.*t - 1i.*2*pi/3)+exp(-1i.*w1.*t + 1i.*2*pi/3))./2);
Up = real(Ua + (a*Ub) + (a.*a*Uc))./3;
Un = real(Ua + (a.*a.*Ub) + (a.*Uc))./3;
figure
hold on
plot(t,Up,'LineWidth',2)
plot(t,Un,'LineWidth',2)
xlabel ('Time [s]')
ylabel ('P, N and 0 Voltages (V)')
legend( 'Up', 'Un')
Ygor Marca
am 7 Sep. 2023
w1=pi;
t = linspace(0,1,100)';
a = cos(2*pi/3) + 1i*sin(2*pi/3);
Ua = ((exp(1i.*w1.*t)+exp(-1i.*w1.*t))./2);
Ub = ((exp(1i.*w1.*t + 1i.*2*pi/3)+exp(-1i.*w1.*t - 1i.*2*pi/3))./2);
Uc = (0.5.*(exp(1i.*w1.*t - 1i.*2*pi/3)+exp(-1i.*w1.*t + 1i.*2*pi/3))./2);
Up = real(Ua + (a*Ub) + (a.*a*Uc))./3;
Un = real(Ua + (a.*a.*Ub) + (a.*Uc))./3;
subplot(2,1,1)
plot(t,[real([a*Ub a.*a*Uc]) imag([a*Ub a.*a*Uc])])
legend('R(a.*Ub)','R(a.*a*Uc)','I(a.*Ub)','I(a.*a*Uc)','location','eastoutside')
ylim([-1 1])
subplot(2,1,2)
plot(t,[real([a.*a.*Ub a.*Uc]) imag([a.*a.*Ub a.*Uc])])
ylim([-1 1])
legend('(R(a.*a*Ub)','R(a.*Uc)','(I(a.*a*Ub)','I(a.*Uc)','location','eastoutside')
Shows they're all mirror images of each other...
Ygor Marca
am 11 Sep. 2023
Akzeptierte Antwort
Weitere Antworten (0)
Communitys
Weitere Antworten in Power Electronics Control
Kategorien
Mehr zu General PDEs finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


