0% found this document useful (0 votes)
52 views

Training Report - DRDO

Summer training report prepared by a student who undertook summer internship at DRDO Bangalore
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Training Report - DRDO

Summer training report prepared by a student who undertook summer internship at DRDO Bangalore
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Training Report

On

Study on path planning of UAV using Differential


Algebraic System based Inverse Simulation

UNIVERSITY COLLEGE OF ENGINEERING


RAJASTHAN TECHNICAL UNIVERSITY
KOTA

Under guidance of Submitted by


Mr. Tarun Uppal Arzoo Banu
Sc E, ADE, DRDO 14/597
Banglore
Contents
List of Figures.............................................................................................................................................. 3
ACKNOWLEDGEMENT ............................................................................................................................ 4
SYMBOLS AND ACRONYM..................................................................................................................... 5
ABSTRACT.................................................................................................................................................. 7
Chapter 1 ....................................................................................................................................................... 8
INTRODUCTION ........................................................................................................................................ 8
1.1 Background ................................................................................................................................... 8
1.2 Need of Inverse simulation ........................................................................................................... 8
1.3 Limitations of Inverse Simulation................................................................................................. 9
1.4 Objective ....................................................................................................................................... 9
Chapter 2 ..................................................................................................................................................... 10
LITERATURE REVIEW ........................................................................................................................... 10
2.1 Differential inverse method .............................................................................................................. 10
2.2 Optimization method ........................................................................................................................ 10
2.3 Integration method ............................................................................................................................ 10
3.1 What are DAEs? ............................................................................................................................... 12
3.2 Application of DAEs......................................................................................................................... 13
3.3 Index concept of DAE ...................................................................................................................... 13
3.4 Types of DAEs.................................................................................................................................. 13
3.5 Methods to solve DAEs .................................................................................................................... 13
Chapter 4 ..................................................................................................................................................... 14
APPROACH ............................................................................................................................................... 14
Chapter 5 ..................................................................................................................................................... 15
CASE STUDY: AN UNMANNED AERIAL VEHICLE (UAV) .............................................................. 15
5.1 Mathematical model.......................................................................................................................... 15
5.2 Constraint modelling ......................................................................................................................... 18
SOLVER DETAILS ................................................................................................................................... 21
6.1 Alpha method .................................................................................................................................... 21
6.2 fmincon ............................................................................................................................................. 22
Chapter 7 ..................................................................................................................................................... 24
RESULTS AND DISCUSSION ................................................................................................................. 24

Page 1 of 29
7.1 Results ................................................................................................................................................... 24
REFERENCES ........................................................................................................................................... 29

Page 2 of 29
List of Figures
Figure 1 UAV model .................................................................................................................... 15
Figure 2 Circular maneuver .......................................................................................................... 19
Figure 3 Flow chart of solver working ......................................................................................... 23
Figure 4 Prescribed maneuver ...................................................................................................... 25
Figure 5 Controls to perform prescribed maneuver ...................................................................... 25
Figure 6 Solver exit flag ............................................................................................................... 26
Figure 7 parameters during the prescribed maneuver ................................................................... 26
Figure 8 Coordinates of UAV during maneuver........................................................................... 27

Page 3 of 29
ACKNOWLEDGEMENT
I am thankful to Mr. Anshul Khandelwal, Assistant Professor, Aeronautical Engineering, RTU
and Mr. Sushil Mohan Ratnakar, Scientist D of ADE for getting necessary approvals for me for
doing internship in a premier organization like ADE. I express my gratitude to Mr. D.
Bhattacharya, Scientist F, Head Flight Mechanics and Control Law Division of ADE for
allowing me to undertake internship in his department. I thank my guide Mr. Tarun Uppal,
Scientist E for introducing and helping with my project. I shall cherish this internship period at
ADE in for times to come.

Arzoo Banu

Aeronautical Engineering

Bachelor of technology

Page 4 of 29
SYMBOLS AND ACRONYM
b Wing span
𝑐̅ Mean aerodynamic chord
𝐶𝐷 Drag coefficient
𝐶𝐷0 Zero lift drag coefficient
𝐶𝑙 Rolling moment coefficient
𝐶𝐿 Lift coefficient
𝐶𝑂 Lift coefficient at zero angle of attack
𝐶𝑚 Pitching moment coefficient
𝐶𝑛 Yawing moment coefficient
𝐶𝑥 Axial force coefficient
𝐶𝑦 Lateral force coefficient
𝐶𝑧 Normal force coefficient
D Drag
𝐹𝑥 Axial force
𝐹𝑦 Lateral force
𝐹𝑧 Normal force
𝐹𝐴𝑥 Axial aerodynamic force
𝐹𝐴𝑦 Lateral aerodynamic force
𝐹𝐴𝑧 Normal aerodynamic force
𝐹𝐺𝑥 Axial gravitational force
𝐹𝐺𝑦 Lateral gravitational force
𝐹𝐺𝑧 Normal gravitational force
g Acceleration due to gravity
ℎ𝑛 Time step
𝐼𝑥𝑥 Moment of inertia about x axis
𝐼𝑦𝑦 Moment of inertia about y axis
𝐼𝑧𝑧 Moment of inertia about z axis
L Lift
𝐿̅ Rolling moment
m Mass
M Pitching moment
N Yawing moment
p Roll rate
q Pitch rate
𝑞̅ Dynamic pressure
r Yaw rate
R Radius of turn

Page 5 of 29
S Wing reference area
u Axial velocity
U Control vector
v Lateral velocity
V Total velocity
w Normal velocity
W Weight
X State vector
𝑥𝑒 x component of an Earth- fixed frame of reference
𝑥𝑅 Aircraft CG displacement
𝑦𝑒 y component of an Earth- fixed frame of reference
𝑧𝑒 z component of an Earth- fixed frame of reference
α Angle of attack
β Sideslip angle
δa Aileron deflection
δe Elevator deflection
δr Rudder deflection
δT Throttle
θ Pitch angle
ϕ Bank or roll angle
ψ Yaw angle

Page 6 of 29
ABSTRACT
Inverse simulation allows system inputs to be found to give model outputs that match required
time histories. It is different from conventional simulation which provides model output for
given set of inputs and initial condition. Examples of inverse simulation include inputs needed
for specific aircraft maneuvers or movement of robot arm to match a given acceleration profile.
Inverse simulation has been used for aircraft and helicopter flight mechanics modeling for
specific time period. Inverse simulation can also be used for model validation where
experimental data obtained from tests on a system are applied to model. Comparisons between
the model and system behaviour can be made in terms of the differences between measured
inputs from the experiments and inputs predicted from inverse simulation.

This report describes a general mathematical model and approach to inverse simulation using
numerical algorithm solver based on the nonlinear coupled equations of motion of UAV
(Unmanned Aerial Vehicle) in form of differential algebraic equation/differential algebraic
inequalities (DAEs/DAIs). In this report general concepts of inverse simulation are also
introduced. The method is described to address the inverse simulation problem where a target
maneuver is prescribed and the corresponding time dependent patterns of control and state
variables are solved to meet the maneuver. The method will also be applicable to systems other
than the UAV provided the equations of motion are of similar form.

Keywords: Inverse simulation, differential algebraic equations, UAV, control variables.

Page 7 of 29
Chapter 1
INTRODUCTION

1.1 Background
Modelling is physical, mathematical or logical representation of a system, entity, phenomenon or
process whereas method for implementing a model over time to develop data as a basis for
managerial or technical decision making is known as simulation. Modelling and simulation can
facilitate understanding a system’s behaviour without actually testing the system in real world

Conventional simulation using computers is an established part of the process of modelling of


system through mathematical models. The process is used to attempt to find solutions that
predict the behaviour of the system (usually as function of time) from a given initial conditions.
The conventional approach adopted in flight simulation is to calculate the response of a modelled
vehicle i.e. motions of vehicle to prescribed control inputs. This is achieved by integrating the
differential equation of motion, allowing the vehicle’s trajectory to be computed in response to a
defined pilot control sequence.

This process of forward modelling and simulation is not, however the only approach possible for
gaining an understanding of the behaviour of complex engineering system. Alternating approach
known as inverse simulation involves calculating the control inputs required for a modelled
vehicle to fly a prescribed trajectory or maneuver. Inverse simulation is particularly useful in
studies of flight involving precision maneuvering.

Inverse simulation is a technique whereby the control actions required for a modelled vehicle to
fly a specified maneuver can be established. The need to predict the control movements and the
vehicle response for a specified task has led to the development of various methods for inverse
simulation. Benefits of inverse simulation are, in principle, applicable to a wide range of
controlled dynamic systems.

1.2 Need of Inverse simulation


The technique of inverse simulation is finding applications in many and varied fields. As the
name implies, this technique is used to calculate the control action required to achieve a specified
system response. The field of aircraft flight dynamics is particularly suited to this form of
simulation as the question of what control actions must the pilot (or automatic flight control
system) take for the aircraft to fly along a particular trajectory (a landing approach, for example)
is often asked.

Page 8 of 29
Study of helicopter, for either the handling qualities or the prediction of helicopter blade loads,
requires the knowledge of control inputs necessary to fly/simulate the desired flight. A helicopter
can operate close to the ground tracking a precise flight path, which is impossible to replicate
efficiency in an offline simulation since the required input are not known prior. Whenever we
need precise form of output from a system we can use inverse simulation like in case of UAV
(unmanned aerial vehicle).

Inverse simulation is also used for validating plant model and generating model based on output.
Two models and system are also can be compared using inverse simulation.

1.3 Limitations of Inverse Simulation


