Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Thesis - Beaver simulation

.pdf
Скачиваний:
38
Добавлен:
19.02.2016
Размер:
5.22 Mб
Скачать

Appendix E

197

In chapter 3, it was shown that time-derivatives of the state variables of any S-function can be extracted from the MATLABcommand line with the following command:

xdot = sfun(t, x, u, 1)

where sfun is the name of the S-function. Here, this command will be applied to the S-function BEAVER to find the value of xdot, which will be used to compute J.This clearly illustrates how customized analytical tools for S-func- tions can be constructed in practice.

The program listing of ACTRIM, ACCOST, and ACCONSTR is contained in section F.2.7 of appendix F ywhich also contains a list of variables.

I

Calculate 8 and p from f lightpath constraints

I

 

Compute p, q, and r, using the kinematic relations (2-3) or

 

 

(A-61)

 

 

Combine these results with the fixed states (which specify the

 

 

flight-condition) and the independent states, adjusted by the

 

 

minimization algorithm into the current state vector x

 

 

Combine the fixed inputs (specified by the user t o define the

 

 

aircraft-condition) with the independent inputs, adjusted by the

 

I

minimization algorithm into the current input vector u

 

Return x and u

 

Figure E-3. Program-structurediagram of ACC0NSTR.M (subroutinewith flightpath constraints and kinematic relations)

Call ACC0NSTR.m t o find constrained values of x and u

/

I

Call SlMULlNK model BEA VER t o find current value of the t ime-derivative of the state vector

Compute Jwit h equation (E-13)

Return J t o minimization routine

Figure E-4.Program-structure diagram of ACCOST.M

(subroutinewith cost function for aircraft trim)

E.7 Conclusions.

A general aircraft trim algorithm has been derived in this appendix. It can be implemented straigthforwardly as a MATLABroutine, which uses the SIMULINK system BEAVER to calculate the time-derivatives of the state variables. The trim routine can be used to find steady-state level-flight conditions, steady turns (skidding or coordinated), steady pull-ups (or push-overs), and steady rolls. It can be applied to every model which uses the same inputs and states as the system BEAVER, independently from the internal structure of the aircraft model. Moreover, it shouldn't be too difficult to change the programs for application to aircraft models which use other state or input vectors.

Appendix E

199

Appendix F

201

Appendix F. The S~ZMULINKsimulation models.

F.l Introduction.

In chapter 4, the overall structure of the simulation models was outlined. This appendix will zoom in further, to show all details about the SIMULINKimplementation of the mathematical models of the aircraft dynamics, wind and turbulence, and navigation signals from VOR and ILS equipment. The aircraft dynamics model forms the heart of the model library. Although some of its submodels are valid only for the DHC-2 'Beaver' aircraft, the model itself is such general, and the models are such modular that it is relatively easy to adapt and update the 'Beaver' model for other aircraft. Don't be impressed too much by the very detailed model description in this appendix or by the sheer size of it! To use the models in practice, it is often not necessary to know this appendix in detail. If you just want to use the existing model without making any changes, reading chapters 4 and 6 will probably suffice.

There are three main model-libraries: the aircraft dynamics library, a n ILSNOR library, and a windhurbulence library. The aircraft dynamics library contains blocks with state equations and many output equations, see section F.2. The ILSNOR library will be described in section F.3. It contains some blocks to compute navigation signals from ILS and VOR equipment, which may be used for the assessment of automatic controllers. The wind/turbulence library (section F.4) contains blocks to evaluate the performance of the aircraft and controllers in non-steady atmosphere.

In the future, models of other navigation tools and external disturbances need to be added to this list. Also, standardized lists with models of sensor andlor actuator dynamics need to be implemented in SIMULINKAlmost. every dynamical model, developed in the Disciplinary Group for Stability and Control can be implemented in SIMULINK,where it can be connected to other systems. This will lead to more insight in the actual behaviour of the systems, and to better control design solutions.

Section F.2.7 contains a description of a numerical trim routine for the 'Beaver' model, which searches for steady-state equilibrium values of the state and input variables. It can be applied to any aircraft model in SIMULINKwhich uses the same definitions of the state and input vectors as the 'Beaver' model. Together with the linearization routines of SIMULINK,this trim routine will further integrate linear system analysis with MATLABand nonlinear system analysis with SIMULINK.

