## 2 Methodology
### Improved MMG Model  
For intelligent collision avoidance decision-making in the form of altering course or changing speed by a computer system, it is clear that an accurate and exact motion model for ship navigation is required. The focus of this research is on decision-making for collision avoidance in the confined sea when visibility is good. Considering rolling, pitching, and having motions have little impact on ship collision, only sway, surge, and yaw are considered in the calm sea. Therefore a mathematical model called MMG with three degrees of freedom is used to properly deduce OS's movements [34]:  
\[\left\{ \begin{array}{l}\left(m+m_{y}\right)\dot{v}+(m+m_{x})ur=Y_{H}+Y_{P}+ Y_{R}\\ \left(m+m_{x}\right)\dot{u}-\left(m+m_{y}\right)vr=X_{H}+X_{P}+X_{R}\\ (I_{\text{zz}}+i_{zz})r=N_{H}+N_{R}+N_{p}\\ \end{array} \right. \tag{2}\]  
where \(m\) is the total mass of the vessel, \(m_{x}\) and \(m_{y}\), respectively, indicate the additional vertical and horizontal mass. Furthermore, \(u\) and \(v\) denote the lateral and longitudinal speed; \(\dot{u}\) and \(\dot{v}\) denote acceleration in their direction; \(r\) and \(\dot{r}\) are the angular velocity and angular acceleration; \(I_{\text{zz}}\) and \(i_{zz}\) are the moment of inertia and additional moment of inertia respectively; \(X\) and \(Y\) represent the force or moment in vertical axis directions and in horizontal axis directions, respectively; and \(N\) respects the turning moment. \(H\), \(P\) and \(R\) are the external forces acting on the hull, propeller, and rudder respectively. The propeller's power must be sufficient to overcome both the hull's inherent resistance and the additional resistance brought on by the propeller's operation, which is expressed as follows:  
\[T=R+\Delta T \tag{3}\]  
where \(T\) and \(\Delta T\) are the forces of propeller and propeller derating respectively. \(R\) is the resistance of the ship hull. In the past, a lot of research was aimed at establishing an accurate ship motion model with the precondition of fixed rotation of the ship propeller, in which the ship's speed and rotation of propeller are matched. In this state of the ship moving, the thrust is only influenced by the rotation of the propeller when additional elements are known. However, the research in this paper focuses on the ship motion and collision avoidance decision method under variable speed. In this situation, the rotation of the propeller and the actual speed of the ship are unmatched, which is more complicated than the ship's motion in a fixed rotation. Thrust is influenced by more factors besides the rotation of the propeller, such as ship longitudinal and lateral speeds, thrust deduction, coordinate of buoyancy, and so on. Therefore, a new ship thrust model is needed for the MMG model. In practice, the propeller's effective thrust is often expressed using the thrust derating factor as follows:  
\[X_{p}=\big{(}1-t_{p0}\big{)}T \tag{4}\]  
where \(t_{p0}\) is the thrust derating coefficient, which is impacted by the ship's model, as well as the propeller's load and size. Furthermore, for a particular ship, \(t_{p0}\) is a variable for alternation of revolution and ship movement. The alternation of revolution would affect the ship's resistance by causing a shift in the inflow and outflow of the propellers. the thrust derating coefficient \(t_{p0}\) under the impact of propeller load is illustrated in Equation (5):  
\[t_{p0}=\left\{ \begin{array}{ll}0.04+\Big{(}t_{p0}^{\prime}-0.04\Big{)}u/u_{0 },&u\leq u_{0}\\ t_{p0}^{\prime},&u>u_{0}\end{array} \right. \tag{5}\]  
where \(u_{0}\) is the designated speed and \(u\) is the real-time speed. Further, \(t_{p0}^{\prime}\) is the propeller derating factor at \(u_{0}\). It is also vital to evaluate the impact of lateral and rotational motion on the ship motion model in order to increase the accuracy of the ship motion prediction model.