2.1. Quadrotor parameters

and more often than not the environment is unpredictable and knowing or encoding such

The set of actions of a system and its objective, on the other hand, is usually known a priori, so it logically follows that one should design a system that should be able to learn how to deal with

Formally, the system or agent should improve its performance as measured by a metric (P) on

At this point, let us note that an adaptable control system is one that modifies the control law so

Whether one looks at it from the perspective of ML, in that the system is initially poor at meeting the objective and hence it changes system parameters to improve or from the control theory perspective that the environment or system has changed and the control objective is not

This chapter is written using the attitude and altitude controller of a quadrotor unmanned aerial vehicle (UAV) as a running example however every idea will be presented generally at first

A quadrotor UAV (refer Figure 1) has four motors that independently provide thrust (as indicated by F1, F2, F<sup>3</sup> and F4) and based on these thrusts the UAV can change its attitude (roll f, pitch θ and yaw ψ) and altitude (z). This chapter will focus on the inner loop control of the attitude and altitude variables and is based on the work of Bakshi and Ramachandran [1].

a task (T) with increasing experience (E). This brings us to machine learning (ML).

met demanding a change in the control law, we are describing a similar situation.

information into the system a priori is impractical.

136 Adaptive Robust Control Systems

new situations to meet its objective given the limited set of actions.

that the system remains stable and the control objective is met.

and then tied back to the practical example in consideration.

2. Quadrotor system

Figure 1. Quadrotor coordinate system [2].

The quadrotor parameters are based on the work of Bouabdallah [4] (Table 1).


Table 1. Quadrotor parameters [4].

#### 2.2. Moments and forces on the quadrotor system

#### See Table 2.


Iyyθ€ � <sup>w</sup>\_ψ\_ ð Þ� Izz � Ixx Jrw\_ <sup>Ω</sup><sup>r</sup> <sup>þ</sup> l Tð Þ� <sup>1</sup> � <sup>T</sup><sup>3</sup> <sup>h</sup> <sup>X</sup>

mx€ � ð Þ <sup>s</sup>ψs<sup>w</sup> <sup>þ</sup> <sup>c</sup>ψsθc<sup>w</sup> <sup>X</sup>

my€ � �ð Þ <sup>c</sup>ψs<sup>w</sup> <sup>þ</sup> <sup>s</sup>ψsθc<sup>w</sup> <sup>X</sup>

propeller's speed set point and its true speed as in Ref. [2].

thrust along z will result in motion in the z-direction.

2.4. Rotor dynamics

2.5. Summary of model

for the purposes of this chapter:

them is not crucial to this chapter.

increased accuracy with the real world scenario.

Izzψ€ � <sup>θ</sup>\_w\_ Ixx � Iyy � � <sup>þ</sup> JrΩ\_ <sup>r</sup> þ �ð Þ<sup>1</sup> <sup>i</sup> <sup>X</sup>

4

Model Reference Adaptive Control of Quadrotor UAVs: A Neural Network Perspective

Hxi ! þ �ð Þ<sup>1</sup> <sup>i</sup>þ<sup>1</sup><sup>X</sup>

þ l Hð Þþ <sup>x</sup><sup>2</sup> � Hx<sup>4</sup> l �Hy<sup>1</sup> þ Hy<sup>3</sup>

<sup>0</sup>:178<sup>s</sup> <sup>þ</sup> <sup>1</sup> (7)

4

http://dx.doi.org/10.5772/intechopen.71487

Rmyi (2)

139

� � (3)

i¼1

Ti (4)

CxAcrx\_j j x\_ (5)

CyAcry\_j j y\_ (6)

i¼1

4

i¼1

Hxi � <sup>1</sup> 2

> Hyi � <sup>1</sup> 2

Ti �<sup>X</sup> 4

> Ti �<sup>X</sup> 4

i¼1

i¼1

4

i¼1 Qi !

mz€ � mg � ð Þ <sup>c</sup>ψc<sup>w</sup> <sup>X</sup>

4

i¼1

4

i¼1

A first order closed loop transfer function is used to reproduce the dynamics between the

G sð Þ¼ <sup>0</sup>:<sup>936</sup>

The following is a breakdown of the basic understanding of a quadrotor UAV system required

a. The sum of the four thrusts (as indicated by F1, F2, F<sup>3</sup> and F<sup>4</sup> in Figure 1) along the z axis is responsible for countering the weight of the craft. Any surplus or shortage of the total

b. An imbalance in the forces F<sup>2</sup> and F<sup>4</sup> will result in a rolling motion along the x-axis, similarly imbalance in F<sup>1</sup> and F<sup>3</sup> will result in a pitching motion along the y-axis. Note that the very act of rolling or pitching tilts the craft such that the motor thrusts are no longer effected purely in the z-direction, causing the craft to descend, therefore the total thrust must be summarily increased so that the component along z is maintained. c. The rotations of motors 1 and 3 are in the same direction and the opposite of motors 2 and 4. To achieve a yawing motion increased thrust must be applied to a diametrically oppo-

d. Various second order effects come into play, which have been modeled but understanding

e. This model dynamically calculates the thrust and drag coefficients which results in

site pair (say 1 and 3) and reduced thrust on the other pair (2 and 4).

Table 2. Quadrotor moments and forces summary [4].

#### 2.3. Equations of motion

$$I\_{xx}\ddot{\varphi} - \dot{\theta}\dot{\psi}\left(I\_{yy} - I\_{zz}\right) + f\_r \dot{\theta}\Omega\_r + l(-T\_2 + T\_4) - h\left(\sum\_{i=1}^4 H\_{yi}\right) + (-1)^{i+1} \sum\_{i=1}^4 R\_{mxi} \tag{1}$$

Model Reference Adaptive Control of Quadrotor UAVs: A Neural Network Perspective http://dx.doi.org/10.5772/intechopen.71487 139

$$I\_{yy}\ddot{\boldsymbol{\theta}} - \dot{\boldsymbol{\varphi}}\dot{\boldsymbol{\psi}} \left(I\_{zz} - I\_{xx}\right) - I\_r \dot{\boldsymbol{\varphi}} \boldsymbol{\Omega}\_r + l(T\_1 - T\_3) - h \left(\sum\_{i=1}^4 H\_{xi}\right) + (-1)^{i+1} \sum\_{i=1}^4 R\_{myi} \tag{2}$$

$$I\_{zz}\ddot{\boldsymbol{\varphi}} - \dot{\theta}\dot{\boldsymbol{\varphi}}(I\_{xx} - I\_{yy}) + I\_r\dot{\Omega}\_r + (-1)^i \left(\sum\_{i=1}^4 Q\_i\right) + l(H\_{x2} - H\_{x4}) + \ \left.l\left(-H\_{y1} + H\_{y3}\right)\right| \tag{3}$$

$$m\ddot{z} - mg - \left(c\psi c\varphi\right) \sum\_{i=1}^{4} T\_i \tag{4}$$

$$m\ddot{\mathbf{x}} - (\mathbf{s}\psi\mathbf{s}\varphi + \mathbf{c}\psi\mathbf{s}\theta\mathbf{c}\varphi) \sum\_{i=1}^{4} T\_i - \sum\_{i=1}^{4} H\_{xi} - \frac{1}{2} \mathbb{C}\_{\mathbf{x}} A\_{\mathbf{c}} \rho \dot{\mathbf{x}} |\dot{\mathbf{x}}| \tag{5}$$

$$
\sigma m \ddot{y} - (-c\psi s\varphi + s\psi s\theta c\varphi) \sum\_{i=1}^{4} T\_i - \sum\_{i=1}^{4} H\_{yi} - \frac{1}{2} \mathbb{C}\_y A\_c \rho \dot{y} |\dot{y}| \tag{6}
$$

#### 2.4. Rotor dynamics

2.2. Moments and forces on the quadrotor system

Rolling moments Body gyro effect <sup>θ</sup>\_ψ\_ Iyy � Izz

Pitching moments Body gyro effect <sup>w</sup>\_ψ\_ ð Þ Izz � Ixx

Yawing moments Body gyro effect <sup>w</sup>\_ <sup>θ</sup>\_ Ixx � Iyy

Forces along <sup>z</sup> axis Actuators action <sup>c</sup>ψc<sup>w</sup> <sup>P</sup><sup>4</sup>

Forces along <sup>x</sup> axis Actuators action <sup>c</sup>ψc<sup>w</sup> <sup>P</sup><sup>4</sup>

Hub force in x axis

Hub force in y axis

Propeller gyro effect Jrθ\_ Ω<sup>r</sup> Roll actuators action lð Þ �T<sup>2</sup> þ T<sup>4</sup> Hub moment due to sideward flight h P<sup>4</sup>

Rolling moment due to forward flight ð Þ �<sup>1</sup> <sup>i</sup>þ<sup>1</sup> <sup>P</sup><sup>4</sup>

Rolling moment due to sideward flight ð Þ �<sup>1</sup> <sup>i</sup>þ<sup>1</sup> <sup>P</sup><sup>4</sup>

Hub force unbalance in forward flight l Hð Þ <sup>x</sup><sup>2</sup> � Hx<sup>4</sup> Hub force unbalance in sideward flight l �Hy<sup>1</sup> þ Hy<sup>3</sup>

Inertial counter-torque JrΩ\_ <sup>r</sup> Counter-torque unbalance ð Þ �<sup>1</sup> <sup>i</sup> <sup>P</sup><sup>4</sup>

Weight mg

Friction <sup>1</sup>

Friction <sup>1</sup>

Propeller gyro effect Jrw\_ Ω<sup>r</sup> Pitch actuators action l Tð Þ <sup>1</sup> � T<sup>3</sup> Hub moment due to forward flight h P<sup>4</sup>

See Table 2.

138 Adaptive Robust Control Systems

2.3. Equations of motion

Ixxw€ � <sup>θ</sup>\_ψ\_ Iyy � Izz

Forces along y axis Actuators action

Table 2. Quadrotor moments and forces summary [4].

� � <sup>þ</sup> Jrθ\_ <sup>Ω</sup><sup>r</sup> <sup>þ</sup> <sup>l</sup>ð Þ� �T<sup>2</sup> <sup>þ</sup> <sup>T</sup><sup>4</sup> <sup>h</sup> <sup>X</sup>

4

þ �ð Þ<sup>1</sup> <sup>i</sup>þ<sup>1</sup><sup>X</sup>

4

� �

<sup>i</sup>¼<sup>1</sup> Hyi � �

<sup>i</sup>¼<sup>1</sup> Hxi � �

� �

� �

i¼1 Ti

i¼1 Ti

<sup>2</sup>CxAcrx\_j j x\_

<sup>2</sup>CyAcry\_j j y\_

ð Þ �cψs<sup>w</sup> <sup>þ</sup> <sup>s</sup>ψsθc<sup>w</sup> <sup>P</sup><sup>4</sup>

� P4 i¼1 Hxi

� P4 i¼1 Hyi

<sup>i</sup>¼<sup>1</sup> Qi

<sup>i</sup>¼<sup>1</sup> Rmxi

<sup>i</sup>¼<sup>1</sup> Rmyi

Rmxi (1)

i¼1 Ti � �

i¼1

i¼1 Hyi ! A first order closed loop transfer function is used to reproduce the dynamics between the propeller's speed set point and its true speed as in Ref. [2].

$$G(\mathbf{s}) = \frac{0.936}{0.178\mathbf{s} + 1} \tag{7}$$

#### 2.5. Summary of model

The following is a breakdown of the basic understanding of a quadrotor UAV system required for the purposes of this chapter:

