reinf3_8.m

来自「离散控制系统设计的MATLAB 代码」· M 代码 · 共 29 行

M
29
字号
%%%%%%%%%%% Reinforcement Problem 3.8 %%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Two second-order systems ----%cleardisp('Reinforcement Problem 3.8')Ts = 1;                              % unity sampling periodH1 = tf([5 -4],[2 0.4 1],Ts)         % H1 in TF formH2 = tf([3 1 4],[4 3 2],Ts)          % H2(z) in TF formT = H1 + H2                 % parallel combination in TF form figure[y,k] = step(T);                    % step reponse of T(z)stem(k,y,':','filled');grid         % plot with stem optiontitle('Step response for Reinforcement Problem 3.8')xlabel('Discrete time k')%----- compute poles & zeros of H1, H2, & T ----[zH1,pH1,kH1] = zpkdata(H1,'v')      % zeros, poles, and gain of H1(z)[magpH1,thetapH1] = xy2p(pH1)        % poles of H1 in polar form[zH2,pH2,kH2] = zpkdata(H2,'v')      % zeros, poles, and gain of H2(z)[magpH2,thetapH2] = xy2p(pH2)        % poles of H2 in polar form[zT,pT,kT] = zpkdata(T,'v')          % zeros, poles, and gain of T(z)[magpT,thetapT] = xy2p(pT)           % poles of T in polar form%%%%%%%%%%

⌨️ 快捷键说明

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