Parameterization of the ABS electronic control unit for increasing the autonomous trucks’ active safety

The article is devoted to the issue of improving the autonomous vehicles safety. The anti-lock braking system was chosen as the object of the study, since it is one of the components of the vehicle active safety during emergency braking. Its functioning varies depending on parameters such as vehicle type, transmission type, external and internal steering wheel angles. It is necessary to parameterize correctly the electronic control unit of the anti-lock braking system depending on the specific values of these parameters. For this, a software module was developed that reads the values of the vehicle parameters from a file and sends their array to the electronic control unit. Then we can check the result: how the block responded to the sent request positively or negatively. All this will speed up the parameterization process, increase its accuracy, preventing the occurrence of operator errors during its implementation.


Introduction
A person is the most vulnerable part of the driver-car-road-environment system and at the same time the most unreliable: in 90-94% of cases, the human factor becomes the cause of road accidents [1][2][3]. That is why the search for smarter and more efficient mobility options is now on the agenda of academics and business [4].
Recent events related to COVID-19 made it possible to test the effectiveness of the autonomous vehicles' usage for the delivery of food, medicine, medical analysis material in conditions of low traffic intensity due to lockdown. However, the question of the possibility of their safe use at a standard high intensity remains open. In addition, the legal aspects of the use of this vehicle's type on public roads remain unresolved [5]. Public and private organizations are actively developing smart vehicles [6]. Thus, Yandex invested 2.2 billion rubles from 2017 (the year when an autonomous control system based on Toyota Prius was started to develop) to 2020. At the moment, its vehicle fleet is more than 110 pcs., and the total mileage on the roads of Russia, Israel and the United States exceeds several million kilometers [7].
According to a survey conducted by HNTB America THINKS, the autonomous vehicles' main advantage, which was identified by 52% of respondents, is to increase the mobility of population's certain segments (disabled and elderly people) [4]. It is also assumed that, thanks to the functions of automated driving, the problems of parking spaces' lack can be solved (the vehicle will be able to drop off passengers and park in any suitable place), the travel time will be reduced due to their ability to move at higher speeds with a minimum probability of error, and the need for insurance of vehicles will decrease due to the complexity of their theft [8], transportation of goods in areas where it is dangerous for a person due to limited physical capabilities (in case of man-made disasters, fires, natural disasters, etc.), transportation tariffs will decrease due to saving on wages to drivers [9]. Autonomous vehicles are an excellent tool for the implementation of cars and freight transport joint use, which will also contribute to the reduction of emissions and the implementation of the idea of urban areas' sustainable development [10].
With smart vehicles' all the advantages, which are identified by experts, safety issues for all road users (passengers of an autonomous vehicle, driver and passengers of other vehicles, pedestrians, cyclists, etc.) that have arisen since the tests on public roads remain unresolved. Because even with a large amount of investment in autonomous vehicles' development, consumers remain distrustful of fully automated transportation. Thus, according to the study results [11], only half of the respondents believe that autonomous vehicles will be safer than traditional ones, while 91% spoke in favor of the mandatory presence of such a vehicle on board a person who could intervene in management in case of a critical situation. This is due in part to the recurring reports of casualties in road accidents involving autonomous vehicles [12]. In this regard, the aim of the work was to develop a tool to improve the autonomous vehicles' active safety.

Theory: the main directions of ensuring the autonomous vehicles' active safety
A distinction should be made between the autonomy's levels, which depend on the technologies used and are set by the manufacturer. According to the classification of SAE International (Professional Association of Automotive Engineers), six classes of autonomy are distinguished [13]: level 0 -completely manual control by a person, but such vehicle systems as ABS and cruise control warn of dangerous situations on the roads; level 1 -the so-called advanced driver-assistance systems have been introduced, for example, adaptive cruise control or steering or braking control, which automatically adjust the speed depending on the road situation; level 2 -partial autonomy, in which the steering and braking processes are under the control of the autopilot, however, a person must follow the road and be ready at any time to join the driving process; level 3 -conditional autonomy, when the vehicle is driven by an autopilot, but a person is not excluded from the driving process and is in reserve; level 4 -fully control of the autopilot, but a prerequisite is the availability of high-precision three-dimensional maps for the orientation of the autopilot (most of the autonomous vehicles currently being developed belong to this level); level 5 is a completely self-driving vehicle, in the cabin of which the steering wheel is not even supposed to be a structural element (at the moment there is no technology that would allow the vehicle's development of this level).
As the level of autonomy increases, the requirements for the accuracy and stability of the autonomous vehicle's all components operation increase. Thus, a level 5 autonomous vehicle is understood as a vehicle equipped with an integrated system of sensors (lidar, radar, sonar, inertia, GPS navigator) and video cameras, capable of interacting and exchanging data with other vehicles (V2V), a network (V2N), a person (V2P) and infrastructure (V2I) and is automatically controlled by a computer, which together allow him to safely move on public roads without human intervention. Therefore, computer vision algorithms [14][15][16], hardware sensor part [17] and automotive self-organizing networks (VANETs) [18] are currently being developed and improved. Also, researchers are actively developing automated driving systems that prevent or minimize vehicle collisions with other road users [19][20].
Because an autonomous vehicle is a high-tech transportation mean, 63% of HNTB America THINKS surveyed are concerned about protecting the great amount of data they generate, both in terms of the confidentiality of the information they contain, and in terms of the ability to ensure the safe operation of these vehicles in general [4]. In this regard, to reduce the accidents' risk, research is being conducted in another direction -ensuring the cybersecurity of autonomous vehicles [21].
In addition to the accuracy of sensors and software components that allow an autonomous vehicle to navigate in space, a huge role is assigned to diagnostics using onboard systems, maintaining the failure-free and reliability of traditional systems [22]. For this, driver assistance systems are widely used. They increase the vehicle active safety, such as anti-lock braking system, electronic stability control system, brake force distribution systems, emergency braking, which increase the efficiency of the braking system [23].
The vehicle's safe behavior in the event of emergency braking is largely determined by the anti-lock braking system (ABS). It helps prevent loss of vehicle control when braking on wet or icy roads. In moments of wheel slip, the system briefly unlocks the wheels, thereby maintaining the necessary grip. Typical ABS has wheel speed sensors mounted on the hub. They react to a sharp decrease in the speed of wheels' rotation and, when interrogated by the electronic control unit (ECU), transmit the corresponding signal to it. After that, the unit gives a command to open the valve for a short time in order to reduce the pressure in the brake line and make the wheel turn.

