A control method of a reconfigurable battery network and related devices

By screening and modeling effective switching state combinations of reconfigurable battery networks, the problem of failing to consider electrical coupling relationships in existing methods is solved, achieving stable output voltage and state-of-charge balance of the battery network and improving the effectiveness of the control strategy.

CN123184232APending Publication Date: 2026-11-27HUADIAN INNER MONGOLIA ENERGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611685444.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

Smart Images

  • Figure CN123184232A_ABST
    Figure CN123184232A_ABST
Patent Text Reader

Abstract

The application discloses a control method and related device of a reconfigurable battery network, and relates to the technical field of new energy energy storage control, and comprises the following steps: obtaining a current running state of the reconfigurable battery network and a plurality of candidate switch state combinations; based on the current running state, selecting a plurality of valid switch state combinations satisfying physical running constraints from the plurality of candidate switch state combinations, and eliminating invalid actions that may cause failure or performance decline of the reconfigurable battery network. The joint probability distribution model is used to model and sample the valid switch state combinations, and the electrical coupling relationship between the working states of all battery monomers in the reconfigurable battery network is fully considered, so that the sampling probabilities corresponding to the plurality of valid switch state combinations can accurately reflect the advantages and disadvantages of each valid switch state combination under the current running state, and the target switch state combination obtained based on the sampling probability always belongs to a legal combination satisfying the physical running constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy storage control technology, and in particular to a control method and related device for a reconfigurable battery network. Background Technology

[0002] Reconfigurable battery networks achieve overall output voltage regulation and state-of-charge balancing by dynamically switching power electronic switches on and off, altering the connections between individual battery cells. However, as the scale and topological complexity of battery networks increase, their control faces the challenge of multidimensional discrete decision-making. Existing deep reinforcement learning-based control methods typically employ multiple Bernoulli distributions to independently model each switching unit. This approach assumes that the control dimensions are independent and fails to consider the inherent electrical coupling relationships within the reconfigurable battery network.

[0003] In actual operation, this independence assumption can easily lead to the generated switching state combinations violating topological connection constraints or electrical boundary constraints (such as over-discharge, voltage exceeding limits, etc.), resulting in a large number of invalid actions. This not only reduces the search efficiency during the training process, but may also cause the actual control strategy to fail to meet the requirements of safe and stable system operation, making it difficult to balance the overall output voltage quality and the consistency management of the battery pack. Summary of the Invention

[0004] In view of the above problems, this application provides a control method and related apparatus for a reconfigurable battery network to achieve the goal of a control strategy that balances total output voltage quality and battery pack consistency management. The specific solution is as follows: The first aspect of this application provides a control method for a reconfigurable battery network, comprising: The current operating state of a reconfigurable battery network and multiple candidate switch state combinations are obtained. The reconfigurable battery network includes multiple battery modules, each of which includes a battery cell and a switch unit. The candidate switch state combinations include the on / off state of each switch unit in the reconfigurable battery network. The current operating state includes the state of charge of each battery cell and the terminal voltage of each battery cell. Based on the current operating state, multiple valid switch state combinations that satisfy physical operating constraints are selected from multiple candidate switch state combinations. The physical operating constraints include topology connection constraints and electrical boundary constraints. The topology connection constraints characterize that the connection relationship between the battery cell and the switch unit corresponding to the on / off state of each switch unit belongs to a preset feasible connection relationship. The preset feasible connection relationship includes each battery cell being put into operation or bypassed through the corresponding switch unit, multiple battery cells being connected in parallel to form a battery pack, and each battery pack being connected to the reconfigurable battery network through a switch unit. The electrical boundary constraints mean that the total output voltage of the reconfigurable battery network is within a preset voltage upper and lower limit range, and the terminal voltage of the battery cell being put into operation must not be lower than the preset cutoff discharge voltage, and the state of charge of the battery cell being put into operation must not be lower than the preset cutoff discharge state of charge. Based on the current running state and the pre-constructed joint probability distribution model, the sampling probabilities corresponding to the multiple effective switch state combinations are obtained respectively; the number of neurons in the output layer of the joint probability distribution model is the same as the number of multiple effective switch state combinations, and each neuron is associated with one effective switch state combination; Samples are taken from multiple valid switch state combinations according to the sampling probability to obtain the target switch state combination; The on / off state of each switching unit in the reconfigurable battery network is controlled based on the target switching state combination.

[0005] A second aspect of this application provides a control device for a reconfigurable battery network, comprising: The data acquisition module is used to acquire the current operating state of the reconfigurable battery network and multiple candidate switch state combinations. The reconfigurable battery network includes multiple battery modules, each battery module includes a battery cell and a switch unit. The candidate switch state combinations include the on / off state of each switch unit in the reconfigurable battery network. The current operating state includes the state of charge of each battery cell and the terminal voltage of each battery cell. The filtering and combination module is used to filter out multiple valid switch state combinations that meet physical operating constraints from multiple candidate switch state combinations based on the current operating state. The physical operating constraints include topological connection constraints and electrical boundary constraints. The topological connection constraints indicate that the connection relationship between the battery cell and the switch unit corresponding to the on / off state of each switch unit belongs to a preset feasible connection relationship. The preset feasible connection relationship includes each battery cell being put into operation or bypassed through the corresponding switch unit, multiple battery cells being connected in parallel to form a battery pack, and each battery pack being connected to the reconfigurable battery network through a switch unit. The electrical boundary constraints mean that the total output voltage of the reconfigurable battery network is within a preset voltage upper and lower limit range, and the terminal voltage of the battery cell being put into operation is not lower than the preset cutoff discharge voltage, and the state of charge of the battery cell being put into operation is not lower than the preset cutoff discharge state of charge. The probability acquisition module is used to acquire the sampling probabilities corresponding to the multiple effective switch state combinations based on the current running state and the pre-built joint probability distribution model; the number of neurons in the output layer of the joint probability distribution model is the same as the number of multiple effective switch state combinations, and each neuron is associated with one effective switch state combination; A sampling module is used to sample from multiple valid switch state combinations according to sampling probability to obtain a target switch state combination; The control module is used to control the on / off state of each switching unit in the reconfigurable battery network based on the target switching state combination.

[0006] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the control method for a reconfigurable battery network described in the first aspect or any implementation thereof.

[0007] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the control method of the reconfigurable battery network of the first aspect or any implementation thereof.

[0008] The fifth aspect of this application provides a computer-readable storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the control method for a reconfigurable battery network described in the first aspect or any implementation thereof.

[0009] By employing the above technical solution, this application provides a control method for a reconfigurable battery network. The method acquires the current operating state of the reconfigurable battery network and multiple candidate switch state combinations. Based on the current operating state, it selects multiple valid switch state combinations that satisfy physical operating constraints from the candidate combinations, directly embedding these physical operating constraints into the action space construction process. This fundamentally eliminates invalid actions that may lead to reconfigurable battery network failure or performance degradation. Simultaneously, a joint probability distribution model is used to model and sample the valid switch state combinations as a whole, replacing the traditional method of independently sampling each switch unit. This fully considers the electrical coupling relationship between the operating states of individual battery cells within the reconfigurable battery network. Therefore, the sampling probabilities corresponding to the multiple valid switch state combinations accurately reflect the quality of each valid switch state combination under the current operating state. The target switch state combinations obtained based on the sampling probabilities always belong to legal combinations that satisfy physical operating constraints, effectively preventing illegal combinations that violate physical operating constraints from entering the control loop. This method can improve the output voltage quality and state-of-charge balance of the reconfigurable battery network while meeting hard constraints such as voltage stability and preventing over-discharge, achieving a deep integration of algorithm optimization and physical system characteristics. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent when taken in conjunction with the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0011] Figure 1 A schematic diagram of a system architecture is provided for this application; Figure 2 A schematic diagram of the topology of the reconfigurable battery network provided in an embodiment of this application; Figure 3 A flowchart illustrating a control method for a reconfigurable battery network provided in an embodiment of this application; Figure 4 A schematic diagram of the category distribution model provided in the embodiments of this application; Figure 5 A schematic diagram of the multiple Bernoulli distribution model provided in the embodiments of this application; Figure 6 A schematic diagram showing the curves of average reward changing with training rounds under different algorithms provided in the embodiments of this application; Figure 7 A schematic diagram showing the comparison curves of the total output voltage of the reconfigurable battery network under different algorithm control methods provided in the embodiments of this application; Figure 8 and Figure 9The balancing effect of the state of charge of a single battery cell under different algorithms provided in the embodiments of this application; Figure 10 A schematic diagram of the structure of a control device for a reconfigurable battery network provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0013] As will be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0014] The terms "first," "second," etc., used in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0015] This application can be applied to fields such as electric vehicle power battery systems, uninterruptible power supplies and backup power supplies, on-board energy storage for electric ships and rail transit, and cascade utilization systems for retired power batteries.

[0016] See Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 can provide the methods provided in the embodiments of this application to one or more terminals.

[0017] The terminal 100 may be equipped with a reconfigurable battery network control application. The application can provide an interface on which the terminal 100 can receive relevant parameters input by the user. These parameters include preset upper and lower voltage limits, preset discharge cutoff voltage, preset discharge cutoff state, and preset weights of each reward item in the reward value. The terminal 100 then sends these parameters to the server 200. Based on the received parameters, the server 200 can obtain the processing result and return it to the terminal 100.

[0018] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.

[0019] The following description Figure 1 The product form of the mid-terminal 100; The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.

[0020] Terminal 100 may include a radio frequency unit, memory, input unit, display unit, camera (optional), audio circuitry (optional), speaker (optional), microphone (optional), headphone jack (optional), processor, external interface, power supply, and other components. Those skilled in the art will understand that the above-mentioned components are merely examples and do not constitute a limitation on the terminal or multifunctional device; it may include more or fewer components, or a combination of certain components, or different components.

[0021] The input unit can be used to receive input numeric or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit may include a touchscreen (optional) and / or other input devices. Other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0022] Among them, the input device can receive input data, etc.

[0023] The display unit can be used to display information input by the user or information provided to the user, various menus of the terminal, interactive interfaces, file display, and / or playback of any multimedia file. In this embodiment, the display unit can be used to display the interface of relevant parameters input by the user on the human-computer interaction interface, processing results, etc.

[0024] The memory can be used to store software code related to the control method of the reconfigurable battery network. The processor can execute the steps of the control method of the reconfigurable battery network and can also schedule other units (such as the above-mentioned input unit and display unit) to achieve the corresponding functions.

[0025] This radio frequency unit (optional) can be used to receive and send signals during information transmission or calls.

[0026] In this embodiment of the application, the radio frequency unit can send data to the server 200 and receive the processing results sent by the server 200.

[0027] It should be understood that this radio frequency unit is optional and can be replaced with other communication interfaces, such as a network port.

[0028] Terminal 100 also includes a power source (such as a battery) for supplying power to the various components.

[0029] Terminal 100 also includes an external interface, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication, or to connect a charger to charge terminal 100.

[0030] Server 200 includes a bus, a processor, a communication interface, and memory. The processor, memory, and communication interface communicate with each other via the bus.

[0031] The memory can be used to store software code related to the control method of the reconfigurable battery network, and the processor can execute the steps of the control method of the reconfigurable battery network in the chip, and can also schedule other units to achieve the corresponding functions.

[0032] In one alternative implementation, the terminal can be a main control chip, microcontroller, or field-programmable gate array deployed in the battery management system.

[0033] With the introduction of the "dual carbon" target, the energy and power industry is facing unprecedented challenges and opportunities. In achieving this target, clean and renewable energy sources, represented by solar and wind power, will play an indispensable and crucial role. However, both wind and solar power are affected by weather, seasonal factors, and other uncertainties, exhibiting significant volatility and randomness. This uncontrollability negatively impacts the stable operation of the power system and the balance between supply and demand. Energy storage technology, with its peak-shaving and valley-filling capabilities, can store excess electricity during periods of wind and solar curtailment and release the stored energy during peak load periods, effectively mitigating the aforementioned problems caused by the large-scale integration of renewable energy sources. This is of great significance for the stable operation of the power grid.

[0034] However, individual battery cells have relatively limited capacity and cannot balance the power deficit in the power grid using a single cell. Therefore, commonly used battery packs consist of a large number of cells connected in series and parallel to ensure that the overall capacity, voltage, and current meet requirements. However, for fixed series and parallel battery packs, the differences between individual cells accumulate over time, causing the worst-performing cell in the pack to reach its charge / discharge cutoff voltage first. This results in the premature end of the charge / discharge process, creating a "bottleneck effect," where the overall performance of the battery pack is limited by the worst-performing cell, and the pack's capacity cannot be effectively utilized.

[0035] Unlike fixed series-parallel connection paradigms, Dynamic Reconfigurable Battery Networks (DRBNs) connect individual battery cells to low-power power electronic switches. Millisecond-level switching alters the connections between battery cells and the reconfigurable network topology to balance the state of charge (SOC) of individual cells and promptly disconnect faulty cells. Regarding output voltage, DRBNs can utilize topology transformations to activate corresponding battery cells to meet demand, stabilizing the output voltage within a specific range and reducing fluctuations. In some applications, DRBNs can even eliminate the need for a DC / DC converter, using dynamic topology changes to meet load-side voltage requirements and further improve battery pack energy efficiency.

[0036] In practical engineering, to meet larger current loads, multiple battery cells are usually connected in parallel via power electronic switches to form a battery pack. In a battery pack containing multiple battery cells, the current flowing through a battery cell is determined not only by the operating state of that battery cell, but also by the operating states of other battery cells in the pack. Similarly, the output voltage of a parallel battery pack varies, with different battery cells corresponding to different terminal voltages.

[0037] DRBN topology reconfiguration includes both series reconfiguration between battery packs and parallel reconfiguration of individual battery cells within a battery pack. Furthermore, the current flowing through each battery cell within the battery pack and its output voltage interact with each other, making existing DRBN control methods difficult to apply directly. Therefore, this application provides a control method for reconfigurable battery networks.

[0038] The reconfigurable battery network is described below.

[0039] like Figure 2 The diagram shown is a topology diagram of a reconfigurable battery network provided in an embodiment of this application.

[0040] The reconfigurable battery network (DRBN) 10 consists of one or more battery packs, each battery pack being composed of multiple battery modules 11 connected in series or parallel. Each battery module 11 contains several individual battery cells 111 and corresponding switching units 112. The switching units include: switching units for activating individual battery cells and switching units for bypassing individual battery cells. The DRBN supplies power to the load 20.

[0041] For example, the total number of battery cells in a reconfigurable battery network DRBN 10 is N.

[0042] Figure 2 A battery pack is shown in the image, but this does not limit the scope of this application.

[0043] Before executing control decisions, sensors are used to collect the state of charge (SOC) and terminal voltage of each battery cell 111 in real time. The state of charge represents the current remaining energy level of the battery cell and is a key indicator for assessing the health of the battery cell and the need for balancing. The terminal voltage directly reflects the electrical response characteristics of the battery cell under the current load current.

[0044] The theoretically possible on / off arrangements of all switching units 112 in the reconfigurable battery network constitute the initial candidate switch state combination space, that is, the candidate switch state combination space includes multiple candidate switch state combinations. A set of candidate switch state combinations is a combination of the on / off states corresponding to all switching units 112 respectively.

[0045] It should be understood that, although Figure 2 A specific parallel battery pack topology is shown, but in other embodiments, the reconfigurable battery network 10 can also adopt other topologies such as cascaded H-bridges and modular multilevel converters, as long as it has the ability to change the battery connection state through switching actions.

[0046] Reference Figure 3 This is a flowchart illustrating a control method for a reconfigurable battery network provided in an embodiment of this application. Figure 3 As shown in the embodiment of this application, a control method for a reconfigurable battery network may include steps S301 to S305, which are described in detail below.

[0047] Step S301: Obtain the current operating state of the reconfigurable battery network and multiple candidate switch state combinations.

[0048] The reconfigurable battery network includes multiple battery modules, each battery module including a battery cell and a switching unit, the candidate switching state combination includes the on / off state of each switching unit in the reconfigurable battery network, and the current operating state includes the state of charge of each battery cell and the terminal voltage of each battery cell.

[0049] Current operating status refers to the information obtained at the current decision-making moment that reflects the operating status of the reconfigurable battery network, including the state of charge of each battery cell and the terminal voltage of each battery cell.

[0050] The state of charge (SOC) of a battery cell represents the remaining charge in that cell. The terminal voltage of a battery cell is the voltage across its terminals.

[0051] At the mathematical level, the above operating state can be formalized as the following state vector: In the formula, This represents the state vector at time t, which characterizes the operational state. Time refers to the discretized decision step, i.e., the time when the data is collected.

[0052] If the current time is time t, then This is a state vector that represents the current running state.

[0053] This represents the set containing the states of charge of each individual battery cell. ; This represents the set of terminal voltages of each individual battery cell. This state vector fully characterizes the electrical features of the reconfigurable battery network at each time step, providing a standardized physical representation for the input of the subsequent joint probability distribution model.

[0054] Accordingly, multiple candidate switch state combinations can be formalized into the following candidate switch state combination space: . Represents the set of candidate switch state combinations at time t; This represents the on / off state of each switching unit in the reconfigurable battery network. The on / off state is a binary variable, with a value of 1 indicating that the corresponding switching unit is turned on to put the associated battery cell into operation, and a value of 0 indicating that the corresponding switching unit is turned off to bypass the associated battery cell.

[0055] The permutations and combinations of the on / off states of all switching units constitute the initial candidate switching state combination space.

[0056] Step S302: Based on the current operating state, select multiple valid switch state combinations that satisfy the physical operating constraints from multiple candidate switch state combinations.

[0057] The physical operational constraints include topology connection constraints and electrical boundary constraints. The topology connection constraints characterize the connection relationship between the battery cell and the switching unit corresponding to the on / off state of each switching unit, indicating that this connection relationship belongs to a preset feasible connection relationship. The preset feasible connection relationships include each battery cell being put into operation or bypassed via its corresponding switching unit, multiple battery cells being connected in parallel to form a battery pack, and each battery pack being connected to the reconfigurable battery network via a switching unit. The electrical boundary constraints refer to the total output voltage of the reconfigurable battery network being within a preset voltage upper and lower limit range, and the terminal voltage of the battery cell in operation not being lower than a preset cutoff discharge voltage, and the state of charge of the battery cell in operation not being lower than a preset cutoff discharge state of charge. The following is in conjunction with... Figure 2 Let's illustrate with examples.

[0058] Combination Figure 2 It can be seen that a battery cell is put into operation through a corresponding switching unit. For example, when the switching unit of a battery cell is turned on, the battery cell can be connected to the reconfigurable battery network and participate in discharge.

[0059] A battery cell is bypassed and disconnected via its corresponding switching unit. For example, if the switching unit of a battery cell is disconnected, the battery cell is disconnected from the reconfigurable battery network and does not participate in the discharge.

[0060] Multiple battery cells are connected in parallel to form a battery pack. For example, multiple battery cells are connected in parallel to form a battery pack by simultaneously turning on their respective switching units.

[0061] Each battery pack is connected to a reconfigurable battery network via a switching unit. For example, one battery pack is connected in series with another battery pack via its switching unit to supply power to the load.

