Battery communication address allocation method for communication energy-storage system, device and storage medium
By adopting the CAN bus-based address contention method in the communication energy storage system, the problem of the limited number of parallel RS485 bus connections was solved, realizing efficient and automated address allocation and self-organizing network of lithium battery networking.
Patent Information
- Application Number
- PCT/CN2025/107825
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-23
- Filing Date
- 2025-07-10
- Publication Date
- 2026-01-29
AI Technical Summary
In existing communication energy storage systems, when lithium batteries are networked, the number of RS485 buses that can be connected in parallel is limited, making it difficult to meet the requirements of large-scale networking. Furthermore, the DIP switch method increases the cost of on-site site setup and is prone to failure.
A CAN bus-based inter-battery address contention method is adopted. Battery address allocation and self-organizing network are realized through the battery management unit. Intra-cluster and inter-cluster information communication is carried out using CAN1 bus and CAN2 bus. Multiple rounds of address contention are conducted to ensure that the communication address of each battery is unique.
It improves the efficiency and accuracy of address allocation, reduces external intervention and manual operation, and realizes automatic networking of communication energy storage systems.
Smart Images

Figure CN2025107825_29012026_PF_FP_ABST
Abstract
Description
Battery communication address allocation method, equipment and storage medium for communication energy storage systems
[0001] Cross-references
[0002] This application claims priority to Chinese Patent Application No. 202410986812.1, filed on July 23, 2024, entitled “Battery Communication Address Allocation Method, Device and Storage Medium for Communication Energy Storage System”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of communication energy storage technology, and in particular to a battery communication address allocation method, device and storage medium for a communication energy storage system. Background Technology
[0004] With the large-scale construction of 5G and the major trend of "lead phasing out and lithium advancing" under the dual carbon background, the installed capacity of lithium batteries for communication energy storage is expanding day by day. As lithium batteries gradually enter the core data center field and the photovoltaic energy storage field, the market demand for scenarios with multiple sets of lithium batteries in parallel is growing rapidly.
[0005] On the one hand, for lithium battery parallel operation scenarios, a common method is to connect lithium batteries in parallel via a Controller Area Network (CAN) and an RS485 bus, while the power supply connects to the same bus as the battery pack via RS485, allowing the power supply to manage the batteries. Due to signal attenuation, the number of RS485 master-slave parallel connections cannot exceed 32 groups. Therefore, this parallel networking structure can only support a maximum of 32 lithium battery groups, which is insufficient to meet the large-scale networking requirements of core equipment rooms and photovoltaic-storage scenarios. On the other hand, lithium battery networking requires a unique communication address. A commonly used solution is DIP switching, but this method requires on-site DIP switching, increasing on-site setup costs. Furthermore, DIP switching is prone to issues such as sticking, increasing the probability of failure. Summary of the Invention
[0006] This application provides a battery communication address allocation method, device, and storage medium for a communication energy storage system. It enables address contention between batteries based on a CAN bus, completing battery address allocation and self-organizing networking within the communication energy storage system, thus improving address allocation efficiency and accuracy. The technical solution is as follows:
[0007] On one hand, a method for allocating battery communication addresses in a communication energy storage system is provided. The method is executed by a battery management unit within the communication energy storage system. The method includes: performing N rounds of address contention for any target battery; obtaining an address contention result after a contention termination condition is met; the address contention termination condition indicates that the battery addresses of each battery in the communication energy storage system are different; the target battery is a battery in at least two battery clusters included in the communication energy storage system; N is a positive integer; determining the communication address of the target battery based on the address contention result; wherein, during each round of address contention, an address contention command is broadcast via a CAN bus based on the target battery address in the current round; the address contention command includes a unique identifier of the target battery and a CAN2 identifier indicating the connection status with a second controller area network (CAN2) bus; the CAN2 bus is used for information communication between battery clusters; receiving a response packet corresponding to the address contention command, the response packet including a unique identifier and a CAN2 identifier; updating the battery address of the target battery based on the unique identifier and the CAN2 identifier in the response packet, and performing the next round of address contention based on the updated battery address of the target battery.
[0008] On the other hand, a communication energy storage system is provided, which includes a battery management unit, a CAN1 bus, and a CAN2 bus; the CAN1 bus is used for information communication within a battery cluster, and the CAN2 bus is used for information communication between battery clusters; the battery management unit is used to implement the above-mentioned communication address allocation method through the CAN1 bus and the CAN2 bus.
[0009] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the battery communication address allocation method of the above-described communication energy storage system.
[0010] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, the computer program being loaded and executed by a processor to implement the battery communication address allocation method of the above-described communication energy storage system.
[0011] On the other hand, a computer program product is provided, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to execute to implement the battery communication address allocation method for the communication energy storage system provided in the above-described various optional implementations. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0013] Figure 1 shows a schematic diagram of the structure of a communication energy storage system provided in an exemplary embodiment of this application;
[0014] Figure 2 shows a schematic diagram of a battery self-organizing network provided in an exemplary embodiment of this application;
[0015] Figure 3 shows a flowchart of a battery communication address allocation method for a communication energy storage system provided in an exemplary embodiment of this application;
[0016] Figure 4 shows a flowchart of a battery communication address allocation method for a communication energy storage system provided in an exemplary embodiment of this application;
[0017] Figure 5 illustrates a schematic diagram of an address contention process provided in an exemplary embodiment of this application;
[0018] Figure 6 shows a flowchart of an inter-cluster address allocation method for a communication energy storage system provided in an exemplary embodiment of this application;
[0019] Figure 7 shows a flowchart of an intra-cluster address allocation method for a communication energy storage system provided in an exemplary embodiment of this application;
[0020] Figure 8 shows a flowchart of a battery communication address allocation method in a communication energy storage system provided in an exemplary embodiment of this application;
[0021] Figure 9 illustrates a schematic diagram of a host arbitration process provided in an exemplary embodiment of this application;
[0022] Figure 10 shows a schematic diagram of host arbitration logic provided in an exemplary embodiment of this application;
[0023] Figure 11 shows a schematic diagram of a slave arbitration process provided in an exemplary embodiment of this application;
[0024] Figure 12 shows a schematic diagram of slave arbitration logic provided in an exemplary embodiment of this application;
[0025] Figure 13 shows an overall operation flowchart of a communication energy storage system provided in an exemplary embodiment of this application;
[0026] Figure 14 shows a structural block diagram of a computer device illustrated in an exemplary embodiment of this application. Detailed Implementation
[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0028] To address the issue that current communication energy storage networking schemes require batteries to rely on power sources for networking, thus failing to meet the requirements of large-scale networking, this application provides a communication energy storage system applicable to scenarios such as communication base stations, core computer rooms, aggregation computer rooms, data centers, and photovoltaic energy storage power stations. Figure 1 shows a schematic diagram of the communication energy storage system provided in an exemplary embodiment of this application. As shown in Figure 1, the communication system includes a battery management unit 110, a CAN1 bus 120, and a CAN2 bus 130. The CAN1 bus is used for information communication within battery clusters, and the CAN2 bus is used for information communication between battery clusters. The battery management unit is used to implement a battery communication address allocation method for the communication energy storage system through the CAN1 bus and the CAN2 bus.
[0029] The battery management unit is the core control unit of the communication energy storage system, responsible for the main business management, such as management business, address contention business, and information collection business. All kinds of buses and modules involved in the system are controlled by it. The CAN1 bus is used for information communication within the battery cluster, such as address contention and intra-cluster communication. The CAN2 bus is used for information communication between battery clusters, such as inter-cluster address contention and inter-cluster communication.
[0030] The battery cell itself does not have independent communication functions. In the communication energy storage system, the communication and control functions of the battery cell are provided by the battery management unit. The battery management unit is responsible for monitoring and controlling the status of one or more groups of battery cells, such as the status of battery cells in one or more battery clusters. The battery management unit can be set up with sub-modules corresponding to each battery cell to realize the interaction between the battery cells. For ease of understanding and explanation, the interaction description in the following embodiments uses the battery as the interaction subject. However, it should be clear that the actual interaction subject is the sub-module corresponding to the battery.
[0031] Figure 2 illustrates a schematic diagram of a battery self-organizing network provided in an exemplary embodiment of this application. As shown in Figure 2, when performing battery self-organizing networking through the above system, after the battery is connected, the battery management unit allocates battery cluster addresses based on the connection status with the CAN2 bus. After address contention through the address allocation method provided in the following embodiments of this application, a cluster-level address can be allocated to each battery cluster. The inter-cluster addresses of all battery units within this battery cluster are the same. The battery connected to the CAN2 bus within the same battery cluster is called the intra-cluster master battery 210. After the battery cluster address allocation is completed, the intra-cluster batteries (including intra-cluster master batteries and slave batteries) connected to the CAN1 bus undergo address redistribution through the CAN1 bus to obtain the intra-cluster address of each battery, ensuring that the battery address is unique. Thus, a unique communication address is generated based on the inter-cluster address and intra-cluster address of each battery. Therefore, by confirming the unique communication addresses of the inter-cluster master batteries, intra-cluster master batteries, and each battery unit in the communication energy storage system through the battery communication address allocation method, a self-organizing network of the communication energy storage system can be realized.
[0032] In this embodiment, the communication energy storage system further includes a power control unit (DC / DC conversion module) 140. The power control unit 140 and the battery management unit 110 can communicate via an SCI (Serial Communication Interface).
[0033] The battery management unit is also used for intra-cluster current sharing control based on the CAN1 bus, DC / DC conversion module and the communication address of each battery, and inter-cluster current sharing control through the CAN2 bus, DC / DC conversion module and the communication address of each battery.
[0034] In other words, after the communication energy storage system completes its self-organizing network, the batteries within the battery cluster exchange current sharing information via the CAN1 bus. The battery management unit can use the current sharing algorithm to calculate the target voltage and current, and control the DC / DC conversion module to adjust it to achieve current sharing within the cluster. The battery cluster-level host (i.e., the host battery within the cluster) exchanges current sharing information via the CAN2 bus. The battery management unit can use the current sharing algorithm to calculate the target voltage and current, and control the DC / DC conversion module to adjust it to achieve current sharing between clusters.
[0035] In this embodiment of the application, the battery management unit also includes an RS485 bus 150 and an Ethernet FE bus 160.
[0036] The RS485 bus is connected to the battery management unit and is used to obtain battery information within each battery cluster; the RS485 bus is also an energy storage backup bus used for slow acquisition of information within the cluster.
[0037] The Ethernet FE bus is connected to the battery system host in the communication energy storage system and is used to upload the aggregated battery information collected by the battery system host to the network management device; the aggregated battery information includes the battery information in each battery cluster.
[0038] After completing the battery address allocation in the communication energy storage system, the battery management unit determines the battery system host in the battery based on the connection with the FE bus. The battery system host can be any type of host battery. For example, as shown in Figure 2, the battery system host can be an inter-cluster host battery 220, or it can be a non-inter-cluster host battery, determined based on the connection with the FE bus. This application does not impose any restrictions on this.
[0039] During information transmission, the host battery within the cluster collects and summarizes the information of each battery unit within the battery cluster. The battery system host collects the summarized battery information of each host battery within the cluster, summarizes it again, and obtains the summarized battery information of the entire battery system, which is then transmitted to the network management device via the Ethernet port.
[0040] With the above-mentioned communication energy storage system, it can be directly connected to network management equipment without the need for a power supply or data acquisition unit (Field Supervisory Unit, FSU). The battery cells that make up the system are all the same, and the automatic construction of the system network architecture is mainly completed by the battery communication address allocation method.
[0041] Based on the communication energy storage system shown in Figure 1, this application provides a battery communication address allocation method for the communication energy storage system. This method is used to automatically complete address allocation and self-organizing network based on CAN bus address contention, without external intervention, and can improve address allocation efficiency. Figure 3 shows a flowchart of the battery communication address allocation method for the communication energy storage system provided in an exemplary embodiment of this application. This method can be executed by the battery management unit in the communication energy storage system shown in Figure 1, which can be implemented as a server. As shown in Figure 3, the method includes the following steps.
[0042] Step 310: Perform N rounds of address competition for any target battery, and obtain the address competition result after the address competition termination condition is met; the address competition termination condition indicates that the battery addresses of each battery in the communication energy storage system are different; the target battery is a battery in at least two battery clusters contained in the communication energy storage system; N is a positive integer.
[0043] In a communication-based energy storage system, to ensure that each battery has a unique communication address for subsequent control operations such as current sharing, the battery communication address allocation is performed through address contention. This process can involve multiple rounds, and each battery may have completed a different number of address contention rounds by the time the contention ends. By executing multiple rounds of address contention, the system can gradually allocate addresses, thereby avoiding address allocation chaos and ensuring that each battery obtains a unique communication address.
[0044] In this embodiment, the address contention process of each battery can be performed synchronously. For ease of explanation, the address contention process of the target battery is used as an example. While each battery broadcasts an address contention command based on its own battery address, it may also receive address contention commands broadcast by other batteries based on their corresponding battery addresses. Therefore, in order to ensure that the battery addresses of each battery in the communication energy storage system do not conflict, the address contention termination condition can be that each battery continuously detects address contention commands until each battery has not received an address contention command for n consecutive cycles, where n is a positive integer; indicating that there is no battery address conflict on the CAN bus, and the address contention ends.
[0045] Step 320: Determine the communication address of the target battery based on the address contention result.
[0046] The address contention result contains the battery address of the target battery if the address contention termination condition is met. Therefore, the process can determine the communication address of the target battery based on the battery address of the target battery indicated in the address contention result.
[0047] The address contention process in each round includes the following steps.
[0048] S311, based on the battery address of the target battery in the current cycle, broadcasts an address contention command via the CAN bus; the address contention command contains the unique identifier of the target battery and a CAN2 identifier used to indicate the connection status with the second controller area network CAN2 bus; the CAN2 bus is used for information communication between battery clusters.
[0049] Table 1 shows the CAN communication data frame format design of the address contention instruction provided in an exemplary embodiment of this application:
[0050] Table 1
[0051] As shown in Table 1, the address contention instruction carries the battery's own address, unique identifier, and CAN2 identifier. The unique identifier is a unique identifier for each battery; illustratively, this unique identifier can be the battery's SN (Serial Number), or other unique number for each battery. The CAN2 identifier indicates whether the battery is connected to the CAN2 bus, i.e., whether the battery is the host battery within the cluster. Illustratively, the CAN2 identifier is 1 when the battery is connected to the CAN2 bus, and 0 when the battery is not connected to the CAN2 bus.
[0052] It should be noted that, since the battery addresses of each battery change over time during the address contention process, multiple address contention commands can be sent in each round without receiving a response, until a reply is received or the specified number of command transmissions is reached, at which point subsequent judgments can be made.
[0053] S312 receives a response packet corresponding to the address contention instruction feedback, which contains a unique identifier and a CAN2 identifier.
[0054] Based on its current battery address, the target battery broadcasts an address contention command containing its unique identifier and CAN2 identifier via the CAN bus. Correspondingly, the battery receiving this address contention command can obtain the target battery's current battery address and compare its own battery address (the one that received the command) with the target battery's current battery address. If a conflict exists, a response packet is sent corresponding to the address contention command; otherwise, no response is sent. In other words, if the target battery receives a response packet, it means that there is a battery in the current round whose address conflicts with the target battery address, and the target battery needs to update its battery address.
[0055] S313 updates the target battery address based on the unique identifier and CAN2 identifier in the return packet, so as to conduct the next round of address competition based on the updated target battery address.
[0056] In one possible implementation, the target battery compares the unique identifier and CAN2 identifier in the return packet with the unique identifier and CAN2 identifier of the local unit (i.e., the target battery) to determine whether the target battery address needs to be updated. If it is determined that the target battery address needs to be updated, the target battery address is updated. If it is determined that the target battery address does not need to be updated, the current battery address remains unchanged, and the next round of address contention begins.
[0057] The address update method for the battery address can be set based on actual needs. For example, the address update method can be +a or -a, where a is a positive integer, such as +1 based on the current battery address. The address update method and address change parameters can be set based on actual needs, and this application does not impose any restrictions on them. The following embodiments use the update method of +1 based on the current battery address as an example for illustration.
[0058] After updating the battery address of the target battery in the current round, the address competition in the next round is conducted based on the updated battery address, until the address competition ends when the condition is met.
[0059] In summary, the battery communication address allocation method for a communication energy storage system provided in this application involves multiple rounds of address competition among the batteries in the communication energy storage system. After the address competition ends based on a given end condition, the battery address of each battery is obtained, indicating the address competition result. This allows for the determination of the communication address of each battery based on its address. During each round of address competition, each battery can broadcast an address competition command via the CAN bus based on its current battery address. This command includes the battery's unique identifier and a CAN2 identifier. If a response packet corresponding to the address competition command is received, an update judgment is made based on the unique identifier and CAN2 identifier in the response packet. If an update is required, the target battery's address is updated, and the next round of address competition is based on the updated target battery address. This method enables address competition between batteries via the CAN bus, completing battery address allocation and self-organizing networking in the communication energy storage system. This reduces external intervention and manual operation, improving address allocation efficiency and accuracy.
[0060] In this embodiment of the application, the battery address includes inter-cluster address and intra-cluster address. When determining the communication address of the battery, it is necessary to comprehensively determine the intra-cluster address and inter-cluster address. Figure 4 shows a flowchart of a battery communication address allocation method for a communication energy storage system provided by an exemplary embodiment of the present application. This method can be executed by the battery management unit in the communication energy storage system shown in Figure 1. The battery management unit can be implemented as a server. As shown in Figure 4, the method includes the following steps.
[0061] Step 410: Perform N rounds of address competition for any target battery, and obtain the address competition result after the address competition termination condition is met; the address competition termination condition indicates that the battery addresses of each battery in the communication energy storage system are different; the target battery is a battery in at least two battery clusters contained in the communication energy storage system; N is a positive integer.
[0062] Step 420: Based on the inter-cluster address and intra-cluster address of the target battery indicated by the address contention result, and the number of batteries within the target battery cluster to which the target battery belongs, determine the communication address of the target battery.
[0063] Indicatively, the formula for calculating this communication address can be expressed as: Addrbat = (Addrcb - 1) * M + Addrci.
[0064] Where Addrbat is the communication address, Addrcb is the inter-cluster address, Addrci is the intra-cluster address, and M is the total number of cells in the cell cluster to which the target cell belongs.
[0065] This communication address can be used as a communication identifier when communicating via RS485 bus and FE bus.
[0066] Each round of address contention includes the following steps.
[0067] S411, based on the battery address of the target battery in the current cycle, broadcasts an address contention command via the CAN bus; the address contention command contains the unique identifier of the target battery and a CAN2 identifier used to indicate the connection status with the second controller area network CAN2 bus; the CAN2 bus is used for information communication between battery clusters.
[0068] S412 receives a response packet corresponding to the address contention instruction feedback, which contains a unique identifier and a CAN2 identifier.
[0069] S413, if the battery address of the target battery meets the address update condition based on the unique identifier in the return packet and the CAN2 identifier, the battery address of the target battery is updated so that the next round of address competition can be carried out based on the updated battery address.
[0070] In this embodiment, the target battery can determine whether the address update conditions are met based on the received response packet. If the address update conditions are met, the battery address of the target battery is updated. The address update conditions include: the CAN2 identifier in the response packet is different from the CAN2 identifier of the target battery, and the battery that sent the response packet has host priority based on the CAN2 identifier in the response packet and the CAN2 identifier of the target battery; or, the CAN2 identifier in the response packet is the same as the CAN2 identifier of the target battery, and the numerical relationship between the unique identifier of the target battery and the unique identifier in the response packet satisfies a specified size logic relationship.
[0071] In this context, the CAN2 identifier indicating that the battery in the feedback packet has host priority means that: the CAN2 identifier in the feedback packet is different from the CAN2 identifier of the target battery, and the CAN2 identifier in the feedback packet indicates that the battery is connected to the CAN2 bus (e.g., CAN2 identifier is 1), while the CAN2 identifier of the target battery indicates that the target battery is not connected to the CAN2 bus (e.g., CAN2 identifier is 0). In this case, the battery in the feedback packet has priority as the host battery within the cluster and has host priority. The battery address of the target battery meets the address update condition, and after updating the battery address of the target battery (e.g., +1), the next round of address contention begins. Conversely, if the CAN2 identifier in the feedback packet is the same as the CAN2 identifier of the target battery (e.g., both are 1 or both are 0), it indicates that the battery in the feedback packet has host priority. If all batteries are either host batteries within the cluster or slave batteries, a logical comparison of the unique identifiers of the batteries can be performed to determine if the address update condition is met, and the battery address of the target battery can be updated if a specified logical relationship is satisfied. This logical relationship can be customized based on actual conditions. For example, a specified logical relationship could be that the unique identifier of the target battery is greater than the unique identifier in the response packet; that is, if the unique identifier of the target battery is greater than the unique identifier in the response packet, the battery address of the target battery is updated. Alternatively, the specified logical relationship could be that the unique identifier of the target battery is less than the unique identifier in the response packet; that is, if the unique identifier of the target battery is less than the unique identifier in the response packet, the battery address of the target battery is updated. The following embodiment illustrates this by adding 1 to the battery address of the target battery when the unique identifier of the target battery is greater than the unique identifier in the response packet.
[0072] Furthermore, after determining that the address contention termination condition has been met and the address contention has been completed, the host battery can also generate an address contention identifier corresponding to this address contention and broadcast the address contention identifier so that the battery that receives the address contention identifier can store it to indicate that the battery participated in this address contention and use the address contention identifier as the identifier of this address contention activity.
[0073] Figure 5 illustrates an address contention process provided by an exemplary embodiment of this application. As shown in Figure 5, the process includes the following steps.
[0074] S501, receive address contention trigger command.
[0075] S502 sends multiple address contention commands.
[0076] S503: Determine whether a response packet corresponding to an address contention instruction has been received. If yes, execute S504; otherwise, execute S507.
[0077] S504, extract the unique identifier and CAN2 identifier from the return packet.
[0078] S505: Determine if the CAN2 flag in the return packet is 1. If it is, increment the local address by 1 and proceed to the next round of address contention. Otherwise, execute S506.
[0079] S506: Determine if the unique identifier in the return packet is less than the unique identifier of the local machine. If so, execute S507; otherwise, increment the local address by 1 and proceed to the next round of address contention.
[0080] S507, maintain the current address.
[0081] The S508 terminates address contention if no address contention instruction is received within n cycles.
[0082] S509, the host battery generates and sends an address contention identifier.
[0083] In summary, the battery communication address allocation method for a communication energy storage system provided in this application involves multiple rounds of address competition among the batteries in the communication energy storage system. After the address competition ends based on a given end condition, the battery address of each battery is obtained, indicating the address competition result. This allows for the determination of the communication address of each battery based on its address. During each round of address competition, each battery can broadcast an address competition command via the CAN bus based on its current battery address. This command includes a unique identifier and a CAN2 identifier for the corresponding battery. If a response packet corresponding to the address competition command is received, an update judgment is made based on the unique identifier and CAN2 identifier in the response packet. If an update is required, the target battery's address is updated, and the next round of address competition is based on the updated target battery address. This method enables address competition between batteries via the CAN bus, facilitating battery address allocation and self-organizing networks in the communication energy storage system. This reduces external intervention and manual operation, improving address allocation efficiency and accuracy.
[0084] In this embodiment, the CAN bus includes a CAN1 bus for intra-cell communication and a CAN2 bus for inter-cell communication. Battery addresses include inter-cell addresses and intra-cell addresses. Therefore, address conflicts can occur either inter-cell or intra-cell address conflicts. Correspondingly, address contention can be either inter-cell or intra-cell. Inter-cell address contention can also be referred to as CAN2 bus address contention, meaning address contention implemented via the CAN2 bus. Intra-cell address contention can also be referred to as CAN1 bus address contention, meaning address contention implemented via the CAN1 bus. The battery communication address allocation method for the communication energy storage system shown in Figure 3 or Figure 4 can be applied to scenarios where intra-cell address allocation is performed based on the CAN1 bus, where the updated battery address is an intra-cell address. It can also be applied to scenarios where inter-cell address allocation is performed based on the CAN2 bus, where the updated battery address is an inter-cell address.
[0085] In the case of inter-cluster address contention, the CAN2 identifier of each battery is set to the same value. Since the inter-cluster address contention occurs between batteries connected to the CAN2 bus, the actual CAN2 identifier of each battery is 1. Alternatively, in the case of inter-cluster address contention, the CAN2 identifier of the batteries connected to the CAN2 bus can be uniformly set to 0, indicating that the host priority indicated by the CAN2 identifier is not considered when performing update condition judgment. Figure 6 shows a flowchart of an inter-cluster address allocation method for a communication energy storage system provided by an exemplary embodiment of this application. This method can be executed by the battery management unit in the communication energy storage system shown in Figure 1. The battery management unit can be implemented as a server. As shown in Figure 6, the method includes the following steps.
[0086] Step 610: Perform N rounds of inter-cluster address competition on any target battery connected to the CAN2 bus via the CAN2 bus. After the address competition ends under the condition that N is satisfied, obtain the first address competition result; N is a positive integer.
[0087] In the scenario of inter-cluster address allocation, the target battery is any battery connected to the CAN2 bus. After the battery is powered on, the inter-cluster address of the battery is 1 by default. The inter-cluster address contention command is actively broadcast on the CAN2 bus for N rounds using the broadcast method. The inter-cluster address contention command contains the battery's unique identifier and the CAN2 identifier.
[0088] Step 620: Determine the inter-cluster address of the target cell based on the result of the first address competition.
[0089] The first address contention result includes the inter-cluster addresses of each battery, and the inter-cluster addresses of each battery in the first address contention result do not conflict.
[0090] The address contention process in each round includes the following steps.
[0091] S611 broadcasts an inter-cluster address contention command via the CAN2 bus based on the inter-cluster address of the target battery in the current round.
[0092] Correspondingly, the battery connected to the CAN2 bus receives an inter-cluster address contention instruction based on the target battery's inter-cluster address broadcast.
[0093] S612 receives the first packet corresponding to the inter-cluster address contention instruction, the first packet containing a unique identifier.
[0094] For each battery that receives the inter-cluster address contention instruction, if it is determined that there is no conflict with the inter-cluster address of the target battery, no feedback is sent. If a conflict is determined to exist, a first response packet is sent. Therefore, if the target battery does not receive the first response packet corresponding to the inter-cluster address contention instruction, it means that there is no battery in the current round that conflicts with the target battery's inter-cluster address, and the target battery's inter-cluster address is not updated, and the next round of inter-cluster address contention begins. If the target battery receives the first response packet corresponding to the inter-cluster address contention instruction, it means that there is a battery in the current round that conflicts with the target battery's inter-cluster address, and an update judgment is required to determine whether an inter-cluster address update is necessary.
[0095] The first packet also contains a CAN2 identifier. Since the CAN2 identifiers of all batteries participating in the inter-cluster contention process are the same, the inter-cluster address of the target battery is subsequently determined based on the unique identifier in the first packet.
[0096] S613, if the address update condition is met based on the first return packet, the inter-cluster address of the target battery is updated so as to carry out the next round of inter-cluster address competition based on the updated inter-cluster address of the target battery.
[0097] If the address update condition is met based on the unique identifier in the first packet, it indicates that the inter-cluster address of the target battery needs to be updated. The inter-cluster address of the target battery is updated according to the address update method preset in the address update method. Specifically, if the unique identifier of the target battery is greater than the unique identifier in the first packet, it is determined that the inter-cluster address of the target battery needs to be updated. If the unique identifier of the target battery is less than the unique identifier in the first packet, the inter-cluster address of the target battery is not changed.
[0098] Each battery connected to the CAN2 bus synchronously competes for inter-cluster addresses. While broadcasting inter-cluster address competition instructions, each battery also receives inter-cluster address competition instructions broadcast by other batteries. Therefore, if each battery does not receive an inter-cluster address competition instruction for n consecutive cycles, it indicates that there is no battery address conflict on the CAN2 bus, and the inter-cluster address competition ends.
[0099] After the inter-cluster address contention ends, the inter-cluster host battery is determined based on the inter-cluster address of each battery; an inter-cluster address contention identifier is generated based on the battery characteristic information of the inter-cluster host battery; the inter-cluster address contention identifier is broadcast to the batteries of each battery cluster via the CAN2 bus, so that the batteries in each battery cluster store the inter-cluster address contention identifier.
[0100] In one possible implementation, when the address update method is to increase the value based on the current battery address, the battery management unit can sort based on the inter-cluster address and determine the one with the smallest inter-cluster address value as the inter-cluster host battery; conversely, when the address update method is to decrease the value based on the current battery address, the battery management unit determines the one with the largest inter-cluster address value as the inter-cluster host battery.
[0101] Alternatively, the battery management unit can also obtain the connection status of each battery to the Ethernet FE bus and identify the battery connected to the Ethernet FE bus as the inter-cluster host battery.
[0102] When generating the inter-cluster address contention identifier, the inter-cluster host battery can obtain its own battery characteristic information. This battery characteristic information refers to information unique to the inter-cluster host battery, such as the CRC4 (Cyclic Redundancy Check 4) value or SN value of the battery's SM (Sensor Module), or other unique attributes of the battery. The inter-cluster host battery can directly determine the value of this battery characteristic information as the inter-cluster address contention identifier. Alternatively, the inter-cluster host battery can perform mathematical processing on the battery characteristic information to generate the inter-cluster address contention identifier, such as performing hash calculations on the battery characteristic information. Or, in another possible implementation, the inter-cluster host battery can obtain a random number and determine this random number as the inter-cluster address contention identifier.
[0103] After obtaining the inter-cluster address contention identifier, the inter-cluster master battery broadcasts the inter-cluster address contention identifier through the CAN2 bus. Correspondingly, each battery connected to the CAN2 bus receives and stores the inter-cluster address contention identifier. Furthermore, each battery connected to the CAN2 bus can also broadcast the received inter-cluster address contention identifier to each slave battery in the corresponding battery cluster through the CAN1 bus, so that each slave battery also stores the inter-cluster address contention identifier.
[0104] In the case of intra-cluster address contention, the CAN2 identifier of each battery is determined based on the connection status of each battery to the CAN2 bus. The CAN2 identifier of the battery connected to the CAN2 bus is 1, and the CAN2 identifier of the battery not connected to the CAN2 bus is 0. Since intra-cluster address allocation is performed within each battery cluster, and the intra-cluster address allocation process is the same for each battery cluster, the process of intra-cluster address allocation within a battery cluster is used as an example for explanation. Figure 7 shows a flowchart of an intra-cluster address allocation method for a communication energy storage system provided in an exemplary embodiment of this application. This method can be executed by the battery management unit in the communication energy storage system shown in Figure 1. The battery management unit can be implemented as a server. As shown in Figure 7, the method includes the following steps.
[0105] Step 710: Perform N rounds of intra-cluster address competition for any target battery within the same battery cluster via the CAN1 bus. After the address competition termination condition is met, obtain the second address competition result.
[0106] In the scenario of intra-cluster address allocation, the target battery is any battery within a battery cluster. After the battery is powered on, the intra-cluster address of the battery is 1 by default. The intra-cluster address contention instruction is actively broadcast on the CAN1 bus for N rounds using the broadcast method. The intra-cluster address contention instruction contains the battery's unique identifier and the CAN2 identifier.
[0107] Step 720: Determine the intra-cluster address of the target battery based on the result of the second address contention.
[0108] The second address contention result includes the intra-cluster addresses of each battery in the battery cluster, and the intra-cluster addresses of each battery in the second address contention result do not conflict.
[0109] The process of each round of intra-cluster address contention includes the following steps.
[0110] S711 broadcasts a cluster address contention instruction via the CAN1 bus based on the cluster address of the target battery in the current round.
[0111] Correspondingly, the battery connected to the CAN1 bus receives an intra-cluster address contention instruction based on the intra-cluster address broadcast of the target battery.
[0112] S712 receives a second packet corresponding to an intra-cluster address contention instruction, the second packet containing a unique identifier and a CAN2 identifier.
[0113] For each battery that receives an intra-cluster address contention instruction, if it is determined that there is no conflict with the intra-cluster address of the target battery, no feedback is sent. If it is determined that there is a conflict with the inter-cluster address of the target battery, a second feedback packet is sent. Therefore, if the target battery does not receive the second feedback packet corresponding to the intra-cluster address contention instruction, it means that there is no battery in the current round that conflicts with the target battery's intra-cluster address, and the target battery's intra-cluster address is not updated, and the next round of intra-cluster address contention begins. If the target battery receives the second feedback packet corresponding to the intra-cluster address contention instruction, it means that there is a battery in the current round that conflicts with the target battery's intra-cluster address, and an update judgment is required to determine whether an intra-cluster address update is necessary.
[0114] S713, if the address update condition is met based on the second return packet, the intra-cluster address of the target battery is updated so as to carry out the next round of intra-cluster address competition based on the updated intra-cluster address of the target battery.
[0115] If the address update condition is met based on the CAN2 identifier and unique identifier in the second packet, the cluster address of the target battery needs to be updated according to a pre-defined address update method. Specifically, if the CAN2 identifier in the second packet indicates that the battery in the second packet has host priority (e.g., CAN2 identifier 1 in the second packet and CAN2 identifier 0 in the target battery), then the cluster address of the target battery needs to be updated. Alternatively, if the CAN2 identifier in the second packet indicates that the battery in the second packet does not have host priority (e.g., CAN2 identifier 0 in the second packet), the unique identifiers of the two are compared. If the unique identifier of the target battery is greater than the unique identifier in the second packet, then the cluster address of the target battery needs to be updated. If the CAN2 identifier in the second packet indicates that the battery in the second packet does not have host priority, and the unique identifier of the target battery is less than the unique identifier in the second packet, then the cluster address of the target battery remains unchanged.
[0116] Each battery connected to the CAN1 bus synchronously competes for intra-cluster addresses. While broadcasting intra-cluster address competition instructions, each battery also receives intra-cluster address competition instructions broadcast by other batteries. Therefore, if each battery does not receive an intra-cluster address competition instruction for n consecutive cycles, it indicates that there is no battery address conflict on the CAN1 bus, and the intra-cluster address competition ends.
[0117] After the intra-cluster address contention ends, the intra-cluster master battery is determined based on the intra-cluster addresses of each battery in the same battery cluster; an intra-cluster address contention identifier is generated based on the battery characteristic information of the intra-cluster master battery; the intra-cluster address contention identifier is broadcast to each slave battery in the battery cluster to which the intra-cluster master battery belongs via the CAN1 bus, so that each slave battery stores the intra-cluster address contention identifier.
[0118] In one possible implementation, when the address update method is to increase the value based on the current battery address, the battery management unit can sort based on the cluster address and determine the one with the smallest cluster address value as the host battery in the cluster; conversely, when the address update method is to decrease the value based on the current battery address, the battery management unit determines the one with the largest cluster address value as the host battery in the cluster.
[0119] When generating the inter-cluster address contention identifier, the host battery within the cluster can obtain its own battery characteristic information. This battery characteristic information refers to information unique to the host battery within the cluster. For example, it could be the CRC4 (Cyclic Redundancy Check 4) value or SN value of the battery's SM (Sensor Module), or other attributes unique to the battery. The host battery within the cluster can directly determine the value of this battery characteristic information as the inter-cluster address contention identifier. Alternatively, the host battery within the cluster can perform mathematical processing on the battery characteristic information to generate the inter-cluster address contention identifier, such as performing hash calculations on the battery characteristic information. Or, in another possible implementation, the host battery within the cluster can obtain a random number and determine this random number as the inter-cluster address contention identifier.
[0120] After obtaining the intra-cluster address contention identifier, the master battery in the cluster broadcasts the intra-cluster address contention identifier to each slave battery in the battery cluster via the CAN1 bus. Correspondingly, each slave battery receives and stores the intra-cluster address contention identifier via the CAN1 bus.
[0121] In one possible implementation, after broadcasting and storing the intra-cluster address contention identifier, the intra-cluster master battery can also count the number of batteries in the corresponding battery cluster based on the intra-cluster address contention identifier. This process can be implemented as follows: broadcasting a master arbitration information collection command via the CAN1 bus; receiving master arbitration response commands from each slave battery, which contain the intra-cluster address contention identifier stored in the slave battery; counting the number of slave batteries with the same intra-cluster address as the intra-cluster master battery based on each master arbitration response command; and determining the number of batteries in the battery cluster to which the intra-cluster master battery belongs based on the number of slave batteries.
[0122] The battery control unit broadcasts a host arbitration information collection command via the CAN1 bus based on the battery address of the host battery within the cluster. Correspondingly, each slave battery connected to the CAN1 bus, upon receiving this command, can send back a host arbitration response command. In one possible implementation, each slave battery responds to the host arbitration response command at a corresponding time interval, which is related to the value of the cluster address of each slave battery. Illustratively, this time interval can be expressed as L ms*(A+1), where L is a constant and A represents the cluster address of each slave battery. By setting the time interval, the data processing pressure caused by the host battery receiving a large number of host arbitration response commands simultaneously can be avoided.
[0123] All batteries on the CAN1 bus (including master batteries and slave batteries within the cluster) can receive the master arbitration information reply command. All non-master batteries discard this command. The master batteries within the cluster extract the cluster address contention identifier from the master arbitration information reply command and compare it with their own cluster address contention identifier to determine the number m of slave batteries with the same cluster address contention identifier. Thus, the total number of batteries in the battery cluster can be determined as M = m + 1.
[0124] After the battery communication address allocation within the communication energy storage system is completed based on inter-cluster address contention and intra-cluster address contention, the communication addresses of each battery in the system do not conflict with each other. In this case, if a battery is replaced due to a system battery failure, or if a new battery needs to be added, the unique identifier of the newly added battery will definitely be different from that of the existing batteries in the system, and the newly added battery has a high probability of conflicting with the battery address of the original battery, thus triggering a new address contention. This leads to a large-scale redistribution of addresses, causing confusion in the statistical data of upstream power sources or network management equipment. To avoid the above situation, the battery communication address allocation method in the communication energy storage system provided in this application can allocate communication addresses in the event of an address conflict caused by a newly added battery through address arbitration. This method can achieve the inheritance of the communication addresses already allocated in the original system while simultaneously allocating addresses for newly added batteries, ensuring the continuity of the transmitted network management data and improving the stability of the system.
[0125] Figure 8 shows a flowchart of a battery communication address allocation method in a communication energy storage system provided by an exemplary embodiment of this application. The method can be executed by a battery management unit, which can be implemented as a server. As shown in Figure 8, the method may include the following steps.
[0126] Step 810: Corresponding to the detection of communication address conflict, K rounds of address arbitration are performed on the arbitration battery with the address conflict. The address arbitration result is obtained after the address arbitration termination condition is met. The address arbitration termination condition indicates that the battery addresses of each battery in the communication energy storage system do not conflict. K is a positive integer.
[0127] In this embodiment, the battery management unit monitors the communication addresses of each battery in the communication energy storage system. If a communication address conflict is detected, the battery management unit can perform K rounds of address arbitration for the arbitrator battery with the address conflict. For example, if the number of newly added batteries is 1, since the communication addresses of each battery in the communication energy storage system do not conflict with each other, if an address conflict occurs, it may be because the communication address of the newly added battery conflicts with the communication address of one of the batteries in the communication energy storage system. The number of arbitrator batteries in each round is 2. As the number of newly added batteries increases, the number of arbitrator batteries will also increase in the event of a communication address conflict.
[0128] Step 820: Determine the communication address of each arbitration battery based on the address arbitration result.
[0129] The address arbitration result includes the battery address of each of the re-determined arbitration addresses. After the battery management unit extracts the updated battery address of the newly added battery, it can determine the communication address of the newly added battery in the communication energy storage system based on the updated battery address. The process of determining the communication address based on the battery address can be referred to the relevant content in the embodiment shown in Figure 4, and will not be repeated here.
[0130] The address arbitration process in each round includes the following steps.
[0131] S811 broadcasts address arbitration request instructions via the CAN1 bus based on the battery address of each arbitration battery in the current round. The address arbitration request instructions include the address contention identifier and unique identifier of the corresponding arbitration battery. The address contention identifier includes intra-cluster address contention identifier and inter-cluster address contention identifier.
[0132] S812 receives arbitration instructions corresponding to the arbitration request instructions for each address via the CAN1 bus; the arbitration instructions contain population information generated based on the address contention identifier.
[0133] Each arbitration battery broadcasts an address arbitration request command and a corresponding arbitration command via the CAN1 bus. All batteries on the CAN1 bus can receive this reply command. Batteries whose address is not a host battery within the cluster discard this command, while batteries whose address is a host battery within the cluster extract the information from the arbitration command to determine which battery has been added.
[0134] S813, determines the newly added battery in the battery with address conflict based on each arbitration instruction.
[0135] The different address arbitration types result in different information in the corresponding arbitration instructions and different methods for determining whether a battery has been newly added. The address arbitration type is determined by the type of the battery that is causing the address conflict. When an address conflict occurs between batteries whose battery address indicates that they are host batteries within the cluster, the address arbitration type is host address arbitration. When an address conflict occurs between batteries whose battery address indicates that they are slave batteries, the address arbitration type is slave address arbitration.
[0136] In the case of address arbitration being host address arbitration, the address arbitration request instruction is a host address arbitration request instruction, and the arbitration instruction is a host arbitration instruction. The host arbitration instruction includes the population number of the arbitrating host battery, which is used to indicate the number of batteries with the same address contention identifier as the arbitrating host battery. The arbitrating host battery is a newly added battery among the batteries whose battery address is indicated as a host battery within the cluster, based on the address conflict determined by each arbitration instruction. This includes: comparing the population number of the arbitrating host battery indicated by each host arbitration instruction to obtain a comparison result; and determining the arbitrating host battery with the smallest population number indicated by the comparison result as the newly added battery.
[0137] In other words, if a communication address conflict occurs between the host batteries after a new battery is added to the communication energy storage system, the newly added battery is determined based on the population size of each arbitration host battery. Since the newly added battery is new to the system, its corresponding population size is usually small. Therefore, the arbitration host battery with the smallest population size is determined as the newly added battery.
[0138] Figure 9 illustrates a schematic diagram of the host arbitration process provided in an exemplary embodiment of this application. As shown in Figure 9, after the battery address allocation is completed, the battery cluster corresponding to the host battery A in the cluster contains slave batteries 1 to m. Each slave battery stores the same address contention identifier [A] as the host battery in the cluster. In this case, the communication address of the newly added battery B conflicts with that of the host battery A in the cluster. Therefore, the host battery A in the cluster and the newly added battery B are the arbitration host batteries. For the battery management unit, it can detect the existence of host address conflict and needs to determine the newly added battery from the batteries with host address conflict in order to update the address of the newly added battery, thereby resolving the address conflict problem while maintaining the original system address allocation situation basically unchanged. When confirming the newly added battery, the battery management unit determines the arbitration host battery with the smallest population number among the arbitration host batteries by counting the population number of each arbitration host battery and performs battery address update.
[0139] Taking the interaction between batteries during any host arbitration process as an example, Figure 10 shows a schematic diagram of the host arbitration logic provided in an exemplary embodiment of this application. As shown in Figure 10, after any arbitration host battery detects an address conflict, it sends a host address arbitration request command through the CAN1 bus. After receiving the host address arbitration request command, the battery with the host address (i.e., the battery with address 1) determines whether there is an address conflict with the arbitration host battery. The host battery with the address conflict with the arbitration host battery broadcasts a host arbitration information collection command through the CAN1 bus. After receiving the host arbitration information collection command, each slave battery in the battery cluster to which the host battery belongs, according to L... A master arbitration information reply instruction is broadcast over a time interval of ms*(A+1) (where A is the cluster address and L is a constant, which can be chosen according to the baud rate). This master arbitration information reply instruction contains the address contention flag stored in the corresponding slave battery. Each battery on the CAN1 bus can receive the master arbitration information reply instruction. Batteries with addresses other than the master address discard the instruction. Batteries with addresses of the master address extract the address contention flag from each received master arbitration information reply instruction and compare it with their own address contention flag. They count the number of batteries with the same address contention flag as their own and determine the number of master batteries in the cluster that have an address conflict with the master battery, i.e., the population size. The master batteries that have an address conflict with the master battery broadcast the master arbitration instruction through the CAN1 bus. This instruction includes the population size of the master battery. Batteries with addresses other than the master address discard the instruction. Batteries with addresses of the master address (i.e., the master battery) extract the population size from the master arbitration instruction and compare it with the population size counted by their own unit. If the population size of the master battery is smaller, it is determined to be a newly added battery.
[0140] When address arbitration is slave address arbitration, the address arbitration application instruction is a slave address arbitration application instruction, and the arbitration instruction is a slave arbitration instruction. The slave arbitration instruction includes the comparison result of the address contention identifier of the arbitration slave battery and the address contention identifier of the corresponding in-cluster host battery. Based on each arbitration instruction, the newly added battery among the batteries with address conflicts is determined, and it also includes: determining the arbitration slave battery whose address contention identifier is different from the address contention identifier of the corresponding in-cluster host battery as the newly added battery.
[0141] In other words, if a communication address conflict occurs between slave batteries after a new battery is added to the communication energy storage system, the newly added battery is determined based on whether the address contention identifier of each arbitration slave battery is consistent with the address contention identifier of the master battery in its cluster. Since the address contention identifier of the newly added battery is stored in another system, while the address contention identifiers of each slave battery in the communication storage system are generated and distributed by the battery characteristic information of the corresponding master battery in the cluster, the arbitration slave battery whose address contention identifier is inconsistent with the address contention identifier of the corresponding master battery in the cluster is determined as the newly added battery.
[0142] Figure 11 illustrates a schematic diagram of the slave arbitration process provided in an exemplary embodiment of this application. As shown in Figure 11, after the battery address allocation is completed, the battery cluster corresponding to the host battery A in the cluster contains slave batteries 1 to 5. Each slave battery stores the same address contention identifier [A] as the host battery in the cluster. In this case, if the communication address of the newly added battery conflicts with that of slave battery 5, then the newly added battery and slave battery 5 are arbitration slave batteries. For the battery management unit, it can detect the existence of slave address conflicts and needs to determine the newly added battery from the batteries that have slave address conflicts in order to update the address of the newly added battery, thereby resolving the address conflict problem while maintaining the original system address allocation situation basically unchanged. When confirming the newly added battery, the battery management unit obtains the address contention identifier stored in each arbitration slave battery, determines the arbitration slave battery whose address contention identifier is different from that of the corresponding host battery in the cluster as the newly added battery, updates the battery address, and unifies the address contention identifier to be consistent with the current host battery in the cluster.
[0143] Taking the interaction between batteries during any slave arbitration process as an example, Figure 12 shows a schematic diagram of the slave arbitration logic provided in an exemplary embodiment of this application. As shown in Figure 12, the arbitration slave battery sends a slave address arbitration request command through the CAN1 bus. The slave address arbitration request command contains an address contention identifier and a unique identifier. All batteries on the CAN1 bus can receive the slave address arbitration request command. After receiving the slave address arbitration request command, all slave batteries discard the command. After receiving the slave address arbitration request command, the master battery in the cluster extracts the address contention identifier and compares it with its own address contention identifier to obtain a comparison result. It then replies to the slave arbitration command via broadcast. The slave arbitration command contains the comparison result. In addition, in order for the slave arbitration command to act as an arbitration mechanism... The slave battery's arbitration instruction also includes a unique identifier extracted from the slave address arbitration request instruction and the battery address. Upon receiving the slave arbitration instruction, each slave battery performs the following judgment process: It extracts the battery address from the instruction and compares it. If the battery address in the instruction is different from the local battery address, the slave arbitration instruction is discarded. If they are the same, it extracts the unique identifier from the instruction and compares it. If the unique identifier in the instruction is different from the local unique identifier, the slave arbitration instruction is discarded. If they are the same, it extracts the comparison result from the instruction. If the comparison result is the same, it means that the current slave battery and the host battery in the cluster belong to the same group, and the battery address remains unchanged. If the comparison result is different, it means that the current slave battery and the host battery in the cluster do not belong to the same group, and the current slave battery is determined to be a newly added battery.
[0144] S814 updates the battery address of the newly added battery so that the address arbitration in the next round can be based on the updated battery address.
[0145] Newly added batteries have their own battery addresses (including inter-cluster addresses and intra-cluster addresses). If a communication address conflict occurs between a newly added battery and a battery in the system, the intra-cluster address can be modified to avoid the conflict and reduce the impact of the adjustment. For example, if the inter-cluster address of the newly added battery is 2 and the intra-cluster address is 1, it may conflict with a battery in the system that has an inter-cluster address of 2 and an intra-cluster address of 1. If the intra-cluster address of the newly added battery is adjusted to 3 through address arbitration (assuming that the original slave battery 3 in battery cluster 2 is replaced), even if the inter-cluster addresses are the same, the battery address of the newly added battery will not conflict with other batteries because the adjusted intra-cluster address is different from that of other batteries in the battery cluster. It can also inherit the battery address of the original slave battery. Therefore, when updating the address, the intra-cluster address of the newly added battery can be updated. For illustration, in each round of address arbitration, the intra-cluster battery address of the newly added battery can be incremented by 1 before proceeding with the subsequent address arbitration process.
[0146] For the address arbitration process, if a battery whose address on the bus indicates that it is the host battery in the cluster detects an address conflict, then the host address arbitration process is performed. After the host address arbitration is completed, the address of the newly added battery in the cluster is incremented by 1. At this time, the updated battery address of the newly added battery indicates that it is a slave battery. If a battery whose address on the bus indicates that it is the slave battery detects an address conflict, then the slave address arbitration process is performed.
[0147] After the address arbitration termination condition is met, the address contention identifier of the host battery in the cluster corresponding to the newly added battery is broadcast via the CAN1 bus to update the address contention identifier of the newly added battery.
[0148] If the host battery in the cluster to which the newly added battery belongs does not receive a host address arbitration request instruction or a slave address arbitration request instruction for n consecutive cycles, it indicates that the current population is stable, the newly added battery has completed battery address allocation, and the address arbitration conditions are met. In this case, in order to ensure the uniformity of address contention identifiers in the population, the host battery in the cluster will broadcast its own address contention identifier, and each slave battery will update its address contention identifier upon receiving it.
[0149] The address arbitration process described above allows newly added batteries to be integrated into the existing battery system without affecting the battery addresses of the original batteries, ensuring the continuity of the battery network structure, thereby ensuring the consistency of battery data presentation on the network management system and improving battery operation and maintenance capabilities.
[0150] In summary, the communication address allocation method for the communication energy storage system provided in this application, after completing the communication address allocation in the communication energy storage system, if an address conflict caused by a newly added battery is detected, multiple rounds of address arbitration are performed on the arbitration batteries with address conflicts. After the address arbitration ends according to the address arbitration termination condition, the communication addresses of each arbitration address indicated by the address arbitration result are obtained. During each round of address arbitration, each arbitration battery can broadcast an address arbitration request instruction based on the battery address of the corresponding battery in the current round, and receive an arbitration instruction corresponding to the address arbitration request instruction. This arbitration instruction contains population information generated based on the address competition identifier, thereby determining the newly added battery in the arbitration battery according to the arbitration instruction. After updating the cluster address of the newly added battery, the next round of address arbitration is performed based on the updated cluster address. Through the above method, when a new battery is introduced into the communication energy storage system, address allocation for the newly added battery can be achieved while reducing the impact on the communication addresses of each battery in the original system, thus improving system stability and address allocation efficiency.
[0151] Figure 13 shows an overall operation flowchart of a communication energy storage system provided in an exemplary embodiment of this application. As shown in Figure 13, the process includes the following steps.
[0152] Step 1310: After the installation and wiring of each battery in the communication energy storage system are completed, the batteries connected to the CAN2 bus are turned on in sequence, initiate inter-cluster address contention, and complete the battery cluster address allocation.
[0153] Step 1320: The batteries in the battery cluster are powered on, an intra-cluster address contention is initiated, and intra-cluster address allocation is completed.
[0154] Step 1330: The battery management unit assigns a unique communication address to each battery based on the inter-cluster address and intra-cluster address corresponding to each battery.
[0155] Step 1340: The battery management unit detects whether each battery has network communication. Batteries with network communication are identified as the battery system host.
[0156] In other words, the battery management unit detects whether it is connected to the FE bus, and the battery connected to the FE bus is identified as the battery system host.
[0157] Step 1350: The host battery within the cluster periodically polls and saves the basic information of each battery within the cluster via the CAN1 bus; the battery system host periodically polls the host batteries within each cluster via the CAN2 bus to obtain and save the battery information of all batteries in each cluster; the battery system host responds when it receives an information acquisition command sent by the network management device.
[0158] Step 1360: Each battery in the battery cluster shares current information via the CAN1 bus, and the battery management unit controls the DC / DC conversion module to perform current sharing based on the real-time voltage and current information; the host batteries in each cluster share current information via the CAN2 bus, and the battery management unit controls the DC / DC conversion module to perform current sharing based on the real-time voltage and current information.
[0159] Step 1370: During operation, each battery on the CAN1 bus and each battery on the CAN2 bus checks for address conflicts. If an address conflict is detected, master arbitration or slave arbitration is initiated to complete the address update.
[0160] Figure 14 shows a structural block diagram of a computer device 1400 according to an exemplary embodiment of this application. This computer device can be implemented as the battery management unit in the above-described scheme of this application. The computer device 1400 includes a processor (e.g., a central processing unit, CPU) 1401, a system memory 1404 including random access memory (RAM) 1402 and read-only memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the processor 1401. The computer device 1400 also includes a mass storage device 1406 for storing an operating system 1409, application programs 1410, and other program modules 1411. Without loss of generality, the computer-readable medium can include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technologies, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage media are not limited to the above-mentioned types. The system memory 1404 and mass storage device 1406 described above can be collectively referred to as memory. According to various embodiments of this application, the computer device 1400 can also be connected to a remote computer on a network, such as the Internet, for operation. That is, the computer device 1400 can be connected to a network via a network interface unit 1407 connected to the system bus 1405, or in other words, the network interface unit 1407 can be used to connect to other types of networks or remote computer systems (not shown). The memory also stores at least one computer program, which the processor 1401 executes to implement all or part of the steps in the intra-cluster address allocation method of the communication energy storage system shown in the various embodiments of this application.
[0161] The communication energy storage system and battery communication address allocation method provided in this application can be applied to scenarios with large-scale networking requirements, such as communication base stations, core computer rooms, aggregation computer rooms, data centers, and photovoltaic energy storage power stations. Based on the different actual situations in different scenarios, there can be different adaptive implementation methods. The following embodiments provide implementation methods in several scenarios, but are not limited thereto.
[0162] Scenario 1: A single-cluster scenario with up to 32 batteries connected in parallel.
[0163] In this scenario, the configuration of each part of the communication energy storage system is as follows.
[0164] BMS Control Unit: Includes a main control chip with one network port, two CAN ports, one RS485 port, one SCI interface, and multiple DMA (Direct Memory Access) ports; the main control chip can be an MCU (Microcontroller Unit) with 512K of RAM (Random Access Memory); furthermore, to meet network functions, RT-Thread (Real-Time Operating System) and lwip (Lightweight IP) components can be ported to enhance system scalability.
[0165] CAN1 bus / CAN2 bus: Both the CAN1 bus, used for intra-cluster communication, and the CAN2 bus, used for inter-cluster communication, can transmit at a baud rate of 500K.
[0166] RS485 bus: As a slow backup link system, the RS485 bus can communicate at a baud rate of 9600 to ensure communication reliability to the greatest extent possible.
[0167] DC / DC conversion module: power control unit, requiring high reliability and high processing speed, can be selected with DSP (Digital Signal Processor) chip, this module communicates with BMS control unit via SCI.
[0168] Since it is a single-cluster scenario with no more than 32 groups, after system deployment, the CAN1 bus, RS485 bus, FE bus, and CAN2 bus will not be connected.
[0169] After all battery cables are connected, power on the device and start the address classification process. The process of allocating battery communication addresses in a given scenario may include the following steps.
[0170] S1501, the battery is powered on, and the inter-cluster address allocation is initiated. Since CAN2 is not connected in the single-cluster scenario, after detecting that there is no communication on CAN2, the battery cluster address (i.e., the inter-cluster address) is set to 1, and the CAN2 identifier of the battery cluster is set to 0 to represent the single-cluster scenario, which is used for subsequent intra-cluster address allocation.
[0171] S1502, start intra-cluster address allocation, clear all address contention flags of each battery in the cluster, and broadcast intra-cluster address contention trigger frame.
[0172] S1503, after receiving the address contention trigger frame, sets the intra-cluster address of each battery to 1, and actively broadcasts multiple intra-cluster address contention commands on the CAN1 bus, for example, 3 times. The intra-cluster address contention command includes: the battery serial number SN code (i.e., unique identifier) and the CAN2 identifier; after sending, waits for a response.
[0173] S1504: After the transmission is completed, each battery checks on the CAN1 bus whether it can receive a return packet with the same source address as the current cluster address. If no return packet is detected, it means that the current cluster address of the battery is not conflicted and the current cluster address is maintained. If a return packet is received, it means that there is a cluster address conflict and S1505 is executed.
[0174] S1505: The battery detects a return packet on the CAN1 bus with the same source address as the current cluster address of the device. It extracts the SN code and CAN2 identifier from the return packet. Since the CAN2 identifier is 0 in a single cluster scenario, it compares the device's SN code with the SN code in the return packet. If the device's SN code is smaller, it maintains the current cluster address of the device. If the device's SN code is larger, it increments the cluster address of the device by 1 and continues to send multiple cluster address contention commands.
[0175] S1506, each battery executes steps S1504 to S1505 until none of the batteries can detect a conflict on the CAN1 bus where the source address is the same as the address within the local cluster.
[0176] S1507 determines that the intra-cluster addresses of each battery on the CAN1 bus no longer conflict if no intra-cluster address contention instruction is received for M consecutive cycles (e.g., 5 cycles) in each battery, and the CAN1 address contention ends.
[0177] S1508, the battery with an intra-cluster address of 1 in each battery is identified as the intra-cluster host battery, and the intra-cluster address contention identifier is calculated based on the battery characteristic information of the intra-cluster host battery. For example, the CRC4 value of the SM of the intra-cluster host battery is taken as the intra-cluster address contention identifier for this round of intra-cluster address contention.
[0178] S1509, the cluster host battery broadcasts the cluster address contention identifier via the CAN1 bus.
[0179] S1510: Each slave battery receives the intra-cluster address contention identifier, stores it, and achieves the unification of the intra-cluster address contention identifier.
[0180] S1511, each battery calculates its communication address as a communication identifier for RS485 and FE communication: Addrbat = Addrci. Since the inter-cluster address is 1 in this scenario, the communication address is equal to the cabinet address.
[0181] S1512, each battery detects whether Ethernet communication exists. If data communication is detected multiple times (e.g., 3 times) on the bus, it is considered that the battery is connected to Ethernet, and its battery system host signal is set to 1. The battery system host polls each battery to determine the CAN2 identifier. In this scenario, the CAN2 identifier is 0. Therefore, the battery system host directly polls each battery in the cluster through the CAN1 bus to obtain information data summary and send it to the network management system.
[0182] Through the above method, the addresses of each component of the communication energy storage system within 32 groups are assigned, and the battery system host of the communication energy storage system is confirmed, realizing the system self-organizing network and uploading the communication energy storage system information to the network management system through the network, thus completing the decoupling from the power supply and FSU.
[0183] Scenario 2: Multiple communication energy storage systems operating in parallel.
[0184] Building upon the self-organizing network solution for up to 32 single-cluster communication energy storage systems provided in Scenario 1, this section further elaborates on a scenario with multiple parallel operation groups of communication energy storage systems. This scenario utilizes CAN1 bus, CAN2 bus, RS485 bus, and Ethernet port to jointly achieve a self-organizing network for multiple parallel operation groups. In this solution, the power supply and batteries are completely isolated in both hardware and software, thus achieving complete decoupling of power supply services and battery services. The process of allocating battery communication addresses in Scenario 2 may include:
[0185] S1601, the battery is powered on. First, the inter-cluster address allocation is initiated, and address contention is conducted using the CAN2 bus. Since CAN2 does not have host priority during inter-cluster address allocation, all CAN2 flags are set to 0. The inter-cluster address contention process can be referred to the embodiment corresponding to Scenario 1. After the inter-cluster address allocation is completed, each battery records the cluster address and the cluster address contention flag.
[0186] This process can be implemented as S1-S9.
[0187] S1, initiate inter-cluster address allocation, clear all address contention flags of each battery connected to the CAN2 bus, and broadcast an inter-cluster address contention trigger frame.
[0188] S2, after receiving the address contention trigger frame, sets the inter-cluster address of each battery to 1, and actively broadcasts multiple inter-cluster address contention commands on the CAN2 bus, such as 3 times. The inter-cluster address contention command includes: the battery serial number SN code (i.e., unique identifier) and the CAN2 identifier; after sending, wait for a response.
[0189] S3: After the transmission is completed, each battery checks on the CAN2 bus whether it can receive a return packet with the same source address as its current inter-cluster address. If no return packet is detected, it means that the current inter-cluster address of the battery is not conflicted and the current inter-cluster address is maintained. If a return packet is received, it means that there is an inter-cluster address conflict and S4 is executed.
[0190] S4, the battery detects a return packet on the CAN2 bus with the same source address as the current inter-cluster address of the local machine. It extracts the SN code and CAN2 identifier from the return packet. Since the CAN2 identifier is 0, it compares the local machine's SN code with the SN code in the return packet. If the local machine's SN code is smaller, it keeps the current inter-cluster address of the local machine unchanged. If the local machine's SN code is larger, it increments the local machine's inter-cluster address by 1 and continues to send multiple inter-cluster address contention commands.
[0191] S5, each battery executes steps S3 to S4 until none of the batteries can detect a conflict on the CAN2 bus where the source address is the same as the address between the local clusters.
[0192] S6: If no inter-cluster address contention instruction is received by each battery for M consecutive cycles (e.g., 5 cycles), it is determined that the inter-cluster addresses of each battery on the CAN2 bus no longer conflict, and the CAN2 address contention ends.
[0193] S7. The battery with an inter-cluster address of 1 in each battery is identified as the inter-cluster host battery, and the inter-cluster address contention identifier is calculated based on the battery characteristic information of the inter-cluster host battery. For example, the CRC4 value of the SM of the inter-cluster host battery is taken as the inter-cluster address contention identifier for this round of inter-cluster address contention.
[0194] S8, Inter-cluster host battery broadcast sends inter-cluster address contention identifier.
[0195] S9, each non-cluster host battery receives the inter-cluster address contention identifier, stores it, and realizes the unification of the inter-cluster address contention identifier.
[0196] S1602, upon detecting the battery connected to CAN2, sets the CAN2 identifier to 1 and broadcasts the inter-cluster address using the CAN1 bus.
[0197] S1603: After each slave battery receives the inter-cluster address broadcast frame on the CAN1 bus, it extracts the inter-cluster address and records it as its own inter-cluster address, and sets the CAN2 flag to 0.
[0198] S1604, the cluster host battery connected to CAN2 uses the CAN1 bus to broadcast address contention to trigger the frame.
[0199] S1605: After receiving the address contention trigger frame on the CAN1 bus, the address within each battery cluster is set to 1, and multiple (e.g., 3 times) cluster address contention commands are actively broadcast on the CAN1 bus. The address contention command contains the following information: the local serial number (SN) and the CAN2 identifier; after sending, wait for a response.
[0200] S1606 After the transmission is completed, each battery checks on the CAN1 bus whether it can receive a return packet with the same source address as its current address. If no return packet is detected, it means that there is no conflict in the current cluster address of the battery, and the current cluster address is maintained; if a return packet is received, it means that there is a conflict in the cluster address, and S1607 is executed.
[0201] S1607: If the battery detects a return packet on the CAN1 bus with a source address that is the same as the current cluster address of the local device, it extracts the SN code and CAN2 identifier from the return packet. First, it compares the CAN2 identifier. If the CAN2 identifier in the return packet is greater than the local device's, the local device's cluster address is incremented by 1, and multiple address contention commands are sent. Otherwise, it continues to compare the SN code. If the local device's SN code is larger, the local device's cluster address is incremented by 1, and multiple address contention commands are sent.
[0202] S1608, each battery continues to perform steps S1606 to S1607 until each battery can no longer detect a conflict on the CAN1 bus where the source address is the same as the address within the local cluster.
[0203] S1609 determines that the intra-cluster addresses of each battery on the CAN1 bus no longer conflict if no intra-cluster address contention instruction is received for M consecutive cycles (e.g., 5 cycles) in each battery, and the CAN1 address contention ends.
[0204] S1610, the battery with an intra-cluster address of 1 in each battery is identified as the intra-cluster host battery, and the intra-cluster address contention identifier is calculated based on the battery characteristic information of each intra-cluster host battery. For example, the CRC4 value of the SM of the intra-cluster host battery is taken as the intra-cluster address contention identifier for this round of intra-cluster address contention.
[0205] S1611, the host battery in each cluster broadcasts the cluster address contention identifier to the corresponding battery cluster via the CAN1 bus.
[0206] S1612, each slave battery receives the corresponding intra-cluster address contention identifier, stores it, and realizes the unification of the intra-cluster address contention identifier.
[0207] S1613, the host battery in each cluster broadcasts a host arbitration information collection instruction. After receiving the instruction, each corresponding slave device replies to the host arbitration information reply instruction in a time interval of L ms*(A+1) (A is the intra-cluster address). The content of the reply is the intra-cluster address contention identifier stored by each slave device.
[0208] S1614, all batteries on the bus can receive the host arbitration information reply instruction. All batteries with addresses not equal to 1 discard this instruction. The host battery in the cluster extracts the address contention identifier in the host arbitration information reply instruction and compares it with its own address contention identifier. The number of batteries with the same contention identifier is counted to obtain the total number of batteries in the cluster.
[0209] S1615, each battery calculates its communication address as a communication identifier for RS485 and FE communication: Addrbat = (Addrcb - 1) * M + Addrci; where Addrbat is the communication address, Addrcb is the cluster address, Addrci is the intra-cluster address, and M is the total number of intra-cluster batteries calculated by S1614.
[0210] S1616: Each battery detects whether Ethernet communication exists. If data communication is detected multiple times (e.g., 3 times) on the bus, it is considered that the battery is connected to Ethernet, and its battery system host signal is set to 1. The battery system host polls each battery to determine the CAN2 identifier, identifies the battery host in the cluster with CAN2 identifier 1, and obtains information data by polling the battery host in the cluster with CAN2 identifier 1 through the CAN2 bus, summarizing the data and sending it to the network management system.
[0211] The above steps enable the self-organizing network of the multi-cluster parallel energy storage system, and the information is collected and sent to the network management system through the communication host, thus achieving large-scale parallel networking support at the lowest cost.
[0212] Scenario 3: The scenario of replacing or adding spare parts.
[0213] After the station is commissioned, the communication energy storage system data is transmitted to the network management system via the network port for real-time data presentation and historical data storage. If a battery is damaged, a spare part will be arranged for replacement. After the replacement, address contention will re-enter. Alternatively, if a new battery is added, address contention will also re-enter. If address contention is directly performed according to the strategies in the corresponding embodiments of Scenario 1 or Scenario 2, the original address order is very likely to be disrupted, leading to confusion in the network management system's statistics and records. To solve this problem, this implementation example provides a strategy for address inheritance after spare part replacement to ensure the consistency of the data presented by the network management system. The process of allocating battery communication addresses in Scenario 2 may include the following steps.
[0214] S1701 If a newly added battery detects that a source address and a target address are the same on the bus, it indicates that a bus conflict exists. After detecting the conflict, multiple (e.g., 3) address arbitration request instructions are issued. These instructions include the following information: the address contention identifier stored on the local machine, the local address, and the local serial number.
[0215] S1702, after a battery with a cluster address of 1 detects a conflict, it broadcasts a host arbitration information collection command. Upon receiving the command, batteries with a cluster address other than 1 broadcast a host arbitration information reply command at a time interval of L ms*(A+1) (where A is the address). The content of the reply is the address contention flag stored by each slave.
[0216] S1703, the battery receives the host arbitration information reply instruction. Batteries with a cluster address not equal to 1 discard this instruction. Batteries with a cluster address equal to 1 extract the address contention flag from the host arbitration information reply instruction and compare it with their own stored address contention flag. The number of identical address contention flags is counted and recorded as E1.
[0217] S1704, a battery broadcast host arbitration instruction with cluster address 1, sends the number of batteries that compete with its own address for the same identifier.
[0218] S1705, batteries with cluster addresses not equal to 1 discard the master arbitration command. Batteries with cluster addresses equal to 1 extract the statistical count from the master arbitration command and compare it with the same count as the local count. The smaller count is incremented by 1, and the larger count is the master battery; continue to initiate slave arbitration.
[0219] The host arbitration is completed through the above steps. If no conflict is detected in the battery with address 1 in the cluster on the bus, the above process can be skipped.
[0220] S1706, the slave battery that detected the address conflict sends a slave address arbitration request instruction, carrying information such as address contention identifier and unique identifier, which can be the CRC4 value of SN.
[0221] S1707: After receiving the arbitration request instruction, all slave batteries discard this instruction. After receiving the instruction, the master battery in the cluster extracts the address contention identifier and compares it with its own address contention identifier. Then, it replies to the slave arbitration judgment instruction via broadcast. The reply includes the unique identifier extracted from the received packet, the comparison result of the battery address and the address contention identifier. For example, if the address contention identifiers are the same, the comparison result is 1; otherwise, the comparison result is 0.
[0222] S1708: After receiving the slave arbitration judgment instruction from the master battery within the cluster, the slave battery extracts relevant information for judgment: If the battery address in the instruction is the same as the local battery address, the unique identifier in the instruction is extracted and compared; if the unique identifier in the instruction is the same as the local unique identifier, the address contention identifier comparison result is extracted and judged. If the result is 1, the local address remains unchanged; if the result is 0, the local address is incremented by 1, and slave arbitration is initiated again.
[0223] S1709 If the host battery in the main cluster does not receive a host address arbitration request instruction or a slave address arbitration request instruction for n consecutive cycles, it means that there is no address conflict in the current system and the address of the newly added battery has been allocated.
[0224] S1710: The host battery within the cluster broadcasts its own address contention flag, and each slave device receives and updates its address contention flag.
[0225] The above example steps can handle the automatic networking of any newly added battery in the system in single-cluster or multi-cluster scenarios, and can ensure that the newly added battery inherits the original address, thus ensuring the continuity of the network management data sent up. This is of great significance for the maintenance of spare parts replacement or added scenarios.
[0226] In one exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one computer program that is loaded and executed by a processor to implement all or part of the steps in the battery communication address allocation method of the above-described communication energy storage system. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, or optical data storage device, etc.
[0227] In one exemplary embodiment, a computer program product is also provided, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform all or part of the steps of the embodiments shown in any of the embodiments of FIG3, FIG4, FIG5, FIG6, FIG7 or FIG8.
[0228] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0229] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for allocating a communication address of a battery in a communication energy storage system, the method being performed by a battery management unit in the communication energy storage system, and comprising: performing N rounds of address competition for any target battery, and obtaining an address competition result after a condition for ending the address competition is met; the condition for ending the address competition indicating that battery addresses of all batteries in the communication energy storage system are different; the target battery being a battery in at least two battery clusters included in the communication energy storage system; N being a positive integer; determining a communication address of the target battery based on the address competition result; wherein, in each round of address competition, an address competition instruction is broadcasted through a CAN bus based on a battery address of the target battery in the current round; the address competition instruction including a unique identification code of the target battery and a CAN2 identifier indicating a connection status of a second controller area network CAN2 bus; the CAN2 bus being used for information communication between battery clusters; receiving a feedback packet corresponding to the address competition instruction, the feedback packet including the unique identification code and the CAN2 identifier; updating the battery address of the target battery based on the unique identification code and the CAN2 identifier in the feedback packet, so that the target battery performs the next round of address competition based on the updated battery address.
2. The method of claim 1, wherein, the updating of the battery address of the target battery based on the unique identification code and the CAN2 identifier in the feedback packet comprising: address updating the battery address of the target battery if it is determined that the battery address of the target battery meets an address updating condition; wherein, the address updating condition comprises: the CAN2 identifier in the feedback packet being different from the CAN2 identifier of the target battery, and it being determined that a battery feeding back the feedback packet has a host priority based on the CAN2 identifier in the feedback packet and the CAN2 identifier of the target battery; or the CAN2 identifier in the feedback packet being the same as the CAN2 identifier of the target battery, and a value relationship between the unique identification code of the target battery and the unique identification code in the feedback packet meeting a specified size logical relationship. the battery address including an inter-cluster address and an intra-cluster address; the determination of the communication address of the target battery based on the address competition result comprising:
3. The method of claim 1, wherein, determining the communication address of the target battery based on an inter-cluster address, an intra-cluster address of the target battery indicated by the address competition result, and a number of intra-cluster batteries of a target battery cluster to which the target battery belongs. in the case that the address competition is inter-cluster address competition, the CAN2 identifier of each battery being set to the same value; the performing of N rounds of address competition for any target battery, and obtaining of an address competition result after a condition for ending the address competition is met, comprising:
4. The method of claim 3, wherein, performing N rounds of inter-cluster address competition for any target battery connected to the CAN2 bus through the CAN2 bus, and obtaining a first address competition result after the condition for ending the address competition is met, so as to determine an inter-cluster address of the target battery based on the first address competition result. In each round of inter-cluster address competition, an inter-cluster address competition instruction is broadcasted through the CAN2 bus based on the inter-cluster address of the target battery in the current round; A first reply packet corresponding to the inter-cluster address competition instruction is received, and the first reply packet contains a unique identification code; If it is determined based on the first reply packet that the address update condition is met, the inter-cluster address of the target battery is updated, and the next round of inter-cluster address competition is performed based on the updated inter-cluster address of the target battery.
5. The method of claim 4, wherein, The method further comprises: After the inter-cluster address competition ends, an inter-cluster host battery is determined based on the inter-cluster addresses of the batteries; An inter-cluster address competition identifier is generated based on the battery feature information of the inter-cluster host battery; The inter-cluster address competition identifier is broadcasted to the batteries in each battery cluster through the CAN2 bus, so that the batteries in each battery cluster store the inter-cluster address competition identifier.
6. The method of claim 3, wherein, In the case of intra-cluster address competition, the CAN2 identifier of each battery is determined based on the connection of each battery to the CAN2 bus; the N rounds of address competition for any target battery, after the address competition end condition is met, obtain an address competition result, which comprises: N rounds of intra-cluster address competition are performed on any target battery in the same battery cluster through the CAN1 bus, and a second address competition result is obtained after the address competition end condition is met, so as to determine the intra-cluster address of the target battery based on the second address competition result; the CAN1 bus is used for information communication within the battery cluster; In each round of intra-cluster address competition, an intra-cluster address competition instruction is broadcasted through the CAN1 bus based on the intra-cluster address of the target battery in the current round; A second reply packet corresponding to the intra-cluster address competition instruction is received, and the second reply packet contains a unique identification code and a CAN2 identifier; If it is determined based on the second reply packet that the address update condition is met, the intra-cluster address of the target battery is updated, and the next round of intra-cluster address competition is performed based on the updated intra-cluster address of the target battery.
7. The method of claim 6, wherein, The method further comprises: After the intra-cluster address competition ends, an intra-cluster host battery is determined based on the intra-cluster addresses of the batteries in the same battery cluster; An intra-cluster address competition identifier is generated based on the battery feature information of the intra-cluster host battery; The intra-cluster address competition identifier is broadcasted to each slave battery in the battery cluster to which the intra-cluster host battery belongs through the CAN1 bus, so that each slave battery stores the intra-cluster address competition identifier.
8. The method of claim 7, wherein, The method further comprises: A master arbitration information collection instruction is broadcasted through the CAN1 bus; A master arbitration reply instruction is received, which is fed back by each slave battery and contains the intra-cluster address competition identifier stored in the slave battery; Based on each master arbitration reply instruction, the number of slave batteries with the same intra-cluster address competition identifier as the intra-cluster address competition identifier of the intra-cluster host battery is counted; The number of intra-cluster batteries of the battery cluster to which the intra-cluster host battery belongs is determined based on the number of slave batteries.
9. The method of claim 1, wherein, The method further comprises: In the case of detecting a communication address conflict, performing K rounds of address arbitration for the arbitration battery of the address conflict, and obtaining an address arbitration result after satisfying an address arbitration end condition; the address arbitration end condition indicates that the battery addresses of each battery in the communication energy storage system are not in conflict; K is a positive integer; Determining the communication address of each arbitration battery based on the address arbitration result; In each round of address arbitration, each arbitration battery broadcasts an address arbitration application instruction through the CAN1 bus based on the battery address of the arbitration battery in the current round, and the address arbitration application instruction includes an address competition identifier of the corresponding arbitration battery and a unique identifier code; the address competition identifier includes an intra-cluster address competition identifier and an inter-cluster address competition identifier; Receiving each arbitration instruction corresponding to each address arbitration application instruction through the CAN1 bus; the arbitration instruction includes population information generated based on the address competition identifier; Determining a newly added battery in each arbitration battery based on the arbitration instruction; Updating the battery address of the newly added battery to perform the next round of address arbitration based on the updated battery address.
10. The method of claim 9, wherein, In the case of host address arbitration, the address arbitration application instruction is a host address arbitration application instruction, and the arbitration instruction is a host arbitration instruction; the host arbitration instruction includes the population number of the arbitration host battery, and the population number is used to indicate the number of batteries with the same address competition identifier as the arbitration host battery; The arbitration host battery is a battery with an intra-cluster host battery address; The method further comprises: Comparing the population numbers of the arbitration host batteries indicated by each host arbitration instruction to obtain a comparison result; Determining the arbitration host battery with the smallest population number indicated by the comparison result as the newly added battery.
11. The method of claim 9 or 10, wherein, In the case of slave address arbitration, the address arbitration application instruction is a slave address arbitration application instruction, and the arbitration instruction is a slave arbitration instruction; the slave arbitration instruction includes a comparison result of the address competition identifier of the arbitration slave battery and the address competition identifier of the corresponding intra-cluster host battery; The method further comprises: Determining the arbitration slave battery with the different address competition identifier as the newly added battery.
12. The method of claim 11, wherein, The method further comprises: After satisfying the address arbitration end condition, broadcasting the address competition identifier of the intra-cluster host battery corresponding to the newly added battery through the CAN1 bus to update the address competition identifier of the newly added battery.
13. A communication energy storage system, comprising a battery management unit, a CAN1 bus, and a CAN2 bus; The CAN1 bus is used for intra-cluster battery information communication, and the CAN2 bus is used for inter-cluster battery information communication; The battery management unit is configured to implement the communication address allocation method of any one of claims 1 to 12 via the CAN1 bus and the CAN2 bus.
14. The communication energy storage system of claim 13, wherein, The communication energy storage system further comprises a power control unit. The battery management unit is further configured to perform intra-cluster current sharing control based on the CAN1 bus, the power control unit and the communication addresses of the respective batteries, and inter-cluster current sharing control via the CAN2 bus, the power control unit and the communication addresses of the respective batteries.
15. The communication energy storage system of claim 13, wherein, The communication energy storage system further comprises an RS485 bus and an Ethernet FE bus. The RS485 bus is connected to the battery management unit and configured to obtain battery information within each battery cluster. The Ethernet FE bus is connected to a battery system host in the communication energy storage system and configured to upload aggregated battery information collected by the battery system host to a network management device. The aggregated battery information comprises battery information in each battery cluster.
16. A computer device comprising a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the battery communication address allocation method of the communication energy storage system of any one of claims 1 to 12.
17. A computer readable storage medium storing at least one computer program, the computer program being loaded and executed by a processor to implement the battery communication address allocation method of the communication energy storage system of any one of claims 1 to 12.
18. A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the battery communication address allocation method of the communication energy storage system of any one of claims 1 to 12.
Citation Information
Patent Citations
Energy storage system and control method thereof
CN115313451A
BMS slave board address automatic allocation method, allocation system and storage medium
CN116155865A
Group parallel operation address allocation method based on CAN bus and node equipment
CN117135143A
Parallel networking method and device of intelligent battery, battery and storage medium
CN118101624A
System and method for efficiently obtaining information stored in an address space
US20230289300A1