Automobile control algorithm test method and device, electronic equipment and storage medium
By determining the first algorithm and parameter group to build a test environment, the problem of traditional methods relying on expert level is solved, and autonomous driving tests that generate dangerous driving scenarios faster are achieved.
Patent Information
- Application Number
- CN202510861294.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional methods rely on the level of technical experts when building a test environment for automotive control algorithms, making it difficult to ensure the testing needs of autonomous vehicles.
By determining the first algorithm and the first parameter group, a first environment is constructed for testing. The first algorithm is a vehicle control algorithm for simulation testing under the first vehicle condition. The first parameter group consists of the first vehicle speed, the second vehicle speed, the first distance and the second parameter, which meets specific conditions and is used to build a vehicle simulation test environment.
It can generate more dangerous driving scenarios faster and have a higher probability of occurring in real life, improving the efficiency of self-driving car testing.
Smart Images

Figure CN120491620A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of driving simulation testing, and in particular to a method, device, electronic equipment and storage medium for testing an automobile control algorithm. Background Art
[0002] Autonomous vehicles have significant advantages in terms of traffic efficiency and fuel emissions, but the complexity of traffic scenarios makes autonomous vehicles vulnerable to safety issues. Currently, autonomous vehicle testing mainly relies on virtual simulation testing and real vehicle testing.
[0003] Efficiently constructing reasonable scenarios is the foundation of simulation testing. Typical scenario construction methods leverage expert experience to simulate scenarios. However, the quality of these scenarios is highly dependent on the expertise of technical experts, making it difficult to meet the testing requirements of autonomous vehicles. Summary of the Invention
[0004] The present invention provides a method, device, electronic device and storage medium for testing an automobile control algorithm to solve the problem that traditional methods of constructing an automobile control algorithm testing environment rely on the level of technical experts and are difficult to meet the testing requirements of autonomous driving vehicles.
[0005] According to one aspect of the present invention, a method for testing an automobile control algorithm is provided, the method comprising:
[0006] Determining a first algorithm, where the first algorithm is a vehicle control algorithm that is simulated and tested under a first vehicle condition, where the first vehicle is merging into a lane where a second vehicle is located, and the first vehicle is located ahead of the second vehicle during the merging process;
[0007] Determine a first parameter group, the first parameter group consisting of first parameters, the first parameters in the first parameter group being divided into a first vehicle speed, a second vehicle speed, a first distance, and a second parameter, the first vehicle speed being the speed of the first vehicle, the second speed being the speed of the second vehicle, the first distance being the distance between the first vehicle and the second vehicle, the second parameter being the friction coefficient of the road surface on which the first vehicle and the second vehicle are traveling, the first parameter group satisfying a first condition, the first condition being that each first parameter corresponds to each first parameter within a preset parameter range corresponding to each first parameter corresponding to each first parameter corresponding to each third parameter, the third parameter being obtained by multiplying the first time difference by the fourth parameter, the first time difference being the time difference between the first vehicle and the second vehicle from the current time to the time of collision, the fourth parameter being the probability of occurrence of the first time difference within the preset parameter range corresponding to each first parameter; the first third parameter being the largest third parameter among each third parameter within the preset parameter range corresponding to each first parameter;
[0008] According to the first parameter group, a first environment is constructed, and the first algorithm is tested according to the first environment; the first environment is a vehicle simulation test environment.
[0009] According to another aspect of the present invention, there is provided an automobile control algorithm testing device, the device comprising:
[0010] a first algorithm determination module, configured to determine a first algorithm, wherein the first algorithm is a vehicle control algorithm simulated and tested under a first vehicle condition, wherein the first vehicle condition is a first vehicle merging into a lane occupied by a second vehicle, and the first vehicle is located ahead of the second vehicle during the merging process;
[0011] a first parameter determination module for determining a first parameter group, the first parameter group consisting of first parameters, the first parameters in the first parameter group being divided into a first vehicle speed, a second vehicle speed, a first distance, and a second parameter, the first vehicle speed being the speed of the first vehicle, the second vehicle speed being the speed of the second vehicle, the first distance being the distance between the first vehicle and the second vehicle, the second parameter being the friction coefficient of the road surface on which the first vehicle and the second vehicle are traveling, the first parameter group satisfying a first condition, the first condition being that each first parameter corresponds to each first parameter within a preset parameter range corresponding to each first parameter corresponding to each first parameter and each third parameter, the third parameter being obtained by multiplying a first time difference by a fourth parameter, the first time difference being the time difference between the first vehicle and the second vehicle from the current time to the time of collision, the fourth parameter being the probability of occurrence of the first time difference within the preset parameter range corresponding to each first parameter; the first and third parameters being the largest third parameter among each third parameter within the preset parameter range corresponding to each first parameter;
[0012] The first algorithm testing module is used to construct a first environment according to the first parameter group and test the first algorithm according to the first environment; the first environment is a vehicle simulation test environment.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the automobile control algorithm testing method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement the automobile control algorithm testing method of any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention can generate more dangerous driving scenarios with a high probability of occurring in real life more quickly by determining a first algorithm; determining a first parameter group, and finally constructing a first environment based on the first parameter group, and testing the first algorithm based on the first environment, thereby accelerating the testing process of autonomous driving vehicles.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a flow chart of a method for testing an automobile control algorithm according to a first embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of a first working condition applicable to an embodiment of the present invention;
[0023] Figure 3 This is a schematic structural diagram of an automobile control algorithm testing device provided according to a third embodiment of the present invention;
[0024] Figure 4 The present invention is a schematic diagram of an electronic device for implementing the automobile control algorithm testing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Example 1
[0028] Figure 1 A flowchart of a method for testing an automobile control algorithm is provided for the first embodiment of the present invention. This embodiment is applicable to the case of constructing a dangerous scenario to test an automobile control algorithm. The method can be executed by an automobile control algorithm testing device. The automobile control algorithm testing device can be implemented in the form of hardware and / or software. The automobile control algorithm testing device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:
[0029] S110. Determine a first algorithm, where the first algorithm is a vehicle control algorithm that is simulated and tested under a first vehicle condition. The first vehicle condition is that a first vehicle is merging into a lane where a second vehicle is located, and the first vehicle is located in front of the second vehicle during the merging process.
[0030] The first algorithm is an algorithm for performing a vehicle control test under a first operating condition. Expected results of the test of the first algorithm vary depending on the type of the first algorithm.
[0031] See also Figure 2 , Figure 2 In a traffic accident, the first vehicle is in a lane adjacent to the second vehicle and attempts to merge into the lane occupied by the second vehicle. If the first vehicle completes the lane merge and the first vehicle and the second vehicle do not collide, the first vehicle is located ahead of the second vehicle after the lane merge is completed.
[0032] S120: Determine a first parameter group.
[0033] The first parameter group is composed of the first parameter. The first parameter in the first parameter group is divided into the first vehicle speed, the second vehicle speed, the first distance and the second parameter. The first vehicle speed is the speed of the first vehicle, the second speed is the speed of the second vehicle, the first distance is the distance between the first vehicle and the second vehicle, and the second parameter is the friction coefficient of the road surface on which the first vehicle and the second vehicle are traveling. The first parameter group satisfies the first condition. The first condition is that each first parameter corresponds to each first parameter within the preset parameter range corresponding to the first and third parameters. The third parameter is obtained by multiplying the first time difference by the fourth parameter. The first time difference is the time difference between the first vehicle and the second vehicle from the current time to the time of collision. The fourth parameter is the probability of occurrence of the first time difference within the preset parameter range corresponding to each first parameter; the first and third parameters are the largest third parameters among the third parameters within the preset parameter range corresponding to each first parameter.
[0034] Under the first operating condition, all tested first algorithms need to focus on the collision between the first and second vehicles. Therefore, a first time difference is determined based on the first vehicle speed, the second vehicle speed, and the first distance. Based on the Gaussian model, the probabilities corresponding to each first time difference are determined, and the third parameters corresponding to different first time differences are determined. The largest third parameter is then determined from among the third parameters as the first third parameter. Due to different ground friction coefficients, the corresponding vehicle braking distances vary. Therefore, based on the first and third parameters, it is determined that the first and third parameters correspond to at least one first parameter group, and that the first parameter group contains the second parameter.
[0035] In an optional solution, determining the first parameter group may include steps A1-A3:
[0036] Step A1: Determine the preset parameter range corresponding to each first parameter.
[0037] Step A2: Based on the particle swarm algorithm, determine the largest third parameter within the preset parameter range corresponding to each first parameter as the first third parameter, and form each first parameter corresponding to the first third parameter into the first parameter group.
[0038] The particle swarm optimization algorithm (PSO) is an optimization algorithm based on swarm intelligence. It treats each candidate solution as a particle. The particle flies through the solution space and adjusts its position by tracking two extreme values: the individual extreme value (pbest) and the global extreme value (gbest). The individual extreme value (pbest) is the particle's own best historical position, while the global extreme value (gbest) is the best historical position of the entire swarm.
[0039] According to the particle swarm algorithm, within the preset parameter range of each preset first parameter, the third parameters corresponding to different first parameter combinations are found, and the largest third parameter is determined as the first third parameter, and the first parameters corresponding to the first third parameter are formed into a first parameter group.
[0040] Since the particle swarm algorithm has a fast convergence effect, the particle swarm algorithm can quickly complete the determination of the first and third parameters. In addition, due to its strong global search capability, it can improve the accuracy of the first and third parameters, thereby avoiding the problem of determining the first and third parameters in the local optimal solution, which leads to large errors in the first and third parameters.
[0041] In an optional solution, based on the particle swarm algorithm, determining the largest third parameter within the preset parameter range corresponding to each first parameter as the first third parameter may include steps B1-B4:
[0042] Step B1: construct a first parameter space according to the preset parameter ranges corresponding to the first parameters; the dimensions of the first parameter space are the first vehicle speed, the second vehicle speed, the first distance, and the second parameter.
[0043] Step B2: equally divide the first parameter space to obtain at least one second parameter space.
[0044] Step B3: randomly obtain a second parameter group in the second parameter space, and determine a third parameter corresponding to the second parameter group.
[0045] Step B4: After determining the third parameter corresponding to the second parameter group, store the individual extreme value and the global extreme value of the current stage, and redetermine the second parameter group in the next stage, and update the individual extreme value and the global extreme value until the global extreme values of the two adjacent stages are the same. Then, use the global extreme value as the first parameter group corresponding to the first and third parameters, and use the third parameter corresponding to the first parameter group as the first and third parameters.
[0046] When using the particle swarm algorithm to calculate the first and third parameters, it is necessary to first generate a first parameter space based on the preset parameter ranges corresponding to each first parameter. The dimension of this first parameter space is the same as the number of first parameters. In this application, the first parameters are the first speed, the second speed, the first distance, and the second parameter, so the dimension of the first parameter space is four.
[0047] Optionally, the first parameter group may further include a first vehicle merging angle.
[0048] To prevent all solutions found by the particle swarm algorithm from being located in the same region of the first parameter space, the first parameter space is divided equally to obtain at least one second parameter space, and a second parameter group is determined in each of the second parameter spaces.
[0049] The third parameter corresponding to the second parameter group can be calculated based on each parameter in the second parameter group, wherein the calculation method of the third parameter based on the second parameter group is the same as the calculation method of the third parameter based on the first parameter group.
[0050] Determine the individual extreme value and the global extreme value when determining the second parameter group in the current stage, and re-determine the second parameter group in the next stage and update the individual extreme value and the global extreme value until the global extreme value of two adjacent stages is the same, then stop updating the individual extreme value and the global extreme value, and use the global extreme value as the first parameter group corresponding to the first and third parameters, and use the third parameter corresponding to the first parameter group as the first and third parameters.
[0051] By continuously updating individual extreme values and global extreme values, the determined second parameter group can gradually approach the first parameter group, and finally obtain a more accurate first parameter group. By comparing the global extreme values of two adjacent stages, it is possible to avoid calculating the second parameter group as the first parameter group when the first parameter group has not yet been determined, which affects the simulation model finally constructed.
[0052] Based on the above embodiment, optionally, re-determining the second parameter group may include steps C1-C2:
[0053] Step C1: Adjust the particle velocity vector and particle position vector when randomly acquiring the second parameter group.
[0054] Step C2: reacquire the second parameter group in each second parameter space according to the adjusted particle velocity vector and position vector.
[0055] When the second parameter group is re-acquired in the next stage, the particle velocity vector and particle position vector of the particle at the time of acquisition are adjusted, and the position of the particle in the next stage is used as the second parameter group.
[0056] Among them, the update expression of the particle position vector is:
[0057] x i =x i-1 +u i-1 ;
[0058] Where i is the total number of particles; x represents the particle position vector, and u represents the particle velocity vector.
[0059] The expression of the particle velocity vector is:
[0060] u i =u i-1 +c1×rand()×(pbest i-1 -x i-1 )+c2×rand()×(gbest-x i-1 );
[0061] Where i is the total number of particles; x represents the particle position vector, u represents the particle velocity vector; c1 and c2 are pre-calibrated learning factors; rand() represents a random number between 0 and 1; p represents the scene probability; pbest represents the individual extreme value; gbest represents the group extreme value.
[0062] S130: Construct a first environment according to the first parameter group, and test the first algorithm according to the first environment; the first environment is a vehicle simulation test environment.
[0063] After obtaining the first parameter group, a model can be created in simulation software according to each first parameter in the first parameter group to obtain a first environment, and the first algorithm can be tested according to the first environment.
[0064] By constructing the first environment and testing the first algorithm, the first algorithm can be tested in the most likely dangerous scenario under the first working condition, thereby improving the testing effect of the first algorithm.
[0065] By adopting the technical solution of the present application, by determining the first algorithm; determining the first parameter group, and finally constructing the first environment based on the first parameter group, and testing the first algorithm based on the first environment, more dangerous driving scenarios with a high probability of occurring in real life can be generated more quickly, which can speed up the testing process of autonomous driving vehicles.
[0066] Example 2
[0067] This embodiment further illustrates the above embodiment based on the above embodiment. The vehicle control algorithm testing method of this embodiment may include the following steps:
[0068] Determine the preset parameter ranges corresponding to the first parameters in the first parameter group:
[0069] v∈[0,36]m / s, Δv∈[-15,15]m / s, Δd∈[0,100]m, μ∈[0.4,0.9];
[0070] Wherein, v represents the first vehicle speed, Δv represents the speed difference between the first vehicle speed and the second vehicle speed, Δd represents the first distance, and μ represents the second parameter. For example, the first algorithm is the AEB algorithm.
[0071] Select the initial population size N, the number of iterations T, and the individual optimal value P best and the group optimal value G best In the scenario where the front car cuts in, select the initial population size N = 5, the number of iterations T, and the individual optimal value P best and the group optimal value G best Use Latin hypercube method to sample initial particle position X i=(x1,x2,x3,x4,x5),x i =[v i ,Δv i ,Δd i ,μ i ], first divide the parameter space into 5 equal parts, and then sample evenly in each divided space to ensure that the distribution of the initial particles is reasonable and uniform. The flight speed of each particle is expressed as U i =(u1,u2,u3,u4,u5). After each particle is acquired, the third parameter corresponding to each particle is determined. The third parameter expression is:
[0072] f = TTC × p;
[0073] Wherein, f represents the third parameter; TTC represents the first time difference; and p represents the probability of the first time difference occurring.
[0074] Individual extreme value P best and the group extreme value G best Store and update individual extreme value P at the same time best and the group extreme value G best , in the iterative update process, the same group extreme value G appears repeatedly best , the update is stopped.
[0075] The particle velocity update formula of the particle swarm algorithm is as follows each time it is iterated:
[0076] u i =u i +c1×rand()×(pbest i -x i )+c2×rand()×(gbest-x i );
[0077] Among them, the particle position update formula is as follows:
[0078] x i =x i +u i ;
[0079] Where i is the total number of particles, rand() is a random number between 0 and 1, c1 and c2 are learning factors, representing the degree of cognition of the self-cognition item and the group cognition item, respectively. In the present invention, c1=2 and c2=1.2 are set.
[0080] After multiple rounds of iterative updates, the first parameter group can be obtained. Based on the first parameter group, the algorithm is built in Matlab / Simulink, and the vehicle longitudinal dynamics model and road friction coefficient settings are constructed through Carsim to obtain the first environment. In this environment, the first algorithm is tested.
[0081] Example 3
[0082] Figure 3 The present invention provides a structural block diagram of an automobile control algorithm testing device. This embodiment is applicable to the situation where dangerous scenarios are constructed to test automobile control algorithms. The automobile control algorithm testing device can be implemented in the form of hardware and / or software. The automobile control algorithm testing device can be configured in an electronic device with data processing capabilities. Figure 3 As shown, the automobile control algorithm testing device of this embodiment may include: a first algorithm determination module 310, a first parameter determination module 320 and a first algorithm testing module 330. Among them:
[0083] A first algorithm determination module 310 is configured to determine a first algorithm, where the first algorithm is a vehicle control algorithm that is simulated and tested under a first vehicle condition, where the first vehicle is merging into a lane occupied by a second vehicle, and the first vehicle is located ahead of the second vehicle during the merging process.
[0084] A first parameter determination module 320 is configured to determine a first parameter group, wherein the first parameter group is composed of first parameters, wherein the first parameters in the first parameter group are divided into a first vehicle speed, a second vehicle speed, a first distance, and a second parameter, wherein the first vehicle speed is the speed of the first vehicle, the second speed is the speed of the second vehicle, the first distance is the distance between the first vehicle and the second vehicle, and the second parameter is the friction coefficient of the road surface on which the first vehicle and the second vehicle are traveling. The first parameter group satisfies a first condition, wherein the first condition is that each first parameter corresponds to each first parameter within a preset parameter range corresponding to a first third parameter, the third parameter is obtained by multiplying a first time difference by a fourth parameter, the first time difference being the time difference between the first vehicle and the second vehicle from the current time to the time of collision, and the fourth parameter being the probability of occurrence of the first time difference within the preset parameter range corresponding to each first parameter; and the first third parameter being the largest third parameter among each third parameter within the preset parameter range corresponding to each first parameter;
[0085] The first algorithm testing module 330 is used to construct a first environment according to the first parameter group and test the first algorithm according to the first environment; the first environment is a vehicle simulation test environment.
[0086] Based on the above embodiment, optionally, the first parameter determination module 320 includes:
[0087] Determining a preset parameter range corresponding to each first parameter;
[0088] Based on the particle swarm algorithm, the largest third parameter within the preset parameter range corresponding to each first parameter is determined as the first third parameter, and each first parameter corresponding to the first third parameter is grouped into the first parameter group.
[0089] Based on the above embodiment, optionally, based on a particle swarm algorithm, determining the largest third parameter within a preset parameter range corresponding to each first parameter as the first third parameter includes:
[0090] Constructing a first parameter space according to preset parameter ranges corresponding to the first parameters; wherein the dimensions of the first parameter space are the first vehicle speed, the second vehicle speed, the first distance, and the second parameter;
[0091] Evenly dividing the first parameter space to obtain at least one second parameter space;
[0092] randomly obtaining a second parameter group in the second parameter space, and determining a third parameter corresponding to the second parameter group;
[0093] After determining the third parameter corresponding to the second parameter group, the individual extreme value and the global extreme value of the current stage are stored, and the second parameter group is re-determined in the next stage, and the individual extreme value and the global extreme value are updated until the global extreme values of the two adjacent stages are the same. The global extreme value is used as the first parameter group corresponding to the first and third parameters, and the third parameter corresponding to the first parameter group is used as the first and third parameters.
[0094] Based on the above embodiment, optionally, re-determining the second parameter group includes:
[0095] Adjust the particle velocity vector and particle position vector when randomly obtaining the second parameter group;
[0096] The second parameter group is re-obtained in each second parameter space according to the adjusted particle velocity vector and position vector.
[0097] Based on the above embodiment, optionally, the update expression of the particle position vector is:
[0098] x i =x i-1 +u i-1 ;
[0099] Among them, x i Represents the particle position vector of particle i at the current stage; u i-1Represents the particle velocity vector of particle i in the previous stage.
[0100] Based on the above embodiment, optionally, the expression of the particle velocity vector is:
[0101] u i =u i-1 +c1×rand()×(pbest i-1 -x i-1 )+c2×rand()×(gbest-x i-1 );
[0102] Among them, u i represents the particle velocity vector of particle i at the current stage; c1 and c2 are pre-calibrated learning factors; rand() represents a random number between 0 and 1.
[0103] Based on the above embodiment, optionally, the expression of the third parameter is:
[0104] f = TTC × p;
[0105] Wherein, TTC is the first time difference; p is the fourth parameter.
[0106] The automobile control algorithm testing device provided in the embodiment of the present invention can execute the automobile control algorithm testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0107] Example 4
[0108] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0109] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0110] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0111] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the automotive control algorithm testing method.
[0112] In some embodiments, the vehicle control algorithm testing method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the vehicle control algorithm testing method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the vehicle control algorithm testing method in any other suitable manner (e.g., via firmware).
[0113] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0115] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0119] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0120] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for testing an automobile control algorithm, characterized in that: include: Determining a first algorithm, where the first algorithm is a vehicle control algorithm that is simulated and tested under a first vehicle condition, where the first vehicle is merging into a lane where a second vehicle is located, and the first vehicle is located ahead of the second vehicle during the merging process; Determine a first parameter group, the first parameter group consisting of first parameters, the first parameters in the first parameter group being divided into a first vehicle speed, a second vehicle speed, a first distance, and a second parameter, the first vehicle speed being the speed of the first vehicle, the second speed being the speed of the second vehicle, the first distance being the distance between the first vehicle and the second vehicle, the second parameter being the coefficient of friction of the road surface on which the first vehicle and the second vehicle are traveling, the first parameter group satisfying a first condition, the first condition being that each first parameter corresponds to each first parameter within a preset parameter range corresponding to a first third parameter, the third parameter being obtained by multiplying a first time difference by a fourth parameter, the first time difference being the time difference between the first vehicle and the second vehicle from the current time to the time of collision, and the fourth parameter being the probability of occurrence of each first parameter corresponding to the first time difference within the preset parameter range; The first third parameter is the largest third parameter among the third parameters corresponding to the preset parameter ranges of the first parameters; A first environment is constructed according to the first parameter group, and the first algorithm is tested according to the first environment; the first environment is a vehicle simulation test environment.
2. The method according to claim 1, characterized in that Determine a first parameter group, including: Determining a preset parameter range corresponding to each first parameter; Based on the particle swarm algorithm, the largest third parameter within the preset parameter range corresponding to each first parameter is determined as the first third parameter, and each first parameter corresponding to the first third parameter is grouped into the first parameter group.
3. The method according to claim 2, characterized in that Determining, based on a particle swarm algorithm, a maximum third parameter within a preset parameter range corresponding to each first parameter as the first third parameter includes: Constructing a first parameter space according to preset parameter ranges corresponding to the first parameters; wherein the dimensions of the first parameter space are the first vehicle speed, the second vehicle speed, the first distance, and the second parameter; Evenly dividing the first parameter space to obtain at least one second parameter space; randomly obtaining a second parameter group in the second parameter space, and determining a third parameter corresponding to the second parameter group; After determining the third parameter corresponding to the second parameter group, the individual extreme value and the global extreme value of the current stage are stored, and the second parameter group is re-determined in the next stage, and the individual extreme value and the global extreme value are updated until the global extreme values of the two adjacent stages are the same. The global extreme value is used as the first parameter group corresponding to the first and third parameters, and the third parameter corresponding to the first parameter group is used as the first and third parameters.
4. The method according to claim 3, characterized in that Re-determine the second parameter group, including: Adjust the particle velocity vector and particle position vector when randomly obtaining the second parameter group; The second parameter group is re-obtained in each second parameter space according to the adjusted particle velocity vector and position vector.
5. The method according to claim 4, characterized in that The update expression of the particle position vector is: x i =x i +u i ; Where i is the total number of particles; x represents the particle position vector, and u represents the particle velocity vector.
6. The method according to claim 4, characterized in that The expression of the particle velocity vector is: u i =u i-1 +c1×rand()×(pbest i-1 -x i-1 )+c2×rand()×(gbest-x i-1 ); Where i is the total number of particles; x represents the particle position vector, u represents the particle velocity vector; c1 and c2 are pre-calibrated learning factors; rand() represents a random number between 0 and 1; p represents the scene probability; pbest represents the individual extreme value; gbest represents the group extreme value.
7. The method according to claim 1, characterized in that The expression for the third parameter is: f = TTC × p; Wherein, TTC is the first time difference; p is the fourth parameter.
8. An automobile control algorithm testing device, characterized in that: include: a first algorithm determination module, configured to determine a first algorithm, wherein the first algorithm is a vehicle control algorithm simulated and tested under a first vehicle condition, wherein the first vehicle condition is a first vehicle merging into a lane occupied by a second vehicle, and the first vehicle is located ahead of the second vehicle during the merging process; a first parameter determination module for determining a first parameter group, the first parameter group consisting of first parameters, the first parameters in the first parameter group being divided into a first vehicle speed, a second vehicle speed, a first distance, and a second parameter, the first vehicle speed being the speed of the first vehicle, the second speed being the speed of the second vehicle, the first distance being the distance between the first vehicle and the second vehicle, the second parameter being the coefficient of friction of the road surface on which the first vehicle and the second vehicle are traveling, the first parameter group satisfying a first condition, the first condition being that each first parameter corresponds to each first parameter within a preset parameter range corresponding to a first third parameter, the third parameter being obtained by multiplying a first time difference by a fourth parameter, the first time difference being the time difference between the first vehicle and the second vehicle from the current time to the time of collision, and the fourth parameter being the probability of occurrence of each first parameter corresponding to the first time difference within the preset parameter range; The first third parameter is the largest third parameter among the third parameters corresponding to the preset parameter ranges of the first parameters; The first algorithm testing module is used to construct a first environment according to the first parameter group and test the first algorithm according to the first environment; the first environment is a vehicle simulation test environment.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the automobile control algorithm testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the automobile control algorithm testing method according to any one of claims 1 to 7 when executed.