# An Indoor Vehicle-in-the-Loop Simulation Platform Testing Method for Autonomous Emergency Braking

Authors: Ying Gao; Xiangmo Zhao; Zhigang Xu; Jingjun Cheng; Wenwei Wang
Journal: Journal of Advanced Transportation
 (2021)

---

## Abstract

Autonomous vehicle (AV) is expected to be the ultimate solution for traffic safety, while autonomous emergency braking (AEB), as a crucial and fundamental active safety function of AV, has excellent potential for reducing fatalities and improving road safety. Although AV has the ability to cope with harsh conditions, it is supposed to be tested fully, systematically, and rigorously before it is officially commercialized. This study developed a novel indoor AV-in-the-loop (AVIL) simulation platform based on Client-Server (C/S) architecture for real full-scale AV testing. The proposed AVIL simulation platform consists of three parts: physical hardware components, software components, and various electrical interfaces that ensure the bidirectional virtual reality (VR) interaction. To validate the functionality and performance of the platform, this paper then adopted the Udwadia–Kalaba (U-K) approach to build the AEB system based on a typical driving situation due to the explicitness and simplicity of the U-K approach. Further, a group of real road-based experiments and AVIL-based experiments were conducted. The experimental results showed that the testing data obtained from the proposed AVIL platform have a high similarity to those of the real road tests, which means that the proposed AVIL platform is capable of simulating the AV running condition when it performs linear emergency braking on the road, thus confirming the feasibility and effectiveness of the AVIL platform for AV AEB testing. Simultaneously, the testing time and repeatability of the latter performed better. The findings of this study provide a new safe, effective, and fast solution to AV testing, and the practicability of this method has been verified.


---

## Body

## 1. Introduction

According to the World Health Organization [1, 2], more than one million people died in traffic accidents each year. This figure is 1.2 million in 2015 [3], 1.24 million in 2013 [4], and 1.3 million in 2009 [5]. From these figures, road traffic injuries are still one of the top ten causes of death worldwide. Besides, road traffic accidents also cause a great deal of cost, which is estimated to account for approximately 3% of the entire world’s GDP [3]. In China, 63000 people are killed, and 226000 are injured in traffic accidents every year [6].Autonomous vehicles (AVs) are designed to free drivers [7] from driving tasks and are expected to improve traffic safety [8] and efficiency [9]. They also have great potential in dealing with traffic problems [10–12]. AVs with great adaptability that use advanced sensing, communication, and control technologies have the potential to increase road capacity and improve traffic operations [7, 13–15].The fully automated vehicle would eventually eliminate driver errors, and ultimately, 90% of traffic accidents could be avoided [16]. Therefore, the development of AV has become an ideal way to reduce road traffic accidents and improve traffic safety [17, 18]. Although AVs have many advantages, several recent accidents have slowed down their process of commercialization. Tesla canceled the propaganda of self-driving feature, and Uber also terminated all AV-related tests. In fact, both the government and academia have reached an agreement that the AV needs to be fully, systematically, and rigorously tested before it is officially commercialized.The AV testing methods are mainly classified into four categories: real-world-based, simulation-based, hardware-in-the-loop- (HIL-) based, and vehicle-in-the-loop- (VIL-) based. Actual road tests are more accurate, but they are time-consuming, costly, and susceptible to weather, illumination conditions, and changing traffic scenarios. In contrast, the simulation test is always based on specific software that has the advantages of time-saving, cost-effective, and convenience. However, it is generally based on the ideal mathematical model and lacks several realistic considerations, which might lead to a big gap between the simulation results and the actual results.HIL has been adopted in automotive industries [19] since the early 1990s [20]. Over the past 30 years, many researchers have proposed various HIL testing platforms. Deng et al. developed a HIL simulation platform, which is an integrated system of various autonomous driving programmers as an indoor environment to support the development, testing, and verification of multiple functions and algorithms related to sensor-guided AVs [21]. Galko et al. brought a real car into the HIL loop, building a vehicle-hardware-in-the-loop system to evaluate the new algorithm and new hardware for driver assistance systems directly on a complete vehicle [22]. Zulkefli et al. proposed a powertrain research platform under the laboratory setup with a microscopic traffic simulator (VISSIM), which could be used to test various intelligent transportation systems applications such as cooperative adaptive cruise control, eco-driving, and speed harmonization [23]. Chen et al. developed a simulation-based HIL system that can flexibly construct vehicle kinematic models, virtual sensors, and multiple simulation scenarios and developed hardware control interfaces to perform an effective closed-loop simulation in conjunction with software interfaces [24]. Xu et al. proposed a HIL-scaled platform for testing AV trajectory tracking with a mechatronic testbed, consisting of the scaled roadway, scaled vehicles, indoor positioning subsystem, and computer-aided graphical user interfaces. It is intended to verify the accuracy of the algorithms that would be transferred to the actual AV [25].These HIL platforms more or less have the following one or several shortcomings: (1) only a virtual car or a part of the car’s actuators is introduced to the test loop; (2) a scaled AV is introduced; (3) although significant results have been achieved, the effectiveness of the proposed and validated function on the real full-scale AV still lacks verification; (4) no bridging is found between software-defined AV and real AV.As the name of VIL indicates, the method of directly testing a real vehicle can be considered as VIL test. Therefore, all actual road tests can be considered as VIL tests. To the best of our knowledge, there is a driving simulator-in-the-loop testbed under the laboratory environment [26], but there is almost no in-loop testing platform for real AVs. To this end, a real AV-in-the-loop (AVIL) simulation platform is proposed, which consists of a real AV, a set of mechanical equipment, sensor-related black boxes, other types of hardware, and software components. The presented AVIL simulation platform has the following advantages. First, a real AV is introduced into the testing loop to connect the software-based vehicle dynamics model supported by software with the real AV. The algorithm modules and parameters verified by software can be directly reflected on the real AV. Second, the real AV runs on the bench, which can be set with external factors such as road friction coefficient, road geometry models, and road gradient to simulate various real road conditions for the AV. Third, by deploying sensor-related black boxes, we have made it possible for real sensors to interact with virtual scenes, thereby maximizing the restoration of the real road testing process to ensure the homogeneity of the AVIL testing process and the real road testing process. The core contribution of this study is focused on the AVIL platform we established. With some customized components, it becomes possible to use this platform for full-scale AV testing in the laboratory environment, and the AVIL test results are of great similarity to those of real road test.In this paper, the system structure of this AVIL platform has been described. Further, the autonomous emergency braking (AEB) control algorithm has been developed based on Udwadia–Kalaba (U-K) approach and tested on this platform. AVIL feasibility analysis is then performed. The remainder of this paper is organized as follows: A detailed introduction of the proposed AVIL simulation platform is illustrated in Section2. Section 3 presents the AEB control algorithm and AVIL feasibility analysis and then is followed by discussion in Section 4 and conclusion with some future work in Section 5.


