Research on Starting Control Method of New-Energy Vehicle Based on State Machine

: In order to improve the starting smoothness of new-energy vehicles under multiple working conditions and meet the driving intention better, and to make the control strategy have high portability and integration, a starting control method for vehicle based on state machine is designed. Based on inclination, starting of vehicle is divided into three working conditions: ﬂat road, slight slope and steep slope. The method of vehicle starting control is designed, which includes ﬁve control states: default state control, torque pre-loading control, anti-rollback control, pedal control and PI (Proportion-Intergral) creep control. The simulation is carried out under the conditions of ﬂat road, slight slope and steep slope. In terms of ﬂat road and light slope, the vehicle travels below 3 km / h according to the driver’s intention, the speed is stable at 8 km / h during the creeping control phase and the jerk is lower than 5 m / s 3 . In terms of steep slope, the speed is controlled at 0 km / h basically and the 10 s-rollback distance is less than 0.04 m. The results show that the strategy can fully meet the driver’s intention with lower jerk, better dynamic and stability, and the method can achieve the demand of new-energy vehicle starting control.


Introduction
With environmental protection and energy issues becoming increasingly serious, the new-energy vehicle attracts more and more attention because of its low emission and high efficiency. Starting control is one of the key technologies of the new-energy vehicle. Research of starting control is of great significance to the development and industrialization of new-energy vehicles.
Starting control is divided into two stages: slope holding and launching. In traditional vehicles, Electrical Park Brake (EPB) and clutch are usually used to control the starting process, which will cause complex torque transfer process [1][2][3]. To avoid this problem, starting control only by motor is widely used in hybrid electric vehicles, which brings great challenge in designing complicated motor control strategies. In recent years, many scholars have studied it. Ref. [4] proposed a starting control method that coordinates drive-motor and brake, which achieved better slope holding control. Ref. [5] designed a ramp static holding system based on drive-motor control, which has low cost and wide applicability. However, the authors did not fully consider the driver's intention, which is usually applied to design the strategies braking energy recovery [6,7]. Ref. [8] and [9] used PI (Proportion-Intergral) algorithm to achieve the longitudinal speed control without pedal action. Ref. [10] developed a ramp starting strategy based on vehicle speed and brake pedal aperture. Ref. [11] studied the coordinated starting control strategy of motor and brake with consideration of the relationship between slope and driving Figure 1 shows the architecture of powertrain controller for new energy vehicles, including battery management system (BMS), motor controller unit (MCU) and vehicle control unit (VCU). VCU can be divided into application software and basic software. The application software is composed of multiple control modules, including signal input, human machine interface, fault diagnosis, torque arbitration, power management, thermal management, signal output, etc., and formulate a reasonable control strategy to make the modules work together to meet the requirements of the vehicle's dynamic performance and comfort.
Energies 2020, 13, x FOR PEER REVIEW 2 of 16 between slope and driving force. Current studies focus on single stage and frequently used the logic threshold control method, which makes the control program more disperse and fussy. State machine [12] is a tool for object behavior modeling, which is represented by state transition digraph and is used in software engineering and system design fields widely [13]. Further, it has strong accuracy, responsiveness and visibility. Ref. [14] applied state machine to identify ransomware and it can accurately detect attacks from different ransomware variants with significantly few false predictions. Ref. [15] applied state machine to cloud computing and greatly hides the actual complex implementation within cloud orchestration and provider tools. Ref. [16] utilized the state machine to integrate the transition function and dispatch function together and improved the system transient performance under various operations. Compared with the control method based on logic threshold, it has the characteristics of greatly simplifying model complexity, clear logic and strong system integrity [17]. For the method in this paper, the low-speed driving scenes of the vehicle are integrated together. Meanwhile, with the continuous improvement of automatic code generation technology and computer hardware technology, the application of state machine in practical engineering has become more advantageous.
The analysis of driver's intention, safety control of driving torque and logical judgment are critical in starting control [18], which is often tested, revised and optimized in the development process and upgrading process of new-energy vehicles. Therefore, this paper proposes a starting control method based on state machine control, which fully considers driver's intention, comfort and safety, and satisfies the requirements of smooth start on flat road and slight slope, and stable holding on steep slope. The method is only applicable to pure electric vehicles and partial hybrid electric vehicles which start by motor. Figure 1 shows the architecture of powertrain controller for new energy vehicles, including battery management system (BMS), motor controller unit (MCU) and vehicle control unit (VCU). VCU can be divided into application software and basic software. The application software is composed of multiple control modules, including signal input, human machine interface, fault diagnosis, torque arbitration, power management, thermal management, signal output, etc., and formulate a reasonable control strategy to make the modules work together to meet the requirements of the vehicle's dynamic performance and comfort.   Figure 2 shows the force diagram of vehicle climbing. F d is the longitudinal traction force provided by the motor, F b is the braking force, F s is the climbing resistance, F f is the acceleration resistance, F n is the ground support force, G is the gravity and θ is the inclination.  Figure 2 shows the force diagram of vehicle climbing. Fd is the longitudinal traction force provided by the motor, Fb is the braking force, Fs is the climbing resistance, Ff is the acceleration resistance, Fn is the ground support force, G is the gravity and θ is the inclination. According to the related knowledge of automobile theory [18], the following force equation is obtained:

Controller Architecture
where: Ft is the longitudinal driving force of the vehicle.
The relationship between climbing resistance and inclination is as follows: where: m is the mass of the vehicle, g is the acceleration of gravity.
The acceleration resistance is mainly related to the wind speed, which can be ignored in starting stage and satisfies the following formula: where: CD is the air resistance coefficient, A is the windward area, v is the longitudinal driving speed of the vehicle.
The braking force equation will be given in the wheel model construction.

Wheel Modeling
The research scope is the starting stage of the vehicle, so the lateral slip of the vehicle is not considered. The wheel modeling adopts the mathematical model of longitudinal brake cylinder pressure control. The wheel output torque is determined by the longitudinal traction force, braking force and rolling resistance. According to the related knowledge of automobile theory [18], the following force equation is obtained: where: F t is the longitudinal driving force of the vehicle.
The relationship between climbing resistance and inclination is as follows: where: m is the mass of the vehicle, g is the acceleration of gravity.
The acceleration resistance is mainly related to the wind speed, which can be ignored in starting stage and satisfies the following formula: where: C D is the air resistance coefficient, A is the windward area, v is the longitudinal driving speed of the vehicle.
The braking force equation will be given in the wheel model construction.

Wheel Modeling
The research scope is the starting stage of the vehicle, so the lateral slip of the vehicle is not considered. The wheel modeling adopts the mathematical model of longitudinal brake cylinder Energies 2020, 13, 6249 4 of 16 pressure control. The wheel output torque is determined by the longitudinal traction force, braking force and rolling resistance. where: T t is the torque by wheel, T d is the longitudinal traction torque by the motor, T b is the braking torque, T r is the rolling resistance moment term.
The longitudinal traction torque T d is directly related to the motor performance, and the motor parameters are shown in Table 1. This paper selects hydraulic disc brake. According to the actual motion state, the braking force is divided into static friction braking force and dynamic friction braking force, and the speed N is used to distinguish it. where: P is the brake cylinder pressure, N is the wheel speed, N pads is the number of brake pads, µ static is the static friction coefficient, µ is the dynamic friction coefficient, B a is the diameter of the brake cylinder, R m is the average radius of the brake pad.
The average radius of brake pads is calculated by Formula (6): where: R o is the radius of the outer circle of the brake pad, R i is the radius of the inner circle of the brake pad.
The rolling resistance term T r is mainly composed of slip resistance and rolling resistance. The rolling resistance has a time constant parameterized in terms of a relaxation length.

of 16
where: ω is the angular velocity of the wheel, R e is the effective tire radius under load and given pressure, L e is the relaxation length of the tire, F x is the longitudinal force due to slippage.
The rolling resistance moment M y is determined by the following formula: where: F z is the normal force acting on the wheel,

Inclination Calculation Method
In order to accurately divide the boundaries of flat road, slight slope and steep slope, AVL Cruise is used to simulate and verify the climbing performance of the vehicle. Considering the influence of vehicle parameters, adhesion and wind resistance on climbing performance, the theoretical maximum inclination is calculated. The vehicle and key component parameters are shown in Table 1.
According to the relevant knowledge of automobile theory [19], on the premise of satisfying the power and safety performance, this paper defines the maximum inclination as the corresponding inclination when the vehicle can drive at 1 km/h. The inclination corresponding to driving steadily at a speed of 50 km/h is defined as the critical inclination.
The climbing performance of the vehicle is shown in Figure 3. The maximum inclination of the vehicle is 41.95% and the critical inclination is 36.89%. In this paper, inclination of 0% is defined as a flat road, inclination between zero and critical inclination is defined as a slight inclination, and inclination between critical inclination and maximum inclination is defined as a steep inclination. where: ω is the angular velocity of the wheel, Re is the effective tire radius under load and given pressure, Le is the relaxation length of the tire, Fx is the longitudinal force due to slippage.
The rolling resistance moment My is determined by the following formula: where: Fz is the normal force acting on the wheel, pi is the tire pressure,

Inclination Calculation Method
In order to accurately divide the boundaries of flat road, slight slope and steep slope, AVL Cruise is used to simulate and verify the climbing performance of the vehicle. Considering the influence of vehicle parameters, adhesion and wind resistance on climbing performance, the theoretical maximum inclination is calculated. The vehicle and key component parameters are shown in Table 1.
According to the relevant knowledge of automobile theory [19], on the premise of satisfying the power and safety performance, this paper defines the maximum inclination as the corresponding inclination when the vehicle can drive at 1 km/h. The inclination corresponding to driving steadily at a speed of 50 km/h is defined as the critical inclination.
The climbing performance of the vehicle is shown in Figure 3. The maximum inclination of the vehicle is 41.95% and the critical inclination is 36.89%. In this paper, inclination of 0% is defined as a flat road, inclination between zero and critical inclination is defined as a slight inclination, and inclination between critical inclination and maximum inclination is defined as a steep inclination.

Framework and State Machine
The starting control strategy studied in this paper is integrated into torque arbitration calculation control strategy, which is integrated with accelerator pedal control strategy, brake pedal control strategy Energies 2020, 13, 6249 6 of 16 and cruise control strategy. By judging the mode, the corresponding output torque is selected as the wheel torque requirement. This paper only gives the map of maximum traction torque and braking recovery torque based on vehicle speed, as shown in Figure 4. The control strategy of acceleration, braking and cruise are not introduced in detail.
Energies 2020, 13, x FOR PEER REVIEW 6 of 16 The starting control strategy studied in this paper is integrated into torque arbitration calculation control strategy, which is integrated with accelerator pedal control strategy, brake pedal control strategy and cruise control strategy. By judging the mode, the corresponding output torque is selected as the wheel torque requirement. This paper only gives the map of maximum traction torque and braking recovery torque based on vehicle speed, as shown in Figure 4. The control strategy of acceleration, braking and cruise are not introduced in detail. When the vehicle is on a slope, launching or creep, the vehicle enters the starting control mode, and the driver may act on the brake pedal or accelerator pedal at this time. The starting control strategy consists of three parts: enabling condition, state machine and torque calculation, as shown in Figure 5. Based on the state machine, each control state can be switched, as shown in Figure 6. In this paper, the starting control is divided into five control states: default state control, torque preload control, anti-rollback control, pedal control and PI creep control. When the vehicle is on a slope, launching or creep, the vehicle enters the starting control mode, and the driver may act on the brake pedal or accelerator pedal at this time. The starting control strategy consists of three parts: enabling condition, state machine and torque calculation, as shown in Figure 5.
Energies 2020, 13, x FOR PEER REVIEW 6 of 16 The starting control strategy studied in this paper is integrated into torque arbitration calculation control strategy, which is integrated with accelerator pedal control strategy, brake pedal control strategy and cruise control strategy. By judging the mode, the corresponding output torque is selected as the wheel torque requirement. This paper only gives the map of maximum traction torque and braking recovery torque based on vehicle speed, as shown in Figure 4. The control strategy of acceleration, braking and cruise are not introduced in detail. When the vehicle is on a slope, launching or creep, the vehicle enters the starting control mode, and the driver may act on the brake pedal or accelerator pedal at this time. The starting control strategy consists of three parts: enabling condition, state machine and torque calculation, as shown in Figure 5. Based on the state machine, each control state can be switched, as shown in Figure 6. In this paper, the starting control is divided into five control states: default state control, torque preload control, anti-rollback control, pedal control and PI creep control. Based on the state machine, each control state can be switched, as shown in Figure 6. In this paper, the starting control is divided into five control states: default state control, torque preload control, anti-rollback control, pedal control and PI creep control.

Activation and Exit for Starting Control:
If the vehicle is in gear D or R and the speed is at or under 8 km/h without accelerator pedal action, the vehicle enters the starting control phase and the starting control is activated to the default mode. If the gear is shifted to a non-D/R gear during the starting control phase, the starting control mode will be exited; if the accelerator pedal is pressed, the starting control mode will be exited only when the accelerator pedal torque request is greater than the starting torque request; and if the vehicle speed is over 10 km/h, it also will be exited.

Convert from Default to Preload:
If it is currently in the default mode, it will convert to preload mode when the following conditions are met: (a) shifting gear to D/R; (b) brake pedal aperture greater than 95%; (c) no accelerator pedal action; (d) the vehicle speed is lower than 0.2 km/h; (e) the motor speed is lower than 20 rpm.

Convert from Preload to Default:
If it is currently in the preload mode, it will convert to default mode when the following condition are met: (a) the last sampling time motor torque is not 0; (b) the current sampling time motor torque is 0.

Convert from Default to Anti-Rollback:
If it is currently in the default mode, it will convert to anti-rollback mode when the following conditions are met: (a) gear position is in D/R; (b) brake pedal aperture greater than 70%; (c) no accelerator pedal action; (d) the grade is greater than 0 degree or the motor speed is lower than 0 rpm.

Convert from Anti-Rollback to Default:
If it is currently in the anti-rollback mode, it will convert to default mode when the following condition is met: the brake pedal aperture is greater than 95%.

Convert from Anti-Rollback or Default to Pedal Control:
If it is currently in the anti-rollback mode or default mode, it will convert to pedal control mode when the following condition are met: (a) gear position is in D/R; (b) the brake pedal aperture is lower than 70%; (c) no accelerator pedal action; (d) the vehicle speed is lower than 3 km/h.

