A controller automatic calibration method, system, device and medium

CN123010708APending Publication Date: 2026-10-30WUXI VOCATIONAL INSTITUTE OF COMMERCE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611167040.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]基于此,有必要针对控制器自动标定过程中,用于参数评价的运行数据可能无法准确对应实际生效的候选标定参数和实际执行的目标工况,以及部分运行数据不满足参数评价所需的完整性和时序要求的技术问题,提供一种控制器自动标定方法、系统、设备及介质

Benefits of technology

[0057]上述控制器自动标定方法、系统、设备及介质,通过获取候选标定参数以及对应的目标工况,将候选标定参数写入被测控制器,并控制硬件在环仿真设备按照目标工况与被测控制器进行仿真交互;根据候选标定参数的参数状态信息和仿真交互过程中产生的运行数据,确定候选标定参数的执行状态;根据执行状态以及仿真交互的执行时序,确定运行数据与候选标定参数和目标工况之间的对应关系,并从运行数据中确定有效运行数据。上述方案,可以减少候选标定参数尚未实际生效、运行数据与本轮候选标定参数或目标工况不对应以及运行数据不满足完整性或时序要求等情况对参数评价结果的影响,使根据有效运行数据确定的下一候选标定参数建立在与本轮标定过程相对应的运行数据基础上,有利于提高候选标定参数评价结果的可靠性以及不同候选标定参数评价结果的可比性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010708A_ABST
    Figure CN123010708A_ABST
Patent Text Reader

Abstract

The application discloses a controller automatic calibration method, system, device and medium. The method obtains candidate calibration parameters and corresponding target working conditions, writes the candidate calibration parameters into a measured controller, and controls a hardware-in-the-loop simulation device to perform simulation interaction with the measured controller according to the target working conditions; obtains parameter state information and running data, determines an execution state of the candidate calibration parameters according to the parameter state information and the running data; determines a corresponding relationship between the running data and the candidate calibration parameters and the target working conditions according to the execution state and an execution time sequence of the simulation interaction, and determines effective running data from the running data; and determines a next candidate calibration parameter according to the effective running data. Therefore, the influence of the following factors on the parameter evaluation result can be reduced: the parameter is not actually effective, the running data does not correspond to the current calibration process, or the running data does not meet the evaluation requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automatic controller calibration technology, and in particular to an automatic controller calibration method, system, device and medium based on hardware-in-the-loop simulation. Background Technology

[0002] Controllers are typically configured with calibration parameters to adjust control performance. During controller development and testing, hardware-in-the-loop (HIL) simulation devices can be used to simulate the operating state of the controlled object and interact in a closed loop with the actual controller to evaluate and adjust the calibration parameters in the controller under different operating conditions.

[0003] During automatic controller calibration, candidate calibration parameters are typically written to the controller, the hardware-in-the-loop simulation device executes the corresponding operating conditions, and the control effect of the candidate calibration parameters is evaluated based on the operating data generated during the simulation interaction. However, the completion of the parameter write request or the receipt of the corresponding parameter value from the controller does not necessarily indicate that the candidate calibration parameter has actually taken effect in the current closed-loop control process. If operating data is collected before the candidate calibration parameter has actually taken effect, the evaluation results may not accurately reflect the control effect of the candidate calibration parameter.

[0004] Furthermore, operational data may originate from controllers, hardware-in-the-loop simulation devices, or data acquisition links. Differences in time references, transmission delays, or data gaps may exist between different data sources, and data corresponding to different candidate calibration parameters, target operating conditions, simulation model versions, and initial states may be mixed together, thus preventing the collected operational data from accurately corresponding to the candidate calibration parameters and evaluation operating conditions for this round.

[0005] Therefore, ensuring that the operational data used for parameter evaluation accurately corresponds to the candidate calibration parameters that have already taken effect and the target operating conditions that have actually been executed, and meeting the data integrity and timing requirements required for parameter evaluation, is a problem that needs to be solved in the automatic calibration process of the controller. Summary of the Invention

[0006] Based on this, it is necessary to provide a controller automatic calibration method, system, device, and medium to address the technical problems that the operating data used for parameter evaluation during the automatic calibration process may not accurately correspond to the actual effective candidate calibration parameters and the actual target operating conditions, as well as the technical problems that some operating data does not meet the integrity and timing requirements required for parameter evaluation.

[0007] An automatic calibration method for a controller, the method comprising:

[0008] Obtain candidate calibration parameters and the target working conditions corresponding to the candidate calibration parameters;

[0009] The candidate calibration parameters are written into the controller under test, and the hardware-in-the-loop simulation device is controlled to perform simulation interaction with the controller under test according to the target operating conditions.

[0010] Obtain the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction;

[0011] Based on parameter status information and runtime data, determine the execution status of candidate calibration parameters;

[0012] Based on the execution status and the execution sequence of the simulation interaction, determine the correspondence between the running data and the candidate calibration parameters and the target operating conditions;

[0013] Based on the execution status and corresponding relationships, determine the valid execution data from the execution data;

[0014] Based on the valid operating data, determine the next candidate calibration parameters.

[0015] In one embodiment, the parameter status information includes write confirmation information and readback calibration parameters;

[0016] Obtain the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction, including:

[0017] Obtain the write confirmation information of the candidate calibration parameters, and read the readback calibration parameters corresponding to the candidate calibration parameters from the controller under test;

[0018] Acquire operational data from the controller under test and the hardware-in-the-loop simulation device.

[0019] In one embodiment, the operational data includes actuator feedback information and controlled object response information corresponding to the candidate calibration parameters;

[0020] Based on parameter status information and runtime data, determine the execution status of candidate calibration parameters, including:

[0021] The write status of the candidate calibration parameters is determined based on the write confirmation information and whether the readback calibration parameters and the candidate calibration parameters meet the preset consistency conditions.

[0022] When the write status characterization indicates that the candidate calibration parameters have been written to the controller under test, the actuator feedback information meets the preset execution conditions, and the controlled object response information meets the preset response conditions, the candidate calibration parameters are determined to be actually effective.

[0023] In one embodiment, obtaining candidate calibration parameters and the target operating condition corresponding to the candidate calibration parameters further includes:

[0024] Obtain the operating condition version and hardware-in-the-loop simulation model version corresponding to the target operating condition;

[0025] Based on the execution status and the execution sequence of the simulation interaction, the correspondence between the running data and the candidate calibration parameters and target operating conditions is determined, including:

[0026] If the execution status indicates that the candidate calibration parameters are actually effective, determine the actual effective time of the candidate calibration parameters;

[0027] Determine the execution time period, actual operating condition version, and actual hardware-in-the-loop simulation model version of the hardware-in-the-loop simulation device for the target operating condition;

[0028] When the actual operating condition version is consistent with the operating condition version, and the actual hardware-in-the-loop simulation model version is consistent with the hardware-in-the-loop simulation model version, the evaluation time range is determined based on the actual effective time and the operating condition execution period.

[0029] The evaluation time range begins at the time after the actual effective time has elapsed for a stable waiting period, and the evaluation time range is within the working condition execution period.

[0030] The operational data collected within the evaluation time frame are determined as the operational data corresponding to the candidate calibration parameters and target operating conditions.

[0031] In one embodiment, the running data includes first running data from the controller under test and second running data from the hardware-in-the-loop simulation device, wherein the first running data and the second running data have a collection time and an arrival time for entering the evaluation buffer, respectively.

[0032] Based on the execution status and corresponding relationships, valid execution data is determined from the execution data, including:

[0033] Map the acquisition time and arrival time of the first and second running data to a unified time base;

[0034] Based on the acquisition time mapped to a unified time reference, the evaluation data corresponding to the evaluation time range is determined from the first and second running data;

[0035] Based on the collection time and arrival time of the preset key operational data in the evaluation data, determine the collection alignment delay corresponding to the preset key operational data;

[0036] If the preset key operating data meets the integrity requirements and the corresponding acquisition alignment delay is not greater than the allowable delay threshold, the evaluation data will be determined as valid operating data.

[0037] In one embodiment, the candidate calibration parameter is the candidate EGR valve opening, the readback calibration parameter is the readback EGR valve opening, and the running data includes the EGR valve position feedback information after the candidate EGR valve opening is written and the current EGR rate.

[0038] The method also includes:

[0039] Before writing the candidate EGR valve opening into the controller under test, the control hardware-in-the-loop simulation device and the controller under test are stably running in the initial state corresponding to the target operating condition, and the EGR valve position feedback information and EGR rate are obtained during the stable period before writing.

[0040] The baseline of the EGR valve position before writing is determined based on the EGR valve position feedback information during the stabilization period before writing, and the baseline of the EGR rate is determined based on the EGR rate during the stabilization period before writing.

[0041] In one embodiment, determining the execution status of candidate calibration parameters based on parameter status information and runtime data includes:

[0042] The expected direction of valve opening change is determined based on the candidate EGR valve opening and the baseline of the EGR valve position before writing;

[0043] Determine the direction of EGR rate change based on the current EGR rate and the EGR rate baseline;

[0044] If the parameter writing request corresponding to the candidate EGR valve opening has been executed normally, the readback EGR valve opening meets the preset consistency condition, the EGR valve position indicated by the EGR valve position feedback information enters the allowable deviation range corresponding to the candidate EGR valve opening and remains at the preset duration, and the EGR rate change direction meets the preset direction correspondence with the expected valve opening change direction, then the candidate EGR valve opening is determined to be actually effective.

[0045] An automatic controller calibration system, comprising:

[0046] The parameter acquisition module is used to acquire candidate calibration parameters and the target working conditions corresponding to the candidate calibration parameters;

[0047] The calibration interaction module is used to write candidate calibration parameters into the controller under test and control the hardware-in-the-loop simulation device to perform simulation interaction with the controller under test according to the target operating conditions.

[0048] The data acquisition module is used to acquire the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction.

[0049] The execution status determination module is used to determine the execution status of candidate calibration parameters based on parameter status information and running data.

[0050] The correspondence determination module is used to determine the correspondence between the running data and the candidate calibration parameters and target operating conditions based on the execution status and the execution sequence of the simulation interaction.

[0051] The valid data determination module is used to determine valid running data from the running data based on the execution status and corresponding relationships;

[0052] The parameter determination module is used to determine the next candidate calibration parameters based on valid operating data.

[0053] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0054] The process involves: acquiring candidate calibration parameters and their corresponding target operating conditions; writing the candidate calibration parameters into the controller under test (DUT) and controlling the hardware-in-the-loop (HIL) simulation device to perform simulation interaction with the DUT according to the target operating conditions; acquiring the parameter status information of the candidate calibration parameters in the DUT, as well as the operating data generated during the simulation interaction; determining the execution status of the candidate calibration parameters based on the parameter status information and operating data; determining the correspondence between the operating data and the candidate calibration parameters and target operating conditions based on the execution status and the execution timing of the simulation interaction; determining the valid operating data from the operating data based on the execution status and the correspondence; and determining the next candidate calibration parameter based on the valid operating data.

[0055] A computer-readable storage medium storing a computer program, which, when executed by a processor, performs the following steps:

[0056] The process involves: acquiring candidate calibration parameters and their corresponding target operating conditions; writing the candidate calibration parameters into the controller under test (DUT) and controlling the hardware-in-the-loop (HIL) simulation device to perform simulation interaction with the DUT according to the target operating conditions; acquiring the parameter status information of the candidate calibration parameters in the DUT, as well as the operating data generated during the simulation interaction; determining the execution status of the candidate calibration parameters based on the parameter status information and operating data; determining the correspondence between the operating data and the candidate calibration parameters and target operating conditions based on the execution status and the execution timing of the simulation interaction; determining the valid operating data from the operating data based on the execution status and the correspondence; and determining the next candidate calibration parameter based on the valid operating data.

[0057] The aforementioned automatic controller calibration method, system, equipment, and medium acquire candidate calibration parameters and their corresponding target operating conditions, write the candidate calibration parameters into the controller under test (DUT), and control the hardware-in-the-loop simulation device to perform simulation interaction with the DUT according to the target operating conditions. Based on the parameter status information of the candidate calibration parameters and the operational data generated during the simulation interaction, the execution status of the candidate calibration parameters is determined. Based on the execution status and the execution sequence of the simulation interaction, the correspondence between the operational data and the candidate calibration parameters and target operating conditions is determined, and valid operational data is identified from the operational data. This scheme can reduce the impact of situations such as candidate calibration parameters not yet being effective, operational data not corresponding to the current round of candidate calibration parameters or target operating conditions, and operational data not meeting completeness or timing requirements on parameter evaluation results. It ensures that the next candidate calibration parameter determined based on valid operational data is based on operational data corresponding to the current calibration process, which is beneficial for improving the reliability of candidate calibration parameter evaluation results and the comparability of evaluation results for different candidate calibration parameters. Attached Figure Description

[0058] Figure 1 This is a schematic diagram illustrating the application environment of the controller automatic calibration method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating an automatic controller calibration method in one embodiment;

[0060] Figure 3 This is a flowchart illustrating an automatic calibration method for EGR valve opening in one embodiment;

[0061] Figure 4 This is a block diagram of the controller automatic calibration system in one embodiment;

[0062] Figure 5 This is a schematic diagram of the structure of an electronic device in one embodiment. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0064] The automatic controller calibration method provided in this application can be applied to, for example... Figure 1 The application environment shown. For example... Figure 1As shown, the application environment includes a computer device 102, a hardware-in-the-loop (HIL) simulation device 104, and a controller under test (DUT) 106. The computer device 102 communicates with both the HIL simulation device 104 and the DUT 106. The HIL simulation device 104 is connected to the DUT 106 to perform simulation interaction with the DUT 106 according to the target operating conditions.

[0065] Computer device 102 may be an industrial control computer, workstation, desktop computer, portable computer, server, or other electronic device with data processing and communication capabilities. Computer device 102 may run a computer program for executing an automatic calibration method for the controller. The computer program may include at least one of an automatic calibration program, a measurement calibration program, a hardware-in-the-loop control program, and a data processing program.

[0066] In some embodiments, the computer program described above can run on the same computer device 102. In other embodiments, the computer program can also run distributed across multiple communicating computer devices, with the multiple computer devices collaboratively executing the controller automatic calibration method provided in this application. Therefore, Figure 1 The computer device 102 shown can represent a single computer device or a computing environment consisting of multiple computer devices.

[0067] The hardware-in-the-loop simulation device 104 is used to run a simulation model of the controlled object corresponding to the controller under test 106, and to perform closed-loop simulation interaction with the controller under test 106 according to the target operating conditions. The hardware-in-the-loop simulation device 104 can provide virtual sensor signals to the controller under test 106, and update the operating state of the controlled object simulation model according to the control signals output by the controller under test 106, so as to generate a response signal corresponding to the operating state of the controlled object.

[0068] The controller under test (DUT) 106 is a real controller hardware connected to the hardware-in-the-loop (HIL) simulation device 104 and used as the object of automatic calibration. The DUT 106 can be an engine controller, powertrain controller, vehicle controller, motor controller, battery management controller, or other controllers with calibrable control parameters. The DUT 106 can execute control strategies based on virtual sensor signals provided by the HIL simulation device 104 and the written calibration parameters, and output corresponding control signals to the HIL simulation device 104.

[0069] The computer device 102 can write calibration parameters to the controller under test 106 and read parameter information related to the calibration parameters from the controller under test 106. The computer device 102 can also control the hardware-in-the-loop simulation device 104 to execute corresponding operating conditions and acquire data generated during the simulation interaction. Parameter writing, parameter reading, and runtime variable acquisition between the computer device 102 and the controller under test 106 can be achieved through a measurement calibration communication interface; operating condition control and data interaction between the computer device 102 and the hardware-in-the-loop simulation device 104 can be achieved through an Ethernet interface, a dedicated communication interface, or other data communication interfaces.

[0070] In some embodiments, the computer device 102 and the controller under test 106 can communicate via a general measurement and calibration protocol based on Ethernet for parameter writing, parameter reading back, and acquisition of runtime variables. Parameter description information corresponding to candidate calibration parameters can be provided by an A2L parameter description file or a parameter description file with the same function. The A2L parameter description file records the writing location, physical dimensions, numerical conversion relationships, allowed value range, and writing method of the calibrable parameters in the controller under test 106. The specific measurement calibration protocol and parameter description file format used can be determined based on the interface capabilities of the controller under test 106.

[0071] In some embodiments, the hardware-in-the-loop simulation device 104 may further include a residual bus simulation unit, a fault injection unit, or a programmable logic processing unit. The residual bus simulation unit is used to simulate unconnected network nodes in the target vehicle network and generate corresponding communication messages; the fault injection unit is used to inject preset fault states into virtual sensor signals, actuator feedback, or communication messages; and the programmable logic processing unit is used to generate crankshaft signals, camshaft signals, or other excitation signals with edge timing requirements.

[0072] It should be noted that, Figure 1 Only the main objects related to the technical solution of this application and their interaction relationships are shown, and the specific communication protocols, interface forms and physical deployment methods between the objects are not limited. For example, the functions of data acquisition, time stamping and caching can be performed by computer device 102, or by hardware-in-the-loop simulation device 104 or the corresponding data acquisition link; some data processing procedures performed by computer device 102 can also be completed collaboratively by other computer devices.

[0073] In some embodiments, as Figure 1The application environment shown can be expanded to include multiple calibration evaluation units. Each calibration evaluation unit includes a hardware-in-the-loop simulation device and a controller under test connected to the hardware-in-the-loop simulation device. The computer device 102 can assign different candidate calibration parameters to different calibration evaluation units, and each calibration evaluation unit can perform the processes of writing candidate calibration parameters, confirming actual effectiveness, executing target operating conditions, collecting operating data, and determining effective operating data.

[0074] When using particle swarm optimization, candidate parameter groups corresponding to different particles can be assigned to different calibration evaluation units for parallel evaluation. For the same controller under test, only one candidate calibration parameter is written and evaluated within the same time period. The evaluation results generated by different calibration evaluation units are only combined and provided to the automatic calibration algorithm when the hardware-in-the-loop simulation model version, target operating condition, time reference, and evaluation rules meet the consistency conditions.

[0075] In one embodiment, such as Figure 2 As shown, an automatic calibration method for a controller is provided, wherein the method is based on... Figure 1 The following explanation will be based on the example of computer device 102.

[0076] Step S201: Obtain candidate calibration parameters and the target operating conditions corresponding to the candidate calibration parameters.

[0077] In step S201, the computer device 102 acquires candidate calibration parameters and the target operating conditions corresponding to the candidate calibration parameters.

[0078] Candidate calibration parameters are the parameter values ​​to be written into the controller 106 under test during this round of automatic calibration. Candidate calibration parameters can be a single candidate value for a parameter to be calibrated, or a group of candidate parameters corresponding to multiple parameters to be calibrated.

[0079] In the initial calibration iteration, computer device 102 can generate candidate calibration parameters based on a pre-defined parameter range. In subsequent calibration iterations, computer device 102 can generate new candidate calibration parameters based on the evaluated candidate calibration parameters and their evaluation results. The candidate calibration parameters can be generated by an automatic calibration algorithm running in computer device 102, or they can be generated by other computer devices and then sent to computer device 102.

[0080] The target operating condition is the virtual operating condition executed by the hardware-in-the-loop simulation device 104 when performing closed-loop evaluation of candidate calibration parameters. The target operating condition can be a steady-state operating condition, a transient operating condition, a disturbance operating condition, a safety boundary operating condition, or a repeated verification operating condition.

[0081] The target operating condition can be determined based on operating parameters and the rules governing their changes over time. Operating parameters may include at least one of engine speed, load, and control targets. For example, during the automatic calibration of the engine controller, the target operating condition can be determined based on engine speed trajectory, torque request trajectory, changes in exhaust gas recirculation targets, changes in boost pressure targets, changes in rail pressure, or exhaust temperature limits.

[0082] The candidate calibration parameters correspond to the target operating conditions, meaning that the candidate calibration parameters are written into the controller under test 106 under the corresponding operating conditions of the target operating conditions, and the candidate calibration parameters are evaluated using the hardware-in-the-loop simulation device 104 and the operating data generated by the controller under test 106 under the operating conditions.

[0083] Different candidate calibration parameters can each correspond to the same target operating condition, allowing for comparison of the control effects produced by different candidate calibration parameters under the same operating conditions. Depending on the object of application or evaluation requirements of the parameter to be calibrated, corresponding target operating conditions can also be configured for different candidate calibration parameters.

[0084] In this embodiment, the computer device 102 also obtains the operating condition version, hardware-in-the-loop simulation model version, and initial state corresponding to the target operating condition.

[0085] The operating condition version is used to identify the target operating condition configuration used in this round of calibration. The hardware-in-the-loop simulation model version is used to identify the controlled object simulation model running in the hardware-in-the-loop simulation device 104. The initial state is the operating state of the controlled object simulation model and the controller under test 106 before the hardware-in-the-loop simulation device 104 starts executing the target operating condition.

[0086] Computer device 102 records the correspondence between candidate calibration parameters, target operating conditions, operating condition versions, hardware-in-the-loop simulation model versions, and initial states. This correspondence is saved during the evaluation process of the candidate calibration parameters in this round, so as to determine whether the operating conditions actually executed by the hardware-in-the-loop simulation device 104, the actual operating simulation model of the controlled object, and the operating data generated during the simulation interaction process correspond to the candidate calibration parameters in this round.

[0087] When the actual operating condition version, the actual hardware-in-the-loop simulation model version, or the actual initial state is inconsistent with the recorded information, the computer device 102 will not determine the corresponding operating data as the operating data corresponding to the candidate calibration parameters of this round.

[0088] In some embodiments, the computer device 102 generates corresponding evaluation records for each round of evaluation of candidate calibration parameters. The evaluation records are used to store the correspondence between candidate calibration parameters, target operating conditions, operating condition versions, hardware-in-the-loop simulation model versions, initial states, parameter writing states, actual effective times, evaluation time ranges, results of valid data assessments, and evaluation indicators. The evaluation records may have record identifiers to distinguish different evaluation processes; the specific encoding method of the record identifiers is not limited by this embodiment.

[0089] Step S202: Write the candidate calibration parameters into the controller under test, and control the hardware-in-the-loop simulation device to perform simulation interaction with the controller under test according to the target operating conditions.

[0090] In step S202, the computer device 102 writes the candidate calibration parameters into the controller under test 106 and controls the hardware-in-the-loop simulation device 104 to perform simulation interaction with the controller under test 106 according to the target operating conditions.

[0091] Before writing the candidate calibration parameters, the computer device 102 obtains the parameter description information corresponding to the candidate calibration parameters. The parameter description information includes the parameter writing location, physical dimensions, allowed value range, parameter adjustment range limit, parameter change rate limit, and parameter writing conditions.

[0092] Computer device 102 performs pre-write verification on candidate calibration parameters based on parameter description information. Pre-write verification includes: determining whether the parameter writing position corresponding to the candidate calibration parameter exists, whether the physical dimensions of the candidate calibration parameter match the corresponding parameter, whether the candidate calibration parameter is within the allowable value range, whether the change and rate of change of the candidate calibration parameter relative to the current parameter value in the controller under test 106 meet the corresponding limits, and whether the current operating state of the controller under test 106 meets the parameter writing conditions.

[0093] If a candidate calibration parameter fails the pre-write verification, the computer device 102 stops evaluating the candidate calibration parameters in this round, does not write the candidate calibration parameters to the controller under test 106, and does not start the target operating condition corresponding to the candidate calibration parameters.

[0094] When candidate calibration parameters pass the pre-write verification, computer device 102 sends a parameter write request to the controller under test 106 according to the parameter write location and the parameter write method supported by the controller under test 106, so as to write the candidate calibration parameters to the corresponding calibrable location. For a candidate parameter group consisting of multiple parameters, computer device 102 can complete the parameter writing according to the corresponding parameter writing order or parameter grouping relationship.

[0095] The computer device 102 also controls the hardware-in-the-loop simulation device 104 to call the hardware-in-the-loop simulation model version recorded in step S201, and initialize the controlled object simulation model according to the initial state corresponding to the target operating condition. After the controlled object simulation model is initialized, the computer device 102 controls the hardware-in-the-loop simulation device 104 to start executing the target operating condition.

[0096] During the execution of the target operating condition, the hardware-in-the-loop simulation device 104 generates virtual sensor signals based on the current operating state of the controlled object simulation model and sends the virtual sensor signals to the controller under test 106. The virtual sensor signals are used to simulate the detection signals provided by the sensors in the real controlled object to the controller.

[0097] The controller under test 106 executes the control strategy based on the received virtual sensor signals and the currently used calibration parameters, generates the corresponding control signals, and sends the control signals to the hardware-in-the-loop simulation device 104.

[0098] The hardware-in-the-loop simulation device 104 updates the operating state of the simulation model of the controlled object according to the control signal, and generates the virtual sensor signal for the next moment based on the updated operating state. The hardware-in-the-loop simulation device 104 and the controller under test 106 continuously interact with each other in the above manner, thereby forming a closed-loop simulation process in which the controller under test 106 participates.

[0099] Step S203: Obtain the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction.

[0100] In step S203, the computer device 102 acquires the parameter status information of the candidate calibration parameters in the controller under test 106, as well as the running data generated during the simulation interaction.

[0101] In some embodiments, the parameter status information includes write confirmation information and readback calibration parameters. The computer device 102 acquires the write confirmation information of the candidate calibration parameters and reads the readback calibration parameters corresponding to the candidate calibration parameters from the controller under test 106. The computer device 102 also acquires operating data from the controller under test 106 and the hardware-in-the-loop simulation device 104.

[0102] The write confirmation information is used to characterize the communication execution status of the parameter write request corresponding to the candidate calibration parameter. The write confirmation information can be the response information returned by the controller under test 106 or the parameter write communication interface in response to the parameter write request, or it can be the confirmation information generated by the computer device 102 based on the communication results of the parameter write process.

[0103] The computer device 102 reads the currently saved parameter values ​​from the controller under test 106 according to the parameter write position corresponding to the candidate calibration parameters, and uses the read parameter values ​​as readback calibration parameters. When there are multiple candidate calibration parameters, the computer device 102 reads the current parameter values ​​corresponding to each parameter respectively to form a readback calibration parameter group.

[0104] The operational data includes controller-side operational data generated by the controller under test 106 during the simulation interaction process, and simulation device-side operational data generated by the hardware-in-the-loop simulation device 104 during the simulation interaction process.

[0105] Controller-side operational data may include actuator feedback, control status, and diagnostic status. Simulation device-side operational data may include controlled object response, target operating condition execution status, and safety-related status.

[0106] Taking the controller under test 106 as an engine controller as an example, the controller-side operating data may include exhaust gas recirculation valve position feedback, control output of the engine controller, and diagnostic status; the simulation equipment-side operating data may include engine speed, intake pressure, boost pressure, exhaust gas recirculation rate, and target operating condition execution status.

[0107] Computer device 102 can acquire write confirmation information, read back calibration parameters, and controller-side operating data through a communication connection established with the controller under test 106, and acquire simulation device-side operating data through a communication connection established with the hardware-in-the-loop simulation device 104. When a data acquisition device is configured, the data acquisition device acquires the operating data generated by the controller under test 106 and the hardware-in-the-loop simulation device 104, and sends the acquired operating data to computer device 102.

[0108] In some embodiments, the parameter status information also includes parameter version information or parameter consistency verification results. The computer device 102 obtains the parameter version corresponding to the candidate calibration parameters and the parameter version currently used by the controller under test 106, and records the correspondence between the parameter version information and the readback calibration parameters.

[0109] Computer device 102 records the acquired parameter status information and operating data according to the correspondence between the candidate calibration parameters and the target operating conditions in this round.

[0110] Step S204: Determine the execution status of the candidate calibration parameter based on the parameter status information and the running data.

[0111] In step S204, the computer device 102 determines the execution status of the candidate calibration parameters based on the parameter status information and operating data.

[0112] In some embodiments, the operating data includes actuator feedback information and controlled object response information corresponding to the candidate calibration parameters. The computer device 102 determines the write status of the candidate calibration parameters based on the write confirmation information and whether the readback calibration parameters and candidate calibration parameters meet preset consistency conditions. If the write status indicates that the candidate calibration parameters have been written to the controller under test 106, the actuator feedback information meets preset execution conditions, and the controlled object response information meets preset response conditions, then the candidate calibration parameters are determined to be actually effective.

[0113] The write confirmation information is used to characterize the communication execution status of the parameter write request corresponding to the candidate calibration parameter. The readback calibration parameter is the parameter value currently saved in the calibrable position corresponding to the candidate calibration parameter in the controller under test 106. The computer device 102 determines the write status of the candidate calibration parameter by combining the write confirmation information and the readback calibration parameter, rather than determining whether the candidate calibration parameter has been written solely based on whether a parameter write request has been issued.

[0114] When the write confirmation information characterization parameter write request has been executed normally, and the readback calibration parameters and candidate calibration parameters meet the preset consistency conditions, the computer device 102 determines that the candidate calibration parameters have been written to the controller under test 106. When the candidate calibration parameters include multiple parameters, if each readback calibration parameter meets the preset consistency conditions with the corresponding candidate parameter in the candidate parameter group, the computer device 102 determines that the candidate parameter group has been written to the controller under test 106.

[0115] If the parameter status information includes parameter version information, the computer device 102 further determines whether the parameter version corresponding to the candidate calibration parameter is consistent with the parameter version currently used by the controller under test 106. If the parameter versions are consistent, and both the write confirmation information and the readback calibration parameters meet the corresponding conditions, the computer device 102 determines that the candidate calibration parameter has been written to the controller under test 106.

[0116] When a parameter write request is explicitly rejected, and the readback result indicates that the parameter values ​​in the controller under test 106 have not changed, the computer device 102 determines that the candidate calibration parameters have not been written to the controller under test 106. If some parameters in the candidate parameter group meet the preset consistency conditions, while the remaining parameters do not, the computer device 102 determines that the candidate parameter group is in a partially written state. If no valid write confirmation information is obtained, the readback calibration parameters cannot be obtained, or the current parameter values ​​in the controller under test 106 cannot be determined based on the obtained information, the computer device 102 determines that the parameter status of the candidate calibration parameters cannot be determined.

[0117] After confirming that the candidate calibration parameters have been written into the controller under test 106, the computer device 102 determines whether the candidate calibration parameters actually participate in the current closed-loop control and produce corresponding control effects based on the actuator feedback information and the controlled object response information.

[0118] The preset execution conditions are determined based on the actuator and its feedback value corresponding to the candidate calibration parameters. For example, the preset execution conditions can be that the actuator feedback value enters the allowable deviation range corresponding to the candidate calibration parameters; when it is necessary to eliminate the influence of instantaneous fluctuations, the preset execution conditions also require the actuator feedback value to be continuously maintained within the allowable deviation range for a preset holding time.

[0119] The preset response conditions are determined based on the interaction between the candidate calibration parameters and the controlled object. For example, the preset response conditions can be a match between the direction of change of the controlled object's response information relative to the baseline running data before writing and the direction of change of the candidate calibration parameters relative to the parameter values ​​before writing.

[0120] When using pre-writing baseline operating data, the operating data includes baseline operating data before writing candidate calibration parameters and response operating data after writing candidate calibration parameters. The baseline operating data consists of actuator feedback information and controlled object response information obtained during a stable operating period when the controller under test 106 and the hardware-in-the-loop simulation device 104 are in their initial states corresponding to the target operating condition. The computer device 102 determines whether the controlled object's response information meets preset response conditions based on the relationship between the baseline operating data and the response operating data.

[0121] The write status, actuator feedback information, and controlled object response information constitute the joint judgment criteria for the actual effectiveness of candidate calibration parameters. The write status determines whether the candidate calibration parameters have been written to the controller under test 106; the actuator feedback information determines whether the corresponding actuator has generated an action that conforms to the candidate calibration parameters; and the controlled object response information determines whether the actuator action has caused the controlled object to produce a state change that conforms to preset response conditions. Only when all the above judgment results meet the corresponding conditions does the computer device 102 determine that the candidate calibration parameters are actually effective.

[0122] Taking the exhaust gas recirculation valve opening as a candidate calibration parameter as an example, the computer device 102 uses the exhaust gas recirculation valve position feedback and exhaust gas recirculation rate obtained during the stable operation period before the candidate exhaust gas recirculation valve opening is written as the benchmark operating data. After the candidate exhaust gas recirculation valve opening is written to the controller under test 106, the computer device 102 determines whether the readback valve opening is consistent with the candidate exhaust gas recirculation valve opening, whether the exhaust gas recirculation valve position feedback enters the allowable deviation range corresponding to the candidate exhaust gas recirculation valve opening and is continuously maintained for a preset holding time, and whether the change direction of the exhaust gas recirculation rate relative to the benchmark value before writing is consistent with the change direction of the candidate exhaust gas recirculation valve opening.

[0123] In this embodiment, the actual effective result of the candidate exhaust gas recirculation valve opening is determined according to the following formula:

[0124]

[0125] in, This represents the actual effective result of the candidate exhaust gas recirculation valve opening. To write the confirmation result, To ensure consistent readback results, To maintain the valve position feedback result, The result is the direction of the exhaust gas recirculation rate response. For the safety status assessment result, This indicates a logical AND operation.

[0126] The confirmation message indicates that the parameter write request was executed normally. Take 1; when the opening degree of the readback valve is consistent with the opening degree of the candidate exhaust gas recirculation valve, Set to 1; when the exhaust gas recirculation valve position feedback enters the allowable deviation range and remains continuously for the preset holding time, Set to 1; when the direction of change of the exhaust gas recirculation rate relative to the baseline value before writing is consistent with the direction of change of the candidate exhaust gas recirculation valve opening, Set to 1; when the safety-related status is within the allowable range. Take 1.

[0127] The preset holding time required for the exhaust gas recirculation valve position feedback is determined according to the following formula:

[0128]

[0129] in, To preset the holding time, For the data collection cycle, The dominant dynamic time constant of the exhaust gas recirculation path is... This is the function for finding the maximum value.

[0130] In this embodiment, It is 0.45 s. It is 10 ms, therefore, The time is 0.09 s. When the exhaust gas recirculation valve position feedback enters the allowable deviation range and remains continuously within 0.09 s, the exhaust gas recirculation rate response direction meets the preset response conditions, and all other judgment results are 1, If the value is 1, computer device 102 determines the actual effective opening of the candidate exhaust gas recirculation valve. The inlet pressure is used to determine the coupling response and safety status of the exhaust gas recirculation path, and is not used to replace the determination of the exhaust gas recirculation valve position feedback or the direction of the exhaust gas recirculation rate response.

[0131] In some embodiments, the computer device 102 determines the moment when the write state, preset execution conditions, and preset response conditions are first simultaneously satisfied as the actual effective moment of the candidate calibration parameter. In the aforementioned exhaust gas recirculation valve opening calibration embodiment, The moment when the value is first set to 1 is determined as the actual effective moment of the candidate exhaust gas recirculation valve opening.

[0132] Step S205: Based on the execution status and the execution sequence of the simulation interaction, determine the correspondence between the running data, the candidate calibration parameters, and the target operating condition.

[0133] In step S205, the computer device 102 determines the correspondence between the running data, the candidate calibration parameters, and the target operating condition based on the execution status of the candidate calibration parameters and the execution timing of the simulation interaction.

[0134] In some embodiments, when the candidate calibration parameters are actually effective in the execution state characterization, the computer device 102 determines the actual effective time of the candidate calibration parameters; determines the execution period of the target operating condition, the actual operating condition version, and the actual hardware-in-the-loop simulation model version of the hardware-in-the-loop simulation device 104; and determines the evaluation time range based on the actual effective time and the execution period of the operating condition when the actual operating condition version is consistent with the operating condition version and the actual hardware-in-the-loop simulation model version is consistent with the hardware-in-the-loop simulation model version.

[0135] The actual effective time is the moment when the write status of the candidate calibration parameters, the preset execution conditions, and the preset response conditions are first simultaneously satisfied. The operating condition execution period is the time range between the moment when the hardware-in-the-loop simulation device 104 starts executing the target operating condition and the moment when it ends executing the target operating condition.

[0136] The actual effective time, as well as the start and end times of the operating condition execution period, use the same time base. When the hardware-in-the-loop simulation device 104, the controller under test 106, or the data acquisition device uses different local clocks, the computer device 102 converts the local times recorded by each device into times under a unified time base before comparing the corresponding times.

[0137] The actual operating condition version is the version corresponding to the operating condition configuration executed by the hardware-in-the-loop simulation device 104 this time, and the actual hardware-in-the-loop simulation model version is the version corresponding to the controlled object simulation model run by the hardware-in-the-loop simulation device 104 this time. The computer device 102 compares the actual operating condition version with the operating condition version recorded in step S201, and compares the actual hardware-in-the-loop simulation model version with the hardware-in-the-loop simulation model version recorded in step S201.

[0138] If the actual operating condition version is inconsistent with the operating condition version, or if the actual hardware-in-the-loop simulation model version is inconsistent with the hardware-in-the-loop simulation model version, the computer device 102 will not determine the corresponding operating data as the operating data corresponding to the candidate calibration parameters and target operating conditions of this round.

[0139] In some embodiments, the computer device 102 further acquires the actual initial state when the hardware-in-the-loop simulation device 104 actually executes the target operating condition, and compares the actual initial state with the initial state recorded in step S201. For discrete states such as control modes and switching states, if the actual initial state is the same as the corresponding preset state, the corresponding discrete state is determined to be consistent; for continuous states such as speed, pressure, or temperature, if the deviation between the actual state value and the corresponding preset state value is within the allowable deviation range, the corresponding continuous state is determined to be consistent. When all initial states meet the corresponding consistency conditions, the computer device 102 determines that the actual initial state is consistent with the initial state corresponding to the target operating condition.

[0140] If the actual initial state is inconsistent with the initial state corresponding to the target operating condition, the computer device 102 will not determine the corresponding operating data as the operating data corresponding to the candidate calibration parameters and the target operating condition in this round.

[0141] The starting time of the evaluation time range is the time after the actual effective time has elapsed for a stable waiting period, and is determined according to the following formula:

[0142]

[0143] in, To evaluate the start time of the time range, This refers to the actual effective time of the candidate calibration parameters. To ensure stable waiting time.

[0144] The stabilization waiting time is determined based on the dynamic response characteristics of the actuator and the controlled object after the candidate calibration parameters actually take effect. It is used to exclude operational data generated during parameter switching and before the closed-loop response has stabilized. The end time of the evaluation time range is the time elapsed after the preset evaluation time from the start time of the evaluation time range.

[0145] Computer device 102 determines whether the evaluation time range is within the operating condition execution period. If the start time of the evaluation time range is not earlier than the start time of the operating condition execution period, and the end time of the evaluation time range is not later than the end time of the operating condition execution period, the evaluation time range is determined to be within the operating condition execution period.

[0146] When the actual effective time has passed a stable waiting period and the remaining execution time of the target condition is less than the preset evaluation time, the computer device 102 will not form an evaluation time range corresponding to the candidate calibration parameters of this round, nor will it determine the corresponding operating data as the operating data corresponding to the candidate calibration parameters and the target condition of this round.

[0147] In some embodiments, the computer device 102 also acquires parameter version information within the evaluation time range. When all parameter versions acquired within the evaluation time range are consistent with the parameter versions corresponding to the candidate calibration parameters, it is determined that the parameter versions corresponding to the candidate calibration parameters have not changed within the evaluation time range. When the parameter versions change within the evaluation time range, the computer device 102 does not jointly determine the operating data before and after the parameter version change as the operating data corresponding to the current candidate calibration parameters.

[0148] Taking the exhaust gas recirculation valve opening as a candidate calibration parameter as an example, after the exhaust gas recirculation valve position feedback and exhaust gas recirculation rate jointly indicate that the candidate exhaust gas recirculation valve opening has actually taken effect, the computer device 102 determines the stabilization waiting time based on the dominant dynamic time constant of the exhaust gas recirculation path. In this embodiment, the stabilization waiting time is determined according to the following formula:

[0149]

[0150] in, To stabilize the waiting time, It is the dominant dynamic time constant of the exhaust gas recirculation path.

[0151] When the dominant dynamic time constant of the exhaust gas recirculation path When the time is 0.45 s, the system remains stable. The evaluation time is 1.35 seconds. The computer device 102 waits for 1.35 seconds from the actual effective opening time of the candidate exhaust gas recirculation valve, and determines the end of the wait as the start time of the evaluation time range. In this embodiment, the preset evaluation time is 5 seconds. When the evaluation time range is within the execution period of the target operating condition, the computer device 102 determines the evaluation time range.

[0152] If the actual operating condition version is consistent with the operating condition version, the actual hardware-in-the-loop simulation model version is consistent with the hardware-in-the-loop simulation model version, the actual initial state is consistent with the initial state corresponding to the target operating condition, the parameter version corresponding to the candidate calibration parameters has not changed within the evaluation time range, and the evaluation time range is within the operating condition execution period, the computer device 102 will determine the operating data collected within the evaluation time range as the operating data corresponding to the candidate calibration parameters and the target operating condition in this round.

[0153] Step S206: Determine valid running data from the running data based on the execution status and the correspondence.

[0154] In step S206, the computer device 102 determines the valid operating data from the operating data based on the execution status of the candidate calibration parameters and the correspondence between the operating data and the candidate calibration parameters and the target operating condition.

[0155] When the candidate calibration parameters representing the execution status do not actually take effect, or when the correspondence between the running data and the candidate calibration parameters and the target operating condition is not established, the computer device 102 will not determine the corresponding running data as valid running data.

[0156] In some embodiments, the operating data includes first operating data from the controller under test 106 and second operating data from the hardware-in-the-loop simulation device 104. The first and second operating data each have an acquisition time and an arrival time before entering the evaluation buffer. The computer device 102 maps the acquisition time and arrival time of the first and second operating data to a unified time reference; determines the evaluation data corresponding to the evaluation time range based on the acquisition time under the unified time reference; determines the acquisition alignment delay based on the acquisition time and arrival time of preset key operating data; and determines the evaluation data as valid operating data if the preset key operating data is complete and the acquisition alignment delay is not greater than the allowable delay threshold.

[0157] The first set of operational data may include actuator feedback, control status, and diagnostic status. The second set of operational data may include the controlled object response, target operating condition execution status, and safety-related status. The evaluation cache is a buffer area in the computer device 102 used to temporarily store the operational data for this round. When the first and second sets of operational data enter the evaluation cache, the computer device 102 records the corresponding arrival time.

[0158] When the controller under test 106, the hardware-in-the-loop simulation device 104, and the data acquisition device use different local clocks, the computer device 102 converts the acquisition time and arrival time recorded by the different local clocks into times under a unified time base. For clock sources... The record of the first The mapping relationship between frame runtime data, local time, and time under a unified time base is as follows:

[0159]

[0160] in, clock source Recorded local time, For the corresponding time under a unified time base, clock source The corresponding clock frequency deviation correction factor, clock source The corresponding clock offset.

[0161] Clock frequency deviation correction factor and clock offset The time is determined based on the synchronization time information obtained during the time synchronization process. The computer device 102 converts the acquisition time and arrival time of the first and second running data into times under a unified time reference according to the corresponding time mapping relationship.

[0162] In some embodiments, the computer device 102 also acquires the time synchronization error corresponding to each clock source. The time synchronization error is used to characterize the time deviation of the corresponding local clock relative to a unified time reference after time mapping. When the time synchronization error is not greater than the allowable synchronization error, the computer device 102 uses the corresponding operating data to determine the evaluation data; when the time synchronization error is greater than the allowable synchronization error or the time synchronization state is lost, the computer device 102 does not determine the operating data involving the corresponding clock source as valid operating data.

[0163] Computer device 102 selects operational data from the first operational data and the second operational data whose acquisition time falls within the evaluation time range determined in step S205, based on the acquisition time under a unified time reference, to form evaluation data. Whether operational data belongs to the evaluation time range is determined based on the acquisition time, not on the order in which the operational data enters the evaluation buffer.

[0164] For the first and second running data with different sampling periods, the computer device 102 determines the collection location of each running data within the evaluation time range according to the sampling period corresponding to each running data, and establishes the time correspondence between the first and second running data based on the collection time under a unified time benchmark.

[0165] For the evaluation time range, the first The frame presets key operational data, and the acquisition alignment delay is determined according to the following formula:

[0166]

[0167] in, For the first The frame presets the alignment delay for acquiring key operational data. For the first The frame presets the collection times of key operational data under a unified time base. For the first The frame presets the arrival time of key operational data entering the evaluation cache under a unified time base.

[0168] Acquisition alignment latency characterizes the time elapsed from when operational data is acquired to when it reaches the evaluation buffer and can participate in the evaluation. Computer device 102 determines the acquisition alignment latency for each preset key operational data point within the evaluation time range and compares each acquisition alignment latency with an allowable latency threshold. When the acquisition alignment latency for each preset key operational data point is not greater than the allowable latency threshold, the evaluation data is determined to meet the acquisition alignment latency requirement.

[0169] In the embodiment of exhaust gas recirculation valve opening calibration, the allowable delay threshold is determined based on the hardware-in-the-loop simulation model step size, data acquisition cycle, and dynamic response characteristics of the exhaust gas recirculation path, specifically as follows:

[0170]

[0171] in, To set the allowable delay threshold, This refers to the step size of the hardware-in-the-loop simulation model. For the data collection cycle, The dominant dynamic time constant of the exhaust gas recirculation path is... The permissible phase error is expressed in radians. To allow for the number of hardware-in-the-loop simulation model steps to be crossed, The number of data collection cycles that can be skipped.

[0172] In this embodiment, It is 1 ms. It is 10 ms. It is 0.45 s. It is 20. The value is 2, and the allowable phase error is 10°, that is:

[0173]

[0174] The latency limit determined by the hardware-in-the-loop simulation model step size is 20 ms, the latency limit determined by the data acquisition cycle is 20 ms, and the latency limit determined by the dominant dynamic time constant and the allowable phase error is:

[0175]

[0176] Therefore, the allowable delay threshold is:

[0177]

[0178] The preset key operating data are used to determine the control effect of candidate calibration parameters, the execution status of target operating conditions, or the safety status. In the embodiment of exhaust gas recirculation valve opening calibration, the preset key operating data may include exhaust gas recirculation valve position feedback, exhaust gas recirculation rate, intake pressure, and safety-related status.

[0179] Computer device 102 determines the expected sampling locations corresponding to each preset key operating data point within the evaluation time range based on the evaluation time range and the sampling period corresponding to each preset key operating data point. When each expected sampling location has the corresponding preset key operating data, the preset key operating data is considered complete.

[0180] When there are missing preset key operating data within the evaluation time range, the computer device 102 will not use operating data outside the evaluation time range to fill in the missing preset key operating data, nor will it determine the corresponding evaluation data as valid operating data.

[0181] For non-critical operational data, if the number of missing sampling points between adjacent valid sampling points does not exceed a preset number, the computer device 102 can supplement the missing non-critical operational data based on adjacent valid sampling points. If non-critical operational data is continuously missing, requires extrapolation using data outside the evaluation time range, or the proportion of supplemented data to the corresponding non-critical operational data exceeds the allowable proportion, the computer device 102 will not directly determine the corresponding evaluation data as valid operational data.

[0182] In some embodiments, after the evaluation time range ends, the computer device 102 continues to wait for a preset data reception duration. The preset data reception duration is determined based on an allowable delay threshold and a time synchronization error, and is used to wait for running data whose acquisition time is within the evaluation time range but has not yet entered the evaluation buffer.

[0183] If the running data arrives before the preset data reception time expires, and the acquisition time of the corresponding running data is within the evaluation time range, the time synchronization error of the corresponding clock source is not greater than the allowable synchronization error, and the acquisition alignment delay is not greater than the allowable delay threshold, the computer device 102 will add the corresponding running data to the evaluation data according to the acquisition time.

[0184] After the preset data reception time expires, the evaluation data received by computer equipment 102 within the fixed evaluation time range forms a fixed evaluation data set corresponding to the candidate calibration parameters for this round. Operational data arriving after the fixed evaluation data set is formed will not be added to the fixed evaluation data set, nor will it modify the evaluation results based on the fixed evaluation data set.

[0185] Computer device 102 performs integrity checks and acquisition alignment delay checks on the preset key operating data in the fixed evaluation data set. If the candidate calibration parameters have actually taken effect, the correspondence between the operating data and the candidate calibration parameters and target operating conditions of this round has been established, the time synchronization error of each clock source is not greater than the allowable synchronization error, the preset key operating data is complete, and the acquisition alignment delay of each preset key operating data is not greater than the allowable delay threshold, then computer device 102 determines the evaluation data in the fixed evaluation data set as valid operating data.

[0186] If the candidate calibration parameters are not actually effective, the correspondence between the operating data and the candidate calibration parameters and the target operating conditions is not established, the time synchronization error is greater than the allowable synchronization error, the preset key operating data is incomplete, the acquisition alignment delay is greater than the allowable delay threshold, or the fixed evaluation data set cannot be formed, the computer device 102 will not determine the corresponding operating data as valid operating data, nor will it use the corresponding operating data to determine the next candidate calibration parameters.

[0187] Step S207: Determine the next candidate calibration parameter based on the valid operating data.

[0188] In step S207, the computer device 102 determines the next candidate calibration parameter based on the valid operating data.

[0189] Computer device 102 calculates the evaluation index of the candidate calibration parameters under the target operating conditions based on the valid operating data corresponding to the candidate calibration parameters in this round. The evaluation index is determined according to the evaluation rules corresponding to the calibration task and is used to characterize the evaluation result of the candidate calibration parameters under the target operating conditions.

[0190] When calculating the evaluation index, the computer device 102 only uses the data that establishes a correspondence with the candidate calibration parameters and target operating conditions of this round and is determined to be valid operating data in step S206.

[0191] Computer device 102 records the correspondence between candidate calibration parameters and evaluation indicators in the current round, and provides the candidate calibration parameters and corresponding evaluation indicators to the automatic calibration algorithm. The automatic calibration algorithm outputs the next candidate calibration parameters based on the candidate calibration parameters and their corresponding evaluation indicators that have already been evaluated. Computer device 102 determines the parameter values ​​or parameter sets output by the automatic calibration algorithm as the next candidate calibration parameters.

[0192] Data not determined as valid operational data will not be included in the calculation of evaluation indicators corresponding to the candidate calibration parameters in this round, nor will it be provided to the automatic calibration algorithm as the evaluation result of the candidate calibration parameters in this round. When the operational data in this round is not determined as valid operational data, the computer device 102 will not use the operational data in this round to update the automatic calibration algorithm.

[0193] In some embodiments, the automatic calibration algorithm may employ Bayesian optimization (BO), particle swarm optimization (PSO), genetic algorithms, or other parameter search algorithms. Candidate calibration parameters generated by different automatic calibration algorithms undergo pre-writing verification, actual effectiveness confirmation, determination of the correspondence between operating data and target operating conditions, and judgment of valid operating data according to steps S201 to S206. Only evaluation indicators formed based on valid operating data are used to update the automatic calibration algorithm.

[0194] After the next candidate calibration parameter is determined, the computer device 102 can re-execute the process of writing the candidate calibration parameter, simulation interaction, execution status confirmation, determination of the correspondence of running data, and determination of valid running data for the next candidate calibration parameter in order to complete the evaluation of the next round of candidate calibration parameters.

[0195] In some embodiments, when operational data is temporarily missing, the time synchronization error exceeds the allowable synchronization error, the target operating condition is not fully executed, or the actual initial state does not meet the consistency conditions, the computer device 102 does not generate evaluation indicators based on the corresponding operational data, and re-executes the pre-write verification, parameter writing, actual effectiveness confirmation, target operating condition execution, and operational data acquisition processes for the same candidate calibration parameter. During re-execution, the computer device 102 redetermines the evaluation time range and valid operational data, and does not use the operational data or evaluation results generated during the abnormal evaluation process.

