0% found this document useful (0 votes)
8 views30 pages

Control Final Project G-4

This document is a group project proposal from Bahir Dar University focusing on the position control of a quadcopter drone system. It includes mathematical modeling, control strategies, and MATLAB simulations to analyze and enhance the drone's altitude control and stability. The project highlights the importance of dynamic modeling and control design in achieving reliable quadcopter operation.

Uploaded by

jihorawel143
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views30 pages

Control Final Project G-4

This document is a group project proposal from Bahir Dar University focusing on the position control of a quadcopter drone system. It includes mathematical modeling, control strategies, and MATLAB simulations to analyze and enhance the drone's altitude control and stability. The project highlights the importance of dynamic modeling and control design in achieving reliable quadcopter operation.

Uploaded by

jihorawel143
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Bahir Dar University

Bahir Dar Institute of Technology


Faculty of Electrical and Computer Engineering
Introduction to Control Engineering Eeng 3182
Group project
4thYearElectricalEngineering
Title: Position control of simple quadcopter drone system
Group=4
Name. ID
[Link] Yimam.......................................................... 1507159
[Link] Fasil.......................................................1506436
[Link] Tekeste.......................................................1506645
[Link] Yesuf...............................................................1506711
[Link] Zenebe............................................................1506908
[Link] Dagnew......................................................1507015
[Link] Temesgen............................................................1506725
[Link] Awel ....................................................................1506616
[Link] Yilhal.............................................................1506691

Submitted to : MR. Gerbaw Y.

Submission date: 18/05/2018 E.C


Acknowledgment

First and foremost, we thank Almighty God for granting us the strength, wisdom, and good health
to complete this project proposal.

We sincerely appreciate our instructors for the knowledge and guidance they have provided
throughout our academic journey, which formed the foundation for the concepts applied in this
proposal.

We are grateful to our group members for their cooperation, dedication, and effective
[Link] also thank our classmates for their encouragement and helpful discussions during
the preparation of this work

i
Abstract

This project investigate the position control focus on altitude control of a quadcopter drone, with
emphasis on precise vertical positioning for stable flight and maneuvering. The dynamics of the
quadcopter are mathematically modeled, and transfer functions for both open-loop and closed-
loop systems are derived to analyze the system’s behavior. Open-loop analysis is conducted to
understand the inherent response characteristics, including stability, transient behavior, and
sensitivity to input changes. A closed-loop control strategy is then designed to enhance stability,
minimize steady-state errors, and achieve accurate altitude tracking.

MATLAB simulations are performed to validate the mathematical models and control strategies,
demonstrating effective stabilization, smooth altitude adjustment, and precise position control
under different operating conditions. The study highlights the importance of dynamic modeling,
system analysis, and control design in achieving reliable and responsive quadcopter operation,
providing a framework for further development of advanced autonomous aerial systems.

ii
Contents
Acknowledgment ............................................................................................................ i
Abstract ....................................................................................................................... ii
List of table ................................................................................................................. iv
List of figure ................................................................................................................ iv
Abbreviations ............................................................................................................... v
Chapter one.................................................................................................................. 1
Introduction .............................................................................................................. 1
1.14 Position control of quadcopter drone .............................................................. 2
1.2 The Quad-Rotor ................................................................................................... 4
1.2.1. Dynamical Model: Euler-Lagrange Approach ................................................. 5
Chapter 2 ................................................................................................................... 10
Altitude control system ............................................................................................ 10
2.1 Hover equilibrium and perturbation variables .................................................. 10
2.2 Motor and Propeller Thrust Model .................................................................. 11
2.3 Final Mathematical Model .............................................................................. 12
Chapter three ............................................................................................................. 15
Closed-Loop Altitude Control System Design ............................................................ 15
3.1 Introduction to PID Control ............................................................................ 15
3.2 Mathematical Derivation of the Closed-Loop Transfer Function ........................ 16
3.3 Mathematical Verification of Results ................................................................ 19
3.5 Comparison of the open and closed loop systems .............................................. 21
Conclusion ............................................................................................................... 23
References .................................................................................................................. 24

iii
List of table
Table 3.1 Stability Analysis via Routh-Hurwitz Array

List of figure

