# Nonlinear Optimal Control Law of Autonomous Unmanned Surface Vessels
## 2 Mathematical Model and Design Objective  
### Rigid-Body AUSV Dynamics  
For the global tracking design purpose, nonlinear AUSV dynamics is formulated as the Earthfixed vector representation [13]:  
\[\mathbf{M}_{\eta}(\mathbf{\eta})\ddot{\mathbf{\eta}}+\mathbf{C}_{\eta}(\mathbf{ \beta},\mathbf{\eta})\dot{\mathbf{\eta}}+\mathbf{D}_{\eta}(\mathbf{\eta}) \dot{\mathbf{\eta}}=\boldsymbol{\tau}_{\eta}+\boldsymbol{\tau}_{d\eta}( \mathbf{\eta}), \tag{1}\]  
where \(\mathbf{\eta}=\left[ \begin{array}{cccc}x&y&\psi&\end{array} \right]\) contains positions (\(x\) and \(y\)) in the \(x\)-\(y\) axis and the yaw angle (\(\psi\)) of the controlled AUSV in the global co-ordinate, and \(\mathbf{\beta}=\left[ \begin{array}{cccc}u&v&r&\end{array} \right]\) contains linear velocities \(u\) and \(v\), and angular velocity \(r\) of the controlled AUSV in the body co-ordinate, respectively, as shown in Figure 1. where \(\mathbf{M}_{\eta}(\mathbf{\eta})=\mathbf{J}^{-T}(\mathbf{\eta})\mathbf{M} \mathbf{J}^{-1}(\mathbf{\eta})\) is the inertia mass, \(\mathbf{C}_{\eta}(\mathbf{\beta},\mathbf{\eta})=\mathbf{J}^{-T}(\mathbf{\eta })[\mathbf{C}(\mathbf{\beta})-\mathbf{M}\mathbf{J}^{-1}(\mathbf{\eta})\dot{ \mathbf{J}}(\mathbf{\eta})]\mathbf{J}^{-1}(\mathbf{\eta})\) is the Coriolis and centripetal matrix, \(\mathbf{D}_{\eta}(\mathbf{\eta})=\mathbf{J}^{-T}(\mathbf{\eta})\mathbf{D}( \mathbf{\beta})\mathbf{J}^{-1}(\mathbf{\eta})\) is the damping matrix, \(\boldsymbol{\tau}_{\eta}(\mathbf{\eta})=\mathbf{J}^{-T}(\mathbf{\eta}) \boldsymbol{\tau}_{input}\) is the control input, and \(\boldsymbol{\tau}_{d\eta}(\mathbf{\eta})=\mathbf{J}^{-T}(\mathbf{\eta}) \boldsymbol{\tau}_{disturbances}\) is the ocean-environment disturbances in the global co-ordinate, respectively. System parameter matrices \(\mathbf{M}\), \(\mathbf{C}(\mathbf{\beta})\), \(\mathbf{D}(\mathbf{\beta})\), and transformation matrix \(\mathbf{J}(\mathbf{\eta})\) are denoted as the following:\[\mathbf{M}=\left[ \begin{array}{cccc}m-X_{ii}&0&0\\ 0&m-Y_{iv}&mx_{g}-Y_{i}\\ 0&mx_{g}-N_{iv}&I_{z}-N_{r}\\ 0&0&-(m-Y_{iv})v-(mx_{g}-Y_{i})r\\ 0&0&(m-X_{ii})u\\ (m-Y_{iv})v+(mx_{g}-Y_{i})r&-(m-X_{ii})u&0\\ \end{array} \right]\] \[\mathbf{D}(\beta)=\left[ \begin{array}{cccc}-X_{ii}&0&0\\ 0&-Y_{v}&-Y_{r}\\ 0&-N_{v}&-N_{r}\\ \end{array} \right]\] \[\mathbf{J}(\eta)=\left[ \begin{array}{cccc}\cos\psi&-\sin\psi&0\\ \sin\psi&\cos\psi&0\\ 0&0&1\\ \end{array} \right],\]  
where \(\mathbf{M}=\mathbf{M}^{T}>0\) is the rigid-body inertia matrix that includes added mass. \(\mathbf{C}(\beta)=-\mathbf{C}^{T}(\beta)\), \(\forall\beta\in\Re^{6}\) is the matrix of Coriolis and centripetal terms that includes added mass. \(\mathbf{D}(\beta)>0\), \(\forall\beta\in\Re^{6}\) is the hydrodynamic damping matrix. \(\mathbf{\tau}_{input}\) is the control vector with forces and torque. \(\mathbf{\tau}_{disturbances}\) is the vector of forces and torques induced by wave, wind, and ocean currents. The controlled dynamics of the AUSV in Equation (1) were obtained under the following assumptions. When applying nonlinear optimal control to this tracking problem of controlled AUSVs, ocean-environment disturbances \(\mathbf{\tau}_{d\eta}(\eta)\) of the dynamic equation in Equation (1) were omitted. This is because the optimal control performance (optimal performance) of controlled AUSVs theoretically does not take this term into account. Consequentially, the dynamic equation of a controlled AUSV can be rewritten as below:  
\[\mathbf{M}_{\eta}(\eta)\ddot{\eta}+\mathbf{C}_{\eta}(\beta,\eta)\dot{\eta}+ \mathbf{D}_{\eta}(\eta)\dot{\eta}=\mathbf{\tau}_{\eta 2}, \tag{2}\]  
where \(\mathbf{\tau}_{\eta 2}\) is the proposed nonlinear optimal control law, which is derived below. To simplify the representation of the dynamic equation of a controlled AUSV, the second and third terms in the left-hand side of Equation (1) were merged.