• No results found

Autonomus Helicopter Landing on a Mobile Platform.

N/A
N/A
Protected

Academic year: 2022

Share "Autonomus Helicopter Landing on a Mobile Platform."

Copied!
71
0
0

Loading.... (view fulltext now)

Full text

(1)

Autonomus Helicopter Landing on a Mobile Platform

Rasmus Hansén Nils Landin Axel Ringh Victoria Svedberg

Supervisors:

Xiaoming Hu Johan Markdahl

Degree Project in Engineering Physics and Vehicle Engineering, SA104X and SA105X

Department of Mathematics, Optimization and Systems Theory Royal Institute of Technology

Stockholm, Sweden

(2)

Abstract

In this thesis we investigate the problem of landing a helicopter autonomously on a mobile platform by designing controllers for the attitude- and translational dynamics in parallel. A mathematical model of the helicopter, in form of general 6-degrees-of-freedom rigid-body dy- namics with application-specific actuations, is developed. A linearized model is used in order to make a landing problem more tractable, which is also rather reasonable under landing con- straints, where small angle- and velocity approximations are valid. The inputs used for the attitude controller are the tail rotor thrust and the tip-path-plane angles. Then, a form of cascaded control is adopted for the translational dynamics, in which the inputs are the Euler angles together with the main rotor thrust. The resulting control system is tested by MATLAB simulations against a smooth position reference path, with satisfying results. For the landing scenario, a trajectory planning strategy based on linear model predictive control (MPC) is adopted. The cascaded control system is then used to track the translational reference tra- jectory. The translational reference trajectory is chosen such that the attitude dynamics is adapted to the attitude of the platform at touch-down.

Sammanfattning

Den här uppsatsen undersöker problemet att autonomt landa en modellhelikopter på en mobil plattform genom att använda olika regulatorer för attityd- och translationsdynamiken. Den matematiska beskrivningen av helikoptern utgår från dynamiken för en stel kropp med 6 fri- hetsgrader. Eftersom landning kan genomföras med låga hastigheter och små vinklar används en linjär modell för att göra problemet mer lätthanterligt. Insignalerna till systemet är kraften från stjärtrotorn och lutningsvinklarna av huvudrotorns Tip-Path-Plane. En kaskadregulator används för att styra translationssystemet med eulervinklarna och kraften från huvudrotorn, som insignaler. Regulatorn testas i en MATLAB-simulering mot en glatt referensbana med godkända resultat. För landingsproceduren används en banplaneringsstrategi som bygger på linjär prediktiv reglering (PR). Kaskadregulatorn används sedan för att följa translationsre- ferenserna, vilka blir valda så att även attitydsystemet anpassas efter plattformens attityd i landningsögonblicket.

(3)

Nomenclature

0n×m The n × m matrix consisting of zeros ˆiB, ˆjB, ˆkB The body fixed unit vectors

ˆiI, ˆjI, ˆkI The unit vectors in the inertial frame

f~B The force affecting the helicopter expressed in the body frame f~I The force affecting the helicopter expressed in the inertial frame a Angle of main rotor thrust vector, around jB

b Angle of main rotor thrust vector, around iB

g Gravitational acceleration

In×n The n-dimensional identity matrix Ixx, Iyy, Izz Moments of inertia

Ixy, Ixz, Iyz Products of inertia

L, M , N External moment components in body fixed coordinates m The mass of the helicopter

p, q, r Angular velocity components in body fixed coordinates QM Reaction torque from the main rotor

R Rotation matrix from the body fixed frame to the inertial frame sx, sy, sy The helicopters position

TM The thrust produced by the main rotor TT The thrust produced by the tail rotor

u, v, w Velocity components in body fixed coordinates X, Y , Z External force components in body fixed coordinates xM, yM, zM The position of the main rotor in body fixed coordinates xT, yT, zT The position of the tail rotor in body fixed coordinates

(4)

φ Roll angle

Ψ Matrix relating the angular velocity and Euler angles to the time derivatives of the Euler angles

ψ Yaw angle

Θ A vector consisting of φ, θ and ψ

θ Pitch angle

B The torque affecting the helicopter expressed in the body frame

I The torque affecting the helicopter expressed in the inertial frame

(5)

Contents

1 Introduction 1

2 Mathematical Model of a Helicopter 3

2.1 Rigid body dynamics . . . 3

2.1.1 Translational motion . . . 4

2.1.2 Rotational motion . . . 4

2.1.3 Rotation matrix . . . 5

2.1.4 Angular velocity . . . 8

2.2 Forces and torques affecting the helicopter . . . 9

2.2.1 The forces . . . 10

2.2.2 The torques . . . 12

2.3 The dynamic equations of the helicopter . . . 13

2.3.1 Parameter values . . . 13

3 Basic Control Theory 14 3.1 Basic concepts . . . 14

3.2 Stability . . . 16

3.3 State space description . . . 16

3.4 Controllability and observability . . . 18

3.5 State feedback . . . 19

3.6 MIMO-system . . . 19

3.7 Linear quadratic control . . . 20

4 Control Design 22 4.1 State space description . . . 23

4.2 Attitude controller . . . 23

4.2.1 Linearizing the system . . . 24

4.2.2 Set point control design . . . 25

4.2.3 Tracking controller . . . 27

4.2.4 Simulations of the attitude controller . . . 28

4.2.5 Discussion . . . 29

4.3 Translational controller . . . 33

4.3.1 Controllability and choice of inputs . . . 33

4.3.2 Tracking controller . . . 34

(6)

CONTENTS

4.3.3 Feedforward control . . . 34

4.3.4 Introducing integral action . . . 35

4.3.5 Design of feedback gain . . . 35

4.3.6 The complete attitude reference vector and differentiation . . . 36

4.4 Discussion . . . 37

4.4.1 Review of model simplifications and exact trimming . . . 37

5 Performance and Stability 41 5.1 Analytical path following . . . 41

5.2 Stability analysis . . . 43

5.3 Disturbances . . . 46

6 Landing Scenario 51 6.1 Landing premises . . . 51

6.2 Trajectory generation . . . 52

6.2.1 Introduction to model predictive control (MPC) . . . 52

6.2.2 Defining constraints and penalty matrices . . . 55

6.2.3 Landing strategy . . . 56

6.3 Discussion . . . 57

6.3.1 Feasibility of the MPC . . . 57

6.3.2 Disturbances . . . 58

6.3.3 Helicopter design and sensitivity to landing conditions . . . 58

7 Results and Conclusions 60 7.1 Simulation results . . . 60

7.2 Conclusions . . . 62

(7)

Chapter 1

Introduction

Unmanned Aerial Vehicles (UAVs) are flying objects that are being controlled without a pilot on board. This definition emphasizes two important things about UAVs. First, they may take many different shapes and are thus usable in many different settings. The earliest UAVs were developed for intelligence gathering during the Gulf war since the traditional satellite spying methods were limited by the satellite’s orbital period and manned flights were too risky [2]. Today, the military use of UAVs extend to combat as well as intelligence. In a civilian setting UAVs may be used for rescue missions. Since UAVs do not need a pilot on board, they can be much smaller than conventional aerial vehicles. Thus, UAVs may for example be used to stop leakages inside factories and small spaces. If the leakage is poisonous the UAV also has the advantage that no human needs to be exposed.

The second thing to observe is that the aerial vechicle is controlled without a pilot on board which not necessarily means that the flight is autonomous. Traditionally, radio control has been used to steer UAVs, but in recent decades the control design of autonomous UAVs has been examined. The advantages of autonomous UAVs is that they can operate under conditions where the control signal is weak or at least stabilize themselves instead of crashing in the event of a signal failure. Full automation is also a first step to make the flying vehicles intelligent, which may reduce the costs of pilot training in the future.

Today, the underlying mathematical model of small scale helicopters is well understood. In al- most all cases it is derived from the Newton-Euler equations for rigid body dynamics. A rigorous derivation is given by [13] and the resulting model is a multi-input multi-output (MIMO) non-linear system, i.e. a system with more than one input and output signals. Further the system’s parameters are highly coupled, thus making the control design more difficult.

As a concequence of the complexity in the system, linear control design is insufficient in providing stability for all flight envelopes. To solve this problem gain scheduling has been used, but at the expense of higher computational loads [14]. For the purpose of making the helicopter hover a linear controller is sufficient since the helicopter is kept near one point in the state space [3].

Since landing is performed in conditions like those for hover flight, i.e. small velocities and angles, this thesis exploits the possibility to use linear control to land a helicopter. We constrain the

(8)

helicopter to small velocities and angles and assume that all state variables are measurable, which results in a faster and more reliable system. Further, the system’s inputs are the forces produced by the tail and main rotors as well as the tilt angle of the main rotor’s tip-path-plane. Thus, the aeorodynamics correlating the applied forces to the usual control inputs used to steer a helicopter are ignored. The result is again a faster and more reliable system. The platform is simulated to move in a periodic motion like a ship at sea.

The rest of this report is organized as follows: In chapter 2 a mathematical model of the helicopter is derived from rigid body dynamics. Chapter 3 summarizes fundamental control theory which will be used in the control design. In chapter 4 the design of the controller is presented. Chapter 5 aims at testing the stability and performance properties of the derived controller by flying along a smooth path as well as applying disturbances. Chapter 6 presents how the landing scenario are carried out and a model predictive control is derived. The report ends with simulation results of the landing and conclusions in chapter 7.

(9)

Chapter 2

Mathematical Model of a Helicopter

The goal of this chapter is to develop a mathematical model of a small-scale helicopter. A helicopter is mathematically best modeled as a rigid body consisting of two power sources, the main- and tail rotors. This has been done in numerous articels in the field of Helicopter modelling, e.g in [13] and [12]. In the subsequent chapters the most important steps from these texts are reproduced to widen the readers’ comprehension of the helicopter. First, general rigid body dynamics are presented and second these equations are adapted to the dynamics of the helicopter.

2.1 Rigid body dynamics

The helicopter is modeled as a body fixed frame with the origin in the helicopter’s center-of-gravity and the axes ˆiB, ˆjB and ˆkB corresponding to the helicopters forward, right and down directions respectively, as shown in figure 2.1. The derivation of the general equations governing rigid body dynamics is carried out in four steps. First, the equation for translational motion is derived from Newton’s second law. Second, the equation for rotational motion is presented and follows from Euler’s equation. Thus far the mechanical laws are covered and the third step is to obtain the rotation matrix R that transforms vectors between the body fixed frame and the inertial frame.

The last step is to develop a relation between the angular velocities in the two frames since it is shown that these cannot be transformed using the rotation matrix R.

Before beginning with the first step some notation is introduced. The vectors corresponding to velocity, angular velocity, external force and external torque in the body fixed coordinates are denoted by a raised B and given by

~ vB =

 u v w

 ~ωB=

 p q r

 f~B =

 X Y Z

 ~τB=

 L M N

. (2.1)

(10)

2.1. RIGID BODY DYNAMICS

Figure 2.1: The body fixed coordinate system. A right-handed system orientated with its axes pointing forward, right and down. It is fixed in the center-of-gravity.

2.1.1 Translational motion

Newton’s second law, ~f = m ˙~v, governs the translational dynamics of the helicopter in the inertial frame. A problem with this equation is that it is convenient to express velocities and accelerations in inertial coordinates while forces are best described in body fixed coordinates. This problem is solved by deriving the force vector ~fB in the body fixed frame and then transform it to the inertial frame by the rotation matrix R developed in section 2.1.3. The resulting equation governing translational motion is

~˙ v = 1

mR ~fB. (2.2)

2.1.2 Rotational motion

The rotational motion in the inertial frame is governed by Euler’s equation ~τ = I ˙~ω, where ~τ is the torque, I is the inertia matrix of the helicopter and ˙~ω is the angular acceleration of the helicopter.

Since the angular position is internal it is best described in body fixed coordinates. To get the corresponding equation in body fixed coordinates recall that the derivative of an arbitrary vector A in a moving frame is~

A =A˚~B+ ~ω × ~A, (2.3)

whereA is the time-derivative of an arbitrary vector in the fixed frame,~˙ A˚~B is the time-derivative with respect to the moving body frame, ~ω and ~v is the angular velocity and the velocity of the moving frame. A proof and a more thorough description is given in [1]. By using (2.3), Euler’s equation in body fixed coordinates is given by

(11)

2.1. RIGID BODY DYNAMICS

B= I ˙~ω = I ˙~ωB+ ~ωB× I~ωB⇐⇒ I ˙~ωB = ~τB− ~ωB× I~ωB. (2.4) To finalize the description of the rotational motion it is assumed that the cross-terms Ixy, Ixz and Iyz vanish, i.e. Ixy= Ixz = Iyz = 0. This is motivated by looking at the definitions of these terms:

Ixy = Z

body

xy dm, Iyz = Z

body

yz dm Ixz = Z

body

xz dm. (2.5)

Recall that the ˆjB-direction (corresponding to the y-component in equations (2.5)) points to the right of the helicopter. If the helicopter is imagined as seen from its front, then it is easy to notice that for each point (x, y, z) of the helicopter there is an identical point (x, −y, z). If the mass is evenly distributed across the helicopter, this motivates why Ixy = 0 and Iyz = 0. The equality Ixz = 0 is effected for simplistic reasons, but it poses no constraints to our model since it is possible to adjust the weight distribution. This assumption is for example also done in [13], but not in [12].

Under the assumption that the cross terms of the inertia matrix are zero, equation (2.4) can be extended to component form as

Ixxp˙ = L − qr(Izz− Iyy),

Iyyq˙ = M − pr(Ixx− Izz), (2.6)

Izz˙r = N − pq(Iyy− Ixx).

2.1.3 Rotation matrix

To continue the development of the mechanical laws governing rigid body dynamics a method to correlate the body fixed system with the inertial system is derived. More precisely a tranformation between the two vector spaces spanned by {ˆiB, ˆjB, ˆkB} and {ˆiI, ˆjI, ˆkI} are obtained. The positional relation is simple since this is done by expressing the coordinates of the origin OB in inertial frame coordinates. The problem is how to relate the direction of vector properties in the two frames, e.g.

forces and velocities. The solution is given by Euler’s rotation theorem [10].

Theorem 2.1.1. Any two independent orthonormal coordinate frames may be related by a minimum sequence of rotations (less than four) about coordinate axes, where no two successive rotations may be about the same axis.

This means that the frame OBˆiBˆjBˆkB can be related to OIˆiIˆjIˆkI by at most three rotations, or if expressed in terms of vector spaces, the vectorspace spanned by {ˆiB, ˆjB, ˆkB} can be transformed into the space spanned by {ˆiI, ˆjI, ˆkI} by at most three rotational transformations. These rotations may be chosen in different ways since one can change the rotation axes and their subsequent order.

However, in the field of aerodynamics the preferred angles are pitch (θ), roll (φ) and yaw (ψ) relative to a North-East-Down inertial frame, i.e. a frame in which the x-direction points to the north, the y-direction points to the east and the z-direction points towards the earth’s centrum according to figure 2.2. Note that the vectors ˆjB and ˆkB, even though not illustrated in the figure, points to the right and out from the bottom of the aircraft, according to theirs definitions and figure 2.1.

(12)

2.1. RIGID BODY DYNAMICS

The transformation between the spaces span{ˆiI, ˆjI, ˆkI} and span{ˆiB, ˆjB, ˆkB} is given by RT: RT : {ˆiI, ˆjI, ˆkI} Rψ(ψ)

T

−−−−−→ {ˆa1, ˆa2, ˆa3} Rθ(θ)

T

−−−−−→ {ˆb1, ˆb2, ˆb3} Rφ(φ)

T

−−−−−→ {ˆiB, ˆjB, ˆkB}

where the vector spaces span{ˆa1, ˆa2, ˆa3} and span{ˆb1, ˆb2, ˆb3} are some intermidate spaces and Rψ(ψ)T, Rθ(θ)T and Rφ(φ)T correspond to the different rotational transformations as seen in figure 2.2. The transformations are transposed since it is more convenient to express the transfor- mation from the body fixed system to the inertial system by R. It can be proved, though it is not done here, that RRT = I which implies that R is the desired transformation [13].

A rigorous derivation of these rotational transformations is outside the scope of this text (for a rigourous derivation see e.g. [10]). However, it is convenient to illustrate how these rotations are carried out. Figure 2.3 illustrates the first rotation by the angle ψ as seen from the −ˆkI direction, i.e. from above in figure 2.2. The new basis vectors ˆa1, ˆa2, ˆa3 are given by

ˆ

a1 = cos(ψ)ˆiI+ sin(ψ)ˆjI

ˆ

a2 = −sin(ψ)ˆiI+ cos(ψ)ˆjI ˆ

a3 = ˆkI.

This can be written more compactly in matrix notation:

Figure 2.2: The figure describes the pitch (θ), roll (φ), and yaw (ψ) angles for an aircraft (may as well be replaced by a helicopter).

(13)

2.1. RIGID BODY DYNAMICS

Figure 2.3: A rotation by ψ about the −ˆkI axis pointing out of the paper.

 ˆ a1 ˆ a2 ˆ a3

 =

cos(ψ) sin(ψ) 0

−sin(ψ) cos(ψ) 0

0 0 1

 ˆiI

ˆjI

ˆkI

= Rψ(ψ)T

 ˆiI

ˆjI

ˆkI

 (2.7)

If the same geometric method are applied to the other two rotations, i.e. for Rθ(θ) and Rφ(φ), the result is

 ˆb1

ˆb2

ˆb3

 =

cos(θ) 0 −sin(θ)

0 1 0

sin(θ) 0 cos(θ)

 ˆ a1

ˆ a2

ˆ a3

= Rθ(θ)T

 ˆ a1

ˆ a2

ˆ a3

 (2.8)

and

 ˆiB

ˆjB

ˆkB

 =

1 0 0

0 cos(φ) sin(φ) 0 −sin(φ) cos(φ)

 ˆb1 ˆb2

ˆb3

= Rφ(φ)T

 ˆb1 ˆb2

ˆb3

. (2.9)

Finally, it follows that the rotation matrix from the inertial frame to the body fixed frame is RT = R(φ, θ, ψ)T = Rφ(φ)TRθ(θ)TRψ(ψ)T and

(14)

2.1. RIGID BODY DYNAMICS

 ˆiB

ˆjB

ˆkB

= RT

 ˆiI

ˆjI

ˆkI

 ˆiI

ˆjI

ˆkI

= R

 ˆiB

ˆjB

B

 (2.10)

2.1.4 Angular velocity

The last step in the derivation of the rigid body dynamics is the development of a relation between the angular velocities in the two different frames. It is shown below that the angular velocity in the inertial frame is given by ~ω = ˙φˆiB+ ˙θˆa2+ ˙ψˆkI. Since the Euler angles correspond to rotations around the axes ˆkI, ˆa2 and ˆiB in three different frames, the rotation matrix in (2.10) cannot be used to transform this into the body fixed frame. Instead, the expressions for the angular velocity in the two frames are stated and then equated to get the desired relation. In body fixed coordinates the angular velocity is simply

~

ω = pˆiB+ qˆjB+ rˆkB =

ˆiB ˆjB ˆkB

 p q r

. (2.11)

To obtain the angular velocity in the inertial frame, consider an infinitesimal change in the three Euler angles dφ, dθ and dψ during the time dt. According to [13] this can be treated as a vector

~h = dφˆiB+dθˆa2+dψˆkI, where ˆa2is the basis vector explained in section 2.1.3. The angular velocity is then

~ ω = d~h

dt = ˙φˆiB+ ˙θˆa2+ ˙ψˆkI =

ˆiB ˆa2 ˆkI



 φ˙ θ˙ ψ˙

. (2.12)

By expressingh ˆiB2ˆkI

i

=h

ˆiBˆjBˆkB

i

Ψ−1 for some matrix Ψ−1, equation (2.12) can be written as

~ ω =

ˆiB ˆjBB Ψ−1

 φ˙ θ˙ ψ˙

 (2.13)

and by equating the expressions (2.11) and (2.13), it follows that

 p q r

= Ψ−1

 φ˙ θ˙ ψ˙

. (2.14)

The columns of the matrix Ψ−1 are the coordinates of ˆiB, ˆa2 and ˆkI expressed in the body fixed frame. Thus, the first column is simply [1 0 0]T. The second and third columns are derived by using the rotational transformations in the previous section. By equations (2.8) and (2.9) it follows that

(15)

2.2. FORCES AND TORQUES AFFECTING THE HELICOPTER

 ˆ a1

ˆ a2

ˆ a3

= Rθ(θ)

 ˆb1

ˆb2

ˆb3

= Rθ(θ)Rφ(φ)

 ˆiB

ˆjB

ˆkB

. (2.15)

Since ˆa2is the second entry of the vector it can be expressed as the column vector

ˆ a2=

ˆiB ˆjB ˆkB Rφ(φ)TRθ(θ)T

 0 1 0

. (2.16)

Thus, the second column of Ψ−1 is Rφ(φ)TRθ(θ)T[0 1 0]T. By the same steps and equation (2.10) it follows that ˆkI can be written as

ˆkI =ˆiB ˆjBB RT

 0 0 1

. (2.17)

Thus, the third column of Ψ−1 is RT[0 0 1]T. Now, all the columns of Ψ−1 are derived and if the multiplications are carried out the result is

Ψ−1=

1 0 −sin(θ)

0 cos(φ) sin(φ)cos(θ) 0 −sin(φ) cos(φ)cos(θ)

. (2.18)

To get the derivatives of the Euler angles expressed in p, q and r the matrix Ψ−1 is inverted. This gives the relationΘ = Ψ~~˙ ωB, where ~Θ = [φ θ ψ]T. Written out this becomes

 φ˙ θ˙ ψ˙

=

p + q sinφ tanθ + r cosφ tanθ q cosφ − r sinφ

qsinφcosθ + rcosφcosθ

. (2.19)

2.2 Forces and torques affecting the helicopter

The equations (2.2) and (2.6), which were derived in the previous sections, constitute a general model of a rigid body. The following section aims at specializing this model to helicopter dynamics by developing a mathematical description of the force vector, ~fB, and torque vector, ~τB.

(16)

2.2. FORCES AND TORQUES AFFECTING THE HELICOPTER

2.2.1 The forces

The forces affecting the helicopter can be divided into three parts: thrust generated by the tail rotor, thrust generated by the main rotor and external forces. The thrust of the tail rotor is modeled as follows. Let TT be the absolute value of the thrust and let ~TTB be the corresponding vector. Since the tail rotor is vertical it generates force in the ˆjB-direction. Thus it follows that

T~TB=

 0 TT

0

. (2.20)

The second force affecting the helicopter is the thrust from the main rotor. This thrust vector is not as easily derived as ~TTBbecause the main rotor is not fixed relative to the helicopter. The rotor is mounted on a system of hinges which makes it possible to tilt the rotor’s Tip-Path-Plane (TPP) which is the plane spanned by the tips of the rotor blades. Since the main rotor thrust vector ~TMB is normal to this plane it changes direction as the TPP is tilted. Let a and b be the angles by which the TPP is tilted around the ˆjBand ˆiBaxes respectively. By the right-hand-rule a corresponds to a tilt backward and b corresponds to a tilt rightward. The angles a and b are illustrated in figure 2.4.

The left part illustrates how the TPP is tilted backward by the angle a and how this influences the direction of the main rotor thrust. The right side illustrates the same for a tilt to the helicopter’s right by an angle b.

By some geometry it is possible to show that

T~MB =

−sin(a) cos(b) cos(a) sin(b)

−cos(a) cos(b)

TM. (2.21)

The minus sign in the last component is because the positive ˆkB-direction was defined as pointing down and the thrust vector points up. The angles a and b are small [13] and the trigonometric

Figure 2.4: The tilting of the TPP by the angles a and b respectively.

(17)

2.2. FORCES AND TORQUES AFFECTING THE HELICOPTER

terms can therefore be approximated by sin(v) = v and cos(v) = 1 for v = a, b. The thrust vector (2.21) is therefore approximated by

T~MB =

−a b

−1

TM. (2.22)

The third force affecting the helicopter is the external force which basically consists of three different forces: gravitation, wind and drag. The gravitational force is always pointing down towards the earth’s centrum, i.e. in the ˆkI-direction. Because the direction of the gravitation is given in inertial coordinates, it must be transformed into the body fixed frame by using the rotation matrix RT in (2.10). This gives

f~gravB = RT

 0 0 mg

. (2.23)

Wind and drag influence a rigid body in the same way since both are a consecuence of the helicopters relative motion to the air mass surrounding it. Of course the velocity of the wind is much more random and unforseen, but given a velocity it influences the body in the same way as drag. A general model for the force produced on the body is [7]

D =1

2CDρAv2 (2.24)

where D is the force on the object, ρ is the density of the air, v is the relative speed between the helicopter and the air surrounding it, A is the effetctive area of the object facing the relative velocity gradient and CD is the drag coefficient, which depends on the geometric properies of the object.

For a sphere CD = 0.47 [7]. For simplicity we will not consider drag in our model. Furthermore, winds will only be modeled as disturbances in the external forces. To be able to determine the size of the disturbances in the force, the helicopter will be modeled as a sphere with a radius zM, where zM is the distance between the main rotor and the origin in the body fixed system (the helicopters center of gravity) in the kB-direction, which gives an effective area A = πzM2 . A normal value of the desity of air is ρ = 1.22kg m−3.

Now, all the forces (2.20), (2.22) and (2.23) can be put together to a force vector in body fixed coordinates. It is given by

f~B =

−a TM

b TM+ TT

−TM

+ RT

 0 0 mg

.

In [9] it is suggested that aTM, bTM and TT can be regarded as small compared to TM. With this assumption it is possible to neglect these terms, which gives the following force vector:

(18)

2.2. FORCES AND TORQUES AFFECTING THE HELICOPTER

f~B =

 0 0

−TM

+ RT

 0 0 mg

=

−mg sin(θ) mg cos(θ)sin(φ)

−TM+ mg cos(θ)cos(φ)

. (2.25)

2.2.2 The torques

There are three sources which give rise to the torque on a helicopter which may be denoted by ~τMB,

TB and ~τQB. The first two are due to the fact that the main and tail rotor thrusts not are aligned with the center of gravity. The third is the reaction torque generated by the main rotor and a torque which results from the tilting of the TPP. These three sources are treated separatley below.

Let ~pM = [xM, yM, zM] be the position of the main rotor in the body fixed frame. Then it follows from basic mechanics that

MB = ~pM × ~TMB =

yM ZM− zM YM zM XM − xM ZM xM YM− yM XM

 (2.26)

where XM, YM and ZM are defined as the ˆiB, ˆjB and ˆkB components of TMB respectively.

TB is derived in exactly the same way. Let ~pT = [xT, yT, zT] be the position of the tail rotor in body fixed coordinates. This gives that

~

τTB= ~pM × ~TTB=

−zT TT

0 xT TT

. (2.27)

Both the reaction torque and the torque resulting from tilting the TPP follows from Newtons action- reaction law. The reaction torque is the reaction to the rotation of the main rotor. From empirical results [13] it follows that the value of the reaction torque tend to depend on |TM1.5| and is thus modeled as QM = CM|TM1.5| + DM, where CM and DM are helicopter specific parameters which must be determined by empirical methods. It acts around the axis orthogonal to the TTP and thus it acts around the same axis as ~TMB, namely [−sin(a) cos(b), cos(a) sin(b), −cos(a) cos(b)]T. Since the angles a and b are assumed to be small, this can be approximated with [−a, b, −1]T.

The torque resulting from tilting the TPP is generated because the hinge around which the TPP rotates has an internal stiffness. This stiffness tends to rotate the TPP back to its vertical position, thus generating a torque on the rotor. According to Newtons action-reaction law the same torque must be generated on the helicopter. If the hinge is modeled as a spiral spring with stiffness Kβ, the torque will be Kβa and Kβb around the axes ˆjB and ˆiB respectively. Combining equations the equations of this section results in the total moment

B=

−QMa − zmTMb + Kβb + ztTT − ymTM

−zmTMa + Kβa + QMb + xmTM

ymTM a + xmTMb + xtTT− QM

. (2.28)

(19)

2.3. THE DYNAMIC EQUATIONS OF THE HELICOPTER

2.3 The dynamic equations of the helicopter

The expressions for the forces and moments acting on the helicopter that was derived in the previous section, equations (2.25) and (2.28), can now be put into the general rigid body dynamic equations from section 2.1, equations (2.2) and (2.6). This gives the dynamic equations

~˙ vI =

¨ sx

¨ sy

¨ sz

=

TmM (sin (φ) sin (ψ) + cos (φ) sin (θ) cos (ψ))

TM

m (sin (φ) cos (ψ) − cos (φ) sin (θ) sin (ψ))

1

m(gm − cos (φ) cos (θ) TM)

 (2.29)

and

I ˙~ωB =

 Ixxp˙ Iyyq˙ Izz˙r

=

−QMa + (−zmTM + Kβ)b + ztTT − ymTM− qr(Izz− Iyy) (−zmTM + Kβ)a + QMb + xmTM− pr(Ixx− Izz)

ymTMa + xmTMb − xtTT − QM− pq(Iyy− Ixx)

. (2.30)

Together with equation (2.19), this constitutes a complete dynamic model of a small scale helicopter.

From these equations it is observed that the complete system can be divided into translational dynamics given by (2.29) and attitude dynamics given by (2.19) and (2.30).

2.3.1 Parameter values

We will use the same parameter values as in [13], namely the following:

Parameter Value

g 9.81 m s−2

m 8.2 kg

Ixy, Ixz, Iyz 0 kg m2 Ixx 0.18 kg m2 Iyy 0.34 kg m2 Izz 0.28 kg m2

Kβ 52 N m rad−1

CM 0.004452 m N−0.5

DM 0.6304 N m

xm, ym, yt 0 m

xt −0.91 m

zt −0.08 m

zm −0.235 m

Table 2.1: The helicopters parameter values

(20)

Chapter 3

Basic Control Theory

Nowdays, dynamical systems are used to describe a variety of processes that are present in everyday life. Using control theory we can influence the behavior of these system to act as preferred. This could be the metabolism of a cell, the key rate proposed by a central bank or the software in an industrial robot. In this chapter, a fundamental knowledge about control systems will be given in order to fully understand the design of a regulator.

3.1 Basic concepts

Almost all dynamical system can be described, or at least approximated, by a set of differential equations or difference equations which describes how a system behaves. Depending on how time is described they are categorized into continuous and discrete systems. To solve these equations one often applies theZ -transform on discrete systems and the Laplace-transform to a continuous systems [6]. There are lots of similarities between the discrete and continuous case [5] so further on only the later are treated.

Consider the block diagram of a simple system shown below

Figure 3.1: A feedback loop, the main concept of controlling the behavior of a dynamical system To simplify the explanation of a regulator some symbols are assigned

(21)

3.1. BASIC CONCEPTS

yref(t) = reference y(t) = system output

e(t) = yref− y = measured error u(t) = system input

r(t) = controller g(t) = weight function f (t) = sensor

Depending on whether u and y are scalars or vectors, the system is a SISO-system (Single Input Single Output) or a MIMO-system (Multiple Input Multiple Output). SISO- and MIMO-systems share many basic properties so for simplicity we choose to describe only SISO-systems here and later translate it to a MIMO-system.

Most systems does not only depend on the input right now, but all the input signals the system has received since it was started. The system output y(t) is mathematically described as

y(t) = Z

−∞

g(τ )u(t − τ ) dτ (3.1)

where g(t) is the systems weight function. It describes how differnet input signals in different times are treated by the system.

Applying the Laplace transformation, y(t) can be rewritten as:

Y (s) = G(s)U (s) = G(s)R(s)E(s) = G(s)R(s)(Yref(s) − F (s)Y (s))

⇒ Y (s) = G(s)R(s)

1 + G(s)R(s)F (s)Yref(s) (3.2)

The entire system is called a closed-loop system and can be described by the transfer function Gclosed(s) = 1+G(s)R(s)F (s)G(s)R(s) . The transfer function is the Laplace transform of the weight function and describes how a system changed the input-signal.

The transfer function can be written on the form

Gclosed(s) = b0sm+ · · · + bm

sn+ a1sn−1+ · · · + an

, (3.3)

The roots to the equation

b0sm+ · · · + bm= 0 (3.4)

are called the zeros of the transfer function and the roots to

sn+ a1sn−1+ · · · + an = 0 (3.5)

are called poles [6]. The latter are of great importance when studying the stability of a system as seen in the next section.

(22)

3.2. STABILITY

3.2 Stability

It is of vital importance to investigate whether the system is stable or not. In an unstable linear system, the output signal grows without bounds. This makes it impossible for the system to operate according to plan, why unstable linear system dynamics must be avoided. The following theorem are the most fundamental to use in order to check the stability of a linear system and can be found in [6].

Theorem 3.2.1. A system is input-output stable if and only if the weight function g(t) satisfies Z

0

|g(t)|dt < ∞ .

Since the weight function is the inverse Laplace transform of the transfer function,

g(t) =L−1G(s), (3.6)

a criterion on the poles can be made instead [6].

Theorem 3.2.2. A system with the proper transfer function G(s) is input-output stable if and only if all poles to G(s) have strict negative real parts.

Thus if one has a system where the poles all have negative real parts, the system is stable.

3.3 State space description

A general dynamical system does not only depend on the input at each time instance, but on all previous input values. This can be seen from (3.1). Hence one can not tell how the system will react by only looking at the current input signal. Therefore one introduces the term state. An informal definition of a systems state is: the information about the system needed to predict the effect of an applied input signal [6].

A system is most often represented by a set of differential equations. The linear system y(n)+ a1y(n−1)(t) + · · · + an−2y(t) + a˙ n−1y(t) = bu(t) , where n is an arbitrary integer, can be rewritten as:

y(n)= −a1y(n−1)(t) − · · · − an−2y(t) − a˙ n−1y(t) + bu(t) (3.7) where y(n−1)(t0), . . . , ˙y(t0), y(t0) and u(t0) are known. Thus we can calculate y(n)(t0) and also y(t0+ ∆), ˙y(t0+ ∆), . . . , y(n−1)(t0+ ∆) for a infinitesimal ∆. It is of great convenience to rewrite the system on the form:

x1(t) = y(t) x2(t) = ˙y(t) = ˙x1

...

xn(t) = y(n−1)(t)

(3.8)

(23)

3.3. STATE SPACE DESCRIPTION

xn(t) = y(n)(t) = −a1y(n−1)(t) − · · · − an−2y(t) − a˙ n−1y(t) + bu(t)

= −a1xn(t) − · · · − an−2x2(t) − an−1x1(t) + bu(t) This can be written in matrix form as

˙ x1(t)

˙ x2(t)

...

˙ xn−1(t)

˙ xn(t)

=

0 1 . . . 0 0

0 0 . . . 0 0

... ... . .. ... ...

0 0 . . . 0 1

−an−1 −an−2 . . . −a2 −a1

 x1(t) x2(t)

... xn−1(t)

xn(t)

 +

 0 0 ... 0 b

u(t) (3.9)

or short

x(t) = A~x(t) + Bu(t)

y(t) = C~x(t) (3.10)

where

A =

0 1 . . . 0 0

0 0 . . . 0 0

... ... . .. ... ...

0 0 . . . 0 1

−an−1 −an−2 . . . −a2 −a1

 , B =

 0 0 ... 0 b

 , C =

 1 0 ... 0 0

 .

This form is called a state space description of a linear dynamical system. Note that equation (3.10) is not a unique representation of equation (3.7). For any invertible matrix, T , the system in equation (3.11) is also a representation of equation (3.7).

~˜˙

x = T AT−1~˜x + T B~u

~

y = CT−1~˜x + D~u. (3.11)

This non-uniqueness can be realized easiest by performing the following substitutions and compu- tations:

x = T ~x

⇒~˜x = T ˙˙ ~x

⇔~˜x = T (A~˙ x + B~u)

⇔~˜x = T˙ 

AT−1~˜x + B~u

= T AT−1~˜x + T B~u

~

y = C~x + D~u = CT−1~˜x + D~u.

This can be done for any invertible T and so there is an infinite number of representations with the same input-output behaviour [6].

(24)

3.4. CONTROLLABILITY AND OBSERVABILITY

3.4 Controllability and observability

Controllability and observability are main issues when analyzing a system prior to deciding the best control strategy to be applied and it also decides whether it is possible to control or stabilize the system. Controllability is related to the possibility of forcing the system into a particular state by using an appropriate control signal. If a state is not controllable, then no signal will ever be able to control the state. The following formal definition can be found in [6].

Definition 3.4.1. A statevector ~x is controllable if there exists an input, which takes the state from the origin to ~x in a finite time interval. The system S is controllable if all the state vectors are controllable.

Observability instead is related to the possibility of "observing", through output measurements, the state of a system. If not all states are directly measurable, but the system is observable, an observer can be used to determine in which state the system is [6]. In our problem we assume that all state variables are directly measurable and thus we do not need to use observers. The discussion of observability is therefore not relevant to the rest of this essay. It is included here for completeness.

The formal definition of observability can be found in [6]

Definition 3.4.2. A statevector ~x 6= 0 is not observable if the output is identical zero when the initial value is ~x and the input identical zero. The system S is observable if all the state vectors are observable.

If a system is given in state space description there are two nice theorems that determine if the system is controllable and observable. From [5] we have the theorem for controllability:

Theorem 3.4.1. The controllable states of a system in state space form, form a linear subspace, viz, the range of the matrix (the controllability matrix)

S (A, B) = B AB . . . An−1B

where n is the order of the system. The system is thus controllable if and only ifS has full rank.

and the theorem for observability:

Theorem 3.4.2. The unobservable states of a system in state space form constitute a linear sub- space, viz, the null space of the matrix (the observability matrix)

O(A, C) =

 C CA

... CAn−1

The system is thus observable if and only ifO has full rank.

(25)

3.5. STATE FEEDBACK

3.5 State feedback

Sometimes it is convenient to let the input be decided by the state of the system, also called state feedback. This section gives a short description of how this is done. Let the input signal be

u(t) = −L~x(t) + ˜r (3.12)

where L = (l1, l2, ..., ln) and ˜r(t) is a reference signal. If the system is written as

x(t) = A~x(t) + Bu(t)

y(t) = C~x(t) (3.13)

then the feedback system is described by

~x(t) = (A − BL)~˙ x(t) + B ˜r(t)

y(t) = C~x(t). (3.14)

The poles to a system of the form (3.13) are given by the eigenvalues to the matrix A − BL. Since the poles determines if the system is input-output stable according to theorem 3.2.2 the following theorem is important [6].

Theorem 3.5.1. Given a closed system

~x(t) = (A − BL)~˙ x(t) + B ˜r(t)

y(t) = C~x(t). (3.15)

If and only if the system, (A, B), is controllable is it possible to choose L such that (A − BL) gets arbitrarily predefined eigenvalues.

The speed of a system depends on the distance between the poles and the origin. Poles close to the origin give a longer response time but poles very far from the origin can give rise to large inputs at the beginning of the transient. The dampening depends on the imaginary part of the poles. The smaller, relative to the distance to the origin, the better damping. A system of higher order is dominated by the poles closer to the origin [6]. Figure 3.2 shows the area where the poles should be placed.

3.6 MIMO-system

MIMO-systems can like SISO-systems be written as

x(t) = A~x(t) + B~u(t)

~

y(t) = C~x(t), (3.16)

but here ~y(t) and ~u(t) are vectors of dimension l × 1 and m × 1 respectively. ~x(t) is still a n- dimensional column vector and A, B and C are matrices of compatible dimensions.

(26)

3.7. LINEAR QUADRATIC CONTROL

Figure 3.2: The shaded area is where the poles should be placed to achieve stability and proper dampening

As for SISO-systems, it is also for MIMO-systems possible to write the transfer function as

Y (s) = G(s) ~~ U (s) (3.17)

although, here G(s) is a matrix. This matrix is called proper if the degree of the numerator does not exceed the denominator. If it is strictly proper then

s→∞lim G(s) = 0. (3.18)

If the limit is bounded then G(s) is proper. In this case the poles are the eigenvalues λ to the system matrix A.

3.7 Linear quadratic control

If we define a quadratic and positive (semi-)definite cost function, V , of the inputs and states of a linear system and design a control law that minimizes the value of the cost function we find the solution within a field known as Linear-Quadratic Control. In its simplest form it can be condensed into theorem 3.7.1 (e.g. p. 270 in [5]).

Theorem 3.7.1. Given a controllable linear system

x = A~x + B~u, (3.19)

(27)

3.7. LINEAR QUADRATIC CONTROL

the feedback that minimizes

V =

Z

0

(~xT· Qx· ~x + ~uT · Qu· ~u)dt, (3.20)

where Qx 0 and Qu 0, is given by

~u = −L~x, (3.21)

where

L = Q−1u BTS (3.22)

and where S is the unique, positive semidefinite solution to

ATS + SA + Qx− SBQ−1u BTS = 0. (3.23) Note that controllability is not a necessary property of a system for theorem 3.7.1 to apply but it is sufficient and is the system property that will be considered in this thesis. Note that Qu needs to be positive definite while Qxmay be positive semi-definite.

(28)

Chapter 4

Control Design

The aim of this chapter is to design the controller for the helicopter. A cascaded controller which is divided into one outer controller for the translational dynamics and one inner for the attitude dynamics is developed. This approach is motivated since the Euler angles can be thought of as a means to control the velocity and position of the helicopter. The Euler angles are in turn controlled by the tail rotor thrust and the tilt angle of the TPP. Figure 4.1 illustrates the complete system.

The outer loop consists of the translational controller which listens to external position references and calculates the required Euler angles and required main rotor thrust that are needed to follow the reference signal. The main rotor thrust is transfered directly to the helicopter while the desired angeles are used as input signals to the attitude controller which works in the inner-loop. The attitude controller calculates the required values of the tail rotor thrust as well as the angles of the TPP. If a cascade control is to work effectively, the inner-loop must be much faster than the outer-loop. The cascade design has been used in helicopter control before [13, 11, 15] with positive results which shows that it possible to achieve fast enough attitude dynamics.

Reference angles Translational controller

Helicopter Attitude controller

a, b and tail rotor thrust Main rotor thrust

Euler Angles and Angular Velocity Position and velocity

Figure 4.1: The outline of the regulators and the helicopter.

(29)

4.1. STATE SPACE DESCRIPTION

4.1 State space description

Before the control design can be determined, the state space descriptions of the attitude and translational dynamics have to be obtained. The mathematical description of the helicopter was developed in chapter 2. As explained above, a cascade controller is going to be developed. Thus, separate state space descriptions are used for the translational and attitude dynamics. According to the control design shown in figure 4.1 the following two systems are obtained:

 ~x˙tr= ftr(~xtr, ~utr)

~

ytr= Ctr~xtr

(4.1)

 ~x˙att= fatt(~xatt, ~uatt)

~

yatt= Catt~xatt. (4.2)

where the subscripts tr and att refers to translational and attitude respectively. From the division motivated above it follows that the control vectors are given by ~uatt = [a, b, TT]T and ~utr = [TM, φ, θ, ψ]T. The state space variables of the two different systems are ~xtr= [sx, sy, sz, ˙sx, ˙sy, ˙sz]T and ~xatt = [φ, θ, ψ, p, q, r]T. The form of the functions ftr and fatt follows from the dynamic equations of the helicopter, equations (2.19), (2.29) and (2.30).

ftr(~xtr, ~utr) =

˙sx

˙sy

˙sz

TmM (sin (φ) sin (ψ) + cos (φ) sin (θ) cos (ψ))

TM

m (sin (φ) cos (ψ) − cos (φ) sin (θ) sin (ψ))

1

m(gm − cos (φ) cos (θ) TM)

(4.3)

and

fatt(~xatt, ~uatt) = fatt(~xatt) + gatt~uatt= (4.4)

p + q · sinφ · tanθ + r · cosφ · tanθ q · cosφ − r · sinφ

q ∗sinφcosθ+ r ·cosφcosθ

−ym·TM−q·r·(Izz−Iyy) Ixx

xm·TM−p·r·(Ixx−Izz) Iyy

−QM−p·q·(Iyy−Ixx) Izz

 +

0 0 0

0 0 0

0 0 0

−QM

Ixx

−zm·TM+Kβ Ixx

zt

Ixx

−zm·TM+Kβ

Iyy

QM

Iyy 0

ym·TM

Izz

xm·TM Izz

−xt Izz

~ uatt.

Note that even though the main rotor thrust TM is part of (4.4), it is not treated as a state variable of the attitude system. Instead it is going to be treated as a scheduling variable.

4.2 Attitude controller

In this section two state feedback control laws for the attitude dynamics are designed. One law for set point control as well as one for tracking control. As shown above, the attitude system can be written as

(30)

4.2. ATTITUDE CONTROLLER

xatt= fatt(~xatt) + gatt~uatt. (4.5) Inserting the parameter values, given in table 2.1, into the expressions gives

fatt(~xatt) =

p + q sin (φ) tan (θ) + r cos (φ) tan (θ) q cos (φ) − r sin (φ)

q sin(φ)

cos(θ) +r cos(φ)cos(θ)

1 3qr

5 17pr

257 QM47pq

(4.6)

and

gatt=

0 0 0

0 0 0

0 0 0

509 QM 49TM +2600949

47

68TM+260017 5017QM 0

0 0 134

. (4.7)

Since it is assumed that all state variables are measurable Catt= I6×6, and hence the output vector is given by ~yatt= I6×6~xatt. The state space description is thus

 ~x˙att = fatt(~xatt) + gatt~uatt

~

yatt = I6×6~xatt

(4.8)

4.2.1 Linearizing the system

In order to use linear control design the system (4.8) must be linearized. Since the vector fatt(~xatt) and matrix gattdepend on TM, both directly and indirectly through QM(QM = CM|TM|1.5+ DM), gain scheduling must be used with TM as scheduling variable. However, as will be shown later, the system behaves well in the relevant operation range for TM with only one control law designed for the case TM = mg.

The linearization is done around a stationary point (~xatt,0, ~uatt,0) that is attained by solving the equation ˙~xatt = ~0. Since this thesis focus on the landing procedure during which the angles φ, θ and ψ as well as the angular speeds p, q and r are assumed to be small, a linearization around the point ~xatt,0= ~0 is preferable. With this choice of ~xatt,0 the equation ˙~xatt= ~0 is

~0 = fatt(~0) + g~uatt,0⇐⇒ ~uatt,0= −g−1attfatt(~0) (4.9)

References

Related documents

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating

The focus of this study is on the influence of the thrust bearing on the lateral vibrations of the shaft of a 72 MW propeller turbine.. The thrust bearing has a non conventional

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

(b) All previous computations can still be used when new data points are added in the following type of polynomial representations:..

These points will be added to those obtained in your two home assignments, and the final grade is based on your total score.. Justify all your answers and write down all

the initial guess is not close enough to the exact solution Solution: the largest eigenvalue of the iteration matrix has absolute value equal to 1.. If this information is

(c) If 100 iteration steps were needed by the Gauss-Seidel method to compute the solution with the required accuracy, how do the num- ber of operations required by Gaussian

(c) If 100 iteration steps were needed by the Gauss-Seidel method to compute the solution with the required accuracy, how do the num- ber of operations required by Gaussian