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

📄 cp3_4a.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%% Comprehensive Problem 3.4(a) %%%%%%%%%
%   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 3.4a')
disp('Proportional control of hydro-turbine system')

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

disp('Closed-loop system transfer function for ')
disp('...proportional control Kp = 0.5')
Kp = 0.5;
T = feedback(Gz*Kp,1)
disp('*****>'), pause

disp('Poles of closed-loop system')
xy2p(pole(T));
disp('Zeros of closed-loop system')
xy2p(tzero(T));
disp('DC gain of closed-loop system')
dcgain(T)
disp('*****>'), pause

disp('Step response of hydro-turbine to step reference input')
figure
[y,dt] = step(T);
plot(dt,y,'o')
xlabel('Time (s)')
ylabel('Amplitude')
title('CP3.4a: Closed-loop Response of Power P to Unit Step of Reference Input')
grid
disp('*****>'), pause

disp('Repeat computations for Kp = 0.735')
disp('Closed-loop system transfer function for ')
disp('...proportional control Kp = 0.735')
Kp = 0.735
T = feedback(Gz*Kp,1)
disp('*****>'), pause

disp('Poles of closed-loop system')
xy2p(pole(T));
disp('Zeros of closed-loop system')
xy2p(tzero(T));
disp('DC gain of closed-loop system')
dcgain(T)
disp('*****>'), pause

disp('Step response of hydro-turbine to step reference input')
figure
dt = [0:Ts:20]';
y = step(T,dt);
plot(dt,y,'o')
xlabel('Time (s)')
ylabel('Amplitude')
title('CP3.4a: Closed-loop Response of Power P to Unit Step of Reference Input')
grid
disp('*****>'), pause

disp('end of Comprehensive Problem 3.4a')
%%%%%%%%%%

⌨️ 快捷键说明

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