Simulink Control Design™ - MathWorks

(Tuis.) #1

Use operspec to specify the trim condition, use findop to compute the trim values of
and , and linearize the airframe dynamics for the resulting operating point. See the
"Trimming and Linearizing an Airframe" example in Simulink Control Design for details.


Repeat these steps for the 45 flight conditions.


% Compute trim condition for each (alpha,V) pair
clear op
for ct=1:nA*nV
alpha_ini = alpha(ct); % Incidence [rad]
v_ini = V(ct); % Speed [m/s]


% Specify trim condition
opspec = operspec('rct_airframeTRIM');
% Xe,Ze: known, not steady
opspec.States(1).Known = [1;1];
opspec.States(1).SteadyState = [0;0];
% u,w: known, w steady
opspec.States(3).Known = [1 1];
opspec.States(3).SteadyState = [0 1];
% theta: known, not steady
opspec.States(2).Known = 1;
opspec.States(2).SteadyState = 0;
% q: unknown, steady
opspec.States(4).Known = 0;
opspec.States(4).SteadyState = 1;


% TRIM
Options = findopOptions('DisplayReport','off');
op(ct) = findop('rct_airframeTRIM',opspec,Options);
end


% Linearize at trim conditions
G = linearize('rct_airframeTRIM',op);
G = reshape(G,[nA nV]);
G.u = 'delta';
G.y = {'alpha' 'V' 'q' 'az' 'gamma' 'h'};


This produces a 5-by-9 array of linearized plant models at the 45 flight conditions.
The plant dynamics vary substantially across the flight envelope.


sigma(G), title('Variations in airframe dynamics')


Tuning of Gain-Scheduled Three-Loop Autopilot
Free download pdf