Activation and Exit for Starting Control:
If the vehicle is in gear D or R and the speed is at or under 8 km/h without accelerator pedal action, the vehicle enters the starting control phase and the starting control is activated to the default mode. If the gear is shifted to a non-D/R gear during the starting control phase, the starting control mode will be exited; if the accelerator pedal is pressed, the starting control mode will be exited only when the accelerator pedal torque request is greater than the starting torque request; and if the vehicle speed is over 10 km/h, it also will be exited.

Convert from Default to Preload:
If it is currently in the default mode, it will convert to preload mode when the following conditions are met: (a) shifting gear to D/R; (b) brake pedal aperture greater than 95%; (c) no accelerator pedal action; (d) the vehicle speed is lower than 0.2 km/h; (e) the motor speed is lower than 20 rpm.

Convert from Preload to Default:
If it is currently in the preload mode, it will convert to default mode when the following condition are met: (a) the last sampling time motor torque is not 0; (b) the current sampling time motor torque is 0.

Convert from Default to Anti-Rollback:
If it is currently in the default mode, it will convert to anti-rollback mode when the following conditions are met: (a) gear position is in D/R; (b) brake pedal aperture greater than 70%; (c) no accelerator pedal action; (d) the grade is greater than 0 degree or the motor speed is lower than 0 rpm.

Convert from Anti-Rollback to Default:
If it is currently in the anti-rollback mode, it will convert to default mode when the following condition is met: the brake pedal aperture is greater than 95%.

Convert from Anti-Rollback or Default to Pedal Control:
If it is currently in the anti-rollback mode or default mode, it will convert to pedal control mode when the following condition are met: (a) gear position is in D/R; (b) the brake pedal aperture is lower than 70%; (c) no accelerator pedal action; (d) the vehicle speed is lower than 3 km/h.

Convert from Pedal Control to Default:
Energies 2020, 13, 6249 If it is currently in the pedal control mode, it will convert to default mode when the following condition is met: the brake pedal aperture is greater than 70%.

Convert from Pedal Control or Default to PI Control:
If it is currently in the pedal control mode or default mode, it will convert to PI control mode when the following conditions are met: (a) gear position is in D/R; (b) the brake pedal aperture is zero; (c) the accelerator pedal aperture is zero; (d) the vehicle speed is lower than 9 km/h.

Convert from PI Control to Default:
If it is currently in the PI control mode, it will convert to default mode in any of the following conditions: (a) the brake pedal aperture is greater than 0%; (b) the vehicle speed is over 9 km/h.

Default:
The default torque is zero.

Preload State:
The preload torque of the drive motor is 0.5 N·m and returns to zero after 0.5 s. The control module is shown in Figure 7. If it is currently in the pedal control mode, it will convert to default mode when the following condition is met: the brake pedal aperture is greater than 70%.

Convert from Pedal Control or Default to PI Control:
If it is currently in the pedal control mode or default mode, it will convert to PI control mode when the following conditions are met: (a) gear position is in D/R; (b) the brake pedal aperture is zero; (c) the accelerator pedal aperture is zero; (d) the vehicle speed is lower than 9 km/h.

Convert from PI Control to Default:
If it is currently in the PI control mode, it will convert to default mode in any of the following conditions: (a) the brake pedal aperture is greater than 0%; (b) the vehicle speed is over 9 km/h.

Default:
The default torque is zero.

Preload State:
The preload torque of the drive motor is 0.5 N·m and returns to zero after 0.5 s. The control module is shown in Figure 7.

Anti-Rollback and Pedal Control:
The anti-rollback torque T1 is determined according to Formula (9). The anti-rollback module is shown in Figure 8, and the pedal control torque is determined by the aperture of the brake pedal and the actual speed. The output torque T2 is determined by Formula (10). The pedal control module is shown in Figure 9. where: β is the pedal aperture

Anti-Rollback and Pedal Control:
The anti-rollback torque T 1 is determined according to Formula (9). The anti-rollback module is shown in Figure 8, and the pedal control torque is determined by the aperture of the brake pedal and the actual speed. The output torque T 2 is determined by Formula (10). The pedal control module is shown in Figure 9. where: β is the pedal aperture  Further, the output torque T3 at 0 km/h speed and 70% brake pedal aperture is determined by the following Formula (11). The output torque T4 at 0 km/h speed and less than 70% brake pedal aperture is determined by the following Formula (12). Therefore, the starting control method is operated by the driver on the premise of preventing the vehicle from sliding down. where: σ is the starting coefficient, β1 is 70% pedal aperture, β2 is the current pedal aperture, Tmax is the maximum braking torque, T10 is the braking torque at 70% pedal aperture.
At this state, the vehicle can launch smoothly without rollback at the stage of the pedal control according to the calibration parameters.

