📄 ex7_1.m
字号:
%%%%%%%%%%%%%%%%%% Example 7.1 %%%%%%%%%%%%%%%%%%
% Discrete-Time Control Problems using %
% MATLAB and the Control System Toolbox %
% by J.H. Chow, D.K. Frederick, & N.W. Chbat %
% Brooks/Cole Publishing Company %
% September 2002 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---- Damping ratio computation ----
%
clear
disp('Example 7.1')
Ts = 0.1 % sampling time
Gp = tf(1,[1 1 0]) % plant in continuous tf form
Gz = c2d(Gp,Ts,'zoh') % discretization with zero-order hold
Kz = tf(5*[1 -0.9],[1 -0.7],Ts) % controller in discrete tf form
disp('******>'), pause
Ta = feedback(Gz*Kz,1,-1) % CL transfer function
p = pole(Ta); % closed-loop poles in z-plane
[r,del] =xy2p(p); % poles in polar form
damp(Ta) % damping ratios
disp('******>'), pause
sig = -log(r)/Ts % real part of equiv. s-plane pole
w = del/Ts % imag part of equiv. s-plane pole
zeta = cos(atan(-w./sig)) % damping ratio
wn = sqrt(sig.^2+w.^2) % undamped natural frequency
%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -