Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

3.1 Introduction

Flight control system, which is a complicated multi-input, multi-output, and time-varying nonlinear system, is the core of the simulation training system design of unmanned aerial vehicle (UAV), which also determines the whole system’s performance directly (McLean 1990). For the existence of strong coupling among the inputs and the nonexistence of mapping relationship between the performance index and the controller parameter, the selection of the controller parameters is a very tough problem in the design of the flight control system. Presently, cut and try method is commonly used to identify all the control loop parameters of flight control system. But this design method is low efficient and, to a great extent, much depends on the experience of the designer, while the flight control system will be more complex with the improvement of the aircraft performances, and these are becoming the bottleneck of the flight control system design (Zhang and An 2008). In the first part of this chapter, we proposed a parameter identification method for UAV control system based on predator–prey particle swarm optimization (PSO). While using PSO to optimize flight control systems, there are two problems to be solved. Firstly, the UAV model selected is very important. Secondly, it is very crucial for PSO algorithm to choose the fitness function, because there is no obvious mapping relationship between the property index and the UAV controller. Therefore, how to evaluate each particle’s quality turns out to be a key issue which must be resolved.

Micro aerial vehicles (MAVs), essentially small-scale flying robots, became an area of interest in the aerospace community with the initiation of the micro UAV (MUAV) program by Defense Advanced Research Projects Agency (DARPA). The technological feasibility of MAVs as one possible solution to new challenging reconnaissance mission scenarios in urban warfare (local, close-up range, hidden reconnaissance, operation between obstacles and maybe even inside buildings) is depending on a bunch of questions, which are only partly answered so far (Johnson and Turbe 2006; Bloss 2009). One of the challenging problems for MAVs is to design a robust flight control system for such a miniaturized “bird,” which is generally one order of magnitude smaller than any today’s operational UAV. Hover and stare is a key issue to the performance of MAVs and similar kinds of unmanned vehicles, which are designed to perform surveillance and reconnaissance missions. However, pendulum-like oscillation triggered by external disturbances and other uncertain factors will badly impair its performance, thus resulting in blurred images or even overturn of the vehicle (Pflimlin et al. 2010). As a result, control techniques of such a vehicle are becoming more and more important for their wide applications in civil and military fields. The second part of this chapter designed a novel type of pendulum-like oscillation controller for MAV hover and stare state in the presence of external disturbances, which is based on linear-quadratic regulator (LQR) and PSO (Duan and Sun 2013). A linear mathematical model of pendulum phenomenon based upon actual wind tunnel test data representing the hover mode is established, and a hybrid LQR and PSO approach is proposed to stabilize oscillation. PSO is applied for parameter optimization of the designed LQR controller.

3.2 Parameter Identification for UAVs Based on Predator–Prey PSO

3.2.1 Mathematical Model of UAVs

The 6-DOF nonlinear model of UAVs is illustrated in this section, which is the prerequisite for simplifying and linearizing the mathematical model (Zhang 2004).

3.2.1.1 Nonlinear Equations of 6-DOF Modeling

UAV nonlinear equations of 6-DOF can be deduced by the aerodynamic and kinematical equations as follows:

