Intelligent speed control system for electric vehicle

An important topic nowadays is to have cars and roads that provide comfort and safety. Mechatronics systems are used to have this approach. The brake system is now base on an electronic stability system, the steering system is partly or fully automated and the speed is control by the cruise control system. The new target for the automotive industry is to create a car able to decide by itself on all actions related to safety and comfort – a fully automated vehicle. One of the most important innovations for autonomous driving is drive by the idea of connected cars: car2car and car2infrastructure. In the present paper, it is analysed a cruise control system based on communication technology. A simple prototype is build up using Arduino and modules for communication. To calibrate and parametrize the system, we use a Simulink model.


Introduction
During the last decades, the automotive industry knew a huge development of innovative design and an increase of the functionalities to assure the safety in traffic and the comfort for the passengers. This assertion was possible due to the mechatronics technologies boom [1], [2]. The mechanic technology started to be controlled by the hardware and software systems, creating the concept of autonomous driving.
Autonomous systems suppose a translation of the decision mechanism from the humane factor to the AI and sensors. From the analysis of the vehicle, the first directions for research are to find a solution for speed control: acceleration and braking. The speed control is the subject of a large number of studies. Farther we are going analyse a couple of recent approaches for this topic.
As an example, in [3] the speed control is realized automatically through the classic cruise control system [4]. Other systems like in [5] or [6] are more complex. If classic cruise control is only improving the comfort of the driver, a system like active cruise control (ACC) [7], [8], [9], or a cooperative adaptive cruise control (CACC) [10] is improving the safety.
On the other hand, each solution has advantages and disadvantages. Active cruise control can provide only a limited number of information about the car followed. CACC system can communicate with any other car equipped with this system and it can receive various information independent of weather, road, acceleration, etc.
Base on the cruise control system, other solutions were developed to ensure safety. The interaction with the other participants on traffic is relevant for preventing accidents. CACC [11 is a concept of high autonomous driving and it improves not only the safety but its impact is relevant for the transportation system as entire. The traffic flow impact of CACC is studied in [12].
In this paper, we want to analyse and simulate the behaviour of a speed control system based on car to car communication concept. For this purpose, we have created an experimental stand with two mobile robots. For the calibration of the robots, we used a Simulink model of the robots.
The paper is structured on 4 chapters, following these topics: chapter 1 -Introduction in the topic, chapter 2 -electric vehicle and the components uses for speed control, chapter 3 -Experiment setup, chapter 4 -Conclusion and future study approaches.

Speed control of electric vehicle 2.1. General consideration on electric cars
The electric car is a hot topic today considering the pollution reduction. Mechatronic technologies have been a driver for the development of these cars. The impact of the synergy of the electrical/electronic elements and of the mechanical elements, through mechatronics, was decisive in the evolution of electric vehicles (EV) [13]. The system of transmission of electricity from batteries to the electric motor in order to achieve the dependence of "energy -required torque -the desired speed "was created with the help of the technology in the field of mechatronics. Another important aspect in which the mechatronics intervened was the coupling of the electric motor to the drivetrain of the car, especially if we refer to hybrid cars [13,14]. Figure 1 gives a schematic picture of the powertrain used in the electric vehicle. The main components used in BEV (battery electric vehicle): the battery pack -the source of electric energy, an energy management system, a controller of the electric motor (EM), and the transmission of the torque created to the wheels.

Hardware solution used for speed control of electric motor
To study the speed control, we have to know the electric vehicle's solution and the architecture of the powertrain and brake system [15]. In EV there are used either DC motor, either AC motor. Based on this aspect, there are different methods to control speed.
The speed of the engine and the speed of the car are two different characteristics, which are dependent. The speed of the car is directly proportional to the torque developed by the engine and transmitted to the wheels when the resistance tire force is not exceeded. The torque is realized by the ACME 2020 IOP Conf. Series: Materials Science and Engineering 997 (2020) 012064 IOP Publishing doi:10.1088/1757-899X/997/1/012064 3 rotational speed of the electric motor, which in turn depends on the electrical energy applied to the motor.
For DC motor, there is used a mechanism to control the voltage of the motor input. To control the voltage, for DC motor it is used the "chopper" or phase-controlled rectifiers. This system is added between the battery and the motor and it is controlled by the energy management controller [16], [17], [18] and [19]. The output of the chopper is a voltage signal under the PWM form. This signal has the shape shown in Figure 2 [20], [21]. PWM signal allows creating a variable level of voltage through the average PWM value in time. The duty cycle is characteristic to the PWM and it represents the nominal voltage percentage in a time unit. 100% duty cycle corresponds to a nominal voltage for entire unit time. 50% duty cycle represents a half of time with nominal voltage and half of the time unit with 0 voltage value [22].
In AC motors [14], there is a different situation, because the energy is stored in the battery pack in DC form. To be used by the AC motors there is needed an inverter (DC-AC). The output of the inverter is AC electric energy. It has all characteristics of AC energy and it can be manipulated through frequency and amplitude of the signal. The inverter has the possibility to control these characteristics and it could be considered the main part of the speed controlling process [17], [18].

Intelligent speed control system
An intelligent system is able to take decisions by itself. The systems that are next discussed are relevant to all categories of autonomous driving cars. When we are talking about high autonomous driving cars, we are referring to a car able to interact with the environment and make a decision for a corresponding event.
A new direction for autonomous driving is to connect the car with other cars and with infrastructure around. This cooperation has an important effect on the control speed system. Therefore, it has been developed a system called Cooperative Adaptive Cruise Control that is able to integrate the Cruise Control system, Adaptive Cruise control system and to communicate with other vehicles that provide information about themselves. Table 1 gives a concise comparison between cruise control, adaptive cruise control, and cooperative adaptive cruise control. The transmitter module is used on the first robot and it is paired with the receiver module installed on the second robot. The pairing of the transmitter and receiver is realized base on the Arduino library, RH_ASK.h.
The transmitter sends the messages regarding the speed each time a new value is calculated. The receiver got the information and trigger an interruption in the Arduino processor on robot 2. Then, the value is added to a buffer and used in the code. The code used for sending or receiving the data is shown in the table 2. rf_driver.send((uint8_t *)Data_rpm_length, 1); // the length of data is sent; The receiver is expecting a value of size 1. This is hardcoded inside the code.
rf_driver.waitPacketSent(); // The processor waits for package to be sent. rf_driver.send((uint8_t*)Data_rpm, Data_rpm_length); // The speed value is sent and also the length of data. The receiver wait for a data of "length" size. This method ensure that only the correct data is received.
rf_driver.waitPacketSent(); // The processor waits for package to be sent. uint8_t buf1; // store the data of "length"; uint8_t buf_Data_rpm; // store the data for "Data_rpm" that has been received; { //queue the data received in a buffer; } The function rf_driver.recv() checks if the data received has the length specified by the &buflen_xx. If the data has not the same length, then it would not be used. This is used to avoid interferences and to ensure that only the sent data is used in code.

Car2infrastructure communication
The Bluetooth module is used to connect the PC with the first robot. This has the scope to remote control the speed of the first robot. The value is sent serial, using the Bluetooth from PC. The Arduino code checks if a new message in the serial port.

Motor control
The motor control is realized from Arduino via a motor driver, LN298. The software sets the value of the duty cycle and the motor driver commands the PWM signal based on the duty cycle received.
The motors are powered by a 4 batteries pack. The Arduino board is supplied from another source. For a safety function, the motor driver supplier is controlled with a switch button.

Speed detection
In the project, there are used two optic sensors for each robot. An encoder disc is installed on the shaft of the electric motor, between motor and wheel. The sensor counts the holes in the disc for each rotation. Each hole from the disc creates an impulse that triggers an interruption. The interruptions are counted and for a unit time we can divide the number of impulses with 20 (the number of holes on the disc) and with unit time and the result is the number of wheel revolution on the unit time.

PID Controller
The input in the controller is the error, calculated as the difference between the measured speed of the second robot and the received speed.
The mathematical model of the controller is represented in figure 4. The scope of the PID controller is to reduce the difference between setpoint and output. Also, through the integrative and derivative components, it is predicted the future set point. This aspect is important in the automotive industry.

Simulation of the electric carrobot two
The aim of the simulation is to simplify the calibration process. We are interested in the calibration of the controller. Therefore, the values for , , and coefficients could be identified throughout:  physical experimentsthe Arduino code must be flashed each time for a new experiment.  a simulation of the system. We considered this solution more efficient and time reducing. The system is oversimplified because the purpose is to identify only the parameters for PID controller. In this direction, we consider the received speed as a signal builder output. Then, the PID controller has 2 inputs: received speed from the signal builder and the measured speed from the Dynamic_vehicle subsystem. The output of the controller is the duty cycle that is applied to the DC-DC converter. Figure  6 shown the simulation of the PID controller in Simulink. The gains coefficients are unknown.
The next component simulated is the electric motor. To create the motor model, we use the equations that describe the electrical and mechanical behaviour of the system [28]: where J is the inertial moment, θ is the rotation angle, b is the motor constant for friction, i is electric current, L is the inductance, R is internal resistance, kt is torque constant, ke is the back-emf constant. All these parameters are identified from the motor datasheet or from experimental tries [31]. This topic will be discussing separately in another paper. The torque produced by the electric engine has losses. This aspect is due to the friction of the shaft and all the components in the electric motor. To simulate all these losses, we added a subsystem and its output is subtracted from the produced torque. For this computation, we approximate the efficiency of the motor. The traction force is calculated based on the real torque, multiply by wheel radius and divided by reduction ratio.
The force produced by the motor is used in the dinamic calculation for the wheel. The dynamic of the wheel is simplified. The effective traction force applied to the wheel is the difference between traction force produced by the motor and the resistance forces.
The resistance force is the sum of drag force, friction force, and the weight force that acts on the vehicle. The drag force is calculated based on equation ( where is the coefficient of aerodinamic force, is the density of air, A is the surface of the front car, v is the speed.  The weight force is relevant only in the situation of a ramp. In any case, the weight force Weight = veh_mass x 9.81, where veh_mass is the mass of the vehicle and 9.81 is the gravitational acceleration. But this force acts on the vehicle multiplied by the sinus of the angle created by the ramp (teta). Thus, the real weight force acting on the vehicle is done by the ecuation: Figure 9 shown the simulation of the longitudinal dynamic. The speed is calculated as the ecution: After multiple tries, we obtained the result represented in figure 10. Figure 11.A gives a better view on the start simulation time, where is visible the delay between first robot and the second one. Figure  11.B shows the result of changing the speed direction and the respond of the second robot.

Conclusion and results
The system simulated in this project uses the concept of CACC and shows up the direction of automotive development. The robots work as they are assumed to function, this means that the second robot follows the first robot. The communication via Bluetooth is stable, instead, the RF communication is very sensitive, it required a small distance between robots, and it interferes with other devices. In the Arduino code, it is used the parameters identified in the simulation. The buffer used in the second robot introduces a small delay in the response of the speed in robot2. An idea to remove this delay could be to introduce a small delay before the "send" function in the first robot.