Multi-scale safety correction method and device for energy storage power instruction of optical storage micro-grid

CN122951074APending Publication Date: 2026-10-20HNAC TECH
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

现有暂态安全分析多用于离线校核或事后分析,难以及时反馈至储能功率控制指令的生成过程

Benefits of technology

[0016]可见,本申请公开了获取光储微电网的光伏出力预测数据、负荷预测数据和电价数据,并基于所述光伏出力预测数据、所述负荷预测数据和所述电价数据生成储能功率初始序列;将所述储能功率初始序列输入预设配电网稳态拓扑模型进行潮流计算,以得到节点电压和支路负载率,并根据所述节点电压和所述支路负载率生成储能功率动态约束;对所述储能功率初始序列中相邻时刻的储能功率进行差分计算,并将差分结果超过预设功率阶跃阈值的对应时刻作为待校核时刻,以根据所述待校核时刻对应的储能功率变化数据生成待校核暂态断面;将所述待校核暂态断面输入预设电磁暂态仿真模型,以得到暂态安全指标,并根据所述暂态安全指标生成储能功率爬坡率约束;将所述储能功率动态约束和所述储能功率爬坡率约束加入初始调度约束集,以得到目标调度约束集,并基于所述目标调度约束集、所述光伏出力预测数据、所述负荷预测数据和所述电价数据重新生成储能功率修正序列;其中,所述初始调度约束集包括功率平衡约束、储能荷电状态约束、储能充放电功率额定值约束和并网点交换功率约束中的至少一种;若所述储能功率修正序列满足所述目标调度约束集,则基于所述储能功率修正序列生成储能功率控制指令。

✦ Generated by Eureka AI based on patent content.

Smart Images

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

Abstract

This application discloses a multi-scale security correction method and device for energy storage power commands in a photovoltaic-storage microgrid, relating to the field of microgrid operation and control technology. The method includes: acquiring photovoltaic output forecast data, load forecast data, and electricity price data, and generating an initial energy storage power sequence; performing power flow calculations on the initial energy storage power sequence to obtain node voltages and branch load rates, and generating dynamic constraints on energy storage power; performing differential calculations on the initial energy storage power sequence to determine the time to be checked and generating a transient section to be checked; performing electromagnetic transient simulations on the transient section to be checked to obtain transient security indicators, and generating energy storage power ramp-up rate constraints; and regenerating a corrected energy storage power sequence based on the dynamic constraints, ramp-up rate constraints, and electricity price data, and generating energy storage power control commands. This improves the security of energy storage power control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid operation and control technology, and in particular to a multi-scale safety correction method and device for energy storage power commands in photovoltaic-storage microgrids. Background Technology

[0002] A photovoltaic-storage microgrid typically includes photovoltaic (PV) power generation units, energy storage devices, local loads, and a distribution network. Existing energy storage power control methods often generate energy storage power sequences based on PV output forecast data, load forecast data, and electricity price data to reduce operating costs or improve PV absorption capacity. These methods typically employ static constraints such as fixed upper and lower limits for energy storage power, state-of-charge ranges, and grid-connected power limits, making it difficult to reflect real-time operating conditions of the distribution network, such as node voltage and branch load rates. When PV output, load levels, or energy storage power commands change significantly, the generated energy storage power sequence may lead to node voltage exceeding limits or branch overload.

[0003] Furthermore, energy storage power sequences are typically generated according to scheduling time steps, and there may be significant power jumps between adjacent moments. If the energy storage converter directly executes this power change, it may cause transient risks such as voltage overshoot, harmonic distortion, or flicker. Existing transient safety analyses are mostly used for offline verification or post-event analysis, making it difficult to provide timely feedback to the generation process of energy storage power control commands.

[0004] Therefore, how to generate dynamic constraints for energy storage power based on the steady-state operating state corresponding to the initial sequence of energy storage power, and how to generate energy storage power ramp-up rate constraints based on the transient safety index corresponding to the power step, thereby generating energy storage power control commands that satisfy both steady-state and transient constraints, is a technical problem that needs to be solved. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a multi-scale security correction method and apparatus for energy storage power commands in photovoltaic-storage microgrids. This method can generate dynamic constraints on energy storage power based on the steady-state operating state corresponding to the initial energy storage power sequence, and generate energy storage power ramp-up rate constraints based on the transient security index corresponding to the power step, thereby generating energy storage power control commands that satisfy both steady-state and transient constraints. The specific scheme is as follows: In a first aspect, this application discloses a multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid, including: Acquire photovoltaic output forecast data, load forecast data, and electricity price data of the photovoltaic-storage microgrid, and generate an initial energy storage power sequence based on the photovoltaic output forecast data, the load forecast data, and the electricity price data; The initial sequence of energy storage power is input into a preset distribution network steady-state topology model for power flow calculation to obtain node voltage and branch load rate, and dynamic constraints of energy storage power are generated based on the node voltage and the branch load rate. The energy storage power of adjacent moments in the initial energy storage power sequence is differentially calculated, and the moment when the differential result exceeds the preset power step threshold is taken as the moment to be checked, so as to generate the transient profile to be checked based on the energy storage power change data corresponding to the moment to be checked. The transient cross section to be checked is input into a preset electromagnetic transient simulation model to obtain transient safety indicators, and energy storage power ramp-up rate constraints are generated based on the transient safety indicators. The energy storage power dynamic constraints and the energy storage power ramp-up rate constraints are added to the initial scheduling constraint set to obtain the target scheduling constraint set. The energy storage power correction sequence is then regenerated based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data. The initial scheduling constraint set includes at least one of the following: power balance constraints, energy storage state of charge constraints, energy storage charge and discharge power rated value constraints, and grid connection point switching power constraints. If the energy storage power correction sequence satisfies the target scheduling constraint set, then an energy storage power control command is generated based on the energy storage power correction sequence.

[0006] Optionally, generating dynamic constraints on energy storage power based on the node voltage and the branch load rate includes: When the branch load rate is greater than the preset load rate threshold, the upper limit of energy storage power in the dynamic constraint of energy storage power is determined based on the rated capacity of the corresponding branch, the preset safety margin coefficient, the photovoltaic output prediction data and the load prediction data. When the node voltage exceeds the preset voltage range, the power flow equation generated during the power flow calculation of the preset distribution network steady-state topology model is differentiated to obtain the corresponding power flow calculation Jacobian matrix, so as to determine the voltage-power sensitivity. The energy storage power adjustment amount is determined based on the node voltage over-limit amount and the voltage-power sensitivity, so as to generate the energy storage power dynamic constraint according to the energy storage power adjustment amount.

[0007] Optionally, determining the energy storage power adjustment amount based on the node voltage over-limit and the voltage-power sensitivity includes: When there are multiple energy storage devices in the photovoltaic-storage microgrid, a sensitivity matrix is ​​constructed based on the voltage-power sensitivity of each energy storage device access node, and the over-limit amount of the node voltage is allocated according to the sensitivity matrix to determine the energy storage power adjustment amount corresponding to each energy storage device.

[0008] Optionally, generating the transient profile to be verified based on the energy storage power change data corresponding to the time to be verified includes: Based on the rated power change rate and control delay of the energy storage converter, the energy storage power change data corresponding to the time to be verified is converted into a power waveform, and the power waveform is used as the transient profile to be verified.

[0009] Optionally, generating the energy storage power ramp-up rate constraint based on the transient safety index includes: When the bus voltage overshoot amplitude in the transient safety index is greater than the preset overshoot threshold, the maximum allowable power ramp rate is determined based on the bus voltage overshoot amplitude and the energy storage converter control response parameters, and an energy storage power ramp rate constraint is generated based on the maximum allowable power ramp rate.

[0010] Optionally, after regenerating the energy storage power correction sequence based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data, the method further includes: The energy storage power correction sequence is used as the new energy storage power initial sequence. The step of inputting the energy storage power initial sequence into the preset distribution network steady-state topology model for power flow calculation is repeated to obtain the node voltage and branch load rate until the node voltage and the branch load rate meet the preset steady-state safety conditions and the transient safety index meets the preset transient safety conditions.

[0011] Optionally, generating energy storage power control commands based on the energy storage power correction sequence includes: Based on the energy storage power ramp-up rate constraint, the energy storage power at adjacent times in the energy storage power correction sequence is interpolated to obtain a target energy storage power command sequence that satisfies the energy storage power ramp-up rate constraint, and the target energy storage power command sequence is determined as the energy storage power control command.

[0012] Secondly, this application discloses a multi-scale security correction device for energy storage power commands in a photovoltaic-storage microgrid, comprising: The data acquisition module is used to acquire photovoltaic power output forecast data, load forecast data and electricity price data of the photovoltaic-storage microgrid, and generate an initial energy storage power sequence based on the photovoltaic power output forecast data, the load forecast data and the electricity price data; The first constraint generation module is used to input the initial sequence of energy storage power into a preset distribution network steady-state topology model for power flow calculation to obtain node voltage and branch load rate, and generate dynamic constraints of energy storage power based on the node voltage and the branch load rate. The transient data generation module is used to perform differential calculation on the energy storage power at adjacent moments in the initial sequence of energy storage power, and take the moment when the differential result exceeds the preset power step threshold as the moment to be checked, so as to generate a transient profile to be checked based on the energy storage power change data corresponding to the moment to be checked. The second constraint generation module is used to input the transient section to be checked into a preset electromagnetic transient simulation model to obtain transient safety indicators, and generate energy storage power ramp rate constraints based on the transient safety indicators. The sequence correction module is used to add the energy storage power dynamic constraints and the energy storage power ramp-up rate constraints to the initial scheduling constraint set to obtain the target scheduling constraint set, and to regenerate the energy storage power correction sequence based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data; wherein, the initial scheduling constraint set includes at least one of the following: power balance constraints, energy storage state of charge constraints, energy storage charging and discharging power rated value constraints, and grid connection point switching power constraints; The instruction generation module is used to generate an energy storage power control instruction based on the energy storage power correction sequence if the energy storage power correction sequence satisfies the target scheduling constraint set.

[0013] Optionally, the first constraint generation module includes: The branch constraint generation unit is used to determine the upper limit of energy storage power in the dynamic constraint of energy storage power based on the rated capacity of the corresponding branch, the preset safety margin coefficient, the photovoltaic output prediction data and the load prediction data when the load rate of the branch is greater than the preset load rate threshold. The voltage sensitivity calculation unit is used to differentiate the power flow equation generated when performing power flow calculation on the preset distribution network steady-state topology model when the node voltage exceeds the preset voltage range, and obtain the corresponding power flow calculation Jacobian matrix to determine the voltage-power sensitivity. The power adjustment determination unit is used to determine the energy storage power adjustment amount based on the over-limit amount of the node voltage and the voltage-power sensitivity, so as to generate the energy storage power dynamic constraint according to the energy storage power adjustment amount.

[0014] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the aforementioned disclosed multi-scale security correction method for energy storage power commands in photovoltaic-storage microgrids.

[0015] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid.

[0016] As can be seen, this application discloses the acquisition of photovoltaic output forecast data, load forecast data, and electricity price data of a photovoltaic-storage microgrid, and the generation of an initial energy storage power sequence based on the photovoltaic output forecast data, the load forecast data, and the electricity price data; inputting the initial energy storage power sequence into a preset distribution network steady-state topology model for power flow calculation to obtain node voltage and branch load rate, and generating dynamic constraints on energy storage power based on the node voltage and the branch load rate; performing differential calculation on the energy storage power at adjacent times in the initial energy storage power sequence, and taking the time corresponding to the differential result exceeding a preset power step threshold as the time to be checked, so as to generate a transient section to be checked based on the energy storage power change data corresponding to the time to be checked; and generating a transient section to be checked based on the data of energy storage power change at the time to be checked. A preset electromagnetic transient simulation model is input to obtain transient safety indicators, and energy storage power ramp-up rate constraints are generated based on the transient safety indicators. The energy storage power dynamic constraints and the energy storage power ramp-up rate constraints are added to the initial scheduling constraint set to obtain the target scheduling constraint set, and the energy storage power correction sequence is regenerated based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data. The initial scheduling constraint set includes at least one of power balance constraints, energy storage state of charge constraints, energy storage charging and discharging power rated value constraints, and grid connection point switching power constraints. If the energy storage power correction sequence satisfies the target scheduling constraint set, an energy storage power control command is generated based on the energy storage power correction sequence.

[0017] Therefore, it is evident that by acquiring photovoltaic output forecast data, load forecast data, and electricity price data, and generating an initial energy storage power sequence based on this, and using the microgrid's predicted operating state and economic signals as a foundation, the initial energy storage power sequence is then input into a preset distribution network steady-state topology model for power flow calculation. This yields node voltages and branch load rates, and generates dynamic constraints on energy storage power, ensuring that energy storage power control reflects the distribution network's steady-state operating boundaries and reduces the risks of node voltage exceeding limits and branch overloads. Furthermore, differential calculations are performed on the energy storage power at adjacent moments in the initial energy storage power sequence. Moments with significant power step changes are selected as moments to be verified, and transient profiles to be verified are generated based on the corresponding energy storage power change data. This avoids performing transient simulations for all scheduling moments, reducing the computational load for transient verification. Subsequently, the transient profiles to be verified are input into a preset electromagnetic transient simulation model to obtain transient safety indicators and generate energy storage power ramp-up rate constraints. This ensures that energy storage power changes are limited by transient safety boundaries, reducing the risks of voltage overshoot, harmonic distortion, or flicker. Finally, the dynamic constraints and ramp-up rate constraints of energy storage power are added to the initial scheduling constraint set to obtain the target scheduling constraint set. Then, the energy storage power correction sequence is regenerated by combining predicted data and electricity price data. Energy storage power control commands are generated when the target scheduling constraint set is met. In this way, the generated energy storage power control commands simultaneously consider economic dispatch, steady-state operation safety, and transient operation safety, improving the safety and adaptability of the photovoltaic-storage microgrid operation strategy. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0019] Figure 1 This is a flowchart of a multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid disclosed in this application; Figure 2 This is a timing diagram for issuing energy storage power control commands as disclosed in this application; Figure 3 This is a schematic diagram of the structure of a multi-scale security correction device for energy storage power command in a photovoltaic-storage microgrid disclosed in this application; Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0020] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0021] A photovoltaic-storage microgrid typically includes photovoltaic (PV) power generation units, energy storage devices, local loads, and a distribution network. Existing energy storage power control methods often generate energy storage power sequences based on PV output forecast data, load forecast data, and electricity price data to reduce operating costs or improve PV absorption capacity. These methods typically employ static constraints such as fixed upper and lower limits for energy storage power, state-of-charge ranges, and grid-connected power limits, making it difficult to reflect real-time operating conditions of the distribution network, such as node voltage and branch load rates. When PV output, load levels, or energy storage power commands change significantly, the generated energy storage power sequence may lead to node voltage exceeding limits or branch overload.

[0022] Furthermore, energy storage power sequences are typically generated according to scheduling time steps, and there may be significant power jumps between adjacent moments. If the energy storage converter directly executes this power change, it may cause transient risks such as voltage overshoot, harmonic distortion, or flicker. Existing transient safety analyses are mostly used for offline verification or post-event analysis, making it difficult to provide timely feedback to the generation process of energy storage power control commands.

[0023] To this end, the present invention provides a multi-scale security correction scheme for energy storage power commands in photovoltaic-storage microgrids. It can generate dynamic constraints on energy storage power based on the steady-state operating state corresponding to the initial sequence of energy storage power, and generate energy storage power ramp-up rate constraints based on the transient security index corresponding to the power step, thereby generating energy storage power control commands that satisfy both steady-state and transient constraints.

[0024] like Figure 1 As shown, this invention provides a multi-scale security correction method for energy storage power commands in photovoltaic-storage microgrids, including: Step S11: Obtain photovoltaic output forecast data, load forecast data, and electricity price data of the photovoltaic-storage microgrid, and generate an initial energy storage power sequence based on the photovoltaic output forecast data, the load forecast data, and the electricity price data.

[0025] In this embodiment, the photovoltaic-storage microgrid includes photovoltaic power generation units, energy storage devices, local loads, a power distribution network, and control equipment. The photovoltaic power generation units may include photovoltaic arrays and photovoltaic inverters. The energy storage devices may include battery energy storage systems and energy storage converters. The local loads include industrial loads, commercial building loads, residential loads, or other electrical equipment. The power distribution network may include buses, feeders, transformers, switchgear, and grid connection points. The control equipment may include edge computing devices, industrial control computers, microgrid local controllers, cloud servers, or other devices capable of executing control programs.

[0026] Furthermore, the multi-scale security correction method for energy storage power commands in photovoltaic-storage microgrids can be executed by an EMS (Energy Management System), or by edge computing devices, cloud servers, or local controllers in collaboration. This application does not limit the specific deployment method, as long as it can obtain photovoltaic output forecast data, load forecast data, and electricity price data, and can perform steady-state verification, transient verification, and rescheduling optimization on the initial sequence of energy storage power.

[0027] In this embodiment, the multi-scale security correction method for the energy storage power command of the photovoltaic-storage microgrid can also be executed through the multi-scale security correction system for the energy storage power command of the photovoltaic-storage microgrid. This system includes a data acquisition and prediction module, which runs on an edge computing device, embedded industrial control computer, edge gateway, or cloud server. The data acquisition and prediction module is connected to the photovoltaic inverter communication interface via an Ethernet interface, or it can be connected to field devices via an RS-485 (Recommended Standard 485) bus. Communication protocols may include Modbus RTU (Modbus Remote Terminal Unit), Modbus TCP (Modbus Transmission Control Protocol), or other power communication protocols. Electricity market price data can be obtained through an application programming interface (API) or a local electricity price database.

[0028] The system also includes an initial economic scheduling optimization module, which can run on the processor of an edge computing device or on the processor of a cloud server. The processor can be a central processing unit (CPU) or other computing processor. The initial economic scheduling optimization module can generate an initial sequence of energy storage power based on a MILP (Mixed Integer Linear Program) solver, a nonlinear programming solver, a rolling optimization algorithm, or other optimization algorithms.

[0029] The system also includes a steady-state verification processor, which can run on edge computing devices or cloud servers. This processor can pre-store the steady-state topology data and equipment parameters of the photovoltaic-storage microgrid distribution network. The distribution network steady-state topology data can include single-line diagram topology, node-branch relationships, line impedance, transformer rated capacity, transformer short-circuit impedance, turns ratio, node type, and other information. Node types can include slack nodes, PQ nodes, and PV nodes. PQ nodes typically represent load connection points or photovoltaic connection points, while PV nodes can represent energy storage connection points.

[0030] The system also includes a transient verification processor, which can run on edge computing devices or cloud servers, and in some implementations, can be accelerated using a graphics processing unit (GPU). The transient verification processor can pre-store preset electromagnetic transient simulation models. These preset electromagnetic transient simulation models may include IGBT (Insulated Gate Bipolar Transistor) switching stage models, PWM (Pulse Width Modulation) models, output LCL filter models, photovoltaic inverter electromagnetic transient models, distribution network feeder distributed parameter models, transformer saturation characteristic models, and load models in a PCS (Power Conversion System). The load models may include ZIP (Constant Impedance-Constant Current-Constant Power Load Model) models or induction motor models, where ZIP models are typically used to represent combined loads of constant impedance, constant current, and constant power.

