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.

9.1 Classical Proportional-Integral-Derivative (PID) Controller

After investigating the characteristic equations of an unmanned aerial vehicle (UAV), we can now design the control system. In this book, different methods are proposed to design a controller for UAVs; the first of these is the classical controller. In this control structure, proportional-integral-derivative (PID) type controllers are used, and longitudinal and lateral equations are investigated using the root locus method. Longitudinal and lateral controllers are designed separately.

Three different types of basic controllers and their combinations are present in the classical controller scheme. All three types have different characteristics and transfer functions. These basic controllers may be named after the type of gains used within them:

  1. 1.

    Proportional gain

  2. 2.

    Integral gain

  3. 3.

    Differential gain

Proportional gain has an output which is the multiple of the error between the desired and actual conditions of the state. Therefore, we can describe that:

$$ c(t)=Ke(t) $$
(9.1)

where c(t) is the output, e(t) is the error for making the actual state reach the desired condition as \( e(t)={x}_d(t)-{x}_a(t) \), and K is the proportional gain. Here, x d (t) is the desired state condition and x a (t) is the actual (or observed) state.

Integral gain takes the integral of the error input and can be described by:

$$ c(t)=\frac{1}{\tau_i}{\displaystyle \underset{0}{\overset{t}{\int }}e(t)\mathrm{d}t}. $$
(9.2)

Using the Laplace transformation, the transfer function can be represented as:

$$ c(s)=\frac{1}{\tau_is}e(s). $$
(9.3)

Here, τ i is called the integral time.

Differential gain takes the derivative of the error input and can be described by the following equations:

$$ c(t)={\tau}_d\frac{\mathrm{d}e(t)}{\mathrm{d}t} $$
(9.4)
$$ c(s)={\tau}_dse(s). $$
(9.5)

where τ d is the differential time.

Differential gain only takes the derivative of the error and affects the future state, but cannot remove the constant error in theory. Therefore, it is not used in a control system by itself.

Different controller types can be designed using proportional, integral, and derivative gains in combination.

We can use proportional gain on its own to design a P-type controller. The system can be given by \( c(t)=Ke(t) \), and its transfer function is \( \frac{C(s)}{E(s)}=K \). A P-type controller normally results in a stable system. Increasing the gain value can decrease the steady-state error; however, excessive increase can also lead the system to an unstable state.

In some cases, it is possible to build a controller using only the integral gain, for which the transfer function is given as \( \frac{C(s)}{E(s)}=\frac{1}{\tau_is} \). It removes the steady-state error but can provide a very slow response.

If we integrate P- and I-type gains, what we have will be a combination of these two controllers, called a PI controller. For this type of controller, the controller input is:

$$ c(t)=Ke(t)+\frac{K}{\tau_i}{\displaystyle \underset{0}{\overset{t}{\int }}e(t)}\mathrm{d}t $$
(9.6)

and the transfer function is:

$$ \frac{C(s)}{E(s)}=K\left(1+\frac{1}{\tau_is}\right). $$
(9.7)

PI control fuses two control effects and makes the steady-state error zero. The integral action adds a root at zero to the system transfer function and removes the error at the steady state. On the other hand, the integral action also affects the overall system response, so P-type control is used to obtain the required response, compensating for the unwanted effects of the integral gain.

Another possible combination is to use the derivative effect (D) together with the proportional gain. Then, the controller is called a PD controller and its response can be given by:

$$ c(t)=Ke(t)+K{\tau}_d\frac{\mathrm{d}e(t)}{\mathrm{d}t} $$
(9.8)

where the transfer function is:

$$ \frac{C(s)}{E(s)}=K\left(1+{\tau}_ds\right). $$
(9.9)

In case we use the PD-type controller, the controlled system acts quickly because of the differential effect; however, the steady-state error remains. If we just want systems to reach the desired state in a short time, then this type of controller may be used in some cases.

The PID-type controller has all three control type effects and it gives the response according to the control law of:

$$ C(t)=Ke(t)+\frac{K}{\tau_i}{\displaystyle \underset{0}{\overset{t}{\int }}e(t)\mathrm{d}t+K{\tau}_d\frac{de(t)}{\mathrm{d}t}}. $$
(9.10)

The transfer function can be given by:

$$ \frac{C(s)}{E(s)}=K\left(\frac{1}{\tau_is}+1+{\tau}_ds\right). $$
(9.11)

The PID-type controller makes the system respond quickly and removes the steady-state error. By choosing the appropriate gains, we can obtain the required response [1].

In our design, PID effects are used together to control the pitch angle, speed, heading, and altitude. A comparison is made to choose the best controller for the system. The controller coefficients are determined using the root locus method (by choosing the gain), carrying out simulations, and using optimization methods such as determining the signal response specifications through MATLAB.

9.2 Classical Controller for the Longitudinal Motion

The longitudinal controller includes a speed controller, a pitch angle controller in the inner loop, and an altitude controller in the outer loop. The scheme for the pitch angle controller is given in Fig. 9.1.

Fig. 9.1
figure 1

P-type controller for pitch angle control

The equations for a UAV are written in the state space form and used in the blocks in MATLAB as shown in Fig. 9.2.

Fig. 9.2
figure 2

Simulink block representing the longitudinal equations

If we use the transfer function that relates δ e to q and include the elevator actuator function, we can choose the appropriate K q gain for the inner loop using the root locus analysis. In the outer loop, a washout filter is added to the system to exclude the unnecessary signal inputs. For controlling θ, a P-type controller is used. K θ can also be chosen using the root locus analysis.

9.2.1 Pitch Angular Rate Controller (Inner Loop)

The feedback for the pitch angular rate and pitch angle is usually done together to obtain the damping factor and angular frequency of the required values in the inner loop for the short-period mode and in the outer loop for the phugoid mode. However, as we can see in the linearized longitudinal equations, the values for the short-period mode are already in the required zone and feedback is not needed in the inner loop. We can check this from Military Specification MIL-F-8785C or normal aircraft standard FAR. Also, there are studies on the subject claiming that, for small UAVs, different standards should be used to evaluate the characteristics of the system [24]:

$$ \begin{array}{c}{w}_{1,2}=8,8358\mathrm{rad}/\mathrm{s},{\xi}_1=0.8513,{T}_{1,2}=1.3553\mathrm{s},{t}_a=0.0917\mathrm{rad}/\mathrm{s}\\ {}{w}_{3,4}=1,0566\mathrm{rad}/\mathrm{s},{\xi}_2=0.0815,{T}_{3,4}=5.9664\mathrm{s},{t}_b=2.3509\mathrm{rad}/\mathrm{s}.\end{array} $$

The short-period mode damping factor is around 0.8513 and no feedback is needed in the inner loop. Hence, instead of choosing a K q , just the inner loop gain K θ is used to improve the characteristic values of the phugoid mode. The inner loop may be investigated for different flight conditions and changing characteristics. The transfer function that relates θ to the u e input can be found as:

$$ \frac{\theta }{u_e}=\frac{479.2{s}^3+1,891{s}^2+1,681s}{s^6+26.63{s}^5+269.9{s}^4+1,187{s}^3+1,656{s}^2+1,586s+872.3} $$
(9.12)

Here, the elevator actuator function, which has the time constant of 0.1 s, is modeled as:

$$ T{F}_{\mathrm{elevator}}=\frac{-10}{s+10} $$
(9.13)

The root locus of the system for negative values of gain is shown in Fig. 9.3.

Fig. 9.3
figure 3

Root locus for controlling the θ angle

With the K θ feedback, we can observe from the root locus that, for gain values of approximately 0.5, the short-period mode damping values do not decrease much (0.665), while the phugoid characteristics are improved (to a damping factor of 0.7). In other words, θ feedback improves the phugoid characteristics. The transfer function of the system, which includes the washout filter, and its step response is as follows (Fig. 9.4):

Fig. 9.4
figure 4

Closed-loop response for the θ feedback loop

$$ \frac{\theta }{\theta_{\mathrm{ref}}}=\frac{L\theta }{L{\theta}_{\mathrm{ref}}} $$
(9.14)
$$ L\theta =2,492{s}^8\!+7,619{s}^7\!+94,320{s}^6\!+584,500{s}^5\!+18,160,00{s}^4\!+3,062,000{s}^3\\ +3,225,000{s}^2+2,244,000{s}^3+762,500 $$
(9.15)
$$ \begin{array}{c}L{\theta}_{\mathrm{ref}}={10}^3\Big(0.001{s}^{11}+0.05226{s}^{10}+1.197{s}^9+15.8{s}^8+131.2{s}^7+695.4{s}^6\\ \quad \Big.+2,279{s}^5+4,372{s}^4+5,669{s}^3+4881{s}^2+2,768s+760.9\Big)\end{array} $$
(9.16)