[0062] If a battery cell is neither put into operation nor bypassed, it is not considered a pre-defined feasible connection relationship.

[0063] For example, the preset voltage upper and lower limit range can be [lower voltage limit 8V, upper voltage limit 10V].

[0064] Understandably, candidate switch state combinations that result in the total output voltage falling below the lower voltage limit due to insufficient battery input or exceeding the upper voltage limit due to excessive battery input are eliminated.

[0065] The terminal voltage of a battery cell put into operation must not be lower than the preset cutoff discharge voltage. If the preset cutoff discharge voltage is 2.5V, then a battery cell whose terminal voltage has dropped to 2.4V is in violation of the rules.

[0066] The state of charge (SOC) of a battery cell put into operation must not be lower than the preset cutoff state of charge. If the preset cutoff state of charge is 10%, then a battery cell whose SOC has dropped to 8% is in violation of the rules.

[0067] Assuming the reconfigurable battery network comprises 15 individual battery cells, with every 3 cells connected in parallel to form a battery pack, the total number of candidate switching state combinations is 2. 15 =32768 possibilities. After eliminating some candidate switch state combinations through physical operation constraints, the remaining combinations are the valid switch state combinations. For example, if 3430 valid switch state combinations are obtained, the calculation process for 3430 is as follows: The reconfigurable battery network in the above assumption includes 5 battery packs. Considering the matching relationship between the voltage required by the load and the output voltage when different numbers of battery packs are put into operation, it can be seen that three battery modules working online at the same time can generally meet the voltage required by the load. Therefore, 3 battery packs need to be selected from the 5 battery packs, resulting in 10 selection combinations. For each online battery pack, there can be 1, 2, or 3 battery cells working simultaneously, corresponding to 3, 3, and 1 battery combinations within the battery pack, respectively. Therefore, for an online battery pack, there are 7 combination methods. Considering the above 3 battery packs working online at the same time, there are a total of 10×7×7×7=3430 effective switching state combinations.

[0068] This step is not simply algorithmic optimization and pruning, but rather embedding the safe operating boundaries of the physical system into the decision space upfront, forming a physical-level feasibility pruning. Topology connectivity constraints ensure that the generated effective switching state combinations are legal in terms of circuit structure. For example, it avoids the risk of short circuits caused by the shoot-through of the upper and lower tubes on the same branch, or avoids bus open circuit faults caused by the disconnection of all parallel branches. It ensures that individual battery cells can be correctly put into operation or bypassed through the switching unit, and that multiple battery cells can stably form a battery pack and be connected to the network.

[0069] Electrical boundary constraints further incorporate real-time operational data to eliminate combinations that, while topologically valid, could degrade system performance or damage batteries. For example, if a candidate switch state combination causes the total output voltage to exceed the preset upper and lower voltage limits allowed by the load 20, or forces a low-SOC or low-voltage battery cell 111 to continue discharging, thus triggering over-discharge protection, then that candidate switch state combination will be deemed invalid.

[0070] Step S303: Based on the current running state and the pre-built joint probability distribution model, obtain the sampling probabilities corresponding to the multiple effective switch state combinations respectively; the number of neurons in the output layer of the joint probability distribution model is the same as the number of multiple effective switch state combinations, and each neuron is associated with one effective switch state combination.

[0071] The sampling probability of a valid switch state combination refers to the probability output by the joint probability distribution model that each valid switch state combination is selected through sampling.

[0072] The joint probability distribution model is configured to model the entire space of valid switch-state combinations after physical filtering.

[0073] Unlike traditional methods that calculate the probability independently for each switching unit, the neurons in the output layer of the joint probability distribution model in this embodiment have a one-to-one mapping relationship with the effective switching state combinations. This means that the neurons in the output layer do not represent the on / off tendency of a single switching unit, but rather a complete, physically verified system-level topology configuration scheme.

[0074] This structural design enables the joint probability distribution model to capture the strong coupling relationships between the operating states of individual cells within the reconfigurable battery network, because any effective combination of switching states is the result of comprehensively considering all constraints. When the current operating state is input, the joint probability distribution model outputs a set of probability distributions for all effective combinations of switching states, rather than independent marginal probabilities.

[0075] Step S304: Sample from multiple valid switch state combinations according to the sampling probability to obtain the target switch state combination.

[0076] Step S304 is to randomly select a valid switch state combination from multiple valid switch state combinations according to the sampling probability.

[0077] Since the sampling space has been limited to multiple valid switch state combinations, the target switch state combination obtained will necessarily satisfy the physical operation constraints, regardless of the sampling results.

[0078] Step S305: Control the on / off state of each switching unit in the reconfigurable battery network based on the target switching state combination.

[0079] The target switching state combination is parsed into specific driving signals and sent to each switching unit 112 in the reconfigurable battery network 10 to drive them to perform corresponding on or off actions, thereby dynamically adjusting the topology of the reconfigurable battery network so that the total output voltage of the reconfigurable battery network and the state of charge distribution of the battery cells tend to the expected control target.

[0080] In actual implementation, dead time settings or soft-start logic can also be added to prevent the switching transient process from impacting individual battery cells or loads.

[0081] This application provides a control method for a reconfigurable battery network. It obtains the current operating state of the reconfigurable battery network and multiple candidate switch state combinations. Based on the current operating state, it selects multiple valid switch state combinations that satisfy physical operating constraints from the candidate combinations, directly embedding these physical operating constraints into the action space construction process. This fundamentally eliminates invalid actions that may lead to reconfigurable battery network failure or performance degradation. Simultaneously, a joint probability distribution model is used to model and sample the valid switch state combinations as a whole, replacing the traditional method of independently sampling each switch unit. This fully considers the electrical coupling relationship between the operating states of individual battery cells within the reconfigurable battery network. Therefore, the sampling probabilities corresponding to the multiple valid switch state combinations accurately reflect the quality of each valid switch state combination under the current operating state. The target switch state combinations obtained based on the sampling probabilities always belong to legal combinations that satisfy physical operating constraints, effectively preventing illegal combinations that violate physical operating constraints from entering the control loop. This method can improve the output voltage quality and state-of-charge balance of the reconfigurable battery network while satisfying hard constraints such as voltage stability and prevention of over-discharge, achieving a deep integration of algorithm optimization and physical system characteristics.

[0082] The structure of the joint probability distribution model is described below. In one optional implementation, the joint probability distribution model is a class distribution model.

[0083] like Figure 4 The diagram shown is a schematic of the category distribution model provided in an embodiment of this application.

[0084] The category distribution model includes: an input layer 31, in which the number of neurons is consistent with the dimension of the current running state; a hidden layer 32; an output layer 33, in which the number of neurons is consistent with the number of multiple effective switch state combinations, with each neuron associated with one effective switch state combination; and a normalization layer 34.

[0085] like Figure 4 As shown, the category distribution model adopts a four-layer neural network architecture.

[0086] The input layer 31 serves as the interaction interface, and the number of its neurons is configured to strictly correspond to the dimension of the current operating state. For example, if the current operating state consists of the state of charge of N battery cells and the terminal voltage of N battery cells, then the input layer 31 contains 2N neurons, each receiving the corresponding physical quantity value.

[0087] This dimensional binding ensures that the category distribution model can perceive the real-time electrical characteristics of the reconfigurable battery network without loss. Hidden layer 32 is located between input layer 31 and output layer 33. It performs deep transformation and abstraction of the input features through a nonlinear activation function, aiming to uncover the implicit electrical coupling relationships and dynamic evolution laws between battery cells, and map the current operating state into a high-dimensional policy feature representation.

[0088] For example, the neurons in hidden layer 32 are Tanh neurons.

[0089] The number of neurons in output layer 33 is set to match the number of valid switch state combinations selected in step S301, and each neuron is uniquely associated with one valid switch state combination. This means that the i-th neuron in the output layer does not represent the independent on / off probability of the i-th switching unit, but rather the tendency for the i-th physically verified overall topology configuration to be selected. This design fundamentally changes the way the action space is modeled: traditional methods usually assume that each control dimension is independent of each other, while this embodiment, by mapping the neurons of output layer 33 one-to-one with valid switch state combinations, forces the joint probability distribution model to directly learn the value assessment at the level of valid switch state combinations during training, thereby internalizing the topological connection constraints and electrical boundary constraints within the reconfigurable battery network into the structural priors of the joint probability distribution model.

[0090] For example, the neurons in the output layer 33 can be linear neurons.

[0091] When the joint probability distribution model converges, the real vector output by output layer 33 is actually an unnormalized score of all valid switching state combinations. Mathematically, the joint probability distribution model in this embodiment uses a class distribution to model the joint probability of valid switching state combinations, and its policy distribution can be expressed as: .

[0092] The above formula is used to model the joint probability of the operating states of individual cells in a reconfigurable battery network through class distribution within the improved Proximal Policy Optimization (PPO) framework. Where: In the state vector The following effective switching state combination is adopted. The strategy probability distribution; This represents the class distribution with a real vector z as a parameter; z is the length of the output layer 33. A real vector, where The total number of valid switching state combinations after physical constraint screening represents the total number of such combinations. Each element in the real vector corresponds to the unnormalized score of a valid switching state combination. The categorical distribution does not independently model the on / off states of each switching unit, but rather performs a joint probability representation of all valid switching state combinations, thereby internalizing the electrical coupling relationship between battery cells into the structural prior of the joint probability distribution model.

[0093] Normalization layer 34 follows output layer 33 and is used to convert the real-valued vector output by output layer 33 into a standard probability distribution. In a specific implementation, normalization layer 34 can be implemented using the Softmax function, mapping any real-valued vector to a probability value in the interval (0,1). It also ensures that the sum of the sampled probabilities corresponding to all valid switch state combinations is 1.

[0094] Specifically, the sampling probability corresponding to each effective switch state combination can be calculated using the following formula: .

[0095] The above formula is used to calculate the probability of a specific valid switch state combination being selected under a category distribution. Where: u(t) represents the valid switch state combination at time t, u... i This represents the i-th specific effective combination of switch states.

[0096] In the formula, z represents the probability that the i-th valid switch state combination is selected as the target switch state combination; i The output of output layer 33 is the real value corresponding to the i-th valid switch state combination; the denominator is the sum of the exponents of the real values ​​corresponding to all valid switch state combinations.

[0097] For example, the formula uses the Softmax function to transform the real-valued vector of the output layer into a probability distribution of each effective switch state combination, such that the sum of the probability values ​​is 1 and each probability value is positive. This process not only satisfies the mathematical requirements of probability sampling, but also makes the probability values ​​output by the joint probability distribution model have clear physical interpretability, that is, it reflects the ranking of the superiority or inferiority of each effective topology scheme relative to each other under the current operating state.

[0098] To more clearly illustrate the technical advantages of this embodiment, the following explanation uses the joint probability distribution model as a multi-Bernoulli distribution model. Figure 5 The diagram shown is a schematic representation of the multiple Bernoulli distribution model provided in an embodiment of this application. (In conjunction with...) Figure 4 and Figure 5 Comparative analysis reveals the advantages of this embodiment.

[0099] exist Figure 5 In the traditional structure shown, each neuron in the output layer, such as a Sigmoid neuron, corresponds to a single switch unit, and the on / off probability of that switch unit is independently output through the Sigmoid function. The policy distribution of this method can be represented as: This formula is used to express the modeling of a joint probability distribution using multiple Bernoulli distributions. Where π... θ (a t |s t ) represents the current running state s t The following is an effective switching state combination a t The policy probability, B(p) i (s t )) represents the Bernoulli distribution of the conduction state of the i-th switch unit, p i (s t ) represents the probability that the i-th switching unit is turned on so that its associated battery cell is put into operation, and N is the total number of battery cells.

[0100] Accordingly, the on / off state of the i-th switch unit follows the following Bernoulli probability distribution: .

[0101] in, This represents the probability that the i-th switching unit will turn on, causing its associated battery cell to operate. This probability is obtained by inputting the current operating state (the state of charge and terminal voltage of each battery cell) into the neural network and then passing it through the Sigmoid activation function. .

[0102] The above formula is used to calculate the conduction probability of the switching units in the output layer of a neural network. Where: s t The current running state is represented by θ, which represents the network parameters, and W... s b represents the weights of the output layer. s The output layer is biased, and Sigmoid(·) is the Sigmoid activation function.

[0103] In the formula, f(s) t The hidden layer contains latent features obtained from the current running state. .

[0104] The above formula is used for calculation Figure 5 The output features of the last hidden layer of the neural network shown are given. Where f(s) t ) represents the latent features output by the hidden layer, ReLU is the activation function, and W is the latent feature output by the hidden layer. J The weight of the last hidden layer, v J (s t ) represents the output value of the Jth hidden layer, b JThis is the bias for the last hidden layer.

[0105] in, Let be the output value of the j-th hidden layer. The output values ​​of each hidden layer in the neural network are calculated recursively as follows: .

[0106] The above formula is used for calculation Figure 5 The output values ​​of each hidden layer in the neural network. j (s t ) represents the output value of the j-th hidden layer, s t The current running state is represented by j, where j is the hidden layer index, J is the total number of hidden layers, ReLU(·) is the ReLU activation function, and W is the hidden layer index. j-1 Let b be the weight matrix from layer (j-1) to layer j. j-1 This is the bias vector from layer (j-1) to layer j.

[0107] Neural networks employing multiple Bernoulli distributions possess strong generalization capabilities and computational efficiency, enabling independent evaluation of the on / off states of each switching unit in candidate switch state combinations and adjusting the conduction probability of each switching unit accordingly. However, the multiple Bernoulli distribution requires the assumption that the on / off states of each switching unit are mutually independent. This approach implicitly assumes strong independence between switching actions, neglecting the electrical coupling effects caused by the series-parallel connections of individual battery cells in a reconfigurable battery network. In practical applications, this independence assumption can easily lead to the sampled target switch state combinations violating physical constraints (such as causing short circuits, open circuits, or over-discharge), generating a large number of invalid or even dangerous actions, severely reducing training efficiency and control safety.

[0108] In contrast, the category distribution model used in this embodiment performs joint probability modeling on all valid switch state combinations, completely eliminating the possibility of generating illegal actions. This structural improvement allows the reinforcement learning agent to avoid spending a large number of rounds exploring and learning action regions that are inherently infeasible, thereby improving sample utilization and policy convergence speed, while ensuring the physical security and robustness of the control policy at the architectural level.

[0109] It should be understood that although this embodiment uses a category distribution model as an example for detailed explanation, in other embodiments, as long as the joint probability distribution model can meet the requirements that the output dimension is consistent with the number of effective combinations and can perform probability modeling on the overall combination, other equivalent probability distribution forms or network variants can also be used to achieve the same technical effect.

[0110] In an alternative implementation, this application further includes steps A1 to A7.

[0111] Step A1: Determine the battery cells to be put into operation based on the target switch state combination.

[0112] Step A2: Based on the current operating state and the battery cells in operation, determine the total output voltage of the reconfigurable battery network, as well as the terminal voltage and state of charge of each of the battery cells in operation.

[0113] Because reconfigurable battery networks have dynamic topology characteristics, not all battery cells are operational at every moment. Therefore, it is first necessary to analyze the set of battery cells 111 that are actually connected to the circuit and participating in energy transfer at the current moment, based on the determined target switching state combination. Subsequently, based on the real-time terminal voltage and state of charge of these operational battery cells 111, the current total output voltage of the reconfigurable battery network is calculated. This calculation logic, which only targets "operational" battery cells, ensures that subsequent optimization evaluations accurately point to the physical entities that are currently performing work, avoiding invalid evaluations of battery cells in bypass or disconnected states, thereby improving the targeting and computational efficiency of the control strategy.

[0114] Step A3: Determine a voltage stability bonus based on the deviation between the total output voltage and the preset reference voltage. The voltage stability bonus takes the maximum value when the deviation between the total output voltage and the preset reference voltage is the minimum, and takes a negative value when the total output voltage exceeds the preset voltage upper and lower limit range.

[0115] The voltage stability reward reflects the ability of the reconfigurable battery network 10 to guarantee the power quality of the load 20. The preset reference voltage is usually set to the rated operating voltage or expected voltage value of the load 20. When the total output voltage accurately tracks the preset reference voltage, it indicates that the current topology configuration of the reconfigurable battery network perfectly matches the load demand, and at this time, the maximum positive incentive is given; as the deviation increases, the reward value gradually decays, guiding the joint probability distribution model to actively search for effective switching state combinations that can reduce voltage fluctuations; once the total output voltage exceeds the preset voltage upper and lower limits, it means that the power quality has seriously deteriorated or may even damage the load, and at this time, a negative penalty is directly applied.

[0116] This segmented feedback mechanism transforms the abstract "voltage quality" into a gradient signal that the algorithm can perceive, driving the joint probability distribution model to converge toward voltage stabilization.

[0117] Step A4: Based on the sum of the deviations between the state of charge (SOC) of each of the battery cells put into operation and the average SOC, determine the SOC balance reward item, where the average SOC is the mean of the SOC of each of the battery cells put into operation.

[0118] The State of Charge (SOC) balancing reward aims to address consistency issues within the battery pack, preventing the "bottleneck effect" caused by over-discharging or overcharging of individual cells. The SOC balancing reward focuses on the SOC differences among currently operating cells. By calculating the cumulative deviation of the SOC of each operating cell from its mean, the degree of balance in the current topology can be quantified. The smaller the sum of deviations (ideally approaching zero), the better the energy consumption synchronization of the discharging cells, and the higher the reward value; conversely, if the SOC of some cells is significantly lower or higher than the average level, the reward value decreases. This design guides the control strategy to prioritize effective switching state combinations that bring the SOC of cells within the working group closer to uniformity while meeting voltage requirements, thereby extending the overall lifespan and available capacity of the reconfigurable battery network.

[0119] Step A5: If there is a first battery cell among the battery cells put into operation with a terminal voltage lower than the preset cutoff discharge voltage, determine the over-discharge voltage penalty term. The value of the over-discharge voltage penalty term is related to the total number of the first battery cells, and the over-discharge voltage penalty term is negative.

[0120] Step A6: If there is a second battery cell among the battery cells put into operation with a state of charge lower than the preset cutoff state of charge, determine an over-discharge state of charge penalty term. The value of the over-discharge state of charge penalty term is related to the total number of the second battery cells and the over-discharge state of charge penalty term is negative.

[0121] To ensure the safe operation of the reconfigurable battery network, the reward function also introduces a soft penalty mechanism for hard constraints.

[0122] These two penalty terms constitute the bottom-line defense for the safe operation of a single battery cell. The preset discharge cutoff voltage and preset discharge cutoff state are the physical limits to which a single battery cell can discharge; exceeding these limits will lead to irreversible chemical damage or even thermal runaway. In a reinforcement learning framework, directly setting such states as "termination conditions" may result in training interruption or wasted samples; therefore, this embodiment transforms them into negative rewards related to the degree of violation.

[0123] The more non-compliant battery cells there are, the greater the absolute value of the penalty, thus creating a strong repulsive force field in the objective function. This mechanism forces the joint probability distribution model to learn to avoid any candidate switching state combinations that may lead to over-discharge during the exploration process, internalizing safety constraints as prior knowledge for policy generation, rather than simply relying on external protection circuits for ex-post disconnection.

[0124] For example, the objective function includes: .

[0125] In the formula Let be the deviation vector between the state of charge of each individual battery cell and the average state of charge at time k. , This represents the average state of charge (SOC) of each battery module in the battery pack. Given an n-row, n-column matrix where all elements are 1, It is an n-dimensional identity matrix. For weighted matrices, The smaller this value, the more consistent the state of charge among the individual battery cells.

[0126] Step A7: The voltage stability reward, the state of charge balance reward, the over-discharge voltage penalty, and the over-discharge state of charge penalty are weighted and summed according to preset weights to obtain the reward value.

[0127] Its mathematical expression is In the formula Let be the reward value at time t. to To preset weights, For voltage stability bonus items, This is a state-of-charge equilibrium reward item. This is an over-discharge voltage penalty term. This is a penalty for over-discharged states.

[0128] Preset weights (e.g.) to The weighted sum represents the priority ranking of different control objectives in the current application scenario. For example, in the scenario of powering precision instruments with extremely high voltage sensitivity, the weight of the voltage stability reward can be increased; while in the scenario of energy storage power stations that pursue long lifespan, the proportion of the state-of-charge balance reward can be appropriately increased. Through weighted summation, multiple physical objectives that were originally independent or even potentially conflicting are unified into a single scalar feedback signal. This reward value serves as an immediate evaluation of the agent's behavior by the environment, directly guiding the parameter updates of the joint probability distribution model. This allows the model to continuously iterate and optimize along the direction of "maximizing overall benefits," ultimately forming a control strategy that takes into account voltage quality, battery balance, and safety constraints, completing a closed loop from physical perception to decision optimization.

[0129] In an optional implementation, to achieve continuous optimization of the joint probability distribution model, the control method also includes a policy update mechanism. Specifically, this includes steps B01 to B07.

[0130] Step B01: Input the current running state and the running state at the next moment into the value network to obtain the current state value estimate and the next moment state value estimate.

[0131] The operating state at the next moment is the operating state of the reconfigurable battery network collected at the next moment after the current moment.

[0132] The value network is a neural network trained in pairs with a joint probability distribution model. It takes the current operating state as input and outputs a state value estimate. It is used to evaluate the quality of the state, calculate the timing difference error and the advantage function estimate during the training phase, but does not participate in the switching control decision.

[0133] The current state value estimate is the value assessment of the output of the current operating state by the value network, that is, the cumulative discount reward expected to be obtained from the current operating state and the current strategy.

[0134] Value networks are used to evaluate the long-term cumulative benefits of reconfigurable battery networks under specific operating conditions. Their output state value estimates reflect the potential of the reconfigurable battery network to maintain voltage stability and state-of-charge equilibrium under the current operating state. By introducing an assessment of the state at the next moment, trend information in the dynamic evolution of the reconfigurable battery network can be captured, rather than relying solely on instantaneous physical feedback.

[0135] Step B02: Calculate the time-series difference error based on the reward value, the preset discount factor, the current state value estimate, and the state value estimate at the next moment.

[0136] The reward value is a comprehensive score calculated based on the operating results of the target switch state combination applied to the reconfigurable battery network.

[0137] The preset discount factor is a pre-defined coefficient used to discount future rewards, such as 0.99, reflecting the relative importance of future rewards compared to current rewards.

[0138] In battery control scenarios, timing differential error quantifies the extent to which the current topology decision is achieved relative to the value network's expectations. For example, if a target switching state combination switch improves voltage stability without triggering any penalty, the timing differential error is positive, indicating that the value network underestimated the value of that state; otherwise, it is negative.

[0139] The preset discount factor is used to weigh the importance of immediate and long-term benefits, ensuring that the control strategy, i.e. the target switching state combination, does not sacrifice the long-term health of the battery for short-term voltage targets.

[0140] Step B03: Weight the timing difference error according to the preset discount factor and the preset generalized advantage estimation parameter to obtain the advantage function estimate of the target switching state combination.

[0141] The preset generalized dominance estimation parameter is a pre-defined generalized dominance estimation parameter such as 0.95, which is used to control the weight decay when weighted summing of multi-step time series difference errors, and to balance the estimation bias and variance.

[0142] The advantage function estimate represents the degree to which the target switching state combination is better or worse than the average level of the current strategy under the corresponding operating state. A positive value indicates that it is better than the average level, and a negative value indicates that it is worse than the average level.

[0143] Generalized Advantage Estimation (GAE) achieves a balance between the bias and variance of the advantage function estimation by introducing pre-defined generalized advantage estimation parameters.

[0144] In the control of reconfigurable battery networks, the impact of a single action often exhibits lag and diffusion due to the electrical coupling effect between individual battery cells. The GAE mechanism, by exponentially weighting the accumulation of multi-step time-series differential errors, can more smoothly and accurately attribute the true contribution of specific target switching state combinations, avoiding misjudgments of policy update direction caused by sensor noise or instantaneous load disturbances, thereby improving the stability of the training process.

[0145] Step B04: For each effective switch state combination, obtain the sampling probability of the joint probability distribution model outputting the effective switch state combination under the current parameters and the parameters before the update, and determine the ratio of the two as the importance sampling ratio.

[0146] Importance sampling ratio is used to measure the magnitude of policy change caused by parameter updates in a joint probability distribution model.

[0147] Importance sampling allows for updating the current strategy (target switch state combination) by utilizing the sampling probabilities corresponding to multiple valid switch state combinations from historical operating states, significantly improving sample utilization efficiency. This is particularly important for reconfigurable battery networks, as each interaction with the physical environment involves an actual charging and discharging process, resulting in high data acquisition costs. Through importance sampling ratios, it is possible to correct weight biases in old data under a new strategy without re-exploring all operating states.

[0148] Step B05: Trim the importance sampling ratios corresponding to the multiple valid switch state combinations to a preset trimming interval to obtain the trimmed importance sampling ratios.

[0149] The preset clipping interval is the range of values ​​allowed for the importance sampling ratio, such as [1-ε, 1+ε], where ε is the clipping coefficient used to limit the magnitude of a single parameter update.

[0150] To prevent system performance from crashing due to excessively large policy updates, the importance sampling ratios corresponding to multiple valid switch state combinations are clipped to a preset clipping range, resulting in clipped importance sampling ratios. This step is a key safeguard for ensuring control security in this application.

[0151] In reinforcement learning training, if the new target switch state combination differs too much from the old target switch state combination, it may cause the joint probability distribution model to output an extreme probability distribution, thereby driving the reconfigurable battery network into an unrecoverable dangerous state such as over-discharge or short circuit. By limiting the importance sampling ratio to a preset pruning interval such as [0.8, 1.2], a hard constraint is essentially imposed on the step size of policy updates, ensuring that each parameter adjustment is conservative and controllable, and avoiding catastrophic forgetting or policy divergence during training.

[0152] Step B06: Construct a pruning surrogate objective function based on the product of the pruned importance sampling ratio and the estimated value of the dominance function.

[0153] The objective function for pruning agents typically takes the minimum of the unpruned importance sampling ratio and the pruned importance sampling ratio. This pessimistic lower bound design further ensures that policy updates are only performed within a credible range. When the dominance function estimate is positive, the probability of the action is increased only if the importance sampling ratio does not exceed the upper limit; when the dominance function estimate is negative, the probability of the action is decreased only if the importance sampling ratio does not fall below the lower limit. This mechanism ensures that the joint probability distribution model will only robustly move towards the high-reward region, and will not become blindly aggressive due to occasional abnormally high rewards.

[0154] Step B07: Update the current parameters of the joint probability distribution model according to the pruning agent objective function.

[0155] By maximizing the pruning surrogate objective function using the gradient ascent method, the parameters of the joint probability distribution model, such as the class distribution model, can be iteratively optimized.

[0156] This update process causes the sampling probability distribution output by the joint probability distribution model to gradually shift towards effective switching state combinations that can bring higher voltage stability rewards, better state-of-charge balancing effects, and strict adherence to safety constraints.

[0157] It should be understood that although this embodiment uses the core logic of the near-end policy optimization algorithm as an example for explanation, in other embodiments, other reinforcement learning algorithms with similar policy constraint mechanisms can also be used to update the parameters of the joint probability distribution model, as long as they can ensure the training safety and convergence stability of the control policy of the reconfigurable battery network by limiting the update step size.

[0158] In an alternative implementation, step A3 includes steps A31 to A32.

[0159] Step A31: If the total output voltage is within the preset voltage upper and lower limit range, the voltage stability bonus is calculated using the absolute value of the deviation between the total output voltage and the preset reference voltage as the independent variable and a preset exponential decay function.

[0160] Step A32: If the total output voltage exceeds the preset voltage upper and lower limit range, a fixed negative value will be used as the voltage stability reward.

[0161] Specifically, this calculation logic can be expressed by the following formula: .

[0162] In the formula, This represents the voltage stability reward at time t; This represents the total output voltage of the reconfigurable battery network at time t, in volts (V). The preset reference voltage at time t represents the expected operating voltage of the load, and the unit is volts (V). and These represent the lower and upper limits of the preset voltage range, respectively, in volts (V). This represents the voltage deviation coefficient, a dimensionless positive real number used to adjust the sensitivity of the bonus value to voltage deviation.

[0163] From a physical perspective, when the total output voltage is within the safe range, the exponential decay function can construct a smooth and non-linear optimization gradient: the smaller the deviation, the closer the exponential term is to 0, and the reward value is close to the maximum value of 1, thereby encouraging the model to continuously approach the reference voltage; once the voltage exceeds the limit, the reward value drops directly to a fixed negative value of -1. This cliff-like penalty mechanism conveys a clear safety boundary signal to the model, forcing the strategy to quickly leave the danger zone.

[0164] It should be understood that although this embodiment uses an exponential decay function, in other embodiments, a continuous function with similar characteristics of "optimal at the center and decreasing at the edges" such as a quadratic function or a Gaussian function can be used instead, as long as it can correctly reflect the monotonic mapping relationship between voltage quality and reward value.

[0165] In an alternative implementation, step A4 includes steps A41 to A42.

[0166] Step A41: Obtain a state of charge deviation vector that includes the difference between the state of charge of each of the battery cells put into operation and the average state of charge.

[0167] Step A42: Perform an inner product operation on the state of charge deviation vector and the input operation state vector representing the target switch state combination to obtain the state of charge balance reward item.

[0168] Specifically, this calculation logic can be expressed by the following formula: .

[0169] In the formula, Represents the state-of-charge equilibrium reward at time t; This indicates that all individual battery cells are included at time [time]. The charge state vector of the charged state; This represents the average state-of-charge vector of all individual battery cells at time t; This represents the operational state vector characterizing the target switch state combination, where the i-th element... A value of 1 indicates that the corresponding battery cell is in operation, and a value of 0 indicates that it has been bypassed; the superscript T indicates vector transpose operation.

[0170] The core of this formula lies in the physical filtering mechanism of the vector inner product operation: because In this design, only the cells currently in operation are assigned a value of 1, while the rest are assigned a value of 0. Therefore, the inner product result only accumulates the SOC deviation of the "working" cell cells. This design cleverly solves the equilibrium evaluation problem under dynamic topology, meaning that for cell cells that have been bypassed, no matter how far their SOC deviates from the mean, it will not affect the current equilibrium reward. This guides the joint probability distribution model to focus its optimization efforts on the battery packs currently participating in energy transfer, prioritizing the equilibrium of the state of charge of the cells already in operation, thus avoiding resource waste and policy oscillations caused by ineffective equilibrium calculations for offline cell cells.

[0171] In an optional implementation, step A5 includes the following steps: using the negative of the difference between the terminal voltage of each of the battery cells put into operation and the preset cutoff discharge voltage as the independent variable of the unit step function, and determining the sum of the negative values ​​of the output value of the unit step function as the over-discharge voltage penalty term; wherein, the unit step function outputs 1 when the independent variable is greater than or equal to zero, and outputs 0 when the independent variable is less than zero.

[0172] Specifically, this calculation logic can be expressed by the following formula: .

[0173] In the formula, The term represents the over-discharge voltage penalty at time t; N represents the total number of battery cells. This represents the terminal voltage of the i-th battery cell at time t, in volts (V). H(x) represents the preset cutoff discharge voltage, which is the minimum safe voltage threshold at which the battery is allowed to discharge, expressed in volts (V); H(x) represents the unit step function. This formula utilizes the jump characteristics of the unit step function to achieve binary triggering for violation detection: when the terminal voltage of a certain battery cell... Below the preset cutoff discharge voltage When the difference is negative, taking the opposite number makes it positive, satisfying the condition H(x)=1, thus contributing a penalty value of -1 to the summation; conversely, if the voltage is normal, it contributes 0. This logic of accumulating negative values ​​means that the penalty intensity is proportional to the number of non-compliant battery cells. The more non-compliant battery cells, the heavier the total penalty, thus forming a strong negative feedback field during training, driving the model to actively avoid any topological combinations that may lead to over-discharge of individual cells.

[0174] In an optional implementation, step A6 includes the following steps: using the negative of the difference between the state of charge of each of the battery cells put into operation and the preset cutoff state of charge as the independent variable of the unit step function, and determining the sum of the negative values ​​of the output value of the unit step function as the over-discharge state of charge penalty term; wherein, the unit step function outputs 1 when the independent variable is greater than or equal to zero, and outputs 0 when the independent variable is less than zero.

[0175] Specifically, this calculation logic can be expressed by the following formula: .

[0176] In the formula, This represents the over-discharge penalty term at time t; This represents the state of charge of the i-th battery cell at time t; This represents the preset cutoff state of charge, i.e., the minimum SOC threshold at which a single battery cell is allowed to discharge, typically a dimensionless value between 0.1 and 0.2. The calculation mechanism of this formula is completely symmetrical to the over-discharge voltage penalty term, the only difference being that the battery cell transitions from the electrical terminal voltage to the chemical state of charge.

[0177] Through a dual over-discharge penalty mechanism, this embodiment constructs a three-dimensional protection network for battery cell safety from the two dimensions of voltage and capacity, ensuring that the joint probability distribution model always prioritizes the physical health constraints of battery cells during the learning of the optimal control strategy.

[0178] It should be noted that the unit step function in the above formula is only one optional trigger function implementation. In other embodiments, functions with similar monotonic threshold characteristics, such as the Sigmoid function or the ReLU function, can also be used to implement the softened over-release penalty to meet the gradient continuity requirements of different training stages.

[0179] To verify the beneficial effects of the control method for the reconfigurable battery network provided in the foregoing embodiments of this application, this embodiment constructs a specific simulation application scenario for testing.

[0180] In this scenario, the reconfigurable battery network 10 contains 15 individual battery cells, i.e., N=15, which are organized into 5 parallel battery packs, i.e., n m =5, each battery pack contains 3 parallel branches. The rated operating voltage setting for a load of 20 is u. L The voltage is 9V, and the allowed preset voltage upper and lower limits are the lower limit of the load voltage u. min 8V, upper limit of load voltage u max 10V, constant load current i L It is 60A.

[0181] The joint probability distribution model uses a four-layer fully connected neural network structure, such as... Figure 4 As shown, the input layer has 30 neurons, corresponding to the state of charge and terminal voltage of 15 battery cells. The hidden layer has 128 neurons, and the output layer has 3430 neurons, which is the same as the number of valid switching state combinations after physical constraint filtering. The activation function of the hidden layer is the Tanh function, and the Adam optimizer is used to update the network parameters.

[0182] The preset discount factor γ was set to 0.99, the preset generalized advantage estimation parameter λ was set to 0.95, the batch size was 256, and the total training timesteps were 4 × 10⁻⁶. 6 The training iterations are set to a maximum of 500 training episodes and a buffer size of 6144. The learning rate for all parameters of the joint probability distribution model is set to α. actor =3×10 -4 The learning rate for all parameters of the value network is set to α. critic =3×10 -4 The entropy regularization coefficient ent-coef is set to 0.01, the activation function of the hidden layer is the Tanh function, and the Adam optimizer is used to update the network parameters.

[0183] The value network has 30 neurons in the input layer, corresponding to the state of charge and terminal voltage of 15 individual battery cells, 128 neurons in the hidden layer, and 1 neuron in the output layer. The activation function of the hidden layer is the Tanh function, and the network parameters are updated using the Adam optimizer.

[0184] It should be understood that the above parameters are only exemplary settings, and can be adaptively adjusted according to the battery network size, load characteristics and computing resources in actual applications.

[0185] like Figure 6 As shown, the curves illustrating the variation of average reward with training rounds under different algorithms are presented. Figure 6 The horizontal axis represents the number of training rounds, and the vertical axis represents the average reward value.

[0186] Combination Figure 6 It can be seen that the improved proximal policy optimization algorithm (denoted as PPO) using the method proposed in this application... The algorithm essentially converges after approximately 170 training epochs, and its average reward after convergence is significantly higher than that of the original Proximal Policy Optimization (PPO) algorithm and the Advantage Actor-Critic (A2C) algorithm. In contrast, while the original PPO algorithm eventually converges, its initial reward is extremely low (approximately -4.8 × 10⁻⁶). 5 It wasn't until about 200 rounds that they gradually caught up with PPO. The A2C algorithm has the slowest convergence speed and a significantly lower final reward value. This significant improvement in convergence speed is essentially due to the physical feasibility trimming of the action space based on topological connectivity constraints and electrical boundary constraints in this application.

[0187] By eliminating a large number of invalid switch combinations that violate circuit principles or safety boundaries, the joint probability distribution model does not need to blindly explore a huge space of invalid actions, thus concentrating the limited training samples in a physically meaningful feasible region, which greatly improves the efficiency of sample utilization and the speed of strategy optimization.

[0188] like Figure 7 As shown, the total output voltage comparison curves of the reconfigurable battery network 10 under different algorithm control are illustrated. Among them, Figure 7 (a) corresponds to PPO of this application method, Figure 7 (b) corresponds to the original PPO method. Figure 7 (c) corresponds to the A2C method. Figure 7 (d) corresponds to the Particle Swarm Optimization (PSO) algorithm.

[0189] from Figure 7 It can be clearly observed that in the proposed PPO Under method control, total output voltage The voltage consistently remains stable within the safe range of 8V to 10V, closely fluctuating around the 9V reference voltage, demonstrating excellent voltage regulation performance. In contrast, the A2C and PSO methods frequently exhibit spikes and troughs in the total output voltage, exceeding the upper limit or falling below the lower limit, severely violating electrical boundary constraints. While the original PPO method maintains the voltage within the safe range for most of the time, it still occasionally touches or even slightly exceeds the lower limit. This comparative result strongly demonstrates the technical value of embedding physical operating constraints into the construction process of multiple valid switch state combinations in this application: because multiple valid switch state combinations are restricted to satisfying physical operating constraints, regardless of how the strategy explores, the generated target switch state combination guarantees the safety of the voltage output, fundamentally eliminating the risk of voltage exceeding limits caused by random algorithm exploration, and achieving a deep integration of algorithm optimization and physical safety.

[0190] like Figure 8 and Figure 9 As shown, the effect of different algorithms on the balancing of the state of charge of individual battery cells is further demonstrated. Figure 8 (a) and Figure 8 (b) shows PPO respectively The state-of-charge (POC) change curves of 15 individual cells under the original PPO method. Figure 9 (c) and Figure 9 Figure (d) shows the corresponding curves under the A2C and PSO methods, respectively. The degree of state of charge equilibrium is quantitatively evaluated using the SOC variance index.

[0191] The 15 battery cells are battery cell B1, battery cell B2, battery cell B3, battery cell B4, battery cell B5, battery cell B6, battery cell B7, battery cell B8, battery cell B9, battery cell B10, battery cell B11, battery cell B12, battery cell B13, battery cell B14, and battery cell B15.

[0192] The colors of the state-of-charge curves of the 15 individual cells are as follows: Figure 8 and Figure 9 As shown.

[0193] Each of the 15 battery cells corresponds to the same preset cutoff state of charge (SOC). off .

[0194] Under initial operating conditions, the battery pack's state-of-charge variance (var) was 0.01756, and the maximum deviation (Δsoc) was 0.380. After prolonged operation, at PPO... Under the control of the method, the variance of the state of charge decreased to 0.00080582, and the maximum deviation decreased to 0.121, showing the best balancing effect. Although the original PPO method showed some improvement, the variance was still 0.00320200, and the maximum deviation was 0.239. The balancing effects of the A2C and PSO methods were relatively poor, with variances of 0.00185732 and 0.00343529, respectively.

[0195] This improved performance is attributed to the category distribution model used in this application, which enables joint probabilistic modeling of effective switching state combinations, fully considering the electrical coupling relationships between the operating states of individual battery cells within the parallel battery pack. Compared to traditional methods that neglect coupling due to independent modeling of individual switching cells, the joint probability distribution model can more accurately assess the impact of the overall topology configuration on balance. Combined with the precise guidance of the state-of-charge (POC) balance reward term, the control strategy can proactively select topology combinations that help reduce energy differences among batteries within the working group, thereby achieving consistent battery pack management while ensuring power supply quality.

[0196] Table 1 below summarizes the key performance indicators of the reconfigurable battery network 10 under different algorithms.

[0197] Table 1. Comparison of performance metrics of reconfigurable battery networks under different algorithms

[0198] As shown in Table 1, the PPO proposed in this application The method achieved optimal performance across all evaluation metrics. Its runtime reached 8900 seconds, approximately 8.1% longer than the original PPO and over 9% longer than A2C and PSO. The effective capacity utilization rate reached 89.46%, indicating that the system can more fully release the usable energy of individual battery cells while meeting safety constraints. The mean square error of the total output voltage was only 0.0859, far lower than other comparative algorithms, confirming its superior voltage regulation accuracy. More importantly, the violation rate of physical operating constraints was 0%, achieving zero violations throughout the entire process, while the violation rate of physical operating constraints for the A2C method was as high as 42.05%.

[0199] These data fully demonstrate that the present application, through the construction of an effective switching state combination space driven by physical operation constraints and the joint sampling mechanism of category distribution, not only solves the coupling constraint problem in multidimensional discrete control, but also achieves a comprehensive leap in safety, stability and economy at the engineering application level.

[0200] It should be understood that the above simulation results were obtained under specific parameter configurations. In actual deployments, as the scale of the reconfigurable battery network expands or the topology becomes more complex, the advantages of the method proposed in this application over the traditional independent sampling method will become more significant.

[0201] The above describes a control method for a reconfigurable battery network provided by embodiments of this application. The following describes an apparatus for implementing the above-described control method for a reconfigurable battery network.

[0202] Please see Figure 10 This is a schematic diagram of the structure of a control device for a reconfigurable battery network provided in an embodiment of this application. Figure 10 As shown, the control device for the reconfigurable battery network includes: The data acquisition module 1001 is used to acquire the current operating state of the reconfigurable battery network and multiple candidate switch state combinations. The reconfigurable battery network includes multiple battery modules, each battery module includes a battery cell and a switch unit. The candidate switch state combinations include the on / off state of each switch unit in the reconfigurable battery network. The current operating state includes the state of charge of each battery cell and the terminal voltage of each battery cell. The filtering and combination module 1002 is used to filter out multiple valid switch state combinations that meet physical operation constraints from multiple candidate switch state combinations based on the current operating state. The physical operation constraints include topology connection constraints and electrical boundary constraints. The topology connection constraints indicate that the connection relationship between the battery cell and the switch unit corresponding to the on / off state of each switch unit belongs to a preset feasible connection relationship. The preset feasible connection relationship includes each battery cell being put into operation or bypassed through the corresponding switch unit, multiple battery cells being connected in parallel to form a battery pack, and each battery pack being connected to the reconfigurable battery network through a switch unit. The electrical boundary constraints mean that the total output voltage of the reconfigurable battery network is within a preset voltage upper and lower limit range, and the terminal voltage of the battery cell being put into operation is not lower than the preset cutoff discharge voltage, and the state of charge of the battery cell being put into operation is not lower than the preset cutoff discharge state of charge. The probability acquisition module 1003 is used to acquire the sampling probabilities corresponding to the multiple effective switch state combinations based on the current running state and the pre-built joint probability distribution model; the number of neurons in the output layer of the joint probability distribution model is the same as the number of multiple effective switch state combinations, and each neuron is associated with one effective switch state combination; The sampling module 1004 is used to sample from multiple valid switch state combinations according to the sampling probability to obtain a target switch state combination; The control module 1005 is used to control the on / off state of each switching unit in the reconfigurable battery network based on the target switching state combination.

[0203] In one optional implementation, the joint probability distribution model is a class distribution model, which includes: an input layer, wherein the number of neurons in the input layer is consistent with the dimension of the current running state; a hidden layer; an output layer; and a normalization layer.

[0204] In one alternative implementation, it also includes: The first determining module is used to determine the battery cells to be put into operation based on the target switch state combination; The second determining module is used to determine the total output voltage of the reconfigurable battery network, as well as the terminal voltage and state of charge of each of the battery cells put into operation, based on the current operating state and the battery cells put into operation. The third determining module is used to determine a voltage stability reward item based on the deviation between the total output voltage and the preset reference voltage. The voltage stability reward item takes the maximum value when the deviation between the total output voltage and the preset reference voltage is the minimum, and takes a negative value when the total output voltage exceeds the preset voltage upper and lower limit range. The fourth determining module is used to determine the state of charge balance reward item based on the sum of the deviations between the state of charge of each of the battery cells put into operation and the average state of charge, wherein the average state of charge is the mean of the state of charge of each of the battery cells put into operation. The fifth determining module is used to determine an over-discharge voltage penalty term if there is a first battery cell with a terminal voltage lower than a preset cutoff discharge voltage among the battery cells put into operation. The value of the over-discharge voltage penalty term is related to the total number of the first battery cells, and the over-discharge voltage penalty term is a negative value. The sixth determining module is used to determine an over-discharge state penalty term if there is a second battery cell among the battery cells put into operation with a state of charge lower than a preset cutoff state of charge. The value of the over-discharge state penalty term is related to the total number of the second battery cells and the over-discharge state penalty term is negative. The first acquisition module is used to sum the voltage stability reward item, the state of charge balance reward item, the over-discharge voltage penalty item, and the over-discharge state of charge penalty item according to preset weights to obtain a reward value.

[0205] In one alternative implementation, it also includes: The second acquisition module is used to input the current running state and the running state at the next moment into the value network to obtain the current state value estimate and the next moment state value estimate. The first calculation module is used to calculate the time series difference error based on the reward value, the preset discount factor, the current state value estimate, and the state value estimate at the next moment. The second calculation module is used to weight and sum the time-series difference error according to the preset discount factor and the preset generalized dominance estimation parameter to obtain the dominance function estimate of the target switching state combination. The seventh determining module is used to obtain, for each effective switch state combination, the sampling probability output of the joint probability distribution model for the effective switch state combination under the current parameters and the parameters before the update, and determine the ratio of the two as the importance sampling ratio. The third acquisition module is used to clip the importance sampling ratios corresponding to the multiple effective switch state combinations to a preset clipping interval to obtain the clipped importance sampling ratios. The construction module is used to construct a pruning surrogate objective function based on the product of the pruned importance sampling ratio and the estimated value of the dominance function; An update module is used to update the current parameters of the joint probability distribution model according to the pruning agent objective function.

[0206] In one alternative implementation, the third determining module includes: The first calculation unit is used to calculate the voltage stability bonus item by using the absolute value of the deviation between the total output voltage and the preset reference voltage as the independent variable, if the total output voltage is within the preset voltage upper and lower limit range; The first determining unit is used to use a fixed negative value as the voltage stability reward if the total output voltage exceeds the preset voltage upper and lower limit range.

[0207] In one alternative implementation, the fourth determining module includes: The first acquisition unit is used to acquire a state of charge deviation vector that includes the difference between the state of charge of each of the battery cells put into operation and the average state of charge. The second calculation unit is used to perform an inner product operation on the state of charge deviation vector and the input operation state vector representing the target switch state combination to obtain the state of charge balance reward item.

[0208] In one optional implementation, the fifth determining module includes: The second determining unit is used to take the negative of the difference between the terminal voltage of each of the battery cells put into operation and the preset cut-off discharge voltage as the independent variable of the unit step function, and to determine the sum of the negative values ​​of the output value of the unit step function as the over-discharge voltage penalty term. The unit step function outputs 1 when the independent variable is greater than or equal to zero, and outputs 0 when the independent variable is less than zero.

[0209] In one alternative implementation, the sixth determining module includes: The third determining unit is used to take the negative of the difference between the state of charge of each of the battery cells put into operation and the preset cutoff state of charge as the independent variable of the unit step function, and to determine the sum of the negative values ​​of the output value of the unit step function as the over-discharge state of charge penalty term. The unit step function outputs 1 when the independent variable is greater than or equal to zero, and outputs 0 when the independent variable is less than zero.

[0210] This application also provides an electronic device in its embodiments. (See reference...) Figure 11 The diagram illustrates a structural schematic of an electronic device suitable for implementing the control method for the reconfigurable battery network in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 11 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0211] like Figure 11 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 into a random access memory (RAM) 1103. When the electronic device is powered on, the RAM 1103 also stores various programs and data required for the operation of the electronic device. The processing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0212] Typically, the following devices can be connected to I / O interface 1105: input devices 1106 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1107 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1108 including, for example, memory cards, hard drives, etc.; and communication devices 1109. Communication device 1109 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 11 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0213] This application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the control methods for a reconfigurable battery network provided in this application.

[0214] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the control methods for reconfigurable battery networks provided in this application.

[0215] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0216] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0217] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0218] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A control method for a reconfigurable battery network, characterized in that, include: The current operating state of a reconfigurable battery network and multiple candidate switch state combinations are obtained. The reconfigurable battery network includes multiple battery modules, each of which includes a battery cell and a switch unit. The candidate switch state combinations include the on / off state of each switch unit in the reconfigurable battery network. The current operating state includes the state of charge of each battery cell and the terminal voltage of each battery cell. Based on the current operating state, multiple valid switch state combinations that satisfy physical operating constraints are selected from multiple candidate switch state combinations. The physical operating constraints include topology connection constraints and electrical boundary constraints. The topology connection constraints characterize that the connection relationship between the battery cell and the switch unit corresponding to the on / off state of each switch unit belongs to a preset feasible connection relationship. The preset feasible connection relationship includes each battery cell being put into operation or bypassed through the corresponding switch unit, multiple battery cells being connected in parallel to form a battery pack, and each battery pack being connected to the reconfigurable battery network through a switch unit. The electrical boundary constraints mean that the total output voltage of the reconfigurable battery network is within a preset voltage upper and lower limit range, and the terminal voltage of the battery cell being put into operation must not be lower than the preset cutoff discharge voltage, and the state of charge of the battery cell being put into operation must not be lower than the preset cutoff discharge state of charge. Based on the current running state and the pre-constructed joint probability distribution model, the sampling probabilities corresponding to the multiple effective switch state combinations are obtained respectively; the number of neurons in the output layer of the joint probability distribution model is the same as the number of multiple effective switch state combinations, and each neuron is associated with one effective switch state combination; Samples are taken from multiple valid switch state combinations according to the sampling probability to obtain the target switch state combination; The on / off state of each switching unit in the reconfigurable battery network is controlled based on the target switching state combination.

2. The control method for the reconfigurable battery network according to claim 1, characterized in that, The joint probability distribution model is a category distribution model, which includes: an input layer, wherein the number of neurons in the input layer is consistent with the dimension of the current running state; a hidden layer; an output layer; and a normalization layer.

3. The control method for a reconfigurable battery network according to claim 1, characterized in that, Also includes: The battery cells to be put into operation are determined based on the target switching state combination; Based on the current operating state and the battery cells put into operation, determine the total output voltage of the reconfigurable battery network, as well as the terminal voltage and state of charge of each of the battery cells put into operation. A voltage stability bonus is determined based on the deviation between the total output voltage and the preset reference voltage. The voltage stability bonus takes the maximum value when the deviation between the total output voltage and the preset reference voltage is the minimum, and takes a negative value when the total output voltage exceeds the preset voltage upper and lower limit range. Based on the sum of the deviations between the state of charge (SOC) of each of the battery cells put into operation and the average SOC, a SOC balance reward is determined, wherein the average SOC is the mean of the SOC of each of the battery cells put into operation. If there is a first battery cell among the battery cells put into operation with a terminal voltage lower than the preset cutoff discharge voltage, an over-discharge voltage penalty term is determined. The value of the over-discharge voltage penalty term is related to the total number of the first battery cells, and the over-discharge voltage penalty term is negative. If there is a second battery cell among the battery cells put into operation with a state of charge lower than the preset cutoff state of charge, an over-discharge state of charge penalty term is determined. The value of the over-discharge state of charge penalty term is related to the total number of the second battery cells and the over-discharge state of charge penalty term is negative. The reward value is obtained by weighting and summing the voltage stability reward, the state of charge balance reward, the over-discharge voltage penalty, and the over-discharge state of charge penalty according to preset weights.

4. The control method for the reconfigurable battery network according to claim 3, characterized in that, Also includes: The current operating state and the operating state at the next moment are input into the value network to obtain the current state value estimate and the next moment state value estimate; Based on the reward value, the preset discount factor, the current state value estimate, and the state value estimate at the next moment, the temporal difference error is calculated. The time-series difference error is weighted and summed according to the preset discount factor and the preset generalized dominance estimation parameter to obtain the dominance function estimate of the target switching state combination; For each effective switch state combination, the sampling probability of the joint probability distribution model outputting the effective switch state combination under the current parameters and the parameters before the update is obtained respectively, and the ratio of the two is determined as the importance sampling ratio. The importance sampling ratios corresponding to the multiple effective switch state combinations are clipped to a preset clipping interval to obtain the clipped importance sampling ratios. Based on the product of the importance sampling ratio after pruning and the estimated value of the dominance function, a pruning proxy objective function is constructed. Update the current parameters of the joint probability distribution model according to the pruning agent objective function.

5. The control method for the reconfigurable battery network according to claim 3, characterized in that, The voltage stability bonus is determined based on the deviation between the total output voltage and the preset reference voltage, including: If the total output voltage is within the preset voltage upper and lower limit range, the voltage stability bonus is calculated using the absolute value of the deviation between the total output voltage and the preset reference voltage as the independent variable and through a preset exponential decay function. If the total output voltage exceeds the preset voltage upper and lower limit range, a fixed negative value will be used as the voltage stability bonus.

6. The control method for the reconfigurable battery network according to claim 3, characterized in that, Based on the sum of the deviations between the state of charge (SOC) and the average SOC of each of the aforementioned operational battery cells, a SOC equilibrium reward is determined, including: Obtain a state of charge deviation vector that includes the difference between the state of charge of each of the battery cells put into operation and the average state of charge. The inner product operation is performed between the state of charge deviation vector and the operational state vector representing the target switch state combination to obtain the state of charge equilibrium reward term.

7. The control method for a reconfigurable battery network according to claim 3, characterized in that, If any of the battery cells put into operation has a first battery cell with a terminal voltage lower than a preset cutoff discharge voltage, an over-discharge voltage penalty term is determined, including: The negative of the difference between the terminal voltage of each of the battery cells put into operation and the preset cutoff discharge voltage is used as the independent variable of the unit step function, and the sum of the negative values ​​of the output value of the unit step function is determined as the over-discharge voltage penalty term. The unit step function outputs 1 when the independent variable is greater than or equal to zero, and outputs 0 when the independent variable is less than zero.

8. The control method for a reconfigurable battery network according to claim 7, characterized in that, If one of the battery cells put into operation has a second battery cell with a state of charge lower than a preset cutoff state of charge, an over-discharge state of charge penalty is determined, including: The negative of the difference between the state of charge of each battery cell put into operation and the preset cutoff state of charge is used as the independent variable of the unit step function, and the sum of the negative values ​​of the output value of the unit step function is determined as the over-discharge state of charge penalty term. The unit step function outputs 1 when the independent variable is greater than or equal to zero, and outputs 0 when the independent variable is less than zero.

9. A control device for a reconfigurable battery network, characterized in that, include: The data acquisition module is used to acquire the current operating state of the reconfigurable battery network and multiple candidate switch state combinations. The reconfigurable battery network includes multiple battery modules, each battery module includes a battery cell and a switch unit. The candidate switch state combinations include the on / off state of each switch unit in the reconfigurable battery network. The current operating state includes the state of charge of each battery cell and the terminal voltage of each battery cell. The filtering and combination module is used to filter out multiple valid switch state combinations that meet physical operating constraints from multiple candidate switch state combinations based on the current operating state. The physical operating constraints include topological connection constraints and electrical boundary constraints. The topological connection constraints indicate that the connection relationship between the battery cell and the switch unit corresponding to the on / off state of each switch unit belongs to a preset feasible connection relationship. The preset feasible connection relationship includes each battery cell being put into operation or bypassed through the corresponding switch unit, multiple battery cells being connected in parallel to form a battery pack, and each battery pack being connected to the reconfigurable battery network through a switch unit. The electrical boundary constraints mean that the total output voltage of the reconfigurable battery network is within a preset voltage upper and lower limit range, and the terminal voltage of the battery cell being put into operation is not lower than the preset cutoff discharge voltage, and the state of charge of the battery cell being put into operation is not lower than the preset cutoff discharge state of charge. The probability acquisition module is used to acquire the sampling probabilities corresponding to the multiple effective switch state combinations based on the current running state and the pre-built joint probability distribution model; the number of neurons in the output layer of the joint probability distribution model is the same as the number of multiple effective switch state combinations, and each neuron is associated with one effective switch state combination; A sampling module is used to sample from multiple valid switch state combinations according to sampling probability to obtain a target switch state combination; The control module is used to control the on / off state of each switching unit in the reconfigurable battery network based on the target switching state combination.

10. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the control method for a reconfigurable battery network as described in any one of claims 1 to 8.

11. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the control method for the reconfigurable battery network as described in any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the control method for the reconfigurable battery network as described in any one of claims 1 to 8.