I am trying to plot 2 phase angle graphs based on two impedance calculations. The problem is when i try to calculate the angle with unwrap(angle(Zc)), the plot looks nothing like it should. I am using 5 different text files as data, those are attached. And below is my code and my graphs, then graphs of what I am supposed to be getting.
clear all;
clc;
load freq1.txt;
load Rzero1.txt;
load Lzero1.txt;
load Rpos1.txt;
load Lpos1.txt;
Czero = 7.524/1e3;
Cpos = 1.2027/1e3;
Gzero = 2/1e8;
Gpos = 2/1e8;
w(1)=0;
Zc(1)=0;
Zcpos(1)=0;
Zcmag(1)=0;
Zcposmag(1)=0;
i=1;
k=1;
n=10;
for i=1:size(Rzero1,1)
w(i) = 2*pi*freq1(i);
Zcmag(i) = abs(((Rzero1(i)+1j*w(i)*Lzero1(i))./(Gzero+1j*w(i)*Czero)));
Zc(i) = sqrt(((Rzero1(i)+1j*w(i)*Lzero1(i))./(Gzero+1j*w(i)*Czero)));
end
for k=1:size(Rpos1,1)
w(k) = 2*pi*freq1(k);
Zcposmag(k) = abs(((Rpos1(k)+1j*w(k)*Lpos1(k))./(Gpos+1j*w(k)*Cpos)));
Zcpos(k) = sqrt(((Rpos1(k)+1j*w(k)*Lpos1(k))./(Gpos+1j*w(k)*Cpos)));
end
figure(1)
semilogx(freq1,Zcmag);
figure(2)
semilogx(freq1,Zcposmag)
Zcphase = unwrap(angle(Zc));
Zcposphase = unwrap(angle(Zcpos));
figure(3);
semilogx(freq1,Zcphase);
figure(4);
semilogx(freq1,Zcposphase);
Zc phase for zero sequence
Zc phase for positive sequence
0 Comments
Sign in to comment.