Realtime SMART Speed Pattern Generator for EVs taking account of Driver’s Command Change

Electric Vehicles (EVs) driven by electric motors are suitable for speed control, which means the ride comfort and safety can be improved in ordinary traveling and emergency by applying speed patterns. The main contribution of this paper is the development of a Realtime SMART Speed Pattern Generator (RSSPG) taking account of driver’s command change. In the RSSPG, speedy acceleration/deceleration can be implemented under the constraints of acceleration and jerk limits. The parameter C which is associated with slope of jerk can be adjusted to fit accelerator/brake actions of human drivers with different driving styles. Some experimental results by our test EV ‘UOT March II’ are shown to verify the effectiveness of the proposed RSSPG.


INTRODUCTION
3. Motor can be attached to each wheel. Therefore, from the viewpoint of electrical and control engineering, EVs are suitable for speed control. The speed pattern generation can also be said to be a method utilizing these control advantages of electric motors.
In modern society, vehicles such as automobiles, trains, buses, planes and elevators are indispensable. For pleasant human life, vehicles are necessary for transportation. Besides, they should also be safe and comfortable. Especially, expecting degree of ride comfort such as user-friendliness which means "easy to drive" and comfort which means "smooth driving" becomes very high for the motoring public. [1] In this paper, motion control using speed pattern which has been used in trains and elevators is realized to apply to EVs, and then position EVs apart from ICVs by improving the ride comfort and safety in ordinary traveling and emergency. For details, a Realtime SMART Speed Pattern Generator (RSSPG) taking account of driver's command change is proposed. At first, in Section 2, we examine measures to apply speed pattern to EVs based on the vehicle traveling characteristics. Then, in Section 3, we introduce Optimal Control Theory to generate speed pattern based on which we design our proposed RSSPG. In Section 4, the generation algorithm of RSSPG taking account of driver's command change will be explained, and the way to decide parameters of RSSPG and the possibility of flexible pattern generation will also be shown. At last, some experimental results by our test EV 'UOT March II' are shown to verify the effectiveness of the proposed RSSPG.
Ride comfort is classified to three categories: vertical, horizontal, and longitudinal vibration [2]. The variation in longitudinal acceleration has great influence on ride comfort [3] [4].
Usually, the path or the destination of automobiles can hardly be decided, which is different from railways. While driving on the urban road, frequent acceleration /deceleration is needed. Start/stop for obeying traffic light, turning right or left, lane change, driving in accordance with surrounding cars and etc. It may be no exaggeration to say that automobiles' traveling consists mostly of acceleration/deceleration. Therefore, the vibration that comes with acceleration /deceleration has a great effect on ride comfort [4], and suppression of the vibration is supposed to improve ride comfort in the whole traveling of vehicle.
However, like elevators and trains, EVs are driven by electric motors. The advantages of electric motors can be summarized as: [5] 2. Motion Control of EVs using Speed Pattern 1. Torque generation is very quick and accurate, for both acceleration and deceleration.

Accelerator/Brake
Pedal Operation as jC C Fig. 1 Motion control of EVs using speed pattern Fig. 1 shows the block diagram of motion control of EVs using speed pattern, which consists of 3 parts [6]: estimation of driver's intention based on the accelerator/brake pedal operation, generation of speed pattern, and motion control of vehicle utilizing generated speed pattern. This will enable to fill the gap of driver's driving skill, and improve not only ride comfort but also safety by achieving two things as follows:

Optimal Control Theory to Generate Speed Pattern
Optimal Control Theory is one of the significant results of Modern Control Theory. Basically, it is a method to minimize a certain cost function in line with dynamic condition of the state equation, and is very effective for speed pattern shaping. For example, a control method called SMART [7] is very famous as one of reference trajectory generation method used to reduce the access time of magnetic disk. 1. Generation and application of speed pattern according to driver's intention of traveling.
The basic idea of SMART control design is to formulate smooth motion which is not vibratory and easy for DSP to deal with. Therefore, the theory is developed by focusing on the cost function that integrates squared time derivative of acceleration. We can design the speed pattern in the similar way. We use jerk or the time derivative of acceleration which is often related to ride comfort to make the cost function as follows.
The driver's evaluation of ride comfort is improved by generating speed pattern that is in accordance with driver's intention of traveling and motion of car based on the pattern. Normally, the accelerator/brake pedal is utilized for changing the acceleration of vehicle while driving a car. However, in fact the real aim of driver is to change the speed but not the acceleration itself. In other words, when the driver wants a higher speed, they can just step on pedal more strongly. Therefore, it can be said that length of step relates to expected final speed input V H . With the aid of RSSPG, the driver just need to set the new velocity command, but do not concern how to adjust the pedal carefully to get a better transient dynamics of accelerating or braking. Hence RSSPG will be the future operating way for drive-by-wire system.
The state equation whose state variables are speed V and acceleration a is set up as the following equation.
(2) Driver's driving skill has wide variation. Therefore the operation of accelerator/brake pedal does not necessarily correspond to driver's intention of traveling. Taking driving support system for the inexperienced drivers and even automated driving system into account, application of speed pattern can improve not only ride comfort but also operationality and safety. Because realization of driver's traveling intention allows the driver to concentrate more on steering and surrounding vehicles.
Here, according to Optimal Control Theory, we suppose that is Lagrange multiplier and make Hamiltonian as follows.

