## 2 Mathematical Modeling of Unmanned Surface Vehicle (USV)
### Modeling of USV Dynamics  
The rigid-body dynamics of the USV were modeled based on Newton-Euler equations and vectorial-matrix dynamics. In this case, the USV underwent translational motion along the \(X\) and \(Y\) axes and rotational motion about the \(Z\) axis, constituting a three-degrees-of-freedom (3-DoF) platform. Therefore, the modeling process excluded the roll, pitch, and heave motions. According to \"_Guidance and Control of Ocean Vehicles_\", the rigid-body dynamics equations of the USV can be expressed in the form of Equation (4) [10]. \[M_{RB}\dot{v}+C_{RB}(v)v=\tau_{RB}, \tag{4}\]  
where \(M_{RB}\) represents the mass and inertia matrix of the USV, \(C_{RB}(v)\) denotes the Coriolis and centripetal force matrix, and \(\tau_{RB}\) represents the external forces due to the USV's propulsion system. The representation expressed in (4) is applicable to idealized scenarios such as simulation environments. However, for a more realistic representation, definitions related to hydrodynamic forces must be incorporated into the rigid-body dynamic equations. As previously described, the USV undergoes 3-DoF motion, thereby eliminating the roll, pitch, and heave terms. The inertial matrix and Coriolis and centripetal forces resulting from the added mass are expressed in (5). \[M_{A}\dot{v}= \begin{bmatrix}-X_{\dot{u}}&0&0\\ 0&-Y_{\dot{v}}&-Y_{\dot{r}}\\ 0&-N_{\dot{v}}&-N_{\dot{r}}\end{bmatrix} ;C_{A}(v)= \begin{bmatrix}0&0&Y_{\dot{v }}v_{r}\\ 0&0&-X_{\dot{u}}u_{r}\\ -Y_{\dot{v}}v_{r}-Y_{\dot{r}}&X_{\dot{u}}u_{r}&0\end{bmatrix} , \tag{5}\]The damping matrix includes the fluid damping forces that depend on the relative velocity between the fluid and the USV. However, determination of the coefficients of fluid forces that exhibit nonlinear viscous relationships has limitations in terms of accuracy. Therefore, with the assumption that the influence of the damping forces beyond the second order is negligible, the total damping forces can be expressed as the sum of the linear and nonlinear damping forces, as indicated in (6) and (7). \[D(v)=D_{l}v+D_{nl}(v)v, \tag{6}\]  
\[D_{l}= \begin{bmatrix}-X_{u}&0&0\\ 0&-Y_{u}&-Y_{r}\\ 0&-N_{v}&-N_{r}\end{bmatrix} ;D_{nl}= \begin{bmatrix}-X_{u|u|}\big{|}u\big{|}&0&0 \\ 0&-Y_{v|v|}\big{|}v\big{|}-Y_{r|r}\big{|}\big{|}r\big{|}\\ 0&-N_{v|v|}\big{|}v\big{|}&-N_{r|r}\big{|}r\big{|}\end{bmatrix} , \tag{7}\]  
where \(D_{l}\) and \(D_{nl}\) represent the linear and nonlinear damping forces, respectively. By adding the inertia and Coriolis matrices obtained through the above derivations, along with the inertia and Coriolis matrices generated by the added mass, and subsequently adding the damping matrix, the rigid-body dynamics equation can be expressed as shown in (8). \[\text{M}\dot{v}+C(v)v+D(v)v=\tau+\tau_{E}, \tag{8}\]  
where \(\tau_{E}\) represents the components of force and moment acting on the USV from external factors such as waves, wind, and currents. However, because expressing each environmental variable mathematically was cumbersome, they were assumed to be absent. Therefore, by summing up all the terms on the left-hand side of (8) and expressing them in the form of a rigid-body dynamics equation, the rigid-body dynamics equation of the USV can be derived as in Equations (9)-(11):  
\[(m-X_{\dot{u}})\dot{u}-u_{r}+(Y_{\dot{v}}v_{r}r+Y_{\dot{r}}r-mX_{G}r)r-\Big{(} X_{u}+X_{u|u|}|u|\Big{)}u=\tau_{X}, \tag{9}\]  
\[(m-y_{\dot{v}})\dot{v}+(mX_{G}-Y_{\dot{r}})\dot{r}+u_{r}-X_{\dot{u}}u_{r}r- \Big{(}Y_{\dot{v}}+Y_{v|r|}|v|\Big{)}-\Big{(}Y_{r}+Y_{r|r|}|r\Big{|}\Big{)}r= \tau_{Y}, \tag{10}\]  
\[(mX_{G}-N_{\dot{v}})\dot{v}+(I_{Z}-N_{\dot{r}})\dot{r}-(Y_{\dot{v}}v_{r}r-Y_{ \dot{r}}r+mX_{G}r)u+X_{\dot{u}}u_{r}v-\Big{(}N_{v}+N_{v|v|}|v|\Big{)}v-\Big{(} N_{r}+N_{r|r|}|r|\Big{)}r=\tau_{N}, \tag{11}\]  
where \(\tau\) represents the thrust generated by the thruster system of the USV. Definitions of the parameters and conditions for the above equations are available in [11].