# A Hybrid Linear Quadratic Regulator Controller for Unmanned Free-Swimming Submersible
## 3 Mathematical Structure of UFSS
### 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 [PERSON]'s book [18]. The term \(\theta_{e}\) controls the \(\theta\) in conjunction with the pitch-angle. The pitch-rate feedback regulates the elevator deflection \(\delta_{e}\) and determines \begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol** & **Meaning** \\ \hline \(\theta\) & pitch angle of the vehicle \\ \(\theta_{e}\) & commanded pitch angle \\ \(\delta_{ce}(s)\) & commanded elevator deflection \\ \(\theta_{c}(s)\) & pitch command \\ \(G(s)\) & transfer function of pitch/head \\ \(\delta_{e}\) & pitch angle through the vehicle \\ \(\delta_{rc}\) & commanded rudder deflection \\ \(\Psi_{c}(s)\) & heading command \\ \(\Psi(s)\) & heading of vehicle \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notations used throughout the paper. Figure 1: An unmanned submersible vehicle and a general representation of AUV with pitch and head. 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. \[\frac{\theta(s)}{\delta_{\alpha c}(s)}=(\frac{-0.125(s+0.435)}{(s+1.23)(s^{2}+ 0.226s+0.0169)})(\frac{-2K_{1}}{s+2}) \tag{1}\]  
The transfer function for closed-loop system is calculated using a general equation as follows \(\frac{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 \(\frac{G(s)}{1+G(s)H(s)}\) to derive the transfer function of closed-loop 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 \(\alpha\), where \(\alpha=(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 [PERSON]'s Book. \[G(s) =\frac{0.25K_{1}(s+0.435)}{s^{4}+3.456s^{3}+\alpha s^{2}+(0.6105s+0.1087 K_{2})+0.0415} \tag{2}\] \[\frac{\theta(s)}{\theta_{c}(s)} =\frac{0.25K_{1}(s+0.435)}{s^{4}+3.456s^{3}+3.456s^{2}+(0.72+0.25K _{1})s+0.109K_{1}}\] (3) \[\frac{\theta(s)}{\theta_{c}(s)} =\frac{0.25(s+0.435)}{s^{4}+3.456s^{3}+3.456s^{2}+0.97s+0.109} \tag{4}\]  
\[ \begin{bmatrix}\dot{x_{1}}\\ \dot{x_{2}}\\ \dot{x_{3}}\\ \dot{x_{4}}\end{bmatrix} = \begin{bmatrix}0&1&0&0\\ 0&0&1&0\\ 0&0&0&1\\ -0.015&-0.969&-3.457&-3.456\end{bmatrix}\begin{bmatrix}x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{bmatrix} + \begin{bmatrix}0\\ 0\\ 0\\ 1\end{bmatrix} u \tag{5}\]  
\[y=