离散控制系统设计的MATLAB 代码

源代码在线查看: ex2_9.m

软件大小: 596 K
上传用户: scorpioll
关键词: MATLAB 离散 控制系统设计 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				%%%%%%%%%%%%%%%%%% Example 2.9 %%%%%%%%%%%%%%%%%%				%   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                 %				%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%				%   ---- Poles and system stability ----				%				clear				disp('Example 2.9')				numG = [3 1.8 1.08]                  % generate G(z) as TF object				denG = [1 -1.25 0.495 -0.0035 -0.1862]				G = tf(numG,denG,1)                  % sampling period = 1.0 s				disp('******>'), pause 								disp('Poles of G via pole command')				xy2p(pole(G));                       % poles of G via pole command				disp('Poles of G via roots command')				xy2p(roots(denG));                   % poles of G via roots command 												%----------- poles and zeros ---------------				figure				ucircle, hold on                     % show unit circle in z-plane				pzmap(G), hold off                   % draw pole-zero plot				title('Example 2.9')				set_xo_size                          % make larger X's ans O's				disp('Plotting pole-zero locations')				disp('******>'), pause 				%----------- delta response ----------				k = 0:80;				y = impulse(G,k);                    % compute delta response of G(z)				figure				stem(k,y,'o:');grid                  % plot with dotted stems & o's				xlabel('Time (s)')				ylabel('Amplitude')				title('Impulse response for Example 2.9')				disp('Plotting impulse response')				%%%%%%%%%%			

相关资源