Software and hardware decoupling analogue simulation test system
By designing a vehicle simulation and testing system with software and hardware decoupling, combining environmental simulation modules, vehicle dynamic simulation modules and evaluation indicators and evaluation software modules, the problem that existing systems are difficult to combine testing requirements at different levels is solved, and testing that is highly fitted to actual scenarios is achieved, optimization of design and early detection of problems.
Patent Information
- Application Number
- CN202411730164.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The existing vehicle simulation and testing system is difficult to organically combine different levels of testing requirements with overall engineering requirements, resulting in the separation of the test system and it is difficult to fully and systematically build it.
Design a software and hardware decoupled simulation and testing system, including environmental simulation module, vehicle dynamic simulation module and evaluation index and evaluation software module. By simulating actual scenarios, verify the performance of the design in different scenarios and optimize the design.
A test system that is highly fitted to actual scenarios is realized. Starting from the actual scenario, the design is optimized by verifying the performance of the design in different scenarios, ensuring that the test environment is highly similar to the actual vehicle situation, and problems are discovered and solved in the early stage.
Smart Images

Figure CN119669066A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle simulation testing, and more specifically, to a software and hardware decoupling simulation testing system. Background Art
[0002] The existing vehicle and parts laboratory verification system usually designs the relevant closed-loop test system from the three levels of MIL (Model in the loop) / SIL (software in the loop) / HiL (Hardware-in-the-Loop). Since the functional requirements of MIL / SIL / HIL are generally considered separately from the initial design, and independent MIL / SIL / HIL test systems are built, the result is often to meet the needs of engineers at different levels (algorithm engineers, software engineers, system engineers), splitting the entire engineering system, making it difficult to organically combine the test requirements at different levels with the overall engineering needs and comprehensively and systematically build a test system.
[0003] In the process of building a test system, traditional methods focus on starting from a theoretical perspective, designing tests around kinematic and dynamic models, and verifying the performance of the models under different working conditions and road conditions. Excessive consideration from a theoretical perspective often ignores the actual situation during operation. Summary of the invention
[0004] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art. The purpose of the present invention is to provide a software-hardware decoupled simulation test system that can highly fit actual scenarios and optimize the design by verifying the performance of the design in different fitting scenarios based on the actual scenarios.
[0005] The technical solution of the present invention is: a software and hardware decoupling simulation test system, comprising:
[0006] The environmental simulation module, as an integrated tool and platform for realizing virtual automobile R&D through simulation technology, integrates the automobile driving environment model, the vehicle environment sensor model and the traffic model. It can be seamlessly linked with Matlab / Simulink and supports offline and real-time simulation functions, providing three-dimensional digital virtual test scene modeling and editing functions;
[0007] The vehicle dynamics simulation module is used to provide vehicle dynamics simulation, scene construction, sensor construction, data interface construction, build control algorithms through the SIMULINK platform, and realize dynamics simulation by connecting hardware, software and images. The images are automatically generated by the environment simulation module;
[0008] The evaluation index and evaluation software module is used to receive the perception results output by the environmental simulation module, as well as the planned target trajectory, vehicle speed, control state quantity, and control execution quantity output by the vehicle dynamics simulation module, define the evaluation index and objective function, output the model algorithm capability report, and output the algorithm module and strategy algorithm parameters that need to be optimized according to the report.
[0009] As a further improvement, the environmental simulation module designs several scenario libraries according to different working conditions and terrain conditions, and the operation coefficient K of the scenario type can be calculated according to the following linear formula:
[0010] K=α*K1+β*K2+γ*K3+δ*K4;
[0011] Among them, α is the consideration ratio of ground conditions, K1 is the ground comprehensive coefficient, β is the consideration ratio of weather conditions, K2 is the weather comprehensive coefficient, γ is the consideration ratio of crop growth conditions, K3 is the crop growth comprehensive coefficient, δ is the consideration ratio of operation scene, and K4 is the operation scene comprehensive coefficient.
[0012] Furthermore, the vehicle dynamics simulation module includes a power unit module, a chassis unit module and an intelligent driving unit module;
[0013] The power unit module is used to simulate the driving process of the power system, and the power output is calculated using the following formula:
[0014] P = 2π × T × n / 60;
[0015] Among them, P is power, T is torque, and n is speed;
[0016] The chassis unit module is used to calibrate the energy loss k generated during the engine power transmission process and calculate the final power output value;
[0017] P1=P*(1-k);
[0018] Wherein, P1 is the output power;
[0019] The intelligent driving unit module uses the PID formula to calculate and generate the control amount according to the error between the target speed and the measured speed. The PID formula is as follows:
[0020]
[0021] Among them, u(t) is the target speed, KP is the proportional gain, KI is the integral gain, and KD is the differential gain. Furthermore, there is the following relationship between torque and speed:
[0022] T = F * L;
[0023] F = M * a;
[0024] v(t) = ∫a(t)dt;
[0025] Among them, F is force, L is the distance of force action, M is the mass of the vehicle, a is the acceleration, and v(t) is the velocity.
[0026] Furthermore, a data sharing interface is provided between the power unit module, the chassis unit module and the intelligent driving unit module.
[0027] Furthermore, the power system includes a diesel engine system, an extended-range hybrid system, and a pure electric system.
[0028] Furthermore, an adaptive PID adjustment strategy is used to adaptively adjust KP, KI, and KD of the PID controller to adapt to each road section. The adaptive PID adjustment strategy includes:
[0029] Data-driven adaptive adjustment: Use historical data and machine learning technology to analyze the performance of different models under different road conditions and train models to predict the optimal PID parameters;
[0030] Modular PID control: configure independent PID controller modules for each vehicle type and road condition, and each module has its own adaptive adjustment logic;
[0031] Real-time traffic feedback: sensors collect traffic information in real time, including road friction coefficient, slope, and curvature, and dynamically adjust PID parameters based on traffic information;
[0032] Vehicle dynamics model: Establish a detailed dynamics model for each vehicle model, simulate the behavior of each vehicle model under different road conditions, and adjust PID parameters based on model predictions;
[0033] Adaptive control strategy: Implement adaptive control algorithm to dynamically adjust PID parameters based on current and predicted errors;
[0034] Fuzzy logic system: Use fuzzy logic to process multiple input variables and nonlinear system characteristics, and output adaptive PID parameters;
[0035] Genetic algorithm optimization: Apply genetic algorithm to optimize PID parameters and find the best parameters suitable for the current road section and vehicle model through an iterative process;
[0036] Hierarchical control structure: Design a hierarchical control structure, where the bottom layer is responsible for real-time PID parameter adjustment, and the upper layer is responsible for selecting control strategies based on vehicle model and road conditions;
[0037] Driver behavior simulation: simulate the driving behaviors of different drivers in the simulation system, and adjust PID parameters according to the simulation results to adapt to different driving styles;
[0038] Multi-objective optimization: Considering the conflicting control objectives of different vehicle models and road conditions, a multi-objective optimization method is used to balance these objectives and find the most appropriate PID parameters;
[0039] Reinforcement learning: Use reinforcement learning algorithms to allow the control system to self-learn through interaction with the environment, and continuously optimize PID parameters to obtain better control effects;
[0040] System integration and collaboration: ensuring that all modules can work together and share information to more fully understand vehicle status and environmental conditions, leading to more effective PID parameter adjustments;
[0041] Real-time monitoring and adjustment: Implement a real-time monitoring system to continuously evaluate control performance and adjust PID parameters immediately once performance degradation or specific trigger conditions are detected;
[0042] User-defined settings: Allow users to customize the adjustment strategy of PID parameters based on experience or specific needs, and the system will make corresponding adjustments based on user input.
[0043] Beneficial Effects
[0044] Compared with the prior art, the present invention has the following advantages:
[0045] The present invention focuses on simulating the actual vehicle working conditions, road conditions and scenarios to ensure the transmission of data streams between modules. According to the requirements of various test environments during the research and development process, relevant models in the loop, software in the loop and hardware in the loop are designed to ensure that the test environment is highly similar to the actual vehicle conditions to test the designed algorithm models, software and hardware, so as to find and solve problems as early as possible. Starting from the working scenario, the present invention has the following characteristics: coupling with actual scenario data, high degree of data sharing between subsystems, decoupling of software and hardware, modularization of subsystems, and suitable for flexible construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a framework diagram of the present invention;
[0047] Figure 2 This is the framework diagram of the PID controller. DETAILED DESCRIPTION
[0048] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.
[0049] See also Figure 1-2 , a software and hardware decoupling simulation test system, including an environment simulation module, a vehicle dynamics simulation module, an evaluation index and an evaluation software module.
[0050] The environmental simulation module, as an integrated tool and platform for realizing automobile virtual R&D through simulation technology, integrates the automobile driving environment model, the on-board environmental sensor model and the traffic model. It can be seamlessly linked with Matlab / Simulink and supports offline and real-time simulation functions, providing three-dimensional digital virtual test scene modeling and editing functions.
[0051] The environment simulation module supports modeling and editing of the driving environment of roads and road textures, lane lines, traffic signs and facilities, weather, and night scenes. It can support the modeling and setting of various types of sensors, including fisheye cameras, monocular cameras, binocular cameras, millimeter-wave radars, lidars, ultrasonic radars, V2X communication sensors, lane line sensors, and target object recognition sensors. It can set and edit road models, and has a road database to set slopes, curvatures, rolls, and elevated roads. It has parameterized road models, supports automated testing, supports unpaved road simulation, and supports the import of third-party maps OSM / OpenDRIVE high-precision maps. It can build environmental models, including road and roadside facility databases, traffic sign databases, buildings, green belt databases, and supports the import of user-defined 3D models. It supports the creation and editing of road users, including cars and motorcycles, commercial vehicles, pedestrians and bicycles, and test balloon cars. It supports the construction of weather conditions such as weather and lighting, including the creation of daytime, nighttime rain, snow, and fog weather, and the setting of car lights and street lights. The lighting model has sensor response characteristics. Uneven roads (such as speed bumps and potholes) can be simulated, and real road environments can be directly imported from HERE maps. The driver model can define its driving style (aggressive, robust), support complex driving operations, and have learning functions to adapt to different vehicles and road characteristics. The traffic flow model can define an almost unlimited number of traffic participants, each of whom can add a dynamic model and can be finely controlled according to events.
[0052] The vehicle dynamics simulation module supports the modeling and simulation analysis of large, medium and small cars with various typical drive modes and suspension forms. It is used to provide vehicle dynamics simulation, scene construction, sensor construction, data interface construction, build control algorithms through the SIMULINK platform, and realize dynamics simulation by connecting hardware, software and images. Images are automatically generated by the environment simulation module. The hardware connection I / O involves the communication between the microcontroller and the PC system of the embedded system hardware, CAN signal reading, and real-time feedback signals to the roll, pitch, and yaw control systems on the steering wheel and base.
[0053] The evaluation index and evaluation software module is used to receive the perception results output by the environment simulation module, as well as the planned target trajectory, vehicle speed, control state quantity, and control execution quantity output by the vehicle dynamics simulation module, define the evaluation index and objective function, output the model algorithm capability report, and output the algorithm module and strategy algorithm parameters that need to be optimized according to the report. The output capability report includes the evaluation of perception capability, planning capability, control capability, communication capability, and intelligent driving comprehensive capability. According to the model selection and evaluation index, automated testing software, and test cases, the optimization variable selection, optimization variable, and constraint condition definition are carried out, and finally the algorithm optimization of the object under test is carried out.
[0054] The environmental simulation module designs several scenario libraries according to different working conditions and ground conditions, mainly considering the ground conditions (the hardness of the cultivated land, the flatness and slope of the ground, the friction and adhesion of the ground), weather conditions (rain and snow conditions), crop growth conditions, and operation scenarios (harvesting scenarios, sowing scenarios, field management scenarios, and cultivated land scenarios). The operation coefficient K of the scenario type can be calculated according to the following linear formula:
[0055] K=α*K1+β*K2+γ*K3+δ*K4;
[0056] Among them, α is the weight of ground conditions, K1 is the ground comprehensive coefficient, β is the weight of weather conditions, K2 is the weather comprehensive coefficient, γ is the weight of crop growth conditions, K3 is the crop growth comprehensive coefficient, δ is the weight of operation scene, and K4 is the operation scene comprehensive coefficient. According to the above situation, a table corresponding to the scene coefficient is made, and the table format is shown in Table 1 below:
[0057] Scene Type Operation coefficient K K1 K2 K3 K4 A K=α*K1+β*K2+γ*K3+δ*K4 1-10 1-10 1-10 1-10
[0058] Table 1
[0059] The vehicle dynamics simulation module includes the power unit module, chassis unit module and intelligent driving unit module. The software and hardware decoupling is as follows:
[0060] The power unit module is used to simulate the driving process of the power system. The power system includes a diesel engine system, an extended-range hybrid system, and a pure electric system. The power output is calculated using the following formula:
[0061] P = 2π × T × n / 60;
[0062] Among them, P is power, T is torque, and n is speed.
[0063] The chassis unit module is used to calibrate the energy loss k generated during the engine power transmission process and calculate the final power output value. Based on the above power output, the relationship between the power output and the vehicle longitudinal acceleration and longitudinal speed is calibrated according to the actual working conditions, and the differences between the diesel engine system, hybrid and pure electric system are distinguished by coefficients.
[0064] P1=P*(1-k);
[0065] Among them, P1 is the output power.
[0066] The intelligent driving unit module uses the PID formula to calculate and generate the control amount according to the error between the target speed and the measured speed. The PID formula is as follows:
[0067]
[0068] Among them, u(t) is the target speed, KP is the proportional gain, KI is the integral gain, and KD is the differential gain.
[0069] There is the following relationship between torque and speed:
[0070] T = F * L;
[0071] F = M * a;
[0072]
[0073] Among them, F is force, L is the distance of force action, M is vehicle mass, a is acceleration, and v(t) is speed. Therefore, the above three modules, namely, power unit module, chassis unit module and intelligent driving unit module, have a certain correlation through torque.
[0074] A data sharing interface is provided between the power unit module, chassis unit module and intelligent driving unit module to realize data sharing among the power unit module, chassis unit module and intelligent driving unit module, and ensure the required data is transmitted between different modules or systems. For example, the acceleration output calculated based on the simulated engine output power will be used in the actual parameter simulation of the intelligent driving system, especially in PID control, to calibrate the difference between the measured speed and the target speed.
[0075] In this embodiment, an adaptive PID adjustment strategy is used to adaptively adjust KP, KI, and KD of the PID controller to adapt to each road section. The adaptive PID adjustment strategy includes:
[0076] 1. Data-driven adaptive adjustment: Use historical data and machine learning technology to analyze the performance of different models under different road conditions and train the model to predict the optimal PID parameters.
[0077] 2. Modular PID control: An independent PID controller module is configured for each vehicle model and road condition, and each module has its own adaptive adjustment logic.
[0078] 3. Real-time road condition feedback: The road condition information including road friction coefficient, slope and curvature is collected in real time through sensors, and PID parameters are adjusted dynamically according to the road condition information.
[0079] 4. Vehicle dynamics model: Establish a detailed dynamic model for each vehicle model, simulate the behavior of each vehicle model under different road conditions, and adjust the PID parameters based on model predictions.
[0080] 5. Adaptive control strategy: Implement adaptive control algorithms such as model predictive control (MPC) to dynamically adjust PID parameters based on current and predicted errors.
[0081] 6. Fuzzy logic system: Use fuzzy logic to process multiple input variables (such as vehicle speed, steering angle, acceleration, etc.) and nonlinear system characteristics, and output adaptive PID parameters.
[0082] 7. Genetic algorithm optimization: Apply genetic algorithm to optimize PID parameters and find the best parameters suitable for the current road section and vehicle model through an iterative process.
[0083] 8. Hierarchical control structure: Design a hierarchical control structure, where the bottom layer is responsible for real-time PID parameter adjustment and the upper layer is responsible for selecting the control strategy based on the vehicle model and road conditions.
[0084] 9. Driver behavior simulation: Simulate the driving behaviors of different drivers in the simulation system, and adjust PID parameters according to the simulation results to adapt to different driving styles.
[0085] 10. Multi-objective optimization: Considering the possible conflicting control objectives for different vehicle models and road conditions, a multi-objective optimization method is used to balance these objectives and find the most appropriate PID parameters.
[0086] 11. Reinforcement learning: Use reinforcement learning algorithms to allow the control system to self-learn through interaction with the environment and continuously optimize PID parameters to achieve better control results.
[0087] 12. System integration and coordination: Ensure that all modules (such as perception, decision-making, and control) can work together and share information to more fully understand the vehicle status and environmental conditions, thereby making more effective PID parameter adjustments.
[0088] 13. Real-time monitoring and adjustment: Implement a real-time monitoring system to continuously evaluate control performance and adjust PID parameters immediately once performance degradation or specific trigger conditions are detected.
[0089] 14. User-defined settings: Allow users to customize the adjustment strategy of PID parameters based on experience or specific needs, and the system will make corresponding adjustments based on user input.
[0090] This system is highly fitted to actual scenarios. Starting from actual scenarios, the design is optimized by verifying the performance of the design in different fitting scenarios. In terms of data application, some test modes focus more on the independent application of data. Since this system focuses on virtual integration and data integration between different subsystems (power unit module, chassis unit module and intelligent driving unit module), data is coupled in different subsystems. The software and hardware between the systems are decoupled, data is shared, and the subsystems can be flexibly matched to serve tests for different purposes.
[0091] The above are only preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A software and hardware decoupling simulation test system, characterized in that: include: The environmental simulation module, as an integrated tool and platform for realizing virtual automobile R&D through simulation technology, integrates the automobile driving environment model, the vehicle environment sensor model and the traffic model. It can be seamlessly linked with Matlab / Simulink and supports offline and real-time simulation functions, providing three-dimensional digital virtual test scene modeling and editing functions; The vehicle dynamics simulation module is used to provide vehicle dynamics simulation, scene construction, sensor construction, data interface construction, build control algorithms through the SIMULINK platform, and realize dynamics simulation by connecting hardware, software and images. The images are automatically generated by the environment simulation module; The evaluation index and evaluation software module is used to receive the perception results output by the environmental simulation module, as well as the planned target trajectory, vehicle speed, control state quantity, and control execution quantity output by the vehicle dynamics simulation module, define the evaluation index and objective function, output the model algorithm capability report, and output the algorithm module and strategy algorithm parameters that need to be optimized according to the report.
2. A software and hardware decoupling simulation test system according to claim 1, characterized in that: The environmental simulation module designs several scenario libraries according to different working conditions and terrain conditions. The operation coefficient K of the scenario type can be calculated according to the following linear formula: K=α*K1+β*K2+γ*K3+δ*K4; Among them, α is the consideration ratio of ground conditions, K1 is the ground comprehensive coefficient, β is the consideration ratio of weather conditions, K2 is the weather comprehensive coefficient, γ is the consideration ratio of crop growth conditions, K3 is the crop growth comprehensive coefficient, δ is the consideration ratio of operation scene, and K4 is the operation scene comprehensive coefficient.
3. A software and hardware decoupling simulation test system according to claim 1, characterized in that: The vehicle dynamics simulation module includes a power unit module, a chassis unit module and an intelligent driving unit module; The power unit module is used to simulate the driving process of the power system, and the power output is calculated using the following formula: P = 2π × T × n / 60; Among them, P is power, T is torque, and n is speed; The chassis unit module is used to calibrate the energy loss k generated during the engine power transmission process and calculate the final power output value; P1=P*(1-k); Wherein, P1 is the output power; The intelligent driving unit module uses the PID formula to calculate and generate the control amount according to the error between the target speed and the measured speed. The PID formula is as follows: Among them, u(t) is the target speed, KP is the proportional gain, KI is the integral gain, and KD is the differential gain.
4. A software and hardware decoupling simulation test system according to claim 3, characterized in that: There is the following relationship between torque and speed: T = F * L; F = M * a; v(t) = ∫a(t)dt; Among them, F is force, L is the distance of force action, M is the mass of the vehicle, a is the acceleration, and v(t) is the velocity.
5. The software and hardware decoupling simulation test system according to claim 3, characterized in that: A data sharing interface is provided between the power unit module, the chassis unit module and the intelligent driving unit module.
6. A software and hardware decoupling simulation test system according to claim 3, characterized in that: The power system includes a diesel engine system, an extended-range hybrid system, and a pure electric system.
7. A software and hardware decoupling simulation test system according to any one of claims 3 to 6, characterized in that: Adaptive PID adjustment strategy is used to adaptively adjust KP, KI, and KD of PID controller to adapt to each road section. The adaptive PID adjustment strategy includes: Data-driven adaptive adjustment: Use historical data and machine learning technology to analyze the performance of different models under different road conditions and train models to predict the optimal PID parameters; Modular PID control: configure independent PID controller modules for each vehicle type and road condition, and each module has its own adaptive adjustment logic; Real-time traffic feedback: sensors collect traffic information in real time, including road friction coefficient, slope, and curvature, and dynamically adjust PID parameters based on traffic information; Vehicle dynamics model: Establish a detailed dynamics model for each vehicle model, simulate the behavior of each vehicle model under different road conditions, and adjust PID parameters based on model predictions; Adaptive control strategy: Implement adaptive control algorithm to dynamically adjust PID parameters based on current and predicted errors; Fuzzy logic system: Use fuzzy logic to process multiple input variables and nonlinear system characteristics, and output adaptive PID parameters; Genetic algorithm optimization: Apply genetic algorithm to optimize PID parameters and find the best parameters suitable for the current road section and vehicle model through an iterative process; Hierarchical control structure: Design a hierarchical control structure, where the bottom layer is responsible for real-time PID parameter adjustment, and the upper layer is responsible for selecting control strategies based on vehicle model and road conditions; Driver behavior simulation: simulate the driving behaviors of different drivers in the simulation system, and adjust PID parameters according to the simulation results to adapt to different driving styles; Multi-objective optimization: Considering the conflicting control objectives of different vehicle models and road conditions, a multi-objective optimization method is used to balance these objectives and find the most appropriate PID parameters; Reinforcement learning: Use reinforcement learning algorithms to allow the control system to self-learn through interaction with the environment, and continuously optimize PID parameters to obtain better control effects; System integration and collaboration: ensuring that all modules can work together and share information to more fully understand vehicle status and environmental conditions, leading to more effective PID parameter adjustments; Real-time monitoring and adjustment: Implement a real-time monitoring system to continuously evaluate control performance and adjust PID parameters immediately once performance degradation or specific trigger conditions are detected; User-defined settings: Allow users to customize the adjustment strategy of PID parameters based on experience or specific needs, and the system will make corresponding adjustments based on user input.
Citation Information
Patent Citations
Method for carrying out integrated testing on intelligent driving vehicle
CN110794810A
Vehicle longitudinal dynamics modeling method and system for intelligent driving simulation test
CN116467892A
Vehicle dynamics model and real vehicle joint simulation method, system, equipment and medium
CN117631556A
Cited By
Automatic driving evaluation system based on artificial intelligence
CN120653945A
Vehicle performance test method and device, storage medium and vehicle
CN121325814A
Hardware-in-the-loop calibration method and device, electronic equipment and vehicle
CN121455041A
Low-altitude flight simulation test method and device, electronic equipment and storage medium
CN122389387A