Sensorless Driving/Braking Control for Electric Vehicles

A sensorless driving/braking control system for electric vehicles is explained in the present paper. In the proposed system, a field-oriented control (FOC) was used to integrate driving and braking controls in a unified module for reducing the cost of hardware and simultaneously incorporating functional flexibility. An antilock braking system can swiftly halt a vehicle during emergency braking. An electromagnetic reverse braking scheme that provided retarding torque to a running wheel was developed. The scheme could switch the state of the MOSFETs used in the system by alternating the duty cycle of pulse width modulation to adjust the braking current generated by the back electromotive force (EMF) of the motor. In addition, because the braking energy required for the electromagnetic braking scheme is related only to the back EMF, the vehicle operator can control the braking force and safely stop an electric vehicle at high speeds. The proposed integrated sensorless driving and electromagnetic braking system was verified experimentally.


Introduction
In the early 1970s, nonlinear time-varying characteristics of alternating current (AC) motor drives were used for vector control. The electromagnetic torque generated by a motor is proportional to the driving current. Many researchers have studied sensorless control approaches as an alternative for mechanical sensors to reduce cost. Field-oriented control (FOC) is rapidly becoming popular in motor drives [1,2]. However, most of the current sensorless FOC techniques are limited to the individual motor driving or braking technology [1,[3][4][5]. Integrated driving and braking control design (i.e., driving and braking control units sharing the same hardware) has not been studied previously.
With the increasing use of green energy for ensuring environmental protection, electric vehicles (EVs) are one of the most promising technologies that can transform the transportation system. Typically, mechanical braking mechanisms are used in current EVs. Riding down steep hills on electric bikes with mechanical brakes is dangerous because the brakes are likely to fail due to overheating of the disc or drum brake. Braking under critical conditions, such as on wet or slippery road surfaces or in certain emergency situations caused by mistakes committed by the riders, can result in the driver losing control of the vehicle.
To resolve the aforementioned problems, an integrated driving and braking control design based on sensorless FOC technology and incorporating an antilock braking system (ABS) was proposed. The proposed system includes the following three aspects: (i) For motor driver design, the FOC algorithm was used on the AN1078 microchip, by Microchip Technology Co., Arizona [4], which can perform satisfactorily even when no position sensors are attached to the motor shaft. Low-inductance shunt resistors were used in three-phase inverters to measure the motor current.
(ii) Braking techniques-such as short-circuit [6], regenerative [7][8][9], kinetic [10], super-capacitor [11], and slip control-based braking [12]-regenerative braking are currently used. However, the braking effect decreases considerably when the battery is fully charged. In addition, the low conversion efficiency generally results in unsatisfactory braking performance. Therefore, an electromagnetic braking system was proposed in this research. Back electromotive force (back EMF) generated by the motor was used in the proposed braking system. The braking effect can be enhanced by intermittently reversing the direction of the magnetic field force from driving to braking using a permanent magnet synchronous motor (PMSM) stator coil. To achieve this enhanced braking, the relationship between the rotor angle and brake signal was determined according to a specific function. Combining this function with the aforementioned FOC-based driving mechanism, we can adjust the braking effect according to the parameters of a proportional integral controller. An ultracapacitor was added in the braking loop to boost instantaneous braking energy.
(iii) For effective ABS realization, we first estimated the slip ratio, because determining the precise speed of electric bikes during movement in sensorless motors is difficult. According to studies [13][14][15], the sliding mode and current controls can be used to maintain the slip ratio within the optimal range for ensuring adhesion to the road. Underwater robots have been used in applications such as ocean development, ocean investigations, military operations, and marine environment protection. High-performance autonomous underwater vehicles are required for various applications, such as military defense and marine protection, especially for propulsion and maneuverability.
It is noted that all variables appeared in the following development, unless specified otherwise, are all defined in the continuous-time domain of t.

Model
Neglecting the vortex and magnetic hysteresis losses, the mathematical model of PMSM is presented in the matrix form as

Principle of FOC
The methodology is briefly summarized [16,17]. A proportional integral (PI) controller is used to achieve the desired system response in a closed-control loop. The derivative gain is not used because of the slow response time due to changes in the motor speed.
Space vector pulse-width modulation (SVPWM) is a novel method to drive a permanent magnet synchronous motor [4,18], and it is used to supply the AC motor with the desired phase voltage. Figure 1 illustrates the typical three-phase power inverter, where A + , A − , B + , B − , C + , and C − denote semiconductor switches that can be either power MOSFETs or IGBTs. In space vector modulation (SVM), the voltage vector of motors is controlled to generate minimum harmonic distortion of the currents to ensure the torque ripple is small.
We define eight vectors, namely where 1 T , 2 T , and 0 T satisying . We can easily obtain the sampling periods of 1 V and 2 V as [21] The order of vector combination between two adjacent vectors with zero vectors depending on each sector is listed in Table 1.

Sensorless Driver Design
A crucial step in sensorless FOC-based driver design is to construct an estimator to obtain the rotor position. We adopt the current observer, back-EMF estimator, and speed calculator to constitute the system model as those proposed in [4]. Figure 2 illustrates the overall block diagram of the estimator. The where z T is the control period and i is the sampling cycle. Sliding mode control (SMC) [14,20,22] can be used to effectively control an uncertain nonlinear plant. Because an error exists between the real and estimated currents, here, the SMC was used to eliminate the error. The output of the SMC was used as a correction factor denoted by z.
In the motor model, the input voltage s V was assumed to be the actual motor input voltage.
The unknown variable is the back EMF. Thus, the difference z between the actual current s I and the estimated current * s I refers to the value of the back EMF. In Figure 2, where, in this research, Because of the filtering function applied during the calculation of angle θ , we performed phase compensation before using the calculated angle to energize the motor windings. The formula used for the calculation of the speed can be expressed as [4] ( ) ( ) ( ) where ω is angular velocity of the motor, speed K is the amplification factor for the desired speed range which, and m is required number of accumulated θ . To ensure the signal of the speed calculation is smooth, a first-order low-pass filter was applied for compensating the motor speed ω to obtain the filtered value in * ω . Here, the gain was tuned by verifying the measured ground truth of the motor rotating speed ω via a taco meter and the accumulated value of θ for the number of m. FOC is not effective when a motor stops rotation. Therefore, a minimum speed is commonly required to obtain the estimated back EMF for calculating the rotor angle. We allowed the motor to spin at a fixed angular acceleration rate in the open-loop control initially and then switched to closedloop control after the motor was stable. Only at this stage can the motor speed be controlled by changing d I and q I .

Integrated Driving/Braking Control
The novel integrated control system consists of three components, namely the current control circuit, speed control circuit, and SVPWM control loop.

Structure of the Driver
The architecture of the motor driver is briefly described. The braking system had the same framework but a different control logic. The driver was realized by a three-phase inverter with six power MOSFETs. Considering the necessity of the sensorless FOC algorithm, the driving part of the presented integrated system can be updated, as depicted in Figure 3, which depicts the circuit diagram of the driving mode. A switching device was used to switch between driving and braking.
Corresponding to the definition of SVM, six basic voltage vectors (not zeros) in the driving mode construct six current conduction loops with the direction of magnetic field force of the PMSM stator coils.

FOC-Based Braking Control Design
The three-phase back EMF of a PMSM denoted by A V , B V , and C V are defined as where A ′ , B ′ , and C′ denote amplitudes in the respective phases. Because 2 T π = and the time period, for example, 2 1 t t − , the integral phase-to-phase back-EMF difference used as the braking power is expressed as This is illustrated in Figure 4. In the braking system, the back EMF is used to generate braking torque by directing the braking current flow in the power MOSFETs in an efficient manner. To develop the maximal braking capability, the back EMF generated by the motor should be used in a short period of time. This is achieved by controlling the current I with the formula where F is the electromagnetic force and B is the magnetic field.
In the braking control unit, various pulse width modulation (PWM)-controlled duty cycles are used in the electromagnetic braking system to achieve flexible adjustment of the braking current. Combining the braking control unit with the slip ratio control, we can achieve anti-lock braking system (ABS) without using the hydraulic power required in traditional mechanical ABS. Figure 5 illustrates the equivalent circuit diagram of the braking mode. The virtual load in the braking circuit was an ultra-capacitor. The action time of the braking mode was extended by the capacitor because the capacitor discharged and instantaneous additional energy for braking assistance. This is closely related to the capacity of capacitor when the back EMF gradually decreases because of the decrease in the speed of the wheel. Therefore, six current conduction loops were constructed by six basic voltage vectors (not zeros). Only one of the six current conduction loops is depicted in Figure 6 to compare circuit diagram with that of the driving mode. In this case, the power metal-oxide-semiconductor field-effect transistors (MOSFETs) A + , B + , and C − were controlled during the 'ON' status. Table 2 lists the control logic of six basic voltage vectors defined by SVM between the driving and braking modes. The table indicates when the motor enters the braking mode, the order of the voltage vectors was reversed, resulting in a rheostatic braking effect to the running wheel.
Referring to the braking status in Table 2, Figure 7 illustrates the schematic of the change in the direction of the magnetic field force of the stator coil for six basic voltage vectors defined by SVM in the brake mode.
We define the function as , 1 ( , ) , 0 The proposed braking control system is activated on reaching the preset condition. The back EMF is stored in the ultracapacitor as additional energy for braking when the speed of the wheel is less.

Design of Anti-Lock Braking System
The ABS is used to keep the slip ratio within an ideal range for efficient braking by adjusting the duty cycle of PWM braking current. Although the accurate slip ratio is a key parameter in traditional ABSs of gas-powered vehicles, its use in electric bikes is not practical. A slip ratio estimator (SRE) that does not require vehicle speed measurement was introduced in the sensorless system. SMC was used for regulating the slip ratio to attain the optimal road adhesion and output to a PI current controller, the duty cycle of PWM was then determined according to the difference between the braking and reference currents. The overall braking control scheme is depicted in Figure 8. The lateral friction force is not considered in ABS design. The electric bike automatically attains stability when the slip ratio for the maximum longitudinal friction force is considered because of the lateral friction force of the bike. We assumed that braking occurs only when the electric bike moves straight, driving resistance is ignored, and transmission ratio of the system is fixed.
The dynamic equations for the PMSM and the motion model of the driving wheel can be expressed as where , , , , is the inertia of the motor, is the angular speed of the motor, is the motor torque, is the damping coefficient of the motor, is the torque coefficient of the motor, is the phase current of the motor, is the torque generated because of the load, is the inertia of the rear wheel, is the angular speed of the rear wheel, is the generated driving torque, is the braking torque, is the damping coefficient of the rear wheel, is the radius of the rear wheel, is the friction force, is the total mass of the electric bike, is the velocity of the bike, and is the tangent velocity of the rear wheel. In addition, for the fixed transmission ratio of the system, the following expression is used where is the constant gear ratio. The equation of motion of the rear wheel speed can be further obtained as (144 ) where and . From Amontons' first law, the friction force is expressed as (15) where is the normal force, is the gravitational constant, is the friction coefficient, and is the slip ratio. When braking, is defined as (16) In general, the ideal slip ratio for the best tire-to-road adhesion is closely related to road surfaces and ranges from 0.15 to 0.3.

Design of Slip Ratio Estimator
Determining the precise speed of an electric bike in a sensorless system is typically difficult. Therefore, SRE method that does not require information about the vehicle velocity and acceleration was especially designed for the sensorless system [20].
Substituting (13)-(16) into (12, we obtain the following expression: . An SRE can be described as follows: where λ denotes the estimate of λ . The estimation error dynamics is expressed as follows: where ê λ λ = − . Or equivalently, The condition of estimation error convergence is expressed as follows: , and the wheel stops before the vehicle, that is, 0 Moreover, λ is typically small, and the inequality is maintained for most practical applications.

Design of Slip Ratio Control
Next, we consider slip ratio control based on the slip ratio estimated by (19). The objective is to develop a controller such that the vehicle slip ratio tracks the ideal value under various road conditions [23] for the best tire-to-road adhesion.
To start, the first-order nonlinear time-varying system of (18) is expressed in the follows by excluding the brake control input 1 ( ) u t and using the estimated slip ratio as According to [24], the sliding surface can be selected as ( )ˆref We assumed a positive definite Lyapunov function defined as Performing differentiation with respect to t results in the expression The sliding condition is satisfied if the following condition is satisfied: where is a positive constant that determines the convergence rate of ˆr ef λ λ − , that is, the error between actual and ideal slip ratios for the best tire and road surface adhesion, to reach the sliding surface. Once is determined, selection of the control gain U then considers satisfaction of the requirements of (29). Finally, a PI compensation module was included to track the reference current computed according to the slip ratio SMC. The input to the module is , where is the reference input and is the feedback braking current.
The design proposed here focuses only on the use of SMC combined with SRC to realize the function of ABS control for motor-driven vehicles. For the complete design ideas behind the ABS control one may refer to the excellent references, [23] and [25].

Hardware Realization
The electric bike was equipped with a permanent-magnet synchronous motor (PMSM), previously adopted in [24]. The dsPIC30F3011 microcontroller, by Microchip Technology Co., Arizona, US, was used to realize the integrated driving/braking control unit. The clock frequency of the controller was 40 MHz. Figure 9 illustrates the hardware architecture of the driving/braking system. The capacitance of the ultracapacitor (UC) used for boosting instantaneous braking current was 0.55 F.

Software Design
In the proposed system, an FOC-based sensorless driving component was combined with the electromagnetic braking system equipped with ABS control. The driving and the braking systems have the same hardware and functionally interact to form a simplified and low-cost architecture, as depicted in Figure 10. For the control strategy of the proposed system, we divided the driving unit into two parts, the FOC algorithm and the SRE for rotor position estimation, and speed of the motor for the sensorless system. Figure 11 depicts the operational flowchart of the control unit.

Driver Implementation
The torque produced using the FOC algorithm for the PMSM was examined first. The maximum rotational speed of the electric motor was 400 rpm. Figure 12 depicts the output voltage of the space vector PWM (SVPWM) signal in region 4 of the vector distribution map. The controlled PWM output rapidly changed with the duty cycle at a PWM frequency of 15 kHz. The motor was switched to the closed-loop control after it attained stability. The phase current decreased at this stage and depended on the speed command.

Braking System Realization
A virtual reality experimental platform-TACX I-Genius T2000 bike simulator [26] was adopted to conduct the hardware-in-the-loop experiments under various rider and road conditions ( Figure  13). This simulator has an active resistance unit to emulate the effects of uphill and downhill ridings. For the downhill section of the road, the resistance unit increases the speed of the wheel to mimic downhill conditions. The ideal slip ratio for dry road is around 0.2 which was set to be the set point  To verify the braking performance of the proposed design scheme, several experimental scenarios were tested on the virtual reality platform. Downhill declining gradients of 0% and − 5 % and the cyclist with the weight of 40, 60, and 80 kg scenarios were tested. The proposed electromagnetic reversal brake and the traditional lower-arm three-phase short-circuit brake were tested and compared. The cyclist weight of 40 kg and declining gradient of 0% were set as the reference for braking tests. The braking control unit was set to activate after the electric bike accelerated to 10.5 km/hr. The testing distance was 100 m.
Detailed results are presented in Figures 14 to 21. The electric bike stopped within 10 s for all cases listed in Table 3. The results indicated that the stopping distance increased with the increase in the weight of the cyclist and slope of the downhill section. For the electromagnetic reversal braking, the ultracapacitor provided additional braking energy when the bike moved downhill, the stopping distance decreased with the increase in the weight of the cyclist. Furthermore, with the increase in the weight of the cyclist, the starting torque was not sufficient for smooth starting of the motor using the sensorless FOC algorithm. This increase in weight reduced the maximum motor speed, as depicted in Figures 16 to 21. The stopping distance of the electromagnetic reversal brake was considerably shorter than that using the lower-arm three-phase short-circuit brake for all cases. The result indicated satisfactory performance irrespective of the specific environmental conditions. Finally, a test for ABS control was conducted. A convenient method to confirm the controllability of the electric bike during emergency braking involved observing the dynamic response of the slip ratio. The slip ratio could be satisfactorily controlled within the range 0.15-0.3 according to the proposed ABS control scheme ( Figure 22). The braking performance for various operating scenarios in terms of the stopping distance is summarized in Table 3.

Discussions
In similar approaches dealing with the current issue-such as regenerative, kinetic, supercapacitor, and slip control-based braking-the braking effect might decreases considerably when the battery has been fully charged. In addition, low conversion efficiency generally results in unsatisfactory braking performance since traditional approaches dissipate back EMF to the load (power resistor or battery) rather than use it to boost braking effect. Here, the back EMF generated by the motor was used actively in the braking system. Braking effect is enhanced by intermittently reversing direction of the magnetic field force from driving to braking for the motor. The negative side is its sophisticated driver circuit and demagnetization risk due to the extreme conditions which might cause motor temperature rising. This deserves further study and is currently under investigation.

Conclusions
A novel driving/braking control design in which the motor driver and electromagnetic braking driver of the PMSM in a unit were combined was proposed for electric vehicles. The proposed system is cost effective. The FOC algorithm and sensorless control technique were combined to switch between driving or braking motor in an efficient manner. An ultracapacitor was added to the reverse braking mechanism to enhance the braking torque. The control strategy and hardware implementation were realized for a customized PMSM. The presented approach exhibited potential in achieving ABS control for future electric vehicles, which is functionally analogous to the engine brakes of the gasolinepowered vehicles but with better flexibility in braking torque distribution for long downhill riding. Experiments were conducted to demonstrate the feasibility of the proposed design.

Conflicts of Interest:
The authors declare no conflict of interest.