Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Proyecto Integrador de Aprendizaje

Edson Elian Martinez Loeza


Israel Alejandro Almaguer Acevedo
Adriel Espinosa Villaseñor Carlos Maximiliano Pérez Garcı́a
José Ignacio Rodrı́guez Rojas

Flight Dynamics - Group 001 - Team 5

Abstract: For this report, an automatic pilot will be analyzed and developed. With the help
of external softwares such as MatLab and Arduino.

1. INTRODUCTION

In the aeronautical field, the autopilot (automatic pilot)


is an important component of the aircraft system that
permits the pilot to have better control of the aircraft.
The AP has the control of the aircraft without a direct Fig 2.2 - General State Equations for a Linear
intervention of the pilot in the controls. Dynamic System.
The usage of the AP has the function of making it In general, the transfer function matrix has the form
easier to control the aircraft, making a balance between
the longitudinal and lateral-directional dynamics and the
disturbances that the aircraft suffer while flying. The
implementation of this system has managed to avoid
uncontrolled events caused by some human error.

2. THEORETICAL BACKGROUND Fig 2.3 - Transfer Function Matrix


N(s) is a polynomial matrix whose elements are all of the
2.1 Aircraft Response Transfer Functions response transfer function numerators. The denominator
∆(s) is the characteristic polynomial and is common to
Aircraft response transfer functions describe the dynamic all transfer functions. Thus the application of the state-
relationships between the input variables and the output space method to the solution of the equations of motion
variables. The relationships are indicated diagrammati- enables all response transfer functions to be obtained in a
cally in figure below, it is clear that a number of possible single computation.
input-output relationships exist.
Now, when dealing with the solution of the equations of
motion it is usually required that y(s) = x(s), that is,
the output vector and state vector are chosen to be the
same. In this case equation of the output vector may be
simplified since C = 1 and D = 0; so:

Fig 2.1 - Aircraft Response Transfer Functions


Fig 2.4 - Developed Transfer Function Matrix
2.2 The State-Space Method The equation of the simplified transfer function matrix
is equivalent to the multivariable application of Cramer’s
Most commercial software is intended for problems in rule.
modern control, so some care is needed to ensure that
the aircraft equations of motion are correctly assembled Comparing the 2 equation of the transfer function matrix,
before a solution is computed using these tools. However, the simplified and the other one, it is evident that the
the available tools are generally very powerful, and their polynomial numerator matrix is given by
use for the solution of the equations of motion of aircraft
is particularly simple.

2.3 The Transfer Function Matrix


Fig 2.5 - Polynomial Numerator Matrix
The general state equations, describing a linear dynamic and the characteristic polynomial is given by
system may be written as:
Fig 2.6 - Characteristic Polynomial

2.4 The Longitudinal Transfer Function Matrix

Fig 3.1 - North American X-15


Fig 2.7 - Longitudinal Transfer Function Ma- The goal of this project is to review the stability and
trix control properties of the aircraft for one typical flight con-
dition. Since the aircraft was fitted with damping augmen-
tation in each axis; and the second objective is to design
an autopilot or control for both dynamics longitudinal and
lateral-directional.
The aircraft equations of motion are given in the form of
the decoupled state equations as follows. The flight condi-
Fig 2.8 - Algebraic Form of Longitudinal tion assumed corresponds with Mach 2.0 at an altitude of
Transfer Function Matrix 60,000 f t [2].
The longitudinal state equation is

2.5 The Lateral-Directional Transfer Function Matrix

Fig 3.2 - Longitudinal State Equation


The lateral-directional state equation is

Fig 2.9 - Lateral-Directional Transfer Function


Matrix
Fig 3.3 - Lateral-directional State Equation
Velocities are given in f t/s, angular velocities in rad/s,
and angles in rad (532.2 f t/s2 ).

4. METHODOLOGY

To design the autopilot or control for the aircraft, it was


Fig 2.10 - Algebraic Form of Lateral-Directional used the Cramer’s rule, which describes a mathematical
Transfer Function Matrix process for solving sets of simultaneous linear algebraic
equations; and the aircraft response transfer functions
for both longitudinal and lateral-directional dynamics in
MATLAB. Then, an arrangement in Simulink was made
3. PROBLEM for each state variable using closed-loop structures and
PID controls to achieve the best responses. It should be
The North American X-15 (Fig. 3.1) was a hypersonic noted that it was carried out that in each closed-loop
research aircraft which first flew in 1960. This rocket- system the overshoot was considered to be in the range
powered aeroplane was capable of speeds as high as Mach of 20-25%. Next, it will be explained and discussed the
6 at up to 300,000 f t altitude. The aircraft was carried procedure of the control design.
under a B-52 to an altitude of about 45,000 f t, from which
it was launched at a speed of about Mach 0.8. Following 4.1 State Variables
the powered phase of flight, recovery entailed gliding flight
to a normal landing—much in the same way as the space The state variables were determined with a designed
shuttle recovery. program in MATLAB, making use of the properties of
the transfer function matrix, explained in the theoretical 4.3 Lateral-directional Dynamics
framework.
The MATLAB program started defining symbolic objects The code for the lateral-directional dynamics has the
or variables that will be used later in the development of same structure as the longitudinal dynamics code. It was
the complete program. This is shown in the Fig. 4.1. defined as the constant matrix A and the longitudinal
state variables x in the lateral-directional state equation
presented in the Problem section. Constant matrix B and
input matrix u were defined too. The identity matrix I was
defined as a square matrix of four lines and four columns.
Polynomial numerator matrix N and the characteristic
polynomial matrix ∆s were defined according to their
Fig 4.1 - Defining Symbolic Variables definitions. And, finally, it was defined as the numerator
for each lateral-directional state variable as functions of
4.2 Longitudinal Dynamics the polynomial numerator N. This can be seen next in
Fig. 4.4.
To determine the longitudinal variables, it was defined
the constant matrix A which multiplies the longitudinal
state variables x, whose definition was also made, in the
longitudinal state equation presented in the Problem sec-
tion. Also, the other constant matrix B and input matrix
u were defined. Then, the identity matrix I was defined
as a square matrix of four lines and four columns. Next,
the polynomial numerator matrix N and the characteristic
polynomial matrix ∆s were defined according to their
definitions. Finally, it was defined the numerator for each
longitudinal state variable as functions of the polynomial
numerator N. This can be illustrated in Fig. 4.2.

Fig 4.4 - Lateral-directional Dynamics Code


The numerators of variables β, ρ, r and ϕ; and the deter-
minant were the following:

Fig 4.2 - Longitudinal Dynamics Code Fig 4.5 - Numerator and denominator for the
Lateral-directional plant
The numerators of variables u, w, q and θ; and the deter-
minant were the following: Note that in this case, the numerators have two columns
due to the two different input signals δa and δe , which are
the aileron angle and the elevator angle, respectively.

4.4 Control Design

For the control design it was used the closed-loop system


for each variable filling the numerator and denominator
field of the transfer function blocks with the corresponding
numbers of each state variable. Also, a step source was
Fig 4.3 - Numerator and denominator for the used in each closed-loop system. It will be explained this
longitudinal plant process in detail for the longitudinal state variable u as an
example, since this process was done for each state variable fact that the overshoot does not exceed the 25%, as said
in both longitudinal and lateral-directional cases. before, and that the output rejection be the fastest as
it can be. Taking that in count, the response time and
First, a transfer function block is inserted in Simulink;
the transient behavior are modified to comply with the
then, it is filled with the corresponding values for numera-
later considerations. In Fig. 4.10, it can be seen the final
tor and denominator, in this case, for the u variable (Fig.
controller parameters chosen.
4.6).

Fig 4.6 - u transfer function block parameters Fig 4.10 - PID Controller Parameters for Tun-
filling ing
Then a closed-loop is created as follows: These final parameters are updated in the block system
and the closed-loop is done. All the process described
above is done for all the other state variables for both
longitudinal and lateral-directional dynamics. It only re-
mains to accommodate the different closed-loop systems in
arrangements that are visually pleasing and understand-
able.
Fig 4.7 - Closed-loop system for u
Finally, it is added a gain before the sum block; this is
If we leave this structure like that, the response would be to consider it as the reference values, which are obtained
chaotic. That is why it is pretended to use a PID controller. from the f light condition parameters of the aircraft (Fig.
So, a PID controller is inserted as in Fig. 4.8. Then, the 4.11). Next, it is presented the final array of the overall
PID controller is tuned selecting the ”Tune” button in the Simulink program.
block parameters of the PID controller. A new window
will appear and it will show the tuned response and the
block response for the reference tracking and plot and the
output disturbance rejection plot (Fig.4.9).

Fig 4.11 - Closed-loop System With PID Con-


trol and a Reference Gain for u

Fig 4.8 - Closed-loop system with PID control


for u

Fig 4.9 - PID Controller Tuning


Simulink automatically tunes the PID controller, but it
is possible to change both the response time and the
Fig 4.12 - Longitudinal Dynamics Subsystem
transient behavior to a slower or faster response, or to
an aggressive or robust behavior. It will be considered the
Fig 4.13 - Lateral-directional Subsystem

Fig 4.16 - State Variables Mixed

Fig 4.14 - Lateral-directional Dynamics for


aileron input subsystem Fig 4.17 - Overall 6-DOF North American X-
15 Aircraft Plant Model.
4.5 IMU MPU6050 with Arduino

The IMU sensor was applied here through the project in


combination with SIMULINK and Arduino. The whole
process was very extended not just for obtaining a correct
process, but also for obtaining a relationship between the
Autopilot and the IMU sensor. It can be defined as ”an
IMU is a specific type of sensor that measures angular rate,
force and sometimes magnetic field. IMUs are composed
of a 3-axis gyroscope, which would be considered a 6-
axis IMU. They can also include an additional 3-axis
magnetometer, which would be considered a 9-axis IMU”.

Fig 4.15 - Lateral-directional Dynamics for


Rudder Input Subsystem

Fig 4.18 - IMU degrees of freedom.


For more information about the IMU, it typically consists 5. RESULTS
of three componentes. The accelerometer, gyroscope, and
magnetometer. Here through the present final project Considering the aircraft X-15, since it is very unstable, a
there is established an accelerometer and gyroscope used comparation was wanted when having a minimum lift with
for determining the angular position of the aircraft. There the velocity component.
are some important parts of the aircraft that are strongly
related to this. Components such as the elevator and the
aileron are part of the IMU MPU6050 and act directly
with the SIMULINK codification. This is because the
accelerometer is related with the accelerations in the y
and z axis, in order to convert this information into
a pitch angle. The previous statement can be obtained
by using a trigonometric function as an arc tangent.
Then the rest of input data as x, y, z velocities and
x acceleration are linked to a “Mux” in order to stop
receiving information and data from these points. Once
the y and z accelerations are calculated, the scope at the
end of the trigonometric function shows some important
development and performance of the MPU6050.

Fig 5.1 - Plant with Minimum Values


On the other side, it was wanted a comparison for the
behavior when having a high-peak velocity value. Having
that the component will take a lot more of time to get an
stable state.

Fig 4.19 - IMU MPU6050 with Arduino re-


sponse.
Here in the scope it can be observed how the MPU6050
interacts with the aircraft’s angular position. If it is
inclined in a positive pitch angle the graph will show an
increase and vice versa. It is very important to clarify
how the Arduino was introduced in Matlab SIMULINK,
and it was possible thanks to the downloads of certain
specific libraries that provide the correct information in
order to accomplish the IMU sensor. An important fact
Fig 5.2 - Plant with a High Velocity Value
and part of the simulation was the physical connection of
the MPU6050 to the proto board and Arduino. Next, there 6. CONCLUSION
are two photos that show how the IMU was connected
respectively. The implementation of an autopilot (automatic pilot) on
aircrafts has benefits, since lightening the work of the
pilots, avoid unwanted situations caused by human error,
to being able to maintain the control of the aircraft having
lateral, vertical and longitudinal stability.
It can also be concluded that the more the autopilots
advance, each time it will be possible to carry out com-
plicated tasks more easily.
On the other hand it must be considered that the elabora-
tion of an autopilot, is a process that may be complicated,
because of all the aspects that have to be considered to
achieve some good control dynamics that permits to keep
the stability of the aircraft.
Fig 4.20 - Installation of MPU6050 to Arduino
7. REFERENCES
and SIMULINK
[1] Cook, M. V. (2013). Flight Dynamics Principles (3rth
ed.).
[2] Heffley, R. K., Jewell, W. F. (December, 1972). NASA
CR-2144. Recovered november, 2021; from https://www.
robertheffley.com/docs/Data/NASA%20CR-2144–Heffley–
Aircraft%20Handling%20Qualities%20Data.pdf
[3] Pao, C. (2019, September 13). The importance of IMU
motion sensors. CEVA’s Experts blog. Retrieved Novem-
ber 19, 2021, from https://www.ceva-dsp.com/ourblog/
what-is-an-imu-sensor/.

You might also like