Hardware-in-the-loop test method and device based on model order reduction control strategy
Through the down-order processing of the vehicle performance simulation model and the 1D convolutional neural network method, the problem of insufficient real-time and accuracy of the model in the hardware circle verification is solved, and the model operation speed and accuracy are improved, and the refined development and real-time debugging of vehicle control strategies are supported.
Patent Information
- Application Number
- CN202511005843.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing hardware in-ring verification method has relatively simple models and poor real-time performance, and it is impossible to fully verify the functions and performance of the control strategy under the conditions of ensuring real-time performance.
By lowering the vehicle performance simulation model, the 1D convolutional neural network method is used to convert the 3-dimensional simulation model into a mathematical model, and the mapping relationship between the input and output of the original physical system is directly learned, which can greatly improve the model operation speed, and optimize the hyperparameters through Bayesian probability to ensure that the error accuracy is within the preset range.
It has achieved a significant improvement in the model operation speed, met the real-time verification of control strategies, improved the accuracy and simulation speed of hardware in-loop models, and supported the refined development and real-time debugging of vehicle control strategies.
Smart Images

Figure CN120508089A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of model control, and in particular to a hardware-in-the-loop testing method based on a model-reduced-order control strategy, a hardware-in-the-loop testing device based on a model-reduced-order control strategy, an electronic device, a storage medium, and a vehicle. Background Art
[0002] Hardware-in-the-loop (HIL) technology is a key technology in the development of electronic control strategies, used to verify the functionality and performance of control strategies. Due to the high complexity of modeling the controlled object, current HIL systems often use simple models based on theoretical formulas for functional verification and some performance debugging.
[0003] Patent Document 1 (CN110794810B) discloses a method for integrated testing of intelligent driving vehicles. This method leverages different simulation technologies based on the same test scenario during the development of a single ECU in an intelligent vehicle, effectively verifying controller functionality and performance and ensuring safety and reliability during actual driving. However, this method relies on code-based model development for functional and performance verification, which inevitably results in a loss of model accuracy and makes it impossible to verify algorithm performance.
[0004] Patent Document 2 (CN114791727A) discloses a hardware-in-the-loop (HIL) simulation and evaluation system for an automotive chassis control system. This system utilizes hardware-in-the-loop (HIL) testing of the control system. The functional modules of the test components can be used independently or in combination, offering flexible configuration. However, the model requires a host computer to drive it, making real-time strategy control impossible.
[0005] Reference 1 discloses the establishment of a power system model and the development of a hardware-in-the-loop simulation bench based on the model to verify the performance of the control algorithm. However, the hardware-in-the-loop system based on the detailed performance model takes too long to run and does not meet the requirements of the vehicle product development project. Reference 2 discloses the completion of a hardware-in-the-loop test based on dSPACE equipment. However, this method has high requirements on the operating efficiency of the hardware equipment, and the on-board processor cannot achieve the corresponding computing speed. The strategy can be used for theoretical research but cannot be directly converted into product applications.
[0006] In summary, the current hardware-in-the-loop verification method has the disadvantages of relatively simple models and poor real-time performance, which cannot fully verify the function and performance of the control strategy under the condition of ensuring real-time performance.
[0007] Therefore, a solution for hardware-in-the-loop (HIL) testing of control strategies based on model-order reduction is needed. By reducing the order of the vehicle performance simulation model, the model's runtime speed can be significantly improved, meeting the requirements for real-time verification of the control strategy. This solution can be directly deployed to a HIL test bench for real-time debugging. This significantly improves HIL model accuracy and simulation speed, enabling the refined development of vehicle control strategies. Summary of the Invention
[0008] The purpose of the present invention is to provide a hardware-in-the-loop testing method for a control strategy based on model order reduction, a hardware-in-the-loop testing device, an electronic device, a storage medium and a vehicle based on a control strategy based on model order reduction, which at least solves the problem of how to apply a detailed performance model to carry out hardware-in-the-loop verification, solves the problem of how to significantly improve the model running speed by reducing the order of the whole vehicle performance simulation model to meet the real-time verification of the control strategy, and solves one of the technical problems of how to significantly improve the accuracy and simulation speed of the hardware-in-the-loop model to achieve the refined development of the whole vehicle control strategy.
[0009] The present invention provides the following solutions:
[0010] According to one aspect of the present invention, a hardware-in-the-loop testing method for a model-reduced control strategy is provided, the hardware-in-the-loop testing method for a model-reduced control strategy comprising:
[0011] The steps of vehicle modeling, model reduction, hyperparameter optimization for model reduction, model verification, hardware-in-the-loop deployment, and strategy optimization and debugging;
[0012] Wherein, based on the vehicle modeling step, the model data for the whole vehicle model order reduction processing is prepared for the model order reduction step;
[0013] The steps of model reduction include the steps of inputting data, convolution operation, pooling operation and fully connected layer;
[0014] Based on the steps of model reduction, the output data of the vehicle model after order reduction is obtained;
[0015] Based on the steps of model reduction and hyperparameter optimization, the optimal hyperparameter combination is determined through the Bayesian probability strategy, and the search is iteratively adjusted;
[0016] Based on the steps of reduced-order model verification, data verification analysis is performed on the output data of the vehicle model after order reduction to ensure that the error accuracy is within the preset accuracy threshold range;
[0017] Based on the hardware-in-the-loop deployment steps, the reduced-order vehicle model is deployed in the hardware-in-the-loop and compared with the calibration parameters;
[0018] Based on the steps of strategy optimization and debugging, the control logic and calibration parameters are optimized according to the comparison with the calibration data and the preset control strategy to meet the preset control objectives.
[0019] Furthermore, the vehicle modeling step includes:
[0020] The steps of obtaining modeling and verification, the steps of control strategy coupling modeling, and the steps of demonstrating the effect of calibration parameters;
[0021] According to the steps of modeling and verification, control strategy coupling modeling, and calibration parameter effect demonstration, a vehicle model is generated and the influence of control parameters on performance is demonstrated;
[0022] Carry out vehicle performance simulation and data testing based on the vehicle model and the influence of control parameters on performance, and build and verify the vehicle energy management model;
[0023] After the whole vehicle energy management model is built and verified, the whole vehicle model is used as the model data for the model reduction step.
[0024] Furthermore, the steps of modeling and verifying include:
[0025] According to the preset simulation description scope, the components, subsystems, subsystem integration and complete vehicles are divided;
[0026] According to the division into components, subsystems, subsystem integration and complete vehicles, modeling and verification of components, modeling and verification of subsystems, modeling and verification of subsystem integration and modeling and verification of complete vehicles are carried out;
[0027] Component modeling and verification includes building component models and verifying data against real components;
[0028] Verification includes confirming the reliability and completeness of the modeling data;
[0029] Subsystem modeling and verification includes component-based modeling and verification, building subsystem models, and verifying data against real subsystems;
[0030] Verification includes confirming the reliability and completeness of the modeling data;
[0031] The modeling and verification of subsystem integration includes building subsystem integration modeling based on subsystem modeling and verification, and verifying the data corresponding to the actual subsystem integration;
[0032] Verification includes confirming the reliability and completeness of the modeling data;
[0033] The verification also includes adding operational stability and accuracy tests on the model to ensure that the model's operation process and the data generated meet the preset calibration indicators;
[0034] The modeling and verification of the entire vehicle includes component-based modeling and verification, subsystem modeling and verification, and subsystem integration modeling and verification. The entire vehicle model is built and verified against the data of the actual vehicle.
[0035] Verification includes confirming the reliability and completeness of the modeling data;
[0036] The verification also includes adding operational stability tests and accuracy tests on the model to ensure that the model's operation process and the data generated meet the preset calibration indicators.
[0037] Furthermore, the model reduction step includes the step of inputting data, the step of convolution operation, the step of pooling operation and the step of fully connected layer, which includes:
[0038] The step of inputting data includes representing the input data as a two-dimensional matrix, wherein a row represents a data sequence and a column represents a data element in the sequence;
[0039] The steps of the convolution operation include: the convolution layer uses a one-dimensional convolution kernel to perform a convolution operation on the input data sequence;
[0040] The convolution kernel slides on the input data sequence and calculates the convolution result at each position;
[0041] Construct feature maps based on the convolution results;
[0042] Among them, the data elements in the feature map are used to represent the characteristics of the input data sequence in the corresponding local area;
[0043] The steps of the pooling operation include: the pooling layer downsamples the convolution output and outputs it to reduce the dimension and redundant information of the data;
[0044] The steps of the fully connected layer include: the fully connected layer flattens the output of the pooling layer into a one-dimensional vector and performs a linear transformation using a weight matrix;
[0045] Get the Sigmoid activation function;
[0046] According to the Sigmoid activation function, the result of the linear transformation is processed nonlinearly to obtain the result model of the model reduction processing.
[0047] Furthermore, the step of optimizing the model's hyperparameters for order reduction includes:
[0048] Model the model training process as hyperparameter optimization;
[0049] Among them, the optimal hyperparameter configuration of the machine learning model is determined by establishing a research process, experimental evaluation, intelligent search methods, pruning, and distributed optimization.
[0050] Furthermore, the step of verifying the reduced-order model includes:
[0051] Based on the project requirement scope information, obtain the preset accuracy threshold of the corresponding calibration parameters;
[0052] Processing the input data of the vehicle state according to the result model to generate processing result data;
[0053] Processing the input data of the vehicle state according to the model before order reduction to generate original processing result data;
[0054] Obtaining deviation data of the result data according to the processed result data and the original processed result data;
[0055] Based on the deviation data of the result data and the preset accuracy threshold, verify whether the result model meets the project requirements.
[0056] Furthermore, the hardware-in-the-loop deployment step includes:
[0057] Configure the hardware operating environment, including configuring the signal input and output interfaces;
[0058] Deploy the resulting model in a hardware-in-the-loop device;
[0059] The result model includes input and output, and the input includes calibration parameters;
[0060] Based on deploying the result model in a hardware-in-the-loop device, an interface for calibrating parameters is reserved;
[0061] According to the interface of reserved calibration parameters, adjust the calibration parameters, test the engine fuel consumption, and carry out comparative tests of calibration parameters.
[0062] Furthermore, the steps of strategy optimization and debugging include:
[0063] Based on the result model, carry out hardware-in-the-loop function and performance testing of the control strategy, and optimize the control strategy logic and calibration parameters;
[0064] Among them, the fuel consumption performance optimization calibration and the test of the result model stability are set;
[0065] Based on the fuel consumption performance optimization calibration and the result model stability test, the efficiency improvement status of the result model and the efficiency improvement status data of the parameter calibration are obtained;
[0066] According to the efficiency improvement status of the result model and the efficiency improvement status data of the parameter cycle, the control logic and calibration parameters are optimized.
[0067] According to two aspects of the present invention, there is provided a hardware-in-the-loop testing device for a model-reduced control strategy, the hardware-in-the-loop testing device for a model-reduced control strategy comprising:
[0068] Vehicle modeling module, model reduction module, model reduction hyperparameter optimization module, reduced-order model verification module, hardware-in-the-loop deployment module, and strategy optimization and debugging module;
[0069] The vehicle modeling module is used to prepare the model data for the whole vehicle model order reduction process in the step of model order reduction;
[0070] The model reduction module includes the input data module, convolution operation module, pooling operation module and fully connected layer module;
[0071] Model reduction module, used to obtain the output data of the vehicle model after order reduction processing;
[0072] The model reduction hyperparameter optimization module is used to determine the optimal hyperparameter combination through the Bayesian probability strategy and iteratively adjust the search;
[0073] The reduced-order model verification module is used to perform data verification analysis on the output data of the vehicle model after order reduction processing to ensure that the error accuracy is within the preset accuracy threshold range;
[0074] The hardware-in-the-loop deployment module is used to deploy the reduced-order vehicle model in the hardware-in-the-loop and compare it with the calibration parameters;
[0075] The strategy optimization and debugging module is used to optimize the control logic and calibration parameters based on the comparison with the calibration data and the preset control strategy to meet the preset control objectives.
[0076] Further, including:
[0077] An input data module, used to represent input data as a two-dimensional matrix, where a row represents a data sequence and a column represents a data element in the sequence;
[0078] Convolution operation module, used for convolution layer to perform convolution operation on input data sequence using one-dimensional convolution kernel;
[0079] The convolution kernel slides on the input data sequence and calculates the convolution result at each position;
[0080] Construct feature maps based on the convolution results;
[0081] Among them, the data elements in the feature map are used to represent the characteristics of the input data sequence in the corresponding local area;
[0082] The pooling operation module is used to downsample the convolution output of the pooling layer and output it to reduce the dimension and redundant information of the data;
[0083] The fully connected layer module is used to flatten the output of the pooling layer into a one-dimensional vector and perform linear transformation using the weight matrix;
[0084] Get the Sigmoid activation function;
[0085] According to the Sigmoid activation function, the result of the linear transformation is processed nonlinearly to obtain the result model of the model reduction processing.
[0086] According to three aspects of the present invention, there is provided an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0087] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the hardware-in-the-loop testing method based on the model-reduced-order control strategy.
[0088] According to four aspects of the present invention, a computer-readable storage medium is provided, which stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the hardware-in-the-loop testing method based on the model-reduction control strategy.
[0089] According to five aspects of the present invention, there is provided a vehicle comprising:
[0090] An electronic device, used to implement the steps of the hardware-in-the-loop testing method based on model-reduced-order control strategy;
[0091] A processor that runs a program and, when the program is running, executes the steps of the hardware-in-the-loop testing method based on model-reduced-order control strategy from data output by the electronic device;
[0092] The storage medium is used to store a program, and when the program is running, it executes the steps of the hardware-in-the-loop testing method based on the model-reduced-order control strategy for the data output from the electronic device.
[0093] Through the above solution, the following beneficial technical effects are achieved:
[0094] This application achieves a significant increase in the model running speed by reducing the order of the vehicle performance simulation model, meeting the real-time verification of the control strategy.
[0095] This application directly deploys the reduced-order model to the hardware-in-the-loop test bench for real-time debugging, significantly improving the accuracy and simulation speed of the hardware-in-the-loop model and enabling refined development of the vehicle control strategy.
[0096] This application can achieve real-time feedback of the performance model through a hardware-in-the-loop control strategy optimization method based on model order reduction.
[0097] This application applies the 1D convolutional neural network order reduction method to the vehicle performance simulation model order reduction to achieve real-time response of the performance model.
[0098] This application applies the hyperparameter optimization method to the model reduction process, models the data training process as an optimization process, and achieves efficient and high-precision model reduction.
[0099] This application conducts hardware-in-the-loop function and performance testing of the control strategy based on the reduced-order real-time performance model, thereby optimizing the control strategy logic and calibration parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] Figure 1 This is a flowchart of a hardware-in-the-loop testing method based on a model-reduction control strategy provided by one or more embodiments of the present invention.
[0101] Figure 2 This is a structural diagram of a hardware-in-the-loop testing device based on a model-reduction control strategy provided by one or more embodiments of the present invention.
[0102] Figure 3 It is a schematic diagram of the optimization process of a control strategy optimization method based on model order reduction provided by a specific embodiment of the present invention.
[0103] Figure 4 It is a schematic diagram of the distribution scatter points of true values and predicted values after model reduction provided by a specific embodiment of the present invention.
[0104] Figure 5 The present invention provides a structural block diagram of an electronic device according to a hardware-in-the-loop testing method based on a model-reduction control strategy according to one or more embodiments of the present invention. DETAILED DESCRIPTION
[0105] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0106] Figure 1 This is a flowchart of a hardware-in-the-loop testing method based on a model-reduction control strategy provided by one or more embodiments of the present invention.
[0107] like Figure 1 The hardware-in-the-loop testing method for the model-reduced control strategy shown includes:
[0108] The steps of vehicle modeling, model reduction, hyperparameter optimization for model reduction, model verification, hardware-in-the-loop deployment, and strategy optimization and debugging;
[0109] Step A1, based on the vehicle modeling step, prepare model data for the model order reduction step for the whole vehicle model order reduction process;
[0110] Step A2: Model reduction includes the steps of inputting data, performing convolution operations, performing pooling operations, and performing fully connected layers.
[0111] Step A3, based on the model order reduction step, obtaining output data of the vehicle model after order reduction processing;
[0112] Step A4: Based on the model reduction hyperparameter optimization step, the optimal hyperparameter combination is determined through the Bayesian probability strategy, and the search is iteratively adjusted;
[0113] Step A5: Based on the reduced-order model verification step, data verification analysis is performed on the output data of the vehicle model after the reduced-order processing to ensure that the error accuracy is within the preset accuracy threshold range;
[0114] Step A6: Based on the hardware-in-the-loop deployment step, the reduced-order vehicle model is deployed in the hardware-in-the-loop and compared with the calibration parameters;
[0115] Step A7, based on the strategy optimization and debugging step, optimizes the control logic and calibration parameters according to the comparison with the calibration data and the preset control strategy to meet the preset control target.
[0116] Specifically, in this application, a 1D convolutional neural network can be preferably used as an example for hardware-in-the-loop testing of a model-reduction-based control strategy.
[0117] In this embodiment, the steps of vehicle modeling include:
[0118] The steps of obtaining modeling and verification, the steps of control strategy coupling modeling, and the steps of demonstrating the effect of calibration parameters;
[0119] According to the steps of modeling and verification, control strategy coupling modeling, and calibration parameter effect demonstration, a vehicle model is generated and the influence of control parameters on performance is demonstrated;
[0120] Carry out vehicle performance simulation and data testing based on the vehicle model and the influence of control parameters on performance, and build and verify the vehicle energy management model;
[0121] After the whole vehicle energy management model is built and verified, the whole vehicle model is used as the model data for the model reduction step.
[0122] Specifically, in one embodiment, a control strategy hardware-in-the-loop (HIL) testing method based on model order reduction is disclosed. This method primarily addresses the current problem of control strategy development being unable to apply detailed performance models for HIL verification. By reducing the order of the vehicle performance simulation model, the model's running speed is significantly improved, meeting the requirements for real-time control strategy verification. The model can be directly deployed to a HIL test bench for real-time debugging. This significantly improves HIL model accuracy and simulation speed, enabling the refined development of vehicle control strategies.
[0123] In the above embodiment, if Figure 3 The optimization process of the control strategy optimization method based on model reduction shown includes: S1, start; S2, component modeling and verification: build component models, confirm data reliability, and confirm data completeness; S3, subsystem modeling and verification: build subsystem models and complete model data confirmation; S4, subsystem integration modeling and verification: complete subsystem integration, conduct model stability test, rationality test, and accuracy test to ensure that the model accuracy after subsystem integration meets the calibration requirements; S5, vehicle modeling and verification: integrate the vehicle model, carry out vehicle performance simulation and data testing; S6, vehicle model reduction; S7, model reduction hyperparameter optimization; S8, reduced order model verification: carry out data verification analysis on the reduced order model results to ensure that the error accuracy is within the project requirements; S9, hardware-in-the-loop deployment: configure the signal input and output interfaces, and deploy the reduced order real-time model on the hardware-in-the-loop equipment; S10, strategy optimization and debugging: based on the reduced order real-time performance model, carry out hardware-in-the-loop function and performance testing of the control strategy, and optimize the control strategy logic and calibration parameters; S11, end. Among them, S1-S5 is the process of building and verifying the vehicle energy management model, which is equivalent to providing data preparation for the reduced-order model.
[0124] In this embodiment, the steps of modeling and verifying include:
[0125] According to the preset simulation description scope, the components, subsystems, subsystem integration and complete vehicles are divided;
[0126] According to the division into components, subsystems, subsystem integration and complete vehicles, modeling and verification of components, modeling and verification of subsystems, modeling and verification of subsystem integration and modeling and verification of complete vehicles are carried out;
[0127] Component modeling and verification includes building component models and verifying data against real components;
[0128] Verification includes confirming the reliability and completeness of the modeling data;
[0129] Subsystem modeling and verification includes component-based modeling and verification, building subsystem models, and verifying data against real subsystems;
[0130] Verification includes confirming the reliability and completeness of the modeling data;
[0131] The modeling and verification of subsystem integration includes building subsystem integration modeling based on subsystem modeling and verification, and verifying the data corresponding to the actual subsystem integration;
[0132] Verification includes confirming the reliability and completeness of the modeling data;
[0133] The verification also includes adding operational stability and accuracy tests on the model to ensure that the model's operation process and the data generated meet the preset calibration indicators;
[0134] The modeling and verification of the entire vehicle includes component-based modeling and verification, subsystem modeling and verification, and subsystem integration modeling and verification. The entire vehicle model is built and verified against the data of the actual vehicle.
[0135] Verification includes confirming the reliability and completeness of the modeling data;
[0136] The verification also includes adding operational stability tests and accuracy tests on the model to ensure that the model's operation process and the data generated meet the preset calibration indicators.
[0137] In this embodiment, the model reduction step includes the step of inputting data, the step of convolution operation, the step of pooling operation, and the step of fully connected layer.
[0138] The step of inputting data includes representing the input data as a two-dimensional matrix, wherein a row represents a data sequence and a column represents a data element in the sequence;
[0139] The steps of the convolution operation include: the convolution layer uses a one-dimensional convolution kernel to perform a convolution operation on the input data sequence;
[0140] The convolution kernel slides on the input data sequence and calculates the convolution result at each position;
[0141] Construct feature maps based on the convolution results;
[0142] Among them, the data elements in the feature map are used to represent the characteristics of the input data sequence in the corresponding local area;
[0143] The steps of the pooling operation include: the pooling layer downsamples the convolution output and outputs it to reduce the dimension and redundant information of the data;
[0144] The steps of the fully connected layer include: the fully connected layer flattens the output of the pooling layer into a one-dimensional vector and performs a linear transformation using a weight matrix;
[0145] Get the Sigmoid activation function;
[0146] According to the Sigmoid activation function, the result of the linear transformation is processed nonlinearly to obtain the result model of the model reduction processing.
[0147] Specifically, in one embodiment, Figure 3 The optimization process of the control strategy optimization method based on model reduction shown includes S6, the vehicle model reduction process uses the convolutional neural network model provided by Python, and this application sets parameters and references them. The following is the key process:
[0148] S61. Input data: The input data is represented as a two-dimensional matrix, where a row represents a sequence and a column represents an element in the sequence.
[0149] S62, Convolution Operation: The convolution layer performs a convolution operation on the input sequence using a one-dimensional convolution kernel. The convolution kernel slides over the input sequence and calculates the convolution result at each position. These results form a new feature map, where each element represents the characteristics of a local region of the input sequence.
[0150] S63, Pooling operation: The pooling layer downsamples the output of the convolutional layer to reduce the dimension and redundant information of the data.
[0151] S64, Fully Connected Layer: The fully connected layer flattens the output of the pooling layer into a one-dimensional vector and performs a linear transformation using a weight matrix. The transformed result is then processed nonlinearly using the Sigmoid activation function to obtain the final output.
[0152] In this embodiment, the steps of model reduction hyperparameter optimization include:
[0153] Model the model training process as hyperparameter optimization;
[0154] Among them, the optimal hyperparameter configuration of the machine learning model is determined by establishing a research process, experimental evaluation, intelligent search methods, pruning, and distributed optimization.
[0155] Specifically, in one embodiment, Figure 3 The optimization process for the control strategy optimization method based on model order reduction includes S7 and the use of a Python toolkit for model order reduction hyperparameter optimization to optimize training parameters. For example, a hyperparameter optimization tool based on Bayesian optimization intelligently searches the hyperparameter space to improve model performance. The Tree-structured Parzen Estimator (TPE) method is applied to determine the optimal hyperparameter combination using Bayesian probability and then iteratively adjusts the search.
[0156] S7. Model reduction hyperparameter optimization also includes applying the Optuna tool to model the model training process as hyperparameter optimization. Optuna efficiently determines the optimal hyperparameter configuration of the machine learning model by establishing a research process, experimental evaluation, intelligent search methods, pruning, and distributed optimization.
[0157] In this embodiment, the steps of verifying the reduced-order model include:
[0158] Based on the project requirement scope information, obtain the preset accuracy threshold of the corresponding calibration parameters;
[0159] Processing the input data of the vehicle state according to the result model to generate processing result data;
[0160] Processing the input data of the vehicle state according to the model before order reduction to generate original processing result data;
[0161] Obtaining deviation data of the result data according to the processed result data and the original processed result data;
[0162] Based on the deviation data of the result data and the preset accuracy threshold, verify whether the result model meets the project requirements.
[0163] Specifically, in one embodiment, Figure 3 The optimization process of the control strategy optimization method based on model reduction shown includes S8, reduced-order model verification: performing data verification analysis on the reduced-order model results to ensure that the error accuracy is within the project requirement range.
[0164] In this embodiment, the steps of hardware-in-the-loop deployment include:
[0165] Configure the hardware operating environment, including configuring the signal input and output interfaces;
[0166] Deploy the resulting model in a hardware-in-the-loop device;
[0167] The result model includes input and output, and the input includes calibration parameters;
[0168] Based on deploying the result model in a hardware-in-the-loop device, an interface for calibrating parameters is reserved;
[0169] According to the interface of reserved calibration parameters, adjust the calibration parameters, test the engine fuel consumption, and carry out comparative tests of calibration parameters.
[0170] Specifically, in one embodiment, Figure 3 The optimization process of the control strategy optimization method based on model order reduction shown includes S9, hardware-in-the-loop deployment: configuring the signal input and output interfaces, and deploying the reduced-order real-time model (result model) on the hardware-in-the-loop device.
[0171] The reduced-order model is a mathematical model with input and output, where the input includes calibration parameters. After reduction, it can be directly deployed to the hardware-in-the-loop, leaving a calibration parameter interface. By adjusting the calibration parameters, the engine fuel consumption results can be tested and comparative calibration can be carried out.
[0172] In this embodiment, the steps of policy optimization and debugging include:
[0173] Based on the result model, carry out hardware-in-the-loop function and performance testing of the control strategy, and optimize the control strategy logic and calibration parameters;
[0174] Among them, the fuel consumption performance optimization calibration and the test of the result model stability are set;
[0175] Based on the fuel consumption performance optimization calibration and the result model stability test, the efficiency improvement status of the result model and the efficiency improvement status data of the parameter calibration are obtained;
[0176] According to the efficiency improvement status of the result model and the efficiency improvement status data of the parameter cycle, the control logic and calibration parameters are optimized.
[0177] Specifically, in one embodiment, Figure 3 The optimization process of the control strategy optimization method based on model order reduction shown includes S10, strategy optimization, and debugging: based on the reduced-order real-time performance model, hardware-in-the-loop function and performance testing of the control strategy are carried out, and the control strategy logic and calibration parameters are optimized.
[0178] It can carry out control strategy fuel consumption performance optimization calibration and strategy stability testing. Model reduction improves efficiency and shortens calibration cycle.
[0179] Through the above scheme, we can obtain Figure 4 The distribution scatter points of the true value and the predicted value after the model is reduced in order are shown, which represent the true value and the predicted value of the instantaneous injection amount. After multiple rounds of model training, the predicted value and the true value gradually approach each other.
[0180] As can be seen from the above examples, the goal of this application is to convert a 3D simulation model into a mathematical model using a 1D convolutional neural network (a model order reduction method). This method directly learns the mapping between the original physical system inputs (parameters, boundary conditions, initial conditions, etc.) and outputs (system response - engine fuel consumption), thereby bypassing the process of solving the underlying complex differential equations and achieving improved simulation speed. The reduced-order model can then be deployed on an HIL (hardware-in-the-loop) test bench to optimize fuel consumption-related control calibration parameters. The greatest advantage is a significant increase in simulation speed, which improves parameter calibration efficiency while maintaining accuracy.
[0181] This application discloses a 1D convolutional neural network model reduction method, and does not rule out the possibility of applying other reduction and fitting algorithm methods to achieve similar model reduction, thereby improving the simulation speed.
[0182] Figure 2 This is a structural diagram of a hardware-in-the-loop testing device based on a model-reduction control strategy provided by one or more embodiments of the present invention.
[0183] like Figure 2 The hardware-in-the-loop test setup for the model-based reduced-order control strategy shown includes:
[0184] Vehicle modeling module, model reduction module, model reduction hyperparameter optimization module, reduced-order model verification module, hardware-in-the-loop deployment module, and strategy optimization and debugging module;
[0185] The vehicle modeling module is used to prepare the model data for the whole vehicle model order reduction process in the step of model order reduction;
[0186] The model reduction module includes the input data module, convolution operation module, pooling operation module and fully connected layer module;
[0187] Model reduction module, used to obtain the output data of the vehicle model after order reduction processing;
[0188] The model reduction hyperparameter optimization module is used to determine the optimal hyperparameter combination through the Bayesian probability strategy and iteratively adjust the search;
[0189] The reduced-order model verification module is used to perform data verification analysis on the output data of the vehicle model after order reduction processing to ensure that the error accuracy is within the preset accuracy threshold range;
[0190] The hardware-in-the-loop deployment module is used to deploy the reduced-order vehicle model in the hardware-in-the-loop and compare it with the calibration parameters;
[0191] The strategy optimization and debugging module is used to optimize the control logic and calibration parameters based on the comparison with the calibration data and the preset control strategy to meet the preset control objectives.
[0192] In this embodiment, it includes:
[0193] An input data module, used to represent input data as a two-dimensional matrix, where a row represents a data sequence and the corresponding column represents a data element in the sequence;
[0194] Convolution operation module, used for convolution layer to perform convolution operation on input data sequence using one-dimensional convolution kernel;
[0195] The convolution kernel slides on the input data sequence and calculates the convolution result at each position;
[0196] Construct feature maps based on the convolution results;
[0197] Among them, the data elements in the feature map are used to represent the characteristics of the input data sequence in the corresponding local area;
[0198] The pooling operation module is used to downsample the convolution output of the pooling layer and output it to reduce the dimension and redundant information of the data;
[0199] The fully connected layer module is used to flatten the output of the pooling layer into a one-dimensional vector and perform linear transformation using the weight matrix;
[0200] Get the Sigmoid activation function;
[0201] According to the Sigmoid activation function, the result of the linear transformation is processed nonlinearly to obtain the result model of the model reduction processing.
[0202] It is worth noting that although the present system / device only discloses a vehicle modeling module, a model reduction module, a model reduction hyperparameter optimization module, a reduced-order model verification module, a hardware-in-the-loop deployment module, a strategy optimization and debugging module, an input data module, a convolution operation module, a pooling operation module and a fully connected layer module, it does not mean that the present device is limited to the above-mentioned basic functional modules. On the contrary, what the present invention wants to express is that, on the basis of the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the existing technology to form an infinite number of embodiments or technical solutions. In other words, the present system / device is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the above-mentioned basic functional modules.
[0203] Figure 5 The present invention provides a structural block diagram of an electronic device according to a hardware-in-the-loop testing method based on a model-reduction control strategy according to one or more embodiments of the present invention.
[0204] like Figure 5 As shown, the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0205] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a hardware-in-the-loop testing method based on a model-reduced-order control strategy.
[0206] The present application also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a hardware-in-the-loop testing method based on a model-reduction control strategy.
[0207] The present application also provides a vehicle, comprising:
[0208] Electronic equipment for implementing the steps of a hardware-in-the-loop testing method based on a model-reduced control strategy;
[0209] a processor, wherein the processor runs a program and executes the steps of a hardware-in-the-loop testing method based on a model-reduced-order control strategy from data output by the electronic device when the program runs;
[0210] The storage medium is used to store a program, and when the program is running, it executes the steps of the hardware-in-the-loop testing method based on the model reduction control strategy for the data output from the electronic device.
[0211] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0212] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control electronic devices through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system. In the embodiments of the present invention, the electronic device can be a handheld device such as a smartphone or a tablet computer, or an electronic device such as a desktop computer or a portable computer, which is not particularly limited in the embodiments of the present invention.
[0213] The execution subject of the electronic device control in the embodiment of the present invention can be an electronic device, or a functional module in the electronic device that can call a program and execute the program. The electronic device can obtain the firmware corresponding to the storage medium. The firmware corresponding to the storage medium is provided by the supplier. The firmware corresponding to different storage media can be the same or different, and is not limited here. After the electronic device obtains the firmware corresponding to the storage medium, it can write the firmware corresponding to the storage medium into the storage medium, specifically, burn the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology and will not be described in detail in the embodiment of the present invention.
[0214] The electronic device can also obtain a reset command corresponding to the storage medium. The reset command corresponding to the storage medium is provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and are not limited here.
[0215] In this case, the storage medium of the electronic device is a storage medium in which the corresponding firmware is written. The electronic device can respond to the reset command corresponding to the storage medium in which the corresponding firmware is written, thereby resetting the storage medium in which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented in the existing technology and will not be described in detail in the embodiments of the present invention.
[0216] For the convenience of description, the above devices are described as various units and modules according to their functions. Of course, when implementing this application, the functions of each unit and module can be implemented in the same or multiple software and / or hardware.
[0217] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art in the art to which the present invention pertains. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with those in the context of the prior art and, unless specifically defined, will not be interpreted in an idealized or overly formal sense.
[0218] For simplicity of description, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because certain steps can be performed in other orders or simultaneously according to the embodiments of the present invention. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0219] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0220] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A hardware-in-the-loop testing method based on model-order reduction control strategy, characterized in that: The hardware-in-the-loop testing method based on model-reduction control strategy includes: The steps of vehicle modeling, model reduction, hyperparameter optimization for model reduction, model verification, hardware-in-the-loop deployment, and strategy optimization and debugging; Wherein, based on the vehicle modeling step, the model data for the whole vehicle model order reduction processing is prepared for the model order reduction step; The steps of model reduction include the steps of inputting data, convolution operation, pooling operation and fully connected layer; Based on the steps of model reduction, the output data of the vehicle model after order reduction is obtained; Based on the steps of model reduction and hyperparameter optimization, the optimal hyperparameter combination is determined through the Bayesian probability strategy, and the search is iteratively adjusted; Based on the steps of reduced-order model verification, data verification analysis is performed on the output data of the vehicle model after order reduction to ensure that the error accuracy is within the preset accuracy threshold range; Based on the hardware-in-the-loop deployment steps, the reduced-order vehicle model is deployed in the hardware-in-the-loop and compared with the calibration parameters; Based on the steps of strategy optimization and debugging, the control logic and calibration parameters are optimized according to the comparison with the calibration data and the preset control strategy to meet the preset control objectives.
2. The hardware-in-the-loop testing method based on model-reduction control strategy according to claim 1, characterized in that: The vehicle modeling steps include: The steps of obtaining modeling and verification, the steps of control strategy coupling modeling, and the steps of demonstrating the effect of calibration parameters; According to the steps of modeling and verification, control strategy coupling modeling, and calibration parameter effect demonstration, a vehicle model is generated and the influence of control parameters on performance is demonstrated; Carry out vehicle performance simulation and data testing based on the vehicle model and the influence of control parameters on performance, and build and verify the vehicle energy management model; After the whole vehicle energy management model is built and verified, the whole vehicle model is used as the model data for the model reduction step.
3. The hardware-in-the-loop testing method based on model-order reduction control strategy according to claim 2, characterized in that: The steps of modeling and checking include: According to the preset simulation description scope, the components, subsystems, subsystem integration and complete vehicles are divided; According to the division into components, subsystems, subsystem integration and complete vehicles, modeling and verification of components, modeling and verification of subsystems, modeling and verification of subsystem integration and modeling and verification of complete vehicles are carried out; Component modeling and verification includes building component models and verifying data against real components; Verification includes confirming the reliability and completeness of the modeling data; Subsystem modeling and verification includes component-based modeling and verification, building subsystem models, and verifying data against real subsystems; Verification includes confirming the reliability and completeness of the modeling data; The modeling and verification of subsystem integration includes building subsystem integration modeling based on subsystem modeling and verification, and verifying the data corresponding to the actual subsystem integration; Verification includes confirming the reliability and completeness of the modeling data; The verification also includes adding operational stability and accuracy tests on the model to ensure that the model's operation process and the data generated meet the preset calibration indicators; The modeling and verification of the entire vehicle includes component-based modeling and verification, subsystem modeling and verification, and subsystem integration modeling and verification. The entire vehicle model is built and verified against the data of the actual vehicle. Verification includes confirming the reliability and completeness of the modeling data; The verification also includes adding operational stability tests and accuracy tests on the model to ensure that the model's operation process and the data generated meet the preset calibration indicators.
4. The hardware-in-the-loop testing method based on model-reduction control strategy according to claim 3, characterized in that: The steps of reducing the model order include the steps of inputting data, the steps of convolution operation, the steps of pooling operation and the steps of fully connected layer. The step of inputting data includes representing the input data as a two-dimensional matrix, wherein a row represents a data sequence and a column represents a data element in the sequence; The steps of the convolution operation include: the convolution layer uses a one-dimensional convolution kernel to perform a convolution operation on the input data sequence; The convolution kernel slides on the input data sequence and calculates the convolution result at each position; Construct feature maps based on the convolution results; Among them, the data elements in the feature map are used to represent the characteristics of the input data sequence in the corresponding local area; The steps of the pooling operation include: the pooling layer downsamples the convolution output and outputs it to reduce the dimension and redundant information of the data; The steps of the fully connected layer include: the fully connected layer flattens the output of the pooling layer into a one-dimensional vector and performs a linear transformation using a weight matrix; Get the Sigmoid activation function; According to the Sigmoid activation function, the result of the linear transformation is processed nonlinearly to obtain the result model of the model reduction processing.
5. The hardware-in-the-loop testing method based on model-reduction control strategy according to claim 4, characterized in that: The steps of model reduction hyperparameter optimization include: Model the model training process as hyperparameter optimization; Among them, the optimal hyperparameter configuration of the machine learning model is determined by establishing a research process, experimental evaluation, intelligent search methods, pruning, and distributed optimization.
6. The hardware-in-the-loop testing method based on model-reduction control strategy according to claim 5, characterized in that: The steps of verifying the reduced-order model include: Based on the project requirement scope information, obtain the preset accuracy threshold of the corresponding calibration parameters; Processing the input data of the vehicle state according to the result model to generate processing result data; Processing the input data of the vehicle state according to the model before order reduction to generate original processing result data; Obtaining deviation data of the result data according to the processed result data and the original processed result data; Based on the deviation data of the result data and the preset accuracy threshold, verify whether the result model meets the project requirements.
7. The hardware-in-the-loop testing method based on model-order reduction control strategy according to claim 6, characterized in that: The steps of hardware-in-the-loop deployment include: Configure the hardware operating environment, including configuring the signal input and output interfaces; Deploy the resulting model in a hardware-in-the-loop device; The result model includes input and output, and the input includes calibration parameters; Based on deploying the result model in a hardware-in-the-loop device, an interface for calibrating parameters is reserved; According to the interface of reserved calibration parameters, adjust the calibration parameters, test the engine fuel consumption, and carry out comparative tests of calibration parameters.
8. The hardware-in-the-loop testing method based on model-reduction control strategy according to claim 7, characterized in that: The steps of strategy optimization and debugging include: Based on the result model, carry out hardware-in-the-loop function and performance testing of the control strategy, and optimize the control strategy logic and calibration parameters; Among them, the fuel consumption performance optimization calibration and the test of the result model stability are set; Based on the fuel consumption performance optimization calibration and the result model stability test, the efficiency improvement status of the result model and the efficiency improvement status data of the parameter calibration are obtained; According to the efficiency improvement status of the result model and the efficiency improvement status data of the parameter cycle, the control logic and calibration parameters are optimized.
9. A hardware-in-the-loop test device based on model-reduction control strategy, characterized in that: The hardware-in-the-loop test device based on model-reduction control strategy includes: Vehicle modeling module, model reduction module, model reduction hyperparameter optimization module, reduced-order model verification module, hardware-in-the-loop deployment module, and strategy optimization and debugging module; The vehicle modeling module is used to prepare the model data for the whole vehicle model order reduction process in the step of model order reduction; The model reduction module includes the input data module, convolution operation module, pooling operation module and fully connected layer module; Model reduction module, used to obtain the output data of the vehicle model after order reduction processing; The model reduction hyperparameter optimization module is used to determine the optimal hyperparameter combination through the Bayesian probability strategy and iteratively adjust the search; The reduced-order model verification module is used to perform data verification analysis on the output data of the vehicle model after order reduction processing to ensure that the error accuracy is within the preset accuracy threshold range; The hardware-in-the-loop deployment module is used to deploy the reduced-order vehicle model in the hardware-in-the-loop and compare it with the calibration parameters; The strategy optimization and debugging module is used to optimize the control logic and calibration parameters based on the comparison with the calibration data and the preset control strategy to meet the preset control objectives.
10. The hardware-in-the-loop test device based on model-reduction control strategy according to claim 9, characterized in that: include: An input data module, used to represent input data as a two-dimensional matrix, where a row represents a data sequence and a column represents a data element in the sequence; Convolution operation module, used for convolution layer to perform convolution operation on input data sequence using one-dimensional convolution kernel; The convolution kernel slides on the input data sequence and calculates the convolution result at each position; Construct feature maps based on the convolution results; Among them, the data elements in the feature map are used to represent the characteristics of the input data sequence in the corresponding local area; The pooling operation module is used to downsample the convolution output of the pooling layer and output it to reduce the dimension and redundant information of the data; The fully connected layer module is used to flatten the output of the pooling layer into a one-dimensional vector and perform linear transformation using the weight matrix; Get the Sigmoid activation function; According to the Sigmoid activation function, the result of the linear transformation is processed nonlinearly to obtain the result model of the model reduction processing.
Citation Information
Patent Citations
A method for integrated testing of intelligent driving vehicles
CN110794810B
Hardware-in-the-loop simulation evaluation system for automobile chassis control system
CN114791727A
Engine physical model processing method and device, storage medium and processor
CN114547775A
Submarine hydrodynamic load rapid forecasting method based on reduced-order model
CN115828797A
Road surface anti-skid performance sensing method for automatic driving
CN117910343A