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

📄 reinf7_7.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%% Reinforcement Problem 7.7 %%%%%%%%%%%
%   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                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ts = 0.05
Gp = tf([1 5],[1 13 12])
Kz = 9
H  = tf(60,[1 23 60])
HGp = H*Gp
HGz = c2d(HGp,Ts)
margin(HGz*Kz)
% get closed-loop system
Gz = c2d(Gp,Ts)
Gcl = Gz*Kz/(1+HGz*Kz)
Gcl = minreal(Gcl)
[mag_CLdB,ph_CL,w] = bodedb(Gcl);    % CL magnitude in dB & phase
lfg_CL = dcgain(Gcl)                 % dc gain as ratio
lfg_CLdB = 20*log10(lfg_CL);        % dc gain in decibels

BW = bwcalc(mag_CLdB,w,lfg_CLdB)    % closed-loop bandwidth in rad/s
[M_pw,i] = max(mag_CLdB)            % maximum CL frequency response
wp = w(i)                           % .....at this frequency (rad/s)
damp(Gcl)
[y,t] = step(Gcl);
[Moa,tpa,tra,tsa,essa] = tstats(t,y,dcgain(Gcl))
%%%%%%%%%%

⌨️ 快捷键说明

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