AMT control program batch generation and modification method

By using Matlab to automatically process the AMT control program, the problems of low efficiency, poor reliability and high cost in the existing technology were solved, efficient and reliable batch generation and modification were achieved, and the dependence on foreign tools was reduced.

CN120803538AActive Publication Date: 2025-10-17SHAANXI FAST GEAR CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510879438.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-17
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

Existing AMT control program generation and modification technologies suffer from low efficiency, low reliability, and high cost. In particular, efficiency bottlenecks are evident in the parallel development of multiple vehicle models. Manual operations are prone to errors, and the reliance on foreign software and hardware leads to high costs.

Method used

Adopting Matlab's automation solution, through file parsing, batch processing and verification mechanism, batch generation and modification of AMT control programs are realized, including multi-threaded parallel processing, data matching, CRC verification and automatic rollback mechanism, reducing manual operations.

Benefits of technology

Significantly improve processing efficiency by approximately 200%, reduce errors, lower costs, and meet mass production requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803538A_ABST
    Figure CN120803538A_ABST
Patent Text Reader

Abstract

The invention discloses an AMT control program batch generation and modification method. The method comprises the steps that 1, a user imports a Par file, an A2L file, an original Hex file and a PostBuild file in batches through a Matlab UI; analyzing the A2L file and extracting information; step 2, dynamically binding a calibration quantity name in the Par file with a calibration quantity address in the A2L file; 3, parallel processing of multiple Par files is achieved, and Hex file data are automatically updated; 4, performing CRC (cyclic redundancy check) on the Hex file obtained in the step 3 to ensure data integrity, and generating an FFLS format release file; and step 5, when an error occurs, triggering error processing and a log, recording error information and giving an alarm. Compared with the prior art, the method has the advantages that the efficiency is improved, the reliability is enhanced, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of AMT control, and in particular relates to a method for batch generating and modifying AMT control programs. Background Art

[0002] The current generation and modification technology of AMT control programs is highly dependent on foreign professional tools (such as VECTOR vCDMStudio), and the following pain points are common:

[0003] (1) Efficiency bottleneck: Traditional methods use a calibration volume processing mode that processes calibration volumes one by one, making it impossible to perform batch merging of multiple files. For example, in the development of a certain vehicle's TCU program, a single parameter update required manual processing of over 200 calibration volumes, taking approximately four hours. This inefficiency is particularly prominent in the parallel development of multiple models.

[0004] (2) Reliability risk: Manual operation lacks a systematic verification mechanism, which can easily lead to problems such as address mapping errors and data type mismatches. There have been many cases of gear shift failures during vehicle road tests due to manual misoperation.

[0005] (3) Cost barriers: Foreign software licensing fees are high, with annual licensing fees for a single module exceeding 150,000 yuan, and a hardware dongle (priced at approximately 80,000 yuan) must be purchased. Furthermore, operational training costs are high, requiring new engineers to undergo three months of specialized training to master basic operations.

[0006] From the above, it is urgent to study a high-efficiency, high-reliability and low-cost AMT control program production and modification technology. Summary of the Invention

[0007] The present invention aims to provide a method for batch generation and modification of AMT control programs to address the low efficiency, low reliability, and high cost of the aforementioned prior art. This method, based on Matlab's automated solution, integrates file parsing, batch processing, and verification mechanisms to achieve batch generation and modification of AMT control programs, effectively addressing these issues.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] A method for batch generation and modification of AMT control programs, comprising the following steps:

[0010] Step 1: The user batch imports Par files, A2L files, original Hex files, and PostBuild files through the Matlab UI; parses the A2L file and extracts the address, name, data type, and dimension information of the calibration quantity;

[0011] Step 2, dynamically bind the calibration quantity name in the Par file to the calibration quantity address in the A2L file to realize data matching;

[0012] Step 3, batch Merge: realize multi-Par file parallel processing through the Matlab parfor loop, and automatically update the Hex file data;

[0013] Step 4, perform CRC check on the Hex file obtained in step 3 to ensure data integrity, and generate FFLS format release file;

[0014] Step 5, during the execution of steps 1-4, when an error occurs, trigger error handling and log, record error information and alarm.

[0015] Compared with the prior art, the method of the present application has the following technical effects:

[0016] (1) Efficiency improvement: multi-thread parallel processing + batch Merge technology is adopted, which greatly improves the processing efficiency and shortens the development cycle.

[0017] (2) Reliability enhancement: multiple CRC checks + automatic rollback mechanism effectively reduce errors and improve data integrity.

[0018] (3) Cost reduction: get rid of dependence on foreign software and hardware + automatic process, significantly reduce authorization cost and training cost. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The flowchart of the method of the present application.

[0020] The present application is further explained in conjunction with the drawings and specific embodiments. DETAILED DESCRIPTION

[0021] The AMT control program batch generation and modification method given by the present application specifically includes the following steps:

[0022] Step 1, the user imports Par files, A2L files, original Hex files, and PostBuild files in batches through the Matlab UI; parses the A2L file and extracts calibration quantity address, calibration quantity name, data type, and dimension information.

[0023] Step 1 specifically includes the following sub-steps:

[0024] Step 1.1, the user imports Par files (supporting.par and.csv formats), A2L files, original Hex files, and PostBuild files in batches through the Matlab UI;

[0025] Step 1.2, using regular expressions to parse the A2L file line by line, the A2L file is divided into HEADER, MEASUREMENT, CHARACTERISTIC three blocks, the three blocks are parsed in parallel to improve efficiency; extract the calibration quantity name, calibration quantity address (ECU_ADDRESS), data type (FLOAT32_IEEE) and dimension information (MATRIX_DIM) in the CHARACTERISTIC block;

[0026] Step 1.3, build a hash table to store the data obtained in step 1.1, establish a mapping between the calibration quantity name and the calibration quantity address; this operation saves time compared to reading data line by line, thereby achieving O(1) time complexity for fast query.

[0027] Step 2, dynamically bind the calibration quantity name in the Par file to the calibration quantity address in the A2L file to achieve data matching.

[0028] Step 2 includes the following sub-steps:

[0029] Step 2.1, parse the calibration quantity name in the Par file, and match the calibration quantity address in the A2L file through the hash table constructed in step 1.2; for multi-dimensional array data in the Par file, perform memory alignment according to ROW_DIR and COLUMN_DIR defined in the A2L file;

[0030] Step 2.2, according to the dimension defined in MATRIX_DIM in the A2L file, reconstruct the one-dimensional data in the Par file into a two-dimensional array according to the row priority rule. This operation can realize the dynamic processing of multi-dimensional array.

[0031] Step 3, batch Merge: realize multi-Par file parallel processing through Matlab parfor loop, automatically update Hex file data.

[0032] Step 3 includes the following sub-steps:

[0033] Step 3.1, assign an independent thread for the Merge of each Par file processed in step 2, use the API interface of HexView tool, call the HexWrite function through Matlab, and write the calibration quantity value in the Par file processed in step 2 into the original Hex file according to the calibration quantity address.

[0034] Specifically, according to the matching result of step 2.1, the calibration quantity address corresponding to the calibration quantity name in the Par file processed according to step 2 is found in the A2L file. Since the calibration quantity name, data type, dimension information, and numerical value are stored line by line in the Par file, the calibration quantity value (including data type, dimension information, and numerical value) corresponding to the calibration quantity address in the Par file is written into the Hex file according to the calibration quantity address.

[0035] Step 3.2, processing address offset: adjusting the absolute address (absolute address is a property of data storage in Hex file) according to Extended Linear Address Record (type 04) in Hex file;

[0036] Step 4, CRC check is performed on the Hex file obtained in step 3 to ensure data integrity, and an FFLS format release file is generated;

[0037] Step 4 specifically includes the following sub-steps:

[0038] Step 41, CRC check, including the following process:

[0039] A, CRC check: using triple redundancy check mechanism, calculating 32-bit cyclic redundancy check code of current Hex file through crc32() function, and performing first check comparison with original Hex file. If the check fails, start 3 times of retry loop, each time of retry including: reloading Hex file, restoring original data from backup area, and recalculating CRC check value. When successful matching, return success=true, and return success=false after 3 times of retry failure, and trigger error log.

[0040] The CRC check can ensure that the program code and data finally written to the target device are correct. By extracting the valid data of data records in the Hex file, performing CRC check value calculation according to the rules, and comparing the calculation result with the preset check value in the original Hex file, if they are consistent, the data is correct.

[0041] B, backup recovery: backing up the original file before each CRC check operation, and automatically rolling back to the backup version if the check fails.

[0042] Step 42, generating FFLS format release file, including the following process:

[0043] A, Call HexView tool chain: matlab system('HexView.exe -i input.hex -o output.hex -checksum'), insert custom file header in the header of Hex file after CRC check in step 41, including version number, CRC value and timestamp, get new Hex file;

[0044] B, PostBuild file merging: insert vehicle-specific code segment into the specified address range (such as 0x8000-0xFFFF) of the new Hex file;

[0045] C, Calculate file checksum by CheckSum algorithm (polynomial: 0x04C11DB7), replace the original checksum field at the end of the Hex file obtained in B, get FFLS format release file.

[0046] Step 5, during the execution of steps 1-4, when an error occurs, trigger error handling and log, record error information and alarm. Specifically including:

[0047] - Operation time, processed calibration quantity name, address, old value / new value;

[0048] - CRC check result and error type (such as address out of bounds, data type mismatch).

[0049] - Error classification processing: skip and record for minor errors (such as single calibration quantity failure); terminate the process and alarm for serious errors (such as Hex file damage).

[0050] Embodiment

[0051] This embodiment gives the AMT control program upgrade process of a certain vehicle. Specifically as follows:

[0052] (1) Input data: 3 Par files, A2L file, basic Hex file;

[0053] (2) Processing process:

[0054] ① Batch import Par file, system quickly complete parsing, compared with manual extraction of calibration data efficiency improved about 200%.

[0055] ② Dynamically match calibration address, compared with manual query record address information efficiency improved about 100%, and more reliable.

[0056] ③ Parallel processing of multiple Par files, generating temporary Hex files, compared with manual processing, the more the number of parallel, the more efficient.

[0057] (4) Perform CRC check, first check failure after automatic rollback and retry success, avoid manual check error possibility, guarantee program release quality.

[0058] (5) Generate FFLS file and insert vehicle model code segment, compared with manual merging, efficiency is improved by about 100%.

[0059] (3) Effect comparison: compared with the traditional scheme, the method of the application significantly improves the processing efficiency by about 200%, completely eliminates manual operation errors, and meets the requirements of mass production.

Claims

1. A method for batch generation and modification of AMT control programs, characterized in that: The specific steps include: Step 1: The user batch imports Par files, A2L files, original Hex files, and PostBuild files through the Matlab UI; parses the A2L file and extracts the address, name, data type, and dimension information of the calibration quantity; Step 2: Dynamically bind the calibrated quantity name in the Par file with the calibrated quantity address in the A2L file to achieve data matching; Step 3, Batch Merge: Use Matlab parfor loop to realize parallel processing of multiple Par files and automatically update Hex file data; Step 4: Perform a CRC check on the Hex file obtained in step 3 to ensure data integrity, and generate a FFLS format release file; Step 5: During the execution of steps 1 to 4, if an error occurs, error handling and logging are triggered to record error information and issue an alarm.

2. The method for batch generating and modifying AMT control programs according to claim 1, wherein: Step 1 specifically includes the following sub-steps: Step 1.1: The user batch imports Par files, A2L files, original Hex files, and PostBuild files through the Matlab UI; In step 1.2, use regular expressions to parse the A2L file line by line, splitting the A2L file into three blocks: HEADER, MEASUREMENT, and CHARACTERISTIC. These three blocks are parsed in parallel to improve efficiency. The calibrated quantity name, calibrated quantity address, data type, and dimension information in the CHARACTERISTIC block are extracted. Step 1.3: Build a hash table to store the data obtained in step 1.1 and establish a mapping between the calibrated quantity name and the calibrated quantity address.

3. The method for batch generating and modifying AMT control programs according to claim 1 or 2, wherein: Step 2 specifically includes the following sub-steps: Step 2.1: Parse the scalar name in the Par file and match the scalar address in the A2L file through the hash table built in step 1.2; for the multidimensional array data in the Par file, perform memory alignment according to the ROW_DIR and COLUMN_DIR defined in the A2L file; Step 2.2, according to the dimension defined by MATRIX_DIM in the A2L file, reconstruct the one-dimensional data in the Par file into a two-dimensional array according to the row-first rule.

4. The method for batch generating and modifying AMT control programs according to claim 3, wherein: Step 3 specifically includes the following sub-steps: Step 3.1: allocate an independent thread for the Merge of each Par file processed in step 2, use the API interface of the HexView tool, call the HexWrite function through Matlab, and write the calibration value in the Par file processed in step 2 into the original Hex file according to the calibration address; Step 3.2, process the address offset: adjust the absolute address according to the Extended Linear Address Record in the Hex file.

5. The method for batch generating and modifying AMT control programs according to claim 4, wherein: Step 4 specifically includes the following sub-steps: Step 41, CRC check, includes the following process: A. CRC check: A triple redundancy check mechanism is used. The crc32() function is used to calculate the 32-bit cyclic redundancy check code of the current Hex file. This code is then compared with the original Hex file for the first time. If the check fails, three retry cycles are initiated. Each retry includes: reloading the Hex file, restoring the original data from the backup area, and recalculating the CRC check value. Success = true is returned if the match is successful. Success = false is returned after three failed retries. B. Backup and recovery: Back up the original file before each CRC check operation. If the check fails, it will automatically roll back to the backup version. Step 42: Generate a FFLS format publishing file.

6. The method for batch generating and modifying AMT control programs according to claim 5, wherein: Step 42 includes the following process: A. Call the HexView toolchain: matlab system('HexView.exe -iinput.hex -ooutput.ffls --checksum'). Insert a custom file header containing the version number, CRC value, and timestamp into the CRC-checked Hex file obtained in step 41 to obtain a new Hex file. B. PostBuild file merging: insert the vehicle model-specific code segment into the specified address range of the new Hex file; C. Calculate the file checksum using the CheckSum algorithm and replace the original checksum field at the end of the Hex file obtained in B to obtain the FFLS format release file.

7. The method for batch generating and modifying AMT control programs according to claim 6, wherein: In step 5, error information is recorded and an alarm is issued, including: - Operation time, name of the processed calibration quantity, address, old value / new value; -CRC check result and error type, including address out of bounds and data type mismatch; - Error classification processing: Minor errors are skipped and recorded; serious errors terminate the process and issue an alarm.

Citation Information

Patent Citations

  • Hex file processing method and application

    CN110727542A

  • Method for modifying HEX file based on PC software and application

    CN111796836A

  • A2L file splitting design method and system, medium and equipment

    CN115774440A

  • Automatic generation method and device for A2L protocol file, equipment and storage medium

    CN117075906A

  • AMT program brushing method capable of preventing wrong brushing

    CN119938094A