Control method and battery pack
By automatically identifying the master and slave machines in the parallel battery pack, and using a competition mechanism to allocate logical addresses and status data frames, the problem of low parallel efficiency of the energy storage system is solved, and automated system management and inverter power consumption reduction are achieved. .
Patent Information
- Application Number
- CN202410841380.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-18
AI Technical Summary
In a parallel battery pack, the settings of the master and slave units rely on manual settings, resulting in low parallel efficiency of the energy storage system.
By implementing an automatic identification mechanism in the battery pack, using bus broadcast data frames to determine the master and slave machines, and using a competition mechanism to allocate logical addresses and status data frames, the parallel efficiency of the system is improved.
It achieves automatic identification of the master and slave machines, improves the parallel efficiency of the energy storage system, reduces the power consumption of the inverter, and reduces manual intervention.
Smart Images

Figure CN118801530A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of energy storage systems, and in particular to a control method and a battery pack. Background Art
[0002] The energy storage system includes an inverter and multiple battery packs. Multiple battery packs are connected in parallel to form a parallel battery pack. The inverter and multiple battery packs are connected through a bus. In the parallel battery pack, one battery pack is the host and the remaining battery packs are slaves. The slave communicates with the host to send its own data to the host. The host communicates with the inverter to collect the data of all battery packs, obtain the system data of the parallel battery pack after processing, and then send the system data of the parallel battery pack to the inverter, and control the power distribution of each battery pack. The inverter no longer controls each battery pack, thereby reducing the power consumption of the inverter. However, the settings of the host and each slave usually rely on manual settings, resulting in low parallel efficiency of the energy storage system. Summary of the invention
[0003] In view of this, the present application provides a control method and a battery pack, aiming to solve the problem of how to determine the master and slave in a parallel battery pack.
[0004] The first aspect of an embodiment of the present application provides a control method, which is applied to any battery pack in a parallel battery group, and each battery pack in the parallel battery group is connected to an inverter via a bus. The method includes: in response to a power-on signal, receiving a broadcast data frame on the bus. When no broadcast data frame is received in the first time period, determine that itself is the host. When it is determined that itself is the host, set its own logical address to the host logical address, and send a broadcast data frame on the bus. Receive the identification number of the slave, and distribute the slave logical address according to the identification number of the slave. Receive the status data frame of the slave, and the status data frame of the slave includes the slave logical address. Obtain the system data of the parallel battery group according to the status data frame of the host and the status data frames of all slaves. Send the system data of the parallel battery group to the inverter.
[0005] In this embodiment, the battery pack with the earliest power-on time in the parallel battery group is the host, and the battery packs other than the host are all slaves. The battery pack determines whether it is the earliest powered-on battery pack based on whether it receives a broadcast data frame in the first time period. After determining that it is the host, the battery pack distributes the slave logical address based on the timing of receiving the identification number of the slave and the order of the size of the identification number. In this way, the host and each slave are determined through a competition mechanism, which improves the parallel efficiency of the energy storage system.
[0006] In one embodiment, the method further includes: when receiving a broadcast data frame in a first time period, determining that the device is a slave. When determining that the device is a slave, sending its own identification number to the host. Receiving a slave logical address from the host, setting its own logical address as the slave logical address. Sending its own status data frame to the host, wherein the status data frame includes the slave logical address.
[0007] In another embodiment, the method further includes: when no broadcast data frame is received in the first time period, sending a broadcast data frame on the bus, the broadcast data frame including its own identification number. When a broadcast data frame is received in the second time period, obtaining a reference identification number from the broadcast data frame. The reference identification number is the identification number of the battery pack other than itself in the parallel battery pack. When it is determined that its own identification number is less than all reference identification numbers, it is determined that it is the host. The second time period is after the first time period.
[0008] In another embodiment, after obtaining the reference identification number from the broadcast data frame, the method further includes: when it is determined that its own identification number is greater than any reference identification number, determining that it is a slave. When it is determined that it is a slave, sending its own identification number to the host. Receiving the slave logical address from the host, setting its own logical address as the slave logical address. Sending its own status data frame to the host, wherein its own status data frame includes the slave logical address.
[0009] In another embodiment, when determining that it is the master, the method further includes: when not receiving the slave status data frame in the third time period, determining that the slave is offline. When determining that the slave is offline, deleting the identification number and slave logical address of the offline slave, and redistributing the slave logical address to the slaves that are not offline.
[0010] In another embodiment, when determining that itself is the host, the method further includes: when receiving an identification number of a newly added battery pack, sending a slave logical address according to the identification number of the newly added battery pack.
[0011] In another embodiment, when determining that the device is a slave, the method further includes: when no broadcast data frame is received in a fourth time period, determining that the host is offline. When determining that the device's logical address is the target logical address, determining that the device is a host. When determining that the device is a host, modifying the device's logical address to a host logical address, and sending a broadcast data frame on the bus.
[0012] In another embodiment, after determining that the host is offline, the method further includes: when determining that its own logical address is not the target logical address, determining itself as a slave. When determining that itself is a slave, receiving the slave logical address from the host, and modifying its own logical address to the slave logical address.
[0013] The second aspect of the embodiment of the present application provides a battery pack, which is any one of the battery packs in a parallel battery group, and each battery pack in the parallel group is connected to the inverter via a bus. The battery pack includes a battery management system, and the battery management system includes a communication module. The battery management system is used to: respond to a power-on signal, receive a broadcast data frame on the bus through the communication module. When the communication module does not receive a broadcast data frame in the first time period, it determines that it is the host. When it is determined that it is the host, set its own logical address to the host logical address. Send a broadcast data frame on the bus through the communication module, and receive the identification number of the slave. Determine the slave logical address according to the identification number of the slave. Distribute the slave logical address through the communication module, and receive the slave status data frame, the slave status data frame including the slave logical address. Obtain the system data of the parallel battery pack according to the status data frame of the host and the status data frames of all slaves. Send the system data of the parallel battery pack to the inverter through the communication module.
[0014] In one embodiment, the battery management system is further used to: when the communication module receives a broadcast data frame in a first time period, determine that it is a slave. When it is determined that it is a slave, send its own identification number to the host through the communication module, and receive the slave logical address from the host. Set its own logical address as the slave logical address. Send its own status data frame to the host through the communication module, and its own status data frame includes the slave logical address.
[0015] It can be understood that the beneficial effects of the battery pack provided in the second aspect of the embodiment of the present application are substantially the same as the beneficial effects of the control method provided in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The schematic diagram of the structure of the energy storage system provided as an example.
[0017] Figure 2 It is a flow chart of the control method provided in Example 1.
[0018] Figure 3 It is a flow chart of the control method provided in the second embodiment.
[0019] Figure 4 It is a flow chart of the control method provided in the third embodiment.
[0020] Figure 5 It is a flow chart of the control method provided in the fourth embodiment.
[0021] Figure 6 It is a flow chart of the control method provided in the fifth embodiment. DETAILED DESCRIPTION
[0022] It should be noted that in the embodiments of the present application, "multiple" refers to two or more than two. The terms "first", "second", "third", "fourth", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. The method disclosed in the embodiments of the present application or the method shown in the flow chart includes one or more steps for implementing the method. Without departing from the scope of the claims, the execution order of multiple steps can be interchangeable with each other, and some of the steps can also be deleted.
[0023] Figure 1 The schematic diagram of the structure of the energy storage system provided as an example.
[0024] like Figure 1 As shown, the energy storage system 10 includes an inverter 100 and a plurality of battery packs 200. The plurality of battery packs 200 are connected in parallel to form a parallel battery pack. The inverter 100 and the plurality of battery packs 200 are connected via a bus. Exemplarily, the bus includes a controller area network (CAN) bus, and the CAN bus uses a CANH line and a CANL line for differential signal transmission.
[0025] In a parallel battery pack, one battery pack 200 is the host, and the remaining battery packs 200 are slaves. The slave communicates with the host to send its own data to the host. The host communicates with the inverter 100 to collect data from all battery packs 200, obtain system data of the parallel battery packs after processing, and then send the system data of the parallel battery packs to the inverter 100, and control the power distribution of each battery pack 200. The inverter 100 no longer controls each battery pack 200, thereby reducing the power consumption of the inverter 100. However, the settings of the host and each slave usually rely on manual settings, resulting in low parallel efficiency of the energy storage system 10.
[0026] Based on this, an embodiment of the present application provides a control method and a battery pack, which aim to solve the problem of how to determine the master and slave in a parallel battery pack.
[0027] In an embodiment of the present application, the control system of the inverter and the control system of the battery pack both include a microcontroller unit (MCU), the MCU is provided with a CAN communication module, the CAN communication module includes a plurality of data transceiver registers, these data transceiver registers are called mailboxes, and the mailboxes are used to send or receive data. Exemplarily, the control system of the battery pack includes the first mailbox to the eighth mailbox, the first mailbox is used to send a broadcast data frame, the second mailbox is used to receive a broadcast data frame, the third mailbox is used to send an identification number or address data frame of the battery pack, the fourth mailbox is used to receive an identification number or address data frame of the battery pack, the fifth mailbox is used to send a battery pack status data frame between multiple battery packs, the sixth mailbox is used to receive a battery pack status data frame between multiple battery packs, and the seventh mailbox is used to send system data of parallel battery packs between the host and the inverter.
[0028] Among them, the broadcast data frame includes instructions, such as power-on instructions, power-off instructions, charging instructions, discharging instructions, working mode instructions, etc. The identification number of the battery pack is unique and is used to distinguish different battery packs. For example, the identification number is a serial number. The address data frame is used to assign logical addresses, and the address data frame includes an address arbitration field and an address data field. The address arbitration field includes an address transfer identifier, and the address transfer identifier is used to indicate transmission between multiple battery packs. The address data field includes a target identification number and a logical address corresponding to the target identification number. The status data frame is used to characterize the status of the battery pack, and the status data frame includes a status arbitration field and a status data field. The status arbitration field includes a status transfer identifier, and the status transfer identifier is used to indicate transmission between the battery pack and the inverter. The status data field includes the state of charge (SoC), voltage, current, temperature, fault information, etc.
[0029] The control method of the present application is described in detail below by taking Embodiment 1 to Embodiment 5 as examples. The control method is applied to any battery pack in a parallel battery pack.
[0030] Embodiment 1
[0031] Scenario: The power-on time of one battery pack in a parallel battery pack is earlier than the power-on time of other battery packs except this battery pack.
[0032] Figure 2 It is a flow chart of the control method provided in Example 1.
[0033] like Figure 2 As shown, the control method includes the following steps:
[0034] S101, in response to a power-on signal, disabling a first mailbox and enabling a second mailbox.
[0035] Among them, the power-on signal is used to trigger the battery pack to power on.
[0036] In this embodiment, disabling the first mailbox indicates that sending broadcast data frames is not allowed, and enabling the second mailbox indicates that receiving broadcast data frames is allowed. That is, after the battery pack is powered on, it receives broadcast data frames from the bus.
[0037] S102: Determine whether a broadcast data frame is received in a first time period.
[0038] If yes, execute steps S103 to S106 ; if no, execute steps S110 to S119 .
[0039] Among them, the first time period is set according to demand.
[0040] S103, when receiving a broadcast data frame in a first time period, determining that the device is a slave.
[0041] In this embodiment, the battery pack receives the broadcast data frame in the first time period, indicating that the battery pack is not the first battery pack to be powered on.
[0042] S104, enabling the third mailbox.
[0043] In this embodiment, enabling the third mailbox indicates that the identification number of the battery pack is allowed to be sent, that is, after the battery pack determines that it is a slave, it sends its own identification number on the bus.
[0044] S105, enabling the fourth mailbox.
[0045] In this embodiment, enabling the fourth mailbox indicates that the address data frame is allowed to be received, that is, the battery pack receives the address data frame from the bus after sending its own identification number.
[0046] S106: Based on the received address data frame, determine whether the target identification number in the address data frame is consistent with the own identification number.
[0047] If yes, execute steps S107 to S108; if no, execute step S109.
[0048] S107, when it is determined that the target identification number in the address data frame is consistent with the own identification number, the logical address in the address data frame is written.
[0049] In this embodiment, the target identification number in the address data frame is consistent with the own identification number, indicating that the address data frame is an address data frame assigned by the host to itself.
[0050] S108, enabling the fifth mailbox.
[0051] In this embodiment, enabling the fifth mailbox indicates that the battery pack is allowed to send its own status data frame, that is, after writing the logical address in the address data frame, the battery pack sends its own status data frame on the bus.
[0052] S109, when it is determined that the target identification number in the address data frame is inconsistent with its own identification number, receiving the next address data frame.
[0053] After executing step S109, return to execute step S106.
[0054] In this embodiment, the target identification number in the address data frame is inconsistent with the own identification number, indicating that the address data frame is not the address data frame assigned by the host to itself.
[0055] S110, when no broadcast data frame is received in the first time period, determining that the host is the host.
[0056] In this embodiment, the battery pack does not receive the broadcast data frame in the first time period, indicating that the battery pack is the first battery pack to be powered on.
[0057] S111, setting its own logical address as the host logical address.
[0058] The host logical address is set as required. For example, the host logical address is 0.
[0059] S112, enabling the first mailbox.
[0060] In this embodiment, enabling the first mailbox indicates that sending of broadcast data frames is allowed, that is, after the battery pack determines that it is the host, it sends the broadcast data frame on the bus.
[0061] S113, enabling the fourth mailbox.
[0062] In this embodiment, enabling the fourth mailbox indicates that the identification number of the slave is allowed to be received, that is, after the battery pack sends the broadcast data frame, it receives the identification number of the slave from the bus.
[0063] S114, when a slave identification number is received within a predetermined time period, a slave logic address corresponding to the slave identification number is allocated in a time sequence.
[0064] The scheduled time period is set based on demand.
[0065] S115, when multiple identification numbers of slaves are received within a predetermined time period, slave logical addresses corresponding to the identification numbers of the slaves are allocated in order of the size of the identification numbers.
[0066] Steps S114 and S115 are executed in parallel.
[0067] In this embodiment, the allocation of the slave logical address is related to the timing of the battery pack receiving the identification number of the slave and the size order of the identification numbers. Among them, the size order of the identification numbers includes the order from small to large or the order from large to small.
[0068] Taking the order of the identification numbers from small to large as an example. The battery pack establishes an address list, which is used to store the identification numbers of each battery pack and the corresponding slave logical addresses. First, the battery pack writes its own identification number and its own logical address into the address list, that is, the identification number SN0 of the master and the master logical address 0. Then, when receiving the identification number SN1 of a slave within a predetermined time period, the battery pack sequentially allocates the slave logical address 1 corresponding to the identification number SN1 of the slave, and writes the identification number SN1 of the slave and the slave logical address 1 into the address list. When receiving the identification numbers SN2 and SN3 of the slaves within a predetermined time period, where SN2 < SN3, the battery pack sequentially allocates the slave logical address 2 corresponding to the identification number SN2 of the slave, the slave logical address 3 corresponding to the identification number SN3 of the slave, and writes the identification number SN2 of the slave and the slave logical address 2, the identification number SN3 of the slave and the slave logical address 3 into the address list. Thus, the battery pack establishes the address list according to the timing and the size order of the identification numbers.
[0069] S116, enable the third mailbox.
[0070] In this embodiment, enabling the third mailbox means allowing the transmission of the address data frame. That is, after the battery pack allocates the slave logical address according to the identification number of the slave, it sends the address data frame on the bus.
[0071] S117, enable the sixth mailbox.
[0072] In this embodiment, enabling the sixth mailbox means allowing the reception of the status data frame of the slave. That is, after the battery pack sends the address data frame, it receives the status data frame of the slave from the bus.
[0073] S118, obtain the system data of the parallel battery pack according to its own status data frame and the status data frames of all slaves.
[0074] Among them, the system data of the parallel battery pack may include the total output voltage, total output current, etc. of the parallel battery pack.
[0075] S119, enable the seventh mailbox.
[0076] In this embodiment, enabling the seventh mailbox means allowing the transmission of the system data of the parallel battery pack to the inverter.
[0077] In one embodiment, after collecting its own status data frame and the status data frames of all slaves, the host sends a total status data frame to the inverter. The total status data frame is a status data frame after processing the data of all battery packs. Exemplarily, the total status data frame includes the average value of SoC / voltage / current of all battery packs.
[0078] In the scenario of the first embodiment, the battery pack with the earliest power-on time in the parallel battery group is the host, and the other battery packs except the host are all slaves. The battery pack determines whether it is the earliest powered-on battery pack based on whether it receives a broadcast data frame in the first time period. After determining that it is the host, the battery pack distributes the slave logical address according to the timing of receiving the identification number of the slave and the order of the size of the identification number. Therefore, the host and each slave are determined through a competition mechanism, which improves the parallel efficiency of the energy storage system.
[0079] Embodiment 2
[0080] Scenario: Multiple battery packs in a parallel battery group are powered on simultaneously.
[0081] Figure 3 It is a flow chart of the control method provided in the second embodiment.
[0082] like Figure 3 As shown, the control method includes the following steps:
[0083] S201, in response to a power-on signal, disabling a first mailbox and enabling a second mailbox.
[0084] In this embodiment, disabling the first mailbox indicates that sending broadcast data frames is not allowed, and enabling the second mailbox indicates that receiving broadcast data frames is allowed. That is, after the battery pack is powered on, it receives broadcast data frames from the bus.
[0085] S202: When no broadcast data frame is received in the first time period, enable the first mailbox.
[0086] In this embodiment, enabling the first mailbox indicates that the broadcast data frame is allowed to be sent. That is, when no broadcast data frame is received in the first time period, the battery pack sends a broadcast data frame on the bus. The broadcast data frame includes its own identification number.
[0087] S203: When a broadcast data frame is received in the second time period, a reference identification number is obtained from the broadcast data frame.
[0088] The reference identification number is the identification number of the battery pack other than itself. The second time period is after the first time period.
[0089] In this embodiment, the battery pack does not receive the broadcast data frame in the first time period and receives the broadcast data frame in the second time period, indicating that one or more battery packs are powered on at the same time as the battery pack. After sending the broadcast data frame, the battery pack continues to receive broadcast data frames from the bus. Each broadcast data frame includes an identification number of the corresponding battery pack. That is, the number of reference identification numbers is consistent with the number of broadcast data frames.
[0090] S204, determining whether the own identification number is smaller than the reference identification number.
[0091] If yes, execute steps S205 to S213; if no, execute steps S214 to S217.
[0092] S205: When it is determined that its own identification number is smaller than all reference identification numbers, it is determined that it is the host.
[0093] S206, setting its own logical address as the host logical address.
[0094] S207, enabling the fourth mailbox.
[0095] In this embodiment, enabling the fourth mailbox indicates that the identification number of the slave is allowed to be received, that is, after the battery pack determines that it is the master, it receives the identification number of the slave from the bus.
[0096] It can be understood that the number of identification numbers of the slaves is greater than or equal to the number of reference identification numbers.
[0097] S208, when a slave identification number is received within a predetermined time period, a slave logic address corresponding to the slave identification number is allocated in a time sequence.
[0098] The scheduled time period is set based on demand.
[0099] S209, when multiple identification numbers of slaves are received within a predetermined time period, slave logical addresses corresponding to the identification numbers of the slaves are allocated in order of the size of the identification numbers.
[0100] Steps S208 and S209 are executed in parallel.
[0101] In this embodiment, the allocation of the slave logic address is related to the timing of the battery pack receiving the identification number of the slave and the size order of the identification number, wherein the size order of the identification number includes an order from small to large or from large to small.
[0102] S210, enabling the third mailbox.
[0103] In this embodiment, enabling the third mailbox indicates that sending the address data frame is allowed, that is, after the battery pack allocates the slave logic address according to the identification number of the slave, it sends the address data frame on the bus.
[0104] S211, enable the sixth mailbox.
[0105] In this embodiment, enabling the sixth mailbox indicates that the state data frame of the slave is allowed to be received, that is, the battery pack receives the state data frame of the slave from the bus after sending the address data frame.
[0106] S212, acquiring system data of the parallel battery pack according to its own status data frame and status data frames of all slaves.
[0107] S213, enabling the seventh mailbox.
[0108] In this embodiment, enabling the seventh mailbox indicates that system data of the parallel battery group is allowed to be sent to the inverter.
[0109] S214, when it is determined that its own identification number is greater than any reference identification number, it is determined that the device is a slave.
[0110] S215, enabling the third mailbox.
[0111] In this embodiment, enabling the third mailbox indicates that the identification number of the battery pack is allowed to be sent, that is, after the battery pack determines that it is a slave, it sends its own identification number on the bus.
[0112] S216, enabling the fourth mailbox.
[0113] In this embodiment, enabling the fourth mailbox indicates that the address data frame is allowed to be received, that is, the battery pack receives the address data frame from the bus after sending its own identification number.
[0114] S217, based on the received address data frame, determining whether the target identification number in the address data frame is consistent with the own identification number.
[0115] If yes, execute steps S218 to S219; if no, execute step S220.
[0116] S218, when it is determined that the target identification number in the address data frame is consistent with the own identification number, the logical address in the address data frame is written.
[0117] In this embodiment, the target identification number in the address data frame is consistent with the own identification number, indicating that the address data frame is an address data frame assigned by the host to itself.
[0118] S219, enable the fifth mailbox.
[0119] In this embodiment, enabling the fifth mailbox indicates that the battery pack is allowed to send its own status data frame, that is, after writing the logical address in the address data frame, the battery pack sends its own status data frame on the bus.
[0120] S220, when it is determined that the target identification number in the address data frame is inconsistent with the own identification number, receiving the next address data frame.
[0121] After executing step S220, return to execute step S217.
[0122] In this embodiment, the target identification number in the address data frame is inconsistent with the own identification number, indicating that the address data frame is not the address data frame assigned by the host to itself.
[0123] In the scenario of Example 2, the battery pack with the smallest identification number among multiple battery packs powered on at the same time is the host, and the battery packs other than the host are all slaves. The battery pack does not receive a broadcast data frame in the first time period and receives a broadcast data frame in the second time period, and determines that a battery pack is powered on at the same time as itself. The battery pack determines whether it is the battery pack with the smallest identification number based on whether its own identification number is less than the reference identification number in the received broadcast data frame. After determining that it is the host, the battery pack distributes the slave logical addresses according to the timing of receiving the identification number of the slave and the order of the size of the identification number. Thus, the host and each slave are determined through a competition mechanism, thereby improving the parallel efficiency of the energy storage system.
[0124] It can be understood that in other embodiments, the battery pack with the largest identification number among the multiple battery packs powered on at the same time is the master, and the battery packs other than the master are all slaves. The battery pack determines whether it is the battery pack with the largest identification number by determining whether its own identification number is greater than the reference identification number in the received broadcast data frame.
[0125] Embodiment 3
[0126] Scenario: The slave device is offline.
[0127] Figure 4 It is a flow chart of the control method provided in the third embodiment.
[0128] like Figure 4 As shown, the control method includes the following steps:
[0129] S301, when the battery pack determines that it is the host, it sets its own logical address as the host logical address.
[0130] S302, enabling the fourth mailbox.
[0131] In this embodiment, enabling the fourth mailbox indicates that the identification number of the slave is allowed to be received, that is, after the battery pack determines that it is the master, it receives the identification number of the slave from the bus.
[0132] S303, enabling the third mailbox.
[0133] In this embodiment, enabling the third mailbox indicates that sending the address data frame is allowed, that is, after the battery pack allocates the slave logic address according to the identification number of the slave, it sends the address data frame on the bus.
[0134] S304, enabling the sixth mailbox.
[0135] In this embodiment, enabling the sixth mailbox indicates that the state data frame of the slave is allowed to be received, that is, the battery pack receives the state data frame of the slave from the bus after sending the address data frame.
[0136] S305: When no status data frame of the slave is received in the third time period, it is determined that the slave is offline.
[0137] Among them, the third time period is set according to demand.
[0138] S306, deleting the identification number and the slave logic address of the offline slave.
[0139] In this embodiment, the address list established by the host stores the identification numbers of all battery packs and the corresponding slave logical addresses. After determining that the slave is offline, the battery pack deletes the identification number and slave logical address of the offline slave from the address list.
[0140] S307, reallocate the slave logical addresses to the slaves that have not been disconnected.
[0141] In this embodiment, the allocation of the slave logical address is related to the timing of the battery pack receiving the identification number of the slave and the order of the identification number. Take the order of the identification number from small to large as an example. After the battery pack deletes the identification number and the slave logical address of the slave that has been disconnected, the slave logical address that is ranked before the slave that has been disconnected remains unchanged, and the slave logical addresses that are ranked after the slave that has been disconnected are each reduced by 1, thereby completing the reallocation of the slave logical address.
[0142] S308, sending an address data frame through a third mailbox.
[0143] In this embodiment, after the battery pack reallocates the slave logical addresses to the slaves that have not been disconnected, it sends an address data frame on the bus through the third mailbox.
[0144] It can be understood that after receiving the address data frame from the host, the slave updates its own slave logical address and then sends its own status data frame on the bus.
[0145] S309, receiving the status data frame of the slave machine through the sixth mailbox.
[0146] In this embodiment, after sending the address data frame, the battery pack receives the slave status data frame from the bus through the sixth mailbox.
[0147] S310, acquiring system data of the parallel battery pack according to its own status data frame and status data frames of all slaves.
[0148] S311, enable the seventh mailbox.
[0149] In this embodiment, enabling the seventh mailbox indicates that system data of the parallel battery group is allowed to be sent to the inverter.
[0150] In the scenario of the third embodiment, when the battery pack determines that it is the host, the battery pack determines whether the slave is offline based on whether it receives the status data frame of the slave in the third time period. After determining that the slave is offline, the battery pack deletes the identification number and slave logical address of the offline slave, and redistributes the slave logical address to the slaves that are not offline. Thus, by timely updating the slave logical address, the problem of invalid slave logical addresses occupying host resources is solved.
[0151] Embodiment 4
[0152] Scenario: Adding a new battery pack to a parallel battery group.
[0153] Figure 5 It is a flow chart of the control method provided in the fourth embodiment.
[0154] The control method is applied to the battery pack. Figure 5 As shown, the control method includes the following steps:
[0155] S401, when the battery pack determines that it is the host, it sets its own logical address as the host logical address.
[0156] S402, enabling the first mailbox.
[0157] In this embodiment, enabling the first mailbox indicates that sending of broadcast data frames is allowed, that is, after the battery pack determines that it is the host, it sends the broadcast data frame on the bus.
[0158] S403, enabling the fourth mailbox.
[0159] In this embodiment, enabling the fourth mailbox indicates that the identification number of the slave is allowed to be received, that is, after the battery pack sends the broadcast data frame, it receives the identification number of the slave from the bus.
[0160] S404, when the identification number of the newly added battery pack is received, a slave logical address corresponding to the identification number of the newly added battery pack is allocated.
[0161] In this embodiment, after the newly added battery pack is powered on, it receives a broadcast data frame from the bus. When receiving the broadcast data frame, the newly added battery pack sends its own identification number on the bus.
[0162] The allocation of the slave logic address is related to the timing of the battery pack receiving the identification number of the slave and the order of the size of the identification number.
[0163] S405, enabling the third mailbox.
[0164] In this embodiment, enabling the third mailbox indicates that sending the address data frame is allowed, that is, after the battery pack allocates the slave logic address according to the identification number of the slave, it sends the address data frame on the bus.
[0165] S406, enabling the sixth mailbox.
[0166] In this embodiment, enabling the sixth mailbox indicates that the state data frame of the slave is allowed to be received, that is, the battery pack receives the state data frame of the slave from the bus after sending the address data frame.
[0167] S407, acquiring system data of the parallel battery pack according to its own status data frame and status data frames of all slaves.
[0168] S408, enabling the seventh mailbox.
[0169] In this embodiment, enabling the seventh mailbox indicates that system data of the parallel battery group is allowed to be sent to the inverter.
[0170] In the scenario of the fourth embodiment, when the battery pack determines that it is the host, the battery pack determines whether a newly added battery pack is powered on according to whether the identification number of the newly added battery pack is received. After determining that the newly added battery pack is powered on, when the battery pack receives the identification number of the newly added battery pack, the slave logic address corresponding to the identification number of the newly added battery pack is allocated. Thus, by allocating the slave logic address to the newly added battery pack, the parallel control of the newly added battery pack is realized.
[0171] Embodiment 5
[0172] Scenario: The host is offline.
[0173] Figure 6 It is a flow chart of the control method provided in the fifth embodiment.
[0174] like Figure 6 As shown, the control method includes the following steps:
[0175] S501, when the battery pack determines that it is a slave, the second mailbox is enabled.
[0176] In this embodiment, enabling the second mailbox indicates allowing reception of broadcast data frames.
[0177] S502: When no broadcast data frame is received in a fourth time period, it is determined that the host is offline.
[0178] Among them, the fourth time period is set according to demand.
[0179] S503, determining whether the own logical address is the target logical address.
[0180] The target logical address may be any predetermined slave logical address. For example, the host logical address is 0 and the target logical address is 1.
[0181] If yes, execute steps S504 to S512; if no, execute steps S513 to S517.
[0182] S504: When the logical address of the device itself is the target logical address, the device itself is determined to be the host.
[0183] S505, modifying its own logical address to the host logical address.
[0184] S506, enabling the first mailbox.
[0185] In this embodiment, enabling the first mailbox indicates that sending of broadcast data frames is allowed, that is, after the battery pack determines that it is the host, it sends the broadcast data frame on the bus.
[0186] S507, enabling the fourth mailbox.
[0187] In this embodiment, enabling the fourth mailbox indicates that the identification number of the slave is allowed to be received, that is, after the battery pack sends the broadcast data frame, it receives the identification number of the slave from the bus.
[0188] S508, allocating a slave logic address corresponding to the identification number of the slave.
[0189] The allocation of the slave logic address is related to the timing of the battery pack receiving the identification number of the slave and the order of the size of the identification number.
[0190] S509, enabling the third mailbox.
[0191] In this embodiment, enabling the third mailbox indicates that sending the address data frame is allowed, that is, after the battery pack allocates the slave logic address according to the identification number of the slave, it sends the address data frame on the bus.
[0192] S510, enabling the sixth mailbox.
[0193] In this embodiment, enabling the sixth mailbox indicates that the state data frame of the slave is allowed to be received, that is, the battery pack receives the state data frame of the slave from the bus after sending the address data frame.
[0194] S511, acquiring system data of the parallel battery pack according to its own status data frame and status data frames of all slaves.
[0195] S512, enable the seventh mailbox.
[0196] In this embodiment, enabling the seventh mailbox indicates that system data of the parallel battery group is allowed to be sent to the inverter.
[0197] S513: When the logical address of the device itself is not the target logical address, the device itself is determined to be a slave.
[0198] S514, enable the third mailbox.
[0199] In this embodiment, enabling the third mailbox indicates that the identification number of the battery pack is allowed to be sent, that is, after the battery pack determines that it is a slave, it sends its own identification number on the bus.
[0200] S515, enabling the fourth mailbox.
[0201] In this embodiment, enabling the fourth mailbox indicates that the address data frame is allowed to be received, that is, the battery pack receives the address data frame from the bus after sending its own identification number.
[0202] S516: Based on the received address data frame, modify its own logical address to the logical address in the address data frame.
[0203] S517, enable the fifth mailbox.
[0204] In this embodiment, enabling the fifth mailbox indicates that the battery pack is allowed to send its own status data frame, that is, after writing the logical address in the address data frame, the battery pack sends its own status data frame on the bus.
[0205] In the scenario of Example 5, when the battery pack determines that it is a slave, the battery pack determines whether the host is offline based on whether it receives a broadcast data frame in the fourth time period. After determining that the host is offline, the battery pack determines whether to change itself to the host based on whether its own logical address is the target logical address. After determining that it is the host, the battery pack modifies its own logical address to the host logical address, and distributes the slave logical addresses according to the timing of receiving the identification number of the slave and the order of the size of the identification number. Thus, by replacing the host in time, the problem of energy storage system paralysis caused by the host being offline is solved.
[0206] The embodiment of the present application provides a battery pack, which is any one of the battery packs in a parallel battery group, and each battery pack in the parallel battery group is connected to an inverter via a bus. The battery pack includes a battery management system, and the battery management system includes a communication module, and the communication module is used to send or receive data on the bus, and the battery management system is used to execute the control method of the embodiment of the present application.
[0207] An embodiment of the present application provides a computer-readable storage medium, which is used to store instructions. When the instructions are executed by a processor, the processor executes the control method of the embodiment of the present application.
[0208] Computer-readable storage media include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer-readable storage media include, but are not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), flash memory or other memory, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), digital versatile disc (Digital Versatile Disc, DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0209] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present application.
Claims
1. A control method, applied to any battery pack in a parallel battery group, wherein each battery pack in the parallel battery group is connected to an inverter via a bus, characterized in that: The method comprises: In response to a power-on signal, receiving a broadcast data frame on the bus; When no broadcast data frame is received in the first time period, determining that the host is the host; When determining that it is a host, setting its own logical address as the host logical address, and sending a broadcast data frame on the bus; receiving an identification number of a slave machine, and distributing a slave machine logical address according to the identification number of the slave machine; receiving a status data frame of a slave machine, wherein the status data frame of the slave machine includes a slave machine logical address; Acquire system data of the parallel battery pack according to the status data frame of the host and the status data frames of all slaves; The system data of the parallel battery group is sent to the inverter.
2. The control method according to claim 1, characterized in that: The method further comprises: When receiving a broadcast data frame in the first time period, determining that the device is a slave; When it determines that it is a slave, it sends its own identification number to the master; Receive the slave logical address from the host, and set its own logical address as the slave logical address; The slave sends its own status data frame to the host, wherein the own status data frame includes the slave logical address.
3. The control method according to claim 1, characterized in that: The method further comprises: When no broadcast data frame is received in the first time period, sending a broadcast data frame on the bus, the broadcast data frame including its own identification number; When a broadcast data frame is received in the second time period, a reference identification number is obtained from the broadcast data frame; the reference identification number is an identification number of a battery pack other than the battery pack itself in the parallel battery group; When it is determined that its own identification number is smaller than all the reference identification numbers, it is determined that itself is the host; wherein the second time period is after the first time period.
4. The control method according to claim 3, characterized in that: After acquiring the reference identification number from the broadcast data frame, the method further includes: When it is determined that the identification number of the self is greater than any of the reference identification numbers, the self is determined to be a slave; When determining that it is a slave, sending its own identification number to the master; Receive the slave logical address from the host, and set its own logical address as the slave logical address; The slave sends its own status data frame to the host, wherein the own status data frame includes the slave logical address.
5. The control method according to claim 1 or 3, characterized in that: When determining that the host is the host, the method further includes: When no status data frame of the slave is received in the third time period, it is determined that the slave is offline; When it is determined that the slave is offline, the identification number and the slave logic address of the offline slave are deleted, and the slave logic addresses are redistributed to the slaves that are not offline.
6. The control method according to claim 1 or 3, characterized in that: When determining that the host is the host, the method further includes: When the identification number of the newly added battery pack is received, the slave logical address is sent according to the identification number of the newly added battery pack.
7. The control method according to claim 2 or 4, characterized in that: When it is determined that the device itself is a slave, the method further includes: When no broadcast data frame is received in the fourth time period, it is determined that the host is offline; When determining that its own logical address is the target logical address, determining itself as the host; When determining that it is the host, it modifies its own logical address to the host logical address, and sends a broadcast data frame on the bus.
8. The control method according to claim 7, characterized in that: After determining that the host is offline, the method further includes: When it is determined that its own logical address is not the target logical address, determining itself as a slave; When it determines that it is a slave, it receives the slave logical address from the host and modifies its own logical address to the slave logical address.
9. A battery pack, wherein the battery pack is any one of a parallel battery group, each battery pack in the parallel group is connected to an inverter via a bus, characterized in that: The battery pack includes a battery management system, and the battery management system includes a communication module; the battery management system is used for: In response to a power-on signal, receiving a broadcast data frame on the bus through the communication module; When the communication module does not receive a broadcast data frame in the first time period, determining that it is a host; When it is determined that it is the host, it sets its own logical address to the host logical address; Sending a broadcast data frame on the bus through the communication module, and receiving an identification number of a slave; Determining a slave logical address according to the identification number of the slave; Distributing the slave logical address through the communication module, and receiving a slave status data frame, wherein the slave status data frame includes the slave logical address; Acquire system data of the parallel battery pack according to the status data frame of the host and the status data frames of all slaves; The system data of the parallel battery group is sent to the inverter through the communication module.
10. The battery pack according to claim 9, characterized in that: The battery management system is also used for: When the communication module receives a broadcast data frame in the first time period, determining that the communication module is a slave; When determining that it is a slave, sending its own identification number to the host through the communication module, and receiving the slave logic address from the host; Set its own logical address as the slave logical address; The communication module sends its own status data frame to the host, wherein the own status data frame includes a slave logical address.
