Master-slave competition method for bus and energy storage system

Automatically determine the master-slave relationship between devices through the CAN communication bus, solving the maintenance complexity and serial number errors caused by the equality of master-slave priority between devices, and improving the management efficiency and delivery quality of the energy storage system.

CN119324846APending Publication Date: 2025-01-17深圳市格伏恩新能源科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411349164.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

In a communication bus system, when the priority of master and slaves between devices is equal, engineers need to define manually, resulting in increased complexity of on-site maintenance and errors or omissions in the serial number of the energy storage system affect management efficiency and delivery quality.

Method used

Through the CAN communication bus, the serial numbers of multiple high-voltage boxes are obtained and data information is transmitted to determine whether they meet the preset requirements. If they meet the requirements, the master-slave relationship will be arranged according to the serial number. If they do not meet, the sequence will be arranged according to the MCU-ID identification number. Identify master and slave, reduce maintenance complexity, and identify serial number errors.

Benefits of technology

It significantly reduces the complexity of on-site maintenance systems and efficiently identifies whether there are errors or omissions in serial number attachments, improving the management efficiency and delivery quality of energy storage systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119324846A_ABST
    Figure CN119324846A_ABST
Patent Text Reader

Abstract

The invention relates to a master-slave competition method for a bus and an energy storage system, and the method comprises the steps: obtaining the serial numbers of a plurality of high-voltage boxes of the system, and uploading the serial numbers of the plurality of high-voltage boxes to a CAN communication bus of the energy storage system; carrying out data information transmission through a CAN communication bus, and judging whether the serial numbers of the plurality of high-voltage boxes meet preset requirements or not; if the serial numbers of the plurality of high-voltage boxes meet a preset requirement, performing master-slave competition according to a first arrangement result obtained by arranging the serial numbers of the plurality of high-voltage boxes to obtain a master machine and a slave machine; and if the serial numbers of the plurality of high-voltage boxes do not meet the preset requirement, performing master-slave competition according to a second arrangement result obtained by arranging the MCU-ID identification numbers of the plurality of BCU control panels, thereby obtaining a master machine and a slave machine. According to the scheme provided by the invention, on one hand, the working complexity of a field maintenance system can be remarkably reduced, and on the other hand, whether error or omission occurs in serial number attachment can be efficiently identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of communication buses, and in particular to a master-slave competition method for buses and an energy storage system. Background Art

[0002] In the field of electronic hardware and power supply, some applications require the use of communication buses due to the large number of communication devices. Currently, the available communication buses include RS485 and CAN bus. Among them, RS485 has a limited communication rate, while CAN bus has the advantage of high communication rate and is adopted by many design developers.

[0003] The CAN bus often needs to set up a host and a slave, so that the host sends a query command during the communication process, and the slave is responsible for responding, thereby realizing communication data interaction. However, the host is generally distinguished by different physical addresses, or a device is actively defined as the host in the system, and other machines are slaves; the above method has determined that a specific device is the host.

[0004] However, in actual operation, it is sometimes inconvenient or unavailable to define a host first. In such cases, the "priority equality" of the host and slave devices between devices needs to be manually defined by engineers, which brings complexity to the engineers' on-site maintenance of the system and results in inflexible actual operation. In addition, the serial number attachment of the energy storage system is relatively independent of the production of the energy storage system. In actual scenarios, errors or omissions in serial number attachment may occasionally occur, which also affects the management efficiency of batch energy storage systems and, in turn, the delivery quality of the energy storage system. Summary of the invention

[0005] The technical problem to be solved by the present invention is: how to design a master-slave competition method for a bus, which can significantly reduce the complexity of the work of the on-site maintenance system on the one hand, and can efficiently identify whether there are errors or omissions in the serial number attachment on the other hand.

[0006] Therefore, the present application proposes a master-slave competition method and energy storage system for a bus, the technical effects of which are, on the one hand, capable of significantly reducing the complexity of the on-site maintenance system work, and on the other hand, capable of efficiently identifying whether there are errors or omissions in the serial number attachment.

[0007] In a first aspect, the present invention proposes a master-slave competition method for a bus, the method being used to screen out a master and a slave from a plurality of equipment machines in an energy storage system, each equipment machine comprising a high-voltage box, each high-voltage box being provided with a BCU control board; the energy storage system comprising a CAN communication bus, the CAN communication bus being connected to a plurality of equipment machines; the master-slave competition method for a bus comprising: S1, obtaining serial numbers of a plurality of high-voltage boxes of the system, and uploading the serial numbers of the plurality of high-voltage boxes to the CAN communication bus of the energy storage system; S2, transmitting data information through the CAN communication bus, and determining whether the serial numbers of the plurality of high-voltage boxes meet preset requirements; S3, if the serial numbers of the plurality of high-voltage boxes meet the preset requirements, performing a master-slave competition according to a first arrangement result obtained by arranging the serial numbers of the plurality of high-voltage boxes, and obtaining a master and a slave; S4, if the serial numbers of the plurality of high-voltage boxes do not meet the preset requirements, performing a master-slave competition according to a second arrangement result obtained by arranging the MCU-ID identification numbers of the plurality of BCU control boards, and obtaining a master and a slave.

[0008] In the above scheme, the serial numbers of the multiple high-voltage boxes of the system can be obtained by manually scanning the serial numbers of the high-voltage boxes or automatically scanning the serial numbers of the high-voltage boxes. The specific implementation of the acquisition method is known in the art. Furthermore, the serial numbers of the multiple high-voltage boxes can preliminarily represent the situation of multiple BCU control boards or the situation of multiple MCU-ID identification numbers.

[0009] The above step S3 corresponds to the following content: when the BAT1 battery cluster 3, BAT2 battery cluster 4, and BAT3 battery cluster 5 (referred to as BAT1, BAT2, and BAT3) of the energy storage system are powered on, the respective first BCU control board 6, the second BCU control board 7, and the third BCU control board 8 first obtain their respective MCU-ID identification numbers, that is, the first MCU-ID identification number, the second MCU-ID identification number, and the third MCU-ID identification number; wherein the first MCU-ID identification number, the second MCU-ID identification number, and the third MCU-ID identification number are absolutely unique, and at least 12 digits of the MCU-ID identification numbers of the multiple BCU control boards are encoded into their respective data packets to form their respective CAN-ID identification numbers, that is, the first MCU-ID identification number corresponds to CAN-ID first identification number, MCU-ID second identification number corresponds to CAN-ID second identification number, MCU-ID third identification number corresponds to CAN-ID third identification number; further, control MCU to confirm the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number as the respective addresses of BAT1 battery cluster, BAT2 battery cluster, BAT3 battery cluster, and each BCU control board actively uploads the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number to the CAN communication bus, and arranges and arbitrates through the CAN communication bus. By default, the CAN-ID with the largest number is confirmed as the host, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition between the devices.

[0010] The above step S4 corresponds to the following content: when the BAT1 battery cluster 3, BAT2 battery cluster 4, and BAT3 battery cluster 5 of the energy storage system are powered on, the first BCU control board 6, the second BCU control board 7, and the third BCU control board 8 first obtain the serial number of their respective battery clusters, and the serial number is manually defined, coded with multiple rules, and ensured to be absolutely unique. Furthermore, the BAT1 battery cluster 3 is connected to the first high-voltage box 61, the BAT2 battery cluster 4 is connected to the second high-voltage box 71, and the BAT3 battery cluster 5 is connected to the third high-voltage box 81. The gray part represents the battery cluster, the white part represents the high-voltage box, and the blue part represents the BCU control board. Before leaving the factory, the "serial number" corresponding to the first high-voltage box 61, the second high-voltage box 71, and the third high-voltage box 81 is written into each corresponding MCU in the first BCU control board 6, the second BCU control board 7, and the third BCU control board 8, and then the "serial number" is encoded into the respective data packets by the MCU to form the respective CAN-ID first identification number, CAN-ID second identification number, and CAN-ID third identification number, and confirmed as the respective addresses of the BAT1 battery cluster 3, the BAT2 battery cluster 4, and the BAT3 battery cluster 5, and each actively uploads the "serial number" to the CAN communication bus, and the serial numbers of multiple high-voltage boxes are arranged and arbitrated through the CAN communication bus. By default, the device with the largest serial number is confirmed as the master, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition between the devices. ; Further, the master-slave CAN communication protocol is changed from the previous active upload to passive polling, and the status of the master and the slave is confirmed from then on; in addition, since the serial numbers of multiple high-voltage boxes meet the preset requirements, the CAN communication bus can always identify a CAN-ID identification number each time, such as the first CAN-ID identification number, the second CAN-ID identification number, and the third CAN-ID identification number; further, the address of the BCU control board is determined next, and then the sending cycle of the unrecognized CANID is accelerated, that is, the success rate of the unrecognized MCU-ID identification number can be increased (except for the first MCU-ID identification number to the third MCU-ID identification number), so as to identify other MCU-ID identification numbers (more accurately), and then corresponding to the MCU-ID identification number, it can be concluded that all CAN-ID identification numbers are identifiable identification numbers, which means that slowly all CAN-ID identification numbers can be identified; further, the master-slave CAN communication protocol is changed from the previous active upload to passive polling, and the status of the master and the slave is confirmed from then on.

[0011] Its further technical solution is that each device includes a battery cluster in addition to a high-voltage box, and the high-voltage box is connected to the battery cluster, and the battery cluster includes a BAT1 battery cluster, a BAT2 battery cluster, and a BAT3 battery cluster; the S1 obtains the serial numbers of multiple high-voltage boxes of the system, and uploads the serial numbers of the multiple high-voltage boxes to the CAN communication bus of the energy storage system, including: S11, writes the serial numbers corresponding to the first high-voltage box, the second high-voltage box, and the third high-voltage box into each corresponding MCU in the first BCU control board, the second BCU control board, and the third BCU control board, and then encodes the serial numbers into their respective data packets through the MCU to form their respective CAN-ID first identification number, CAN-ID second identification number, and CAN-ID third identification number, and confirms them as the respective addresses of the BAT1 battery cluster, the BAT2 battery cluster, and the BAT3 battery cluster, and each actively uploads the serial number to the CAN communication bus.

[0012] Its further technical solution is that S2, transmitting data information through the CAN communication bus, determines whether the serial numbers of multiple high-voltage boxes meet the preset requirements, including: S21, transmitting data information through the CAN communication bus, traversing the identification results of the serial numbers of multiple high-voltage boxes, and determining whether the number of identification results is equal to the preset number. If they are equal, it meets the preset requirements, and if they are not equal, it does not meet the preset requirements.

[0013] Its further technical solution is that, in S3, if the serial numbers of multiple high-voltage boxes meet the preset requirements, a master-slave competition is carried out according to the first arrangement result obtained by arranging the serial numbers of the multiple high-voltage boxes to obtain a master and a slave, including: S31, if the serial numbers of multiple high-voltage boxes meet the preset requirements, data information is transmitted through the CAN communication bus, the 8 to 10-digit serial numbers of the multiple high-voltage boxes are arranged and arbitrated, and the arrangement and arbitration process is recorded, and the device with the largest serial number is confirmed as the master by default, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition.

[0014] Its further technical solution is that, among the MCU-ID identification numbers, the unrecognized MCU-ID identification numbers include MCU-ID identification numbers other than the first MCU-ID identification number to the third MCU-ID identification number; after the step S31, the method further includes: obtaining the CAN-ID identification number recognized by the CAN communication bus each time, then determining the address of the BCU control board, and then speeding up the sending cycle of the unrecognized CANID, that is, the success rate of the unrecognized MCU-ID identification number can be increased, thereby identifying other unrecognized MCU-ID identification numbers, and then corresponding to the MCU-ID identification number, it can be concluded that all CAN-ID identification numbers are identifiable identification numbers.

[0015] Its further technical solution is that, in S4, if the serial numbers of multiple high-voltage boxes do not meet the preset requirements, a master-slave competition is performed according to the second arrangement result obtained by arranging the MCU-ID identification numbers of multiple BCU control boards to obtain a master and a slave, including: if the serial numbers of multiple high-voltage boxes do not meet the preset requirements, it means that there is an error or omission in the serial number itself, then at least 12 digits of the MCU-ID identification numbers of the multiple BCU control boards are encoded into their respective data packets to form their respective CAN-ID identification numbers, that is, the first identification number of MCU-ID corresponds to the first identification number of CAN-ID, the second identification number of MCU-ID corresponds to the second identification number of CAN-ID, and the third identification number of MCU-ID corresponds to CAN-ID third identification number; control MCU to confirm the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number as the respective addresses of BAT1 battery cluster, BAT2 battery cluster, BAT3 battery cluster, and each BCU control board actively uploads the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number to the CAN communication bus, transmits data information through the CAN communication bus, arranges and arbitrates the CAN-ID identification numbers, and records the arrangement and arbitration process. By default, the CAN-ID with the largest number is confirmed as the host, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition.

[0016] Its further technical solution is that the data information is transmitted through the CAN communication bus, and the CAN-ID identification number is arranged and arbitrated, including: controlling the BAT1 battery cluster to send the data packet after T-max, and then the BAT2 battery cluster and the BAT3 battery cluster send data packets within the time of T-max-t1, so as to ensure that the CAN communication bus will receive the data packet ID-1 corresponding to the BAT1 battery cluster; in the next stage, controlling the BAT1 battery cluster and the BAT3 battery cluster to send data packets within the interval of T-max-t1, and the BAT2 battery cluster to send data packets within the interval of (T-max-t1)×2, so as to ensure that the CAN communication bus will receive the data packet ID-3 corresponding to the BAT3 battery cluster; in the next stage, controlling the BAT1 battery cluster, the BAT2 battery cluster and the BAT3 battery cluster to send data packets within the interval of (T-max-t1)×2, so as to ensure that the CAN communication bus will receive the data packet ID-2 corresponding to the BAT2 battery cluster.

[0017] In a second aspect, the present invention proposes an energy storage system, the energy storage system comprising a plurality of equipment machines, the energy storage system being used to execute the master-slave competition method as described in the first aspect, and then screen out a master machine and a slave machine from the plurality of equipment machines of the energy storage system. In summary, the beneficial effects of the present invention are that, on the one hand, the complexity of the work of the on-site maintenance system can be significantly reduced, and on the other hand, whether errors or omissions occur in the attachment of serial numbers can be efficiently identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A schematic flow chart of a master-slave competition method provided in an embodiment of the present invention.

[0021] Figure 2 A schematic diagram of the overall structure of an energy storage system provided in an embodiment of the present invention.

[0022] Figure 3 A schematic diagram of a partial structure of an energy storage system provided in an embodiment of the present invention.

[0023] Figure 4 A bus encoding method diagram of a master-slave competition method provided in an embodiment of the present invention.

[0024] Figure 5 A protocol relationship table diagram of the master-slave competition method provided in an embodiment of the present invention.

[0025] Figure 6 A competition schematic diagram of a master-slave competition method provided in an embodiment of the present invention.

[0026] Figure 7 A structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or other features, integers, steps, operations, elements, components and / or combinations thereof.

[0029] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0030] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to one or any combination and all possible combinations of the associated listed items, and includes these combinations.

[0031] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0032] Example 1

[0033] See also Figures 1 to 6 , among which Figure 1 A flowchart of a master-slave competition method for a bus provided by an embodiment of the present invention is provided. Figure 2 A schematic diagram of the structure of an energy storage system provided in an embodiment of the present invention. The embodiment of the present invention provides an energy storage system, which includes a PCS unit 1, a CAN first communication bus 21, a CAN second communication bus 22, and a CAN third communication bus 23 (the three are collectively referred to as a CAN communication bus 2), a BAT1 battery cluster 3, a BAT2 battery cluster 4, a BAT3 battery cluster 5, a first BCU control board 6, a second BCU control board 7, a third BCU control board 8, a first high-voltage box 61, a second high-voltage box 71, and a third high-voltage box 81.

[0034] In the above scheme, the BAT1 battery cluster 3 is abbreviated as BAT1, the BAT2 battery cluster 4 is abbreviated as BAT2, and the BAT3 battery cluster 5 is abbreviated as BAT3. The BAT1 battery cluster 3, the BAT2 battery cluster 4, and the BAT3 battery cluster 5 are all composed of a plurality of stacked battery modules. In one embodiment, the first BCU control board 6, the second BCU control board 7, and the third BCU control board 8 include a power supply circuit, a main control circuit, a signal communication circuit, and an MCU control circuit; each MCU control circuit has an independent MCU chip; the PCS unit 1 includes a PCS-MCU control circuit and a PCS-MCU chip, and the PCS-MCU chip processes the communication data on the CAN first communication bus 21.

[0035] Corresponding to the energy storage system, an embodiment of the present invention proposes a master-slave competition method for a bus, the method is used to screen out a master and a slave from multiple equipment machines of the energy storage system, each equipment machine includes a high-voltage box, and each high-voltage box is provided with a BCU control board; the energy storage system includes a CAN communication bus, and the CAN communication bus connects multiple equipment machines; the master-slave competition method for the bus includes:

[0036] S1, obtaining serial numbers of multiple high-voltage boxes of the system, and uploading the serial numbers of the multiple high-voltage boxes to the CAN communication bus of the energy storage system.

[0037] S2, transmits data information through the CAN communication bus to determine whether the serial numbers of multiple high-voltage boxes meet the preset requirements.

[0038] S3, if the serial numbers of the multiple high-voltage boxes meet the preset requirements, a master-slave competition is performed according to the first arrangement result obtained by arranging the serial numbers of the multiple high-voltage boxes to obtain a master and a slave.

[0039] S4, if the serial numbers of multiple high-voltage boxes do not meet the preset requirements, a master-slave competition is performed according to the second arrangement result obtained by arranging the MCU-ID identification numbers of multiple BCU control boards to obtain the master and the slave.

[0040] In the above scheme, the serial numbers of the multiple high-voltage boxes of the system can be obtained by manually scanning the serial numbers of the high-voltage boxes or automatically scanning the serial numbers of the high-voltage boxes. The specific implementation of the acquisition method is known in the art. Furthermore, the serial numbers of the multiple high-voltage boxes can preliminarily represent the situation of multiple BCU control boards or the situation of multiple MCU-ID identification numbers.

[0041] The above step S3 corresponds to the following content: when the BAT1 battery cluster 3, BAT2 battery cluster 4, and BAT3 battery cluster 5 (referred to as BAT1, BAT2, and BAT3) of the energy storage system are powered on, the respective first BCU control board 6, the second BCU control board 7, and the third BCU control board 8 first obtain their respective MCU-ID identification numbers, that is, the first MCU-ID identification number, the second MCU-ID identification number, and the third MCU-ID identification number; wherein the first MCU-ID identification number, the second MCU-ID identification number, and the third MCU-ID identification number are absolutely unique, and at least 12 digits of the MCU-ID identification numbers of the multiple BCU control boards are encoded into their respective data packets to form their respective CAN-ID identification numbers, that is, the first MCU-ID identification number corresponds to CAN-ID first identification number, MCU-ID second identification number corresponds to CAN-ID second identification number, MCU-ID third identification number corresponds to CAN-ID third identification number; further, control MCU to confirm the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number as the respective addresses of BAT1 battery cluster, BAT2 battery cluster, BAT3 battery cluster, and each BCU control board actively uploads the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number to the CAN communication bus, and arranges and arbitrates through the CAN communication bus. By default, the CAN-ID with the largest number is confirmed as the host, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition between the devices.

[0042] The above step S4 corresponds to the following content: when the BAT1 battery cluster 3, BAT2 battery cluster 4, and BAT3 battery cluster 5 of the energy storage system are powered on, the first BCU control board 6, the second BCU control board 7, and the third BCU control board 8 first obtain the serial number of their respective battery clusters, which is manually defined and coded with multiple rules to ensure that it is absolutely unique. Figure 2As shown, the BAT1 battery cluster 3 is connected to the first high-voltage box 61, the BAT2 battery cluster 4 is connected to the second high-voltage box 71, and the BAT3 battery cluster 5 is connected to the third high-voltage box 81. The gray part represents the battery cluster, the white part represents the high-voltage box, and the blue part represents the BCU control board. Before leaving the factory, the "serial number" corresponding to the first high-voltage box 61, the second high-voltage box 71, and the third high-voltage box 81 is written into each corresponding MCU in the first BCU control board 6, the second BCU control board 7, and the third BCU control board 8, and then the "serial number" is encoded into the respective data packets through the MCU to form the respective CAN-ID first identification number, CAN-ID second identification number, and CAN-ID third identification number, and confirmed as the BAT1 battery cluster 3, BAT2 battery cluster 4 is connected to the second high-voltage box 71, and the third high-voltage box 81. The addresses of the BAT2 battery cluster 4 and the BAT3 battery cluster 5 are respectively uploaded to the CAN communication bus, and the serial numbers of multiple high-voltage boxes are arranged and arbitrated through the CAN communication bus. By default, the device with the largest serial number is confirmed as the master, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition between the devices; further, the master-slave CAN communication protocol is changed from the previous active upload to passive polling, and the status of the master and slave is confirmed from then on; in addition, since the serial numbers of multiple high-voltage boxes meet the preset requirements, the CAN communication bus can always identify a CAN-ID identification number each time, such as the first CAN-ID identification number, the second CAN-ID identification number, and the third CAN-ID identification number; see for details Figure 4 As shown, the address of the BCU control board is determined next, and then the sending cycle of the unrecognized CANID is accelerated, which can increase the success rate of the unrecognized MCU-ID identification numbers (except the first to third MCU-ID identification numbers), thereby identifying other MCU-ID identification numbers (more accurately), and then corresponding to the MCU-ID identification number, it can be concluded that all CAN-ID identification numbers are identifiable identification numbers, which means that all CAN-ID identification numbers can be identified slowly; further, the master-slave CAN communication protocol is changed from the previous active upload to passive polling, and the status of the host and the slave is confirmed from then on.

[0043] Further, see Figure 4As shown in FIG. 1 , the process of arranging and arbitrating the CAN-ID identification number through the CAN communication bus is as follows: after the BAT1 battery cluster sends the data packet after T-max, the BAT2 battery cluster and the BAT3 battery cluster send data packets within the time of T-max-t1 to ensure that the CAN communication bus will receive the data packet ID-1 corresponding to the BAT1 battery cluster; in the next stage, the BAT1 battery cluster and the BAT3 battery cluster send data packets within the time interval of T-max-t1, and the BAT2 battery cluster sends data packets within the time interval of (T-max-t1)×2 to ensure that the CAN communication bus will receive the data packet ID3 corresponding to the BAT3 battery cluster; in the next stage, the BAT1 battery cluster, the BAT2 battery cluster and the BAT3 battery cluster send data packets within the time interval of (T-max-t1)×2 to ensure that the CAN communication bus will receive the data packet ID-2 corresponding to the BAT2 battery cluster. The above scheme is not limited to the encoding of three devices on the CAN communication bus. If there are more N devices online, the principle is similar and so on.

[0044] Further, refer to Figure 5 As shown, the basic format of the protocol is listed as follows. The data frame contains multiple MCU-IDs. The one with high data is named MCU-ID-H, and the one with low data is named MCU-ID-L. Specifically, after the host and the slave are confirmed according to the above scheme, the host has the task of collecting all slave information and the task of exchanging information with the PCS unit; when there are multiple hosts in the system, the host is re-competed according to the above principles; if the host is powered off, the other slaves will re-compete for the host. Specifically, the following is combined with Figure 6 As shown, additional explanation is given; first, if the CAN communication bus detects multiple hosts, the host is judged as an unknown machine, and everyone competes for the host again according to the above method; second, if the CAN communication bus detects that the host is lost, the slave becomes an unknown machine, and then competes for the host again according to the above method; third, if the unknown machine receives a command from the host or fails to compete for the host, it becomes a slave.

[0045] In one embodiment, each device includes a battery cluster in addition to a high-voltage box, and the high-voltage box is connected to the battery cluster, and the battery cluster includes a BAT1 battery cluster, a BAT2 battery cluster, and a BAT3 battery cluster; the S1, obtaining the serial numbers of multiple high-voltage boxes of the system, and uploading the serial numbers of the multiple high-voltage boxes to the CAN communication bus of the energy storage system, includes: S11, writing the serial numbers corresponding to the first high-voltage box, the second high-voltage box, and the third high-voltage box into each corresponding MCU in the first BCU control board, the second BCU control board, and the third BCU control board, and then encoding the serial numbers into respective data packets through the MCU to form respective CAN-ID first identification numbers, CAN-ID second identification numbers, and CAN-ID third identification numbers, and confirming them as the respective addresses of the BAT1 battery cluster, the BAT2 battery cluster, and the BAT3 battery cluster, and each actively uploading the serial number to the CAN communication bus.

[0046] In one embodiment, S2, transmitting data information through the CAN communication bus to determine whether the serial numbers of multiple high-voltage boxes meet the preset requirements, includes: S21, transmitting data information through the CAN communication bus, traversing the identification results of the serial numbers of multiple high-voltage boxes, and determining whether the number of identification results is equal to the preset number. If they are equal, it meets the preset requirements; if they are not equal, it does not meet the preset requirements.

[0047] In one embodiment, the S3, if the serial numbers of multiple high-voltage boxes meet the preset requirements, the master-slave competition is carried out according to the first arrangement result obtained by arranging the serial numbers of the multiple high-voltage boxes, and the master and the slave are obtained, including: S31, if the serial numbers of multiple high-voltage boxes meet the preset requirements, data information is transmitted through the CAN communication bus, the 8 to 10-bit serial numbers of the multiple high-voltage boxes are arranged and arbitrated, and the arrangement and arbitration process is recorded, and the largest number among the serial numbers is confirmed as the master by default, and the remaining equipment machines are confirmed as slaves, thereby completing the master-slave competition. Among them, the serial number can be 8, 9 or 10 digits, and the specific number of digits is manually confirmed according to the actual situation, as long as there is no conflict in a large amount of data; if it is too long, it will occupy more MCU resources, and if it is too short, it will not be able to cope with large-scale research and development and production; in short, the 8 to 10-digit serial number in this application has obvious advantages compared with at least 12-digit MCU-ID identification numbers, and is more convenient and more suitable for actual research and development and production.

[0048] In one embodiment, among the MCU-ID identification numbers, the unrecognized MCU-ID identification numbers include MCU-ID identification numbers other than the first MCU-ID identification number to the third MCU-ID identification number; after the step S31, the method further includes: obtaining the CAN-ID identification number recognized by the CAN communication bus each time, then determining the address of the BCU control board, and then speeding up the sending cycle of the unrecognized CANID, that is, the success rate of the unrecognized MCU-ID identification number can be increased, so as to identify other unrecognized MCU-ID identification numbers, and then corresponding to the MCU-ID identification number, it can be concluded that all CAN-ID identification numbers are identifiable identification numbers.

