How to put a impulse disturbance in a control signal of a simulink model?
조회 수: 14 (최근 30일)
이전 댓글 표시
I want to give disturbance(not random) automatically in to system.
Say, 5 unit impulse
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 8월 28일
Use a pulse generator block
댓글 수: 2
Toby Russell
2020년 8월 24일
how do you do it in pure code in mat lab?
trying to add disturbance at 40 seconds in this code, but its not working properly...
it is supposed to be a step disturbance at 40 seconds then return to 1
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
G_disturbance = (exp(-40*s)*(1))
haggast1 = feedback ((kp + (ki/s)) * sysmod,1); % Applying the Hagglund-Astrom tuning
%haggast1 = feedback K*(1+(ki/kp)/s) * sysmod,1);
step (haggast1,'g')
hold on
step (sysmod,'k')
title ('Haggland-Astrom Tuning')
step (haggast1 + G_disturbance,'r',100) % Applying Disturbance
legend ('haggast1','sysmod','disturbance')
hold off
Applying the Cohen and coon PI Tuning
theta1 = 0.1;
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
Shrinivas Iyengar
2021년 6월 10일
Did you end up finding how do you add distrubance to a system in MATLAB code? I have a tunable PID that I tuned with systune. I have connected all the system blocks with the connect function. I would like to add an input disturbance, and see its step response. I can do this easily in Simulink (and I can eve chose at what time period I want to add the disturbance). Is it possible to do this in MATLAB?
.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!