As we can see, the system is stable and the steady-state error is very low.

For the feedback loop, an equivalent feedback system transfer function can be given as:

$$ T{F}_{\mathrm{feedback}}=\frac{G(s)}{1+G(s)\left(H(s)-1\right)} $$
(9.17)

where G(s) is the multiplication of the elevator actuator transfer function (θ/δ e ) and K θ , and H(s) is the washout filter transfer function [5].

The position constant where the zn are the zeros and the pn are the poles can be given as:

$$ Kp=\frac{k\times zn}{pn} $$
(9.18)

The steady-state error can be calculated using the position constant as:

$$ {e}_{\infty }=\frac{1}{1+Kp} $$
(9.19)

Using the steady-state error and position constant formulas, we can choose the gain for the feedback loop to reach a low steady-state error value. In our case, the steady-state error that we obtain with the root locus-based design is 0.003, which is sufficiently small. Besides, we will build an outer loop controller for the altitude in the next section. Thus, we do not change the inner loop controller structure and we also do not use the method given by Eqs. (9.17), (9.18), and (9.19).

9.2.2 Altitude Controller (Outer Loop)

For the altitude controller, the performance of a PID-type controller is examined. As the first step of the design procedure, the transfer function that relates the pitch angle to the altitude is found. The transfer function from the output pitch angle to the reference input is calculated and then combined with h/θ, which can be calculated by multiplying h/δ e and θ/δ e . As a result, we find the transfer function of h/θ ref. Then, a root locus study is made to investigate the system:

$$ T{F}_1\!=\!\frac{-18.72\left(s-\!104.5\right)\left(s\!+\!10\right)\left(s\!+\!7.34\right)\left(s\!+\!2.6\right)\left(s\!+\!1.34\right)\left(s\!+\!1\right)\left(s\!+\!0.88\right)}{s\left(s\!+\!12.26\right)\left(s\!+\!11.33\right)\left(s\!+\!2.6\right)\left(s\!+\!1.35\right)\left(s\!+\!0.74\right)\left({s}^2\!+\!0.59s\!+\!1.12\right)} $$
(9.20)
$$ T{F}_2\!=\!\frac{\left({s}^2\!+\!0.58s\!+\!1.11\right)\!\left({s}^2\!+\!0.587\!+\!1.117\right)\!\left({s}^2\!+\!15.04s\!+\!78\right)\!\left({s}^2\!+\!15.04s\!+\!77.9\right)}{\left({s}^2\!+\!0.59s\!+\!1.12\right)\!\left({s}^2\!+\!15.04s\!+\!75\right)\!\left({s}^2\!+\!15.04s\!+\!78\right)\!\left({s}^2\!+\!10.7s\!+\!65\right)} $$
(9.21)
$$ \left(\frac{h}{\theta_{\mathrm{ref}}}\right)=T{F}_2\times T{F}_1 $$
(9.22)

The critical gain value for stability is 0.299, as we can see in Fig. 9.5. A PID controller can be used for such a system; however, this system is already stable and it has a root at zero, which gives the integrator effect. Thus, instead of a PID controller, a PD controller is designed. The PD controller gives a quick response and is appropriate for the requirements.

Fig. 9.5
figure 5

Root locus used in the design of the altitude controller (outer loop)

Firstly, the coefficient for the PID controller, which was planned to be used, was calculated using the Ziegler–Nichols technique, such that the integral of the error is minimum [6]. The critical values of the gain and angular frequency are \( {K}_{hpu}=0.299 \) and \( {\omega}_u=2.35\mathrm{rad}/\mathrm{s} \). According to the Ziegler–Nichols rules, the P gain must be 0.6 times the critical gain, and the integral and differential gains should be calculated accordingly [6, 7]:

$$ {T}_u=\frac{2\pi }{\omega_u}=2.72s $$
(9.23)
$$ {K}_{hp}=0.6\times {K}_{hpu}=0.1794 $$
(9.24)
$$ {K}_{hd}=0.6\times {K}_{hpu}\times 0.125\times {T}_u=0.06 $$
(9.25)
$$ {K}_{hi}=\frac{0.6\times {K}_{hpu}}{0.5\times {T}_{hu}}=0.134 $$
(9.26)

The PID values, calculated using the Ziegler–Nichols method, are as given above. The gains are used in the system together with the saturators, which will keep the reference pitch angle at the required levels. The results are satisfactory. Both the pitch angle and the altitude reach the desired values in a short period of time.

In order to better control the speed and suppress the overshoot of the response, the gains are recalculated. The responses of the controlled and uncontrolled systems are given in Figs. 9.6, 9.7, and 9.8. Both the results found using the Ziegler–Nichols gains values and tryouts are given. The improvement in the response of the system can be seen when the gains are found by tryouts. For the tryouts, this response is obtained by taking \( {K}_{hp}=0.58 \), \( {K}_{hi}=0.25 \), and \( {K}_{hi}=0.2 \).

Fig. 9.6
figure 6

Response of the uncontrolled system (h/θ ref)

Fig. 9.7
figure 7

Response of the altitude control system with a PID controller using Ziegler–Nichols gains

Fig. 9.8
figure 8

Response of the altitude control system with a PID controller using the gains found in tryouts

The response of the altitude system is improved. However, the integral effect is already contained in the system equations, and we prefer to use a PD-type controller, not a PID-type controller. The gains of the PD-type controller are determined using the Ziegler–Nichols values as a starting point. The proportional gain value K hp is chosen as 0.1794, and tryouts are done using the previously determined K hd . The final value of K hd that is used in the PD controller is 0.132. In this case, a zero at −1.33 is added to the system and a nonvibratory quick response is obtained. The step response of the system with the PD controller is given in Fig. 9.9.

Fig. 9.9
figure 9

Step response of the PD controller

The response of the designed altitude controller for the case where the reference input is 100 m and the speed is held constant at 20 m/s using the speed controller is given in Fig. 9.10. Moreover, the response of the speed controller, which tries to hold the speed at 20 m/s, is given in Fig. 9.11. As we can see, the PD controller is working efficiently as an altitude controller for our system. Nonetheless, in cases where other disturbances are present, a PID-type controller may be used instead.

Fig. 9.10
figure 10

Response of the PD-type altitude controller to a 100-m reference input

Fig. 9.11
figure 11

Response of the system when the speed is trying to be held at 20 m/s (while the altitude controller is working with the reference input)

In Fig. 9.12, the Simulink diagram for the final structure of the altitude controller is given. As can be seen, the control is obtained using the K θ in the inner loop for pitch angle control and the PD-type controller in the outer loop for altitude controland saturators. The saturators are used for limiting the elevator angle and reference pitch angle values. Although not shown in the diagram, the δt input is determined using the speed controller.

Fig. 9.12
figure 12

Simulink diagram for the altitude controller

9.2.3 Speed Controller

A controller that controls the speed using the thrust input, δt, is designed. A P-type controller is used. Both the results of the step response and the simulations show that a P-type speed controller which uses δt as the input is satisfactory. In order to find the gain value K, the root locus method is used. The V t /δt transfer function does not normally exist in the previously found functions; however, we can obtain it using the equation below:

$$ {\dot{V}}_t{V}_t=U\dot{U}+W\dot{W}+V\dot{V} $$
(9.27)

We can find the V t /δt transfer function if we assume that, for a given linearization point, \( \frac{u}{V_t} \) and \( \frac{w}{V_t} \) are almost constant and v is zero. The other values can be determined using the calculated values for the speed values, etc.

A sixth row to include the V t transfer function is added to the system. The new A lon matrix, denoted A lon _ vt, can be given as:

$$ {A}_{\mathrm{lon}\mbox{\_}{\mathrm{vt}}}=\left[\begin{array}{llllll}-0.3356\hfill & 1.3181\hfill & -1.9276\hfill & -9.6610\hfill & 0\hfill & 0\hfill \\ {}-1.7916\hfill & -3.9003\hfill & 9.8215\hfill & -1.7035\hfill & 0\hfill & 0\hfill \\ {}0.7020\hfill & -3.5375\hfill & -11.3920\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1.0000\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}-0.1736\hfill & -0.9848\hfill & 0\hfill & 17.4865\hfill & 0\hfill & 0\hfill \\ {}-1.234\hfill & -3.5261\hfill & 9.1667\hfill & 3.8967\hfill & 0\hfill & 0\hfill \end{array}\right] $$
(9.28)

As explained previously, the measured value can be chosen as V t and then the related transfer function can be calculated. The transfer function for the thrust actuator is modeled with a first-order transfer function with a time constant of 0.5 s:

$$ \frac{V_t}{\delta t}=\frac{1.146{s}^4+9.433{s}^3+58.81{s}^2+318.8s+423.2}{s^5+15.63{s}^4+88.02{s}^3+62.64{s}^2+87.24s} $$
(9.29)
$$ \mathrm{Actuator}TF=\frac{2}{s+2} $$
(9.30)

The open-loop transfer function can be obtained by combining these two transfer functions:

$$ \frac{V_t}{u_t}=\frac{2.292{s}^4+18.87{s}^3+117.6{s}^2+637.6s+846.4}{s^6+17.63{s}^5+119.3{s}^4+238.7{s}^3+212.5{s}^2+174.5s} $$
(9.31)

The root locus for the obtained V t /δt transfer function is as in Fig. 9.13. As can be seen, the system is stable for gains smaller than 0.126 (\( K<0.126 \)). Firstly, the PID gains proposed by the Ziegler method are checked. The determined critical values are K pu  = 0.126 and ω u  = 1.07 rad/s. The calculation for the gains are as follows:

Fig. 9.13
figure 13

The root locus diagram for V t /δt

$$ {T}_u=\frac{2\pi }{\omega_u}=5.8721s, $$
(9.32)
$$ {K}_p=0.6\times {K}_{pu}=0.6\times 0.126=0.0756, $$
(9.33)
$$ {K}_d=0.6\times {K}_{pu}\times 0.125\times {T}_u=0.0257, $$
(9.34)
$$ {K}_i=\frac{0.6\times {K}_{pu}}{0.5\times {T}_u}=0.0555. $$
(9.35)

In Fig. 9.14, we see that the overshoot values and settling time are not good. Hence, we designed a simpler controller using only the proportional gain value. The system is already stable because of the roots of the transfer function. The response of the system when \( {K}_{vt}=0.013 \) is given in Fig. 9.15. We may obtain better responses by increasing the gain value; however, the change in δt to obtain the better responses affects the overall system response. The response of the system when the gain value is chosen as 0.025 is given in Fig. 9.16.

Fig. 9.14
figure 14

PID controller response for the gains calculated using the Ziegler–Nichols method

Fig. 9.15
figure 15

Response of the speed controller system to a 15-m/s reference input with only P gain (\( {K}_{vt}=0.013 \))

Fig. 9.16
figure 16

Response of the speed controller system to a 15-m/s reference input with only P gain (\( {K}_{vt}=0.025 \))

It is clear that the response quickens. However, the response of the overall control system is also affected. In Figs. 9.17 and 9.18, the results for the altitude change when the speed value is set to a certain value are given. It can be understood that, when the gain used for controlling V t is increased, the change in altitude is also increased. Changes of around 10 m in altitude over a short period, as we see for the case \( {K}_{vt}=0.025 \), is an undesired response for mini-UAV operations (Fig. 9.18). Thus, a gain value that gives a quick response for controlling V t and results in lower altitude changes must be used.

Fig. 9.17
figure 17

Change in altitude when the speed controller changes the UAV’s speed by 15 m/s (\( {K}_{vt}=0.015 \))

Fig. 9.18
figure 18

Change in altitude when the speed controller changes the UAV’s speed by 15 m/s (\( {K}_{vt}=0.025 \))

In Fig. 9.19, the step response for the controller with \( {K}_{vt}=0.015 \) is given. This is the final gain value that we choose for the speed controller. For speed changes below 10 m/s, it may be increased to \( {K}_{vt}=0.02 \), depending on the desired response.

Fig. 9.19
figure 19

Step response of the system for \( {K}_{vt}=0.015 \)

The overall structure for the speed controller is given in Fig. 9.20.

Fig. 9.20
figure 20

Diagram of the speed controller

9.3 Classical Controller for the Lateral Motion

The equations that we derived for the lateral motion were given in Chap. 8. In addition to the classical states, we also used the heading equation, which was given as \( \dot{\psi}=r \sec \theta \). In this section, we design a control system using the derived equations and the matrices A lat and B lat.

For the lateral classical controller design, we prefer a method that consists of inner loops for increasing the stability. A yaw damper is used to reduce the rudder reference value to zero when the controller for the heading is working. Changes in the roll rate (p), roll angle (Ф), and heading angle (Ψ) are used to determine the required input to the aileron. This method is a classical and effective method for designing the lateral controller. However, during the design process, the coupling between the aileron and rudder should be kept in mind to overcome the difficulties; washout filter, aileron and rudder equations should be handled together, and actuator equations should be included in the state equations while the controller is designed (Fig. 9.21).

