example, let the model derive these known values based on each pair. For each
flight condition , update the values in the model and create an operating point
specification. Repeat these steps for all 180 flight conditions.
clear op report
for ct = 1:nA*nV
alpha_ini = alpha(ct); % Incidence [rad]
v_ini = V(ct); % Speed [m/s]
% Specify trim condition
opspec(ct) = operspec('scdairframeTRIM');
% Xe,Ze: known, not steady.
opspec(ct).States(1).Known = [1;1];
opspec(ct).States(1).SteadyState = [0;0];
% u,w: known, w steady
opspec(ct).States(3).Known = [1 1];
opspec(ct).States(3).SteadyState = [0 1];
% theta: known, not steady
opspec(ct).States(2).Known = 1;
opspec(ct).States(2).SteadyState = 0;
% q: unknown, steady
opspec(ct).States(4).Known = 0;
opspec(ct).States(4).SteadyState = 1;
end
opspec = reshape(opspec, [nA nV]);
Trim the model for all of the specified ooperating point specifications.
Options = findopOptions('DisplayReport','off', ...
'OptimizerType','lsqnonlin');
Options.OptimizationOptions.Algorithm = 'trust-region-reflective';
[op, report] = findop('scdairframeTRIM',opspec,Options);
The op array contains the operating points found by findop that will be used for
linearization. The report array contains a record of input, output, and state values at
each point.
Specify linearization inputs and outputs.
3 Batch Linearization