• No results found

Modelling, Control, and Experimental Evaluation of the Hovering Characteristics

N/A
N/A
Protected

Academic year: 2021

Share "Modelling, Control, and Experimental Evaluation of the Hovering Characteristics "

Copied!
47
0
0

Loading.... (view fulltext now)

Full text

(1)

Modelling, Control, and Experimental Evaluation of the Hovering Characteristics

of a Tilt-Wing Unmanned Aerial Vehicle

Elias Small

Space Engineering, masters level 2017

Luleå University of Technology

Department of Computer Science, Electrical and Space Engineering

(2)

Master Thesis:

Modelling, Control, and Experimental Evaluation of the Hovering

Characteristics of a Tilt-Wing Unmanned Aerial Vehicle

Elias D. Small

Lule˚ a University of Technology

Dept. of Computer Science and Electrical Engineering Div. of Systems and Interaction

21 December 2016

(3)
(4)

A BSTRACT

A Tilt-Wing Unmanned Aerial Vehicle (TW-UAV) and the preliminary evaluation of its hovering characteristics in extended simulation studies and experiments are presented in this Master Thesis. In the beginning, an overview of the TW-UAV’s design proper- ties are established, highlighting the novelties of the proposed structure and the overall merits. The TW-UAV’s design and structural properties are mathematically modelled and utilized for the synthesis of a cascaded P-PI and PID based control structure for the regulation of its hovering performance. In addition, extensive simulation trials are performed in order to evaluate the structure’s efficiency in controlling the TW-UAV’s attitude and position under various noise and disturbance scenarios. The model and air- craft are then put through experimental evaluation with an on-board processor, namely the KFly, in a Motion-capture equipped laboratory to evaluate the control structure and physical behaviour of the TW-UAV. The results of these experiments are presented and discussed. The system and control scheme are shown to work well. However, an unfortu- nate crash forced the premature termination of experimentation and thus the conclusion of this thesis. Nevertheless, the reason for the crash is understood and discussed for future work.

iii

(5)
(6)

P REFACE

Throughout the long and tedious process that is a masters thesis, I have learned so much working with the incredibly interesting field that is robotics. I have been humbled by its immensity and by the exceeding knowledge and friendliness of my colleagues in the Field Robotics Group at LTU. I have felt welcome and I have felt free to attempt to access the vast sea of knowledge my betters possess.

I would like to thank my supervisors Emil Fresk and George Nikolakopoulos for their enduring support and patience, as well as Georgios Andrikopoulos and William Small for their help in the writing process.

Elias Small

v

(7)
(8)

C ONTENTS

Chapter 1 – Introduction 1

Chapter 2 – Physical Design Properties 3

2.1 Prototype . . . . 3

2.2 Design Properties . . . . 4

2.3 Modifications . . . . 5

Chapter 3 – Modelling and Control 9 3.1 Mathematical Model . . . . 9

3.2 Control Scheme . . . . 11

Chapter 4 – Simulations 15 4.1 Torque Disturbance . . . . 17

4.2 Position Step-Reference Response . . . . 18

4.3 Path Following . . . . 20

Chapter 5 – Electronics and Programming 23 5.1 Hardware . . . . 23

5.1.1 KFly Circuit Board . . . . 23

5.1.2 Other Hardware . . . . 24

5.2 Software . . . . 24

5.2.1 KFly Software . . . . 24

5.2.2 Robot Operating System (ROS) . . . . 25

5.3 Experimental System and Laboratory Set-up . . . . 25

Chapter 6 – Experimental Evaluation 27 6.1 Static Test of Engine and Servo . . . . 27

6.2 Remote-Controlled Angular Velocity Reference Test . . . . 27

6.3 Remote-Controlled Angle Reference Test . . . . 28

6.4 Position Reference Test . . . . 29

Chapter 7 – Conclusions and Discussion 35 7.1 Conclusion from Simulation Studies . . . . 35

7.2 Discussion of Experimental Results . . . . 35

7.3 Future Work . . . . 36

(9)
(10)

C HAPTER 1 Introduction

The area of Unmanned Aerial Vehicles (UAVs) and more specifically the related research specialized in multirotors has recently seen rapid growth, mainly due to their efficiency in accomplishing complex missions and flight scenarios [1]. The vast application range of this type of UAV includes search and rescue missions, forest fire surveillance, border interdiction, area exploration and mapping, agricultural services, buildings inspection, marine operations, media coverage, and many more e.g. in [2].

Generally, multirotors do not possess the energy efficiency of a fixed wing aircraft for long-distance flight, since the research focus is mainly placed on their Vertical Take-Off and Landing (VTOL) properties rather than the utilization of wings to produce a lifting force. Thus, the goal of developing an aircraft with long-distance efficiency and VTOL capabilities recently increased interest in the tilt-rotor or tilt-wing aircraft, which is a combination of a multirotor and a fixed-wing aircraft [3], [4], [5], [6].

The primary novelty presented in this research stems from the formulation of an in- novative modelling and control scheme for an optimally designed novel Tilt-Wing UAV (TW-UAV). With regards to the optimality of the design, the interested reader can di- rectly refer to [3]. In this research, for consistency, the main characteristics of the second revision of the design mentioned in [3] will be presented in detail. A tilt-wing instead of a tilt-rotor design was chosen for this type of aircraft, since rotating the wing in parallel with the motor while transitioning between flying and hovering modes provides impor- tant mechanical advantages. Specifically, the drag caused by a propeller partially causing air flow over the wing is minimized, and this seemingly small difference in energy con- sumption proves crucial when it comes to the development of small-scale UAVs, where the available power is hugely limited due to their design characteristics [7]. In addition, having fewer moving parts reduces the complexity of the physical structure as well as that of the mathematical model. This in turn translates into simpler control structures.

Thus it is advantageous to base the design on a previously built prototype [3] so that more precise improvements can be evaluated, whilst existing experimental data can still be applied.

1

(11)

2 Introduction The second novelty presented in the research comes from the proposed modelling and control scheme based on conventional algorithms for the preliminary evaluation of the hovering characteristics of this innovative design. For this purpose, a cascade P-PI con- troller is utilized to control the attitude of the aircraft, whilst multiple PID loops are used for the position control.

Finally, the results of experiments utilizing the proposed control structure are pre- sented. A series of tests were performed, starting with manual rate control and se- quentially adding more complexity to the controller until a fully autonomous flight with position references was performed. This report will serve as a base for continued work on the implementation of a control scheme for cruising, hovering, and the transition between the two states.

The control structure, programmes and applications used during this research were sug-

gested by the supervisors of the main author. Part of this research was published at the

24th Mediterranean Conference on Control and Automation (MED16) as a preliminary

design evaluation article [8].

(12)

C HAPTER 2 Physical Design Properties

2.1 Prototype

The proposed TW-UAV was initially based on the design presented in [3]. The graphical representation of the novel TW-UAV with all the components of interest highlighted is depicted in Figure 2.1.

Battery and Electronics Compartment

Electric Motor

Worm Drive Motor

Aileron

Worm Drive

Electric Ducted Fan (EDF) Tail Fin with Rudder

Tail Wing with Elevators Alluminum Tail Shaft

Servomotors

Figure 2.1: Graphical representation of the TW-UAV with components of interest high- lighted.

3

(13)

4 Physical Design Properties

2.2 Design Properties

Figure 2.2: Graphical representation of the TW-UAV during (a) flying, (b) dynamic, and (c) hovering states.

For consistency with [3], in the formulation of the modelling and control framework, each major structural part is described below and any modifications in the revised version of the adopted design for the TW-UAV are discussed in Section 2.3.

Given the complexities introduced when switching between the two flight modes (VTOL and plane modes), a design with as few moving parts as possible, while maintaining structural rigidity and stability, is desirable. One solution to this problem is to have the main wings and propellers joined as one structure that can rotate around an axis perpendicular to the chassis of the aircraft as indicated in Figure 2.2.

In addition, the wing structure is both rotated and held in place by a swivelling mech- anism called a worm drive as indicated in Figure 2.3. In this case, an electric motor drives the worm, which in turn rotates a worm gear to which the entire wing structure is attached. The motor can rotate the wings, but the mechanics of the drive prevent any other rotational forces to be transferred the wings.

The main chassis of the TW-UAV, i.e. the aluminium structure holding the worm

Figure 2.3: Graphical detail of the worm-drive mechanism.

(14)

2.3. Modifications 5 drive, the battery, and the electronic components, is designed to hold the worm drive in place effectively, while providing ample space for the battery and electronics.

A fundamental complication in the prototype design of the TW-UAV [3] was that the tail experienced excessive vibration and wobbling. This effect could be traced to the fact that the tail shaft was cylindrical and therefore prone to twisting and bending in an undesirable manner. This problem was solved by exchanging the cylindrical carbon fibre tube with a hollow aluminium shaft with a square profile. This easily implemented exchange provides a sturdier and more efficiently assembled tail section.

The most noticeable change made to the prototype design is the size and width of the wing surfaces. A longer in-length air foil is utilized, which allows the shortening of the wingspan in order to add mechanical stability, while increasing lift capabilities of all the wing surfaces.

Most conventional aeroplane structures are constructed with a tail wing that generally produces down force to stabilize the tail since the Centre of Mass (COM) is located near, or in front of, the centre of lift [9]. In the proposed TW-UAV design, the COM is behind the main wings so as to ensure hovering capabilities, resulting in the tail structure having a substantial relative weight with respect to the rest of the aircraft. For this reason, the tail wings are constructed to provide lift for the entire tail section by utilizing the same wing profile as the main wings while simultaneously having elevators that can vary this lift significantly during flight so as to provide elevation control capabilities.

2.3 Modifications

A landing gear was not designed for the prototype. Consequently, for the experimentation undertaken in this research a landing gear for vertical take-off and landing needed to be designed and constructed. A connecting mechanism for the EFD servo also needed to be constructed. All plastic components in this section were designed with Siemens NX and 3D-printed with Ultimaker II.

Materials available in the Field Robotics Laboratory (FROST) of the Department of Computer Science and Electrical Engineering at Lule University of Technology were identified and used for rapid prototyping of a robust landing gear structure. 3D-printed PLA plastic, carbon fibre poles, and steel wire were used to make it lightweight and durable.

The feet are attached to the struts with a ball joint so that even if the TW-UAV landed

at an angle inclined to the horizontal, the feet would make full horizontal contact with

the landing surface. This joint can clearly be seen in Figure 2.4. The flexibility of the

carbon fibre struts allows for a degree of impact absorption but over-flexing and breakage

is hindered by the steel wires connecting the feet.The struts are rigidly mounted to the

aluminium frame of the TW-UAV with 3D-printed brackets. Figures 2.4 and 2.5 show

these features. This landing gear designed proved to be effective as the landing structure

absorbed the impact of most landings and in cases where damage occurred the effected

(15)

6 Physical Design Properties

Figure 2.4: The landing gear with ball joint to the foot and support wires visible.

(a) Bracket for front foot. (b) Bracket for rear feet.

Figure 2.5: 3D-printed brackets for holding the carbon fiber tubes in place.

pieces could be easily replaced.

The other addition that was made was a 3D-printed connecting mechanism between the EDF servo and the swivel arm on which the EDF is mounted and manoeuvred.

Previously copper wire connected to a lateral screw had been used but proved ineffective

as the wire could not tolerate the pulling and pushing forces of the servo, and the wire

blocked the servo from reaching its maximum angle. The plastic arms on the connecting

mechanism are curved so as to allow the servo to reach its maximum extension and

thereby increasing the angle to which the EDF could be rotated. The mechanism can be

seen in Figures and , in horizontal and fully rotated positions respectively.

(16)

2.3. Modifications 7

(a) Servo in horizontal position.. (b) Servo fully rotated.

Figure 2.6: Connecting mechanism between servo and EDF shown in horizontal and rotated positions.

Figures 2.7 and 2.8 show the completed prototype with all components installed and

ready for experimentation. The Kfly was placed in the center of gravity to maximize the

efficiency of the gyro.

(17)

8 Physical Design Properties

Figure 2.7: The landing gear with ball joint to the foot and support wires visible.

Figure 2.8: The landing gear with ball joint to the foot and support wires visible.

(18)

C HAPTER 3 Modelling and Control

3.1 Mathematical Model

This section presents the mathematical model for the hovering mode of the TW-UAV.

Firstly, the force and torque equations are derived from the acting force diagram presented in Figure 3.1 as shown below.

z x y

φz

φx

φy

O

Mr

θw

θe

A C

D B

E

F Ml

Fp

Fs

mg

Fr

Fl

Me

Fe

Figure 3.1: Acting force diagram of the TWUAV in hovering state. F l , F r , and F e are the forces produced by the port and starboard motors, and the EDF, F p and F s are the forces produced by air flow over the wing profile, M l , M r , andM e are momentum caused by the spinning propellers or fan, mg is the force caused by gravitational acceleration and mass, θ w is the angle of the wing to the body (zero along the x-axis), θ e is the angle of the EDF from the z-axis, and the capital letter (O and A through F ) denote points of interest so that distances can be indicated. The COM is in E.

9

(19)

10 Modelling and Control

 F

x

F

y

F

z

τ

x

τ

y

τ

z

=

−(F

s

+ F

p

) · sθ

w

+ (F

l

+ F

R

) · cθ

w

F

e

· sθ

e

(F

r

+ F

l

) · sθ

w

+ F

e

· cθ

e

+ (F

s

+ F

p

) · cθ

w

(F

l

− F

r

) · sθ

w

· (AO) + (M

r

− M

l

) · cθ

w

+ +(F

p

− F

s

) · cθ

w

−(F

l

+ F

r

) · sθ

w

· (OE) + F

e

· cθ

e

· (EF )−

−M

e

· sθ

e

F

e

· sθ

e

· (EF ) + (M

r

− M

l

) · sθ

w

− M

e

· cθ

e

+ +(F

p

− F

s

) · sθ

w

+ (F

e

− F

l

) · cθ

w

· (AO)

 + R

 0 0

−mg 0 0 0

(3.1)

where sinθ = sθ and cosθ = cθ, (AB) is the (distance between point A and point B), and R 6x6 defined as:

R = R rot 0 3x3

0 3x3 0 3x3



(3.2) where R rot is a three by three rotational matrix, representing the attitude of the body in relation to the direction of the gravitational acceleration.

At this point it should be highlighted that the additional aerodynamic forces exerted on the body and caused by movement through the air are neglected in the hovering state, where the angle of the wing θ w will be fixed at 90 degrees. Furthermore, the forces produced by the flow of air from the propellers over the wing profile – F s and F p – are neglected because the minimal force produced can easily be compensated for by a robust controller. Thus, for the case of hovering, the above Equation 3.1 is simplified to:

 F x

F y F z τ x

τ y τ z

=

0 F e · sθ e F r + F l + F e · cθ e

(F l − F r ) · (AO)

−(F l + F r ) · (OE) + F e · cθ e · (EF ) − M e · sθ e F e · sθ e · (EF ) + M r − M l − M e · cθ e

 + R

 0 0

−mg 0 0 0

(3.3)

Furthermore, the system model can be derived by using the Newton-Euler kinematics for a rigid body[10]. Thus the Newton-Euler equations are formulated as:

F τ



= mI 3x3 0 0 I cm

 a cm

˙ ω

 +

 0

ω × (I cm ω)



, (3.4)

where F = F x F y F z

 T

∈ R 3 is the force acting on the COM, τ = τ x τ y τ z

 T

∈ R 3 the torque around the COM, ω = ω x ω y ω z  T

∈ R 3 the angular velocity, a cm =

a x a y a z

 T

∈ R 3 the acceleration of COM, I 3x3 is the 3x3 identity matrix and I cm the inertia matrix, which is defined as:

I cm =

I xx I xy I xz

I yx I yy I yz I zx I zy I zz

 ∈ R 3x3

.

(20)

3.2. Control Scheme 11 The Newton-Euler equations in Equation 3.4, solved for the acceleration and the angular acceleration yield:

a cm

˙ ω



= mI 3x3 0 0 I cm

 −1

F τ



− mI 3x3 0 0 I cm

 −1  0 ω × (I cm ω)



, (3.5)

The work done by [11] has shown that both the force and the momentum produced by the propellers are proportional to the square of the input signal to the motor. Con- sequently, the forces exerted by the motors as well as the momentum from the rotating propellers are modelled as a constant multiplied by the square of the input signal as follows:

F i = A F,i · u e 2 i (3.6)

M i = A M,i · u e 2 i (3.7)

e u i = 1

τ s,i + 1 · u i (3.8)

where F i and M i are the force and momentum exerted by the propeller respectively, A F,i and A M,i are the force and momentum constants, τ s,i the time constant for the motors, and u i (0 6 u i 6 1) for i = 1, 2, 3, defines the signals to the motors and servo. Since the left and right propeller motors will have the same physical properties, they will have the same force constant A F,r and momentum constant A M,r , but different input signals.

The signal notations will be u 1 , u 2 , and u 3 for the port motor, starboard motor and EDF respectively. The angle of the EDF servo can be defined as:

θ e = π

3 · u 4 , −1 6 u 4 6 1 (3.9)

where u 4 is the signal to the servo.

The final hovering model calculated from (3.3) and (3.5) can then be derived as:

 a

x

a

y

a

z

˙ ω

x

˙ ω

y

˙ ω

z

=

0 sθ

e

· A

F,e

u

23

A

F,r

m

m · ( u e

22

+ u e

21

) + cθ

e

· A

F,e

· u e

23

A

F,r

· ( u e

21

− u e

22

) · (AO) m

I

xx

+ I

xy

+ I

xz

− ω

2x

−A

F,r

· ( e u

21

+ e u

22

) · (OE) + A

F,e

· u e

2e

· cθ

e

· (EF ) − A

M,e

· e u

2e

· sθ

e

I

yx

+ I

yy

+ I

yz

− ω

y2

A

F,e

· e u

23

· sθ

e

· (EF ) + A

M,r

· e u

22

− A

M,r

· u e

21

− A

M,e

· u e

23

· cθ

e

I

zx

+ I

zy

+ I

zz

− ω

z2

 + R

 0 0

−g 0 0 0

(3.10)

where u e 1,2,3 are defined according to (3.8) and the angle θ E defined in (3.9).

3.2 Control Scheme

For the preliminary evaluation of the TW-UAV’s hovering capabilities, a control scheme

based on the utilization of angle (P), angular velocity (PI) and position (PID) controllers

(21)

12 Modelling and Control

φz,ref P-PI KP,iKI,iKD,i

[u , u ]x yT

x y

ω ,ω ,ω ]zT [x, y, z]refT

uz

Attitude Control Position Control

[u ,u ]p rT [u ,u ,u ]1 2 3T

PID [x, y, z]T

x y

[φ ,φ ,φ , z SM

u4

TW-UAV

Figure 3.2: Position and attitude control structure for the TWUAV.

PI

P [φ ,

x

φ ,

y

φ ]

z j T

e e

k x y

[ω , ω , ω ]

zT

+ - + -

K

P,j

K

P,k

K

I,k

u

j

u

k

[u , u , u ]

x y zT

TW-UAV

Figure 3.3: P-PI structure for the attitude control for the TWUAV.

was used as indicated in Figure 3.2. In particular, for the attitude control, a cascade P-PI controller (Fig. 3.3) was implemented, where three separate PI controllers were used to control the angular velocities around the x (roll), y (pitch), and z (yaw) axes, while the reference angle is fed through a P regulator for extracting the reference for the angular velocity. Figure 3.2 presents the whole control system architecture.

The inputs for the controllers are a position and a yaw angle, the position being a three dimensional vector and the yaw a value in radians. All simulations and experiments are designed to use these four values as inputs to be able to vary the TW-UAV’s position in the reference frame.

Attitude Control: P-PI Controller

The specifics of the P-PI controller described here are presented in Figure 3.3 below, with references made to the symbols as shown.

The first aspect of the control scheme is the control of angular velocity around each

axis of the TW-UAV, i.e. roll (x ), pitch (y), and yaw (z ). Each axis is controlled by

an individual P-PI controller. The inputs of the three attitude controllers are two angle

values produced by the PID controller (x and y), and the reference yaw angle ϕ z,ref . The

error (e j ) between each of the reference and measured angles is multiplied by a constant

(K P,j ) to produce a reference angular velocity for each PI controller. This new reference

(u j ) is compared to the measured angular velocity and the error between them (e k ) is

sent to the PI controller. The PI will attempt reduce the error for the next iteration,

using the constants K P,k and K I,k . The PIs output three values (u k ) which are then

used to control the motors and servo. The roll (u r ) and pitch (u p ) values are sent to a

(22)

3.2. Control Scheme 13 Signal Mixer (SM) where they are converted to signals to the motors, and the yaw (u 4 ) value is sent directly to the servo controlling the angle of the EDF.

The output values of the controllers are directed though the SM before being used as inputs to the motors. The output of the roll controller is subtracted from one propeller motor and added to the other one, depending on which way the UAV needs to roll.

Similarly, the pitch control output is either subtracted from the EDF signal and added to both the propeller motors or vice versa. The SM also has a saturation filter so that all outputs are limited to between 0 and 1 corresponding to minimum and maximum thrust. As mentioned above, for the yaw control the output is directly sent as an input signal (limited to a value between -1 and 1) to the EDF servo. In equation form the corresponding signals can be defined as follows:

u 1 = u z + u r − u p (3.11)

u 2 = u z − u r − u p (3.12)

u 3 = u z + u p (3.13)

Since the goal of this research was primarily to prove the functionality of design rather than to optimise the controller, the cascaded nature of this control scheme, i.e. the fact that a single signal is calculated by several controllers in a series, and the associated time delays of each controller are not considered significant at this stage in the research.

Position Control: PID Controller

Three PID loops were implemented to control position, since only the position is assumed

to be measurable. This assumption is based on the idea that hovering will be tested in a

camera lab or other position tracking system. Outputs of the x-position and y-position

controllers are directly inserted as references (u x and u y respectively in Figures 3.2 and

3.3) to the roll and pitch P-PI controllers. The height control output (u z ) is inserted as

a throttle signal to both propeller motors and to the EDF as shown in equations 3.11,

3.12, and 3.13. The PIDs use three constants each (K P,i , K I,i , and K D,i ) and have the

measured position in the reference frame (room) as feedback.

(23)
(24)

C HAPTER 4 Simulations

The TW-UAV’s response to the control structure was evaluated through a series of sim- ulations. The purpose of these was to verify the ability of the control structure to satisfactorily control the TW-UAV in actual experiments. These simulations included a torque disturbance simulation, a position step-reference response simulation, and a path following simulation. The angular references in all the simulations were set to zero, i.e.

the attitude coordinates of the aircraft would always be the same as those of the reference frame. Sensor noise disturbance was added to all the outputs in the simulation to observe the controllers’ ability to handle noise. Table 4.1 shows the size of the noise added to the outputs. It should be noted that all the simulations were run with a sample rate of 50 Hz.

Table 4.1: Noise Disturbance

Output Amplitude of random noise

Position 0.001 2 m

Angular Velocity 0.17 2 rad/s Body Angle 0.0087 2 rad

In these simulations, a Computer Aided Design (CAD) programme was used to produce the inertia matrix I cm . In this approach, proper design materials were added to the different parts in the CAD model so that the weight, centre of mass, and inertia matrix could be estimated for use in the simulations. In the calculations, the wings and holders for motors and servos were considered to be designed with a PLA plastic with 20 percent infill, which is a reasonable density for this type of structure[3]. The wings’ profile was

15

(25)

16 Simulations the same as in [3],i.e. NACA4412, but scaled from a 0.15m chord (distance from the front of the wing to the back) to a 0.25m chord. This allows the wingspan to be shortened from a 1.58m wingspan to 1.00m to provide more mechanical stability. In addition, the tubes strengthening the wings and the drive shaft for the worm drive were set to carbon fiber in the design. The chassis and other flat structural parts were set as aluminium, and lastly the motors, battery, and servos were given masses corresponding to commercially available products of their intended size.

In Table 4.2 the parameters and the applicable dimensions of the simulated aircraft are shown. Most parameters are taken from the CAD model except for the weight and motor constants. The weight has a reasonable margin added to the weight calculated by the CAD software for cables and electronics and the motor constants are estimated from commercially available motors and EDFs. The control parameters utilized in the proposed control scheme in Chapter 3 are displayed in Table 4.3.

Table 4.2: Design parameters of the TWUAV

Parameter Value Unit

(OE) 0.15 m

(OA),(OB) 0.56 m

(EF) 0.745 m

m 4.9 Kg

I xx 433.6 · 10 3 Kg · m 2 I yy 528.8 · 10 3 Kg · m 2 I zz 921.6 · 10 3 Kg · m 2 I xy , I yx 7.467 · 10 3 Kg · m 2 I xz , I zx 22.573 · 10 3 Kg · m 2 I yz , I zy −0.938 · 10 3 Kg · m 2

A F,L , A F,R 30 N

A F,E 20 N

A M,L , A M,R , A M,E 1 N · m

τ s,1 , τ s,2 0.15 s

τ s,3 0.2 s

(26)

4.1. Torque Disturbance 17

Table 4.3: Control parameters of the TWUAV

Gain Values(x, y, z) K P,i 0.09 0.05 1 K I,i 0.05 0.03 0.35 K D,i 0.2 0.03 1

K P,j 1 1.4 1

K P,k 0.05 0.07 1 K I,k 0.08 0.06 1

4.1 Torque Disturbance

In Figure 4.1 the aircraft has a constant position reference but disturbance torques are added around each of the main axes to observe the attitude control and response. In the one-hundred seconds simulation, a 3 Nm torque pulse is added around the x-axis at 30 seconds(d1), a 3 Nm torque pulse is added around the y-axis at 45 seconds(d2), and a 5 Nm torque pulse disturbance around the z-axis at 60 seconds(d3). The corresponding control signals to the motors (u 1 , u 2 , and u 3 ) and servo (u 4 ) can be seen in Figure 4.2.

-0.4 -0.2 0 0.2 0.4

-1 -0.5 0 0.5 1

-0.2 0 0.2 0.4

50 60 70 80 90 100

0 10 20 30 40

t [sec]

φx [rad]φy [rad]φz [rad]

Reference Angle Response

50 60 70 80 90 100

0 10 20 30 40

t [sec]

50 60 70 80 90 100

0 10 20 30 40

t [sec]

d1

d2

d3

Figure 4.1: Simulated response of the TW-UAV to a constant position reference. Dis-

turbance torques are applied in random intervals to test its hovering capabilities.

(27)

18 Simulations

0.5 0.75 1

0.5 0.75 1

0.3 0.65 1

-1 -0.5 0 0.5 u1u2u3u4

50 60 70 80 90 100

0 10 20 30 40

t [sec]

50 60 70 80 90 100

0 10 20 30 40

t [sec]

50 60 70 80 90 100

0 10 20 30 40

t [sec]

50 60 70 80 90 100

0 10 20 30 40

t [sec]

d1 d2 d3

Figure 4.2: Corresponding control effort signals to the TW-UAV motors for the simulation presented in Figure 4.1.

From the results obtained it is obvious that the control scheme is able to track varying references well, even in the case of intense and multiple external disturbances. The disturbances simulated are such that they could potentially cause significant deterioration of the overall performance of the closed loop system, even resulting in instabilities that could cause crashes. The controller also achieves rapid convergence to the reference signal, without intense signal overshoots and oscillations. Therefore, after the introduction of a disturbance, the TW-UAV performs a quick recovery in tracking, of only a few seconds in duration, a characteristic that is highly desirable in real-world environments.

4.2 Position Step-Reference Response

In Figure 4.3 the TW-UAV’s response to a changing position reference is simulated. In

Figure 4.4 the corresponding three dimensional representation of the reference signals

and responses are depicted in order to provide a better understanding of the reference

input in relation to the achieved tracking response. The results show that both the x

and y position responses are slower than the z position response. This is due to the

cascaded nature of their controllers, i.e. the PIDs’ results are directly inputted as the

(28)

4.2. Position Step-Reference Response 19 P-PIs’ references, increasing the number of iterations needed for x or y position changes compared to the z position, which does not pass through a P-PI. The scheme does nevertheless track the desired position reference with acceptable settling times and few oscillations. The Root Mean Square Error (RMSE) of the reference and achieved response for the x, y, and z positional translation shown in Figure 4.3 is depicted in Table 4.4. As expected, the RMSE in z is less than those of x and y.

-5 0 5

-2 0 2 4

100 120 140 160 180 200

0 2 4 6

0 20 40 60 80

t [sec]

100 120 140 160 180 200

0 20 40 60 80

t [sec]

100 120 140 160 180 200

0 20 40 60 80

t [sec]

x [m]y [m]z [m]

Reference Position Response

Figure 4.3: Step reference and response for position in x, y, and z.

Table 4.4: Root Mean Square Error in Fig. 4.3

RMSE Value

Error in x 0.3382 m

Error in y 0.3524 m

Error in z 0.3071 m

(29)

20 Simulations

0 0.5 3 1 1.5 2 2.5

6 2

3 3.5 4

4 4.5

1 0 0 2

-1 -2

-2 -4 x [m]

y [m]

z [m]

Reference Trajectory Position Response

A(0,1,1)

B(0,1,2) C(1,1,2)

D(1,2,2)

E(1,2,4) F(3,2,4)

G(1,0,4)

H(1,0,1)

Figure 4.4: 3D representation of the reference signals and responses from Fig. 4.3

4.3 Path Following

It should be noted from the simulation discussed in the previous section that for the first 20 seconds of simulation the lack of a simulated floor, the lack of consideration of any ground effect, and the different start-up times for the motors cause the TW-UAV to diverge slightly from both the reference and the starting position. For this reason, the following simulation highlights the TW-UAV’s response behaviour once it has started up, taken off and settled at 0.5m above the ground.

Figure 4.5 shows a position reference and the corresponding position response as in

the previous simulation, but with the first twenty five seconds erased, in order to avoid

consideration of the effects of the initial transient response. As in the previous scenarios

considered, the response of the TW-UAV is fast and accurate. Nevertheless, due to

sudden alterations of the reference, an overshoot-like response at the corresponding time

instances is observed but with a rapid settling time and with no oscillations. The inertia

of the the TW-UAV when rapidly changing direction of travel is partially responsible for

the above mentioned overshoot. In the simulated system, the different input values to

the controllers could be further tuned to minimize the overshoot, but the result would

be only marginally different. By changing the control system to a more complex system

such as a model predictive controller (MPC) the errors could be significantly reduced,

but require a lot more computing power than a PID controller. For the purposes of this

study the PID control system was deemed sufficient. Finally, in Table 4.5 the RMSE

between the reference and the obtained response for the x, y, and z positions for this

simulation is presented.

(30)

4.3. Path Following 21

0 3 0.5 1 1.5

2 3

2

2.5 2.5

2 3

1 1.5

3.5

1 4

0 0.5

-0.5 0 -1 -1 A

(0,0,0.5)

B

(0,0,2)

C

(0, 2, 2)

D

(2, 2, 2)

E

(2, 0, 2)

F

(0.5, 0, 2)

Reference Trajectory Position Response

x [m]

y [m]

z [m ]

Figure 4.5: Position reference response of the TWUAV. The aircraft is in position A at 25 seconds after the simulation start.

Table 4.5: Root Mean Square Error in Fig. 4.5

RMSE Value

Error in x 0.1194 m

Error in y 0.2151 m

Error in z 0.0322 m

(31)
(32)

C HAPTER 5 Electronics and Programming

5.1 Hardware

An elecronic hardware setup was needed to begin experimentation on the TW-UAV.

The setup included a computer ground station with wireless connection to an on-board internal measurement unit (IMU) and processor which in turn were connected to the servo and motors.

5.1.1 KFly Circuit Board

The on-board IMU and processor were located on a printed circuit board (PCB) designed by Emil Fresk in [12] named KFly. The KFly had been programmed to use certain software which will be discussed in subsection 5.2. The KFly contains the following components:

• ST’s STM32F405 CPU: 32-bit ARM Cortex-M4F @ 168 MHz with 32-bit FPU and DSP

• Invensense’s MPU-6050 accelerometer / gyroscope

• Honeywell’s HMC5983 magnetometer

• Meas. Spec.’s MS5611 pressure sensor

• 8 outputs (50 Hz / 400 Hz / Oneshot125)

• 4 expansion connectors (3 UARTs & 1 CAN port)

• 6 slot RC input connector with support for (C)PPM up to 8 channels in and signal strength

• 433 MHz RF link for data, command and control transfers

23

(33)

24 Electronics and programming

Figure 5.1: The on-board PCB KFly.

5.1.2 Other Hardware

Hardware on the TW-UAV also included three motors with respective electronic speed controls (ESCs), a six cell lithium ion battery, and two receivers for wireless transmission.

The receivers connected to the PCB were an Radio Control (RC) receiver for manual control via RC controller and an XBee wireless serial link to communicate with the ground staion. The ground station was a standard PC laptop using Linux.

5.2 Software

Before experimentation started, MATLAB was the programme used for calculations and simulations. MATLAB was also used to produce graphs and figures for the experimental part of the thesis. When communicating with the TW-UAV however, Robot Operating System [13], or ROS, was used.

5.2.1 KFly Software

The software specifications of the KFly are as follows:

• Runs ChibiOS 16

• Flight control modes

– Direct motor control which allows direct control of the motors

– Indirect motor control through an affine map of throttle, roll, pitch and yaw control signals

– Rate mode with throttle and rate references

(34)

5.3. Experimental System and Laboratory Set-up 25 – Attitude mode with throttle and attitude references

• Fully controllable over serial / USB

• Supports full calibration of IMU gain, bias and orientation

The software on this device was designed to communicate with the ground station through ROS, a communication system developed specifically for robots such as the TW-UAV. ROS is discussed in 5.2.2.

5.2.2 Robot Operating System (ROS)

ROS is a collection of software frameworks for robot software development that provides language and platform independent tools for building and distributing ROS-based soft- ware. One should note that ROS is not a real-time operating system (OS) as the name could imply, but rather rather a provider of stadnard operating system services such as hardware extraction, low-level device control, and message-passing between processes.

ROS is open source software making it ideal for research purposes.

5.3 Experimental System and Laboratory Set-up

Experiments took place in LTU’s FROST, where a motion capturing camera system called

Vicon was installed. Within the lab a square area with mattresses and a surrounding

net was used as a testing area. The mattresses and net were vital for operating safely

considering the TW-UAV’s size. Small reflective balls were attached to the TW-UAV

so that the Vicon system could track the TW-UAV’s position and attitude in relation

to the framework of the lab. The actual control calculations were done by the ground

station which in turn sent instructions to the TW-UAV. Information from the gyro,

accelerometer, and Vicon was then sent back to the computer for new control calculation

iterations thereby closing the information loop.

(35)
(36)

C HAPTER 6 Experimental Evaluation

6.1 Static Test of Engine and Servo

Before any actual flight experiments could be made, all electronic components were tested.

Stationary tests were made so that the servo to the EDF could be calibrated and to ensure that the engines responded correctly to signals from PCB. Connection between the ground station (PC) and the KFly was established and reflective balls attached to the frame for the motion capture system (VICON).

6.2 Remote-Controlled Angular Velocity Reference Test

The first flight test executed was through manual control from an RC controller. The signals from the controller were angular velocity references around the three axes and a throttle signal. Through using these signals the PI controller (angular velocity controller) could be calibrated before using only angular signals as inputs for the complete attitude controller (P-PI).

The test consisted of a series of short flight tests conducted by a pilot with experience in using a remote control to send rate signals rather than angular signals (as is commonly used in traditional RC flight). After each flight the P and I values were changed until the pilot was satisfied with the TW-UAVs response to his inputs. The P value was established before the I value to make the iteration process as simple as possible.

During this test it was found that the TW-UAV could hover at about 50% throttle input. This showed the validity of the engines used for this prototype, implying the possibility of adding a payload in later tests. A graph of the throttle signal during flight is shown in Figure 6.4 in the next section.

27

(37)

28 Experimental evaluation

6.3 Remote-Controlled Angle Reference Test

Once the P and I values were set for rate control, a full attitude-control test flight could be executed. In this experiment a pilot used a remote control to send a throttle signal and angular reference signals for attitude in the x-, y-, and z-axes of the reference frame (the room). A short flight was performed to check the P values for the attitude control.

Table 6.1 lists the controller values after calibration of the P-PI where the subscripts 1 and 2 refer to the P and PI controllers respectively.

Table 6.1: Noise Disturbance

Variable Value P x1 1.00 P x2 0.038

I x2 0.06 P y1 1.00 P y2 0.042

I y2 0.06 P z1 1.00 P z2 0.05 I z2 0.05

A longer flight was then executed where the pilot attempted to hover and maintain constant attitude as long as possible. Because of bandwidth issues only about thirty- seven seconds of data could be recorded before experimentation had to stop to send the data to a computer. The rest of this chapter will discuss the data graphs from the successful hovering of the TW-UAV in this experiment. Note that all graphs in this chapter are only parts of longer data recordings. For this reason the time scale on the bottom axis of the graphs do not start at zero and may have different timestamps due to being recorded on different devices.

Figure 6.1 shows the angular rate of the TW-UAV and the torque signals sent from the P/PI controller during flight. The rates remain at low values throughout the flight indicating that the controllers are not too aggressive and respond very fast to even small changes in rate, producing smooth control during hovering. Around the y-axis a bias can be observed from the controller as it compensates for the difference in lifting force produced by the front and back of the TW-UAV. Rate and torque around the z-axis is shown again in Figure 6.2 to more clearly highlight the bias formed here by the controller.

This bias is due to the inequality of torques from the rotating propellers and cause the

(38)

6.4. Position Reference Test 29 EDF to be slightly slanted during stable hovering to compensate for said torque.

-1 0 1

ω

x

(rad/s)

-0.2 0 0.2

Torque (Nm)

Rate vs. Torque signal

-0.5 0 0.5

ω

y

(rad/s)

-0.2 0 0.2

Torque (Nm)

20 25 30 35

time (s) -0.2

0 0.2

ω

z

(rad/s)

-0.1 0 0.1

Torque (Nm)

Figure 6.1: Angular rate plotted against commanded torque signals sent by the controller.

From motion capture data the attitude of the TW-UAV could be recorded throughout the flight. The attitude remained stable and responded smoothly to the pilots RC signals as can be observed in Figure 6.3. As stated in the previous section the throttle required for hovering was around 50% and this is shown in Figure 6.4.

6.4 Position Reference Test

The final experiment executed was one to calibrate and test the PID position controller.

The goal was to have the TW-UAV to perform stable hovering while only receiving a position reference from the ground station. A pilot was on standby equipped with an RC remote control with a switch to change between automatic (position reference from PC) and manual (angle reference from RC remote) control. This was a safety feature provided to minimize risk of an uncontrolled crash of the aircraft.

Although the experiment initially seemed to go as planned, the TW-UAV unfortunately

crashed into the safety net containing the flight area. A large amount of data was lost in

the crash as the battery was disconnected to prevent the electric motors from overheating,

causing the on-board PCB to lose power and not be able to send experimental data to

(39)

30 Experimental evaluation

10 15 20 25 30 35

time (s) -0.2

-0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3

Angular rate around z-axis (rad/s)

-0.1 -0.05 0 0.05 0.1 0.15

Torque z (Nm)

Yaw bias

Figure 6.2: Angular rate and Torque signals around the z-axis. Note the bias of the torque signal.

the ground station. The data recorded from VICON and the ground station was however enough to deduce the cause of the accident.

In Figures 6.5, 6.6, and 6.7, a red line indicates the time when control of the TW-UAV was lost. Firstly, we can see in Figure 6.5 that the throttle was over 100% when control was lost. This indicates that the saturation threshold in the code for the throttle was too high. When the motors received a signal higher than what is achievable, roll and pitch commands could no longer be accepted as the motors would already be working at maximum capacity. For example, if the two front motors received 125% and 115%

respectively, the result would still be 100% for both, and thereby not causing change in the roll angle.

Secondly, an unfortunate timing problem occurred when switching from automatic to

manual control, namely that manual control was switched on mid-air causing the aircraft

to drop out of the air more than one meter from the ground (see height peak before control

loss in Fig 6.7). The derivative in the PID tried to compensate for this rapid drop in

height by substantially increasing the throttle, and due to the afore mentioned saturation

error, increased the throttle to a level where control was impossible. Automatic control

was turned on during this peak in throttle signal and the TW-UAV was sent careering

into the net before either pilot or controller could react. Video footage confirmed that

the starboard wing partially broke off on impact with the ground after dropping from

(40)

6.4. Position Reference Test 31

-5 0 5

roll (deg)

Attitude during Attitude test

-10 0 10

pitch (deg)

75 80 85 90 95 100

time (s) -100

-80 -60

yaw (deg)

Figure 6.3: Attitude during flight as observed by the motion capture system (VICON).

20 25 30 35

time (s) 10

15 20 25 30 35 40 45 50 55 60

Throttle (%)

Throttle during hovering

Figure 6.4: Throttle signal from the RC controller during flight test.

(41)

32 Experimental evaluation the air, further reducing the controllability of the TW-UAV after automatic control was turned on. Figure 6.6 shows that loss of control affected roll most rapidly, which can be expected given the errors previously discussed.

-2 0 2

roll (deg)

Attitude reference signals

-1 0 1

pitch (deg)

-1 0 1

yaw (deg)

830 835 840 845

time (s) 0

50 100 150

throttle (%)

Figure 6.5: Graph of the attitude reference signals sent from the PID controller.

(42)

6.4. Position Reference Test 33

-200 0 200

roll (deg)

Attitude during PID test

-100 0 100

pitch (deg)

830 835 840 845

time (s) -200

0 200

yaw (deg)

Figure 6.6: The recorded attitude of the TW-UAV by VICON.

-2 -1 0

x (m)

Position during PID test

-5 0 5

y (m)

830 835 840 845

time (s) -2

0 2

z (m)

Figure 6.7: The recorded position of the TW-UAV in the room by VICON.

(43)
(44)

C HAPTER 7 Conclusions and Discussion

7.1 Conclusion from Simulation Studies

The main conclusion drawn from the simulations was that the design of the physical model was viable for experimental evaluation. Considering the TW-UAV’s size and simple actuators, the aircraft was able to follow the references well and sustain its attitude easily even though only a conventional control scheme was used. The attitude responses showed that having a P-PI controller for attitude control was suitable, since the responses were fast and robust even though the added torques were large. For the position control, the cascaded PIDs were rather slow in responding to the fast changes in reference, a fact that indicates the need for a faster control scheme development, the use of a model based controller, or a further tuning of the existing one.

7.2 Discussion of Experimental Results

Although the results from the experiments were not as theoretically conclusive as was intended, a few conclusions can still be drawn from the results. The TW-UAV did indeed hover in a stable manner during the attitude reference experiment, proving the viability of the P-PI controller as an attitude controller. The crash that occurred during the last experiment did not disprove the viability of the PID, since human error was the cause of the accident.

Structurally, the prototype behaved well in flight. The structure was however not strong enough to handle the drop from one meter, as the carbon fibre tube supporting the starboard wing broke on impact. This shows that a revision of how the wings are attached to the worm drive and each other needs to be revised before a new prototype is built.

The fail safe switch used in the final experiment had disastrous consequences as the PID kept doing calculations even when it did not have control of the TW-UAV. If such

35

(45)

36

a switch is used in the future the controller needs to stop calculating and resume from start values when it is turned back on. In particular the integrals in the PIDs need to be paused or reset when manual control is initiated. The P and D values don’t need to be handled specifically but a saturation on the derivative could be necessary.

7.3 Future Work

To continue work on the TW-UAV a few changes first need to be made to the structure of the aircraft. As mentioned above, the attachment of rotatable wings to the aircraft body needs to be revised. A potential solution would be to introduce a second carbon fibre tube connecting the two wings with each other, and perhaps to the worm wheel as well. A general reduction in the overall size of the mechanism would also reduce the size of the next prototype.

A software improvement would be to ensure that no data is lost even if power is cut by

having the PCB store the data on board instead of having to send it to a ground station

through wireless connections. This could be acheived by using an sd-card, an on-board

computer, or a wifi connection for online streaming.

(46)

R EFERENCES

[1] E. Fresk and G. Nikolakopoulos, “Full quaternion based attitude control for a quadrotor,” in European Control Conference, July 2013.

[2] K. Alexis, G. Nikolakopoulos, A. Tzes, and L. Dritsas, “Coordination of helicopter uavs for aerial forest-fire surveillance,” in Applications of intelligent control to engi- neering systems, pp. 169–193, Springer, 2009.

[3] A. Lindqvist, E. Fresk, and G. Nikolakopoulos, “Optimal design and modeling of a tilt wing aircraft,” in Control and Automation (MED), 2015 23th Mediterranean Conference on, pp. 701–708, IEEE, 2015.

[4] C. Papachristos, K. Alexis, G. Nikolakopoulos, and A. Tzes, “Model predictive atti- tude control of an unmanned tilt-rotor aircraft,” in IEEE International Symposium on Industrial Electronics, pp. 922–927, 2011.

[5] A. Kahvecioglu and N. Alemdaroglu, “Optimal design of a miniature quad tilt rotor uav,” in Unmanned Aircraft Systems (ICUAS), 2015 International Conference on, pp. 1118–1127, June 2015.

[6] F. Senkul and E. Altug, “Adaptive control of a tilt - roll rotor quadrotor uav,” in Unmanned Aircraft Systems (ICUAS), 2014 International Conference on, pp. 1132–

1137, May 2014.

[7] K. Cesare, R. Skeele, S.-H. Yoo, Y. Zhang, and G. Hollinger, “Multi-uav exploration with limited communication and battery,” in Robotics and Automation (ICRA), 2015 IEEE International Conference on, pp. 2230–2235, May 2015.

[8] E. Small, E. Fresk, G. Andrikopoulos, and G. Nikolakopoulos, “Modelling and con- trol of a tilt-wing unmanned aerial vehicle,” in Control and Automation (MED), 2016 24th Mediterranean Conference on, pp. 1254–1259, IEEE, 2016.

[9] F. Irving, An Introduction to the Longitudinal Static Stability of Low-Speed Aircraft.

Oxford, UK: Pergamon Press, 1966.

37

(47)

38

[10] H. Hahn, Rigid Body Dynamics of Mechanisms. Berlin Heidelberg: Springer-Verlag, 2002.

[11] E. Fresk and G. Nikolakopoulos, Experimental Model Derivation and Control of a Variable Pitch Propeller Quadrotor, pp. 723–729. IEEE International Conference on Control Applications. Proceedings, IEEE, 2014.

[12] E. Fresk, G. Nikolakopoulos, and T. Gustafsson, “A generalized reduced-complexity inertial navigation system for unmanned aerial vehicles,” I E E E Transactions on Control Systems Technology, 2016.

[13] M. Quigley, K. Conley, B. P. Gerkey, J. Faust, T. Foote, J. Leibs, R. Wheeler, and

A. Y. Ng, “Ros: an open-source robot operating system,” in ICRA Workshop on

Open Source Software, 2009.

References

Related documents

Both Brazil and Sweden have made bilateral cooperation in areas of technology and innovation a top priority. It has been formalized in a series of agreements and made explicit

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Parallellmarknader innebär dock inte en drivkraft för en grön omställning Ökad andel direktförsäljning räddar många lokala producenter och kan tyckas utgöra en drivkraft

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Den förbättrade tillgängligheten berör framför allt boende i områden med en mycket hög eller hög tillgänglighet till tätorter, men även antalet personer med längre än

Det har inte varit möjligt att skapa en tydlig överblick över hur FoI-verksamheten på Energimyndigheten bidrar till målet, det vill säga hur målen påverkar resursprioriteringar