reinf3_9.m

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

M
29
字号
%%%%%%%%%%% Reinforcement Problem 3.9 %%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Stable zero-pole cancellation ----%cleardisp('Reinforcement Problem 3.9')Ts = 1;                              % unity sampling periodH1 = tf(1,[1 -0.1 -0.02],Ts)         % H1 in TF formH2 = tf([2 -1],[1 0.1 -0.06],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.9')xlabel('Discrete time k')%----- compute poles & zeros of H1, H2, & T ----[zH1,pH1,kH1] = zpkdata(H1,'v');      % zeros, poles, and gain of H1(z)[zH2,pH2,kH2] = zpkdata(H2,'v');      % zeros, poles, and gain of H2(z)[zT,pT,kT] = zpkdata(T,'v');          % zeros, poles, and gain of T(z)[magzT,thetazT] = xy2p(zT)            % zeros of T(z) in polar form[magpT,thetapT] = xy2p(pT)            % poles of T(z) in polar form%%%%%%%%%%

⌨️ 快捷键说明

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