A battery energy storage system and a remote upgrading method of the battery energy storage system

By using a semi-broadcast transmission method and Flash partition management, the problems of large code transmission volume and long upgrade time in multi-battery cluster systems are solved, enabling fast and secure remote upgrades, which are suitable for various energy storage system architectures.

CN119668662BActive Publication Date: 2025-11-18SHENZHEN AOLEI NEW ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411753379.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-11-18
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

In multi-battery cluster systems, existing remote upgrade methods suffer from large code transfer volumes and long upgrade times, especially when multiple slave MCUs need to be upgraded, which takes a long time.

Method used

A semi-broadcast transmission method is adopted, which uses RS485 communication and CAN interface between the centralized master control BCCU and the slave master control BCCU, combined with WiFi module, to realize code broadcasting and one-to-one response confirmation, reduce code transmission volume, and manage the upgrade process through Flash partition.

Benefits of technology

It effectively reduces upgrade time and code transmission volume, and is suitable for high-voltage parallel energy storage systems with multiple battery clusters and low-voltage parallel energy storage systems. It ensures that the equipment does not lose power during the upgrade process, and is especially suitable for systems with a three-level architecture of M-BMS, C-BMS, and A-BMS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668662B_ABST
    Figure CN119668662B_ABST
Patent Text Reader

Abstract

The application discloses a battery energy storage system and a remote upgrading method of the battery energy storage system, wherein the upgrading method is that a WiFi module broadcasts and transmits a CODE array to a centralized master control BCCU and each slave master control BCU, the centralized master control BCCU and each slave master control BCU sequentially respond and confirm in a token relay mode according to preset parameters, the centralized master control BCCU successfully confirms the last order, indicates that all master controls have responded, and uploads the confirmation response to the WiFi module. The remote upgrading method reduces the upgrading time and the code transmission amount. The semi-broadcast upgrading method is suitable for a multi-battery cluster high-voltage parallel type energy storage system, a low-voltage parallel type energy storage system, and a system with a M-BMS, a C-BMS and an A-BMS three-level architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy storage battery power supply control technology, and more specifically to a battery energy storage system and a remote upgrade method for the battery energy storage system. Background Technology

[0002] With the rapid development of the energy storage field, firmware upgrades are often necessary due to various reasons, including algorithm optimization, functional optimization, on-site logic verification, on-site functional debugging, on-site parameter tuning, application scenario changes, customer requirement updates, and software defects (the most typical example being the Y2K bug). Remote upgrades, compared to the MCU's built-in bootloader upgrade program, eliminate the need for manual on-site power-on reset to enter the bootloader upgrade process. However, in a one-to-one remote upgrade scenario, with a multi-cell cluster system having s master controllers with identical programs and s×m slave controllers with identical programs, if the slave controllers also have MCUs that need upgrading, there is often a large amount of code transmission and a long upgrade time. Therefore, reducing the amount of code transmission and the upgrade time becomes a crucial problem that upgrade communication protocols must address. Summary of the Invention

[0003] To address the shortcomings of existing technologies, the present invention aims to provide a battery energy storage system and a remote upgrade method for the battery energy storage system, which reduces upgrade time and the amount of code transmitted.

[0004] To solve the above technical problems, the present invention is implemented through the following solution: The present invention provides a battery energy storage system, including multiple battery clusters and a high-voltage battery control box configured one-to-one with the multiple battery clusters. Each battery cluster is connected to the inverter via a power line through the corresponding high-voltage battery control box.

[0005] In any high-voltage battery control box, there is a master control box, multiple slave control boxes, and multiple battery packs composed of battery modules. The multiple battery packs are set one-to-one in the multiple slave control boxes, and the battery packs are connected in series through a circuit. The master control box controls the operation of the multiple slave control boxes.

[0006] Among multiple main control boxes, one of them is designated as the centralized main control box. This centralized main control box controls the operation of this battery cluster and other subordinate main control boxes, and collects the operation data of this battery cluster and other main control boxes.

[0007] The centralized main control box is equipped with a centralized main control BCCU, and other subordinate main control boxes are equipped with subordinate main control BCUs. Each subordinate control box is equipped with a subordinate control BMU connected to the battery pack. In any high-voltage battery control box, every two adjacent subordinate control BMUs communicate via RS485 communication or daisy chain cascading.

[0008] The battery energy storage system also includes a WiFi module, which has two independent RS485 channels. One of the independent RS485 channels establishes communication with the central master control BCCU and each subordinate master control BCCU, and the other independent RS485 channel is connected to the inverter.

[0009] The centralized master control unit (BCCU) and each subordinate master control unit (BCU) are also connected to the inverter via a CAN interface.

[0010] Furthermore, the battery energy storage system also includes a method for setting the master control BCCU and the slave master control BCU. The method for setting the master control BCCU and the slave master control BCU is to set up a DIP switch circuit in the battery energy storage system, and each DIP switch circuit is connected to its corresponding master control BCCU and slave master control BCU respectively.

[0011] The centralized master control unit (BCCU) and each subordinate master control unit (BCU) have the same structure, and the setting position of the centralized master control unit (BCCU) is determined by the DIP switch circuit.

[0012] Furthermore, the centralized master control BCCU and each subordinate master control BCCU are equipped with a module number setting switch, which is used to set the number m of modules in their respective battery clusters.

[0013] Furthermore, the centralized master control BCCU and each subordinate master control BCCU are all connected to the cluster redundancy management system;

[0014] The main circuit connected to the centralized master control BCCU, each subordinate master control BCU, and the subordinate control BMU is equipped with two relay protection modules, one positive and one negative, which serve as backups for each other. The protection mechanism triggered by the centralized master control BCCU, any group of subordinate master control BCUs, or any group of subordinate control BMUs will directly disconnect the relays in the relay protection modules.

[0015] The present invention provides an upgrade method for a battery energy storage system, the upgrade method comprising the aforementioned battery energy storage system.

[0016] This upgrade method employs a semi-broadcast transmission approach, which includes:

[0017] The WiFi module broadcasts a sector's CODE array to the central master control BCCU and each slave master control BCU. The central master control BCCU and each slave master control BCU respond and confirm one by one in order according to the preset parameters in a token relay manner.

[0018] The WiFi module does not need to know the number of battery clusters and battery modules it carries. The central control BCCU successfully confirms the order last, indicating that all the main control responses have been completed, and then sends the confirmation response to the WiFi module.

[0019] When the central master control BCCU and each slave master control BCU respond successfully, the WiFi module will broadcast the CODE array of the next sector. If the central master control BCCU or any group of slave master control BCUs times out or fails to respond, the CODE array of the current sector will be sent again.

[0020] If the WiFi module attempts to broadcast multiple times without receiving a response, the upgrade will fail and the module will exit.

[0021] The system upgrade is considered successful and the WiFi module exits broadcasting only if all sectors corresponding to the central master control BCCU and each subordinate master control BCCU are successfully upgraded.