Fig. 9.21
figure 21

Lateral control system scheme

9.3.1 Roll Rate Controller

We can start the design with the p loop that has the least effect on the controller [8]. p/δ a can be obtained using the lateral equations. The aileron actuator transfer function is chosen as \( \frac{20}{20+s} \).

$$ \frac{p}{\delta_a}=\frac{8.348{s}^3+27.4{s}^2+211.9s-33.36}{s^4+4.686{s}^3+26.32{s}^2+44.27s-1.977} $$
(9.36)

Combining the given transfer functions, we can find p/u a (roll angle change/control input):

$$ \frac{p}{u_a}=\frac{167{s}^3+548{s}^2+4,238s-667.2}{s^5+24.69{s}^4+120{s}^3+570.7{s}^2+883.4s-39.54} $$
(9.37)

The root locus drawn for this system is given in Fig. 9.22.

Fig. 9.22
figure 22

Root locus diagram for p/u a

What we see from the root locus is that the root of the roll mode equation must be moved to the left on the real axis to increase the stability of the system and the damping factor of roll angle change. The roots of the characteristic equation previously determined are:

$$ {s}_{\mathrm{spiral}}\!=\!0.0435,{s}_{\mathrm{roll}}\!=\!-2.1658,{s}_{\mathrm{dutchroll}}\!=\!-1.2819\!+\!4.3966i,-1.2819-4.3966i. $$

From the root locus, we understand that the root may be moved to −4.03 by choosing a gain value of 0.165. At the same time, this gain value faintly decreases the Dutch roll mode damping factor. We also need to check the value of the spiral mode root. The spiral mode root is unstable; however, when the gain is changed, the root becomes 0.09 and the time for double amplitude can be found as:

$$ T=\frac{ \log (2)}{0.09}=7.5s, $$
(9.38)

which is good enough to ensure a normal working condition. Thus, the gain value K p can be chosen as 0.165.

The second loop to be closed is r/δ r (change in yaw angle by rudder input).

9.3.2 Yaw Damper

Starting from this step of the lateral controller design, we need to define output matrix C and gain matrix K by taking the coupling effect in lateral motion and the washout filter used in the r/δ r loop into account.

The state matrix (A lat) of the lateral system is:

$$ {A}_{\mathrm{lat}}=\left[\begin{array}{lllll}-1.0502\hfill & 1.9276\hfill & -9.8215\hfill & 9.6610\hfill & 0\hfill \\ {}-1.2213\hfill & -1.9155\hfill & 1.0096\hfill & 0\hfill & 0\hfill \\ {}1.7255\hfill & 0.0919\hfill & -1.7198\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 1.0000\hfill & 0.1763\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1.0154\hfill & 0\hfill & 0\hfill \end{array}\right] $$
(9.39)

The new state matrix can be found as:

$$ X=\left[\begin{array}{l}{\mathrm{A}}_{\mathrm{lat}}\kern1.25em {\mathrm{B}}_{\mathrm{lat}}\kern2.75em 0\\ {}0\ 0\ 0\ 0\ 0-1/{T}_{\mathrm{a}}\ 0\kern0.5em 0\\ {}0\ 0\ 0\ 0\ 0\ 0 - 1/{T}_{\mathrm{r}}\kern0.5em 0;\\ {}0\ 0\ 1\ 0\ 0\ 00 - 1/{T}_{\mathrm{w}}\end{array}\right] $$
(9.40)

Here, δ a , aileron input, δ r , rudder input, and x w , washout, are added into the lateral state matrix. T a, T r, and T w are the time constants for the aileron actuator, rudder actuator, and washout filter, respectively. The new lateral state matrix is:

$$ X=\left[\begin{array}{llllllll}-1.0502\hfill & 1.9276\hfill & -9.8215\hfill & 9.6610\hfill & 0\hfill & 0\hfill & -1.8218\hfill & 0\hfill \\ {}-1.2213\hfill & -1.9155\hfill & 1.0096\hfill & 0\hfill & 0\hfill & 8.3479\hfill & 10.8560\hfill & 0\hfill \\ {}1.7255\hfill & 0.0919\hfill & -1.7198\hfill & 0\hfill & 0\hfill & 4.2400\hfill & -2.1272\hfill & 0\hfill \\ {}0\hfill & 1.0000\hfill & 0.1763\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1.0154\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & -20.0000\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & -20.0000\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1.0000\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & -5\hfill \end{array}\right] $$
(9.41)

