|
这个是我以前做作业时留下的。MATLAB程序。
信号是一组正弦,最后一项 1e-5*ones(4,2048)....为噪声。
以前不怎么会用,所以程序不是很好。
仅供参考。
- % ITD(DLS)
- %M--测点个数 %R--采样点个数 % ts<0.004 delt<0.008 ks=4
- SSg=[0.14 0.13 0.2 0.15 0.26]; %阻尼理论值
- WWd=[62 45 10 26 32] %频率理论值
- M=5;R=512;ts=0.001;ks=4;delt=ks*ts;R2=2*R;M2=2*M;pi=3.1415926;
- %t=[0.000:0.001:1.023;0.011:0.001:1.034;0.004:0.001:1.027;0.015:0.001:1.038];
- %t=[0.000:0.001:0.511;0.011:0.001:0.522;0.004:0.001:0.515;0.015:0.001:0.526];
- t=[0.000:0.001:2.047;0.011:0.001:2.058;0.004:0.001:2.051;0.015:0.001:2.062];
- y1(:,:)=3.5e-4*exp(-0.2*t).*sin(10*t+0.13*pi)+2.0e-4*exp(-0.15*t).*sin(26*t+0.20*pi)+1.00e-4*exp(-0.26*t).*sin(32*t+0.40*pi)+1.2e-4*exp(-0.13*t).*sin(45*t+0.50*pi)+1.4e-4*exp(-0.14*t).*sin(62*t+0.15*pi)+1e-5*ones(4,2048);
- y2(:,:)=1.5e-4*exp(-0.2*t).*sin(10*t+0.24*pi)+2.5e-4*exp(-0.15*t).*sin(26*t+0.40*pi)+1.57e-4*exp(-0.26*t).*sin(32*t+0.40*pi)+0.9e-4*exp(-0.13*t).*sin(45*t+0.75*pi)+1.7e-4*exp(-0.14*t).*sin(62*t+0.35*pi)+3e-6*ones(4,2048);
- y3(:,:)=1.1e-4*exp(-0.2*t).*sin(10*t+0.32*pi)+1.6e-4*exp(-0.15*t).*sin(26*t+0.20*pi)+2.20e-4*exp(-0.26*t).*sin(32*t+0.60*pi)+1.4e-4*exp(-0.13*t).*sin(45*t+0.35*pi)+1.0e-4*exp(-0.14*t).*sin(62*t+0.50*pi)+1e-6*ones(4,2048);
- y4(:,:)=0.9e-4*exp(-0.2*t).*sin(10*t+0.72*pi)+1.4e-4*exp(-0.15*t).*sin(26*t+0.82*pi)+1.80e-4*exp(-0.26*t).*sin(32*t+0.06*pi)+2.4e-4*exp(-0.13*t).*sin(45*t+0.35*pi)+1.3e-4*exp(-0.14*t).*sin(62*t+0.15*pi)+5e-6*ones(4,2048);
- y5(:,:)=1.4e-4*exp(-0.2*t).*sin(10*t+0.32*pi)+1.0e-4*exp(-0.15*t).*sin(26*t+0.20*pi)+0.90e-4*exp(-0.26*t).*sin(32*t+0.45*pi)+1.6e-4*exp(-0.13*t).*sin(45*t+0.23*pi)+1.7e-4*exp(-0.14*t).*sin(62*t+0.80*pi)+7e-6*ones(4,2048);
- D(1,:)=y1(1,:);D(2,:)=y2(1,:);D(3,:)=y3(1,:);D(4,:)=y4(1,:);D(5,:)=y5(1,:);
- D(6,:)=y1(2,:);D(7,:)=y2(2,:);D(8,:)=y3(2,:);D(9,:)=y4(2,:);D(10,:)=y5(2,:);
- DD(1,:)=y1(3,:);DD(2,:)=y2(3,:);DD(3,:)=y3(3,:);DD(4,:)=y4(3,:);DD(5,:)=y5(3,:);
- DD(6,:)=y1(4,:);DD(7,:)=y2(4,:);DD(8,:)=y3(4,:);DD(9,:)=y4(4,:);DD(10,:)=y5(4,:);
- A=((DD*D')*inv(D*D')+(DD*DD')*inv(D*DD'))/2;
- [F,Y]=eig(A);
- for j=1:M
- U(j)=real(Y(2*j-1,2*j-1));
- V(j)=imag(Y(2*j-1,2*j-1));
- Sg(j)=-log(U(j)*U(j)+V(j)*V(j))/(2*delt);
- Wd(j)=atan(V(j)/U(j))/delt;
- end
- MCF=abs(F(1,1:2:9)./F(6,1:2:9))
- Sg % 阻尼识别值 0.1583 0.1566 0.2442 0.1543 0.2226
- Wd % 频率识别值 61.9866 44.9597 9.9330 26.0067 31.9731
- (Sg-SSg)./SSg*100 % 误差(%) 13.0567 20.4311 22.0982 2.8976 -14.4016
- (Wd-WWd)./WWd*100 % 误差(%) -0.0216 -0.0895 -0.6698 0.0257 -0.0842
复制代码 |
评分
-
2
查看全部评分
-
|