## List of input signals to the system Beaver

The Beaver model contains the nonlinear dynamic model of the DHC-2 'Beaver' aircraft, which consists of twelve state equations, forces and moment equations, airdata equations, and many additional output equations, implemented as graphical Simulink block-diagram.

There are two versions of this model: the system Beaver, which is used to access the aircraft model from the Matlab workspace, and a 'subsystem equivalent' of this system, which is used to call the aircraft model from other systems, such as the open-loop simulation models or the autopilot models. For simulation purposes, aircraft linearization and the determination of steady-state trimmed flight conditions, the system Beaver or one of its subsystem equivalents can be treated as a 'black-box', which can be accessed through the input and output ports only.

### Inputs to the system Beaver

The system Beaver, contains twelve (scalar) Inport blocks, which means that the system must be accessed with an input vector of length twelve. This input vector (i.e. the inputvector to the system Beaver) has been defined as:

      u     = [uaero'  uprop'  uwind']'

      uaero = [deltae deltaa deltar deltaf]'
      uprop = [n pz]'
      uwind = [uw vw ww uwdot vwdot wwdot]'

      deltae: elevator deflection [rad]
      deltaa: ailerons deflection [rad]
      deltar: rudder deflection [rad]
      delfaf: flap deflection [rad]

      n     : engine speed [RPM]
      pz    : manifold pressure ["Hg]

      uw    : wind & turbulence velocity along XB-axis [m/s]
      vw    : wind & turbulence velocity along YB-axis [m/s]
      ww    : wind & turbulence velocity along ZB-axis [m/s]
      uwdot : d(uw)/dt [m/s^2]
      vwdot : d(vw)/dt [m/s^2]
      wwdot : d(ww)/dt [m/s^2]

The subsystem equivalents of the model have three input ports only, which correspond with the vectors uaero, uprop, and uwind, as defined above.

The input-variables from the input-vector u are used by the blocks Aeromod, Engmod, and Fwind. See the list of outputs for an exact definition of the outputvector from the Beaver model. See also the description of the first level of this model (denoted as Level 1) to find out how the definition of the inputvector u is related to the graphical block-diagram structure in this system level.

Note: if you want to adapt this model to implement the dynamics of another aircraft, it may well be possible that you need other input-variables than the twelve listed above. In that case, the first level of the aircraft model needs to be changed accordingingly, and the file RESULTS.M needs to be edited. As the first level of the system Beaver and its subsystem equivalents functions as an interface between the aircraft model and 'the outside world', it will also be necessary to edit any Matlab program or Simulink system that accesses the aircraft model through this first level if the I/O definitions are changed.

### Collecting the input signals in the Matlab workspace

During simulations, the time-trajectories of these input variables are recorded in the matrix In in the Matlab workspace. The matrix In contains twelve columns and N rows, where N is the number of time-steps taken during the simulation. The twelve columns correspond with the twelve elements of the inputvector u, given above, so:

      In == [  u'(t0)  ;  u'(t1)  ;  u'(t2)  ;  ...  ;  u'(tN)  ]

The twelve columns of In therefore correspond with the variables deltae, deltaa, deltar, deltaf, n, pz, uw, vw, ww, uwdot, vwdot, and wwdot (in this particular order), respectively. The output trajectories are sent to the matrix Out, and a time-axis is send to the vector time. See the list of outputs for more information.

### Using the Matlab-macro RESULTS

Although the time-trajectories of the input variables are thus send to the matrix In in the Matlab workspace, analyzing these results may still be difficult, because one needs to know the definition of this matrix in order to make sense of it. To help with the interpretation of the simulation results, the Matlab program RESULTS was created.

If you run RESULTS after a simulation, the time-trajectories of deltae, deltaa, deltar, deltaf, n, pz, uw, vw, ww, uwdot, vwdot, and wwdot will be extracted from the matrix In as separate vectors. These vectors can be plotted against the vector time, which was created together with the matrices In and Out. The resulting plot commands look like:

            plot(time,uwdot)
            plot(time,deltae)

            etc.