Algorithm for parameterization the ABS ECU
ABS function varies depending on parameters such as vehicle type, transmission type, external and internal steering wheel angles. It is necessary to configure correctly, that means parameterize the ABS ECU depending on the specific values of these parameters. Considering that we are talking about an autonomous vehicle, when the braking processes are completely dependent on automatic control systems, the presence of errors in their setting becomes unacceptable. Incorrect parameterization of the ABS unit can lead to unpredictable behavior of the vehicle on the road and lead to a traffic accident. For example, if one specify an incorrect load on one of the vehicle's axles, the block may be triggered erroneously, which will lead to blocking of the wheels. Therefore, it is important to accurately transfer each byte of parameter values to the ECU. If the wrong byte is sent, ABS will malfunction. In order not to carry out preliminary calculations according to the formula and not to transfer the bytes of each parameter to the block manually, a software module was implemented. It reads the parameter values from a file and sends their array to the ECU. The operator, whose task is to parameterize the ECU, must enter the vehicle parameters into the .xml extension document (Fig. 1). It lists the parameters in groups. The groups and the parameters themselves have a name and a special DID that uniquely identifies them and allows the software module to access them for the ECU parameterization. In addition, the number of values, the size in bytes and the values themselves are indicated for each parameter. At the next stage, this document is loaded onto an industrial stand or tablet so that information about the parameter values can be read from it (Fig. 2 a).
After successful loading of the document, the ABS ECU that needed to be parameterized is connected to the device. Next, the required program is called on the stand or tablet. It reads the parameters from the document and writes them to the ECU, sending a special HEX sequence to it. At the end of the parameterization, one can see information on the program result on the tablet (Fig. 2 b). Using a special CANalyzer device in the trace window, one can see which bytes were sent by the program to the ECU, and the block responded positively or negatively to the sent request. Parameter IDs were grouped into various string arrays, since the recalculation of the parameter values within one array was carried out according to a single formula. The main work of the program module takes place in the "Action" block. First, the child elements in the .xml document are counted so that the loop statement will run the concrete number of times. The line in which the elements are counted looks like this: resResult=GetNodeInformation(GROUPS…GROUP_ChildNodesCount) The value obtained as a result of the calculation is fixed in a variable «GROUP_ChildNodesCount».
When it becomes known how many times it is necessary to run the external cycle, which will move through the parameter groups, a cycle is launched that collects information about the parameter group: the group name and its DID. Inside this loop, an internal loop is launched that collects information about each parameter already within the group of parameters: name, ID, number of bytes, number of values, values themselves.
The following logic is implemented inside the loop that "runs" through the parameters: 1. There is a search for which formula the read parameter ID refers to. If no suitable formula is found, the value is converted without a formula. The formula is needed to convert the read value into integer form, since translation of a value into HEX is possible only with integers.
2. Checking the number of parameter values. If the count is one, the conversion starts immediately. If the number of parameter values is more than one, then all values are written into a separate array, each element of which will be converted separately.
3. During conversion, the parameter value has a string type, which must be converted to a floating point numeric type.
4. After the type conversion, a formula calculation is performed. If the parameter does not require recalculation, then the value remains unchanged.
5. The result of the conversion is converted back to a string type and entered into an array, which will be concatenated with the rest of the values. 6. The final array of strings will be converted to a byte array and sent to the block. Each parameters group is one request sent per block. completing the parameterization, one can use the CANalyzer program to see which bytes were eventually sent to the block, and how the block responded to them -positively or negatively (Fig. 3). If all the answers are positive (colored green), it can be considered that the ECU parameterization was successful.

Conclusion
The introduction of autonomous vehicles on public roads increases the requirements for the safety of their use. The ABS is one of the components of the vehicle active safety during emergency braking, therefore it is important to ensure its correct operation. Since its functioning is determined by the vehicle parameters (vehicle type, transmission type, external and internal angles of the steering wheel rotation), it is necessary to correctly parameterize the ABS ECU, depending on the specific values of these parameters. For this, a software module was developed that reads the values of vehicle parameters group from a file, sends their array to the ECU. After that, we can see which bytes were sent, and if the block responded positively or negatively to the sent request. All this will increase the speed and accuracy of block parameterization.