Encoding method for battery management system, and related device

By using CAN bus and IO lines in BMS to realize closed-loop connection of the control board, and perform automatic encoding, the problem of encoding time consumed when the number of control boards of BMS is large and recoded is required for replacement of the control board, and the battery management system is improved coding efficiency and accuracy.

WO2024245010A1PCT designated stage expired Publication Date: 2024-12-05EVE ENERGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/093938
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2024-05-17
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

In BMS with distributed second and third-level architectures, encoding takes a long time when the number of BMS slave control boards is large, and re-encoding requires re-encoding, which can easily lead to encoding failure and affect the encoding efficiency of the battery management system.

Method used

Connect the main control board and slave control board through the CAN bus, use IO lines to achieve closed-loop connection, perform addressing detection and automated encoding, avoid repeated encoding and missing encoding, and use pre-configured encoding information and CRC verification algorithm to determine slave control board encoding .

Benefits of technology

It realizes automatic coding without pre-counting the number of slave control boards, improves the encoding efficiency of the battery management system, avoids missed encoding and recoding problems, and simplifies the encoding process of replacement from the control board.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024093938_05122024_PF_FP_ABST
    Figure CN2024093938_05122024_PF_FP_ABST
Patent Text Reader

Abstract

An encoding method for a battery management system. The method comprises: if slave control boards (102) are not addressed, a master control board (101) sending an encoding message to a first slave control board by means of a CAN bus (103), and acquiring a digital signal which is output by an IO line (104); if the digital signal is at a high level, the first slave control board receiving the encoding message, acquiring encoding information, and using same as a slave control code; and the master control board sending an encoding message to the next slave control board, and acquiring a slave control code of each slave control board, such that the encoding for all slave control boards is realized. By using the method, the problems of missing encoding and re-encoding are avoided, and the encoding efficiency for a battery management system is improved. Further disclosed is a related device.
Need to check novelty before this filing date? Find Prior Art

Description

Coding method and related equipment for battery management system

[0001] This application claims priority to Chinese patent applications filed with the China Patent Office on May 31, 2023, with application numbers 202310641208.0 and 202321375952.2. The entire contents of the above applications are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of battery technology, and in particular to a coding method and related equipment for a battery management system. Background Art

[0003] In a distributed two- or three-level BMS, the master and slave boards communicate via serial bus interfaces such as CAN and 485. In order for the BMS slave boards on the same bus to be recognized and distinguished by the BMS master board, different IDs need to be set to achieve encoding of the BMS slave boards.

[0004] In the related art, there are three main ways to encode the BMS slave control board. The first is to write the ID of each BMS slave control board through a compiler or a host computer to complete the encoding; the second is to set the dial code on the BMS slave control board, and complete the encoding by setting the dial code and entering the ID during factory or on-site assembly; the third is to count and set the number of slave boards during on-site assembly through the host computer or the master BMS, and complete the encoding through CAN communication and hard-wired digital signal transmission. SUMMARY OF THE INVENTION

[0005] However, these three methods have the following shortcomings: it takes a long time when there are a large number of BMS slave control boards; when replacing one of the BMS slave control boards, technicians need to re-encode the slave control board; the number of BMS slave control boards cannot be counted or the counting is incorrect, which can easily cause slave board encoding failure and affect the encoding efficiency of the battery management system encoding method.

[0006] In a first aspect, an embodiment of the present application provides an encoding method for a battery management system, wherein the battery management system includes a master control board and multiple slave control boards, the master control board and each slave control board are connected via a CAN bus, the multiple slave control boards are arranged in a certain order, and the master control board is connected to the first slave control board and the last slave control board of the multiple slave control boards via an IO line, and the previous slave control board and the next slave control board are connected via an IO line. The battery management system stores multiple pre-configured encoding information, and the method includes:

[0007] Perform addressing test on each slave control board and determine the test results;

[0008] When the detection result indicates that the slave control board is not addressed, the master control board sends a coded message to the first slave control board via the CAN bus and obtains the digital signal output by the IO line;

[0009] If the digital signal output by the IO line is at a high level, the first slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the first slave control board;

[0010] The first slave control board outputs the slave control board digital signal to the next slave control board through the IO line, and the master control board sends the coded message to the next slave control board through the CAN bus;

[0011] When the digital signal of the slave control board is detected to be high level, the next slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board;

[0012] Return to execution. When it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coded message and obtains the corresponding coding information. The coding information is determined as the slave control code of the next slave control board until the main control board receives the digital signal of the IO line at a high level, and obtains the slave control code corresponding to each slave control board.

[0013] In a second aspect, an embodiment of the present application provides an encoding device for a battery management system, the battery management system including a main control board and multiple slave control boards, the main control board and each slave control board are connected via a CAN bus, and the main control board is connected to the first slave control board and the last slave control board via an IO line, and the previous slave control board and the next slave control board are connected via an IO line. The battery management system stores multiple pre-configured encoding information, and the device includes:

[0014] The detection module is used to perform address detection on each slave control board and determine the detection result;

[0015] The first sending module is used for, when the detection result indicates that the slave control board is not addressed, the master control board to send a coded message to the first slave control board through the CAN bus and obtain the digital signal output by the IO line;

