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

📄 cp2_4.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%% Comprehensive Problem 2.4 %%%%%%%%%%%
%   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                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hydro-turbine System

clear 
disp('Comprehensive Problem 2.4')
disp('Open-loop response of hydro-turbine system')

dhydro  % read data
disp('discrete-time transfer function')
Gz = tf(dnum,dden,Ts)  % form tf object

%  step response of hydro-turbine to q
[y,dt] = step(Gz);
figure
stem(dt,y,':')
xlabel('Time (s)')
ylabel('Amplitude')
title('CP2.4: Response of Power P to unit Step of Actuator Input u')
grid
disp('*****>'), pause

% extract numerator and denominator of transfer function
[numGz,denGz] = tfdata(Gz,'v')
[r,p,k] = residue(numGz,denGz)

disp('Note that r(2) is negative')
disp(' ')
disp('*****>'), pause

t = [0:0.07:7]';
disp('Response due to the first pole')
p(1)
y = rpole2k(p(1),r(1),t);
figure
stem(t,y,':'), grid
title('CP2.4: Response due to the first pole')
xlabel('Time (s)')
ylabel('Amplitude')
disp('*****>'), pause

disp('Response due to the second pole')
p(2)
y = rpole2k(p(2),r(2),t);
figure
stem(t,y,':'), grid
title('CP2.4: Response due to the second pole')
xlabel('Time (s)')
ylabel('Amplitude')
disp('*****>'), pause

disp('End of Comprehensive Problem 2.4')
%%%%%%%%%%

⌨️ 快捷键说明

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