ex4_3.m

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

M
66
字号
%%%%%%%%%%%%%%%%%% Example 4.3 %%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Eigenvalues and transmission zeros ----%cleardisp('Example 4.3')Ts = 1                                  % sampling Interval (sec)A = [0 1 0; -0.65 -0.7 1; 0.25 0 0.5] 	% state-space matricesB = [0; 0; 10], C = [1 0 1], D = 0disp('******>'), pauseG = ss(A,B,C,D,Ts)                      % build system as SS objectdisp('built system as SS LTI object')disp('******>'), pause%--- extract zeros, poles & gain from SS object[zG,pG,kG] = zpkdata(G,'v')             disp('******>'), pause%--- convert zeros to polar form and displaydisp('zeros, in polar form are:')[mag_zG,theta_zG] = xy2p(zG);      % zeros in polar formdisp(' ')%--- convert poles to polar form and displaydisp('poles, in polar form are:')[mag_pG,theta_pG] = xy2p(pG);      % poles in polar formdisp(' ')disp('zeros, poles & gain from SS form')disp('******>'), pause%--- compute zeros using tzero command and convert to polar formdisp('.....zeros, from tzero cmd......')[mag_zeroG,theta_zeroG] = xy2p(tzero(G));disp('******>'), pause%--- compute poles using pole command and convert to polar formdisp('.....poles, from pole cmd......')[mag_poleG,theta_poleG] = xy2p(pole(G));  % poles in polar formdisp(' ')disp('******>'), pausedcgain(G)              % compute DC gainfigureucircle                % draw the unit circleaxis equal, hold onpzmap(G)               % plot zeros & poles in z-planeaxis([-1.4 1.4 -1.4 1.4]); hold offset_xo_size            % use larger X's and O's%%%%%%%%%%

⌨️ 快捷键说明

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