[0022] Furthermore, the upgrade method includes:

[0023] Step 1: Set up Flash partitions in the central master control BCCU, each slave master control BCU, and each slave control BMU. The Flash partitions include the upgrade code receiving temporary storage area, the BOOT area, and the APP area.

[0024] The upgrade code receiving temporary storage area is the area where the CODE array transmitted during the upgrade is first received and stored;

[0025] The BOOT area is the code area for running remote upgrades, and the BOOT area is equipped with the BOOT upgrade service program;

[0026] The APP area is where application code runs. The APP area contains APP applications for upgrading the battery energy storage system.

[0027] Step 2: Switch from the APP application to the BOOT application:

[0028] The APP application has an APP communication module. The selection of the centralized master control is specifically set by the DIP switch through the APP communication module. When one of the master control BCUs is set as the centralized master control BCCU, the total number of battery clusters s set by the DIP switch is read.

[0029] The internal communication address BCU_I_ID of the centralized master control is 2. The internal communication is between the centralized master control BCCU and each slave master control BCU. The external communication address BCU_E_ID of the centralized master control BCCU is 1. The external communication is between the inverter and the centralized master control BCCU. The centralized master control BCCU reads the total number of modules m set by the DIP switch.

[0030] When set to BCU, the internal communication address BCU_I_ID set by the DIP switch is read. BCU_I_ID can be set to 3, 4, 5...s+1 respectively. The external communication address BCU_E_ID is set to 0. BCU reads the total number of modules m set by the DIP switch.

[0031] The total number of modules in the centralized master control unit (BCCU) and each subordinate master control unit (BCU) in multiple battery clusters is configured to be the same.

[0032] In the APP application prior to the BOOT upgrade service program, the APP application determines whether the BOOT upgrade service program enters the BOOT program due to power-on reset or upgrade reset. The APP application first receives the CODE array in the receive temporary storage area, then writes the upgrade flag into the UPGRADE_FLAG cell of DATAFLASH, writes the upgrade master or upgrade slave flag into UPGRADE_BMU_ID of DATAFLASH, and finally sends a reset command to the MCU.

[0033] After the MCU resets, it enters the BOOT upgrade service routine and checks whether the UPGRADE_FLAG unit is true:

[0034] If UPGRADE_FLAG is true, then the judgment is based on UPGRADE_BMU_ID;

[0035] If UPGRADE_BMU_ID is false, then copy it from the receive buffer to the APP area;

[0036] If UPGRADE_BMU_ID is true, forward it to the slave controller to upgrade one sector; otherwise, if UPGRADE_FLAG is false, directly enter the APP service program.

[0037] Step 3: The WiFi module sends the following commands to the central master control BCCU and the subordinate master control BCCU:

[0038] BCU_ID BMU_ID 0x70 SectorH SectorL Code1 Code2 Code3 ...... Code512 CrcL CrcH

[0039] According to the table above, BCU_ID is the called master control ID number. The WiFi module upgrades the master or slave control by broadcasting. The WiFi module sends BCU_ID 0xFF to the master control, where 0xFF is the broadcast address of the upgrade frame. The protocol does not consider the upgrade of a single BCCU / BCU for the time being.

[0040] BMU_ID is the called slave controller ID number, which is a flag that identifies whether the upgrade is for the master controller or the slave controller;

[0041] When the WiFi module sends a BMU_ID of 0 to the main controller, it upgrades the main controller.

[0042] When the WiFi module sends BMU_ID 0xFF to the master controller to upgrade the slave controller, 0xFF is the broadcast address for BOOT upgrade, which is used to upgrade all slave controllers;

[0043] 0x70 is the COM upgrade function code. The COM upgrade function code, including the ACK response code, is located outside the MODBUS function code range.

[0044] SectorH and SectorL are the high 8 bits and low 8 bits of the upgrade sector number. One Flash sector is uploaded per frame, and the sector number is incremented by one after each sector is uploaded. The starting address of the upgrade is mapped to sector 0.

[0045] Code1 to Code512 are parameters for a Flash sector. If the Code is less than 512 bytes, it is padded with 0xFF to make up the 512 bytes.

[0046] CrcH and CrcL are the high 8 bits and low 8 bits of the CRC checksum from BCU_ID to Code512;

[0047] The commands in Table 1 instruct the master controller's APP program to receive the CODE array into the upgrade code receiving buffer; Step 4, each master controller responds to the WiFi module in the following format:

[0048] BCU_ID ACK

[0049] Wherein, BCU_ID is the responder's master control ID, corresponding to 2, 3...s+1 respectively;

[0050] ACK is the response code corresponding to the 0x70 upgrade function code. The response code is located outside the MODBUS function code range. 0x6F indicates successful reception of the sector; 0x6E indicates verification failure.

[0051] ①The successful responses received by the centralized control unit (BCCU) are as follows:

[0052] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F

[0053] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0054] ②The successful response received by the WiFi module is as follows:

[0055] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F 0x02 0x6F

[0056] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU;

[0057] If one of the responses fails, the process terminates at address 0x6E, and no further responses are received.

[0058] If a response is unsuccessful and the WIFI module fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated.

[0059] ③ After all the code has been transmitted, the WiFi module then sends the following instructions:

[0060] BCU_ID 0x71

[0061] Among them, BCU_ID is the called broadcast master control ID number 0xFF, 0x71 is the COM function code. After the upgrade code is transmitted, the temporary storage area is converted to BOOT and copied from the upgrade code receiving temporary storage area to the APP area. The next step is to perform the real behavior upgrade operation.

[0062] ④ The response format of each master controller to the WiFi module for function code 0x71 is as follows:

[0063] BCU_ID ACK

[0064] BCU_ID is the called party's broadcast master control ID number 0xFF, 0x71 is the COM function code, ACK is the response code for function code 0x71, 0x6D indicates reception, and 0x6C indicates failure.

[0065] 4.1 For multi-cell cluster upgrades, the successful responses received by the BCCU are as follows:

[0066] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D

[0067] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0068] 4.2 For multi-battery cluster upgrades, the successful response received by the WiFi module is as follows:

[0069] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D 0x02 0x6D

[0070] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU;

[0071] If one of the responses fails, the process terminates at address 0x6C, and no further responses are received.

[0072] If a response is unsuccessful and the WIFI module fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated.

[0073] After the APP application receives the response from the centralized master control BCCU, the centralized master control BCCU finishes receiving the CODE into the master upgrade receive temporary storage area, records the upgrade flag UPGRADE_FLAG and the master-slave upgrade flag UPGRADE_BMU_ID and the total number of sectors in DATAFLSH, and sends a reset to the MCU to exit the APP application and enter the BOOT program.

[0074] ⑤ The main controller's response format to the WiFi module (parent network) is as follows:

[0075] BCU_ID 0x72 SectorPercentage

[0076] Where BCU_ID is the address of the responder, 0x72 is the response confirmation code for the copy upgrade progress bar, and SectorPercentage is the sector percentage; 0x72 indicates that copying one sector was successful; this is a broadcast release, which does not require a reply from the other party, and belongs to the response progress bar with the sector number incrementing;

[0077] When the WIFI module reaches this step, it does not send any information to the main controller; it only receives the upgrade response frame progress bar given by the main controller in the BOOT program.

[0078] This command is the response of each master controller to the BOOT running program;

[0079] 5.1 For multi-cell cluster upgrades, the successful responses received by the BCCU are as follows:

[0080]

[0081] Where 0x03, 0x04, ..., s+1 are the s-1 address numbers of the sequential responders, and SectorPercentage is the sector percentage;

[0082] 5.2 For multi-battery cluster upgrades, the successful response received by the WiFi module is as follows:

[0083]

[0084] Where 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, the last 0x02 is the address number of the BCCU, and SectorPercentage is the sector percentage;

[0085] When upgrading a slave controller, the main controller and each slave controller need to forward the upgrade code array for each frame:

[0086] Step 5: The central master control BCCU and each subordinate master control BCCU send the following instructions to the subordinate control BM:

[0087]

[0088] Among them, BMU_ID is the called slave controller ID number. The master controller upgrades the slave controller by broadcasting the upgrade, so the master controller sends the BMU_ID to the slave controller as 0xFF.

[0089] Step six, each slave controller responds to the master controller in the following format:

[0090] BMU_ID ACK

[0091] Wherein, BMU_ID is the address of the responding slave controller, corresponding to 1, 2, 3...m respectively;

[0092] ACK is the response code corresponding to the 0x70 upgrade function code. The response code is also located outside the MODBUS function code range. 0x6F indicates successful reception of the sector; 0x6E indicates verification failure.

[0093] 6.1 The successful responses (subnet) received by each master controller from its subordinate slave controllers are as follows:

[0094] 0x01 0x6F 0x02 0x6F ...... m 0x6F

[0095] Among them, 0x01, 0x02, ..., m are the m address numbers of the sequential responders;

[0096] 6.2 After the master controller receives the response from the slave controller, for multi-cell upgrades, the successful response received by the BCCU is as follows:

[0097] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F

[0098] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0099] 6.3 After the master controller receives the response from the slave controller, for multi-battery cluster upgrades, the successful response received by the WiFi module is as follows:

[0100] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F 0x02 0x6F

[0101] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU;

[0102] If one of the responses fails, the process terminates at address 0x6E, and no further responses are sent.

[0103] If a response is unsuccessful and the WIFI module fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated.

[0104] Step 7: After all the code has been transmitted, the WiFi module will then distribute the following (from the parent network):

[0105] BCU_ID 0x71

[0106] Among them, BCU_ID is the called broadcast master control ID number 0xFF, 0x71 is the COM function code, and the actual upgrade operation is copied from the temporary storage area to the APP area after the transmission of the temporary storage area is converted to BOOT.

[0107] The master controller issues the actual upgrade to the slave controller's WiFi forwarding module:

[0108] BMU_ID 0x71

[0109] Wherein, BMU_ID is the called broadcast slave control ID number 0xFF, and 0x71 is the COM function code;

[0110] Step 8: Each master controller responds to the WiFi module for function code 0x71 in the following format:

[0111] BCU_ID ACK

[0112] BCU_ID is the same as above; ACK is the acknowledgment code for function code 0x71: 0x6D for acceptance, 0x6C for failure; the format of each slave controller's acknowledgment to each master controller is also the same, as follows:

[0113] BMU_ID ACK

[0114] BMU_ID is the responder's master control ID, corresponding to 1, 2...m respectively; ACK is the acknowledgment code for function code 0x71: 0x6D for reception, 0x6C for failure;

[0115] 8.1 The successful responses (subnet) received by each master controller from its subordinate slave controllers are as follows:

[0116] 0x01 0x6D 0x02 0x6D ...... m 0x6D

[0117] Among them, 0x01, 0x02, ..., m are the m address numbers of the sequential responders;

[0118] 8.2 After the master controller receives the response from the slave controller, for multi-cell upgrades, the successful response received by the BCCU is as follows:

[0119] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D

[0120] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0121] 8.3 After the master controller receives the response from the slave controller, for multi-battery cluster upgrades, the successful response received by the WiFi module is as follows:

[0122] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D 0x02 0x6D

[0123] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU;

[0124] From SectorH×256+SectorL=0 until the copy ends, a progress bar is formed that increments the sector number.

[0125] Furthermore, the BOOT area upgrade can be performed through the APP application code, thereby optimizing the BOOT upgrade process.

[0126] Furthermore, the "multiple times" refers to three times.

[0127] Furthermore, the master controller opens s processes for simultaneous upgrade, and correspondingly, the slave controller opens s×m processes for simultaneous upgrade. The code transmission amount for the master controller upgrade is 1 / s, and the code transmission amount for the slave controller upgrade is 2 / s×m.

[0128] Compared with the prior art, the beneficial effects of the present invention are:

[0129] 1. The remote upgrade method of the present invention reduces upgrade time and reduces the amount of code transmitted.

[0130] 2. The semi-broadcast upgrade method of the present invention is applicable not only to high-voltage parallel energy storage systems with multiple battery clusters, but also to low-voltage parallel energy storage systems, especially off-grid energy storage systems. During the upgrade process, it is necessary to ensure that the equipment does not lose power. It is also more suitable for systems with a three-level architecture of M-BMS, C-BMS, and A-BMS. Attached Figure Description

[0131] Figure 1 This is a schematic diagram of the battery energy storage system of the present invention.

[0132] Figure 2 for Figure 1 A magnified view of a portion of the image.

[0133] Figures 3 - 9 After connection, a flowchart of the software upgrade process in the APP program of this invention is formed.

[0134] Figures 10 - 11The connection shows the upgrade flowchart in the BOOT program of this invention.

[0135] The attached diagram is labeled as follows: High-voltage battery control box 1, main control box 2, slave control box 3, centralized main control BCCU 4, slave main control BCCU 5, battery pack 6, slave control BMU 7, WiFi module 8. Detailed Implementation

[0136] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the scope of protection of the present invention. Obviously, the embodiments described in this invention are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0137] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0138] Example 1: The specific structure of the present invention is as follows:

[0139] Please refer to the appendix. Figures 1 - 2 The present invention provides a battery energy storage system, comprising multiple battery clusters and a high-voltage battery control box 1 configured one-to-one with the multiple battery clusters. Each battery cluster is connected to an inverter via a power line through the corresponding high-voltage battery control box 1.

[0140] In any high-voltage battery control box 1, there is a main control box 2, multiple slave control boxes 3, and multiple battery packs 6 composed of battery modules. The multiple battery packs 6 are set one-to-one in the multiple slave control boxes 3, and the battery packs 6 are connected in series through a circuit. The main control box 2 controls the operation of the multiple slave control boxes 3.

[0141] Among the multiple main control boxes 2, one of the main control boxes 2 is set as the centralized main control box. This centralized main control box controls the operation of this battery cluster and other subordinate main control boxes 2, and collects the operation data of this battery cluster and other main control boxes 2.

[0142] The central control box is equipped with a central control BCCU4, and other subordinate control boxes 2 are equipped with subordinate control BCU5. Each subordinate control box 3 is equipped with a subordinate control BMU7 connected to the battery pack 6. In any high-voltage battery control box 1, every two adjacent subordinate control BMU7 communicate via RS485 communication or daisy chain cascading.

[0143] The battery energy storage system also includes a WiFi module 8, which has two independent RS485 channels. One of the independent RS485 channels establishes communication with the central master controller BCCU4 and each slave master controller BCU5, and the other independent RS485 channel is connected to the inverter.

[0144] The centralized master controller BCCU4 and each slave master controller BCU5 are also connected to the inverter via a CAN interface.

[0145] The battery energy storage system also includes a method for setting the centralized master control BCCU4 and the slave master control BCU5. The method for setting the centralized master control BCCU4 and the slave master control BCU5 is to set up a DIP switch circuit in the battery energy storage system, and each DIP switch circuit is connected to its corresponding centralized master control BCCU4 and slave master control BCU5 respectively.

[0146] The centralized master controller BCCU4 and each slave master controller BCU5 have the same structure, and the setting position of the centralized master controller BCCU4 is determined by the DIP switch circuit.

[0147] The centralized master control BCCU4 and each subordinate master control BCCU5 are equipped with a module number setting switch, which is used to set the number m of each battery cluster.

[0148] The centralized master control BCCU4 and each subordinate master control BCU5 are all connected to the cluster redundancy management system.

[0149] The main circuit connected to the centralized master control BCCU4, each subordinate master control BCU5, and the slave control BMU7 is equipped with two relay protection modules, one positive and one negative, which serve as backups for each other. The protection mechanism triggered by the centralized master control BCCU4, any group of subordinate master control BCU5, or any group of slave control BMU7 will directly disconnect the relays in the relay protection modules.

[0150] WiFi module 8 communicates with the main control array via RS-485, serving as the remote upgrade communication channel and the management cloud platform communication channel (the upgrade network from WiFi module 8 to the main control is the parent network).

[0151] The central master controller BCCU4 and each slave master controller BCU5 are actually the same master controller. A specific bit setting on the DIP switch determines which master controller BCCU4 is in the system. Only one master controller can be set as BCCU in the system. The BCCU's DIP switch sets the number of battery stacks (s) in the system. The internal communication address BCCU_I_ID of the central master controller BCCU4 defaults to 2, and the external communication address BCCU_E_ID defaults to 1. The other master controller DIP switches set the internal communication address BCU_I_ID of the slave master controllers BCU5, with address numbers 3, 4, ..., s+1. Slave master controllers BCU5 do not communicate externally, and the external communication address BCU_E_ID of all slave master controllers BCU5 defaults to 0.

[0152] Each master controller (slave master controller BCU5 and central master controller BCCU4) has a module number setting switch to set the number of modules (m) in the battery cluster, and a specific bit setting for black start, which is used for automatic startup of the BMS.

[0153] In the multi-battery cluster management system, each master controller and each slave controller participates in cluster redundancy management. Each MCU performs independent calculations and also performs its own protection and arbitration of the multi-battery array.

[0154] For this battery cluster, there is redundancy between the master controller and the slave controller. The master controller MCU controls the relay coil to the negative power supply, and all slave controllers control the relay coil to the positive power supply through a logic OR operation via isolated differential output. This ensures that the relay is directly cut off regardless of whether the protection is issued by the master controller or the slave controller.

[0155] In a multi-battery cluster, the protections triggered by each master controller and slave controller are controlled by performing logical OR operations through isolated differential outputs. This controls the relay coil to the positive power supply, while the MCU of the master controller controls the relay coil to the negative power supply. This allows any protection issued by a master controller or any protection triggered by a slave controller to directly disconnect the relay.

[0156] While managing their own battery clusters, each master controller in a multi-cell system also monitors the status of other battery clusters. Once other battery clusters enter software-controlled protection, the entire system enters protection mode.

[0157] This redundancy strategy ensures the security of the system.

[0158] The WiFi communication module has two independent RS-485 channels. One channel connects to the main controllers of the multi-battery cluster array, and the other channel connects to the inverter. This creates an information platform that is both independent and integrated between the PCS and BMS, enabling rapid monitoring, intelligent scheduling, and management of the inverter and BMS.

[0159] The semi-broadcast upgrade method is not only applicable to high-voltage parallel energy storage systems with multiple battery clusters, but also to low-voltage parallel residential energy storage systems, especially off-grid energy storage systems. During the upgrade process, it is necessary to ensure that the equipment does not lose power. It is more suitable for systems with a three-level architecture of M-BMS, C-BMS, and A-BMS. In a three-level architecture system, the number of battery clusters (s) and modules (m) is often greater. For example, in a large energy storage system, the number of 16-string modules can reach 24, the voltage can reach 1500V, and the number of battery clusters connected in parallel can reach more than a dozen. Using this semi-broadcast upgrade method saves on the number of transmitted codes and further reduces the upgrade time.

[0160] The semi-broadcast upgrade technology is also applicable to the Internet of Things (including parent / child networks) where a certain type of device can be remotely upgraded, which can greatly reduce the amount of code transmission and upgrade time.

[0161] Example 2:

[0162] Please refer to the appendix. Figures 3 - 11 Among them, attached Figures 3 - 9 In the diagram, AA, A1-A1, BB, CC, DD, EE, FF, GG, HH, II, JJ, and KK are connected to form the upgrade software output flowchart in the APP program of this invention.

[0163] In Figures 10-11, connecting B1-B1 forms the upgrade flowchart in the BOOT program of this invention.

[0164] Taking a 16-cell battery module in an 850V system as an example, the number of modules m is as high as 14, the number of battery clusters s is as high as 4, and the number of s×m is 56. If it is a one-to-one upgrade, upgrading the main controller will take 4 times longer, and upgrading the slave controller will take even longer.

[0165] In the multi-battery cluster centralized master controller BCCU4, slave master controller BCU5, and slave controller BMU7, the Flash partition is divided into APP area, BOOT area, and upgrade code receiving temporary storage area. The code receiving temporary storage area is the area where the CODE array transmitted for upgrade is received and stored first. The BOOT area is the area where the program code for remote upgrade is run, and the APP area is the area where the application code is run.

[0166] The BOOT area can also be upgraded using APP application code, optimizing the BOOT upgrade process.

[0167] The present invention discloses an upgrade method for a battery energy storage system, the upgrade method employing a semi-broadcast transmission method, comprising:

[0168] WiFi module 8 broadcasts a sector's CODE array to the central master controller BCCU4 and each slave master controller BCU5. The central master controller BCCU4 and each slave master controller BCU5 respond and confirm one by one in order according to the preset parameters in a token relay manner.

[0169] WiFi module 8 does not need to know the number of battery clusters and battery modules it carries. The main controller BCCU4 successfully confirms the order last, indicating that all main controller responses have been completed, and then sends the confirmation response to WiFi module 8.

[0170] When the central master controller BCCU4 and each slave master controller BCU5 respond successfully, the WiFi module 8 will broadcast the CODE array of the next sector. If the central master controller BCCU4 or any group of slave master controllers BCU5 times out or fails to respond, the CODE array of the current sector will be sent again.

[0171] If WiFi module 8 attempts to broadcast multiple times without receiving a response, the upgrade will fail and the module will exit.

[0172] The system upgrade is considered successful and WiFi module 8 exits broadcasting only if all sectors corresponding to the central master controller BCCU4 and each slave master controller BCU5 are successfully upgraded.

[0173] The upgrade method includes:

[0174] Step 1: Set up Flash partitions in the central master controller BCCU4, each slave master controller BCU5, and each slave controller BMU7. The Flash partitions include the upgrade code receiving temporary storage area, the BOOT area, and the APP area.

[0175] The upgrade code receiving temporary storage area is the area where the CODE array transmitted during the upgrade is first received and stored;

[0176] The BOOT area is the code area for running remote upgrades, and the BOOT area is equipped with the BOOT upgrade service program;

[0177] The APP area is where application code runs. The APP area contains APP applications for upgrading the battery energy storage system.

[0178] Step 2: Switch from the APP application to the BOOT application:

[0179] The APP application has an APP communication module. The selection of the centralized master controller is specifically set by the DIP switch through the APP communication module. When one of the BCUs is set to the centralized master controller BCCU4, the total number of battery clusters s set by the DIP switch is read.

[0180] The internal communication address BCU_I_ID of the centralized master control BCCU4 is 2. The internal communication is between the centralized master control BCCU4 and each slave master control BCU5. The external communication address BCU_E_ID of the centralized master control BCCU4 is 1. The external communication is between the inverter and the centralized master control BCCU4. The centralized master control BCCU4 reads the total number of modules m set by the DIP switch.

[0181] When set to slave master BCU5, the internal communication address BCU_I_ID set by the DIP switch is read. BCU_I_ID can be set to bits 3, 4, 5...s+1 respectively. The external communication address BCU_E_ID is set to 0. The BCU reads the total number of modules m set by the DIP switch.

[0182] The total number of main control BCU modules in multiple battery clusters is the same;

[0183] In the APP application prior to the BOOT upgrade service program, the APP application determines whether the BOOT upgrade service program enters the BOOT program due to power-on reset or upgrade reset. The APP application first receives the CODE array in the receive temporary storage area, then writes the upgrade flag into the UPGRADE_FLAG cell of DATAFLASH, writes the upgrade master or upgrade slave flag into UPGRADE_BMU_ID of DATAFLASH, and finally sends a reset command to the MCU.

[0184] After the MCU resets, it enters the BOOT upgrade service routine and checks whether the UPGRADE_FLAG unit is true:

[0185] If UPGRADE_FLAG is true, then the judgment is based on UPGRADE_BMU_ID;

[0186] If UPGRADE_BMU_ID is false, then copy it from the receive buffer to the APP area;

[0187] If UPGRADE_BMU_ID is true, forward it to the slave controller to upgrade one sector; otherwise, if UPGRADE_FLAG is false, directly enter the APP service program.

[0188] Step 3: WiFi module 8 sends the following commands to the central master controller BCCU4 and the subordinate master controller BCU5:

[0189]

[0190]

[0191] According to the table above, BCU_ID is the called master control ID number. WiFi module 8 upgrades the master or slave control by broadcasting. WiFi module 8 sends BCU_ID 0xFF to the master control, where 0xFF is the broadcast address of the upgrade frame. The protocol does not consider the upgrade of a single centralized master control BCCU4 / slave master control BCU5.

[0192] BMU_ID is the called slave controller ID number, which is a flag that identifies whether the upgrade is for the master controller or the slave controller;

[0193] When WiFi module 8 sends a BMU_ID of 0 to the main controller, it upgrades the main controller.

[0194] When WiFi module 8 sends BMU_ID 0xFF to the master controller to upgrade the slave controller, 0xFF is the broadcast address for BOOT upgrade, which is used to upgrade all slave controllers;

[0195] 0x70 is the COM upgrade function code. The COM upgrade function code, including the ACK response code, is located outside the MODBUS function code range.

[0196] SectorH and SectorL are the high 8 bits and low 8 bits of the upgrade sector number. One Flash sector is uploaded per frame, and the sector number is incremented by one after each sector is uploaded. The starting address of the upgrade is mapped to sector 0.

[0197] Code1 to Code512 are parameters for a Flash sector. If the Code is less than 512 bytes, it is padded with 0xFF to make up the 512 bytes.

[0198] CrcH and CrcL are the high 8 bits and low 8 bits of the CRC checksum from BCU_ID to Code512;

[0199] The commands in Table 1 instruct the master controller's APP program to receive the CODE array into the upgrade code receiving buffer; Step 4, each master controller sends an 8-way response to the WiFi module in the following format:

[0200] BCU_ID ACK

[0201] Wherein, BCU_ID is the responder's master control ID, corresponding to 2, 3...s+1 respectively;

[0202] ACK is the response code corresponding to the 0x70 upgrade function code. The response code is located outside the MODBUS function code range. 0x6F indicates successful reception of the sector; 0x6E indicates verification failure.

[0203] ①The successful responses received by the centralized control unit BCCU4 are as follows:

[0204] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F

[0205] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0206] ②The successful response received by WiFi module 8 is as follows:

[0207] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F 0x02 0x6F

[0208] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the central control BCCU4;

[0209] If one of the responses fails, the process terminates at address 0x6E, and no further responses are received.

[0210] If a response is unsuccessful and the WIFI module 8 fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated.

[0211] ③ After all the code transmission is complete, WiFi module 8 then sends the following instructions:

[0212] BCU_ID 0x71

[0213] Among them, BCU_ID is the called broadcast master control ID number 0xFF, 0x71 is the COM function code. After the upgrade code is transmitted, the temporary storage area is converted to BOOT and copied from the upgrade code receiving temporary storage area to the APP area. The next step is to perform the real behavior upgrade operation.

[0214] ④ Each master controller responds to WiFi module 8 for function code 0x71 in the following format:

[0215] BCU_ID ACK

[0216] BCU_ID is the called party's broadcast master control ID number 0xFF, 0x71 is the COM function code, ACK is the response code for function code 0x71, 0x6D indicates reception, and 0x6C indicates failure.

[0217] 4.1 For multi-cell cluster upgrades, the successful response received by the centralized controller BCCU4 is as follows:

[0218] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D

[0219] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0220] 4.2 For multi-battery cluster upgrades, the successful response received by WiFi module 8 is as follows:

[0221] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D 0x02 0x6D

[0222] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the central control BCCU4;

[0223] If one of the responses fails, the process terminates at address 0x6C, and no further responses are received.

[0224] If a response is unsuccessful and the WIFI module 8 fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated.

[0225] After the APP application receives the response from the centralized master control BCCU4, the centralized master control BCCU4 finishes receiving the CODE into the master upgrade receive temporary storage area, records the upgrade flag UPGRADE_FLAG and the master-slave upgrade flag UPGRADE_BMU_ID and the total number of sectors in DATAFLSH, the centralized master control BCCU4 sends a reset to the MCU, exits the APP application, and enters the BOOT program.

[0226] ⑤ The main controller's response format to WiFi module 8 (parent network) is as follows:

[0227] BCU_ID 0x72 SectorPercentage

[0228] Where BCU_ID is the address of the responder, 0x72 is the response confirmation code for the copy upgrade progress bar, and SectorPercentage is the sector percentage; 0x72 indicates that copying one sector was successful; this is a broadcast release, which does not require a reply from the other party, and belongs to the response progress bar with the sector number incrementing;

[0229] When the WIFI module 8 reaches this step, it does not send any information to the main controller, but only receives the upgrade response frame progress bar given by the main controller in the BOOT program;

[0230] This command is the response of each master controller to the BOOT running program;

[0231] 5.1 For multi-cell cluster upgrades, the successful response received by the centralized main controller BCCU4 is as follows:

[0232]

[0233] Where 0x03, 0x04, ..., s+1 are the s-1 address numbers of the sequential responders, and SectorPercentage is the sector percentage;

[0234] 5.2 For multi-battery cluster upgrades, the successful response received by WiFi module 8 is as follows:

[0235]

[0236] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, the last 0x02 is the address number of the central master controller BCCU4, and SectorPercentage is the sector percentage;

[0237] When upgrading a slave controller, the main controller BCCU4 and each slave controller BCU5 need to forward the upgrade code array for each frame:

[0238] Step 5: The central master controller BCCU4 and each slave master controller BCU5 send the following instructions to the slave controller BMU7:

[0239]

[0240] Among them, BMU_ID is the called slave controller ID number. The master controller upgrades the slave controller by broadcasting the upgrade, so the master controller sends the BMU_ID to the slave controller as 0xFF.

[0241] Step six, each slave controller responds to the master controller in the following format:

[0242] BMU_ID ACK

[0243] Wherein, BMU_ID is the address of the responding slave controller, corresponding to 1, 2, 3...m respectively;

[0244] ACK is the response code corresponding to the 0x70 upgrade function code. The response code is also located outside the MODBUS function code range. 0x6F indicates successful reception of the sector; 0x6E indicates verification failure.

[0245] 6.1 The successful responses (subnet) received by each master controller from its subordinate slave controllers are as follows:

[0246] 0x01 0x6F 0x02 0x6F ...... m 0x6F

[0247] Among them, 0x01, 0x02, ..., m are the m address numbers of the sequential responders;

[0248] 6.2 After receiving the response from the slave controller, for multi-battery cluster upgrades, the successful response received by the centralized master controller BCCU4 is as follows:

[0249] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F

[0250] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0251] 6.3 After the master controller receives the response from the slave controller, for multi-battery cluster upgrades, the successful response received by WiFi module 8 is as follows:

[0252] 0x03 0x6F 0x04 0x6F ...... s+1 0x6F 0x02 0x6F

[0253] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the central control BCCU4;

[0254] If one of the responses fails, the process terminates at address 0x6E, and no further responses are sent.

[0255] If a response is unsuccessful and the WIFI module 8 fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated.

[0256] Step 7: After all the code transmission is complete, WiFi module 8 then sends the following (from the parent network):

[0257] BCU_ID 0x71

[0258] Among them, BCU_ID is the called broadcast master control ID number 0xFF, 0x71 is the COM function code, and the actual upgrade operation is copied from the temporary storage area to the APP area after the transmission of the temporary storage area is converted to BOOT.

[0259] The master controller issues the actual upgrade to the slave controller's WiFi forwarding module 8:

[0260] BMU_ID 0x71

[0261] Wherein, BMU_ID is the called broadcast slave control ID number 0xFF, and 0x71 is the COM function code;

[0262] Step 8: Each master controller responds to WiFi module 8 for function code 0x71 in the following format:

[0263] BCU_ID ACK

[0264] BCU_ID is the same as above; ACK is the acknowledgment code for function code 0x71: 0x6D for acceptance, 0x6C for failure; the format of each slave controller's acknowledgment to each master controller is also the same, as follows:

[0265] BMU_ID ACK

[0266] BMU_ID is the responder's master control ID, corresponding to 1, 2...m respectively; ACK is the acknowledgment code for function code 0x71: 0x6D for reception, 0x6C for failure;

[0267] 8.1 The successful responses (subnet) received by each master controller from its subordinate slave controllers are as follows:

[0268] 0x01 0x6D 0x02 0x6D ...... m 0x6D

[0269] Among them, 0x01, 0x02, ..., m are the m address numbers of the sequential responders;

[0270] 8.2 After receiving the response from the slave controller, for multi-battery cluster upgrades, the successful response received by the centralized master controller BCCU4 is as follows:

[0271] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D

[0272] Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence;

[0273] 8.3 After the master controller receives the response from the slave controller, for multi-battery cluster upgrades, the successful response received by WiFi module 8 is as follows:

[0274] 0x03 0x6D 0x04 0x6D ...... s+1 0x6D 0x02 0x6D

[0275] Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the central control BCCU4;

[0276] From SectorH×256+SectorL=0 until the copy ends, a progress bar is formed that increments the sector number.

[0277] The BOOT area upgrade can be performed through the APP application code, thereby optimizing the BOOT upgrade program.

[0278] The master controller opens s processes for simultaneous upgrades, and correspondingly, the slave controller opens s×m processes for simultaneous upgrades. The code transmission amount for the master controller upgrade is 1 / s, and the code transmission amount for the slave controller upgrade is 2 / s×m.

[0279] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A battery energy storage system, comprising multiple battery clusters and a high-voltage battery control box (1) configured one-to-one with the multiple battery clusters, wherein each battery cluster is connected to an inverter via a power line through the corresponding high-voltage battery control box (1); In any high-voltage battery control box (1), there is a main control box (2), multiple slave control boxes (3) and multiple battery packs (6) composed of battery modules. The multiple battery packs (6) are set one-to-one in the multiple slave control boxes (3). Each battery pack (6) is connected in series through a circuit. The main control box (2) controls the operation of the multiple slave control boxes (3). Among the multiple main control boxes (2), one of the main control boxes (2) is set as the centralized main control box. The centralized main control box controls the operation of this battery cluster and other subordinate main control boxes (2), and collects the operation data of this battery cluster and other main control boxes (2). Its features are, The central control box is equipped with a central control BCCU, and other subordinate control boxes (2) are equipped with subordinate control BCUs. Each slave control box (3) is equipped with a slave control BMU connected to the battery pack. In any high-voltage battery control box (1), every two adjacent slave control BMUs communicate via RS485 communication or daisy chain cascading. The battery energy storage system also includes a WiFi module, which has two independent RS485 channels. One of the independent RS485 channels establishes communication with the central master control BCCU and each subordinate master control BCCU, and the other independent RS485 channel is connected to the inverter. The centralized master control unit (BCCU) and each subordinate master control unit (BCU) are also connected to the inverter via a CAN interface.

2. The battery energy storage system according to claim 1, characterized in that, The battery energy storage system also includes a method for setting the centralized master control unit (BCCU) and the slave master control unit (BCU). The method for setting the centralized master control unit (BCCU) and the slave master control unit (BCU) involves setting up DIP switch circuits in the battery energy storage system, with each DIP switch circuit connected to its corresponding centralized master control unit (BCCU) and slave master control unit (BCU). The centralized master control BCCU and each subordinate master control BCCU have the same structure, and the setting position of the centralized master control BCCU is determined by the DIP switch circuit.

3. The battery energy storage system according to claim 1, characterized in that, The centralized master control BCCU and each subordinate master control BCCU are equipped with a module number setting switch, which is used to set the number of modules m of each corresponding battery cluster.

4. The battery energy storage system according to claim 1, characterized in that, The centralized master control BCCU and each subordinate master control BCCU are all connected to the cluster redundancy management system. The main circuit connected to the centralized master control BCCU, each subordinate master control BCU, and the subordinate control BMU is equipped with two relay protection modules, one positive and one negative, which serve as backups for each other. The protection mechanism triggered by the centralized master control BCCU, any group of subordinate master control BCUs, or any group of subordinate control BMUs will directly disconnect the relays in the relay protection modules.

5. A method for upgrading a battery energy storage system, characterized in that, The upgrade method includes the battery energy storage system as described in any one of claims 1-4.

6. The upgrade method according to claim 5, characterized in that, This upgrade method employs a semi-broadcast transmission approach, which includes: The WiFi module broadcasts a sector's CODE array to the central master control BCCU and each slave master control BCU. The central master control BCCU and each slave master control BCU respond and confirm one by one in order according to the preset parameters in a token relay manner. The WiFi module does not need to know the number of battery clusters and battery modules it carries. The central control BCCU successfully confirms the order last, indicating that all the main control responses have been completed, and then sends the confirmation response to the WiFi module. When the central master control BCCU and each slave master control BCU respond successfully, the WiFi module will broadcast the CODE array of the next sector. If the central master control BCCU or any group of slave master control BCUs times out or fails to respond, the CODE array of the current sector will be sent again. If the WiFi module attempts to broadcast multiple times without receiving a response, the upgrade will fail and the module will exit. The system upgrade is considered successful and the WiFi module exits broadcasting only if all sectors corresponding to the central master control BCCU and each subordinate master control BCCU are successfully upgraded.

7. The upgrade method according to claim 6, characterized in that, The upgrade method includes: Step 1: Set up Flash partitions in the central master control BCCU, each slave master control BCU, and each slave control BMU. The Flash partitions include the upgrade code receiving temporary storage area, the BOOT area, and the APP area. The upgrade code receiving temporary storage area is the area where the CODE array transmitted during the upgrade is first received and stored; The BOOT area is the code area for running remote upgrades, and the BOOT area is equipped with the BOOT upgrade service program; The APP area is where application code runs. The APP area contains APP applications for upgrading the battery energy storage system. Step 2: Switch from the APP application to the BOOT application: The APP application has an APP communication module. The selection of the centralized master control is specifically set by the DIP switch through the APP communication module. When one of the master control BCUs is set as the centralized master control BCCU, the total number of battery clusters s set by the DIP switch is read. The internal communication address BCU_I_ID of the centralized master control is 2. The internal communication is between the centralized master control BCCU and each slave master control BCU. The external communication address BCU_E_ID of the centralized master control BCCU is 1. The external communication is between the inverter and the centralized master control BCCU. The centralized master control BCCU reads the total number of modules m set by the DIP switch. When set to BCU, the internal communication address BCU_I_ID set by the DIP switch is read. BCU_I_ID can be set to 3, 4, 5...s+1 respectively. The external communication address BCU_E_ID is set to 0. BCU reads the total number of modules m set by the DIP switch. The total number of modules in the centralized master control unit (BCCU) and each subordinate master control unit (BCU) in multiple battery clusters is configured to be the same. In the APP application prior to the BOOT upgrade service program, the APP application determines whether the BOOT upgrade service program enters the BOOT program due to power-on reset or upgrade reset. The APP application first receives the CODE array in the receive temporary storage area, then writes the upgrade flag into the UPGRADE_FLAG cell of DATAFLASH, writes the upgrade master or upgrade slave flag into UPGRADE_BMU_ID of DATAFLASH, and finally sends a reset command to the MCU. After the MCU resets, it enters the BOOT upgrade service routine and checks whether the UPGRADE_FLAG unit is true: If UPGRADE_FLAG is true, then the judgment is based on UPGRADE_BMU_ID; If UPGRADE_BMU_ID is false, then copy it from the receive buffer to the APP area; If UPGRADE_BMU_ID is true, forward it to the slave controller to upgrade one sector; otherwise, if UPGRADE_FLAG is false, directly enter the APP service program. Step 3: The WiFi module sends the following commands to the central master control BCCU and the subordinate master control BCCU: According to the table above, BCU_ID is the called master control ID number. The WiFi module upgrades the master or slave control by broadcasting. The WiFi module sends BCU_ID 0xFF to the master control, where 0xFF is the broadcast address of the upgrade frame. The protocol does not consider the upgrade of a single BCCU / BCU for the time being. BMU_ID is the called slave controller ID number, which is a flag that identifies whether the upgrade is for the master controller or the slave controller; When the WiFi module sends a BMU_ID of 0 to the main controller, it upgrades the main controller. When the WiFi module sends BMU_ID 0xFF to the master controller to upgrade the slave controller, 0xFF is the broadcast address for BOOT upgrade, which is used to upgrade all slave controllers; 0x70 is the COM upgrade function code. The COM upgrade function code, including the ACK response code, is located outside the MODBUS function code range. SectorH and SectorL are the high 8 bits and low 8 bits of the upgrade sector number. One Flash sector is uploaded per frame, and the sector number is incremented by one after each sector is uploaded. The starting address of the upgrade is mapped to sector 0. Code1 to Code512 are parameters for a Flash sector. If the Code is less than 512 bytes, it is padded with 0xFF to make up the 512 bytes. CrcH and CrcL are the high 8 bits and low 8 bits of the CRC checksum from BCU_ID to Code512; The commands in the table above instruct the main control APP program to receive the CODE array into the upgrade code receiving temporary storage area; Step four, each master controller responds to the WiFi module in the following format: Wherein, BCU_ID is the responder's master control ID, corresponding to 2, 3...s+1 respectively; ACK is the response code corresponding to the 0x70 upgrade function code. The response code is located outside the MODBUS function code range. 0x6F indicates successful reception of the sector; 0x6E indicates verification failure. ①The successful responses received by the centralized control unit (BCCU) are as follows: Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence; ②The successful response received by the WiFi module is as follows: Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU; If one of the responses fails, the process terminates at address 0x6E, and no further responses are received. If a response is unsuccessful and the WIFI module fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated. ③ After all the code has been transmitted, the WiFi module then sends the following instructions: Among them, BCU_ID is the called broadcast master control ID number 0xFF, 0x71 is the COM function code. After the upgrade code is transmitted, the temporary storage area is converted to BOOT and copied from the upgrade code receiving temporary storage area to the APP area. The next step is to perform the real behavior upgrade operation. ④ The response format of each master controller to the WiFi module for function code 0x71 is as follows: BCU_ID is the called party's broadcast master control ID number 0xFF, 0x71 is the COM function code, ACK is the response code for function code 0x71, 0x6D indicates reception, and 0x6C indicates failure. 4.1 For multi-cell cluster upgrades, the successful responses received by the BCCU are as follows: Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence; 4.2 For multi-battery cluster upgrades, the successful response received by the WiFi module is as follows: Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU; If one of the responses fails, the process terminates at address 0x6C, and no further responses are received. If a response is unsuccessful and the WIFI module fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated. After the APP application receives the response from the centralized master control BCCU, the centralized master control BCCU finishes receiving the CODE into the master upgrade receive temporary storage area, records the upgrade flag UPGRADE_FLAG and the master-slave upgrade flag UPGRADE_BMU_ID and the total number of sectors in DATAFLSH, and sends a reset to the MCU to exit the APP application and enter the BOOT program. ⑤ The main controller's response format to the WiFi module is as follows: Where BCU_ID is the address of the responder, 0x72 is the response confirmation code for the copy upgrade progress bar, and SectorPercentage is the sector percentage; 0x72 indicates that copying one sector was successful; this is a broadcast release, which does not require a reply from the other party, and belongs to the response progress bar with the sector number incrementing; When the WIFI module reaches this step, it does not send any information to the main controller; it only receives the upgrade response frame progress bar given by the main controller in the BOOT program. This command is the response of each master controller to the BOOT running program; 5.1 For multi-cell cluster upgrades, the successful responses received by the BCCU are as follows: Where 0x03, 0x04, ..., s+1 are the s-1 address numbers of the sequential responders, and SectorPercentage is the sector percentage; 5.2 For multi-battery cluster upgrades, the successful response received by the WiFi module is as follows: Where 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, the last 0x02 is the address number of the BCCU, and SectorPercentage is the sector percentage; When upgrading a slave controller, the main controller and each slave controller need to forward the upgrade code array for each frame: Step 5: The central master control BCCU and each subordinate master control BCCU send the following instructions to the subordinate control BM: Among them, BMU_ID is the called slave controller ID number. The master controller upgrades the slave controller by broadcasting the upgrade, so the master controller sends the BMU_ID to the slave controller as 0xFF. Step six, each slave controller responds to the master controller in the following format: Wherein, BMU_ID is the address of the responding slave controller, corresponding to 1, 2, 3...m respectively; ACK is the response code corresponding to the 0x70 upgrade function code. The response code is also located outside the MODBUS function code range. 0x6F indicates successful reception of the sector; 0x6E indicates verification failure. 6.1 The successful responses received by each master controller from its subordinate slave controllers are as follows: Among them, 0x01, 0x02, ..., m are the m address numbers of the sequential responders; 6.2 After the master controller receives the response from the slave controller, for multi-cell upgrades, the successful response received by the BCCU is as follows: Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence; 6.3 After the master controller receives the response from the slave controller, for multi-battery cluster upgrades, the successful response received by the WiFi module is as follows: Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU; If one of the responses fails, the process terminates at address 0x6E, and no further responses are sent. If a response is unsuccessful and the WIFI module fails to complete the upgrade process after multiple consecutive attempts, the upgrade process will be terminated. Step 7: After all the code transmission is complete, the WiFi module will then be distributed. Among them, BCU_ID is the called broadcast master control ID number 0xFF, 0x71 is the COM function code, and the actual upgrade operation is copied from the temporary storage area to the APP area after the transmission of the temporary storage area is converted to BOOT. The master controller issues the actual upgrade to the slave controller's WiFi forwarding module: Wherein, BMU_ID is the called broadcast slave control ID number 0xFF, and 0x71 is the COM function code; Step 8: Each master controller responds to the WiFi module for function code 0x71 in the following format: BCU_ID is the same as above; ACK is the acknowledgment code for function code 0x71: 0x6D for acceptance, 0x6C for failure; the format of each slave controller's acknowledgment to each master controller is also the same, as follows: BMU_ID is the responder's master control ID, corresponding to 1, 2...m respectively; ACK is the acknowledgment code for function code 0x71: 0x6D for reception, 0x6C for failure; 8.1 The successful responses received by each master controller from its subordinate slave controllers are as follows: in, 0x01, 0x02, ..., m are the m address numbers of the sequential responders; 8.2 After the master controller receives the response from the slave controller, for multi-cell upgrades, the successful response received by the BCCU is as follows: Among them, 0x03, 0x04, ..., s+1 are the s-1 address numbers of the responders in sequence; 8.3 After the master controller receives the response from the slave controller, for multi-battery cluster upgrades, the successful response received by the WiFi module is as follows: Among them, 0x03, 0x04......s+1, and 0x02 are the s address numbers of the sequential responders, and the last 0x02 is the address number of the BCCU; From SectorH×256+SectorL=0 until the copy ends, a progress bar is formed that increments the sector number.

8. The upgrade method according to claim 7, wherein the BOOT area upgrade can be performed through APP application code, thereby optimizing the BOOT upgrade program.

9. The upgrade method according to claim 7, characterized in that, The "multiple times" refers to three times.

10. The upgrade method according to claim 7, characterized in that, The master controller opens s processes for simultaneous upgrades, and correspondingly, the slave controller opens s×m processes for simultaneous upgrades. The code transmission amount for the master controller upgrade is 1 / s, and the code transmission amount for the slave controller upgrade is 2 / s×m.

Citation Information

Patent Citations

  • Logic control method for energy storage multi-cell cluster BESS parallel connection

    CN116799919A

  • Communication system and communication method of energy storage battery, and vehicle

    CN118646444A