## 4 Tire Force Distribution and Actuator Control
### Actuator Control Layer  
As for real vehicles, the longitudinal and lateral forces of each wheel cannot be directly controlled, and the motion of vehicles is controlled by actuators. The actuators of the 4 WIS/4 WID electric vehicle include independent steering system and in-wheel motor. By controlling the actuators, the longitudinal and lateral tire forces required for each wheel can be obtained. Through the tire model under combined working conditions introduced in Section 2.2, the required tire slip angle and tire slip rate under the expected tire lateral force and longitudinal force are calculated. The [PERSON] algorithm is adopted in this paper. Equations (10)-(16) can be written as:  
\[F_{x}=f_{1}(s,\alpha)=-\frac{s}{\sqrt{s^{2}+\tan\alpha}}D_{x}\sin\{C_{x}\text{ arctan}[B_{x}s-E_{x}(B_{x}s-\text{arctan}(B_{x}s))]\} \tag{84}\]  
\[F_{y}=f_{2}(s,\alpha)=-\frac{\tan\alpha}{\sqrt{s^{2}+\tan\alpha}}D_{y}\sin\{C _{y}\text{arctan}\big{[}B_{y}\alpha-E_{y}(B_{y}\alpha-\text{arctan}(B_{y} \alpha))\big{]}\} \tag{85}\]  
Defining the follow functions:  
\[F(x)=F(s,\alpha)=\left[ \begin{array}{c}f_{1}(s,\alpha)\\ f_{2}(s,\alpha)\end{array} \right] \tag{86}\]  
Figure 10: Surface of the fuzzy logical controller output: (**a**) Surface of fuzzy logical controller output \(g_{1}\); (**b**) surface of fuzzy logical controller output \(g_{2}\); and (**c**) surface of fuzzy logical controller output \(g_{3}\). Figure 9: Membership function curves (**a**) Membership function curves of \(v_{x}\); (**b**) membership function curves of \(\tau\); and (**c**) membership function curves of \(g_{1}\), \(g_{1}\), \(g_{3}\). \[J(x)=J(s,\alpha)=\left[ \begin{array}{cc}\frac{\partial f_{1}}{\partial s}&\frac{ \partial f_{1}}{\partial s}\\ \frac{\partial f_{2}}{\partial s}&\frac{\partial f_{2}}{\partial s}\end{array} \right] \tag{87}\]  
Setting the initial value as:  
\[x_{0}=\left[ \begin{array}{c}s_{0}\\ \alpha_{0}\end{array} \right] \tag{88}\]  
According to the dynamic characteristics of tires, the tire may work in a linear or saturated area in the same lateral tire force. The tire slip angles corresponding to these two conditions are different. Similarly, different longitudinal slip rates may also be obtained in the same tire longitudinal force. Therefore, in order to make the tire work in the linear region, the initial value is set in this paper to ensure the direction of iteration convergence. The initial value is defined as \(S_{0}=0.001\), \(\alpha_{0}=0.1\). The recurrence formula is written as:  
\[x^{(k+1)}=x^{(k)}-J^{-1}(x^{(k)})F(x^{(k)}) \tag{89}\]  
The computational procedure of Newton Raphson algorithm is shown in Algorithm 2:  
```
1. define initial value \(x^{(0)}\), accuracy value \(\epsilon\)
2. set \(k=0\)
3. while\(k<N\)
4. calculate \(J\left(\mathbf{x}^{(k)}\right)\mathbf{d}=-\mathbf{F}\left(\mathbf{x}^{(k)}\right)\)
5. if\(|\mathbf{d}|<\epsilon\), break
6. else\(\mathbf{x}^{(k+1)}=\mathbf{x}^{(k)}+\mathbf{d}^{(k)}\)
7. \(\mathbf{k}=\mathbf{k}+\mathbf{1}\)
8. end
9. end
```  
**Algorithm 2** Newton Raphson algorithm. The desired longitudinal slip rate \(s_{idef}\) and the desired tire slip angle \(\alpha_{i}\) under the expected tire longitudinal force \(F_{xi}\) and the lateral force \(F_{yi}\) of each wheel can be obtained through the Iterative calculation. The desired wheel steering angle of each wheel is \(\delta_{i}\), which can be calculated by Equations (17)-(19). \[\delta_{1} =\arctan\frac{\frac{y_{y}+i\phi-y_{z}\tan\alpha_{1}}{(y_{y}+i\phi )\tan\alpha_{1}+v_{x}}}{\delta_{2}} \tag{90}\] \[\delta_{2} =\arctan\frac{\frac{y_{y}+i\phi-y_{z}\tan\alpha_{2}}{(y_{y}+i\phi )\tan\alpha_{2}+v_{x}}}{\delta_{3}}\] \[\delta_{4} =\arctan\frac{\frac{y_{y}-i\phi-y_{z}\tan\alpha_{4}}{(y_{y}-i\phi )\tan\alpha_{4}+v_{x}}}{\]  
The desired longitudinal slip rate is tracked by controlling drive torque of in-wheel motor. The in-wheel motor adopts DC motor. The desired wheel angular velocity can be expressed as:  
\[\omega_{idef}=\frac{s_{idef}v_{mi}+v_{mi}}{R_{w}} \tag{91}\]  
Designing the PID controller.