This is a demonstration of how to trim and linearize a non-linear Simulink airframe model. The problem is to find the elevator deflection, and the resulting trimmed body rate (q), which will generate a given incidence value when the missile is travelling at a set speed. Once the trim condition is found, a linear model can be derived for the dynamics of the states around the trim condition.
Fixed parameters : Incidence (Theta) Body Attitude (U) Position Trimmed steady state parameters : Elevator deflection (w) Body rate (q)
The model can be opened using the command
scdairframe
To get operating point specification object use the command
opspec = operspec('scdairframe')
Operating Specificaton for the Model scdairframe. (Time-Varying Components Evaluated at time t=0) States: ---------- (1.) scdairframe/EOM/ Equations of Motion (Body Axes)/Position spec: dx = 0, initial guess: 0 spec: dx = 0, initial guess: -3.05e+003 (2.) scdairframe/EOM/ Equations of Motion (Body Axes)/Theta spec: dx = 0, initial guess: 0 (3.) scdairframe/EOM/ Equations of Motion (Body Axes)/U,w spec: dx = 0, initial guess: 984 spec: dx = 0, initial guess: 0 (4.) scdairframe/EOM/ Equations of Motion (Body Axes)/q spec: dx = 0, initial guess: 0 Inputs: ----------- (1.) scdairframe/Fin Deflection initial guess: 0 Outputs: ----------- (1.) scdairframe/q spec: none (2.) scdairframe/az spec: none
The first state specifications to set are the Position states which are known but not at steady state:
opspec.States(1).Known = [1;1]; opspec.States(1).SteadyState = [0;0];
The second state specification is Theta which is known but not at steady state:
opspec.States(2).Known = 1; opspec.States(2).SteadyState = 0;
The third state specification are the body axis angular rates where the variable w is at steady state:
opspec.States(3).Known = [1 1]; opspec.States(3).SteadyState = [0 1];
Now search for the operating point that meets this specification
op = findop('scdairframe',opspec);
Operating Point Search Report: --------------------------------- Operating Point Search Report for the Model scdairframe. (Time-Varying Components Evaluated at time t=0) Operating condition specifications were successully met. States: ---------- (1.) scdairframe/EOM/ Equations of Motion (Body Axes)/Position x: 0 dx: 984 x: -3.05e+003 dx: 0 (2.) scdairframe/EOM/ Equations of Motion (Body Axes)/Theta x: 0 dx: -0.00972 (3.) scdairframe/EOM/ Equations of Motion (Body Axes)/U,w x: 984 dx: 22.7 x: 0 dx: 6.29e-010 (0) (4.) scdairframe/EOM/ Equations of Motion (Body Axes)/q x: -0.00972 dx: 5.74e-017 (0) Inputs: ----------- (1.) scdairframe/Fin Deflection u: 0.00142 [-Inf Inf] Outputs: ----------- (1.) scdairframe/q y: -0.00972 [-Inf Inf] (2.) scdairframe/az y: -0.242 [-Inf Inf]
The operating points are now ready for linearization. First specify the input and output points using the commands:
io(1) = linio('scdairframe/Fin Deflection',1,'in'); io(2) = linio('scdairframe/EOM',3,'out'); io(3) = linio('scdairframe/Selector',1,'out');
Linearize the model and plot the Bode magniture response for each condition.
sys = linearize('scdairframe',op,io);
bodemag(sys)