www.pudn.com > matlabsimulink.rar > xingbotiqu.m, change:2010-09-01,size:1112b


%--------程序名:xingbotiqu.m------------------ 
%提取故障发生时正向行波和反向行波的示例程序 
%本程序计算的是模分量 
%仿真模型在0.035s时发生故障,故障分量取为 
%从故障后的0.035s~0.039s减去故障前的0.015s~0.019s 
clc 
clear 
close all 
load xingbo.mat;  %载入.mat文件 
m=n';                                          
ua=m(3501:3900,2)-m(1501:1900,2);           
ia=m(3501:3900,5)-m(1501:1900,5); 
ub=m(3501:3900,3)-m(1501:1900,3); 
ib=m(3501:3900,6)-m(1501:1900,6); 
uc=m(3501:3900,4)-m(1501:1900,4); 
ic=m(3501:3900,7)-m(1501:1900,7);            
Q=1/3*[   2   -1      -1 
        0   sqrt(3) -sqrt(3) 
        1    1        1]; 
um1=Q(1,:)*[ua ub uc]'; 
im1=Q(1,:)*[ia ib ic]';    %进行克拉克变换得到电压、电流的模量 
Lm1=0.8984e-3;                
Cm1=12.94e-9; 
Zcm1=sqrt(Lm1/Cm1);         %求波阻抗 
uf=(um1+im1*Zcm1);   
ur=(um1-im1*Zcm1);      %求出正反向行波                     
uf1=uf'; 
ur1=ur'; 
t1=0:10:3990; 
t=t1'; 
plot(t,uf1,'r',t,ur1,'b--'); 
xlabel('t/us');ylabel('u/V'); 
legend('正向行波','反向行波','location','northwest');%Legend位置在左上角(西北方) 
 
 
%title('电压1模正向行波和反向行波');