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

📄 ex5_8.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%%%%%%%%% Example 5.8 %%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ---- Closed-loop sampled-data control system ----%cleardisp('Example 5.8')Gp = tf(1,[1 1 0])                  % plant in continuous tf formfs =10, Ts = 0.1                    % sampling frequency and perioddisp('******>'), pauseGz = c2d(Gp,Ts,'zoh')               % zero-order holdG_cz = tf(5*[1 -0.9],[1 -0.7],Ts)   % controller in discrete tf form% ------ Part a: with ideal sensor -----Ta = feedback(Gz*G_cz,1,-1)         % CL transfer function[mag_a,theta_a] = xy2p(pole(Ta));   % CL poles in polar formdisp('******>'), pausek  = [0:1:60]';ya = step(Ta,k*Ts);                 % step response% ------ Part b: with slow sensor ------H  = tf(10,[1 10])                  % sensor in continuous tf formHGz = c2d(H*Gp,Ts,'zoh')            % discretize combined H & Gpdisp('******>'), pauseTb = Gz*G_cz/(1+HGz*G_cz)           % CL transfer fucntionTb = minreal(Tb)                    % eliminate duplicate states[mag_b,theta_b] = xy2p(pole(Tb));   % CL poles in polar formfigureyb = step(Tb,k*Ts);                 % step responseplot(k*Ts,ya,'*',k*Ts,yb,'o');grid  % plot step responseslegend('unity feedback', 'slow sensor')   % add lengendxlabel('Time (s)')ylabel('Amplitude')title('Example 5.8: ideal sensor (*), sensor with dynamics (O)')%%%%%%%%%%

⌨️ 快捷键说明

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