Control System Steady State Error for VTOL

10 visualizzazioni (ultimi 30 giorni)
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')

Risposta accettata

Sam Chak
Sam Chak il 5 Dic 2022
Modificato: Sam Chak il 5 Dic 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])
Gp = 0.51 --------------------- 0.23 s^2 + 0.38 s + 1 Continuous-time transfer function.
[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))
Gcl = 3317 s^3 + 7297 s^2 + 5174 s + 1194 ------------------------------------------------------------- s^5 + 121.7 s^4 + 7119 s^3 + 1.377e04 s^2 + 2.083e04 s + 1194 Continuous-time transfer function.
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)
yss = 1.0000
Another way to check is the steady-state output of . If the , then it is guaranteed to achieve zero steady state error.
  5 Commenti
Abdul Rahman Alam
Abdul Rahman Alam il 5 Dic 2022
Modificato: Abdul Rahman Alam il 5 Dic 2022
@Sam Chak can you enlighthen me how did you get the values of (kp, ki, kd, Tf)? we only studied it as equations but dind't apply it on actual example. and is Tf stand for closed loop transfer function?
Sam Chak
Sam Chak il 5 Dic 2022
Modificato: Sam Chak il 5 Dic 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])
Gp = 0.51 --------------------- 0.23 s^2 + 0.38 s + 1 Continuous-time transfer function.
% Control Design
wc = 6; % desired crossover frequency
opts = pidtuneOptions('PhaseMargin', 90, 'DesignFocus', 'reference-tracking');
[Gc, info] = pidtune(Gp, 'PIDF', wc, opts)
Gc = 1 s Kp + Ki * --- + Kd * -------- s Tf*s+1 with Kp = 4.34, Ki = 1.83, Kd = 2.43, Tf = 0.00146 Continuous-time PIDF controller in parallel form.
info = struct with fields:
Stable: 1 CrossoverFrequency: 6 PhaseMargin: 90
% Closed-loop transfer function
Gcl = minreal(feedback(Gc*Gp, 1))
Gcl = 3705 s^2 + 6607 s + 2785 ------------------------------------------ s^4 + 687.3 s^3 + 4842 s^2 + 9589 s + 2785 Continuous-time transfer function.
% Error transfer function
Ge = 1 - Gcl;
step(Ge); grid;
Gcp = Gc*Gp;
margin(Gcp)

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by