Dynamic active-standby node election method of wireless BMS, battery pack and storage medium

CN122952349APending Publication Date: 2026-10-20SUNGIANT AUTOMOTIVE ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611374456.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-10-20

AI Technical Summary

Benefits of technology

[0016]本申请技术方案通过无线网关在每个选举周期下发选举广播帧,根据各电芯配置的节点基于选举广播帧返回的通信评分,来确定主节点、备用节点和普通节点;在主节点采集各普通节点的电芯数据时,备用节点监听主节点是否发生通信异常;在主节点发生通信异常时,备用节点能够切换为新的主节点,不间断采集各普通节点的电芯数据,能够在主节点发生通信异常时,及时由备用节点接替主节点的工作,提高电芯监测的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application discloses a dynamic primary / backup node election method for a wireless BMS, a battery pack, and a storage medium. The method includes: at the start of the current election cycle, controlling the wireless gateway to send an election broadcast frame and receiving communication scores returned by nodes configured with each battery cell based on the election broadcast frame; sorting the communication scores in descending order, determining the node with the highest communication score as the primary node, determining the nodes with the highest scores (excluding the top-ranked nodes) as backup nodes, and determining the remaining nodes as ordinary nodes; controlling the primary node to collect battery cell data from each ordinary node, and controlling each backup node to monitor whether the primary node has experienced a communication anomaly; if the primary node experiences a communication anomaly, controlling any backup node to switch to the new primary node, switching the primary node experiencing the communication anomaly to the backup node, and re-executing the control of the primary node to collect battery cell data from each ordinary node; after the current election cycle ends, updating the current election cycle and re-executing the sending of election broadcast frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power battery management technology, and in particular to a dynamic primary / backup node election method for a wireless BMS, a battery pack, and a storage medium. Background Technology

[0002] Using battery modules as a power source has become the preferred choice for various electrical devices such as automobiles and ships. Typically, a battery module consists of multiple cells, and during operation, it relies on a distributed wireless network to collect, transmit, and monitor the status data of each cell.

[0003] Currently, wireless BMS (Battery Management System) networking solutions typically employ a fixed master node network mode, where a fixed master node and a wireless gateway form a network. However, fixed master nodes are susceptible to issues such as metal casing shielding, installation obstructions, and antenna angle offsets, which can easily lead to a degradation in communication link quality and result in blind spots in cell monitoring.

[0004] Therefore, existing wireless BMS networking solutions suffer from unstable cell monitoring. Summary of the Invention

[0005] The main objective of this application is to propose a dynamic primary / backup node election method for a wireless BMS, a battery pack, and a storage medium, aiming to improve the stability of cell monitoring.

[0006] To achieve the above objectives, this application proposes a dynamic primary / backup node election method for a wireless BMS, used in a battery pack, wherein the battery pack includes at least a wireless gateway and multiple battery cells configured with nodes, and the method includes: At the start of the current election cycle, the wireless gateway is controlled to send out election broadcast frames and receive communication scores returned by the nodes configured in each cell based on the election broadcast frames; The communication scores are sorted in descending order. The node with the highest communication score is determined as the primary node, the nodes with the highest communication scores (excluding the first one) are determined as backup nodes, and the remaining nodes are determined as ordinary nodes. The master node is controlled to collect cell data from each of the ordinary nodes, and each of the backup nodes is controlled to monitor whether the master node has experienced a communication anomaly. If the master node experiences a communication failure, then control any of the backup nodes to switch to the new master node, and switch the master node that experienced the communication failure to the backup node, and re-execute the control of the master node to collect the cell data of each of the ordinary nodes. After the current election cycle ends, the next election cycle is updated to the new current election cycle, and the control of the wireless gateway to send election broadcast frames is re-executed.

[0007] In some embodiments, prior to the start of the current election cycle, the following is included: Monitor whether the battery pack is powered on at high voltage; When the battery pack is powered on at high voltage, each node is controlled to perform a hierarchical hardware self-test in sequence. If the node passes the self-test, the node is controlled to lock the preset encrypted communication channel and continuously monitor the wireless gateway. If the node fails to perform a self-test, the node is controlled to report a fault message to the wireless gateway and withdraw from the election.

[0008] In some embodiments, controlling the wireless gateway to send an election broadcast frame and receiving the communication score returned by the node for each of the cell configurations based on the election broadcast frame includes: The wireless gateway is controlled to generate the election broadcast frame carrying a time base stamp, a score calculation command, and a health status acquisition command, and the election broadcast frame is sent to each of the nodes. Each node is controlled to obtain communication parameters and cell data according to the election broadcast frame, and to calculate the communication score according to the communication parameters; Each node is controlled to package the cell ID, the communication score, and the cell data into a score message, and upload the score message to the wireless gateway; The wireless gateway is controlled to parse each scoring message to obtain the cell ID, communication score, and cell data of each node.

[0009] In some embodiments, the communication parameters include spatial location score, antenna orientation score, real-time wireless signal score, and link reliability score; calculating the communication score based on the communication parameters includes: S_{total}=0.3S_{pos}+0.25S_{ant}+0.25S_{rssi}+0.2S_{link}; Where S_{total} represents the communication score, S_{pos} represents the spatial location score, S_{ant} represents the antenna orientation score, S_{rssi} represents the real-time wireless signal score, and S_{link} represents the link reliability score.

[0010] In some embodiments, the descending sorting of the communication scores, determining the node with the highest communication score as the primary node, determining the nodes with the highest communication scores (excluding the first-ranked nodes) as backup nodes, and determining the remaining nodes as ordinary nodes includes: The wireless gateway is controlled to sort the communication scores in descending order. The node corresponding to the communication score that ranks first is determined as the master node; The node corresponding to the second-ranked communication score is designated as a first-level backup node. The node corresponding to the third-ranked communication score is designated as a secondary backup node. The nodes corresponding to the remaining communication scores are identified as the respective ordinary nodes.

[0011] In some embodiments, an election cycle includes multiple business cycles; controlling the master node to collect cell data from each of the ordinary nodes and controlling each of the backup nodes to monitor whether the master node has experienced a communication anomaly includes: At the start of the current business cycle, the master node is controlled to generate a synchronization acquisition instruction containing a synchronization heartbeat frame, and the synchronization acquisition instruction is sent to the first-level backup node, the second-level backup node, and each of the ordinary nodes; The system controls each of the ordinary nodes to collect the cell data according to the synchronization acquisition command and upload it to the master node, and controls the master node to upload the cell data to the wireless gateway. The primary backup node and the secondary backup node are controlled to perform radio frequency received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification on the synchronous acquisition command; If the radio frequency received signal strength verification, the instantaneous packet loss rate verification, and the heartbeat frame verification all pass the verification, then it is determined that the master node has not experienced any communication abnormalities. If any of the following checks fails: the radio frequency received signal strength check, the instantaneous packet loss rate check, or the heartbeat frame check, then the master node is determined to have experienced a communication anomaly.

[0012] In some embodiments, controlling any of the standby nodes to become the new master node, and switching the master node that has experienced a communication failure to become a standby node includes: Control the primary standby node to switch to the new primary node; Control the switching of the secondary backup node to a new primary backup node; Control the primary node to switch to a new secondary standby node.

[0013] In some embodiments, after controlling any of the standby nodes to switch to a new master node and switching the master node that experienced a communication failure to a standby node, the method further includes: The new master node continuously performs the radio frequency received signal strength verification, the instantaneous packet loss rate verification, and the heartbeat frame verification. Determine whether the new master node passes the radio frequency received signal strength verification, the instantaneous packet loss rate verification, and the heartbeat frame verification within a preset number of consecutive election cycles; If so, then lock the new master node; If not, then cancel the primary / standby switchover operation and restore the original primary node, primary standby node, and secondary standby node allocation relationship before the switchover.

[0014] This application further proposes a battery pack, the battery pack including a wireless BMS and a battery module, the battery module including multiple battery cells, the wireless BMS including a main control module, a wireless gateway and multiple nodes configured on each of the battery cells, the wireless BMS being able to execute the dynamic master / standby node election method of the wireless BMS described above.

[0015] This application further proposes a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, enable the processor to execute the aforementioned dynamic primary / backup node election method for a wireless BMS.

[0016] The technical solution of this application uses a wireless gateway to send election broadcast frames in each election cycle. Based on the communication scores returned by the nodes configured for each cell according to the election broadcast frames, the main node, backup node, and ordinary nodes are determined. While the main node collects cell data from each ordinary node, the backup node listens for communication anomalies in the main node. When the main node experiences a communication anomaly, the backup node can switch to become the new main node and continuously collect cell data from each ordinary node. This allows the backup node to take over the work of the main node in a timely manner when a communication anomaly occurs, improving the stability of cell monitoring. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 2 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 3 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 4 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 5 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 6 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 7 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. Figure 8 This is a schematic diagram of the structure of a battery pack according to an embodiment of this application.

[0018] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] The solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments in this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.

[0021] It should also be noted that when a component is described as "fixed to" or "set on" another component, it can be directly on the other component or there may be an intervening component present. When a component is described as "connected to" another component, it can be directly connected to the other component or there may be an intervening component present.

[0022] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.

[0023] This application proposes a dynamic primary / backup node election method for wireless BMS, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the dynamic primary / backup node election method for a wireless BMS according to this application. In some embodiments, the dynamic primary / backup node election method for a wireless BMS is used for a battery pack, which includes at least a wireless gateway and multiple battery cells configured with nodes. The dynamic primary / backup node election method for the wireless BMS includes: Step S110: At the start of the current election cycle, control the wireless gateway to send out election broadcast frames and receive the communication scores returned by the nodes configured for each cell based on the election broadcast frames. Step S120: Sort the communication scores in descending order, determine the node with the first communication score as the master node, determine the nodes with the top few communication scores (excluding the first one) as backup nodes, and determine the remaining nodes as ordinary nodes. Step S130: Control the master node to collect the cell data of each ordinary node, and control each standby node to listen for communication abnormalities of the master node. Step S140: If the master node experiences a communication failure, control any standby node to switch to the new master node, switch the master node that experienced the communication failure to the standby node, and re-execute the control of the master node to collect cell data from each ordinary node. Step S150: After the current election cycle ends, update the next election cycle to the new current election cycle, and re-execute the control wireless gateway to send election broadcast frames.

[0024] In this embodiment, as Figure 1 As shown, the dynamic primary / backup node election method for wireless BMS proposed in this application can be configured as a running program, functional software, or encapsulated as firmware, control driver, or independent functional module; then it is deployed to the wireless BMS so that the wireless BMS can run the dynamic primary / backup node election method of the wireless BMS.

[0025] It is understood that the battery pack may include a wireless BMS and battery modules. The battery modules may include multiple battery cells, and the wireless BMS may include a main control module, a wireless gateway, and multiple nodes configured on each of the battery cells. The main control module may be the BMS main control unit. The main control module is capable of controlling the wireless gateway and the nodes on each battery cell, thereby implementing a dynamic primary / backup node election method for the wireless BMS.

[0026] When running the dynamic primary / backup node election method of the wireless BMS, at the start of the current election cycle, the main control module controls the wireless gateway to send out election broadcast frames and receive communication scores returned by the nodes configured in each battery cell based on the election broadcast frames. For example, at the start of the current election cycle, the main control module can control the wireless gateway to generate election broadcast frames carrying timestamps, score calculation commands, and health status acquisition commands, and send them across the entire network. After receiving the election broadcast frames, the nodes configured in each battery cell collect local communication parameters and battery cell operating data, calculate the communication score based on a preset scoring algorithm, and add the battery cell ID and battery cell data to the communication score to generate a score message which is then sent back to the wireless gateway. The wireless gateway can parse the score message to obtain the communication score of each node. In addition, the wireless gateway can also summarize and report the score messages of all nodes to the main control module.

[0027] The communication scores are sorted in descending order. The node with the highest communication score is designated as the primary node, and the nodes with the next highest scores (excluding the first-ranked node) are designated as backup nodes. The remaining nodes are designated as ordinary nodes. For example, the main control module controls the wireless gateway to sort all received communication scores in descending order, select the node with the highest communication score as the primary node, select several nodes with high rankings as backup nodes (e.g., the second-ranked node as a backup node, the second-ranked node and the third-ranked node as backup nodes, etc.), and classify the remaining nodes as ordinary nodes, thus completing the network role allocation.

[0028] The master node collects cell data from each ordinary node and controls each standby node to monitor the master node for communication anomalies. For example, an election cycle can contain multiple service cycles. After the network roles are assigned, a service cycle can begin. Once any service cycle begins, the master control module can control the master node to issue a synchronous acquisition command with a synchronous heartbeat frame. Each ordinary node collects cell data such as cell voltage and temperature according to the synchronous acquisition command and uploads it to the master node. At the same time, each standby node continuously performs RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification on the synchronous acquisition command issued by the master node, continuously monitoring the master node's communication link status to determine whether the master node has experienced a communication anomaly.

[0029] If the master node experiences a communication failure, the system controls any standby node to become the new master node, and the master node experiencing the communication failure is reassigned as a standby node. The system then re-executes the process of controlling the master node to collect cell data from each ordinary node. For example, when a standby node determines that the master node has experienced a communication failure, the main control module can control any standby node to become the new master node. The master node experiencing a communication failure is downgraded to a standby node; after the role switch is complete, the new master node continues to execute the ordinary node cell data collection task, i.e., step S130 is executed by the new master node.

[0030] After the current election cycle ends, the next election cycle is updated to the new current election cycle, and the control wireless gateway is re-executed to send election broadcast frames. For example, after the current election cycle ends, the main control module will update the next election cycle as the new current election cycle, jump back to step S110 to re-initiate the whole network election, periodically and dynamically update the roles of each node, and continuously adapt to wireless link fluctuations caused by internal obstruction of the battery module, antenna offset, and changes in the electromagnetic environment.

[0031] The technical solution of this application uses a wireless gateway to send election broadcast frames in each election cycle. Based on the communication scores returned by the nodes configured for each cell according to the election broadcast frames, the main node, backup node, and ordinary nodes are determined. While the main node collects cell data from each ordinary node, the backup node listens for communication anomalies in the main node. When the main node experiences a communication anomaly, the backup node can switch to become the new main node and continuously collect cell data from each ordinary node. This allows the backup node to take over the work of the main node in a timely manner when a communication anomaly occurs, improving the stability of cell monitoring.

[0032] Reference Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. In some embodiments, the process includes the following steps before the start of the current election cycle: Step S160: Monitor whether the battery pack is powered on by high voltage; Step S161: When the battery pack is powered on at high voltage, control each node to perform hierarchical hardware self-test in sequence. Step S162: If the node's self-test passes, the control node locks the preset encrypted communication channel and continuously monitors the wireless gateway. In step S163, if the node's self-test fails, the control node reports a fault message to the wireless gateway and withdraws from the election.

[0033] In this embodiment, as Figure 2 As shown, before executing step S110, it is possible to monitor whether the battery pack is powered on at high voltage. The main control module can monitor whether the battery pack is powered on at high voltage. For example, the main control module can collect the power-on signal of the high-voltage circuit of the battery pack in real time and continuously monitor the power-on status of the pack.

[0034] When the battery pack is powered on at high voltage, each node is controlled to perform a hierarchical hardware self-test in sequence. For example, when the main control module recognizes that the battery pack has completed the high voltage power-on process, it sends a global self-test command to all cell nodes in the battery module, driving each cell's node to complete a hierarchical hardware self-test in sequence. The self-test items include sampling ADC (Analog to Digital Converter) channel accuracy verification, RF antenna loop connectivity detection, equalization MOS (Metal-Oxide Semiconductor) device fault diagnosis, local protection threshold verification, and storage cell read / write integrity test.

[0035] If the node passes its self-test, the control module locks the preset encrypted communication channel and continuously monitors the wireless gateway. For example, if all self-test items of the node pass, the main control module can control the wireless gateway to issue an encrypted channel configuration command, controlling the node to lock the preset 2.4GHz dedicated encrypted communication channel. The node's radio frequency module continuously keeps its receiving window open, listening in real time for various broadcast commands subsequently issued by the wireless gateway.

[0036] If a node fails its self-test, the control node reports a fault message to the wireless gateway and withdraws from the election. For example, if a node detects hardware faults such as sampling failure, RF open circuit, or equalization circuit damage during the hierarchical self-test, the main control module can control the node to write a permanent fault identifier to its local storage unit and generate a fault message carrying its own cell ID and fault type, which is then actively uploaded to the wireless gateway. At the same time, the node blocks the election-related calculations and reporting logic and no longer participates in the subsequent network-wide communication scoring election, thus completing the isolation of the faulty node.

[0037] For example, when the battery pack is powered on by high voltage, the main control module and wireless gateway are powered on synchronously to complete the initialization configuration. All cells inside the battery pack are synchronously woken up and started by relying on the cell self-powered circuit. Each cell node executes a layered hardware self-test process in sequence. The self-test items cover sampling ADC channel accuracy verification, RF antenna circuit connectivity detection, equalization MOS switching device fault diagnosis, local hardware protection threshold verification, and storage unit read / write integrity test. The nodes of qualified cells with no abnormal self-test results automatically lock the preset 2.4GHz dedicated encrypted communication channel and continuously open the RF receiving window to listen for various broadcast commands issued by the RF gateway in real time. If the cell node detects hardware faults such as sampling failure, RF open circuit, or equalization device damage during the self-test process, a permanent fault identification code is written to the local storage unit. The faulty cell only reports its own fault message intermittently at a very low frequency and does not participate in the subsequent primary and backup node election competition, so as to avoid the faulty node interfering with the overall network communication election process.

[0038] Reference Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. In some embodiments, the aforementioned control wireless gateway sends out election broadcast frames and receives communication scores returned by the nodes configured for each battery cell based on the election broadcast frames, including: Step S170: Control the wireless gateway to generate an election broadcast frame carrying a time base stamp, a score calculation command, and a health status acquisition command, and send the election broadcast frame to each node; Step S171: Control each node to obtain communication parameters and cell data according to the election broadcast frame, and calculate the communication score according to the communication parameters; Step S172: Control each node to package the cell ID, communication score and cell data to generate a score message, and upload the score message to the wireless gateway; Step S173: Control the wireless gateway to parse each scoring message to obtain the cell ID, communication score and cell data of each node.

[0039] In this embodiment, as Figure 3 As shown, during step S110, the wireless gateway can first be controlled to generate an election broadcast frame carrying a time base stamp, a score calculation command, and a health status acquisition command. The wireless gateway then sends this election broadcast frame to each node. For example, the main control module controls the wireless gateway to generate the election broadcast frame carrying the time base stamp, score calculation command, and health status acquisition command, and then sends the election broadcast frame to each node.

[0040] The control module controls each node to obtain communication parameters and cell data based on the election broadcast frame, and then calculates a communication score based on the communication parameters. For example, the main control module controls each node to obtain communication parameters and cell data based on the election broadcast frame; then it calls a preset scoring algorithm to calculate a communication score based on the communication parameters.

[0041] The main control module controls each node to package the cell ID, communication score, and cell data into a scoring message, and then uploads the scoring message to the wireless gateway. For example, the main control module controls each node to integrate its unique cell hardware ID, calculated communication score, and real-time cell health data into a package, and adds a CRC check field to generate a complete scoring message. The main control module can also control each node to use a time-sharing avoidance mechanism to unicast the scoring message to the wireless gateway in sequence, avoiding channel collisions caused by multiple concurrent nodes.

[0042] The control wireless gateway parses each scoring message to obtain the cell ID, communication score, and cell data for each node. For example, the main control module controls the wireless gateway to perform CRC checks frame by frame to eliminate transmission error messages, parses valid messages, extracts the cell ID, communication score value, and complete cell status data corresponding to each node, caches all parsed node information, and reports it to the main control module.

[0043] In some embodiments, the aforementioned communication parameters include spatial location score, antenna orientation score, real-time wireless signal score, and link reliability score; calculating the communication score based on the communication parameters includes: S_{total}=0.3S_{pos}+0.25S_{ant}+0.25S_{rssi}+0.2S_{link}; Where S_{total} represents the communication score, S_{pos} represents the spatial location score, S_{ant} represents the antenna orientation score, S_{rssi} represents the real-time wireless signal score, and S_{link} represents the link reliability score.

[0044] In this embodiment, calculating the communication score based on communication parameters in step S171 includes: S_{total}=0.3S_{pos}+0.25S_{ant}+0.25S_{rssi}+0.2S_{link}; Where S_{total} represents the communication score, S_{pos} represents the spatial location score, S_{ant} represents the antenna orientation score, S_{rssi} represents the real-time wireless signal score, and S_{link} represents the link reliability score.

[0045] For example, the main control module can configure a timed scheduling program for the wireless gateway, setting a fixed 10-second interval as a complete election cycle. At the start of the current election cycle, it can control the wireless gateway to send election broadcast frames carrying network keys, timestamps, and parameter acquisition instructions to each node in the battery module. After the election broadcast frames are delivered to all online qualified battery cell nodes, each battery cell node synchronously starts parallel acquisition of four types of core evaluation parameters. The acquisition logic and conversion rules for each parameter have clear quantitative standards. The first category is spatial position parameters: Each cell node reads its pre-programmed three-dimensional coordinate information inside the battery module and linearly calculates its spatial position score S_{pos} based on the straight-line distance between the cell and the geometric center of the module. Among them, the cell located in the geometric center region of the battery module has the shortest distance and the highest position score, while the score of cells arranged towards the perimeter of the battery module decreases linearly with increasing distance.

[0046] The second category is antenna orientation parameters: The node of the battery cell obtains the spatial angle θ between its own RF antenna and the antenna of the wireless gateway through an antenna angle detection circuit, and uses the trigonometric function cosθ directly as the antenna orientation score S_{ant}. Among them, when the antenna of the node and the antenna of the wireless gateway are parallel and aligned, the angle approaches 0, the cosθ value approaches 1, the antenna transmit and receive gain is optimal, and the corresponding score is the highest; the larger the angle, the more severe the signal blockage and reflection loss, and the score decreases accordingly.

[0047] The third category is real-time wireless signal parameters: The nodes of the battery cell continuously capture the received signal strength RSSI of the wireless gateway broadcast frames, perform linear mapping processing on the RSSI value within the preset signal range, normalize and convert it to the 0 to 1 range to obtain the real-time wireless signal score S_{rssi}. The higher the RSSI value, the better the basic quality of the wireless channel.

[0048] The fourth category is link reliability parameters: the total number of all transmitted and received data frames and the number of packet loss failures within the past 5-second window are statistically analyzed for the battery cell nodes, and the average packet loss rate (PLR) is calculated. S_{link}=1-PLR is used as the link reliability score. The lower the packet loss rate, the stronger the link transmission stability, and the higher the corresponding link reliability score.

[0049] Among them, the four types of original physical parameters have significantly different dimensions and numerical ranges. To eliminate the interference and bias of different dimensional parameters on the comprehensive score, the nodes of each cell uniformly perform linear normalization processing on the four basic scores of S_{pos}, S_{ant}, S_{rssi}, and S_{link} within the range of 0 to 1. After normalization, the nodes of the cell calculate the communication score according to the preset scoring algorithm. The preset scoring algorithm is as follows: S_{total}=0.3S_{pos}+0.25S_{ant}+0.25S_{rssi}+0.2S_{link}; The weight allocation is based on extensive testing and calibration of the actual metal shielding of the battery module, antenna loss, and cell arrangement conditions, taking into account four core communication influencing factors: cell spatial topology, antenna transmission and reception capabilities, real-time signal strength, and long-term link stability.

[0050] After each cell node completes the communication score calculation, it packages the cell ID, communication score, and cell data into a score message, and uploads it to the wireless gateway using a time-sharing avoidance mechanism to avoid channel data collisions caused by multiple nodes uploading at the same time.

[0051] Reference Figure 4 , Figure 4 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. In some embodiments, the aforementioned descending order of communication scores, determining the node with the highest communication score as the primary node, determining the nodes with the highest communication scores (excluding the first-ranked nodes) as backup nodes, and determining the remaining nodes as ordinary nodes includes: Step S180: Control the wireless gateway to sort the communication scores in descending order; Step S181: Determine the node corresponding to the communication score ranked first as the master node; Step S182: The node corresponding to the second-ranked communication score is determined as a first-level backup node; Step S183: The node corresponding to the third-ranked communication score is determined as the secondary backup node; Step S184: Determine the nodes corresponding to the remaining communication scores as ordinary nodes.

[0052] In this embodiment, as Figure 4As shown, during step S120, the wireless gateway can be controlled to sort the communication scores in descending order. For example, the main control module can send a sorting command to the wireless gateway to control it to sort the communication scores in descending order.

[0053] The node with the highest communication score is designated as the master node. For example, the main control module controls the wireless gateway to designate the node with the highest communication score as the master node. The master node has the highest management authority for network-wide data aggregation, command forwarding, heartbeat frame broadcasting, and channel timing arbitration. The master node collects raw monitoring data of voltage, temperature, deformation, and air pressure uploaded by all ordinary nodes in the battery module at a fixed service cycle of 100 milliseconds. After completing data packaging, encryption, and CRC verification, the master node uploads the data to the RF gateway. At the same time, it broadcasts a synchronization heartbeat frame to the entire network every 100 milliseconds to provide a link status judgment benchmark for backup nodes.

[0054] The node corresponding to the second-ranked communication score is designated as the primary backup node; the node corresponding to the third-ranked communication score is designated as the secondary backup node. For example, the main control module controls the wireless gateway to designate the node corresponding to the second-ranked communication score as the primary backup node and the node corresponding to the third-ranked communication score as the secondary backup node. The primary and secondary backup nodes do not actively occupy the channel to transmit service data. Under normal circumstances, they maintain a low-power radio frequency monitoring mode, continuously capturing the synchronization heartbeat frames and service data frames sent by the master node within the channel, performing CRC integrity checks frame by frame, and updating their received RSSI value and instantaneous packet loss rate in real time at millisecond levels, always ready to take over the communication management authority of the master node.

[0055] The nodes corresponding to the remaining communication scores are designated as ordinary nodes. For example, the main control module controls the wireless gateway to designate all nodes corresponding to the fourth and subsequent communication scores as ordinary nodes. These ordinary nodes only possess basic functions such as local cell status acquisition, timed single-node data reporting, and receiving control and balancing commands from the main node. They lack cross-node data forwarding and network management permissions, and only report their own cell monitoring data after the main node issues a time-division uploading time slot command, significantly reducing the probability of concurrent congestion on the wireless channel.

[0056] Reference Figure 5 , Figure 5 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. In some embodiments, one election cycle includes multiple service cycles; the aforementioned control of the primary node to collect cell data from each ordinary node and control of each backup node to monitor whether the primary node has experienced a communication anomaly includes: Step S190: At the start of the current business cycle, control the master node to generate a synchronization acquisition instruction containing a synchronization heartbeat frame, and send the synchronization acquisition instruction to the first-level backup node, the second-level backup node and each ordinary node. Step S191: Control each ordinary node to collect cell data according to the synchronization acquisition command and upload it to the master node, and control the master node to upload the cell data to the wireless gateway. Step S192: Control the primary backup node and the secondary backup node to perform radio frequency received signal strength verification, instantaneous packet loss rate verification and heartbeat frame verification on the synchronous acquisition command; Step S193: If the RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification all pass the verification, then it is determined that the master node has not experienced any communication abnormalities. Step S194: If any of the following checks fails: radio frequency received signal strength check, instantaneous packet loss rate check, and heartbeat frame check, then the master node is determined to have a communication abnormality.

[0057] In this embodiment, as Figure 5 As shown, during step S130, the master node can be controlled to generate a synchronization acquisition command containing a synchronization heartbeat frame. An election cycle contains multiple service cycles. For example, an election cycle is 10 seconds, and a service cycle is 100 milliseconds. At the start of the current service cycle, the master node is controlled to generate a synchronization acquisition command containing a synchronization heartbeat frame, and this command is sent to the primary backup node, secondary backup node, and all ordinary nodes. For example, at the start of the current service cycle, the main control module can control the current master node to generate a synchronization acquisition command carrying the network-wide time base, synchronization heartbeat frame, and acquisition task, and broadcast it wirelessly to the primary backup node, secondary backup node, and all ordinary nodes within the battery module.

[0058] The main control module controls each ordinary node to collect cell data according to synchronous acquisition commands and upload it to the main node. The main node then uploads the cell data to the wireless gateway. For example, the main control module can control each ordinary node to collect cell data such as voltage, temperature, and status according to synchronous acquisition commands, and upload the collected cell data to the main node in an orderly manner according to the time-sharing upload slots allocated by the main node. After the main node completes the data aggregation, verification, and integration of all ordinary nodes, the main control module can also control the main node to upload the complete cell dataset of the entire battery module to the wireless gateway, achieving stable collection and reporting of cell data across the entire network.

[0059] The main control module controls the primary and secondary backup nodes to perform RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification on the synchronization acquisition commands. For example, while controlling each ordinary node to collect cell data according to the synchronization acquisition command and upload it to the main node, the primary and secondary backup nodes can also continuously listen for the synchronization acquisition command issued by the main node in each service cycle and simultaneously perform triple link status verification. This involves real-time detection of the RF received signal strength, instantaneous data packet loss rate, and heartbeat frame synchronization status of the synchronization command, continuously monitoring the communication link quality of the main node. For instance, it checks whether the RF received signal strength is less than or equal to -85dBm, whether the instantaneous packet loss rate is greater than or equal to 5%, and whether the heartbeat frame has been continuously received for 200 milliseconds. If all are true, the verification passes; if any one is false, the verification fails.

[0060] If the RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification all pass, it is determined that the master node has not experienced any communication anomalies. For example, if all three verification indicators—RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification—meet the normal standards within the current service cycle, the standby node determines that the master node's communication link is stable and its working status is normal, confirming that the master node has not experienced any communication anomalies, and continues to maintain the current master-standby network structure and continuously execute periodic data collection tasks.

[0061] If any of the three checks—RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification—fail, the master node is determined to have experienced a communication anomaly. For example, if any one of the three checks fails, such as low signal strength, excessive instantaneous packet loss, or heartbeat frame timeout, the backup node immediately determines that the current master node's communication link is degraded and a communication anomaly exists. This triggers the subsequent master-backup switchover mechanism, thereby promptly avoiding data acquisition blind spots and monitoring interruptions caused by single-point communication failures.

[0062] Reference Figure 6 , Figure 6 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. In some embodiments, the aforementioned control of any backup node to switch to the new primary node, and the switching of the primary node experiencing a communication failure to the backup node, includes: Step S200: Control the primary standby node to switch to the new primary node; Step S201: Control the secondary backup node to switch to a new primary backup node; Step S202: Control the primary node to switch to a new secondary standby node.

[0063] In this embodiment, as Figure 6As shown, during step S140, the primary standby node can be switched to the new primary node. For example, the main control module can control the current primary standby node to upgrade and assume the management functions of the original primary node, taking over tasks such as issuing synchronous data collection commands across the entire network and summarizing data from ordinary nodes, thus switching to the new primary node.

[0064] Control the switching of secondary backup nodes to new primary backup nodes. For example, the main control module can synchronously issue hierarchical adjustment instructions to upgrade the current secondary backup node, enabling it to assume the first-priority redundant monitoring and fault takeover tasks, and switch to the new primary backup node.

[0065] The control module can switch the primary node to a new secondary backup node. For example, the primary control module can remove the network-wide control authority of the original primary node that has experienced a communication failure, degrade it to a secondary redundant resource, and switch it to a new secondary backup node.

[0066] For example, after detecting a communication anomaly in the primary node, the main control module can control the primary backup node to complete a full set of operations within 10 milliseconds, including communication time slot matching, channel encryption synchronization, data forwarding protocol adaptation, and heartbeat broadcast permission takeover, achieving seamless switching of network communication services without interruption. After the original primary node that experienced the communication anomaly completes the permission transfer, it is automatically downgraded and replaced as a secondary backup node, continuing to remain in the network system to participate in monitoring and the next round of election. It will not directly go offline and leave the network, maximizing the redundancy of network nodes and completely eliminating the blind spots in cell monitoring caused by the failure of a single primary node.

[0067] Reference Figure 7 , Figure 7 This is a flowchart illustrating another embodiment of the dynamic primary / backup node election method for the wireless BMS of this application. In some embodiments, after controlling any backup node to switch to the new primary node and switching the primary node experiencing a communication failure to the backup node, the method further includes: Step S210: Continuously perform radio frequency received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification on the new master node; Step S211: Determine whether the new master node has passed the RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification within a preset number of consecutive election cycles. Step S212: If yes, then lock the new master node; Step S213: If not, cancel the primary / standby switchover operation and restore the original primary node, primary standby node, and secondary standby node allocation relationship before the switchover.

[0068] In this embodiment, as Figure 7As shown, after executing step S140, the new master node can also continuously undergo RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification. For example, after completing the master / standby succession switch, the master control module activates a hysteresis check monitoring mechanism to continuously perform periodic link quality checks on the upgraded new master node. In each election cycle, RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame synchronization verification are performed synchronously, recording the network communication stability of the new master node in real time.

[0069] The system determines whether the new master node passes the RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification within a preset number of consecutive election cycles. For example, the preset number of election cycles can be determined at the factory, such as 10 election cycles. The main control module continuously counts the number of consecutive stable cycles of the new master node to determine whether the new master node consistently passes the RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification within 10 consecutive complete election cycles.

[0070] If so, the new master node is locked. For example, if the new master node consistently passes the RF received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification within 10 consecutive election cycles, the master control module can determine that the master-slave switch is valid and that the new master node is compatible with the current battery module's wireless environment. The master control module can then permanently lock the new master node's network role and fix the current master-slave architecture.

[0071] If not, the master / slave handover operation is cancelled, and the original master node, primary backup node, and secondary backup node allocation relationship before the handover is restored. For example, if any of the RF received signal strength verification, instantaneous packet loss rate verification, or heartbeat frame verification fails in any election cycle, the master control module can determine that the handover is an invalid handover triggered by short-term interference. The master control module immediately cancels the master / slave handover result, rolls back the node hierarchy configuration before the handover, and restores the original master node, primary backup node, and secondary backup node allocation relationship, avoiding frequent network oscillations and repeated reconstructions caused by instantaneous environmental disturbances. Through the multi-cycle hysteresis verification mechanism, the handover erroneous problems caused by instantaneous electromagnetic interference, mechanical vibration, and short-term obstruction are effectively filtered, significantly improving the overall stability of the wireless BMS network.

[0072] The technical solution of this application uses a wireless gateway to send election broadcast frames in each election cycle. Based on the communication scores returned by the nodes configured for each cell according to the election broadcast frames, the main node, backup node, and ordinary nodes are determined. While the main node collects cell data from each ordinary node, the backup node listens for communication anomalies in the main node. When the main node experiences a communication anomaly, the backup node can switch to become the new main node and continuously collect cell data from each ordinary node. This allows the backup node to take over the work of the main node in a timely manner when a communication anomaly occurs, improving the stability of cell monitoring.

[0073] This application further proposes a battery pack, referring to... Figure 8 , Figure 8 This is a schematic diagram of the structure of a battery pack according to an embodiment of the present application. In some embodiments, the battery pack includes a wireless BMS and a battery module. The battery module includes multiple battery cells. The wireless BMS includes a main control module, a wireless gateway, and multiple nodes configured on each of the battery cells. The wireless BMS is capable of executing the dynamic master / standby node election method of the wireless BMS described above.

[0074] In this embodiment, as Figure 8 As shown, the battery pack may include a wireless BMS and battery modules. The battery modules may include multiple battery cells. The wireless BMS may include a main control module, a wireless gateway, and multiple nodes configured on each of the battery cells. The main control module may be a BMS main control unit. The main control module can control the wireless gateway and the nodes on each battery cell, thereby running a dynamic master / slave node election method for the wireless BMS. The wireless gateway may integrate a high-power 2.4GHz RF transceiver chip, an RF signal matching antenna, a local storage unit, a clock synchronization module, and a broadcast frame scheduling unit.

[0075] This application further proposes a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, enable the processor to execute the aforementioned dynamic primary / backup node election method for a wireless BMS.

[0076] The above description is only a part or preferred embodiment of this application. Neither the text nor the drawings should limit the scope of protection of this application. All equivalent structural transformations made using the content of this application's specification and drawings under the overall concept of this application, or direct / indirect applications in other related technical fields, are included within the scope of protection of this application.

Claims

1. A dynamic primary / backup node election method for a wireless BMS, used in a battery pack, the battery pack comprising at least a wireless gateway and multiple battery cells configured with nodes, characterized in that, The methods include: At the start of the current election cycle, the wireless gateway is controlled to send out election broadcast frames and receive communication scores returned by the nodes configured in each cell based on the election broadcast frames; The communication scores are sorted in descending order. The node with the highest communication score is determined as the primary node, the nodes with the highest communication scores (excluding the first one) are determined as backup nodes, and the remaining nodes are determined as ordinary nodes. The master node is controlled to collect cell data from each of the ordinary nodes, and each of the backup nodes is controlled to monitor whether the master node has experienced a communication anomaly. If the master node experiences a communication failure, then control any of the backup nodes to switch to the new master node, and switch the master node that experienced the communication failure to the backup node, and re-execute the control of the master node to collect the cell data of each of the ordinary nodes. After the current election cycle ends, the next election cycle is updated to the new current election cycle, and the control of the wireless gateway to send election broadcast frames is re-executed.

2. The dynamic primary / backup node election method for wireless BMS according to claim 1, characterized in that, Prior to the start of the current election cycle, including: Monitor whether the battery pack is powered on at high voltage; When the battery pack is powered on at high voltage, each node is controlled to perform a hierarchical hardware self-test in sequence. If the node passes the self-test, the node is controlled to lock the preset encrypted communication channel and continuously monitor the wireless gateway. If the node fails to perform a self-test, the node is controlled to report a fault message to the wireless gateway and withdraw from the election.

3. The dynamic primary / backup node election method for wireless BMS according to claim 1, characterized in that, The process of controlling the wireless gateway to send out election broadcast frames and receiving communication scores returned by the nodes configured for each battery cell based on the election broadcast frames includes: The wireless gateway is controlled to generate the election broadcast frame carrying a time base stamp, a score calculation command, and a health status acquisition command, and the election broadcast frame is sent to each of the nodes. Each node is controlled to obtain communication parameters and cell data according to the election broadcast frame, and to calculate the communication score according to the communication parameters; Each node is controlled to package the cell ID, the communication score, and the cell data into a score message, and upload the score message to the wireless gateway; The wireless gateway is controlled to parse each scoring message to obtain the cell ID, communication score, and cell data of each node.

4. The dynamic primary / backup node election method for wireless BMS according to claim 3, characterized in that, The communication parameters include spatial location score, antenna orientation score, real-time wireless signal score, and link reliability score. The calculation of the communication score based on the communication parameters includes: S_{total}=0.3S_{pos}+0.25S_{ant}+0.25S_{rssi}+0.2S_{link}; Where S_{total} represents the communication score, S_{pos} represents the spatial location score, S_{ant} represents the antenna orientation score, S_{rssi} represents the real-time wireless signal score, and S_{link} represents the link reliability score.

5. The dynamic primary / backup node election method for a wireless BMS according to claim 1, characterized in that, The process of sorting the communication scores in descending order, determining the node with the highest communication score as the primary node, and determining the nodes with the highest communication scores (excluding the first-ranked node) as backup nodes, with the remaining nodes being designated as ordinary nodes, includes: The wireless gateway is controlled to sort the communication scores in descending order. The node corresponding to the communication score that ranks first is determined as the master node; The node corresponding to the second-ranked communication score is designated as a first-level backup node. The node corresponding to the third-ranked communication score is designated as a secondary backup node. The nodes corresponding to the remaining communication scores are identified as the respective ordinary nodes.

6. The dynamic primary / backup node election method for a wireless BMS according to claim 5, characterized in that, An election cycle contains multiple business cycles; controlling the master node to collect cell data from each of the ordinary nodes and controlling each of the backup nodes to monitor whether the master node has experienced a communication anomaly includes: At the start of the current business cycle, the master node is controlled to generate a synchronization acquisition instruction containing a synchronization heartbeat frame, and the synchronization acquisition instruction is sent to the first-level backup node, the second-level backup node, and each of the ordinary nodes; The system controls each of the ordinary nodes to collect the cell data according to the synchronization acquisition command and upload it to the master node, and controls the master node to upload the cell data to the wireless gateway. The primary backup node and the secondary backup node are controlled to perform radio frequency received signal strength verification, instantaneous packet loss rate verification, and heartbeat frame verification on the synchronous acquisition command; If the radio frequency received signal strength verification, the instantaneous packet loss rate verification, and the heartbeat frame verification all pass the verification, then it is determined that the master node has not experienced any communication abnormalities. If any of the following checks fails: the radio frequency received signal strength check, the instantaneous packet loss rate check, or the heartbeat frame check, then the master node is determined to have experienced a communication anomaly.

7. The dynamic primary / backup node election method for a wireless BMS according to claim 6, characterized in that, The control of switching any of the standby nodes to become the new master node, and the switching of the master node experiencing a communication failure to a standby node, includes: Control the primary standby node to switch to the new primary node; Control the switching of the secondary backup node to a new primary backup node; Control the primary node to switch to a new secondary standby node.

8. The dynamic primary / backup node election method for a wireless BMS according to claim 7, characterized in that, After controlling any of the backup nodes to switch to the new master node, and switching the master node that experienced a communication failure to the backup node, the method further includes: The new master node continuously performs the radio frequency received signal strength verification, the instantaneous packet loss rate verification, and the heartbeat frame verification. Determine whether the new master node passes the radio frequency received signal strength verification, the instantaneous packet loss rate verification, and the heartbeat frame verification within a preset number of consecutive election cycles; If so, then lock the new master node; If not, then cancel the primary / standby switchover operation and restore the original primary node, primary standby node, and secondary standby node allocation relationship before the switchover.

9. A battery pack, characterized in that, The battery pack includes a wireless BMS and a battery module. The battery module includes multiple battery cells. The wireless BMS includes a main control module, a wireless gateway, and multiple nodes configured on each of the battery cells. The wireless BMS is capable of executing the dynamic primary / backup node election method of the wireless BMS according to any one of claims 1 to 8.

10. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, enable the processor to perform the dynamic primary / backup node election method for the wireless BMS as described in any one of claims 1 to 8.