Reconfigurable battery topology and its battery energy storage system equalization control method
The battery energy storage system equalization control method, which combines graph structured modeling and graph neural networks with multi-agent reinforcement learning, solves the flexibility and safety problems of existing battery energy storage systems, achieves efficient and safe battery equalization management, and improves the system's available capacity and lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-05
Smart Images

Figure CN121618665B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery energy storage, and more specifically, to a reconfigurable battery topology and a method for equalization control of the battery energy storage system thereon. Background Technology
[0002] Lithium-ion batteries, with their high energy density and long cycle life, have been widely used in renewable energy storage and electric vehicles. However, in large-scale battery energy storage systems, inconsistencies in capacity and internal resistance between individual battery cells are inevitable due to differences in manufacturing tolerances and operating environments. These inconsistencies limit the overall usable capacity, reliability, and service life of the battery pack. Traditional passive balancing suffers from energy waste and thermal management issues, while active balancing based on DC / DC converters is more efficient, but the additional balancing circuitry leads to complex system structures and high costs. Therefore, dynamic battery reconfiguration technology, which controls a switch array to change the battery connection state in real time, has attracted attention because it can achieve balancing without complex additional circuitry.
[0003] However, existing reconfigurable battery topologies and their control schemes still have significant shortcomings in practical applications. At the topology level, current research faces a trade-off between system flexibility and the number of switches. While increasing the number of switches improves management freedom, it also leads to a surge in system cost, control difficulty, and potential failure points. Simultaneously, existing schemes do not adequately consider the safety of parallel reconfiguration. Due to the extremely low internal resistance of batteries, even a small voltage difference in direct parallel connection can generate a huge instantaneous surge current, seriously threatening system safety and affecting battery life. At the control strategy level, as the number of batteries increases, the system state space grows exponentially, making conventional optimization methods ineffective. Although deep reinforcement learning is gradually being applied due to its model-free optimization capabilities, existing models mostly rely on neural networks with fixed input-output dimensions. This hard-coded structure results in extremely poor policy transferability. When the number of batteries in the system changes due to fault isolation, or when it is necessary to transfer the policy to battery systems of different sizes, the original model will fail due to input dimension mismatch, requiring time-consuming retraining for the new system. This cannot meet the requirements of battery energy storage systems for efficient, flexible, and safe balanced control.
[0004] Therefore, it is desirable to provide a reconfigurable battery topology and its equalization control scheme that can reduce system cost and control difficulty by optimizing the topology, effectively solve the safety hazards of surge current in the parallel process, and achieve efficient, safe and balanced management of battery systems of different sizes by using a control algorithm with strong generalization ability. Summary of the Invention
[0005] To address the aforementioned problems in the prior art, this application provides a battery energy storage system equalization control method with a reconfigurable battery topology, comprising:
[0006] Acquire raw sampling data and state estimation data. The raw sampling data includes the voltage and current of each battery cell, and the state estimation data includes the state of charge, battery capacity and current switching state of each battery cell.
[0007] Graph structured data is obtained by performing graph structured modeling on the original sampled data and state estimation data;
[0008] Topological feature extraction and global information fusion are performed on graph-structured data to obtain a fused state vector;
[0009] The fused state vector is input into the trained action network to obtain the action probability distribution of all nodes;
[0010] The probability distribution of actions of all nodes is checked for safety constraints and the switching signal is executed to obtain the final switching control signal, which is then sent to the hardware driver circuit.
[0011] This application also provides a reconfigurable battery topology, comprising: a plurality of battery cells and a switch array, wherein each battery cell is associated with a first switch and a second switch; the first switch is a single-pole double-throw switch, the common terminal of which is connected to the positive terminal of the next battery cell, the first throw point of which is connected to the positive terminal of the battery cell, and the second throw point of which is connected to the negative terminal of the battery cell; the second switch is a single-pole single-throw switch, one end of which is connected to the negative terminal of the battery cell, and the other end of which is connected to a parallel bus via a current-limiting resistor.
[0012] Compared with existing technologies, this application provides a reconfigurable battery topology and its battery energy storage system equalization control method, which solves the equalization challenge of battery energy storage systems through hardware and software co-optimization. At the hardware level, by configuring a single-pole double-throw switch and a single-pole single-throw switch connected to the parallel bus via a current-limiting resistor for each battery cell, the topology is significantly simplified. This reduces system cost and control complexity, while the current-limiting resistor effectively suppresses instantaneous surge current during parallel reconfiguration, solving the safety hazards present in traditional solutions. At the software level, the battery system is abstracted as a graph structure, and a graph neural network (GNN) is used to extract local topological features and fuse global information. The message passing mechanism of GNN breaks through the limitation of traditional deep learning models on fixed input dimensions, enabling the control strategy to naturally adapt to changes in the number of batteries (such as fault isolation or system scale migration), achieving strong generalization and transferability of the equalization strategy without the need for retraining for new systems. Furthermore, by combining multi-agent reinforcement learning to model the action probability distribution and introducing a safety constraint verification and instruction correction mechanism, the final generated switch control signal can achieve near-optimal equilibrium in the vast state space while strictly complying with hardware safety guidelines, thereby comprehensively improving the available capacity, reliability and service life of the energy storage system. Attached Figure Description
[0013] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings.
[0014] Figure 1 This is a flowchart of a battery energy storage system equalization control method with a reconfigurable battery topology according to an embodiment of this application.
[0015] Figure 2 This is a schematic diagram of the data flow in step 2 of the battery energy storage system equalization control method with reconfigurable battery topology according to an embodiment of this application.
[0016] Figure 3 This is a schematic diagram of the trained action network in the battery energy storage system equalization control method with reconfigurable battery topology according to an embodiment of this application.
[0017] Figure 4 This is a flowchart of step 3 in the battery energy storage system equalization control method with reconfigurable battery topology according to an embodiment of this application.
[0018] Figure 5 This is a schematic diagram of a reconfigurable battery topology according to an embodiment of this application. Detailed Implementation
[0019] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0020] Based on the shortcomings in the aforementioned technical fields, this application proposes a reconfigurable battery topology and a battery energy storage system equalization control method thereof. Figure 1 This is a flowchart of a battery energy storage system equalization control method with a reconfigurable battery topology according to an embodiment of this application. Figure 1 As shown, the battery energy storage system equalization control method with reconfigurable battery topology according to an embodiment of this application includes: Step 1, acquiring original sampling data and state estimation data, wherein the original sampling data includes the voltage and current of each battery cell, and the state estimation data includes the state of charge, battery capacity, and current switching state of each battery cell; Step 2, performing graph structure modeling on the original sampling data and state estimation data to obtain graph structure data; Step 3, performing topological feature extraction and global information fusion on the graph structure data to obtain a fused state vector; Step 4, inputting the fused state vector into the trained action network to obtain the action probability distribution of all nodes; Step 5, performing safety constraint verification and switching signal execution on the action probability distribution of all nodes to obtain a final switching control signal, wherein the final switching control signal is sent to the hardware drive circuit.
[0021] In step 1, raw sampling data and state estimation data are acquired. The raw sampling data includes the voltage and current of each battery cell, while the state estimation data includes the state of charge, battery capacity, and current switching state of each battery cell. It should be understood that in large-scale lithium-ion battery energy storage applications, the overall efficiency of the battery pack is severely limited by the inconsistencies between individual cells. Due to manufacturing process deviations and uneven environmental temperature distribution during service, the voltage, internal resistance, and capacity of battery cells will vary over time, leading to power dissipation and reducing the usable capacity of the device. Dynamic topology reconfiguration, by controlling the switch array to adjust the circuit connection relationships in real time, can actively intervene in the current distribution of each cell, and is an effective means to solve the inconsistency problem. To achieve efficient and accurate equalization control, the decision architecture needs to be based on a comprehensive understanding of the current physical and electrochemical states of the battery pack. Therefore, this application constructs a multi-dimensional feature space reflecting the real-time attributes of battery cells by acquiring raw sampling data and state estimation data. This allows subsequent graph-structured modeling to accurately characterize the attributes of each node in terms of electrical performance and topological position, thereby providing a complete decision input basis for realizing a cross-scale transferable equalization control strategy.
[0022] In one embodiment of step 1, the specific processing is as follows: The process involves deep collaboration between the hardware sensing layer and the software algorithm layer. First, physical quantities are collected using sensor arrays deployed at both ends of each battery cell. The raw sampled data is obtained from the terminal voltage. and current Composition. At the hardware execution level, voltage sampling employs a high-precision analog-to-digital converter (ADC) and differential sampling circuitry to achieve millivolt-level monitoring of the terminal voltage of each battery cell; current sampling is accomplished through a Hall sensor or shunt connected in series in the main circuit, acquiring the real-time current value flowing through the battery cell through high-frequency sampling. The sampling frequency is preset to 10 Hz, meaning a full data update is completed every 100 milliseconds. This data is aggregated to the core processor via the Controller Area Network (CAN) bus or daisy-chain communication protocol.
[0023] State estimation data, based on the original physical quantities, utilizes the extended Kalman filter algorithm to perform deep reasoning on the internal states of the battery that cannot be directly measured, specifically including the state of charge. and current battery capacity This process is based on an equivalent circuit model, and the state transition equation is described as follows: ,in The current state of charge. This refers to the state at the previous moment. The charge / discharge efficiency coefficient. The sampling time interval, This is the rated capacity. The observation equation utilizes the mapping relationship between voltage and state of charge: ,in It is an open-circuit voltage function. This represents the battery's internal resistance. In the filtering process, it is necessary to determine the process noise covariance matrix. and measurement noise covariance matrix . The matrix reflects the uncertainty of the model, and is preset to a small value based on the battery self-discharge rate and current integration error, for example. ; The matrix is determined by the sampling noise of the sensor itself, and is determined through experimental calibration, for example, by setting it to a preset value. Through two stages—prediction and correction—the algorithm can determine the residual value. ,in, It is a nonlinear function that maps the system's internal state variables, such as the state of charge, to measurable output quantities, such as terminal voltage, continuously optimizing the estimated values of the state variables to obtain high-precision values. Battery capacity Then, through multi-scale filtering or least squares methods, online updates are performed over a longer time scale based on the ratio of the integral of charge to the change in state of charge, to reflect the degree of battery aging. In addition, the current switching state... As part of the state estimation data, it is read directly from the register feedback of the hardware driver circuit. The combination of actions of the first and second switches associated with each battery cell determines its logic state. The first switch is a single-pole double-throw switch, and the second switch is a single-pole single-throw switch. The state encoding rules are as follows: if the battery cell is in the connected state, its corresponding state encoding record is 1; if it is in the bypass state, the encoding record is 0; if it is in the parallel state, the encoding record is 2.
[0024] Taking an energy storage module containing 6 battery cells as an example, at a certain sampling time, the terminal voltage of the first battery cell is... The voltage is 3.65 volts, and the main circuit current is... The value is 10.0 amperes. After extended Kalman filtering, the value of this unit is calculated. The actual available capacity is 0.85. The value is 98.5 amp-hours. At this time, the first switch of this unit is thrown to point 2, and the second switch is in the open state, indicating that it is in a normal series connection state. Therefore, The record is 1. Similarly, if the third battery cell needs to be protected by bypassing due to low voltage, its first switch will be thrown to point 1, and the second switch will be open. The data obtained at this time... The result is 0. Finally, all data from the N battery cells are collected and encapsulated to form the original sampled data set. and state estimation dataset These data form the basis of the multidimensional state feature space. During this process, timestamp synchronization technology ensures that the voltage, current, state of charge, and switching state of all battery cells correspond to the same physical moment, avoiding state misalignment caused by communication delays, thereby guaranteeing the real-time performance and accuracy of the equalization control strategy.
[0025] In step 2, graph-structured modeling is performed on the original sampled data and state estimation data to obtain graph-structured data. Correspondingly, traditional control logic often treats the battery pack as a single linear sequence, using simple threshold comparison or proportional-integral-derivative (PID) control algorithms for equalization. However, due to the existence of a reconfigurable topology, the electrical connections between battery cells are no longer fixed but dynamically evolve with the switching of the switch array. This dynamic evolution not only changes the current flow path but also profoundly affects the thermodynamic and electrochemical interactions between cells. If only discrete feature vectors are used to describe the battery state, it will be difficult to capture the complex spatial coupling characteristics between cells and the nonlinear impact of topological changes on the equalization process. To deeply integrate the physical interconnections of the battery pack with the real-time electrical state and solve the compatibility problem of control strategies for battery packs of different sizes, this application performs graph-structured modeling on the original sampled data and state estimation data to obtain graph-structured data. Each battery cell is abstracted as a vertex in the graph, and physical connections are abstracted as edges. This leverages the powerful expressive power of graph theory to provide standardized input with spatial topological semantics for subsequent feature extraction and transfer learning based on graph neural networks.
[0026] Figure 2 This is a schematic diagram of the data flow in step 2 of the battery energy storage system equalization control method with a reconfigurable battery topology according to an embodiment of this application. Figure 2 As shown, in one embodiment of step 2, graph structure modeling is performed on the original sampled data and state estimation data to obtain graph structure data, including: step 21, multi-dimensional state feature vectorization of battery nodes is performed on the original sampled data and state estimation data to obtain a set of battery cell node features; step 22, an adjacency matrix is constructed based on the physical connection configuration of the battery pack; step 23, graph structure data encapsulation is performed on the set of battery cell node features and the adjacency matrix to obtain graph structure data.
[0027] In the above implementation, step 2 is specifically processed as follows: Step 21: From the original sampling data and state estimation data obtained in the previous steps, for each battery cell... Accurately extract four core dimensional features: voltage State of charge Battery capacity and the current switch status Terminal voltage reflects the instantaneous energy level of the battery, state of charge (SCC) characterizes the percentage of remaining charge, battery capacity reflects the aging degree and energy carrying capacity of a single cell, and the current switching state describes the logical position of the cell in the topology, such as whether it is in connected, bypass, or parallel mode. Considering the significant differences in physical dimensions among these four characteristics—voltage typically fluctuates between 2.5 volts and 4.2 volts, SCC is a dimensionless value between 0 and 1, battery capacity may range from tens to hundreds of ampere-hours, and switching state is a discrete categorical encoding—direct input into the network can lead to vanishing gradients or slow convergence. Therefore, strict normalization of each data point is necessary. A minimum-maximum normalization algorithm is used to map each dimension of data to the [0,1] interval. For voltage data, the preset voltage mapping interval is... ,in Set to 2.5 volts. The voltage is set to 4.2 volts, and the normalized calculation formula is expressed as follows: If the voltage of the first battery cell is currently being measured... If it is 3.65 volts, then its normalized value is... For the state of charge Since it is already in percentage form, if the original sample is displayed as 0 to 100, it is converted to a standard range by dividing by 100. For battery capacity... The preset reference capacity range is ,in Set it to the battery's nominal rated capacity, for example, 100 amp-hours. Taking the first unit in the preceding steps as an example, its capacity is 98.5 amp-hours, so the normalized value is 0.985. For the current switching state... The discrete value mapping method is used to map access state 1 to 0.5, bypass state 0 to 0, and parallel state 2 to 1, thereby quantifying the classification features. After processing each feature, the normalized scalar data are stacked in a fixed order to construct the first... Feature vector of each battery node Traverse all N battery cells in the energy storage system, combine the feature vectors of all nodes to form a feature set of the battery cell nodes. This set is stored in matrix form with dimensions N×4 and contains normalized attribute descriptions of all battery cells.
[0028] Step 22: The battery pack physical connection configuration is part of the preset static hardware topology information, stored in the controller's non-volatile memory. This configuration defines the battery cells in detail. With unit Are there direct wire connections, bus connections, or adjacent electrical paths on the physical circuit board? This is to determine the adjacency matrix. It is necessary to check each pair of nodes in the battery pack. Perform a traversal and judgment. If the battery cell... With unit If two elements are physically adjacent, a value of 1 is assigned to the corresponding position in the matrix; otherwise, a value of 0 is assigned. Since the electrical signal transmission within an energy storage system is bidirectional, and the physical paths in the reconstructed topology do not have directional constraints, the constructed adjacency matrix... Let be a symmetric square matrix of dimension N×N. Its mathematical formula is defined as: If and only if node With nodes Physically adjacent, or vice versa Taking a series-connected reconfigurable module containing six battery cells as an example, in graph-structured modeling, the adjacency matrix mainly represents the adjacent coupling relationships of the battery cells in the physical space and the basic circuit. Following the basic chain distribution, cell 2 is adjacent to cell 3, cell 3 is adjacent to cell 4, cell 4 is adjacent to cell 5, and cell 5 is adjacent to cell 6. Therefore, the elements in the matrix... , , , , , , , , , , , All values are assigned to 1, and all other off-diagonal positions are assigned to 0. To ensure that nodes retain their own feature information while aggregating neighbor information during subsequent message passing in the graph neural network, the adjacency matrix needs to be processed to remove loops. This is done by adding loops to the diagonal positions of the matrix. A uniform value of 1 is assigned at each location to enhance the adjacency matrix. This approach is mathematically equivalent to... ,in It is an identity matrix. The final generated adjacency matrix... It fully characterizes the physical interconnect topology inside the battery pack, laying the foundation for neural networks to understand the spatial constraints between batteries.
[0029] Step 23: This step involves transforming the aforementioned mathematical matrix into a graph object recognizable by the computational framework. First, the object is instantiated, defining a composite graph structure. This structure contains two core attribute fields in its memory allocation: the node feature field `node_features` and the topology association field `edge_index`. This will generate the set of battery cell node features. Direct mapping to node_features involves defining a graph data object conforming to the deep learning framework specifications, which contains the normalized information of N battery cells, as part of the mapping process. The node attribute space is directly associated with this object, ensuring that the subsequent graph neural network can accurately retrieve feature vectors such as voltage, charge, and on / off status of each battery cell based on the node index. For the adjacency matrix... To improve the efficiency of sparse computation in large-scale matrix operations, it is converted into an edge index format. This conversion process involves retrieving the adjacency matrix. This is achieved by using the coordinates of all non-zero elements in the matrix, specifically by traversing the row indices of the matrix. With column index When the value of the element is 1, then the current value is... The coordinates are extracted from data points that are treated as edges. Since the physical connections between batteries are abstracted as undirected edges in the graph and contain self-connection information after self-loop processing, the conversion program will index all extracted starting nodes. Arrange them sequentially in the first row of the tensor, and index the corresponding terminal node. The edges are arranged synchronously in the second row of the tensor, thus achieving the structural transformation from a dense matrix to a sparse tensor through coordinate compression. The edge indices are represented by a long integer tensor of dimension 2×E, where E represents the total number of edges in the graph. Each column contains two elements, representing the starting and ending node indices of an edge. For example, if battery cell 1 and cell 2 are connected, a column is stored in the edge index tensor. It uses a zero-based indexing system. This encapsulation method encapsulates discrete battery properties. With topology They are coupled together. The resulting graph-structured data. This encapsulates not only the electrical health status of each battery cell but also their relative positions within the physical network. This encapsulation offers exceptional flexibility; when a battery cell in the system is physically isolated due to a severe fault, causing a change in N, only the dimensions of the node feature matrix and the number of rows and columns in the adjacency matrix need to be updated to generate new graph structure data, without altering the underlying logic of the control program. This provides a standardized interface for subsequent message passing and topology feature extraction using graph neural networks, ensuring that the equalization control algorithm can adapt to battery energy storage environments of different sizes and connection states.
[0030] Figure 3 This is a schematic diagram of the trained action network in the battery energy storage system equalization control method with a reconfigurable battery topology according to an embodiment of this application. Figure 3As shown, the architecture demonstrates the complete information flow from the original battery cell state input on the left, through the middle multi-layer GNN module with residual connections for local topological feature extraction, then through the global average pooling layer to capture the macro context, and finally to the feature fusion and action decoding in the MLP head on the right, which is explained in steps 3 and 4.
[0031] In step 3, topological feature extraction and global information fusion are performed on the graph structure data to obtain a fused state vector. It is understood that the state of each battery cell depends not only on its own voltage, current, and state of charge, but also on its position in the current circuit topology and its interaction with neighboring cells. Because the frequent operation of the switching array causes the physical connections between batteries to evolve dynamically, simple linear feature extraction methods struggle to capture this nonlinear coupling characteristic that changes with topology, and also fail to reflect the overall macroscopic energy distribution of the battery pack. To enable the control strategy to deeply understand the spatial structural connections between battery cells and overcome the incompleteness of the Markov decision process due to local observations, topological feature extraction and global information fusion are performed on the graph structure data to obtain a fused state vector. This step enhances the individual cells' perception of their surrounding environment by extracting local topological features and completes the overall contextual information by incorporating global features, thereby providing a multi-dimensional and in-depth decision-making basis for generating control signals with cross-scale migration capabilities.
[0032] Figure 4 This is a flowchart of step 3 in the battery energy storage system equalization control method with a reconfigurable battery topology according to an embodiment of this application. Figure 4 As shown, in one embodiment of step 3, topological feature extraction and global information fusion are performed on the graph structure data to obtain a fused state vector, including: step 31, performing local topological feature extraction on the graph structure data based on a message passing mechanism to obtain a high-dimensional battery node feature set; step 32, performing global average pooling on the high-dimensional battery node feature set to obtain a battery topological global feature vector; step 33, performing global and local feature synthesis on the battery topological global feature vector and the high-dimensional battery node feature set to obtain a fused state vector.
[0033] In the above implementation, step 3 is specifically processed as follows: Step 31: This process relies on the graph neural network encoder pre-built in the trained action network. Logically, this encoder consists of L layers of graph neural network blocks stacked sequentially. The number of layers L directly determines the order of neighbors that a node can perceive. To achieve a balance between computational efficiency and feature representation capability, L is preset to 3 layers in this application. The core components inside the graph neural network encoder include a graph attention layer, a residual connection layer, and a layer normalization layer. To further enhance each graph node's understanding of its neighboring nodes, the graph attention layer employs a multi-head attention mechanism. Its core idea is to first perform multi-head attention on each edge in the graph... Calculate an attention coefficient This coefficient represents the node When aggregating information, attention should be paid to its neighbors. To what extent. In specific implementation, firstly, a learnable weight matrix is utilized. A linear transformation is applied to the node features, and then passed through a learnable function. compute nodes with neighbors The original attention scores between them are ,in and For nodes and its neighboring nodes The input feature vector is then used. These coefficients are subsequently normalized using the Softmax function to ensure that the sum of the weights of all neighbors for each node is 1, resulting in... To enhance the model's capacity and stability, the encoder computes K independent attention aggregation processes in parallel, and then fuses these multi-head outputs through a concatenation operation. This allows the model to capture battery inconsistencies from different dimensions of the neighborhood. Its single-layer node update formula is expressed as: , This is a vector concatenation operation, where It is a node The set of neighboring nodes, This represents the Sigmoid activation function. For the first The weight matrix of each attention head. To address the vanishing gradient problem in deep graphical neural networks (GNNs), this application introduces residual connections between layers, allowing information to jump directly between layers to fuse deep and shallow features. Its mathematical expression is as follows: ,in For graph neural networks The input features of the layer It is a linear projection function used to match the dimensions between different layers. This represents the aforementioned graph neural network layer operation. Specifically, taking the module with 6 battery units in this application as an example, if the second unit has a physical adjacency relationship with the first and third units, then the neighbor set of node 2 is {1,3}. During the first layer operation, node 2 receives the original feature vectors from nodes 1 and 3, performs a linear transformation through the weight matrix, and performs weighted aggregation based on the multi-head attention coefficient. After three layers of iterative processing, the feature vector of the second unit not only contains its own real-time electrical state, but also deeply integrates the topological structure information of its second-order or even third-order neighbors, forming a high-dimensional embedding that can represent its local context in the current physical network. By collecting the updated features of all nodes, a high-dimensional battery node feature set is finally obtained. ,in, yes This iterative formula executes to the last step, which is the data generated when the Lth layer focuses on a specific node i.
[0034] Step 32: The purpose of this operation is to overcome the limitations of local observation, allowing each individual cell to perceive the macroscopic state of the entire battery pack, such as the overall average charge level or the overall voltage deviation. Specifically, this involves performing a global averaging pooling operation. In terms of node dimension, the feature set of high-dimensional battery nodes The arithmetic mean is calculated using the feature vectors of all N nodes. The formula is as follows: In this formula, N represents the total number of current battery cells. An averaging method is used to generate a fixed-dimensional vector independent of the number of nodes. This is key to enabling policy transfer across scales. Regardless of whether the battery pack consists of 6 or 60 cells, the dimension of the global feature vector obtained after pooling remains consistent, thus ensuring the stability of the control architecture when handling inputs of different scales.
[0035] Step 33: This step is achieved through feature broadcasting and concatenation techniques. First, the obtained global feature vector of the battery topology is... The data is replicated and broadcast to every node location. Then, for each battery node... Its own high-dimensional embedding features With global feature vectors Perform vector concatenation. If the high-dimensional feature dimension of a single node is 64, and the global feature vector dimension is also 64, then the single fused feature vector obtained after concatenation will have a dimension of 128. Its mathematical expression is: This process deeply couples local features representing the detailed state of individual battery cells with global features representing the macroscopic environment of the battery pack, supplementing the contextual information missing from the decision-making of individual agents. After traversing all nodes to complete the synthesis, a complete set of fused features is formed, which is the fused state vector. This vector, as the final feature representation, not only reflects the electrical properties and local topological importance of each battery cell, but also includes the macroscopic distribution context of the entire energy storage module.
[0036] Specifically, in the balancing decision-making of large-scale battery energy storage systems, high-dimensional battery node features characterize the local electrochemical state of each individual cell, while the global feature vector of the battery topology provides macroscopic contextual information for the entire battery pack. The aforementioned feature fusion logic uses a simple vector concatenation method to combine the two. However, since battery balancing is essentially a dynamic process driven by inconsistencies in voltage, charge, or capacity, this simple concatenation lacks explicit modeling of the potential difference relationship between individual cells and the overall system. This causes the neural network to consume significant computational resources to implicitly learn the deviation logic between individual cells and the average level of the battery pack, reducing the model's sensitivity to extreme deviations. Simultaneously, existing solutions apply equal attention to global information, ensuring that both outlier cells on the verge of failure and cells in normal condition are accessed into the global context with the same weight. This ignores the differences in the dependence of battery nodes in different health states on global constraint information, making the decision-making process susceptible to global noise interference and unable to adaptively focus on key balancing requirements. To address the aforementioned issues, the potential difference-driven adaptive context-gated fusion method achieves efficient purification and enhancement of equilibrium features by explicitly modeling the physical potential difference and introducing a dynamic gating mechanism. This provides high-quality input with physical prior knowledge for the subsequent action network to generate accurate switching control signals.
[0037] In a preferred embodiment of step 33, global and local feature synthesis is performed on the battery topology global feature vector and the high-dimensional battery node feature set to obtain a fused state vector, including:
[0038] The potential difference feature vector between the global feature vector of the battery topology and the features of high-dimensional battery nodes is calculated. Prior physical knowledge of the equilibrium requirement arising from inconsistencies is explicitly injected into the neural network. The calculation process is implemented through multi-dimensional potential difference feature projection processing, for each battery node. Calculate its high-dimensional battery node characteristics With battery topology global feature vector The element-level differences are calculated and mapped to a high-dimensional semantic space through a dedicated nonlinear projection layer. This process captures complex deviations caused by physical factors such as nonlinear internal resistance variations, generating a dedicated feature vector that explicitly represents the degree and direction of the current battery node's deviation from the average level of the battery pack. The calculation logic is as follows: In this formula, The generated potential difference eigenvector is used to carry explicit bias information; The high-dimensional battery node features are output by the graph neural network encoder; This is the global feature vector of the battery topology output by the global average pooling layer; This is the learnable weight matrix for the projection layer, whose dimensions are preset according to the feature dimensions, for example, 64×64; This is the corresponding bias vector; This is the activation function, used to introduce nonlinear mapping properties. It is achieved through subtraction. The model can directly sense whether the battery cell is in an overcharged or over-discharged state, which significantly improves the accuracy of the equalization control strategy in capturing outlier battery cells.
[0039] Global correlation adaptive gating is applied to the potential difference feature vector, the global feature vector of the battery topology, and the features of high-dimensional battery nodes to obtain correlation gating coefficients. Next, to address the information redundancy and interference issues caused by attention equalization and to ensure that the model can dynamically adjust the adoption weight of the global context based on the health of the nodes, this application calculates the correlation gating coefficients. Specifically, an adjustment coefficient is generated through a learnable gating network using the current node's own state, global state, and the potential difference features calculated in the previous stage. This mechanism is similar to a soft switch in an analog circuit; when a large potential difference is detected, indicating that the battery is in an outlier or dangerous state, the coefficient approaches 1 to strengthen global constraints; conversely, it suppresses redundant global information. The calculation logic is as follows:
[0040]
[0041] in, The correlation gating coefficient is a vector with the same dimension as the global features, which determines the pass rate of global information. This represents a vector concatenation operation; This is the Sigmoid activation function, used to compress the output to the (0,1) interval; and These are the learnable parameters of the gating network. Through this adaptive adjustment, the model can accurately focus on key equalization requirements, enhancing the system's robustness when faced with significant differences in battery consistency or the presence of abnormal cells.
[0042] Based on correlation gating coefficients, the potential difference feature vector, the global feature vector of the battery topology, and the high-dimensional battery node features are fused to obtain a fused state vector. Finally, a panoramic view containing individual details, environmental context, and quantization bias is constructed to provide complete information for subsequent action decisions. In this process, mechanical feature stacking is no longer performed; instead, the generated gating coefficients are used to weight the global feature vector as needed, and the weighted global context, original local features, and explicit potential difference features are deeply fused. The calculation logic is as follows:
[0043]
[0044] in, The fused state vector is output and used as the direct input to the action network; This represents the Hadamard product, i.e., element-wise multiplication, which utilizes... right Dynamic weighted adjustment; The linear transformation of the fusion layer projects the concatenated multi-source features onto a unified decision semantic space. This process ensures that the final input data to the decision network contains both critical environmental information filtered out of noise and explicitly enhances the neural network's sensitivity to equilibrium differences. Taking an energy storage module with six battery cells as an example, the preset high-dimensional feature dimension is 64. If the first battery cell is in a severely overcharged state, its... The feature is significantly higher than the global average. When calculating the potential difference eigenvector, This will generate a relatively large positive bias vector, which is then generated after the projection layer. This inconsistency was explicitly flagged. During the gating phase, due to the significant potential difference, the correlation gating coefficients calculated by the gating network... It will approach 1 in the corresponding dimension, thus allowing a large amount of global environmental information (such as the average low potential state of other units) to enter the fusion process. The final generated... This will highly emphasize the outlier nature of this cell. In contrast, if the state of the second cell is close to the global average, its potential vector... A vector close to zero, and the gating coefficient With a smaller size, the model focuses more on its local state and suppresses redundant global information. This differentiated fusion strategy ensures that, in complex reconfigured topologies, the policy model can make optimal switching control decisions that balance local safety and global efficiency, thereby improving the overall lifespan and safety of the battery pack. Specifically, the weight matrix and bias vector in the optimization process are obtained through multi-agent proximal policy optimization (PPO) algorithms, interacting with the simulation environment and iteratively optimizing the training of the graph neural network model.
[0045] In step 4, the fused state vector is input into the trained action network to obtain the action probability distribution of all nodes. It should be understood that in the energy management framework of a large-scale battery cell assembly, the balanced performance of the battery pack highly depends on the control algorithm's search and decision-making capabilities within a vast state space. After the preceding steps completed graph structured modeling and multi-dimensional feature fusion, the generated fused state vector already contains the real-time electrical properties of individual battery cells, local topological relationships, and global macroscopic context information. However, these high-dimensional features are merely abstract representations of the physical state and cannot directly drive the underlying hardware switching array to perform specific balanced actions. To achieve a nonlinear mapping from complex environment perception to precise control commands, and to ensure that the control strategy can provide optimal access, bypass, or parallel connection tendencies for cells in different health states, the fused state vector needs to be input into the trained action network to obtain the action probability distribution of all nodes. This step utilizes the nonlinear fitting capability of deep neural networks to transform abstract state semantics into concrete probabilistic decision suggestions, providing not only a way to solve the state space explosion problem but also strategic support for subsequent randomized sampling combined with safety constraints.
[0046] In one embodiment of step 4, the fused state vector is input into the trained action network to obtain the action probability distribution of all nodes, including: step 41, inputting the fused state vector into the multilayer perceptron decoder of the trained action network to obtain a set of action Logits vectors; step 42, constructing an action probability distribution based on the Softmax function on the action Logits vector set to obtain the action probability distribution of all nodes.
[0047] In the above implementation, step 4 is specifically processed as follows: Step 41: The multilayer perceptron (MLP) decoder of the action network belongs to the policy network part of the multi-agent reinforcement learning framework in terms of logical architecture, and is specifically responsible for the projection of execution features into the action space. The specific architecture of this decoder is a fully connected feedforward neural network containing one input layer, two hidden layers, and one output layer. The number of nodes in the input layer perfectly matches the dimension of the fused state vector output from the previous step. The hidden layer is composed of multiple layers of neurons and linear rectified activation functions stacked alternately, aiming to gradually extract abstract features highly related to the switching decision through multiple nonlinear transformations and to achieve feature dimension compression. The specific execution flow is a node-by-node independent input mode. Each battery cell... Corresponding fusion state vector As input, these parameters are fed in parallel into the multilayer perceptron decoder of the action network. Each layer of the decoder contains a set of learnable weight parameters and bias parameters. The computation of the hidden layers can be described as linearly weighting and summing the input using the weight matrix, then adding the biases, and finally performing a non-linear mapping using an activation function. The formula is expressed as: In this expression, Representing the Given the input vectors of each node, if their dimension is preset to 128, then the weight matrix of the hidden layer... The dimensions are set to 64×128. It is a bias vector of length 64. The symbol represents the activation function. By introducing a nonlinear factor, the decoder can fit the complex charging, discharging, and equalization dynamics of the battery pack. After feature decoding and dimensionality reduction in the hidden layer, the data flows to the last layer of the decoder, the output layer. The number of neurons in the output layer is consistent with the preset discrete action space size of the device. In this implementation, the preset action space size of the battery cell is 3, precisely corresponding to the bypass state, the access state, and the parallel state. The output layer does not contain an activation function in its structure; its output is the raw score value for these three possible actions, i.e., the non-normalized value, mathematically known as Logits. The calculation formula for generating Logits is defined as follows: .in, For the first Each node generates a vector of length 3. The default value for the dimension is 3×64. This is a bias vector of length 3. It's worth noting that the weight matrix and bias vector involved in this step are obtained through multi-agent proximal policy optimization (PPO) in reinforcement learning algorithms. During the training phase, the action network acts as an agent, performing actions and obtaining rewards in the simulation environment. The weight parameters are updated following the gradient ascent rule, and its objective function aims to maximize the cumulative discount reward. The weight parameters are initialized using Kaiming initialization to ensure gradient stability of the deep network in the early stages of training. As training iterations increase, the network can automatically identify which feature combinations mean that the battery needs to be connected in parallel to achieve power transfer, and which feature combinations mean that the unit must be bypassed. After traversing all N battery nodes, the resulting vector sequence constitutes the action Logits vector set. This set contains each node's original preference scores for different hardware actions within the current decision-making cycle.
[0048] Step 42: Since the elements in the Logits vector are distributed within the real number domain and are uncorrelated, directly sampling from them would lead to an unclear probability distribution and difficulty in meeting normalization requirements. Therefore, a Softmax transformation is needed to convert these unbounded raw scores into a standard probability distribution. The first step in this process is to exponentialize each element in the Logits vector. Using the natural constant e as the base for exponential operation, any real number can be mapped to a positive number. Due to the monotonically increasing nature of the exponential function, larger raw scores will have a larger numerical proportion after exponentialization, thus dominating the probability distribution. This is beneficial for the action network to provide a highly deterministic balanced action tendency after training. Normalization is then performed by dividing each exponentially sized value by the sum of all elements in the vector. This operation ensures that all elements of the output vector are within the interval [0,1], and the arithmetic sum of all elements is strictly equal to 1. The specific mathematical expression for generating the probability distribution is: In this formula, Indicates the first The action Logits vector corresponding to the nth node Each element is a sum of exponents for all action scores of that node, with the denominator being the sum of all such scores. Specifically, in this application, the Logits vector obtained by the first battery unit after decoding is... The values are [4.2, 1.5, 0.3]. During Softmax processing, the exponent values of each component are first calculated. , , The sum of the three is approximately 72.52. The corresponding action probability distribution can then be calculated. The values are approximately [0.92, 0.06, 0.02]. This result indicates that, for the first battery cell, the action network recommends performing a bypass action with a very high probability of 92%, a connection action with a probability of 6%, and a parallel action with a probability of 2%. If the current state of charge of this cell is significantly higher than that of other cells and it is at the end of its charging process, this high-probability bypass decision perfectly aligns with the equilibrium logic of protecting the high-charge battery and waiting for the low-charge battery to catch up. By performing the above transformation on all battery nodes, the final set of action probability distributions for all nodes is obtained. This set provides a complete and structured description of the stochastic policy distribution of each cell unit within the energy storage device under a given state during the current decision-making cycle. This probability-based output format has significant advantages: in the early stages of training, the probability distribution is relatively flat due to the exploratory phase of the network parameters, which facilitates the agent's full exploration within a broad action space; as training converges, the probability distribution for a specific state polarizes towards the optimal action. Simultaneously, this distributed decision output, combined with the graph neural network characteristics of the preceding steps, allows the balancing strategy to naturally adapt to changes in the number of cells. When changes in battery configuration lead to increases or decreases in the value of N, the action network only needs to increase or decrease the corresponding computational loops according to the new node size, without modifying the weight parameters within the network. This ensures seamless migration and efficient operation of the balancing algorithm across energy storage devices of different sizes.
[0049] In this application, the action network training process employs a multi-agent proximal policy optimization (PPO) algorithm, logically constructed as an Actor-Critic model. This model enables the Actor network to learn an equilibrium control policy that maximizes cumulative discount rewards through continuous interaction with the environment in a reconfigurable battery simulation environment. The training process is meticulously divided into three core stages: data collection, advantage calculation, and parameter update. During the data collection stage, the Actor network... The agent receives current graph structure observations and outputs an action distribution for each node, from which it samples actions. And record the logarithmic probability, while the Critic network For each node in the current state normalized value An evaluation is performed. The environment returns a global reward after the action is executed. The reward is broadcast to all nodes and is defined in the following form: The first term utilizes negative weights. Penalize SOC inconsistencies. and These represent the maximum and minimum states of charge (SOC) of all individual cells in the battery pack during the current decision-making period. , The second term is for the safety penalty weight and the balance success weight. As a soft constraint in the safety layer, it penalizes unsafe actions; the third item This serves as a balanced success reward to encourage the agent to complete the task as quickly as possible. Following this, the dominance estimation phase begins. To balance the bias and variance of the estimation, this application utilizes generalized dominance estimation (GAE) through time difference (TD) residuals. To evaluate the quality of state-action pairs, the calculation formula is as follows: ,in It is the original scale value after denormalization. This is the discount factor. During the PPO update phase, the Critic network updates using a pruning value loss, by pruning the new value prediction onto the old value. Minimize the mean square error loss within the neighborhood. To prevent excessive fluctuations in the value function. Simultaneously, to improve sample efficiency and enhance training stability, the Actor network uses an importance sampling ratio. To compensate for the distribution differences between the old and new strategies, its policy objective function is... The policy updates are restricted to the trust domain through a pruning mechanism. Furthermore, to encourage agents to explore fully and prevent premature convergence to suboptimal solutions, the total loss of the Actor is... It also includes a reward item based on policy entropy. , represented as , The entropy weight coefficients are used. Through this multi-agent reinforcement learning framework, even if the system completes training with a fixed number of batteries, the generated policy can be seamlessly transferred to battery systems of different sizes due to the scale-independent nature of graph neural networks in extracting topological features, achieving adaptive and generalized management of changes in the number of batteries. It is worth mentioning that the Critic model is a core component of the algorithm's training phase in this application. Although the Actor network is mainly used to generate control signals during the actual operation phase (inference phase), without the accurate scoring of the Critic model during the learning phase, the Actor network cannot learn how to handle complex battery inconsistencies.
[0050] In step 5, the probability distribution of actions of all nodes is checked for safety constraints and switching signals are executed to obtain the final switching control signal, which is then sent to the hardware drive circuit. In other words, in a reconfigurable battery energy storage architecture, the connection method of battery cells dynamically changes with the action of the switching array. While this high flexibility provides diverse paths for power balancing, it also introduces complex safety boundary issues. Although deep reinforcement learning models can provide highly strategic action suggestions after training, the essence of neural network output is a probability mapping based on feature extraction. Under certain extreme conditions or uncovered boundary states, the model may still output instructions that violate physical laws or circuit safety rules. For example, improper switching combinations may lead to unexpected short circuits between battery cells or generate instantaneous inrush currents exceeding the current limiting capacity. To ensure balancing efficiency while building a deterministic hard defense barrier for the physical safety of the energy storage device, and to ensure that the final control signal strictly conforms to the hardware logic constraints of the underlying circuit, the probability distribution of actions of all nodes is checked for safety constraints and switching signals are executed to obtain the final switching control signal. This step achieves deep decoupling and collaborative protection between intelligent algorithms and power electronic hardware safety guidelines by transforming soft policy tendencies into hard safety instructions.
[0051] In one embodiment of step 5, the action probability distribution of all nodes is subjected to security constraint verification and switch signal execution to obtain a final switch control signal, which is then sent to the hardware driver circuit. This includes: step 51, randomizing the action probability distribution of all nodes to obtain an initial action instruction set; step 52, performing security layer hardware constraint verification on the initial action instruction set based on preset rules to obtain a set of violating nodes; and step 53, performing action correction and hardware control signal mapping on the initial action instruction set and the set of violating nodes to obtain the final switch control signal.
[0052] In the above implementation, step 5 is specifically processed as follows: Step 51: This process is the key bridge for transforming the continuous probability distribution output by the action network in the previous steps into discrete hardware execution instructions. The action network is for each battery node. Output action probability distribution It is a vector containing three components, whose component values correspond to the input, denoted as . Bypass, denoted as And parallel connections, denoted as The probabilistic tendencies of three discrete actions. To maintain necessary exploratory nature in the decision-making process and simulate the stochastic selection of the optimal policy in a multi-agent environment, a discrete probability model based on a multinomial distribution is constructed. During sampling, the probability vector of each node is... As a parameter of the multivariate distribution, for each battery cell, a discrete sample is randomly drawn from its corresponding probability distribution to obtain the initial action command. The sampling process follows a mathematical expression: In the formula The symbol represents a random variable. Obtain the parameter as The multivariate distribution. Continuing with the values from the previous steps, if the action probability distribution of the first unit... If the value is [0.92, 0.06, 0.02], then during sampling, this unit has a 92% probability of being assigned a bypass command (coded as 0), a 6% probability of being assigned an access command (coded as 1), and a 2% probability of being assigned a parallel command (coded as 2). By traversing all N nodes in the entire energy storage device, the action commands sampled from each node are vectorized and aggregated to form an initial action command set. This set reflects the initial configuration preset of the action network for all switch arrays in the current state. In this process, the significance of randomized sampling lies in balancing utilization and exploration. During model training, this randomness helps the agent escape local optima and find a better equilibrium path in the vast state space; during actual operation, if the probability distribution is highly polarized, for example, if the probability of a certain action is close to 1, then random sampling will output the action with extremely high determinism, ensuring the stability of the policy.
[0053] Step 52: This step relies on the battery pack physical topology information pre-stored in the energy management unit's read-only memory. The battery pack physical topology information refers to the mathematical definition of the arrangement and numbering of battery cells on the circuit board and their corresponding electrical node connections. Specifically, this information exists as an ordered list, defining the series physical path from cell number 1 to cell number N. This information is obtained through static parameter calibration during the hardware manufacturing stage, and its specific architecture includes node indices, adjacent node association flags, and a parallel bus mapping table. By reading these preset parameters, the control program can accurately determine the relative positions of any two battery cells on the physical path. (Safety Layer) The core task is to identify and intercept potentially hazardous combinations of actions. In reconfigurable topologies, the most threatening hazardous mode is the unintended coupling of parallel and series loops. According to circuit safety guidelines, any two planned parallel actions... Battery cells must never be connected in series. The battery cells. This combination can lead to complex circulating currents in the parallel bus through the current-limiting resistor and the main current loop, and may even cause partial short circuits at specific switching moments. To achieve efficient rule verification, formal decision logic is adopted. For the initial action instruction set... Perform a full scan to determine if triples exist. The following determination equation must be satisfied: In this mathematical criterion, Indicates parallel action symbol, Represents the access action identifier. It is a Boolean function that uses the physical topology information of the battery pack to determine the node. Is the physical sequence number at node? and nodes Between. If the function returns true and the instruction configuration satisfies the aforementioned action combination, then the current instruction set is considered to be in violation. A specific numerical example illustrates this: for a module with 6 battery units, its initial action instruction set... The sampling result is {0,1,2,1,2,0}. The action commands for unit 3 (i=3) and unit 5 (j=5) are both 2 (parallel), while unit 4, located in the middle, has a command of 1 (access) for k=4. During security layer scanning... If the return value is true, then the conflict conditions of parallel connection and connection are satisfied. The condition is true. At this point, the security layer will add the index of the intermediate node that caused the danger, namely cell number 4, to the set of violating nodes. Simultaneously, nodes 3 and 5, which initiated the parallel connection request, will be marked as pending correction to ensure a secure closed loop. If no such pattern is found after a full scan, the set of violating nodes will be... Empty. It's worth noting that the training and optimization of the security layer embodies a combination of hard and soft constraints. Although the security verification logic itself is based on hard-coded physical rules, the security layer acts as an environmental feedback mechanism during the action network training process. When the action network outputs an instruction that is intercepted by the security layer, the reinforcement learning algorithm generates a large penalty value in the environmental feedback, i.e. ,in The default value is a constant much larger than the normal equilibrium reward. This mechanism forces the weight matrix and bias vector in the action network to evolve towards the safe region. Through continuous iteration of the multi-agent proximal policy optimization (PPO) algorithm, the model gradually learns to automatically avoid action combinations that would trigger interception by the safety layer. This hardware-software hybrid design ensures hardware security when training is not fully converged, while achieving near-zero violation intelligent decision output after the model matures. Finally, through the safety layer's refined scanning of the initial instruction set and the localization of violation nodes, a complete and accurate set of violation nodes is obtained. .
[0054] Step 53 is crucial for ensuring the safe transition of control instructions from the logical domain to the physical execution domain. In this application, a module containing six battery cells obtains the initial action instruction set as described above. The sampling result is {0,1,2,1,2,0}, where 1 represents the access state, 0 represents the bypass state, and 2 represents the parallel state. In this example, units 3 and 5 are both preset to the parallel state, while unit 4, located in between, is preset to the access state. This violates the safety rule that there should be no access unit between parallel units, therefore the set of violating nodes is [not specified]. It is determined to contain index {4}. In one embodiment of step 53, the initial action instruction set and the set of violation nodes are modified by action and mapped to hardware control signals to obtain the final switch control signal, including: step 531, based on the set of violation nodes, the initial action instruction set is modified by instruction set based on safety rules to obtain the final safe action instruction set; step 532, each final safe action instruction in the final safe action instruction set is logically mapped from instruction to switch state to obtain an individual switch state set; step 533, the individual switch state set is encapsulated with hardware control signals to obtain the final switch control signal.
[0055] First, step 531 is executed. This process first initializes a set of initial action instructions in the controller's memory. Equal-length new instruction sequence This is used to store the corrected safety output. The controller then initiates a node-by-node review loop, traversing all battery node indices from 1 to N. For each node i, the controller associates its index with the set of violating nodes. A comparison is performed. If index i is found to exist in the violation set, it is determined that the original sampling action of this unit may lead to a dangerous state at the physical layer. At this time, the security layer will forcibly execute intervention logic to modify the action code of this node to the predefined default security action code. In this scheme, to maximize battery protection and simplify the circuit structure, the default safety action is preset to a bypass state, i.e., encoded as 0. If node index i is not in the violation set, it means that the action command of that unit is safe in the current topology context, and the decision result of the initial sampling can be directly adopted. The mathematical expression of this process is as follows:
[0056]
[0057] In this formula, This represents the modified action instruction for the i-th unit. The value is fixed at 0. A specific derivation is given using a 6-unit example: For node 1, since its index is not in {4} and the preceding sampling probability points to the bypass, therefore... =0; For nodes 2 and 3, the original instruction is adopted similarly. =1, =2; For node 4, since its index belongs to the violation set, its action is forcibly corrected from 1 to 0, i.e. =0; For nodes 5 and 6, the original actions are also adopted, respectively =2, =0. The final set of safety action instructions generated. The value is {0,1,2,0,2,0}. This correction mechanism implements hard interception at the software level, ensuring that every instruction subsequently sent to the hardware complies with the security reconfiguration guidelines.
[0058] Then proceed to step 532. To ensure that the logic instructions generated by the control algorithm can be accurately translated into on / off actions of the underlying hardware, this application also includes a reconfigurable battery topology. Figure 5 This is a schematic diagram of a reconfigurable battery topology according to an embodiment of this application. Figure 5As shown, it includes: multiple battery cells and a switch array. Each battery cell is associated with a first switch and a second switch. The first switch is a single-pole double-throw switch, with its common terminal connected to the positive terminal of the next battery cell, its first throw point connected to the positive terminal of the current battery cell, and its second throw point connected to the negative terminal of the current battery cell. The second switch is a single-pole single-throw switch, with one end connected to the negative terminal of the current battery cell and the other end connected to a parallel bus via a current-limiting resistor. The reconfigurable battery topology consists of multiple battery cells and a switch array. Its core feature is that each battery cell only needs to be associated with two switches to achieve multi-mode switching. Specifically, the first switch adopts a single-pole double-throw structure, with its common terminal connected to the positive terminal of the next-stage battery cell, and its two throw points corresponding to the positive and negative terminals of the current battery cell, respectively. The second switch is a single-pole single-throw switch, which connects the negative terminal of the battery to the parallel bus via a current-limiting resistor. This allows the battery cell to independently switch between three operating states—connected, bypassed, or parallel—through different combinations of two switches: when the first switch's throw point 2 is closed and the second switch is open, the battery cell is normally connected in series in the main circuit and is in the connected state; when the first switch's throw point 1 is closed and the second switch is open, the current bypasses the battery cell for fault isolation or equalization regulation; when the first switch's throw point 1 is closed and the second switch is closed, the battery cell enters the parallel state, transferring charge with other cells through the parallel bus. Compared to the complex topology requiring 3 to 6 switches in the traditional approach, this solution reduces the number of switching devices, lowering system cost and potential failure points. More importantly, by introducing a current-limiting resistor in the parallel path, this structure effectively solves the safety hazard of surge current generated during parallel reconstruction due to the extremely low internal resistance of the battery in existing technologies. This significantly improves the physical safety and service life of large-scale battery energy storage systems while ensuring system flexibility and equalization efficiency. The state of the battery cell is determined by a single-pole double-throw first switch. A second switch with a single-pole single-throw As jointly determined by this physical architecture, a deterministic mapping function needs to be established from logical action encoding to specific physical switch states. The mapping function is strictly based on the reconfigurable topology hardware connection logic of this application. Specifically, the mapping logic is defined as follows: when the action command is access (1), it is mapped to the first switch. The second switch is closed at the throwing point 2. Disconnect; when the action command is bypass (0), it is mapped to the first switch. Point 1 is closed, second switch Disconnect; when the action command is parallel (2), it is mapped to the first switch. Point 1 is closed, second switch Closure. During node-by-node instruction translation, the final instruction set for the 6-unit example. ={0,1,2,0,2,0}, the mapping function generates the switch state vector one by one. , Indicates the first The dual-switch state vector of each battery cell, Indicates the first The first switch of the unit (single-pole double-throw switch) ) state, Indicates the first The unit's second switch (single-pole single-throw switch) ) state, To indicate the first The final safety action command for the unit. For node 2, the output state vector is: Throw point 2 closed, open; for nodes 3 and 5, the output state vector is: Throw point 1 closed, closed; for nodes 1, 4, and 6, the output state vector is: Throw point 1 closed, open. This mapping process transforms the highly abstract equalization strategy into specific relay or power semiconductor drive level requirements, forming a set of individual switching states. Each state vector This corresponds to the exact on / off relationship of the battery cell in the physical circuit, completing the transition from software decision-making to hardware execution logic.
[0059] Finally, step 533 is executed. To enable the main controller to efficiently control the switch array via an industrial bus (such as SPI or I2C), the dispersed switch states need to be converted into compact binary control words. First, state encoding is performed, assigning one binary bit to the physical state of each switch. The default rule is: for the first switch… The code for a closed loop at point 1 is 0, and the code for a closed loop at point 2 is 1; for the second switch The open code is 0, and the closed code is 1. Therefore, the combined state of each unit... Encoded as a 2-bit binary number 2-bit code for each node It consists of (S2, S1), where S1 is located in the low-order bit (2(i-1)th bit) and S2 is located in the high-order bit (2(i-1)+1th bit). For example, the encoding corresponding to access state (1) It is binary 01, which is decimal 1; the encoding corresponding to the bypass state (0) It is binary 00, i.e. decimal 0; the code corresponding to the parallel state (2) This is binary 10, or decimal 2. During the signal aggregation phase, the controller creates a continuous control word of length 2N bits. Through left shift and bitwise OR operations, the 2-bit code of each node is sequentially filled into the designated bit field of the control word. The formal expression of this generation process is as follows: In this formula, It is the first A 2-bit feature code for each unit, The symbol represents a bitwise left shift operation. The starting bit offset of this code within the bus control word was determined. This represents an accumulation encapsulation of bitwise OR (or XOR). For a 6-unit system, the final safety instruction is {0,1,2,0,2,0}, calculated as follows: Node 1 contributes bit fields [1:0] as 00, Node 2 contributes bit fields [3:2] as 01, Node 3 contributes bit fields [5:4] as 10, Node 4 contributes bit fields [7:6] as 00, Node 5 contributes bit fields [9:8] as 10, and Node 6 contributes bit fields [11:10] as 00. These bit fields are then encapsulated to generate the final switch control signal. This is a 12-bit binary data packet, for example, 0x224 in hexadecimal. This signal is sent to the hardware driver circuit, where it is parsed by the driver layer and directly applied to the driver chip of the power MOSFET or relay. This rigorous encapsulation and verification process not only ensures the atomicity of each switching action at the microscopic level but also guarantees the safety and real-time performance of the overall topology transformation at the macroscopic level, thereby achieving efficient, stable, and safe balanced control and management of large-scale battery energy storage systems.
[0060] In summary, the reconfigurable battery topology and its battery energy storage system balancing control method based on the embodiments of this application are elucidated, solving the balancing challenges of battery energy storage systems through hardware and software co-optimization. At the hardware level, by configuring a single-pole double-throw switch and a single-pole single-throw switch connected to the parallel bus via a current-limiting resistor for each battery cell, the topology is significantly simplified. This reduces system cost and control complexity while effectively suppressing instantaneous surge current during parallel reconfiguration using the current-limiting resistor, thus resolving safety hazards present in traditional solutions. At the software level, the battery system is abstracted as a graph structure, and a graph neural network (GNN) is used to extract local topological features and fuse global information. The message passing mechanism of GNN breaks through the limitations of traditional deep learning models on fixed input dimensions, enabling the control strategy to naturally adapt to changes in the number of batteries (such as fault isolation or system scale migration), achieving strong generalization and transferability of the balancing strategy without requiring retraining for new systems. Furthermore, by combining multi-agent reinforcement learning to model the action probability distribution and introducing a safety constraint verification and instruction correction mechanism, the final generated switch control signal can achieve near-optimal equilibrium in the vast state space while strictly complying with hardware safety guidelines, thereby comprehensively improving the available capacity, reliability and service life of the energy storage system.
Claims
1. A method for equalization control of a battery energy storage system with a reconfigurable battery topology, characterized in that, include: Acquire raw sampling data and state estimation data. The raw sampling data includes the voltage and current of each battery cell, and the state estimation data includes the state of charge, battery capacity and current switching state of each battery cell. Graph structured data is obtained by performing graph structured modeling on the original sampled data and state estimation data; The graph structure data is subjected to topological feature extraction and global information fusion to obtain a fused state vector, including: extracting local topological features from the graph structure data based on a message passing mechanism to obtain a high-dimensional battery node feature set; performing global average pooling on the high-dimensional battery node feature set to obtain a global feature vector of the battery topology; and synthesizing global and local features from the global feature vector of the battery topology and the high-dimensional battery node feature set to obtain a fused state vector. The fused state vector is input into the trained action network to obtain the action probability distribution of all nodes; The probability distribution of actions of all nodes is checked for safety constraints and the switching signal is executed to obtain the final switching control signal, which is then sent to the hardware driver circuit. The process involves synthesizing global and local features from the battery topology global feature vector and the high-dimensional battery node feature set to obtain a fused state vector. This includes: calculating the potential difference feature vector between the battery topology global feature vector and the high-dimensional battery node features; performing global correlation adaptive gating on the potential difference feature vector, the battery topology global feature vector, and the high-dimensional battery node features to obtain correlation gating coefficients; and fusing the potential difference feature vector, the battery topology global feature vector, and the high-dimensional battery node features based on the correlation gating coefficients to obtain the fused state vector.
2. The battery energy storage system equalization control method with reconfigurable battery topology according to claim 1, characterized in that, Graph-structured modeling is performed on the raw sampled data and state estimation data to obtain graph-structured data, including: The original sampled data and state estimation data are vectorized into multidimensional state features of battery nodes to obtain the feature set of battery cell nodes; Construct an adjacency matrix based on the physical connection configuration of the battery pack; The feature set and adjacency matrix of battery cell nodes are encapsulated into graph structure data to obtain graph structure data.
3. The battery energy storage system equalization control method with reconfigurable battery topology according to claim 1, characterized in that, The fused state vectors are input into the trained action network to obtain the action probability distribution of all nodes, including: The fused state vector is input into the multilayer perceptron decoder of the trained action network to obtain a set of action Logits vectors. The action probability distribution of all nodes is obtained by constructing the action probability distribution of the action Logits vector set based on the Softmax function.
4. The battery energy storage system equalization control method with reconfigurable battery topology according to claim 1, characterized in that, The probability distribution of actions of all nodes is subjected to safety constraint verification and switch signal execution to obtain the final switch control signal. The final switch control signal is sent to the hardware driver circuit, including: Randomize the action probability distribution of all nodes to obtain an initial action instruction set; The initial action instruction set is subjected to security layer hardware constraint verification based on preset rules to obtain the set of violation nodes; The initial action instruction set and the set of violation nodes are modified by action correction and mapped with hardware control signals to obtain the final switch control signal.
5. The battery energy storage system equalization control method with reconfigurable battery topology according to claim 4, characterized in that, The initial action instruction set and the set of violation nodes are modified by action correction and mapped with hardware control signals to obtain the final switch control signal, including: Based on the set of violating nodes, the initial action instruction set is modified according to security rules to obtain the final safe action instruction set; Logical mapping from instruction to switch state is performed on each final safety action instruction in the final safety action instruction set to obtain an individual switch state set. The set of individual switch states is encapsulated in hardware control signals to obtain the final switch control signal.
6. A reconfigurable battery topology, comprising a battery energy storage system equalization control method using the reconfigurable battery topology according to any one of claims 1-5, characterized in that, include: Multiple battery cells and a switch array are provided, with each battery cell associated with a first switch and a second switch. The first switch is a single-pole double-throw switch, with its common terminal connected to the positive terminal of the next battery cell, its first throw point connected to the positive terminal of the battery cell, and its second throw point connected to the negative terminal of the battery cell. The second switch is a single-pole single-throw switch, with one end connected to the negative terminal of the battery cell and its other end connected to a parallel bus via a current-limiting resistor.