**1. Introduction**

The passenger capacity of medium bus is generally 9–20, which is suitable for small and medium-size cities. With the increasing awareness of greenhouse gas emissions, the emergence of electric buses can meet the call for energy conservation and emission reduction [1]. Compared with the internal combustion engine powered medium bus, the electric medium bus have many advantages. For example, they have low vibration noise, simple structure, high power transmission efficiency, easy vehicle layout, and excellent power performance [2,3]. The selection of pure electric medium bus drive motors must meet the vehicle's dynamic requirements, such as maximum speed, acceleration performance, and maximum grade [4]. Among a variety of vehicle drive motors, permanent magnet synchronous motors (PMSMs) have many applications [5,6]. Among them, the axial flux permanent magnet synchronous motors (AFPMSMs) have the advantages of low speed, large torque and high energy density, and are more suitable for use in an electric medium bus with a larger passenger capacity. Double stator-single rotor AFPMSM (two-disc AFPMSM) has better heat dissipation and larger rated torque. Therefore, the two-disc AFPMSM is selected as the driving motor for electric medium bus in this paper.

The two-disc AFPMSM can be equivalent to two PMSMs connected coaxially, and for electric medium-sized buses, there is only one given torque, so this paper involves the problem of multi-motor torque distribution. At present, the commonly used torque distribution method is mainly applied to distributed drive vehicles. Compared with the conventional central direct drive electric vehicles, the drive motors of the various wheels of the distributed drive electric vehicle can be independently controlled, and the torque of each wheel can be distributed in any proportion within its capability range. The energy can be controlled by properly distributing the wheel torque so that the motor works as much as possible in the high efficiency range. The author of [7] proposed a multi-objective optimization method that considers system efficiency and safety for torque distribution. The authors of [8] mainly use torque distribution to enable micro electric vehicles to improve powertrain efficiency. The authors of [9] used the optimal vehicle state estimation method for directional tire torque distribution. In this paper, a torque optimal allocation method is proposed for the purpose of efficiency optimization. The particle swarm optimization algorithm is used to optimize the torque distribution mathematical model to obtain the optimal torque distribution solution. In addition, regenerative braking is one of the most effective ways to extend the durability of electric vehicles [10–12]. In order to further increase the cruising range, this paper applies the previously described optimal torque distribution method to the braking situation.

In addition, due to the large number of passengers in medium bus, some researchers have studied the safety and stability of driving. Authors of [13–16] studied the safety-structure from the structure of the medium bus, among which authors of [13,14] focused on studying the strength of conventional bus structures under operating conditions, authors of [15,16] studied the crashworthiness under rollover accident.

In addition, the research on control systems is mainly divided into two categories, motor design and optimization and motor control. The research on AFPMSM mainly focuses on the optimization of the motor model. The authors of [17] used the combined solution of Maxwell's equations and magnetic equivalent circuits to model the AFPMSM analytically. The authors of [18] used an auxiliary multi-objective optimization algorithm to optimize the design of AFPMSM with dual rotor and single stator. This paper studies the anti-interference and current tracking capabilities of the driving system of medium-sized buses from the perspective of drive control. During the operation of the electric medium bus, due to the complicated operating environment, it will encounter various nonlinear disturbances. Adaptive robust control is used to overcome the effects of nonlinear disturbances, thereby improving tracking accuracy of the current loop. In the study of adaptive robust control, the authors of [19] used adaptive synthesis robust control strategies based on μ synthesis to resist the interference of high-frequency dynamic problems generated by the motor structure mode on linear motor control. The authors of [20] used neural networks to learn adaptive robust controllers to resist interference from unknown factors. The author of [21] used an adaptive robust controller based on extended disturbance observer to improve the control accuracy of linear motors. In this paper, adaptive robust control is applied to the drive control system of AFPMSM for anti-disturbance control.

This paper mainly studies the drive control system of electric medium bus. From the above, the drive control system is mainly divided into two parts. The first part mainly studies the torque distribution method, with the system's highest working efficiency as the distribution target. The second part mainly studies the motor control part. In order to reduce the waveform ripple and improve the system control accuracy, this paper models and studies the adaptive robust control vector system. Finally, the above methods are simulated and the motor experiments and loading experiments are performed, and the results are summarized.

#### **2. Two-Disc AFPMSM Mathematical Model**

Compared with the traditional AFPMSM, the AFPMSMs with multi-disc structure improve the overall efficiency of the motor by adjusting the number of stators and rotors running [22]. Therefore, this paper takes the AFPMSM of double-stator-single-rotor structure as the research object,

and establishes its mathematical model as the theoretical basis for deducing its control strategy. The structure of the dual-stator-single-rotor AFPMSM (also called double-disc AFPMSM) is shown in Figure 1.

**Figure 1.** Internal view of double-disc axial flux permanent magnet synchronous motor (AFPMSM).

In order to distinguish the two stators of the AFPMSM, they are respectively defined as the stator 1 and the stator 2. The simplified PMSMs are the motor 1 and the motor 2. For the motor 1 and the motor 2, a d-q axis rotating coordinate system is established, which is d1-q1 and d2-q2, and the coordinate system rotation speeds are ω<sup>1</sup> and ω2, and the rotation directions are the same. Since the double disc AFPMSM shares one rotor and is coaxially connected, two mathematical models of the d-q axis rotating coordinate system can be established at the same time. The mathematical model of the AFPMSM is as follows.

Voltage equation:

$$\begin{cases} \begin{aligned} \boldsymbol{u}\_{d1} &= R\_{s1}\dot{\boldsymbol{i}}\_{d1} + L\_{d1}\frac{d\dot{\boldsymbol{i}}\_{d1}}{dt} - \omega\_{1}L\_{q1}\dot{\boldsymbol{i}}\_{q1} \\ \boldsymbol{u}\_{q1} &= R\_{s1}\dot{\boldsymbol{i}}\_{q1} + L\_{q1}\frac{d\dot{\boldsymbol{i}}\_{q1}}{dt} + \omega\_{1}L\_{d1}\dot{\boldsymbol{i}}\_{d1} + \omega\_{1}\boldsymbol{\psi}\_{f} \\ \boldsymbol{u}\_{d2} &= R\_{s2}\dot{\boldsymbol{i}}\_{d2} + L\_{d2}\frac{d\dot{\boldsymbol{i}}\_{d2}}{dt} - \omega\_{2}L\_{q2}\dot{\boldsymbol{i}}\_{q2} \\ \boldsymbol{u}\_{q2} &= R\_{s2}\dot{\boldsymbol{i}}\_{q2} + L\_{q2}\frac{d\dot{\boldsymbol{i}}\_{q2}}{dt} + \omega\_{2}L\_{d2}\dot{\boldsymbol{i}}\_{d2} + \omega\_{2}\boldsymbol{\psi}\_{f} \end{aligned} \end{cases} \tag{1}$$

Magnetic chain equation:

$$\begin{cases} \psi\_{d1} = L\_{d1}\dot{i}\_{d1} + \psi\_f\\ \psi\_{q1} = L\_{q1}\dot{i}\_{q1} \\ \psi\_{d2} = L\_{d2}\dot{i}\_{d2} + \psi\_f \\ \psi\_{q2} = L\_{q2}\dot{i}\_{q2} \end{cases} \tag{2}$$

Torque equation:

$$\begin{cases} \begin{array}{c} T\_{\epsilon1} = \frac{3}{2} p [\psi\_f i\_{q1} + (L\_{d1} - L\_{q1}) i\_{d1} i\_{q1}] \\\ T\_{\epsilon2} = \frac{3}{2} p [\psi\_f i\_{q2} + (L\_{d2} - L\_{q2}) i\_{d2} i\_{q2}] \end{array} \text{/} \end{cases} \tag{3}$$

Equation of motion:

$$\begin{cases} T\_{c1} - T\_{L1} - B\omega\_1 = \frac{I}{p} \frac{d\omega\_1}{dt} \\\ T\_{c2} - T\_{L2} - B\omega\_2 = \frac{I}{p} \frac{d\omega\_2}{dt} \end{cases} \tag{4}$$

