# Research on Obstacle Avoidance Replanning and Trajectory Tracking Control Driverless Ferry Vehicles
## 2 Vehicle Model  
The three-degrees-of-freedom vehicle dynamics model was used as the predictive model for the predictive controller in this work. Figure 1 displays the vehicle's three-degrees-of-freedom monorail dynamics model.  
The ferry vehicle's degree of freedom in the transverse, longitudinal, and swinging directions is represented by the three-degrees-of-freedom model, which corresponds to the \(x\)-axis, \(y\)-axis, and \(z\)-axis of the vehicle coordinate system. Therefore, the equilibrium equations of forces in the \(x\)-axis, \(y\)-axis, and \(z\)-axis are established according to [PERSON]'s second law.  
\[m\ddot{x}=2F_{xf}+2F_{xr}+m\dot{y}\dot{\varphi} \tag{1}\]  
\[m\ddot{x}=2F_{xf}+2F_{xr}-m\dot{y}\dot{\varphi} \tag{2}\]  
\[I_{z}\ddot{\varphi}=2 aF_{xf}-2 bF_{yr} \tag{3}\]  
where \(\ddot{x}\) and \(\ddot{y}\) are the driverless ferry vehicle's accelerations along the \(x\) and \(y\) directions, respectively; \(m\) is the vehicle's total mass; \(\ddot{\varphi}\) is the heading angle acceleration; \(I_{Z}\) is the moment of inertia of the driverless ferry vehicle around the \(z\)-axis; \(F_{x/}\) and \(F_{xr}\) are the longitudinal force on the front and rear wheels of the driverless ferry vehicle in the \(x\)-axis direction; \(F_{xf}\) and \(F_{xr}\) are the lateral forces on the front and rear wheels of the driverless ferry vehicle in the \(y\)-axis direction, respectively; \(\dot{y}\) is the speed of the driverless ferry vehicle along the \(y\)-axis; \(\dot{\varphi}\) is the heading angular speed of the ferry vehicle; and distances \(a\) and \(b\), respectively, are measured from the driverless ferry vehicle's center of mass to its front and rear axles.  
The longitudinal and lateral forces acting on the tires can indicate parameters such as slip rate, road friction coefficient, tire slip angle, and the vertical load of the ferry vehicle.  
\[F_{l}=f_{l}(s,u,\alpha,F_{z}) \tag{4}\]  
\[F_{c}=f_{c}(s,u,\alpha,F_{z}) \tag{5}\]  
where \(\alpha\) is the tire's slip angle, \(s\) is the slip rate, \(u\) is the road friction coefficient, and \(F_{z}\) is the vertical load on the driverless ferry vehicle tire.  
The following conversion equation is obtained by converting the body coordinate system to the inertial coordinate system:  
\[\dot{Y}=\dot{x}\sin\varphi+\dot{y}\cos\varphi \tag{6}\]  
\[\dot{X}=\dot{x}\cos\varphi+\dot{y}\sin\varphi \tag{7}\]  
Figure 1: Vehicle three-degrees-of-freedom monorail model.  
By combining Formulas (6) and (7), the vehicle's nonlinear dynamic model can be established. The road friction coefficient, \(u\), can be obtained under the given road conditions. Finally, the system is described using a state space expression, as shown below:  
\[\left\{\begin{aligned} \dot{\xi}_{dyn}&=f_{dyn}(\xi_{dyn},u_{dyn})\\ \eta_{dyn}&=h_{dyn}(\xi_{dyn})\end{aligned}\right. \tag{8}\]  
The state variable in this system is configured as \(\xi_{dyn}=[\dot{y},\ \dot{x},\ \varphi,\ \dot{\varphi},\ \dot{\varphi},\ \dot{Y},\ \chi]^{T}\). The driverless ferry vehicle has front-wheel steering. Hence, the rear-wheel steering angle is \(\delta_{r}=0\). As a result, \(u_{dyn}=\delta_{f}\) is used as the control variable, while \(\eta_{dyn}=[\varphi,Y]^{T}\) is chosen as the output quantity. In the model predictive controller covered in the study, this model acts as the predictive model.