## 2. Overview of the Proposed AVIL Platform

The proposed AVIL simulation platform (see Figure1) is an indoor closed-loop system based on Client-Server (C/S) architecture, which is inspired from [27]. Our proposed AVIL simulation platform consists of physical hardware components, software components, and various electrical interfaces that ensure real and virtual bidirectional interaction. Due to the benefits of C/S mode, (1) C/S mode separates clients and servers, and the system is stable and flexible. (2) The C/S mode is equipped with a local area network (LAN) appropriate point-to-point structure mode and has reliable security. Under laboratory conditions, the AVIL simulation platform we proposed is being carried out. Therefore, we chose the C/S mode to realize data transmission by way of LAN. In this way, every single component in this system can easily communicate with others through their specific protocols independently, even if the entire system is not fully started. Therefore, any part of the system can be individually debugged and tested. It is also convenient for the maintenance, replacement, and expansion of the submodules of the AVIL platform system.Figure 1
The structure of the AVIL simulation platform. Arrows indicate the direction of data transmission.


### 2.1. Hardware in AVIL

The most important hardware equipment is that we have customized a three degrees-of-freedom test bench consisting of four independent components (shown in Figure2) and can interact with the virtual scene through its specific communication protocol. The test bench in the AVIL platform can efficiently use the simulation environment to avoid the potential risks of real road tests. The rotating tires are the tires of the AV under test. The drum roller has two working modes, active and passive. Passive mode means that it rotates with the longitudinal rotation of the AV’s tires, while active mode means that it can rotate spontaneously after power on. Through the combination of these two modes, the continuous road surface is simulated, as well as the ground adhesion coefficient. The role of the lifter is to simulate the geometric characteristics of the ground, to simulate the slope road surface through the height difference between the front and rear lifters, and to add a degree of freedom to AV under test. Regarding the gear, it adds another degree of freedom to AV under test. It only has the passive working mode; that is, it can only rotate with the lateral rotation of the AV’s tires, providing the possibility for steering, as well as the safety guarantee for steering operation. Specifications of our test bench are given in Table 1.Figure 2
The structure of the test bench. (a) Top view. (b) Subcomponent.Table 1
Specifications of the test bench.
ParameterValueWheelbase2550 mm–2720 mmTrack width1225 mm–1825 mmDrum configuration4-wheel independent driveDrum diameter318 mm in front; 452 mm in rearTotal peak power80 KWTraction force3500 N in frontResponse time≤ 200 msMaximum velocity60 km/hLifter range0.6 mGear angle−35°–35°Slope angle−15°–15°Rated torque600 NmWe have deployed some driving simulators [28], as shown in Figure 1, which are also connected to our testbed through C/S mode as clients. The driving simulator makes the background vehicle in the virtual scenarios behave more realistically without following a predetermined route. In this way, while reducing the programming workload, uncertain factors such as driving intention and driving behavior can be quickly and easily introduced. The effectiveness of driving simulators has been verified via experiments, which does not show up in this research. Although it is interesting and worthy of discussion, it is beyond the scope of this research and will be discussed and applied in our follow-up research.The other hardware devices in the simulation loop, such as sensors, actuators, processors, and communication buses, can significantly reduce the mathematical modeling effort and improve the simulation fidelity. The development efficiency can be dramatically increased in the early stages of designing the production-intent or production-ready hardware and software.A real AV, test bench, radar simulator, video black box, several actuators, and sensors are connected to one or two of the USBCAN buses, net cable, or RS232. An actual AV is brought in to conduct the simulation and evaluation with greater fidelity under the lab settings, from which we can test whether the processors, sensors, actuators, and bus protocols normally work according to the design specifications of various aspects of hardware and software. This is particularly beneficial for testing, debugging, and verifying such a complex AV system in the laboratory environment.


### 2.2. Software in AVIL

The AVIL simulation consists of both mathematical models and physical hardware devices that interact in real time through specific interfaces and perform joint hardware testing and software simulation tasks. Under the AVIL simulation, math models receive various hardware signals, and the hardware devices receive calculated variables from the math models simultaneously. For software model-driven hardware systems, by ensuring computational efficiency and model fidelity, mathematical models with real-time capabilities are critical to the success of the AVIL simulation.Our AVIL simulation platform is developed based on C/S mode. Various submodules are connected through LAN. That is, they can work together to complete joint tasks as well as run independently. Therefore, our virtual scene module can be supported by different simulation software [29], such as Prescan, Unity3D, Carla, and CarMake. Prescan is an automatic driving simulation platform for intelligent vehicle system based on physical models, which has a good built-in vehicle dynamics model and supports the development and application of camera, radar, LiDAR, GPS, V2X communication, and other applications, as well as model-in-the-loop, software-in-the-loop, HIL, and sensor-in-the-loop. Prescan fits our research needs very well. Therefore, in this research, Prescan is selected for the virtual scenario construction as shown in Figure 3, as well as the sensor-in-the-loop model. Unity3D is actually a game development software driven by unreal engine; the virtual scene built with Unity3D is more realistic than that of Prescan. Therefore, we also tried to build some virtual scenes with Unity3D, as shown in Figure 4.Figure 3
Virtual scenarios built with Prescan used in this study.Figure 4
Virtual scenarios constructed with Unity3D.No matter which software our virtual scene is built with, the way they connect to the developed AVIL platform is the same. The virtual scene always serves as the server, and the AV under test and driving simulators play the role of clients connected to the virtual scene through LAN to realize data interaction. The AV performs different driving strategies according to the driving environment or driving tasks in the virtual scene. The driving state of the AV and driving simulators will drive the vehicles in the virtual scene concurrently.It can be seen that the Unity3D-built virtual scene is more realistic than Prescan, the model is more refined, and it has a variety of customizable features. Most notably, Prescan does not support virtual reality (VR), while Unity3D does, making it possible to perform an immersive driving experience with VR helmets. Our AVIL platform is very inclusive. According to different testing requirements, we could pick up the most appropriate simulation software as the server.


### 2.3. Sensor in AVIL

Sensor data simulation and injection realize the virtual sensor’s sensing function by using sensor-in-the-loop (SIL) test method, such as camera simulator, millimeter-wave (MMW) radar, and LiDAR simulator. In our proposed AVIL simulation platform, sensors-related black boxes are customized. They are not one of-the-shelves components, nor just a concept. They are one of the independent parts of our AVIL simulation platform. Figure5 shows a flowchart of the SIL simulation. In AVIL test, the black boxes are next to the cabinet on the right side of Figure 6.Figure 5
Flowchart of SIL simulation.Figure 6
A snapshot of AVIL test. (a) Inner viewpoint. (b) External viewpoint.
(a)(b)In the actual road test process, the braking is triggered by the developed AEB system relying on radar in this research. Therefore, during the AVIL test, we still use the real radar sensor to activate the developed AEB system to ensure the homogeneity of the AVIL test process and the real road test process. Taking the MMW radar black box as an example (workflow shown in Figure7), the virtual scene information is converted into a real millimeter wave (SignalA) through a certain algorithm and hardware and then transmitted through a transmitter. The real radar is detached from the AV and placed in the black box, and a special material covers the black box. This material can absorb millimeter wave without generating echoes, meaning that real radar cannot receive the echo wave emitted by itself when it hits this material. Therefore, in the black box, only SignalA exists and can be received by the real radar sensor, thus realizing the interaction between the real radar and virtual scene and eliminating the influence of the black box on the real radar at the same time.Figure 7
The workflow of MMW radar black box. There are two small red circles in this figure, referring to the position of the transmitter. The blue ones with bumps are special absorbing materials. In AVIL test, the real radar is detached from the AV and placed in the black box, as shown in the figure.It has been verified but not shown in this paper that the black box does interfere with the real radar sensor, such as detection noise, if this special absorption material is not applied. It is also a research gap worthy of study and discussion, that is, in the case of interference, for the algorithm or system robustness research, since we can effectively model different scenarios by changing the material coverage and the attitude of the actual radar.


## 2.1. Hardware in AVIL

The most important hardware equipment is that we have customized a three degrees-of-freedom test bench consisting of four independent components (shown in Figure2) and can interact with the virtual scene through its specific communication protocol. The test bench in the AVIL platform can efficiently use the simulation environment to avoid the potential risks of real road tests. The rotating tires are the tires of the AV under test. The drum roller has two working modes, active and passive. Passive mode means that it rotates with the longitudinal rotation of the AV’s tires, while active mode means that it can rotate spontaneously after power on. Through the combination of these two modes, the continuous road surface is simulated, as well as the ground adhesion coefficient. The role of the lifter is to simulate the geometric characteristics of the ground, to simulate the slope road surface through the height difference between the front and rear lifters, and to add a degree of freedom to AV under test. Regarding the gear, it adds another degree of freedom to AV under test. It only has the passive working mode; that is, it can only rotate with the lateral rotation of the AV’s tires, providing the possibility for steering, as well as the safety guarantee for steering operation. Specifications of our test bench are given in Table 1.Figure 2
The structure of the test bench. (a) Top view. (b) Subcomponent.Table 1
Specifications of the test bench.
ParameterValueWheelbase2550 mm–2720 mmTrack width1225 mm–1825 mmDrum configuration4-wheel independent driveDrum diameter318 mm in front; 452 mm in rearTotal peak power80 KWTraction force3500 N in frontResponse time≤ 200 msMaximum velocity60 km/hLifter range0.6 mGear angle−35°–35°Slope angle−15°–15°Rated torque600 NmWe have deployed some driving simulators [28], as shown in Figure 1, which are also connected to our testbed through C/S mode as clients. The driving simulator makes the background vehicle in the virtual scenarios behave more realistically without following a predetermined route. In this way, while reducing the programming workload, uncertain factors such as driving intention and driving behavior can be quickly and easily introduced. The effectiveness of driving simulators has been verified via experiments, which does not show up in this research. Although it is interesting and worthy of discussion, it is beyond the scope of this research and will be discussed and applied in our follow-up research.The other hardware devices in the simulation loop, such as sensors, actuators, processors, and communication buses, can significantly reduce the mathematical modeling effort and improve the simulation fidelity. The development efficiency can be dramatically increased in the early stages of designing the production-intent or production-ready hardware and software.A real AV, test bench, radar simulator, video black box, several actuators, and sensors are connected to one or two of the USBCAN buses, net cable, or RS232. An actual AV is brought in to conduct the simulation and evaluation with greater fidelity under the lab settings, from which we can test whether the processors, sensors, actuators, and bus protocols normally work according to the design specifications of various aspects of hardware and software. This is particularly beneficial for testing, debugging, and verifying such a complex AV system in the laboratory environment.


## 2.2. Software in AVIL

The AVIL simulation consists of both mathematical models and physical hardware devices that interact in real time through specific interfaces and perform joint hardware testing and software simulation tasks. Under the AVIL simulation, math models receive various hardware signals, and the hardware devices receive calculated variables from the math models simultaneously. For software model-driven hardware systems, by ensuring computational efficiency and model fidelity, mathematical models with real-time capabilities are critical to the success of the AVIL simulation.Our AVIL simulation platform is developed based on C/S mode. Various submodules are connected through LAN. That is, they can work together to complete joint tasks as well as run independently. Therefore, our virtual scene module can be supported by different simulation software [29], such as Prescan, Unity3D, Carla, and CarMake. Prescan is an automatic driving simulation platform for intelligent vehicle system based on physical models, which has a good built-in vehicle dynamics model and supports the development and application of camera, radar, LiDAR, GPS, V2X communication, and other applications, as well as model-in-the-loop, software-in-the-loop, HIL, and sensor-in-the-loop. Prescan fits our research needs very well. Therefore, in this research, Prescan is selected for the virtual scenario construction as shown in Figure 3, as well as the sensor-in-the-loop model. Unity3D is actually a game development software driven by unreal engine; the virtual scene built with Unity3D is more realistic than that of Prescan. Therefore, we also tried to build some virtual scenes with Unity3D, as shown in Figure 4.Figure 3
Virtual scenarios built with Prescan used in this study.Figure 4
Virtual scenarios constructed with Unity3D.No matter which software our virtual scene is built with, the way they connect to the developed AVIL platform is the same. The virtual scene always serves as the server, and the AV under test and driving simulators play the role of clients connected to the virtual scene through LAN to realize data interaction. The AV performs different driving strategies according to the driving environment or driving tasks in the virtual scene. The driving state of the AV and driving simulators will drive the vehicles in the virtual scene concurrently.It can be seen that the Unity3D-built virtual scene is more realistic than Prescan, the model is more refined, and it has a variety of customizable features. Most notably, Prescan does not support virtual reality (VR), while Unity3D does, making it possible to perform an immersive driving experience with VR helmets. Our AVIL platform is very inclusive. According to different testing requirements, we could pick up the most appropriate simulation software as the server.


## 2.3. Sensor in AVIL

Sensor data simulation and injection realize the virtual sensor’s sensing function by using sensor-in-the-loop (SIL) test method, such as camera simulator, millimeter-wave (MMW) radar, and LiDAR simulator. In our proposed AVIL simulation platform, sensors-related black boxes are customized. They are not one of-the-shelves components, nor just a concept. They are one of the independent parts of our AVIL simulation platform. Figure5 shows a flowchart of the SIL simulation. In AVIL test, the black boxes are next to the cabinet on the right side of Figure 6.Figure 5
Flowchart of SIL simulation.Figure 6
A snapshot of AVIL test. (a) Inner viewpoint. (b) External viewpoint.
(a)(b)In the actual road test process, the braking is triggered by the developed AEB system relying on radar in this research. Therefore, during the AVIL test, we still use the real radar sensor to activate the developed AEB system to ensure the homogeneity of the AVIL test process and the real road test process. Taking the MMW radar black box as an example (workflow shown in Figure7), the virtual scene information is converted into a real millimeter wave (SignalA) through a certain algorithm and hardware and then transmitted through a transmitter. The real radar is detached from the AV and placed in the black box, and a special material covers the black box. This material can absorb millimeter wave without generating echoes, meaning that real radar cannot receive the echo wave emitted by itself when it hits this material. Therefore, in the black box, only SignalA exists and can be received by the real radar sensor, thus realizing the interaction between the real radar and virtual scene and eliminating the influence of the black box on the real radar at the same time.Figure 7
The workflow of MMW radar black box. There are two small red circles in this figure, referring to the position of the transmitter. The blue ones with bumps are special absorbing materials. In AVIL test, the real radar is detached from the AV and placed in the black box, as shown in the figure.It has been verified but not shown in this paper that the black box does interfere with the real radar sensor, such as detection noise, if this special absorption material is not applied. It is also a research gap worthy of study and discussion, that is, in the case of interference, for the algorithm or system robustness research, since we can effectively model different scenarios by changing the material coverage and the attitude of the actual radar.


## 3. AVIL Feasibility Analysis

In this section, the fundamental equations of the excellent U-K theory are illustrated at first. AEB control algorithm based on U-K approach is then proposed. Further, AVIL effectiveness is demonstrated.


### 3.1. The U-K Approach

In nature, all motions follow Newton’s second law, and the generalized form of the equation of motion can be described as(1)F=ma,where F is the total force exerting on the system, m is the mass, and a is the acceleration.The motion equation of U-K mechanics for an unconstrained system can be obtained by Newtonian mechanics, which can be written in the form of(2)Mq,tq¨=Qq,q˙,t,where M is a positive definite inertia n×n matrix, q is the coordinate which is an n-vector, q˙ is the velocity, q¨ is the acceleration, t is the independent variable and generally refers to time, and Q is the force imposed on the system [30].From equation (2), the generalized acceleration denoted by aq,q˙,t of the unconstrained system at time t can be obtained.(3)q¨=M−1q,tQq,q˙,t=aq,q˙,t.There are inevitably some constraints presented in the system that need to be considered. These constraints can be roughly divided into two types, such asm holonomic constraints which can perform differential twice in the form of(4)φiq,t=0,i=1,2,…,m,and n nonholonomic constraints which can perform differential once in the form of(5)φjq,q˙,t=0,j=1,2,…,n.It is assumed that equations (4) and (5) are sufficiently smooth and consistent; we can obtain the nominal generalized form of the constraints by differentiating φiq,t twice and differentiating φjq,q˙,t once with regard to time t, given by(6)Aq,q˙,tq¨=bq,q˙,t,where A is a constraint matrix in the shape of m×n, q¨ denotes the quadratic differential of generalized coordinates, and b is an m-dimensional vector.The equation of motion with constraints can be obtained by combining equations (2) and (6). Additional “generalized forces of constraints” are applied to the system. Therefore, the actual motion equation of the constrained system can be written as(7)Mq,tq¨=Qq,q˙,t+Qcq,q˙,t,where Qc is the constraint force causing the change of the acceleration, which can be regarded as a set of control forces acting on the unconstrained system.In U-K equation, both ideal and nonideal constraints are considered in the system.Qc can be written in the form of(8)Qcq,q˙,t=Qidcq,q˙,t+Qnidcq,q˙,t,where Qidc and Qnidc indicate the ideal and nonideal constraint force vectors, respectively.Udwadia and Kalaba have been developed the nominal explicit expression ofQidc and Qnidc. As there is no nonideal constraint involved in the vehicle system studied in this paper, only the ideal constraint force vector is taken into consideration, and equation (8) can be rewritten as(9)Qc=Qidc=M1/2B+b−Aa,where B=AM−1/2, a=QM−1, and “+” represents Moore–Penrose generalized inverse [31].Substituting equation (9) into (7), the general equation of motion in U-K mechanics can be yielded(10)Mq¨=Q+M1/2B+b−Aa.


### 3.2. A Case Study of AEB

In the present study, a common driving scenario is used to define the AEB maneuver. As shown in Figure8, there are one vehicle and one pedestrian in the scenario. The vehicle is uniformly traveling along the straight lane, while a pedestrian is crossing the road at a constant speed. Therefore, the vehicle needs to slow down to avoid collision with the pedestrian. This vehicle is equipped with on-board sensors that can sense the surroundings during the driving process. After perceiving the pedestrian, the vehicle conducts a risk assessment and then takes emergency braking if necessary, to avoid the traffic accident.Figure 8
A common car-to-pedestrian scenario.AxisAA' depicts the trajectory of the pedestrian, and BB' is the centerline of the vehicle. L is the impact position for 50% of scenarios, which is also the hypothetical origin. Let xr denote the lateral position of the vehicle head on the geodetic coordinates. Then, the nonlinear vehicle longitudinal dynamics model can be described as(11)x˙r=vrt,Mrv˙rt=urt−Fat−Frt,d=−xr,where t is the time and vr is the velocity. ur is the vehicle driving force input, which is to be designed. Mr represents the mass of the vehicle. Fa denotes the aerodynamic resistance. Fr is the other external disturbances working on the vehicle. d is the distance between the vehicle and pedestrian.Assuming that the final distance between the vehicle and the pedestrian isdd, the difference between the stopping position and the current vehicle position can be expressed as(12)ert=dd−d=dd+xr.Based on equations (11) and (12), the U-K equation of this specific problem can be constructed as(13)Mre¨rt=urt+Qe,e˙,t,where Qe,e˙,t=−Fa−Fr.According to our expectation, each time the vehicle is at a specific distance from the pedestriands, its velocity vs and deceleration as are consistent with our expectations. This constraint can be expressed as(14)dd˙=vs⟶0whends⟶ddorer⟶0.Equation (14) can be differentiated again to be expressed in the form of (6), given by(15)dd¨=as⟶0whends⟶ddorer⟶0,where Aq,q˙,t=1 and bq,q˙,t=as.SubstitutingA and b into equation (9), we have(16)Qc=Qidc=M1/2B+as−a,where the constraint force Qc can be viewed as a control input. The vehicle will move in the way we expected under the control law of equation (16).


### 3.3. Testing on the AVIL Simulation Platform

A simulation experiment was carried out using MATLAB to validate the effectiveness of the proposed AEB control algorithm. Specifications of our test bench have been displayed in Table1; as can be seen, due to the physical limitations of the machinery, only low-speed experiments can be feasibly performed at present. Therefore, only the simulation experiment under low-speed conditions will be verified here. We demonstrated medium-speed and high-speed verification in the “Discussion” section of this paper.To verify the efficiency of the developed AEB algorithm, it is specified that when braking starts, there is only braking action acting on the vehicle, and it will eventually stop. Besides, the ability of the pedestrian to avoid the crash is not taken into consideration.In the simulation,Fat can be estimated as Fat=c⋅vt⋅vt. The parameters of the simulation experiment are set as follows: Mr=1300 kg, c=0.6, and Fr=280 N. The simulation results are consistent with our expectations that, in the braking process, as the vehicle gets closer to the pedestrian, the deceleration of the vehicle will gradually increase. The deceleration and speed changes during braking are shown in Figures 9 and 10.Figure 9
Expected deceleration.Figure 10
Expected velocity.A group of 10 real road tests and AVIL tests were carried out, respectively. The braking time, braking distance, speed, and deceleration during braking are recorded for each test. Besides, the vehicle’s initial braking velocity is maintained between [28–30] km/h to ensure the safety of the experiments fully, and the vehicle was traveling at a uniform speed before braking. The results of the comparative experiments are shown in Figures 11–14. Please note that the velocity data are obtained from the vehicle’s OBD bus. The snapshot of AVIL test has been given in Figure 8.Figure 11
Time.Figure 12
Distance.Figure 13
Speed.Figure 14
Deceleration.Figures11 and 12 demonstrate that, in the AVIL experiments, the braking time and braking distance are incredibly similar to those of the actual road tests. The AVIL tests and actual road tests reach an average braking distance of 10.26 m and 10.32 m, respectively. 2.03 s and 1.94 s are the average braking time of AVIL tests and real road tests. Overall, the braking time in AVIL tests is marginally longer than in the actual road tests by about 0.1 seconds. The braking time is close to 2.05 s of the simulation results, on both the real road tests and AVIL tests, and the experiment data in each group are relatively concentrated and less fluctuated. As shown in Figure 12, the braking distance of real road tests is more focused and shifts slightly. In contrast, the data in AVIL tests vary largely, and the range is significantly more extensive than that of the real road tests. However, the average braking distance of the AVIL tests is close to that of the real road tests.Figures13 and 14 show a set of velocity and its corresponding deceleration from comparative tests. Observing Figures 13 and 14 simultaneously, the change of speed has a tendency to be concave, which is the same as the original design of our expectation; that is, the braking force gradually increases, which is also in line with the driving behavior of most drivers. The reason why the deceleration is not a smooth curve is that the AV selected in this study is a wire-controlled modification, in which the throttle valve can be directly operated through the control command. The interval between two consecutive braking commands should be no less than 0.3 seconds. Therefore, deceleration will increase each time the command is sent; otherwise, the deceleration will decrease, causing the variation.The big screen as shown in Figure10 is not part of any modules of our AVIL simulation platform. The purpose of setting such a big screen is as follows: (1) In the early development process and debugging process, to ensure safety, generally, the driver operates the vehicle instead of the program. The driver can perceive the current driving environment surroundings through the big screen and then perform operations. (2) To conduct research on driver or passenger driving experience in the future, test and evaluate different functions of AV. At this time, people in the vehicle need to know the current driving environment of the vehicle and the upcoming event, so as to not panic. (3) In the real test process, we tend to add a safety officer who does not usually take any driving behavior. When the AV is in an abnormal state or does not run as expected, the safety officer can terminate the test in time. For these above reasons, a big screen is needed.