$$ \left\{\begin{array}{l}\dot{V}=\frac{1}{m}\left({P}_x\; \cos\;\alpha\;\cos\;\beta -{P}_y\; \sin\;\alpha\;\cos\;\beta +{P}_z\; \sin\;\beta +Z\; \sin\;\beta -Q\right)\\ {}\begin{array}{cc}\hfill \hfill & \hfill -g\Big( \cos\;\alpha\;\cos\;\beta\;\sin\;\vartheta - \sin\;\alpha\;\cos\;\beta \hfill \end{array}\; \cos\;\vartheta\;\cos\;\gamma - \sin\;\beta\;\cos\;\vartheta\;\sin\;\gamma \\ {}\dot{\alpha}=-\frac{1}{ mV\; \cos \beta}\left({P}_x\; \sin\;\alpha +{P}_y\; \cos\;\alpha +Y\right)+{\omega}_z- \tan\;\beta \left({\omega}_x\; \cos\;\alpha -{\omega}_y\; \sin\;\alpha \right)\frac{\delta y}{\delta x}\\ {}\begin{array}{cc}\hfill \hfill & \hfill +\frac{g}{V \cos\;\beta}\hfill \end{array}\left( \sin\;\alpha\;\sin\;\vartheta + \cos\;\alpha\;\cos\;\vartheta\;\cos\;\gamma \right)\\ {}\dot{\beta}=\frac{1}{ mV}\left(-{P}_x\; \cos\;\alpha\;\sin\;\beta +{P}_y\; \sin\;\alpha\;\sin\;\beta +{P}_z\; \cos\;\beta +Z\right)+{\omega}_x\; \sin\;\alpha \\ {}\begin{array}{cc}\hfill \hfill & \hfill +\hfill \end{array}{\omega}_y\; \cos\;\alpha +\frac{g}{V}\left( \cos\;\alpha\;\sin\;\beta\;\sin\;\vartheta - \sin\;\alpha\;\sin\;\beta\;\cos\;\vartheta\;\cos\;\gamma + \cos\;\beta\;\sin\;\gamma\;\cos\;\vartheta \right)\end{array}\right. $$
(3.1)

where m is the mass of the UAV; α is attack angle; β is sideslip angle; ϑ is pitch angle; γ is roll angle; P is engine thrust; X, Y, Z are the projections of aerodynamic force in body axis; and ωx, ωy, ωz denote the coordinate components of palstance. These three equations already contain three forces in the body axis which are generated by the thrust vector:

$$ \left\{\begin{array}{l}{\dot{\omega}}_x={b}_{11}{\omega}_y{\omega}_z+{b}_{12}{\omega}_x{\omega}_z+\frac{I_y\left({M}_x+{M}_{px}\right)+{I}_{xy}\left({M}_y+{M}_{py}\right)}{I_x{I}_y-{I}_{xy}{}^2}\\ {}{\dot{\omega}}_y={b}_{21}{\omega}_y{\omega}_z+{b}_{22}{\omega}_x{\omega}_z+\frac{I_{xy}\left({M}_x+{M}_{px}\right)+{I}_x\left({M}_y+{M}_{py}\right)}{I_x{I}_y-{I}_{xy}{}^2}\\ {}{\dot{\omega}}_z=\frac{I_x-{I}_y}{I_z}{\omega}_x{\omega}_y+\frac{I_{xy}}{I_z}\left({\omega}_x{}^2-{\omega}_y{}^2\right)+\frac{\left({M}_z+{M}_{pz}\right)}{I_z}\end{array}\right. $$
(3.2)
$$ \begin{array}{l}{b}_{11}=\frac{I_y{}^2-{I}_y{I}_z-{I}_{xy}{}^2}{I_x{I}_y-{I}_{xy}{}^2},\kern0.72em {b}_{22}=\frac{I_x{I}_z-{I}_x{}^2-{I}_{xy}{}^2}{I_x{I}_y-{I}_{xy}{}^2},\\ {}{b}_{12}=\frac{I_{xy}\left({I}_z-{I}_y-{I}_x\right)}{I_x{I}_y-{I}_{xy}{}^2},\kern0.72em {b}_{21}=\frac{I_{xy}\left({I}_y-{I}_z-{I}_x\right)}{I_x{I}_y-{I}_{xy}{}^2}.\end{array} $$

where Ix, Iy, Iz and Mx, My, Mz denote the coordinate components of inertia moment and resultant moment, respectively.

In the body axis, we have

$$ \left\{\begin{array}{l}\dot{\gamma}={\omega}_x- \tan \vartheta \left({\omega}_y\; \cos \gamma -{\omega}_z\; \sin \gamma \right)\\ {}\dot{\vartheta}={\omega}_y\; \sin \gamma +{\omega}_z\; \cos \gamma \\ {}\dot{\psi}=\frac{1}{ \cos \vartheta}\left({\omega}_y\; \cos \gamma -{\omega}_z\; \sin \gamma \right)\end{array}\right. $$
(3.3)

where ψ is drift angle. Aerodynamic equations can be described as

$$ \begin{array}{l}Y={C}_y qS,{C}_y={C}_y\left(\alpha, {\delta}_z\right),Z={\displaystyle \sum {C}_z qS},{\displaystyle \sum {C}_z}={C}_z\left(\alpha, {\delta}_x\right)+{C}_z\left(\alpha, {\delta}_y\right)\\ {}Q={C}_x qS,{C}_x={C}_x\left(\alpha, {\delta}_z\right)\end{array} $$

where δx, δy, δz are the coordinate components of deflection angles of the controlling surface. Aerodynamic moments can be given by

$$ \begin{array}{l}{M}_x={\displaystyle \sum {m}_x qsl},{\displaystyle \sum {m}_x}={m}_x{}^{\beta}\beta +{m}_x\left(\alpha, {\delta}_x\right)+{m}_x\left(\alpha, {\delta}_y\right)+{m}_x{}^{\omega x}{\omega}_x\frac{l}{2V}+{m}_x{}^{\omega y}{\omega}_y\frac{l}{2V}\\ {}{M}_y={\displaystyle \sum {m}_y qsl},{\displaystyle \sum {m}_y}={m}_y{}^{\beta}\beta +{m}_y\left(\alpha, {\delta}_x\right)+{m}_y\left(\alpha, {\delta}_y\right)+{m}_y{}^{\omega x}{\omega}_x\frac{l}{2V}+{m}_y{}^{\omega y}{\omega}_y\frac{l}{2V}\\ {}{M}_z={\displaystyle \sum {m}_z qs{b}_A},{\displaystyle \sum {m}_z}={m}_z\left(\alpha, {\delta}_z\right)+{m}_z{}^{\omega z}{\omega}_z\frac{b_A}{V}+{m}_z{}^{\dot{\alpha}}\dot{\alpha}\frac{b_A}{V}.\end{array} $$

When the height and mach are fixed, aerodynamic coefficients Cy(α,δz), Cx(α,δz), Cz(α,δx), Cz(α,δy), mx(α,δx), mx(α,δy), my(α,δx), my(α,δy), mz(α,δz) are the functions of the height, mach, attack angle, and control surface. Aerodynamic derivatives mzωz, \( {m}_z{}^{\dot{\alpha}} \), mxβ, mxωx, mxωy, myβ, myωx, myωy are specified values.

3.2.1.2 Nonlinear Equations of 5-DOF Modeling

Suppose that UAV equations can be simplified into nonlinear equations of 5-DOF if the thrust and the resistance of the aircraft are the same. Without consideration of the thrust vector, we have \( \dot{V}=0,P=Q,{P}_x=P\ll G,{P}_y={P}_z=0 \). On this condition, the equations of the UAV speed level off (Zhang 2004). At the same time, it is assumed that Ixy ≪ IxIy − Ixy2, state variable x = (α,β,ωx,ωy,ωz)T. The UAV nonlinear equations of 5-DOF are represented as follows:

$$ \left\{\begin{array}{l}\dot{\alpha}=-\frac{1}{ mV\; \cos\;\beta}\left(P\; \sin\;\alpha +Y\right)+{\omega}_z- \tan\;\beta \left({\omega}_x\; \cos\;\alpha -{\omega}_y\; \sin\;\alpha \right)\\ {}\begin{array}{cc}\hfill \hfill & \hfill +\frac{g}{V\; \cos\;\beta}\hfill \end{array}\left( \sin\;\alpha\;\sin\;\vartheta + \cos\;\alpha\;\cos\;\vartheta\;\cos\;\gamma \right)\\ {}\dot{\beta}=\frac{1}{ mV}\left(-P\; \cos\;\alpha\;\sin\;\beta +Z\right)+{\omega}_x\; \sin\;\alpha \\ {}\begin{array}{cc}\hfill \hfill & \hfill +\hfill \end{array}{\omega}_y\; \cos\;\alpha +\frac{g}{V}\left( \cos\;\alpha\;\sin\;\beta\;\sin\;\vartheta - \sin\;\alpha\;\sin\;\beta\;\cos\;\vartheta\;\cos\;\gamma + \cos\;\beta\;\sin\;\gamma\;\cos\;\vartheta \right)\\ {}{\dot{\omega}}_x=\frac{I_y{}^2-{I}_y{I}_z-{I}_{xy}{}^2}{I_x{I}_y-{I}_{xy}{}^2}{\omega}_y{\omega}_z+\frac{I_{xy}\left({I}_z-{I}_y-{I}_x\right)}{I_x{I}_y-{I}_{xy}{}^2}{\omega}_x{\omega}_z+\frac{I_y{\displaystyle \sum {M}_x}}{I_x{I}_y-{I}_{xy}{}^2}\\ {}\begin{array}{cc}\hfill \hfill & \hfill \hfill \end{array}{b}_{11}{\omega}_y{\omega}_z+{b}_{12}{\omega}_x{\omega}_z+\frac{I_y{M}_x}{I_x{I}_y-{I}_{xy}{}^2}\\ {}{\dot{\omega}}_y=\frac{I_{xy}\left({I}_y-{I}_z-{I}_x\right)}{I_x{I}_y-{I}_{xy}{}^2}{\omega}_y{\omega}_z+\frac{I_x{I}_z-{I}_x{}^2-{I}_{xy}{}^2}{I_x{I}_y-{I}_{xy}{}^2}{\omega}_x{\omega}_z+\frac{I_x{\displaystyle \sum {M}_y}}{I_x{I}_y-{I}_{xy}{}^2}\\ {}\begin{array}{cc}\hfill \hfill & \hfill {b}_{21}{\omega}_y{\omega}_z+{b}_{22}{\omega}_x{\omega}_z+\frac{I_x{M}_y}{I_x{I}_y-{I}_{xy}{}^2}\hfill \end{array}\\ {}{\dot{\omega}}_z=\frac{I_x-{I}_y}{I_z}{\omega}_x{\omega}_y+\frac{I_{xy}}{I_z}\left({\omega}_x{}^2-{\omega}_y{}^2\right)+\frac{{\displaystyle \sum {M}_z}}{I_z}\frac{I_x-{I}_y}{I_z}{\omega}_x{\omega}_y+\frac{I_{xy}}{I_z}\left({\omega}_x{}^2-{\omega}_y{}^2\right)+\frac{M_z}{I_z}\end{array}\right. $$
(3.4)

3.2.1.3 Linearization Modeling

In most cases, the UAV maintains steady straight level flight, and (3.4) can be modeled as linear time invariant state-space perturbation models, with the nominal trajectory being steady-level trimmed flight. The UAV’s linear equations are as follows:

$$ \left\{\begin{array}{l}\Delta \dot{\alpha}=\Delta {\omega}_z-\left({Y}^{\alpha}\Delta \alpha +\Delta {\delta}_Z\right)\hfill \\ {}\Delta {\dot{\omega}}_z={M}_z{}^{\alpha}\Delta \alpha +{M}_z{}^{\omega_z}\Delta {\omega}_z+{M}_z{}^{\delta_z}\Delta {\delta}_z\hfill \\ {}\Delta \dot{\beta}=\Delta {\omega}_y+{Z}^{\delta_x}\Delta {\delta}_x+{Z}^{\delta_y}\Delta {\delta}_y\hfill \\ {}\Delta {\dot{\omega}}_x={M}_x{}^{\beta}\Delta \beta +{M}_x{}^{\omega_x}\Delta {\omega}_x+{M}_x{}^{\omega_y}\Delta {\omega}_y+{M}_x{}^{\delta_x}\Delta {\delta}_x+{M}_x{}^{\delta_y}\Delta {\delta}_y\hfill \\ {}\Delta {\dot{\omega}}_y={M}_y{}^{\beta}\Delta \beta +{M}_y{}^{\omega_x}\Delta {\omega}_x+{M}_y{}^{\omega_y}\Delta {\omega}_y+{M}_y{}^{\delta_x}\Delta {\delta}_x+{M}_y{}^{\delta_y}\Delta {\delta}_y\hfill \end{array}\right. $$
(3.5)

We have the state equations.

$$ \begin{array}[b]{l}\dot{x}= Ax+ Bu\\ {}y= Cx\end{array} $$
(3.6)

where the state variable x = (α,ωz,β,ωx,ωy)T and the control surface u = (δz,δx,δy)T and A, B, C can be denoted by

$$ \arraycolsep4pt\begin{aligned}A&=\left[\begin{array}{ccccc} -{Y}^{\alpha} & 1 & 0 & 0 & 0 \\ {} {M}_z^{\alpha} & {M}_z^{\omega_z} & 0 & 0 & 0 \\ {} 0 & 0 & {Z}^{\beta} & 0 & 1 \\ {} 0 & 0 & {M}_x^{\beta} & {M}_x^{\omega_x} & {M}_x^{\omega_y} \\ {} 0 & 0 & {M}_y^{\beta} & {M}_y^{\omega_x} & {M}_y^{\omega_y} \end{array}\right],\begin{array}{cc} & B=\left[\arraycolsep4pt\begin{array}{ccc} -Y{\delta}_z & 0 & 0 \\ {} {M}_z^{\delta_z} & 0 & 0 \\ {} 0 & {Z}^{\delta_x} & {Z}^{\delta_y} \\ {} 0 & {M}_x^{\delta_x} & {M}_x^{\delta_y} \\ {} 0 & {M}_y^{\delta_x} & {M}_y^{\delta_y} \end{array}\right] \end{array},\\ C&=\left[\arraycolsep5pt\begin{array}{lllll} 1 & 0 & 0 & 0 & 0 \\ {} 0 & 1 & 0 & 0 & 0 \\ {} 0 & 0 & 1 & 0 & 0 \\ {} 0 & 0 & 0 & 1 & 0 \\ {} 0 & 0 & 0 & 0 & 1 \end{array}\right]\end{aligned} $$

3.2.2 Predator–Prey PSO for Parameter Identification

3.2.2.1 UAV Flight Control System Design in Matlab Environment

Based on control augmentation system of UAVs, the aircraft linear equations are generally obtained by a series of equilibrium points. The flight envelope of this UAV must satisfy 0 ≤ H ≤ 18km and 0.6 ≤ M ≤ 2.2 (Zhang 2004). Figure 3.1 shows the schematic diagram of UAV system.

Fig. 3.1
figure 1figure 1

UAV system model (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

As is obvious in Fig. 3.1, the UAV system is comprised of four subsystems: control law, actuator, mathematical model, and simulation result display.

Matrix K for the function of control law can be obtained from Matlab main program. Actuator module is responsible for control adjusting, which can also limit the amplitudes of control surface deflection angle. The actuator module can be shown with Fig. 3.2.

Fig. 3.2
figure 2figure 2

Actuator module of UAVs in Matlab environment (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

The actuator module requires that deflection angle of the elevator must be less than that of aileron and rudder. In order to prevent the deflection angles of the control surface from deflecting too fast, the angle authority of the elevator is set at − 18 to 12, aileron and rudder at − 25 to 25, and the angle rate authority of elevator and aileron at 50/s, and rudder is at 80/s. UAV model module is displayed in Fig. 3.3.

Fig. 3.3
figure 3figure 3

UAV model module in Matlab environment (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

where matrix A and B are both obtained from the workspace of Matlab. Figure 3.4 shows the simulation result display module.

Fig. 3.4
figure 4figure 4

Simulation result display module in Matlab environment (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

The control law u = − Kx is used. K denotes the state-feedback gain, and it can be illustrated with the following matrix:

$$ K=\left[\arraycolsep4pt\begin{array}{ccccc}\hfill {k}_1\hfill & \hfill {k}_2\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ {}\hfill 0\hfill & \hfill 0\hfill & \hfill {k}_3\hfill & \hfill {k}_4\hfill & \hfill {k}_5\hfill \\ {}\hfill 0\hfill & \hfill 0\hfill & \hfill {k}_6\hfill & \hfill {k}_7\hfill & \hfill {k}_8\hfill \end{array}\right] $$

3.2.2.2 Predator–Prey PSO for Identifying Controller Parameters

In the Gbest model of PSO, each particle has its current position and velocity in a space of solution. The best solution found so far are Pbest and Gbest. Each particle aims to get a global optimal solution by current velocity, Pbest, and Gbest. Gbest model can be expressed as (Shi and Eberhart 1998a)

$$ {v}_{ij}\left(k+1\right)=\omega {v}_{ij}(k)+{c}_1{r}_1\left[{p}_i(k)-{x}_{ij}(k)\right]+{c}_2{r}_2\left[{g}_i(k)-{x}_{ij}(k)\right] $$
(3.7)
$$ {x}_{ij}\left(k+1\right)={x}_{ij}(k)+{v}_{ij}\left(k+1\right) $$
(3.8)

where vi(k) and xi(k) respectively denote the velocity and position of the i th particle at step k, j is the dimension of particle i, c1 and c2 are weight coefficients, r1 and r2 are random numbers between 0 and 1, pi is the best position of the i th particle, and gi is the best position which particles have ever found.

Generally, the basic PSO algorithm mentioned above is easily falling to local optimal solutions. In this case, the concept of predator–prey behavior is proposed to improve the basic PSO. Predator–prey PSO is a method which takes a cue from the behavior of schools of sardines and pods of killer whales (Higashitani et al. 2006; Wang and Duan 2013). In this model, particles are divided into two categories, predator and prey. Predators show the behavior of chasing the center of preys’ swarm; they look like chasing preys (Duan et al. 2011), and preys escape from predators in multidimensional solution space. After taking a trade-off between predation risk and their energy, escaping particles would take different escaping behaviors. This helps the particles avoid the local optimal solutions and find the global optimal solution.

The velocities of the predator and the prey in the improved PSO can be defined by (Higashitani et al. 2006)

$$ \begin{array}{l}{v}_{dij}\left(k+1\right)={\omega}_d{v}_{dij}(k)+{c}_1{r}_1\left[{p}_{dij}\right(k\left)-{x}_{dij}\right(k\left)\right]+{c}_2{r}_2\left[{g}_{dj}\right(k\left)-{x}_{dij}\right(k\left)\right]\\ {}+{c}_3{r}_3\left[{g}_j(k)-{x}_{dij}\right(k\left)\right]\end{array} $$
(3.9)
$$ \begin{array}{l}{v}_{rij}\left(k+1\right)={\omega}_r{v}_{rij}(k)+{c}_4{r}_4\left[{p}_{rij}\right(k\left)-{x}_{rij}\right(k\left)\right]\\ {}\begin{array}{ccc}\hfill \hfill & \hfill \hfill & \hfill \hfill \end{array}+{c}_5{r}_5\left[{g}_{rj}(k)-{x}_{rij}\right(k\left)\right]+{c}_6{r}_6\left[{g}_j\right(k\left)-{x}_{rij}\right(k\left)\right]\\ {}\begin{array}{ccc}\hfill \hfill & \hfill \hfill & \hfill \hfill \end{array}- Pasign\left[{x}_{dIj}(k)-{x}_{rij}\right(k\left)\right] \exp \left[-b\right|{x}_{dij}(k)-{x}_{rij}(k)\left|\right]\end{array} $$
(3.10)

where d and r denote predator and prey, respectively, pdi is the best position of predators, gd is the best position which predators have ever found, pri is the best position of preys, gr is the best position which preys have ever found, g is the best position which all the particles have ever found, and ωd and ωr can be defined as

$$ {\omega}_d=0.2 \exp \left(-10\frac{ {\mathit{iteration}}}{ {\mathit{iteratio{n}}}_{\max }}\right)+0.4 $$
(3.11)
$$ {\omega}_r={\omega}_{\max }-\frac{\omega_{\max }-{\omega}_{\min }}{ {\mathit{iteratio{n}}}_{\max }} {\mathit{iteration}} $$
(3.12)

PSO can be also improved by a modification of the inertia weight ωr in (3.12). The inertia weight, whose value is between 0 and 1[Adaptive Particle Swarm Optimization], can be used to balance the local and global search during the optimization process. If the inertia weight is big, it is possible to enhance global search. Otherwise, smaller inertia weight will enhance the local search. In (3.12) iterationmax is maximum iteration, ωmax and ωmin are, respectively, maximum and minimum of ωr. In our experiment, ωmax and ωmin are 0.9 and 0.2, respectively. And the definition of I is given by

$$ I=\left\{k\Big|\underset{k}{ \min}\left(\left|{x}_{dk}-{x}_{ri}\right|\right)\right\} $$
(3.13)

Then I denotes the number of the ith prey’s nearest predator. In (3.10), P is used to decide if the prey escapes or not (P = 0 or P = 1), and a, b are the parameters which decide the difficulty of the preys escaping from the predators. The closer the prey and the predator, the harder the prey escapes from the predator. a, b are denoted by

$$ a={x}_{span},\begin{array}{cc}\hfill \hfill & \hfill b=\frac{100}{x_{span}}\hfill \end{array} $$
(3.14)

where xspan is the span of the variable.

The parameter identification of the conventional flight controller can be treated as the typical continual spatial optimization problem. PSO is a novel way for solving the problem. PSO, which is a bio-inspired computation algorithm, can be applied to flight system control to reduce the workload of conventional designer. The bounds of the control gain parameters are set, and PSO searches for the corresponding space automatically to find the optimal parameters. The process in conventional design is conducted manually; now it can be done automatically. Bio-inspired computation can be applied to promote the automation of conventional controller design.

Using the proposed predator–prey PSO algorithm to obtain the optimal parameter combination for the UAV flight control system here, the fitness function is given by

$$ J=\frac{1}{2}{\displaystyle \int \Big(x\hbox{'} Qx+u\hbox{'} Ru}\Big) dt \vspace*{-3pt} $$
(3.15)

where x and u are, respectively, the state vector and the control vector. Q and R are diagonal positive matrix. Here the weighting matrices are chosen as Q =diag(50,10,20,30,30) and R =diag(100,100,100). The smaller J, the better the particle.

The position vector of the predator and the prey is defined by

$$ \begin{array}{l}{x}_d=\left(\begin{array}{cccccccc}\hfill {k}_1\hfill & \hfill {k}_2\hfill & \hfill {k}_3\hfill & \hfill {k}_4\hfill & \hfill {k}_5\hfill & \hfill {k}_6\hfill & \hfill {k}_7\hfill & \hfill {k}_8\hfill \end{array}\right)\\ {}{x}_r=\left(\begin{array}{cccccccc}\hfill {k}_1\hfill & \hfill {k}_2\hfill & \hfill {k}_3\hfill & \hfill {k}_4\hfill & \hfill {k}_5\hfill & \hfill {k}_6\hfill & \hfill {k}_7\hfill & \hfill {k}_8\hfill \end{array}\right)\end{array} \vspace*{-3pt} $$

where xd and xr have the constraint of ± 10, which is set according to exact experience.

The process of proposed predator–prey PSO algorithm for solving UAV controller parameter identification can be described with Fig. 3.5 (Duan and Sun 2013).

Fig. 3.5
figure 5figure 5

The pseudocode of predator–prey PSO algorithm for UAV flight controller (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

The above mentioned flow chart of the predator–prey PSO algorithm process can also be illustrated with Fig. 3.6.

Fig. 3.6
figure 6figure 6

Flow chart of the predator–prey PSO (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

The complexity of predator–prey PSO algorithm can be computed, and Table 3.1 shows a comparison of the complexity analysis between basic PSO and predator–prey PSO.

Table 3.1 Comparison of complexity analysis between basic PSO and predator–prey PSO

In Table 3.1, m = md + mr, and n is the dimension of particle’s position. The total complexity of basic PSO and predator–prey PSO can be expressed as

$$ T{(n)}_{basic\_ PSO}=O\left(14{N}_{\max}\; mn\right) \vspace*{-3pt} $$
(3.16)
$$ T{(n)}_{improved\_ PSO}=O\left({N}_{\max}\;{m}_r\;{n}^2\right) $$
(3.17)

3.2.3 Experiments

In order to investigate the feasibility and effectiveness of the proposed predator–prey PSO approach for identification of UAV controller parameters, a series of experiments are conducted under some constrained conditions.

The predator–prey PSO algorithm is implemented in a Matlab 2008a programming environment with an Intel Core 2 PC running Windows XP SP2. No commercial PSO tools are used in these experiments.

  • Case 1: In this case, the parameter values of predator–prey PSO are set to α = 10, β = 10, Nmax = 100, t = 20s, mach=0.8, H = 8000m, md = 10, mr = 20 where t is the simulating time of the controller. Comparison of the experiment results between the improved PSO and the LQR method which could directly compute the state-feedback gain K is illustrated from Fig. 3.7 (a–e). Figure 3.7f shows the evolution curve of the proposed PSO.

    Fig. 3.7
    figure 7figure 7

    Results of identifying controller parameters for UAVs based on predator–prey PSO in Case 1 (a) Comparison of attack angle responses. (b) Comparison of pitch rate responses. (c) Comparison of sideslip angle responses. (d) Comparison of roll rate responses. (e) Comparison of yaw rate responses. (f) Evolution curve of predator–prey PSO (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

    The final optimal result is K = [−0.1471,−0.4012, 1.2393, −0.4847, 0.1373, 1.1180, −0.3967, 4.9621], the minimum fitness value Jmin = 223.0907, and the best iteration bestN = 100. As indicated in Fig. 3.7, as expected, the proposed algorithm can guarantee that the achieved states are almost the same as the ones obtained by LQR. And the realization of the proposed method is simpler than LQR. Figure 3.7f also demonstrates that the algorithm can converge to the optimal solution quickly.

  • Case 2: In this case, the parameter values are α = 10, β = 10, Nmax = 100, t = 20s, mach = 1.2, H = 15000m, md = 10, mr = 20 where t is the simulating time of the controller. Comparisons of the experiment results between the improved PSO and the LQR method are illustrated from Fig. 3.8a–e. Figure 3.8f shows the evolution curve of the proposed PSO.

    Fig. 3.8
    figure 8figure 8

    Results of identifying controller parameters for UAVs based on predator–prey PSO in Case 2 (a) Comparison of attack angle responses. (b) Comparison of pitch rate responses. (c) Comparison of sideslip angle responses. (d) Comparison of roll rate responses. (e) Comparison of yaw rate responses. (f) Evolution curve of predator–prey PSO (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

    The final optimal results are K = [0.0416, 0.8298, −2.7208, 1.4825, −1.0683, 1.9002, −0.2273, 2.6742], the minimum fitness value Jmin = 68.3361, and the best iteration bestN = 99. Although the initial conditions are much different from those of experiment 1, the improved algorithm can find the optimal solution.

From these two experimental results, it is obvious that the proposed predator–prey PSO approach could make the UAV controlling system obtain better performance than the conventional LQR method. The state-feedback gain obtained according to the predator–prey PSO can guarantee fast response, precise control, and strong robustness.

Based on the UAV model and the proposed predator–prey PSO algorithm, we developed a software platform of UAV controller design. The graphical user interfaces (GUI) of this platform are shown in Fig. 3.9.

Fig. 3.9
figure 9figure 9

UAV controller design software platform based on predator–prey PSO. (a) Yaw rate response interface. (b) Predator–prey PSO convergence process interface (Reprinted from Duan et al. (2013a), with kind permission from Springer Science+Business Media)

3.3 PSO Optimized Controller for Unmanned Rotorcraft Pendulum

MAV offer several advantages as autonomous UAVs (Pflimlin et al. 2010; Sun and Duan 2013; Duan and Sun 2013). They can be very small with a compact layout. Many are capable of high-speed flight in addition to the normal hover and vertical take-off and landing capabilities. These features make them well suited for a variety of missions, especially in urban environments. A recent announcement by the US Government of plans to greatly increase the number of unmanned aircraft on station in Iraq and Afghanistan helps drive the surge in interest for unmanned vehicles. US Defense Secretary Robert Gates (Bloss 2009) commented that unmanned aircraft is essential to provide real-time video of insurgent activity and argued that the need is growing at 300 % per year. Nowadays, many companies are functioning towards research and development of MAVs, and the representative achievements are Cypher series by Sikorsky and MAVs by Honeywell etc.

Hover and stare is of the paramount importance to the performance of MAVs, as they are designed to perform surveillance and reconnaissance missions. However, pendulum-like oscillation (see Fig. 3.10) triggered by external disturbances and other uncertain factors will badly impair its performance, resulting in blurred images or even MAVs’ overturning. As a result, control techniques of MAVs are becoming more and more important for their wide applications in civil and military fields, with special regard to the hover and stare state for better performances of surveillance and reconnaissance missions. This section focuses on a particular kind of MAV, which is driven by a rotor and a ducted fan, and proposes a combination control law design approach to stabilize the hover and stare pendulum-like oscillation based on LQR, in which an improved PSO algorithm is utilized for parameter optimization of matrix Q and R in the linear-quadratic regulator. In this way, the MAV’s dynamic properties can be ameliorated efficiently while executing surveillance missions that requires perfect stability and rapid responses.

Fig. 3.10
figure 10figure 10

Pendulum-like oscillation in actual flight (x-axis) (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

3.3.1 Mathematical Model of Pendulum Oscillation for MAVs

The MAV in this section adopts the axial symmetrical layout. Owing to the fact that the suspension center moves freely with rotor wings in the plane, pendulum-like oscillation is nonlinear, strongly coupled, and of high order (Pflimlin et al. 2010). In this section, a mathematical model representing the pendulum-like oscillation in the hover and stare state is obtained by using the Lagrangian method, and the corresponding linearized model is obtained in the neighborhood of the hover and stare equilibrium.

3.3.1.1 Nonlinear Mathematical Model of MAV Pendulum-Like Oscillation

The pendulum can be abstracted as a system consisting of the suspension point Oh, the pendulum rod OhOt, and the pendulum mass Ot (see Fig. 3.11).

Fig. 3.11
figure 11figure 11

Coordinates of the pendulum model and decomposition of oscillation angle. (a) Coordinates of the pendulum model. (b) Decomposition of oscillation angle (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

In Fig. 3.11, OXYZ is the ground-fixed coordinate system, Ohx1y1z1 represents a mobile ground coordinate system, with the point Oh as the origin and parallel to OXYZ, while Ohx2y2z2 is defined as the pendulum-body coordinate frame, which originates from Oh, and axis z2 points downward along the pendulum rod OhOt. Decompose the two-dimensional pendulum-like oscillation to one in the direction of axis X and Y, and the transition matrix R from Ohx2y2z2 to Ohx1y1z1 is obtained as follows:

$$ R=\left[\begin{array}{ccc}\cos {\theta}_y & \sin {\theta}_x \sin {\theta}_y & \cos {\theta}_x \sin {\theta}_y \\ 0 & \cos {\theta}_x & - \sin {\theta}_x \\ - \sin {\theta}_y & \sin {\theta}_x \cos {\theta}_y & \cos {\theta}_x \cos {\theta}_y \end{array}\right] $$
(3.18)

Suppose the position vector of the suspension point Oh in the coordinate frame of OXYZ and the pendulum mass Oh in the coordinate frame of Ohx2y2z2 are presented with rh = [x,y,z]T, rt = [0,0,l]T, respectively. Then, the coordinate of point Ot in Ohx1y1z1 can be calculated according to the following equation:

$$ {r}_{ht}=R\cdot {r^{\prime}}_t={\left[l \cos {\theta}_x \sin {\theta}_y,-l \sin {\theta}_x,l \cos {\theta}_x \cos {\theta}_y\right]}^T $$
(3.19)

where l denotes the distance from Oh to Ot, i.e., the length of the pendulum.

Finally, we have the coordinate of Ot in coordinate frame OXYZ presented as in (3.20):

$$ {r}_t={r}_h+R\cdot {r}^{\prime } $$
(3.20)

The Lagrange function of the pendulum system:

$$ \begin{array}{l}L={T}_0-V={T}_m+{T^{\prime}}_M+{T^{{\prime\prime}}}_M-V\\ {}\kern0.9em =\frac{1}{2}m{\dot{r}}_h^T{\dot{r}}_h+\frac{1}{2}{m}_t{V}_t^TV+\frac{1}{2}{J}_{x2}{\omega}_{x2}^2+\frac{1}{2}{J}_{y2}{\omega}_{y2}^2-\\ {}\begin{array}{lllllllll}\hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \end{array}\left(-{m}_t gl \cos {\theta}_x \cos {\theta}_y+\left(m+{m}_t\right)\right(z-{z}_0\left)g\right)\\ {}\kern0.9em =\frac{1}{2}\left(m+{m}_t\right)\left({\dot{x}}^2+{\dot{y}}^2+{\dot{z}}^2\right)+\frac{1}{6}{m}_tl\left[\left(3+{ \cos}^2{\theta}_y\right)l{\dot{\theta}}_x^2+\left(1+3{ \cos}^2{\theta}_x\right)l{\dot{\theta}}_y^2\right]+\\ {}\kern2em {m}_tl\Big(\dot{x}{\dot{\theta}}_y \cos {\theta}_x \cos {\theta}_y-\dot{x}{\dot{\theta}}_x \sin {\theta}_x \sin {\theta}_y-\dot{y}{\dot{\theta}}_x \cos {\theta}_x-\dot{z}{\dot{\theta}}_x \sin {\theta}_x \cos {\theta}_y\\ {}\kern2em -\dot{z}{\dot{\theta}}_y \cos {\theta}_x \sin {\theta}_y\left)+{m}_t gl \cos {\theta}_x \cos {\theta}_y-\left(m+{m}_t\right)\right(z-{z}_0\Big)g\end{array} $$
(3.21)

where Tm, TM, TM represent, respectively, kinetic energy of the suspension center Oh, translation kinetic energy of the pendulum mass Ot, and rotational kinetic energy of the pendulum rod around the centroid of Ot and V is potential energy of the system, choosing the initial state of the pendulum-like oscillation as the zero-potential energy surface.

Therefore, from the Lagrange equation it can be deduced:

$$ \left\{\begin{array}{c}\hfill \frac{d}{ dt}\left(\frac{\partial L}{\partial {\dot{\theta}}_x}\right)-\frac{\partial L}{\partial {\theta}_x}=0\hfill \\ {}\hfill \frac{d}{ dt}\left(\frac{\partial L}{\partial {\dot{\theta}}_y}\right)-\frac{\partial L}{\partial {\theta}_y}=0\hfill \end{array}\right. $$
(3.22)

Considering all the above equations (3.18, 3.19, 3.20, 3.21, and3.22), the nonlinear mathematical model of the MAV pendulum-like oscillation is finally obtained as follows:

$$ \left\{\begin{array}{l}\begin{array}{l}{\ddot{\theta}}_x=\Big(3\ddot{x} \sin {\theta}_x \sin {\theta}_y+3\ddot{y} \cos {\theta}_x+3\ddot{z} \sin {\theta}_x \cos {\theta}_y+2l{\dot{\theta}}_x{\dot{\theta}}_y \cos {\theta}_x \sin {\theta}_y\\ {}-3l{\dot{\theta}}_y^2 \sin {\theta}_x \cos {\theta}_x-3g \sin {\theta}_x \cos {\theta}_x\Big)/\left({ \cos}^2{\theta}_y+3\right)l\end{array}\hfill \\ {}\begin{array}{l}{\ddot{\theta}}_y=\Big(-3\ddot{x} \cos {\theta}_x \cos {\theta}_y+3\ddot{z} \cos {\theta}_x \sin {\theta}_y+6l{\dot{\theta}}_x{\dot{\theta}}_y \sin {\theta}_x \cos {\theta}_x\\ {}-l{\dot{\theta}}_x^2 \sin {\theta}_y \cos {\theta}_y-3g \cos {\theta}_x \sin {\theta}_y\Big)/\left({ \cos}^2{\theta}_x+3\right)l\end{array}\hfill \end{array}\right. $$
(3.23)

Table 3.2 gives the main parameters of the MAV system structure in this section.

Table 3.2 Main parameters of the MAV system structure

3.3.1.2 Linearization of Mathematical Model

Step 1: Change the pendulum angle around axis x, y (θx,θy) to the pitch and roll angle (ϕx, ϕy) according to ϕx = θy, ϕy = − θx, and then (3.23) can be described as

$$ \left\{\begin{array}{l}\begin{array}{l}{\ddot{\phi}}_y=\Big(3\ddot{x} \sin {\phi}_x \sin {\phi}_y-3\ddot{y} \cos {\phi}_y+3\ddot{z} \sin {\phi}_y \cos {\phi}_x+2l{\dot{\phi}}_x{\dot{\phi}}_y \cos {\phi}_y \sin {\phi}_x\\ {}-3l{\dot{\phi}}_x^2 \sin {\phi}_y \cos {\phi}_y-3g \sin {\phi}_y \cos {\phi}_y\Big)/\left({ \cos}^2{\phi}_x+3\right)l\end{array}\hfill \\ {}\begin{array}{l}{\ddot{\phi}}_x=\Big(-3\ddot{x} \cos {\phi}_y \cos {\phi}_x+3\ddot{z} \cos {\phi}_y \sin {\phi}_x+6l{\dot{\phi}}_x{\dot{\phi}}_y \sin {\phi}_y \cos {\phi}_y\\ {}-l{\dot{\phi}}_y^2 \sin {\phi}_x \cos {\phi}_x-3g \cos {\phi}_y \sin {\phi}_x\Big)/\left({ \cos}^2{\phi}_y+3\right)l\end{array}\hfill \end{array}\right. $$
(3.24)

Step 2: Choose the state variables \( {X}_e={\left[x,{\phi}_x,\dot{x},{\dot{\phi}}_x,y,{\phi}_y,\dot{y},{\dot{\phi}}_y,z,\dot{z},\ddot{x},\ddot{y},\ddot{z}\right]}^T \), the input of the system \( u={\left[\ddot{x},\ddot{y}\right]}^T \). Expand (3.24) into Taylor series in the vicinity of the equilibrium point, and the linear model of the pendulum-like oscillation is finally obtained as follows:

$$ \left[\begin{array}{c}\hfill {\dot{X}}_x\hfill \\ {\dot{X}}_y\hfill \end{array}\right]=\left[\begin{array}{cc}\hfill {A}_x\hfill & \hfill 0\hfill \\ 0\hfill & \hfill {A}_y\hfill \end{array}\right]\left[\begin{array}{c}\hfill {X}_x\hfill \\ {X}_y\hfill \end{array}\right]+\left[\begin{array}{cc}\hfill {B}_x & 0\hfill \\ 0\hfill & \hfill {B}_y\hfill \end{array}\right]\left[\begin{array}{c}\hfill {u}_x\hfill \\ {u}_y\hfill \end{array}\right] $$
(3.25)

where the state vector \( {X}_x={\left[x,{\phi}_x,\dot{x},{\dot{\phi}}_x\right]}^T \), \( {X}_y={\left[y,{\phi}_y,\dot{y},{\dot{\phi}}_y\right]}^T \), and\( {A}_x=\left[\arraycolsep3pt\begin{array}{cccc} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & -\dfrac{3g}{4l} & 0 & 0 \end{array}\right] \), \( {A}_y=\left[\arraycolsep2pt\begin{array}{cccc}0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & -\dfrac{3g}{4l} & 0 & 0 \end{array}\right] \), \( {B}_x=\left[\begin{array}{c} 0\hfill \\ 0\hfill \\ 1\hfill \\ -\dfrac{3}{4l}\hfill \end{array}\right] \), \( {B}_y=\left[\begin{array}{c}0\hfill \\ 0\hfill \\1\hfill \\ -\dfrac{3}{4l}\hfill \end{array}\right] \).

3.3.2 Oscillation Controller Design Based on LQR and PSO

3.3.2.1 Characteristics of Pendulum-Like Oscillation

From the linear model, the MAV pendulum-like oscillation in the direction of X and Y is no longer coupled with each other. The pendulum system can be reduced to two four-order subsystems, which are independent of one another. Due to similarity between matrix Ax and Ay, we choose either of the two subsystems to analyze characteristics of the MAV pendulum-like oscillation.

Considering pendulum motion only in the direction of axis X, the state-space equation of the linearized X subsystem is presented as follows:

$$ \left\{\begin{array}{l}\dot{X}= AX+ BU\\ {}Y= CX\end{array}\right. $$
(3.26)

where \( X{=}{\left[{x}_1,{x}_2,{x}_3,{x}_4\right]}^T{=}{\left[x,{\phi}_x,\dot{x},{\dot{\phi}}_x\right]}^T \), \( A{=}\left[\begin{array}{cccc} 0 & 0 & 1 & 0 \\ {} 0 & 0 & 0 & 1 \\ {} 0 & 0 & -0.6500 & 0.6500 \\ {} 0 & -8.547 & 0.5669 & -0.3924 \end{array}\right] \), \( B=\left[\begin{array}{c} 0 \\ 0 \\ 1 \\ -0.872 \end{array}\right] \), \( C=\left[\begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array}\right] \).

In the actual flight, external disturbances such as crosswinds jeopardize stability of hover and stare state and lead to a considerate degradation of the surveillance performance and result in even false intelligence information. Assume there is a sudden gust, the pendulum system gets an initial state ϕx(0) = 0.05rad. The inherent characteristics of the MAV pendulum-like oscillation system and the responses are given in Fig. 3.12.

Fig. 3.12
figure 12figure 12

Responses of the MAV pendulum-like oscillation system (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

As shown in Fig. 3.12, due to external disturbances of crosswinds, which result in an initial state ϕx(0) = 0.05rad, the pendulum-like oscillation occurs in MAV that is required to be stable enough to carry out hover and stare missions. However, the actual fact shown by the analysis results states clearly that the position of the suspension, denoted by x in the Fig. 3.12, does not remain in the original place but moves to another site in 20 s, which may bring about deviation from the ideal monitoring precision. Furthermore, the MAV’s body swings back and forth just in the way as a pendulum does and eventually converges to the equilibrium point after 25 s.

3.3.2.2 Control Law Design Based on LQR

As mentioned above, the hover and stare state is inherently unstable, and external disturbances would give rise to pendulum-like oscillation depicted as in Fig. 3.12. A novel type of optimal control law based on LQR and PSO is designed in this section, which is used to eliminate pendulum-like oscillation with the shortest duration. In this controller, the position of the suspension point x and the pendulum angle ϕx are the two main state variables to be controlled to the desired value. In order to ensure the robustness and optimality of the close loop, the LQR design technique is applied due to the fact that it has a very nice robustness property and has been widely used in many applications. The key issue of LQR controller design is how to select an appropriate control vector u(t) so that the given quadratic performance index (see (3.27)) obtains the minimum value. It is proved that the performance index (10) can reach its minimum by the designed linear control law in (3.28).

$$ J={\displaystyle {\int}_0^{\infty}\left({X}^T QX+{u}^T Ru\right) dt} $$
(3.27)
$$ u(t)=- KX(t)={R}^{-1}{B}^T PX(t) $$
(3.28)

and the optimal matrix P can be calculated from the following Algebraic Riccati Equation:

$$ {A}^TP+ PA- PB{R}^{-1}{B}^TP+Q=0 $$
(3.29)

Taking all factors into account, including the performance of the control system and restrictions on the total energy consumed, matrix Q and R can be defined in the form of Q = diag(q11,q22,0,0), R = 1, in which parameters q11 and q22 are crucial for a splendid dynamic response. As a result, the proposed algorithm takes advantage of PSO’s high operating efficiency, fast convergence speed, and model simplicity, which is used to search the appropriate parameter setting of the LQR control law design approach.

Let the input u be the control force acting on the suspension center, and the corresponding pendulum-holding back control law from the LQR is described as follows:

$$ u=- KX=-\left({k}_1{x}_1+{k}_2{x}_2+{k}_3{x}_3+{k}_4{x}_4\right) $$
(3.30)

where K denotes the feedback parameters obtained for the LQR and X denotes the states of the system, i.e., the position of the suspension center, the angle of the pendulum, the speed of the suspension center, and the angular velocity of the pendulum, respectively.

The PSO-based LQR controller for prohibiting MAV pendulum-like oscillation of the hover and stare state in presence of external disturbances can be illustrated with Fig. 3.13.

Fig. 3.13
figure 13figure 13

Structure of pendulum-like oscillation control system (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

3.3.2.3 Key Settings for PSO

  1. 1.

    Fitness Function f

    The fitness function f chosen in LQR controller can be described as follows:

    $$ f=\frac{1}{{\displaystyle {\int}_0^{\infty}\left({X}^T QX+{u}^T Ru\right) dt}} $$
    (3.31)

    where u = − (k1x1 + k2x2 + k3x3 + k4x4), K = [k1,k2,k3,k4] = lqr(A,B,Q,R), Q = diag(q11,q22,0,0).

  2. 2.

    Inertia Weight ω

    The inertia weight ω controls the exploration properties of the algorithm, with larger values facilitating a more global behavior and smaller values facilitating a more local behavior; thus results of the algorithm depend largely on ω selection (Duan and Liu 2010; Liu et al. 2012; Duan and Sun 2013). Generally, there are two ways to choose the inertia weight, namely, constant ω and time-variant ω.Shi suggested using 0.8 < ω < 1.4, which starts with bigger ω values (a more global search behavior) that is dynamically reduced (a more local search behavior) during the optimization. In this section, ω can be declined linearly from 1.4 to 0.8 in the former 75 % phylogenetic scale and keep constant in the rest time.

  3. 3.

    Population Size m

    According to the scale of the exact optimization problem, m is set between 40 and 150. Here we choose m =100.

  4. 4.

    Acceleration Constants c 1 and c 2

    Shi and Eberhart (1998b) suggests c1 = c2 = 2. Related work showed that having each particle put slightly more trust in the swarm (larger c2 value) and slightly less trust in itself (smaller c1 value), which seems to act better for the structural design problems. According to experiences, we choose c1 = 1.8 and c2 = 1.3.

3.3.3 Experiments

Assume the designed MAV executes a surveillance mission using the hover and stare mode in the actual flight. Considering external disturbances, we take crosswinds, for example, the system gets an initial state x = [0, 0.05, 0, 0], which gives rise to pendulum oscillation without an appropriate control.

Using the proposed controller described in Fig. 3.1 and experimental settings given above, the control parameters which include the optimal weight matrix Q and the resulting feedback vector K are obtained, which are shown in Table 3.3.

Table 3.3 Control parameters of the PSO-based LQR approach

Fig. 3.14 shows the evolution curve of the PSO algorithm for optimizing the weight parameters of the designed LQR controller.

Fig. 3.14
figure 14figure 14

The average evolution curves of the PSO (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

The zero-input responses of the MAV pendulum-like oscillation with an initial pendulum angle of 0.05rad, which is brought about by crosswinds in the actual flight environment (See Fig. 3.15).

Fig. 3.15
figure 15figure 15

The zero-input response of the MAV pendulum-like oscillation system (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

Compared with the responses without control in Fig. 3.13, the dynamic behaviors of x and ϕx state obviously that the closed loop eliminates the pendulum-like oscillation and the state converges to the equilibrium point with an average time of 6 s.

Furthermore, considering a constant interference force acting upon the pendulum system besides the initial state, the resulting responses are given in Fig. 3.16. The interference value is taken as 0.2m/s2, and the control framework and relative parameters remain the same as mentioned above in Fig. 3.13 and Table 3.3.

Fig. 3.16
figure 16figure 16

Responses of the MAV pendulum system with a constant disturbance (Reprinted from Duan and Sun (2013), with kind permission from Springer Science+Business Media)

As presented in Fig. 3.16, the PSO-based LQR controller can eliminate the interference of the constant disturbance and the initial state in 6 s. The MAV is stabilized to a state of x = [0.0128, 0, 0, 0], which means that the LQR control design technique based on PSO is robust for external disturbances.

3.4 Conclusions

As a key component of UAV system, controller acts as the brain of UAVs. So the selection of controller parameters is crucial in the design of the flight control system. However, for the existence of strong coupling among the inputs and the nonexistence of mapping relationship between the performance index and the controller parameter, it is a tough work. The 6-DOF nonlinear model of UAVs is illustrated, which is the prerequisite for simplifying and linearizing the mathematical model. Then UAV equations can be simplified into nonlinear equations of 5-DOF with the assumption that the thrust and the resistance of the aircraft maintains the same. And it can be modeled as linear time invariant state-space perturbation models, with the nominal trajectory being steady-level trimmed flight. To reduce the workload of the designers during the process of designing complicated UAV control system, a predator–prey PSO algorithm for identifying parameters of UAV flight control system is presented.

The performance of hover and stare is the key issue to MAVs when carrying out new challenging reconnaissance missions in urban warfare (local, close-up range, hidden reconnaissance, operation between obstacles, and maybe even inside buildings). However, pendulum-like oscillation caused by uncertainty will badly impair the performance of hover and stare, resulting in blurred images or even overturn. However, pendulum-like oscillation caused by uncertainty and external disturbances badly jeopardize the performance of hover and stare, resulting in blurred images or even MAV’s overturning. So the second part of this chapter mainly deals with control issue of pendulum-like oscillation in an MAV’s hover and stare state in the presence of external disturbances; a novel type of PSO-based LQR controller for stabilizing the pendulum-like oscillation is developed, which can enhance the MAV’s performance efficiently. Simulation results verify the feasibility, effectiveness, and robustness of our proposed approach, which provides a more effective way for control law design.