## Level 2 of the system Beaver: 'Beaver dynamics and output equations'

The actual dynamic model of the 'Beaver' aircraft, consisting of twelve state and many output equations, is contained in level 2 of the system Beaver (or its subsystem equivalents). This level clearly visualizes the modular structure of the aircraft model. The full name of this subsystem is Beaver dynamics and output equations, but it will be denoted as Level 2 here.

Since earlier versions of Simulink did not accept vector signals to be sent through Inport and Outport blocks in the first level of a graphical system, an additional I/O level with Mux, Demux, Inport, and Outport blocks was included in the model; this additional level has been shortly denoted as Level 1. Nowadays, this additional I/O level is not really required anymore; it is planned to change this solution in future versions of the FDC toolbox.

### Subsystems in Level 2

Level 2 contains the following subsystems (masked subsystems are denoted by {M}):

Airdata Group
Aerodynamics Group (Beaver)
Engine Group (Beaver)
Gravity | {M}
Fwind | {M}
FMsort | {M}
Aircraft Equations of Motion (Beaver) | {M}
Additional Outputs
Hlpfcn | {M}

Subsystems that are denoted with the extension '(Beaver)' contain aircraft-dependent elements (currently configured for the 'Beaver' aircraft). All masked blocks and the light-blue colored subsystems have been linked to a blocklibrary.

### Structure of Level 2

The system should be 'read' from top to bottom and from left to right. The upper-left subsystem is the block Airdata Group. Some of the results of this block are needed by other subsystems, e.g. for the determination of forces and moments, which is why those blocks have been shifted further rightwards and downwards. The different contributions to the external forces and moments are added and sorted in the block FMsort, so this block is located on the lower right side of the forces and moments blocks. One step further right and downwards are the subsystems Aircraft Equations of Motion and Additional Outputs, which use the main results from the other blocks.

Since the subsystem Additional Outputs also needs time-derivatives of the state variables, a 'feedback loop' of xdot has been included in the blockdiagram. This does not result in an algebraic loop, because the Ordinary Differential Equations for the twelve states of the aircraft are in no way involved in this loop (the outputs are called 'additional' because they don't represent interim results for the solution of the state equations themselves).

In general, all (masked) subsystems use results from other blocks which are located on their left side, and their outputs are sent to blocks on their right-hand side, if necessary. Their vertical position makes it possible to connect their outputs to the Outport blocks on the far right side in this second level of Beaver.

The only exceptions to this 'rule' are the ('artificial') feedback loops of the state vector x, its time-derivative xdot, and the outputvector yhlp from the block Hlpfcn, which contains a number of frequently used sines and cosines.

### Inputs to Level 2

       uaero = [deltae deltaa deltar deltaf]'    (aerodynamic inputs)
       uprop = [n pz]'                                (engine inputs)
       uwind = [uw vw ww uwdot vwdot wwdot]' (atmospheric disturban-
                                              ces; wind & turbulence)

### Outputs from Level 2

       x     = [V alpha beta p q r psi theta phi xe ye H]'   (states)
       xdot  = dx/dt                     (time-derivatives of states)
       ybvel = [u v w]'               (body-axes velocity components)
       yuvw  = [udot vdot wdot]'    (time-derivatives of u, v, and w)
       ydl   = [pb/2V qc/V rb/2V]' (dimensionless rotational veloci-
                                     ties along aircraft's body-axes)
       yfp   = [gamma fpa chi Phi]'            (flightpath variables)
       ypow  = [dpt P]'             (engine power (-related) outputs)
       yacc  = [Ax Ay Az axk ayk azk]'   (accelerations and specific
                                           forces in aircraft's c.g.)
       Caero = [CXa CYa CZa Cla Cma Cna]'   (aerodyn. force & moment
                                                        coefficients)
       Cprop = [CXp CYp CZp Clp Cmp Cnp]'     (engine force & moment
                                                        coefficients)
       FMaero= [Xa Ya Za La Ma Na]'       (aerodyn. forces & moments)
       FMprop= [Xp Yp Zp Lp Mp Np]'         (engine forces & moments)
       Fgrav = [Xgr Ygr Zgr]'                        (gravity forces)
       Fwind = [Xw Yw Zw]'          (forces due to wind & turbulence)
       yatm  = [rho ps T mu g]'                (atmosphere variables)
       yad1  = [a M qdyn]'                        (airdata variables)
       yad2  = [qc Ve Vc]'                   (more airdata variables)
       yad3  = [Tt Re Rc]'                   (more airdata variables)

See the lists of input and output variables for the exact definitions of these variables. Also, please take a look at the color definitions for the block-diagrams of the FDC toolbox.