A Hybrid Linear Quadratic Regulator Controller for Unmanned Free-Swimming Submersible

An unmanned free-swimming submersible (UFSS) is designed to perform certain tasks in water without interposing humans. The vehicle’s control is achieved by integrating mathematical (analog) and non-mathematical (embedded) controllers. The main goal of integrated controllers is to overcome the environmental disturbances and noise of the sensor data. These disturbances, as well as the noise data, are generated during steering, diving, and speed control. The amplitude of disturbances and noise varies with the depth and intensity of water waves. This article presents a robust hybrid linear quadratic regulator (HLQR) controller for UFSS. The presented controller targets the desired state of the UFSS in the presence of a disturbing environment. The hybrid approach is achieved by employing: (1) two linear quadratic regulators or controllers and (2) a mathematical structure of the Riccati equation. Consequently, the proposed HLQR controller is integrated into the UFSS system to evaluate the response in terms of settling time, rise time, overshoot, and steady-state error. Furthermore, the robustness of the HLQR is investigated by considering the feedback to step response and hydrodynamic disturbances. The implementation results reveal that the proposed controller outperforms state of the art controllers, such as proportional-integral-derivative and lead-compensator controllers.


Introduction
In this era of smart technology, autonomous vehicles have completely revolutionized the life of mankind. During the past few decades, there are two basic ways to investigate the underwater work. In the first method, technicians dive into a sea to control the equipment directly and to communicate with the base station. In the second method, the technician is physically available on the surface of the water to control the equipment. However, these approaches are not convenient as they increase the danger to a man's life. Moreover, the available control systems for investigators are not enough intelligent [1,2].
In order to mitigate the aforementioned concerns, there are many types of diving equipment, such as breathing apparatus and robots for the underwater work. These diving equipment make the possibilities to accomplish underwater activities in a faster and safer way. However, the environmental conditions of the ocean create certain limitations for humans. Therefore, the unmanned underwater vehicle (UUV) approach has been introduced to overcome the virtues and shortcomings to carry out modern-day work. Furthermore, it makes human life easier as it contains different on-board sensors to monitor the environmental condition of the ocean.
The UUVs or unmanned free-swimming submersible (UFSS) can be classified into two categories: (1) remotely operated vehicle (ROV) and (2) autonomous underwater vehicle (AUV) [3]. The prior is more useful when someone working in a shipyard to control and manage the vehicle. The latter is more convenient as compared to the prior because of its independent nature (or) autonomous behavior and ability to make smart decisions quickly. It is important to worth mentioning that the response of a UFSS to the control system is not as efficient as required. Similarly, its underwater response is not ideal (e.g., disturbance, and noise) [4]. Therefore, simple controllers have been introduced to improve the response of a UFSS in the presence of hydrodynamic disturbances [4][5][6][7][8][9]. These controllers assist the UFSS to take efficient actions when required, and, therefore, contribute towards the smooth operation [4]. Furthermore, they calibrate the parameters and observe the best response of the controller. Moreover, they assist the equipment to make smarter moves and lessen the error in their decisions [4][5][6][7][8][9].

Related Work
The effectiveness of the AUV depends largely on its management structure. The system's best response is analyzed through controllers. Typical examples of these controllers are lead-compensator, proportional-integral-derivative (PID) and linear quadratic regulator LQR [10]. Furthermore, a specific control mechanism is used to meet some specific temporal specifications of the desired system. Moreover, the dynamic response of a particular situation is also managed. To date, plenty of work has already been done on the controlling techniques of UUV. However, it is still continued to make it more intelligent and smart.
The most commonly used controller is PID, but some have also used LQR to control the AUV. Due to the complex modeling of LQR, it requires accurate mathematics of AUV for tuning Q and R parameters. The Q matrix defines weights on the state and the R matrix defines control input weights. Intelligent controllers like neural networks and fuzzy logic are also designed. They provide an advantage as they do not explicitly require mathematical modeling in terms of the laws of physics [11][12][13]. Furthermore, they result in a relatively high accuracy. Nevertheless, these controllers have to control complex systems and result in computational complexity issues. These complexity issues are usually addressed by using hierarchies. However, these hierarchies become even more complex with the change in the input and disturbances [14].
The work in [4] has proposed a U-model for controlling UFSS. The implementation results describe the handling of water wave disturbances. Moreover, the provided pitch and heading system responses are reasonable as compared to the PID controller. A neurocontrol scheme for controlling UUV without the training phase is presented in [5]. A fuzzy logic-based approach in [6] is used to emulate the behavior of human driving. A depth and pitch feedback control of AUV is investigated in [7] by using LQR and PID controllers. Similar to [7], an interesting work is presented in [8]. Here, two PID controllers are utilized. The first PID controller acts as a supervisor to control the second one. The purpose of using two PID controllers is to achieve a more accurate response. On the other hand, the use of two controllers results in a higher mathematical complexity. It ultimately affects the calculation (or) computational time and performance of the controller. A sliding-mode approach is utilized in [9] to tolerate system uncertainties in the presence of an energy-saving mode. Similarly, the approach in [4] is effective only for a particular water region. It implies that whenever the resistance of water increases or decreases, water disturbances tend to be varied. The resistance of water can be changed due to the region or the water density. Therefore, these variations in water disturbances change the entire set of calculations.

Research Gap
The previous section shows that several attempts have been made to design a UFSS controller. These attempts include neural networks [15], sliding mode [16], and fuzzy controllers [17]. However, the problem of non-linearity in controller design is a well-known issue. It implies that whenever the UFSS is maneuvering in confined spaces, the sensor data have a lot of noise. It is particularly true when a small quantity is required to be measured. Furthermore, aforementioned controllers have disadvantages as they consider only non-linear behavior, linearization of plant dynamics, and noisy sensor data in their simulation results. However, the variations in depth, effects of object kinematics and uncertainties of hydrodynamic coefficients have a great influence on the robustness of UFSS. Consequently, a controller design is needed which can consider all these aspects during the operation of UFSS. We believe that the aforesaid concerns can be reduced by employing a hybrid design approach. Therefore, this article has proposed a novel controller design of UFSS which assists the equipment to make smarter moves and lessen the errors in their decisions.

Contributions
The contributions of this work are given as follows: • We have proposed a novel and robust design of a hybrid controller, termed as HLQR, for the UFSS system. It is achieved by using two LQR controllers to efficiently tackle the hydrodynamic disturbances (see Section 5); • The proposed HLQR controller is integrated in the UFSS system to analyze the response in terms of settling time, rise time, overshoot, and steady-state error; • The robustness of the proposed HLQR controller is evaluated in the presence of noisy sensor data and a disturbed environment; • The performance comparison of the proposed controller is provided with PID and lead-compensator controllers (shown in Section 6).
The proposed controller is the integration of two LQR controllers which results in shrewd outcomes to hydrodynamic disturbances. It provides sharp rise time and settles the disturbances efficiently and quickly. Furthermore, a PID and lead-compensator are integrated to compare their response for the selection of the best controller. The robustness of the aforementioned controllers is evaluated using a specified transient response in the presence of dynamic disturbances.
The remainder of this paper is organized as follows: Sections 2 and 3 provide the preliminaries and mathematical background of UFSS. The stability criterion to design UFSS controller is described in Section 4. Similarly, Section 5 describes the proposed HLQR controller design. Implementation results are given in Section 6. Finally, Section 7 concludes the paper.

Preliminaries
This section explains the necessary background related to the UFSS and LQR controller.

UFSS
The UFSS is one of the earliest autonomous underwater vehicles. It was created in the late 1970s as a test vehicle to illustrate the possibilities of autonomous vehicles over great distances and to investigate laminar flow. The UFSS is the first stage in broader systems research to build a vehicle which is capable of traveling 1000 miles independently. The subsystems of the UFSS are designed individually before being incorporated into the vehicle as a whole. The UFSS is given a low-drag hull and is meant to be laminar throughout 90% of its body surface. From control point of view, it is mainly composed of two parts which are head and pitch. Other parts of the UFSS do not play any role in the control, and, therefore, out of the scope of this article. Examples of these subsystems are oil-filled variable frequency motor, navigation, vehicle's energy pack and so on.

LQR
The LQR technique delivers ideally regulated feedback gains, allowing for the construction of closed-loop stable and high-performance systems. This theory is used in those situations where the system dynamics are defined by a set of linear differential equations and the cost is represented by a quadratic function. The LQR method simply discovers a suitable state-feedback controller in an automated manner. The use of alternative approaches, such as the complete state feedback (sometimes called pole placement), provide more visible link between controller settings and controller behavior.

Mathematical Structure of UFSS
A general representation of the UFSS vehicle is shown in Figure 1. The control scheme of the UFSS is as follows: An elevator surface of the UFSS is diverted by a selected amount during forwarding motion. This diversion results in a force to move the UFSS about the pitch axis. The pitch of the UFSS generates a force to submerge or rise in a vertical axis. The heading control system is responsible to steer the UFSS as shown in Figure 1. The head is a combinational effect of yaw and roll which creates a rudder command to steer the UFSS. The head and pitch controls are modeled in the forthcoming subsections. After deriving the transfer function of the head and pitch control systems, we have converted these transfer function into state space representation. This state space model is utilized for HLQR controller, as described in Section 5. The modeling of head and pitch utilizes different notations. Therefore, the mathematical notations that have been used in this work are given in Table 1.

Symbol
Meaning transfer function of pitch/head δ e pitch angle through the vehicle δ rc commanded rudder deflection Ψ c (s) heading command Ψ(s) heading of vehicle

Dynamical Modeling of Pitch
The UFSS vehicle submerges or rises with the variation of a vertical force created by the pitch control system. It consists of different subsystems (i.e., pitch gain, elevator actuator, and vehicle dynamics), as shown in Figure 2. The aim of this paper is to design a controller, thus we use the transfer function of the vehicle from a case study as given in Chapter 4 of Norman S. Nise's book [18]. The term θ e controls the θ in conjunction with the pitch-angle. The pitch-rate feedback regulates the elevator deflection δ e and determines the pitch angle through the vehicle dynamics. The derivation of an open-loop transfer function of the pitch control system is calculated by multiplying all subsystems, i.e., pitch gain, elevator actuator, and vehicle dynamics, as shown here in Equation (1). The feedback to the closed-loop system is provided by a pitch rate sensor. Therefore, the closed-loop transfer function is acquired in the next step.
The transfer function for closed-loop system is calculated using a general equation as follows G(s) 1+G(s)H(s) . It involves two closed-loop transfer functions and its implementation requires two iterations. The implementation of the first iteration is accomplished by simplifying Equation (1), which generates a transfer function G(s) as given in Equation (2). For the second iteration, we have used G(s) 1+G(s)H(s) to derive the transfer function of closedloop system. Here, H(s) represents the feedback of the closed-loop system (that is pitch rate sensor in our case). The final representation of the close-loop system for the pitch control system is given in Equation (3). For simplification, we assume a new variable α, where α = (3.206 + 0.25K 2 ). The complete closed-loop system of pitch is illustrated in Figure 3. Here, we can see two variables (K 1 and K 2 ) that are utilized in pitch gain and pitch rate sensors. We assume that the pitch control system is stable for unity gains but the real value of K 1 is determined after the stability check as given in Section 4. For K 2 , we use unity feedback, this means that the data are not scaled and we are feeding the same data as received from the sensor (In some cases, we scale the feedback data from the sensor, therefore we multiply by a gain). The transfer function of the close loop system is easily transformed to a state-space model as given in Equation (6). The conversion of the transfer function to a state-space model is adopted by a traditional method as described in Section 3.5 of Norman S. Nise's Book.

Dynamical Modeling of Head
The head system steers the UFSS vehicle and acts as an input. It also consists of different subsystems (i.e., head gain, rudder actuator, and vehicle dynamics) as shown in Figure 4. The transfer function of the head system is calculated in the same manner as of the pitch control system by considering the product of all subsystems, i.e., head gain, rudder actuator, and vehicle dynamics, as given in Equation (7). Recalling again, we use the vehicle dynamics from a case study as referred in Section 3.1. The open-loop system of the head is shown in Figure 4. The transfer function after derivation of the open-loop system is given in Equation (8). The feedback to the closed-loop system is provided by a head rate sensor, thus we will acquire the closed-loop transfer function in the next step.
Similar to dynamical modeling of the pitch, the head system involves two closedloop transfer functions calculated by using a general equation as follows G(s) 1+G(s)H(s) . It also involves two closed-loop transfer functions and its implementation also requires two iterations. Therefore, the implementation of the first iteration is given in Equation (8). The complete closed-loop system of pitch is illustrated in Figure 5. Like pitch, here, also, we can see two variables (K 1 and K 2 ) that are utilized in head gain and yaw rate sensor. By implementing the closed-loop formula on Equation (8) and by substituting the value of K 2 = 1, we achieve the transfer function as given in Equation (9). Then, we substitute the unity feedback gain (such as K 1 = 1) in Equation (9) to achieve Equation (10). Similarly, the transformation of Equation (10) to state-space model is given in Equations (11) and (12).

Stability Criterion of UFSS
Before introducing controllers into the UFSS, the stability is evaluated using the Routh Hurwitz method, initially provided in [19]. To check the stability, the values of K 1 (in Equations (3) and (10)) determines the stability of UFSS [20]. By using the denominator of Equation (3) we design the Routh table 2 for pitch.
It is noteworthy that the pitch system and head system of UFSS is stable if the input gain lies between 1 and 10 as depicted in Figures 6 and 7. However, the transient response of the system turns out to be unstable if the input gain exceed the aforementioned range. When the system moves toward the right-half plane then the amplitude of system's response also increase with the variation of time. For further analysis, the transient response of both pitch and head system with an increase in the value of gain is listed in Tables 4 and 5, respectively.
From Figures 6 and 7, we can see that both systems are stable for the defined values of K 1 but there is a difference between the actual values and the desired values of the systems. In order to get the desired results, controllers are introduced. As soon as the controller got the error in some form, it would execute the appropriate control function. To attain the desired set point, the controller would keep the process variable at an appropriate level and then send the output after correction to a final control element. Section 5 discuss the proposed controller for UFSS.

Proposed HLQR Controller Design
The proposed controller, named as HLQR, is composed of two LQR controllers. The complete architecture of the HLQR is shown in Figure 8. The HLQR is a second order derivative controller. The required primary and secondary integrator blocks are highlighted in Figure 8. The primary LQR controller is responsible to remove the steady-state error and improves other parameters of the system's response (i.e., rise time and settling time). On the other hand, the secondary LQR controller plays a vital role in the robustness and handles the hydrodynamic disturbances in an efficient manner.
The error of HLQR is controlled by K 1 and K 2 feedback gains for primary and secondary integrators, respectively. In Figure 8, the blocks represented as, A, B, C, and D are the state space metrics of head and pitch systems for UFSS, as shown in Equation (5), (6), (11) and (12), respectively. The controller settings (regulating) for the pitch and head systems of UFSS are accomplished by utilizing Equation (21). It allows to cut down the value of structure factor with weighted elements. This results in an efficient handling of error when the amplitude of water disturbances is varying with depth and direction. Concerning the structure of HLQR (shown in Figure 8), we have introduced the weighing matrix Q in primary and secondary integrator blocks. It allows diverting the system dynamics towards a specified value (R). Furthermore, it aids to stabilize the system with lesser energy [21]. It is important to note that Q and R are the configuration parameters that are normally required to design the LQR controller. The continuous-time linear system is written in Equation (15). Where,ẋ represents the secondary integrator of HLQR controller, as shown in Figure 8.ẍ = Aẋ + Bu (15) The control activity magnitude may likewise be remembered for the cost work of the UFSS. Equation (18) defines the cost function of the LQR controller. (18) As shown in Figure 8, the K 1 and K 2 blocks are feedback gains of primary and secondary integrators and these are configured by Riccati equation, presented in Equations (19) and (20) [22]. The Equation (21) is the simplified form of Equation (19) which is used to calculate the value for K 2 . A required matrix, termed as weighing matrix Q, is constructed for the shifting of complex conjugate poles to complex plane as given in Equation (21).
where in Equation (21), the term h represents the solution elements of the matrix α ± jβ (these are the old complex eigenvalues) and σ ± jω (these are the desired complex eigenvalues).

Adaptive Structure for Error Elimination Based on HLQR
The adaptive structure of our HLQR highlights the phenomenon of error elimination, as shown in Figure 9. It takes u(t − 1) as an input power that varies with time and results in Ym(t) as an intermediate output. It helps us to compute the inverse of u(t − 1) via the Riccati equation, presented in Equation (19). This is a first-order non-linear differential equation in which complex higher order non-linear equations are avoided. Consequently, Equation (22) is used for the error eliminations in our controller.

Experimental Results
The experimental results of the system are simulated using MATLAB. In MATLAB, the control system and noisy environmental effects are analyzed. The analysis is carried out through Control System Designer and Simulink toolbox's (see Section 6.2). Our setup utilizes two cascaded feedback loops in Simulink Control Design using Control System Designer. For the evaluation purpose, disturbances are introduced in the dual loop control system of the UFSS. Subsequently, the response of the proposed controller is visualized.

Results
Concerning Section 4, it has been observed that the steady-state error is of a considerable margin on the unity gain. Similarly, the overshoot is not up to the required mark. Consequently, it results in a large settling time which is intolerable for a control system. When disturbance occurs in the system, it behaves disorderly and does not settle to its indigenous state. We have introduced PID, lead-compensator, and HLQR in UFSS to revamp the transient response. They tend to minimize the difference of ratio between the actual value and the desired value of the UFSS. After integrating the aforementioned controllers in the UFSS, the behavior of UFSS in response to the unit step is observed. Both PID and HLQR eliminate steady-state error resulting in a final value equal to 1. However, the lead-compensator only improves the response of the system. It does not eliminate the steady-state error. For the pitch system, the steady-state error is quite significant. Therefore, it is reduced by the lead-compensator. Nevertheless, 12% error remained in it that is visible in Figure 10. The head system does not possess a steady-state error in it. It implies that there is a zero steady-state error for all controller, as shown in Figure 11.  The analysis of these controllers has shown that all of them have achieved the desired requirements for both overshoot and settling time. However, the response graph is not the same for each type. Moreover, the HLQR controller has shown that it has handled disturbances and attained wanted requirements more briskly. It leads to a faster response time and lesser rise time. On the other hand, the PID controller has shown comparatively less response time. Similarly, the LQR and the lead-compensator are slowest among all. It has resulted in the greatest rise time which is shown in both Figures 10 and 11. In order to provide a better comparison over controllers, the detailed parameters for the observation of pitch and head systems are provided in Tables 6 and 7, respectively.  The numerical values shown in Tables 6 and 7 reveal that the HLQR has an advantage over PID and lead-compensator controllers. The HLQR method involves more mathematical computations as compared to the PID and lead-compensator. On the other hand, these mathematical computations are rather simple to calculate with multiple-output systems. The PID is also a versatile controller that only uses gain values K p , K i , and K d to achieve the result. The HLQR has an upper edge in performance as compared to the PID due to its matrix method. The lead-compensator is not preferred among all of these due to its lacking ability to eliminate the steady-state error (shown in the last column of Table 7). In HLQR, we can achieve a better response than other controllers as we have fixed the control criteria (depending on the control parameters). Usually, the control criteria in PID are achieved by varying the PID parameters. Here, we come from the opposite side with a fixed control criteria. However, the change in PID parameters may lead to a combined effect on the control parameters. To summarize, the HLQR is robust as compared to PID and lead-compensator controllers.

