系统模型频率响应分析与平衡降阶方法
发布时间: 2025-08-17 00:06:10 订阅数: 4 

# 系统模型频率响应分析与平衡降阶方法
## 1. 结果绘图
### 1.1 绘图代码概述
以下代码用于绘制包含所有 50 个模式的模型的频率响应,并叠加各个模式的贡献。同时,还会绘制采样频率响应,并与原始 50 模式模型响应进行比较。最后,绘制两个降阶模型,包括各个模式的贡献。工作区将保存为 act8_data.mat,供后续使用。
```matlab
magddb = 20*log10(magd);
% start plotting
% plot all modes included response
loglog(f,mag(index_out,:),'k.-')
title([headstr ', gap displacement, all ',num2str(num_modes_total),' modes included'])
xlabel('Frequency, hz')
ylabel('Magnitude, mm')
axis([500 25000 -inf 1e-4])
grid off
disp('execution paused to display figure, "enter" to continue'); pause
hold on
max_modes_plot = num_modes_total;
for pcnt = 1:max_modes_plot
index = 2*pcnt;
amode = a(index-1:index,index-1:index);
bmode = b(index-1:index);
cmode = c_disp(7:8,index-1:index);
dmode = [0];
sys_mode = ss(amode,bmode,cmode,dmode);
[mag_mode,phs_mode]=bode(sys_mode,frad) ;
mag_modedb = 20*log10(mag_mode);
loglog(f,mag_mode(index_out,:),'k-')
end
axis([500 25000 -inf 1e-4])
disp('execution paused to display figure, "enter" to continue'); pause
hold off
loglog(f,mag(index_out,:),'k-',fd,magd(index_out,:),'k.-')
title([headstr ', gap displacement, all ',num2str(num_modes_total), ...
' modes included, Nyquist frequency ',num2str(nyquist_freq),' hz'])
xlabel('Frequency, hz')
ylabel('Magnitude, mm')
legend('continuous','discrete')
axis([500 25000 1e-8 1e-4])
grid off
disp('execution paused to display figure, "enter" to continue'); pause
if num_modes_used < num_modes_total
% calculate and plot reduced models
% sorted modal truncation
loglog(f,mag(index_out,:),'k-',f,mag_sort_red(index_out,:),'k.-')
title([headstr ', sorted modal truncation: gap displacement, first ', ...
num2str(num_modes_used),' modes included'])
legend('all modes','sorted partial modes',3)
xlabel('Frequency, hz')
ylabel('Magnitude, mm')
axis([500 25000 1e-8 1e-4])
grid off
disp('execution paused to display figure, "enter" to continue'); pause
hold on
for pcnt = 1:max_modes_plot
index = 2*pcnt;
amode = a_sort(index-1:index,index-1:index);
bmode = b_sort(index-1:index);
cmode = cdisp_sort(7:8,index-1:index);
dmode = [0];
sys_mode = ss(amode,bmode,cmode,dmode);
[mag_mode,phs_mode]=bode(sys_mode,frad) ;
loglog(f,mag_mode(index_out,:),'k-')
end
axis([500 25000 -inf 1e-4])
disp('execution paused to display figure, "enter" to continue'); pause
hold off
% modred using 'mdc'
loglog(f,mag(index_out,:),'k-',f,mag_mdc(index_out,:),'k.-')
title([headstr ', reduced matched dc gain: gap displacement, first ', ...
num2str(num_modes_used),' sorted modes included'])
legend('all modes','reduced mdc',3)
xlabel('Frequency, hz')
ylabel('Magnitude, mm')
axis([500 25000 1e-8 1e-4])
grid off
disp('execution paused to display figure, "enter" to continue'); pause
hold on
for pcnt = 1:max_modes_plot
index = 2*pcnt;
amode = a_sort(index-1:index,index-1:index);
bmode = b_sort(index-1:index);
cmode = cdisp_sort(7:8,index-1:index);
dmode = [0];
sys_mode = ss(amode,bmode,cmode,dmode);
[mag_mode,phs_mode]=bode(sys_mode,frad) ;
loglog(f,mag_mode(index_out,:),'k-')
end
axis([500 25000 -inf 1e-4])
disp('execution paused to display figure, "enter" to continue'); pause
hold off
% modred using 'mdc' with unsorted modes
loglog(f,mag(index_out,:),'k-',f,mag_mdc_nosort(index_out,:),'k.-')
title([headstr ', reduced unsorted matched dc gain: gap displacement, first ', ...
num2str(num_modes_used),' sorted modes included'])
legend('all modes','reduced mdc',3)
xlabel('Frequency, hz')
ylabel('Magnitude, mm')
axis([500 25000 1e-8 1e-4])
grid off
disp('execution paused to display figure, "enter" to continue'); pause
hold on
for pcnt = 1:num_modes_used
index = 2*pcnt;
amode = a(index-1:index,index-1:index);
bmode = b(index-1:index);
cmode = c_disp(7:8,index-1:index);
dmode = [0];
sys_mode = ss(amode,bmode,cmode,dmode);
```
0
0
相关推荐









