?? reinf7_2.m
字號:
%%%%%%%%%%% Reinforcement Problem 7.2 %%%%%%%%%%%
% 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 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---- State-space model ----
%
clear
disp('Reinforcement Problem 7.2')
Ts = 0.05
A = [-5 -2 0; 1 0 0; 0 1 0]
B = [1; 0; 0], C = [1 0 2], D = 0
Gs = ss(A,B,C,D) % plant in continuous SS form
Gz = c2d(Gs,Ts,'zoh') % discretize plant with ZOH
Gc = ss(0.6,1,0.5,0,Ts) % discrete controller
T = feedback(Gz*Gc,1) % CL system
[wn,zeta,pp] = damp(T);
wn
zeta
[mag_pp,theta_pp] = xy2p(pp)
[y,t] = step(T);
[Mo,tp,tr,ts,ess] = kstats(t,y,1)
%%%%%%%%%%
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -