## 2 System Overview and Vehicle Model
### Vehicle Model
\[\delta_{fl} =\arctan\left(\frac{2\tan\delta_{f}L}{2L-b_{r}\tan\delta_{f}}\right) \tag{2}\] \[\delta_{fr} =\arctan\left(\frac{2\tan\delta_{f}L}{2L+b_{r}\tan\delta_{f}}\right) \tag{3}\]  
The longitudinal, lateral, and yaw motions of the vehicle can be represented by the following differential Equations (4)-(6):  
\[m\big{(}\dot{v}_{x}-\gamma v_{y}\big{)} =\Big{(}F_{x,f1}\sin\delta_{fl}+F_{x,fr}\sin\delta_{fr}\Big{)}- \Big{(}F_{y,fl}\cos\delta_{fl}+F_{y,fr}\cos\delta_{fr}\Big{)}+(F_{x,rl}+F_{x,rr}) \tag{4}\] \[m\big{(}\dot{v}_{y}+\gamma v_{x}\big{)} =\Big{(}F_{y,fl}\cos\delta_{fl}+F_{y,fr}\cos\delta_{fr}\Big{)}+ \Big{(}F_{x,fl}\sin\delta_{fl}+F_{x,fr}\sin\delta_{fr}\Big{)}+\Big{(}F_{y,rl}+ F_{y,rr}\Big{)}\] (5) \[I_{z}\dot{\gamma} =\tfrac{b_{y}}{2}\Big{(}F_{x,fr}\cos\delta_{fr}-F_{x,fl}\cos \delta_{fl}+F_{y,fl}\sin\delta_{fl}-F_{y,fr}\sin\delta_{fr}\Big{)}+\tfrac{b_{y }}{2}(F_{x,rr}-F_{x,rl})\] (6) \[+l_{f}\Big{(}F_{x,fr}\sin\delta_{fr}+F_{x,fl}\sin\delta_{fl}+F_{y, fr}\cos\delta_{fr}+F_{y,fl}\cos\delta_{fl}\Big{)}-l_{r}\Big{(}F_{y,rl}+F_{y,rr} \Big{)}\]  
where \(v_{x}\), \(v_{y}\), and \(\gamma\) denote the longitudinal velocity, lateral velocity, and the yaw rate, \(m\) and \(I_{z}\) denote the vehicle mass and yaw moment of inertia, and \(F_{x,i}\) and \(F_{y,i}\) denote the longitudinal and lateral forces exerted on tire \(i\) (\(i=fl,fr,rl,rr\)), respectively. The kinematic equation for the rotational motion of the wheel is as follows:  
\[I_{\omega}\dot{\omega}_{i}=T_{i}-F_{x,i}fr-F_{x,i}r \tag{7}\]  
where \(I_{\omega}\) denotes the wheel moment of inertia, \(T_{i}\) and \(F_{x,i}\) denote motor torque and vertical force exerted on the \(i\)th wheel, and \(f\) and \(r\) denote the rolling friction coefficient and wheel dynamic rolling radius. The slip angle of each wheel is denoted by  
\[\alpha_{fl} =\arctan\left(\frac{v_{y}+l_{f}\gamma}{v_{x}-b_{f}\gamma}\right)- \delta_{fl} \tag{8}\] Figure 2:0 (9) Figure 2:1 (10) Figure 2:2  
The lateral tire force \(F_{y,i}\) can be calculated using the Magic Formula tire model [38] through curve fitting:  
Figure 2:3  
where \(e_{1}=\mu F_{x,i}\) represents the peak factor, \(\mu\) is the road surface friction coefficient, and \(e_{2}\), \(e_{3}\), and \(e_{4}\) represent the stiffness factor, the shape factor, and the curvature factor, respectively. In this study, the 4 WID-EV is driven by four independently operating permanent magnet synchronous motors, as shown in Figure 2:4 The input power of the motor is determined by the output power \(P_{\text{out}}\) and the power losses \(P_{\text{loss}}\), which are mainly causedby the copper loss, iron loss, and mechanical loss. Based on the motor's torque, speed, and efficiency characteristics, \(P_{\text{in}}\) and \(P_{\text{out}}\) can be calculated as follows:  
Figure 2:5  
where \(\eta_{i}\) is the efficiency, based on the torque \(T_{i}\) and speed \(n_{i}\) of the motor. As shown in Figure 4, a speed tracking driver model is developed using a proportional-integral (PI) controller. The difference between the desired velocity \(v_{d}\) and the current velocity \(v\) serves as the input for the controller, which determines the total required torque. In this study, we design an adaptive compound controller to balance lateral stability and energy efficiency. The controller consists of high-precision sensors, actuators, and a control unit to facilitate its implementation. A high-precision gyroscope, radar speed sensor, inertial measurement unit, and optical encoder measure the yaw rate, longitudinal velocity, lateral velocity, and steering wheel angle, respectively.