Finding positive-, negative- and zero-sequence components in Matlab
显示 更早的评论
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 个评论
Image Analyst
2023-9-7
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
2023-9-7
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
2023-9-11
采纳的回答
更多回答(0 个)
社区
类别
在 帮助中心 和 File Exchange 中查找有关 General PDEs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


