New energy vehicle-mounted battery management system software rapid iteration method and system

By externalizing key parameters in the BMS software into an Excel spreadsheet and combining them with dynamic configuration using MATLAB and AUTOSAR components, the problems of cumbersome parameter adjustments and susceptibility to errors in existing technologies are solved, enabling rapid iteration and flexible adaptation of new energy vehicle battery management system software.

CN122173071APending Publication Date: 2026-06-09LISHEN (QINGDAO) NEW ENERGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LISHEN (QINGDAO) NEW ENERGY CO LTD
Filing Date
2026-02-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In the current development process of new energy vehicle battery management system (BMS) software, key parameters are embedded in the code in the form of hard coding, which makes parameter adjustment cumbersome, time-consuming, and prone to errors. It also lacks dynamic configuration and centralized management, making it difficult to achieve rapid iteration and flexible adaptation.

Method used

Key parameters are separated from the program code and stored in an Excel parameter configuration table. They are then read and mapped to the ConstantMemory of the AUTOSAR component via a MATLAB calling module. Combined with external calibration tools, dynamic configuration and real-time updates are achieved, avoiding code modification and recompilation.

Benefits of technology

It improves software development and testing efficiency, shortens iteration cycles, enhances system stability and reliability, and possesses high flexibility and adaptability, enabling it to quickly respond to different testing scenarios and market demands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173071A_ABST
    Figure CN122173071A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of battery management systems, and particularly relates to a new energy vehicle-mounted battery management system software rapid iteration method and system, which comprises the following steps: a parameter externalization step, a parameter reading step, a parameter mapping step, a code generation step and a dynamic updating step. The application separates key parameters in the battery management system from codes and stores the key parameters in the form of calibration quantities in an Excel table, realizes dynamic configuration and automatic mapping by combining a MATLAB calling interface and model data dictionary, and significantly improves the efficiency of software development and testing and shortens the iteration period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of battery management system technology, specifically relating to a method and system for rapid iteration of software for a new energy vehicle battery management system. Background Technology

[0002] The core power source of new energy vehicles is the power battery, and the battery management system (BMS) is an important link connecting the battery pack, the vehicle system and the motor. It undertakes key functions such as data acquisition, status assessment, charge and discharge control, thermal management and communication interaction, which are of great significance to ensuring battery safety, extending service life and improving vehicle performance.

[0003] With the rapid development of new energy vehicle technology, BMS software needs to constantly adapt to different battery types, operating conditions, and user needs, requiring frequent parameter optimization and functional iteration. However, current BMS software development methods still have the following shortcomings: First, key parameters (such as voltage thresholds, current thresholds, SOC calculation parameters, fault diagnosis thresholds, etc.) are usually hard-coded into the program code. When these parameters need to be adjusted, developers must manually modify the code, recompile and deploy the software. This process is cumbersome, time-consuming, and prone to human error, severely restricting the software's flexibility and iteration efficiency.

[0004] Secondly, during the development and testing process, software engineers and test engineers need to frequently modify the code to adapt to different testing scenarios, which leads to a longer development and testing cycle, a large workload, and each parameter adjustment requires recompilation and deployment, further increasing the complexity and time cost of testing.

[0005] Furthermore, the parameters are scattered throughout the code, lacking a unified centralized management mechanism, making it difficult to trace and verify the parameters, and compromising software reliability. Especially when parameters are frequently adjusted, frequent code modifications can easily introduce new errors, affecting system stability.

[0006] Furthermore, while some parameter management solutions exist in the prior art, such as the software parameter management method and device proposed in Chinese Patent Publication No. CN105446724B, this solution is mainly geared towards general software systems and is not optimized for the real-time performance, security, and embedded environment of BMS. It is costly to implement, structurally complex, and difficult to directly apply to in-vehicle BMS systems. Similarly, the new energy vehicle battery management system disclosed in Chinese Patent Publication No. CN109606200B and the new energy vehicle battery management system proposed in Chinese Patent Publication No. CN109435763A, although showing improvements in system architecture or SOC estimation, still rely on code modification for parameter adjustment, lacking dynamic configuration and centralized management mechanisms, and thus failing to achieve rapid software iteration and flexible adaptation. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for rapid iteration of battery management system software for new energy vehicles, thereby improving the efficiency of parameter adjustment in BMS software development, reducing repetitive workload, and enhancing system reliability and adaptability.

[0008] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a method for rapid iteration of software for a new energy vehicle battery management system, comprising the following steps: S101. Separate the key parameters that need to be dynamically adjusted in the battery management system software from the program code and store them in an Excel parameter configuration table in the form of standardized quantities; S102. Software engineers or system engineers edit key parameters in the Excel parameter configuration table according to requirements and save it. S103. When the MATLAB calling module starts, it automatically reads the parameters in the Excel parameter configuration table and updates the read parameters to the data dictionary of the MATLAB / Simulink model. S104. In the AUTOSAR component designer of MATLAB / Simulink, open the code mapping interface, select ConstantMemory storage type for the parameters in the model workspace in the “Mapped To” column, set the SwAddrMethod property to EEPROM or FLASH, and set the calibration access permission to calibrate. S105. Use Embedded Coder to generate code. The generated files include an ARXML file containing a description of ConstantMemory and C code with parameters declared as const and marked with attribute comments. S106. Import the generated ARXML file and ELF / HEX file into an external calibration tool, which recognizes the parameters as calibration parameters; S107 The battery management system model obtains parameters from the data dictionary to perform battery management calculations and control; during operation, the calibration parameter values ​​are modified in real time through external calibration tools, and MATLAB calls modules to update the corresponding parameters in the data dictionary; S108. Test engineers can quickly perform tests in different scenarios by modifying calibrated parameters without recompiling and deploying software code.

[0009] Preferably, in the parameter externalization step, the Excel parameter configuration table includes at least the fields for parameter name, parameter value, unit, data type, and calibration method.

[0010] Preferably, in the parameter reading step, the MATLAB calling module uses the readtable or xlsread function to read the Excel file, stores the read parameters in the MATLAB data structure, and writes the parameters to the model workspace using the assignin function.

[0011] Preferably, in the parameter mapping step, in the AUTOSAR component designer of MATLAB / Simulink, the parameters in the model workspace are selected as ConstantMemory in the "Mapped To" column of the code mapping interface, and the SwAddrMethod attribute is set to EEPROM or FLASH, and the calibration access permission is set to calibrable.

[0012] Preferably, in the dynamic update step, the external calibration tool communicates with the battery management system via the XCP protocol to modify the calibration parameter values ​​in real time.

[0013] This invention also discloses a new energy vehicle battery management system employing the aforementioned method, comprising: Parameter configuration table module: Used to store key parameters in calibrated form, the parameter configuration table is an Excel format file; MATLAB calling module: Connected to the parameter configuration table module, it is used to read parameters from the Excel table and pass the parameters to the model data dictionary; Model data dictionary module: Connected to the MATLAB calling module, it is used to centrally store and manage all parameters required for the battery management system model to run; The main module of the BMS software is connected to the model data dictionary module and is used to read parameters from the data dictionary and perform real-time monitoring, status evaluation, and charge / discharge control functions of the battery. Calibration tool interface module: Connected to the model data dictionary module, it is used to receive modified parameters sent by external calibration tools and update the parameter values ​​in the data dictionary.

[0014] Preferably, the MATLAB calling module reads the Excel parameter configuration table through the readtable function, stores the read parameters as a structure or table, and writes the parameters into the model workspace through the assignin function.

[0015] Preferably, the parameters in the model data dictionary module are mapped to the ConstantMemory storage type under the AUTOSAR architecture during code generation, and the parameters are declared as const type variables with calibration attributes in the generated C code.

[0016] Preferably, the key parameters in the Excel parameter configuration table include one or more of the following: battery voltage threshold, current threshold, temperature threshold, SOC calculation parameters, fault diagnosis threshold, charge / discharge control parameters, and equalization control parameters.

[0017] Preferably, the calibration tool interface module supports the XCP protocol and communicates with CANape or INCA calibration tools to enable real-time parameter modification.

[0018] The beneficial effects of this invention are as follows: By separating key parameters in the battery management system from the code and storing them in a standardized form in an Excel spreadsheet, and combining this with a MATLAB call interface and model data dictionary to achieve dynamic configuration and automated mapping, this invention significantly improves the efficiency of software development and testing, shortens the iteration cycle, and effectively avoids software errors caused by frequent code modifications through centralized management and parameter verification mechanisms, thereby enhancing the stability and reliability of the system. In addition, this solution has high flexibility and adaptability, and can quickly respond to different testing scenarios and market demands, providing an efficient, safe, and easy-to-maintain solution for the development of new energy vehicle BMS software. Attached Figure Description

[0019] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0020] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0021] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0022] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," "fixed connection," and "fixed connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0023] Example 1 This embodiment provides a method for rapid iteration of software for a new energy vehicle battery management system, such as... Figure 1 As shown, it includes the following steps: Step 101: External Parameter Configuration. Based on project requirements and historical experience, determine the categories and number of key parameters in the Battery Management System (BMS) software that require frequent adjustments. Separate these key parameters from the program code and store them in a calibrated form in an external parameter configuration file. In this embodiment, the external parameter configuration file is an Excel spreadsheet file, with the format shown in Table 1, and includes at least the following parameter fields: parameter name, parameter value, unit, data type, storage method, and whether calibration is required. Example parameters include voltage threshold, current threshold, temperature threshold, SOC calculation parameters, fault diagnosis threshold, equalization control parameters, and charge / discharge parameters.

[0024] Table 1. Example of parameter configuration

[0025] Step 102: Parameter Editing and Saving. Software engineers or system engineers edit key parameter values ​​in an Excel spreadsheet according to actual needs and save the Excel file. The standardized structure of the Excel spreadsheet facilitates parameter management and version control.

[0026] Step 103: Parameter Reading. Parameters are read from the Excel spreadsheet via an interface call. This embodiment uses MATLAB as the modeling tool, employing the `readtable` or `xlsread` functions provided by MATLAB to read the Excel file. The read parameters are stored in a MATLAB data structure and then updated to the parameter management module of the BMS model. The parameter management module can be a model data dictionary, stored in the Simulink Model Workspace.

[0027] Step 104: Parameter Mapping. Map the parameters in the model workspace to constant memory under the AUTOSAR architecture so that the calibration tool can recognize and modify them. Specifically, open the AUTOSAR Component Designer in Simulink, find the parameters in the Code Mappings interface, set their Mapped To column to Constant Memory, and set AUTOSAR properties such as SwAddrMethod (e.g., EEPROM or FLASH) and CalibrationAccess (set to YES). In this way, these parameters will be described as constant memory in the ARXML file during subsequent code generation.

[0028] Step 105: Code Generation. Use Embedded Coder to generate code, such as the command `slbuild('your_model_name')`. The generated files include C code and ARXML files. In the C code, parameters are declared as `const` and have calibration attributes, for example: `CONSTP(float32, AUTOSAR_CONST) VoltageThreshold = 3.2F`. The ARXML file contains a description of the calibration values, which can be parsed by calibration tools.

[0029] Step 106: Calibration Tool Integration. Import the generated ARXML file and executable file (such as ELF / HEX) into the calibration tool, such as CANape or INCA. The calibration tool can recognize the calibration values ​​defined in the ARXML and allows users to modify parameter values ​​in real time on the tool interface. The modified values ​​are written to the target hardware via communication methods such as the XCP protocol, without the need to recompile the code.

[0030] Step 107: BMS Model Execution Phase. During BMS model execution, the current parameter values ​​are retrieved from the model workspace (i.e., the parameter management module) to perform battery management calculations and control, such as SOC estimation, equalization control, and fault diagnosis. If parameter adjustments are needed during execution, simply modify the parameter values ​​in the Excel spreadsheet and repeat steps 103 to 107 to quickly update the parameters without modifying the code or recompiling and deploying.

[0031] Step 108: Testing and Verification Phase. Test engineers can quickly switch between different test scenarios (such as different temperatures and different charge / discharge conditions) by modifying the calibrated parameters in the Excel spreadsheet, without waiting for the software to be recompiled, significantly improving testing efficiency.

[0032] Example 2 This embodiment provides a rapid iteration system for the software of a new energy vehicle battery management system. This system employs the method described in Embodiment 1 to achieve rapid software iteration. The system includes: A parameter storage module is used to store key parameters in a calibrated form in an external parameter configuration file, preferably an Excel file. The parameter reading and updating module is used to read parameters from an external parameter configuration file by calling an interface (such as a MATLAB file reading function) and update them to the parameter management module. The parameter mapping module is used to map the parameters in the parameter management module to calibrated values. It is preferred to complete the mapping in the AUTOSAR development environment. The model execution module is used to obtain parameters from the parameter management module during runtime to execute battery management control.

[0033] The modules work collaboratively. When parameters need to be adjusted, only the external parameter configuration file needs to be modified. The parameter reading and updating module, the parameter mapping module, and the model running module work together to achieve rapid iteration. The specific implementation details of this system correspond to the method described in Example 1, and will not be repeated here.

[0034] For those skilled in the art, various improvements and modifications can be made without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention.

Claims

1. A method for rapid iteration of software for a new energy vehicle on-board battery management system, characterized in that, Includes the following steps: S101. Separate the key parameters that need to be dynamically adjusted in the battery management system software from the program code and store them in an Excel parameter configuration table in the form of standardized quantities; S102. Software engineers or system engineers edit key parameters in the Excel parameter configuration table according to requirements and save it. S103. When the MATLAB calling module starts, it automatically reads the parameters in the Excel parameter configuration table and updates the read parameters to the data dictionary of the MATLAB / Simulink model. S104. In the AUTOSAR component designer of MATLAB / Simulink, open the code mapping interface, select ConstantMemory storage type for the parameters in the model workspace in the "Mapped To" column, set the SwAddrMethod property to EEPROM or FLASH, and set the calibration access permission to calibrate. S105. Use Embedded Coder to generate code. The generated files include an ARXML file containing a description of ConstantMemory and C code with parameters declared as const and marked with attribute comments. S106. Import the generated ARXML file and ELF / HEX file into an external calibration tool, which recognizes the parameters as calibration parameters; S107. The battery management system model obtains parameters from the data dictionary to perform battery management calculations and control. During operation, the calibration parameter values ​​are modified in real time using an external calibration tool, and MATLAB calls modules to update the corresponding parameters in the data dictionary. S108. Test engineers can quickly perform tests in different scenarios by modifying calibrated parameters without recompiling and deploying software code.

2. The rapid iteration method for new energy vehicle battery management system software according to claim 1, characterized in that, The Excel parameter configuration table must include at least the fields for parameter name, parameter value, unit, data type, and calibration method.

3. The rapid iteration method for new energy vehicle battery management system software according to claim 1, characterized in that, The MATLAB calling module uses the readtable or xlsread function to read Excel files, stores the read parameters into MATLAB data structures, and writes the parameters into the model workspace using the assignin function.

4. The rapid iteration method for new energy vehicle on-board battery management system software according to claim 1, characterized in that, In the parameter mapping step, in the AUTOSAR component designer of MATLAB / Simulink, the parameters in the model workspace are selected as ConstantMemory in the "Mapped To" column of the code mapping interface, and the SwAddrMethod property is set to EEPROM or FLASH, and the calibration access permission is set to calibrable.

5. The rapid iteration method for new energy vehicle battery management system software according to claim 1, characterized in that, In the dynamic update step, the external calibration tool communicates with the battery management system via the XCP protocol to modify the calibration parameter values ​​in real time.

6. A new energy vehicle on-board battery management system employing the method described in any one of claims 1-5, characterized in that, include: A parameter storage module is used to store key parameters in a calibrated form in an external parameter configuration file, preferably an Excel file. The parameter reading and updating module is used to read parameters from an external parameter configuration file by calling an interface and update them to the parameter management module. The parameter mapping module is used to map the parameters in the parameter management module to calibrated values. It is preferred to complete the mapping in the AUTOSAR development environment. The model execution module is used to obtain parameters from the parameter management module and execute battery management control at runtime; The modules work together, and when parameters need to be adjusted, only the external parameter configuration file needs to be modified. The parameter reading and updating module, the parameter mapping module, and the model running module work together to achieve rapid iteration.

7. The new energy vehicle battery management system according to claim 6, characterized in that, The MATLAB calling module reads the Excel parameter configuration table through the readtable function, stores the read parameters as a structure or table, and writes the parameters to the model workspace through the assignin function.

8. The new energy vehicle battery management system according to claim 6, characterized in that, The parameters in the model data dictionary module are mapped to the ConstantMemory storage type under the AUTOSAR architecture during code generation, and the parameters are declared as const type variables with calibration attributes in the generated C code.

9. The new energy vehicle battery management system according to claim 6, characterized in that, The key parameters in the Excel parameter configuration table include one or more of the following: battery voltage threshold, current threshold, temperature threshold, SOC calculation parameters, fault diagnosis threshold, charge / discharge control parameters, and equalization control parameters.

10. The new energy vehicle battery management system according to claim 6, characterized in that, The calibration tool interface module supports the XCP protocol and communicates with CANape or INCA calibration tools to enable real-time parameter modification.