PI Creep Control:
In PI control mode, the torque T5 is determined by Formula (13). where: va is the target speed, p is the proportional coefficient, I is the integral coefficient.  Further, the output torque T3 at 0 km/h speed and 70% brake pedal aperture is determined by the following Formula (11). The output torque T4 at 0 km/h speed and less than 70% brake pedal aperture is determined by the following Formula (12). Therefore, the starting control method is operated by the driver on the premise of preventing the vehicle from sliding down. where: σ is the starting coefficient, β1 is 70% pedal aperture, β2 is the current pedal aperture, Tmax is the maximum braking torque, T10 is the braking torque at 70% pedal aperture.
At this state, the vehicle can launch smoothly without rollback at the stage of the pedal control according to the calibration parameters.

PI Creep Control:
In PI control mode, the torque T5 is determined by Formula (13). where: va is the target speed, p is the proportional coefficient, I is the integral coefficient. Further, the output torque T 3 at 0 km/h speed and 70% brake pedal aperture is determined by the following Formula (11). The output torque T 4 at 0 km/h speed and less than 70% brake pedal aperture is determined by the following Formula (12). Therefore, the starting control method is operated by the driver on the premise of preventing the vehicle from sliding down. where: σ is the starting coefficient, β 1 is 70% pedal aperture, β 2 is the current pedal aperture, T max is the maximum braking torque, T 10 is the braking torque at 70% pedal aperture.
At this state, the vehicle can launch smoothly without rollback at the stage of the pedal control according to the calibration parameters.

PI Creep Control:
In PI control mode, the torque T 5 is determined by Formula (13). where: v a is the target speed, p is the proportional coefficient, I is the integral coefficient.
Besides this, as shown in Figure 10, the integral term has finite value according to the maximum torque. It is important to note that each time the creep phase is entered, the I-value will be reset to depress overshoot, and the integral term will be frozen when the slope is steep.
Energies 2020, 13, x FOR PEER REVIEW 10 of 16 Besides this, as shown in Figure 10, the integral term has finite value according to the maximum torque. It is important to note that each time the creep phase is entered, the I-value will be reset to depress overshoot, and the integral term will be frozen when the slope is steep. The proportional coefficient p can be determined by Formula (14) and the integral coefficient i can be determined by Formula (15): PI control meets the need for creeping on flat roads and slight slope, including the creep demand after coasting. When the slope is steep, the motor output torque T6 is determined by Formula (16): where: R is the wheel radius, η is the correction factor.
The p and i are important parameters that can affect the vehicle stability. As shown in Figure 11, the values are related to the speed and grade to meet the creeping in different conditions. Through continuous debugging, the p-value is a constant value of 300 in flat road, and as the grade increases, the overall trend increases. However, I-value is 1 at 0 km/h and decreases first and then increases with the increase of vehicle speed. That is, the p-value adjusts to adapt to changes in grade, and the I-value adjusts to adapt to changes in speed.  The proportional coefficient p can be determined by Formula (14) and the integral coefficient i can be determined by Formula (15):

Results
PI control meets the need for creeping on flat roads and slight slope, including the creep demand after coasting. When the slope is steep, the motor output torque T 6 is determined by Formula (16): where: R is the wheel radius, η is the correction factor.
The p and i are important parameters that can affect the vehicle stability. As shown in Figure 11, the values are related to the speed and grade to meet the creeping in different conditions. Through continuous debugging, the p-value is a constant value of 300 in flat road, and as the grade increases, the overall trend increases. However, I-value is 1 at 0 km/h and decreases first and then increases with the increase of vehicle speed. That is, the p-value adjusts to adapt to changes in grade, and the I-value adjusts to adapt to changes in speed. Besides this, as shown in Figure 10, the integral term has finite value according to the maximum torque. It is important to note that each time the creep phase is entered, the I-value will be reset to depress overshoot, and the integral term will be frozen when the slope is steep. The proportional coefficient p can be determined by Formula (14) and the integral coefficient i can be determined by Formula (15): PI control meets the need for creeping on flat roads and slight slope, including the creep demand after coasting. When the slope is steep, the motor output torque T6 is determined by Formula (16): where: R is the wheel radius, η is the correction factor.
The p and i are important parameters that can affect the vehicle stability. As shown in Figure 11, the values are related to the speed and grade to meet the creeping in different conditions. Through continuous debugging, the p-value is a constant value of 300 in flat road, and as the grade increases, the overall trend increases. However, I-value is 1 at 0 km/h and decreases first and then increases with the increase of vehicle speed. That is, the p-value adjusts to adapt to changes in grade, and the I-value adjusts to adapt to changes in speed.

Results
This paper carries out simulation experiments on starting control strategy on flat road, slight slope and steep slope conditions by constructing driver signal, establishing control strategy model and controlled object model and collecting observation signal. Figure 12 shows the control process under flat road conditions. Input signals from the driver include actions such as engaging D gear, raising the brake pedal steadily, releasing the brake pedal completely, etc. The driver's intention is shown in Figure 12a. There is continuous mode switching in the state machine during the control process, as shown in Figure 12b, where 0 is the default state control, 1 is the torque preload control, 2 is the anti-rollback control, 3 is the pedal control, 4 is the PI creep control and 5 is the non-starting control (other inclination conditions are consistent).

Flat Road
in the state machine during the control process, as shown in Figure 12b, where 0 is the default state control, 1 is the torque preload control, 2 is the anti-rollback control, 3 is the pedal control, 4 is the PI creep control and 5 is the non-starting control (other inclination conditions are consistent).
At the initial moment, the gear position is P, the brake pedal aperture is 100%, the accelerator pedal aperture is 0%, and the vehicle speed is 0 km/h. The state machine enters the torque preload mode and the motor outputs 0.5 N·m for 0.5 s when the gear swifts to D. At this time, the aperture of brake pedal is still 100%. As the brake pedal is released gradually, the motor output torque remains 0 N·m until the brake pedal aperture is less than 70%. The state machine enters the pedal control mode and the motor output torque changes continuously according to Formula (10) when the brake pedal aperture is less than 70%. Torque increased from 0 N·m to 107 N·m during 15.28 s to 16.65 s. Then, the vehicle speed increases gradually, but does not exceed 3 km/h. The state machine enters the PI control mode and the motor output torque changes continuously according to Formula (13) when the brake pedal is released completely. The results show that the creeping target speed is reached in about 3 s and the steady-state error is not more than 0.2 km/h. Further, the torque first increased from 28.57 N·m to 54.5 N·m and then decreased to 5.12 N·m during 21.27 s to 29.11 s. Pressing the accelerator pedal will exit the starting control mode only when the required torque of the accelerator pedal is greater than the starting torque. Lastly, as shown in the figure, the driver must fully release the accelerator pedal and press the brake pedal. The starting control mode will be reentered when the speed drops to 8 km/h. The state machine is kept in the pedal control mode to ensure that the vehicle is driven at a low speed between 0 to 3 km/h until the brake pedal is completely released. Then, the PI control mode is entered to reach a stable speed of 8 km/h quickly. Throughout the control process, the speed changes in accordance with the driver's intention, and it has low jerk.  Figure 13 shows the control process under slight slope conditions. Taking 9% inclination as an example, the driver has behaviors such as shifting gear to D, releasing the brake pedal steadily and pressing the accelerator pedal. The driver's intention is shown in Figure 13a, and the mode switching of the state machine is shown in Figure 13b.

Slight Slope
At the initial moment, the gear position is P, the brake pedal aperture is 100%, the accelerator pedal aperture is 0%, and the vehicle speed is 0 km/h. The motor outputs 0.5 N·m preloading torque for 0.5 s when the gear swifts to D. Upon release of the brake pedal, the state machine enters the antirollback mode when it detects the road slope. The anti-rollback torque outputs according to the actual state of the vehicle; keep the motor output torque at 0 N·m if no rollback occurs. The state machine enters the pedal control mode and the motor outputs torque T3 when the brake pedal aperture is less than 70%. Then, the output torque is constantly changed according to Formula (12) so that it can achieve the effect of increasing the vehicle speed slowly. In this stage, the speed is still controlled At the initial moment, the gear position is P, the brake pedal aperture is 100%, the accelerator pedal aperture is 0%, and the vehicle speed is 0 km/h. The state machine enters the torque preload mode and the motor outputs 0.5 N·m for 0.5 s when the gear swifts to D. At this time, the aperture of brake pedal is still 100%. As the brake pedal is released gradually, the motor output torque remains 0 N·m until the brake pedal aperture is less than 70%. The state machine enters the pedal control mode and the motor output torque changes continuously according to Formula (10) when the brake pedal aperture is less than 70%. Torque increased from 0 N·m to 107 N·m during 15.28 s to 16.65 s. Then, the vehicle speed increases gradually, but does not exceed 3 km/h. The state machine enters the PI control mode and the motor output torque changes continuously according to Formula (13) when the brake pedal is released completely. The results show that the creeping target speed is reached in about 3 s and the steady-state error is not more than 0.2 km/h. Further, the torque first increased from 28.57 N·m to 54.5 N·m and then decreased to 5.12 N·m during 21.27 s to 29.11 s. Pressing the accelerator pedal will exit the starting control mode only when the required torque of the accelerator pedal is greater than the starting torque. Lastly, as shown in the figure, the driver must fully release the accelerator pedal and press the brake pedal. The starting control mode will be reentered when the speed drops to 8 km/h. The state machine is kept in the pedal control mode to ensure that the vehicle is driven at a low speed between 0 to 3 km/h until the brake pedal is completely released. Then, the PI control mode is entered to reach a stable speed of 8 km/h quickly. Throughout the control process, the speed changes in accordance with the driver's intention, and it has low jerk. Figure 13 shows the control process under slight slope conditions. Taking 9% inclination as an example, the driver has behaviors such as shifting gear to D, releasing the brake pedal steadily and pressing the accelerator pedal. The driver's intention is shown in Figure 13a, and the mode switching of the state machine is shown in Figure 13b.  Figure 13 shows the control process under slight slope conditions. Taking 9% inclination as an example, the driver has behaviors such as shifting gear to D, releasing the brake pedal steadily and pressing the accelerator pedal. The driver's intention is shown in Figure 13a, and the mode switching of the state machine is shown in Figure 13b.

Slight Slope
At the initial moment, the gear position is P, the brake pedal aperture is 100%, the accelerator pedal aperture is 0%, and the vehicle speed is 0 km/h. The motor outputs 0.5 N·m preloading torque for 0.5 s when the gear swifts to D. Upon release of the brake pedal, the state machine enters the antirollback mode when it detects the road slope. The anti-rollback torque outputs according to the actual state of the vehicle; keep the motor output torque at 0 N·m if no rollback occurs. The state machine enters the pedal control mode and the motor outputs torque T3 when the brake pedal aperture is less than 70%. Then, the output torque is constantly changed according to Formula (12) so that it can achieve the effect of increasing the vehicle speed slowly. In this stage, the speed is still controlled below 3 km/h. The torque is first increased from 0 N·m to 87.77 N·m and then decreased to 65.96 N·m during 15 s to 21.63 s. The state machine enters the PI control mode and the motor output torque changes continuously according to Formula (15) Figure 14 shows the control process under 32% conditions. Before the aperture of the brake pedal drops to 70%, a short rollback occurs in the 5th second, and the motor immediately outputs antirollback torque (1407 N·m) to keep the vehicle stationary until it enters the pedal control mode. Since the required torque of the accelerator pedal is always lower than the creep torque during 30 s to 37 s, the starting torque request is still selected as the actual output torque of the motor. At the initial moment, the gear position is P, the brake pedal aperture is 100%, the accelerator pedal aperture is 0%, and the vehicle speed is 0 km/h. The motor outputs 0.5 N·m preloading torque for 0.5 s when the gear swifts to D. Upon release of the brake pedal, the state machine enters the anti-rollback mode when it detects the road slope. The anti-rollback torque outputs according to the actual state of the vehicle; keep the motor output torque at 0 N·m if no rollback occurs. The state machine enters the pedal control mode and the motor outputs torque T 3 when the brake pedal aperture is less than 70%. Then, the output torque is constantly changed according to Formula (12) so that it can achieve the effect of increasing the vehicle speed slowly. In this stage, the speed is still controlled below 3 km/h. The torque is first increased from 0 N·m to 87.77 N·m and then decreased to 65.96 N·m during 15 s to 21.63 s. The state machine enters the PI control mode and the motor output torque changes continuously according to Formula (15) when the brake pedal is released completely. The results show that the vehicle can still reach the stable target speed in about 3 s. The torque first increased from 65.96 N·m to 106.84 N·m and then decreased to 49.67 N·m during 21.63 s to 30.41 s. Then, when pressing the accelerator pedal, it will exit the starting control mode only when the required torque of the accelerator pedal is greater than the starting torque. Release the accelerator pedal completely and it reenters the creep control mode when the vehicle speed drops to 8 km/h. On the premise of ensuring low jerk, it returns to creep speed from the minimum speed in about 10 s. Figure 14 shows the control process under 32% conditions. Before the aperture of the brake pedal drops to 70%, a short rollback occurs in the 5th second, and the motor immediately outputs anti-rollback torque (1407 N·m) to keep the vehicle stationary until it enters the pedal control mode. Since the required torque of the accelerator pedal is always lower than the creep torque during 30 s to 37 s, the starting torque request is still selected as the actual output torque of the motor.  Figure 14 shows the control process under 32% conditions. Before the aperture of the brake pedal drops to 70%, a short rollback occurs in the 5th second, and the motor immediately outputs antirollback torque (1407 N·m) to keep the vehicle stationary until it enters the pedal control mode. Since the required torque of the accelerator pedal is always lower than the creep torque during 30 s to 37 s, the starting torque request is still selected as the actual output torque of the motor.   Figure 15 shows the control process under steep slope conditions. In the process of starting on a steep slope (take 38% as an example), if the vehicle slides back too far, it is very likely to cause a traffic accident. Therefore, during the entire ramp starting process, the vehicle sliding distance should be less than a certain critical value, and the speed should be controlled within a certain small value until the driver's acceleration torque is greater than the parking torque.  Figure 15 shows the control process under steep slope conditions. In the process of starting on a steep slope (take 38% as an example), if the vehicle slides back too far, it is very likely to cause a traffic accident. Therefore, during the entire ramp starting process, the vehicle sliding distance should be less than a certain critical value, and the speed should be controlled within a certain small value until the driver's acceleration torque is greater than the parking torque. The results show that the vehicle speed is basically stable at 0 km/h, but the result of speed detection fluctuates slightly due to the redundancy error of the controlled object. Meanwhile, the jerk is calculated, and the result shows that there is no adverse influence on the driver's comfort.

Jerk
In order to evaluate the smoothness of starting, the jerk, which is the second-order derivative of vehicle longitudinal speed, is used as the evaluation index, as shown in Formula (17). where: J is the jerk. To improve starting comfort and avoid large jerk, driving torque should be outputted in accordance with the appropriate gradient. From the results, it can be seen that the jerk can be controlled within the recommended value of 10 m/s 3 [20] during the whole starting stage of flat road and slight slope including launching, creeping, holding, accelerating and coasting.
Among them, under the condition of flat road, the dynamic performance is mainly considered, so there is larger jerk but also can be controlled at about 8 m/s 3 . Under the condition of slope road, safety and comfort are the main factors, so the maximum jerk is basically controlled at about 5 m/s 3 .

Speed
The stability and response of vehicle speed not only affects driving comfort, but also the maneuverability [21]. If the same brake pedal aperture reflects different speeds under different road conditions, it is easy to cause adverse phenomena such as vehicle rollback. Therefore, the consistency between the brake pedal aperture and the speed response is very important.
According to the results, the speed can meet the driver's intentions and design requirements. During the creep control stage, the speed is stable at 8 km/h with an error of no more than 0.2 km/h. During the pedal control stage, the speed can change smoothly within the range of 0-3 km/h The results show that the vehicle speed is basically stable at 0 km/h, but the result of speed detection fluctuates slightly due to the redundancy error of the controlled object. Meanwhile, the jerk is calculated, and the result shows that there is no adverse influence on the driver's comfort.

Jerk
In order to evaluate the smoothness of starting, the jerk, which is the second-order derivative of vehicle longitudinal speed, is used as the evaluation index, as shown in Formula (17). where: J is the jerk.
To improve starting comfort and avoid large jerk, driving torque should be outputted in accordance with the appropriate gradient. From the results, it can be seen that the jerk can be controlled within the recommended value of 10 m/s 3 [20] during the whole starting stage of flat road and slight slope including launching, creeping, holding, accelerating and coasting.
Among them, under the condition of flat road, the dynamic performance is mainly considered, so there is larger jerk but also can be controlled at about 8 m/s 3 . Under the condition of slope road, safety and comfort are the main factors, so the maximum jerk is basically controlled at about 5 m/s 3 .

Speed
The stability and response of vehicle speed not only affects driving comfort, but also the maneuverability [21]. If the same brake pedal aperture reflects different speeds under different road conditions, it is easy to cause adverse phenomena such as vehicle rollback. Therefore, the consistency between the brake pedal aperture and the speed response is very important.
According to the results, the speed can meet the driver's intentions and design requirements. During the creep control stage, the speed is stable at 8 km/h with an error of no more than 0.2 km/h. During the pedal control stage, the speed can change smoothly within the range of 0-3 km/h according to the driver's intention. During the anti-rollback stage, the speed can be maintained within 0.02 km/h on steep slope.

Stabilization Time
In the flat road condition, under the premise of ensuring the jerk, the stable speed can be achieved quickly around 4 s because there is no ramp resistance. In order to meet the requirements of jerk when sliding on the slope to low speed and entering the creeping process, it takes a longer time to reach the stable speed of creep, and the target stable speed can be basically achieved in about 10 s.

Rollback Distance
In the process of starting on a slight slope, the distance of rollback is almost 0, which ensures the safety of vehicle starting. Rollback occurs in the process of holding on a steep slope, but the distance of rollback is short. Moreover, in practical engineering application, the motor should be prevented from plugging, so the motor should be kept at appropriate speed.

Engineering Value
The purpose and significance of engineering is to solve some practical problems in real life, so it is bound to be constrained. So, this method is only applicable to pure electric vehicles and partial hybrid electric vehicles which start by motor. However, electrification is the inevitable trend of automobile development, and there are many advantages by using state machine. This method can be applied to other types of vehicles with only minor modifications and the method based on state machine can make it easier to debug and upgrade if advanced function is developed. So, it greatly reduces the engineering development cycle and research cost, and it will have excellent performance if the engineering calibration is done. At the same time, it shows that map calibration is an effective method to solve complex engineering problems.

Conclusions
(1) A starting control method is designed based on state machine control, which is of clear logic, strong integration, strong portability and strong control stability. The control strategies of torque preloading, anti-rollback, pedal control and PI creep are studied. (2) The torque transition between each mode is smooth, and the jerk of the whole starting stage is less than 10 m/s 3 , which meets the requirements of comfort design. (3) Under various working conditions, the brake pedal aperture and speed have good matching performance. The time to reach the creeping speed meets the driver's expectation and the requirements of maneuverability design. Stable standing on a steep slope can be achieved to meet the design requirements of driving safety. (4) The method focuses on the torque management of vehicles, which is in low-speed including starting. It can be integrated in torque management calculation coordinated with high-speed torque management. This method can be applied in most new-energy vehicles with starting by motor. (5) In this paper, the design method is studied at the simulation level, and further verification will be considered combined with the actual vehicle test.