[0196] When a candidate parameter group is partially written, the readback calibration parameters do not meet the preset consistency conditions with the candidate calibration parameters, the execution status of the candidate calibration parameters cannot be determined, or the running status triggers a safety boundary, the computer device 102 writes the safety rollback parameters corresponding to the current calibration task into the controller under test 106. The computer device 102 obtains the readback results of the safety rollback parameters and, in conjunction with the running status of the controller under test 106 and the status of the hardware-in-the-loop simulation device 104 stopping or resetting the target operating condition, determines whether the safety rollback is complete.

[0197] When the controller under test 106 explicitly rejects the write request for the candidate calibration parameters, and the readback result shows that the original parameters in the controller under test 106 have not changed, the computer device 102 stops or resets the current target operating condition and may not perform the write of the safety rollback parameters.

[0198] In one specific implementation, the computer device 102 acquires candidate calibration parameters and the corresponding target operating condition, operating condition version, hardware-in-the-loop simulation model version, and initial state, and records the correspondence between the candidate calibration parameters and the above information. The computer device 102 performs pre-write verification on the candidate calibration parameters based on the parameter description information corresponding to the candidate calibration parameters. After the candidate calibration parameters pass the pre-write verification, the computer device 102 writes the candidate calibration parameters to the controller under test 106, and acquires the write confirmation information of the candidate calibration parameters and the readback calibration parameters read from the controller under test 106. The computer device 102 then performs pre-write verification based on the write confirmation information and the readback calibration parameters. The system determines the writing status of candidate calibration parameters by checking whether the calibration parameters and candidate calibration parameters meet preset consistency conditions. If the writing status indicates that the candidate calibration parameters have been written to the controller under test 106, the actuator feedback information meets preset execution conditions, and the controlled object response information meets preset response conditions, the system determines the actual effectiveness of the candidate calibration parameters and the actual effective time of the candidate calibration parameters. The computer device 102 determines the execution period, actual operating condition version, actual hardware-in-the-loop simulation model version, and actual initial state of the hardware-in-the-loop simulation device 104 executing the target operating condition. If the actual operating condition version is consistent with the operating condition version, and the actual hardware-in-the-loop simulation model version is consistent with the target operating condition version, the system determines the actual effective time of the candidate calibration parameters. Under the condition that the version of the hardware-in-the-loop simulation model is consistent with the actual initial state and the initial state meets the consistency condition of the target working condition, the evaluation time range is determined within the working condition execution period starting from the time after the actual effective time has elapsed a stable waiting period. The computer device 102 maps the acquisition time and arrival time of the first operating data from the controller under test 106 and the second operating data from the hardware-in-the-loop simulation device 104 to a unified time base. The evaluation data corresponding to the evaluation time range is determined according to the acquisition time under the unified time base, and the acquisition alignment time is determined according to the acquisition time and arrival time of the preset key operating data. If the parameter version corresponding to the candidate calibration parameter does not change within the evaluation time range, the time synchronization error of each clock source is not greater than the allowable synchronization error, the preset key operating data is complete, and the acquisition alignment delay is not greater than the allowable delay threshold, the computer device 102 fixes the evaluation data within the evaluation time range to form a fixed evaluation data set corresponding to the candidate calibration parameters and target operating conditions of this round; the computer device 102 calculates the evaluation index corresponding to the candidate calibration parameters of this round based on the fixed evaluation data set, and provides the candidate calibration parameters and their evaluation indexes of this round to the automatic calibration algorithm, and determines the next candidate calibration parameter based on the output of the automatic calibration algorithm.

[0199] Through the above implementation method, the computer device 102 not only confirms the writing status of candidate calibration parameters based on the write confirmation information and readback calibration parameters, but also confirms whether the candidate calibration parameters have actually participated in closed-loop control by combining actuator feedback information and controlled object response information, and determines the actual effective time accordingly. After the candidate calibration parameters actually take effect, the actual operating condition version, the actual hardware-in-the-loop simulation model version, and the actual initial state are further verified, and the evaluation time range is determined based on the actual effective time and the operating condition execution period of the target operating condition, so that the operating data within the evaluation time range establishes a correspondence with the candidate calibration parameters and the target operating condition in this round. On this basis, by mapping the acquisition time and arrival time of different data sources to a unified time base, and checking the integrity, time synchronization status, and acquisition alignment delay of key operating data, data generated under circumstances such as candidate calibration parameters not actually taking effect, inconsistent operating condition or model versions, missing operating data, and operating data delay exceeding the limit can be excluded, avoiding the use of data that does not correspond to the current calibration process or cannot accurately reflect the control effect of candidate calibration parameters to form evaluation results. Therefore, the valid operating data used to determine the next candidate calibration parameter can simultaneously correspond to the candidate calibration parameter that has actually taken effect, the target operating condition that has actually been executed, and the data acquisition process that meets the requirements of timing and integrity. This is beneficial to improving the reliability of parameter evaluation results and the comparability of evaluation results of different candidate calibration parameters during automatic calibration.

[0200] In one embodiment, such as Figure 3 As shown, an automatic controller calibration method is provided. This embodiment, based on the corresponding embodiments in steps S201 to S207, takes the automatic calibration of the exhaust gas recirculation (EGR) valve opening of a diesel engine as an example. The aforementioned content regarding pre-writing verification of candidate calibration parameters, parameter writing, closed-loop simulation interaction, verification of operating conditions and model versions, time base unification, and determination of valid operating data also applies to this embodiment. The method includes:

[0201] Step S301: Obtain the candidate EGR valve opening degree and target operating condition.

[0202] In step S301, the computer device 102 acquires the candidate EGR valve opening degree and the target operating condition corresponding to the candidate EGR valve opening degree.

[0203] The candidate EGR valve opening is the EGR valve opening parameter value to be written into the controller under test 106 during this round of automatic calibration. The target operating condition is used to specify the execution conditions and evaluation conditions for the candidate EGR valve opening, and can be determined based on engine speed, load, and target EGR rate.

[0204] The computer device 102 also acquires the operating condition version, hardware-in-the-loop simulation model version and initial state corresponding to the target operating condition, and records the correspondence between the candidate EGR valve opening degree and the above information.

[0205] Before writing the candidate EGR valve opening, the computer device 102 controls the hardware-in-the-loop simulation device 104 and the controller under test 106 to operate stably in the initial state corresponding to the target operating condition, and acquires the EGR valve position feedback information and EGR rate during the stabilization period before writing. The computer device 102 determines the EGR valve position baseline before writing based on the EGR valve position feedback information during the stabilization period before writing, and determines the EGR rate baseline based on the EGR rate during the stabilization period before writing.

[0206] The baseline position of the EGR valve before writing reflects the actual position state of the EGR valve before the candidate EGR valve opening is written, and is not the same as the original EGR valve opening parameter value stored in the controller under test 106.

[0207] Step S302: Write the candidate EGR valve opening and perform closed-loop simulation.

[0208] In step S302, the computer device 102 performs a pre-write verification on the candidate EGR valve opening, and after the candidate EGR valve opening passes the pre-write verification, writes the candidate EGR valve opening into the controller under test 106.

[0209] The pre-write verification includes determining whether the parameter writing position corresponding to the candidate EGR valve opening exists, whether the candidate EGR valve opening is within the allowable value range, whether the change amount and rate of change of the candidate EGR valve opening relative to the current parameter value meet the corresponding limits, and whether the current operating state of the controller under test 106 meets the parameter writing conditions.

[0210] If the candidate EGR valve opening fails the pre-write verification, the computer device 102 will not perform this round of parameter writing. If the candidate EGR valve opening passes the pre-write verification, the computer device 102 will write the candidate EGR valve opening to the corresponding calibrable position in the controller under test 106.

[0211] Computer device 102 controls hardware-in-the-loop simulation device 104 to load the hardware-in-the-loop simulation model version corresponding to the target operating condition, and sets the diesel engine simulation model according to the initial state corresponding to the target operating condition. Hardware-in-the-loop simulation device 104 provides virtual sensor signals to the controller under test 106 according to the target operating condition. The controller under test 106 generates control signals based on the virtual sensor signals and the currently used EGR valve opening parameters. Hardware-in-the-loop simulation device 104 updates the operating state of the diesel engine simulation model according to the control signals, thereby forming a closed-loop simulation interaction.

[0212] Step S303: Obtain parameter status information and EGR running data.

[0213] In step S303, the computer device 102 obtains the write confirmation information of the candidate EGR valve opening, and reads the readback EGR valve opening corresponding to the candidate EGR valve opening from the controller under test 106.

[0214] Computer device 102 also acquires EGR operating data generated during the simulation interaction. EGR operating data includes EGR valve position feedback information after the candidate EGR valve opening is written and the current EGR rate, and may also include intake pressure, control status, diagnostic status and safety status.

[0215] The EGR valve position feedback information reflects the actual position of the EGR valve after the candidate EGR valve opening is written, and the current EGR rate reflects the response generated by the EGR gas path after the candidate EGR valve opening is written. The computer device 102 continuously acquires the EGR valve position feedback information and the current EGR rate, and records the acquisition time and arrival time corresponding to each EGR operation data.

[0216] Step S304: Confirm that the candidate EGR valve opening is actually effective.

[0217] In step S304, the computer device 102 determines the execution status of the candidate EGR valve opening based on the written confirmation information, the readback of the EGR valve opening, the EGR valve position feedback information, and the current EGR rate.

[0218] In some embodiments, the candidate calibration parameter is the candidate EGR valve opening, the readback calibration parameter is the readback EGR valve opening, and the operating data includes the EGR valve position feedback information after the candidate EGR valve opening is written and the current EGR rate. The computer device 102 determines the expected valve opening change direction based on the candidate EGR valve opening and the baseline of the EGR valve position before writing, and determines the EGR rate change direction based on the current EGR rate and the EGR rate baseline. When the write confirmation information indicates that the parameter write request corresponding to the candidate EGR valve opening has been executed normally, the readback EGR valve opening and the candidate EGR valve opening meet preset consistency conditions, the EGR valve position indicated by the EGR valve position feedback information enters the allowable deviation range corresponding to the candidate EGR valve opening and remains within a preset duration, and the EGR rate change direction and the expected valve opening change direction satisfy a preset direction correspondence, the computer device 102 determines that the candidate EGR valve opening has actually taken effect.

[0219] Computer device 102 determines the writing status of the candidate EGR valve opening based on the write confirmation information and whether the readback EGR valve opening and the candidate EGR valve opening meet the preset consistency conditions. The write confirmation information indicates that the parameter write request has been executed normally, and when the readback EGR valve opening and the candidate EGR valve opening meet the preset consistency conditions, it is determined that the candidate EGR valve opening has been written to the controller under test 106.

[0220] The preset execution conditions include the EGR valve position feedback entering the allowable deviation range corresponding to the candidate EGR valve opening, and maintaining the position continuously within the allowable deviation range for a preset holding time. In a specific example, the preset holding time is determined according to the following formula:

[0221]

[0222] in, To preset the holding time, For the data collection cycle, This is the dominant dynamic time constant for the EGR gas path.

[0223] when For 10 ms, When the value is 0.45 s, the preset hold time is:

[0224]

[0225] When the candidate EGR valve opening is greater than the baseline of the EGR valve position before writing, the expected direction of valve opening change is increasing; when the candidate EGR valve opening is less than the baseline of the EGR valve position before writing, the expected direction of valve opening change is decreasing. When the current EGR rate is higher than the EGR rate baseline, the EGR rate changes in the direction of increasing; when the current EGR rate is lower than the EGR rate baseline, the EGR rate changes in the direction of decreasing. When the expected valve opening change direction is the same as the EGR rate change direction, it is determined that the two satisfy the preset directional correspondence.

[0226] In this embodiment, the actual effective result of the candidate EGR valve opening can be determined according to the following formula:

[0227]

[0228] in, This represents the actual effective result of the candidate EGR valve opening. To write the confirmation result, To ensure consistent readback results, To maintain the valve position feedback result, The result is the EGR rate response direction determination result. For the safety status assessment result, This indicates a logical AND operation.

[0229] When all the above judgment results meet the corresponding conditions. If 1 is selected, computer device 102 determines the actual effective opening degree of the candidate EGR valve and sets it as 1. The moment when the value is first set to 1 is determined as the actual effective moment of the candidate EGR valve opening.

[0230] Intake pressure can be used to verify the coupling response or safety status of the EGR circuit, but it does not replace the EGR valve position feedback information or the current EGR rate as the basis for confirming the actual effectiveness of the candidate EGR valve opening.

[0231] Step S305: Determine the time range for EGR evaluation.

[0232] In step S305, the computer device 102 determines the execution period of the target operating condition, the actual operating condition version, the actual hardware-in-the-loop simulation model version, and the actual initial state of the hardware-in-the-loop simulation device 104.

[0233] Computer device 102 verifies the actual operating condition version with the operating condition version obtained in step S301, the actual hardware-in-the-loop simulation model version with the hardware-in-the-loop simulation model version obtained in step S301, and the actual initial state with the initial state obtained in step S301.

[0234] When the actual operating condition version, the actual hardware-in-the-loop simulation model version, and the actual initial state meet the corresponding consistency conditions, the computer device 102 determines the evaluation time range after a stable waiting period from the actual effective time of the candidate EGR valve opening.

[0235] In a specific instance, the stabilization waiting time is determined based on the dominant dynamic time constant of the EGR gas path:

[0236]

[0237] in, To ensure stable waiting time. When When the time is 0.45 s, the stable waiting time is 1.35 s.

[0238] Computer device 102 waits for 1.35 seconds from the actual effective time of the candidate EGR valve opening, and determines the start time of the waiting period as the evaluation time range. The evaluation time range is located within the execution period of the target operating condition. In a specific example, the evaluation duration is 5 seconds; if the remaining execution time of the target operating condition is less than 5 seconds, an evaluation time range corresponding to the candidate EGR valve opening in this round is not formed.

[0239] Step S306: Determine valid EGR operating data.

[0240] In step S306, the computer device 102 determines the valid operating data from the EGR operating data according to the time base unification, evaluation data screening, key operating data integrity check, acquisition alignment delay judgment and evaluation data fixing method corresponding to step S206.

[0241] In this embodiment, the preset key operating data includes at least EGR valve position feedback information, current EGR rate, and safety status. When the evaluation index includes intake pressure deviation, intake pressure is also considered a preset key operating data; when the evaluation index does not use intake pressure, intake pressure may not be considered a necessary key operating data for determining valid operating data.

[0242] Computer device 102 maps the acquisition time and arrival time of each EGR operation data to a unified time base, and selects EGR operation data within the evaluation time range based on the acquisition time under the unified time base. Computer device 102 checks whether the preset key operation data is complete within the evaluation time range, and determines whether the acquisition alignment delay of each preset key operation data is not greater than the allowable delay threshold.

[0243] In a specific example, the hardware-in-the-loop simulation model has a step size of 1 ms, a data acquisition period of 10 ms, and a dominant dynamic time constant of the EGR gas path of 0.45 s. Following the method for determining the allowable delay threshold in step S206, the allowable delay threshold can be determined to be 12.5 ms.

[0244] After the evaluation period ends, computer device 102 continues to wait for a preset data reception time. Upon the expiration of this time, it fixes the received evaluation data, forming a fixed evaluation data set corresponding to the opening degree of the candidate EGR valves in this round. Operational data arriving after the fixed evaluation data set is formed is not added to the fixed evaluation data set, nor does it modify the evaluation results based on the fixed evaluation data set.

[0245] When the candidate EGR valve opening has actually taken effect, the correspondence between the EGR operating data and the candidate EGR valve opening and target operating conditions in this round has been established, the time synchronization error is not greater than the allowable synchronization error, the preset key operating data is complete, and the acquisition alignment delay is not greater than the allowable delay threshold, the computer device 102 will determine the EGR operating data in the fixed evaluation data set as valid operating data.

[0246] Step S307: Determine the opening degree of the next candidate EGR valve.

[0247] In step S307, the computer device 102 determines the next candidate EGR valve opening degree based on the valid operating data.

[0248] In some embodiments, the computer device 102 determines at least one of the following: EGR rate tracking deviation, intake pressure deviation, response stability, EGR valve action amount, and safety margin, corresponding to the candidate EGR valve opening, based on valid operating data, and determines the next candidate EGR valve opening based on the candidate EGR valve opening and its corresponding evaluation index.

[0249] Computer device 102 calculates the evaluation index corresponding to the opening degree of the candidate EGR valve in the current round based on a fixed evaluation data set, and provides the opening degree of the candidate EGR valve and its evaluation index to the automatic calibration algorithm. The automatic calibration algorithm outputs the opening degree of the next candidate EGR valve based on the opening degree of the candidate EGR valve that has been evaluated and its evaluation index. Computer device 102 determines the opening degree of the EGR valve output by the automatic calibration algorithm as the opening degree of the next candidate EGR valve.

[0250] Data not determined as valid operating data will not be included in the calculation of evaluation indicators corresponding to the opening degree of candidate EGR valves in this round, nor will it be provided to the automatic calibration algorithm as the evaluation result of the opening degree of candidate EGR valves in this round. When the EGR operating data in this round is not determined as valid operating data, the computer device 102 will not use the EGR operating data in this round to update the automatic calibration algorithm.

[0251] Through the above implementation method, after the candidate EGR valve opening is written to the controller under test 106, the computer device 102 not only uses the writing confirmation information and reads back the EGR valve opening to determine the parameter writing status, but also combines the deviation between the EGR valve position feedback and the candidate EGR valve opening, the continuous maintenance of the valve position feedback, and the direction of change of the current EGR rate relative to the EGR rate baseline to confirm whether the candidate EGR valve opening has actually participated in closed-loop control, and determines the actual effective time accordingly. After the candidate EGR valve opening actually takes effect, the computer device 102 further verifies the actual operating condition version, the actual hardware-in-the-loop simulation model version, and the actual initial state, and determines the evaluation time range after a stable waiting period adapted to the dynamic response characteristics of the EGR gas path, thereby reducing the impact of parameter switching process and transient gas path response on the evaluation results. Based on this, by unifying the time base of different data sources, the integrity and acquisition alignment delay checks are performed on key operational data such as EGR valve position feedback, current EGR rate, and safety status. Furthermore, once a fixed evaluation data set is formed, the evaluation results are not rewritten using late data. This eliminates operational data generated under conditions such as candidate EGR valve opening not actually taking effect, inconsistent operating conditions, missing key data, or excessive data delays. Therefore, the data used to determine the opening of the next candidate EGR valve corresponds to the actual effective candidate EGR valve opening in this round, the actual target operating condition, and the EGR gas path response process that meets the timing and integrity requirements. This improves the reliability of the candidate EGR valve opening evaluation results and the comparability of evaluation results from different candidate EGR valves.

[0252] In one embodiment, such as Figure 4 As shown, an automatic controller calibration system 400 is provided, including a parameter acquisition module 401, a simulation interaction module 402, a data acquisition module 403, an execution status determination module 404, a correspondence determination module 405, a valid data determination module 406, and a parameter determination module 407.

[0253] The parameter acquisition module 401 is used to acquire candidate calibration parameters and the target working conditions corresponding to the candidate calibration parameters.

[0254] The simulation interaction module 402 is used to write candidate calibration parameters into the controller under test and control the hardware-in-the-loop simulation device to perform simulation interaction with the controller under test according to the target operating conditions.

[0255] The data acquisition module 403 is used to acquire the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction.

[0256] The execution status determination module 404 is used to determine the execution status of candidate calibration parameters based on parameter status information and running data.

[0257] The correspondence determination module 405 is used to determine the correspondence between the running data and the candidate calibration parameters and the target operating conditions based on the execution status and the execution sequence of the simulation interaction.

[0258] The valid data determination module 406 is used to determine valid running data from the running data based on the execution status and corresponding relationships.

[0259] The parameter determination module 407 is used to determine the next candidate calibration parameter based on valid operating data.

[0260] In one embodiment, the parameter acquisition module 401 is further configured to acquire the operating condition version, hardware-in-the-loop simulation model version, and initial state corresponding to the target operating condition, and record the correspondence between the candidate calibration parameters and the target operating condition, operating condition version, hardware-in-the-loop simulation model version, and initial state. The simulation interaction module 402 is further configured to write the candidate calibration parameters to the controller under test after the candidate calibration parameters have passed the pre-write verification, and control the hardware-in-the-loop simulation device to load the corresponding hardware-in-the-loop simulation model version and execute the target operating condition according to the initial state.

[0261] In one embodiment, the parameter status information includes write confirmation information and readback calibration parameters. The data acquisition module 403 is further configured to acquire write confirmation information for candidate calibration parameters, read readback calibration parameters corresponding to the candidate calibration parameters from the controller under test, and acquire operating data from the controller under test and the hardware-in-the-loop simulation device. The operating data includes actuator feedback information and controlled object response information corresponding to the candidate calibration parameters.

[0262] In one embodiment, the execution status determination module 404 is further configured to determine the writing status of the candidate calibration parameter based on the write confirmation information and whether the readback calibration parameter and the candidate calibration parameter meet the preset consistency conditions; and when the writing status indicates that the candidate calibration parameter has been written to the controller under test, the actuator feedback information meets the preset execution conditions, and the controlled object response information meets the preset response conditions, the candidate calibration parameter is determined to be actually effective, and the actual effective time of the candidate calibration parameter is determined.

[0263] In one embodiment, the correspondence determination module 405 is further configured to determine the operating condition execution period, actual operating condition version, and actual hardware-in-the-loop simulation model version of the hardware-in-the-loop simulation device executing the target operating condition; when the actual operating condition version is consistent with the operating condition version and the actual hardware-in-the-loop simulation model version is consistent with the hardware-in-the-loop simulation model version, the evaluation time range is determined based on the actual effective time and the operating condition execution period, and the running data collected within the evaluation time range is determined as the running data corresponding to the candidate calibration parameters and the target operating condition.

[0264] In one embodiment, the operational data includes first operational data from the controller under test and second operational data from the hardware-in-the-loop simulation device. The first and second operational data each have an acquisition time and an arrival time before entering the evaluation buffer. The valid data determination module 406 is further configured to map the acquisition time and arrival time of the first and second operational data to a unified time reference, determine the evaluation data corresponding to the evaluation time range based on the acquisition time under the unified time reference, determine the acquisition alignment delay based on the acquisition time and arrival time of preset key operational data, and determine the evaluation data as valid operational data if the preset key operational data is complete and the acquisition alignment delay is not greater than the allowable delay threshold.

[0265] In one embodiment, the parameter determination module 407 is further configured to calculate the evaluation index corresponding to the candidate calibration parameters for the current round based on the valid operating data, provide the candidate calibration parameters and their evaluation indexes to the automatic calibration algorithm, and determine the next candidate calibration parameters based on the output of the automatic calibration algorithm. Data that is not determined as valid operating data does not participate in the calculation of the evaluation index of the candidate calibration parameters for the current round, nor is it used to update the automatic calibration algorithm.

[0266] For specific limitations regarding the automatic controller calibration system 400, please refer to the limitations of the automatic controller calibration method above, which will not be repeated here. Each module in the automatic controller calibration system 400 can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in hardware or independent of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the corresponding operations of each module.

[0267] In one embodiment, such as Figure 5 As shown, an electronic device is provided. The electronic device includes a computing unit 901, a read-only memory (ROM) 902, a random access memory (RAM) 903, a bus 904, an input / output interface (I / O interface) 905, an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909.

[0268] The computing unit 901, ROM 902, RAM 903, and I / O interface 905 are interconnected via bus 904. The input unit 906, output unit 907, storage unit 908, and communication unit 909 are connected to the I / O interface 905. At least one of ROM 902, RAM 903, and storage unit 908 can constitute the memory of the electronic device, and the computing unit 901 can constitute the processor of the electronic device.

[0269] The computing unit 901 can perform corresponding data processing operations based on the computer program stored in the ROM 902 or the computer program loaded into the RAM 903 from the storage unit 908. The RAM 903 can also store data used or generated during the execution of the computer program.

[0270] Input unit 906 is used to receive externally input information. Output unit 907 is used to output the processing results of the electronic device. Storage unit 908 is used to store computer programs and data used or generated during the operation of the electronic device. Communication unit 909 is used to transmit data with hardware-in-the-loop simulation device 104 and controller under test 106 under the control of computing unit 901.

[0271] In one embodiment, the electronic device stores a computer program in its memory, and when the computing unit 901 executes the computer program, it implements the steps of any of the aforementioned controller automatic calibration method embodiments.

[0272] Those skilled in the art will understand that Figure 5The structure shown is merely an exemplary structure for an electronic device and does not constitute a limitation on the electronic device. Electronic devices may include, but are not limited to, other types of structures. Figure 5 The diagram shows more or fewer units, and some units can be combined or different unit arrangements can be used.

[0273] In one embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of any of the aforementioned controller automatic calibration method embodiments.

[0274] Computer-readable storage media may include ROM, RAM, flash memory, magnetic storage media, optical storage media, or other media capable of storing computer programs.

[0275] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for automatic calibration of a controller, characterized in that, The method includes: Obtain candidate calibration parameters and the target operating conditions corresponding to the candidate calibration parameters; The candidate calibration parameters are written into the controller under test, and the hardware-in-the-loop simulation device is controlled to perform simulation interaction with the controller under test according to the target operating conditions. Obtain the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction; The execution status of the candidate calibration parameters is determined based on the parameter status information and the running data. Based on the execution status and the execution sequence of the simulation interaction, determine the correspondence between the running data, the candidate calibration parameters, and the target operating condition; Based on the execution status and the corresponding relationship, valid execution data is determined from the execution data; Based on the valid operating data, determine the next candidate calibration parameters.

2. The automatic calibration method for the controller according to claim 1, characterized in that, The parameter status information includes write confirmation information and readback calibration parameters; The step of obtaining the parameter status information of the candidate calibration parameters in the controller under test, and the running data generated during the simulation interaction, includes: Obtain the write confirmation information of the candidate calibration parameters, and read the readback calibration parameters corresponding to the candidate calibration parameters from the controller under test; Obtain operational data from the controller under test and the hardware-in-the-loop simulation device.

3. The automatic calibration method for the controller according to claim 2, characterized in that, The operational data includes actuator feedback information and controlled object response information corresponding to the candidate calibration parameters; Determining the execution status of the candidate calibration parameters based on the parameter status information and the running data includes: The write status of the candidate calibration parameter is determined based on the write confirmation information and whether the readback calibration parameter and the candidate calibration parameter meet the preset consistency conditions. When the write state indicates that the candidate calibration parameter has been written to the controller under test, the actuator feedback information meets the preset execution conditions, and the controlled object response information meets the preset response conditions, the candidate calibration parameter is determined to be actually effective.

4. The automatic calibration method for the controller according to claim 1, characterized in that, The process of obtaining candidate calibration parameters and the target operating conditions corresponding to the candidate calibration parameters further includes: Obtain the operating condition version and hardware-in-the-loop simulation model version corresponding to the target operating condition; Determining the correspondence between the running data, the candidate calibration parameters, and the target operating condition based on the execution state and the execution sequence of the simulation interaction includes: When the execution status indicates that the candidate calibration parameter is actually effective, determine the actual effective time of the candidate calibration parameter; Determine the execution time period, actual operating condition version, and actual hardware-in-the-loop simulation model version of the hardware-in-the-loop simulation device when executing the target operating condition; When the actual operating condition version is consistent with the operating condition version and the actual hardware-in-the-loop simulation model version is consistent with the hardware-in-the-loop simulation model version, the evaluation time range is determined based on the actual effective time and the operating condition execution period. The evaluation time range begins at the time after the actual effective time has been stable for a certain period of time, and the evaluation time range is within the execution period of the working condition. The operational data collected within the evaluation time range are determined as operational data corresponding to the candidate calibration parameters and the target operating condition.

5. The automatic calibration method for the controller according to claim 4, characterized in that, The operating data includes first operating data from the controller under test and second operating data from the hardware-in-the-loop simulation device. The first operating data and the second operating data respectively have an acquisition time and an arrival time in the evaluation buffer. The step of determining valid running data from the running data based on the execution status and the correspondence includes: Map the acquisition time and arrival time of the first and second running data to a unified time base; Based on the acquisition time mapped to the unified time reference, the evaluation data corresponding to the evaluation time range is determined from the first running data and the second running data; Based on the acquisition time and arrival time of the preset key operational data in the evaluation data, the acquisition alignment delay corresponding to the preset key operational data is determined; If the preset key operating data meets the integrity requirements and the corresponding acquisition alignment delay is not greater than the allowable delay threshold, the evaluation data is determined as the valid operating data.

6. The automatic calibration method for the controller according to claim 2, characterized in that, The candidate calibration parameter is the candidate EGR valve opening, the readback calibration parameter is the readback EGR valve opening, and the operating data includes the EGR valve position feedback information after the candidate EGR valve opening is written and the current EGR rate; The method further includes: Before writing the candidate EGR valve opening into the controller under test, the hardware-in-the-loop simulation device and the controller under test are controlled to run stably in the initial state corresponding to the target operating condition, and the EGR valve position feedback information and EGR rate are obtained during the stable period before writing. The baseline of the EGR valve position before writing is determined based on the EGR valve position feedback information during the stabilization period before writing, and the baseline of the EGR rate is determined based on the EGR rate during the stabilization period before writing.

7. The automatic calibration method for the controller according to claim 6, characterized in that, Determining the execution status of the candidate calibration parameters based on the parameter status information and the running data includes: The expected direction of valve opening change is determined based on the candidate EGR valve opening and the baseline of the EGR valve position before writing; The direction of EGR rate change is determined based on the current EGR rate and the EGR rate baseline. When the write confirmation information indicates that the parameter write request corresponding to the candidate EGR valve opening has been executed normally, the readback EGR valve opening and the candidate EGR valve opening meet the preset consistency conditions, the EGR valve position indicated by the EGR valve position feedback information enters the allowable deviation range corresponding to the candidate EGR valve opening and remains at the preset duration, and the EGR rate change direction and the expected valve opening change direction meet the preset direction correspondence, the candidate EGR valve opening is determined to be actually effective.

8. An automatic calibration system for a controller, characterized in that, include: The parameter acquisition module is used to acquire candidate calibration parameters and the target working conditions corresponding to the candidate calibration parameters; The calibration interaction module is used to write the candidate calibration parameters into the controller under test and control the hardware-in-the-loop simulation device to perform simulation interaction with the controller under test according to the target operating conditions. The data acquisition module is used to acquire the parameter status information of the candidate calibration parameters in the controller under test, as well as the running data generated during the simulation interaction. An execution status determination module is used to determine the execution status of the candidate calibration parameter based on the parameter status information and the running data. The correspondence determination module is used to determine the correspondence between the running data, the candidate calibration parameters, and the target operating condition based on the execution status and the execution sequence of the simulation interaction. A valid data determination module is used to determine valid running data from the running data based on the execution status and the correspondence. The parameter determination module is used to determine the next candidate calibration parameter based on the valid operating data.

9. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the controller automatic calibration method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the controller automatic calibration method according to any one of claims 1 to 7.