📄 cp4_4.m
字号:
%%%%%%%%%%% Comprehensive Problem 4.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 4.4')
disp('PI control of hydro-turbine system')
dhydro % read data
disp('*****>'), pause
disp('Poles of hydro-turbine system')
pole(Gz)
disp('Magnitude of hydro-turbine poles')
abs(ans)
disp('Zeros of hydro-turbine system')
tzero(Gz)
disp('*****>'), pause
disp('System in modal form')
Gz = canon(Gz,'modal')
disp('*****>'), pause
disp(' ')
disp('Hydro-turbine system with PI controller')
disp(' Ts * z ')
disp('Gc(z) = K_P (1 + K_I ------ )')
disp(' z-1 ')
disp('K_P = 0.5 and K_I = 0.4')
K_P = 0.5
K_I = 0.4
G_c = K_P*ss(1 + tf(K_I*Ts*[1 0],[1 -1],Ts))
disp('*****>'), pause
disp('Open-loop compensated system')
G_OL = Gz*G_c
disp('*****>'), pause
disp('Closed-loop system transfer function ')
T_PI = feedback(G_OL,1)
disp('*****>'), pause
disp('DC gain of closed-loop system')
dcgain(T_PI)
disp('*****>'), pause
disp('Step response of hydro-turbine to step reference input')
figure
[y,dt] = step(T_PI);
plot(dt,y,'o')
xlabel('Time (s)')
ylabel('Amplitude')
title('CP4.4: Closed-loop Response of Power P to Unit Step of Reference Input')
grid
disp('*****>'), pause
disp('end of Comprehensive Problem 4.4')
%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -