⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frs_pend.m

📁 三级倒立摆的稳定
💻 M
字号:
% Frequency responses of the closed-loop system
%
sim_pend
clp_ic = starp(pend_sm,K,6,2);
%
% singular values of the closed-loop transfer function
omega = logspace(-4,2,100);
ref_loop = sel(clp_ic,[9:11],[9:11]);
ref_g = vsvd(frsp(ref_loop,omega));
figure(1)
vplot('liv,lm',sel(ref_g,1,1),'r-',sel(ref_g,2,1),'c--')
grid
temp1 = 'Singular value plot of the';
temp2 = ' closed-loop transfer function matrix';
title([temp1,temp2])
xlabel('Frequency (rad/sec)')
%
% singular values of the disturbance transfer function
omega = logspace(-4,4,100);
dis_loop = sel(clp_ic,[9:11],[12:14]);
dis_g = vsvd(frsp(dis_loop,omega));
figure(2)
vplot('liv,lm',sel(dis_g,1,1),'r-',sel(dis_g,2,1),'m--', ...
               sel(dis_g,3,1),'c-.')
grid
title('Singular value plot of the disturbance transfer function')
xlabel('Frequency (rad/sec)')
%
% singular values of the noise transfer function
nos_loop = sel(clp_ic,[9:11],[15:17]);
nos_g = vsvd(frsp(nos_loop,omega));
figure(3)
vplot('liv,lm',sel(nos_g,1,1),'r-',sel(nos_g,2,1),'c--')
grid
title('Singular value plot of the noise transfer function')
xlabel('Frequency (rad/sec)')
%
% singular values of $T_{ur}$
ref_u = sel(clp_ic,[12:13],[9:11]);
ref_g = vsvd(frsp(ref_u,omega));
figure(4)
vplot('liv,lm',sel(ref_g,1,1),'r-',sel(ref_g,2,1),'c--')
grid
title('Singular value plot of T_{ur}')
xlabel('Frequency (rad/sec)')
%
% singular values of $T_{ud}$
dist_u = sel(clp_ic,[12:13],[12:14]);
dist_g = vsvd(frsp(dist_u,omega));
figure(5)
vplot('liv,lm',sel(dist_g,1,1),'r-',sel(dist_g,2,1),'c-.')
grid
title('Singular value plot of T_{ud}')
xlabel('Frequency (rad/sec)')
%
% singular values of $T_{u\eta}$
noise_u = sel(clp_ic,[12:13],[15:17]);
noise_g = vsvd(frsp(noise_u,omega));
figure(6)
vplot('liv,lm',sel(noise_g,1,1),'r-',sel(noise_g,2,1),'c--')
grid
title('Singular value plot of T_{u\eta}')
xlabel('Frequency (rad/sec)')
%
% singular values of the controller
K_g = vsvd(frsp(K,omega));
figure(7)
vplot('liv,lm',sel(K_g,1,1),'r-',sel(K_g,2,1),'c--')
grid
title('Singular value plot of the controller')
xlabel('Frequency (rad/sec)')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -