## 3 Driving Force Distribution and Control Strategy
### Lower Layer Controller for Driving Force Distribution  
In the previous section, the ISMC and PID controller were used to calculate the desired resultant force and the desired resultant yaw moment. The vehicle has six motors driving each of the six wheels; that is to say that it is an over-actuation system. Thus, it is necessary to propose a practical driving force distribution algorithm. Since the motors can onlyprovide longitudinal force to the wheels, the longitudinal force required for the wheels needs to be derived from Equation (18) as follows. \[\left\{ \begin{array}{l}F_{xdesire}=F_{x1d}+F_{x2d}+F_{x3d}+F_{x4d}+F_{x5d}+F_{x6d} \\ M_{Fxdesire}=\frac{B}{2}(F_{x2d}+F_{x4d}+F_{x6d}-F_{x1d}-F_{x3d}-F_{x5d})\\ \end{array} \right., \tag{18}\]  
where \(F_{xid}(i=1,2,\cdots,6)\) denote the desired longitudinal forces provided by the motors. According to the 6 WD skid-steering EUGV dynamics model and upper layer controller, \(F_{xdesire}=F_{desire}\) and \(M_{Fxdesire}=M_{desire}-\sum M_{Fy}\). \(\sum M_{Fy}\) can be calculated with Equation (4) based on the lateral force estimation of the tire. Therefore, the desired driving forces \(F_{xid}\) of the motors are obtained, and the desired driving torques \(T_{di}\) of the motors are calculated by  
\[T_{di}=RF_{xid}, \tag{19}\]  
Equation (18) describes the mathematical relationship between the driving forces of the six motors, but working out how to determine the output force of each motor is a problem. The driving force distribution algorithm is the solution to this problem. Now, the longitudinal tire workload rate \(\eta\) is defined as  
\[\eta=\frac{F_{x}}{\mu F_{z}}, \tag{20}\]  
where the tire longitudinal workload rate \(\eta\) influences the vehicle driving capability and dynamic stability. To achieve optimal maneuverability and stability control, an objective function is defined according to  
\[min\
mid=min\sum_{i=1}^{6}C_{i}\eta_{i}^{2}=min\sum_{i=1}^{6}C_{i}(\frac{F_{xi} }{\mu_{i}F_{xi}})^{2}, \tag{21}\]  
where \(C_{i}(i=1,2,\cdots,6)\) are weighting factors. In this paper, we propose that the weighting factors in the objective function can dynamically change according to the vehicle motion conditions and the vertical load of each tire. Since the vertical loads of the same side tires of the 6 WD skid-steering EUGV are different, in order to dynamically adjust the longitudinal tire workload rates of the same-side wheels, the weighting factors are determined according to  
\[\left\{ \begin{array}{l}C_{1}=C_{2}=1\\ C_{3}=\frac{F_{x3}}{F_{x1}}\\ C_{4}=\frac{F_{x3}}{F_{x1}}\\ C_{5}=\frac{F_{x5}}{F_{x1}}\\ C_{6}=\frac{F_{x6}}{F_{x2}}\\ \end{array} \right., \tag{22}\]  
There are several types of inequality constraints in the solving process for the objective function, including actuator constraints, road adhesion constraints, and tire friction circle constraints. \[\left\{ \begin{array}{l}\frac{T_{min}}{R}\leq F_{xi}\leq\frac{T_{max}}{F_{xi} }\\ -\mu_{i}F_{zi}\leq F_{xi}\leq\mu_{i}F_{zi}\\ -\sqrt{\left(\mu_{i}F_{zi}\right)^{2}-\left(F_{yi}\right)^{2}}\leq F_{xi}\leq \sqrt{\left(\mu_{i}F_{zi}\right)^{2}-\left(F_{yi}\right)^{2}}\\ \end{array} \right., \tag{23}\]  
Thus, a comprehensive cost function for the driving force distribution with equality and inequality constraints is established according to  
\[\left\{\begin{array}{l}min\
mid=\frac{1}{2}\mathbf{x}^{T}\mathbf{W}\mathbf{x}\\ \mathbf{b}-\mathbf{A}\mathbf{x}=\mathbf{0}\\ \begin{array}{l}\mathbf{\ }\ \where  
\[\mathbf{x}=[F_{x1d},F_{x2}d,F_{x3d},F_{x4d},F_{x5d},F_{x6d}]^{T}, \tag{25}\]  
\[\mathbf{A}=\left[ \begin{array}{cccccc}1&1&1&1&1&1\\ -\frac{\mathbf{B}}{2}&\frac{\mathbf{B}}{2}&-\frac{\mathbf{B}}{2}&\frac{\mathbf{B}}{2}&-\frac{ \mathbf{B}}{2}&\frac{\mathbf{B}}{2}\\ \end{array} \right], \tag{26}\]  
\[\mathbf{W}=\left[ \begin{array}{cccccc}C_{1}/(\mu_{1}F_{z1})^{2}&0&0&0&0&0\\ 0&C_{2}/(\mu_{2}F_{z2})^{2}&0&0&0&0\\ 0&0&C_{3}/(\mu_{3}F_{z3})^{2}&0&0&0\\ 0&0&0&C_{4}/(\mu_{4}F_{z4})^{2}&0&0\\ 0&0&0&0&C_{5}/(\mu_{5}F_{z5})^{2}&0\\ 0&0&0&0&0&C_{6}/(\mu_{6}F_{z6})^{2}\\ \end{array}