Inverse simulation technique also suffers from some problems. Numerical issues such as non-
convergence, rounding error and phenomenon involving sustained high frequency oscillations
and chatter have been found. Because of that sometimes results are unrealistic. It is not possible
to generate inverse model in case of singularities.

1.4 Objective
Objective of this work is to generate a method to simulate the aircraft to give necessary controls
that are aileron, rudder, and elevator deflection and throttle for prescribed trajectory of
maneuver. This is done by solving DAEs with suitable method using inverse simulation
approach.

Page 9 of 29
Chapter 2

LITERATURE REVIEW

The conventional modeling and simulation approach to UAV flight simulation is to develop a
mathematical model of the subject vehicle and then compute its response (output) to a set of
commands (input) whereas in inverse modeling and simulation, “inputs” are found that will
produce a prescribed model “output”.

Several methods have been studied in an attempt to produce inverse model. Methods are
described in [2], [7]. The most relevant methods are discussed in the following sections.

2.1 Differential inverse method


Differential inverse method requires modelling the desired plant trajectory as a set of dynamic
constraints imposed on the equation of motion. This trajectory can be defined analytically, as a
series of specific points which are then smoothed to provide a continuous trajectory. The
constrained equations of motion are then integrated until the control terms arise which can be
solved directly.

2.2 Optimization method


Optimization method formulates the solution by setting equality constraints on functions of the
state variables. However, the solution is not formed by differentiating the equation but as a
general optimization problem. The necessary and sufficient conditions for optimality are then
formed as well as the input solution to optimally derive the system to the desired trajectory.

2.3 Integration method


The entire trajectory for the maneuver is divided into small steps. Then at each instant of time, an
estimate of the change in the amplitude of control deflection required to move the aircraft in the
next point is carried out.

2.4 Method Selected


In this work, integration method is selected for inverse simulation approach. Mathematical model
of UAV is needed for inverse simulation approach. Dynamics of flight and complete
mathematical model of UAV is needed for inverse simulation approach. Dynamics of model is
described by [4], [5]. Rigid body model is same for airplane, UAV, and helicopters. Dynamics of
model is mainly equation of force, moment and navigation which are detailed in later section of
report. Constraints of path are imposed on dynamics to perform particular maneuver.

Model is presented in form of differential algebraic equations (DAEs) or differential algebraic


inequalities (DAIs). These DAEs/DAIs are used to define dynamics of model and constraints.
Theory of DAEs and methods of solving DAEs are described by [1], [3]. Solving these DAE

Page 10 of 29
using some suitable method will result in particular maneuver. Controls at each time step to
perform that maneuver can also be found.

Page 11 of 29
Chapter 3
DIFFERENTIAL ALGEBRAIC EQUATIONS THEORY
In this chapter, we introduce the differential algebraic equations which are abbreviated as DAEs.
DAEs arise in a variety of application such as modeling constrained multibody system, electrical
networks, aerospace engineering, chemical process, computational fluid dynamics, gas transport
networks etc. therefore their analysis and numerical treatment plays an important role in modern
mathematics.

3.1 What are DAEs?


An explicit ordinary differential equation (ODE)

𝑥̇ = 𝑓(𝑡, 𝑥) (3.1.1)
In general the first order ODE system can be written in implicit form:

𝐹(𝑡, 𝑥, 𝑥̇ ) = 0 (3.1.2)
𝜕𝐹
If the Jacobian matrix is nonsingular then it is possible to solve above equation for 𝑥̇ in order
𝜕𝑥̇
to obtain an ODE (3.1.1). ODE can be solved using Runge-Kutta method, Euler method etc.
𝜕𝐹
However, if is singular, this is no longer possible and the solution x has to satisfy certain
𝜕𝑥̇
𝜕𝐹
algebraic equations constraints. Hence if is singular, Eq. (3.1.2) is referred to as differential
𝜕𝑥̇
algebraic equation (DAE).

For example: the system

𝑥1 = 𝑥1̇ + 1 = 0 (3.1.3)

𝑥1̇ 𝑥2 + 2 = 0 (3.1.4)

is a DAE system. Solving for 𝑥1̇ form the equation (3.1.3) and putting it in equation (3.1.4) we
get

𝑥1̇ = 𝑥1 + 1 (3.1.5)
(𝑥1 + 1)𝑥2 + 2 = 0 (3.1.6)

Equation (3.1.5) is a differential equation and equation (3.1.6) is an algebraic equation. There are
several engineering applications that have such model equation.

Page 12 of 29
3.2 Application of DAEs
There are several engineering applications including flight model that lead DAE model
equations. Examples: process engineering, mechanical engineering and mechatronics, electrical
engineering, water distribution network systems, thermodynamic system etc.

DAEs arise from practical applications as differential equations describing the dynamics of the
process with algebraic equations describing laws of conservation of energy, mass, charge,
current, etc. or mass, molar, entropy balance equation, etc. or desired constraints on the dynamics
of the process.

3.3 Index concept of DAE


The minimum number of differentiation steps required to transform a DAE into an ODE is
known as the index of the DAE. Index is a measure of the difficulties arising in the theoretical
and treatment of a given DAE. Index greater than 2 is known as high index.

3.4 Types of DAEs


DAEs can be classified as follows:
 Nonlinear DAEs: In the DAE 𝑭(𝒕, 𝒙, 𝒙̇ ) = 𝟎 if the function F is nonlinear w.r.t. anyone
of t, x, or 𝒙̇ , then it is said to be a nonlinear DAE.
 Linear DAEs: A DAE of the form 𝑨(𝒕)𝒙(𝒕) ̇ + 𝑩(𝒕)𝒙(𝒕) = 𝒄(𝒕), where A(t) and B(t) are
n×n matrices, is linear. If A(t)≡A and B(t)≡B, then we have time-invariant linear DAE.
 Semi-explicit DAEs: A DAE given in the form

𝑥̇ = 𝑓(𝑡, 𝑥, 𝑧) (dynamic equation) (3.4.3.1)


0 = 𝑔(𝑡, 𝑥, 𝑧) (constraint or algebraic equation) (3.4.3.2)

3.5 Methods to solve DAEs


DAEs can be solved either directly or by converting into ODEs then ODEs are solved using
numerical methods like Euler method, trapezoidal method etc.

But DAEs should be solved directly because it is difficult to convert them to ODE when index is
higher. Many other problems arise like by converting it to ODE may produce less meaningful
variables. In case of computer-generated or non-linear models it may be time consuming or
impossible to obtain explicit model and if original DAE can be solved directly, it becomes easier
to explore the effect of modelling changes and parameter variation so DAEs should be solved
directly.

There are several methods to solve DAEs directly which are: BDF method, Collocation method,
Alpha method etc. In this work only Alpha method was used for solving DAEs.

Page 13 of 29
Chapter 4

APPROACH
A system’s response to a particular sequence of control inputs can be expressed as the initial
value problem:

𝑋̇ = 𝑓(𝑋, 𝑈); 𝑋(0) = 𝑋0


(4.1)
𝑌 = 𝑔(𝑋) (4.2)

Where X is the (n×1) state vector of the system, U is the (m×1) control vector; f and g are vector-
valued non-linear (in general) functions of the individual states and control, and Y is the output
vector. The state is an indication of the stored energy of a system (i.e., potential and kinetic
energy of the aircraft) and its distribution. The output variables, Y will usually correspond to
physical quantities for which measurement sensors have been supplied. Equation (4.1) is a
statement of the mathematical model describing the time-evolution of the state vector in response
to an imposed time history for the control vector U. the output equation (4.2) is a statement of
how the observed output vector Y is obtained from the state vector. Inverse simulation is so
called because a pre-determined output vector Y is used to calculate the control time histories U
required to produce Y. For UAV flight the usual output is the flight path and the controls are the
control surface (aileron, rudder, elevator, and throttle) movement so that for the inverse problem
the flight path becomes the input and the output to be generated is the control deflection.

After differentiation, equation (4.2)


𝑑𝑔 𝑑𝑔
𝑌̇ = 𝑑𝑥 𝑋̇ = 𝑑𝑥 𝑓(𝑋, 𝑈) (4.3)

If equation (4.3) is invertible w.r.t. U, it can be written

𝑈 = ℎ(𝑋, 𝑌̇) (4.4)

Substituting equation (4.4) in equation (4.1), gives:

𝑋̇ = 𝑓 (𝑋, ℎ(𝑋, 𝑌̇)) = 𝐹(𝑋, 𝑌̇) (4.5)

Now equation (4.4) and (4.5) are complete statement of the inverse problem where, 𝑌̇ is the input
vector and U is the output vector.

Case study of UAV model is described in this report in which equation (4.5) is given by
mathematical model of UAV which is equation of motion of aircraft.

Page 14 of 29
Chapter 5
CASE STUDY: AN UNMANNED AERIAL VEHICLE (UAV)
An UAV is an aircraft that carries no human pilot or passengers. They can be fully or partially
autonomous but are more often controlled remotely by a human pilot.

During my training period inverse simulation method was applied to a specific UAV for which
flight data was given.

5.1 Mathematical model


Model of an UAV is defined in terms of kinematic and dynamic equations. The rigid body
equations of motion are obtained from Newton’s second law. UAV model equations are same as
other fixed wing aircraft model equations. Complete model equations are given in [4] and [5].

Figure 1: UAV model [4]

The forces acting on an aircraft in flight consist of aerodynamic, thrust, and gravitational forces.
These forces can be resolved along an axis system fixed to the aircraft’s centre of gravity. The
forces components are denoted 𝐹𝐴𝑥 ,𝐹𝐴𝑦 and 𝐹𝐴𝑧 ; 𝐹𝐺𝑥 , 𝐹𝐺𝑦 , and 𝐹𝐺𝑧 ; 𝑇𝑥 , 𝑇𝑦 and 𝑇𝑧 for the
aerodynamic, gravitational, thrust forces component along x, y and z axes, respectively. The x
and z axes are in plane of symmetry with the x axis pointing along fuselage and the positive y
axis along the right wing. Assume angle of thrust force is zero. Total force along x, y and z axes
can be written as:

𝐹𝑥 = 𝐹𝐴𝑥 + 𝐹𝐺𝑥 + 𝑇𝑥

𝐹𝑦 = 𝐹𝐴𝑦 + 𝐹𝐺𝑦

Page 15 of 29
𝐹𝑧 = 𝐹𝐴𝑧 + 𝐹𝐺𝑧

The aerodynamic forces are defined in terms of dimensionless coefficients, the flight dynamic
pressure𝑞̅ and wing platform area S:

𝐹𝐴𝑥 = 𝐶𝑥 𝑞̅ 𝑆

𝐹𝐴𝑦 = 𝐶𝑦 𝑞̅ 𝑆

𝐹𝐴𝑧 = 𝐶𝑧 𝑞̅ 𝑆

In a similar manner, the components of aerodynamic moments are also expressed in terms of
dimensionless coefficients, flight dynamic pressure, wing platform area S, wing span b and mean
chord 𝑐̅ as follows:

𝐿̅ = 𝐶𝑙 𝑞̅ 𝑆𝑏 (rolling moment)

𝑀 = 𝐶𝑚 𝑞̅ 𝑆𝑐̅ (pitching moment)

𝑁 = 𝐶𝑛 𝑞̅ 𝑆𝑏 (yawing moment)

The aerodynamic forces and moment components contain dependence o the control surface
deflection, these are control inputs to the model and in case of inverse simulation these
deflections are output. Throttle setting, elevator deflection δe, aileron deflection δa, and rudder
deflection δr are control for aircraft. How dimensionless coefficient depends upon control
deflections is described in [5] as follows:

Page 16 of 29
The angle of attack α and sideslip angle β can be defined in terms of velocity component u, v,
and w along x, y and z direction respectively as follows:
𝑤
𝛼 = tan−1
𝑢
𝑢
𝛽 = sin−1
𝑉
1⁄
𝑉 = (𝑢2 + 𝑣 2 + 𝑤 2 ) 2

Velocities and angular rates can be defined in terms of forces as follows.

𝐹𝑥
𝑢̇ = 𝑟𝑣 − 𝑞𝑤 +
𝑚
𝐹𝑦
𝑣̇ = −𝑟𝑢 + 𝑝𝑤 +
𝑚
𝐹𝑧
𝑤̇ = 𝑞𝑢 − 𝑝𝑣 +
𝑚
𝐿̅ (𝐼𝑦𝑦 − 𝐼𝑧𝑧 )𝑞𝑟
𝑝̇ = +
𝐼𝑥𝑥 𝐼𝑥𝑥
𝑀 (𝐼𝑧𝑧 − 𝐼𝑥𝑥 )𝑟𝑝
𝑞̇ = +
𝐼𝑦𝑦 𝐼𝑦𝑦

𝑁 (𝐼𝑥𝑥 − 𝐼𝑦𝑦 )𝑝𝑞


𝑟̇ = +
𝐼𝑧𝑧 𝐼𝑧𝑧

Above equations are states of an aircraft i.e. 𝑋̇

Euler or attitude angles 𝜙(roll angle), 𝜃(pitch angle), 𝜓(yaw angle) can be represented as four
parameters 𝜏0 ,𝜏1 ,𝜏2 , 𝜏3 known as quaternion parameters for ease of implementation. Quaternion
parameters are related to the Euler angles by

𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
𝜏0 = ±(cos cos cos + sin sin sin )
2 2 2 2 2 2
𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
𝜏1 = ±(sin cos cos − cos sin sin )
2 2 2 2 2 2

Page 17 of 29
𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
𝜏2 = ±(cos sin cos − cos sin sin )
2 2 2 2 2 2
𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
𝜏3 = ±(cos cos sin − sin sin cos )
2 2 2 2 2 2

Kinematic equations can be written in terms of Quaternion parameters as follow:

1
𝜏0̇ = − (𝑝𝜏1 + 𝑞𝜏2 + 𝑟𝜏3 )
2
1
𝜏1̇ = − (−𝑝𝜏0 − 𝑟𝜏2 + 𝑞𝜏3 )
2
1
𝜏2̇ = − (−𝑞𝜏0 + 𝑟𝜏1 − 𝑝𝜏3 )
2
1
𝜏3̇ = − (−𝑟𝜏0 − 𝑞𝜏1 + 𝑝𝜏2 )
2

