%%%%%%%%%% FDD Programe %%%%%%%%%%%%
clear
load sec1 data;% load data
AY0 = data(:,[1 2 7 8 3:6]);
% [B,A] = butter(4,0.99,'low');
% AY = filter(B,A,AY0);
Wp=20/256;Ws=30/256;Rp=1;Rs=20;
[n,Wn]=buttord(Wp,Ws,Rp,Rs);
[filt_num,filt_den] = butter(n,Wn);
AY= filter(filt_num,filt_den,AY0);
AY(:,[4,6,8]) = AY(:,[4,6,8]).*(-1); % case10
AY = detrend(AY);
fs = 512; % sampling frequency
NFFT = 4096;% number of FFT
channel = [1:8];
G0 = zeros((NFFT/2+1),length(channel)^2);
j2 = 0;
for i=1:length(channel)
for j=1:length(channel)
j2 = j2+1;
[Pff2,f1] = cpsd(AY(:,channel(i)),AY(:,channel(j)),NFFT,NFFT/4,NFFT,fs);
G0(:,j2) = Pff2;
end
end
G = zeros(length(channel),length(channel));
for i=1:(NFFT/2+1)
for i2=1:length(channel)
G(i2,:) = G0(i,((i2-1)*length(channel)+1):((i2-1)*length(channel)+length(channel)));
end
[U,S,V] = svd(G);
UU(((i-1)*length(channel)+1):((i-1)*length(channel)+length(channel)),:) = U;
SS(((i-1)*length(channel)+1):((i-1)*length(channel)+length(channel)),:) = S;
end
for i=1:length(channel)
for j=1:(NFFT/2+1)
SS0(j,i) = SS(((j-1)*length(channel)+i),i);
end
end
for i=1:8
for j=1:(NFFT/2+1)
SS1(j,i) = 20*log10(SS0(j,i));
end
end
figure
subplot(211)
plot(f1(1:200)',SS1(1:200,:))
title('Singular value'),xlabel('Hz')
subplot(212)
plot(1:200,SS1(1:200,:))
title('Singular value')
index = input('Enter the number of cutting off -- -1 = stop: ')
index0 = 0;
index1 = 0;
ii = 0;
while index>0
ii = ii+1;
index1 = index1+index-index0;
[l,index2] = max(SS1((index0+1):index1,1));
frequency(ii,1) = f1(index2+index0);
shape1 = UU(((index2+index0)*length(channel)+1):((index2+index0)*length(channel)+length(channel)),:);
shape2 = shape1;
shape3((((ii-1)*size(channel,2)+1):((ii-1)*size(channel,2)+size(channel,2))),:) = shape2;
index0 = index1;
index = input('Enter the number of cutting off -- -1 = stop: ')
end
for i=1:ii
shape(:,i) = shape3((((i-1)*size(channel,2)+1):((i-1)*size(channel,2)+size(channel,2))),1);
end
for i=1:ii
for j=1:size(shape,1)
shape(j,i) = sign(real(shape(j,i)))*abs(shape(j,i));
end
end
frequency
for i=1:size(shape,2)
figure
plot(1:length(channel),shape(:,i),'-*')
title(['Modal shape',',Frequency=',num2str(frequency(i))])
end
fdd.rar_fdd_测频率_频率_频率响应法_频率测
版权申诉
61 浏览量
2022-09-24
19:33:36
上传
评论
收藏 1022B RAR 举报
![avatar](https://profile-avatar.csdnimg.cn/5df8bff20ad645abb899a1a8333a748d_weixin_42651281.jpg!1)
小波思基
- 粉丝: 74
- 资源: 1万+
最新资源
- MyBatisCodeHelperPro 3.3.2-2322 2023.2-2024.1
- 基于Python的简单的学生成绩管理程序设计(课程设计)
- jdk-8u20-windows-x64安装版本-jdk-8u301-linux-x64解压版
- 植物大战僵尸杂交版 修改阳光和冷却
- html css js网页设计ntion-model-for-开发笔记
- 数据库课程设计-processing开发笔记
- matlab画图sic-开发demo
- 数据库原理课程设计-图书馆数据库管理系统
- IEC101Sim IEC870-5-101协议仿真主站、子站 (含源码 C++Builder)
- 2212503007陈熙炜跨境2202作业2.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)