How to put a impulse disturbance in a control signal of a simulink model?
18 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to give disturbance(not random) automatically in to system.
Say, 5 unit impulse
0 Commenti
Risposte (1)
Azzi Abdelmalek
il 28 Ago 2013
Use a pulse generator block
2 Commenti
Toby Russell
il 24 Ago 2020
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
il 10 Giu 2021
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?
.
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!