FIXSTATE is a Matlab program, which can be used to artificially fix state variables of the non-linear aircraft model (in this case the Simulink Beaver model).
FIXSTATE sets the value of the gain vector xfix, which is a multiplication factor for the time-derivative of the state vector (xdot = dx/dt) within the non-linear aircraft model. The corresponding gain block XFIX can be found in the subsystem Aircraft equations of motion within the Beaver model.
The gain-factor xfix is applied as follows: the time-derivative of the state-vector, used by the Simulink integrator, is equal to:
xdot_used = xdot_true .* xfix
(where the .*
symbol corresponds with the Matlab operator for
element-by-element of vectors). The elements of xfix are either
equal to one or zeros. If xfix = ones(1,12),
xdot_used will be equal to xdot_true, which means that none
of the state variables will be artificially fixed. If one or more elements
of xfix is (are) equal to zero, the time-derivatives of the
corresponding states will remain zero, hence, these states will remain
equal to their initial condition.
For instance: if the true airspeed (that is: the first element of the
state vector x) needs to be kept constant, xfix has to be set equal to
[0 1 1 1 1 1 1 1 1 1 1 1]
. This example may, for instance, be useful if one wants to compare
a speed hold autopilot mode with the 'ideal' response with
artificially fixed airspeed. Another practical purpose for FIXSTATE
is the determination of purely longitudinal or lateral dynamics, without
cross-coupling effects.
Note: the variable xfix needs to be defined in the workspace if the system Beaver (or a subsystem equivalent thereof) is evaluated for simulation, trimming, and/or linearization purposes. If this variable can't be found when such a task is started, the default value xfix = ones(1,12) will be used automatically.
x = [V alpha beta p q r psi theta phi xe ye H]' V = true airspeed [m/s] alpha = angle of attack [rad] beta = sideslip angle [rad] p = roll-rate [rad/s] q = pitch-rate [rad/s] r = yaw-rate [rad/s] psi = yaw angle [rad] theta = pitch angle [rad] phi = roll angle [rad] xe = X-coordinate of aircraft's c.g. [m] ye = Y-coordinate of aircraft's c.g. [m] H = altitude of aircraft's c.g. [m] (above sea level)