In appendices A to C and chapter 2, theoretical backgrounds to the models are given. Chapter 6 and part I1 of this report both illustrate how the models can be used in practice. A description of the implementation of the control laws of the 'Beaver' autopilot in SIMULINKcan be found in Part I1 of this report. The models, helpfiles, and examples have been stored on a floppy disk which should accompagny this report. If this floppy is not present, contact the author (see address a t cover page).

Appendix H describes how to install all models, programs, and help texts on your own computer!

F.2 Nonlinear model of the aircraft dynamics: state and output equations.

F.2.1 Introduction.

The aircraft dynamics model contains the nonlinear Ordinary Differential Equations (ODES)for the twelve state variables, all equations which must be solved to calculate the external forces and moments, and a large number of additional output equations, which are not really necessary for solving the state equations, but which can be applied for many different applications involving flight dynamics analysis. It is not difficult to enhance this list of output variables even further.

The equations have been implemented as SIMULINKFunction blocks. Small sets of interrelated variables have been grouped together into a limited number of 'basic' blocks, which together build the whole simulation model. To prevent the system from becoming really inextricable, a limited number of output vectors are used. Every output vector is created by one 'basic' block, which Muxes different output variables into one output vector. Some 'basic' blocks use output vectors from other blocks as inputs, in which case often only a few elements are actually used in the equations of that block. This seems somewhat confusing, but it keeps the number of output lines within reasonable limits.

To add new blocks to the aircraft model, one should know exactly which variables are calculated by the other blocks, but how that is done internally doesn't really matter, as long as the results are correct. For this reason, all 'basic' blocks have been Masked, thus hiding their internal structure from the user (black-box approach). See section E.8 of appendix E for more details about the Mask option.

Hiding the internal structure from the user is particularly useful for implementing aircraft-dependent blocks such as the aerodynamic model of an aircraft. For instance: the aerodynamic model of the 'Citation 500' aircraft as used in the DUT-flightsimulator, interpolates multi-dimensional tables to obtain the aerodynamic forces and moments, whereas the 'Beaver' model expresses these forces and moments as nonlinear polynomials. Both models can be implemented in 'basic' blocks, which look exactly the same from the outside, but completely different from the inside.

This section will show the internal structure of all 'basic' blocks from the 'Beaver' model, which already has been outlined in general terms in chapter 4. First, a list of all variables will be given. Then, the internal structure of all blocks will be shown and explained. Finally, some routines to define model parameters and routines to compute steady-state trim values or define arbitrary initial conditions will be presented.

F.2.2 List of variables, used for the aircraft state and output models.

Although the system itself has been built up as a block-diagram, still a standardized list of acronyms has been used within the block-diagrams of the aircraft model, the help files, etc. to make the diagrams better readable for the user. Note that the SIMULINKFunction blocks use u as standard input variable. If u is a vector - this is true for most Function blocks of the 'Beaver' model - the

Appendix F

203

elements of the vectors are denoted as u[l], u[2], . . . within the Function blocks (yes, those brackets are square!). The following variables or acronyms appear within the helpfiles, block-diagrams, and Mask initialization lines of the 'Beaver' model I):

a alpha

alphadot

Ax axk

AY

ayk

Az azk beta

betadot chi

Cla

Clt

Cma

Cmt

Cna

Cnt

CXa

cxt

CYa

CYt

CZa

CZt deltaa deltae deltaf deltar

dpt fpa Fx

Fv

Fz

g gamma

H

Hdot

L

a

= speed of sound; [ d s ]

 

a = angle of attack; [rad]

 

Cx = time derivative of angle of attack; [radls]

Ax

