**2.3 LQR controller**

Linear quadratic regulator is a common optimal control technique, which has been widely utilized in various manipulating systems due to its high precision in movement applications [11]. This technique seeks basically a tradoff betwwen a stable performance and acceptable control input [12]. Using the LQR controller in the design control system requires all the plant states to be measurable as it bases on

**Figure 1.** *The block diagram of a FOPID structure.*

**Figure 2.** *PID controllers with fraction orders. (a) Classical. (b) Fractional order.*

*A Hybrid Control Approach Based on the Combination of PID Control with LQR Optimal Control DOI: http://dx.doi.org/10.5772/intechopen.94907*

the full state feedback concept. Therefore, using the LQR controller to stabilize the 3DOF helicopter system based on the assumption that the system states are considered measurable. LQR approach includes applying the optimal control effort:

$$u(t) = -K\mathbf{x}(t)\tag{11}$$

Where *K* is the state feedback gain matrix, that will enable the output states of the system to follow the trajectories of reference input, while minimizing the following the cost function:

$$J = \bigcap\_{t=0}^{\infty} (\mathbf{x}^T(t)\mathbf{Q}\mathbf{x}(t) - \mathbf{u}^T(t)\mathbf{R}\mathbf{u}(t))dt\tag{12}$$

Where *Q* and *R* are referred to as weighting state and control matrices. The controller feedback gain matrix can be determined by using below equation:

$$K = \mathbb{R}^{-1} \mathbb{B}^{T} P \tag{13}$$

Where *P* is *(nxn)* matrix deterrmined from the solution of the following Riccati matrix equation:

$$A^T P + PA - PBR^{-1}B^T P + Q = \mathbf{0} \tag{14}$$

For *nth* order system with mth input, the gain matrix and control input are given by:

$$\mathbf{K} = \begin{bmatrix} k\_{11} & k\_{12} & k\_{13} & \dots & k\_{1n} \\ k\_{21} & k\_{22} & k\_{23} & \dots & k\_{2n} \\ \vdots & \ddots & \ddots & \ddots \\ k\_{m1} & k\_{m2} & k\_{m3} & \dots & k\_{mn} \end{bmatrix} \quad \text{and} \quad u(t) = \begin{bmatrix} u\_1 \\ u\_2 \\ u\_3 \\ \vdots \\ u\_m \end{bmatrix}$$

Based on the above expression, the control effort *u t*ð Þ of the system stated in Eq. (11) can be written as in Eq. (15). For the purpose of simplicity of control problem the weighting matrices *Q* and *R* are chosen as the diagonal matrices:

$$Q = blk \text{dig} \left( q\_{11}, q\_{22}, q\_{33}, \dots, \dots, \dots, q\_{nn} \right), \\ R = blk \text{dig} \left( r\_{11}, r\_{22}, r\_{33}, \dots, r\_{mm} \right)$$

so that the cost function Eq. (12) can be reformulated as in Eq. (16).

$$u(t) = -\begin{bmatrix} k\_{11} & k\_{12} & k\_{13} & \dots & k\_{1n} \\ k\_{21} & k\_{22} & k\_{23} & \dots & k\_{2n} \\ \vdots & \ddots & \ddots & \ddots & \vdots \\ k\_{m1} & k\_{m2} & k\_{m3} & \dots & k\_{mn} \end{bmatrix} \begin{bmatrix} \mathbf{x}\_{1} \\ \mathbf{x}\_{2} \\ \vdots \\ \mathbf{x}\_{3} \\ \vdots \\ \mathbf{x} \end{bmatrix} \tag{15}$$
 
$$J = \bigcap\_{0 \neq 1}^{\infty} (q\_{11}\mathbf{x}\_{1}^{2} + q\_{11}\mathbf{x}\_{2}^{2} + \dots + q\_{mn}\mathbf{x}\_{n}^{2} + r\_{11}u\_{1}^{2} + r\_{22}u\_{2}^{2} + \dots + r\_{mm}u\_{m}^{2})dt \tag{16}$$

Where *q*11, *q*22, *q*33, … *::*, *qnn* and *r*11,*r*22,*r*33, … *::*,*rmm* denote the weighting elements of *Q* and *R* matrices respectively. The optimal control approach LQR is highly recommended for stabilizing complex dynamic systems as it basically looks

have non-integer fractional values. **Figure 1** shows the block diagram of the fractional order PID controller. The integer-differential equation defining the control

*Control Based on PID Framework - The Mutual Promotion of Control and Identification…*

Based on the above equation, it can be expected that the FOPID controller can enhance the performance of the control system due to more tuning knobs introduced. Taking the Laplace transform of Eq. (9), the system transfer function of the

> *Ki <sup>s</sup><sup>λ</sup>* <sup>þ</sup> *Kds*

Where λ and *μ* are arbitrary real numbers. Taking *λ* ¼ 1 and *μ* ¼ 1 a classical PID controller is obtained. Thus, FOPID controller generalizes the classical PID controller and expands it from point to plane as shown in **Figure 2(b)**. This expansion provides the designer much more flexibility in designing PID controller and gives an opportunity to better adjust the dynamics of the control system. This increases robustness to the system and makes it more stable [10]. A number of optimization techniques can be implemented for getting the best values of the gain parameters of

Linear quadratic regulator is a common optimal control technique, which has been widely utilized in various manipulating systems due to its high precision in movement applications [11]. This technique seeks basically a tradoff betwwen a stable performance and acceptable control input [12]. Using the LQR controller in the design control system requires all the plant states to be measurable as it bases on

*e t*ðÞþ *KdD*�*<sup>μ</sup>e t*ð Þ (9)

*<sup>μ</sup>* (10)

action of a fractional order PID controller is given by:

FOPID controller is given by:

the controller.

**Figure 1.**

**Figure 2.**

**20**

*The block diagram of a FOPID structure.*

*PID controllers with fraction orders. (a) Classical. (b) Fractional order.*

**2.3 LQR controller**

*u t*ðÞ¼ *Kpe t*ð Þþ *KiD*�*<sup>λ</sup>*

*GFOPID*ðÞ¼ *s Kp* þ

for a compromise between the best control performance and minimum control input effort. Based on the LQR controller an optimum tracking performance can be investigated by a proper setting of the feedback gain matrix. To achieve this, the LQR controller is optimised by using GA tuning method which is adopted to obtain optimum elements values for of Q and R weighting matrices.

3.Mating the population to create progeny.

*DOI: http://dx.doi.org/10.5772/intechopen.94907*

6.Are the system fitness function satisfied?

and characterize the individual to be evaluated [13].

**4. Hybrid PID control approaches**

investigated.

and robust in the performance.

optimal LQR theory.

**23**

7.End search process for solution.

5. Inserting new generated individuals into populations.

In this study, the aim of using GA optimization method is to tune the elements of the state weighting matrix *Q* and input weighting matrix *R* of the optimal LQR controller based on a selected fitness function which, should be minimised to a smallest value. The fitness function should be formulated based on the required performance characteristics. These optimized LQR elements are then employed to calculate the optimum values for PID controller gain parameters, which are used to stabilize the control system. The implementation procedure of the GA tuning method begins with the definition step of the chromosome representation. Each chromosome is represented by a strip of cells. Each cell corresponds to an element of the controller gain parameters. These cells are formed by real positive numbers

*A Hybrid Control Approach Based on the Combination of PID Control with LQR Optimal Control*

PID controller is a simple manipulating technique that can be successfully implemented for one dimension control systems. For multi dimensions systems it can use a multi channel PID controller system to control the dynamic behavior of these systems. Currently, there is a considerable interest by many researchers in development new control approaches using PID controller. Xiong and Fan [15] proposed a new adaptive PID controller based on model reference adaptive control (MRAC) concept for control of the DC electromotor drive. They presented an autotuning algorithm that combines PID control scheme and MRAC based on MIT rule to tune the controller parameters. Modified PI and PID controllers are introduced to regulate output voltage of DC-DC converters using MRAC manipulating technique [16, 17]. The parameters of the controllers

are adapted effectively using MIT rule. Based on the adapted controllers

parameters an improvement in the regulation behavior of the converters has been

In the last decades, a new hybrid controller scheme using PID technology is proposed in [18–20] for different applications. The structure of the presented hybrid controller system is constructed by combination between conventional PID controller and state feedback LQR optimal controller. The gain parameters of the PID controller used to achieve desired output response are determined based on

Further improvement in the performance of the standard PID controller is also achieved by involving an integrator of order *λ* and differentiator of order *μ* to the controller structure based on Fractional Calculus and it is known as fractional order (FO) PID controller [7]. This extension could provide more flexibility in PID controller design and makes the system more robust, thus, enhancing its dynamic performance compared to its integer counterpart. In FOPID controller the manipulating parameters become five that provides more flexibility in the controller design

4.Mutate progeny.