In this case, the control distribution matrix B becomes:

$$ B=\left[\begin{array}{ll}0\hfill & 0\hfill \\ {}0\hfill & 0\hfill \\ {}0\hfill & 0\hfill \\ {}0\hfill & 0\hfill \\ {}20\hfill & 0\hfill \\ {}0\hfill & 20\hfill \\ {}0\hfill & 0\hfill \end{array}\right] $$
(9.42)

The values in the new B matrix are the rudder and aileron actuator constants. The control inputs and states in this case are:

$$ {u}_{\mathrm{lat}}=\left[\begin{array}{l}{u}_a\\ {}{u}_r\end{array}\right] $$
(9.43)
$$ {x}_{\mathrm{lat}}={\left[\begin{array}{cccccccc}\hfill v\hfill & \hfill p\hfill & \hfill r\hfill & \hfill \varphi \hfill & \hfill \Psi \hfill & \hfill {\delta}_a\hfill & \hfill {\delta}_r\hfill & \hfill {x}_w\hfill \end{array}\right]}^{\mathrm{T}} $$
(9.44)

At this point, if we can define the necessary C and K matrices, then the feedback can be achieved by calculating:

$$ {X}_{\mathrm{lat}}=X-BKC $$
(9.45)

The matrix C includes feedback from x w , p, and φ. In B, one input from the aileron and one input from the rudder are present. K must be determined at each step using the appropriate feedback channel.

For example, for the first step, the gain matrix is:

$$ K=\left[\begin{array}{lll}0.1650\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill \end{array}\right], $$
(9.46)

and C can be determined as:

$$ C=\left[\begin{array}{llllllll}0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & -5\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \end{array}\right]. $$
(9.47)

where x w , p, and φ are chosen as the outputs. In this way, for the first step, the following matrix can be calculated:

$$ BKC=\left[\begin{array}{llllllll}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 3.3000\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \end{array}\right] $$
(9.48)

The system must be updated using the newly calculated A matrix and finding r/δ r by means of the x w state. The new lateral state matrix with the first feedback is:

$$ X1=\left[\begin{array}{llllllll}-1.0502\hfill & 1.9276\hfill & -9.8215\hfill & 9.6610\hfill & 0\hfill & 0\hfill & -1.8218\hfill & 0\hfill \\ {}-1.2213\hfill & -1.9155\hfill & 1.0096\hfill & 0\hfill & 0\hfill & 8.3479\hfill & 10.8560\hfill & 0\hfill \\ {}1.7255\hfill & 0.0919\hfill & -1.7198\hfill & 0\hfill & 0\hfill & 4.2400\hfill & -2.1272\hfill & 0\hfill \\ {}0\hfill & 1.0000\hfill & 0.1763\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1.0154\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ {}0\hfill & -3.3000\hfill & 0\hfill & 0\hfill & 0\hfill & -20.0000\hfill & 0\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & -20.0000\hfill & 0\hfill \\ {}0\hfill & 0\hfill & 1.0000\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & -5\hfill \end{array}\right] $$
(9.49)

Now, we can find the required transfer functions as:

$$ \frac{r}{\delta_r}=\frac{-42.54{s}^4-1,020{s}^3-7,151{s}^2+5,162s+6,2350}{s^6+44.69{s}^5+641.3{s}^4+3,613{s}^3+14,810{s}^2+3,1510s-2,992}, $$
(9.50)
$$ \frac{r}{u_r}\!=\!\frac{-42.54{s}^5\!-\!1,020{s}^4\!-\!7,151{s}^3\!+\!5,162{s}^2\!-\!6,2350s}{s^7\!\!+\!49.69{s}^6\!+\!864.8{s}^5\!+\!6,820{s}^4\!+\!32,875{s}^3\!+\!\!105,560{s}^2\!+\!\!154,558s\!-\!\!14,\!960}. $$
(9.51)

r/u r is calculated by adding the washout filter transfer function to r/δ r .

The roots of the characteristic equation can be calculated as −20.0642, −18.2896, −1.1988 + 4.5611i, −1.1988 − 4.5611i, −5.0000, −4.0297, and 0.0910.

The purpose of using feedback in this loop is to increase the Dutch roll mode damping factor. As can be understood from the root locus graphic (Fig. 9.23), for negative gains, a gain value of 0.405 makes the damping factor 0.43 and does not affect the spiral mode root much. Therefore, K r can be chosen as −0.4. After this step, we must find φ/δ a , which is the equation that is necessary for φ feedback.

