You are on page 1of 9

FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

Paper airplane simulation


by Frank Owen and Karl Siebold – Hochschule München
Sommersemester 2017

The Flight Mechanics Skript covers the case of “gliding”, which it defines as level, straight, unaccelerated
flight. This is a special case of gliding. Anyone who has flow in a glider knows that you can accelerate by
changing the pitch angle of the glider. For this paper airplane simulation, let’s allow straight, non-level,
accelerated flight. So the paper airplane can speed up or slow down, but it can also change vertical
direction (pitch,  ). The paper airplane will fly straight across the ground ( = constant, = 0 even, for
simplicity). But the paper airplane can change its attitude along this straight track.

State-space formulation of the gliding problem

In this simulation we also introduce the concept of a state vector. This is simply the set of variables
needed to define the altitude, distance, velocity, and flight-path angle of the paper airplane:

=

Thus, we are using the system dynamics format of state space to compose a model of the system. A
state-space model has the format

̇= ( )
That is, the derivatives of the states are on the left-hand side of the equation, and each of these is just a
function of the system states. To write the model, we need to look at the derivative of each state and
try to think of an equation, involving only states, that expresses a physical law that is pertinent to how
the paper airplane is to fly.

The first two equations are easy. They just keep track of the altitude and horizontal distance travelled
by the airplane. ̇ = ℎ̇ = ∙ sin , which is just the vertical velocity of the airplane. ̇ = ̇ = ∙ cos ,
and this is just the horizontal velocity of the airplane. Thus
̇ ̇ ∙ sin
= ℎ =
̇ ̇ ∙ cos

We need to be careful about signs here.  for a gliding aircraft will be generally below the horizontal. It
is defined as the angle above the horizontal. So in our case,  will be negative. As such, for the first
state, negative will produce a negative vertical speed but a positive horizontal speed. We shall want
to plot the flight path, so this is contrary to the down-is-positive z-coordinate sense of Flight Mechanics,
but to a normal human, this is probably best. We don’t want to have to stand on our heads to
understand our flight path.

For the second two states, we need to apply Newton’s Second Law (N2L) to the airplane. The airplane’s
flight situation is shown in the figure below.

1|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

We need the free-body diagram (FBD) and the mass-acceleration diagram (MAD) to apply N2L.

: − − ∙ sin = ∙ = ∙ ̇

The xa-direction is defined by the direction of ⃗ , so axa is a speeding up or slowing down of v , i.e it is ̇ .

Note the sign of the second term, − ∙ sin . If  is negative, which it is in the drawings, then we need
the xa component of ⃗ to act opposite ⃗So we need this term to have a negative sign before it.

Besides an increase or decrease in speed, the velocity may change directions too, and that is the reason
we need to include m·aza . If  is changing, then the velocity vector is swinging into another direction.
The figure below shows this situation, with a positive ̇ ( increasing counter-clockwise).

The change in velocity due to direction-change is thus ∙ ̇ in the limit (t→0). Note that this is in the
negative zg-direction. Thus = − ∙ ̇ . So the zg equilibrium equation is

2|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

: − + ∙ cos = ∙ =− ∙ ∙ ̇

For the state-space formulation of the gliding paper airplane, we need to solve these equations for the
derivatives of the two states v and  .
1
̇= (− − ∙ sin )

1
̇= ( − ∙ cos )

We also know that = ∙ ∙ ∙ and = ∙ ∙ ∙ . If these are substituted in

1
̇= − ∙ ∙ ∙ − ∙ ∙ sin
2
1
̇= ∙ ∙ ∙ − ∙ ∙ cos
∙ 2
These two equations meet the format for state-space. The two states are v and  , both of which
appear on the right-hand side of these two equations. Thus the state-space formulation is
∙ sin
̇ ⎡ ∙ cos ⎤
ℎ̇ ⎢1 ⎥
̇
= ̇ =⎢ − ∙ ∙ ∙ − ∙ ∙ sin ⎥
̇ ̇ ⎢ 2 ⎥
̇ ̇ ⎢ 1 ⎥
⎣ ∙ 2∙ ∙ ∙ − ∙ ∙ cos ⎦
(Actually, from a state-space standpoint, h and r are not states, as they are not part of calculating the
dynamics of the problem. They are rather just outputs, determined after the states are known. The
state-space problem here is actually 2D, with v and  , being the states.)

Simulation of the gliding airplane

There are multiple ways to simulate this. Here we shall consider two—a solution via Matlab and a
solution via Simulink. In the Matlab solution, an m-file with the above equations in it is written and then
used with an ODE solver. The ODE solver is invoked from a controlling m-file. The controlling m-file is
called PaperHorizontalUnpowered.m:
% Paper Airplane Simulation

global CL CD S m g rho

S = 0.017;
m = 0.003;
g = 9.81;
rho = 1.225;

CD = 0.04; % Lift and drag coefficients simply given


CL = 0.22; % for this flight regime

3|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

gamma0 = -atan(CD/CL); % Negative sign because descent angle


v0 = sqrt(2*m*g/(rho*S*sqrt(CL^2+CD^2))); % See page 19 of script.
%This velocity is
% the initial velocity for
% minimum descent angle

% Now we run several cases with various initial flight conditions.

H = 2;
R = 0;

t0 = 0;
tf = 6;
tspan = [t0 tf];

% a) Trimmed flight case. Initial angle is minimum angle of descent

s0 = [H;R;v0;gamma0]; % State vector's initial state


[ta, sa] = ode23('PaperHoriz',tspan,s0);

% b) Same initial velocity but release at horizontal angle

gamma0 = 0;
s0 = [H;R;v0;gamma0];
[tb, sb] = ode23('PaperHoriz',tspan,s0);

% c) Release at horizontal angle, double min-descent speed

newV0 = 2*v0;
s0 = [H;R;newV0;gamma0];
[tc, sc] = ode45('PaperHoriz',tspan,s0);

% d) Release at horizontal angle, triple min-descent speed

newV0 = 3*vo;
s0 = [H;R;newV0;gamma0];
[td, sd] = ode45('PaperHoriz',tspan,s0);

% Now plot all of the results

plot(sa(:,2),sa(:,1),sb(:,2),sb(:,1),sc(:,2),sc(:,1),sd(:,2),sd(:,1))
grid on;
ylim([0 5]);
xlim([-0.5 18]);

4|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

The invoked file with the dynamics in it is called PaperHoriz.m.


function sdot = PaperHoriz(t,s)

global CL CD S m g rho

v = s(3);
gamma = s(4);

q = rho/2*v^2;

% State vector = [H; R; v; gamma]

sdot = [ v*sin(gamma); ...


v*cos(gamma); ...
1/m*(-q*S*CD-m*g*sin(gamma));...
1/(m*v)*(q*S*CL - m*g*cos(gamma))];

end

Alternatively, we can use our standard procedure to make a Simulink model of the gliding airplane. (See
Control Systems Engineering: A Practical Approach by Prof. Owen, Chapter 3.) The Simulink model
appears below.

5|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

Simulations and results

As can be seen mostly clearly in the Matlab model, each simulation requires that you supply the initial
state. So an array of the initial state conditions is supplied to the simulation. In the Matlab simulation,
four cases are considered:

1) the trimmed-descent case, wherein the initial v and  are set for the minimum flight-path-angle
case
2) the initial velocity is that of the minimum-descent case, but the initial angle is horizontal ( = 0)
3) the horizontal release angle is kept, but the velocity is double that needed for the minimum
descent-angle
4) the horizontal release angle is kept, but the velocity is double that needed for the minimum
descent-angle

6|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

The output figure plots the flight path by plotting h vs. r .

v0 = 3*velocity for minimum descent

0 = 0
4
v0 = 2*velocity for minimum descent

0 = 0
3

v0 = velocity for minimum descent

0 = 0
2

v0 = velocity for minimum descent

0 = minimum-descent angle for v0


1

For the various cases, we release the airplane at 2 m height. The release point is the point of r = 0 m.

Case 1: The airplane just descends along a straight, slanted path.

Case 2: The airplane starts off horizontally but loses speed and noses down. It then recovers and
oscillates in a damped oscillation around the minimum descent line.

Case 3: The airplane has enough forward speed on release, with twice that needed for the minimum
descent, that it starts to climb. It slows and stalls, picks up speed, and then oscillates around a
minimum-descent path.

Case 4: The airplane has still more forward speed and energy upon release. It climbs and loops and
then oscillates around a minimum-descent path.

7|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

The Simulink simulation gives the same results. The initial conditions are given as shown in the following
figure:

Set v0 by double-clicking here


Set r0 by double-clicking here

Set h0 by double-clicking here

Set 0 by double-clicking here

You can set all of the variables in the simulation in the Matlab command window. Once this is done,
these variables will be known to Simulink. Also, once you do this, save the workspace (as a .mat file).
Then if you start the simulation over again after exiting Matlab, all you have to do is to re-load this .mat
file, and the variables will be there once again.

You run the various simulations in sequence. Upon running each one, the array of results will be stored
in the Matlab workspace as FlightPath. We want to plot the flight path, so this will be FlightPath(:,2) vs.
FlightPath(:,1). After you have created the first plot, issue the hold on command, so that the following
plots will not erase the current plot. After each run, you issue the command
plot(FlightPath(:,1), FlightPath(:,2))

Thus, a sequence of commands to create a new figure and plot multiple outputs would be:
figure(2)
hold on
plot(FlightPath(:,1), FlightPath(:,2))

<Now change initial conditions and make another run>


plot(FlightPath(:,1), FlightPath(:,2))

8|Hochschule München
FLIGHT MECHANICS – PAPER-AIRPLANE SIMULATION

<Now change initial conditions and make another run>

etc.

Don’t be afraid to try all sorts of initial conditions to see what will happen with various scenarios of
throwing the airplane initially.

Also, verify the model as best you can by running tests with an actual paper airplane. Maybe change the
initial height of release with a short person. Note the distance of flight from the launch point as another
variable that can be verified easily. If the airplane does not fly as far as predicted you might increase the
drag coefficient or decrease the lift coefficient. Which one to do is up to you. You can also track how
long it takes for the airplane to reach the ground in any scenario. That might help you decide which
coefficient—lift or drag—to modify.

Have fun!

9|Hochschule München

You might also like