[0031] The system also includes a constraint equation reconstruction module, which can run on the same processor as the initial economic scheduling optimization module or on a separate computing device. This module receives steady-state and transient verification results, generates dynamic constraints on energy storage power based on the steady-state results, and generates energy storage power ramp-up constraints based on the transient results. The control command issuance module can run on edge computing devices or microgrid local controllers, such as programmable logic controllers (PLCs) or embedded controllers, and issues energy storage power control commands to the PCS controller via protocols such as Modbus TCP and IEC 61850 (International Electrotechnical Commission 61850 standard).

[0032] After the functions of each module in the above system are determined, data acquisition is performed first. The photovoltaic output forecast data can represent the predicted photovoltaic power generation at each scheduling moment within a future scheduling cycle; the load forecast data can represent the predicted local load power at each scheduling moment within a future scheduling cycle; the electricity price data can include time-of-use pricing, real-time pricing forecasts, or other price data reflecting electricity purchase costs and sales revenue; the scheduling cycle can be a day-ahead scheduling cycle, an intraday rolling scheduling cycle, or a real-time control cycle; the scheduling time step can be 5 minutes, 15 minutes, 30 minutes, or other time lengths. This embodiment uses 15 minutes as a scheduling time step, and the entire day can include 96 scheduling moments. It should be noted that the above time scale is for illustrative purposes only and does not constitute a limitation on the scope of protection of this application.

[0033] When generating the initial sequence of energy storage power, the objective function is a weighted combination of minimizing system operating costs, maximizing photovoltaic (PV) absorption, minimizing electricity purchase costs, minimizing energy storage aging costs, or multiple objectives. Taking minimizing operating costs as an example, the objective function can consider the electricity purchase and sale costs corresponding to the power exchanged with the main grid, the aging costs of energy storage charging and discharging, and other equipment operating costs. The objective function is expressed as: ; in, This is the number of time steps within the scheduling cycle (e.g., 96 for day-ahead scheduling with a step size of 15 minutes). For a moment The electricity price (time-of-use price or real-time price forecast). This is for exchanging power with the main grid (positive for purchasing electricity, negative for selling electricity). The equivalent aging cost coefficient for energy storage charging and discharging. This refers to the energy storage charging and discharging power (positive for discharging, negative for charging). For time step.

[0034] When generating the initial sequence of energy storage power, an initial scheduling constraint set can be used. The initial scheduling constraint set may include power balance constraints. Upper and lower limits of energy storage SOC (State of Charge, remaining energy) Energy storage charging and discharging power rated value constraints Grid connection point switching power constraints Static constraints include power balance constraints, which represent the balance between photovoltaic output, energy storage power, grid switching power, and load power. Energy storage SOC upper and lower limit constraints can be used to limit the state of charge of battery energy storage systems. Energy storage charge and discharge power rating constraints can be used to limit the maximum charge and discharge power of energy storage devices at various times.

[0035] It should be noted that the optimization solver can be either a MILP solver or a nonlinear programming solver, and the output is an initial sequence of energy storage power. , The currently generated initial energy storage power sequence mainly reflects the economic dispatch results. These results have not fully considered the steady-state operation and transient operation risks of the distribution network, and therefore still need to undergo steady-state and transient verification.

[0036] In some specific implementations, the initial economic dispatch optimization module can establish an optimization model of the following type: The objective function is the cost of electricity purchase, revenue from electricity sales, energy storage aging cost, or curtailment penalty cost within the dispatch period. Constraints include the power balance of the photovoltaic-storage microgrid, the charging and discharging power range of energy storage devices, the energy storage SOC variation equation, the upper and lower limits of energy storage SOC, and the power exchange range at the grid connection point. Solving this optimization model yields the charging and discharging power of the energy storage devices at each moment within the dispatch period, forming an initial sequence of energy storage power.

[0037] In some specific implementations, the SOC variation equation for energy storage can be determined based on the energy storage charge / discharge efficiency, sampling time interval, and rated energy storage capacity. For example, when the energy storage is discharging, the SOC decreases as the discharge power increases; when the energy storage is charging, the SOC increases as the charging power increases. This SOC variation equation can be used as part of the initial scheduling constraint set.

[0038] Step S12: Input the initial sequence of energy storage power into the preset distribution network steady-state topology model for power flow calculation to obtain node voltage and branch load rate, and generate dynamic constraints of energy storage power based on the node voltage and the branch load rate.

[0039] In this embodiment, a preset distribution network steady-state topology model is used to describe the electrical topology of the photovoltaic-storage microgrid under steady-state operating conditions. This model may include data such as nodes, branches, line impedances, transformer parameters, node types, and device connection locations. When the initial sequence of energy storage power is input into the preset distribution network steady-state topology model, the energy storage power at each scheduling time can be used as injected power or load power to participate in power flow calculations, based on the actual connection nodes of the energy storage devices. Simultaneously, photovoltaic output forecast data and load forecast data are also injected into the preset distribution network steady-state topology model according to their respective connection nodes.

[0040] In one specific implementation, the preset steady-state topology model of the distribution network may include: Single-line diagram topology: Node-branch association matrix, describing the electrical connection relationships between each node (bus, load connection point, photovoltaic connection point, energy storage connection point); Line parameters: Resistance of each branch Reactance , to ground susceptance ; Transformer parameters: Rated capacity Short-circuit impedance , ratio; Node type definitions: Balanced node (grid connection point), PQ node (load / PV access point), PV node (energy storage access point).

[0041] The energy storage power and photovoltaic output at each moment in the initial energy storage power sequence are injected into the preset distribution network steady-state topology model according to the actual access nodes, and the load power at the corresponding moment is also injected. For each moment... Performing the Newton-Raphson power flow calculation yields: Voltage amplitude at each node and phase angle , Current in each branch or load rate , .

[0042] In this embodiment, when the branch load rate is greater than a preset load rate threshold, the upper limit of energy storage power in the dynamic constraints of energy storage power is determined based on the rated capacity of the corresponding branch, the preset safety margin coefficient, the photovoltaic output prediction data, and the load prediction data. When the node voltage exceeds a preset voltage range, the power flow equation generated during the power flow calculation of the preset distribution network steady-state topology model is differentiated to obtain the corresponding power flow calculation Jacobian matrix, thereby determining the voltage-power sensitivity. The energy storage power adjustment amount is determined based on the node voltage exceedance and the voltage-power sensitivity, and the energy storage power dynamic constraints are generated according to the energy storage power adjustment amount. Specifically, when there are multiple energy storage devices in the photovoltaic-energy storage microgrid, a sensitivity matrix is ​​constructed based on the voltage-power sensitivity of each energy storage device access node, and the node voltage exceedance is allocated according to the sensitivity matrix to determine the energy storage power adjustment amount corresponding to each energy storage device.

[0043] Understandably, if the node voltage exceeds the preset voltage range... This indicates a risk of node voltage exceeding limits at the corresponding scheduling time. The preset voltage range can be set according to power system operation specifications, for example, 0.95 pu to 1.05 pu. If the branch load rate exceeds the preset load rate threshold... This indicates that the corresponding branch has an overload risk. The preset load rate threshold can be determined based on the branch's rated capacity, the transformer's rated capacity, and the safety margin.

[0044] The voltage over-limit detection criteria are as follows: or ; The overload judgment condition for branch circuit is: ; In some implementations, when the branch load rate exceeds a preset load rate threshold, the upper limit of energy storage power in the dynamic constraints can be determined based on the rated capacity of the corresponding branch, the preset safety margin coefficient, photovoltaic output prediction data, and load prediction data. For example, in a transformer overload scenario, if the downstream load power and photovoltaic output combined with the energy storage power at a certain scheduling moment will cause the transformer load rate to exceed a preset threshold, the upper limit of the energy storage discharge power or charging power at that scheduling moment can be determined in reverse based on the transformer's rated capacity and safety margin.

[0045] For example, if a transformer has a fixed rated capacity and a preset safety margin coefficient, and the downstream load power, photovoltaic output, and energy storage power are determined at a certain dispatch time, then the boundary that the energy storage power should not exceed can be determined in reverse based on the transformer's allowable carrying capacity and the known photovoltaic output and load power. This boundary can serve as a dynamic constraint on the energy storage power at that dispatch time.

[0046] If at time Node detected Voltage exceeding limit or branch Overload triggers the steady-state constraint reconfiguration mechanism, automatically reversing the over-limit physical quantities into dynamic constraint boundaries for energy storage power. Taking branch overload as an example (transformer overload scenario is most typical): Let time... Branch detected (Corresponding main transformer) Load rate Extract the rated capacity of the transformer. At that moment, an uncontrollable load was connected downstream of the transformer. and photovoltaic power output The system automatically generates a dynamic upper limit constraint on the energy storage charging power at that moment: ; in, This is the safety margin factor for the transformer, preset according to the transformer operating procedures and the aging status of the equipment.

[0047] For node voltage exceedance scenarios, the system extracts voltage-power sensitivity based on the Jacobian matrix J calculated by the Newton-Raphson power flow: ; in, For nodes The injected active power. For energy storage access nodes. According to the voltage limit (or ), calculate the energy storage power adjustment amount: ; This generates dynamic upper / lower limit constraints for the energy storage power at that moment. The above derivation is illustrated using a single energy storage access scenario as an example. For scenarios where multiple energy storage devices are accessed simultaneously, the sensitivity elements corresponding to each energy storage access node in the Jacobian matrix constitute a sensitivity matrix. The power adjustment amount between each energy storage device can be allocated by solving a system of linear equations or quadratic programming. The basic principle is to allocate the power according to the proportion of sensitivity of each device to the over-limit node, with energy storage devices with higher sensitivity bearing a larger adjustment amount. The dynamic constraints at all over-limit moments form a dynamic steady-state constraint equation system. .

[0048] The aforementioned dynamic constraints on energy storage power are generated based on the steady-state operating state corresponding to the current initial sequence of energy storage power, and differ from fixed rated energy storage power constraints. These dynamic constraints can change dynamically with photovoltaic output, load levels, grid topology, and node voltage conditions.

[0049] Step S13: Perform differential calculation on the energy storage power at adjacent moments in the initial energy storage power sequence, and take the moment when the differential result exceeds the preset power step threshold as the moment to be checked, so as to generate a transient profile to be checked based on the energy storage power change data corresponding to the moment to be checked.

[0050] In this embodiment, the energy storage power change data corresponding to the time to be verified is converted into a power waveform based on the rated power change rate and control delay of the energy storage converter, and the power waveform is used as the transient profile to be verified. It is understood that the initial energy storage power sequence is given according to the scheduling time step. There may be significant energy storage power changes between adjacent scheduling times. For example, the energy storage device may be in a charging state at the previous scheduling time and switch to a discharging state at the next scheduling time. If this switching amplitude is large, the energy storage converter may experience a large power step during execution, thereby causing transient risks such as voltage overshoot, harmonic distortion, or flicker. To reduce the computational load of transient simulation, the energy storage power at adjacent times in the initial energy storage power sequence is differentially calculated. The absolute value of the power difference between adjacent times in the initial energy storage power sequence is calculated: ; Preset power step threshold (A preset threshold determined based on the rated power of the energy storage) so that it can be used according to the preset power step threshold. Screening key transient sections: ; Among them, the transient sections in the set of key transient sections are the transient sections to be checked. For each transient section to be checked... ,Will The power commands within this 15-minute interval are refined into power waveforms with millisecond-level time steps, serving as input for electromagnetic transient simulation. The refinement method is as follows: based on the actual response characteristics of the energy storage PCS (rated power change rate, control delay, etc.), the 15-minute step commands are deconstructed into ramp transition or S-curve transition waveforms.

[0051] Therefore, the time when transient simulation is required is reduced from... One reduced to Since large power jumps during normal operation only occur at a few moments, such as when switching between charging and discharging modes, the number of transient simulation moments required after gradient differential filtering is usually no more than one-tenth of the total time period, meaning that the amount of simulation data is reduced by more than 90% after filtering.

[0052] Step S14: Input the transient section to be checked into the preset electromagnetic transient simulation model to obtain the transient safety index, and generate the energy storage power ramp rate constraint based on the transient safety index.

[0053] In this embodiment, the refined and deconstructed power waveform is input into a preset electromagnetic transient simulation model, which includes: An IGBT switching stage model for a power storage inverter (PCS), including PWM modulation and an output LCL filter; Electromagnetic transient model of photovoltaic inverter; Distributed parameter model of distribution network feeder (π-type equivalent circuit or Bergeron traveling wave model); Transformer saturation characteristic model; Static / dynamic characteristic model of load (ZIP model or induction motor model).

[0054] The simulation output focuses on the following transient safety indicators: Bus voltage overshoot amplitude The unit is pu; Total harmonic distortion of voltage ; Short-time flicker severity .

[0055] The criteria for determining whether a transient safety indicator exceeds its limit are: This is then determined to be a voltage overshoot exceeding the limit, where, The voltage overshoot threshold is preset based on the equipment's tolerance capability; This is then determined to be a harmonic over-limit, where, The harmonic distortion rate limit is preset according to the power quality standard; The condition was determined to be a flickering violation, in which, This is a flicker severity threshold preset according to power quality standards.

[0056] In this embodiment, when the bus voltage overshoot amplitude in the transient safety index exceeds a preset overshoot threshold, the maximum allowable power ramp rate is determined based on the bus voltage overshoot amplitude and the energy storage converter control response parameters, and an energy storage power ramp rate constraint is generated based on the maximum allowable power ramp rate. It is understood that if in the transient section to be verified... If a transient limit violation is detected (taking voltage overshoot as an example), the system triggers the transient constraint reconstruction mechanism. Taking voltage overshoot as an example: Energy storage inverters (PCS) typically employ droop control or virtual synchronous machine control, and their active power-voltage droop characteristic can be approximated as: ; When the power undergoes a step change, the dynamic response of the voltage depends on the closed-loop transfer function of the inverter control loop. In the power command from Step to The voltage overshoot caused by this can be estimated using the following engineering approximation formula: ; in, This represents the system's resonant peak value. This approximation formula is derived based on small-signal frequency domain analysis and is applicable to scenarios where the power step amplitude is within the inverter's rated power range. When the system exhibits strong nonlinearity (such as transformer saturation or limiter operation), the time-domain electromagnetic transient simulation results should be used. The above formula is used for rapid prediction and constraint direction determination. This is to limit voltage overshoot within the allowable range. Within this context, the rate of change of power command needs to be constrained. The system calculates the maximum allowable power ramp rate in reverse, based on the overshoot amplitude. ; in, Let be the response time constant of the inverter control loop. Since the above derivation is based on a linear approximation, the obtained can be used in engineering implementation. Multiply by a conservatism factor less than 1 to allow for a safety margin. This gradient constraint is incorporated into the dynamic transient constraint equation. . The physical meaning is that when the upper-level scheduling model issues power commands, it must smooth the original vertical step into a ramp with a finite slope, thereby eliminating the transient impact on the physical power grid from the source.

[0057] Step S15: Add the energy storage power dynamic constraint and the energy storage power ramp-up rate constraint to the initial scheduling constraint set to obtain the target scheduling constraint set, and regenerate the energy storage power correction sequence based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data; wherein, the initial scheduling constraint set includes at least one of the following: power balance constraint, energy storage state of charge constraint, energy storage charging and discharging power rated value constraint, and grid connection point switching power constraint.

[0058] In this embodiment, the generated energy storage power is dynamically constrained. and energy storage power ramp rate constraints These constraints are appended to the initial scheduling constraint set to form the extended constraint set, which is the target scheduling constraint set. ; in, Includes corrected upper / lower limits for energy storage power at various out-of-limit moments: ; In this embodiment, the energy storage power correction sequence is used as the new energy storage power initial sequence. The step of inputting the energy storage power initial sequence into the preset distribution network steady-state topology model for power flow calculation is repeated to obtain the node voltage and branch load rate until the node voltage and the branch load rate meet the preset steady-state security conditions and the transient security index meets the preset transient security conditions. It can be understood that, with the extended constraint set... The previous optimization process is retried to obtain the corrected power sequence, which is then fed back into the model for verification. This process constitutes a closed-loop iteration: after each round of optimization, the model is re-verified; if a new limit violation is detected, constraints are added and the next round of optimization is triggered, until convergence.

[0059] The iteration termination condition is as follows: Since each iteration only adds constraint equations to the constraint matrix when a new limit is detected (at most one steady-state constraint and one transient constraint are added at each time), and the number of time T in the scheduling cycle is finite, and the number of new limit violations shows a monotonically decreasing trend during the iteration process, this closed-loop iteration process must terminate within a finite number of rounds. There are two termination states: (1) All (1) All time points pass the steady-state power flow check and all key sections pass the transient check, outputting a safe and feasible solution; (2) If a conflict occurs between the newly added constraints, causing the optimization problem to be infeasible, the system outputs an infeasibility warning and relaxes some soft constraints according to priority (first relax the economic target margin, then prompt for manual intervention) to restore feasibility. Hard physical constraints involving equipment safety are not included in the relaxation range.

[0060] Therefore, the final output safe operation strategy includes two parts: energy storage power commands at each time point. Maximum permissible gradient at each time point (For unexpected step jumps in non-critical sections of the span).

[0061] Step S16: If the energy storage power correction sequence satisfies the target scheduling constraint set, then generate an energy storage power control command based on the energy storage power correction sequence.

[0062] In this embodiment, the energy storage power at adjacent moments in the energy storage power correction sequence is interpolated according to the energy storage power ramp-up rate constraint to obtain a target energy storage power command sequence that satisfies the energy storage power ramp-up rate constraint. This target energy storage power command sequence is then determined as the energy storage power control command. It can be understood that the control command issuance module decomposes the final safe operation strategy into a command format suitable for execution by the physical devices and issues it. Regarding the ramp-up rate constraint... The system between two adjacent scheduling times (e.g. to Within 15 minutes, power commands will be sent at finer-grained time intervals (such as 1 second or 100 milliseconds) at intervals not exceeding [a certain value]. The active power setpoint sequence is generated by linear interpolation or S-curve smoothing at the setpoint rate. This sequence is then transmitted to the energy storage PCS controller via Modbus TCP or IEC 61850 protocol. The command transmission timing is as follows: Figure 2 As shown, the scheduling steady-state verification processor will The pre-stored steady-state physical topology model of the distribution network is injected with the actual physical access nodes of energy storage and photovoltaics. Newton-Raphson power flow calculations are performed to obtain the voltage of each node and the load factor of each branch. If the steady-state verification processor detects an out-of-limit condition, the constraint equation reconstruction module extracts the voltage-power sensitivity based on the Jacobian matrix of the Newton-Raphson power flow calculation or, based on the transformer rated capacity constraint, reverse-derives and generates dynamic constraint equations for the extreme power value of energy storage at that moment. Transient verification processor for The absolute value of the power difference between adjacent time points is calculated, and key transient sections are screened using a power step threshold, reducing the number of time points requiring transient simulation throughout the day by more than 90%. For each key section, the transient verification processor refines the 15-minute step command into a millisecond-level power waveform, inputting it into a pre-stored electromagnetic transient simulation model (including the IGBT switch-level PCS model and the distribution network distributed parameter model) to detect the bus voltage overshoot amplitude, total harmonic distortion rate, and short-time flicker severity. If the transient verification processor detects a transient exceedance, the constraint equation reconstruction module automatically generates a maximum power ramp-up rate constraint for that time point based on the inverse relationship between the overshoot amplitude and the inverter droop control closed-loop transfer function. The constraint equation reconstruction module adds the two constraints obtained above to the initial constraint matrix, forming an extended constraint set. It is then determined whether all time points pass the steady-state verification and all key sections pass the transient verification. If not, the extended constraint set is used as the constraint condition, triggering re-optimization and entering the next round of closed-loop iteration. If so, the final safe operation strategy is output: energy storage power commands and maximum allowable ramp rate at each time point. The command issuing module performs high-time-resolution smooth interpolation of the final strategy according to the ramp rate constraint, and sends it to the controller of the physical energy storage inverter (PCS) via Ethernet interface through ModbusTCP or IEC 61850 communication protocol. The PCS controller continues to execute the power command sequence until the next scheduling cycle arrives, and a new round of scheduling begins.

[0063] Therefore, it is evident that by acquiring photovoltaic output forecast data, load forecast data, and electricity price data, and generating an initial energy storage power sequence based on this, and using the microgrid's predicted operating state and economic signals as a foundation, the initial energy storage power sequence is then input into a preset distribution network steady-state topology model for power flow calculation. This yields node voltages and branch load rates, and generates dynamic constraints on energy storage power, ensuring that energy storage power control reflects the distribution network's steady-state operating boundaries and reduces the risks of node voltage exceeding limits and branch overloads. Furthermore, differential calculations are performed on the energy storage power at adjacent moments in the initial energy storage power sequence. Moments with significant power step changes are selected as moments to be verified, and transient profiles to be verified are generated based on the corresponding energy storage power change data. This avoids performing transient simulations for all scheduling moments, reducing the computational load for transient verification. Subsequently, the transient profiles to be verified are input into a preset electromagnetic transient simulation model to obtain transient safety indicators and generate energy storage power ramp-up rate constraints. This ensures that energy storage power changes are limited by transient safety boundaries, reducing the risks of voltage overshoot, harmonic distortion, or flicker. Finally, the dynamic constraints and ramp-up rate constraints of energy storage power are added to the initial scheduling constraint set to obtain the target scheduling constraint set. Then, the energy storage power correction sequence is regenerated by combining predicted data and electricity price data. Energy storage power control commands are generated when the target scheduling constraint set is met. In this way, the generated energy storage power control commands simultaneously consider economic dispatch, steady-state operation safety, and transient operation safety, improving the safety and adaptability of the photovoltaic-storage microgrid operation strategy.

[0064] like Figure 3 As shown, the present invention also discloses a multi-scale security correction device for energy storage power commands in a photovoltaic-storage microgrid, comprising: The data acquisition module 11 is used to acquire photovoltaic power output prediction data, load prediction data and electricity price data of the photovoltaic-storage microgrid, and generate an initial energy storage power sequence based on the photovoltaic power output prediction data, the load prediction data and the electricity price data; The first constraint generation module 12 is used to input the initial sequence of energy storage power into a preset distribution network steady-state topology model for power flow calculation, so as to obtain the node voltage and branch load rate, and generate dynamic constraints of energy storage power based on the node voltage and the branch load rate. The transient data generation module 13 is used to perform differential calculation on the energy storage power at adjacent moments in the initial sequence of energy storage power, and take the corresponding moment when the differential result exceeds the preset power step threshold as the moment to be checked, so as to generate a transient profile to be checked based on the energy storage power change data corresponding to the moment to be checked. The second constraint generation module 14 is used to input the transient section to be checked into a preset electromagnetic transient simulation model to obtain transient safety indicators, and generate energy storage power ramp rate constraints based on the transient safety indicators. The sequence correction module 15 is used to add the energy storage power dynamic constraint and the energy storage power ramp-up rate constraint to the initial scheduling constraint set to obtain the target scheduling constraint set, and to regenerate the energy storage power correction sequence based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data; wherein, the initial scheduling constraint set includes at least one of the following: power balance constraint, energy storage state of charge constraint, energy storage charging and discharging power rated value constraint, and grid connection point switching power constraint; The instruction generation module 16 is used to generate an energy storage power control instruction based on the energy storage power correction sequence if the energy storage power correction sequence satisfies the target scheduling constraint set.

[0065] In one specific embodiment, the first constraint generation module 12 may specifically include: The branch constraint generation unit is used to determine the upper limit of energy storage power in the dynamic constraint of energy storage power based on the rated capacity of the corresponding branch, the preset safety margin coefficient, the photovoltaic output prediction data and the load prediction data when the load rate of the branch is greater than the preset load rate threshold. The voltage sensitivity calculation unit is used to differentiate the power flow equation generated when performing power flow calculation on the preset distribution network steady-state topology model when the node voltage exceeds the preset voltage range, and obtain the corresponding power flow calculation Jacobian matrix to determine the voltage-power sensitivity. The power adjustment determination unit is used to determine the energy storage power adjustment amount based on the over-limit amount of the node voltage and the voltage-power sensitivity, so as to generate the energy storage power dynamic constraint according to the energy storage power adjustment amount.

[0066] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0067] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multi-scale security correction method for energy storage power commands in the photovoltaic-storage microgrid disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be a computer.

[0068] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0069] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU, which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0070] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0071] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. It can be Windows Server, Netware, Unix, Linux, etc. The computer program 222 includes, in addition to a computer program capable of performing the multi-scale security correction method for the energy storage power command of the photovoltaic-storage microgrid disclosed in any of the foregoing embodiments, it may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0072] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0073] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0074] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software module may be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable disks, CD-ROMs (Compact Disc-Read Only Memory), or any other form of storage medium known in the art.

[0075] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0076] The solution provided by the present invention has been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of ​​the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid, characterized in that, include: Acquire photovoltaic output forecast data, load forecast data, and electricity price data of the photovoltaic-storage microgrid, and generate an initial energy storage power sequence based on the photovoltaic output forecast data, the load forecast data, and the electricity price data; The initial sequence of energy storage power is input into a preset distribution network steady-state topology model for power flow calculation to obtain node voltage and branch load rate, and dynamic constraints of energy storage power are generated based on the node voltage and the branch load rate. The energy storage power of adjacent moments in the initial energy storage power sequence is differentially calculated, and the moment when the differential result exceeds the preset power step threshold is taken as the moment to be checked, so as to generate the transient profile to be checked based on the energy storage power change data corresponding to the moment to be checked. The transient section to be checked is input into a preset electromagnetic transient simulation model to obtain transient safety indicators, and energy storage power ramp-up rate constraints are generated based on the transient safety indicators. The energy storage power dynamic constraints and the energy storage power ramp-up rate constraints are added to the initial scheduling constraint set to obtain the target scheduling constraint set. The energy storage power correction sequence is then regenerated based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data. The initial scheduling constraint set includes at least one of the following: power balance constraints, energy storage state of charge constraints, energy storage charge and discharge power rated value constraints, and grid connection point switching power constraints. If the energy storage power correction sequence satisfies the target scheduling constraint set, then an energy storage power control command is generated based on the energy storage power correction sequence.

2. The multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid according to claim 1, characterized in that, The process of generating dynamic constraints for energy storage power based on the node voltage and the branch load rate includes: When the branch load rate is greater than the preset load rate threshold, the upper limit of energy storage power in the dynamic constraint of energy storage power is determined based on the rated capacity of the corresponding branch, the preset safety margin coefficient, the photovoltaic output prediction data and the load prediction data. When the node voltage exceeds the preset voltage range, the power flow equation generated during the power flow calculation of the preset distribution network steady-state topology model is differentiated to obtain the corresponding power flow calculation Jacobian matrix, so as to determine the voltage-power sensitivity. The energy storage power adjustment amount is determined based on the node voltage over-limit amount and the voltage-power sensitivity, so as to generate the energy storage power dynamic constraint according to the energy storage power adjustment amount.

3. The multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid according to claim 2, characterized in that, The determination of the energy storage power adjustment amount based on the node voltage over-limit and the voltage-power sensitivity includes: When there are multiple energy storage devices in the photovoltaic-storage microgrid, a sensitivity matrix is ​​constructed based on the voltage-power sensitivity of each energy storage device access node, and the over-limit amount of the node voltage is allocated according to the sensitivity matrix to determine the energy storage power adjustment amount corresponding to each energy storage device.

4. The multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid according to claim 1, characterized in that, The step of generating the transient profile to be verified based on the energy storage power change data corresponding to the time to be verified includes: Based on the rated power change rate and control delay of the energy storage converter, the energy storage power change data corresponding to the time to be verified is converted into a power waveform, and the power waveform is used as the transient profile to be verified.

5. The multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid according to claim 1, characterized in that, The step of generating energy storage power ramp-up rate constraints based on the transient safety index includes: When the bus voltage overshoot amplitude in the transient safety index is greater than the preset overshoot threshold, the maximum allowable power ramp rate is determined based on the bus voltage overshoot amplitude and the energy storage converter control response parameters, and an energy storage power ramp rate constraint is generated based on the maximum allowable power ramp rate.

6. The multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid according to claim 1, characterized in that, After regenerating the energy storage power correction sequence based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data, the method further includes: The energy storage power correction sequence is used as the new energy storage power initial sequence. The step of inputting the energy storage power initial sequence into the preset distribution network steady-state topology model for power flow calculation is repeated to obtain the node voltage and branch load rate until the node voltage and the branch load rate meet the preset steady-state safety conditions and the transient safety index meets the preset transient safety conditions.

7. The multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid according to claim 1, characterized in that, The generation of energy storage power control commands based on the energy storage power correction sequence includes: Based on the energy storage power ramp-up rate constraint, the energy storage power at adjacent times in the energy storage power correction sequence is interpolated to obtain a target energy storage power command sequence that satisfies the energy storage power ramp-up rate constraint, and the target energy storage power command sequence is determined as the energy storage power control command.

8. A multi-scale security correction device for energy storage power commands in a photovoltaic-storage microgrid, characterized in that, include: The data acquisition module is used to acquire photovoltaic power output forecast data, load forecast data and electricity price data of the photovoltaic-storage microgrid, and generate an initial energy storage power sequence based on the photovoltaic power output forecast data, the load forecast data and the electricity price data; The first constraint generation module is used to input the initial sequence of energy storage power into a preset distribution network steady-state topology model for power flow calculation to obtain node voltage and branch load rate, and generate dynamic constraints of energy storage power based on the node voltage and the branch load rate. The transient data generation module is used to perform differential calculation on the energy storage power at adjacent moments in the initial sequence of energy storage power, and take the moment when the differential result exceeds the preset power step threshold as the moment to be checked, so as to generate a transient profile to be checked based on the energy storage power change data corresponding to the moment to be checked. The second constraint generation module is used to input the transient section to be checked into a preset electromagnetic transient simulation model to obtain transient safety indicators, and generate energy storage power ramp rate constraints based on the transient safety indicators. The sequence correction module is used to add the energy storage power dynamic constraints and the energy storage power ramp-up rate constraints to the initial scheduling constraint set to obtain the target scheduling constraint set, and to regenerate the energy storage power correction sequence based on the target scheduling constraint set, the photovoltaic output prediction data, the load prediction data, and the electricity price data; wherein, the initial scheduling constraint set includes at least one of the following: power balance constraints, energy storage state of charge constraints, energy storage charging and discharging power rated value constraints, and grid connection point switching power constraints; The instruction generation module is used to generate an energy storage power control instruction based on the energy storage power correction sequence if the energy storage power correction sequence satisfies the target scheduling constraint set.

9. The multi-scale security correction device for energy storage power commands in a photovoltaic-storage microgrid according to claim 8, characterized in that, The first constraint generation module includes: The branch constraint generation unit is used to determine the upper limit of energy storage power in the dynamic constraint of energy storage power based on the rated capacity of the corresponding branch, the preset safety margin coefficient, the photovoltaic output prediction data and the load prediction data when the load rate of the branch is greater than the preset load rate threshold. The voltage sensitivity calculation unit is used to differentiate the power flow equation generated when performing power flow calculation on the preset distribution network steady-state topology model when the node voltage exceeds the preset voltage range, and obtain the corresponding power flow calculation Jacobian matrix to determine the voltage-power sensitivity. The power adjustment determination unit is used to determine the energy storage power adjustment amount based on the over-limit amount of the node voltage and the voltage-power sensitivity, so as to generate the energy storage power dynamic constraint according to the energy storage power adjustment amount.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the multi-scale security correction method for energy storage power commands in a photovoltaic-storage microgrid as described in any one of claims 1 to 7.