Performance Comparisons Of Hybrid Fuzzy-LQR And Hybrid PID-LQR Controllers On Stabilizing Double Rotary Inverted Pendulum

ABST.CT: Double Rotary Inverted Pendulum (DRIP) is a member of the mechanical under-actuated system which is unstable and nonlinear. 6e DRIP has been widely used for testing different control algorithms in both simulation and experiments. 6e DRIP control objectives include Stabilization control, Swing-up control and trajectory tracking control. In this research, we present the design of an intelligent controller called “hybrid Fuzzy-LQR controller” for the DRIP system. Fuzzy logic controller (FLC) is combined with a Linear Quadratic Regulator (LQR). 6e LQR is included to improve the rules. 6e proposed controller was compared with the Hybrid PID-LQR controller. Simulation results indicate that the proposed hybrid Fuzzy-LQR controllers demonstrate a be>er performance compared with the hybrid PID-LQR controller especially in the presense of disturbances.


INTRODUCTION
e Double Rotary inverted pendulum (DRIP) has double pendulums connected together and a ached to a rotating arm as shown in Figure 1 (a). e plane of the two pendulums is orthogonal to the radial arm. e arm is actuated by a controlling torque with the objective of balancing the two pendulums in the inverted position.
erefore, it has three degree of freedom (DOF) [1]. e actuated joint angle can make some movement in order to stabilize the two pendulums [2]. e DRIP is a nonlinear, unstable, non-minimum phase, and under-actuated mechanical systems [3]. e schematic diagram of the experimental setup is shown in Figure 1 (b). e DRIP systems have some applications in robotics, marine systems, aerospace systems, flexible systems, pointing control, mobile systems, and locomotive systems [4]. Moreover, at hanging position, the DRIP represents simplified industry crane model [5]. e control objectives of the DRIP can be categorized into three categories [6,7] namely: 1. Swing-up control [8]. 2. Stabilization control [9]. 3. Trajectory tracking control [10]. e conventional PID controller is the most widely used controller in the industry due to its ease of design, simple control structure, and inexpensive cost. However, the PID controller is not suited for strongly nonlinear and uncertain systems because of it being linear controller [6]. Other control methods such as NN and FLC are introduced to overcome limitations of the classical control theory. Particularly, FLC is very effective and its power has been established in numerous applications [11].
It has been known that a slight disturbance in on output can affect the status of the other output in SIMO systems [6]. erefore, in view of the nonlinear performance of DRIP system and its high level of disturbances and large time constant, it is not easy to achieve the desired response.
us, the appropriate control method is the cascade control topology (Figure 2). e cascade control has the advantage of weakening the consequence of disturbances and enhance the dynamics of the entire control loop [12].
In the present study, we present the design of a hybrid controller for the DRIP system. e proposed hybrid controller includes two controllers. One is model-based (i.e. LQR) and FLC (model-free). e model inaccuracy of the system can be handled by the model-free controller. e LQR is included to improve the performance based on full state feedback control. e FLC is used to accommodate nonlinearity based on its IF-THEN rules. e proposed controller was compared with the Hybrid PID-LQR controller. e results found indicates that the proposed hybrid Fuzzy-LQR controllers demonstrate a be er performance compared with the hybrid PID-LQR controller especially in the presence of disturbances.

NONLINEAR DYNAMIC MODEL OF DRIP
e DRIP consists of a series of two pendulums a ached to a rotary arm that rotates around the motor sha axis. It has three DOF, namely rotary arm angle θ, lower pendulum angle α, and upper pendulum angle γ. e schematic diagram of the DRIP is shown in Figure 3.
Euler-Lagrange is used to derive the dynamic equation of the DRIP system [13].  (1) was used for the development of the nonlinear dynamic model of DRIP in this study [14].
Where q i are the generalize coordinates, are the generalized velocities, τ i is the external force or load vector, is the Lagrangian and w is the loss energy.
where K is the total kinetic energy of the system and P is the total potential energy of the system. erefore, applying the Euler Lagrange Equation (1) to the Lagrangian (3) results in three coupled nonlinear equations. Euler-Lagrange equation of the motion of each link thus becomes: For arm (θ), substituting θ in equation (1) For lower pendulum (α), substituting α in equation (1) For upper pendulum (γ), substituting γ in equation (1) Equations (5), (7) and (9) are three nonlinear, coupled, second-order differential equations of motion describing the dynamics equations of the DRIP system. ese dynamic equations can be reduced to the following equations: Where: Z 1 = J a + r 2 (m 1 + m 2 ) Z 2 = r (m 1 l 1 + m 2 l 2 ) Z 3 = m 2 l 2 Z 4 = J 1 + m 1 l 1 2 + m 2 l 1 2 Z 5 = L 1 l 2 m 2 Z 6 = J 2 + m 2 l 2 2 Z 7 = g (m 1 l 1 + m 2 l 1 ) Z 8 = gm 2 l 2 e torque at the load sha from an applied motor torque can be express as: e torque at the load sha from an applied motor torque can be express as: e value of the torque for the system under consideration can be calculated using equation (21) below.

