Energy storage system control method, control device and energy storage system

CN122823573APending Publication Date: 2026-09-25SHENZHEN POWEROAK NEWENER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611300031.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]鉴于此,本申请实施例的一个目的旨在提供一种储能系统控制方法、控制装置及储能系统,以改善相关技术中储能系统充放电控制适应性差及成本高的情况

Benefits of technology

[0008]本申请实施例具有如下有益效果:区别于相关技术的情况,本申请实施例通过结合电池组当前荷电状态、允许荷电范围及未来时段电价,动态确定充电门槛价和放电门槛价,并根据当前实时电价控制储能系统充放电,实现了灵活结合储能系统的自身荷电状态与分时电价变化自适应地控制充放电,从而保障电池组荷电状态处于合理荷电范围,提高储能系统充放电控制的适应性,无需上传数据至云端以利用外部算力与网络生成储能系统的充放电计划,降低储能系统运行成本,提高能源利用经济性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122823573A_ABST
    Figure CN122823573A_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the technical field of energy storage systems, in particular to an energy storage system control method, a control device and an energy storage system. The embodiment of the application dynamically determines a charging threshold price and a discharging threshold price by combining the current state of charge of a battery pack, the allowed charge range and the future time period electricity price, controls the charging and discharging of the energy storage system according to the current real-time electricity price, realizes adaptive control of charging and discharging by flexibly combining the state of charge of the energy storage system and the change of time-of-use electricity price, thereby ensures that the state of charge of the battery pack is in a reasonable charge range, improves the adaptability of the charging and discharging control of the energy storage system, does not need to upload data to the cloud to utilize external computing power and network to generate a charging and discharging plan of the energy storage system, reduces the operation cost of the energy storage system, and improves energy utilization economy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy storage system technology, and in particular to an energy storage system control method, control device and energy storage system. Background Technology

[0002] With the widespread adoption of time-of-use pricing regulations, peak-valley arbitrage through "buying low and selling high" has become an important revenue model for user-side energy storage systems.

[0003] In related technologies, generating a charging and discharging plan for an energy storage system relies on external computing power and networks. This method generates a charging and discharging plan by uploading data to the cloud for processing. However, this method has significant data security risks, high computing power costs, and low adaptability to different operating conditions. Summary of the Invention

[0004] In view of this, one objective of the embodiments of this application is to provide an energy storage system control method, control device and energy storage system to improve the poor adaptability and high cost of energy storage system charge and discharge control in related technologies.

[0005] In a first aspect, embodiments of this application provide an energy storage system control method. The energy storage system includes a battery pack. The method includes: acquiring preset energy storage parameters, including a time-of-use electricity price table, a minimum allowable charge value of the battery pack, and a maximum allowable charge value. The time-of-use electricity price table is used to represent the electricity price for each time period within a natural day configured by date type; calculating a power shortage ratio based on the maximum allowable charge value of the battery pack and the current charge value, where the current charge value is the state of charge value of the battery pack at the current moment; calculating a power surplus ratio based on the minimum allowable charge value, the maximum allowable charge value, and the current charge value of the battery pack; determining the power shortage price difference by multiplying the power shortage ratio by a first electricity price difference, and determining the sum of the power shortage price difference and the future lowest electricity price as the charging threshold price, where the first electricity price difference is... The future median electricity price is the difference between the future minimum electricity price and the future minimum electricity price. The future median electricity price and the future minimum electricity price are the median electricity price and the minimum electricity price in the target electricity price data, respectively. The target electricity price data includes the electricity price for each time period from the current time of day to the end time of the current natural day in the time-of-use electricity price table. The product of the surplus electricity ratio and the difference in the second electricity price is determined as the surplus electricity price difference. The difference between the future maximum electricity price and the surplus electricity price difference is determined as the discharge threshold price. The second electricity price difference is the difference between the future maximum electricity price and the future median electricity price. The future maximum electricity price is the highest electricity price in the target electricity price data. The charging and discharging of the energy storage system is controlled according to the current real-time electricity price, the charging threshold price, and the discharging threshold price. The current real-time electricity price is the electricity price of the time period in which the current time is located.

[0006] Secondly, embodiments of this application provide a control device, including a processor and a memory, wherein the processor is communicatively connected to the memory, and the memory stores program instructions executable by the processor. When the program instructions are executed by the processor, the control device performs the energy storage system control method provided in the first aspect.

[0007] Thirdly, embodiments of this application provide an energy storage system, including a battery pack and a control device provided in the second aspect, wherein the control device is connected to the battery pack.

[0008] The embodiments of this application have the following beneficial effects: Unlike related technologies, the embodiments of this application dynamically determine the charging threshold price and discharging threshold price by combining the current state of charge of the battery pack, the allowable charge range, and the electricity price for future periods. They also control the charging and discharging of the energy storage system based on the current real-time electricity price. This achieves flexible control of charging and discharging by combining the energy storage system's own state of charge with changes in time-of-use electricity prices, thereby ensuring that the battery pack's state of charge is within a reasonable charge range, improving the adaptability of the energy storage system's charging and discharging control, eliminating the need to upload data to the cloud to utilize external computing power and networks to generate charging and discharging plans for the energy storage system, reducing the operating cost of the energy storage system, and improving the economic efficiency of energy utilization. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the related technologies or embodiments will be briefly introduced below. Obviously, the drawings described below only show some embodiments of this application and should not be considered as limiting the scope of protection. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a schematic diagram illustrating an application scenario of the energy storage system control method provided in some embodiments of this application; Figure 2 This is a schematic diagram illustrating the connection relationship between an energy storage system and electrical equipment, photovoltaic power generation equipment, and the power grid provided in some embodiments of this application; Figure 3 This is a schematic diagram of the structure of the control device in the energy storage system provided in some embodiments of this application; Figure 4 This is a flowchart illustrating the energy storage system control method provided in some embodiments of this application. Detailed Implementation

[0011] To make the objectives and advantages of the embodiments of this application more readily understood, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. The detailed description of the embodiments of this application in the accompanying drawings is not intended to limit the scope of protection claimed by this application, but only represents selected embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0012] It should be noted that, unless there is a conflict, the various technical features involved in the embodiments of this application described below can be combined with each other, and all are within the protection scope of this application. Furthermore, although functional modules are divided in the device or structural schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," "third," and other similar expressions used herein do not limit the data or execution order, but are only for illustrative purposes and to distinguish identical or similar items with substantially the same function and effect, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features.

[0013] Unless otherwise defined, the technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. It should be understood that the term "and / or" as used in this specification includes any and all combinations of one or more of the listed items.

[0014] In related technologies, the charging and discharging plans for generating energy storage systems have at least the following drawbacks.

[0015] 1. Reliance on external computing power and networks: Many existing solutions (such as scheduling methods based on deep learning or edge computing) require uploading data to the cloud or relying on artificial intelligence models for inference, which not only causes network latency and data security risks, but also brings high computing power operation and maintenance costs.

[0016] 2. Lack of autonomous optimization capability: In traditional fixed-period charging and discharging schemes, electricity price information is implicitly stored in the user's mind, and the system does not have the ability to dynamically adjust the charging and discharging strategy according to the current battery status.

[0017] 3. Poor adaptability: When electricity price regulations change or energy storage equipment is moved to a new location, the charging and discharging periods often need to be recalculated manually, lacking the ability to respond to changes in operating conditions in real time.

[0018] In view of this, this application provides an energy storage system control method. By combining the current state of charge of the battery pack, the allowable charge range, and the electricity price in the future time period, the charging threshold price and the discharging threshold price are dynamically calculated and determined. The charging and discharging of the energy storage system are controlled according to the current real-time electricity price. This achieves flexible control of charging and discharging by combining the energy storage system's own state of charge and the time-of-use electricity price changes. This ensures that the battery pack's state of charge is within a reasonable charge range, improves the adaptability of the energy storage system's charging and discharging control, eliminates the need to upload data to the cloud to generate the energy storage system's charging and discharging plan using external computing power and network, reduces the operating cost of the energy storage system, and improves the economic efficiency of energy utilization.

[0019] Please refer to the following: Figure 1 as well as Figure 2 , Figure 1 The schematic diagram illustrates application scenarios of the energy storage system control method in some embodiments of this application. Figure 2 The diagram illustrates the connection relationship between an energy storage system, electrical equipment, photovoltaic power generation equipment, and power grid provided in some embodiments of this application.

[0020] like Figure 1 as well as Figure 2 As shown, this application scenario includes an energy storage system 100. The energy storage system 100 includes a control device 110, a battery pack 120, and a bidirectional inverter 130. The control device 110 is electrically connected to both the battery pack 120 and the bidirectional inverter 130. The number of battery packs 120 is one or more, and each battery pack 120 includes one or more individual cells (…). Figure 2 (Not shown).

[0021] The energy storage system 100 can be used as an energy storage power station, a secondary battery pack, an uninterruptible power supply, or any other suitable form / type of equipment or device. The battery pack 120 can be a storage battery (such as a lead-acid battery), a lithium battery (such as a lithium iron phosphate battery, a ternary lithium battery), or other battery packs. It is understood that when the energy storage system includes multiple battery packs 120, the embodiments of this application can connect the multiple battery packs 120 in series, in parallel, or in a mixed connection (including series and parallel) according to actual needs.

[0022] For example, each battery pack 120 is configured with multiple types of sensors to detect and collect various operating status data of the battery pack 120. For instance, in some embodiments, each battery pack 120 is configured with current sensors, voltage sensors, and temperature sensors, thereby using current sensors, voltage sensors, and temperature sensors to detect and collect current, voltage, and temperature of the battery pack 120.

[0023] The control device 110 is communicatively connected to various types of sensors and acquires operational status data (such as current, voltage, and temperature) of the battery pack 120 from these sensors. Based on this data, it calculates and obtains electrical data (such as state of charge) of the battery pack 120. The control device 110 executes charging and discharging control operations of the energy storage system according to the electrical data and energy storage parameters of the battery pack 120, thereby implementing the energy storage system control method provided below. It should be understood that the control device 110 can be any suitable type of component or device, such as a microcontroller, FPGA chip, or microcontroller; this application embodiment does not impose any specific limitations on it.

[0024] The energy storage system 100 is electrically connected to the electrical equipment 200, the photovoltaic power generation equipment 300, and the power grid 400, and the power grid 400 is also electrically connected to the electrical equipment 200. The bidirectional inverter 130 can convert direct current to alternating current and vice versa.

[0025] The photovoltaic power generation equipment 300 can be any suitable type of photovoltaic power generation device or equipment. The electrical equipment 200 includes any suitable type of device or equipment, such as household appliances (e.g., refrigerators, air conditioners), office equipment (e.g., electrical appliances, printers), communication equipment (e.g., smartphones, routers), etc.

[0026] The bidirectional inverter 130 has a built-in or external DC / DC conversion module and a DC / AC conversion module. Its power ports are electrically connected to the battery pack 120, the photovoltaic power generation equipment 300, the electrical equipment 200, and the power grid 400 via power cables. The control device 110 (e.g., MCU / microcontroller) is communicatively connected to the battery management system (BMS) of the battery pack 120 and the drive control port of the bidirectional inverter 130 via signal lines / communication buses.

[0027] The photovoltaic power generation device 300 is configured to generate electricity using solar energy, supplying power to the energy storage system 100 and the electrical equipment 200. The output DC power is fed into the DC bus of the bidirectional inverter 130, and after MPPT (Maximum Power Point Tracking) voltage conversion by the DC / DC converter module, it is output to the battery pack 120 to charge the battery pack 120. The bidirectional inverter 130 can also invert the DC bus voltage into AC power to supply the electrical equipment 200 or feed it into the power grid 400. The AC power from the power grid 400 can also be rectified and stepped down by the bidirectional inverter 130 to charge the battery pack 120, or directly output as AC power to the electrical equipment 200.

[0028] The control device 110 collects operating status data of the battery pack 120 through sensors (such as current / voltage / temperature), calculates the state of charge (SOC), and sends PWM drive signals or protocol control commands to the bidirectional inverter 130 to adjust the duty cycle or operating mode (such as rectification / inversion) of the internal switching transistors of the bidirectional inverter 130, thereby performing closed-loop regulation of charging and discharging power. The entire charging and discharging strategy is calculated entirely within the local control device 110 and does not rely on cloud computing power.

[0029] For example, embodiments of this application perform the following operations to control the charging and discharging of the energy storage system.

[0030] First, obtain the preset energy storage parameters. These parameters include the time-of-use electricity price table, the minimum allowable charge value of the battery pack, and the maximum allowable charge value. The time-of-use electricity price table is used to represent the electricity price for each time period within a natural day configured by date type.

[0031] Next, the depletion ratio is calculated based on the battery pack's maximum permissible charge and current charge. The remaining charge ratio is calculated based on the battery pack's minimum permissible charge, maximum permissible charge, and current charge. The current charge value represents the battery pack's state of charge at the current moment.

[0032] Then, the charging threshold price is calculated based on the target electricity price data and the power shortage ratio. The discharging threshold price is calculated based on the target electricity price data and the surplus power ratio. The target electricity price data includes the electricity prices for each time period from the current time of day to the end time of the current calendar day in the time-of-use electricity price table.

[0033] Ultimately, the charging and discharging of the energy storage system is controlled based on the current real-time electricity price, the charging threshold price, and the discharging threshold price. The current real-time electricity price refers to the electricity price for the current time period.

[0034] The above methods enable flexible control of charging and discharging by combining the energy storage system's own state of charge with time-of-use electricity price changes, thereby ensuring that the battery pack's state of charge is within a reasonable range and improving the adaptability of the energy storage system's charging and discharging control.

[0035] It should be understood that, Figure 1 and Figure 2 The embodiments shown are merely illustrative of one scenario for controlling the charging and discharging of an energy storage system in some embodiments of this application, and do not impose any specific limitations on the structure, type, or quantity of the energy storage system and control device in other embodiments. For example, in some other embodiments, the energy storage system may also include more than Figure 2 The structure shown has more or fewer components, or has the same as Figure 2 The structures shown have different configurations.

[0036] To facilitate understanding of the energy storage system control method provided in the embodiments of this application, the control device provided in the embodiments of this application will be described in detail first.

[0037] Please see Figure 3 , Figure 3 A schematic diagram of the structure of a control device provided in some embodiments of this application is shown.

[0038] See Figure 3 As shown, the control device 110 includes at least one processor 111 and at least one memory 112 connected in communication. Figure 3 Taking a bus system 113, a processor 111, and a memory 112 as an example, the various components in the control device 110 are coupled together through the bus system 113, which is used to realize the connection and communication between the various components. It is easy to understand that the bus system 113 may include a power bus, control bus, and status signal bus, in addition to a data bus; however, for clarity and brevity, these will not be discussed further. Figure 3 In this designation, all buses are labeled as Bus System 113. Understandably, Figure 3 The structures shown in the embodiments are merely illustrative and do not limit the structure of the control device described above. For example, the control device may also include components that are more... Figure 3 The structure shown has more or fewer components, or has the same as Figure 3 The diagram shows different configurations of the structure.

[0039] Specifically, the processor 111 provides computational and control capabilities to support the control device 110 in executing corresponding business logic and functions. For example, it supports the control device 110 in executing the energy storage system control method provided in the embodiments of this application, or in executing the steps in any possible implementation of the energy storage system control method provided in the embodiments of this application. It is understood that the processor 111 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), or other processors. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0040] The memory 112, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, instructions, and modules, such as the programs, instructions, and modules corresponding to the energy storage system control method in the embodiments of this application. In some embodiments, the memory 112 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function, and the data storage area may store data created according to the use of the processor 111. The processor 111 executes various functional applications and data processing of the control device 110 by running the non-transitory software programs, instructions, and modules stored in the memory 112, thereby implementing the energy storage system control method provided in the embodiments of this application, or executing the steps in any possible implementation of the energy storage system control method provided in the embodiments of this application. In some embodiments, the memory 112 may include high-speed random access memory and may also include non-transitory memory. For example, at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 112 may also include memory remotely located relative to the processor 111, and these remotely located memories may be connected to the processor 111 through a communication network. It is understood that examples of the aforementioned communication networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0041] As can be understood from the above, the entity implementing the energy storage system control method provided in this application embodiment can be any suitable type of control device with certain computing and control capabilities, such as the control device 110 described above. In some implementations, the energy storage system control method provided in this application embodiment can be implemented by a processor executing program instructions stored in a memory.

[0042] The following will describe in detail the energy storage system control method provided in the embodiments of this application, with reference to exemplary applications and implementations of the control device provided in the embodiments of this application.

[0043] Please see Figure 4 As shown, the energy storage system control method provided in this application includes steps S41 to S46 to achieve the control of charging and discharging of the energy storage system.

[0044] Step S41: Obtain the preset energy storage parameters.

[0045] Energy storage parameters include a time-of-use (TOU) electricity price table, the minimum allowable state of charge (SOC) value of the battery pack, and the maximum allowable SOC value. The TOU electricity price table is used to represent the electricity price for each time period within a natural day configured by date type. Among them, the minimum allowable SOC value limits the lowest SOC value that the battery pack is allowed to reach, and the maximum allowable SOC value limits the highest SOC value that the battery pack is allowed to reach.

[0046] Determine the source of the energy storage system's parameter configuration. The source can be the energy storage system's local storage module or a cloud management platform (such as a server). Obtain the energy storage parameters from the parameter configuration source. The energy storage parameters should include at least the time-of-use electricity price meter, the minimum allowable charge value of the battery pack, and the maximum allowable charge value.

[0047] The time-of-use (TOU) electricity price meter includes at least one date type and the electricity price for multiple time periods within each calendar day corresponding to that date type. Users can modify the TOU electricity price meter according to local electricity price regulations, for example, through the human-machine interface of the energy storage system, to adapt to changes in local electricity price regulations.

[0048] For example, in some embodiments, the time-of-use electricity price table is shown in Table 1 below. It is understood that the time-of-use electricity price table shown in Table 1 is merely illustrative and does not impose any limitations on the date type, time period division, electricity price of each time period, or any other aspects of the time-of-use electricity price table in other embodiments.

[0049] Table 1:

[0050] According to Table 1, the date types include weekdays and holidays. Both weekdays and holidays consist of 7 time periods. The electricity prices for off-peak, average, and peak periods on weekdays are RMB 0.30 / kWh, RMB 0.60 / kWh, and RMB 1.15 / kWh, respectively. The electricity prices for off-peak, average, and peak periods on holidays are RMB 0.40 / kWh, RMB 0.70 / kWh, and RMB 1.25 / kWh, respectively. Generally, weekdays include Monday to Friday, and holidays include Saturday and Sunday. It can be understood that any day from Monday to Sunday is a calendar day, which consists of 24 hours. These 24 hours are divided into multiple time periods, and the electricity price for each time period may be the same or different. Each time period can be considered an off-peak, average, or peak period.

[0051] Step S42: Calculate the percentage of battery depletion based on the maximum allowable charge value and the current charge value of the battery pack.

[0052] In this embodiment, the current charge value is the state of charge value of the battery pack at the current moment.

[0053] For example, the current state of charge (SOC) of the battery pack is obtained by real-time acquisition or estimation of the SOC value of the battery pack at the current moment through the battery management system. The SOC difference between the maximum permissible SOC value and the current SOC value is calculated, and this SOC difference is used to characterize the remaining SOC space of the battery pack from the current SOC value to the maximum permissible SOC value.

[0054] The charge deficit ratio is calculated based on the charge difference and the maximum permissible charge value; that is, the ratio of the charge difference to the maximum permissible charge value is determined as the charge deficit ratio. The charge deficit ratio is used to characterize the remaining rechargeable state of the current charge value relative to the maximum permissible charge value.

[0055] In this embodiment, the power shortage ratio is expressed as "the ratio of the difference between the maximum allowable charge value and the current charge value to the maximum allowable charge value". Therefore, the lower the current charge value, the larger the power shortage ratio, indicating that the battery pack has a higher remaining rechargeability and a higher charging demand; the closer the current charge value is to the maximum allowable charge value, the smaller the power shortage ratio, the lower the remaining rechargeability of the battery pack, and the lower the charging demand.

[0056] In some implementations, the embodiments of this application calculate the power shortage ratio based on the maximum allowable charge value and the current charge value of the battery pack through steps S421 to S422.

[0057] Step S421: Determine the first charge difference as the difference between the maximum allowable charge value and the current charge value.

[0058] Step S422: Determine the ratio of the first charge difference to the maximum allowable charge value as the power shortage ratio.

[0059] For example, the embodiments of this application are based on the formula: Calculate the power shortage ratio.

[0060] In the above formula, The percentage of power shortage, For the maximum permissible charge value, This is the current charge value. This is the first charge difference.

[0061] Step S43: Calculate the margin ratio based on the minimum allowable charge value, maximum allowable charge value, and current charge value of the battery pack.

[0062] For example, the difference between the maximum allowable charge value and the minimum allowable charge value is calculated, and this difference is used to characterize the available charge range of the battery pack within the allowable state of charge range.

[0063] Calculate the charge difference between the current charge value and the minimum allowable charge value. This charge difference is used to characterize the remaining dischargeable space of the current charge value relative to the minimum allowable charge state.

[0064] The margin ratio is calculated based on the difference in charge and the difference in charge range. That is, the ratio of the difference in charge between the current charge value and the minimum allowable charge value to the difference in charge range is determined as the margin ratio.

[0065] The discharge margin ratio characterizes the discharge margin of the battery pack relative to the minimum allowable charge value under the current state of charge. The closer the current charge value is to the maximum allowable charge value, the larger the discharge margin ratio, and the more abundant the electrical energy that the battery pack can release. Conversely, the closer the current charge value is to the minimum allowable charge value, the smaller the discharge margin ratio, and the more limited the electrical energy that the battery pack can release.

[0066] In some implementations, the embodiments of this application calculate the margin ratio based on the minimum allowable charge value, the maximum allowable charge value, and the current charge value of the battery pack through steps S431 to S433.

[0067] Step S431: Determine the difference between the current charge value and the minimum allowable charge value as the reference charge difference value.

[0068] Step S432: Determine the difference between the maximum allowable charge value and the minimum allowable charge value as the second charge difference value.

[0069] Step S433: Determine the ratio of the reference charge difference to the second charge difference as the margin ratio.

[0070] For example, the embodiments of this application are based on the formula: Calculate the surplus power ratio.

[0071] In the above formula, For the proportion of surplus electricity, For the maximum permissible charge value, For the minimum allowable charge value, This is the current charge value. For reference charge difference, This is the second charge difference.

[0072] Step S44: Determine the power shortage price difference by multiplying the power shortage ratio by the difference between the first electricity price and the power shortage price difference by determining the sum of the power shortage price difference and the future minimum electricity price as the charging threshold price.

[0073] The target electricity price data includes the electricity price for each time period in the time-of-use electricity price table, from the current time of day to the end time of the current day.

[0074] For example, the target date type is determined based on the current natural day, and the time-of-use electricity price table is matched with the electricity price period corresponding to the target date type and the electricity price of each electricity price period to obtain the time-of-use electricity price data corresponding to the current natural day.

[0075] The target electricity price data is selected from the time-of-use electricity price data, which includes the electricity prices for each future time period from the current time of the current calendar day to the end time of the current calendar day. The data is then arranged in chronological order according to the time of each time period.

[0076] Understandably, the charging threshold price is used to characterize the highest charging price that an energy storage system can accept at its current state of charge. When the power shortage ratio is large, it indicates that the battery pack's current charge value is low and the charging demand is high. Appropriately increasing the charging threshold price allows the energy storage system to charge during periods of higher electricity prices. Conversely, when the power shortage ratio is small, it indicates that the battery pack's current charge value is high and the charging demand is low. Lowering the charging threshold price allows the energy storage system to prioritize charging during periods of lower electricity prices.

[0077] In this embodiment, a higher power shortage ratio indicates a larger capacity for the battery pack to accept electricity. The charging threshold price increases with the power shortage ratio; that is, the higher the power shortage ratio, the closer the charging threshold price is to the future weighted average electricity price. This makes it easier for the current real-time electricity price to meet the condition of being less than or equal to the charging threshold price, thereby expanding the range of electricity prices that the battery pack can accept for charging. This allows the energy storage system to more actively utilize low-price periods for charging when the power shortage is high.

[0078] In some implementations, the present application embodiments calculate the charging threshold price through steps S441 to S442.

[0079] Step S441: Determine the product of the power shortage ratio and the difference between the first electricity price and the power shortage price.

[0080] Step S442: Determine the charging threshold price as the sum of the power shortage price difference and the future minimum electricity price.

[0081] In this embodiment of the application, the future median electricity price and the future minimum electricity price are the median electricity price and the minimum electricity price in the target electricity price data, respectively, and the first electricity price difference is the difference between the future median electricity price and the future minimum electricity price.

[0082] The embodiments of this application are based on the formula: Calculate the charging threshold price. In the above formula, This is the entry-level price for charging. To be the lowest electricity price in the future For the future median electricity price, The percentage of power shortage, This is the first electricity price difference. This is for the price difference due to power shortages.

[0083] The future lowest electricity price represents the lowest price level for the remaining time of the current calendar day, indicating the "ideal purchase price" for energy storage systems when electricity supply is abundant. The future median electricity price represents the median price level for the remaining time of the current calendar day, indicating the "psychological bottom-line purchase price" for energy storage systems when electricity is scarce—that is, when battery packs are severely depleted, purchasing at a price below the median price level would be considered. (Power shortage ratio) It serves as a quantitative indicator of the battery pack's power shortage and is used as a weighting coefficient to dynamically adjust the charging threshold price between the future minimum electricity price and the future median electricity price.

[0084] It is worth noting that the formula is: The core issue is: setting a minimum charging price. Dynamic changes within the range. When the power shortage ratio... When the battery level approaches 1 (i.e., the battery pack is severely depleted), the charging threshold price approaches the future median electricity price, making it easier for the energy storage system to trigger charging. Depletion Ratio When the battery level is close to zero (i.e., the battery pack has sufficient charge), the charging threshold price approaches the lowest future electricity price, and the energy storage system will only trigger charging operations when the price is extremely low. This achieves an adaptive control logic where "the lower the battery level, the more lenient the electricity purchase conditions; the higher the battery level, the more stringent the electricity purchase conditions."

[0085] Step S45: The product of the surplus power ratio and the difference between the second electricity price is determined as the surplus power price difference, and the difference between the future highest electricity price and the surplus power price difference is determined as the discharge threshold price.

[0086] It is understandable that the discharge threshold price is used to characterize the lowest acceptable discharge price for an energy storage system under its current state of charge. When the margin of excess charge is large, it indicates that the battery pack has a high current charge and sufficient release capacity. Appropriately lowering the discharge threshold price allows the energy storage system to discharge during periods of lower electricity prices. When the margin of excess charge is small, the battery pack's current charge is close to the minimum allowable charge and the release capacity is small. Raising the discharge threshold price allows the energy storage system to prioritize discharge during periods of higher electricity prices, thereby preventing the battery pack from prematurely consuming its available capacity.

[0087] In some implementations, the present application embodiments calculate the discharge threshold price through steps S451 to S452.

[0088] Step S451: Determine that the product of the surplus electricity ratio and the difference between the second electricity price is the surplus electricity price difference.

[0089] Step S452: Determine the difference between the future maximum electricity price and the surplus electricity price as the discharge threshold price.

[0090] The highest future electricity price is the highest price among the target electricity price data, and the second price difference is the difference between the highest future electricity price and the median future electricity price. The discharge threshold price is greater than the charging threshold price.

[0091] The embodiments of this application are based on the formula: Calculate the discharge threshold price. In the above formula, This is the threshold price for discharge. This will be the highest electricity price in the future. For the future median electricity price, For the proportion of surplus electricity, This is the second electricity price difference. This is for the price difference of Yudian.

[0092] The future highest electricity price represents the highest price level for the remaining time of the current calendar day. This indicates the "ideal selling price" for the energy storage system when battery power is scarce—meaning that when battery power is insufficient, the energy storage system will continue discharging until the highest price to protect scarce power reserves, only selling when the price is close to the peak of the day's electricity price. The future median electricity price represents the medium price level for the remaining time of the current calendar day. This indicates the "psychological floor selling price" for the energy storage system when power is abundant—meaning that when battery power is sufficient, selling can be considered at a price above the medium price level, without waiting for the highest price, to quickly release excess power and lock in arbitrage profits. (Power surplus ratio) It is a quantitative indicator of the battery pack's charge adequacy and is used as a weighting coefficient to dynamically adjust the discharge threshold price between the future median electricity price and the future highest electricity price.

[0093] Understandably, the formula is: The core issue is: setting a minimum discharge threshold price. Dynamic changes within the range. When the surplus power ratio... When the battery pack's charge level approaches 1 (fully charged), the discharge threshold price is close to the future median electricity price, making it easier for the energy storage system to trigger discharge operations (willing to sell electricity); when the surplus charge ratio is close... When the battery level approaches zero (insufficient battery power), the discharge threshold price approaches the highest future electricity price. The energy storage system will only trigger discharge operation (withholding electricity from sale) when the price is extremely high. This achieves an adaptive control logic where "the higher the battery level, the more lenient the selling conditions; the lower the battery level, the more stringent the selling conditions," forming a symmetrical economic decision-making closed loop with the charging threshold price.

[0094] It is understood that the embodiments of this application limit the charging threshold price to between the future lowest electricity price and the future median electricity price, and limit the discharging threshold price to between the future median electricity price and the future highest electricity price. The charging threshold price and the discharging threshold price are symmetrically distributed with the future median electricity price as the boundary. This design has the following technical advantages.

[0095] 1. Ensuring the basic economic logic of buying low and selling high: Energy storage systems only buy when electricity prices are in a low price range (i.e., the range between the future lowest electricity price and the future median electricity price) and sell when prices are in a high price range (i.e., the range between the future median electricity price and the future highest electricity price), fundamentally guaranteeing the positive profit margin of arbitrage behavior.

[0096] 2. Naturally Formed Dynamically Floating Price Zones: The upper limit of the charging threshold price and the lower limit of the discharging threshold price are both the future median electricity price, and the charging threshold price and the discharging threshold price are seamlessly connected within the neighborhood of the future median electricity price. When the current real-time electricity price fluctuates slightly around the future median electricity price, the energy storage system neither meets the charging nor discharging conditions and enters a standby state. This avoids frequent switching of charging and discharging operations due to critical fluctuations in electricity prices, effectively extending the service life of the energy storage system.

[0097] 3. Real-time adaptive core parameters: The charging threshold price and discharging threshold price are updated in each control cycle according to the change of the current charge value of the battery pack, without the need for manual intervention, thus eliminating the dependence on fixed time periods or preset thresholds.

[0098] The following two specific examples illustrate the calculation of the charging threshold price and the discharging threshold price.

[0099] Example 1: Calculating the charging threshold price.

[0100] Within the current control period, the target electricity price data includes the future minimum electricity price. Yuan / kWh, future median electricity price Yuan / kWh, the maximum allowable charge value of the battery pack Minimum allowable charge value .

[0101] Scenario 1 (Battery pack charge is low): Current charge value of the battery pack .

[0102] Substitute the known data into the formula for calculating the power shortage ratio to calculate the power shortage ratio. .

[0103] Substituting the known data into the charging threshold price calculation formula, the charging threshold price is calculated. Yuan / kWh.

[0104] Thus, when the current real-time electricity price is less than 0.534 yuan / kWh, the energy storage system is electrically connected to the grid to enable the grid to charge the battery pack. Since the charging threshold price is closer to the future median electricity price of 0.6 yuan / kWh, the charging conditions are relatively lenient, reflecting a "quick buy" strategy when the battery pack is short of power.

[0105] Scenario 2 (Battery pack charge is too high): Current charge value of the battery pack .

[0106] Substitute the known data into the formula for calculating the power shortage ratio to calculate the power shortage ratio. .

[0107] Substituting the known data into the charging threshold price calculation formula, the charging threshold price is calculated. Yuan / kWh.

[0108] Therefore, it is necessary to wait until the current real-time electricity price is less than 0.333 yuan / kWh before connecting the energy storage system to the grid to allow the grid to charge the battery pack. Since the charging threshold price is closer to the future lowest electricity price of 0.3 yuan / kWh, the charging conditions are quite stringent, reflecting a "wait for a low price" strategy when the battery pack has sufficient charge.

[0109] Example 2: Calculating the discharge threshold price.

[0110] The same electricity price environment as the example for calculating the charging threshold price (i.e., the lowest future electricity price) is used. Yuan / kWh, future median electricity price Yuan / kWh, the highest electricity price in the future (RMB / kWh). The maximum allowable charge value of the battery pack is... Minimum allowable charge value .

[0111] Scenario 1 (Battery pack charge is too high): Current charge value of the battery pack .

[0112] Substitute the known data into the formula for calculating the margin ratio to calculate the margin ratio. .

[0113] Substituting the known data into the discharge threshold price calculation formula, the discharge threshold price is calculated: Yuan / kWh.

[0114] Thus, when the current real-time electricity price is greater than or equal to 0.677 yuan / kWh, the energy storage system is controlled to perform a discharge operation. Among them, since the discharge threshold price is closer to the future median electricity price of 0.6 yuan / kWh, the discharge conditions are relatively lenient, reflecting the "willing to sell" strategy when the battery pack has sufficient power.

[0115] Scenario 2 (Low Battery Level): Current Charge Value of the Battery Pack .

[0116] Substitute the known data into the formula for calculating the margin ratio to calculate the margin ratio. .

[0117] Substituting the known data into the discharge threshold price calculation formula, we obtain: Yuan / kWh.

[0118] Therefore, the energy storage system must wait until the current real-time electricity price is greater than or equal to 1.034 yuan / kWh before it can be controlled to perform a discharge operation. In particular, since the discharge threshold price is closer to the future maximum electricity price of 1.15 yuan / kWh, the discharge conditions are extremely stringent, reflecting the "reluctance to sell" strategy when the battery pack has insufficient power—electricity is precious, and it will not be sold unless the maximum electricity price is reached, in order to protect the scarce power reserves.

[0119] The symmetrical relationship between the charging threshold price and the discharging threshold price is summarized in Table 2 below.

[0120] Table 2:

[0121] As shown in Table 2, the charging threshold price and the discharging threshold price are related to the future median electricity price. As the axis of symmetry, it moves synchronously in the opposite direction as the current charge value of the battery pack changes. The energy storage system is always "unhurried during low power periods and cautious during high power periods"—that is, when the battery pack has ample power, the energy storage system buys cautiously and sells generously; when the battery pack has a shortage of power, the energy storage system buys leniently and sells sparingly.

[0122] Step S46: Control the charging and discharging of the energy storage system based on the current real-time electricity price, charging threshold price, and discharging threshold price.

[0123] The current real-time electricity price refers to the electricity price for the time period in which the current moment occurs. For example, if the current calendar day is Tuesday, which is a workday, and the current time for the current calendar day is 09:25:35, according to Table 1, 09:25:35 falls within the 08:00-13:59 time period, and the electricity price for the 08:00-13:59 time period on a workday is 0.60 yuan / kWh. Therefore, the current real-time electricity price is 0.60 yuan / kWh.

[0124] For example, determine the time period in which the current moment is located, and obtain the electricity price of the time period in which the current moment is located as the current real-time electricity price.

[0125] The current real-time electricity price is compared with the charging threshold price. If the current real-time electricity price is less than the charging threshold price, the energy storage system is controlled to perform a charging operation, that is, the energy storage system is controlled to obtain power from the grid and charge the battery pack until the current real-time electricity price is greater than or equal to the charging threshold price or the state of charge value of the battery pack is greater than or equal to the maximum allowable charge value.

[0126] If the current real-time electricity price is greater than or equal to the charging threshold price, the charging conditions for the future period are determined based on the target electricity price data and the energy demand for the future period. Based on these conditions, it is determined whether to control the energy storage system to perform a charging operation. If the current real-time electricity price meets the charging conditions, the energy storage system is controlled to perform a charging operation; if the current real-time electricity price does not meet the charging conditions, the energy storage system is controlled not to perform a charging operation.

[0127] The current real-time electricity price is compared with the discharge threshold price. If the current real-time electricity price is greater than or equal to the discharge threshold price, the energy storage system is controlled to perform a discharge operation, that is, the battery pack is controlled to output electrical energy to the load (electrical equipment) or to transmit electrical energy to the grid, until the current real-time electricity price is less than the discharge threshold price or the state of charge value of the battery pack is less than or equal to the minimum allowable charge value.

[0128] When the current real-time electricity price is greater than or equal to the charging threshold price and less than the discharging threshold price, the energy storage system is controlled to stop charging and discharging operations to avoid performing charging and discharging operations with low economic returns under the current electricity price conditions, and the load (i.e., electrical equipment) is powered by the grid.

[0129] This application embodiment dynamically determines the charging threshold price and discharging threshold price by combining the current state of charge of the battery pack, the allowable charge range, and the electricity price for future periods. It then controls the charging and discharging of the energy storage system based on a comparison between the current real-time electricity price and the dynamically calculated charging and discharging threshold prices. Charging or discharging operations are executed when the corresponding conditions are met. This achieves flexible control of charging and discharging by combining the energy storage system's own state of charge with changes in time-of-use electricity prices, thereby ensuring that the battery pack's state of charge is within a reasonable range. This improves the adaptability of the energy storage system's charging and discharging control, eliminates the need to upload data to the cloud to utilize external computing power and networks to generate charging and discharging plans for the energy storage system, reduces the operating costs of the energy storage system, and improves the economic efficiency of energy utilization.

[0130] In some implementations, the embodiments of this application achieve control of the charging and discharging of the energy storage system based on the current real-time electricity price, the charging threshold price, and the discharging threshold price through steps S461 to S464.

[0131] Step S461: In response to the current real-time electricity price being less than the charging threshold price, control the energy storage system to connect electrically to the grid so that the grid can charge the battery pack.

[0132] For example, when the current real-time electricity price is less than the charging threshold price, this embodiment of the application controls the energy storage system to maintain an electrical connection with the power grid, allowing the power grid to continuously charge the battery pack. During the continuous charging process, the state of charge (SOC) value of the battery pack is continuously monitored until the current real-time electricity price is greater than or equal to the charging threshold price, or the SOC value of the battery pack is greater than or equal to the maximum allowable SOC value. At this point, the electrical connection between the energy storage system and the power grid is disconnected, causing the power grid to stop charging the battery pack. Disconnecting the electrical connection between the energy storage system and the power grid means not removing the physical charging circuit between the energy storage system and the power grid, but simply shutting off the physical charging circuit between the energy storage system and the power grid, thus stopping the power grid from charging the battery pack.

[0133] Step S462: In response to the current real-time electricity price being greater than or equal to the charging threshold price, based on the current real-time electricity price, maximum load power, safety margin factor, rated capacity, rated charging power, and target electricity price data, control the energy storage system to disconnect the electrical connection with the power grid so that the grid suspends charging the energy storage system, or control the energy storage system to connect the electrical connection with the grid so that the grid charges the battery pack.

[0134] In this embodiment, the energy storage parameters also include maximum load power, safety margin factor, rated capacity of the battery pack, and rated charging power of the energy storage system.

[0135] Among them, maximum load power refers to the maximum power demand of electrical equipment, and safety margin factor The value can be any value within the interval [1.1, 1.2] (i.e.) This is used to reduce or eliminate power fluctuation errors in electrical equipment.

[0136] The rated capacity of a battery pack refers to the maximum storage capacity specified by the manufacturer, such as a rated capacity of 10 kWh. The rated charging power of an energy storage system refers to the charging power specified by the manufacturer.

[0137] Based on the current real-time electricity price, maximum load power, safety margin factor, rated capacity, rated charging power, and target electricity price data, the embodiments of this application determine the charging conditions for future periods. When the current real-time electricity price meets the charging conditions, the energy storage system is controlled to perform a charging operation (i.e., the energy storage system is electrically connected to the grid so that the grid charges the battery pack); when the current real-time electricity price does not meet the charging conditions, the energy storage system is controlled not to perform a charging operation (i.e., the energy storage system is electrically disconnected from the grid so that the grid suspends charging the energy storage system).

[0138] In some implementations, step S462 includes steps S4621 to S4627.

[0139] Step S4621: Determine the peak power demand value by multiplying the maximum load power, peak duration, and safety margin factor.

[0140] In this embodiment, the peak duration is the duration of the target peak period. The target peak period is the period with the highest electricity price that is closest to the current period in the target electricity price data. The current period is the period in which the current moment occurs. The peak electricity demand value refers to the electricity required by electrical equipment (load) during the duration of the target peak period.

[0141] For example, the current day is Tuesday, which is a workday; the current time of the current day is 10:36:32. According to Table 1, 10:36:32 falls within the 08:00-13:59 time period, that is, the current time period is 08:00-13:59. The time period with the highest electricity price in the target electricity price data that is closest to the current time period (08:00-13:59) is 14:00-14:59, that is, the target peak time period is 14:00-14:59. The duration of the target peak time period (i.e., 14:00-14:59) is 1 hour, that is, the peak duration is 1 hour.

[0142] For example, embodiments of this application are based on the formula: Calculate the peak electricity demand value. In the above formula, This represents the peak electricity demand value. For maximum load power, For peak duration, This is the safety margin coefficient.

[0143] Step S4622: Determine the product of the reference charge difference and the rated capacity as the available power.

[0144] The reference charge difference is the difference between the current charge value and the minimum allowable charge value.

[0145] For example, embodiments of this application are based on the formula: Calculate the available power. Among them, Available power. For the minimum allowable charge value, This is the current charge value. For reference charge difference, This is the rated capacity.

[0146] Step S4623: Determine the ratio of the reference power difference to the rated charging power as the charging time.

[0147] The reference power difference is the difference between the peak power demand and the available power. The charging time refers to the charging time required to make up for the reference power difference.

[0148] For example, the embodiments of this application are based on the formula: Calculate the recharging time. In the above formula, To extend the charging time, This represents the peak electricity demand value. Available power. For reference, the difference in battery power. , This is the rated charging power.

[0149] Step S4624: Determine the difference between the start time of the target peak period and the current time as the remaining duration.

[0150] The remaining time refers to the time interval between the current moment and the start of the target peak period.

[0151] For example, embodiments of this application are based on the formula: Calculate the remaining time. In the formula above, For the remaining time, This refers to the starting time of the target peak period. This refers to the current moment.

[0152] Step S4625: Determine the lowest electricity price in the target electricity price data from the current time to the start time as the reference electricity price.

[0153] As in the aforementioned embodiment, the current calendar day is Tuesday, a workday; the current time of the current calendar day is 12:12:54. According to Table 1, 12:12:54 falls within the 08:00-13:59 time period, meaning the current time period is 08:00-13:59. The target peak time period is 14:00-14:59, and the start time of the target peak time period (i.e., 14:00-14:59) is 14:00:00. The lowest electricity price in the target electricity price data between the current time (i.e., 12:12:54) and the start time (i.e., 14:00:00) is selected as the reference electricity price. The lowest electricity price between 12:12:54 and 14:00:00 is 0.60 yuan / kWh, meaning the reference electricity price is 0.60 yuan / kWh.

[0154] Step S4626: In response to the satisfaction of any one of the first, second, third and fourth conditions, control the disconnection of the electrical connection between the energy storage system and the power grid, so that the power grid suspends charging of the energy storage system.

[0155] The first condition is that the reference power difference is less than or equal to zero (i.e.: The first condition indicates that the battery pack has sufficient remaining power to meet peak power demand, therefore no charging is required.

[0156] The second condition is that the difference in reference electricity consumption is greater than zero, the reference electricity price is less than the current real-time electricity price, and the remaining duration is greater than the recharge duration (i.e., and and ),in, For reference electricity prices, The first condition is the current real-time electricity price. The second condition indicates that there is still enough time to recharge before a period of lower electricity prices arrives, therefore there is no need to recharge immediately; recharging can be done when even lower electricity prices appear in the future.

[0157] The third condition is that the reference electricity difference is greater than zero, the reference electricity price is less than the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is greater than or equal to the target peak electricity price (i.e.: and and and ).in, The target peak electricity price is the price during the target peak period. For example, if the target peak period is 14:00-14:59, then the target peak electricity price is 1.15 yuan / kWh during that period. The third condition indicates that although a lower electricity price may be available in the future, there is insufficient time to wait. If the current real-time electricity price is higher than or equal to the price during the target peak period, then there is no arbitrage opportunity, and the energy storage system is not charged, thus abandoning the replenishment.

[0158] The fourth condition is that the reference electricity difference is greater than zero, the reference electricity price is greater than or equal to the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is greater than or equal to the target peak electricity price (i.e., and and The fourth condition indicates that there is insufficient time remaining to wait, and the current real-time electricity price is the lowest price before the target peak period. However, if the current real-time electricity price is more expensive or the same as the price during the target peak period, it is determined that there is no arbitrage opportunity, and the energy storage system is not charged, thus abandoning the replenishment.

[0159] For example, when any one of the first, second, third, and fourth conditions is met, the embodiments of this application control the energy storage system to disconnect the electrical connection with the power grid so that the power grid suspends charging the energy storage system.

[0160] Step S4627: In response to the satisfaction of the fifth or sixth condition, control the energy storage system to connect electrically to the grid so that the grid charges the battery pack.

[0161] The fifth condition is that the reference electricity difference is greater than zero, the reference electricity price is less than the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is less than the target peak electricity price (i.e.: and and and The fifth condition indicates that although there may be lower electricity prices in the future, there is not enough time left to wait. Thus, when the current real-time electricity price is lower than the target peak-hour electricity price, there is an arbitrage opportunity to control the energy storage system to charge.

[0162] The sixth condition is that the reference electricity difference is greater than zero, the reference electricity price is greater than or equal to the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is less than the target peak electricity price (i.e.: and and The sixth condition indicates that there is insufficient time remaining to wait, the current real-time electricity price is the lowest price before the target peak period, the current real-time electricity price is lower than the price during the target peak period, there is arbitrage opportunity, and the energy storage system is controlled to charge.

[0163] For example, when the fifth or sixth condition is met, the embodiments of this application control the energy storage system to connect electrically with the power grid so that the power grid charges the battery pack.

[0164] Step S463: In response to the current real-time electricity price being lower than the discharge threshold price, control the energy storage system to stop charging and discharging.

[0165] Step S464: In response to the current real-time electricity price being greater than or equal to the discharge threshold price, control the energy storage system to discharge.

[0166] For example, when the current real-time electricity price is less than the discharge threshold price, it indicates that the current real-time electricity price is a low selling price, and in this embodiment of the application, the energy storage system is controlled to stop charging and discharging operations. Conversely, when the current real-time electricity price is greater than or equal to the discharge threshold price, it indicates that the current real-time electricity price is a high selling price, and the energy storage system is controlled to perform a discharge operation, outputting electrical energy to the load (electrical equipment) or transmitting electrical energy to the grid.

[0167] Understandably, during the discharge operation of the energy storage system, when the current charge value of the battery pack is detected... Reduce to minimum permissible charge value At this time, the energy storage system is controlled to stop discharging, thereby ensuring that the battery pack is not over-discharged and damaged or poses other safety risks.

[0168] In some embodiments, the energy storage system control method provided in this application further includes steps S51 to S56.

[0169] Step S51: Collect the power consumption of electrical equipment and the power generation of photovoltaic power generation equipment at a preset sampling period.

[0170] Energy storage parameters also include the rated capacity of the battery pack and the sunset time. The sunset time refers to the time of sunset at the location of the energy storage system. The time can be entered by the user through the energy storage system's interactive interface, or set to the default time of 18:00.

[0171] Engineers can customize the sampling period according to actual needs. For example, in this embodiment, the preset sampling period collects the power consumption of electrical equipment and the power generation of photovoltaic power generation equipment. The power consumption of electrical equipment refers to the real-time power during operation, and the power generation of photovoltaic power generation equipment refers to the real-time power generation during power generation.

[0172] Step S52: In response to the fact that the power generation is greater than the power consumption, the difference between the power generation and the power consumption is determined as surplus power.

[0173] For example, in this embodiment of the application, the power generation is compared with the power consumption to determine whether the electrical energy provided by the photovoltaic power generation equipment meets the power requirements of the electrical equipment. When the comparison finds that the power generation is greater than the power consumption, it indicates that the electrical energy provided by the photovoltaic power generation equipment can meet the power requirements of the electrical equipment, and there is a surplus in the power generation, according to the formula: Calculate the surplus power. Among them, To provide surplus power, For power generation capacity, This represents the power consumption.

[0174] Step S53: Calculate the power replenishment limit duration based on the surplus power, maximum allowable charge value, current charge value, and rated capacity.

[0175] In this embodiment, the charging limitation time refers to the time required for the battery pack to charge from its current charge value to its maximum allowable charge value using excess power.

[0176] For example, the amount of electricity the battery pack needs to be replenished is calculated based on the maximum permissible charge value, the current charge value, and the rated capacity. The replenishment limit duration is then calculated based on the required replenishment amount and the excess power.

[0177] In some implementations, the embodiments of this application calculate the power replenishment limitation duration based on the surplus power, the maximum allowable charge value, the current charge value, and the rated capacity through steps S531 to S533.

[0178] Step S531: Determine the difference between the maximum allowable charge value and the current charge value as the first charge difference value.

[0179] Step S532: Determine the product of the first charge difference and the rated capacity as the shortfall charge.

[0180] Step S533: Determine the ratio of the shortfall power to the surplus power as the power replenishment limit duration.

[0181] For example, the embodiments of this application are based on the formula: Calculate the power replenishment limitation duration. In the above formula, To limit the duration of power replenishment, For the maximum permissible charge value, This is the current charge value. This is the first charge difference. The rated capacity of the battery pack. This is the power shortage. This represents surplus power.

[0182] Step S54: Determine the difference between the sunset time and the current time as the remaining duration of illumination.

[0183] The remaining illumination duration refers to the time interval between the current moment and sunset.

[0184] For example, embodiments of this application are based on the formula: Calculate the remaining illumination duration. In the above formula, The remaining duration of illumination. It is sunset time. This refers to the current moment.

[0185] Step S55: According to Calculate the power change rate based on the power generation capacity and sampling period.

[0186] in, The power generation includes the power generation acquired in the current sampling period and the power generation from the previous sampling period. The power generation acquired in each sampling period. It is an integer greater than or equal to 2.

[0187] In this embodiment of the application, step S55 includes steps S551 to S553.

[0188] Step S551: Combine the power generation acquired in the current sampling period with... The difference between the power generation obtained in the earliest sampling period among the power generation units is determined as the reference power difference.

[0189] Step S552: Confirm The product of the sampling period and the sampling period is the sampling interval duration.

[0190] Step S553: ​​Determine the power change rate as the ratio of the reference power difference to the sampling interval duration.

[0191] For example, in the embodiments of this application, the most recent The power generation acquired in each sampling period (i.e., the power generation acquired in the current sampling period and the power generation acquired in the previous sampling period). The power generated in each sampling period is used as... One power generation capacity, and according to the formula: Calculate the rate of change of power.

[0192] In the above formula, The rate of change of power, The power generation acquired during the current sampling period. for The power generation acquired in the earliest sampling period of the power generation data. For reference power difference, The sampling period is This represents the sampling interval duration.

[0193] Step S56: Control the charging and discharging of the energy storage system based on the power replenishment limit duration, remaining illumination duration, and power change rate.

[0194] For example, it is determined whether the power replenishment limitation duration meets the duration threshold condition, whether the relationship between the power replenishment limitation duration and the remaining illumination duration meets the duration condition, and whether the power change rate meets the power stability condition. Based on the judgment results, the charging and discharging of the energy storage system is controlled.

[0195] In some implementations, the embodiments of this application achieve, through steps S561 to S562, control of the charging and discharging of the energy storage system based on the power replenishment limit duration, the remaining illumination duration, and the power change rate.

[0196] Step S561: In response to satisfying all of the first criterion, the second criterion, the third criterion, and the fourth criterion, and also satisfying one of the seventh and eighth conditions, control the energy storage system to be electrically connected to the grid so that the grid charges the battery pack.

[0197] Energy storage parameters also include power ratio coefficient, rate of change threshold, duration threshold, reserved charge ratio, and rated power of photovoltaic power generation equipment.

[0198] Among them, the reserved charge ratio This only applies to charging scenarios during off-peak hours; that is, it sets the upper limit of the battery pack's charging charge when the energy storage system is controlling charging operations during off-peak hours. It's understandable that the upper limit of the charging charge is set to... This is to reserve capacity for photovoltaic (PV) power generation equipment, preventing the grid from charging the battery packs to their maximum permissible charge value when the PV equipment has excess power, thus ensuring that the electricity generated by the subsequent PV power generation equipment has nowhere to be used. It should be understood that engineers can customize the reserved charge ratio according to actual needs. For example, the reserved charge ratio The value is taken from the charge range. Any one of the values ​​in the above, and the embodiments of this application do not limit this in any way.

[0199] The rate of change threshold is used to measure the degree of fluctuation in the power generation of photovoltaic power generation equipment. The duration threshold is used to characterize the maximum allowable time required to charge the battery pack to its maximum allowable charge value using the surplus power of the photovoltaic power generation equipment. It should be understood that engineers can customize the rate of change threshold and duration threshold according to actual needs, for example, the rate of change threshold can be set to 0.01 kW / min and the duration threshold can be set to 0.5 hours. This application embodiment does not impose any limitations on this.

[0200] In this embodiment, the rated power of the photovoltaic (PV) power generation equipment refers to the output power specified by the manufacturer at the time of manufacture. The power ratio coefficient is used to measure the flat-top power of the PV power generation equipment; that is, the flat-top power is the product of the rated power and the power ratio coefficient. When the power generation of the PV power generation equipment is greater than or equal to the flat-top power, it indicates that the PV power generation equipment is in a high-power flat-top period, with the power generation stably maintained in the high-power range, and the PV power generation equipment provides abundant electrical energy. It should be understood that engineers can customize the power ratio coefficient according to actual needs; for example, the power ratio coefficient can be set to a value of... Any value within the range is not limited in this embodiment.

[0201] The first criterion is that the duration of the power replenishment restriction is greater than or equal to the duration threshold (i.e.: ), This is the duration threshold. The first criterion condition indicates that grid connection is required when the power replenishment restriction duration is greater than or equal to the maximum allowable time (i.e., the duration threshold) required to charge the battery pack to its maximum allowable charge value using the surplus power of the photovoltaic power generation equipment. When the power replenishment restriction duration is less than the duration threshold (i.e., when the power replenishment restriction duration is less than the duration threshold...), the connection is terminated. When the surplus power of the photovoltaic power generation equipment is determined to be sufficient, it is determined that there is no need to connect to the grid.

[0202] The second criterion is that the remaining illumination time is less than or equal to the power replenishment limitation time (i.e.: The second criterion indicates that there is insufficient time before sunset to utilize the surplus power of the photovoltaic power generation equipment to charge the battery pack to its maximum permissible charge value, thus requiring grid connection. Conversely, when the remaining sunshine duration is greater than or equal to the supplementary power limit duration, it indicates that there is sufficient time before sunset to utilize the surplus power of the photovoltaic power generation equipment to charge the battery pack to its maximum permissible charge value, thus requiring no grid connection.

[0203] The third criterion is that the generated power is less than the product of the power ratio coefficient and the rated power, or the absolute value of the power change rate is greater than or equal to the change rate threshold (i.e.: or ). This is the power proportionality coefficient. Rated power, This represents the absolute value of the rate of change of power. The threshold for the rate of change is defined as follows. The third criterion indicates that the photovoltaic (PV) power generation equipment is not in a high-power plateau period, its power generation is not stably maintained in the high-power range, its power generation is unstable, and the PV power generation equipment provides weak electrical energy, thus requiring grid connection. This is determined when the power generation is greater than or equal to the product of the power ratio coefficient and the rated power, and the absolute value of the power change rate is less than the rate of change threshold (i.e.: and When the power output is high, it indicates that the photovoltaic power generation equipment is in a high-power plateau period, with the power generation output remaining stable in the high-power range. The photovoltaic power generation equipment provides abundant electrical energy, and it is determined that there is no need to connect to the power grid.

[0204] The fourth criterion is that the rate of change of power is less than or equal to zero (i.e.: The fourth criterion indicates that the photovoltaic power generation equipment has passed its peak or is in a period of decline, thus requiring grid connection. When the power change rate is greater than zero (i.e.: When the signal is positive, it indicates that the power generation of the photovoltaic power generation equipment is increasing, and it is determined that there is no need to connect to the grid.

[0205] The seventh condition is that the current real-time electricity price is less than the charging threshold price (i.e.) The seventh condition indicates that when the current real-time electricity price is lower than the charging threshold price, the purchase price is low, and the grid connection is established to purchase electricity. When the current real-time electricity price is greater than or equal to the charging threshold price (i.e.,...), the purchase price is lower. When the price is high, it indicates that the purchase price of electricity is too high and you should carefully consider buying electricity. You should temporarily refrain from connecting to the power grid to buy electricity.

[0206] The eighth condition is that the current real-time electricity price is less than the target peak electricity price (i.e.: The target peak electricity price is the electricity price during the target peak period. The eighth condition indicates that when the current real-time electricity price is less than the target peak price, there is a positive arbitrage profit. If the arbitrage condition is met, it is determined that the grid should be connected to purchase electricity. This applies when the current real-time electricity price is greater than or equal to the target peak price (i.e.: If there is no arbitrage opportunity, the power grid will not be connected to purchase electricity.

[0207] The reference charge value is the maximum permissible charge value, which means that the battery pack is allowed to charge to the maximum permissible charge value during non-off-peak periods (i.e., any period other than off-peak periods, such as peak or flat periods). Alternatively, the reference charge value is the maximum permissible charge value. With reserved charge ratio The difference (i.e., the upper limit of charging charge) This means that during off-peak hours, the battery pack is allowed to charge to its maximum charge limit. .

[0208] For example, when the first, second, third, and fourth criterion conditions are met, and one of the seventh and eighth conditions is also met, it indicates that the energy storage system needs to be connected to the power grid to charge the battery pack. In this embodiment, the energy storage system is electrically connected to the power grid so that the power grid can charge the battery pack. During the continuous charging of the battery pack by the power grid, the state of charge (SOC) value of the battery pack is continuously monitored until it is greater than or equal to a reference SOC value. At this point, the energy storage system is electrically disconnected from the power grid so that the power grid stops charging the battery pack.

[0209] Step S562: In response to the failure to meet any one or more of the first criterion, the second criterion, the third criterion, and the fourth criterion, or the satisfaction of all of the first criterion, the second criterion, the third criterion, and the fourth criterion, but the failure to meet the seventh and eighth conditions, maintain the photovoltaic power generation equipment charging the battery pack or control the energy storage system to stop charging and discharging.

[0210] For example, when any one or more of the first, second, third, and fourth criteria are not met, it means that the energy storage system does not need to be connected to the grid to use the grid to charge the battery pack. In this embodiment of the application, the photovoltaic power generation equipment is maintained to charge the battery pack or the energy storage system is controlled to stop charging and discharging operations.

[0211] Alternatively, in some embodiments, when all of the first, second, third, and fourth criteria are met and the seventh and eighth criteria are not met, it indicates that the energy storage system does not need to be connected to the grid to use the grid to charge the battery pack. In this application embodiment, the photovoltaic power generation equipment is maintained to charge the battery pack or the energy storage system is controlled to stop charging and discharging operations.

[0212] In some embodiments, the energy storage system control method provided in this application further includes step S57.

[0213] Step S57: In response to a charging interval duration greater than or equal to the waiting time and the state of charge value of the battery pack being less than the reference charge value, control the energy storage system to connect electrically with the grid so that the grid can charge the battery pack.

[0214] In this embodiment, the charging interval is the time interval between the last time the battery pack was charged using the grid or photovoltaic power generation equipment and the current time. The energy storage parameters also include a waiting time, which characterizes the maximum allowable time between the last charging time of the energy storage system and the current time. The waiting time cannot exceed a time threshold. Engineers can customize the waiting time according to actual needs, for example, setting it to 2 hours. This embodiment does not impose any limitations on this.

[0215] For example, in this embodiment of the application, the last time the battery pack was charged using the power grid or photovoltaic power generation equipment is obtained as a reference time. The interval between the reference time and the current time is calculated as the charging interval. The charging interval is compared with the waiting time and the state of charge value of the battery pack is compared with the reference charge value. When the charging interval is greater than or equal to the waiting time and the state of charge value of the battery pack is less than the reference charge value, the energy storage system is controlled to connect to the power grid so that the power grid can charge the battery pack and prevent the battery pack from being undercharged for a long time due to long-term rain or other factors.

[0216] Among them, the charging interval time is set. Greater than the duration threshold (i.e.) This is to ensure that there is sufficient time to perform a complete four-level criterion condition (i.e., the first criterion condition, the second criterion condition, the third criterion condition, and the fourth criterion condition) evaluation process before controlling the energy storage system to connect to the grid for auxiliary charging.

[0217] In some embodiments, the energy storage system control method provided in this application further includes steps S61 to S65.

[0218] Step S61: In response to the power generation being less than or equal to the power consumption, determine the difference between the power consumption and the power generation as the deficit power.

[0219] In this embodiment, the energy storage parameters also include the maximum allowable charging power of the power grid and the rated charging power of the energy storage system. The maximum allowable charging power refers to the maximum output power of the power grid within the safe and permissible range.

[0220] For example, in this application embodiment, the power generation is compared with the power consumption. When the power generation is less than or equal to the power consumption, it indicates that the electrical energy provided by the photovoltaic power generation equipment is insufficient to meet the electrical energy required by the equipment, and there is a power generation shortfall. This application embodiment is based on the following formula: Calculate the power deficit. For the missing power, For power generation capacity, This represents the power consumption.

[0221] Step S62: In response to the current real-time electricity price being greater than or equal to the discharge threshold price, control the energy storage system to output the shortfall power to the electrical equipment to make up for the power required by the electrical equipment.

[0222] When the current real-time electricity price is greater than or equal to the discharge threshold price (i.e.: When the current real-time electricity price is relatively high, the energy storage system is controlled to output power to the electrical equipment to make up for the power required by the electrical equipment. In this case, the photovoltaic power generation equipment and the energy storage system jointly supply the electrical equipment with the power required by the electrical equipment.

[0223] Step S63: In response to the current real-time electricity price being greater than or equal to the charging threshold price and less than the discharging threshold price, control the energy storage system to stop charging and discharging.

[0224] For example, when the current real-time electricity price is greater than or equal to the charging threshold price and less than the discharging threshold price (i.e.: When the current real-time electricity price is low (selling price) and high (buying price), the system neither buys nor sells electricity, and the energy storage system stops charging and discharging (i.e., it does not perform charging and discharging operations). In this case, the grid outputs the shortfall power to the electrical equipment to make up for the power required by the equipment. The photovoltaic power generation equipment and the grid jointly supply the electrical energy required by the equipment.

[0225] Step S64: In response to the current real-time electricity price being less than the charging threshold price and the remaining available power being greater than zero, control the energy storage system to connect electrically with the grid so that the grid charges the battery pack with the actual charging power.

[0226] The remaining available power is the difference between the maximum allowable charging power and the power deficit, that is: .in, The remaining available power, For maximum allowable charging power, This represents the power deficit.

[0227] In this embodiment, the actual charging power is the minimum value between the remaining available power and the rated charging power, that is: .in, This refers to the actual charging power. Rated charging power, This represents the remaining available power. This is a minimum value function used to find the minimum value.

[0228] For example, when the current real-time electricity price is less than the charging threshold price and the remaining available power is greater than zero (i.e.: and When the current real-time electricity price is low and the grid has excess power, the energy storage system is electrically connected to the grid, allowing the grid to charge the battery pack at its actual charging power. The grid also outputs excess power to the electrical equipment to compensate for its power consumption. In this scenario, the photovoltaic power generation equipment and the grid jointly supply the electrical energy required by the electrical equipment, and the grid additionally provides power to the energy storage system at its actual charging power to charge the battery pack.

[0229] Step S65: In response to the current real-time electricity price being less than the charging threshold price and the remaining available power being less than or equal to zero, control the energy storage system to stop charging and discharging.

[0230] For example, the current real-time electricity price is less than the charging threshold price, and the remaining available power is less than or equal to zero (i.e.: and When the current real-time electricity price is low, but the grid has no power redundancy, the energy storage system stops charging and discharging. The grid outputs the shortfall power to the electrical equipment to make up for the power required by the equipment. In this case, the photovoltaic power generation equipment and the grid jointly supply the electrical energy required by the equipment, and the energy storage system does not perform charging and discharging operations.

[0231] The following two specific embodiments illustrate the application of controlling the charging and discharging of the energy storage system in scenarios with and without photovoltaic power generation equipment.

[0232] Example 3: Typical operating scenario of a pure energy storage system (without photovoltaic power generation equipment connected).

[0233] In this embodiment, the energy storage system is not connected to photovoltaic power generation equipment; it only achieves peak-valley arbitrage by charging and discharging the battery pack through the power grid. After obtaining the preset energy storage parameters, the system proceeds to the following steps: dynamically calculating the charging and discharging threshold prices, and controlling the charging and discharging of the energy storage system based on the current real-time electricity price, the charging threshold price, and the discharging threshold price.

[0234] According to the time-of-use electricity price table shown in Table 1, the electricity price during off-peak hours (00:00-07:59) is RMB 0.30 / kWh, the electricity price during normal hours (08:00-13:59, 15:00-16:59, 17:00-21:59, 22:00-23:59) is RMB 0.60 / kWh, and the electricity price during peak hours (14:00-14:59, 22:00-22:59) is RMB 1.15 / kWh.

[0235] For energy storage parameters, minimum allowable charge value Maximum permissible charge value Rated capacity Rated charging power Maximum load power Safety margin coefficient Reserved charge ratio .

[0236] (I) 08:00-13:59 period: Charging is carried out to prepare for the afternoon peak.

[0237] Obtain the target electricity price data at 08:00, and determine the future minimum electricity price based on the target electricity price data. Yuan / kWh, future median electricity price Yuan / kWh and future highest electricity price Yuan / kWh.

[0238] Current charge value of the battery pack Substitute the known data into the formula for calculating the power shortage ratio to obtain the power shortage ratio. Substitute the known data into the charging threshold price calculation formula to calculate the charging threshold price. Yuan / kWh.

[0239] The current real-time electricity price is 0.60 yuan / kWh, which is higher than the charging threshold price of 0.50 yuan / kWh. Therefore, the decision is made to "not charge for the time being". The charging conditions for the future period are determined, and it is also determined whether the current real-time electricity price meets the charging conditions.

[0240] Based on the target electricity price data, the period from 14:00 to 14:59 on the current calendar day is identified as the target peak period (electricity price 1.15 yuan / kWh, duration 1 hour). The peak electricity demand value is calculated. That is: Peak electricity demand value. .

[0241] Calculate available power .

[0242] By comparison, Calculate the reference power difference .

[0243] Calculate the duration of power replenishment Hours (approximately 28 minutes).

[0244] Based on the target electricity price data, the electricity price of 0.60 yuan / kWh during the flat period from 08:00 to 13:59 is determined to be the lowest electricity price before the target peak period arrives (at 14:00, the price will directly enter the target peak period). The reference price is (RMB / kWh, excluding periods with no lower electricity price). Yuan / kWh Yuan / kWh, meeting the requirements and (i.e., the electricity price part of the sixth condition), the current real-time electricity price is the lowest price, control the energy storage system to connect to the grid so that the grid can charge the battery pack.

[0245] After charging at the rated charging power of 5kW for approximately 28 minutes... Shortage power (i.e.) To replenish the battery pack, the electrical connection between the energy storage system and the power grid is disconnected, causing the grid to stop charging the battery pack. At this point, the battery pack has been charged to [a certain level]. .

[0246] (ii) 14:00-14:59: High-priced discharge.

[0247] The peak electricity period arrives at 14:00; current real-time electricity price Yuan / kWh. Current charge value. .

[0248] The calculated power surplus ratio is: The discharge threshold price is calculated as follows: Yuan / kWh.

[0249] The current real-time electricity price is 1.15 yuan / kWh, which is higher than the discharge threshold price of 0.89 yuan / kWh. Therefore, the energy storage system is controlled to perform a discharge operation, and the battery pack supplies power to the electrical equipment (load) or transmits power to the grid.

[0250] The target peak period lasts for 1 hour, assuming the power consumption is at the maximum load power, i.e. The amount of electricity that the battery pack provides to electrical equipment or the power grid is... After the battery pack discharges, its State of Charge (SOC) decreases to [value missing]. .

[0251] (III) 15:00-16:59: The afternoon peak period ends, and charging and discharging stop during the flat period.

[0252] The peak period ended at 15:00, and the current real-time electricity price has dropped back to 0.60 yuan / kWh.

[0253] The battery pack's current charge level is 23% (i.e. ),near However, this period does not fall within the "last flat period" before any peak (the next peak period is 22:00-22:59, with a flat period of 17:00-21:59 in between). Therefore, charging is not triggered, and the energy storage system remains stopped charging and discharging. The power grid provides electrical energy to the electrical equipment.

[0254] (iv) 17:00-21:59: Charging will be carried out in preparation for the evening peak period.

[0255] At 17:00, the system enters a flat period, re-acquires the target electricity price data, and determines that the period from 22:00 to 22:59 is the last peak period of the current calendar day (electricity price is 1.15 yuan / kWh, duration is 1 hour). The peak electricity demand value is then calculated. That is: Peak Electricity Demand Value. .

[0256] Calculate available power .

[0257] By comparison, Calculate the reference power difference .

[0258] Calculate the duration of power replenishment Hour (36 minutes).

[0259] Based on the target electricity price data, the electricity price of 0.60 yuan / kWh during the flat period from 17:00 to 21:59 is determined to be the lowest electricity price before the next target peak period (i.e., 22:00 to 22:59). (At 22:00, the price will directly enter the target peak period price.) The reference price is (RMB / kWh, excluding periods with no lower electricity price). Yuan / kWh Yuan / kWh, meeting the requirements and (i.e., the electricity price part of the sixth condition), the current real-time electricity price is the lowest price, control the energy storage system to connect to the grid, so that the grid can charge the battery pack.

[0260] After charging at the rated charging power of 5kW for 36 minutes... Shortage power (i.e.) To replenish the battery pack, the electrical connection between the energy storage system and the power grid is disconnected, causing the grid to stop charging the battery pack. At this point, the battery pack has been charged to [a certain level]. .

[0261] (V) 22:00-22:59: High-price discharge.

[0262] The peak electricity period begins at 22:00; current real-time electricity price Yuan / kWh, current charge value The calculated discharge threshold is approximately The current real-time electricity price is 1.15 yuan / kWh, which is higher than the discharge threshold price of 0.89 yuan / kWh. Therefore, the energy storage system will perform a discharge operation, and the battery pack will supply power to the electrical equipment (i.e., the load) or transmit electrical energy to the grid. During a peak period lasting one hour, the amount of electricity (i.e., the discharge amount) provided by the battery pack to the electrical equipment or the grid is... After discharge, the state of charge (SOC) of the battery pack decreased to [value missing]. .

[0263] (vi) 23:00-23:59: The evening peak period ends, and charging and discharging stop during the off-peak period.

[0264] The peak period ended at 23:00, and the current real-time electricity price has dropped back to 0.60 yuan / kWh.

[0265] The battery pack's current charge level is 23% (i.e. ),near Since there are no more peak periods that day (after 24:00, the system enters the off-peak period of the next day), the energy storage system will stop charging and discharging and wait for the off-peak period at 00:00 the next day to start charging.

[0266] (vii) The period from 00:00 to 07:59 the next day: charging during off-peak hours.

[0267] The electricity price will enter its off-peak period at 00:00 the following day (electricity price is 0.30 yuan / kWh). Calculate the power shortage ratio Calculate the charging threshold price The price is 0.30 yuan / kWh. In comparison, the current real-time electricity price of 0.30 yuan / kWh is less than the charging threshold price of 0.523 yuan / kWh. This allows the energy storage system to be electrically connected to the grid, enabling the grid to charge the battery pack.

[0268] In this embodiment, a reserved charge ratio is specified. Not effective (i.e.) The battery pack was charged from 23% to 90%, with a charging capacity of [missing information]. Required charging time The time limit is 80.4 hours, which is suitable for arbitrage scenarios of pure energy storage systems without photovoltaic power generation equipment.

[0269] The complete timeline of this embodiment is summarized in Table 3 below.

[0270] Table 3:

[0271] According to Table 3, this embodiment verifies the complete logic control chain of the pure arbitrage operation in the scenario where no photovoltaic power generation equipment is connected: all charging actions occur during the flat period or undervalued period of 0.60 yuan / kWh or below, and all discharging actions occur during the peak period of 1.15 yuan / kWh, strictly following the arbitrage principle of "charging at low price and discharging at high price".

[0272] Example 4: Typical operating scenario of a photovoltaic energy storage combined system (with photovoltaic power generation equipment connected).

[0273] In this embodiment, the energy storage system is connected to photovoltaic power generation equipment and operates in a "self-consumption with surplus energy storage" mode. After obtaining the preset energy storage parameters, the system proceeds to the following steps: dynamically calculating the charging and discharging threshold prices, and coordinating the charging and discharging of the energy storage system based on the current real-time electricity price, the charging threshold price, the discharging threshold price, the power generation, and the power consumption.

[0274] The electricity price information in Example 4 is consistent with that in Example 3. The energy storage parameters are the same as in Example 3. Additionally, the rated power of the photovoltaic power generation equipment... Duration threshold Hourly power ratio rate of change threshold Safety margin coefficient Sunset Reserved charge ratio .

[0275] Load Description: In this embodiment, the power consumption at each time period is a random fluctuation sequence simulating the actual electricity consumption behavior of users. The power consumption varies at different times (e.g., the daytime base load is approximately 1.2kW, rising to 1.5kW after some devices start up in the afternoon, rising to 1.8kW after 3:00 PM, and rising to 3.0kW during the evening peak period). The current power consumption is collected and corresponding decisions are made in each sampling period. All decisions are based on the currently sampled power consumption and do not rely on any load prediction algorithm. The random fluctuation of power consumption does not affect the implementation effect of this embodiment.

[0276] (I) 07:30-08:29 period: morning low light period (the second criterion condition is not met, the remaining light duration is sufficient, and there is no need to connect to the power grid).

[0277] The photovoltaic power generation equipment began generating electricity after sunrise at 7:30 AM. The power generation capacity was... Power consumption ,satisfy (Hereinafter referred to as Case Two) Calculate the power deficit. .

[0278] Current charge value of the battery pack The power shortage ratio was calculated. Charging threshold price Yuan / kWh. Calculate the surplus power ratio: The discharge threshold price is calculated as follows: Yuan / kWh.

[0279] The current real-time electricity price is 0.60 yuan / kWh, which meets the requirements. In the case corresponding to step S63, the energy storage system is controlled to stop charging and discharging, and the grid outputs the shortfall power to the electrical equipment to make up for the power required by the electrical equipment (i.e., the grid load).

[0280] From 07:30 to 07:59 (lasting 0.5 hours), the power generation increased linearly from 0.8kW to 1.2kW, with an average power generation of [missing value]. This is equivalent to the power consumption of 1.0kW (average), resulting in surplus power. During this period, the battery pack is basically not charged, and the state of charge value is maintained at 65%.

[0281] After 08:00, power generation exceeded power consumption and continued to rise. By 08:30, power generation had reached 1.8kW, while power consumption remained at 1.2kW, thus meeting the demand. (Hereinafter referred to as Case 1) Calculate the surplus power .

[0282] From 08:00 to 08:29 (lasting 0.5 hours), the power generation increased linearly from 1.2kW to 1.8kW, with an average power generation of [missing value]. Deducting power consumption The average surplus power is The battery pack's charging capacity during this period was .

[0283] The state of charge (SOC) of the battery pack increases: .

[0284] Therefore, at 08:30, the state of charge of the battery pack is... The final value is 68% (considering the occasional minor contribution of instantaneous power generation exceeding power consumption during the period from 07:30 to 08:29, and the rounding down of the value). The current charge value of the battery pack. Because it satisfies Then, the four-level criterion conditions are judged.

[0285] Regarding the first criterion: calculate the power replenishment limitation duration. Hours, by comparison, it can be seen that If the first criterion condition is met, proceed to evaluate the second criterion condition.

[0286] Regarding the second criterion: calculate the remaining illumination duration. Hours, by comparison, it can be seen that If the second criterion is not met, the remaining sunshine duration is determined to be sufficient for the energy storage system to automatically replenish power using the photovoltaic power generation equipment. Therefore, it is determined that there is no need to connect to the grid, and the photovoltaic power generation equipment continues to charge the battery pack.

[0287] (ii) 08:30-11:59: During the morning, the photovoltaic power generation equipment is continuously used for charging (the second criterion condition is not met continuously, so it is determined that there is no need to connect to the grid).

[0288] From 08:30 to 11:59, the power generation gradually increased from 1.8kW to nearly 5.0kW, while the power consumption was 1.2kW, continuously meeting the demand. (i.e., surplus power generation) prioritizes the use of photovoltaic (PV) power generation equipment to supply electricity to electrical equipment (i.e., PV-connected loads), and the surplus power from the PV power generation equipment continuously charges the battery bank. The Level 4 criterion is repeated in each control cycle, but the remaining sunshine duration... Greater than or equal to the power replenishment limit duration The second criterion was never met, and the decision was made that no grid connection was necessary. The battery pack's state of charge steadily increased due to continuous charging, reaching the maximum permissible state of charge at 12:00. The battery pack is fully charged.

[0289] (iii) 12:00-13:59 period: The battery pack is fully charged, but the first criterion condition is not met in the subsequent period.

[0290] At 12:00, power generation Power consumption surplus power Among them, the current charge value of the battery pack. (Battery pack is fully charged.)

[0291] Regarding the first criterion: calculate the power replenishment limitation duration. Hour( ), and by comparison, we can see that If the first criterion is not met, it is determined that the battery pack is fully charged and there is no need to connect to the grid for charging. The photovoltaic power generation equipment continues to provide power to the electrical equipment and charge the battery pack. The remaining power of the photovoltaic power generation equipment cannot be charged because the battery pack is fully charged.

[0292] From 12:00 to 13:59, the power generation remained above 4.0kW, the power consumption remained at 1.5kW, and the battery pack remained fully charged. The Level 4 criterion condition was repeatedly executed in each control cycle, all due to... However, if the first criterion is not met, there is no need to connect to the power grid. The photovoltaic power generation equipment provides power to the electrical equipment and charges the battery pack. The surplus power of the photovoltaic power generation equipment cannot be charged because the battery pack is already fully charged.

[0293] (iv) 14:00-14:59: Afternoon peak period (high electricity price period, photovoltaic power generation equipment will continue to provide power to electrical equipment).

[0294] The peak electricity period begins at 2 PM; current real-time electricity price. Yuan / kWh. Power generation at this time. Power consumption The power generation capacity is greater than the power consumption capacity, and the photovoltaic power generation equipment can independently meet the power demand of the power consumption equipment.

[0295] Current real-time electricity prices are in a high range, and there is a desire to generate arbitrage profits by discharging battery packs to replace grid power. However, due to... The power output of the photovoltaic power generation equipment has fully met the power requirements of the electrical equipment, and there is still surplus power. The battery pack has no discharge space (meaning that discharging would cause the excess power of the photovoltaic power generation equipment to be unable to be consumed, resulting in curtailment). Therefore, the photovoltaic power generation equipment is kept providing power to the electrical equipment and charging the battery pack. The excess power of the photovoltaic power generation equipment cannot be charged into the battery pack because the battery pack is already fully charged. In this way, the battery pack is neither charged nor discharged, and the state of charge value is maintained at 90%.

[0296] It should be noted that in this embodiment, the energy storage system 100 is set to not have the function of transmitting redundant power to the power grid 400. Therefore, when the battery pack 120 reaches the maximum allowable charge value and provides sufficient power to the electrical equipment 200, the photovoltaic power generation equipment 300 will be subject to power curtailment.

[0297] (V) 15:00-16:59 period: Afternoon photovoltaic degradation period (if the first criterion condition is not met continuously, it is determined that there is no need to connect to the grid).

[0298] At 15:00, the peak period ended, and the current real-time electricity price dropped back to 0.60 yuan / kWh. At this time, some equipment started operating, and the power consumption increased from 1.5kW to 1.8kW (normal fluctuations in household electricity consumption, obtained through real-time sampling). Power generation capacity. Power consumption surplus power The current charge value of the battery pack. (Battery pack is fully charged.)

[0299] Regarding the first criterion: the calculated power replenishment limitation duration. Hour( ), and by comparison, we can see that If the first criterion is not met, it is determined that the battery pack is fully charged and there is no need to connect to the grid for charging. The photovoltaic power generation equipment continues to provide power to the electrical equipment and charge the battery pack. The remaining power of the photovoltaic power generation equipment cannot be charged because the battery pack is fully charged.

[0300] Between 15:00 and 16:59, the power generation gradually decreased from 3.0kW to 2.5kW, while the power consumption was approximately 1.5 to 1.8kW, and the battery pack remained fully charged. It never needs to be connected to the power grid.

[0301] (vi) 17:00-17:59 period: evening critical period (if the first criterion condition is not met, it is determined that there is no need to connect to the power grid, and the state of charge of the battery pack has not decreased as the time of sunset approaches).

[0302] At 17:00, the power generation capacity dropped to Power consumption surplus power The battery pack's state of charge remains at 90% (i.e., ...). ).

[0303] Regarding the first criterion: calculate the power replenishment limitation duration. Hour( ), and by comparison, we can see that If the first criterion is not met, it is determined that the battery pack is fully charged and there is no need to connect to the grid for charging. The photovoltaic power generation equipment continues to provide power to the electrical equipment and charge the battery pack. The remaining power of the photovoltaic power generation equipment cannot be charged because the battery pack is fully charged.

[0304] Between 17:00 and 17:30, the power generation capacity further decreased from 2.5kW to 2.0kW, while the power consumption was 1.5kW, resulting in surplus power. The power output then decreases from 1.0kW to 0.5kW. The battery pack's state of charge remains at 90% (i.e., ...). The battery pack is fully charged, and the remaining power in the photovoltaic power generation equipment cannot be charged.

[0305] At 17:30, power generation Power consumption surplus power .

[0306] The first criterion condition is evaluated again, and the power replenishment limitation duration is calculated. Hour( ), and by comparison, we can see that If the first criterion is not met, it is determined that the battery pack is fully charged and there is no need to connect to the grid for charging. The photovoltaic power generation equipment continues to provide power to the electrical equipment and charge the battery pack. The remaining power of the photovoltaic power generation equipment cannot be charged because the battery pack is fully charged.

[0307] Between 17:30 and 17:59, the power generation rapidly decreased from 2.0kW to near 0kW. Around 17:45, the power generation dropped to 1.5kW, meeting the requirements. Then the power deficit is calculated. The power grid provides the shortfall power to the electrical equipment. The battery pack's state of charge remains at 90% (because the power generation capacity drops rapidly below the power consumption capacity, the battery pack has not yet had time to discharge, and the shortfall power is directly provided by the power grid).

[0308] (vii) 18:00-18:59: After sunset, the night mode is activated.

[0309] Sunset at 18:00 ), power generation According to the time-of-use electricity price schedule, the current period is still within the flat period (17:00-21:59), and the current real-time electricity price is 0.60 yuan / kWh. Electricity consumption... ,satisfy Calculate the power deficit The shortfall in power is directly supplied by the grid, and the battery pack's state of charge remains at 90% (i.e., ).

[0310] Current real-time electricity price Yuan / kWh, calculating the threshold price for charging Yuan / kWh, calculate the discharge threshold price Yuan / kWh, where the current real-time electricity price is greater than or equal to the charging threshold price and less than the discharging threshold price (i.e., In the case corresponding to step S63, the energy storage system is controlled to stop charging and discharging (i.e., no charging and discharging operation is performed), and the power grid provides all the electrical energy required by the electrical equipment (i.e., the power grid is under load).

[0311] (viii) 19:00-21:59: Nighttime flat period, waiting to charge or discharge.

[0312] After 19:00, the system will continue operating in nighttime mode. The current real-time electricity price is 0.60 yuan / kWh, and the battery pack's state of charge is 90%. (Note: The charging threshold price is not included.) Yuan / kWh, the threshold price for discharge Yuan / kWh, where the current real-time electricity price is greater than or equal to the charging threshold price and less than the discharging threshold price (i.e., In the case corresponding to step S63, the energy storage system is controlled to stop charging and discharging (that is, no charging and discharging operation is performed), and the power grid provides all the electrical energy required by the electrical equipment (i.e., the power grid is under load).

[0313] Obtain the target electricity price data. Based on the target electricity price data, determine that 22:00-22:59 is the last peak period of the current calendar day (electricity price is 1.15 yuan / kWh, duration is 1 hour), and calculate the peak electricity demand value. Calculate the available power. A comparison shows that... The system controls the energy storage system to remain disconnected from the power grid, thus preventing the system from charging and discharging.

[0314] (ix) 22:00-22:59: Evening peak hours (high-price power dissipation).

[0315] The evening peak period begins at 22:00; the current real-time electricity price is 1.15 yuan / kWh. The current charge value... Calculate the discharge threshold price The price is RMB / kWh. Since the current real-time electricity price is higher than the discharge threshold price, the energy storage system is controlled to perform a discharge operation.

[0316] Among them, power consumption During peak hours lasting one hour, the battery pack discharge (i.e., the amount of electricity supplied to the electrical devices) is... After discharge, the state of charge (SOC) of the battery pack decreased to [value missing]. At this point, the current charge value is updated to 60% (i.e., ).

[0317] (x) 23:00-23:59: The evening peak period ends, and charging and discharging stop during the off-peak period.

[0318] The peak period ends at 23:00, and the current real-time electricity price has dropped back to the flat rate of 0.60 yuan / kWh. The current charge value of the battery pack... .

[0319] Calculate the power shortage ratio The charging threshold price was calculated. Yuan / kWh. Calculate the surplus power ratio. The discharge threshold price is calculated as follows: Yuan / kWh.

[0320] The current real-time electricity price is 0.60 yuan / kWh, which is higher than the charging threshold price. Yuan / kWh and below the discharge threshold price If the target electricity price is set at RMB / kWh, and it is determined based on the target electricity price data that there are no more peak periods in the current natural day (after 24:00, the next day's off-peak period begins), then the energy storage system will be controlled to stop charging and discharging (i.e., no charging and discharging operation will be performed), and will wait for the off-peak period at 00:00 the next day to start charging.

[0321] (xi) The next day from 00:00 to 07:59: Charging during off-peak hours.

[0322] The next day at 00:00, the electricity price enters a low-peak period (0.30 yuan / kWh), and the current charge value... Calculate the charging threshold price The current real-time electricity price is 0.30 yuan / kWh, which is less than the charging threshold price of 0.40 yuan / kWh. The control system connects the energy storage system to the grid so that the grid can charge the battery pack.

[0323] Among them, when the reserved charge ratio At that time, the upper limit of the charging charge is... The battery pack was charged from 60% to 80%, with a charging capacity of [missing information]. Required charging time It takes only 24 minutes to fully charge during off-peak hours, ensuring sufficient energy reserves for the next day's operation.

[0324] Reserved charge ratio The reserved capacity provides a buffer for the next day's photovoltaic (PV) power consumption, effectively avoiding the problem of insufficient battery capacity to absorb surplus electricity and forced curtailment of PV power generation equipment the following day due to the batteries being fully charged (90% state of charge) in the early morning. Understandably, this reserved charge ratio... This only applies to charging during off-peak hours; the reserved charge ratio does not apply to other charging scenarios. The impact correctly reflects the reserved charge ratio The definition is "only effective during off-peak charging periods".

[0325] The complete timeline of this embodiment is summarized in Table 4 below.

[0326] Table 4:

[0327] According to Table 4, the key points for verification in this embodiment are as follows.

[0328] 1. Real-time sampling of power generation and power consumption, without relying on power prediction: At 15:00, the power consumption increased from 1.5kW to 1.8kW. By sensing the power change through real-time sampling and switching the control logic, no prediction module is needed, which verifies the core advantage of "zero power prediction" of this application.

[0329] 2. Battery pack does not discharge when power generation exceeds power consumption: During the peak period of 14:00-14:59, although the electricity price is in the high price range, the power generation of the photovoltaic power generation equipment (3.0kW) is greater than the power consumption (1.5kW). The power generation of the photovoltaic power generation equipment has fully met the power demand of the power consumption equipment. There is no physical space for the battery pack to discharge and replace the grid power supply. This clarifies the logical hierarchy of physical constraints taking precedence over electricity price decisions.

[0330] 3. The progressive logic of the four-level criteria: When the battery pack is fully charged (between 12:00 and 17:59), the first criterion continuously determines that there is no need to connect to the power grid and there is no need to enter the subsequent criteria, thus verifying the effectiveness of the first criterion as the first line of defense.

[0331] 4. The core interception function of the second criterion condition: During the period from 08:30 to 11:59, the second criterion condition continuously determines that there is no need to connect to the grid, thus ensuring the priority consumption of photovoltaic power generation equipment in the morning.

[0332] 5. Full scenario coverage: This embodiment fully covers scenario one (criteria-based decision-making) and scenario two (i.e., the electricity price strategy from step S62 to step S65), verifying that the energy storage system does not need to switch control modes when operating around the clock.

[0333] In summary, the embodiments of this application have at least the following beneficial effects.

[0334] 1. Fully localized lightweight computing, free from dependence on external networks and computing power: The full control logic of this application only involves numerical comparison, sorting, linear proportional operation and extreme value extraction. It does not require network access to call cloud APIs, nor does it require training or deployment of inference models. It can achieve millisecond-level response on low-cost industrial-grade MCUs (microcontrollers), reducing or avoiding network latency, data leakage and network bandwidth and operation and maintenance costs.

[0335] 2. Zero Power Prediction, Adapting to Power Changes: This application's embodiment adopts a power consumption following mode on the discharge side. The discharge power matches the difference between the power consumption and the power generation in real time, without relying on any load power prediction algorithm. The discharge operation of this application always uses the "difference between real-time power consumption and power generation" as the direct basis, without relying on the output of any power prediction module. Regardless of how the power consumption fluctuates or changes abruptly, it can follow in real time, perfectly adapting to the characteristics of strong randomness and difficulty in predicting power changes in residential and industrial / commercial electricity consumption.

[0336] 3. Highly adaptive, no need for manual tracking of electricity price regulations: When electricity price regulations change or the energy storage system is migrated, it is only necessary to re-enter or modify the time-of-use electricity price table in the interactive interface of the energy storage system. In the next control cycle, the new target electricity price data will be automatically obtained, and the charging threshold price and discharging threshold price will be dynamically adapted and calculated. There is no need for manual calculation of time periods or OTA algorithm upgrades, achieving true "plug and play".

[0337] 4. Peak-Hour Energy Guarantee (Power Shortage Prevention Mechanism): By proactively scanning for future peak hours and calculating power gaps, the system can trigger a charging process when power is insufficient. Specifically, this process incorporates a "wait for a lower future price" time window decision mechanism. By comparing the charging time with the remaining time before the start of the peak hour, the system intelligently decides whether to "wait for a lower electricity price" or "charge immediately." This ensures reliable power supply during peak hours while avoiding the loss of revenue from missing out on lower electricity prices by charging too early, achieving a dynamic optimal balance between security and maximum arbitrage.

[0338] 5. Reserved charge capacity mechanism, balancing arbitrage and grid integration: This application's embodiments introduce a presettable photovoltaic reserved charge ratio. Users can customize the settings according to local climate characteristics. Reserved charge ratio. This only applies during off-peak charging periods. When charging during off-peak periods, the maximum charging charge limit is automatically adjusted to the difference between the maximum allowable charge value and the reserved charge ratio (i.e., This designation reserves capacity for the next day's photovoltaic (PV) power generation, effectively preventing curtailment of PV power due to overnight charging. In other charging scenarios, this reserved charge ratio is not applicable. The limitations ensure that the charging and discharging strategies in each scenario are independent and undisturbed. The reserved charge capacity mechanism only requires a static preset parameter and does not introduce any photovoltaic power generation prediction algorithm, which fully meets the core positioning of this application: "pure local calculation, no prediction required".

[0339] This application provides a computer-readable storage medium storing processor-executable program instructions. When executed by the processor, the program instructions cause the processor to perform the energy storage system control method provided in this application, or to perform the steps in any possible implementation of the energy storage system control method provided in this application.

[0340] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface memory, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, and an electrically erasable programmable ROM, or any other form of storage medium known in the art, or various devices including one or any combination of the above storage media.

[0341] In some embodiments, program instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0342] As an example, program instructions may, but do not necessarily, correspond to files in the file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, or in a single file dedicated to the program in question, or in multiple collaborative files (such as files that store one or more modules, subroutines, or code sections).

[0343] As an example, program instructions can be deployed to execute on a computing device (including devices such as smart terminals and servers), or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. It is understood that all or part of the steps of the methods described in the embodiments provided in this application can be implemented directly using electronic hardware or processor-executable program instructions, or a combination of both.

[0344] Those skilled in the art will understand that the embodiments provided in this application are merely illustrative. The order in which the steps in the methods of the embodiments are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged, and deleted according to actual needs. Modules or sub-modules, units or sub-units in the apparatus or system of the embodiments can be merged, divided, and deleted according to actual needs. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0345] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, and of course, it can also be implemented using hardware. 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. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. It should be understood that the storage medium can be flash memory, hard disk, optical disk, register, magnetic surface memory, removable disk, CD-ROM, random access memory (RAM), read-only memory (ROM), electrically programmable ROM, and electrically erasable programmable ROM, etc.

[0346] It should be noted that the above embodiments are for illustrating the technical concept and features of this application, and are intended to enable those skilled in the art to understand the content of this application and implement it accordingly. They should not be construed as limiting the scope of protection of this application. Those skilled in the art can understand that all or part of the processes of the above embodiments can be implemented, modified according to the technical solutions described in the embodiments of this application, or equivalent substitutions can be made to some of the technical features. It is understood that these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should be considered as equivalent changes and modifications made based on the embodiments of this application, all of which should fall within the scope of the claims of this application.

Claims

1. A control method for an energy storage system, characterized in that, The energy storage system includes a battery pack, and the method includes: Obtain preset energy storage parameters, including a time-of-use electricity price table, the minimum allowable charge value of the battery pack, and the maximum allowable charge value. The time-of-use electricity price table is used to characterize the electricity price for each time period within a natural day configured by date type. The percentage of battery charge shortage is calculated based on the maximum allowable charge value and the current charge value of the battery pack. The current charge value is the state of charge value of the battery pack at the current moment. Calculate the margin ratio based on the minimum allowable charge value, maximum allowable charge value, and current charge value of the battery pack; The product of the power shortage ratio and the first electricity price difference is determined as the power shortage price difference, and the sum of the power shortage price difference and the future minimum electricity price is determined as the charging threshold price. The first electricity price difference is the difference between the future median electricity price and the future minimum electricity price. The future median electricity price and the future minimum electricity price are the median electricity price and the minimum electricity price in the target electricity price data, respectively. The target electricity price data includes the electricity prices of each time period from the current time of the current natural day to the end time of the current natural day in the time-of-use electricity price table. The product of the surplus power ratio and the second electricity price difference is determined as the surplus power price difference, and the difference between the future highest electricity price and the surplus power price difference is determined as the discharge threshold price. The second electricity price difference is the difference between the future highest electricity price and the future median electricity price. The future highest electricity price is the highest electricity price in the target electricity price data. The energy storage system is controlled to charge and discharge based on the current real-time electricity price, the charging threshold price, and the discharging threshold price. The current real-time electricity price is the electricity price for the time period in which the current moment is located.

2. The energy storage system control method according to claim 1, characterized in that, The energy storage parameters also include maximum load power, safety margin factor, rated capacity of the battery pack, and rated charging power of the energy storage system. Controlling the charging and discharging of the energy storage system based on the current real-time electricity price, the charging threshold price, and the discharging threshold price includes: In response to the current real-time electricity price being less than the charging threshold price, the energy storage system is electrically connected to the power grid so that the power grid can charge the battery pack; In response to the current real-time electricity price being greater than or equal to the charging threshold price, based on the current real-time electricity price, the maximum load power, the safety margin coefficient, the rated capacity, the rated charging power, and the target electricity price data, the system controls the energy storage system to disconnect its electrical connection with the power grid so that the power grid suspends charging the energy storage system, or controls the energy storage system to connect its electrical connection with the power grid so that the power grid charges the battery pack. In response to the current real-time electricity price being lower than the discharge threshold price, the energy storage system is controlled to stop charging and discharging. In response to the current real-time electricity price being greater than or equal to the discharge threshold price, the energy storage system is controlled to discharge.

3. The energy storage system control method according to claim 2, characterized in that, The step of controlling the energy storage system to disconnect its electrical connection with the power grid to suspend charging of the energy storage system, or controlling the energy storage system to connect its electrical connection with the power grid to charge the battery pack, based on the current real-time electricity price, the maximum load power, the safety margin factor, the rated capacity, the rated charging power, and the target electricity price data, includes: The product of the maximum load power, peak duration, and safety margin coefficient is determined as the peak electricity demand value. The peak duration is the duration of the target peak period. The target peak period is the period with the highest electricity price that is closest to the current period in the target electricity price data. The current period is the period in which the current moment is located. The product of the reference charge difference and the rated capacity is determined as the available power, where the reference charge difference is the difference between the current charge value and the minimum allowable charge value. The ratio of the reference power difference to the rated charging power is determined as the charging duration, and the reference power difference is the difference between the peak power demand value and the available power. The difference between the start time of the target peak period and the current time is determined as the remaining duration; The lowest electricity price in the target electricity price data from the current time to the starting time is determined as the reference electricity price; In response to any one of the first, second, third, and fourth conditions, the electrical connection between the energy storage system and the power grid is disconnected, causing the power grid to suspend charging of the energy storage system. The first condition is that the reference power difference is less than or equal to zero. The second condition is that the reference power difference is greater than zero, the reference electricity price is less than the current real-time electricity price, and the remaining time is greater than the replenishment time. The third condition is that the reference power difference is greater than zero, the reference electricity price is less than the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is greater than or equal to the target peak electricity price. The fourth condition is that the reference power difference is greater than zero, the reference electricity price is greater than or equal to the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is greater than or equal to the target peak electricity price, where the target peak electricity price is the electricity price during the target peak period. In response to the fulfillment of the fifth or sixth condition, the energy storage system is electrically connected to the power grid, enabling the power grid to charge the battery pack. The fifth condition is that the reference power difference is greater than zero, the reference electricity price is less than the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is less than the target peak electricity price. The sixth condition is that the reference power difference is greater than zero, the reference electricity price is greater than or equal to the current real-time electricity price, the remaining time is less than or equal to the replenishment time, and the current real-time electricity price is less than the target peak electricity price.

4. The energy storage system control method according to claim 1, characterized in that, The step of calculating the depletion ratio based on the maximum allowable charge value and the current charge value of the battery pack includes: The difference between the maximum allowable charge value and the current charge value is determined as the first charge difference value; The ratio of the first charge difference to the maximum allowable charge value is determined as the power shortage ratio.

5. The energy storage system control method according to claim 1, characterized in that, The step of calculating the margin ratio based on the minimum allowable charge value, maximum allowable charge value, and current charge value of the battery pack includes: The difference between the current charge value and the minimum allowable charge value is determined as the reference charge difference value; The difference between the maximum permissible charge value and the minimum permissible charge value is determined as the second charge difference value; The ratio of the reference charge difference to the second charge difference is defined as the margin ratio.

6. The energy storage system control method according to claim 2, characterized in that, The energy storage system is connected to the electrical equipment and the photovoltaic power generation equipment, and the photovoltaic power generation equipment is also connected to the electrical equipment. The energy storage parameters also include the rated capacity of the battery pack and the sunset time. The method further includes: The power consumption of the electrical equipment and the power generation of the photovoltaic power generation equipment are collected at a preset sampling period. In response to the fact that the power generation is greater than the power consumption, the difference between the power generation and the power consumption is determined as surplus power; The power replenishment limitation duration is calculated based on the surplus power, the maximum allowable charge value, the current charge value, and the rated capacity. The difference between the sunset time and the current time is determined as the remaining duration of sunlight. according to Given the power generation capacity and the sampling period, calculate the power change rate, where... The power generation mentioned includes the power generation acquired in the current sampling period and the power generation acquired in the previous sampling period. The power generation acquired in each sampling period, the It is an integer greater than or equal to 2; The energy storage system is controlled to charge and discharge based on the power replenishment limit duration, the remaining illumination duration, and the power change rate.

7. The energy storage system control method according to claim 6, characterized in that, The energy storage parameters also include a power ratio coefficient, a rate of change threshold, a duration threshold, and the rated power of the photovoltaic power generation equipment. Controlling the charging and discharging of the energy storage system based on the power replenishment limitation duration, the remaining sunshine duration, and the power rate of change includes: In response to the satisfaction of all of the first, second, third, and fourth criteria, and also the satisfaction of one of the seventh and eighth criteria, the energy storage system is electrically connected to the power grid so that the power grid charges the battery pack. In response to the failure to meet any one or more of the first, second, third, and fourth criteria conditions, or the satisfaction of all of the first, second, third, and fourth criteria conditions but the failure to meet the seventh and eighth conditions, the photovoltaic power generation equipment continues to charge the battery pack or the energy storage system is controlled to stop charging and discharging. The first criterion is that the duration of the power replenishment restriction is greater than or equal to the duration threshold; the second criterion is that the remaining sunshine duration is less than or equal to the duration of the power replenishment restriction; the third criterion is that the power generation is less than the product of the power ratio coefficient and the rated power, or the absolute value of the power change rate is greater than or equal to the change rate threshold; the fourth criterion is that the power change rate is less than or equal to zero; the seventh criterion is that the current real-time electricity price is less than the charging threshold price; and the eighth criterion is that the current real-time electricity price is less than the target peak electricity price. The target peak electricity price is the electricity price during the target peak period, the target peak period is the period with the highest electricity price closest to the current period in the target electricity price data, and the current period is the period in which the current moment is located.

8. The energy storage system control method according to claim 6, characterized in that, The calculation of the power replenishment limitation period based on the surplus power, the maximum allowable charge value, the current charge value, and the rated capacity includes: The difference between the maximum allowable charge value and the current charge value is determined as the first charge difference value; The product of the first charge difference and the rated capacity is determined as the shortfall charge. The ratio of the power shortage to the surplus power is determined as the power replenishment limit duration.

9. The energy storage system control method according to claim 7, characterized in that, The energy storage parameters also include a waiting time and a reserved charge ratio, wherein the waiting time is greater than the time threshold, and the method further includes: In response to a charging interval duration greater than or equal to the waiting time and the state of charge (SOC) value of the battery pack being less than a reference SOC value, the energy storage system is electrically connected to the power grid so that the power grid can charge the battery pack. The charging interval duration is the interval between the last time the battery pack was charged using the power grid or the photovoltaic power generation equipment and the current time. The reference SOC value is the maximum allowable SOC value, or the reference SOC value is the difference between the maximum allowable SOC value and the reserved SOC ratio.

10. The energy storage system control method according to any one of claims 6-9, characterized in that, The electrical equipment is also connected to the power grid, and the energy storage parameters include the maximum allowable charging power of the power grid and the rated charging power of the energy storage system. The method further includes: In response to the fact that the power generation is less than or equal to the power consumption, the difference between the power consumption and the power generation is determined to be the power deficit. In response to the current real-time electricity price being greater than or equal to the discharge threshold price, the energy storage system is controlled to output the shortfall power to the electrical equipment to make up for the power consumption required by the electrical equipment; In response to the current real-time electricity price being greater than or equal to the charging threshold price and less than the discharging threshold price, the energy storage system is controlled to stop charging and discharging, wherein the power grid outputs the shortfall power to the electrical equipment to make up for the power required by the electrical equipment; In response to the current real-time electricity price being less than the charging threshold price and the remaining available power being greater than zero, the system controls the energy storage system to be electrically connected to the power grid, so that the power grid charges the battery pack with the actual charging power, and the power grid outputs the deficit power to the electrical equipment to make up for the power consumption required by the electrical equipment. The remaining available power is the difference between the maximum allowable charging power and the deficit power, and the actual charging power is the minimum value between the remaining available power and the rated charging power. In response to the current real-time electricity price being less than the charging threshold price and the remaining available power being less than or equal to zero, the energy storage system is controlled to stop charging and discharging, and the power grid outputs the shortfall power to the electrical equipment to make up for the power consumption required by the electrical equipment.

11. A control device, characterized in that, The device includes a processor and a memory, the processor being communicatively connected to the memory, the memory storing program instructions executable by the processor, the program instructions being executed by the processor to cause the control device to perform the energy storage system control method as described in any one of claims 1-10.

12. An energy storage system, characterized in that, It includes a battery pack and a control device as described in claim 11, wherein the control device is connected to the battery pack.