## 3.1. The U-K Approach

In nature, all motions follow Newton’s second law, and the generalized form of the equation of motion can be described as(1)F=ma,where F is the total force exerting on the system, m is the mass, and a is the acceleration.The motion equation of U-K mechanics for an unconstrained system can be obtained by Newtonian mechanics, which can be written in the form of(2)Mq,tq¨=Qq,q˙,t,where M is a positive definite inertia n×n matrix, q is the coordinate which is an n-vector, q˙ is the velocity, q¨ is the acceleration, t is the independent variable and generally refers to time, and Q is the force imposed on the system [30].From equation (2), the generalized acceleration denoted by aq,q˙,t of the unconstrained system at time t can be obtained.(3)q¨=M−1q,tQq,q˙,t=aq,q˙,t.There are inevitably some constraints presented in the system that need to be considered. These constraints can be roughly divided into two types, such asm holonomic constraints which can perform differential twice in the form of(4)φiq,t=0,i=1,2,…,m,and n nonholonomic constraints which can perform differential once in the form of(5)φjq,q˙,t=0,j=1,2,…,n.It is assumed that equations (4) and (5) are sufficiently smooth and consistent; we can obtain the nominal generalized form of the constraints by differentiating φiq,t twice and differentiating φjq,q˙,t once with regard to time t, given by(6)Aq,q˙,tq¨=bq,q˙,t,where A is a constraint matrix in the shape of m×n, q¨ denotes the quadratic differential of generalized coordinates, and b is an m-dimensional vector.The equation of motion with constraints can be obtained by combining equations (2) and (6). Additional “generalized forces of constraints” are applied to the system. Therefore, the actual motion equation of the constrained system can be written as(7)Mq,tq¨=Qq,q˙,t+Qcq,q˙,t,where Qc is the constraint force causing the change of the acceleration, which can be regarded as a set of control forces acting on the unconstrained system.In U-K equation, both ideal and nonideal constraints are considered in the system.Qc can be written in the form of(8)Qcq,q˙,t=Qidcq,q˙,t+Qnidcq,q˙,t,where Qidc and Qnidc indicate the ideal and nonideal constraint force vectors, respectively.Udwadia and Kalaba have been developed the nominal explicit expression ofQidc and Qnidc. As there is no nonideal constraint involved in the vehicle system studied in this paper, only the ideal constraint force vector is taken into consideration, and equation (8) can be rewritten as(9)Qc=Qidc=M1/2B+b−Aa,where B=AM−1/2, a=QM−1, and “+” represents Moore–Penrose generalized inverse [31].Substituting equation (9) into (7), the general equation of motion in U-K mechanics can be yielded(10)Mq¨=Q+M1/2B+b−Aa.


## 3.2. A Case Study of AEB

In the present study, a common driving scenario is used to define the AEB maneuver. As shown in Figure8, there are one vehicle and one pedestrian in the scenario. The vehicle is uniformly traveling along the straight lane, while a pedestrian is crossing the road at a constant speed. Therefore, the vehicle needs to slow down to avoid collision with the pedestrian. This vehicle is equipped with on-board sensors that can sense the surroundings during the driving process. After perceiving the pedestrian, the vehicle conducts a risk assessment and then takes emergency braking if necessary, to avoid the traffic accident.Figure 8
A common car-to-pedestrian scenario.AxisAA' depicts the trajectory of the pedestrian, and BB' is the centerline of the vehicle. L is the impact position for 50% of scenarios, which is also the hypothetical origin. Let xr denote the lateral position of the vehicle head on the geodetic coordinates. Then, the nonlinear vehicle longitudinal dynamics model can be described as(11)x˙r=vrt,Mrv˙rt=urt−Fat−Frt,d=−xr,where t is the time and vr is the velocity. ur is the vehicle driving force input, which is to be designed. Mr represents the mass of the vehicle. Fa denotes the aerodynamic resistance. Fr is the other external disturbances working on the vehicle. d is the distance between the vehicle and pedestrian.Assuming that the final distance between the vehicle and the pedestrian isdd, the difference between the stopping position and the current vehicle position can be expressed as(12)ert=dd−d=dd+xr.Based on equations (11) and (12), the U-K equation of this specific problem can be constructed as(13)Mre¨rt=urt+Qe,e˙,t,where Qe,e˙,t=−Fa−Fr.According to our expectation, each time the vehicle is at a specific distance from the pedestriands, its velocity vs and deceleration as are consistent with our expectations. This constraint can be expressed as(14)dd˙=vs⟶0whends⟶ddorer⟶0.Equation (14) can be differentiated again to be expressed in the form of (6), given by(15)dd¨=as⟶0whends⟶ddorer⟶0,where Aq,q˙,t=1 and bq,q˙,t=as.SubstitutingA and b into equation (9), we have(16)Qc=Qidc=M1/2B+as−a,where the constraint force Qc can be viewed as a control input. The vehicle will move in the way we expected under the control law of equation (16).


## 3.3. Testing on the AVIL Simulation Platform

A simulation experiment was carried out using MATLAB to validate the effectiveness of the proposed AEB control algorithm. Specifications of our test bench have been displayed in Table1; as can be seen, due to the physical limitations of the machinery, only low-speed experiments can be feasibly performed at present. Therefore, only the simulation experiment under low-speed conditions will be verified here. We demonstrated medium-speed and high-speed verification in the “Discussion” section of this paper.To verify the efficiency of the developed AEB algorithm, it is specified that when braking starts, there is only braking action acting on the vehicle, and it will eventually stop. Besides, the ability of the pedestrian to avoid the crash is not taken into consideration.In the simulation,Fat can be estimated as Fat=c⋅vt⋅vt. The parameters of the simulation experiment are set as follows: Mr=1300 kg, c=0.6, and Fr=280 N. The simulation results are consistent with our expectations that, in the braking process, as the vehicle gets closer to the pedestrian, the deceleration of the vehicle will gradually increase. The deceleration and speed changes during braking are shown in Figures 9 and 10.Figure 9
Expected deceleration.Figure 10
Expected velocity.A group of 10 real road tests and AVIL tests were carried out, respectively. The braking time, braking distance, speed, and deceleration during braking are recorded for each test. Besides, the vehicle’s initial braking velocity is maintained between [28–30] km/h to ensure the safety of the experiments fully, and the vehicle was traveling at a uniform speed before braking. The results of the comparative experiments are shown in Figures 11–14. Please note that the velocity data are obtained from the vehicle’s OBD bus. The snapshot of AVIL test has been given in Figure 8.Figure 11
Time.Figure 12
Distance.Figure 13
Speed.Figure 14
Deceleration.Figures11 and 12 demonstrate that, in the AVIL experiments, the braking time and braking distance are incredibly similar to those of the actual road tests. The AVIL tests and actual road tests reach an average braking distance of 10.26 m and 10.32 m, respectively. 2.03 s and 1.94 s are the average braking time of AVIL tests and real road tests. Overall, the braking time in AVIL tests is marginally longer than in the actual road tests by about 0.1 seconds. The braking time is close to 2.05 s of the simulation results, on both the real road tests and AVIL tests, and the experiment data in each group are relatively concentrated and less fluctuated. As shown in Figure 12, the braking distance of real road tests is more focused and shifts slightly. In contrast, the data in AVIL tests vary largely, and the range is significantly more extensive than that of the real road tests. However, the average braking distance of the AVIL tests is close to that of the real road tests.Figures13 and 14 show a set of velocity and its corresponding deceleration from comparative tests. Observing Figures 13 and 14 simultaneously, the change of speed has a tendency to be concave, which is the same as the original design of our expectation; that is, the braking force gradually increases, which is also in line with the driving behavior of most drivers. The reason why the deceleration is not a smooth curve is that the AV selected in this study is a wire-controlled modification, in which the throttle valve can be directly operated through the control command. The interval between two consecutive braking commands should be no less than 0.3 seconds. Therefore, deceleration will increase each time the command is sent; otherwise, the deceleration will decrease, causing the variation.The big screen as shown in Figure10 is not part of any modules of our AVIL simulation platform. The purpose of setting such a big screen is as follows: (1) In the early development process and debugging process, to ensure safety, generally, the driver operates the vehicle instead of the program. The driver can perceive the current driving environment surroundings through the big screen and then perform operations. (2) To conduct research on driver or passenger driving experience in the future, test and evaluate different functions of AV. At this time, people in the vehicle need to know the current driving environment of the vehicle and the upcoming event, so as to not panic. (3) In the real test process, we tend to add a safety officer who does not usually take any driving behavior. When the AV is in an abnormal state or does not run as expected, the safety officer can terminate the test in time. For these above reasons, a big screen is needed.


## 4. Discussion

In the next few decades, road transport will undergo a significant revolution with the emergence of intelligent vehicle, such as AV, connected vehicle, and connected AV, which will certainly change the way we travel. In order to ensure the safe, reliable, and efficient operation of intelligent vehicles in different scenarios, a large number of tests must be carried out before deployment and implementation.Compared with other VIL testbeds, such as [22], the VIL-based chassis-dynamometer testbed named SERBER is introduced to test and evaluate advanced driver assistance systems (ADAS) of vehicles. Similarly, [32] studied ADAS with a full-scale vehicle and a VIL-based chassis-dynamometer testbed. The difference is that [32] uses moving bases to represent other traffic participants instead of using simulation, improving the results’ significance. The study [33] uses a VIL-based nonchassis-dynamometer simulator to study lane-keeping and cooperative cruise control function. Although significant results have been achieved on the simulator, the effectiveness of the proposed functions on the real vehicles still lacks consideration and evaluation.Although [22] achieves the interaction between the real vehicle and the virtual scene, it is not based on sensor-in-the-loop; therefore, the fidelity of the test remains to be discussed. Although [32] is based on the sensor-in-the-loop test, all test objects are real, which increases the cost, and there are problems such as the difficulty of completely reproducing the scene. Both of them have some common shortcomings, such as only one degree of freedom offered to the vehicle under test, the vehicle should be “fixed” on the chassis-dynamometer, and no sensor simulation.The AVIL platform we proposed solves these problems completely. By using the customized bench, different subcomponents offer different degrees of freedom of the vehicle. They also guarantee the vehicle to perform various operations, and our vehicle does not need to be “fixed” on the bench. We also proposed a sensor-in-the-loop test method based on black boxes, which realizes the interaction between real sensors and virtual scenes. The most important feature is that our AVIL platform is easy to expand and maintain due to C/S mode. In this way, each submodule of the AVIL platform can be tested and debugged independently, and joint testing can also be performed on multiple submodules.It can be seen from Figures11–14 that the trends of all the two curves are almost the same, the data at each data collection moment is also similar, and the correlation of each group of data is more significant than 0.93. Therefore, the effectiveness of the AVIL simulation platform for testing the AV AEB system is confirmed. Since the initial braking speed fluctuates slightly each time, this leads to the fluctuation of braking distance and braking time. Although the fluctuation range of the braking distance of AVIL tests in Figure 12 is larger than that of actual road tests, this problem will be eventually solved by improving the platform and adjusting the parameters.The experimental results show that when the initial braking speed is 30 km/h, the braking time is very close to the simulation experiment, and the similarity is more than 94%. The change in velocity has a small convex trend in the first half of the curve, similar to that in Figure9. Due to the limitation of our AV, we set the maximum limit for the control of the throttle in the experiments. As a result, there is a trend of uniform speed change in the second half of the curve. The deceleration will tend to be approaching a constant value corresponding to this feature. The deceleration is not a smooth curve because the control of the throttle valve is similar to the piston. When the braking command is issued, the piston pushes in, the braking force increases, and the deceleration increases. During the empty window period of the two braking commands (0.3 s mentioned in Section 3.3), the piston will move outward. The braking force decreases, causing the decrease of deceleration, resulting in deceleration fluctuations.Regarding the performance of the AEB control algorithm we proposed in medium-speed and high-speed conditions, we conducted simulation experiments, and the results are shown in Figures15 and 16. As shown in these figures, the AEB control algorithm we proposed is still applicable to medium-speed and high-speed situations. Reasons accounting for only performing the low-speed experiment in the proposed AVIL platform are as follows:(1)
Due to the physical limitations of the test bench itself, the medium-speed and high-speed experiment cannot be carried out on our AVIL platform at present(2)
Based on reason (1) and also to fully ensure the safety of the experiment, the 1/2 of the maximum speed limit is determined, that is, 30 km/hFigure 15
Expected deceleration.Figure 16
Expected velocity.Carrying out actual road tests is not only time-consuming and laborious [34], but many practical factors such as weather conditions, illumination conditions, and ground geometry conditions are uncontrollable. Moreover, dangerous scenario testing is difficult, and its reproduction is complicated. Based on the developed indoor AVIL simulation platform, these become much easier. For example, we can add snow, rain, and fog models directly to the test scenario, change the behavior of traffic participants, or seamlessly switch the test scenarios. All of these will be truly reflected in the real AV based on our VR interaction method.Compared with performing actual road tests or building a closed field, it is more efficient to construct an AVIL simulation platform in which uncertain factors can be controllable, and the test scenes are flexible, variable, and safe. As depicted in Figure3, it is effortless to change the model, behavior, and other properties of the testing objects. By changing the model of the testing object, the properties of the object, such as length and height, can be changed; it can also easily change the operating behavior of the testing object, such as changing the trajectory or triggering interactive events. Some of the most basic metatest scenarios have been constructed as shown in Figure 4, such as curve lane, tunnel lane, and intersection lane, which can be switched at will and combined arbitrarily to build more complex test scenarios. Although it is still worth arguing whether the testing results in these scenarios still have high fidelity, it is undeniable that the AV testing method based on the AVIL simulation platform constructed in this paper has the potential to replace AV real road tests. Thus, AVIL-based AV testing might become an efficient and influential approach for real AV testing.


## 5. Conclusion

It is difficult to test real AV under harsh conditions. Using AVIL simulation platform under the laboratory environment to test real AV becomes an apparent alternative. In this paper, we developed an indoor full-scale AV test platform, which has the following advantages:(1)
This platform is designed as C/S mode so that each submodule can perform joint tasks and work independently, which is convenient for this platform expansion, debug, and maintenance.(2)
The test bench is mainly composed of four independent submodules as shown in Figure2. Each submodule contains a drum roller, lifter, and gear components as shown in the figure, and each component has its corresponding role. In addition to offering freedom for AV, the drum roller can simulate continuous road surface and different road adhesion coefficient, gear can provide AV with the safety guarantee for steering operation, and lifter can simulate slop road surface.(3)
We designed a black box-based sensor data injection method to achieve sensor simulation, making it possible to interact between real sensors and virtual scenes. We designed and customized the MMW radar black box, and its feasibility has been verified.In order to demonstrate the feasibility of the proposed AVIL simulation platform, we developed AEB system relying on MMW radar and then designed and conducted a comparison test between real road test and AVIL test. The results of these tests are encouraging as shown in Figures11–14. The AVIL-based test results of AEB have a high similarity to those of the real road test. These results confirm the possibility that our proposed indoor AVIL simulation platform has a great potential to be used to substitute for the real road test, at least in the aspect of AEB test.In the future, our team will focus on the following two aspects. First, restricted by the test bench, only the feasibility of the proposed AVIL platform for testing the AEB system at low speed under simple operating conditions has been demonstrated. Our next-generation test bench is currently under construction, and compared with the current test bench, its response time is only one-third, and the maximum speed of the vehicle can reach 120 km/h. Therefore, our team will discuss the feasibility of the AVIL platform with the new test bench for testing the performance of the AEB system under high-speed and extreme conditions. Second, our team will investigate the effectiveness of other applications with the same functions as AEB, such as V2X communication or steering avoidance, as it is therefore not possible to quantify the relative effectiveness of AEB compared to other competing technologies.



---

*Source: 8872889-2021-04-20.xml*