a unit step disturbance

조회 수: 5 (최근 30일)
Toby Russell
Toby Russell 2020년 7월 20일
댓글: Toby Russell 2020년 8월 23일
Hi All,
I need to Simulate a controllers with a unit step change in set-point followed by a unit step
disturbance at a time of 40 seconds.
My question is, what ways are there of going about implementing the unit step disturbance?
Some guidance with this would be appreciated.
Some of the code is below
K = 2;
tau = 3;
den = [tau 1];
sysmod = tf(K,den,'inputdelay',1)
plot (time,response,'g');
hold on
step (sysmod,'k')
hold off
Hagglund-Astrom
Kc = 0.175;
tauI = 2;
theta = 0; %Defines the dead time in the process
haggast1 = feedback((tf(Kc*exp(-theta*s)/s)*sysmod),0.5);
step (haggast1,'g')
hold on
step (sysmod,'k')
legend ('haggast1','sysmod')
hold off
Thanks
Toby
  댓글 수: 1
Toby Russell
Toby Russell 2020년 8월 23일
Is anyone here able to help me out with this?
I am looking for how to code a unit step disturbance at 40 seconds.
my code is as follows
(live script)
oad response.dat
plot (time,response,'g');
title ('Actual response')
xlabel ('Time')
ylabel ('Amplitude')
hold on
s=tf('s')
K = 2;
tau = 3;
sysmod = exp(-s)*(K/(tau*s+1))
plot (time,response,'g');
hold on
step (sysmod,'k')
title ('System Model Step Response')
hold off
Applying the Hagglund-Astrom Tuning
theta = 0.27; % Defines the dead time in the process
kp = (0.14/K)+((0.28*tau)/(theta*K)) % Defines the Proportional element CORRECT
ki = ((0.33*theta) + ((6.8*theta*tau)/(10*theta+tau))) % Defines the Integral element CORRECT
haggast1 = feedback((kp + (ki/s))*sysmod,1); % Applying the Hagglund-Astrom tuning
step (haggast1,'g')
hold on
step (sysmod,'k')
%step (haggast1,40)
title ('Haggland-Astrom Tuning')
legend ('haggast1','sysmod')
hold off
Applying the Cohen and coon PI Tuning
theta1 = 0.275;
kp1 = (1/K)*(tau/theta1)*(0.9+(theta1/(12*tau))) % Defines the Proportional element CORRECT
ki1 = (theta1*(30+(3*(theta1/tau))) / (9+(20*(theta1/tau))))% Defines the Integral element CORRECT
CC = feedback((kp1 + (ki1/s))*sysmod,1); % Applying the Cohen Coon tuning
step (CC,'g')
hold on
step (sysmod,'k')
title ('Cohen Coon Tuning')
legend ('CC','sysmod')
hold off

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by