📄 reinf3_4.m
字号:
%%%%%%%%%%% Reinforcement Problem 3.4 %%%%%%%%%%%% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ---- Three systems in series ----%cleardisp('Reinforcement Problem 3.4')Ts = 1;G1 = tf([1 0.1],[1 0.5],Ts) % G1 in TF formG2 = tf(2*[1 1.5],[0.5 0.2 0.2],Ts) % G2 in TF formG3 = tf([3 1],[1 0.2 0.8],Ts) % G3 in TF formT = G3*G2*G1 % series combination in TF formk = [0:Ts:40]; % discrete time sequencey = step(T,k); % compute step response figurestem(k,y,':','filled'); grid % plot responsetitle('Step response for Reinforcement Problem 3.4')xlabel('Discrete time k')%----- compute poles & zeros of G1, G2, & T ----[zG1,pG1,kG1] = zpkdata(G1,'v') % zeros, poles, & gain of G1[zG2,pG2,kG2] = zpkdata(G2,'v') % zeros, poles, & gain of G2[zG3,pG3,kG3] = zpkdata(G3,'v') % zeros, poles, & gain of G3[zT,pT,kT] = zpkdata(T,'v') % zeros, poles, & gain of T(z)%---- display all zeros in polar form[magzG1,thetazG1] = xy2p(zG1)[magzG2,thetazG2] = xy2p(zG2)[magzG3,thetazG3] = xy2p(zG3)[magzT,thetazT] = xy2p(zT)%---- display all poles in polar form[magpG1,thetapG1] = xy2p(pG1)[magpG2,thetapG2] = xy2p(pG2)[magpG3,thetapG3] = xy2p(pG3)[magpT,thetapT] = xy2p(pT)%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -