trim and linearize an airframe -凯发k8网页登录
this example shows how to trim and linearize an airframe using simulink® control design™ software.
the goal is to find the elevator deflection and the resulting trimmed body rate that generate a given angle of incidence when the airframe is traveling at a set speed.
once you find the trim condition, you can compute a linear model for the dynamics of the states around the trim condition.
fixed parameters:
angle of incidence (
theta
)body attitude (
u
)position
trimmed steady-state parameters:
elevator deflection (
w
)body rate (
q
)
compute operating points
open the model.
mdl = 'scdairframe';
open_system(mdl)
create an operating point specification object for the model using the model initial conditions.
opspec = operspec(mdl)
opspec = operating point specification for the model scdairframe. (time-varying components evaluated at time t=0) states: ---------- x known steadystate min max dxmin dxmax ___________ ___________ ___________ ___________ ___________ ___________ ___________ (1.) scdairframe/eom/ equations of motion (body axes)/position 0 false true -inf inf -inf inf -3047.9999 false true -inf inf -inf inf (2.) scdairframe/eom/ equations of motion (body axes)/theta 0 false true -inf inf -inf inf (3.) scdairframe/eom/ equations of motion (body axes)/u,w 984 false true -inf inf -inf inf 0 false true -inf inf -inf inf (4.) scdairframe/eom/ equations of motion (body axes)/q 0 false true -inf inf -inf inf inputs: ---------- u known min max _____ _____ _____ _____ (1.) scdairframe/fin deflection 0 false -inf inf outputs: ---------- y known min max _____ _____ _____ _____ (1.) scdairframe/q 0 false -inf inf (2.) scdairframe/az 0 false -inf inf
specify which states in the model are:
known at the operating point
at steady state at the operating point
specify that the position
states are known and not at steady state. for the state values, specified in opspec.states(1).x
, use the default values from the model initial condition.
opspec.states(1).known = [1;1]; opspec.states(1).steadystate = [0;0];
specify that the second state, which corresponds to the angle of incidence theta
, is known but not at steady state. as with the position states, use the default state value from the model initial condition.
opspec.states(2).known = 1; opspec.states(2).steadystate = 0;
the third state specification includes the body axis angular rates u
and w
. specify that both states are known at the operating point and that w
is at steady state.
opspec.states(3).known = [1 1]; opspec.states(3).steadystate = [0 1];
search for the operating point that meets these specifications.
op = findop(mdl,opspec);
operating point search report: --------------------------------- opreport = operating point search report for the model scdairframe. (time-varying components evaluated at time t=0) operating point specifications were successfully met. states: ---------- min x max dxmin dx dxmax ___________ ___________ ___________ ___________ ___________ ___________ (1.) scdairframe/eom/ equations of motion (body axes)/position 0 0 0 -inf 984 inf -3047.9999 -3047.9999 -3047.9999 -inf 0 inf (2.) scdairframe/eom/ equations of motion (body axes)/theta 0 0 0 -inf -0.0097235 inf (3.) scdairframe/eom/ equations of motion (body axes)/u,w 984 984 984 -inf 22.6897 inf 0 0 0 0 -1.4367e-11 0 (4.) scdairframe/eom/ equations of motion (body axes)/q -inf -0.0097235 inf 0 1.1477e-16 0 inputs: ---------- min u max _________ _________ _________ (1.) scdairframe/fin deflection -inf 0.0014161 inf outputs: ---------- min y max __________ __________ __________ (1.) scdairframe/q -inf -0.0097235 inf (2.) scdairframe/az -inf -0.24207 inf
linearize model
to linearize the model at the computed operating point, first specify the linearization input and output points.
io(1) = linio('scdairframe/fin deflection',1,'input'); io(2) = linio('scdairframe/eom',3,'output'); io(3) = linio('scdairframe/selector',1,'output');
linearize the model at the operating point.
sys = linearize(mdl,op,io);
plot the bode magnitude response for the linear model.
bodemag(sys)
bdclose('scdairframe')
see also
| | |