A distributed BMS slave unit parameter calibration method and system and a storage medium
By using a distributed BMS slave unit parameter calibration method, which utilizes a CAN bus and memory to store parameter information, the problems of low parameter calibration efficiency and insufficient reliability in existing technologies are solved, achieving efficient and stable parameter calibration and slave unit adaptation to battery packs of different vehicle models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN XINGBIDA NETLINK TECH CO LTD
- Filing Date
- 2023-07-12
- Publication Date
- 2026-06-26
AI Technical Summary
Existing BMS slave control unit parameter calibration is inefficient and cannot guarantee parameter reliability and slave control unit stability, and is not compatible with different battery pack models.
The distributed BMS slave unit parameter calibration method utilizes CAN bus communication and memory to store parameter information, slave unit address and its check code to achieve parameter verification and calibration. I2C communication and GPIO interface are used for address acquisition, reducing repeated calibration and improving parameter calibration efficiency and stability.
It improves the efficiency of parameter calibration, ensures the reliability of parameters and the stability of the slave control unit, realizes the platformization of slave control software, and adapts to battery packs of different vehicle models.
Smart Images

Figure CN116700222B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parameter calibration technology, and more specifically, to a method, system, and storage medium for calibrating parameters of a distributed BMS slave control unit. Background Technology
[0002] The energy revolution has driven the transformation from traditional fuel vehicles to new energy vehicles, with new energy technologies gradually becoming mainstream in the market. The three core technologies of electric vehicles (battery, motor, and electronic control system) have become new core automotive technologies. Benefiting from stringent emission regulations and supportive policies for new energy vehicles, electric vehicles powered by onboard electricity and driven by electric motors have developed rapidly.
[0003] As a crucial component of electric vehicles, the power battery pack relies heavily on the slave control function of the Battery Management System (BMS) for real-time monitoring of its status. Due to varying application scenarios and user needs, different manufacturers have developed multiple models of on-board battery packs, resulting in differences in the distribution and channel design of the BMS slave control units. To cope with fierce market competition, ensuring the compatibility of BMS slave control units with different battery pack models, reducing R&D costs, and improving product stability have become urgent issues. Currently, the parameter calibration efficiency of BMS slave control units is low, and the parameter calibration methods cannot guarantee the reliability of parameters and the stability of the slave control units. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention provides a method, system, and storage medium for calibrating parameters of a distributed BMS slave control unit, which improves the efficiency of BMS slave control unit parameter calibration, ensures parameter reliability, and thus enhances the stability of the slave control unit.
[0005] The primary objective of this invention is to solve the aforementioned technical problems. The technical solution of this invention is as follows:
[0006] The first aspect of this invention provides a method for calibrating parameters of a distributed BMS slave control unit, comprising the following steps:
[0007] S1: The slave control unit calculates the parameter check code based on the currently configured parameter data and sends the check code to the CAN bus at a first duration period;
[0008] S2: Determine the type of the received instruction, and perform sampling or parameter calibration according to the instruction type;
[0009] S3: If the received instruction is a parameter calibration instruction, stop sending the parameter verification code and obtain the address of the slave control unit through the first interface to perform parameter calibration;
[0010] S4: After parameter calibration is completed, write all parameter information, slave control unit address and its corresponding check code into memory;
[0011] S5: Determine whether a reset command has been received. If a reset command is received, reset and restart. Read the parameter information, slave address and its corresponding check code from the memory through the first communication method, perform parameter verification, and then execute step S1.
[0012] Furthermore, if the received instruction is a sampling instruction, then the sending of parameter check codes will stop, voltage and temperature sampling will be performed, and normal operation will begin.
[0013] Furthermore, in step S3, the address of the slave control unit is obtained through the first interface, and parameter calibration is performed. Specifically, when parameter calibration information is received, the target address is first determined. If the address of the slave control unit matches the target address in the parameter calibration information, calibration is performed according to the received parameter information, and a message frame is replied to indicate that the parameter calibration information has been received. If the target address does not match, the parameter information is discarded. When the parameter calibration completion instruction is received, step S4 is executed.
[0014] Furthermore, in steps S3-S4, the slave control unit performs a calibration command timeout check. If no calibration command message is received for a second consecutive time period, the process returns to step S1.
[0015] Furthermore, a parameter verification process is included before step S1, specifically as follows:
[0016] After the slave unit is powered on, it reads the parameter information, slave address, and parameter check code from the memory through the first communication method. Then, it calculates the check code using the slave address and parameter information and compares it with the read parameter check code. If the match is successful, the parameters are configured using the read parameters and slave address. If the match fails, it indicates that the memory parameter check has failed. Then, the parameters are configured using the slave address and default parameters obtained through the first interface. After the parameter configuration is completed, the parameters are calibrated, and the parameter check code is sent at a period of the first duration.
[0017] Furthermore, the first interface is a GPIO interface.
[0018] Furthermore, the first communication method is I2C communication.
[0019] A second aspect of the present invention provides a distributed BMS slave control unit parameter calibration system, the system comprising: a memory and a processor, wherein the memory includes a distributed BMS slave control unit parameter calibration method program, and the distributed BMS slave control unit parameter calibration method program, when executed by the processor, performs the following steps:
[0020] S1: The slave control unit calculates the parameter check code based on the currently configured parameter data and sends the check code to the CAN bus at a first duration period;
[0021] S2: Determine the type of the received instruction, and perform sampling or parameter calibration according to the instruction type;
[0022] S3: If the received instruction is a parameter calibration instruction, stop sending the parameter verification code and obtain the address of the slave control unit through the first interface to perform parameter calibration;
[0023] S4: After parameter calibration is completed, write all parameter information, slave control unit address and its corresponding check code into memory;
[0024] S5: Determine whether a reset command has been received. If a reset command is received, reset and restart. Read the parameter information, slave address and its corresponding check code from the memory through the first communication method, perform parameter verification, and then execute step S1.
[0025] Furthermore, if the received instruction is a sampling instruction, then the sending of parameter check codes will stop, voltage and temperature sampling will be performed, and normal operation will begin.
[0026] A third aspect of the present invention provides a computer-readable storage medium including a distributed BMS slave control unit parameter calibration method program. When the distributed BMS slave control unit parameter calibration method program is executed by a processor, it implements the steps of the distributed BMS slave control unit parameter calibration method.
[0027] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0028] This invention stores parameter information, slave control unit address, and corresponding parameter check code in a memory, reducing unnecessary recalibration times and improving parameter calibration efficiency without changing the parameters. This invention reads the slave control unit address from the memory through a first communication method, which ensures parameter reliability and improves the stability of the slave control unit compared to reading from the interface pin. Attached Figure Description
[0029] Figure 1 A flowchart of a distributed BMS slave control unit parameter calibration method provided in an embodiment of the present invention.
[0030] Figure 2 This is a schematic diagram illustrating the communication methods of various components within a BMS system provided in an embodiment of the present invention.
[0031] Figure 3 The following is a flowchart of the slave control unit state provided in an embodiment of the present invention.
[0032] Figure 4 This is a block diagram of a distributed BMS slave control unit parameter calibration system provided in an embodiment of the present invention. Detailed Implementation
[0033] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0034] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0035] Example 1
[0036] like Figure 1 As shown, the first aspect of the present invention provides a method for calibrating parameters of a distributed BMS slave control unit, comprising the following steps:
[0037] S1: The slave control unit calculates the parameter check code based on the currently configured parameter data and sends the check code to the CAN bus at a first duration period;
[0038] It should be noted that, as Figure 2 The diagram shows the communication methods of various components within a BMS system. This invention is applicable to the parameter calibration of slave control units in a distributed BMS.
[0039] like Figure 3 As shown, before parameter calibration in this invention, parameter verification is performed first. Specifically, this includes: after the slave control unit is powered on, it reads the parameter information, slave control address, and parameter verification code from the memory through a first communication method. Then, it calculates the verification code using the slave control address and parameter information and compares it with the read parameter verification code. If the match is successful, the parameters are configured using the read parameters and slave control address. If the match fails, it indicates that the memory parameter verification has failed. Then, the parameters are configured using the slave control address and default parameters obtained through the first interface. After the parameter configuration is completed, parameter calibration is performed, and the parameter verification code is sent periodically with a first duration.
[0040] In one specific embodiment, the first communication method is I2C communication, the memory is EEPROM, and the first interface is GPIO interface. For battery packs of the same vehicle model, the design of the ADC conversion channel of the slave control unit is already fixed. Therefore, after the first calibration and writing the parameters into the EEPROM for storage, the slave control unit can directly obtain the parameters applicable to the battery pack of that vehicle model from the EEPROM each time it is powered on, without having to repeat the calibration. This greatly improves the efficiency of parameter calibration and thus enhances the stability of the slave control unit.
[0041] It should be noted that because the size of the battery pack and the design layout of the cells are different in different car models, slave control units with different numbers of ADC conversion channels are generated. In order to realize the platformization of slave control software and unify the slave control software program, this invention uses a pre-defined parameter calibration protocol and CAN bus communication to calibrate the number of ADC conversion channels of each slave control unit to make it suitable for different car models.
[0042] This invention transmits calibration information via CAN bus communication, enabling calibration of various slave controllers using different ADC conversion channels. This allows a single slave controller program to be adapted to battery packs in different vehicle models, achieving a slave controller software platform and improving development efficiency.
[0043] In one specific embodiment, the slave control unit calculates the parameter check code based on the currently configured parameter data and sends the check code to the CAN bus at a period of 50ms.
[0044] S2: Determine the type of the received instruction, and perform sampling or parameter calibration according to the instruction type;
[0045] In one specific embodiment, after the slave control unit sends the verification code, it receives instructions from the master control unit or the host computer, determines the type of the received instructions, and performs sampling or parameter calibration according to the type of instructions.
[0046] If the received instruction is a sampling instruction, then stop sending parameter verification codes, perform voltage and temperature sampling, and enter normal working state.
[0047] It should be noted that in this invention, the slave control unit autonomously controls the addressing method, which is independent of other controllers. Therefore, the unit that sends the calibration command can be either the master control unit of the BMS or the host computer. As long as the slave control calibration steps are followed, the parameter calibration can be completed through the CAN bus.
[0048] S3: If the received instruction is a parameter calibration instruction, stop sending the parameter verification code and obtain the address of the slave control unit through the first interface to perform parameter calibration;
[0049] Specifically, when parameter calibration information is received, the target address is first determined. If the slave unit address matches the target address in the parameter calibration information, calibration is performed based on the received parameter information, and a message frame is replied to confirm receipt of the parameter calibration information. If the target address does not match, the parameter information is discarded. When the parameter calibration completion instruction is received, step S4 is executed.
[0050] S4: After parameter calibration is completed, write all parameter information, slave control unit address and its corresponding check code into memory;
[0051] S5: Determine whether a reset command has been received. If a reset command is received, reset and restart. Read the parameter information, slave address and its corresponding check code from the memory through the first communication method, perform parameter verification, and then execute step S1.
[0052] It should be noted that in steps S3-S4, the slave control unit performs a calibration command timeout check. If no calibration command message is received for a second consecutive time period, for example, no calibration command message is received for 3 consecutive seconds, then the process returns to step S1.
[0053] like Figure 4 As shown, a second aspect of the present invention provides a distributed BMS slave control unit parameter calibration system. The system includes a memory 41 and a processor 42. The memory includes a distributed BMS slave control unit parameter calibration method program. When the processor executes the distributed BMS slave control unit parameter calibration method program, it performs the following steps:
[0054] S1: The slave control unit calculates the parameter check code based on the currently configured parameter data and sends the check code to the CAN bus at a first duration period;
[0055] It should be noted that, as Figure 2 The diagram shows the communication methods of various components within a BMS system. This invention is applicable to the parameter calibration of slave control units in a distributed BMS.
[0056] like Figure 3 As shown, before parameter calibration in this invention, parameter verification is performed first. Specifically, this includes: after the slave control unit is powered on, it reads the parameter information, slave control address, and parameter verification code from the memory through a first communication method. Then, it calculates the verification code using the slave control address and parameter information and compares it with the read parameter verification code. If the match is successful, the parameters are configured using the read parameters and slave control address. If the match fails, it indicates that the memory parameter verification has failed. Then, the parameters are configured using the slave control address and default parameters obtained through the first interface. After the parameter configuration is completed, parameter calibration is performed, and the parameter verification code is sent periodically with a first duration.
[0057] In one specific embodiment, the first communication method is I2C communication, the memory is EEPROM, and the first interface is GPIO interface. For battery packs of the same vehicle model, the design of the ADC conversion channel of the slave control unit is already fixed. Therefore, after the first calibration and writing the parameters into the EEPROM for storage, the slave control unit can directly obtain the parameters applicable to the battery pack of that vehicle model from the EEPROM each time it is powered on, without having to repeat the calibration. This greatly improves the efficiency of parameter calibration and thus enhances the stability of the slave control unit.
[0058] It should be noted that because the size of the battery pack and the design layout of the cells are different in different car models, slave control units with different numbers of ADC conversion channels are generated. In order to realize the platformization of slave control software and unify the slave control software program, this invention uses a pre-defined parameter calibration protocol and CAN bus communication to calibrate the number of ADC conversion channels of each slave control unit to make it suitable for different car models.
[0059] This invention transmits calibration information via CAN bus communication, enabling calibration of various slave controllers using different ADC conversion channels. This allows a single slave controller program to be adapted to battery packs in different vehicle models, achieving a slave controller software platform and improving development efficiency.
[0060] In one specific embodiment, the slave control unit calculates the parameter check code based on the currently configured parameter data and sends the check code to the CAN bus at a period of 50ms.
[0061] S2: Determine the type of the received instruction, and perform sampling or parameter calibration according to the instruction type;
[0062] In one specific embodiment, after the slave control unit sends the verification code, it receives instructions from the master control unit or the host computer, determines the type of the received instructions, and performs sampling or parameter calibration according to the type of instructions.
[0063] If the received instruction is a sampling instruction, then stop sending parameter verification codes, perform voltage and temperature sampling, and enter normal working state.
[0064] It should be noted that in this invention, the slave control unit autonomously controls the addressing method, which is independent of other controllers. Therefore, the unit that sends the calibration command can be either the master control unit of the BMS or the host computer. As long as the slave control calibration steps are followed, the parameter calibration can be completed through the CAN bus.
[0065] S3: If the received instruction is a parameter calibration instruction, stop sending the parameter verification code and obtain the address of the slave control unit through the first interface to perform parameter calibration;
[0066] Specifically, when parameter calibration information is received, the target address is first determined. If the slave unit address matches the target address in the parameter calibration information, calibration is performed based on the received parameter information, and a message frame is replied to confirm receipt of the parameter calibration information. If the target address does not match, the parameter information is discarded. When the parameter calibration completion instruction is received, step S4 is executed.
[0067] S4: After parameter calibration is completed, write all parameter information, slave control unit address and its corresponding check code into memory;
[0068] S5: Determine whether a reset command has been received. If a reset command is received, reset and restart. Read the parameter information, slave address and its corresponding check code from the memory through the first communication method, perform parameter verification, and then execute step S1.
[0069] It should be noted that in steps S3-S4, the slave control unit performs a calibration command timeout check. If no calibration command message is received for a second consecutive time period, for example, no calibration command message is received for 3 consecutive seconds, then the process returns to step S1.
[0070] A third aspect of the present invention provides a computer-readable storage medium including a distributed BMS slave control unit parameter calibration method program. When the distributed BMS slave control unit parameter calibration method program is executed by a processor, it implements the steps of the distributed BMS slave control unit parameter calibration method.
[0071] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0072] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0073] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0074] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
Claims
1. A method for calibrating parameters of a distributed BMS slave control unit, characterized in that, Includes the following steps: Parameter verification: After the slave control unit is powered on, it reads the parameter information, slave control address and parameter verification code from the memory via I2C communication. Then, it calculates the verification code using the slave control address and parameter information and compares it with the read parameter verification code. If the match is successful, the parameters are configured using the read parameters and slave control address. If the match fails, it means that the memory parameter verification has failed. Then, the parameters are configured using the slave control address and default parameters obtained through the GPIO interface. S1: The slave control unit calculates the parameter check code based on the currently configured parameter data and sends the parameter check code calculated based on the currently configured parameter data to the CAN bus at a first time interval. S2: Determine the type of the received instruction, and perform sampling or parameter calibration according to the instruction type; S3: If the received instruction is a parameter calibration instruction, stop sending the parameter check code calculated based on the currently configured parameter data and obtain the address of the slave control unit through the GPIO interface to perform parameter calibration; S4: After parameter calibration is completed, write all parameter information, slave control unit address and its corresponding check code into memory; S5: Determine whether a reset command has been received. If a reset command is received, reset and restart. Read the parameter information, slave address and its corresponding check code from the memory via I2C communication, perform parameter verification, and then execute step S1.
2. The method for calibrating parameters of a distributed BMS slave control unit according to claim 1, characterized in that, If the received instruction is a sampling instruction, then stop sending the parameter check code calculated based on the currently configured parameter data, perform voltage and temperature sampling, and enter normal working state.
3. The method for calibrating parameters of a distributed BMS slave control unit according to claim 1, characterized in that, In step S3, the address of the slave control unit is obtained through the GPIO interface, and parameter calibration is performed. Specifically, when parameter calibration information is received, the target address is first determined. If the slave control unit address matches the target address in the parameter calibration information, calibration is performed according to the received parameter information, and a message frame is replied to indicate that the parameter calibration information has been received. If the target address does not match, the parameter information is discarded. When the parameter calibration completion instruction is received, step S4 is executed.
4. The method for calibrating parameters of a distributed BMS slave control unit according to claim 1, characterized in that, In steps S3-S4, the slave control unit performs a calibration command timeout check. If no calibration command message is received for a second consecutive time period, the process returns to step S1.
5. A distributed BMS slave control unit parameter calibration system, characterized in that, The system includes a memory and a processor. The memory includes a distributed BMS slave control unit parameter calibration method program. When the processor executes the distributed BMS slave control unit parameter calibration method program, it performs the following steps: Parameter verification: After the slave control unit is powered on, it reads the parameter information, slave control address and parameter verification code from the memory via I2C communication. Then, it calculates the verification code using the slave control address and parameter information and compares it with the read parameter verification code. If the match is successful, the parameters are configured using the read parameters and slave control address. If the match fails, it means that the memory parameter verification has failed. Then, the parameters are configured using the slave control address and default parameters obtained through the GPIO interface. S1: The slave control unit calculates the parameter check code based on the currently configured parameter data and sends the parameter check code calculated based on the currently configured parameter data to the CAN bus at a first time interval. S2: Determine the type of the received instruction, and perform sampling or parameter calibration according to the instruction type; S3: If the received instruction is a parameter calibration instruction, stop sending the parameter check code calculated based on the currently configured parameter data and obtain the address of the slave control unit through the first interface to perform parameter calibration; S4: After parameter calibration is completed, write all parameter information, slave control unit address and its corresponding check code into memory; S5: Determine whether a reset command has been received. If a reset command is received, reset and restart. Read the parameter information, slave address and its corresponding check code from the memory through the first communication method, perform parameter verification, and then execute step S1.
6. The distributed BMS slave control unit parameter calibration system according to claim 5, characterized in that, If the received instruction is a sampling instruction, then stop sending the parameter check code calculated based on the currently configured parameter data, perform voltage and temperature sampling, and enter normal working state.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a distributed BMS slave control unit parameter calibration method program. When the distributed BMS slave control unit parameter calibration method program is executed by a processor, it implements the steps of a distributed BMS slave control unit parameter calibration method as described in any one of claims 1 to 4.