[0049] In one embodiment, the S4, if the serial numbers of the multiple high-voltage boxes do not meet the preset requirements, a master-slave competition is performed according to the second arrangement result obtained by arranging the MCU-ID identification numbers of the multiple BCU control boards to obtain the master and the slave, including: if the serial numbers of the multiple high-voltage boxes do not meet the preset requirements, it means that there is an error or omission in the serial number itself, then at least 12 digits of the MCU-ID identification numbers of the multiple BCU control boards are encoded into their respective data packets to form their respective CAN-ID identification numbers, that is, the first identification number of the MCU-ID corresponds to the first identification number of the CAN-ID, the second identification number of the MCU-ID corresponds to the second identification number of the CAN-ID, and the third identification number of the MCU-ID corresponds to the CA N-ID third identification number; control MCU to confirm the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number as the respective addresses of BAT1 battery cluster, BAT2 battery cluster, BAT3 battery cluster, and each BCU control board actively uploads the CAN-ID first identification number, CAN-ID second identification number, CAN-ID third identification number to the CAN communication bus, transmits data information through the CAN communication bus, arranges and arbitrates the CAN-ID identification numbers, and records the arrangement and arbitration process. By default, the device with the largest number among the CAN-ID identification numbers is confirmed as the host, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition.

[0050] In one embodiment, the data information is transmitted through the CAN communication bus, and the CAN-ID identification number is arranged and arbitrated, including: controlling the BAT1 battery cluster to send the data packet after T-max, and then the BAT2 battery cluster and the BAT3 battery cluster send data packets within the time of T-max-t1, so as to ensure that the CAN communication bus will receive the data packet ID-1 corresponding to the BAT1 battery cluster; in the next stage, controlling the BAT1 battery cluster and the BAT3 battery cluster to send data packets within the time interval of T-max-t1, and the BAT2 battery cluster to send data packets within the time interval of (T-max-t1)×2, so as to ensure that the CAN communication bus will receive the data packet ID-3 corresponding to the BAT3 battery cluster; in the next stage, controlling the BAT1 battery cluster, the BAT2 battery cluster and the BAT3 battery cluster to send data packets within the time interval of (T-max-t1)×2, so as to ensure that the CAN communication bus will receive the data packet ID-2 corresponding to the BAT2 battery cluster.

[0051] In summary, the master-slave competition method and energy storage system for a bus described in the present application can, on the one hand, significantly reduce the complexity of the work of the on-site maintenance system, and on the other hand, can efficiently identify whether there are errors or omissions in the serial number attachment.

[0052] Example 2

[0053] See also Figure 7 As shown, Figure 7 This is a block diagram of an electronic device provided by the present invention. The electronic device can be a terminal or a server, wherein the terminal can be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device.

[0054] It includes a processor 111 , a communication interface 112 , a memory 113 , and a communication bus 114 , wherein the processor 111 , the communication interface 112 , and the memory 113 communicate with each other via the communication bus 114 .

[0055] The memory 113 is used to store computer programs.

[0056] In one embodiment of the present invention, the processor 111 is used to implement the method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113 .

[0057] It should be understood that in the embodiment of the present application, the processor 111 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0058] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0059] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions, but such implementation should not be considered to be beyond the scope of the present invention.

[0060] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0061] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0062] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0063] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0064] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A master-slave competition method for a bus, characterized in that: The method is used to select a master and a slave from a plurality of equipment machines of an energy storage system, each equipment machine includes a high-voltage box, and a BCU control board is arranged in each high-voltage box; the energy storage system includes a CAN communication bus, and the CAN communication bus connects a plurality of equipment machines; the master-slave competition method for the bus includes: S1, obtaining serial numbers of multiple high-voltage boxes of the system, and uploading the serial numbers of the multiple high-voltage boxes to the CAN communication bus of the energy storage system; S2, transmitting data information through the CAN communication bus to determine whether the serial numbers of multiple high-voltage boxes meet the preset requirements; S3, if the serial numbers of the multiple high-voltage boxes meet the preset requirements, a master-slave competition is performed according to the first arrangement result obtained by arranging the serial numbers of the multiple high-voltage boxes to obtain a master and a slave; S4, if the serial numbers of multiple high-voltage boxes do not meet the preset requirements, a master-slave competition is performed according to the second arrangement result obtained by arranging the MCU-ID identification numbers of multiple BCU control boards to obtain the master and the slave.

2. The master-slave competition method for a bus according to claim 1, characterized in that: Each device includes a battery cluster in addition to a high-voltage box, the high-voltage box is connected to the battery cluster, and the battery cluster includes a BAT1 battery cluster, a BAT2 battery cluster, and a BAT3 battery cluster; The S1, obtaining serial numbers of multiple high-voltage boxes of the system, and uploading the serial numbers of the multiple high-voltage boxes to the CAN communication bus of the energy storage system, includes: S11, write the serial numbers corresponding to the first high-voltage box, the second high-voltage box, and the third high-voltage box into each corresponding MCU in the first BCU control board, the second BCU control board, and the third BCU control board, and then encode the serial numbers into their respective data packets through the MCU to form their respective CAN-ID first identification number, CAN-ID second identification number, and CAN-ID third identification number, and confirm them as the addresses of the BAT1 battery cluster, BAT2 battery cluster, and BAT3 battery cluster, and each actively uploads the serial number to the CAN communication bus.

3. The master-slave competition method for a bus according to claim 2, characterized in that: S2, transmitting data information via the CAN communication bus to determine whether the serial numbers of the plurality of high-voltage boxes meet the preset requirements, includes: S21, transmit data information through the CAN communication bus, traverse the identification results of the serial numbers of multiple high-voltage boxes, and determine whether the number of identification results is equal to the preset number. If they are equal, it meets the preset requirements; if they are not equal, it does not meet the preset requirements.

4. The master-slave competition method for a bus according to claim 3, characterized in that: In S3, if the serial numbers of the plurality of high-voltage boxes meet the preset requirements, a master-slave competition is performed according to a first arrangement result obtained by arranging the serial numbers of the plurality of high-voltage boxes to obtain a master and a slave, including: S31, if the serial numbers of multiple high-voltage boxes meet the preset requirements, data information is transmitted through the CAN communication bus, the 8 to 10-digit serial numbers of the multiple high-voltage boxes are arranged and arbitrated, and the arrangement and arbitration process is recorded. By default, the device with the largest serial number is confirmed as the master, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition.

5. The master-slave competition method for a bus according to claim 4, characterized in that: Among the MCU-ID identification numbers, the unrecognized MCU-ID identification numbers include MCU-ID identification numbers other than the first MCU-ID identification number to the third MCU-ID identification number; After the step S31, the method further includes: Get the CAN-ID identification number recognized by the CAN communication bus each time, then determine the address of the BCU control board, and then speed up the sending cycle of the unrecognized CANID, which can increase the success rate of the unrecognized MCU-ID identification number, so as to identify other unrecognized MCU-ID identification numbers, and then correspond to the MCU-ID identification number to obtain that all CAN-ID identification numbers are identifiable identification numbers.

6. The master-slave competition method for a bus according to claim 3, characterized in that: In S4, if the serial numbers of the multiple high-voltage boxes do not meet the preset requirements, a master-slave competition is performed according to the second arrangement result obtained by arranging the MCU-ID identification numbers of the multiple BCU control boards to obtain a master and a slave, including: If the serial numbers of multiple high-voltage boxes do not meet the preset requirements, indicating that there are errors or omissions in the serial numbers themselves, at least 12 digits of the MCU-ID identification numbers of the multiple BCU control boards are encoded into their respective data packets to form their respective CAN-ID identification numbers, that is, the first identification number of the MCU-ID corresponds to the first identification number of the CAN-ID, the second identification number of the MCU-ID corresponds to the second identification number of the CAN-ID, and the third identification number of the MCU-ID corresponds to the third identification number of the CAN-ID; The control MCU confirms the CAN-ID first identification number, CAN-ID second identification number, and CAN-ID third identification number as the respective addresses of the BAT1 battery cluster, the BAT2 battery cluster, and the BAT3 battery cluster, and each BCU control board actively uploads the CAN-ID first identification number, CAN-ID second identification number, and CAN-ID third identification number to the CAN communication bus, transmits data information through the CAN communication bus, arranges and arbitrates the CAN-ID identification numbers, and records the arrangement and arbitration process. By default, the CAN-ID with the largest number is confirmed as the master, and the remaining devices are confirmed as slaves, thereby completing the master-slave competition.

7. The master-slave competition method for a bus according to claim 6, characterized in that: The data information is transmitted through the CAN communication bus, and the CAN-ID identification number is arranged and arbitrated, including: After the BAT1 battery cluster is controlled to send the data packet after T-max, the BAT2 battery cluster and the BAT3 battery cluster send data packets within the time of T-max-t1 respectively to ensure that the CAN communication bus will receive the data packet ID-1 corresponding to the BAT1 battery cluster; in the next stage, the BAT1 battery cluster and the BAT3 battery cluster are controlled to send data packets within the interval of T-max-t1, and the BAT2 battery cluster sends data packets within the interval of (T-max-t1)×2 to ensure that the CAN communication bus will receive the data packet ID-3 corresponding to the BAT3 battery cluster; in the next stage, the BAT1 battery cluster, the BAT2 battery cluster and the BAT3 battery cluster are controlled to send data packets within the interval of (T-max-t1)×2 to ensure that the CAN communication bus will receive the data packet ID-2 corresponding to the BAT2 battery cluster.

8. An energy storage system, characterized in that: The energy storage system includes a plurality of equipment machines, and the energy storage system is used to execute the master-slave competition method as described in any one of claims 1 to 7, and then select a master machine and a slave machine from the plurality of equipment machines of the energy storage system.

Citation Information

Cited By

  • Control method, control device and battery management system

    CN119906075A