Disturbance Rejection with PID turner
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to do a disturbance rejection with PID tuner.I'm trying to do it but it keeps giving error.Could you help me?
G=tf([1],[0.1 1]);
G.InputName='yzad';
G.Output='ys';
yzad={1,10,100}
K={-100,-10,1,5,3}
Sum=sumbkl('++','yzad','ys')
ISAPID=connect('-100','Sum','G')
tf(ISAPID)
You can find my diagram attached .Thanks
0 commentaires
Réponse acceptée
Sam Chak
le 25 Juin 2022
Hi @Esin Derin
For simplicity, you can do something straightforward and plot the time responses like this.
Case 1a: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 1; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -100; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
lsim(Gcl, u, t)
grid on
Case 1b: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 10; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -100; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
lsim(Gcl, u, t)
grid on
Case 1c: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 100; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -100; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
lsim(Gcl, u, t)
grid on
Case 2a: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 1; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -10; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
lsim(Gcl, u, t)
grid on
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur PID Controller Tuning dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!