[0016] The receiving module is used to receive the coded message from the first slave control board if the digital signal output by the IO line is at a high level, obtain the corresponding coding information, and determine the coding information as the slave control code of the first slave control board;

[0017] The second sending module is used for the first slave control board to output the slave control board digital signal to the next slave control board through the IO line, and the main control board to send the coded message to the next slave control board through the CAN bus;

[0018] The determination module is used to, when it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board;

[0019] The acquisition module is used to return to execution. When it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coding message and obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board until the main control board receives the digital signal of the IO line as a high level, and obtains the slave control code corresponding to each slave control board.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0021] one or more processors;

[0022] Memory; and

[0023] One or more applications, wherein the one or more applications are stored in a memory and configured to be executed by a processor to implement the encoding method of the battery management system of any one of the first aspects.

[0024] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which is loaded by a processor to execute the encoding method of the battery management system of any one of the first aspects.

[0025] In the fifth aspect, an embodiment of the present application provides a battery management system, including: a BMS main control board and multiple BMS slave control boards, the multiple BMS slave control boards are arranged in a certain order, and the BMS main control board and the multiple BMS slave control boards are connected through a CAN bus; a hard-wired coding line, connected between the BMS main control board and the first BMS slave control board among the multiple BMS slave control boards, and connected between the BMS main control board and the last BMS slave control board among the multiple BMS slave control boards, and connected between the multiple BMS slave control boards; the BMS main control board is used to send a coded message to the BMS slave control board at the back end of the corresponding hard-wired coding line through the CAN bus when the digital signal received from the hard-wired coding line is high; the BMS slave control board is used to receive the coded message sent by the BMS main control board.

[0026] In a sixth aspect, an embodiment of the present application provides a vehicle comprising the battery management system of the fifth aspect. Beneficial effects

[0027] Beneficial effects of this application:

[0028] In an embodiment of the present application, the battery management system includes a main control board and multiple slave control boards. The main control board and each slave control board are connected through a CAN bus. The multiple slave control boards are arranged in a certain order, and the main control board is connected to the first slave control board and the last slave control board among the multiple slave control boards through an IO line, and the previous slave control board and the next slave control board are connected through an IO line, thereby realizing a closed-loop connection between the main control board and the slave control boards, without the need to pre-count the number of slave control boards; and by performing addressing detection on each slave control board, repeated encoding of the already addressed slave control boards is avoided; at the same time, the digital signal output by the IO line and the coded message of the CAN bus are analyzed and processed, thereby realizing automatic encoding of all slave control boards in the battery management system, without the need to count the number of slave control boards, avoiding the problems of missed encoding and re-encoding, and improving the coding efficiency of the battery management system. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIG1 is a flow chart of an embodiment of a coding method for a battery management system provided in an embodiment of the present application;

[0030] FIG2 is a schematic diagram of the architecture of a battery management system provided in an embodiment of the present application;

[0031] FIG3 is a schematic structural diagram of an embodiment of an electronic device provided in an embodiment of the present application;

[0032] FIG4 is a schematic diagram of the architecture of a battery management system provided in an embodiment of the present application;

[0033] FIG5 is a schematic diagram of the connection relationship of the battery management system provided in an embodiment of the present application. Modes for Carrying Out the Invention

[0034] As shown in Figure 1, it is a flow chart of an embodiment of the encoding method of the battery management system in the embodiment of the present application. The battery management system includes a main control board and multiple slave control boards. The main control board and each slave control board are connected through a CAN bus. The multiple slave control boards are arranged in a certain order, and the main control board is connected to the first slave control board and the last slave control board among the multiple slave control boards through an IO line. The previous slave control board and the next slave control board are connected through an IO line. The battery management system stores multiple pre-configured encoding information. The encoding method of the battery management system includes:

[0035] S101: Perform addressing detection on each slave control board and determine the detection result.

[0036] The battery management system in this embodiment includes a master control board 101 and multiple slave control boards 102. The master control board and each slave control board are connected via a CAN bus 103, which is used to implement communication between the master control board 101 and each slave control board 102, such as sending and receiving messages. The master control board 101 is connected to the first slave control board 102 and the last slave control board 102 via an IO line 104, which is used to implement the transmission of digital signals between the master control board 101 and the first slave control board 102, and between the last slave control board 102 and the master control board 101. The previous slave control board 102 and the next slave control board 102 are connected via an IO line 104, which is used to implement the transmission of digital signals between two adjacent slave control boards 102. As shown in Figure 2, which is a schematic diagram of the architecture of the battery management system, in this embodiment, a communication connection is implemented between the main control board 101 and each slave control board 102, and a closed-loop connection is implemented between the main control board 101 and each slave control board 102, so there is no need to pre-count the number of slave control boards 102, which is conducive to improving the efficiency of encoding the slave control boards.

[0037] The battery management system stores multiple pre-configured coding information, which is pre-configured information used to encode the slave control board. For example, the coding information can be an identifier, such as characters, numbers, or a combination of characters and numbers. For example, the configuration information can be a board number, such as 1, 2, 3,...1000, etc. The pre-configured coding information can be stored in the storage module of the battery management system.

[0038] Address detection refers to the process of determining whether the current slave board has been encoded, which is used to avoid repeated encoding of the slave board and reduce encoding efficiency.

[0039] Specifically, the message sent or received by the battery management system can be compared with the parameter information stored in the EEPROM (Electrically Erasable Programmable Read-Only Memory) of the slave control board, and the detection result can be determined based on the comparison result to achieve efficient addressing detection of the slave control board.

[0040] Performing addressing detection on each slave control board to obtain a detection result, including: configuring the corresponding slave control message according to the internal parameters of each slave control board; performing CRC check on the slave control message to obtain a first check value; obtaining the master control message received by the master control board, performing CRC check on the master control message to obtain a second check value; comparing the first check value with the second check value to determine the detection result.

[0041] A cyclic redundancy check (CRC) is an algorithm that performs a checksum calculation on a message frame. In this embodiment, the CRC8 algorithm is selected. The resulting CRC checksum is 1 byte long and its generator polynomial is g(x) = x^8 + x^5 + x^4 + 1, which is equivalent to g(x) = 1·x^8 + 0·x^7 + 0·x^6 + 1·x^5 + 1·x^4 + 0·x^3 + 0·x^2 + 0·x^1 + 1·x^0. The corresponding binary number is 100110001.

[0042] The first check value refers to the check value after the slave control board performs a cyclic redundancy check on the slave control message after configuring its own internal parameters. The second check value refers to the check value after the master control board performs a cyclic redundancy check on the received master control message. It should be noted that the first check value and the second check value use the same cyclic redundancy check algorithm, for example, the CRC8 check algorithm.

[0043] Specifically, after receiving the address detection message, the slave control board reads its own internal parameters and configures the slave control message according to the internal parameters. For example, the internal parameters can be used as the slave control message. The slave control board performs a CRC check on the slave control message to obtain a first check value. At the same time, the master control board performs a CRC check on the received master control message to obtain a second check value. By comparing the first check value with the second check value, the first check value calculated by the slave control board itself is compared with the second check value calculated by the master control board for the corresponding slave control board, and the address detection of the slave control board is performed according to the comparison result. It can be understood that in this embodiment, by comparing the CRC check value calculated by the slave control board itself with the CRC check value calculated by the master control board for the corresponding slave control board, the high efficiency of the CRC check calculation is utilized to improve the efficiency of address detection.

[0044] In one specific embodiment, after the battery management system is powered on and initialized, the digital interfaces of the master and slave control boards are initialized to a low level, and each slave control board enters a silent state. The master control board sends a frame of message for verification (e.g., FlowControlReq = 0xAA in 0x0801FF00) to the slave control board at a preset period (e.g., 50ms). The slave control boards each read internal parameters and perform a CRC8 calculation. The standard CRC8 generator polynomial used is x^8+x^5+x^4+1. After each slave control board calculates its own CRC, it periodically returns a frame of CRC calculation results, i.e., a first checksum value (e.g., CfgResp_Type = 1, CfgResp_Crc = CRC8) to the master and slave boards at a 50ms periodicity. The master and slave boards sequentially compare the first checksum returned by each slave control board with the second checksum value obtained by performing a CRC8 calculation on the received master control message to determine whether the slave control board is addressed.

[0045] The first check value is compared with the second check value to determine a test result, including: if the first check value is consistent with the second check value, the test result indicates that the slave control board has been addressed; if the first check value is inconsistent with the second check value, the test result indicates that the slave control board has not been addressed.

[0046] Specifically, when the first check value and the second check value are consistent, it indicates that the CRC check value calculated by the slave control board for itself is the same as the CRC check value calculated by the master control board for the corresponding slave control board. Therefore, it is determined that the slave control board has been addressed and no encoding is required. At this time, the master control board directly sends a periodic operation broadcast (for example, FlowControlReq=0x55 in 0x0801FF00, which is continuously sent for 2 seconds and then stopped), and the battery management system enters normal operation. When the first check value and the second check value are inconsistent, it indicates that one of the first check values ​​calculated by the slave control board for itself is different from the CRC check value calculated by the master control board for the corresponding slave control board, which means that at least one slave control board is not encoded. Therefore, it is determined that the slave control board is not addressed. In this case, the slave control board needs to be addressed to implement the encoding processing of the slave control board.

[0047] Before configuring the corresponding slave control message according to the internal parameters of each slave control board, the method further includes: sending a verification message to the slave control board in a broadcasting form according to a preset period.

[0048] The verification message is an instruction for verifying the relevant information of the slave control board, such as the board number, internal parameters, etc.

[0049] Specifically, the battery management system periodically sends verification messages to the slave control board at a preset period. The verification messages are in broadcast form, so that each slave control board receives the verification message, avoids missed reception, ensures the verification of relevant information of each slave control board, and thus improves the addressing detection efficiency of the slave control board.

[0050] Before configuring the corresponding slave control messages according to the internal parameters of each slave control board, the method further includes: writing configuration parameters to each slave control board; and determining encoding information corresponding to the slave control board according to the configuration parameters.

[0051] The configuration parameters are parameters written to each slave board. The configuration parameters can be the board number, such as 1, 2, 3, etc., or the number of channels, or a combination of the board number and the number of channels. There is no restriction here.

[0052] Specifically, the battery management system writes configuration parameters to the slave board and then processes the configuration parameters. The configuration parameters may be used as encoding information, or the configuration parameters may be transformed. For example, a constant value is added to the encoding parameters of each slave board to serve as the encoding information. It will be understood that in this embodiment, by writing configuration parameters to each slave board and determining the encoding information based on the configuration parameters, since each slave board has different configuration information, the written configuration parameters are different. Determining the encoding information based on the configuration parameters ensures the uniqueness of the encoding information.

[0053] S102: When the detection result indicates that the slave control board is not addressed, the master control board sends a coded message to the first slave control board via the CAN bus, and obtains a digital signal output by the IO line.

[0054] The coded message refers to an instruction for encoding the slave control board.

[0055] Specifically, when the slave control board is not addressed, it needs to be coded. Therefore, the master control board sends a coded message to the first slave control board via the CAN bus and obtains the digital signal output by the IO line.

[0056] When the detection result indicates that the slave control board is not addressed, the main control board sends a coded message to the first slave control board through the CAN bus and obtains the digital signal output by the IO line, and further includes: stopping sending the verification message and setting the digital signal of the IO line of the main control board to a high level.

[0057] Specifically, when it is determined that the slave control board is not addressed, the slave control board needs to be encoded. Therefore, there is no need to verify the relevant information of the slave control board, so the sending of the verification message is stopped, and the digital signal of the IO line of the main control board is set to a high level to trigger the encoding instruction of the slave control board, thereby improving the encoding efficiency.

[0058] S103: If the digital signal output by the IO line is at a high level, the first slave control board receives the coding message, obtains corresponding coding information, and determines the coding information as the slave control code of the first slave control board.

[0059] The slave control code refers to the code of the slave control board, which is used as an identifier to distinguish the slave control boards.

[0060] Specifically, when the digital signal output by the IO line is at a high level, the main control board can output the high level (digital signal represented by 1) through the IO line to the first slave control board and send the coded message through the CAN bus. When the first slave control board receives the IO line output high level 1 and it is valid, it receives the coded message and obtains a coding information from the battery management system. It uses the changed coding information as the slave control code of the first slave control board, thereby realizing the coding of the first slave control board.

[0061] In a specific embodiment, the IO line outputs a high level to the first slave control board connected to it, and sends a coded message to the first slave control board. When the first slave control board connected to the IO line of the main control board detects that its IO line is at a high level, it enters the waiting state, receives the coded message sent by the main control board, obtains the coding information, and stores the coding information in the internal EEPROM, and returns a configuration completion mark (such as: CfgResp_Type=2) to the main control board. At the same time, the IO line connected to the first slave control board is set to output a high level to the next slave control board, and the coding configuration of the first slave control board is completed.

[0062] S104: The first slave control board outputs a slave control board digital signal to the next slave control board via the IO line, and the master control board sends a coded message to the next slave control board via the CAN bus.

[0063] Specifically, after the first slave control board completes encoding, the first slave control board outputs a digital signal to the next slave control board (such as the second slave control board) through the IO line, and the main control board sends an encoding message through the CAN bus to implement encoding processing for the second slave control board.

[0064] In a specific implementation, after receiving the configuration completion mark of the first slave control board, the master control board sends the coded message of the next slave control board.

[0065] S105 , when it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coding message, obtains corresponding coding information, and determines the coding information as the slave control code of the next slave control board.

[0066] Specifically, when the digital signal received by the slave control board is high level 1, the next slave control board receives the coded message and obtains a coding information from the battery management system, and uses the coding information as the slave control code of the next slave control board, thereby completing the coding of the next slave control board.

[0067] In a specific embodiment, the next slave control board enters the configuration process, receives the coding information and stores it in the internal EEPROM, and returns a configuration completion mark (CfgResp_Type=2) to the master control board. At the same time, the IO line connected to the next slave control board is set to output high voltage to the next slave control board, and the coding configuration of the next slave control board is completed.

[0068] S106, return to execution. When it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coded message and obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board until the master control board receives the digital signal of the IO line at a high level, and obtains the slave control code corresponding to each slave control board.

[0069] Specifically, after the coding configuration of the current slave control board is completed, the encoding of the next adjacent slave control board is continued. The coding of each slave control board can be achieved by repeating step S105 until the main control board receives the digital signal of the IO line as a high level, that is, the last slave control board outputs a high level 1 to the main control board through the IO line. When the main control board receives the digital signal of high level 1, it indicates that the coding configuration of the last slave control board is completed, that is, the coding processing of all slave control boards is achieved. It can be understood that in this embodiment, by analyzing and processing the digital signal output by the IO line and the coded message of the CAN bus, the automatic coding of all slave control boards in the battery management system is achieved. There is no need to count the number of slave control boards, which avoids the problems of missed coding and re-coding, and improves the coding efficiency of the battery management system.

[0070] In a specific embodiment, the configuration of the next slave control board is encoded in sequence according to the encoding method of step S105. When the last slave control board receives the encoding message and obtains the encoding information, it determines the encoding information as the corresponding slave control code, returns the configuration completion mark (such as: CfgResp_Type=2) and sends it to the main control board, and at the same time outputs the digital signal as a high level to the main control board, and the encoding of the last slave control board is completed.

[0071] After obtaining the slave control code corresponding to each slave control board, the method further includes: setting the digital signal of the IO line of the slave control board to a low level, and sending a normal communication message in the form of broadcasting.

[0072] Specifically, after all slave control boards are configured and coded, the digital signal of the IO line of the slave control board is set to a low level, and normal communication messages are sent in the form of broadcasts. All slave control boards receive broadcast frames of normal communication messages from the master control board, and the slave control boards switch from the silent state to the running state and send normal communication messages to enable the battery management system to operate normally.

[0073] If the slave control board does not receive the coded message within the preset time, it indicates that there is a fault in the slave control board.

[0074] Specifically, if the slave control board does not receive the encoding message within a preset time, such as within 2 seconds, it indicates that the current slave control board has a fault. The current slave control board can be inspected or replaced before continuing the encoding process to further improve the encoding efficiency of the battery management system.

[0075] In this embodiment, by analyzing and processing the digital signals output by the IO lines and the coded messages of the CAN bus, automatic coding of all slave control boards in the battery management system is achieved without counting the number of slave control boards, avoiding the problems of missed coding and re-coding, and improving the coding efficiency of the battery management system.

[0076] An embodiment of the present application further provides an electronic device that integrates the encoding device of any battery management system provided in the embodiment of the present application, and the electronic device includes:

[0077] one or more processors;

[0078] Memory; and

[0079] One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor in any one of the embodiments of the battery management system encoding method.

[0080] The present application also provides an electronic device that integrates the encoding device of any battery management system provided in the present application. As shown in Figure 3, it shows a schematic diagram of the structure of the electronic device involved in the present application embodiment. Specifically:

[0081] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that the electronic device structure shown in FIG3 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0082] The processor 301 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and lines. By running or executing software programs and / or modules stored in the memory 302 and accessing data stored in the memory 302, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 301.

[0083] Memory 302 can be used to store software programs and modules. Processor 301 executes various functional applications and data processing by running the software programs and modules stored in memory 302. Memory 302 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as sound playback or image playback); the data storage area may store data generated based on the use of the electronic device. Memory 302 may also include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 302 may also include a memory controller to provide processor 301 with access to memory 302.

[0084] The electronic device also includes a power supply 303 for supplying power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 303 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0085] The electronic device may further include an input unit 304, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0086] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302 to implement various functions as follows:

[0087] Perform addressing test on each slave control board and determine the test results;

[0088] When the detection result indicates that the slave control board is not addressed, the master control board sends a coded message to the first slave control board via the CAN bus and obtains the digital signal output by the IO line;

[0089] If the digital signal output by the IO line is at a high level, the first slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the first slave control board;

[0090] The first slave control board outputs the slave control board digital signal to the next slave control board through the IO line, and the master control board sends the coded message to the next slave control board through the CAN bus;

[0091] When the digital signal of the slave control board is detected to be high level, the next slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board;

[0092] Return to execution. When it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coded message and obtains the corresponding coding information. The coding information is determined as the slave control code of the next slave control board until the main control board receives the digital signal of the IO line at a high level, and obtains the slave control code corresponding to each slave control board.

[0093] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0094] To this end, embodiments of the present application provide a computer-readable storage medium, which may include a read-only memory (ROM), random access memory (RAM), a disk, or an optical disk. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of any of the battery management system encoding methods provided in embodiments of the present application. For example, the computer program loaded by the processor may execute the following steps:

[0095] Perform addressing test on each slave control board and determine the test results;

[0096] When the detection result indicates that the slave control board is not addressed, the master control board sends a coded message to the first slave control board via the CAN bus and obtains the digital signal output by the IO line;

[0097] If the digital signal output by the IO line is at a high level, the first slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the first slave control board;

[0098] The first slave control board outputs the slave control board digital signal to the next slave control board through the IO line, and the master control board sends the coded message to the next slave control board through the CAN bus;

[0099] When the digital signal of the slave control board is detected to be high level, the next slave control board receives the coding message, obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board;

[0100] Return to execution. When it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coded message and obtains the corresponding coding information. The coding information is determined as the slave control code of the next slave control board until the main control board receives the digital signal of the IO line at a high level, and obtains the slave control code corresponding to each slave control board.

[0101] The inventors have found through research that the battery management system of the related art is coded by technicians, and the battery management system has the following problems: ① It takes a long time when the number of BMS slave control boards is large; ② It is necessary to count the number of BMS slave control boards, which is prone to errors.

[0102] In order to solve the above problems, as shown in Figure 4, this embodiment provides a battery management system, including a BMS main control board 401 and multiple BMS slave control boards 402, and the multiple BMS slave control boards 402 are arranged in a certain order; the hard-wired coding line 404 is connected between the BMS main control board 401 and the first BMS slave control board 402 among the multiple BMS slave control boards, and is connected between the BMS main control board 401 and the last BMS slave control board 402 among the multiple BMS slave control boards, and is connected between the multiple BMS slave control boards 402; the BMS main control board 401 is used to send a coded message to the BMS slave control board 402 at the back end of the corresponding hard-wired coding line through the CAN bus 403 when the digital signal received from the hard-wired coding line 404 is high; the BMS slave control board 402 is used to receive the coded message sent by the BMS main control board 401.

[0103] The BMS master control board 401 and all the BMS slave control boards 402 are connected via a CAN bus 403 , so as to realize communication between the BMS master control board 401 and all the BMS slave control boards 402 .

[0104] The hard-wired coding line 404 is used to transmit digital signals between the BMS master control board 401 and the BMS slave control board 402 .

[0105] Specifically, the BMS master control board 401 is connected to the first BMS slave control board 402 via a hard-wired coding line 404, that is, the front end of the hard-wired coding line 404 is the BMS master control board 401, and the back end is the first BMS slave control board; the BMS slave control boards 402 are connected via a hard-wired coding line 404, that is, the front end of the hard-wired coding line 404 is the previous master control board 401, and the back end is the next BMS slave control board 402; the BMS master control board 401 is connected to the last BMS slave control board 402 via a hard-wired coding line 404, that is, the front end of the hard-wired coding line 404 is the last BMS slave control board 402, and the back end is the BMS master control board Board 401; such connection realizes a closed-loop connection between the BMS main control board and the BMS slave control board. The BMS main control board is used to send a coding message to the BMS slave control board at the back end of the corresponding hard-wired coding line through the CAN bus when the digital signal received from the hard-wired coding line is high. The BMS slave control board is used to receive the coding message sent by the BMS main control board, so that after the BMS main control board 401 sends the coding message to the last BMS slave control board 402, the coding of all BMS slave control boards 402 is automatically completed, thereby realizing the automatic coding of each BMS slave control board 402 by the BMS main control board 401.

[0106] The battery management system provided in this embodiment includes a BMS main control board 401 and multiple BMS slave control boards 402. The BMS main control board 401 and the multiple BMS slave control boards 402 are connected through a CAN bus 403, thereby realizing communication connection between the BMS main control board and the BMS slave control boards. The hard-wired coding line 404 is connected between the BMS main control board 401 and the first BMS slave control board 402 among the multiple BMS slave control boards, and is connected between the BMS main control board 401 and the last BMS slave control board among the multiple BMS slave control boards, and is connected between the multiple BMS slave control boards, thereby realizing communication between the BMS main control board and the BMS slave control boards. The BMS main control board is used to send a coding message to the BMS slave control board at the back end of the corresponding hard-wire coding line through the CAN bus when the digital signal received from the hard-wire coding line is high (the digital signal is 1). After the BMS main control board sends the coding message to the last BMS slave control board, it automatically completes the coding of all BMS slave control boards without counting the number of BMS slave control boards. In the case of replacing the BMS slave control board, coding can be automatically performed, which improves the board coding efficiency of the BMS slave control board. Through the mechanism of the hard-wire coding line, intelligent coding of all BMS slave control boards is realized.

[0107] In some embodiments, the BMS main control board includes a digital input interface and a digital output interface, and the BMS slave control board includes a digital input interface and a digital output interface; the digital output interface of the BMS main control board is connected to the digital input interface of the first BMS slave control board through a hard-wired coding line; the digital output interface of the previous BMS slave control board is connected to the digital input interface of the next BMS slave control board through a hard-wired coding line; the digital output interface of the last BMS slave control board is connected to the digital input interface of the BMS main control board through a hard-wired coding line.

[0108] Specifically, as shown in FIG5 , which is a schematic diagram of the connection relationship of the battery management system, the hard-wired coding line 404 includes a digital input interface DI1 and a digital output interface DO1, the BMS main control board 401 includes a digital input interface DI2 and a digital output interface DO2, and the BMS slave control board 402 includes a digital input interface DI3 and a digital output interface DO3. The digital output interface DI2 of the BMS main control board 401 is connected to the digital input interface DI3 of the first BMS slave control board 402 through the digital output interface DO2 of the hard-wired coding line 404, and the previous BMS slave control board 402 is connected to the digital input interface DI3 of the first BMS slave control board 402. The digital output interface DO3 of 02 is connected to the digital input interface DI3 of the next BMS slave control board 402 through the digital output interface DO1 of the hard-wired coding line 404. The digital output interface DO3 of the last BMS slave control board 402 is connected to the digital input interface DI2 of the BMS main control board 401 through the digital output interface DO1 of the hard-wired coding line 404. That is, the digital output interface DO3 of the BMS main control board 401 is connected to the digital input interface DI3 of the BMS slave control board 402 through the hard-wired coding line 404. The digital output interface DO3 of the first BMS slave control board 402 is connected to the digital input interface DI2 of the BMS main control board 401 through the hard-wired coding line 404. The digital output interface DO1 of the encoding line 404 is connected to the digital input interface DI3 of the second BMS slave control board 402. The digital output interface DO3 of the second BMS slave control board 402 is connected to the digital input interface DI3 of the third BMS slave control board 402 through the digital output interface DO1 of the hard-wire encoding line 404. And so on. The digital output interface DO3 of the last BMS slave control board 402 is connected to the digital input interface DI2 of the BMS master control board 401 through the digital output interface DO1 of the hard-wire encoding line 404. A closed-loop connection between the BMS main control board and the BMS slave control board is realized. When the BMS main control board receives a high-level digital signal from the hard-wired coding line, it sends a coding message to the BMS slave control board at the back end of the corresponding hard-wired coding line through the CAN bus, thereby realizing the coding of the BMS slave control board at the back end of the corresponding hard-wired coding line. In this way, there is no need to count the number of BMS slave control boards. Only through the digital input interface and digital output interface of the hard-wired coding line of this embodiment, based on the digital input signal, digital output signal and the message signal of the CAN bus, the intelligent coding of all BMS slave control boards is realized.

[0109] In one example, the process of the BMS master board encoding each BMS slave board is as follows: after the BMS master board starts the encoding process, it first outputs a high level to the first BMS slave board through the hard-wired encoding line, and sends the encoding message to the first BMS slave board through the CAN bus. When the first BMS slave board receives the digital signal of the hard-wired encoding line as high, it receives the encoding message and completes the encoding of the first BMS slave board. After the encoding of the first BMS slave board is completed, the first BMS slave board outputs a high level to the second BMS slave board through the hard-wired encoding line and sends the encoding message to the first BMS slave board through the CAN bus. The N bus sends a coding message to the second BMS slave control board. When the second BMS slave control board receives a high-level digital signal from the hard-wired coding line, it receives the coding message and completes the coding of the second BMS slave control board... and so on, until the coding of the last BMS slave control board is completed. After the coding of the last BMS slave control board is completed, the last BMS slave control board outputs a high level to the BMS main control board through the hard-wired coding line. When the BMS main control board receives a high-level digital signal from the hard-wired coding line, the coding process ends, thereby automatically completing the automatic coding of all BMS slave control boards.

[0110] In some embodiments, the BMS main control board is further configured to record the number of encoding messages and stop the encoding operation when the digital signal received from the digital input interface of the BMS main control board is at a high level.

[0111] Specifically, when the BMS main control board receives a high-level digital signal from the digital input interface of the BMS main control board, it indicates that the encoding of all BMS slave control boards has been completed. At this time, the number of encoding messages, that is, the number of BMS slave control boards, is recorded. At the same time, the BMS main control board stops the encoding operation, and the encoding process can be stopped, thereby realizing intelligent encoding of all BMS slave control boards.

[0112] In some embodiments, the BMS slave control board is used to receive the coded message sent by the BMS master control board.

[0113] Specifically, the BMS slave control board can complete its own automatic encoding after receiving the encoding message sent by the BMS master control board, thereby improving the encoding efficiency of the BMS slave control board.

[0114] In some embodiments, the BMS master control board is further configured to distinguish the BMS slave control boards according to the coded message received from each BMS slave control board.

[0115] Specifically, after each slave control board receives the coded message, it can complete its own encoding, thereby distinguishing the BMS slave control boards.

[0116] In some embodiments, the BMS master control board is further configured to send coded messages to the replaced BMS slave control board via the CAN bus when the BMS slave control board is replaced.

[0117] Specifically, for the replaced BMS slave control board, the BMS master control board can send a coding message to the replaced BMS slave control board via the CAN bus, thereby realizing automatic coding of the replaced BMS slave control board.

[0118] In some embodiments, the BMS slave control board is used to collect the voltage and / or temperature of the single battery cells.

[0119] Specifically, the BMS slave control board is used to collect the voltage and / or temperature of the single battery integrated on the BMS slave control board, and send the collected voltage and temperature of the single battery to the BMS master control board.

[0120] In some embodiments, the BMS master control board is also used to perform fault monitoring on the single cells in each BMS slave control board.

[0121] Specifically, the BMS main control board is further used to perform fault monitoring based on the voltage and / or temperature of the single battery in the BMS slave control board received, thereby improving the safety and reliability of the BMS.

[0122] This embodiment also provides a vehicle, which includes the above-mentioned battery management system, the battery management system includes a BMS main control board 401 and multiple BMS slave control boards 402, the BMS main control board 401 and multiple BMS slave control boards 402 are connected through a CAN bus 403, realizing the communication connection between the BMS main control board and the BMS slave control board, a hard-wired coding line 404, used to connect the BMS main control board 401 and the first BMS slave control board 402; and used to connect each BMS slave control board 402; and used to connect the BMS main control board 401 and the last BMS slave control board 402, realizing a closed-loop connection between the BMS main control board and the BMS slave control board, the BMS main control board 401 is used When the digital signal received from the hard-wire coding line 404 is at a high level, a coding message is sent to the BMS slave control board at the back end of the corresponding hard-wire coding line through the CAN bus; the BMS slave control board is used to receive the coding message sent by the BMS main control board, so that after the BMS main control board sends the coding message to the last BMS slave control board, it automatically completes the coding of all BMS slave control boards without having to count the number of BMS slave control boards. In the case of replacement of the BMS slave control board, coding can be automatically performed, thereby improving the board coding efficiency of the BMS slave control board. Through the mechanism of the hard-wire coding line, intelligent coding of all BMS slave control boards is realized, thereby improving the management efficiency of the battery management system.

Claims

1. A coding method for a battery management system, the battery management system comprising a main control board and a plurality of slave control boards, the main control board and each of the slave control boards are connected via a CAN bus, the plurality of slave control boards are arranged in a certain order, and the main control board is connected to the first slave control board and the last slave control board among the plurality of slave control boards via an IO line, the previous slave control board and the next slave control board are connected via the IO line, the battery management system stores a plurality of pre-configured coding information, the method comprising: Performing addressing detection on each slave control board to determine the detection result; When the detection result indicates that the slave control board is not addressed, the master control board sends a coded message to the first slave control board via the CAN bus, and obtains a digital signal output by the IO line; If the digital signal output by the IO line is at a high level, the first slave control board receives the coded message, obtains the corresponding coded information, and determines the coded information as the slave control code of the first slave control board; The first slave control board outputs a slave control board digital signal to the next slave control board through the IO line, and the master control board sends a coded message to the next slave control board through the CAN bus; When it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coded message, obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board; Return to execute the step of: when it is detected that the digital signal of the slave control board is at a high level, the next slave control board receives the coded message and obtains the corresponding coding information, and determines the coding information as the slave control code of the next slave control board, until the main control board receives the digital signal of the IO line as a high level, and obtains the slave control code corresponding to each slave control board.

2. The encoding method of the battery management system according to claim 1, wherein: The performing addressing detection on each slave control board and determining the detection result includes: Configure the corresponding slave control message according to the internal parameters of each slave control board; Performing a CRC check on the slave control message to obtain a first check value; Obtaining a main control message received by the main control board, performing a CRC check on the main control message, and obtaining a second check value; The first verification value is compared with the second verification value to determine the detection result.

3. The encoding method of the battery management system according to claim 2, wherein: The comparing the first check value with the second check value to determine the detection result includes: If the first check value is consistent with the second check value, it is determined that the detection result indicates that the slave control board has been addressed; If the first check value is inconsistent with the second check value, it is determined that the detection result indicates that the slave control board is not addressed.

4. The encoding method of the battery management system according to claim 2, before configuring the corresponding slave control message according to the internal parameters of each slave control board, further comprising: Writing configuration parameters to each of the slave control boards; The coding information corresponding to the slave control board is determined according to the configuration parameters.

5. The encoding method of the battery management system according to claim 2, before configuring the corresponding slave control message according to the internal parameters of each slave control board, further comprising: The verification message is sent to the slave control board in the form of broadcast according to a preset period.

6. The encoding method of the battery management system according to claim 5, when the detection result indicates that the slave control board is not addressed, the master control board sends a coded message to the first slave control board through the CAN bus and obtains the digital signal output by the IO line, further comprising: Stop sending the verification message, and set the digital signal of the IO line of the main control board to a high level.

7. The coding method for a battery management system according to any one of claims 1 to 6, further comprising, after obtaining the slave control code corresponding to each slave control board: The digital signal of the IO line of the slave control board is set to a low level, and a normal communication message is sent in the form of broadcast.

8. The encoding method for a battery management system according to any one of claims 1 to 6, further comprising: If the slave control board does not receive the coded message within the preset time, it is prompted that the slave control board is faulty.

9. An electronic device, comprising: one or more processors; Memory; as well as One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the processor to implement the encoding method of the battery management system according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the encoding method for a battery management system according to any one of claims 1 to 8.

11. A battery management system, comprising: A BMS main control board and multiple BMS slave control boards, the multiple BMS slave control boards are arranged in a certain order, and the BMS main control board is connected to the multiple BMS slave control boards via a CAN bus; A hard-wire encoding line connected between the BMS main control board and a first BMS slave control board among the plurality of BMS slave control boards, and connected between the BMS main control board and a last BMS slave control board among the plurality of BMS slave control boards, and connected between the plurality of BMS slave control boards; The BMS main control board is used to send a coded message to the BMS slave control board at the back end of the corresponding hard-wire coding line through the CAN bus when the digital signal received from the hard-wire coding line is at a high level; The BMS slave control board is used to receive the coded message sent by the BMS master control board.

12. The battery management system according to claim 11, wherein: The BMS master control board includes a digital input interface and a digital output interface, and the BMS slave control board includes a digital input interface and a digital output interface; The digital output interface of the BMS master control board is connected to the digital input interface of the first BMS slave control board through the hard-wired coding line; The digital output interface of the previous BMS slave control board is connected to the digital input interface of the next BMS slave control board through the hard-wired coding line; The digital output interface of the last BMS slave control board is connected to the digital input interface of the BMS master control board through the hard-wired coding line.

13. The battery management system according to claim 12, wherein: The BMS main control board is also used to record the number of the coded messages and stop the coding operation when the digital signal received from the digital input interface of the BMS main control board is at a high level.

14. The battery management system according to claim 11, wherein: The BMS master control board is further used to distinguish the BMS slave control boards according to the coded message received by each of the BMS slave control boards.

15. The battery management system according to claim 11, wherein: The BMS main control board is also used to send a coded message to the replaced BMS slave control board through the CAN bus when the BMS slave control board is replaced.

16. The battery management system according to claim 11, wherein: The BMS slave control board is used to collect the voltage and / or temperature of the single battery.

17. The battery management system according to claim 16, wherein: The BMS master control board is also used to perform fault monitoring on the single cells in each BMS slave control board.

18. The battery management system according to any one of claims 11 to 17, wherein: The BMS master control board is also used to write configuration parameters to each of the BMS slave control boards.

19. A vehicle, comprising the battery management system according to any one of claims 11 to 18.

Citation Information

Patent Citations

  • Method used for automatically distributing secondary units ID in BMS

    CN104486180A

  • Power battery management system, control method and vehicle

    CN106300493A

  • ID allocation method and system

    CN107508930A

  • System for distributing BMS addresses on electric cars

    CN107766271A

  • Multi-controller system and encoding method thereof

    CN114115177A