⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex2_4.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%%%%%%%%% Example 2.4 %%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Response due to individual poles ----%cleardisp('Example 2.4')numG = [2 -2.2 0.56];                         % create G(z)denG = [1 -0.6728 0.0463 0.4860];[rGoz,pGoz,otherGoz] = residue(numG,[denG 0]) % residues, poles of G(z)/zdisp('*****>'), pausedisp('Poles in polar form')xy2p(pGoz);            % show poles in polar formdisp('Residues in polar form')xy2p(rGoz);            % show residues in polar formdtime = [0:30];                               % 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('Ex. 2.4: Due to complex poles at z = 0.90exp(+/-j0.7854)')subplot(3,1,2)       %----- Response due to real poles ----- stem(dtime,yreal1,'filled'),gridhold onstem(dtime,yreal2,'o')hold offtitle('Ex. 2.4: Real poles: z = -0.60 (solid); z = 0 (O)')subplot(3,1,3)       %----- Complete response -----stem(dtime,ytot,'filled'),gridxlabel('k')title('Ex. 2.4: Complete response')%%%%%%%%%%

⌨️ 快捷键说明

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