reinf2_7.m

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

M
34
字号
%%%%%%%%%%% Reinforcement Problem 2.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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- Third-order System with Responses Due to Individual Poles ---%cleardisp('Reinforcement Problem 2.7')numG = [0.2 1.1 0.5];                         % create G(z)denG = [1 0.7 0.5 0.1];[rGoz,pGoz,otherGoz] = residue(numG,[denG 0]) % residues, poles of G(z)/zdtime = [0:14];                               % sampled time data sequenceycmplx = cpole2k(pGoz(1),rGoz(1),dtime);      % response due to complex polesyreal1 = rpole2k(pGoz(3),rGoz(3),dtime);      % response due to 1st real poleyreal2 = rpole2k(pGoz(4),rGoz(4),dtime);      % response due to 2nd real poleytot = ycmplx + yreal1 + yreal2;              % ytot(k) is sum of the three%----- plot individual responses as separate plotsfiguresubplot(3,1,1)         %----- Response due to complex poles -----  stem(dtime,ycmplx,'filled');gridtitle('Reinf 2.7: Due to complex poles at z = 0.6211e^{+/-j1.9335}')subplot(3,1,2)         %----- Response due to real poles -----stem(dtime,yreal1,'filled');gridhold onstem(dtime,yreal2,'o')hold offtitle('Reinf 2.7: Real poles: z = 0.2592 (solid); z = 0 (O)')subplot(3,1,3)         %----- Complete response -----    stem(dtime,ytot,'filled');gridtitle('Reinf 2.7: Complete response')%%%%%%%%%%

⌨️ 快捷键说明

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