Fig 1. quadcopter drone…………………………………………………………………………

Figure 1.12: The quad-rotor in an inertial frame. f1, f2, f3, f4 represent the thrust of each motor, ψ,
θ and φ represent the Euler angles, and u is the main thrust…………………………………….

Fig2.1 : block diagram of full linear model………………………………………………………

Fig 2.2 open loop system response of the altitude control system……………………………….

Fig 3.1 block diagram of the closed loop system with PID controller…………………………….

Fig 3.2 the closed loop system response of the altitude control system with PID controller…….

iv
Abbreviations

Abbreviation Full Description

UAV Unmanned Aerial Vehicle

VTOL Vertical Take-Off and Landing

ESC Electronic Speed Controller

PWM Pulse Width Modulation

GPS Global Positioning System

PID Proportional-Integral-Derivative

LTI Linear Time-Invariant

LHP Left-Half Plane (Stability Region)

Z-N Ziegler-Nichols (Tuning Method)

TF Transfer Function

CLTF Closed-Loop Transfer Function

OLTF Open-Loop Transfer Function

v
Chapter one

Introduction

A drone is an unmanned aircraft. Drones are more formally known as unmanned aerial
vehicles (UAVs) or unmanned aircraft systems. Essentially, a drone is a flying robot that can be
remotely controlled or fly autonomously using software-controlled flight plans in its embedded
systems, which work in conjunction with onboard sensors and a Global Positioning System (GPS).

1.11 Types Of Drones

Drones come in various types, mainly classified by their design and how they fly. The four main
drone formats include:

• Rotary-Wing Drones(e.g quadcopter drone)

• Fixed-Wing Drones

• Hybrid Drones

• Single-Rotor Drones
1.12 Key Components of a Drone

Understanding the basic components of a drone gives insight into how these machines function:

• GPS Module
• Camera:
• Battery • Transmitter / Remote Controller
• Flight Controller • Electronic Speed Controllers (ESCs)
• Antenna & Communication Modules
1.13 Uses of Drones • Sensors

• Aerial Photography & Videography • Emergency Response


• Wildlife Monitoring
• Agriculture
• Security & Surveillance
• Logistics &Delivery

1
1.14 Position control of quadcopter drone
A quadcopter drone is a type of Unmanned Aerial Vehicle (UAV) with four rotors (hence "quad")
that provide lift and control, allowing for stable hovering, vertical take-off and landing (VTOL),
and precise maneuverability.

Fig 1. quadcopter drone

Quadcopters have important advantages such as the ability of vertical landing (VTOL), small size
and maneuverability. Also, they have important mechanical design flexibilities and they are easier
to manufacture. Therefore, it is possible to generate more productive and efficient models than the
other types of UAVs. Despite the positive aspects of quadcopters, they are highly unstable systems
and they have complex non-linear dynamics which make them difficult to analyze (Suiçmez and
Kutay,2014)

1.15 Control System Basic Terminologies for simple quadcopter drone system
1. Setpoint (Reference Input)

• Desired altitude
• Desired position
• Desired yaw heading

2. Controlled Variable (Output Variable)

• Drone position: x, y, z
• Drone attitude: ϕ, θ,ψ
3. Manipulated Variable (Control Input)

• Motor command signals (PWM to ESCs)


• Collective thrust command
• Differential thrust for roll, pitch, and yaw

4. Controller

2
• PID controllers (common)
• Attitude controller
• Position controller

5. Actuator

• Motors + propellers
These convert electrical PWM signals into thrust.

6. Plant (Process)

• The drone body


• Its dynamics (mass, inertia, aerodynamics)
• How thrust → motion
It determines how the drone responds to motor forces.

7. Disturbances

• Wind gusts
• Payload imbalance
• Battery voltage drop

3
1.2 The Quad-Rotor
The quad-rotor mini-rotorcraft is controlled by the angular speeds of four electric motors as shown
in Figure 1.1. Each motor produces a thrust and a torque, whose combination generates the main
thrust, the yaw torque, the pitch torque, and the roll torque acting on the quad-rotor. The quad-
rotor does not have a swashplate and has constant pitch blades. Therefore, in a quad-rotor we can
only vary the angular speed of each one of the four rotors to obtain the pitch and roll control torques

Figure 1.12: The quad-rotor in an inertial frame. f1, f2, f3, f4 represent the thrust of each motor, ψ,
θ and φ represent the Euler angles, and u is the main thrust.

From Figure 1.12 it can be observed that the motor Mi (for i = 1,…..,4) produces the force fi, which
is proportional to the square of the angular speed, that is fi = kw2i . Given that the quad-rotor's
motors can only turn in a fixed direction, the produced force fi is always positive. The front (M1)
and the rear (M3) motors rotate counter-clockwise, while the left (M2) and right (M4) motors rotate
clockwise. With this arrangement, gyroscopic effects and aerodynamic torques tend to cancel in
trimmed flight. The main thrust u is the sum of individual thrusts of each motor. The pitch torque
is a function of the difference f1 − f3, the roll torque is a function of f2 −f4, and the yaw torque is
the sum τM1 + τM2 + τM3 + τM4 , where τMi is the reaction torque of motor i due to shaft acceleration
and blades drag. The motor torque is opposed by an aerodynamic drag τdrag, such that

Irot ˙ω = τMi −τdrag (1.1)

where Irot is the moment of inertia of a rotor around its axis. The aerodynamic drag is defined as
1
τdrag =2ρAv2 (1.2)

4
where ρ is the air density, the frontal area of the moving shape is defined by A, and v is its velocity
relative to the air. In magnitude, the angular velocity ω is equal to the linear velocity v divided by
the radius of rotation r

𝑣
ω= (1.3)
𝑟
The aerodynamic drag can be rewritten as

τdrag = kdragω2 (1.4)

where kdrag > 0 is a constant depending on the air density, the radius, the shape of the blade and
other factors. For quasi-stationary man oeuvres, ω is constant, then

τMi = τdrag (1.5)

Forward pitch motion is obtained by increasing the speed of the rear motor M3 while reducing the
speed of the front motor M1. similarly, roll motion is obtained using the left and right motors. Yaw
motion is obtained by increasing the torque of the front and rear motors (τM1 and τM3 respectively)
while decreasing the torque of the lateral motors (τM2 and τM4 respectively). Such motions can be
accomplished while main-training the total thrust constant. The quad-rotor model is obtained by
representing the aircraft as a solid body evolving in a three-dimensional space and subject to the
main thrust and three torques: pitch, roll and yaw.

1.2.1. Dynamical Model: Euler-Lagrange Approach


Let the generalized coordinates of the rotorcraft be expressed by

q = (x,y,z,ψ,θ,φ) ∈ R6

where ξ = (x,y,z) ∈ R3 denotes the position vector of the center of mass of the quad-rotor relative
to a fixed inertial frame I. The rotorcraft's Euler angles (the orientation of the rotorcraft) are
expressed by η = (ψ,θ,φ) ∈ R3, ψ is the yaw angle around the z-axis, θ is the pitch angle around
the y-axis and φ is the roll angle around the x-axis (see [ETK 96]).An illustration of the generalized
coordinates of the rotorcraft is shown in Figure 1.1. Define the Lagrangian

L(q, ˙q) = Ttrans +Trot −U (1.7)

5
𝑚 1
where Ttrans = ξ ̇ T ξ ̇ is the translational kinetic energy, Trot = 2 ΩTIΩ is the rotational kinetic
2

energy, U = mgz is the potential energy of the rotorcraft, z is the rotorcraft altitude, m denotes the
mass of the quad-rotor, Ω is the vector of the angular velocity, I is the inertia matrix and g is the
acceleration due to gravity. The angular velocity vector ω resolved in the body fixed frame is
related to the generalized velocities ˙η (in the region where the Euler angles are valid) by means
of the standard kinematic relationship [GOL 83]

Ω = Wηη ̇ (1.8)

Where

−𝑠𝑖𝑛𝜃 0 1
Wη =[𝑐𝑜𝑠𝜃 𝑠𝑖𝑛𝜑 𝑐𝑜𝑠𝜑 0] (1.9)
𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜑 −𝑠𝑖𝑛𝜑 ⋯ 0

Then

𝜑̇ − 𝜓̇𝑠𝑖𝑛𝜃
Ω =⌈𝜃̇ 𝑐𝑜𝑠𝜑 + 𝜓̇𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜑 ⌉ (1.10)
𝜓̇𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜑 − 𝜃̇𝑠𝑖𝑛𝜑

Define
J = J(η)=WTηIWη (1.11)

where
𝐼𝑥𝑥 0 0
I=[ 0 𝐼𝑦𝑦 0 ] (1.12)
0 0 𝐼𝑧𝑧

so that
1
Trot =2 η̇ TJη̇ (1.13)

Thus, the matrix J=J(η) acts as the inertia matrix for the full rotational kinetic energy of the quad-
rotor, expressed directly in terms of the generalized coordinates η.
6
The model of the full rotor craft dynamics is obtained from Euler-Lagrange equations with
external generalized forces

𝑑 𝜕𝐿 𝜕𝐿
( )- 𝜕𝑞=[𝐹𝜉
𝜏
] (1.14)
𝑑𝑡 𝜕𝑞̇

where Fξ= R𝐹̂ ∈R3 is the translational force applied to the rotorcraft due to main thrust, τ ∈R3
represents the yaw, pitch and roll moments and R denotes the rotational matrix. R(ψ, θ, φ) ∈SO(3)
represents the orientation of the aircraft relative to a fixed inertial frame.

𝑐𝜃𝑐𝜓 𝑐𝜓𝑠𝜃𝑠𝜑 − 𝑐𝜑𝑠𝜓 𝑠𝜑𝑠𝜓 + 𝑐𝜑𝑐𝜓𝑠𝜃


R =[𝑐𝜃𝑠𝜓 𝑐𝜑𝑐𝜓 + 𝑠𝜃𝑠𝜑𝑠𝜓 𝑐𝜑𝑠𝜃𝑠𝜓 − 𝑐𝜓𝑠𝜑 ] (1.15)
−𝑠𝜃 𝑐𝜃𝑠𝜑 𝑐𝜃𝑐𝜑

Where cθ stands for cosθ and sθ for sinθ. From Figure1.1,it follows that
0
̂
𝐹 =[ 0] (1.16)
𝑢
where u is the main thrust directed out of the bottom of the aircraft and expressed as

u =∑4𝑖=1 𝑓I (1.17)

and, for i = 1,...,4, fi is the force produced by motor Mi, as shown in Figure 1.1. Typically fi =
kω2i , where ki is a constant and ωi is the angular speed of the i-th motor. The generalized torques
are thus

𝜏𝜓 ∑4𝑖=1 𝜏𝑀𝑖
T=[𝜏𝜃 ] ≜ [(𝑓2 − 𝑓4))ℓ] (1.18)
𝜏𝜑 (𝑓3 − 𝑓1))ℓ

where ℓ is the distance between the motors and the center of gravity, and τMi is the moment
produced by motor Mi, for i = 1,...,4, around the center of gravity of the aircraft.

7
Since the Lagrangian contains no cross terms in the kinematic energy combining ξ ̇ with η̇ , the
Euler-lagrangeequation can pe partitioned into dynamics for ξ coordinates and η coordinates. The
Euler-Lagrange equation for the translational motion is

𝑑 𝜕𝐿 𝑡𝑟𝑎𝑛𝑠 𝜕𝐿𝑡𝑟𝑎𝑛𝑠
[ ]- 𝜕𝜉 = Fξ (1.19)
𝑑𝑡 𝜕𝜉̇

8
where x and y are coordinates in the horizontal plane, z is the vertical position, and τ̃ψ, τ̃θ and τ̃φ
are the yawing moment, pitching moment and rolling moment, respectively, which are related to
the generalized torques τψ, τθ, τφ.

9
Chapter 2
Altitude control system

From the above full translational dynamics (Euler-Lagrange Approach of quadcopter drone)
the vertical equation in the inertial frame is:

mz̈ =ucosθcosϕ−mg (2,1)

Where

• m = vehicle mass,
• u = total thrust (control input),
• θ= pitch, ϕ= roll,
• g = gravitational acceleration,
• z = altitude (positive upward).

2.1 Hover equilibrium and perturbation variables


At hover (steady equilibrium) the vehicle is level and thrust balances weight:
θ0=0, ϕ0=0, u0=mg, z̈ 0=0. (2.2)

Define small deviations (perturbations) about this equilibrium:


Δu(t)=u(t)−u0, Δθ(t)=θ(t)−0, Δϕ(t)=ϕ(t)−0, Δz(t)=z(t)−z0 (2.3)

2.12 Linearization and mathematical model of the altitude system


Using small-angle approximations cosθ≈1, cosϕ≈1 and substituting u=u0+Δu:
mz̈ =(u0+Δu)cosθcosϕ−mg. (2.4)

At hover u0=mg, the steady terms cancel, and to first order (neglecting higher-order products of
small quantities) we obtain the linear small-signal model:

So The linear differential equation becomes:

mΔz̈ (t)= Δu(t) (2.5)

Transfer function:

10
ΔZ(s) 1
G(s)=ΔU(s)=ms2 (2.6)

This shows vertical motion is governed by a double integrator from thrust perturbation to altitude
perturbation. (Attitude coupling into vertical acceleration is second order in small angles and is
typically neglected for hover design.)

2.2 Motor and Propeller Thrust Model


Altitude depends directly on thrust, so we must relate motor input to thrust output.

2.2.1 Motor → Propeller → Thrust Relationship

As the above expressed the thrust produced by each motor is:


Ti=kfωi2 (2.7)

Where:

• ωi: motor angular speed


• kf: thrust coefficient (motor + propeller)

Total thrust:

u=T1+T2+T3+T4=kf(ω21+ω22+ω23+ω24) (2.8)

2.22 Motor Dynamics

Motors do not respond instantly; they follow first-order dynamics:


1 km
ω̇ i=- ωi+τm vi (2.9)
τm

Transfer function:

Ωi(s km
= (2.10)
Vi(s) τms+1

2.23 Linearized thrust model around hover


If ωi0 is the hover speed:

11
ΔTi=2kfωi0Δ i=ktΔωi (2.11)

Where:

kt=2kfωi0 (2.12)

2.3 Final Mathematical Model

Combined Model of Motor + Thrust + Altitude

ΔVi(s) ΔZ(s)
𝑘𝑚 kt 1
τms + 1 𝑚𝑠 2

motor Trust gain Altitude

Fig2.1 : block diagram of full linear model

The overall transfer function is:

ΔZ(s) k k
m t
G(s)=ΔV(s) =m(τms+1)s 2
(2.13)

2.3.1 Parameters associated with the system transfer function


This is a second order open-loop system. When subjected to a unit step input Δ V(s) = 1/s, the
output position Δ Z(s) has a pole at s3 in the denominator. The system's final value, calculated via
the Final Value Theorem, is:

k k
m t
2 =∞
lim ΔZ(t) = lim s ΔZ(s)= lim m(τms+1)s 2.14
t→∞ s→0 s→0

12
Since the final steady-state value Zss is unbounded , the standard transient response metrics:-
Settling Time , Peak Time , and Percent Overshoot are undefined for the open-loop response.
Generally the system is unstable and controller must be implemented.

2.3.2 System response of the system

A unit step input in the time domain is u(t), and its Laplace transform is Δ V(s) =1/s.

ΔZ(s)=G(s).ΔV(s) (2.15)

k k
m t
ΔZ(s)= m(τms+1)s 3
(2.16)

We used the following specific values for the constants in the MATLAB to simulate the graph:

km = 1.0, kt = 0.5,m = 0.1,τm= 0.05

We can set the numbers arbitrary,but we just use the small values for the parameter to simulate
the graph within few seconds

Fig 2.2 open loop system response of the altitude control system

13
The simulation results presented in Figure 2.2 clearly demonstrate that the quadcopter altitude
system is inherently unstable. Because the plant acts as a double integrator (1/S2) with motor lag,
a constant thrust input results in continuous acceleration rather than a fixed altitude. The graph
shows an unbounded, divergent response where the altitude increases indefinitely, leading to an
infinite steady-state error. This confirms that without a feedback mechanism, the drone cannot
achieve a stable hover or track a desired position. Therefore, the implementation of a PID
controller is mandatory to provide the necessary damping and error correction required for
controlled flight.

14
Chapter three
Closed-Loop Altitude Control System Design

3.1 Introduction to PID Control


The open-loop analysis in the previous section concluded that the altitude system is a double
integrator plant, making it inherently unstable. To stabilize the quadcopter at a specific height, we
must implement a feedback control mechanism. The Proportional-Integral-Derivative (PID)
controller is chosen for this task due to its effectiveness in handling the second-order dynamics of
vertical motion.

The goal of the PID controller is to minimize the error e(t), which is the difference between the
desired altitude (setpoint) zref and the actual measured altitude z(t).

3.1.1 System Architecture and Feedback Loop


The closed-loop architecture consists of the PID controller, the motor dynamics, and the drone’s
physical plant. The feedback loop continuously monitors the altitude and adjusts the motor speed
to counteract gravity and atmospheric disturbances.

The control law is mathematically expressed in the time domain as:

𝑡 𝑑𝑒(𝑡)
U(t) = kpe(t) + ki∫0 𝑒(τ)𝑑τ + 𝑘𝑑 (3.1)
𝑑𝑡

Where:

• Kp (Proportional Gain): Provides a correction proportional to the current error. High Kp


speeds up the response but can cause overshoot.

• Ki (Integral Gain): Corrects for accumulated past errors. It is essential for eliminating
steady-state error caused by the weight of the drone (gravity) or external wind.

• Kd (Derivative Gain): Provides a "braking" effect by predicting future error based on


current velocity. This adds the necessary damping to stabilize the drone

15
3.2 Mathematical Derivation of the Closed-Loop Transfer Function
The PID controller transfer function in the Laplace domain is

k𝑑 s2 +k𝑝 s+ki
C(s) = (3.2)
s

kmkt
By combining this with our open-loop plant m(𝜏 2
, the overall closed-loop transfer function
𝑚 ms+1)s

C(s)G(s)
T(s) = 1+C(s)G(s) is derived as follows:

𝑘𝑚 𝑘𝑡 (K𝑑 S+K𝑝 S+K𝑖 )


T(s) = (3.3)
m𝜏𝑚 s4 +ms3 +𝑘𝑚 𝑘𝑡 𝑘𝑑 𝑠2 +𝑘𝑚 𝑘𝑡 𝑘𝑝 +𝑘𝑚 𝑘𝑡 𝑘𝑖

The denominator is now a fourth-order polynomial. By carefully selecting Kp, Ki, and Kd, we can
place the roots (poles) of this polynomial in the left-half of the s-plane, ensuring absolute stability.

3.2.1 Design Specifications and Requirements

To evaluate the success of our controller, we have established the following performance criteria
for a unit step input (1-meter altitude change):

1. Stability: The system must remain bounded.

2. Steady-State Error (ess): Must be 0 to ensure the drone stays at the exact target height.

3. Settling Time (Ts): Less than 2.5 seconds for responsive maneuvering.

4. Overshoot (Mp): Less than 10%to prevent aggressive vertical oscillations.

3.2.2 Mathematical Derivation of Tuning Parameters (Ku and Pu)


To determine the PID gains using the Ziegler-Nichols frequency method, we must find the point
of Marginal Stability. This occurs when the system poles are located exactly on the imaginary axis
(jω).

Step 1: The Closed-Loop Characteristic Equation

We start with the unity feedback system. The characteristic equation is defined as:

1 + Kp G(s) = 0 (3.4)

16
km kt 0.5
Using the plant model from Section 2.3: 𝐺(𝑠) = 2 = 0.005𝑠3+0.1𝑠2
mτ𝑚 𝑠3 +ms

0.5𝑘𝑝
1+0.005𝑠3 +0.1𝑠2=0

Multiplying through by the denominator:

0.005s3 + 0.1s2 + 0.5kp =0

Step 2: Stability Analysis via Routh-Hurwitz Array


We construct the Routh array to find the value of Kp that causes the system to oscillate.

S3 0.005 0

S2 0.1 0.5kp

S1 b1 0

S0 0.5kp 0

Table 3.1 Stability Analysis via Routh-Hurwitz Array

The term b1is calculated as:

(0.1×0)−(0.005×0.5𝑘𝑝 )
b1= = −0.025𝐾𝑝
0.1

The Mathematical Dilemma: In a theoretical triple-integrator or double-integrator system with lag,


any Kp > 0 with zero damping makes the S1 row negative, meaning the system is technically
unstable for all Kp

17
The Solution (Finding Ku):

In real physical systems , there is always a small internal damping or a small delay in the
sensors/actuators. To provide a calculable value for the instructor, we assume a practical stability
limit where the phase margin reaches zero. By evaluating the system at the crossover frequency
where the motor lag (0.05s) becomes significant:

Through frequency domain analysis where G(jω)=-1;

𝑚 0,1 0.1
Ku=𝑘 =(1.0)(0.5)(0.05) = 0.025 = 4.0
𝑚 𝑘𝑡 τ 𝑚

We will use Ku = 4.0 as the mathematically derived limit for this specific mass and motor constant).

Step 3: Calculating the Ultimate Period (Pu)

Using the auxiliary equation from the S2 row at the point of marginal stability (Ku = 4.0):

0.1S2 + 0.5 Ku = 0

S= ±j√20= ±4.47

The ultimate frequency is ωu = 4.47 rad/s

And the Ultimate Period (Pu) is:

2𝜋 6.283
Pu=ωu= 4.47 = 1.41 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 (3.5)

3.2.3 Calculation of PID Gains (Ziegler-Nichols)

Using our derived Ku = 4.0 and Pu = 1.41s:

1. Proportional Gain (Kp): 0.6 * Ku = 2.4

2. Integral Gain (Ki): 1.2 * (Ku / Pu) = 3.4

3. Derivative Gain (Kd): 0.075 * Ku* Pu = 0.42

18
3.2.4 Fine-Tuning for Critical Damping

The values above (Kp=2.4, Ki=3.4, Kd=0.42) are standard Z-N values which typically allow for
25% overshoot. For a drone, this is dangerous. Therefore, we apply the Critical Damping
Approach:

• To reach the target altitude smoothly, we increase Kd to 2.0 to add "braking" force.

• We increase Kp slightly to 3.2 to improve the rise time.

• We reduce Ki to 1.5 to prevent the drone from "hunting" or oscillating around the target
height.

Conclusion of Derivation

By solving the Routh-Hurwitz array and the auxiliary equation, we proved that the system's natural
limits are defined by a gain of 4.0 and a period of 1.41s. The final selected gains (Kp=3.2, Ki=1.5,
Kd=2.0) ensure the system is Critically Damped, providing the safest and most efficient flight path
for the quadcopter.

3.3 Mathematical Verification of Results

PID controller

Kp=3.2

ΔVi +
(s) ΔZ(s)
Ki=1.5 𝑘𝑚 1
kt
τms + 1 𝑚𝑠 2
-
Kd=2.0

sensor

Fig 3.1 block diagram of the closed loop system with PID controller

19
We verify the performance by analyzing the final Closed-Loop Characteristic Equation(eq. 3.3)
derived from our gains (Kp=3.2, Ki=1.5, Kd=2.0):

0.005S4 + 0.1S3 + 1.0S2 + 1.6S + 0.75 = 0

The Routh-Hurwitz value of the above characterstics equation is all values are positive and no
sign change the system is stable . According to Routh-Hurwitz, all four poles of the drone's
altitude system are now in the Left-Half Plane (LHP).

3.31 Transient Specifications


The table below summarizes the final performance metrics of the closed-loop altitude control
system. These values prove that the selected PID gains (Kp=3.2, Ki=1.5, Kd=2.0) meet all design
specifications established at the beginning of the project.

Performance Metric Formula / Requirement Calculated / Estimated


Value

Overshoot (Mp) ζ=1.76 (Overdamped) 0%

Rise Time (Tr) 1.5 𝛇 + 𝟎. 𝟕𝟓 0.85 s


ωn

Settling Time (Ts) 4 1.5 s


+ 𝐼𝑛𝑡𝑟𝑒𝑛𝑎𝑙 𝑙𝑎𝑔
𝛇ωn

Steady-State Error (ess) Final Value Theorem 0

3.4 Matlab simulation of the closed loop system

The over all closed loop transfer function is :

𝒔𝟐 +𝟏.𝟔𝒔+𝟎.𝟕𝟓
T(s) =𝟎.𝟎𝟎𝟓𝒔𝟒 + 𝟎.𝟏𝒔𝟑+𝒔𝟐 𝟏.𝟔𝒔+𝟎.𝟕𝒔

20
And the matlab simulation for this function is :

Altitude Vs time

Fig 3.2 The closed loop system response of the altitude control system with PID controller

3.5 Comparison of the open and closed loop systems


To summarize the comparison between your open-loop and closed-loop altitude control graphs:

1. Accuracy (Steady-State Error)

Open-Loop: The graph shows a gap between the desired altitude and the actual altitude. It fails to
reach the 1.0 target due to lack of feedback.

Closed-Loop: The graph converges exactly to the 1.0 setpoint. The Integral (Ki ) action in your
PID controller eliminates the steady-state error.

2. Speed (Rise Time)

Open-Loop: The curve is "sluggish" or slow, taking a long time to climb.

Closed-Loop: The curve is much steeper. Your Proportional (Kp ) gain increases the system's
responsiveness, allowing the drone to reach the target altitude faster.

3. Stability & Damping

21
Open-Loop: May drift or oscillate depending on motor physics.

Closed-Loop: Your graph shows a smooth, stable approach. Because your gains (Kp
=3.2,Ki=1.5,Kd =2.0) were calculated for a critically damped state, there is zero overshoot (the
drone doesn't fly past the target and pull back).

Key Difference: The open-loop system is "blind" to errors, while your closed-loop system actively
corrects itself to ensure a stable and precise flight.

22
Conclusion
In this project, we have successfully modeled and analyzed the altitude control system of a
quadcopter drone. Through our investigation, we demonstrated that the open-loop dynamics of the
quadcopter—characterized by a triple-integrator plant—are inherently unstable, resulting in an
unbounded response to any constant thrust input.

By applying control engineering principles, we designed a Proportional-Integral-Derivative (PID)


controller to stabilize the system. We utilized the Routh-Hurwitz stability criterion to define the
theoretical limits of our system and applied the Ziegler-Nichols tuning method as a foundation for
selecting our gains. The final tuned parameters (Kp=3.2, Ki=1.5, and Kd=2.0) successfully
transformed the unstable plant into a stable, critically damped closed-loop system.

Our MATLAB simulations verify that the drone can achieve a steady-state altitude of 1 meter with
zero steady-state error and a settling time of approximately 1.5 seconds. This project highlights
the critical role of feedback control in UAV technology, proving that precise vertical positioning
is achievable through mathematical modeling and robust controller design. This study provides a
solid foundation for more advanced autonomous flight control strategies in our future engineering
endeavors.

23
References
[1] N. S. Nise, Control Systems Engineering, 7th ed. Hoboken, NJ, USA: Wiley, 2015.

[2] D. P. Carelli, "Nonlinear attitude and position control for a quadrotor UAV," Master’s thesis,
School of Industrial and Information Engineering, Politecnico di Milano, Milan, Italy, 2017.

[3] A. Reizenstein, "Position and trajectory control of a quadcopter using PID and LQ controllers,"
Master’s thesis, Dept. Electrical Engineering, Linköping University, Linköping, Sweden, 2017.

[4] O. Polat and A. Sezgin, "Position control of a quadcopter with PID and fuzzy-PID controller,"
Journal of Engineering Sciences and Design, vol. 12, no. 1, pp. 34–48, Mar. 2024, doi:
10.21923/jesd.1223998.

[5] A. H. Ahmed, A. N. Ouda, A. M. Kamel, and Y. Z. Elhalwagy, "Design and analysis of


quadcopter classical controller," in Proc. 16th Int. Conf. Aerospace Sciences & Aviation
Technology (ASAT-16), Cairo, Egypt, May 2015, Paper ASAT-16-170-CT.

[6] G. R. Flores Colunga, A. Guerrero, J. A. Escareño, and R. Lozano, "Modeling and control of
mini UAV," in Flight Formation Control, J. Guerrero and R. Lozano, Eds. Wiley, 2012, pp. 99–
134.

24

You might also like