25 views

Uploaded by abdulla_alazzawi

How does a Quadrotor fly?
A journey from physics, mathematics, control systems and computer science towards a “Controllable Flying Object”ز

- CVG-25 Gyro Datasheet
- Guidance, Navigation, and Control for Munitions.pdf
- Accurate Real Time Altitude Estimation.pdf
- Unity Software Instruction
- Airbourne Gravity 2004
- Models
- _143991f8dca474fc97997ee9c1958658_assignment3_writeup.pdf
- ElfHobby_Gyro_Manual
- Robust Control and Fault Detection Filter Design for Aircraft Pitch Axis
- Ch1
- ATPL Inst 2.5.pdf
- Texture Components and Euler Angles
- Progress on and Usage of the Open Source Flight Dy
- Full Text 22
- Flapping Wing Flight
- IIEST Course Structure
- DM00034730
- chinitos
- design and simulation of telepresence robot
- 1722

You are on page 1of 64

systems and computer science

towards a Controllable Flying Object

Corrado Santoro

Dipartimento di Matematica e Informatica - Universit`a di Catania, Italy

santoro@dmi.unict.it

Overview

1 Why Multi-rotors?

2 Structure and Physics of a Quadrotor

3 From Analysis to Driving:

How can I impose a movement to my quadrotor?

4 The ideal world and the real world:

Why we need Control Systems Theory!

5 Rates and Angles:

Could I control the attitude?

6 What about Altitude or GPS control?

Part I

Why Multi-rotors?

Flying Machines

But the story tells that building flying machines is not easy!

A basic and common component: the wing

Two kind of flying machines (excluding rockets and

balloons):

1 Fixed wing, i.e. airplanes

2 Rotating wing, i.e. helicopters

Design and Implementation problems

Airplanes (fixed wing)

Wing profile and shape

Wing and stab size/area

Wing load

Position of the COG

Motion is achieved by driving (mechanically) the mobile surfaces

(aleirons, rudder, elevator)

Size and structure of the rotor

Mechanical system to control motion inclination

Yaw balancing system for the rotor at tail

Position of the COG

Motion is achieved by (mechanically) changing the inclination of

the rotor and the pitch of the rotor wings

Corrado Santoro How does a Quadrotor fly?

Multi-rotors ...

propellers

do not require complex mechanical parts to control the

flight

can fly and move only by changing motor speed

are controlled only by a electronic-/computer-based system

Part II

Structure of a Quadrotor (Mechanics)

Two possible configurations: + and

Propellers 1 and 3 rotates CW, 2 and 4 rotates CCW

Required to compensate the action/reaction effect (Third

Newtons Law)

Propellers 1 and 3 have opposite pitch w.r.t. 2 and 4, so all

thrusts have the same direction

Corrado Santoro How does a Quadrotor fly?

Structure of a Quadrotor (Electronics)

Forces and Rotation speeds

T1 , T2 , T3 , T4 : forces generated by the propellers

Ti i2 : on the basis of propeller shape, air density, etc.

m: mass of the quadrotor

mg: weight of the quadrotor

Moments

Mi = L T i

Hovering Condition (Equilibrium)

P4

1 Equilibrium of forces: i=1 Ti = mg

2 Equilibrium of directions: T1,2,3,4 ||g

Equilibrium of moments: 4i=1 Mi = 0

P

3

Violating one (or more) of these conditions implies to impose a

certain movement to the quadrotor

Reference Systems

1 The inertial reference systems, i.e. the Earth frame

(xE , yE , zE )

2 The quadrotor reference system, i.e. the Body frame

(xB , yB , zB )

Euler Angles

two systems:

Roll, : angle of rotation along axis xB ||xE

Pitch, : angle of rotation along axis yB ||yE

Yaw, : angle of rotation along axis zB ||zE

They are called Euler Angles

Angular Speeds

,

speeds (, )

of the system:

Roll rate

,

Pitch rate

,

Yaw rate

,

Part III

How can I impose a movement to my quadrotor?

Hovering Condition (Equilibrium)

P

1

Equilibrium of moments: 4i=1 Mi = 0

P

3

As a consequence:

= 0 = 0 = 0

=0 =0 =0

Corrado Santoro How does a Quadrotor fly?

Going Up and Down

P4

1 No equilibrium of forces: i=1 Ti 6= mg

2 Equilibrium of directions: T1,2,3,4 ||g

Equilibrium of moments: 4i=1 Mi = 0

P

3

propellers we can:

P4

Go Up: i=1 Ti > mg

Down: 4i=1 Ti < mg

P

Go

Yaw Rotation

P4

1 Equilibrium of forces: i=1 Ti = mg

2 Equilibrium of directions: T1,2,3,4 ||g

Equilibrium of moments: 4i=1 Mi = 0

P

3

As a consequence:

= kY ((1 + 3 ) (2 + 4 ))

R

= dt

Corrado Santoro How does a Quadrotor fly?

Roll Rotation

P

... by unbalancing propeller speeds as:

(1 + 4 ) (2 + 3 ) 6= 0

As a consequence:

= kR ((1 + 4 ) (2 + 3 ))

R

= dt

No equilibrium of directions: T1,2,3,4 not parallel to g

Corrado Santoro How does a Quadrotor fly?

Roll Rotation and Translated Flight

P4

Total thrust T = i=1 Ti is decomposed in:

Lift Force:TL = T cos

Drag Force:TD = T sin

flight we need more power w.r.t. hovering or yawing.

Pitch Rotation

P

... by unbalancing propeller speeds as:

(1 + 2 ) (3 + 4 ) 6= 0

As a consequence:

= kP ((1 + 2 ) (3 + 4 ))

R

= dt

Also in this case the total thrust is decomposed thus we

need more power w.r.t. hovering or yawing.

Corrado Santoro How does a Quadrotor fly?

Equations of Movement

We assume a common factor of proportionality k and F = T

(we will see that such an assumption is not a problem!):

= k((1 + 4 ) (2 + 3 )) = k1 k2 k3 + k4

= k((1 + 2 ) (3 + 4 )) = k1 + k2 k3 k4

= k((1 + 3 ) (2 + 4 )) = k1 k2 + k3 k4

F = k((1 + 2 + 3 + 4 )) = k1 + k2 + k3 + k4

k k k k 1

k k k k 2

=

k k k k 3

F k k k k 4

Equations of Movement

k k k k 1 1

k k 2

= K 2

k k

=

k k k k 3 3

F k k k k 4 4

given the speed of the propellers.

how to set i in order to impose a certain rotation rate of axis in

the body frame.

Controlling Roll, Pitch and Yaw Rates, and Total Thrust

1 k k k k

2

= K 1 k

= k k k

3 k k k k

4 F k k k k F

Part IV

Why we need Control Systems Theory!

Can we really set the rotation rate of propellers??

Motor/Propeller Driving Schema

type for the four arms.

Software (firmware) controls PWM, but ...

1 Are the drivers really all the same?

2 Are the motors really all the same?

3 Are the propellers really all the same?

4 Is the COG placed at the center of the quadrotor?

Corrado Santoro How does a Quadrotor fly?

Can we really set the rotation rate of propellers??

Motor/Propeller Driving Schema

chains provoke different thrust forces, even if the components

are of the same type!

Corrado Santoro How does a Quadrotor fly?

The Real world effect

Problem

We need to set i by

1

2

1

3 = K

4 F

The Mathematician/Physicists Solution

Solution ??

Lets characterize each driver/motor/propeller chain and derive the

functions:

Ti = fi (PWMi )

Then, lets invert the functions:

But...

Characterization is not so easy

If we change a component, we must repeat the process

There are unpredictable variables, e.g. air density, wind, etc.

Corrado Santoro How does a Quadrotor fly?

The Computer Scientist/Engineer Solution

Solution ??

Lets sperimentally tune:

an offset for each channel

a gain for each channel

until the system behaves as expected!

But...

Tuning is not so easy

If we change a component, we must repeat the process

There are unpredictable variables, e.g. air density, wind, etc.

Corrado Santoro How does a Quadrotor fly?

The Control System Engineer Solution

1 Measure your variable through a sensor

2 Compare the measured value with your desired set point

3 Apply the correction to the system on the basis of the error

4 Go to 1

it works no matter the components

it works also in the presence of uncontrollable variables, e.g. air

density, wind, etc.

Corrado Santoro How does a Quadrotor fly?

Our Scenario

Our measures:

Actual angular velocities on the three axis (M , M , M )

They are measured through a 3-axis gyroscope!

Our set-points:

Desired angular velocities on the three axis (T , T , T )

They are given through the remote control

Using Feedback to Control the Quadrotor

Using Feedback to Control the Quadrotor

Algorithmically

while True do

On T timer tick ;

(T , T , T , F ) = sample remote control();

(M , M , M ) = sample gyro();

e := T M ; e := T M ; e := T M ;

C :=roll rate controller(e );

C :=pitch rate controller(e );

C :=yaw rate controller(e );

(pwm1 , pwm2 , pwm3 , pwm4 )T := K 1 (CT , CT , CT , F )T ;

send to motors(pwm1 , pwm2 , pwm3 , pwm4 );

end

Using Feedback to Control the Quadrotor

Algorithmically

while True do

On T timer tick ;

(T , T , T , F ) = sample remote control();

(M , M , M ) = sample gyro();

e := T M ; e := T M ; e := T M ;

C :=roll rate controller(e );

C :=pitch rate controller(e );

C :=yaw rate controller(e );

(pwm1 , pwm2 , pwm3 , pwm4 )T := K 1 (CT , CT , CT , F )T ;

send to motors(pwm1 , pwm2 , pwm3 , pwm4 );

end

Corrado Santoro How does a Quadrotor fly?

The P.I.D. Controller

Proportional-Integral-Derivative controller, represented by

the following function:

PID Function

C := xxx rate controller(e);

That is:

t

de(t)

Z

C(t) := Kp e(t) + Ki e( ) d + Kd

0 dt

In a discrete world (at k th sampling instant):

k

X e(k) e(k 1)

C(k) := Kp e(k) + Ki e(j) T + Kd

T

j=0

The P.I.D. Controller

PID Function

k

X e(k) e(k 1)

C(k) := Kp e(k) + Ki e(j) T + Kd

T

j=0

Kp drives the short-term action

Ki drives the long-term action

Kd drives the action on the basis of the error trend

Using a specific tuning method (Ziegler-Nichols)

Sperimentally by means of trial-and-error

Part V

Could I control the attitude?

Rates are not Angles

suppose a roll angle of = 10o

but no roll rotation (rate), i.e. = 0

and no roll rotation command (sticks set to center)

the quadrotor is not horizontal and performs a

translated flight

Could we control angles instead of rates?

Corrado Santoro How does a Quadrotor fly?

Measuring Angles (instead of Rates): Gyros

We could do this by using Gyroscopes, Accelerometers,

Magnetometers, but...

t

integrated in order to derive the angle (t) = 0 (

)d , but:

Numeric integration is affected by approximation errors

Gyroscopes are affected by an offset, i.e. they give

non-zero value when the measure should be zero

Such an offset is not constant over time and depends on

the temperature

The estimated angle is not reliable!

Measuring Angles: Accelerometers

An accelerometer is a sensor measuring the acceleration over

the three axis (ax , ay , az ).

of g vector in the sensor reference system

Two functions (using arctan) determines pitch and roll:

a

= tan1 ayz

= tan1 a2x 2

ay +az

But if the object is moving (e.g. shaking) other

accelerations appear

The computed angles are not reliable!

Corrado Santoro How does a Quadrotor fly?

Measuring Angles: Two sensors, No reliability!

Gyros

Drift

Approximate discrete integration

Accelerometers

Precise only if sensor is not shaking

which are affected by two different error types.

the error and obtain a reliable information.

Sensor Fusion

Basic Algorithm

while True do

On T timer tick ;

,

(, )

= sample gyro();

(ax , ay , az ) = sample accel();

(, , ) = (, , ) + T (, ,

);

= tan (ay / az );

1

q

= tan1 (ax / a2y + a2z );

);

(, , ) = fusion filter (, , , ,

end

Corrado Santoro How does a Quadrotor fly?

Sensor Fusion: Algorithms

DCM (Direction Cosine Matrix)

Complementary filters

Kalman filters

Basic idea:

Derive an error function e(t) = real(t) estimated (t)

Design a controller able to guarantee limt e(t) = 0

Corrado Santoro How does a Quadrotor fly?

Sensor Fusion: Algorithms

Rotations in the 3D space

Matrix calculations

May we reduce the load?

Representing Rotations in 3D

cc ssc cs csc + ss

DCM = cs sss + cc css sc

s sc cc

s = sin, c = cos

Representing Rotations in 3D

Quaternions

A quaternion is a complex number with one real part and three

imaginary parts:

q = q0 + q1 i + q2 j + q3 k

i, j, k = imaginary units

i2 = j2 = k2 = ijk = 1

in 2D, Quaternions can be used to represent rotations in 3D.

Rotations in 3D and Quaternions

Transformations from Euler angles to quaternion exist:

q (, , )

(, , ) q

qv q where q is the conjugate of q and v = {0, vx , vy , vz }.

The overall fusion algorithm can be written using

quaternion algebra, thus avoiding continuous sin, cos

calculation.

Quaternions avoid gimbal lock!

The attitude can be easily obtained by using:

q (, , )

So far so good: Controlling attitude

controllers.

We set the Target (desired) Attitude (T , T , T ) from

remote controller.

Current quad attitude (M , M , M ) is computed using

sensor fusion.

The error signals (differences) are sent to PID controllers

whose output are the target rates for rate controllers.

The basic model is cascading controllers: attitude

controllers which drives rate controllers.

Lets remind the schema of Rate Controllers

Complete Attitude Controller

Control loops: Requirements

rate control (inner);

attitude control (outer);

Attitude control drives rate control, thus rate control must

have enough time to reach the desired target.

Loops must have different dynamics, i.e. sampling time

Tr = rate control sampling time

Ta = attitude control sampling time

Ta >> Tr , Ta = nTr , n N , n > 1

In our quad: Tr = 5ms, Ta = 50ms

Finally, the overall algorithm

while True do

On Tr timer tick ;

(M , M , M ) = sample gyro();

(ax , ay , az ) = sample accel();

(M , M ) = fusion filter (M , M , M , ax , ay , az );

if after N loops then

(T , T , T , F ) = sample remote control();

T :=roll controller(M , T );

T :=pitch controller(M , T );

end

C :=roll rate controller(M , T );

C :=pitch rate controller(M , T );

C :=yaw rate controller(M , T );

(pwm1 , pwm2 , pwm3 , pwm4 )T := K 1 (CT , CT , CT , F )T ;

send to motors(pwm1 , pwm2 , pwm3 , pwm4 );

end Corrado Santoro How does a Quadrotor fly?

Part VI

Lets repeat the schema!

Identify your source of measure m

Identify your target t

Identify the variables to drive v

Identify the sampling time

Use a (PID) controller v = pid (t, m)

Altitude Control

HM = measured height (from a sensor)

F = output variable to control (desired thrust)

MTr = altitude control sampling time, M > N

while True do

On Tr timer tick ;

...;

if after M loops then

HM = sample altitude sensor();

F :=altitude controller(HM , HT );

end

...

end

GPS Control

LatT , LonT = our target position

LatM , LonT = measured position (from a GPS sensor)

T , T = target variables to control (desired pitch and roll)

GTr = GPS control sampling time, G > N

while True do

On Tr timer tick ;

...;

if after G loops then

(LatM , LonM ) = sample gps();

T :=gps lon controller(LonM , LonT );

T :=gps lat controller(LatM , LatT );

end

...

end

control) is mandatory.

Corrado Santoro How does a Quadrotor fly?

Vision-based Control

while True do

On Tr timer tick ;

...;

if after H loops then

(X , Y , ) = identify target with camera();

T :=x controller(X );

T :=y controller(Y );

T :=heading controller();

end

... Corrado Santoro How does a Quadrotor fly?

Conclusions

... but, where is the trick?

Are sensors reliable?

Sometimes, NO!

Noise due to mechanical vibrations (MEMS-IMU to be

filtered by applying Fourier analysis)

False positives due to wiring problems (Magnetometers,

ADC, etc.)

Check it!

Controllers need precise (real-time) timing

DO NOT Windows to stabilize your quad!!!

You can try with RT-Linux

NO! You must learn it!

... and be sure to have a large set of propellers!!

OF COURSE!!!!

Corrado Santoro How does a Quadrotor fly?

Will Multi-rotors be the future of personal

transportation systems?

Demonstration Flight

First prototype: PROBLEMS!!!

DIY is fun but ...

The frame is not well balanced... but the control will do the

job

Too many vibrations (many of them suppressed using

Chebyshev filters)

Wrong choice of motors (specs report a thurst of 400gr

each, but ...)

Wiring/Electronics problems

Current spikes reset the ultrasonic sensor

I2C sometimes locks (a watchdog intervenes and turn-off

motors)

Firmware problems

Still working on the sensor fusion algorithm, since it is not

satisfactory (we want more stability...)

Corrado Santoro How does a Quadrotor fly?

How does a Quadrotor fly?

A journey from physics, mathematics, control

systems and computer science

towards a Controllable Flying Object

Corrado Santoro

Dipartimento di Matematica e Informatica - Universit`a di Catania, Italy

santoro@dmi.unict.it

- CVG-25 Gyro DatasheetUploaded bySherif Eltoukhi
- Guidance, Navigation, and Control for Munitions.pdfUploaded bylhomssi
- Accurate Real Time Altitude Estimation.pdfUploaded byMartin Manullang
- Unity Software InstructionUploaded byMuhammad Abdussalam
- Airbourne Gravity 2004Uploaded byTe Siem Bro Layuka
- ModelsUploaded bysmruli
- _143991f8dca474fc97997ee9c1958658_assignment3_writeup.pdfUploaded byLeonardo Knupp
- ElfHobby_Gyro_ManualUploaded byRaul D. Bande
- Robust Control and Fault Detection Filter Design for Aircraft Pitch AxisUploaded byAbdulhmeed Mutalat
- Ch1Uploaded byCao Quang Hưng
- ATPL Inst 2.5.pdfUploaded byKoustubh Vadalkar
- Texture Components and Euler AnglesUploaded bythuron
- Progress on and Usage of the Open Source Flight DyUploaded byclarselle
- Full Text 22Uploaded bySatishReddy
- Flapping Wing FlightUploaded byqyilmazoglu
- IIEST Course StructureUploaded byTanoy Dewanjee
- DM00034730Uploaded byIvan Dario Peñaloza
- chinitosUploaded byHelen Garcia
- design and simulation of telepresence robotUploaded bySolomon Genene
- 1722Uploaded byFelipe Taha Sant'Ana
- p51-dMustangUploaded byjuancruzviale
- G50Z Gyro Datasheet 130415Uploaded byabtin_kamelii
- Wasim_UMUploaded byPygamos
- Application of Classical ControlUploaded byjohnsamvlb
- 9780736948487_excUploaded byIronChaves
- structUploaded byVenkat
- Design of a feedback-feedforward steering controller for accurate path tracking and stability at the limits of handlingUploaded byRay Alejandro Lattarulo Arias
- Sw Ek Tm4c123gxl Boostxl Senshub Ug 2.1.0.12573Uploaded bytrungkiena6
- Control of Our AirplaneUploaded byAEROWORKER
- Finitewing WordUploaded bysurya

- Quadcopter Dynamics, Simulation, And ControlUploaded byFajar Prima
- FEA TheoryUploaded byabdulla_alazzawi
- Managing Safety & Health CultureUploaded byabdulla_alazzawi
- PID Without a PhDUploaded byamartyamajumdar
- MaterialsUploaded bykasreedhar
- Lec 2 Robot ManipulatorsUploaded byAjanthan Alagaratnam
- Links and JointsUploaded byabdulla_alazzawi
- Introduction to SimulinkUploaded byabdulla_alazzawi
- How Does a Quadrotor Fly ?Uploaded byabdulla_alazzawi
- Error Analysis (Uncertainty Analysis) - Mit CourseUploaded byabdulla_alazzawi
- Cosserat theory, E. Papamichos.pdfUploaded byabdulla_alazzawi
- 2D Geometrical Transformations (Lecture_06)Uploaded byabdulla_alazzawi
- Robot Arms and KinematicsUploaded byabdulla_alazzawi
- Phone Calls and Text Messages ControlUploaded byabdulla_alazzawi
- SOYER Bend Testing Device BP-1Uploaded byabdulla_alazzawi

- 1Uploaded byAnil Kumar Reddy
- 201508198-Piper-inspection-report.pdfUploaded bysujinlong
- Version 2 Diamond Drive Conversion KitUploaded bycpcracing
- Envelop Covers for Army Aviation EquipmentUploaded byronhutton
- Appreciation of Loads and Truss DesignUploaded byMatthew Wee
- ECAM_FOJ_PPC (1)Uploaded byahamad
- 777_GROUNDWORK_AC-PRESSURIZATION_TRANSCRIPT.pdfUploaded byberjarry5938
- ADF and VORUploaded byGuillermo Andres Molina
- MP Lecture 03 Moments and CouplesUploaded bypvr2k1
- 37134859-Design-and-Fabrication-of-Ultra-Light-Aircraft.pdfUploaded byAndone Anutu
- 2010-2010 - Final Report - Boeing 747-44AF - N571UP - Report 13 2010Uploaded bynigrakcay
- Car Part II Chapter.7 Aircraft Maintenance Engineer LicensingUploaded byBhaskerNegi
- MacLean Mobile Aircraft Cockpit Suicide Barrier Cart 2017-10-31Uploaded byCreighton Kidz
- S6310N Electrical Part List.pdfUploaded byDaniel Cekul
- Popular.science.1926.01.OCR.hqUploaded byunrealemail6649
- Radiography-inspection-NDT-sample-test-report-format.pdfUploaded byDanielRao
- Model Airplane International 2014-06Uploaded byHarold Clements
- Chapter 02Uploaded byckkoo2000
- Automotive 12134Uploaded byTraian Ilie
- Spaceport Magazine - September 2014Uploaded byKanishka Lankatillake
- Electric Field Practice ProblemsUploaded byjnabung
- mission to mars 1030 passage and questions 1Uploaded byapi-357257630
- AeroDynamics-II UnitTest-03 2012 JJModelTest (EIT)Uploaded byae00505
- resume online - caitlin gibbonsUploaded byapi-216990272
- BE Industrial Fans Fans PUBL 7588Uploaded byMykel Advincula
- List of SketchUploaded byMinoj Sarasan
- JAR FCL 1(Aeroplanes)Uploaded byboeingairbus1957
- Kongsberg Product Sheet A4 SSIV WebUploaded bylimres
- ENOVUploaded bySkoltzAllani
- 1-Electronic Instrument SystemsUploaded byPrabath De Silva