ex3_2.m

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

M
35
字号
%%%%%%%%%%%%%%%%%% Example 3.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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Parallel connection of two systems ----%cleardisp('Example 3.2')Ts = 1;                             % unity sampling periodH1 = tf([1 0.5],[1 0.75],Ts)        % H1 in TF form%---- use convolution cmd to multiply 3 polynomials in denominator of H2denH2 = conv([1 -0.9],conv([1 -0.8],[1 0.8]))H2 = tf([0.15 0],denH2,Ts)          % H2(z) in TF formdisp('******>'), pause %---- parallel combination will be in TF form -----------T = H1 + H2                         [zT,pT,kT] = zpkdata(T,'v')         % zeros, poles, and gain of T(z)disp('******>'), pause xy2p(zT);                           % zeros of T(z) in polar formpH1 = pole(H1)                      % poles of H1pH2 = pole(H2)                      % poles of H2figure[y,k] = step(T);                    % step reponse of T(z)stem(k,y,':','filled');grid         % plot with stem optiontitle('Step response for Example 3.2')xlabel('Time (s)')%%%%%%%%%%

⌨️ 快捷键说明

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