资源简介

故障定位程序 ,应用于交流故障测距 ,在MATLAB环境下编译 。

资源截图

代码片段和文件信息

Ia1=ScopeData(1:200002);
Ib1=ScopeData(1:200003);
Ic1=ScopeData(1:200004);
Va1=ScopeData1(1:200002);
Vb1=ScopeData1(1:200003);
Vc1=ScopeData1(1:200004);
x1=[Ia1Ib1Ic1];
x2=[Va1Vb1Vc1];
x=[x1;x1;x1;x1;x1;x1;x1;x1;x1;x1];
x3=[x2;x2;x2;x2;x2;x2;x2;x2;x2;x2];
Ia=ScopeData(:2);
Ib=ScopeData(:3);
Ic=ScopeData(:4);
Va=ScopeData1(:2);
Vb=ScopeData1(:3);
Vc=ScopeData1(:4);
new=[IaIbIc];
new1=[VaVbVc];
x(200001:)=new(200001:);
x3(200001:)=new1(200001:);
new=new-x;
new1=new1-x3;
%plot(new1);
s=[0.3333 0.3333 0.3333; 0.3333 -0.3333 0; 0.3333 0 -0.3333];
Inew=new*s;
Vnew=new1*s;
Im0=Inew(:1);
Im1=Inew(:2);
Im2=Inew(:3);
Um0=Vnew(:1);
Um1=Vnew(:2);
Um2=Vnew(:3);
figure(1);
plot(Im0);
Zcm1=344.69;
Uf1=0.5*(Um1+Im1*Zcm1);
w=Uf1(1:200001);
figure(2);
plot(w);
[cl]=wavedec(w3‘db4‘);
a3=wrcoef(‘a‘cl‘db4‘3);
d3=wrcoef(‘d‘cl‘db4‘3);
d2=wrcoef(‘d‘cl‘db4‘2);
d1=wrcoef(‘d‘cl‘db4‘1);
c2=abs(d1);
for i=2:(length(c2)-1)
    if((c2(i)>=c2(i-1))&&(c2(i)>=c2(i+1)))
    c3(i)=c2(i);
    end
end;
c3=c3/max(c3);
figure(3);
plot(c3);
xlabel(‘采样点数‘);ylabel(‘M端模极大值标幺值‘);
for i=1:(length(c3)-1)
    if(c3(i)<0.03)
        c3(i)=0;
    end
end;
figure(4);
plot(c3);
xlabel(‘采样点数‘);ylabel(‘M端去干扰后模极大值标幺值‘);
Ia2=ScopeData2(1:200002);
Ib2=ScopeData2(1:200003);
Ic2=ScopeData2(1:200004);
Va2=ScopeData3(1:200002);
Vb2=ScopeData3(1:200003);
Vc2=ScopeData3(1:200004);
x4=[Ia2Ib2Ic2];
x5=[Va2Vb2Vc2];
x6=[x4;x4;x4;x4;x4;x4;x4;x4;x4;x4];
x7=[x5;x5;x5;x5;x5;x5;x5;x5;x5;x5];
Ia3=ScopeData2(:2);
Ib3=ScopeData2(:3);
Ic3=ScopeData2(:4);
Va3=ScopeData3(:2);
Vb3=ScopeData3(:3);
Vc3=ScopeData3(:4);
new2=[Ia3Ib3Ic3];
new3=[Va3Vb3Vc3];
x6(200001:)=new2(200001:);
x7(200001:)=new3(200001:);
new2=new2-x6;
new3=new3-x7;
s=[0.3333 0.3333 0.3333; 0.3333 -0.3333 0; 0.3333 0 -0.3333];
Inew1=new2*s;
Vnew1=new3*s;
I0=Inew1(:1);
I1=Inew1(:2);
I2=Inew1(:3);
U0=Vnew1(:1);
U1=Vnew1(:2);
U2=Vnew1(:3);
Zcm1=344.69;
Uf2=0.5*(U1+I1*Zcm1);
w=Uf2(1:200001);
[cl]=wavedec(w3‘db4‘);
a31=wrcoef(‘a‘cl‘db4‘3);
d31=wrcoef(‘d‘cl‘db4‘3);
d21=wrcoef(‘d‘cl‘db4‘2);
d11=wrcoef(‘d‘cl‘db4‘1);
c21=abs(d11);
for i=2:(length(c21)-1)
    if((c21(i)>=c21(i-1))&&(c21(i)>=c21(i+1)))
    c31(i)=c21(i);
    end
end;
c31=c31/max(c31);
figure(5);
plot(c31);
xlabel(‘采样点数‘);ylabel(‘N端模极大值标幺值‘);
for i=1:(length(c31)-1)
    if(c31(i)<0.05)
        c31(i)=0;
    end
end;
figure(6);
plot(c31);
xlabel(‘采样点数‘);ylabel(‘N端去干扰后模极大值标幺值‘);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        2635  2014-08-01 12:26  dingweichengxu.m

评论

共有 条评论