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

📄 reinf7_8.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%% Reinforcement Problem 7.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                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ts = 0.1
Gp = tf(1,[1 8 32])
Gz  = c2d(Gp,Ts);
Kz = 20 + tf([10 0],[1 -1],Ts)
%Kz = 20 + tf(10,[1 -1],Ts)
margin(Gz*Kz)
% get closed-loop system
Gcl = feedback(Gz*Kz,1)

[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 + -