Method, system, device, and storage medium for orderly discharge based on battery wear
By constructing loss functions and penalty functions, and using particle swarm optimization to optimize battery discharge strategies, the problem of loss caused by inconsistency among individual cells in the battery pack is solved, battery life is extended, and the economic benefits of V2G services are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU INST OF MEASURING & TESTING TECH
- Filing Date
- 2025-06-30
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional BMS cannot effectively reduce dynamic losses caused by inconsistencies in individual cells within the battery pack, thus affecting the battery pack's lifespan.
By constructing the loss function and penalty function under battery discharge conditions, the particle swarm optimization algorithm is used to optimize the battery discharge strategy, find the optimal discharge sequence and parameters, and reduce battery loss.
It significantly reduces the additional battery loss caused by participating in V2G services, extends battery life, reduces the risk of premature battery failure, and improves the economic benefits and sustainability of electric vehicles participating in V2G services.
Smart Images

Figure CN120534244B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery pack management technology, specifically relating to an ordered discharge method, system, device, and storage medium based on battery loss. Background Technology
[0002] Vehicle-to-Grid (V2G) technology refers to the technology of electric vehicles supplying electricity to the power grid. Its core idea is to utilize the energy storage capacity of electric vehicles as a buffer between the power grid and renewable energy sources. By enabling electric vehicles to participate in V2G services, the problems of low grid efficiency and renewable energy fluctuations can be significantly alleviated, and revenue can also be generated for electric vehicle users. Therefore, with the increasing demand for grid-connected vehicle batteries, the Battery Management System (BMS) plays a crucial role.
[0003] Traditional battery management systems (BMS) typically monitor the voltage, temperature, and state of charge (SOC) of each individual cell and adjust charge distribution through balancing circuits to maintain battery pack performance. However, when individual cells in a battery pack exhibit inconsistencies due to manufacturing differences, uneven ambient temperatures, or varying degrees of aging, relying solely on balancing circuits cannot effectively reduce dynamic losses. Summary of the Invention
[0004] The purpose of this invention is to provide an ordered discharge method, system, device, and storage medium based on battery loss, which can reduce battery loss and extend the actual service life of the battery.
[0005] The first aspect of this invention provides an ordered discharge method based on battery loss, comprising:
[0006] Multiple battery discharge strategies are obtained as the initial particle swarm; wherein the discharge order and discharge parameters of the battery discharge strategies are randomly generated.
[0007] Construct the loss function and the penalty function under battery discharge conditions;
[0008] The fitness function of the particle swarm optimization algorithm is constructed based on the loss function and the penalty function.
[0009] The particle swarm optimization algorithm is executed, wherein each particle in the particle swarm optimization algorithm represents a battery discharge strategy, and the optimal discharge strategy is found when the particle swarm optimization algorithm terminates.
[0010] In some implementations, constructing the loss function under battery discharge conditions includes:
[0011] Obtain battery data for each battery, and calculate the target internal resistance and the first target remaining capacity of each battery at the first target time based on the battery data.
[0012] The basic loss terms for each battery are constructed based on the target internal resistance and the first target remaining capacity of each battery.
[0013] The overcharge loss term for each battery is constructed based on the first target remaining capacity and the upper limit of safe capacity of each battery.
[0014] The deep discharge loss term for each battery is constructed based on the first target remaining capacity and the lower limit of the safe capacity of each battery.
[0015] The battery loss function is constructed based on the basic loss term, overcharge loss term, and deep discharge loss term of each battery.
[0016] In some embodiments, the battery data includes: initial internal resistance, initial capacity, initial time, internal resistance growth coefficient, capacity decay coefficient, and number of cycles; calculating the target internal resistance of each battery at the first target time based on the battery data includes:
[0017] The increased internal resistance is calculated based on the internal resistance growth coefficient of each battery and the number of cycles prior to the first target time;
[0018] Based on the increasing internal resistance and initial internal resistance of each battery, the target internal resistance of each battery at the first target time is calculated.
[0019] In some implementations, calculating the first target remaining capacity of each battery at the first target time based on the data of each battery includes:
[0020] Calculate the first time difference between the first target time and the initial time;
[0021] The decay capacity is calculated based on the capacity decay coefficient of each battery and the first time difference.
[0022] Based on the decay capacity and initial capacity of each battery, the first target remaining capacity of each battery at the first target time is calculated.
[0023] In some implementations, the construction of the penalty function under battery discharge conditions includes:
[0024] Obtain the grid power demand at the first target time and the current total power of all batteries at the first target time, and establish a first constraint condition based on the current total power and grid power demand;
[0025] Obtain the discharge efficiency coefficient, first target remaining capacity and current power of each battery. Calculate the second target remaining capacity at the second target time based on the first target remaining capacity, current power, discharge efficiency coefficient and second time difference of each battery. The second time difference is the time difference between the second target time and the first target time. Establish a second constraint condition based on the second target remaining capacity and the lower limit of the safe capacity.
[0026] Construct a penalty function based on the first and second constraints.
[0027] In some implementations, constructing the penalty function based on the first constraint and the second constraint includes:
[0028] If the first constraint condition is exceeded, a first penalty term is constructed based on the difference between the grid power demand and the current total power and a preset first penalty coefficient;
[0029] If the second constraint is exceeded, a second penalty term is constructed based on the difference between the remaining capacity of the first target and the lower limit of the safe capacity and the second penalty coefficient;
[0030] Construct a penalty function based on the first penalty term and the second penalty term.
[0031] In some implementations, executing the particle swarm optimization algorithm includes:
[0032] The fitness of each particle is calculated based on the fitness function.
[0033] Update the individual optimal position and the global optimal position based on the fitness;
[0034] Update the particle velocity based on the individual optimal position and the global optimal position, and update the particle position based on the updated particle velocity;
[0035] The particle swarm optimization algorithm is executed until the preset iteration termination condition is reached, and the globally optimal position is taken as the optimal battery discharge strategy.
[0036] A second aspect of the present invention provides an ordered discharge system based on battery loss, comprising:
[0037] The data acquisition module is used to acquire multiple battery discharge strategies as an initial particle swarm; wherein the discharge order and discharge parameters of the battery discharge strategies are randomly generated.
[0038] The first construction module is used to construct the loss function under battery discharge conditions and the penalty function under battery discharge conditions;
[0039] The second construction module is used to construct the fitness function of the particle swarm optimization algorithm based on the loss function and the penalty function;
[0040] An algorithm execution module is used to execute the particle swarm optimization algorithm, wherein each particle in the particle swarm optimization algorithm represents a battery discharge strategy, and when the particle swarm optimization algorithm terminates, the optimal discharge strategy is found.
[0041] A third aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0042] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described above.
[0043] The technical solution provided by this invention has the following advantages and effects: by optimizing the battery discharge sequence and discharge strategy of battery parameters, and by constructing loss functions and penalty functions, the additional battery loss caused by participating in V2G services is significantly reduced, and the actual service life of the entire fleet of batteries is extended; by minimizing battery loss, the risk of premature battery failure and replacement frequency are reduced, thereby improving the overall economic benefits and project sustainability of electric vehicles participating in V2G services. Attached Figure Description
[0044] Figure 1 This is a schematic flowchart of the ordered discharge method based on battery loss provided by the present invention.
[0045] Figure 2 This is a structural block diagram of the ordered discharge system based on battery loss provided by the present invention;
[0046] Figure 3 This is an internal structural diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0047] To facilitate understanding of the present invention, specific embodiments of the present invention will be described in more detail below with reference to the accompanying drawings.
[0048] Unless otherwise specified or defined, the terms "first," "second," etc., used in this document are for distinguishing names only and do not represent a specific number or order.
[0049] Unless otherwise specified or defined, the term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.
[0050] It should be noted that in this article, "fixed to" or "connected to" can mean directly fixed to or connected to a component, or indirectly fixed to or connected to a component.
[0051] like Figure 1 As shown, this embodiment provides an ordered discharge method based on battery loss, including the following steps S1 to S4:
[0052] Step S1: Obtain multiple battery discharge strategies as the initial particle swarm; wherein the discharge order and discharge parameters of the battery discharge strategies are randomly generated.
[0053] In practical applications, the discharge sequence and parameters of each battery are randomly generated to serve as the initial particle swarm, facilitating subsequent execution of the particle swarm optimization algorithm. Discharge parameters include discharge rate and depth of discharge. Depth of discharge represents the percentage of a battery's total capacity released in a single cycle, while discharge rate represents the magnitude of the current during battery discharge, typically expressed as the C-rate.
[0054] Step S2: Construct the loss function under battery discharge conditions and construct the penalty function under battery discharge conditions.
[0055] Specifically, the construction of the loss function under battery discharge conditions includes:
[0056] Obtain battery data for each battery, and calculate the target internal resistance and the first target remaining capacity of each battery at the first target time based on the battery data.
[0057] The basic loss terms for each battery are constructed based on the target internal resistance and the first target remaining capacity of each battery.
[0058] The overcharge loss term for each battery is constructed based on the first target remaining capacity and the upper limit of safe capacity of each battery.
[0059] The deep discharge loss term for each battery is constructed based on the first target remaining capacity and the lower limit of the safe capacity of each battery.
[0060] The battery loss function is constructed based on the basic loss term, overcharge loss term, and deep discharge loss term of each battery.
[0061] In practical applications, the formula for the basic loss term is:
[0062]
[0063] Where N represents the number of batteries, Ii(τ) represents the discharge current of the i-th battery at time τ, and R i (τ) represents the target internal resistance of the i-th battery at time τ, SOC i (t) represents the first target remaining capacity of the i-th battery at time t, SOC. i (t-1) represents the first target remaining capacity of the i-th battery at time t-1, |SOC i (t)-SOCi (t-1)| represents the change in battery capacity before and after the i-th battery discharges, i.e., the degree of SOC drop, and γ represents the penalty coefficient for the degree of SOC drop, used to adjust the weight penalty for power fluctuations. The basic loss term can reflect the normal aging of the battery, such as the number of cycles and calendar decay, and capture the cumulative effect over time.
[0064] The formula for the overcharge loss term is:
[0065]
[0066] Where μ represents the overcharge coefficient of the overcharge loss, and SOC max This indicates the upper limit of safe capacity. For example, for lithium-ion batteries, the upper limit of safe capacity is typically 90% to 100%. The specific value of the upper limit of safe capacity can be referenced from the battery's safety threshold. The overcharge loss term can separately quantify the chemical side reactions caused by the battery capacity exceeding the upper limit of safe capacity, preventing the algorithm from sacrificing battery health for short-term gains. In V2G dynamic scenarios, charge and discharge commands may switch rapidly. If no SOC safety margin is reserved during the discharge phase, subsequent charging can easily trigger overcharge risks, causing irreversible damage. For example, a certain strategy may allow the battery SOC to reach 89.9% (not exceeding the SOC limit). max =90%). However, if the grid command suddenly switches to charging, the battery may be overcharged instantaneously. Therefore, the overcharge loss term is incorporated into the loss function of the discharge strategy, and the battery life is maximized by co-optimizing the entire charge and discharge chain.
[0067] The formula for the deep amplification loss term is:
[0068]
[0069] Where ν represents the deep amplification factor of the deep amplification loss, and SOC min This indicates the lower limit of safe capacity. For example, for lithium-ion batteries, the lower limit of safe capacity is typically 10% to 20%. The specific lower limit of safe capacity can be referenced from the battery's safety threshold. The deep discharge loss term can represent the damage to the electrode structure caused by deep discharge, preventing the state of charge (SOC) from falling below the critical value.
[0070] The loss function is obtained by adding the basic loss term, overcharge loss term, and deep discharge loss term. Constructing the loss function using these three terms allows for precise quantification of battery degradation mechanisms, avoiding simplification errors. The overcharge loss term penalizes operations where the State of Charge (SOC) exceeds the safe capacity limit, enabling the algorithm to control the charging cut-off voltage. The deep discharge loss term suppresses discharge strategies with excessively low SOC, protecting the battery's structural integrity and achieving targeted suppression of high-risk behaviors, thus extending battery life. Furthermore, the basic loss term dominates long-term, slow degradation, while the overcharge and deep discharge loss terms reflect short-term, sudden damage. Combining these three terms to construct the loss function allows the algorithm to not only optimize the economy of a single cycle but also reduce cumulative damage, lowering the replacement cost over the battery's entire lifespan.
[0071] Specifically, the battery data includes: initial internal resistance, initial capacity, initial time, internal resistance growth coefficient, capacity decay coefficient, and number of cycles; the calculation of the target internal resistance of each battery at the first target time based on the battery data includes:
[0072] The increased internal resistance is calculated based on the internal resistance growth coefficient of each battery and the number of cycles prior to the first target time;
[0073] Based on the increasing internal resistance and initial internal resistance of each battery, the target internal resistance of each battery at the first target time is calculated.
[0074] In practical applications, battery internal resistance is a key parameter affecting battery performance, directly determining voltage drop and heat generation under load. As the number of charge-discharge cycles increases, the battery's internal resistance typically increases; therefore, it is necessary to calculate the target internal resistance of the battery at the first target time. The formula for calculating the target internal resistance is:
[0075] R i (t)=R 0i +α i ·ΔCycles i
[0076] Among them, R i (t) represents the target internal resistance of the i-th battery at time t, α i Let ΔCycles represent the internal resistance growth coefficient of the i-th battery. i R represents the number of cycles from the initial time to the first target time for the i-th battery. 0i Let represent the initial internal resistance of the i-th battery.
[0077] Specifically, calculating the first target remaining capacity of each battery at the first target time based on the data of each battery includes:
[0078] Calculate the first time difference between the first target time and the initial time;
[0079] The decay capacity is calculated based on the capacity decay coefficient of each battery and the first time difference.
[0080] Based on the decay capacity and initial capacity of each battery, the first target remaining capacity of each battery at the first target time is calculated.
[0081] In practical applications, battery capacity decays over time, even when the battery is not in use; this is known as calendar aging. The formula for calculating the initial target remaining capacity is:
[0082]
[0083] Among them, SOC i (t) represents the first target remaining capacity of the i-th battery at time t, C 0i This represents the initial capacity of the i-th battery, typically the factory specification, β. i Let represent the capacity decay coefficient of the i-th battery, and Δt1 represent the first time difference.
[0084] Specifically, the penalty function for constructing the battery discharge condition includes:
[0085] Obtain the grid power demand at the first target time and the current total power of all batteries at the first target time, and establish a first constraint condition based on the current total power and grid power demand;
[0086] Obtain the discharge efficiency coefficient, first target remaining capacity and current power of each battery. Calculate the second target remaining capacity at the second target time based on the first target remaining capacity, current power, discharge efficiency coefficient and second time difference of each battery. The second time difference is the time difference between the second target time and the first target time. Establish a second constraint condition based on the second target remaining capacity and the lower limit of the safe capacity.
[0087] Construct a penalty function based on the first and second constraints.
[0088] In practical applications, based on the grid power demand and the current total power of all batteries, a first constraint is established: the current total power of all batteries must be greater than or equal to the grid power demand. The formula for calculating the second target remaining capacity is:
[0089] SOC i (t+1)=SOC i (t)-η·P i (t)·Δt2
[0090] Among them, SOC i(t+1) represents the remaining capacity of the i-th battery at time t+1, representing the second target SOC. i (t) represents the first target remaining capacity of the i-th battery at time t, η represents the discharge efficiency coefficient, and P i (t) represents the current total power of the i-th battery at time t, and Δt2 represents the second time difference. A second constraint is established based on the second target remaining capacity and the lower limit of the safe capacity. The established second constraint requires that the second target remaining capacity must be greater than or equal to the lower limit of the safe capacity. By setting the first constraint, grid stability can be ensured. By setting the second constraint, the battery's SOC is prioritized to be maintained within its full capacity range, thereby reducing battery losses.
[0091] Specifically, constructing the penalty function based on the first and second constraints includes:
[0092] If the first constraint condition is exceeded, a first penalty term is constructed based on the difference between the grid power demand and the current total power and a preset first penalty coefficient;
[0093] If the second constraint is exceeded, a second penalty term is constructed based on the difference between the remaining capacity of the first target and the lower limit of the safe capacity and the second penalty coefficient;
[0094] Construct a penalty function based on the first penalty term and the second penalty term.
[0095] Specifically, the expression for the first penalty term can be:
[0096]
[0097] Where γ1 represents the weight coefficient of the first penalty term, P grid (t) represents the power demand of the power grid. This indicates the current total power of all batteries.
[0098] The expression for the second penalty term can be:
[0099]
[0100] Where γ2 represents the weight coefficient of the second penalty term, SOC minThis represents the lower limit of the safe capacity. The expression for the penalty function is: Penalty = P1 + P2. In practical applications, the weight coefficient of the first penalty term is greater than that of the second penalty term. The first penalty term is given a higher weight in the penalty function to ensure that the algorithm prioritizes meeting the real-time power demand of the power grid, avoiding the risks of frequency fluctuations or load shedding. While the SOC safety range is important, brief and slight deviations are allowed (e.g., a momentary drop in SOC to 18%). The second penalty term is given a lower weight to guide the algorithm back to the safe zone. The higher weight coefficient in the first penalty term forces the particles to converge quickly to the feasible region that meets the power grid demand. Based on meeting the power demand, the lower weight coefficient in the second penalty term optimizes battery SOC safety, avoiding the complexity of simultaneously handling multiple constraints.
[0101] Step S3: Construct the fitness function of the particle swarm optimization algorithm based on the loss function and penalty function.
[0102] In practical applications, the fitness function is expressed as follows:
[0103] F(x j )=L(x j )+λ·Penalty(x j )
[0104] Where F(x) j L(x) represents the fitness value of the j-th particle. j Penalty(x) represents the loss value of the j-th particle, λ represents the total penalty coefficient, and Penalty(x) represents the loss value of the j-th particle. j Let represent the penalty value of the j-th particle. The loss value is calculated based on the loss function, and the penalty value is calculated based on the penalty function. The fitness function of the particle swarm optimization algorithm is constructed by the loss function and the penalty function, so that battery life (minimum loss) and constraint satisfaction (minimum penalty) are integrated into a single objective, realizing the unification of multiple objectives. By setting the total penalty coefficient, the strictness of the constraints can be flexibly controlled.
[0105] Step S4: Execute the particle swarm optimization algorithm, wherein each particle in the particle swarm optimization algorithm represents a battery discharge strategy, and when the particle swarm optimization algorithm terminates, the optimal discharge strategy is found.
[0106] Specifically, executing the particle swarm optimization algorithm includes:
[0107] The fitness of each particle is calculated based on the fitness function.
[0108] Update the individual optimal position and the global optimal position based on the fitness;
[0109] Update the particle velocity based on the individual optimal position and the global optimal position, and update the particle position based on the updated particle velocity;
[0110] The particle swarm optimization algorithm is executed until the preset iteration termination condition is reached, and the globally optimal position is taken as the optimal battery discharge strategy.
[0111] In practical applications, for each particle in a swarm, its fitness value is calculated based on its position. This fitness value is calculated based on the loss and penalty values of each battery discharge strategy, determining the particle's performance in the search space. For each particle, its optimal position is updated based on its current fitness value. If the fitness value of the current position is better than the fitness value of a historical optimal position, then the optimal position is updated. In the entire swarm, the particle with the optimal fitness value is found, and its position is taken as the global optimal position to determine the best solution in the entire swarm. Then, the particle velocity is updated based on the individual optimal position and the global optimal position, and the particle position is updated based on the particle velocity. The formulas for updating the particle position and velocity are as follows:
[0112]
[0113] Where, x j This represents the particle's position, relative to x in the fitness function. j Consistent; p j Represents the individual's optimal position; g represents the global historical optimal strategy; v j The direction of particle change represents the trend of policy change; w represents the inertia factor; c1 represents the first learning factor, c2 represents the second learning factor, r1 represents the first random weight, and r2 represents the second random weight. The particle's position x... j It is a matrix (or flattened into a vector).
[0114]
[0115] in, This represents the value of the discharge current of the i-th battery at time t, that is, the value of the discharge current of each battery at each time point. This represents the discharge order, realizing the orderly discharge arrangement of the batteries.
[0116] The optimal battery discharge strategy is found by repeatedly calculating the fitness of each particle, updating the individual optimal position and the global optimal position, and updating the particle velocity and position until a preset iteration termination condition is reached. The iteration termination condition is reaching the maximum number of iterations or satisfying a termination iteration function, which is:
[0117] |F(g (z+1) )-F(g (z) )|<∈
[0118] Among them, g (z) F(g) represents the globally optimal position in the z-th generation. (z) Let represent the fitness corresponding to the globally optimal position in generation z, and ∈ represent the termination threshold, which can be set to 10 to the power of negative 5, with the specific order of magnitude determined according to actual needs. When this condition is satisfied for N consecutive generations (e.g., N=10), the function can be considered stable, and iteration stops at this point.
[0119] The ordered discharge method based on battery loss of the present invention has the following advantages:
[0120] 1. By optimizing the battery discharge strategy of each vehicle, prioritizing the discharge of batteries in good condition and with low internal resistance, and avoiding over-discharge of batteries, the additional battery losses caused by participating in V2G services are significantly reduced, and the actual service life of the entire fleet's batteries is extended.
[0121] 2. By minimizing battery wear, the risk of premature battery failure and replacement frequency are reduced, thereby improving the overall economic benefits and project sustainability of electric vehicles participating in V2G services.
[0122] 3. During the optimization process, grid power demand is used as a constraint to ensure that grid dispatch instructions can be met when executing the optimal discharge strategy. Simultaneously, its core objective is to minimize battery losses, thus finding an effective balance between meeting external demand (grid) and protecting internal conditions (battery health).
[0123] 4. In the face of a large number of electric vehicles connected to the power grid, this invention can make intelligent decisions based on the real-time status and predicted data of each vehicle's battery, and realize the collaborative optimization management of the entire cluster, avoiding the inefficiency and high loss problems that may be caused by simple average allocation or random scheduling.
[0124] like Figure 2 As shown, this embodiment of the invention also provides an ordered discharge system based on battery loss, comprising:
[0125] The data acquisition module 10 is used to acquire multiple battery discharge strategies as an initial particle swarm; wherein the discharge order and discharge parameters of the battery discharge strategies are randomly generated.
[0126] The first construction module 20 is used to construct the loss function under battery discharge conditions and the penalty function under battery discharge conditions;
[0127] The second construction module 30 is used to construct the fitness function of the particle swarm algorithm based on the loss function and the penalty function;
[0128] The algorithm execution module 40 is used to execute the particle swarm algorithm, wherein each particle in the particle swarm algorithm represents a battery discharge strategy, and when the particle swarm algorithm terminates, the optimal discharge strategy is found.
[0129] The modules of the aforementioned ordered discharge system based on battery loss can be implemented entirely or partially through software, hardware, or a combination thereof. These modules and units can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0130] like Figure 3 As shown, an embodiment of the present invention discloses a computer device, including a memory and a processor, wherein the memory stores a computer program;
[0131] The computer device can be a server, and its internal structure diagram can be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the ordered discharge method based on battery wear described in the above embodiments.
[0132] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] This invention also discloses a computer-readable storage medium storing a computer program that causes a computer to execute the ordered discharge method based on battery loss described in the above embodiments.
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0135] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. An ordered discharge method based on battery wear, characterized in that, include: Multiple battery discharge strategies are obtained as the initial particle swarm; wherein the discharge order and discharge parameters of the battery discharge strategies are randomly generated. Construct the loss function and the penalty function under battery discharge conditions; The fitness function of the particle swarm optimization algorithm is constructed based on the loss function and the penalty function. The particle swarm optimization algorithm is executed, wherein each particle in the particle swarm optimization algorithm represents a battery discharge strategy, and when the particle swarm optimization algorithm terminates, the optimal discharge strategy is found. The loss function under battery discharge conditions includes: Obtain battery data for each battery, and calculate the target internal resistance and the first target remaining capacity of each battery at the first target time based on the battery data. The basic loss terms for each battery are constructed based on the target internal resistance and the first target remaining capacity of each battery. The overcharge loss term for each battery is constructed based on the first target remaining capacity and the upper limit of safe capacity of each battery. The deep discharge loss term for each battery is constructed based on the first target remaining capacity and the lower limit of the safe capacity of each battery. The loss function of a battery is constructed based on the basic loss terms, overcharge loss terms, and deep discharge loss terms of each battery. The penalty function for constructing the battery discharge condition includes: Obtain the grid power demand at the first target time and the current total power of all batteries at the first target time, and establish a first constraint condition based on the current total power and grid power demand; Obtain the discharge efficiency coefficient, first target remaining capacity and current power of each battery. Calculate the second target remaining capacity at the second target time based on the first target remaining capacity, current power, discharge efficiency coefficient and second time difference of each battery. The second time difference is the time difference between the second target time and the first target time. Establish a second constraint condition based on the second target remaining capacity and the lower limit of the safe capacity. Construct a penalty function based on the first and second constraints; The construction of the penalty function based on the first and second constraints includes: If the first constraint condition is exceeded, a first penalty term is constructed based on the difference between the grid power demand and the current total power and a preset first penalty coefficient; If the second constraint is exceeded, a second penalty term is constructed based on the difference between the remaining capacity of the first target and the lower limit of the safe capacity and the second penalty coefficient; Construct a penalty function based on the first penalty term and the second penalty term.
2. The ordered discharge method based on battery loss as described in claim 1, characterized in that, The battery data includes: initial internal resistance, initial capacity, initial time, internal resistance growth coefficient, capacity decay coefficient, and number of cycles; the calculation of the target internal resistance of each battery at the first target time based on the battery data includes: The increased internal resistance is calculated based on the internal resistance growth coefficient of each battery and the number of cycles prior to the first target time; Based on the increasing internal resistance and initial internal resistance of each battery, the target internal resistance of each battery at the first target time is calculated.
3. The ordered discharge method based on battery loss as described in claim 2, characterized in that, The step of calculating the first target remaining capacity of each battery at the first target time based on the data of each battery includes: Calculate the first time difference between the first target time and the initial time; The decay capacity is calculated based on the capacity decay coefficient of each battery and the first time difference. Based on the decay capacity and initial capacity of each battery, the first target remaining capacity of each battery at the first target time is calculated.
4. The ordered discharge method based on battery loss as described in claim 1, characterized in that, The execution of the particle swarm optimization algorithm includes: The fitness of each particle is calculated based on the fitness function. Update the individual optimal position and the global optimal position based on the fitness; Update the particle velocity based on the individual optimal position and the global optimal position, and update the particle position based on the updated particle velocity; The particle swarm optimization algorithm is executed until the preset iteration termination condition is reached, and the globally optimal position is taken as the optimal battery discharge strategy.
5. An ordered discharge system based on battery loss, used to execute the ordered discharge method based on battery loss as described in any one of claims 1-4, characterized in that, include: The data acquisition module is used to acquire multiple battery discharge strategies as an initial particle swarm; wherein the discharge order and discharge parameters of the battery discharge strategies are randomly generated. The first construction module is used to construct the loss function under battery discharge conditions and the penalty function under battery discharge conditions; The second construction module is used to construct the fitness function of the particle swarm optimization algorithm based on the loss function and the penalty function; An algorithm execution module is used to execute the particle swarm optimization algorithm, wherein each particle in the particle swarm optimization algorithm represents a battery discharge strategy, and when the particle swarm optimization algorithm terminates, the optimal discharge strategy is found.
6. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-4.