?? olp_pend.m
字號:
% Generates the plant model
%
clear
[A,B,C,D] = mod_pend;
G = pck(A,B,C,D);
T = C(10:12,1:3);
S = pck(-eye(3),zeros(3),zeros(3),T);
%
% singular values of G
olp_ic = sel(G,[7:9],[10:11]);
omega = logspace(-2,6,100);
olp_g = frsp(olp_ic,omega);
figure(1)
vplot('liv,lm',vsvd(olp_g))
grid
title('Singular value plot of G')
xlabel('Frequency (rad/sec)')
%
% actuators
act_pend
%
% construct weighting functions
wsn_pend
wts_pend
omega = logspace(-4,6,100);
wn_g = frsp(wn,omega);
figure(2)
vplot('liv,lm',wn_g,'m-')
grid
title('Sensor noise weight')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
omega = logspace(-6,4,100);
Wpi = minv(Wp);
Wpi_g = vsvd(frsp(Wpi,omega));
figure(3)
vplot('liv,lm',sel(Wpi_g,1,1),'r-',sel(Wpi_g,2,1),'c--',sel(Wpi_g,3,1),'m-.')
grid
title('Inverse performance weighting functions')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
text(2*10^(-4),4*10^5,'w_{p1}^{-1}')
text(2*10^(-2),16*10^0,'w_{p2}^{-1}')
text(2*10^(+2),10^0/4,'w_{p3}^{-1}')
%
% open-loop connection with weighting functions
systemnames = ' Act1 Act2 G S Wn Wp Wu ';
inputvar = '[ pertin{8}; ref{3}; dist{3}; noise{3}; control{2} ]';
outputvar = '[ Act1(1); Act2(1); G(1:6); Wp; Wu; -G(10:12) - Wn; S ]';
input_to_Act1 = '[ pertin(1); control(1) ]';
input_to_Act2 = '[ pertin(2); control(2) ]';
input_to_G = '[ pertin(3:8); dist; Act1(2); Act2(2) ]';
input_to_S = '[ ref ]';
input_to_Wn = '[ noise ]';
input_to_Wp = '[ ref - G(7:9) ]';
input_to_Wu = '[ control ]';
sysoutname = 'pend_ic';
cleanupsys = 'yes';
sysic;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -