Communication address setting method and storage medium, battery management unit and system
By analyzing the CAN message collection, a new dial-code communication address is automatically generated, which solves the communication failure problem caused by abnormal dial-code communication address in the battery management system, improves the troubleshooting efficiency and reduces the cost.
Patent Information
- Application Number
- CN202110875154.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-07-30
AI Technical Summary
In a multi-battery series or parallel system, incorrect, repeated or discontinuous dialing communication addresses lead to communication failures. The existing technology requires manual inspection of the battery management units one by one, which is time-consuming and costly.
By obtaining the CAN messages sent by each battery management unit to the CAN bus, the battery management unit with an abnormal dialing communication address is determined, and a new dialing communication address is automatically generated, reducing manual troubleshooting and reducing costs.
It improves the efficiency of troubleshooting, reduces labor costs, ensures the uniqueness and continuity of dial-code communication addresses, and avoids the time and cost of manual inspection one by one.
Smart Images

Figure CN115695376B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of battery communication, and in particular, to a communication address setting method and storage medium, a battery management unit and a system. Background Art
[0002] In a system with multiple batteries connected in series or in parallel, a system structure with two or more layers is often used. The system includes: each battery pack is equipped with a battery management unit, and every N battery management units are equipped with a battery control unit. The battery control unit collects data from multiple battery management units through bus communication, and each battery management unit is required to have a unique communication identifier. Each battery management unit is integrated with a dialing device, and the dialing device is used to determine a unique dialing communication address, i.e., a communication identifier. The dialing communication address sets a unique binary code value for each battery management unit by manually dialing the dialing device, thereby obtaining a unique dialing communication address. However, when the dialing device fails, or the battery is manually set incorrectly during installation, the system's dialing communication address may be incorrect, repeated, or discontinuous, resulting in a communication failure in the system.
[0003] In the related art, when a communication failure occurs in the system, the only way to locate the fault is to manually check each battery management unit one by one, which is not only time-consuming but also costly. Summary of the invention
[0004] The purpose of the present disclosure is to provide a communication address setting method and storage medium, a battery management unit and a system to solve the problem of low efficiency in the related art due to the need to manually check the dialing device of each battery management unit one by one when an abnormal communication address appears in the battery management system.
[0005] In order to achieve the above object, the first aspect of the present disclosure provides a communication address setting method, the method is applied to a target battery management unit, the target battery management unit is any battery management unit in a battery management system, the method comprises:
[0006] Acquire the CAN message sent by each battery management unit to the CAN bus to obtain a CAN message set, wherein the data content byte of each CAN message includes the corresponding dial code communication address of the battery management unit;
[0007] Based on the CAN message set, determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial code communication address;
[0008] When it is determined that the target battery management unit is the abnormal battery management unit, a new dial code communication address is generated for the target battery management unit.
[0009] Optionally, the message ID of the CAN message is a preset serial number of the corresponding battery management unit, and determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address based on the CAN message set includes:
[0010] Determine, from the CAN message set, a first CAN message subset with different message IDs and the same data content bytes, wherein the dial code communication address of each first CAN message in the first CAN message subset is abnormal;
[0011] In a case where the first CAN message subset includes the CAN message of the target battery management unit, it is determined that the target battery management unit is the abnormal battery management unit.
[0012] Optionally, the message ID of the CAN message is a preset serial number of the corresponding battery management unit, and determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address based on the CAN message set includes:
[0013] In the case where it is determined that the dial code communication address sequence corresponding to the CAN message set is discontinuous, determining a first CAN message subset having an abnormal dial code communication address from the CAN message set;
[0014] In a case where the first CAN message subset includes the CAN message of the target battery management unit, it is determined that the target battery management unit is the abnormal battery management unit.
[0015] Optionally, when it is determined that the dial code communication address sequence corresponding to the CAN message set is discontinuous, determining a first CAN message subset with abnormal dial code communication address from the CAN message set includes:
[0016] Sorting the dial code communication address of each of the CAN messages in the CAN message set according to a preset sorting direction to obtain an ordered sequence of dial code communication addresses;
[0017] Determine at least one breakpoint dial communication address that is discontinuous with a previous dial communication address from the ordered dial communication address sequence;
[0018] The ordered dial communication address sequence is divided into a first dial communication address subsequence and a second dial communication address subsequence according to the Nth breakpoint dial communication address in the at least one breakpoint dial communication address, the first dial communication address subsequence corresponds to the first CAN message subset, wherein N is a positive integer.
[0019] Optionally, when determining that the target battery management unit is the abnormal battery management unit, generating a new dial code communication address for the target battery management unit includes:
[0020] In the case where it is determined that the target battery management unit is the abnormal battery management unit, sending a preset serial number of the target battery management unit to the CAN bus;
[0021] Monitoring all preset serial numbers on the CAN bus, and sorting all the monitored preset serial numbers to obtain a preset serial number sequence;
[0022] Determine a sequence of dial code communication addresses to be allocated according to the second dial code communication addresses of each second CAN message in the second CAN message subset and the number of messages in the first CAN message subset, wherein the second CAN message subset is a complement of the first CAN message subset;
[0023] Based on the position of the preset serial number of the target battery management unit in the preset serial number sequence, the to-be-allocated dial code communication address at the same position in the to-be-allocated dial code communication address sequence is used as a new dial code communication address of the target battery management.
[0024] Optionally, determining the sequence of dial-up communication addresses to be allocated according to the second dial-up communication addresses of each second CAN message in the second CAN message subset and the number of battery management units includes:
[0025] Determine the largest or smallest second dial code communication address as a reference dial code communication address;
[0026] Based on the reference dial code communication address, a number of to-be-allocated dial code communication addresses corresponding to the number of messages are sequentially generated in a preset direction to obtain a sequence of to-be-allocated dial code communication addresses.
[0027] Optionally, the method further comprises:
[0028] When the dial code communication address of the target battery management unit is in an initial state, the target battery management unit is determined to be the abnormal battery management unit.
[0029] A second aspect of the present disclosure further provides a battery management unit, the battery management unit comprising a central processor, a CAN communication module, and a dial communication module; the central processor is used to:
[0030] Acquire CAN messages sent by each battery management unit to the CAN bus through the CAN communication module to obtain a CAN message set, wherein the data content byte of each CAN message includes the corresponding dial communication address of the battery management unit for the dial communication module to send and receive information, and the dial communication address is obtained from the storage module of the dial device or the CPU; based on the CAN message set, determine whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address; if it is determined that the target battery management unit is the abnormal battery management unit, generate a new dial communication address for the target battery management unit.
[0031] The third aspect of the present disclosure also provides a battery management system, which includes multiple battery management units, and a CAN bus and a dial-up communication bus connecting each of the battery management units, each of the battery management units includes a central processing unit, a CAN communication unit, a dial-up device, and a dial-up communication module, wherein the central processing unit of each of the battery management units is used to execute any one of the methods described in the first aspect.
[0032] The fourth aspect of the present disclosure further provides a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described in the first aspect.
[0033] Through the above technical solution, at least the following technical effects can be achieved:
[0034] By acquiring the CAN message sent by each battery management unit to the CAN bus, a CAN message set is obtained, and based on the CAN message set, it is determined whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address, and then when the target battery management unit is determined to be an abnormal battery management unit, a new dial communication address is generated for the target battery management unit. Through this method, a new dial communication address can be automatically generated. Therefore, compared with the method in the related art that requires manual inspection of each battery management unit one by one when an abnormal communication address occurs, the method disclosed in the present invention can reduce the inspection time to improve efficiency because there is no need to manually check whether each battery management unit is faulty one by one, and also reduces labor costs.
[0035] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0037] Figure 1 It is a flowchart of a communication address setting method provided by an embodiment of the present disclosure;
[0038] Figure 2 It is a flowchart of another communication address setting method provided by an embodiment of the present disclosure;
[0039] Figure 3 is a schematic diagram of a battery management unit shown in an embodiment of the present disclosure;
[0040] Figure 4 It is a schematic diagram of a battery management system shown in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0042] It should be understood that the various steps described in the method implementation of the present disclosure may be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the description below.
[0043] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. In addition, the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0044] In the related art, each battery management unit is integrated with a dialing device, and a unique dialing communication address, i.e., a communication identifier, is determined by the dialing device. The dialing communication address is set to a unique binary code value for each battery management unit by manually dialing the dialing device, thereby obtaining a unique dialing communication address. However, when the dialing device fails, or the battery is manually set incorrectly during installation, the dialing communication address of the system may be incorrect, repeated, or discontinuous, resulting in a communication failure in the system. In this case, each battery management unit can only be checked manually one by one, which is time-consuming and costly.
[0045] In view of this, the present disclosure provides a communication address setting method and storage medium, a battery management unit and a system to solve the problem that the existing battery management system requires manual setting of communication identifiers, and in the event of abnormal communication identifiers, it is necessary to manually check the dialing device of each battery management unit one by one, which is time-consuming and costly.
[0046] The present disclosure provides a method for setting a communication address. The method is applied to a target battery management unit. The target battery management unit is any battery management unit in a battery management system, such as Figure 1 As shown, the method includes:
[0047] S101. Acquire CAN messages sent by each battery management unit to the CAN bus to obtain a CAN message set.
[0048] Wherein, the data content byte of each CAN message includes the corresponding dial code communication address of the battery management unit.
[0049] S102. Based on the CAN message set, determine whether the target battery management unit is an abnormal battery management unit with an abnormal dial code communication address.
[0050] S103: When it is determined that the target battery management unit is the abnormal battery management unit, generate a new dial code communication address for the target battery management unit.
[0051] By adopting the above method, a CAN message set is obtained by acquiring the CAN message sent by each battery management unit to the CAN bus, and based on the CAN message set, it is determined whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address, and then when it is determined that the target battery management unit is an abnormal battery management unit, a new dial communication address is generated for the target battery management unit. Through this method, a new dial communication address can be automatically generated. Therefore, compared with the method in the related art that requires manual inspection of each battery management unit one by one when an abnormal communication address occurs, the method disclosed in the present invention can reduce the inspection time to improve efficiency because there is no need to manually inspect each battery management unit one by one to see if it is faulty, and also reduces labor costs.
[0052] In order to make it easier for those skilled in the art to understand the method provided by the embodiments of the present disclosure, Figure 1 The above method steps are described in detail.
[0053] In one possible implementation, the message ID of the CAN message is a preset serial number of the corresponding battery management unit. Step S102 can determine the abnormal battery management unit in the following manner: determine a first CAN message subset from the CAN message set with different message IDs and the same data content bytes, wherein the dial-up communication address of each first CAN message in the first CAN message subset is abnormal; when the first CAN message subset includes the CAN message of the target battery management unit, determine that the target battery management unit is the abnormal battery management unit.
[0054] For example, the CAN message sent by the target battery management unit is (C, 3), and the received CAN message set is {(E, 5), (A, 1), (F, 4), (C, 3), (B, 2), (D, 3), (G, 4)}, where A, B, C, D, E, F, G represent the preset serial number of the battery management unit, and 1, 2, 3, 4, 5 represent the dial communication address of the battery management unit. In this CAN message set, it can be determined that the first CAN message subset {(C, 3), (D, 3), (F, 4), (G, 4)} with different message IDs and the same data content bytes includes the CAN message (C, 3) sent by the target battery management unit, so it can be determined that the target battery management unit is an abnormal battery management unit.
[0055] It is worth noting that the preset serial number of each battery management unit is unique, and there is also a sorting frame for sorting in the serial number. The serial number is stored in the serial number storage unit, and the dial communication address of each battery management unit is a binary address. The present disclosure simply represents it as 1, 2, 3, 4, and 5 for the convenience of illustration. The subsequent exemplary description is the same as above, and the present disclosure will not repeat it. In addition, the physical communication address can be obtained from the dial device in the battery management unit, and the virtual communication address can also be obtained from the central processor or storage module of the battery management unit. The present disclosure does not make specific limitations on this.
[0056] In a possible implementation, step S102 can also determine the abnormal battery management unit in the following manner: when it is determined that the dial-up communication address sequence corresponding to the CAN message set is discontinuous, determine a first CAN message subset with an abnormal dial-up communication address from the CAN message set; when the first CAN message subset includes the CAN message of the target battery management unit, determine that the target battery management unit is the abnormal battery management unit.
[0057] Optionally, the dial code communication address of each CAN message in the CAN message set is sorted according to a preset sorting direction to obtain an ordered dial code communication address sequence; at least one breakpoint dial code communication address that is discontinuous with the previous dial code communication address is determined from the ordered dial code communication address sequence; according to the Nth breakpoint dial code communication address in the at least one breakpoint dial code communication address, the ordered dial code communication address sequence is divided into a first dial code communication address subsequence and a second dial code communication address subsequence, the first dial code communication address subsequence corresponds to the first CAN message subset, wherein N is a positive integer.
[0058] For example, the CAN message sent by the target battery management unit is (C, 4), and the received CAN message set is {(E, 7), (A, 1), (C, 4), (B, 2), (D, 5), (F, 8)}. The order of the dial code communication address is sorted from small to large, and the ordered dial code communication address sequence (1, 2, 4, 5, 7, 8) is obtained. There is a first breakpoint between 2 and 4, and a second breakpoint between 5 and 7. According to the first breakpoint, the ordered dial code communication address sequence is divided into a first dial code communication address subsequence (1, 2) and a second dial code communication address subsequence (4, 5, 7, 8). The first CAN message subset with abnormal dial code communication address is determined from the CAN message set as {(E, 7), (C, 4), (D, 5), (F, 8)}, which includes the CAN message (C, 4) sent by the target battery management unit. Therefore, it can be determined that the target battery management unit is an abnormal battery management unit.
[0059] It is worth noting that, when the received CAN message set is in order, there is no need to sort the dial code communication addresses.
[0060] In a possible implementation, step S103 includes: when it is determined that the target battery management unit is the abnormal battery management unit, sending the preset serial number of the target battery management unit to the CAN bus; monitoring all preset serial numbers on the CAN bus, and sorting all the monitored preset serial numbers to obtain a preset serial number sequence; determining a sequence of dial-up communication addresses to be allocated according to the second dial-up communication addresses of each second CAN message in the second CAN message subset and the number of messages in the first CAN message subset, wherein the second CAN message subset is the complement of the first CAN message subset; based on the position of the preset serial number of the target battery management unit in the preset serial number sequence, using the dial-up communication address to be allocated at the same position in the sequence of dial-up communication addresses to be allocated as the new dial-up communication address of the target battery management.
[0061] Optionally, determining the sequence of dial-up communication addresses to be allocated according to the second dial-up communication addresses of each second CAN message in the second CAN message subset and the number of battery management units includes: determining the largest or smallest second dial-up communication address as a reference dial-up communication address; based on the reference dial-up communication address, sequentially generating a number of dial-up communication addresses to be allocated corresponding to the number of messages in a preset direction to obtain the sequence of dial-up communication addresses to be allocated.
[0062] For example, the message sent by the target battery management unit is C, 3, and the first CAN message subset is {(C, 3), (D, 3)}, the serial number sent to the CAN bus is C, and the serial numbers received by the target battery management unit are C and D. The second CAN message subset is {(E, 5), (A, 1), (B, 2)}, and it can be determined that there are 5 battery management units in the battery management system. Taking 2 as the reference dial communication address, the sequence number sequence can be obtained by sorting according to the sequence number sorting frame (C, D), and adding one to the reference dial communication address 2 according to this sequence order to obtain the newly generated dial communication address sequence to be allocated (3, 4). Finally, according to the position correspondence between the two groups of sequences, the new dial communication address allocated to the target battery management unit is 3. Or take 5 as the reference dial communication address, and subtract one from the reference dial communication address 5 according to the sequence number order to obtain a new dial communication address to be allocated. The two groups of sequences may be sorted from large to small or from small to large, and the present disclosure does not impose any specific limitation on this.
[0063] For example, the CAN message sent by the target battery management unit is (C, 4), and the first CAN message subset is {(E, 7), (C, 4), (D, 5), (F, 8)}. The serial number sent to the CAN bus is C, and the serial numbers received by the target battery management unit are C, D, E, and F. The second CAN message subset is {(A, 1), (B, 2)}, and it can be determined that there are 6 battery management units in the battery management system, with 2 as the reference dial communication address. Sorting according to the sorting frame can obtain a sequence of serial numbers (C, D, E, F), and adding one to the reference dial communication address 2 according to this sequence order to obtain a newly generated sequence of dial communication addresses to be allocated (3, 4, 5, 6). Finally, according to the position correspondence between the two groups of sequences, the new dial communication address allocated to the target battery management unit is 3. The sorting of the two groups of sequences can be sorted from large to small, or from small to large, and the present disclosure does not make specific restrictions on this.
[0064] Optionally, after the target battery management unit generates a new dial-up communication address, it resends the CAN message to the CAN bus and receives all CAN messages on the CAN bus to detect whether there are abnormal communication addresses to ensure that after the new dial-up communication address is generated, all the dial-up communication addresses in the battery management system are unique and continuous.
[0065] Optionally, after the target battery management unit generates a new dial communication address, the new dial communication address can be stored in the central processor or storage module of the target battery management unit in the form of a virtual address. It is also possible to request the dial device in the target battery management unit to set the dial switch according to the new dial communication address in the form of a physical address, and it is also possible to send a fault reminder to the monitoring module after the setting of the dial device fails, so that maintenance personnel can easily determine the battery management unit where the dial device fails.
[0066] In a possible implementation manner, when the dial code communication address of the target battery management unit is in an initial state, it is determined that the target battery management unit is the abnormal battery management unit.
[0067] For example, the dial code communication address can be set to the initial state by setting each bit switch of the dial code device to "OFF", that is, each bit of the binary address is 0, or setting each bit switch of the dial code device according to a preset switch sequence, and the preset switch sequence indicates that the dial code communication address is in the initial state. When the dial code device is in the initial state, the automatic encoding program is triggered, that is, the battery management unit can be set to an abnormal battery management unit to generate a new dial code communication address.
[0068] That is to say, by setting the dialing device of each battery management unit in the battery management system to the initial state, a new dialing communication address can be automatically generated for each battery management unit in the battery management system. The initial state can be pre-set during the production process, thereby avoiding errors in manually setting the dialing communication address during the installation process and reducing the installation cost.
[0069] It is worth noting that the maximum number of battery management units in the battery management system is limited by the number of bits of the dial switch in the dial device. For example, for a battery system with an M-bit dial device, the maximum number of managed battery management units is 2 to the Mth power. In other words, the maximum number of battery management units for a 3-bit dial device is 8; the maximum number of battery management units for a 4-bit dial device is 16. However, the new dial communication address generated by this embodiment can be stored in the storage unit in the form of a virtual communication address. It only needs to increase the battery management unit. The maximum number of battery management units of a battery management system with any number of dial devices can theoretically be increased to any number.
[0070] In a possible implementation, by setting the dial communication address of any battery management unit in the battery management system to the master state, the battery management units other than the master state are determined to be slave states. Then the master battery management unit can collect temperature, voltage, current and other information from each slave battery management unit through the CAN bus or the dial communication bus, and send the collected information to the monitoring module.
[0071] For example, the dial communication address can be set to the host state by setting each bit switch of the dial device to "ON", that is, each bit of the binary address is 1, or setting each bit switch of the dial device according to a preset switch sequence, and the preset switch sequence indicates that the dial communication address is in the host state.
[0072] That is to say, the host battery management unit can be set to send the collected information to the monitoring module, without the need for the monitoring module to communicate with each battery management unit, or by installing an additional host module for communication, thereby reducing the communication cost between the battery management system and the communication module.
[0073] Figure 2 is a flow chart of a communication address setting method according to an exemplary embodiment. The method is applied to a target battery management unit, which is any battery management unit in a battery management system, such as Figure 2 As shown, the method includes:
[0074] S201, obtaining a serial number from a serial number storage unit, and obtaining a dial code communication address from a dial code device.
[0075] S202: Encapsulate the serial number and the dial code communication address into a CAN message with the serial number as the message ID and the dial code communication address as the data content byte.
[0076] S203: Send the CAN message to the CAN bus through the CAN communication module.
[0077] S204: Obtain all CAN messages on the CAN bus.
[0078] S205, determining whether there is a target CAN message set with different serial numbers and the same dial code communication address in all CAN messages.
[0079] S206: Determine whether there is a target CAN message set with a discontinuous dial-up communication address in all CAN messages.
[0080] S207: Determine whether the target message set includes a target battery management unit.
[0081] S208: Determine the target battery management unit as an abnormal battery management unit, and send the serial number to the CAN bus.
[0082] S209, obtaining all serial numbers on the CAN bus, and sorting them according to the sequence frames in the serial numbers.
[0083] S210, determining a new dial communication address to be allocated according to the dial communication address in the complement of the target message set and the number of battery management units, and determining a new dial communication address of the target battery management unit according to the corresponding position of the target battery management unit in the sequence number order.
[0084] By adopting the above method, a CAN message set is obtained by acquiring the CAN message sent by each battery management unit to the CAN bus, and based on the CAN message set, it is determined whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address, and then when it is determined that the target battery management unit is an abnormal battery management unit, a new dial communication address is generated for the target battery management unit. Through this method, a new dial communication address can be automatically generated. Therefore, compared with the method in the related art that requires manual inspection of each battery management unit one by one when an abnormal communication address occurs, the method disclosed in the present invention can reduce the inspection time to improve efficiency because there is no need to manually inspect each battery management unit one by one to see if it is faulty, and also reduces labor costs.
[0085] Figure 3 FIG. 1 is a schematic diagram of a battery management unit shown in an embodiment of the present disclosure. Figure 3 As shown, the battery management unit 300 includes a central processing unit 301 , a CAN communication module 302 , and a dial communication module 303 .
[0086] Optionally, the battery management unit 300 further includes a dialing device 304 and a serial number storage unit 305. The dialing device 304 is used to set the physical communication address of the battery management unit 300 through a dial switch, and the serial number storage unit 305 is used to store a serial number, which is unique and can be used as an identifier for identifying the battery management unit 300.
[0087] Optionally, the central processor 301 is used for:
[0088] Acquire CAN messages sent by each battery management unit to the CAN bus through the CAN communication module 302 to obtain a CAN message set, wherein the data content byte of each CAN message includes the corresponding dial communication address of the battery management unit 300 for the dial communication module 303 to send and receive information, and the dial communication address is obtained from the storage module of the dial device or the CPU; based on the CAN message set, determine whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address; if it is determined that the target battery management unit is the abnormal battery management unit, generate a new dial communication address for the target battery management unit.
[0089] Optionally, the message ID of the CAN message is a preset serial number of the corresponding battery management unit, and determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address based on the CAN message set includes:
[0090] Determine, from the CAN message set, a first CAN message subset with different message IDs and the same data content bytes, wherein the dial code communication address of each first CAN message in the first CAN message subset is abnormal;
[0091] In a case where the first CAN message subset includes the CAN message of the target battery management unit, it is determined that the target battery management unit is the abnormal battery management unit.
[0092] Optionally, the message ID of the CAN message is a preset serial number of the corresponding battery management unit, and determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address based on the CAN message set includes:
[0093] In the case where it is determined that the dial code communication address sequence corresponding to the CAN message set is discontinuous, determining a first CAN message subset having an abnormal dial code communication address from the CAN message set;
[0094] In a case where the first CAN message subset includes the CAN message of the target battery management unit, it is determined that the target battery management unit is the abnormal battery management unit.
[0095] Optionally, when it is determined that the dial code communication address sequence corresponding to the CAN message set is discontinuous, determining a first CAN message subset with abnormal dial code communication address from the CAN message set includes:
[0096] Sorting the dial code communication address of each of the CAN messages in the CAN message set according to a preset sorting direction to obtain an ordered sequence of dial code communication addresses;
[0097] Determine at least one breakpoint dial communication address that is discontinuous with a previous dial communication address from the ordered dial communication address sequence;
[0098] The ordered dial communication address sequence is divided into a first dial communication address subsequence and a second dial communication address subsequence according to the Nth breakpoint dial communication address in the at least one breakpoint dial communication address, the first dial communication address subsequence corresponds to the first CAN message subset, wherein N is a positive integer.
[0099] Optionally, when determining that the target battery management unit is the abnormal battery management unit, generating a new dial code communication address for the target battery management unit includes:
[0100] In the case where it is determined that the target battery management unit is the abnormal battery management unit, sending a preset serial number of the target battery management unit to the CAN bus;
[0101] Monitoring all preset serial numbers on the CAN bus, and sorting all the monitored preset serial numbers to obtain a preset serial number sequence;
[0102] Determine a sequence of dial code communication addresses to be allocated according to the second dial code communication addresses of each second CAN message in the second CAN message subset and the number of messages in the first CAN message subset, wherein the second CAN message subset is a complement of the first CAN message subset;
[0103] Based on the position of the preset serial number of the target battery management unit in the preset serial number sequence, the to-be-allocated dial code communication address at the same position in the to-be-allocated dial code communication address sequence is used as a new dial code communication address of the target battery management.
[0104] Optionally, determining the sequence of dial-up communication addresses to be allocated according to the second dial-up communication addresses of each second CAN message in the second CAN message subset and the number of battery management units includes:
[0105] Determine the largest or smallest second dial code communication address as a reference dial code communication address;
[0106] Based on the reference dial code communication address, a number of to-be-allocated dial code communication addresses corresponding to the number of messages are sequentially generated in a preset direction to obtain a sequence of to-be-allocated dial code communication addresses.
[0107] Optionally, the central processor 301 is further configured to:
[0108] When the dial code communication address of the target battery management unit is in an initial state, the target battery management unit is determined to be the abnormal battery management unit.
[0109] Figure 4 Schematic diagram of a battery management system shown in an embodiment of the present disclosure. The system 400 includes multiple battery management units 300, and a CAN bus and a dial communication bus connecting each of the battery management units, each of the battery management units includes a central processing unit, a CAN communication unit, a dial device, and a dial communication module, wherein the central processing unit of each battery management unit is used to execute the communication address setting method provided in the above method embodiment.
[0110] Optionally, each battery management unit also includes a serial number storage unit for storing the serial number. Each battery management unit sends a CAN message to the CAN bus for communication through the CAN communication unit, and can also send a message to the dial communication bus for communication through the dial communication module. The battery management system can also be connected to the monitoring module through the CAN bus or the dial communication bus to send information such as the temperature, voltage, and current of each battery management unit to the monitoring module.
[0111] The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the communication address setting method provided by the above method embodiment is implemented.
[0112] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A communication address setting method, characterized in that: The method is applied to a target battery management unit, where the target battery management unit is any battery management unit in a battery management system, and the method includes: Acquire the CAN message sent by each battery management unit to the CAN bus to obtain a CAN message set, wherein the data content byte of each CAN message includes the corresponding dial code communication address of the battery management unit; Based on the CAN message set, determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial code communication address; In the case where it is determined that the target battery management unit is the abnormal battery management unit, generating a new dial code communication address for the target battery management unit; In the case where it is determined that the target battery management unit is the abnormal battery management unit, generating a new dial code communication address for the target battery management unit includes: In the case where it is determined that the target battery management unit is the abnormal battery management unit, sending a preset serial number of the target battery management unit to the CAN bus; Monitoring all preset serial numbers on the CAN bus, and sorting all the monitored preset serial numbers to obtain a preset serial number sequence; Determine a sequence of dial code communication addresses to be allocated according to the second dial code communication addresses of each second CAN message in the second CAN message subset and the number of messages in the first CAN message subset, wherein the dial code communication address of each first CAN message in the first CAN message subset is abnormal, and the second CAN message subset is the complement of the first CAN message subset; Based on the position of the preset serial number of the target battery management unit in the preset serial number sequence, the to-be-allocated dial code communication address at the same position in the to-be-allocated dial code communication address sequence is used as a new dial code communication address of the target battery management.
2. The method according to claim 1, characterized in that The message ID of the CAN message is a preset serial number of the corresponding battery management unit, and the determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial code communication address based on the CAN message set includes: Determine, from the CAN message set, a first CAN message subset having different message IDs and the same data content bytes; In a case where the first CAN message subset includes the CAN message of the target battery management unit, it is determined that the target battery management unit is the abnormal battery management unit.
3. The method according to claim 1, characterized in that The message ID of the CAN message is a preset serial number of the corresponding battery management unit, and the determining whether the target battery management unit is an abnormal battery management unit with an abnormal dial code communication address based on the CAN message set includes: In the case where it is determined that the dial code communication address sequence corresponding to the CAN message set is discontinuous, determining a first CAN message subset having an abnormal dial code communication address from the CAN message set; In a case where the first CAN message subset includes the CAN message of the target battery management unit, it is determined that the target battery management unit is the abnormal battery management unit.
4. The method according to claim 3, characterized in that The method of determining, when it is determined that the dial code communication address sequence corresponding to the CAN message set is discontinuous, a first CAN message subset having an abnormal dial code communication address from the CAN message set comprises: Sorting the dial code communication address of each of the CAN messages in the CAN message set according to a preset sorting direction to obtain an ordered sequence of dial code communication addresses; Determine at least one breakpoint dial communication address that is discontinuous with a previous dial communication address from the ordered dial communication address sequence; The ordered dial communication address sequence is divided into a first dial communication address subsequence and a second dial communication address subsequence according to the Nth breakpoint dial communication address in the at least one breakpoint dial communication address, the first dial communication address subsequence corresponds to the first CAN message subset, wherein N is a positive integer.
5. The method according to claim 1, characterized in that The step of determining a sequence of dial-up communication addresses to be allocated according to the second dial-up communication addresses of each second CAN message in the second CAN message subset and the number of battery management units comprises: Determine the largest or smallest second dial code communication address as a reference dial code communication address; Based on the reference dial code communication address, a number of to-be-allocated dial code communication addresses corresponding to the number of messages are sequentially generated in a preset direction to obtain the to-be-allocated dial code communication address sequence.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: When the dial code communication address of the target battery management unit is in an initial state, the target battery management unit is determined to be the abnormal battery management unit.
7. A battery management unit, characterized in that: The battery management unit includes a central processor, a CAN communication module, and a dial communication module; the central processor is used to: Acquire CAN messages sent by each battery management unit to the CAN bus through the CAN communication module to obtain a CAN message set, wherein the data content byte of each CAN message includes the corresponding dial communication address of the battery management unit for the dial communication module to send and receive information, and the dial communication address is obtained from the storage module of the dial device or the CPU; based on the CAN message set, determine whether the target battery management unit is an abnormal battery management unit with an abnormal dial communication address; if it is determined that the target battery management unit is the abnormal battery management unit, generate a new dial communication address for the target battery management unit; The central processor is also used for: when determining that the target battery management unit is the abnormal battery management unit, sending a preset serial number of the target battery management unit to the CAN bus; Monitoring all preset serial numbers on the CAN bus, and sorting all the monitored preset serial numbers to obtain a preset serial number sequence; Determine a sequence of dial code communication addresses to be allocated according to the second dial code communication addresses of each second CAN message in the second CAN message subset and the number of messages in the first CAN message subset, wherein the dial code communication address of each first CAN message in the first CAN message subset is abnormal, and the second CAN message subset is the complement of the first CAN message subset; Based on the position of the preset serial number of the target battery management unit in the preset serial number sequence, the to-be-allocated dial code communication address at the same position in the to-be-allocated dial code communication address sequence is used as a new dial code communication address of the target battery management.
8. A battery management system, characterized in that: The system includes multiple battery management units, and a CAN bus and a dial communication bus connecting each of the battery management units. Each of the battery management units includes a central processing unit, a CAN communication unit, a dial device, and a dial communication module, wherein the central processing unit of each battery management unit is used to execute the method described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
System for distributing BMS addresses on electric cars
CN107766271A
Method for setting communication address of detection device, and unmanned aerial vehicle and storage medium
WO2020227932A1