In Equations (1)–(4), *Rs*<sup>1</sup> and *Rs*<sup>2</sup> are two stator resistances respectively, and *ud*1, *uq*1, *ud*2, and *uq*<sup>2</sup> are d-q axis components of the winding voltage vectors of the stator 1 and the stator 2, *id*1, *iq*1, and *id*2. *iq*<sup>2</sup> is the d-q axis component of the winding current vectors of the stator 1 and stator 2, *Ld*1, *Lq*1, *Ld*2, *Lq*<sup>2</sup> are the d-q axis components of the winding inductances of the stator 1 and stator 2, ψ*d*1, ψ*q*1, ψ*d*2, ψ*q*<sup>2</sup> are the d-q axis components of the winding flux of stator 1 and stator 2, *Te*<sup>1</sup> and *Te*<sup>2</sup> are the electromagnetic torques of the stator 1 and the stator 2, *TL*<sup>1</sup> and *TL*<sup>2</sup> are the load torques of the stator 1 and the stator 2, *J* is the moment of inertia, *B* is the viscosity coefficient, and *TL* is the load torque.

Since the two stators share one rotor, it can be approximated that the two motor modules are coaxially connected, so ω*r*<sup>1</sup> = ω*r*<sup>2</sup> = ω*<sup>r</sup>* can be obtained. According to the conclusion of coaxial connection, two equivalent motors can now be analyzed under the same d-q reference coordinate system. The two stators are structurally identical and symmetrical, therefore the stator resistances *RS*<sup>1</sup> and *RS*<sup>2</sup> are equal. According to the uniform air gap of the motor, it can be obtained that the direct-axis inductance and the cross-axis inductance of the two motors are equal. This article uses a hidden-pole motor, so it is also concluded that the inductance of the AC and DC axes is equal. At this time, the electromagnetic torque equation can be rewritten as:

$$T\_{\varepsilon} = T\_{\varepsilon 1} + T\_{\varepsilon 2} = \frac{3}{2} p \psi\_f (i\_{q1} + i\_{q2}) \tag{5}$$

The equation of motion is:

$$T\_{\mathbf{f}} - T\_{\mathbf{L}} - B\omega\_{\mathbf{f}} = \frac{I}{p} \frac{d\omega\_{\mathbf{r}}}{dt},\tag{6}$$

### **3. Torque Optimal Distribution Method**

#### *3.1. Dual Stator AFPMSM Drive System Topolgy*

The traditional electric medium bus has only one motor drive system, and the vehicle manager only corresponds to one motor controller [23], and the two are connected by controller area network (CAN) communication. Unlike conventional two-motor electric vehicle drive systems, the dual-station AFPMSM needs to control two sets of stator windings. Although they are driven by separate inverters, the same motor controller can be used, so that the vehicle manager and the motor controller can be directly connected via controller area network (CAN) communication. In order to study the torque distribution method more conveniently, a torque distributor is added between the vehicle manager and the motor controller, and the torque is distributed to the motor through the torque distributor. The topology of the double-disc AFPMSM drive system is shown in Figure 2.

**Figure 2.** Topology of double-disc AFPMSM drive system for electric medium bus.

The general electric vehicle drive system only has a given torque *T*m. The driving motor in this paper can be regarded as two motors after equivalent. Therefore, *T*<sup>m</sup> needs to be allocated. The common method is to evenly distribute torque. In order to save battery power, an optimal torque distribution strategy based on particle swarm optimization is proposed, so that the system can operate in a high efficiency range. The system control block diagram is shown in Figure 3. According to the optimal torque distribution method, the distributed torques of the two motors are obtained, and then the motor control is performed.

**Figure 3.** Control block diagram of double-disc AFPMSM drive system for electric medium bus.

#### *3.2. Optimal Torque Distribution Control Method Based on Particle Swarm Optimization in Driving State*

The torque optimal distribution strategy based on particle swarm optimization (PSO) is modeled as follows. Taking the double-disc AFPMSM for electric medium bus studied in this paper as an example, the total output torque is *T*, and the range is [0, 500 Nm]. The output torques of the two motor modules are *T*<sup>1</sup> and *T*2, respectively, and the range is [0, 250 Nm], then:

$$T = T\_1 + T\_{2\prime} \tag{7}$$

Assuming that the mechanical angular velocity of the motor is ω, the output power of the two sets of motor modules is *T*1ω and *T*2ω, the input power is *P*<sup>1</sup> and *P*2, and the operating efficiency is η<sup>1</sup> and η2. Let *T*<sup>1</sup> = *a*1*T*, *T*<sup>2</sup> = *a*2*T* where *a*<sup>1</sup> + *a*<sup>2</sup> = 1, *a*1, *a*<sup>2</sup> ∈ [0, 1]. Then the input power of the two motor is:

$$P\_1 = \frac{T\_1 \omega}{\eta\_1} = \frac{a\_1}{\eta\_1} T\_1 \omega\_\prime \tag{8}$$

$$P\_2 = \frac{T\_2 \omega}{\eta\_2} = \frac{a\_2}{\eta\_2} T\_2 \omega\_\prime \tag{9}$$

The total output power of the Motor Module is:

$$P\_o = T\_1 \omega + T\_2 \omega = T \omega,\tag{10}$$

The total input power is:

$$P\_1 = P\_1 + P\_2 = (\frac{a\_1}{\eta\_1} + \frac{a\_2}{\eta\_2})T\omega\_\prime \tag{11}$$

The total efficiency of the motor module is:

$$\eta = \frac{P\_o}{P\_i} = \frac{T\omega}{(\frac{a\_1}{\eta\_1} + \frac{a\_2}{\eta\_2})T\omega} = \frac{1}{\frac{a\_1}{\eta\_1} + \frac{a\_2}{\eta\_2}},\tag{12}$$

Assume:

$$f(a\_1) = \frac{a\_1}{\eta\_1}, f(a\_2) = \frac{a\_2}{\eta\_2},\tag{13}$$

It can be known from Equation (10) that the output power is constant during the operation of the electric medium bus and it is only necessary to reduce the total input power to improve the system efficiency. If the maximum value of η is required, that is, the minimum value of *f*(*a*1) + *f*(*a*2) is obtained. Let

$$A = f(a\_1) + f(a\_2),\tag{14}$$

Then the problem translates into how the two sets of motor modules are assigned torque ratios for a given torque so that the value of A is minimized.

For Equation (14), when one of the torque distribution ratios *a*<sup>1</sup> or *a*<sup>2</sup> is determined, the value of *A* can be determined. However, the speed and torque at a certain moment are not involved in the Equation (14). In the optimization using the particle swarm optimization algorithm, the optimal distribution must be obtained based on the total given torque and speed. Therefore, the three-dimensional model of *f*(*a*1), the total torque command *T,* and the current rotational speed *n* can be obtained by data fitting. Since the two sets of motor modules are identical, the efficiency values are the same under different speeds and torques, so only the total torque command *T* is required to be the *x*-axis, and the rotational speed *n* is the *y*-axis. The value of *f*(*a*1) is calculated as the *z*-axis for all torque distribution ratios and corresponding efficiencies at different speeds and torques. The three-dimensional model is shown in Figure 4.When the torque distribution system inputs the torque and the rotational speed at any time, any value of *f*(*a*1) will have a certain value of *f*(*a*2) corresponding to it on the *z*-axis, so that the value of *A* under all torque distribution ratios can be calculated. The optimization of the PSO algorithm is to find the smallest one of all fitness functions in the three-dimensional stereogram model, and output the corresponding ratio of *a*<sup>1</sup> and *a*<sup>2</sup> to achieve the optimal torque distribution.

**Figure 4.** Fitting 3D model under driving state.

Through the analysis above, *A* = *f*(*a*1) + *f*(*a*2) can be used as fitness function, so the fitness function is designed as follows:

$$\text{min}A = f(a\_1) + f(a\_2),\tag{15}$$

In a search space of a D-dimensional parameter, the population size of the particles is *Size*. Each particle represents a candidate solution to the solution space, where the position of the *i-th* (1 ≤ *i* ≤ *Size*) particle in the entire solution space is represented as *X*<sup>i</sup> and the velocity is represented as *V*i. The optimal solution generated by the *i-th* particle from the initial to the current iteration number search is the individual extremum *pi*, and the current optimal solution of the entire population is *BestS*. *Size* particles are randomly generated, and the position matrix and velocity matrix of the initial population are randomly generated. The learning factors are set as *c*<sup>1</sup> and *c*2, the maximum evolution algebra is *G*, and *g* is the current evolutionary algebra. The equation for the velocity and position of a particle in the solution space is as follows:

$$V\_{i}^{kg+1} = w(t) \times V\_{i}^{g} + c\_{1}r\_{1}(p\_{i}^{g} - X\_{i}^{g}) + c\_{2}r\_{2}(BestS\_{i}^{g} - X\_{i}^{g}),\tag{16}$$

$$X\_{i}^{\mathcal{g}+1} = X\_{i}^{\mathcal{g}} + V\_{i}^{\mathcal{g}+1} \, \text{\,} \tag{17}$$

Among them, *g* = 1,2, ... ,*G*, *I* = 1,2, ... ,Size, *r*<sup>1</sup> and *r*<sup>2</sup> are random numbers from 0 to 1; *c*<sup>1</sup> is a local learning factor, and *c*<sup>2</sup> is a global learning factor, generally *c*<sup>2</sup> is larger and *w*(*t*) is the inertia weight. The particle swarm optimization algorithm has the advantages of strong local search ability, fast calculation speed, and few parameters. However, during the running process, the particle swarm has strong convergence in the local, and it is easy to ignore all and fall into the local optimal solution [24]. In view of the shortcomings of the particle swarm algorithm, the inertia weight *w*(*t*) is added to the velocity term, which represents the ability of the particle to update the velocity, which has a great influence on the convergence and accuracy of the whole algorithm. A larger *w*(*t*) can improve the global search ability of the algorithm, while a smaller *w*(*t*) can improve the local search ability of the algorithm, so the value of *w*(*t*) should be decremented during the iterative process, which allows the particle to strike a balance between its search ability and convergence speed. The value of *w*(*t*) is determined according to Equation (18).

$$w(t) = w(t)\_{\text{max}} - \frac{w\_{\text{max}} - w\_{\text{min}}}{k\_{\text{max}}} \times k\_{\text{\textdegree}} \tag{18}$$

In the equation, *wmax* represents the initial weight, *wmin* represents the final weight, *k* represents the current iteration number of particles, and *kmax* represents the maximum iteration number of particles. The particle swarm optimization is easy to converge too early and fall into local optimum, which makes it impossible to obtain global optimum solution. Combining with the requirements of speed control for electric vehicles, this paper improves the particle swarm optimization algorithm. The inertia weight is determined by the exponential decrement method, as defined by Equation (19).

$$w = w\_{\text{max}} (\frac{w\_{\text{min}}}{w\_{\text{max}}})^{1/(1 + 10k/k\_{\text{max}})} \tag{19}$$

In the initial stage, *w* is larger, and has a strong ability to search in a wide range. In the later stage, *w* is smaller and has a strong ability to search in a small range, thereby improving the performance of the particle swarm algorithm as a whole. At the same time, in order to avoid premature convergence of the algorithm, the learning factor is dynamically adjusted, as shown in Equation (20):

$$\begin{cases} c\_1 = 2 - \sin\frac{k\pi}{k\_{\text{max}}}\\ c\_2 = 1 + \sin\frac{k\pi}{k\_{\text{max}}} \end{cases} \tag{20}$$

In the early stage of population search, *c*<sup>1</sup> is larger and *c*<sup>2</sup> is smaller, which facilitates the particle to learn its own optimal solution and improves the global search ability. In the later stage of population search, *c*<sup>2</sup> is larger and *c*<sup>1</sup> is smaller, which facilitates the population to move closer to the global optimal solution and enhances the local optimization performance.

#### *3.3. Energy Feedback Brake Control Based on Optimal Torque Distribution Method*

For electric medium bus, in order to further improve the cruising range, the energy feedback brake will be added to the vehicle. It not only saves energy, but also solves the problem that the electric medium bus has a short driving range of one charge, and can also improve the braking performance of the car and reduce the friction loss of the brake pad when the car brakes.

In this paper, the energy feedback brake control is carried out under the condition that the battery is safely charged, the rotation speed is not too low, and the power generation power is in the safe interval. Since the motor provides braking torque in the energy feedback state, the torque optimal control problem of the two sets of motor modules is involved. It is known in the foregoing studies that

reasonable torque distribution can improve system efficiency. This conclusion is also applicable in the case of energy feedback. Therefore, in order to further improve the endurance of electric mid-size passenger cars, the optimal torque distribution strategy based on particle swarm optimization is also applied to improve the power generation efficiency of the motor. The basic block diagram of the system incorporating energy feedback is shown in Figure 5. The three-dimensional perspective of the braking mode obtained by the particle swarm optimization algorithm is shown in Figure 6.

**Figure 5.** Basic block diagram of the energy feedback system.

**Figure 6.** Fitting 3D model in energy feedback state.