Fig. 9.23
figure 23

Root locus diagram for the yaw angle loop

9.3.3 Roll Angle Loop

Similar steps to those introduced in the previous section can be used to find the equation that relates φ to δ a and u a :

$$ \frac{\varphi }{u_a}\!=\!\frac{181.9{s}^4\!+\!5,143{s}^3\!+\!4,768{s}^2\!+\!186,000s\!+\!440,400}{s^7\!\!+\!49.69{s}^6\!+\!881.7{s}^5\!\!+\!7,227{s}^4\!+\!35,730{s}^3\!+\!103,500{s}^2\!+\!\!129,600s\!-\!\!14,960} $$
(9.52)

The roots of the characteristic equation are: −19.0107 + 2.3780i, −19.0107 − 2.3780i, −2.1175 + 4.5109i, −2.1175 − 4.5109i, −3.7698 + 1.1211i, −3.7698 − 1.1211i, and 0.1061.

Gain values are determined using the root locus diagram (Fig. 9.24).

Fig. 9.24
figure 24

Root locus diagram for the roll angle feedback loop

A gain value of \( {K}_{\varphi}\approx 1 \) means that the spiral mode root becomes more stable and the Dutch roll mode damping factor also stays high. In this case, the roll mode root stays at a value of 5.5. This choice of K gives us a nonvibratory response. Also, choosing a high proportional gain value decreases the steady-state error value.

9.3.4 Heading Controller

In order to design the heading controller, we should use a last gain matrix to determine the equation that relates heading to the aileron input. The last gain matrix we found is:

$$ {K}_{\mathrm{last}}=\left[\begin{array}{lll}0.1650\hfill & 0\hfill & 1\hfill \\ {}0\hfill & -0.4\hfill & 0\hfill \end{array}\right] $$
(9.53)

Recalculating the lateral A matrix and choosing the appropriate output, we can find:

$$ \frac{\psi }{u_a}\!=\!\frac{86.\!11{s}^5\!\!+\!2,\!424{s}^4\!+\!\!16,\!340{s}^3\!\!+\!54,\!840{s}^2\!+\!\!191,\!700s\!+\!\!384,\!200}{s^8\!\!+\!\!49.69{s}^7\!\!+\!881.\!7{s}^6\!+\!7,\!409{s}^5\!\!+\!40,\!870{s}^4\!+\!\!151,\!100{s}^3\!+\!315,\!600{s}^2\!+\!425,\!400s} $$
(9.54)

The open-loop roots of the last loop are: −19.117 + 1.92i, −19.117 − 1.92i, −1.5285 + 4.79i, −1.5285 − 4.79i, −5.6534, −1.3728 + 2.4857i, and −1.3728 − 2.4857i.

The proportional gain value is chosen as 0.5 (Fig. 9.25). With this value, the roll mode root value is improved for better response and the spiral mode is stabilized. Also, the Dutch roll mode damping factor becomes 0.3. The response of the system is given in Figs. 9.26, 9.27, 9.28, 9.29, and 9.30.

Fig. 9.25
figure 25

Root locus value for K Ψ = 0.5

Fig. 9.26
figure 26

Step response of the system to unit heading reference input

Fig. 9.27
figure 27

Response of the system to a 0.35 radians reference heading input

Fig. 9.28
figure 28

Change in r for a heading input of 0.35 radians

Fig. 9.29
figure 29

Change in Ф for a heading input of 0.35 radians

Fig. 9.30
figure 30

Change in p (rad/s) for a heading input of 0.35 radians

In the heading controller, a P-type controller is chosen because of its simple design and quick response. As we can see from the figures, the controller directs the aircraft to the reference heading value quickly, without significant change in the roll angle.

In this system, the rudder and aileron actuator time constants are taken as 0.05 s and their transfer functions are positive and negative \( \frac{20}{s+20} \), respectively.

The washout filter in the rudder loop has a time constant of T = 0.2 s, and its transfer function is \( \frac{s}{s+5} \).

9.4 Conclusion

In this chapter, a flight control system is designed for UAVs using classical control methods. Separate discussions for controlling different parameters, such as altitude and heading, are given, and controller design procedures are explained in detail. This method is the most common method for UAV control, and good results for controlling both the lateral and longitudinal motion parameters also prove that.