Hydrodynamic Disturbances and Noisy Environmental Effect
Previously, we have analyzed the non-linear response of pitch and heading control system which shows that our controller outperforms the other controllers. The environmental effects are unwanted disturbances produced due to the noise in sensors, variations in the depth, effects of object kinematics, and uncertainties of hydrodynamic coefficients due to the tides generated by the gravitational pull of the moon. Based on the aforementioned environmental disturbances, the performance of our controller is evaluated in the presence of generated disturbances (simulated profile), as shown in Figure 12. These disturbances are generated and simulated using MATLAB. For this, we have used band-limited white noise and Marine GNC toolbox in Simulink which help us in the generation of such a complex environment and to evaluate the behavior of our controller. Therefore, the UFSS control system is simulated with controllers under hydrodynamic disturbances as shown in Figures 13 and 14.   As shown in Figures 13 and 14, the HLQR shows a minimal variation to the reference signal under hydrodynamic disturbances while the PID and lead-compensator controllers show a large variation to the reference signal. In other words, the PID provides a heightened response to the disturbances while the lead-compensator gives a nether and slower response in contrast to the reference signal. Based on this observation, it is possible to say that the HLQR tackles any disturbance limited to a system that varies with time while other controllers (PID and lead-compensator) demand tuning and show more oscillation in handling ocean waves.

Comparison and Discussion
This section compares the heading and pitch parametric values achieved by the proposed controller with [4,23]. Table 8 shows a quick comparison in terms of rising time, settling time, and steady-state error for controlling pitching angle and heading. It can be seen that the proposed controller (HLQR) performs well and settle the disturbances more quickly and efficiently. Results of [4,23] show that the proposed controller has a comparatively sharp rise time. Moreover, it effectively removes the steady-state error. It is important to note that the work in [23] also removes the steady-state error completely, however, the work in [4] removes it to some extent. In addition to it, the work in [4] controls disturbances without requiring the mathematical model dynamics and kinematics of vehicles. It helps to handle the hydrodynamic disturbances with a minimum overshoot. The other two require re-modeling of dynamics of the vehicle. Similarly, ref. [24] has presented the development of a novel self-adaptive fuzzy PID controller for an AUV based on a non-linear MIMO topology. Authors have employed a combination of adaptive techniques and dual PID controllers. As a result, the uncertainty problem in PID parameters and AUV modeling uncertainty may be solved more effectively. However, exposure to hydrodynamic disturbances in depth leads to uncertainty in performance, whereas our controller provides exceptional dynamic, spectacular steady-state qualities, and remarkable stability at all depth levels.

Conclusions
In this paper, the pitch and head systems are evaluated via several experimental tests with different gain values for stabilizing the system. We have generated the environmental disturbances (i.e., variation in depth, uncertainties of hydrodynamic coefficients) for the proposed controller using the Marine GNC toolbox in Simulink. It has been analyzed that the proposed HLQR controller shows a satisfactory response to hydrodynamic disturbances in comparison to PID and lead-compensator. Moreover, it has been analyzed that the HLQR controller provides an optimal response, better response time, and gets settled more easily because of the adaptive complexion of the controller. In addition to its durability in a variety of underwater settings, the suggested adaptive control technique can track the goal route consistently while maintaining an acceptable precision. Furthermore, the use of dual LQR controllers in the proposed HLQR, the step response and handle disturbances have been improved. Last, but not least, because of the interchangeability of our proposed control technique, it meets the industrialization criterion well.