Control System Steady State Error for VTOL
조회 수: 11 (최근 30일)
이전 댓글 표시
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
채택된 답변
Sam Chak
2022년 12월 5일
편집: Sam Chak
2022년 12월 5일
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
Sam Chak
2022년 12월 5일
편집: Sam Chak
2022년 12월 5일
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)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Classical Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!