= specific force along X,-axis in c.g.; [gl

a , ,

= acceleration along XB-axisin c.g.; [g]

A,

= specific force along YB-axis in c.g.; [gl

a , ,

= acceleration along YB-axisin c.g.; [g]

A, = specific forces along ZB-axisin c.g.; [g]

a , ,

= acceleration along ZB-axisin c.g.; [g]

p

= sideslip angle; [rad]

 

0

= time derivative of sideslip angle; [radkl

x

= azimuth angle; [radl

 

CLa = aerodynamic moment coefficient around XB-axis; [-I

CIt

= engine moment coefficient around XB-axis; [-I

Cma = aerodynamic moment coefficient around YB-axis; [-I

Cmt = engine moment coefficient around YB-axis; [-I

C,

= aerodynamic moment coefficient around 2,-axis; [-]

C,

= engine moment coefficient around 2,-axis; [-I

Cxa

= aerodynamic moment coefficient along XB-axis; [-I

Cxt

= engine moment coefficient along XB-axis; [-]

Cya = aerodynamic moment coefficient along YB-axis; [-I

Cyt

= engine moment coefficient along Y,-axis; [-I

Cza

= aerodynamic moment coefficient along 2,-axis; [-I

Czf

= engine moment coefficient along 2,-axis; [-I

6,

= aileron deflection; [rad]

 

6,

= elevator deflection; [rad]

 

6/

= flap setting; [rad]

 

6,

= rudder deflection; [rad]

 

dpt

= dimensionless increase of pressure across the propeller; [-I

fpa

= flightpath acceleration; [m/s2]

 

F,

= resultant force along the XB-axis;[NJ

F,

= resultant force along the Y,-axis;

[N]

= resultant force along the 2,-axis;

[NI

F,

g

= acceleration of gravity; [m/s2]

 

y

= flightpath angle; [rad]

 

H

= altitude of the aircraft; [m]

 

H

= rate of climb; [ d s ]

 

L

= resultant moment around the X,-axis; [Nl

It is sometimes possible that the same names are used for different variables, because most variables are only locally available within the different subsystems. Notice also that MATLAB can distinguish upper-case from lower-case variables!

M

= resultant moment around the Y,-axis;

[N]

M

= Mach number; [-]

 

1.1

= dynamic viscosity; [kg/m.s]

 

n

= engine speed; [RPM]

 

N

= resultant moment around the 2,-axis;

[Nl

p

= angular velocity around the XB-axis; [rad/s]

P

= engine power; [N.m/s]

 

-p b

= dimensionless angular velocity around X,-axis; [-I

2 v

 

 

pdot

p

phi

cp

Phi

b>

phidot

@

PS

ps

psi

y

psidot

 

 

p,

 

q

 

4,-

 

v

=time derivative of roll rate; [rad/s2]

=roll angle; [rad]

=bank angle; [rad]

=time derivative of roll angle; [rad]

=static pressure; [ ~ / m ~ ]

=yaw angle; [rad]

=time derivative of yaw angle; [rad/s]

=manifold pressure; ["Hg]

=angular velocity around the Y,-axis; [rad/sl

=impact pressure; [N/m2]

=dimensionless angular velocity around Y,-axis; [-I

qdot

q

= time derivative of pitch rate; [rad/s21

 

qdyn= dynamical pressure; [N/m21

 

r

= angular velocity around the 2,-axis; [rad/sl

 

r b

 

 

- = dimensionless angular velocity around 2,-axis; [-I

 

2 v

= Reynolds number with respect to c

Rc

R,

rdot

r

= time derivative of yaw rate; [rad/s2]

Re

Re

= Reynolds number per unit length; [m-'1

rho

p

= air density; Rg/m3]

T

T

= air temperature; [K]

theta

8

= pitch angle; [rad]

thetadot

6

= time derivative of pitch angle; [rad/s]

T t

T,

= total temperature; [Kl

u

u

= component of V along X,-axis; [ d s ]

udot

u

= time derivative of u; [m/s2]

uwdot

u,

= component of wind velocity along XB-axis; [ d s ]

uW

= time derivative of u,; [m/s2]

 

v

= component of V along Y,-axis; [mls]

 

V

= true airspeed; [m/s]

 

V,

= calibrated airspeed; [m/s]

vdot

v

= time derivative of v; [m/s2]

Vdot

v

= time derivative of true airspeed; [m/s2]

Ve

V'

= equivalent airspeed; [mls]

vwdot

v,

= component of wind velocity along YB-axis; [mls]

v

= time derivative of v,; [m/s2]

 

w

= component of V along 2,-axis; [m/s]

wdot

WW

wwdot Xa

xe xedot

x g r

xt

Xw Ya

Ye

yedot

YET

Yt

Yw

Za ze

z g r Zt z w

li

= time derivative of w; [m/s2]

w,

= component of wind velocity along ZB-axis; [ d s ]

w ,

= time derivative of w,; [rn/s2]

Xa

= aerodynamic force along X,-axis; [Nl

xe

= X-coordinate of aircraft relatively to FE; [m]

x

= time derivative of xe ;[m/s]

Xgr

= gravity force along XB-axis; [N]

Xt

= engine force along X,-axis; [Nl

Xu

= wind force along XB-axis; [Nl

Ya

= aerodynamic force along YB-axis; [Nl

ye

= Y-coordinate of aircraft relatively to FE; [m]

ye

= time derivative of ye ;[rn/s]

Y,,

= gravity force along Y,-axis; [N]

Y,

= engine force along YB-axis;[N]

Y,

= wind force along YB-axis; [Nl

Za

= aerodynamic force along ZB-axis;[NI

ze

= Z-coordinate of aircraft relatively to F,;[m]

Z,,

= gravity force along Z,-axis; [Nl

Zt

= engine force along ZB-axis;[N]

Z,

= wind force along Z,-axis; [Nl

The following input and output vectors are used for the different blocks from the blocklibrary ACLIB and within the system BEAVER:

Ca

C t

F a

Fgr

 

 

 

 

 

M, Nt I

 

 

F t

= [ Xt YtZtLt

 

 

Ftot

= [ Fx F,

F, I

 

 

 

 

 

Fw

= [ x u

Y,

ZIT

 

 

 

 

Mtot

= C LM N

I

~

 

 

 

u a

= [ 6,

6,

 

6,

Sf 1

 

(inputs to the aerodynamic model)

u t

= [ n p,

]

(inputs to the engine model)

uwind

= [ u,

v,

 

w,

u,

v ,

w , I T (wind and turbulence inputs)

X

= [ V a p p

q

r

w 0 9 xe ye

ze I

(state vector)

xdot

= [ v et

 

p

p

q

r

+ e + X ,

ye

HI^

yacc

= [ Ax

' y

 

 

I T

k

k

a , , 1

 

 

y a d l

= [ a

M g,,,

 

 

 

 

 

yad2

= [ qC Ve VcI

 

 

 

 

 

yad3

= [ Tt Re R, l T

 

 

 

 

 

yatm

= [ P

P ,

T )I g l T

 

 

 

ybvel

= [ U

v

W I T

 

 

 

 

 

ydl yeul

Y ~ P

The data matrix AM, which can be loaded from the file AEROMOD.MAT, contains all parameters of the aerodynamic model of the 'Beaver', see equations (2-5) of chapter 2. The parameters of the 'Beaver' engine forces and moments model (equations (2-lo), chapter 2) have been included in the matrix EM, which has been stored in the file ENGMOD.MAT. The matrices GM1 and GM2, which can be loaded from the file AIRCRAFT.MAT, contain data about the aircraft geometry and inertia parameters (GM stands for 'Geometry and Mass').

The MAT-files must be loaded into the MATLABworkspace before starting a simulation by calling the function LOADER. If the MAT-files are not present in the workdirectory, it is necessary to run MODBUILD first. The MATLAB functions LOADER and MODBUILD will be described in section F.2.6. The data matrices are only valid for the models of the 'Beaver'. The aircraft geometry and mass distribution are considered to remain constant during the motions of interest. The definition of these matrices can be found in tables F-1 to F-3 a t the end of this appendix.

F.2.3 The aircraft model library and the complete aircraft model.

All basic blocks of the aircraft model have been logically stored in the library ACLIB ('AC' = 'aircraft'). This library includes some examples which illustrate how different blocks can be combined into 'groups'. The system BEAVER contains the complete aircraft model, which results after connecting all blocks and groups from the library ACLIB to eachother. Here, we'll use the system BEA- VER as a starting point for the discussion of all blocks from ACLIB, since this immediately explains the relations between the different blocks. A list with available blocks in BEAVER and ACLIB is included in table F-4 a t the end of this chapter. Note: ACLIBl to ACLIB8 are sublibraries of ACLIB.

F.2.4 First level of the simulation model BEAVER.

Figure F-1shows the first level of the system BEAVER, which will be called the main level in the figures. This level is used to arrange the inputs and outputs in such way that other systems can be connected to BEAVER. The large subsystem block, called Beaver dynamics and output equations, contains the actual aircraft model, i.e., the state and output equations themselves.

All outputs from the subsystem Beaver dynamics and output equations are sent to the matrix Out in the MATLABworkspace (notice the use of upper-case!). The inputs to this subsystem are sent to the matrix In. See table F-5 at the end of this report for the current definitions of I n and Out (it is quite easy to change these definitions if more output equations are added or if the outputs are reshuffled), or type help inputs or help outputs at the MATLABcommand line. The system BEAVER also contains a Clock block, connected to a To Workspace block, which will create a time-axis in the MATLABworkspace for plotting

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]