Navigation equations in terms of quaternion:

𝑥𝑒̇ = 𝑢(2(𝜏0 2 + 𝜏1 2 − 1)) + 2𝑣(𝜏1 𝜏2 − 𝜏0 𝜏3 ) + 2𝑤(𝜏1 𝜏3 + 𝜏0 𝜏2 )

𝑦𝑒̇ = 𝑣(2(𝜏0 2 + 𝜏2 2 − 1)) + 2𝑢(𝜏1 𝜏2 − 𝜏0 𝜏3 ) + 2𝑤(𝜏2 𝜏3 + 𝜏0 𝜏1 )

𝑧𝑒̇ = 𝑤(2(𝜏0 2 + 𝜏3 2 − 1)) + 2𝑣(𝜏2 𝜏3 − 𝜏0 𝜏1 ) + 2𝑢(𝜏1 𝜏3 + 𝜏0 𝜏2 )

Above differential algebraic equations of stats are solved to get controls at each time step for
performing particular maneuver.

5.2 Constraint modelling


Constraint modelling is used in simulation to define trajectory of an UAV. Constraints are
enforced on model dynamics to perform particular maneuver. Constraint modelling gives results
for model such that it can fulfil both conditions of constraint and dynamics.

Path constraint for flight can be equation of trajectory that UAV has to follow during
maneuvering. For performing precise maneuvering, in addition to trajectory equation other
constraints are also given on control surface deflections, vehicle speed, vehicle coordinates,
angle of attack, sideslip, bank angle etc. according to model and prescribed path. All constraints
combining with model dynamics give results for particular maneuver. Solution of simulation
won’t converge if results get far outside of boundaries of constraints.

Page 18 of 29
In path modelling, equation of desired trajectory for particular maneuver is fed into flight
dynamics model as constraint. This equation of trajectory is polynomial function in terms of
specific motion relative to an Earth-fixed reference. Any curve can be given as equation of
trajectory and solver will find feasible solution of path.

Many a times UAV need to carry out circular maneuver so an example of circular path
constraints is given. Consider the circular path of radius R. Let the maneuver takes place in the
horizontal plane (constant altitude) and assume the coordinated flight (zero sideslip angle). The
maneuver is considered to take place in (𝑥𝑒 , 𝑦𝑒 ) plane.

Figure 2: Circular maneuver [6]

Following constraints are given for circular path:

Constraint on trajectory will be equation of circle with x0, y0 as coordinates of centre and radius
R

(𝑥𝑒 − 𝑥0 )2 + (𝑦𝑒 − 𝑦𝑜 )2 = 𝑅 2

Page 19 of 29
Constraints on dynamics:

𝐿 cos 𝜙 = 𝑊

𝑊𝑉 2
𝐿 sin 𝜙 =
𝑔𝑅

𝛽=0

Dynamics of various maneuvers are given in reference [6].

Enforcing these constraints in addition to control deflection and other required constraints will
result in circular path and inverse simulation will give required controls of that circular path.

Page 20 of 29
Chapter 6

SOLVER DETAILS
DAIs (differential algebraic inequalities) of UAV which are dynamic model of UAV with
constraints are solved using some suitable method to find constrained path then that path is
inverse simulation to give control movements to follow that path. Here, Alpha method is used to
solve DAIs.

The initial value differential-algebraic inequality (DAI) problems generally stated as

𝑥̇ = 𝑓(𝑥, 𝑢, 𝑡) (dynamics)

0 ≥ 𝛷(𝑥, 𝑢, 𝑡) (inequality path constraints)

And/or

̅ (𝑥, 𝑢, 𝑡)
0=𝛷 (equality path constraints)

Subject to
𝑥
𝑏𝑢𝑝𝑝𝑒𝑟 ≥ ( ) ≥ 𝑏𝑙𝑜𝑤𝑒𝑟 (bounds)
𝑢
𝑥(𝑡0 ) = 𝑥0 (consistent initial condition)

6.1 Alpha method


The alpha method is an algorithm for direct numerical integration of the initial value
Differential- Algebraic Inequalities (DAIs) in a time stepping fashion using sequential quadratic
programming (SQP) method solver for detecting and satisfying active path constraints at each
time step. The algorithm can be used as an estimation tool for trajectory and control planning. It
can also be used to generate initial guess values of optimization variables used as input to
inequality path constrained dynamic optimization problems.

Using the alpha method the following procedure for solving the DAE/DAIs can be proposed.
Given a feasible solution𝑥𝑛 , 𝑢𝑛 and an algorithmic variable 𝑎𝑛 at nth mesh point, the DAI solver
finds ate the nth step a feasible solution𝑥𝑛+1,𝑢𝑛+1, and 𝑎𝑛+1 using SQP such that

𝛽 𝛽 1 𝛽
𝑥𝑛+1 = 𝑥𝑛 + (1 − ) ℎ𝑛 𝑓(𝑥𝑛 , 𝑢𝑛 , 𝑡𝑛 ) + ℎ𝑛 𝑓(𝑥𝑛+1 , 𝑢𝑛+1 , 𝑡𝑛+1 ) + ( − )ℎ𝑛 2 𝑎𝑛
𝛾 𝛾 2 𝛾

1 1
𝑎𝑛+1 = (𝑓(𝑥𝑛+1 , 𝑢𝑛+1 , 𝑡𝑛+1 ) − 𝑓(𝑥𝑛 , 𝑢𝑛 , 𝑡𝑛 )) + (1 − )𝑎𝑛
ℎ𝑛 𝛾 𝛾

0 ≥ 𝜙(𝑥𝑛+1 , 𝑢𝑛+1 , 𝑡𝑛+1 )

Page 21 of 29
𝑥𝑛+1
𝑏𝑢𝑝𝑝𝑒𝑟𝑛+1 ≥ (𝑢 ) ≥ 𝑏𝑙𝑜𝑤𝑒𝑟𝑛+1
𝑛+1

Where

2 1
𝛾= −
𝜌+1 2

1
𝛽=
(𝜌 + 1)2

And 𝜌 ∈ [0,1) is a user selectable regularization parameter and ℎ𝑛 = 𝑡𝑛+! − 𝑡𝑛 is the time step
size on the normalized interval [0, 1]. A numerically computed solution 𝑥𝑛 and 𝑡𝑛 approximate
an analytical feasible solution 𝑥(𝑡𝑛 ) and 𝑢( 𝑡𝑛 ) which is assumed to exist. It must be remarked
that DAI step above mentioned does not generally have a unique numerical solution and the
solutions vary with ρ and the size of uniform time stepℎ𝑛 . The initial condition 𝑎(𝑡0 ) is
𝑑𝑓
evaluated as 𝑓̇ = at 𝑡 = 0 with 𝑥(𝑡0 ) = 𝑥0 and 𝑢(𝑡0 ) = 𝑢0 . Thus, we use 𝑎0 = 𝑎(𝑡0 ) = 𝑓0̇ .
𝑑𝑡

6.2 fmincon
Inverse simulation of model is done using fmincon solver in Matlab. fmincon solve DAEs by
Alpha method when constrained of alpha methods are given to fmincon. fmincon finds
constrained minimum of a function of several variables, known as cost function. fmincon
attempts to find local minima of function F(X) subjected to linear constraints, non linear
constraints and bound at each time step. It implements four different algorithms: interior point,
SQP, active set, and trust region reflective. Here it is solved using SQP algorithm. If w use some
method (like Euler, Trapezoid, Alpha method, etc.) to solve DAEs as constraints with no
objective function F(x) than fmincon will just solve DAI like fsolve solver. fmincon finds the
minimum of a problem specified by

𝑐(𝑥) ≤ 0 (nonlinear inequality constrain)


𝑐𝑒𝑞(𝑥) = 0 (nonlinear equality constraint)
min 𝑓(𝑥) 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝐴. 𝑥 ≤ (linear equality constraint)
𝑥
𝐴𝑒𝑞. 𝑥 = 𝑏𝑒𝑞 (linear equality constraint)
{ 𝑙𝑏 ≤ 𝑥 ≤ 𝑢𝑏 (bounds)

Where b and beq are vectors, A and Aeq are matrices, c(x) and ceq(x) are functions that return
vectors, and f(x) is a function that returns a scalar. F(x), c(x), and ceq(x) can be nonlinear
functions. x, lb, and ub can be passed as vectors or matrices. Syntax for fmincon:

[𝑥, 𝑓𝑣𝑎𝑙, 𝑒𝑓] = 𝑓𝑚𝑖𝑛𝑐𝑜𝑛(𝑓𝑢𝑛, 𝑥0, 𝐴, 𝑏, 𝐴𝑒𝑞, 𝑏𝑒𝑞, 𝑙𝑏, 𝑢𝑏, 𝑐, 𝑐𝑒𝑞)

Page 22 of 29
returns the value 𝑓𝑣𝑎𝑙 of the objective function 𝑓𝑢𝑛 at the solution x and exit flag ef that
describes the exit condition (feasibility of solution). X0 is initial value of x at 𝑡 = 𝑡0 .

fmincon solves as shown in flow chart:

Figure 3: Flow chart of solver working

For the current application, the state vector is

𝑋 = [𝑢, 𝑣, 𝑤, 𝑝, 𝑞, 𝑟, 𝜏0 , 𝜏1 , 𝜏2 , 𝜏3 , 𝑥𝑒 , 𝑦𝑒 , 𝑧𝑒 ]

And the control vector is

𝑈 = [𝛿𝑒, 𝛿𝑎, 𝛿𝑟, 𝛿𝑇]

To solve these seventeen quantities there are thirteen state DAEs, and constraint equations.
Initial guess x0 of state and control vector is made. These equations are then integrated by alpha
method using fmincon solver described above and solved to obtain values for the next value of
control deflection in a time marching manner to perform particular maneuver. Failure of solver
to obtain a solution indicates that the path is not feasible under given conditions.

Page 23 of 29
Chapter 7
RESULTS AND DISCUSSION
7.1 Results
Mathematical model described in section 5.1 can be implemented such that any UAV having
specific configurational data can be simulated to give control deflection. Here, numerical
simulation of modelled UAV is performed using fmincon tool in MATLAB. This is
demonstrated by the example of a UAV flying a random maneuver as given equation:

𝑦𝑒 = 3 × 10−8 𝑥𝑒 −4 + 2.8 × 10−5 𝑥𝑒 3 − 0.0063𝑥𝑒 2 − 𝑥𝑒

Complete model with constraints is treated as DAIs so it can be solved using alpha method. The
prescribed equation of trajectory is fed into fmincon with alpha method also as constraints on
dynamics of UAV. UAV follow that path and fmincon gives control at each time step to perform
that trajectory. The maneuver is started with velocity 52m/s. Throttle can be calculated by
interpolation of velocity-throttle data given for particular aircraft.

Results are shown in figures below for 50 seconds. In figure 4, path followed by UAV is shown
which is same as prescribed path. Figure 4 is front view of maneuver performed by UAV.
Required controls to perform prescribed trajectory given by solver are shown in figure 5. Figure
5 shows control deflections needed to generate our prescribed trajectory at each time step, if an
UAV moves its control surfaces as shown in results the resultant maneuver will be the prescribed
trajectory. Exit flags are shown in figure 6 to show that solution converged at each time step
during prescribed path following. If exit flag of solver is 1 then solution is converged.
Sometimes solver returns vale of exit flag except one, in that case suitable changes should be
made in constraints or parameters for solution to be converged. Other parameters like velocity,
body rates, angle of attack, and sideslip angle during maneuver are shown in figure 7. These are
various parameters during maneuver at each time step. Controls during maneuver at each time
step to follow the path are solved and are shown in figure 5. Coordinates of UAV during
maneuver is shown in figure 8.

Page 24 of 29
Figure 4: Prescribed maneuver

Figure 4: Controls to perform prescribed maneuver

Page 25 of 29
Figure 5: Solver exit flag

Figure 6: parameters during the prescribed maneuver

Page 26 of 29
Figure 7: Coordinates of UAV during maneuver

Page 27 of 29
Chapter 8
Conclusion and Future scope
The implementation of integration based inverse simulation algorithm is discussed in this report.
The result for various maneuver were generated for UAV model of which only for one maneuver
is presented in previous chapter whose solution was converged. Main conclusion of this work is
that the inverse simulation can be applied to the UAV model in order to generate input necessary
to follow a predefined path. The inverse simulation approach can be applied to any system whose
model equations are known. It can be stated that inverse simulation method can provide insight
for engineering investigation that is different from the understanding that comes from
conventional modelling and simulation studies.

Inverse simulation can be useful for running unpiloted simulations, studying the required
controls strategies and evaluating feasibility of the modelled aircraft maneuvers. The inverse
control can be enhanced in future by

 Reducing execution speed taken by solver


 Including wind gust effect in the model
 Adding appropriate feedback control

Inverse simulation is proved to be very useful mainly in case of helicopters for precise
maneuverings but due to shortage of time in this training period it could not be studied.

Page 28 of 29
REFERENCES
1. K.E. Brenan, S.L. Campbell and L.R.Petzold, “Numerical Solution of Initial Value
Problems in Differential Algebraic Equations”, SIAM, pp. 1-36, 1996
2. Thomson, D.G. and Bradley, “The Principles and Practical Application of Helicopter
Inverse Simulation”, Simulation Theory and Practice, 6(1).pp. 47-70, ISSN 0928-4869,
1998
3. Joey Peter, Nigam Chandra, and Soymendu Raha, “The Alpha Method for solving
Differential Algebraic Inequality Systems”, International Journal of Numerical Modelling
and Analysis, Volume 7, Number 2,pp. 240-260, 2010
4. Robert C. Nelson, “Flight Stability and Automatic Control”, McGraw-Hill, pp. 83-103,
1988
5. Brian L. Stevens and Frank L. Lewis, “Aircraft Control and Simulation”, John Wiley&
sons, inc. pp. 1-89, 1992
6. Dr. Jan Roskam and Dr. Chuan-Tau Edward Lan, “Airplane Aerodynamics and
Performance”, DARcorporation, pp.606, 1997.
7. Wojciech Blajer, Jack A. Goszcynski, Mariusz Kraczyk, “The Inverse Simulation of
Aircraft Flight Path”, Transport, Vol.8(3), pp.103-107, 2002

Page 29 of 29

You might also like