Smooth and speedy acceleration/deceleration
At the moment of switching between acceleration and deceleration, it is important to suppress variation in acceleration/deceleration. Smooth traveling can be realized by generating speed pattern that has continuity in both acceleration and jerk. Further more, using a large value of acceleration and jerk without damaging safety and ride comfort makes speedy acceleration /deceleration possible. x The remaining part of Fig. 1 shows the control system that is applied to implementation of the proposed speed pattern. To improve the tracking performance and disturbance robustness, this system contains feedforward of acceleration and feedback of speed. This will enable to lessen the stress on the driver.
The values of vector and matrix in Eq. 2 are assigned into Eq. 4, and we get Meanwhile, P is the test vehicle dynamics, P n is the nominal plant, K p is the speed feedback gain, and F m * is motor driving force reference. Other variables in Fig. 2 which is associated with the proposed RSSPG will be explained in Subsection 4.1.
Therefore, the solution can be expressed as the following polynomial equations.
In a similar way, we increase/decrease jerk as state 5~state 7, and keep jerk -j C in state 6 for smooth and speedy deceleration.
Therefore, coefficients C i (i=1,2,3) are decided by the initial conditions as Further, by differentiating Eq. 7 with respect to time, we get jerk as follows.
The remaining coefficient C 0 associated with slope of jerk takes the value of +C in state 1 and 7, 0 in state 2, 4 and 6, -C in state 3 and 5 to generate patterns shown in Fig. 2 where C i (i=0,1,2,3) are arbitrary constant coefficients. They are decided by defining boundary conditions. For example, we suppose the pattern starts at t = 0 and the initial condition is V(t) = V 0 , a(t) = a 0 , and j(t)=j 0 . A car accelerates up to a final velocity V H as speedy and smooth as possible as shown in Fig. 2.

Fig. 2 Typical patterns of acceleration
A driver operates accelerator/brake pedal very frequently while driving a car, that is to say, driver's control input constantly changes as surrounding conditions change. For example, as shown in Fig. 3, during the braking process, if a car breaks into the line and the braking time becomes short, then the driver should press on the brake deeper. In contrast, if the parked car in front moves and the braking time becomes long, then the driver should release the brake. Therefore, the driver must adjust the braking pattern according to the condition ahead of the vehicle. Smooth acceleration can be realized by increasing /decreasing jerk and acceleration continuously. In addition, speedy acceleration can be realized by keeping acceleration a S as long as possible. In this process, Fig. 3 Braking pattern adjustment 1. Keep continuity of acceleration and jerk. 2. At the moment of reaching to V H , acceleration and jerk should be 0.
There is the very important factor to consider in the application of speed pattern to EVs: if the change of driver's control input occurs during mid-pattern, a new speed pattern must be recalculated in realtime, which can be realized by our proposed RSSPG.
are the absolute conditions. [8] Then, speed pattern is generated from following algorithms.
1. Increase a quickly to a S for speedy acceleration as (a) of Fig. 2 4.1 Generation algorithm of RSSPG Since continuity of jerk is one of the absolute conditions for a smooth driving, we increase/decrease jerk as state 1~state 3 in Fig. 2. In particular, in state 2 we raise a quickly by keeping jerk j C . Fig. 4 shows the flow chart of RSSPG. We assume that expected final speed input V H (t) can be changed in realtime. Slope of jerk 6C 0 (t) is determined based on jerk command j * (t), acceleration command a * (t), speed command V * (t), and expected final speed input V H (t) of time t, which is used to calculate jerk command j * (t+T), acceleration command  Fig. 4 Flow chart of RSPPG a * (t+T), and speed command V * (t+T) of time t+T as RSSPG outputs, where T is the sampling time. The parameter C can be adjusted to fit accelerator/brake actions of human drivers with different driving styles. The maximum safe acceleration a S in accordance with road condition and the acceptable maximum jerk j C to ride comfort are adjustable, too. Then, RSSPG follows the procedure below to generate the control command.

Convergence affirmation of final speed
The calculated final speed does not necessarily converge on the expected final speed input V H (t) quickly due to the discrete-time calculation. So when speed command V * (t) converges to some extent ( 0.005[m/s]) on V H (t), and jerk command j * (t) and acceleration command a * (t) converge to some extent on 0, i.e. | j * (t) | < 0.1j C , | a * (t) | < 0.1a S , we assume that V * (t) will be kept constant until V H (t) changes.

Direction flag and safety affirmation of acceleration
Direction flag of acceleration F a is just a variable for standardization of calculating formulas for both acceleration (a * (t)>0 F a =1) and deceleration (a * (t)<0 F a =-1) in program. When a * (t)=0, F a (i.e. acceleration or deceleration) is affirmed by magnitude relation between V * (t) and V H (t). Here, we explain the case when F a =1 i.e. acceleration.

Calculate stop time periods of stop jerk pattern and affirm the state of jerk
As shown in Fig. 5, to fulfill "At the moment of reaching to V H , acceleration and jerk should be 0." , we use acceleration and jerk command of time t to get the maximum absolute value of jerk as  If j h > j C , stop jerk pattern will be generated along the dash line from the time t + t 5 , and stop time periods )) ) ( 2 7 are obtained. If t 5 is positive, state of jerk = 5, if t 5 =0, state of jerk = 6.

Final speed calculation and pattern update
Final speed V 7 * can be calculated according to Eq. 6. If V 7 * < V H (t), start jerk pattern shown in Fig. 6 is determined to be adopted, otherwise stop jerk pattern is appropriate. At the end of the loop, the next time commands V * (t+T), a * (t+T), and j * (t+T) are calculated based on 6C 0 (t) associated with the obtained state of jerk.

Calculate start time periods of start jerk pattern and affirm the state of jerk
Start jerk pattern can be generated in a similar way as shown in Fig. 6. Here, we give the value of a S -a * (t) to the shading area for the speedy acceleration within the bounds of safety a S .

Way to decide parameters of RSSPG
The other advantage of this proposed method is that the following three pattern parameters can be determined arbitrarily and separately: C, a S , and j C . Change of these parameters achieves variations of change rate in jerk, velocity and acceleration. This advantage enables flexible generation of pattern as follows.

Adjust to the favorite traveling style of drivers and passengers
The parameter C, or the changing rate of jerk, can be adjusted to fit accelerator/brake actions of human drivers with different driving styles or the favorite traveling style of passengers. For example, someone who wants acceleration feel, however, someone who wants slow acceleration.
Furthermore, it is said that the change of acceleration in deceleration process has an impact on ride comfort more than that in acceleration process. [2] [9] Therefore, we must be careful to decide the parameters of the braking pattern in deceleration. However, as shown in Fig. 7, releasing operation of the braking pattern by the experienced driver is a bit slower. So we can get a more comfortable braking pattern by setting different values of j C for pressing/releasing operation. press on the brake release the brake Braking Acceleration Time Fig. 7 Braking pattern by experienced drivers

Correspond to changes of road conditions rapidly
We suppose that the vehicle is running from dry road into icy road. The friction between the tire and the road is rapidly reduced. In other words, the maximum road friction coefficient decreases in this case. Hence, we can reset the value of a max μ S as the lower of icy road, and prevent the vehicle from slipping. g μ max

Deal with emergency braking, sudden changes of surrounding
In these emergency situations, we should not only change C into a larger value, but also increase j C to ensure safety if necessary, though ride comfort may be sacrificed.
In the worst case, shortest distance stopping by maximum braking acceleration g max is necessary. In addition, the shortest distance can also be used in Adaptive Cruise Control System. Fig. 8 shows our experimental pure EV 'UOT March II', which is built to prove EVs' advantages. We made it by ourselves, which is remodeling of Nissan March. The main characteristic of this EV is that it has 4 in-wheel motors.

Fig. 8 Our test EV 'UOT March II'
Signal from the noncontact speed meter inside in-wheel motors is used for motion control. This EV is also equipped with acceleration sensor which enables us to detect the motion of the vehicle. Table 1  Since the part of estimation of driver's intention based on the accelerator/brake pedal operation in Fig. 1 requires more examination, we suppose that the expected final speed input V H (t) is not estimated from length of step on the accelerator/brake pedal, but given a predetermined pattern. We attempted to generate a new speed pattern in realtime when the change of V H (t) occurs by utilizing our proposed RSSPG in the vehicle motion control experiments.
During the experiments, due to starting friction we always accelerate from stopping state to some extent and then release the accelerator pedal to coast to about 1.5[m/s]. In addition, in order to start generating patterns at nearly the same initial speed every time in the comparison experiments, we let the speed reference accelerates to 2[m/s] during the 2 seconds after starting control, and keep the speed reference at 2[m/s] for 2 seconds before the RSSPG is utilized.
The parameter C which is associated with slope of jerk and the speed feedback gain K p were changed to test the effectiveness of our proposed RSSPG.
Experiments that contain both acceleration pattern and acceleration/deceleration pattern were carried out by three drivers during 3 days. Table 2 explains experimental conditions.  Fig. 9, a new speed pattern is really recalculated in realtime, when the driver's control input V H (t) changes from 3[m/s] to 5[m/s] at t = 8.0[s] during mid-pattern. We succeeded in online speed pattern generation according to driver's command change on the real vehicle. In addition, speedy and smooth acceleration/deceleration was realized by the motion control utilizing the generated speed reference pattern. However, we will discuss about the pattern tracking performance later.
Furthermore, the experimental results indicate that the driver's evaluation of ride comfort can be changed by generating different speed patterns using different parameters. In the comparison experiments, we only changed the parameter C which is associated with slope of jerk. The maximum safe acceleration a S in accordance with road condition and the acceptable maximum jerk j C to ride comfort were kept unchanged. Fig. 9 Experimental results of acceleration pattern Fig. 10 shows that we also succeeded in the generation and control of the acceleration/deceleration pattern according to driver's command change on the real vehicle. Meanwhile, negative torque was given to realize braking during deceleration. As shown in Fig. 9, in the speed and acceleration patterns a broad distinction occurs between rise time of the two cases. Change of the parameters enables flexible generation of pattern, which also indicates that we can generate and utilize speed pattern according to ride comfort, individual taste, surrounding condition, emergency, etc.

Experimental results of acceleration/deceleration pattern (case 1)
In addition, since here we make no provision for the worst emergency case, the generated speed temporarily overruns the expected final speed input V H (t) due to the absolute condition of continuity, but converge on it in the end as shown in Fig. 10. But we think it is just an accurate reproduction of driver's possible deceleration operation in mid-pattern. Fig. 11 Influence of rolling resistance on pattern tracking performance As shown in Fig. 12, we give the same rolling resistance compensation torque in case 2 and case 4, however, the steady-state error of case 2 is smaller because of the strong wind on that day. When the wind is strong, air resistance that is proportional to the squared speed can no longer be ignored, besides rolling resistance that is a steady value. Fig. 12 Influence of wind on pattern tracking performance Fig. 10 Experimental results of acceleration/deceleration pattern Traveling resistance including rolling resistance and air resistance can be measured by coasting test. However, a long enough straight pathway, accurate data of temperature/humidity/wind speed, and accurate speed/acceleration measurement are needed for utilizing the JIS coasting test. But it seems not so realistic in the real vehicle experiment. So, devising on the control system is more effective.

Major influence factors on pattern tracking
performance As shown in Fig. 11, we compare tracking errors of case 3 and case 1 and find that the tracking error of case 3 is bigger in both acceleration area and constant speed area before acceleration/after deceleration, but smaller in deceleration area. This is because the difference between the given rolling resistance compensation torque of the two case. This means how to get the accurate rolling resistance is very important in improving the tracking performance utilizing compensation control.
Under the experimental condition of case 4, we tried increasing the speed feedback gain K p to improve the tracking performance, while the value of parameter C was kept unchanged(C=0.083). The tracking performance is improved to some extent as shown in Fig. 13, however, the improvement of the tracking

Conclusion
In this paper, we propose a novel motion control method for EVs based on Realtime SMART Speed Pattern Generation. In the demonstration experiments by 'UOT March II', we succeeded in online speed pattern generation according to driver's command change on the real vehicle. In addition, speedy and smooth acceleration/deceleration was realized by the motion control utilizing the generated speed reference pattern. Furthermore, change of the parameters enables flexible generation of pattern, which also indicates that we can generate and utilize speed pattern according to ride comfort, individual taste, surrounding condition, emergency, etc. It enables vehicles to have high intelligence, and support drivers' driving. It is also an example of intelligent driver support and safety technology which is smooth, safe and in proportion to the environment.