SYSTEM SPECIFICATIONS
e system specification and their description are given in Table 1 (15).  figure  3. It is a feedback controller that is based on the error (e) between the desired point and measured process value.
ree parameters are designed in the PID controller and each parameter has an effect on the error [16].
Defining "u" as the controller output, the final PID algorithm is of the form [17]: Where: K p = proportional gain, K I = integral gain, K D derivative gain, T I = integral time constant and T D = the derivative time constant. ese are the tuning parameters used to design a PID controller that is varied to get an optimum response.

Linear Quadratic Regulator (LQR)
e LQR is an optimal state feedback controller. It is used to obtain the optimal performance of the system by minimizing the cost function that relates the state vector and control input vector. e LQR method is a powerful technique for designing controllers for complex systems that have stringent performance requirements and it seeks to find the optimal controller that minimizes a given cost function.
e conventional LQR problem is to obtain the control input u as follows [18]: which minimizes the following cost function.
where Q and R are square matrices and are always positive semidefinite. e matrices Q and R scale the relative contributions of the terms of the quadratic forms x T (t)x(t) and u T (t)u(t) in the integral respectively [19]. us the elements of Q penalizes the states x and R penalizes the control u in the performance index. For this reason Q and R are called weighting matrices [20[. J is always a scalar quantity.
e linear control law given by Equation (24) is the optimal control law. erefore, if the unknown elements of the matrix K are determined so as to minimize the performance index (25), then u(t) = -kx(t) is optimal for any initial state x(0) [20]. To obtain the optimal solution for the control signal a Pontryagin principle is applied to minimize the performance index. is minimization is based on the Hamiltonian equation.

Closed-loop Optimal Control Model
To formulate the optimal control loop model, it means writing the optimal control law as a function of state X(t) and costate λ(t). e state X(t) is a vector consisting set of variables given in the following equation [21]: Let us assume a transformation from functional analysis theory of normed linear space, λ(t) lies in the "dual space" of X(t), which is the space consisting of all continuous linear functional of X(t) [21].
Where P(t) is called the Riccati coefficient matrix or simply Riccati matrix or Riccati coefficient.
which is now negative feedback of the state x(t).
Let k = R -1 B T P(t) erefore e aim is to find a control u(t) over t 0 ≤ t ≤ t f which for any x 0 ∈Rn minimizes the cost function. Where is called Kalman gain and P(t) which is nxn symmetric, positive definite matrix is the solution of the differential Riccati equation (DRE). is equation can be clearly seen in Figure 4. As time t f approaches infinity, the optimal control law becomes constant and therefore Ṗ = 0 . In this case, equation (29) becomes e major concern is to develop a stable linear feedback control law defined in (28) that can minimize the performance index J.

Fuzzy Logic Control
Fuzzy logic was introduced by Lotfi Zadeh in 1965, it has many successful applications especially in control [22]. FLC offers a proper method for manipulating, representing, and implementing a heuristic knowledge of human about how to control a system [6]. Fig. 5. Fuzzy controller block diagram FLC has four main components, namely: fuzzification interface, rule-base, inference mechanism, and defuzzifica-tion interface as shown in Figure 5. e detailed explanation of these four FLC blocks can be found in Hamza et al. [4]. e fuzzy rule can be represented by the following fuzzy relation: R: If a is X then b is Y., or in abbreviated form as R : X Y or R = X Y R can be viewed as a fuzzy set with a two-dimensional membership function e detailed explanations on the rest of the components can be found in [23].

Hybrid Fuzzy-LQR Controller
From the input/output point of view, the hybrid Fuzzy-LQR controller is analogous to a conventional PID controller. As such the hybrid Fuzzy-LQR controller is considered as an alternative to conventional PID controllers [24]. ere are three types of hybrid Fuzzy-LQR controller namely: fuzzy gain scheduling type, fuzzy direct-action type, and hybrid type hybrid Fuzzy-LQR controller type [25]. In this study, double input direct action type and hybrid type hybrid Fuzzy-LQR controllers are considered. e hybrid Fuzzy-LQR controller ( Figure 6) is constructed by the combination of a two-input direct action hybrid Fuzzy-LQR controller and a conventional PID controller [25]. e output of the hybrid Fuzzy-LQR controller is defined as: Fig. 6. hybrid Fuzzy-LQR controller e DRIP is a single input multiple output (SIMO) system. Since PID has the limitation of controlling only one output [7], three PID/PID-Fuzzy controllers in cascade topology combined with LQR controller is proposed in the present study as shown in Figure 7. erefore, three PID controllers in the cascade are designed with each controlling one output. e manual tuning was used to obtain the parameters of the PID for each of the links. A er iterative manual tuning, the values of PID gains for each of the three links of DRIP are presented in Table 2.  [26]. e weighting matrices Q and R are very important constituents of LQR optimal control process. e selection of matrices Q and R is normally based on an iterative procedure using experience and understanding of the physical problems involved to get the desired response. e number of elements of Q and R matrices depends on the number of state variables (n) and the number of the input variable (m), respectively [21].

Applied Materials and Technology
We have used the LQR function in Matlab to determine the value of the vector K that determines the feedback control law as follows: For the pendulum problem under consideration, with two inputs and five linguistic values for each of these, there are at most 72 = 49 possible rules. Since the input to the FLC is only two for the purpose of this research, the convenient way to list all possible rules is to use a tabular representation as shown in Table 3. Table 3 Fuzzy Rules for DRIP 4.9 Hybrid Fuzzy-LQR controller Structure e standard hybrid Fuzzy-LQR controller is constructed by choosing the inputs to be an error (e) and derivative of error (Δe) as shown and the output is the control signal (u). As indicated in Meshkov & Sokolov [79], among the three categories of hybrid Fuzzy-LQR controller structure, double input type is the most robust structure for unstable pole systems. As can be seen from Figure 8, the handled hybrid Fuzzy-LQR controller structure has two input and two output scaling factors. e input SFs Ke (for error (e)) and Kd (for the change of error (Δe)). While the FLC output (U) is mapped onto the respective actual output (u) domain by output scaling factors β and α.

RESULTS AND DISCUSSIONS
e results found in our simulation experiments are presented in this section. is includes the comparisons of the stabilization capability of hybrid PID and hybrid Fuzzy-LQR controller. e disturbance rejection ability of the proposed controllers was also presented.

Stabilization Control Using Cascade Hybrid PID-LQR and hybrid Fuzzy-LQR controllers
In this section, stabilization control of DRIP using cascade hybrid PID and hybrid Fuzzy-LQR controller has been analysed. Figure 9,10 and 11 shows the stabilization results for the arm angle, lower pendulum angle and upper pendulum angle respectively. It can be seen that for the arm stabilization, the hybrid Fuzzy-LQR controller outperformed the hybrid PID-LQR in terms of the performance indices considered. is is the same for both upper and lower pendulums. However, the rise time is lower for the hybrid PID-LQR for both upper and lower pendulums. e performance indices considered are rise time, se ling time, overshoot, undershoot and steady-state error.    Table 4 Performance Indices Figure 12, 13, 14 and 15 shows output signals of the outer, inner and innermost controllers respectively. e effort put by individual controllers trying to stabilize the system can be seen. ese results indicates that a er the system stabilised the controller effort becomes almost zero since there are no disturbances.

PID
Rise time, se eling time, overshoot, undershoot and steady state error are the five performance indeces used in this research. Table 4 shows the performance indices for arm, lower pendulum and upper pendulum.
is table compare the results for hybrid PID-LQR and hybrid hybrid Fuzzy-LQR controller. It can be seen that the Hybrid Fuzzy-LQR have be er result in se ling time, overshoot and steady state error compare with Hybrid PID-LQR. e disturbance is introduced to the system to test for the performances and robustness of the proposed controllers. e white noise of 0.01 power parameter value is added to the process output (feedback) a er stabilised at 40 seconds. Figure 16 and 17 shows the simulation results of the lower pendulum angle, upper pendulum angle and arm angle. It can be seen from Figure 16 and 17 that the proposed hybrid Fuzzy-LQR controller is able to control both upper and lower pendulums to remain at stabilization position with some oscillation. is oscillation is due to the introduced disturbance. On the other hand, from the same Figure we can see that as soon as the disturbance is introduced, the hybrid PID-LQR cannot control the upper and lower pendulums.
erefore the upper and lower pendulums fail to remain in the stabilised position. ese results indicate the effectiveness and robustness of the hybrid Fuzzy-LQR controllers in the presence of disturbances as compared to the hybrid PID.
It will be good for the signals for the individual controllers in the presence of disturbances. is can help to appreciate the effort of the individual controllers in the presence of disturbances compared with that at no disturbances. Figures 18-25. It can be seen that both controllers are trying very hard to control the system to remain at stabilised position.    Control Effort e control effort is the amount of energy necessary for the controller to perform its duty. In practical control systems, we o en need to minimize the control effort so as to achieve control objectives under limitations in the system under consideration. Tables 5 presents the optimized control efforts of the designed control algorithm considered in the present study for controlling the DRIP with and without disturbance respectively. Table 5 Control Effort

CONCLUSIONS AND RECOMMENDATIONS
e main aim of this study is to examine the application of hybrid HYBRID FUZZY-LQR CONTROLLER and hybrid PID in cascade topology on nonlinear stabilization of DRIP. e proposed hybrid Fuzzy-LQR controller and PID were evaluated in cascade structures for stabilization control of DRIP system.
It has been demonstrated that in the absence of disturbance, both the controllers were able to stabilize the DRIP.
ough, hybrid Fuzzy-LQR controller performs be er than the hybrid PID controllers. However, in the presence of disturbance hybrid Fuzzy-LQR controller was able to reject the disturbance whereas hybrid PID has demonstrated very poor performance. is implies hybrid Fuzzy-LQR controller has greatly outperformed hybrid PID. Consequently, hybrid Fuzzy-LQR controller control strategy can be regarded as a promising strategy for controlling highly nonlinear, unstable, non-minimum phase and under-actuated mechanical systems especially in the presence of noise and disturbances.

Controller
Hybrid