creating matlab simulations to model aircraft dynamics

17
Creating MATLAB simulations to model aircraft dynamics Joshua Lynch Group 07 [email protected] Vedang Joshi Group 07 [email protected] Vincent Peng Group 07 [email protected] Elfa Ren Group 07 [email protected] December 20, 2019 Abstract The complexity in modelling aircraft pitch dynamics arises from the need to understand non- linear modelling. We use simple Euler method approximations, in two of the three models we present, and MATLAB’s powerful ODE solver in one of the models. We analyse how pitch angles and linear velocities change in time in the body axes of the aircraft and talk about how unstable motion demonstrates “phugoid” and “short period” behaviour. We demonstrate our models on light aircraft types i.e. Cessna 172 and 182. We present the entire code used to simulate all models and unlike other studies in literature, which reduces the repeatability of results. 1 Introduction Since the invention of aeroplanes, the aviation industry has always required the motion of the aircraft to be studied thoroughly to ensure pas- senger and crew safety, though flight simula- tions were initially only used to train pilots [12]. This has radically changed since the advent of NASA’s 6 degrees of freedom (DOF) flight sim- ulator [14]. The motivation for this study is to be able to predict simple forward flight and the pitch of the rigid body through ordinary differ- ential equations (ODEs). We also establish the relationship between the linear velocities of the aircraft and the pitch angles on the motion of the aircraft. We will attempt to produce differ- ent models, each with more parameters to con- sider than the last, as a way to demonstrate the complexity of the calculations required for rigid body flight. Such work has already been under- taken considering constant wind velocities [7] or by modelling their motion for hovering aircraft [8] or by comparing their motion to those of flying insects [17]. Yet, the models published in literature are complex non-linear models, so we try to simplify these models as much as possi- ble. We give the complete MATLAB code for each simulation to ease repeatability and at- tempt to give an accurate intuition as to the dynamics of an aircraft. 2 Classical mechanics: Newton’s laws of motion 2.1 Euler approximation to the solution The aircraft we take into consideration has its x-axis going through the nose of the aircraft and points forward, the z-axis is perpendicular to the x-axis and points downwards and the y- 1

Upload: others

Post on 21-Nov-2021

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creating MATLAB simulations to model aircraft dynamics

Creating MATLAB simulations to model aircraft dynamics

Joshua Lynch

Group 07

[email protected]

Vedang Joshi

Group 07

[email protected]

Vincent Peng

Group 07

[email protected]

Elfa Ren

Group 07

[email protected]

December 20, 2019

Abstract

The complexity in modelling aircraft pitch dynamics arises from the need to understand non-linear modelling. We use simple Euler method approximations, in two of the three models wepresent, and MATLAB’s powerful ODE solver in one of the models. We analyse how pitchangles and linear velocities change in time in the body axes of the aircraft and talk about howunstable motion demonstrates “phugoid” and “short period” behaviour. We demonstrate ourmodels on light aircraft types i.e. Cessna 172 and 182. We present the entire code used tosimulate all models and unlike other studies in literature, which reduces the repeatability ofresults.

1 Introduction

Since the invention of aeroplanes, the aviationindustry has always required the motion of theaircraft to be studied thoroughly to ensure pas-senger and crew safety, though flight simula-tions were initially only used to train pilots [12].This has radically changed since the advent ofNASA’s 6 degrees of freedom (DOF) flight sim-ulator [14]. The motivation for this study is tobe able to predict simple forward flight and thepitch of the rigid body through ordinary differ-ential equations (ODEs). We also establish therelationship between the linear velocities of theaircraft and the pitch angles on the motion ofthe aircraft. We will attempt to produce differ-ent models, each with more parameters to con-sider than the last, as a way to demonstrate thecomplexity of the calculations required for rigidbody flight. Such work has already been under-taken considering constant wind velocities [7] or

by modelling their motion for hovering aircraft[8] or by comparing their motion to those offlying insects [17]. Yet, the models published inliterature are complex non-linear models, so wetry to simplify these models as much as possi-ble. We give the complete MATLAB code foreach simulation to ease repeatability and at-tempt to give an accurate intuition as to thedynamics of an aircraft.

2 Classical mechanics:Newton’s laws of motion

2.1 Euler approximation to thesolution

The aircraft we take into consideration has itsx-axis going through the nose of the aircraftand points forward, the z-axis is perpendicularto the x-axis and points downwards and the y-

1

Page 2: Creating MATLAB simulations to model aircraft dynamics

axis is perpendicular to the x-axis and pointsout of the right wing as shown in Figure 1. Theinherent assumptions in setting this frameworkare that the earth is an inertial frame of refer-ence and that the aircraft is a rigid body. Wefurther assume that the aircraft flies in equilib-rium condition for the duration of the flight andthus the linearisation of equations will be aboutthese working flight conditions.

Figure 1: The body axes determined for the air-craft giving the 3 translational degrees of free-dom [6]

If the aircraft is a rigid body, then using therelative velocity equation for rigid bodies,

~vQ = ~vP + ~ω × ~vPQ (1)

for two particles P,Q. Taking the linear compo-nents of the velocity (u, v, w) and the rotationalcomponents for ~ω given as (p, q, r),we can writethe force equations for the rigid body. FromNewton’s second law and Eq.1 [13],uvw

+

0 −r qr 0 −p−q p 0

uvw

=

u+ qw − rvv + ru− pww + pv − qu

(2)

~a =

u+ qw − rvv + ru− pww + pv − qu

(3)

We only consider the pitch angle θ to be theonly rotational angle in the system; the rolland yaw angles are taken to be zero in this firstmodel of aircraft motion. The pitch rotationmatrix is defined [15] as follows,

~θ =

cosθ 0 −sinθ0 1 0

sinθ 0 cosθ

(4)

The components of the gravitational accel-eration in the body fixed system are as follows,

gxgygz

=

cosθ 0 −sinθ0 1 0

sinθ 0 cosθ

00g0

=

−g0sinθ0

g0cosθ

(5)

Note that the only component of g i.e g0 isin the z-direction. The generalised force equa-tions are thus,

XYZ

+mg0

−sinθ0cosθ

= m

u+ qw − rvv + ru− pww + pv − qu

(6)

As we are only concerned about the forwardmotion in the first model, we only analyse thefirst of the three equations of motion

X −mg0sinθ = m(u+ qw − rv) (7)

Solve approximations for,

X0 + ∆X −mg0sin(θ0 + θ) = m(u+ qw − rv)(8)

Using small angle approximations,

sin(θ0 + θ) ≈ sinθ0 + θcos(θ) (9)

Neglecting the terms that are quadratic in smallperturbations, the simplified equation of mo-tion in the forward (x) direction is,

∆X −mg0cos(θ)θ = mu (10)

After using the forward Euler method to nu-merically solve the ODE, we observed that afteran initial instability, the ODE stabilises even-tually as observed in Figure 2. The MATLABcode is given in full in Figure 5, Appendix A forreference. As the damping ratio for this systemis greater than one, we observe that an over-damped system does not oscillate and it returnsto rest exponentially. [11].

2

Page 3: Creating MATLAB simulations to model aircraft dynamics

Figure 2: Numerical computation of the sim-plified equation of motion in the x-direction.∆X = 0.01,m = 80000kg, g0 = 9.81, θ0 = 0.

2.2 Second model: 3 DOF non-linear model

We still use Newton’s laws of motion to derivethe equations of motion for the aircraft. Asshown above we use the generalised force equa-tions (Eq.6 and Eq. 14 - 16) and model them inMATLAB (please refer to Figure 10 and 11 inAppendix B for the complete MATLAB code)as a function of time. We try to determine howthe system behaves when the time values arevaried between 0 to 20 seconds. Thus the gen-eralised equations are,

X −mg0sinθ = m(u+ qw − rv) (11)

Y = m(v + ru− pw) (12)

Z +mg0cosθ = m(w + pv − qu) (13)

This is equal to

u =X

m− g0sinθ − qw + rv (14)

v =Y

m− ru+ pw (15)

w =Z

m+ g0cosθ − pv + qu (16)

This model still does not contain roll and yawangles which would considerably change the ro-tation matrix above, which only incorporates

the pitching angles. The first case we considerto have constant angular velocity with p, q, rall set to 0.01. The initial perturbations in theX,Y, Z space are also all set to 0.01 for the firstsimulation. The acceleration due to gravity isset constant to 9.81 ms−2. We plot the veloc-ity values against the time values to determinethe relationship between the two parameters, tosimulate aircraft motion. For all cases we takethe initial velocities set to 0 ms−1 for u, v, w.

Figure 3: Numerical computation of the simpli-fied equations of motion in the x, y and z-axes.∆X,∆Y,∆Z = 0.1; p, q, r = 0.1;m = 80000kg;g= 9.81; 0≤ time ≤ 20 s

Figure 4: Numerical computation of the simpli-fied equations of motion in the x, y and z-axes.∆X,∆Y,∆Z = 0.001; p, q, r = 0.001;m =80000kg; g= 9.81; 0≤ time ≤ 20 s

We observe a sinusoidal graph in both Figures3 and 4. We observe that with reduction in thevalues for ∆X,∆Y and ∆Z and for p, q, r, we

3

Page 4: Creating MATLAB simulations to model aircraft dynamics

see that the v velocity settles to equilibrium butthat the u,w velocities display signs of phugoidmode, the nature of which will be discussed fur-ther in the text, in detail. This instability isa direct result of the simplicity of the model,which higher order analysis, we expect to beable to observe a damped oscillation, where thevelocity values are quickly damped (indicatinga manual manoeuvre to prevent instability dur-ing flight). To this end, we see the sideways ve-locity getting damped the fastest, which makesintuitive sense as the fluctuations in the x andz-axes may be chalked to wind velocities andother sources of turbulence not considered inthe model.

3 Classical mechanics: Liftand drag

3.1 Third model: Euler approxi-mation

Like the previous models we still use Newton’slaws of mechanics to derive equations relatedto an aircraft. As we are only looking at pitchwithin this model we can ignore certain factorsthat will affect the aircraft. First there are twoplaces in which lift occurs on an aeroplane. Thefirst is at the centre of mass. We assume thecentre of mass is in the centre of the wings asthis is approximately correct. This lift only af-fects the altitude of the aircraft and has no re-lation to pitch so this can be ignored. Next isthe lift that occurs at the tail of the aeroplane.This provides a rotation around the centre ofmass so this is calculated. For this we take thedrag force acting on the aeroplane’s tail andfind the rotational component of this relativeto the centre of mass. First the value of drag isrequired. Drag is dependant on the coefficientof drag, density of the air, the square of velocityand the relative area. This area can be the areaof the wings on the tail, the surface area of theaeroplane or any other measure for area. Thisis because whatever is chosen will be reflectedwithin the drag coefficient as this coefficient isrelative to the certain body chosen.

D =1

2× Cd × ρ× V 2 ×A (17)

Using the calculated value for drag we usetrigonometry to find the lift where LT is thelift at the tail and alpha is the angle of attackof the aeroplane.

LT = D × sin(α) (18)

However, as we are only looking at smallchanges in angle of attack the equation can besimplified using the small angle theorem.

LT = D × α (19)

This lift is rotational force acting on the tail.From here we can work out the torque actingaround the centre of mass using the distancebetween the centre of mass and the tail as l.

τ = LT × l (20)

Using torque and the moment of inertia of theaircraft we can find its angular accelerationwhich in turn can be used to find the changein the angular velocity which is required for themodel. To work out the moment of inertia someguesswork is required as the shape of an aero-plane is irregular. If we use the following equa-tion and the estimate that the concentration ofthe mass is equally divided in two places botha quarter of the way in from the nose and thetail we find that the moment of inertia is 1

4ml2.

I =

∞∑i=1

mir2i (21)

Using this we can find the angular accelerationfor the aeroplane which in turn can be used withthe forward Euler method to model the angle ofattack over a period of time.

dt= −τ

I(22)

This equation is the first of the derivatives usedwithin the Euler method. The second is the an-gular velocity of the aircraft. This value willbe worked out using the above equation as thevalue of ω will change with each iteration.

dt= ω (23)

Using these derivatives we can perform Euler’smethod to analyse the change in the angle of at-tack for a given time period. For this we needto work out the change in both ω and α. To do

4

Page 5: Creating MATLAB simulations to model aircraft dynamics

this we use the following equations where t istime.

∆ω =ω

dt×∆t (24)

∆α = ω ×∆t (25)

ωn+1 = ωn + ∆ω (26)

αn+1 = αn + ∆α (27)

For Euler’s method Eq. 24 - 27 are repeatedfor the given time span and the values of α arerecorded and then plotted against time to showhow the angle of attack changes with time. Us-ing estimated values for a Cessna 172, this isthe result [4] [1].

Figure 5: A graph to show how the angle ofattack of a plane responds to an initial disrup-tion.

From this graph, we can see that the simplemodel created shows the angle of attack oscil-lating over time with no change in amplitude.This means that the aircraft modelled has neu-tral dynamic stability as the oscillations neverdampen out over time [5]. This is however onlydue to the simplicity of the model as a Cessna172 has positive dynamic stability which meansrealistically this model should dampen and re-vert to the natural angle of attack of the plane.There are three factors that effect the dynamicstability of a plane and determine whether itwill be positive and if so, how fast a disruptionin the angle of attack will be corrected [10].

First, a centre of gravity closer to the noseof the plane generally means the plane willbe more stable with respect to the aircraft’spitching moment. There will be a place on theaircraft where if the centre of gravity lies theplane will have neutral stability and any furtherback from this point will result in the plane be-ing negatively dynamically stable. This is whysmall planes have a strict restriction on the loadthey can take and how it is loaded. This factorwill not be considered within the model as itis assumed that the plane will have positivedynamic stability[10].Next the position of the centre of pressure onthe aircraft determines if there will be anypitching moment. The centre of pressure is thepoint on the aeroplane where it can be imag-ined the lift force is “concentrated”. This isa similar concept to how centre of gravity isthought of. If the centre of pressure does not“act” in the same place as the centre of gravitythere will be a consequential pitching moment.Due to the complexity of calculating the centreof gravity, this will also be excluded from themodel[10].

Lastly, the elevator component on a planecontrols the pitching rotations. It is possible forthe elevator to be designed in such a way thatit can have passive restoring capabilities whichwill dampen out any change in pitch. For thisto occur the any extra or loss in lift from thewings (dependant on whether the plane is pitch-ing up or down) is countered by a lift greaterin magnitude from the tail due to an passivechange in the angle of attack from the elevator.This passive change can be done passively usinga well though design or a flight computer whichcorrects the path (auto-pilot). A small plane isunlikely to have such capabilities of auto-pilotso this passive change will be from a well de-signed tail-plane [10]. This factor will be im-plemented within the model.The premise of this factor is that there is anincreased magnitude for the angle of attack atthe tail compared to the wings which in turnallows for a greater lift force and in turn torqueto correct the plane. The amount at which theangle of attack is increased at the tail is pro-portional to the increase in lift from the change

5

Page 6: Creating MATLAB simulations to model aircraft dynamics

in rotation and the change in the position ofthe centre of pressure. The centre of pressureis proportional to the angle of attack and cantherefore be represented by the angle of attackmultiplied by a constant. The change in lift isalso proportional to the angle of attack so thiswill also be represented by the angle of attackmultiplied by a constant. Therefore we can saythat the increase in angle of attack at tail of theplane is simply:

∆αT = α× C (28)

The constant value of ‘C’ determines how fastthe plane will revert to the cruise angle of at-tack and is this is therefore the dampening con-stant. The larger this is the faster the plane willdampen. This is to a certain degree as too largeof a value will cause instability. Using a reason-able value for this constant and the same valuesfor all other constants as before this graph isobtained.

Figure 6: A graph to show how the angle of at-tack of a plane responds to an initial disruptionwith a passive elevator.

From this graph we can see that the value cho-sen for the dampening constant is reasonable tomodel a plane of this size as it is likely the planewill not immediately return to the original an-gle of attack whilst also not taking too long todampen.Next we must account for change in forwardvelocity. This is because the pitch and forwardvelocity effect each other. To start an equation

for the change in velocity is required. To derivethis first we look at force balancing the plane.We however do this using the plane as a frameof reference. This will give use the velocity butin the direction of the plane and not relative toearth. There are 3 forces that have a compo-nent acting parallel to the plane. Weight, dragand thrust. The weight component will be theweight multiplied by the sine of the angle of at-tack as this is the part that effects the velocity.The drag and the thrust act in the same lineas the plane as need no translation. The thrustwill be provided by the propeller of the aircraft.

mdV

dt= −D −mgsin(α) + Th (29)

From this we can divide through by mass to getthe rate of change of velocity.

dV

dt=−D −mgsin(α) + Th

m(30)

We can again apply Euler’s forward method tothe model using this differential to produce amodel of how the angle of attack and veloc-ity change with time after a disturbance. Fromthis, we get two graphs. The first shows theangle of attack against time. From this graphwe can see that adding a varying velocity hasnot affected the rate of change of the angle ofattack as the period in this graph is the sameof that from the previous version of the model.

Figure 7: A graph to show how the angle of at-tack of a plane responds to an initial disruptionwith a passive elevator and a changing velocity.

6

Page 7: Creating MATLAB simulations to model aircraft dynamics

This graph shows the change in velocity overtime. We can see plainly from this graph thatthe velocity is affected by a varying angle of at-tack. It is also clear that it converges towardsa “cruise” velocity just as the angle of attackwill converge towards its original angle of at-tack. We can also see that the velocity graphshares the same period as the angle of attackgraph. This leads me to believe that velocity isdirectly proportional to the angle of attack.

Figure 8: A graph to show how the forwardvelocity of a plane responds to an initial dis-ruption with a passive elevator and a changingvelocity.

This velocity is the forward velocity of the planebut in its own frame of reference. To get the ve-locity relative to the Earth’s frame of referencethe current velocity must be multiplied by thecosine of the angle of attack.

V = V × sin(α) (31)

The use of this equation in practice minutelychanges the outcome of the model, so much sothat the graphs look identical. This is becausethe offset angle of attack is so slight. Whenlooking at a greater change in the angle of at-tack this would be more useful.

4 Phugoid mode

The phugoid behaviour is the rapid increaseand decrease of pitch angles accompanied byfluctuating velocities which continuously makesthe aircraft go “uphill” and “downhill”. The

phugoid mode proceeds at a constant angle ofattack and we assume that the pitch rate is verysmall. Thus, we approximate the behaviour ofthe mode by writing only the X and Z-forceequations [3] where u0 is the initial velocity ofthe aircraft,

u = ∆Xu+ ∆Xw − g0cos(θ0)θ (32)

(1−∆Z)w = ∆Zu+ ∆Zw + (u0Zq)q − g0sin(θ0)θ(33)

After setting w = w = 0 we can write it in thematrix form,

d

dt

(uθ

)=

(∆X −g0cosθ0−∆Zu0+Zq

g0sinθ0

)(uθ

)(34)

Considering level flight equilibrium and neglect-ing and θ = 0 then,

d

dt

(uθ

)=

(∆X −g0−∆Zu0

0

)(uθ

)(35)

The characteristic equation for the matrix inthe equation above can be given by,

λ2 −∆Xλ− g0

u0∆Z = 0 (36)

The natural frequency (ωn)and the damping ra-tio (ζ) for this mode can then be given as,

ωn =

√−g0

u0∆Z (37)

ζ =|∆X|2ωn

(38)

Further neglecting compressibility effects wesimplify (ωn) to,

ωn =√

2g0

u0(39)

Using the data for a Cessna 182 Skylane, withmass 1200 kg, our simulation from our secondmodel, gives u0 of 71.84 (2 d.p) ms−1. Thus,we determine,

ωn =√

29.81

71.84= 0.19s−1

ζ =0.01

2 · 0.19= 0.03

We compare these values to ωn = 0.21 andζ = 0.08 obtained from a more rigorous anal-ysis [9]. We observe that our simplistic anal-ysis using the simulation under-predicts both

7

Page 8: Creating MATLAB simulations to model aircraft dynamics

the natural frequency by about 10 % and thedamping ratio by a factor of 3/8. Nonethe-less, this simplified approach gives us better in-tuition towards the parameters governing thephugoid mode.

5 Short-period mode

The short-period mode mainly reflects thecharacteristics of the aircraft’s pitch rotation.Compared with the long-period mode, it hasfast attenuation and high oscillation frequency.Among them, the changes in the aircraft’s pitchangular velocity and angle of attack are obvi-ously, but the changes in speed are small [16].The short-period mode works only in the ini-tial phase (in a few seconds) of the perturbedmotion and decays quickly.

Figure 9: Short-period motion.

The speed change in the short-period motionphase is small, so the flight speed can be consid-ered as approximately maintained [18]. There-fore, the tangential force equation in the mo-tion can be removed. Set ∆v = 0 in the restof equations, and introduce d∆ϑ

dt = ωz. Assumeθ = 0 in undisturbed motion, then equations ofshort-period perturbation motion can be sim-plified as,d∆α

dt+ Y

α

c ∆α− ωz = 0

-Mα

zd∆αdt −M

α

z∆α+ dωz

dt −Mω

z ωz = 0(40)

Then get the characteristic equation [2] as

λ2 + a1λ+ a2 = 0 (41)

for which

λ1,2 = n+ iω = −a1

2±√

4a2 − a21

2i (42)

a1 = Yα

c −Mωzz −M α

z, a2 = −Mα

z − Yα

cMωz

z

(43)According to the stability criterion, the sta-

bility conditions for short-period motion are thecoefficients a1 and a2 of the characteristic equa-tion must be greater than zero. For regularaircraft,Y

α

c > 0,Mα

z < 0,Mω

z < 0. So coef-ficient a1 remain positive which satisfied thecondition. Therefore, whether a2 is greaterthan zero becomes the only condition for short-period modal stability.

−Mα

z − YαzM

ω

z > 0

The above conditions indicate that if the air-craft has static stability,Mα

z < 0, then theconditions are met, and the short-term motionof the aircraft is stable. If Mα

z > 0, when−Mα

z − YαzM

ω

z > 0, the motion is still ableto remain stable.

6 Discussion and Conclu-sion

The first and second models are formulated en-tirely on Newton’s laws of motion. The firstmodel takes a simplistic Euler method approxi-mation to the solution, and we observe the sys-tem getting completely damped. The secondmodel uses MATLAB’s powerful ODE solver toget a sinusoidal curve where the sideways ve-locity then goes to zero which makes intuitivesense as explained in the model discussion, yetthe instability in the model remains, which isthen solved in the third model, using estimateddamping constants.The instability of the system in the secondmodel can be thought of as phugoid behaviour.The phugoid mode makes the aircraft undergorapid changes in pitch angles and velocities,leading to instability in the system. This insta-bility can be assessed using the phugoid modeequations, using the damped natural frequencyand the damping ratio as parameters. Wefind that the simulation under-predicts both thenatural frequency and the ratio by 10% and afactor of 3/8 respectively, yet the simulation can

8

Page 9: Creating MATLAB simulations to model aircraft dynamics

be considered to be useful by its simplistic ap-plication to problems.The third model created only uses drag forcesthat act on the tail of the plane when calcu-lating the pitching moment of the aeroplane.This is because this is the bulk of the contri-bution towards the pitching moment and dragcan be used to represent both the drag andthe lift forces acting on the tail. This makesthe model a lot more simplistic whilst not los-ing a great deal of accuracy and authenticity.However, when looking at bigger angles of at-tack and greater changes in angles of attack thismodel will be too simplistic to accurately pre-dict the dynamics of a plane. In a more complexmodel, the centre of pressure for the aircraftwould be determined as this is a large part inhow a well-designed elevator passively dampensthe oscillations of a plane. However, for a sim-plistic model, a carefully chose constant alongwith the angle of attack can provide a mediocrerepresentation of the centre of pressure. Onelarge flaw within the third model is the lackof information on hand when creating it. Thisleaves large room for error as a lot of variables,for example, the drag coefficient, are estimatedor changed in order to give a better functioningmodel. Despite the simplicity of the model theoutput graphs are reasonable and whilst theymay be inaccurate, they do represent how dif-ferent forces that act on a plane are affected bythe change in the angle of attack and they effectchange there after.The combination of the two models will give agood understanding of the dynamics of an aero-plane and how these dynamics will change withdifferent aircraft as variables are changed.

References

[1] U.s. standard atmosphere. EngineeringToolBox.

[2] Benwu Zheng, H. X. (1990). Aerodynamicsof aircraft with automaton. Aviation Indus-try Press.

[3] Caughey, D. A. (2011). Introduction to air-craft stability and control course notes form&ae 5070. Sibley School of Mechanical &Aerospace Engineering Cornell University.

[4] Cessna (2011). Cessna 172. Cessna AircraftCompany.

[5] Cutler, C. (2015). The 3 types of staticand dynamic aircraft stability. Online FlightTraining Courses and CFI Tools.

[6] Duke, E. L., Antoniewicz, R. F., and Kram-beer, K. D. (1988). Derivation and definitionof a linear aircraft model.

[7] Etkin, B. (1972). Dynamics of atmosphericflight, john wiley and sons. Inc, New York,London, Sydney.

[8] Ferrarese, G. (2018). Natural motionof a multi-rotor aircraft. Proceedings ofthe Institution of Mechanical Engineers,Part G: Journal of Aerospace Engineering,232(2):280–289.

[9] Foster, T. and Bowman, J. (2005). Dy-namic stability and handling qualities ofsmall unmanned- aerial vehicles. In 43rdAIAA Aerospace Sciences Meeting and Ex-hibit. American Institute of Aeronautics andAstronautics.

[10] Groh, R. (2018). Control and stability ofaircraft. Aerospace Engineering Blog.

[11] Inman, D. J. and Singh, R. C. (1994). En-gineering vibration, volume 3. Prentice HallEnglewood Cliffs, NJ.

[12] Johnson, E. and Mishra, S. (2002). Flightsimulation for the development of an exper-imental uav. In AIAA Modeling and Simu-lation Technologies Conference and Exhibit,page 4975.

[13] L’Afflitto, A. (2017). Equations of motionof an aircraft. In A Mathematical Perspec-tive on Flight Dynamics and Control, pages35–64. Springer International Publishing.

[14] Shy, K. S., Hageman, J. J., and Le, J. H.(2002). The role of aircraft simulation in im-proving flight safety through control training.National Aeronautics and Space Administra-tion, Dryden Flight Research Center.

[15] Svoboda, M., Marek, J., and Heckenberg-erova, J. (2014). Estimation of angles yaw,pitch and roll in a special transformationproblem. In Nostradamus 2014: Prediction,

9

Page 10: Creating MATLAB simulations to model aircraft dynamics

Modeling and Analysis of Complex Systems,pages 393–400. Springer International Pub-lishing.

[16] Tseng, J.-B. and Lan, C. E. (1988). Calcu-lation of aerodynamic characteristics of air-plane configurations at high angles of attack.

[17] Wu, J. H., Zhang, Y. L., and Sun, M.(2009). Hovering of model insects: simula-tion by coupling equations of motion withnavier–stokes equations. Journal of Exper-imental Biology, 212(20):3313–3329.

[18] Zhenping, F., Wanchun, C., Shuguang, Z.,et al. (2005). “aircraft flight dynamics.

Appendix A Preliminary model: Euler approximation

Figure 10: MATLAB code for the Euler method approximation for the forward equation of motionfor the aircraft.

10

Page 11: Creating MATLAB simulations to model aircraft dynamics

Appendix B Second model: Non-linear model using ode45for stiff ODEs

Figure 11: MATLAB code for the Van-der-Pol equation used to solve for the RHS of the generalisedequations of motion for the aircraft.

11

Page 12: Creating MATLAB simulations to model aircraft dynamics

Figure 12: MATLAB code for the ode45 method approximation for the velocities in the x, y andz-axes for the aircraft.

12

Page 13: Creating MATLAB simulations to model aircraft dynamics

Appendix C Third model: Using Euler’s approximation

Figure 13: MATLAB code for the approximation of the drag force.

Figure 14: MATLAB code for the approximation of the torque.

Figure 15: MATLAB code for the approximation of the angular acceleration.

13

Page 14: Creating MATLAB simulations to model aircraft dynamics

Figure 16: MATLAB code for the initial model’s approximation of the change of angle of attackwith time using Euler’s forward method.

14

Page 15: Creating MATLAB simulations to model aircraft dynamics

Figure 17: MATLAB code for the approximation of a passive elevator’s change in angle of attack.

15

Page 16: Creating MATLAB simulations to model aircraft dynamics

Figure 18: MATLAB code for the improved model’s approximation of the change of angle of attackwith time using Euler’s forward method.

Figure 19: MATLAB code for the approximation of the rate of change of an aircraft’s velocity.

16

Page 17: Creating MATLAB simulations to model aircraft dynamics

Figure 20: MATLAB code for the final model’s approximation of the change of angle of attack withtime using Euler’s forward method.

Figure 21: MATLAB code for the approximation of the horizontal velocity of an aircraft.

17