reinf3_7.m

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

M
32
字号
%%%%%%%%%%% Reinforcement Problem 3.7 %%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Second- and first-order systems ----%cleardisp('Reinforcement Problem 3.7')Ts = 1;                              % unity sampling periodH1 = tf([2 -0.3],[5 2 2],Ts)         % H1 in TF formH2 = tf(3*[1 0.5],[6 -1],Ts)         % H2(z) in TF form%---- parallel combination will be in TF form -----------T = H1 + H2                         %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.7')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 + -
显示快捷键?