New energy vehicle control software updating calibration data method, computer storage medium and equipment

By using MATLAB's a2lparsermex function and structure matching method in the new energy vehicle controller, the problems of program errors and insufficient flexibility in the calibration process were solved, and efficient and flexible calibration data updates were achieved.

CN119960788BActive Publication Date: 2025-10-21SHAANXI FAST AUTO DRIVE GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411939446.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-10-21
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

Existing technologies are prone to errors and lack flexibility in the calibration process of new energy vehicle controllers, and cannot selectively update the calibration data of some modules.

Method used

The a2lparsermex function in MATLAB is used to read *.a2l and *.hex files, store the calibration values ​​in computer memory as a structure, match the calibration values ​​in the *.par file by name and axis information, selectively convert and write them to the *.hex file, and achieve automated compilation.

Benefits of technology

It enables the rapid and efficient merging of calibration parameters from controller software, improving flexibility and execution efficiency, avoiding program errors, and supporting selective updates of certain modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960788B_ABST
    Figure CN119960788B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of data updating method, specifically, a kind of new energy vehicle control software's updating calibration data method, purpose is to solve the problem that existing method is prone to program error and not enough high flexibility.The present application includes the following steps: step 1, all X first calibration quantities in *.a2l file are read into memory in the form of first structure;Step 2, first *.hex file is read into memory in the form of one-dimensional array;Step 3, all Y second calibration quantities in *.par file are read into memory in the form of second structure;Step 4, traverse all second structures, using conversion function to process the physical value of second calibration quantity in second structure, convert the physical value of second calibration quantity into internal value, and according to the address information of first calibration quantity in ECU internal value is in real time write in the corresponding position of one-dimensional array described in step 2;Step 5, save second *.hex file, complete calibration data update.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a vehicle data updating method, and in particular to a method for updating calibration data of new energy vehicle control software, a computer storage medium and a device. Background Art

[0002] New energy vehicles (NEVs) use unconventional fuels as their power source (or use conventional fuels but employ novel onboard powertrains), integrating advanced technologies in power control and propulsion to create vehicles with new technologies and structures. New energy vehicles primarily include pure electric vehicles, extended-range electric vehicles, hybrid vehicles, fuel cell electric vehicles, and hydrogen engine vehicles. New energy vehicles offer a wide range of economic and social benefits.

[0003] Before new energy vehicles are put into use, they typically require parameter calibration to better suit market and customer needs, thereby creating greater economic and social benefits. Parameter calibration involves using specialized tools, instruments, equipment, and software in accordance with relevant technical standards to specify the parameters of each vehicle's control program based on the characteristics of the system model. This ensures a more accurate system model and allows the program to better match the operating environment.

[0004] During the calibration process of new energy vehicle controllers, *.a2l and *.par files play a crucial role. The *.a2l file format is based on the ASAM MCD-2MC (ASAP2) specification published by ASAM (Association for Standardization of Automation and Measuring Systems). This specification defines *.a2l files, which are used to describe information such as the addresses of calibration and observation quantities within the controller. The *.a2l file abstracts the address parameters of the controller's internal variables. Calibration tools do not need to know the specific controller's internal address information and focus solely on adjusting calibration parameters. This effectively avoids the problem of a wide variety of new energy vehicle controller brands and significant differences in underlying software between controllers, making unified management impossible. The *.par file is a collection of calibration parameters, recording calibration data and other related information in a specific format. The *.par file only stores calibration data and is therefore independent of the controller's internal calibration address information, conversion methods, and other information, improving data reusability.

[0005] Chinese patent CN116737164A discloses an ECU data synthesis method, apparatus, computer-readable storage medium, and vehicle. The method comprises: storing parsed information of an A2L file in a non-memory storage space; obtaining a data file to be calibrated and a corresponding DCM file, and storing physical values ​​of variables to be calibrated in memory, the physical values ​​of the variables to be calibrated being the parsed information of the DCM file; caching the parsed information of the A2L file in the non-memory storage space into memory, the parsed information of the A2L file including at least a conversion formula, and converting the physical values ​​of the variables to be calibrated into internal values ​​according to the conversion formula to obtain internal values ​​of the variables to be calibrated; and writing the internal values ​​of the variables to be calibrated into the data file to be calibrated, thereby completing ECU data synthesis. ECU data synthesis involves calibrating the data in the DCM file into the data file to be calibrated, achieving functional matching between the engine and the vehicle. This method addresses the low efficiency of data synthesis methods in the prior art. However, this patent has shortcomings: it does not consider the case where the data in *.par and *.a2l files are inconsistent, which can easily lead to program errors and affect subsequent processes; and it requires all data to be updated during updates, lacking selectivity and resulting in insufficient flexibility. Summary of the Invention

[0006] The purpose of the present invention is to solve the technical problems of the prior art that are prone to program errors and insufficient flexibility, and to provide a method for updating calibration data of new energy vehicle control software, a computer storage medium and a device.

[0007] To achieve the above objectives, the technical solutions provided by the present invention are:

[0008] A method for updating calibration data of new energy vehicle control software is characterized in that it includes the following steps:

[0009] Step 1: Read all X first calibration quantities in the *.a2l file into the computer memory used for new energy vehicle control software data update and calibration in the form of a first structure, where X is a positive integer and X>1000; the members of the first structure include the name of the first calibration quantity, description information of the first calibration quantity, data dimension information of the first calibration quantity, address information of the first calibration quantity in the ECU, data type of the first calibration quantity, conversion function, maximum value information of the data type of the first calibration quantity, minimum value information of the data type of the first calibration quantity, and coordinate axis information of the first calibration quantity;

[0010] Step 2: Read the first *.hex file in the form of a one-dimensional array into the computer memory used for new energy vehicle control software data update and calibration; the number of elements in the one-dimensional array is Z=abX, where a is the space occupied by the data type of the first structure, b is the coordinate axis information, and b≥1; the address information of the first calibration quantity in the ECU corresponds to the address information in the first *.hex file;

[0011] Step 3: Read all Y second calibration quantities in the *.par file into the computer memory for calibrating the data update of the new energy vehicle control software in the form of a second structure, where Y < X and Y is a positive integer; the second structure includes the name of the second calibration quantity, the physical value of the second calibration quantity, the data type of the second calibration quantity, and the axis information of the second calibration quantity;

[0012] Step 4: Traverse all the second structures. If the name of the first calibration quantity in the first structure is the same as the name of the second calibration quantity in the second structure, and the axis information of the first calibration quantity in the first structure is the same as the axis information of the second calibration quantity in the second structure, it is determined that the search is successful. Then, according to the data type of the first calibration quantity in the first structure, use the conversion function to process the physical value of the second calibration quantity in the second structure, convert the physical value of the second calibration quantity into an internal value, and write the internal value into the corresponding position in the one-dimensional array described in Step 2 in real time according to the address information of the first calibration quantity in the ECU; otherwise, it is determined that the search fails, skip this second structure, and then continue to traverse; finally, generate the second *.hex file;

[0013] Step 5: Save the second *.hex file and write the second *.hex file into the new energy vehicle controller to complete the calibration data update.

[0014] Further, in Step 1, the software used to read all X calibration quantities in the *.a2l file into the computer memory for calibrating the data update of the new energy vehicle control software in the form of a first structure is MATLAB, and the function used is a2lparsermex in MATLAB.

[0015] Further, in Step 1, the forms of the conversion function include RAT_FUNC, look-up table, and indentical.

[0016] Further, in Steps 1 and 3, the data types include UINT8, SINT8, UINT16, SINT16, UINT32, SINT32, UINT64, SINT64, FLOAT, and DOUBLE.

[0017] Further, in Step 1, the data dimension information includes VALUE, CURVE, and MAP, where VALUE is a numerical value, CURVE is a one-dimensional array, and MAP is a two-dimensional array.

[0018] Further, in Step 3, the physical value is the real data value;

[0019] Specifically, converting the physical value of the second calibration quantity into an internal value is as follows:

[0020] Step a: Determine the data type of the physical value. If it is an integer, proceed to step b; if it is a floating point, proceed to step c.

[0021] Step b: convert the physical value into a two's complement form as an internal value;

[0022] Step c: Convert the physical value into an IEEE 754 standard floating-point number as an internal value.

[0023] At the same time, the present invention also provides a computer storage medium on which a computer program is stored, the special features of which are:

[0024] When the computer program is executed by the processor, the steps of the above-mentioned method for updating calibration data of the new energy vehicle control software are implemented.

[0025] In addition, the present invention further provides a computer device comprising a processor, a memory connected to the processor, and a computer program executable on the processor, wherein:

[0026] When the processor executes the computer program, the steps of the above-mentioned method for updating calibration data of new energy vehicle control software are implemented.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] 1. The method for updating calibration data of new energy vehicle control software provided by the present invention can quickly and efficiently merge the required calibration parameters into the *.hex file of the controller software without using professional software;

[0029] 2. The method for updating calibration data for new energy vehicle control software provided by the present invention can selectively merge the calibration data of some modules in the controller software, without having to merge the calibration data of all modules every time, and without having to manually select the calibration data to be merged, thereby improving flexibility;

[0030] 3. The method for updating calibration data of new energy vehicle control software provided by the present invention combines the process of merging calibration parameters with the compilation process (preliminary step) of the controller software to achieve complete automatic compilation, greatly improving execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a flow chart of an embodiment of a method for updating calibration data of new energy vehicle control software of the present invention;

[0032] Figure 2 This is a member information diagram of the first structure in an embodiment of a method for updating calibration data of new energy vehicle control software of the present invention;

[0033] Figure 3 This is a member information diagram of the second structure in an embodiment of the method for updating calibration data of new energy vehicle control software of the present invention. DETAILED DESCRIPTION

[0034] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0035] A method for updating calibration data of new energy vehicle control software, the flow chart of which is shown in Figure 1 , Figure 1 The connection between the method of this embodiment and the preceding steps is described in the following. This embodiment is implemented using Matlab and C++ languages ​​and includes the following steps:

[0036] Step 1: Use a2lparsermex in MATLAB to read all 6348 first calibration values ​​in the *.a2l file in the form of the first structure into the computer memory used for new energy vehicle control software data update calibration; see Figure 2 The members of the first structure include the name of the first scalar quantity, the description information of the first scalar quantity, the data dimension information of the first scalar quantity, the address information of the first scalar quantity in the ECU, the data type of the first scalar quantity, the conversion function, the maximum value information of the data type of the first scalar quantity, the minimum value information of the data type of the first scalar quantity, and the coordinate axis information of the first scalar quantity; the forms of the conversion function include RAT_FUNC (also known as "rational expression"), lookup table and indentical (also known as "same"); the data types include UINT8, SINT8, UINT16, SINT16, UINT32, SINT32, UINT64, SINT64, FLOAT and DOUBLE; the data dimension information includes VALUE, CURVE and MAP, where VALUE is a numeric value, CURVE is a one-dimensional array, and MAP is a two-dimensional array;

[0037] Step 2: Read the first *.hex file in the form of a one-dimensional array into the computer memory used for new energy vehicle control software data update and calibration; the number of elements in the one-dimensional array is 2542262; the address information of the first calibration quantity in the ECU corresponds to the address information in the first *.hex file;

[0038] Step 3: Read all 6294 second calibration values ​​in the *.par file in the form of a second structure into the computer memory used for new energy vehicle control software data update calibration; see Figure 3 , the second structure includes the name of the second calibrated quantity, the physical value of the second calibrated quantity, the data type of the second calibrated quantity, and the coordinate axis information of the second calibrated quantity;

[0039] Step 4: Traverse all second structures. If the name of the first calibrator in the first structure is the same as the name of the second calibrator in the second structure, and the coordinate axis information of the first calibrator in the first structure is the same as the coordinate axis information of the second calibrator in the second structure, the search is determined to be successful. Then, according to the data type of the first calibrator in the first structure, a conversion function is used to process the physical value of the second calibrator in the second structure, convert the physical value of the second calibrator into an internal value, and write the internal value into the corresponding position in the one-dimensional array in step 2 in real time according to the address information of the first calibrator in the ECU. Otherwise, the search is determined to have failed, the second structure is skipped, and the traversal continues. Finally, the second *.hex file is generated.

[0040] It should be noted that: in step 4, the physical value is the real data value; the physical value of the second calibration quantity is converted into the internal value specifically as follows:

[0041] Step a: Determine the data type of the physical value. If it is an integer, proceed to step b; if it is a floating point, proceed to step c.

[0042] Step b: convert the physical value into a two's complement form as an internal value; the two's complement form can convert the subtraction operation of the real value into an addition operation in the controller;

[0043] Step c: converting the physical value into an IEEE 754 standard floating-point number as an internal value; the IEEE 754 standard floating-point number solves the portability of floating-point numbers on different devices;

[0044] Step 4 allows you to selectively merge the calibrations of some modules in the controller software, without having to merge the calibrations of all modules each time or manually select the calibrations to be merged, which increases flexibility.

[0045] Step 5: Save the second *.hex file and write the second *.hex file into the new energy vehicle controller to complete the calibration data update.

[0046] At the same time, this embodiment also provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for updating calibration data of a new energy vehicle control software are implemented.

[0047] In addition, this embodiment also provides a computer device, including a processor, a memory connected to the processor, and a computer program that can run on the processor. When the processor executes the computer program, the steps of the above-mentioned method for updating calibration data of a new energy vehicle control software are implemented.

[0048] The *.a2l files, *.par files, and *.hex files mentioned throughout this document all refer to files with the extensions a2l, par, and hex, respectively. *.hex files are hexadecimal files, and *.hex files are files that can be recognized by the controller software. "*.a2l files" and "A2L files" are synonymous.

Claims

1. A method for updating calibration data of new energy vehicle control software, characterized in that: It includes the following steps: Step 1: Read all X first calibration quantities in the *.a2l file into the computer memory for calibrating the data update of the new energy vehicle control software in the form of a first structure. X is a positive integer and X > 1000. The members of the first structure include the name of the first calibration quantity, the description information of the first calibration quantity, the data dimension information of the first calibration quantity, the address information of the first calibration quantity in the ECU, the data type of the first calibration quantity, the conversion function, the maximum value information of the data type of the first calibration quantity, the minimum value information of the data type of the first calibration quantity, and the axis information of the first calibration quantity; Step 2: Read the first *.hex file into the computer memory for calibrating the data update of the new energy vehicle control software in the form of a one-dimensional array. The number of elements Z of the one-dimensional array = abX, where a is the space size occupied by the data type of the first structure and b is the axis information, b ≥ 1. The address information of the first calibration quantity in the ECU corresponds to the address information in the first *.hex file; Step 3: Read all Y second calibration quantities in the *.par file into the computer memory for calibrating the data update of the new energy vehicle control software in the form of a second structure. Y < X and Y is a positive integer. The second structure includes the name of the second calibration quantity, the physical value of the second calibration quantity, the data type of the second calibration quantity, and the axis information of the second calibration quantity; Step 4: Traverse all the second structures. If the name of the first calibration quantity in the first structure is the same as the name of the second calibration quantity in the second structure, and the axis information of the first calibration quantity in the first structure is the same as the axis information of the second calibration quantity in the second structure, it is determined that the search is successful. Then, according to the data type of the first calibration quantity in the first structure, use the conversion function to process the physical value of the second calibration quantity in the second structure, convert the physical value of the second calibration quantity into an internal value, and write the internal value into the corresponding position in the one-dimensional array described in Step 2 in real time according to the address information of the first calibration quantity in the ECU; otherwise, it is determined that the search fails, skip this second structure, and then continue to traverse. Finally, generate the second *.hex file; Step 5: Save the second *.hex file and write the second *.hex file into the new energy vehicle controller to complete the calibration data update.

2. A method for updating calibration data of a new energy vehicle control software according to claim 1, characterized in that: In Step 1, the software used to read all X calibration quantities in the *.a2l file into the computer memory for calibrating the data update of the new energy vehicle control software in the form of a first structure is MATLAB, and the function used is a2lparsermex in MATLAB.

3. A method for updating calibration data of a new energy vehicle control software according to claim 2, characterized in that: In Step 1, the forms of the conversion function include RAT_FUNC, look-up table, and indentical.

4. The method for updating calibration data of a new energy vehicle control software according to claim 3, characterized in that: In step 1 and step 3, the data types include UINT8, SINT8, UINT16, SINT16, UINT32, SINT32, UINT64, SINT64, FLOAT, and DOUBLE.

5. The method for updating calibration data of a new energy vehicle control software according to claim 4, characterized in that: In step 1, the data dimension information includes VALUE, CURVE and MAP, where VALUE is a numerical value, CURVE is a one-dimensional array, and MAP is a two-dimensional array.

6. The method for updating calibration data of a new energy vehicle control software according to claim 5, characterized in that: In step 3, the physical value is a real data value; The physical value of the second calibration amount is converted into an internal value as follows: Step a: Determine the data type of the physical value. If it is an integer, proceed to step b; if it is a floating point, proceed to step c. Step b: convert the physical value into a two's complement form as an internal value; Step c: Convert the physical value into an IEEE 754 standard floating-point number as an internal value.

7. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for updating calibration data of new energy vehicle control software according to any one of claims 1 to 6 are implemented.

8. A computer device comprising a processor, a memory connected to the processor, and a computer program executable on the processor, wherein: When the processor executes the computer program, the steps of the method for updating calibration data of new energy vehicle control software as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • ECU data synthesis method and device, computer readable storage medium and vehicle

    CN116737164A

  • Method and device for processing A2L file of vehicle-mounted controller

    CN113076092A

  • Software function changing method and device, equipment, storage medium and vehicle

    CN116662047A