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

📄 reinf3_17.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%% Reinforcement Problem 3.17 %%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ---- Gain variation for second-order system ----%cleardisp('Reinforcement Problem 3.17')Ts = 1;%---- H(z) & denG are same for each caseH = 1;      		            % unity feedbackdenG = conv([2 0.1],[1 -0.3]);  % forward transfer functiondtime = 0:Ts:10;K = [0.1 0.3 0.6 1];	        % gains for numG%-------- run 4 cases, plotting step responses as subplots ----figurefor ii = 1:4,  kG = K(ii)  G = tf(kG*[3 0.1],denG,Ts)    % forward transfer function   T = feedback(G,H)             % closed-loop system  y = step(T,dtime);            % compute step response  subplot(2,2,ii)  stem(dtime,y,':','filled');grid     % plot step response  title(['Reinf 3.17: K = ',num2str(kG)])end%----- rerun the 4 cases, plotting CL poles in z plane -----figureucircle;gridhold onfor ii = 1:4,  kG = K(ii);  disp(['==== K = ',num2str(kG),' ===='])  G = tf(kG*[3 0.1],denG,Ts);    % forward transfer function  T = feedback(G,H);             % closed-loop system  [zT,pT,kT] = zpkdata(T,'v')    % CL zeros,poles,gain  plot(real(pT),imag(pT),'*')  title(['K = ',num2str(kG)])endhold offtitle('Pole-zero plot for Reinforcement Problem 3.17')xlabel('Real part of z')ylabel('Imaginary part of z')%%%%%%%%%%

⌨️ 快捷键说明

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