📄 ex4_3.m
字号:
%%%%%%%%%%%%%%%%%% 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -