CN114546451A - Method for calibrating internal parameters of MPU (Microprocessor Unit) end program based on file uploading - Google Patents

Method for calibrating internal parameters of MPU (Microprocessor Unit) end program based on file uploading Download PDF

Info

Publication number
CN114546451A
CN114546451A CN202210186871.1A CN202210186871A CN114546451A CN 114546451 A CN114546451 A CN 114546451A CN 202210186871 A CN202210186871 A CN 202210186871A CN 114546451 A CN114546451 A CN 114546451A
Authority
CN
China
Prior art keywords
calibration
parameters
configuration table
parameter configuration
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210186871.1A
Other languages
Chinese (zh)
Other versions
CN114546451B (en
Inventor
张飞龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210186871.1A priority Critical patent/CN114546451B/en
Publication of CN114546451A publication Critical patent/CN114546451A/en
Application granted granted Critical
Publication of CN114546451B publication Critical patent/CN114546451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for calibrating internal parameters of an MPU end program based on file uploading, which comprises the steps that firstly, a module needing to be calibrated opens a signal needing to be calibrated in a model code and generates the model code with calibrated parameters; then reading calibration parameters and initial values in the model codes, and generating an initial version parameter configuration table in a json format; writing the initial version parameter configuration table into the real vehicle, re-calibrating the vehicle type adaptive parameters on the real vehicle through the upper computer, and generating a new version parameter configuration table suitable for the vehicle type and the working condition; when the program is started, the corresponding calibration quantity is written into the program by using the newly generated parameter configuration table, so that parameter calibration is completed. The invention can realize the calibration of the internal parameters of the MPU end program and can improve the efficiency of the calibration work.

Description

Method for calibrating internal parameters of MPU (Microprocessor Unit) end program based on file uploading
Technical Field
The invention relates to parameter calibration, in particular to a method for calibrating internal parameters of an MPU (micro processing Unit) end program based on file uploading. The invention is used for calibrating the internal parameters of the software or the program through a local parameter table and a certain technology. Belonging to the technical field of automobile software calibration.
Background
In order to make the vehicle work effectively and reliably, various hardware configuration functions are exerted to the maximum, and the functions of software and programs are not replaced. After the software is written, not all conditions and vehicle types can be used universally, and parameters related to the software need to be calibrated according to different vehicle types and application conditions, so that the function of relevant configuration can be exerted to the maximum extent. For example, chinese patent publication No. CN111572676A discloses a method for calibrating configuration parameters of a vehicle instrument, which is mainly used for calibrating configuration parameters of a vehicle instrument, and calibrates configuration parameters of an instrument panel through a calibration device, so as to form instruments required by various instantiated vehicle types. Like the domain control software at present, the MCU end has an open interface for calibrating equipment to calibrate, the whole calibration process of the MCU end can be completed by using a CANape tool, firstly, a calibration engineer uses the CANape to calibrate parameters on different vehicle types, a completed calibration data file generates a new HEX program by using INCA software, and finally, the HEX program is downloaded into a target MCU by using a program downloading tool.
However, in the MPU side, a specific memory block cannot be allocated to the internal calibration amount of the program in the MPU side due to different chip characteristics, and thus parameter calibration cannot be performed by canope. Therefore, a new calibration method needs to be designed to calibrate the internal parameters of the MPU end program.
Disclosure of Invention
In view of the above-mentioned shortcomings in the prior art, the present invention aims to provide a method for calibrating internal parameters of an MPU side program based on file uploading, which can calibrate the internal parameters of the MPU side program and improve the efficiency of calibration.
The technical scheme of the invention is realized as follows:
a method for calibrating internal parameters of an MPU end program based on file uploading is disclosed, wherein the program refers to a process program running on the MPU end, and the process program comprises one or more model codes and corresponds to different modules of an application layer. The calibration method is carried out according to the following steps,
1) firstly, opening a signal to be calibrated in a model code by a module to be calibrated, and generating the model code with calibration parameters;
2) then, reading calibration parameters and initial values in the model code with the calibration parameters generated in the step 1) by using a tool to generate an initial version parameter configuration table;
3) writing the initial version parameter configuration table into the real vehicle, and re-calibrating parameters matched with the vehicle type in the initial version parameter configuration table on the real vehicle through the upper computer according to different vehicle type projects and working conditions to replace the initial values, so as to generate a new version parameter configuration table suitable for the vehicle type and the working conditions;
4) when the program is started, the corresponding calibration quantity is written into the program by using the new version parameter configuration table, so that the calibration of the internal parameters of the MPU end program is realized.
Preferably, in step 2), the initial version parameter configuration table performs parameter configuration by using a json format data structure, and information included in one calibration quantity in the initial version parameter configuration table includes a calibration parameter name, a signal number (for distinguishing an array), a symbol, a signal type, and a calibration value.
Preferably, in step 3), the information of the calibration signal is read from the inside of the initial version parameter configuration table and stored in the node structure array, the node structure array includes information of the calibration amount, and the read-write module is used for traversing and searching for the value of the required calibration amount.
Further preferentially, in the step 3), a function for reading the parameter configuration table in the json format is called; the function comprises two parameters, wherein the first parameter is a calibration signal name and is used for traversing the same-name parameter in the node structure array, and the second parameter is a memory address distributed by the calibration signal in the program and is used for writing a calibration value.
In the step 3), the calibration quantity is listed through an upper computer, the value of the calibration quantity is modified in real time and is stored in a new json file, and when all parameters needing to be calibrated or all working conditions are calibrated, the new parameter configuration table which is suitable for a specific vehicle type or a specific working condition is generated.
In the step 4), before the program runs, the new version parameter configuration table generated in the step 3) is written into the internal variables of the program through the file reading and writing module, so that the domain control software is well adapted to different vehicle types.
In the step 1), a calibration interface code is written on the model code with calibration parameters for writing in the calibration value.
In step 2), the tool is a written file reading and writing module, and calibration parameter information in the model code is read through the file reading and writing module.
The invention provides a method for calibrating internal parameters of an MPU end program, which is characterized in that a program developer provides a parameter table, and corresponding parameters are written into corresponding signals in the program through file reading and writing operations to complete calibration. The device comprises two parts: firstly, reading a parameter table provided by a program, and secondly, flashing the parameters to finish calibration when software is started. The invention solves the problem that the MPU end can not be calibrated at present, can help a calibration engineer to complete corresponding calibration requirements, and can improve the efficiency of calibration work.
Drawings
Fig. 1 shows a format of a parameter configuration table according to an embodiment of the present invention.
FIG. 2 is a process flow diagram of an embodiment of the invention.
Detailed Description
The following detailed description of specific embodiments of the invention refers to the accompanying drawings.
For better understanding of the technical solution of the present invention, the definitions and descriptions of the related terms related to the present invention are given first:
json: a lightweight data exchange format; model code: and C codes converted by the Matlab built model.
The invention aims to provide a method for calibrating internal parameters of a vehicle domain controller MPU end program, wherein the program refers to a process program which runs on the MPU end, and the process comprises one or more model codes and corresponds to different modules of an application layer. The calibration method is performed as follows, please refer to fig. 2 at the same time,
1) firstly, opening a signal to be calibrated in a model code by a module to be calibrated, and generating the model code with calibration parameters;
2) then, reading calibration parameters and initial values in the model code with the calibration parameters generated in the step 1) by using a tool to generate an initial version parameter configuration table;
3) writing the initial version parameter configuration table into the real vehicle, and re-calibrating parameters matched with the vehicle type in the initial version parameter configuration table on the real vehicle through the upper computer according to different vehicle type projects and working conditions to replace the initial values, so as to generate a new version parameter configuration table suitable for the vehicle type and the working conditions;
4) when the program is started, the corresponding calibration quantity is written into the program by using a newly generated new version parameter configuration table, so that the calibration of the internal parameters of the MPU end program is realized.
Calibration parameter table: the invention reads the local parameter configuration table through the program to carry out parameter calibration, so that the format of parameter table calibration has certain requirements, and information which is contained in a calibration quantity comprises a calibration parameter name, signal number (used for distinguishing arrays), signs, signal types and calibration values. Here, a data structure in json format is used for parameter configuration. Fig. 1 shows a format of a parameter configuration table according to an embodiment of the present invention.
In step 2), the tool is a written file reading and writing module, and calibration parameter information in the model code is read through the file reading and writing module.
And compiling a calibration interface code for writing in a calibration value according to a parameter configuration table containing calibration information and a model code with a opened calibration amount, which are provided by an application layer model team. And the written file reading and writing module reads the calibration parameter information in the json file and writes the calibration parameter information into the internal variables of the model codes of the application layer through the interface codes. The whole process is mainly to perform read-write operation on the parameter configuration table in the json format. The invention relates to a parameter calibration method based on file uploading, which is embodied herein. And modifying the value of the parameter configuration table by the upper computer to generate a new json parameter configuration table, and writing the calibration value into the program calibration signal by reading and writing files.
The overall idea is designed as follows:
1. and reading information of the calibration signals, including the total number of the calibration parameters, the signal type of the calibration quantity, whether the calibration value is an array, the calibration value and the like, from the json configuration parameter table, and storing the information in the node structure array. The node structure array comprises information of the calibration quantity, and the read-write module performs traversal searching on the value of the required calibration quantity.
2. And calling a function for reading the parameter configuration table in the json format. The function comprises two parameters, wherein the first parameter is a calibration signal name and is used for traversing the same-name parameter in the node structure array, and the second parameter is a memory address distributed by the calibration signal in the program and is used for writing a calibration value.
3. The calibration value of the read calibration signal is written into the program internal calibration signal, which is implemented inside the function, and the read signal value is written into the address pointed by the second parameter.
4. The json file is not generated at the same time after the application layer team generates the model codes, and the model codes are only reserved with interfaces of calibration signals, so that calibration values can be conveniently written in the program calibration process. And the calibration values are derived from json files. Therefore, after the model generates the code, a tool is needed to read the c code calibrated with the interface definition, and the calibration quantity and the information thereof are screened out and stored in the parameter configuration table in the json format.
5. After the initial version of the parameter configuration table is available, the program and the parameter configuration table are submitted to a calibration engineer for calibration, the calibration quantity is listed through an upper computer, the value of the calibration quantity is modified in real time and is stored in a new json file, and after all parameters needing to be calibrated or all working conditions are calibrated, the new version of the parameter configuration table which is adapted to a specific vehicle type or a specific working condition also exists.
6. The generated new version parameter configuration table is written into the internal variables of the program again through the file reading and writing module, and the operation is completed before the program runs, so that the domain control software can be well adapted to different vehicle types.
In specific implementation, the calibration method is applied to different vehicle types, and the problem that the ADS domain control software is adaptive to functions of different vehicle types is well solved. And different processing modules are called according to different parameter configurations to complete corresponding functional logics, so that the efficiency of development engineers and calibration engineers is greatly improved.
Finally, it should be noted that the above-mentioned examples of the present invention are only examples for illustrating the present invention, and are not intended to limit the embodiments of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, it will be apparent to those skilled in the art that other variations and modifications can be made based on the above description. Not all embodiments are exhaustive. All obvious changes and modifications of the present invention are within the scope of the present invention.

Claims (8)

1. A method for calibrating internal parameters of an MPU end program based on file uploading is disclosed, wherein the program refers to a process program running on the MPU end, the process program comprises one or more model codes and corresponds to different modules of an application layer; the method is characterized in that: the method comprises the following steps of,
1) firstly, opening a signal to be calibrated in a model code by a module to be calibrated, and generating the model code with calibration parameters;
2) then, reading calibration parameters and initial values in the model code with the calibration parameters generated in the step 1) by using a tool to generate an initial version parameter configuration table;
3) writing the initial version parameter configuration table into the real vehicle, and re-calibrating parameters matched with the vehicle type in the initial version parameter configuration table on the real vehicle through the upper computer according to different vehicle type projects and working conditions to replace the initial values, so as to generate a new version parameter configuration table suitable for the vehicle type and the working conditions;
4) when the program is started, the corresponding calibration quantity is written into the program by using the new version parameter configuration table, so that the calibration of the internal parameters of the MPU end program is realized.
2. The method for calibrating the internal parameters of the MPU side program based on file upload according to claim 1, wherein: in step 2), the initial version parameter configuration table performs parameter configuration by adopting a data structure in a json format, and information contained in one calibration quantity in the initial version parameter configuration table comprises a calibration parameter name, a signal number, a symbol, a signal type and a calibration value.
3. The method for calibrating the internal parameters of the MPU side program based on the file upload according to claim 2, wherein: and 3) reading information of the calibration signals from the inner surface of the initial version parameter configuration table, storing the information in a node structure array, wherein the node structure array comprises information of the calibration quantity, and traversing through a read-write module to search the value of the required calibration quantity.
4. The method for calibrating the internal parameters of the MPU side program based on file upload according to claim 3, wherein: in step 3), calling a function for reading the parameter configuration table in the json format; the function comprises two parameters, wherein the first parameter is a calibration signal name and is used for traversing the same-name parameter in the node structure array, and the second parameter is a memory address distributed by the calibration signal in the program and is used for writing a calibration value.
5. The method for calibrating the internal parameters of the MPU side program based on file upload according to claim 2, wherein: and 3) listing the calibration quantity through the upper computer, modifying the value in real time and storing the value into a new json file, and generating the new parameter configuration table which is suitable for the specific vehicle type or the specific working condition after all the parameters needing to be calibrated or all the working conditions are calibrated.
6. The method for calibrating the internal parameters of the MPU side program based on file upload according to claim 1, wherein: in the step 4), before the program runs, the new version parameter configuration table generated in the step 3) is written into the internal variables of the program through the file reading and writing module, so that the domain control software is well adapted to different vehicle types.
7. The method for calibrating the internal parameters of the MPU side program based on file upload according to claim 1, wherein: in the step 1), a calibration interface code is written on the model code with calibration parameters for writing in a calibration value.
8. The method for calibrating the internal parameters of the MPU side program based on the file upload according to claim 1, wherein: in step 2), the tool is a written file reading and writing module, and calibration parameter information in the model code is read through the file reading and writing module.
CN202210186871.1A 2022-02-28 2022-02-28 Method for calibrating internal parameters of MPU (micro processing unit) end program based on file uploading Active CN114546451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210186871.1A CN114546451B (en) 2022-02-28 2022-02-28 Method for calibrating internal parameters of MPU (micro processing unit) end program based on file uploading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210186871.1A CN114546451B (en) 2022-02-28 2022-02-28 Method for calibrating internal parameters of MPU (micro processing unit) end program based on file uploading

Publications (2)

Publication Number Publication Date
CN114546451A true CN114546451A (en) 2022-05-27
CN114546451B CN114546451B (en) 2024-05-24

Family

ID=81678584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210186871.1A Active CN114546451B (en) 2022-02-28 2022-02-28 Method for calibrating internal parameters of MPU (micro processing unit) end program based on file uploading

Country Status (1)

Country Link
CN (1) CN114546451B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678075A (en) * 2013-12-27 2014-03-26 北京自动测试技术研究所 Complex microprocessor test method based on automatic vector generation technology
CN104216390A (en) * 2013-05-30 2014-12-17 广州汽车集团股份有限公司 Device and method for calibrating electronic control units of automobiles on basis of CCP [CAN (controller area network) calibration protocol]
CN106776633A (en) * 2015-11-23 2017-05-31 上海极能客车动力系统有限公司 The apparatus and method that what user can configure automatically generate a2l files
CN107885500A (en) * 2017-10-31 2018-04-06 惠州市蓝微新源技术有限公司 A kind of runtime environment generation method towards AUTOSAR software architectures
CN111123807A (en) * 2020-01-19 2020-05-08 厦门金龙联合汽车工业有限公司 Calibration method for whole vehicle controller of new energy bus
CN111324362A (en) * 2018-12-14 2020-06-23 北京宝沃汽车有限公司 Vehicle, and method and device for updating vehicle electronic control system program
CN112549023A (en) * 2020-11-25 2021-03-26 浙江同善人工智能技术有限公司 Industrial robot demonstrator mode and protocol control method based on TCP socket interface
CN113986852A (en) * 2021-12-29 2022-01-28 智道网联科技(北京)有限公司 Driving program calibration parameter matching method and device, electronic equipment and storage medium
EP3945416A1 (en) * 2020-07-28 2022-02-02 Hitachi, Ltd. Software query information management system and software query information management method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216390A (en) * 2013-05-30 2014-12-17 广州汽车集团股份有限公司 Device and method for calibrating electronic control units of automobiles on basis of CCP [CAN (controller area network) calibration protocol]
CN103678075A (en) * 2013-12-27 2014-03-26 北京自动测试技术研究所 Complex microprocessor test method based on automatic vector generation technology
CN106776633A (en) * 2015-11-23 2017-05-31 上海极能客车动力系统有限公司 The apparatus and method that what user can configure automatically generate a2l files
CN107885500A (en) * 2017-10-31 2018-04-06 惠州市蓝微新源技术有限公司 A kind of runtime environment generation method towards AUTOSAR software architectures
CN111324362A (en) * 2018-12-14 2020-06-23 北京宝沃汽车有限公司 Vehicle, and method and device for updating vehicle electronic control system program
CN111123807A (en) * 2020-01-19 2020-05-08 厦门金龙联合汽车工业有限公司 Calibration method for whole vehicle controller of new energy bus
EP3945416A1 (en) * 2020-07-28 2022-02-02 Hitachi, Ltd. Software query information management system and software query information management method
CN112549023A (en) * 2020-11-25 2021-03-26 浙江同善人工智能技术有限公司 Industrial robot demonstrator mode and protocol control method based on TCP socket interface
CN113986852A (en) * 2021-12-29 2022-01-28 智道网联科技(北京)有限公司 Driving program calibration parameter matching method and device, electronic equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
BOHAO HUANG等: "A Novel Positioning Module and Fusion Algorithm for Unmanned Aerial Vehicle Monitoring", 《IEEE SENSORS JOURNAL 》, 16 August 2021 (2021-08-16), pages 1 - 18 *
BRYAN SIEPERT: "MPU6050 6-DoF Accelerometer and Gyro", pages 1 - 17, Retrieved from the Internet <URL:《https://learn.adafruit.com/mpu6050-6-dof-accelerometer-and-gyro/arduino》> *
YESHUHENG: "车界技术:发动机ECU标定全流程!", pages 1 - 6, Retrieved from the Internet <URL:《http://www.360doc.com/content/18/0307/00/30375878_734889382.shtml》> *
廖家才: "基于视觉的车辆四周立体物体检测研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, 15 July 2018 (2018-07-15), pages 138 - 739 *

Also Published As

Publication number Publication date
CN114546451B (en) 2024-05-24

Similar Documents

Publication Publication Date Title
US20190034175A1 (en) System providing automatic source code generation for personalization and parameterization of user modules
US20030033592A1 (en) Software debugger and software development support system
CN112286746B (en) Universal verification platform and method for AXI slave device interface
US8037450B2 (en) System and methods for tracing code generation in template engines
US20080319728A1 (en) System for testing at least one electronic control unit and method
CN107015914B (en) Data calibration method and system
US7957951B2 (en) Address translation system for use in a simulation environment
CN108197351B (en) Simulation verification method of integrated circuit controlled by single chip microcomputer
Weiland et al. A classification of modeling variability in simulink
CN114997101A (en) Signal control method, system, medium and device based on chip verification system
CN110637521B (en) Data real-time storage method and system based on model simulation
CN116049014A (en) AMBA bus verification platform generation method and device
EP1171774A2 (en) Interface independent test system
CN114281538A (en) Memory parameter adjusting method, device, equipment and medium
CN112230848B (en) NVM automatic configuration method, device and equipment
CN110569206A (en) Driving frame supporting multiple sensors, method, electronic equipment and storage medium
CN114546451A (en) Method for calibrating internal parameters of MPU (Microprocessor Unit) end program based on file uploading
US20070079283A1 (en) Program generation method and program product
Hanselmann et al. Production quality code generation from Simulink block diagrams
CN106776190A (en) A kind of eMMC writes method of testing and device
CN116340150A (en) Reusable register performance interactive verification system based on UVM and application thereof
CN110457056B (en) Instrument on-line upgrading method and receiving device based on HART bus
CN113985849A (en) Method for writing DTC (digital control channel) read ECU (electronic control unit) version of automatic clear-reading whole vehicle based on CANoe software
CN112285542B (en) Debugging and testing method for FPGA external interface logic
CN111290290A (en) Device for simulating a controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant