Control System Steady State Error for VTOL
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abdul Rahman Alam
am 5 Dez. 2022
Bearbeitet: Sam Chak
am 5 Dez. 2022
I am designing the control system that have a crossover frequency is wc=6 rad/s, 90 degrees least phase margin,and steady-state error must be zero.
but I am having steady state error equal to 1, I am trying to make it 0 but it is not working.
need guidance on what I am doing wrong.
Equations that I am using (values of a and b are random):
My code:
clc
clear
close
%%
wc=6;
G=tf(0.51,[0.23 0.38 1]);
[mag,pahse]=bode(G,wc);
Kp=1/mag;
L=Kp*G;
pzmap(G)
axis ([-1 1 -3 3])
%%
margin(G); grid;
hold on
margin(L);
legend('G(s)','L(s)')
hold off
%%
%klead
a=10;
klead1=tf([a wc],[1 a*wc]);
klead2=tf([a wc],[1 a*wc]);
Klead=klead1*klead2;
L=Kp*G*Klead;
figure(2)
margin(L); grid;
%%
%klag
b=1;
Klag=tf([1 b],[1 0]);
L=Kp*G*Klead*Klag;
figure(3)
margin(L); grid;
e=feedback(L,1)
figure(4)
step(e); grid;
legend('Kp=0.0669')
0 Kommentare
Akzeptierte Antwort
Sam Chak
am 5 Dez. 2022
Bearbeitet: Sam Chak
am 5 Dez. 2022
The transfer function between the error signal and the input signal is defined by
where is the closed-loop system.
wc = 6;
Gp = tf(0.51, [0.23 0.38 1])
[mag, phase] = bode(Gp, wc);
Kp = 1/mag;
L = Kp*Gp;
pzmap(Gp)
axis ([-1 1 -3 3])
%%
margin(Gp); grid;
hold on
margin(L);
legend('G(s)','L(s)')
hold off
%%
%klead
a = 10;
klead1 = tf([a wc], [1 a*wc]);
klead2 = tf([a wc], [1 a*wc]);
Klead = klead1*klead2;
L = Kp*Gp*Klead;
figure(2)
margin(L); grid;
%%
%klag
b = 1;
Klag = tf([1 b], [1 0]);
L = Kp*Gp*Klead*Klag;
figure(3)
margin(L); grid;
Gcl = minreal(feedback(L, 1))
figure(4)
err = 1 - Gcl; % error signal
step(err); grid;
legend('Kp=0.0669')
It achieves zero steady state error for a unit step input.
yss = dcgain(Gcl)
Another way to check is the steady-state output of . If the , then it is guaranteed to achieve zero steady state error.
5 Kommentare
Sam Chak
am 5 Dez. 2022
Bearbeitet: Sam Chak
am 5 Dez. 2022
If you find the explanation and MATLAB code helpful, please consider accepting ✔ and voting 👍 the Answer. Thanks a bunch! 🙏
Back to your query, clicking the link, you will find the PIDF controller, which stands for Proportional, Integral, and Derivative with first-order filter on derivative term.
So, the Tf is actually the time constant of the first-order filter, as shown in the Continuous-Time Controller Formula:
Note that Tf is usually a very small value so that it approximates ideal PID controller:
As mentioned previously, the values of (kp, ki, kd, Tf) were manually tuned until performance requirements were achieved. In fact, I used margin() iteratively to check that. Mine was the computer-assisted manual tuning.
If you are looking for the "Computer-tunes-it-for-me" approach, then try this powerful script:
Gp = tf(0.51, [0.23 0.38 1])
% Control Design
wc = 6; % desired crossover frequency
opts = pidtuneOptions('PhaseMargin', 90, 'DesignFocus', 'reference-tracking');
[Gc, info] = pidtune(Gp, 'PIDF', wc, opts)
% Closed-loop transfer function
Gcl = minreal(feedback(Gc*Gp, 1))
% Error transfer function
Ge = 1 - Gcl;
step(Ge); grid;
Gcp = Gc*Gp;
margin(Gcp)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Classical Control Design finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!