## List of output signals from the Beaver model

The dynamic model of the 'Beaver' aircraft determines a large list of output signals, which are all sent to the Matlab workspace by means of To Workspace blocks. A small subsection of those outputs is connected to Outport blocks in the first level of the Beaver model (i.e. the system Beaver or one of its subsystem equivalents). This first level has been shorthanded as 'Level 1' in these helpfiles.

The Outport blocks are needed to connect the model to other systems, while the outputs that are sent to the Matlab workspace are used for post-simulation analysis of the results. For practical reasons, it was decided to connect only the sixteen outputs which were needed to simulate the 'Beaver' autopilot models to Outport blocks; all other outputs are sent to the workspace only.

If a connecting system requires other output signals from the aircraft model, it will be necessary to add more Outport blocks to the first level of the aircraft model. For instance: if you want to examine new control laws that use accelerations as reference signals, these signals must be connected to new Outport blocks in the first level of the Beaver model; currently the acceleration outputs are sent to the Matlab workspace only.

However, please be aware that changes in the I/O definitions of Level 1 may affect other systems that make use of the aircraft model, as well as Matlab programs that access this model. For this reason, if I/O changes are really necessary, it is probably a better idea to create an independent copy of the aircraft model first (copy from the model library, then break the library links!) and modify this copy, rather than the original.

### First-level outputs

The system Beaver (or a subsystem-equivalent of that model) can be treated as a black-box model, which can be accessed through its input and output ports only. The Beaver model currently contains sixteen Outport blocks in its first level:

      V, alpha, beta, p, q, r, psi, theta, phi, xe, ye, H
      Hdot
      pb/2V, qc/V, rb/2V

i.e., the aircraft states, rate of climb, and the dimensionless rotational speeds, in that particular order. These variables are needed to connect the 'Beaver' model to the autopilot models from the FDC toolbox.

### Outputs which are sent to the Matlab workspace

During simulations, the time-trajectories of all 89 available output signals are sent to the matrix Out in the Matlab workspace. The columns of this matrix contain the time-trajectories of these outputs, numbered as follows:

    Out = [x' xdot' ybvel' yuvw' ydl' ypow' yacc' Caero' Cprop' ...
           FMaero' FMprop' Fgrav' Fwind' yatm' yad1' yad2' yad3']'

    x     = [V alpha beta p q r psi theta phi xe ye H]'      (1...12)
    xdot  = dx/dt,       {Vabdot, pqrdot, Eulerdot, xyHdot} (13...24)
    ybvel = [u v w]'                                  {uvw} (25...27)
    yuvw  = [udot vdot wdot]'                      {uvwdot} (28...30)
    ydl   = [pb/2V qc/V rb/2V]'                   {Dimless} (31...33)
    yfp   = [gamma fpa chi Phi]'                   {Flpath} (34...37)
    ypow  = [dpt P]'                                {Power}  (38, 39)
    yacc  = [Ax Ay Az axk ayk azk]'                 {Accel} (40...45)
    Caero = [CXa CYa CZa Cla Cma Cna]'            {Aeromod} (46...51)
    Cprop = [CXp CYp CZp Clp Cmp Cnp]'             {Engmod} (52...57)
    FMaero= [Xa Ya Za La Ma Na]'                   {FMdims} (58...63)
    FMprop= [Xp Yp Zp Lp Mp Np]'                   {FMdims} (64...69)
    Fgrav = [Xgr Ygr Zgr]'                        {Gravity} (70...72)
    Fwind = [Xw Yw Zw]'                             {Fwind} (73...75)
    yatm  = [rho ps T mu g]'                      {Atmosph} (76...80)
    yad1  = [a M qdyn]'                          {Airdata1} (81...83)
    yad2  = [qc Ve Vc]'                          {Airdata2} (84...86)
    yad3  = [Tt Re Rc]'                          {Airdata3} (87...89)

The names of the masked subsystem blocks in which these outputs are calculated have been put between curly braces. The numbers of the corresponding columns in the outputmatrix Out have been put between round brackets. After finishing a simulation, the time-trajectories, stored in the matrix Out can be plotted against the time-axis which is stored in the vector time. For instance, if you want to plot the nth column of Out, the plot-command looks like:

       plot(time,Out(:,n))

where 1 <= n <= 89. The appropriate value of n can be retrieved from the list above. It is important to notice that this list represents the default definition of Out, used in the system Beaver. You may wish to add more outputs, or delete unwanted outputs from this list, by adding and/or deleting blocks to/from the system. In that case, this list needs to be updated accordingly.

### Using the Matlab-macro RESULTS

If you want to plot simulation results by directly using the matrix Out, as demonstrated above, you need to know the column numbers of the different outputs. However, if your system uses the same definitions of the matrices In (see the list of inputsignals) and Out as the system Beaver, it is easier to run RESULTS first before plotting the results, to get separate time-trajectories of all input and output variables with self-explaining variable names. If you run RESULTS, the following outputvariables will be created in the Matlab workspace:

    V        : airspeed [m/s]
    alpha    : angle of attack [rad] or [deg]
    beta     : sideslip angle [rad] or [deg]
    p        : roll-rate [rad/s] or [deg/s]
    q        : pitch-rate [rad/s] or [deg/s]
    r        : yaw-rate [rad/s] or [deg/s]
    psi      : yaw-angle [rad] or [deg]
    theta    : pitch-angle [rad] or [deg]
    phi      : roll-angle [rad] or [deg]
    xe       : X-coordinate in Earth-axes [m]
    ye       : Y-coordinate in Earth-axes [m]
    H        : altitude [m]

    Vdot     : time-derivative of airspeed [m/s^2]
    alphadot : time-derivative of alpha [rad/s] or [deg/s]
    betadot  : time-derivative of beta [rad/s] or [deg/s]
    pdot     : time-derivative of p [rad/s^2] or [deg/s^2]
    qdot     : time-derivative of q [rad/s^2] or [deg/s^2]
    rdot     : time-derivative of r [rad/s^2] or [deg/s^2]
    psidot   : time-derivative of psi [rad/s] or [deg/s]
    thetadot : time-derivative of theta [rad/s] or [deg/s]
    phidot   : time-derivative of phi [rad/s] or [deg/s]
    xedot    : time-derivative of xe [m/s]
    yedot    : time-derivative of ye [m/s]
    Hdot     : time-derivative of H [m/s]

    u        : component of V along XB-axis [m/s]
    v        : component of V along YB-axis [m/s]
    w        : component of V along ZB-axis [m/s]

    udot     : time-derivative of u [m/s^2]
    vdot     : time-derivative of v [m/s^2]
    wdot     : time-derivative of w [m/s^2]

    pb/2V    : dimensionless roll-rate; b is the wingspan [m]
    qc/V     : dimensionless pitch-rate; c is the mean aerodynamic
               chord [m]
    rb/2V    : dimensionless yaw-rate; where b is the wingspan [m]

    gamma    : flightpath angle [rad] or [deg]
    fpa      : flightpath acceleration [m/s^2]
    chi      : azimuth angle [rad] or [deg]
    Phi      : bank angle [rad] or [deg]

    dpt      : dimensionless pressure increase across propeller [-]
    P        : engine power [Nm/s]

    Ax       : specific force along XB-axis [g]
    Ay       : specific force along YB-axis [g]
    Az       : specific force along ZB-axis [g]
    axk      : kinematic acceleration along XB-axis [g]
    ayk      : kinematic acceleration along YB-axis [g]
    azk      : kinematic acceleration along ZB-axis [g]

    CXa      : coefficient of aerodynamic force along XB-axis [-]
    CYa      : coefficient of aerodynamic force along YB-axis [-]
    CZa      : coefficient of aerodynamic force along ZB-axis [-]
    Cla      : coefficient of aerodynamic moment around XB-axis [-]
    Cma      : coefficient of aerodynamic moment around YB-axis [-]
    Cna      : coefficient of aerodynamic moment around ZB-axis [-]

    CXp      : coefficient of engine force along XB-axis [-]
    CYp      : coefficient of engine force along YB-axis [-]
    CZp      : coefficient of engine force along ZB-axis [-]
    Clp      : coefficient of engine moment around XB-axis [-]
    Cmp      : coefficient of engine moment around YB-axis [-]
    Cnp      : coefficient of engine moment around ZB-axis [-]

    Xa       : aerodynamic force along XB-axis [N]
    Ya       : aerodynamic force along YB-axis [N]
    Za       : aerodynamic force along ZB-axis [N]
    La       : aerodynamic moment around XB-axis [Nm]
    Ma       : aerodynamic moment around YB-axis [Nm]
    Na       : aerodynamic moment around ZB-axis [Nm]

    Xp       : engine force along XB-axis [N]
    Yp       : engine force along YB-axis [N]
    Zp       : engine force along ZB-axis [N]
    Lp       : engine moment around XB-axis [Nm]
    Mp       : engine moment around YB-axis [Nm]
    Np       : engine moment around ZB-axis [Nm]

    Xgr      : gravity force along XB-axis [N]
    Ygr      : gravity force along YB-axis [N]
    Zgr      : gravity force along ZB-axis [N]

    Xw       : wind force along XB-axis [N]
    Yw       : wind force along YB-axis [N]
    Zw       : wind force along ZB-axis [N]

    rho      : airdensity [kg/m^3]
    ps       : static pressure [N/m^2]
    T        : temperature [K]
    mu       : dynamic viscosity [kg/(m*s)]
    g        : acceleration of gravity [m/s^2]

    a        : speed of sound [m/s]
    M        : Mach number [-]
    qdyn     : dynamic pressure [N/m^2]

    qc       : impact pressure [N/m^2]
    Ve       : equivelent airspeed [m/s]
    Vc       : calibrated airspeed [m/s]

    Tt       : total temperature [K]
    Re       : Reynolds number per unit length [1/m]
    Rc       : Reynolds number with respect to mean aerodyn. chord [-]

The results can now easily be plotted with commands such as:

            plot(time,alpha)

where the variable time contains the time-axis, created during the last simulation.