Design an LQR based Pitch Damper for an Aircraft
August 26, 2016
Institute of Space Technology, Islamabad.
Flight Dynamics & Controls Center
Department of Aeronautics & Astronautics
Institute of Space Technology, Islamabad
1. Consider the following system and define it in MATLAB.
𝑢̇ −0.2137 0.9124 −0.2099 0.0817 𝑢 (ft/s) −0.0243
𝛼̇ −1.76 −427.955 536.745 −13.97 𝛼 (deg) −0.0634 [𝛿 ]
[ ]=[ ] +[ ]
𝑞̇ 0.5219 −2.8952 −2.2482 −0.8970 𝑞 (deg/s) −3.6942 𝐸
𝜃̇ 0 0 1 0 [𝜃 (deg)] 0
𝑢
𝛼
[𝜃] = [0 0 0 1] [ 𝑞 ]
𝜃
A = [-0.2137 0.9124 -0.2099 0.0817;...
-1.7600 -427.9550 536.7450 -13.9700;...
0.5219 -2.8952 -2.2482 -0.8970;...
0.0000 0.0000 1.0000 0.0000];
B = [-0.0243;...
-0.0634;...
-3.6942;...
0.0000];
C = [0 0 0 1];
D = zeros(1,1);
sys = ss(A,B,C,D);
2. Check its impulse response and other characteristics:
>> impulse(sys)
Page 1 of 3
Flight Dynamics & Controls Center
Department of Aeronautics & Astronautics
Institute of Space Technology, Islamabad
3. Design Controller:
% Define LQR Parameters
Q = eye(4);
Q(3,3) = 100; % More weight to pitch rate
R = 1;
% Find optimal feedback gain
K = lqr(sys,Q,R);
4. Now to simulate the closed loop response we need to construct its transfer function or
state space. See figure below for reference
sys1 = ss(A,B,eye(4),zeros(4,1));
sys1.u = 'E'; sys1.y = 'x';
gain = tf(K);
gain.u = 'x'; gain.y = 'u';
gain2 = tf(C);
gain2.u = 'x'; gain2.y = 'Y';
sum1 = sumblk('E = R - u');
Y = {'Y'};
U = {'R'};
T = connect(sys1, gain,gain2,sum1,U,Y);
T
sys
R + Sum1
E sys1 C Y
x
-
u K
Page 2 of 3
Flight Dynamics & Controls Center
Department of Aeronautics & Astronautics
Institute of Space Technology, Islamabad
5. Check responses:
>> impulse(T,sys)
Page 3 of 3