Data-driven active power distribution network local control method and system based on machine learning

Through a data-driven method based on machine learning, a three-phase multi-period opportunity-constrained optimal power flow model is established to calculate the optimal DER set point and perform local control, solving the existing technology problems of distributed robust optimal power flow and distributed generation. It solves the challenge of real-time reactive power injection into the machine and achieves efficient power management in unbalanced three-phase systems and renewable energy environments.

CN118554518APending Publication Date: 2024-08-27LIAOYANG POWER SUPPLY COMPANY OF STATE GRID LIAONING ELECTRIC POWER SUPPLY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410499922.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing data-driven power systems require centralized solutions and reliable monitoring and communication infrastructure when dealing with distributed robust optimal power flow and real-time reactive power injection from distributed generators, and are difficult to effectively handle unbalanced three-phase systems and the uncertainties posed by renewable energy.

Method used

Using a data-driven method based on machine learning, by collecting seasonal historical data, a three-phase multi-period opportunity-constrained optimal power flow CC-OPF model is established to calculate the optimal distributed energy DER set point, including distributed generators, battery storage Local control of energy systems and controllable loads, using Monte Carlo methods to evaluate uncertainty margins, achieve offline optimization and perform local real-time control.

Benefits of technology

Effective control of the distribution network is achieved without the need for communication infrastructure, reducing system losses and DER resource adjustments, improving power quality and safety, mimicking the behavior of centralized optimization solutions, and adapting to imbalances Three-phase systems and renewable energy uncertainties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118554518A
    Figure CN118554518A
Patent Text Reader

Abstract

The invention relates to a data-driven active power distribution network local control method and system based on machine learning, and belongs to the technical field of data driving, and the method comprises the steps: collecting seasonal historical data with uncertainty; selecting an operation scene from seasonal historical data, and calculating an optimal distributed energy DER set point offline by using a three-phase multi-cycle chance constraint optimal power flow CC-OPF; creating an optimal control model for simulating a three-phase multi-cycle chance constraint optimal power flow CC-OPF, and sampling an optimal distributed energy DER set point for training to obtain a final optimal control model; and controlling the local part needing to be controlled by adopting the final optimal control model. According to the invention, a simple and effective optimization local control method is obtained, which can imitate the behavior of a centralized optimization scheme, without the need for any communication infrastructure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data-driven technology, and in particular to a data-driven active distribution network local control method and system based on machine learning. Background Art

[0002] In recent years, data-driven methods have attracted widespread attention in the field of power systems. In data-based distributed robust stochastic optimal power flow, data-based methods are used to solve the distributed robust optimal power flow (OPF) problem. Based on the model predictive control algorithm, the prediction error training data set is used to obtain the closed-loop control strategy. Some researchers have demonstrated methods to mitigate overvoltage with balanced phase loads. However, this approach requires a centralized solution as well as reliable and accurate monitoring and communication infrastructure. Other researchers have studied the use of machine learning techniques to represent optimal behavior. These literatures use nonlinear control strategies to calculate the real-time reactive power injection of distributed generators (DGs) based on inverter-based optimal power flow. Although it uses a linearized version of the network, it assumes that the balancing operation only focuses on one metric. Summary of the invention

[0003] In order to solve the technical problems in the related fields, the first aspect of the present invention provides a data-driven active distribution network local control method based on machine learning, and the second aspect also provides a data-driven active distribution network local control system based on machine learning.

[0004] The present invention is achieved through the following technical solutions:

[0005] In a first aspect, the present invention provides a data-driven active distribution network local control method based on machine learning, the method comprising:

[0006] Collect seasonal historical data with uncertainty;

[0007] Selecting operation scenarios from seasonal historical data, the optimal DER set points are calculated offline using the three-phase multi-period opportunity-constrained optimal power flow CC-OPF;

[0008] An optimal control model simulating a three-phase multi-period opportunity constrained optimal power flow CC-OPF is created, and the optimal distributed energy DER set points are sampled for training to obtain the final optimal control model, which includes: local control of distributed generators DG, local control of battery energy storage systems BESS, and local control of controllable loads;

[0009] The final optimal control model is used to control the local area that needs to be controlled.

[0010] Furthermore, the optimal DER set points are calculated offline using the three-phase multi-period opportunity constrained optimal power flow CC-OPF, including:

[0011] Establish the objective function, including the entire time range N hor In all network nodes N b , phase z and branch N br Minimize the cost and network loss of distributed energy DER control;

[0012] Establish constraints, including power balance constraints, power flow constraints, thermal load and voltage constraints, balancing constraints, and DER restrictions;

[0013] The objective function is solved under the constraints to obtain the optimal DER set point.

[0014] Furthermore, the objective function is:

[0015]

[0016] Where u is the vector of available active control measures, t is the length of each time period, and the curtailment power of the DG connected at phase z, node j and time t is given by the formula Given, where is the maximum available active power of the distributed generator DG, P g,j,z,t Active power injection for distributed generators DG, using reactive power to support Q ctrl,j,z,t =|Q g,j,z,t |For each distributed generator DG connected to phase z of node j, time t is minimized; Q g,j,z,t represents the reactive power injection or absorption of distributed generators DG, and the coefficients CP and CQ represent the cost of distributed generators DG for reducing active power and providing reactive power support, respectively. in and represents the apparent power flowing into branch i from each end; if and it is the sending and receiving end of the branch, CH is the penalty associated with violating safety and power quality constraints.

[0017] Furthermore, the constraints specifically include:

[0018] Power balance constraints:

[0019] The power injection at each node j, phase z and time step t is given by:

[0020]

[0021] Where P lflex,j,z,t and Plflex,j,z,t ·tan(φ load ) is the active and reactive node demand of constant power type, cos(φ load ) is the power factor of the load; Q B,j,z,t is the reactive power of the battery energy storage system BESS, and They are charging and discharging battery energy storage system BESS active power;

[0022] Power flow constraints:

[0023]

[0024] in, is the voltage of phase z at node j at time t, n represents the complex conjugate; I inj,t and I br,t are the vectors of the three-phase busbar injection and branch flow currents, respectively; BIBC is a matrix with 1s and 0s that captures the three-phase topology of DN; ΔV t is the vector of voltage drops on all branches and phases; BCBV is a matrix with the complex impedance of the line as its element; V slack is the three-phase voltage per unit at the relaxed bus; ΔV tap is the voltage amplitude change caused by a tap operation of the on-load tapchanger Transformer and is assumed to be constant for all taps; ρ t To define the integer value of the on-load tap changer OLTC position, the parameter ρ min ,ρ max They are the minimum and maximum tap positions of the on-load tap changer OLTC Transformer respectively;

[0025] Thermal load and voltage limitations:

[0026] The current constraint for branch i and phase z at time t is given by:

[0027] |I br,i,z,t |≤I i,z,max +η I,i,z,t ,η I,i,z.t ≥0

[0028] Among them I br,i,z,t is the branch current; I i,z,max is the maximum thermal limit; when the thermal constraint cannot be met, η I,i,z,t Used to relax constraints; the voltage constraint is given by:

[0029] V min -η V,j,z,t ≤|V j,z,t |≤V max +η V,j,z,t,η V,j,z,t ≥0

[0030] Where V max , V min are the upper and lower limits of the acceptable voltage respectively. When the voltage constraint cannot be met, η is used. V,j,z,t to relax the constraints;

[0031] Rotate the three voltage phases {a, b, c} We keep them close to the reference axis 0° and define the same feasible space for each of the three phases:

[0032]

[0033] Balance constraints:

[0034] The power quality of the distribution network DN is improved by balancing the three-phase voltages, using the IEC unbalance definition of the voltage unbalance factor, given by Given, where V- and V + They are the negative and positive sequences obtained by symmetric component analysis;

[0035] The balance constraint at node j and time t is given by VUF j,t (%)≤VUF MAX Given, where VUF MAX is the acceptable voltage imbalance factor; VUF is approximated by the negative voltage sequence, assuming that the positive voltage sequence is very close to 1pu, that is, VUF j,t ≈|V -,j,t |, we get:

[0036] |V -,j,t |≤VUF MAX +η VUF,j,t ,η VUF,j,t ≥0

[0037] where η VUF,j,t Relaxing constraints when they cannot be satisfied;

[0038] Distributed Energy Resources DER, including hazardous limits:

[0039]

[0040] in and are the upper and lower limits of active and reactive DG power at each node j, phase z and time t;

[0041] Controllable load, the characteristics of the load are given by:

[0042]

[0043] Among them, P lflex,j,z,t is the controlled active power demand at phase z of node j, and at time t, P shift,j,z is the load that can be transferred, and n j,z,t ∈{-1,0,1} indicates that when the initial demand P l,j,z,t An integer variable representing the increase or decrease in load during the transfer; and the constraints associated with the BESS:

[0044]

[0045] in is the installed battery energy storage system BESS capacity connected to phase z at node j; and are fixed minimum and maximum per-unit limits for the battery state of charge; and is the available energy at node j, phase z and time t.

[0046] Furthermore, uncertainty is handled through chance constraints, and the feasible space and current constraints are modified as follows:

[0047]

[0048] in The lower voltage amplitude constraint and the upper voltage amplitude constraint are tightened, I br This is the tightening of the current amplitude constraint.

[0049] Further, solving the objective function under the constraint conditions includes: calculating the optimal distributed energy DER set point using a single scan based on the BFS algorithm, and evaluating the uncertainty margin using the Monte Carlo method, wherein the Monte Carlo method for evaluating the uncertainty margin includes: solving the deterministic OPF with tightened constraints and calculating the uncertainty margin When the change in tightening value between two subsequent iterations is below a threshold When , the BFS algorithm has converged, where the uncertainty margin for:

[0050]

[0051] The superscript 0 indicates the value at the operating point where the prediction error is zero.

[0052] In a second aspect, the present invention provides a data-driven active distribution network local control system based on machine learning, the system comprising:

[0053] Collection module. Collect seasonal historical data with uncertainty;

[0054] The DER set point calculation module selects operation scenarios from seasonal historical data and uses the three-phase multi-period opportunity-constrained optimal power flow CC-OPF to calculate the optimal DER set point offline;

[0055] The optimal control model building module creates an optimal control model that simulates the three-phase multi-period opportunity-constrained optimal power flow CC-OPF, samples the best distributed energy DER set points for training to obtain the final optimal control model, which includes: local control of distributed generators DG, local control of battery energy storage systems BESS, and local control of controllable loads;

[0056] The local control module uses the final optimal control model to control the local area that needs to be controlled.

[0057] Furthermore, the distributed energy DER set point calculation module uses the three-phase multi-period opportunity constrained optimal power flow CC-OPF to calculate the optimal distributed energy DER set point offline, including:

[0058] Establish the objective function, including the entire time range N hor In all network nodes N b , phase z and branch N br Minimize the cost and network loss of distributed energy DER control;

[0059] Establish constraints, including power balance constraints, power flow constraints, thermal load and voltage constraints, balancing constraints, and DER restrictions;

[0060] The objective function is solved under the constraints to obtain the optimal DER set point.

[0061] Furthermore, the objective function is:

[0062]

[0063] Where u is the vector of available active control measures, t is the length of each time period, and the curtailment power of the DG connected at phase z, node j and time t is given by the formula Given, where is the maximum available active power of the distributed generator DG, P g,j,z,t Active power injection for distributed generators DG, using reactive power to support Q ctrl,j,z,t =|Q g,j,z,t |For each distributed generator DG connected to phase z of node j, time t is minimized; Q g,j,z,trepresents the reactive power injection or absorption of distributed generators DG, and the coefficients CP and CQ represent the cost of distributed generators DG for reducing active power and providing reactive power support, respectively. in and represents the apparent power flowing into branch i from each end; if and it is the sending and receiving end of the branch, CH is the penalty associated with violating safety and power quality constraints.

[0064] Furthermore, the constraints specifically include:

[0065] Power balance constraints:

[0066] The power injection at each node j, phase z and time step t is given by:

[0067]

[0068] Where P lflex,j,z,t and P lflex,j,z,t ·tan(φ load ) is the active and reactive node demand of constant power type, cos(φ load ) is the power factor of the load; Q B,j,z,t is the reactive power of the battery energy storage system BESS, and They are charging and discharging battery energy storage system BESS active power;

[0069] Power flow constraints:

[0070]

[0071] in, is the voltage of phase z at node j at time t, n represents the complex conjugate; I inj,t and I br,t are the vectors of the three-phase busbar injection and branch flow currents, respectively; BIBC is a matrix with 1s and 0s that captures the three-phase topology of DN; ΔV t is the vector of voltage drops on all branches and phases; BCBV is a matrix with the complex impedance of the line as its element; V slack is the three-phase voltage per unit at the relaxed bus; ΔV tap is the voltage amplitude change caused by a tap operation of the on-load tapchanger Transformer and is assumed to be constant for all taps; ρ t To define the integer value of the on-load tap changer OLTC position, the parameter ρ min ,ρ max They are the minimum and maximum tap positions of the on-load tap changer OLTC Transformer respectively;

[0072] Thermal load and voltage limitations:

[0073] The current constraint for branch i and phase z at time t is given by:

[0074] |I br,i,z,t |≤I i,z,max +η I,i,z,t ,η I,i,z.t ≥0

[0075] Among them I br,i,z,t is the branch current; I i,z,max is the maximum thermal limit; when the thermal constraint cannot be met, η I,i,z,t Used to relax constraints; the voltage constraint is given by:

[0076] V min -η V,j,z,t ≤|V j,z,t |≤V max +η V,j,z,t ,η V,j,z,t ≥0

[0077] Where V max , V min are the upper and lower limits of the acceptable voltage respectively. When the voltage constraint cannot be met, η is used. V,j,z,t to relax the constraints;

[0078] Rotate the three voltage phases {a, b, c} We keep them close to the reference axis 0° and define the same feasible space for each of the three phases:

[0079]

[0080] Balance constraints:

[0081] The power quality of the distribution network DN is improved by balancing the three-phase voltages, using the IEC unbalance definition of the voltage unbalance factor, given by Given, where V - and V + They are the negative and positive sequences obtained by symmetric component analysis;

[0082] The balance constraint at node j and time t is given by VUF j,t (%)≤VUF MAX Given, where VUF MAX is the acceptable voltage imbalance factor; VUF is approximated by the negative voltage sequence, assuming that the positive voltage sequence is very close to 1pu, that is, VUF j,t ≈|V -,j,t |, we get:

[0083] |V -,j,t|≤VUF MAX +η VUF,j,t ,η VUF,j,t ≥0

[0084] where η VUF,j,t Relaxing constraints when they cannot be satisfied;

[0085] Distributed Energy Resources DER, including hazardous limits:

[0086]

[0087] in and are the upper and lower limits of active and reactive DG power at each node j, phase z and time t;

[0088] Controllable load, the characteristics of the load are given by:

[0089]

[0090] Among them, P lflex,j,z,t is the controlled active power demand at phase z of node j, and at time t, P shift,j,z is the load that can be transferred, and n j,z,t ∈{-1,0,1} indicates that when the initial demand P l,j,z,t An integer variable representing the increase or decrease in load during the transfer; and the constraints associated with the BESS:

[0091]

[0092] in is the installed battery energy storage system BESS capacity connected to phase z at node j; and are fixed minimum and maximum per-unit limits for the battery state of charge; and is the available energy at node j, phase z and time t.

[0093] Furthermore, uncertainty is handled through chance constraints, and the feasible space and current constraints are modified as follows:

[0094]

[0095] in The lower voltage amplitude constraint and the upper voltage amplitude constraint are tightened, I br This is the tightening of the current amplitude constraint.

[0096] Further, solving the objective function under the constraint conditions includes: calculating the optimal distributed energy DER set point using a single scan based on the BFS algorithm, and evaluating the uncertainty margin using the Monte Carlo method, wherein the Monte Carlo method for evaluating the uncertainty margin includes: solving the deterministic OPF with tightened constraints and calculating the uncertainty margin When the change in tightening value between two subsequent iterations is below a threshold When , the BFS algorithm has converged, where the uncertainty margin for:

[0097]

[0098] The superscript 0 indicates the value at the operating point where the prediction error is zero.

[0099] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the methods described in any of the above embodiments.

[0100] The present invention has the following advantages and beneficial effects:

[0101] The present invention uses a distribution network (DN) model based on historical power generation and consumption data. Then, an offline centralized optimization algorithm is used to calculate the optimal distributed energy DER control set points under different operating conditions. The goal of the offline algorithm is to minimize system losses and adjustments of DER resources while ensuring that the system meets safety and power quality requirements, taking into account uncertainties from renewable energy sources (RES) and unbalanced three-phase systems. Finally, machine learning (ML) techniques are applied to the optimal set points obtained from this method to design real-time operation of the distribution network DN for local distributed energy DER control. In this way, a simple and effective optimized local control method is obtained, which can mimic the behavior of a centralized optimization scheme without the need for any communication infrastructure. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] Figure 1 An overall flow chart of the method provided by the embodiment of the present invention;

[0103] Figure 2 A flowchart of an iterative solution algorithm provided by an embodiment of the present invention;

[0104] Figure 3 A typical European residential low-voltage power grid diagram provided for an embodiment of the present invention;

[0105] Figure 4 A local characteristic curve diagram of reactive power control of a C-phase photovoltaic generator set provided in an embodiment of the present invention;

[0106] Figure 5 A real time response classification area diagram defining a controllable load provided by an embodiment of the present invention;

[0107] Figure 6 A diagram showing the evolution of the C-phase voltage amplitude at node 19 provided in an embodiment of the present invention;

[0108] Figure 7 The C-phase current amplitude evolution diagram of the cable 2-3 provided in the embodiment of the present invention. DETAILED DESCRIPTION

[0109] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0110] See also Figure 1 The present invention relates to a data-driven active distribution network local control method based on machine learning technology.

[0111] Collect seasonal historical data with uncertainty;

[0112] Selecting operation scenarios from seasonal historical data, the optimal DER set points are calculated offline using the three-phase multi-period opportunity-constrained optimal power flow CC-OPF;

[0113] An optimal control model simulating a three-phase multi-period opportunity constrained optimal power flow CC-OPF is created, and the optimal distributed energy DER set points are sampled for training to obtain the final optimal control model, which includes: local control of distributed generators DG, local control of battery energy storage systems BESS, and local control of controllable loads;

[0114] The final optimal control model is used to control the local area that needs to be controlled.

[0115] The centralized opportunity-constrained optimal power flow proposed by the present invention is:

[0116] A three-phase multi-period chance-constrained optimal power flow (CC-OPF) scheme is proposed to calculate the optimal DER set points under different operating conditions. The objectives and constraints of the CC-OPF algorithm based on the distributed constraint optimal power flow (ODF) are crucial to the whole approach, as they will be reflected in the generated optimal DER set point data and in turn affect the local control design.

[0117] It should be noted that having enough data to run the distributed optimal power flow (OPF) is critical to the process. Data can be collected using low-cost energy monitoring equipment, and if some data is missing or noisy, it can be extrapolated using historical data, public domain information, or information from neighboring systems.

[0118] The optimal DER set points are calculated offline using the three-phase multi-period opportunity constrained optimal power flow CC-OPF, including:

[0119] Establish the objective function,

[0120] Establish constraints, including power balance constraints, power flow constraints, thermal load and voltage constraints, balancing constraints, and DER restrictions;

[0121] The objective function is solved under the constraints to obtain the optimal DER set point.

[0122] The selected objective function includes the entire time range N hor In all network nodes N b , phase z and branch N br Minimize the cost and network loss of distributed energy DER control. It is described as follows:

[0123]

[0124] Where u is the vector of available active control measures and t is the length of each time period. The curtailment power of the DG connected at phase z, node j and time t is given by the formula Given, where is the maximum available active power of the distributed generator DG, P g,j,z,t Active power injection for distributed generators DG. Use reactive power to support Q ctrl,j,z,t =|Q g,j,z,t |For each distributed generator DG connected to phase z of node j, time t is also minimized; Q g,j,z,t represents the reactive power injection or absorption of distributed generators DG. The coefficients CP and CQ represent the DG costs (DG opportunity cost or contractual agreement) of reducing active power and providing reactive power support, respectively. Q <<C P The assumption that reactive power control takes precedence over active power reduction is made. Kron's simplification is performed so that a three-phase, three-wire power flow representation is used. In this case, the phase voltages and currents are obtained with acceptable accuracy, but the calculation of losses using the squared current magnitude times resistance formula leads to an overestimation of the correct total losses. Therefore, in this case, the total losses can be calculated by using the difference between the input and output power in each phase. Therefore, in and represents the apparent power flowing into branch i from each end; if and it is the sending and receiving end of the branch. Finally, CH is the large penalty associated with violating safety and power quality constraints. It is related to the variable (η V , ηI , η VUF ) to relax voltage, thermal or balance constraints, respectively, and avoid infeasibility. When one of these constraints is binding, the output of the overall objective function is dominated by that term and may lose real monetary meaning (unless the cost of violating safety and power quality constraints is quantified and monetized by the DSO).

[0125] The constraints include:

[0126] Power balance constraints:

[0127] The power injection at each node j, phase z and time step t is given by:

[0128]

[0129] Where P lflex,j,z,t and P lflex,j,z,t ·tan(φ load ) is the active and reactive node demand of constant power type (after control), cos(φ load ) is the power factor of the load; Q B,j,z,t is the reactive power of BESS, and are the charging and discharging BESS active powers respectively.

[0130] Power flow constraints:

[0131] The nonlinear AC power flow equations of the distribution network DN make solving the optimal power flow OPF problem computationally challenging. Since the optimal power flow will be used to handle multiple scenarios in a multi-period framework, it is necessary to use some approximations to improve its computational performance.

[0132] Following previous work, a single iteration of the BFS power flow method is used to replace the AC power flow constraint in the optimal power flow OPF formula. This is written as (j=1,...,N b ,z∈{a,b,c}):

[0133]

[0134] in, is the voltage of phase z at node j at time t, n represents the complex conjugate, and the bars represent using the value from the previous iteration; inj,t and I br,t are the vectors of the three-phase bus injection and branch flow currents, respectively; and, BIBC (Bus Injection to Branch Current) is a matrix with 1s and 0s that captures the three-phase topology of DN (including any single-phase PWM); ΔV tis the vector of voltage drops on all branches and phases; BCBV (branch current to bus voltage) is a matrix with the complex impedance of the line as an element (including mutual coupling); V slack is the three-phase voltage per unit at the relaxed bus (here it is assumed to be {1<0°, 1<-120°, 1<120°}); ΔV tap is the voltage amplitude change caused by one tap operation of the on-load tap changer (OLTC) transformer and is assumed to be constant for all taps for simplicity; ρ t is an integer value defining the OLTC location. min ,ρ max ) are the minimum and maximum tap positions of the OLTC Transformer, respectively.

[0135] This convex formulation provides a good approximation to the nonlinear AC OPF, is computationally tractable even in a three-phase model, and produces an AC feasible solution that can account for uncertainties.

[0136] Thermal load and voltage limitations:

[0137] The constraint on the current amplitude of branch i and phase z at time t is given by:

[0138] |I br,i,z,t |≤I i,z,max +η I,i,z,t ,η I,i,z.t ≥0 (4)

[0139] Among them I br,i,z,t is the branch current; I i,z,max is the maximum thermal limit; when the thermal constraint cannot be met, η I,i,z,t is used to relax the constraints. Similarly, the voltage constraint is given by:

[0140] V min -η V,j,z,t ≤|V j,z,t |≤V max +η V,j,z,t ,η V,j,z,t ≥0 (5)

[0141] Where V max , V min are the upper and lower limits of the acceptable voltage respectively. When the voltage constraint cannot be met, η is used. V,j,z,t To relax the constraints.

[0142] Due to the minimum voltage amplitude requirement, Equation (5) is non-convex. To avoid non-convexity, the three voltage phases {a, b, c} are rotated We keep them close to the reference axis 0° and define the same feasible space for each of the three phases:

[0143]

[0144] Balance constraints:

[0145] The balance constraint is used to improve the power quality of the distribution network DN by balancing the three-phase voltages. The IEC unbalance definition using the voltage unbalance factor (VUF) is given by Given, where V - and V + They are the negative and positive sequences obtained by symmetric component analysis, respectively.

[0146] The balance constraint at node j and time t is given by VUF j,t (%)≤VUF MAX Given, where VUF MAX is the acceptable voltage unbalance factor (e.g. 2% for 95% of the time per week according to EN 50160). Since this constraint is non-convex, VUF is approximated by the negative voltage sequence, assuming that the positive voltage sequence is very close to 1pu, that is, VUF j,t ≈|V -,j,t |. This gives

[0147] |V -,j,t |≤VUF MAX +η VUF,j,t ,η VUF,j,t ≥0 (7)

[0148] where η VUF,j,t Relax constraints when they cannot be satisfied.

[0149] Distributed Energy DER Restrictions:

[0150] (1) Dangerous limits: In this work, without loss of generality, only inverter-based DGs such as PV are considered. Therefore, their limits are given by:

[0151]

[0152] in and are the upper and lower limits on the active and reactive DG power at each node j, phase z and time t. These limits depend on the type of DG and the control scheme implemented. Typically, small DGs have technical or regulatory limitations on the power factor they can operate at or the reactive power they can produce. This limitation can be included by linking the active and reactive power limits in equation (8) to the maximum power factor value.

[0153] Controllable loads: In addition, flexible loads are considered, which can shift a fixed amount of energy consumption in time. The characteristics of the load are given by:

[0154]

[0155] Among them, P lflex,j,z,t is the controlled active power demand at phase z of node j, and at time t, P shift,j,z is the load that can be transferred (assumed constant), and n j,z,t ∈{-1,0,1} indicates that when the initial demand P l,j,z,t Integer variable representing the increase or decrease in load during the transfer. Assumed to be required to maintain the final total daily energy requirement.

[0156] Battery Energy Storage System: Finally, the constraints related to the Battery Energy Storage System (BESS) are as follows:

[0157]

[0158] In the above formula, from top to bottom, they are represented by (10a)-(10f). is the installed battery energy storage system BESS capacity connected to phase z at node j; and are fixed minimum and maximum per-unit limits for the battery state of charge; and is the available energy at node j, phase z and time t. The initial energy content of the battery energy storage system BESS in the first time period is given by E start Given, and formula (10c) is based on the battery energy storage system BESS efficiency η bat , time interval t and the charging and discharging power of the battery energy storage system BESS and to update the energy in the storage at each time period t. According to equation (10d), the charging and discharging power are defined as positive, while equation (10e) is reconverted into a mixed integer constraint with 2 binary numbers per time step and ensures that the battery energy storage system BESS does not charge and discharge simultaneously.

[0159] Accounting for uncertainty through opportunity constraints, modifying the feasible space and current constraints

[0160] In order to take into account the impact of generation uncertainty and limit possible adverse effects on security constraints, the reformulated problem uses chance constraints. The goal of a chance-constrained optimization problem is to keep the probability of certain random events below a target value. It is assumed that PV generation injection is the only source of uncertainty. However, load uncertainty can also be included in a similar way.

[0161] 1) Formulation of opportunity constraints:

[0162] The branch current and voltage amplitudes are functions of the power injection and are therefore directly affected by the uncertainty of the photovoltaic PV power. Therefore, the corresponding voltage and current constraints are modeled as chance constraints that will hold with a chosen probability of 1-ε, where ε is the acceptable probability of violation. For example, the maximum voltage amplitude constraint is reformulated as Ρ{|V bus,j,t |≤V max}≥1-ε.

[0163] In order to solve the resulting three-phase multi-period chance-constrained optimal power flow CC-OPF, it is necessary to reformulate the constraints in a tractable form. This can be achieved by using analytical forms that assume a particular distribution of the forecast errors or distribution-agnostic methods. In this work, we rely on an iterative solution that is well suited to the iterative nature of BFS-OPF. The core idea is that the chance-constrained problem can be converted into a deterministic problem with tightened constraints. The tightening represents a safety margin against uncertainty, i.e., the uncertainty margin, which drives the trade-off between cost and system safety and is a function of the optimization variable. The iterative scheme alternates between solving the deterministic problem with a given set of tightenings and evaluating the optimal constrained tightening based on the solution to the deterministic problem. A feasible solution is found when the tightening does not change between iterations. Therefore, the probabilistic constraints are interpreted as tightened deterministic versions of the original constraints, and Equations (4) and (6) are expressed as:

[0164]

[0165] The lower The lower voltage amplitude constraint and the upper voltage amplitude constraint are tightened, I br This is the tightening of the current amplitude constraint.

[0166] See also Figure 2 As shown, the objective function is solved under the constraints, including: calculating the optimal distributed energy DER set point using a single scan based on the BFS algorithm, and evaluating the uncertainty margin using the Monte Carlo method.

[0167] Among them, the uncertainty margin assessment based on Monte Carlo simulation is:

[0168] To evaluate the uncertainty margin, a Monte Carlo method is used. The uncertainty margin is considered constant in the three-phase multi-period chance constrained optimal power flow OPF solution, but is then evaluated outside the three-phase multi-period chance constrained optimal power flow OPF iteration. The advantage of this method is the ability to use nonlinear AC power flows and probability distributions with any uncertainty.

[0169] First, chance constraints on the empirical distributions of voltage and current are formed at each time step based on the Monte Carlo simulation. In order to enforce the chance constraints with probability 1-ε, it is necessary to ensure that the 1-ε quantile of the distribution remains within bounds. Therefore, tightening corresponds to the difference between the predicted value with zero prediction error and the 1-ε quantile value evaluated based on the empirical distribution generated from the Monte Carlo simulation, e.g., and For the voltage limit, the empirical uncertainty margin used in the next iteration is given by:

[0170]

[0171] where the superscript 0 denotes the value at the operating point where the prediction error is zero.

[0172] Iterative Solution Algorithm: Since the uncertainty margin depends on the selected DER set point, an iterative algorithm is used to solve the problem. It is effective in solving the deterministic OPF with tightened constraints and calculating the uncertainty margin. When the change in tightening value between two subsequent iterations is below a threshold When , the algorithm has converged.

[0173] The core of the method of the present invention is to formulate a three-phase multi-cycle centralized CC-OPF, which can be summarized as follows:

[0174]

[0175] Subject to the constraints:

[0176]

[0177] The BFS-OPF module (Backward / Forward Sweep) is used to calculate the optimal DER set point based on a single scan of the BFS algorithm. Figure 2 As shown,

[0178] First, in the initialization phase, the voltage and current uncertainty margins are set to zero, and the voltage levels of the three phases are adjusted to a flat voltage curve. Then, three multi-cycle optimal power flows are run, and BFS iterations are performed to determine the optimal DER set point. The power flow is run sequentially until convergence, and the final optimal DER set point is determined. Finally, the voltage and current uncertainty margins are input into the uncertain contraction area to check the contraction. If it meets the requirements, the operation is stopped, and if it does not meet the requirements, it is re-iterated.

[0179] Therefore, a single iteration of the BFS equation replaces the non-convex exact AC power flow equation with a linearized version. After obtaining the OPF setpoint, the exact power flow algorithm is run using the obtained control settings to project the solution to the AC feasible space. Then, the BFS-OPF module is executed again using the updated voltages from the exact BFS power flow. These inner iterations are performed until convergence. After the multi-cycle BFS-OPF converges, the uncertainties in the outer loop are considered. The uncertainty margin is evaluated using the Monte Carlo method, i.e., running the AC power flow for samples with uncertain PV injection. The iteration index of the OPF cycle is denoted by k and the iteration of the uncertainty cycle is denoted by m. The iterative process continues until all parts of the algorithm reach convergence.

[0180] The optimal control model proposed by the present invention includes:

[0181] 1) Optimal DER setpoint data generation

[0182] The first step is to generate optimal DER setpoint data, which will be used for training the local control. To this end, several operating scenarios are selected from seasonal historical data. Then, the three-phase multi-period opportunity constrained optimal power flow CC-OPF is used to calculate the optimal DER setpoints offline.

[0183] The DSO does not know the exact generation of all PV in the system during the operation phase (as this would require detailed monitoring of all PV). However, the DSO knows the installed DG capacity and can use historical expected PV injection data and installed capacity to estimate PV generation, but with some uncertainty.

[0184] The proposed method can be used for different seasonal data to account for seasonal DG injection and load. By changing the local control scheme based on the season, for example, using the actual date or when the topology of the DN changes, a near-optimal behavior can be easily derived during the whole year.

[0185] The optimal control model includes: local control of distributed generators DG, local control of battery energy storage systems BESS, and local control of controllable loads. Specifically:

[0186] 2) Distributed generator DG local control

[0187] For distributed generators DG, optimized locally controlled active power curtailment (APC) and reactive power control (RPC) are obtained. These controls take the form of simple piecewise linear characteristic curves, much like the local control schemes used in industry today. Unlike current industry standards, these characteristics may have an arbitrarily large number of piecewise linear segments and are optimized for each individual distributed generator DG and distribution network DN.

[0188] Determining the locations of the breakpoints and the slope coefficients is a nonlinear and non-differentiable problem. Therefore, a method is employed that iteratively refines the locations of the breakpoints while simultaneously solving a constrained residual sum of squares (RSS) optimization problem for the slope coefficients.

[0189] First, define the number of breakpoints n s and initialize them. Then, the iterative steps 2–4 are used, where the residual sum of squares problem is solved using active power injection as a weight in the objective function and a linear equivalent estimation model is fitted taking into account monotonicity and slope constraints. As input, the voltage at each sample t is used Then, based on the known breakpoints The left slope β0 and the slope difference β k , when the internal statement is true, the indicator function I(·) becomes 1. If I(·) is not true, it is 0 in order to determine I(·). Finally, x t is the model intercept and γ is a parameter that updates the location of the breakpoint to the optimal position.

[0190] The specific process includes:

[0191] 1. The input is the optimal DG setting value, and the output is the optimized local characteristic curve;

[0192] 2. Set the number of breakpoints n s n s is the number of breakpoints, initialize breakpoint s, i=1, RSS0=1000;

[0193] 3. Calculate the constrained residual sum of squares of the slope coefficient:

[0194]

[0195] The monotonicity and slope constraints are:

[0196]

[0197] 4. Update and iteration index i=i+1;

[0198] Until: |RSS i -RSS i-1 -1|<0.0001;

[0199] 5. Post-process the derived characteristic curves of all voltage values;

[0200] 6. Return: The breakpoint s and slope factor β of each distributed generator DG are {P, Q} DG =f(V).

[0201] For clarity, the indices are omitted. The key idea is to replace the nonlinear function with unknown slope difference and breakpoints by its Taylor expansion at each iteration iβ·(vs i )·I(v>s i )-γ·I(v>s i )Use fixed breakpoints.

[0202] The APC and RPC curves use the same approach, using the CC-OPF’s PV optimum active (p) and reactive (q) set points, respectively.

[0203] 3) Local control of battery energy storage system BESS

[0204] Due to the more complex behavior of the battery energy storage system BESS, e.g., intertemporal constraints, an SVM regression model was chosen to approximate the optimal set values ​​for the active and reactive power of the battery energy storage system BESS. The SVM regression model calculates a function that deviates from the values ​​of the training data by no more than a predetermined margin and at the same time is as flat as possible. SVM regression models are very powerful because they can also model nonlinear functions (or decision boundaries). This is achieved by performing a nonlinear transformation using appropriately chosen basis functions (kernels) to map the training set from the input space to a higher-dimensional space called the feature space. They then solve a linear model in the new space problem that describes the nonlinear behavior in the original (input) space using the functions (local active and reactive power demands (P load , Q load ), PV active power injection at the same node (P g ) and local voltage measurements (V). These local features are then used, either in their real space or in a higher dimensional space through the kernel, to create an optimal control model that simulates the three-phase multi-period opportunity constrained optimal power flow CC-OPF.

[0205] The steps to train the SVM controller are as follows:

[0206] Input: optimal battery energy storage system BESS set point, where the optimal battery energy storage system BESS set point belongs to the optimal distributed energy DER set point data and is obtained through the optimal distributed energy DER set point data;

[0207] Output: Regression model of the real-time response of the battery energy storage system BESS;

[0208] For each battery energy storage system BESS form Φ=[V,P load , Q load , P g ], and assume that the function f(Φ) =<w,Φ> +b.

[0209] Apply linear, polynomial, and radial basis function kernels to Φ,

[0210] The objective function is:

[0211] The constraints are:

[0212] Then identify the kernel with the lowest out-of-sample error,

[0213] The return value is: {P,Q} B =f(V,P load , Q load , P g ).

[0214] To obtain the best SVM regression model, three different kernels were tested: linear (<Φ,Φ T >, where C in the objective function is a free parameter, and the polynomial ((γ<Φ,Φ T >+r) d , where C and the polynomial order d are free parameters) and the radial basis function (RBF) kernel Where C and kernel scale γ are free parameters). Assume that the regression function f(Φ) =<w,Φ> +b, solving a convex optimization problem for all these kernels in order to identify the best fit one. The constant C, also known as the box constraint, takes a positive value and penalizes observations that lie outside the defined region, helping to prevent overfitting (regularization). The value of C evaluates the trade-off between the flatness of the regression function and the amount of allowed deviation greater than . Finally, the model with the kernel that gives the lowest overall out-of-sample error is kept through a 5-fold cross-validation process.

[0215] 4) Local control of controllable loads

[0216] For controllable load, the SVM model is used as the classifier, where three classes y are defined for the “load reduction”, “no transfer” and “load increase” cases respectively. c ∈{-1, 0, 1}. As a feature, use Φ = [V, P g ], where V is the local voltage measurement, P g is the active power injection of PV at the same node. Intuitively, high PV injection increases the local voltage, triggering load increase action. The optimization problem is similar to the battery energy storage system BESS case, with G(Φ) = sign(f(Φ) as the classifier.

[0217] Support vector machines are able to handle datasets with imbalanced class observations. This can be done by assigning different values ​​to the box constraints (constant C) for the "positive" and "negative" classes, i.e., changing the misclassification penalty for each class. This is equivalent to changing the class observation frequencies, i.e., oversampling the minority class. For example, if C pos =2·C neg , which is in principle equivalent to training with C = C after considering two positive training samples neg The standard SVM of . This approach to implement the so-called class-weighted SVM has been introduced in many references. In the model of , the categories of "load increase" and "load reduction" are balanced by design due to the constraint formula (9), which enforces the preservation of daily loads. Therefore, different weights in the classification categories are taken into account, since the category with only no load shift can include different numbers of observations.

[0218] In order to analyze the performance of the proposed invention, a typical European radial low voltage grid was used, such as Figure 3 As shown, the neutral point is assumed to be shielded at several points and the capacitance is neglected due to the short cable length. The pole grounding impedance is 40, corresponding to the neutral point distributed grounding, and the transformer grounding impedance is 3.

[0219] The load and PV panels are unevenly distributed to the three phases to simulate unbalanced conditions. More specifically, the total load obtained from it is shared 25%-60%-15% among the three phases. The installed PV capacity is set to Equal to 150% of the total maximum load of the entire feeder at PV nodes = [3, 5, 7, 10, 12, 16, 17, 18, 19] and 25%-25%-50% shared between the three phases.

[0220] In addition, the battery energy storage system BESS is located at node 19 of phase C and has a capacity of in is the rated power of the PV unit at that particular node. A 5kW flexible load is connected to phase C of node 16 and its total daily energy consumption needs to be constant. Note that both the load and the PV panel are assumed to be connected in single phase.

[0221] For comparison purposes, three different investigations of the system's operation were performed:

[0222] Method 0: DGs are operated according to the German grid code rules and control of other DERs by the DSO is not allowed. This is in line with current industry practice.

[0223] Approach 1: All DERs are controlled based on the OPF algorithm, assuming perfect communication and monitoring infrastructure. Since this is the benchmark for the best achievable performance, perfect measurements and predictions are considered over the entire time horizon without any uncertainty.

[0224] Method 2: All DERs are operated under individual controls.

[0225] Implemented in MATLAB. For centralized OPF-based control, YALMIP is used as the modeling layer and Guidance is used as the solver. The results are obtained on an Intel Core i7-2600 CPU with 16GB RAM.

[0226] To obtain local control schemes for all DERs, a 30-day summer dataset with predicted PV production with a 1-hour time resolution is used. Thus, the training set consists of 30 × 24 = 7200 samples for all cases. The algorithm described in Section II is then used to generate the optimal DER setpoint data. The operating cost is assumed to be C Q =0.01·C P The costs of BESS, CL and OLTC are taken into account in the planning stage, and their use will not bring any operating costs to the DSO. H =0.01·C P Used to avoid infeasible solutions. For the three-phase multi-period opportunity constrained optimal power flow CC-OPF, the forecast error distribution is used and 1000 samples are drawn from a 9-hour forecast error distribution similar to the summer power distribution. A perfect spatial correlation is assumed, which means that all photovoltaic PVs follow the same distribution. An acceptable violation probability of ∈ = 5% is used. Then, local control is derived from the generated optimal distributed energy resource DER set point data. Figure 4 The derived local characteristic curves of the RPC of the C-phase PV cells are shown. It can be seen that the cells closer to the substation secondary, i.e., 3, 5 and 12, show a capacitive behavior that optimizes losses, while the capacitive behavior at the feeder end facing overvoltage issues, e.g., the materials shown in 16 and 19, show an inductive behavior at voltages less than the maximum value of 1.04 pu.

[0227] In order to obtain BESS and controllable load models that perform well on unseen data, cross validation (or out-of-sample testing) is performed, which is a resampling process to test the performance of the model on new data. This process helps identify overfitting or selection bias problems and provides intuitive information about how the model generalizes to independent data sets. In both SVM models, a 5-fold cross-validation procedure was followed to divide the sample data into 5 groups of 144 samples. Four folds were used to train the SVM model and the remaining ones were used to measure the performance. Finally, after combining (averaging) the results of multiple rounds of cross-validation, a more accurate estimate of the model's predictive performance was obtained. For the BESS model derived using Algorithm 2, the RBF kernel function produced the best behavior in terms of the out-of-sample validation procedure with the following parameters: constant C = 236.78, ∈ = 0.0025, γ = 1.12, showing an overall RMSE of 0.158.

[0228] Finally, for the controllable load, the detailed approach gives a classifier with 100% overall accuracy since the data is completely linearly separable. Figure 5 The decision boundaries defining the three classes in the two feature spaces are shown. As can be observed, the load is increased for above 0.3 pu to reduce the local voltage in combination with other available measures. In low PV injection, for example, at night, the load is reduced to keep the total daily demand constant, or does not change.

[0229] Table 1 summarizes the results of applying the three methods to real-time operations over a one-month testing period.

[0230] Table 1

[0231]

[0232] Method 1 corresponds to the baseline, as it satisfies all safety constraints and minimizes the objective function. Method 0 (standard industry practice) results in higher losses than the OPF-based approach due to the increased demand for reactive power from the PV units, without addressing overvoltage, overload, or balancing issues. Finally, Method 2 adequately mitigates overvoltage and overload to values ​​acceptable to the grid code, while being able to mimic OPF-based control without communication. In addition, it significantly improves the balancing issue, with only small violations during 5 hours per month, which is also acceptable as defined by the grid code. Figure 6The real-time control behavior of the BESS and PV units at node 19, phase C, operating according to Approach 1 and Approach 2 are shown. It can be seen that the proposed local control of the BESS and PV (Approach 2) is more conservative than the OPF-based approach (Approach 1), where the PV units absorb the maximum reactive power at most voltage levels due to overvoltage issues. This conservative behavior is due to the adoption of the CC-OPF approach to generate the data used to derive the Approach 2 controls. In contrast, the OPF-based control (Approach 1) uses real data assuming complete knowledge of the network, load, and production values ​​through an ideal communication system with no delays. Nonetheless, the responses using the proposed local control mimic the OPF responses in a satisfactory manner.

[0233] at last Figure 7 The evolution of the voltage at node 19 over ten days is shown. It can be seen that operation according to the current regulation (method 0) leads to frequent overvoltages. In contrast, the optimal power flow based approach (method 1) and the proposed local control satisfy the voltage security constraints.

[0234] Future DNs will increasingly rely on active control of DERs to achieve safety, reliability, and optimal operation of the grid. While OPF-based centralized controllers can provide optimal operation, they rely on expensive monitoring and communication infrastructure—which most current DNs do not have. At the same time, inexpensive traditional local controllers cannot keep up with the rapidly changing environment and increased DER penetration.

[0235] In this invention, a method is proposed to obtain local distributed energy resource DER control that can mimic the optimal behavior of a centralized controller without the need for monitoring and communication infrastructure. This is based on the use of ML techniques to derive optimized local controls based on historical data processed through CC-OPF. The controller is easy to compute, understand and implement. However, it has been shown through the examples used that the proposed local control can solve safety problems in unbalanced and challenging environments while optimizing its operation. Future work will focus on comparing data-driven control schemes using other machine learning techniques and subsequently evaluating the risks and challenges of using these methods under operating conditions not seen in the training dataset.

[0236] The present invention also provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to an electronic device, and the computer program enables the electronic device to execute the corresponding processes in each method in the embodiments of the present application, which will not be described in detail for the sake of brevity.

[0237] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0238] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0239] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0240] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0241] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0242] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A data-driven local control method for active distribution networks based on machine learning, It is characterized in that The method includes: Collect seasonal historical data with uncertainty; Selecting operation scenarios from seasonal historical data, the optimal DER set points are calculated offline using the three-phase multi-period opportunity-constrained optimal power flow CC-OPF; An optimal control model simulating a three-phase multi-period opportunity constrained optimal power flow CC-OPF is created, and the optimal distributed energy DER set points are sampled for training to obtain the final optimal control model, which includes: local control of distributed generators DG, local control of battery energy storage systems BESS, and local control of controllable loads; The final optimal control model is used to control the local area that needs to be controlled.

2. The data-driven active distribution network local control method based on machine learning according to claim 1, It is characterized in that The optimal DER set points are calculated offline using the three-phase multi-period opportunity constrained optimal power flow CC-OPF, including: Establish the objective function, including the entire time range N hor In all network nodes N b , phase z and branch N br Minimize the cost and network loss of distributed energy DER control; Establish constraints, including power balance constraints, power flow constraints, thermal load and voltage constraints, balancing constraints, and DER restrictions; The objective function is solved under the constraints to obtain the optimal DER set point.

3. The data-driven active distribution network local control method based on machine learning according to claim 2, It is characterized in that The objective function is: Where u is the vector of available active control measures, t is the length of each time period, and the curtailment power of the DG connected at phase z, node j and time t is given by the formula Given, where is the maximum available active power of the distributed generator DG, P g,j,z,t Active power injection for distributed generators DG, using reactive power to support Q ctrl,j,z,t =|Q g,j,z,t |For each distributed generator DG connected to phase z of node j, time t is minimized; Q g,j,z,t represents the reactive power injection or absorption of distributed generators DG, and the coefficients CP and CQ represent the cost of distributed generators DG for reducing active power and providing reactive power support, respectively. in and represents the apparent power flowing into branch i from each end; if and it is the sending and receiving end of the branch, CH is the penalty associated with violating safety and power quality constraints.

4. The data-driven active distribution network local control method based on machine learning according to claim 3, It is characterized in that The constraints specifically include: Power balance constraints: The power injection at each node j, phase z and time step t is given by: Where P lflex,j,z,t and P lflex,j,z,t ·tan(φ load ) is the active and reactive node demand of constant power type, cos(φ load ) is the power factor of the load; Q B,j,z,t is the reactive power of the battery energy storage system BESS, and They are charging and discharging battery energy storage system BESS active power; Power flow constraints: in, is the voltage of phase z at node j at time t, n represents the complex conjugate; I inj,t and I br,t are the vectors of the three-phase busbar injection and branch flow currents, respectively; BIBC is a matrix with 1s and 0s that captures the three-phase topology of DN; ΔV t is the vector of voltage drops on all branches and phases; BCBV is a matrix with the complex impedance of the line as its element; V slack is the three-phase voltage per unit at the relaxed bus; ΔV tap is the voltage amplitude change caused by a tap operation of the on-load tapchanger Transformer and is assumed to be constant for all taps; ρ t To define the integer value of the on-load tap changer OLTC position, the parameter ρ min ,ρ max They are the minimum and maximum tap positions of the on-load tap changer OLTC Transformer respectively; Thermal load and voltage limitations: The current constraint for branch i and phase z at time t is given by: |I br,i,z,t |≤I i,z,max +n I,i,z,t ,or I,i,z.t ≥0 Among them I br,i,z,t is the branch current; I i,z,max is the maximum thermal limit; when the thermal constraint cannot be met, η I,i,z,t Used to relax constraints; the voltage constraint is given by: V min -or V,j,z,t ≤|V j,z,t |≤V max +n V,j,z,t ,or V,j,z,t ≥0 Where V max , V min are the upper and lower limits of the acceptable voltage respectively. When the voltage constraint cannot be met, η is used. V,j,z,t to relax the constraints; Rotate the three voltage phases {a, b, c} We keep them close to the reference axis 0° and define the same feasible space for each of the three phases: Balance constraints: The power quality of the distribution network DN is improved by balancing the three-phase voltages, using the IEC unbalance definition of the voltage unbalance factor, given by Given, where V - and V + They are the negative and positive sequences obtained by symmetric component analysis; The balance constraint at node j and time t is given by VUF j,t (%)≤VUF MAX Given, where VUF MAX is the acceptable voltage imbalance factor; VUF is approximated by the negative voltage sequence, assuming that the positive voltage sequence is very close to 1pu, that is, VUF j,t ≈|V -,j,t |, we get: |V -,j,t |≤VUF MAX +n VUF,j,t ,or VUF,j,t ≥0 where η VUF,j,t Relaxing constraints when they cannot be satisfied; Distributed Energy Resources DER, including hazardous limits: in and are the upper and lower limits of active and reactive DG power at each node j, phase z and time t; Controllable load, the characteristics of the load are given by: Among them, P lflex,j,z,t is the controlled active power demand at phase z of node j, and at time t, P shift,j,z is the load that can be transferred, and n j,z,t ∈{-1,0,1} indicates that when the initial demand P l,j,z,t An integer variable representing the increase or decrease in load during the transfer; and the constraints associated with the BESS: in is the installed battery energy storage system BESS capacity connected to phase z at node j; and are fixed minimum and maximum per-unit limits for the battery state of charge; and is the available energy at node j, phase z and time t.

5. The data-driven active distribution network local control method based on machine learning according to claim 4, It is characterized in that Uncertainty is handled through chance constraints, and the feasible space and current constraints are modified as follows: in The lower voltage amplitude constraint and the upper voltage amplitude constraint are tightened, I br This is the tightening of the current amplitude constraint.

6. The data-driven active distribution network local control method based on machine learning according to claim 5, It is characterized in that Solving the objective function under constraints includes: calculating the optimal DER set point using a single scan based on the BFS algorithm and evaluating the uncertainty margin using the Monte Carlo method. The Monte Carlo method for evaluating the uncertainty margin includes: solving the deterministic OPF with tightened constraints and calculating the uncertainty margin When the change in tightening value between two subsequent iterations is below a threshold When , the BFS algorithm has converged, where the uncertainty margin for: The superscript 0 indicates the value at the operating point where the prediction error is zero.

7. A data-driven active distribution network local control system based on machine learning, It is characterized in that The system includes: Collection module. Collect seasonal historical data with uncertainty; The DER set point calculation module selects operation scenarios from seasonal historical data and uses the three-phase multi-period opportunity-constrained optimal power flow CC-OPF to calculate the optimal DER set point offline; The optimal control model building module creates an optimal control model that simulates the three-phase multi-period opportunity-constrained optimal power flow CC-OPF, samples the best distributed energy DER set points for training to obtain the final optimal control model, which includes: local control of distributed generators DG, local control of battery energy storage systems BESS, and local control of controllable loads; The local control module uses the final optimal control model to control the local area that needs to be controlled.

8. The data-driven active power distribution network local control system based on machine learning according to claim 7, It is characterized in that The distributed energy DER set point calculation module uses the three-phase multi-period opportunity constrained optimal power flow CC-OPF to calculate the optimal distributed energy DER set point offline, including: Establish the objective function, including the entire time range N hor In all network nodes N b , phase z and branch N br Minimize the cost and network loss of distributed energy DER control; Establish constraints, including power balance constraints, power flow constraints, thermal load and voltage constraints, balancing constraints, and DER restrictions; The objective function is solved under the constraints to obtain the optimal DER set point.

9. The data-driven active power distribution network local control system based on machine learning according to claim 8, It is characterized in that The objective function is: Where u is the vector of available active control measures, t is the length of each time period, and the curtailment power of the DG connected at phase z, node j and time t is given by the formula Given, where is the maximum available active power of the distributed generator DG, P g,j,z,t Active power injection for distributed generators DG, using reactive power to support Q ctrl,j,z,t =|Q g,j,z,t |For each distributed generator DG connected to phase z of node j, time t is minimized; Q g,j,z,t represents the reactive power injection or absorption of distributed generators DG, and the coefficients CP and CQ represent the cost of distributed generators DG for reducing active power and providing reactive power support, respectively. in and represents the apparent power flowing into branch i from each end; if and it is the sending and receiving end of the branch, CH is the penalty associated with violating safety and power quality constraints.

10. The data-driven active power distribution network local control system based on machine learning according to claim 8, It is characterized in that The constraints specifically include: Power balance constraints: The power injection at each node j, phase z and time step t is given by: Where P lflex,j,z,t and P lflex,j,z,t ·tan(φ load ) is the active and reactive node demand of constant power type, cos(φ load ) is the power factor of the load; Q B,j,z,t is the reactive power of the battery energy storage system BESS, and They are charging and discharging battery energy storage system BESS active power; Power flow constraints: in, is the voltage of phase z at node j at time t, n represents the complex conjugate; I inj,t and I br,t are the vectors of the three-phase busbar injection and branch flow currents, respectively; BIBC is a matrix with 1s and 0s that captures the three-phase topology of DN; ΔV t is the vector of voltage drops on all branches and phases; BCBV is a matrix with the complex impedance of the line as its element; V slack is the three-phase voltage per unit at the relaxed bus; ΔV tap is the voltage amplitude change caused by a tap operation of the on-load tapchanger Transformer and is assumed to be constant for all taps; ρ t To define the integer value of the on-load tap changer OLTC position, the parameter ρ min ,ρ max They are the minimum and maximum tap positions of the on-load tap changer OLTC Transformer respectively; Thermal load and voltage limitations: The current constraint for branch i and phase z at time t is given by: |I br,i,z,t |≤I i,z,max +n I,i,z,t ,or I,i,z.t ≥0 Among them I br,i,z,t is the branch current; I i,z,max is the maximum thermal limit; when the thermal constraint cannot be met, η I,i,z,t Used to relax constraints; the voltage constraint is given by: V min -or V,j,z,t ≤|V j,z,t |≤V max +n V,j,z,t ,or V,j,z,t ≥0 Where V max , V min are the upper and lower limits of the acceptable voltage respectively. When the voltage constraint cannot be met, η is used. V,j,z,t to relax the constraints; Rotate the three voltage phases {a, b, c} We keep them close to the reference axis 0° and define the same feasible space for each of the three phases: Balance constraints: The power quality of the distribution network DN is improved by balancing the three-phase voltages, using the IEC unbalance definition of the voltage unbalance factor, given by Given, where V - and V + They are the negative and positive sequences obtained by symmetric component analysis; The balance constraint at node j and time t is given by VUF j,t (%)≤VUF MAX Given, where VUF MAX is the acceptable voltage imbalance factor; VUF is approximated by the negative voltage sequence, assuming that the positive voltage sequence is very close to 1pu, that is, VUF j,t ≈|V -,j,t |, we get: |V -,j,t |≤VUF MAX +n VUF,j,t ,or VUF,j,t ≥0 where η VUF,j,t Relaxing constraints when they cannot be satisfied; Distributed Energy Resources DER, including hazardous limits: in and are the upper and lower limits of active and reactive DG power at each node j, phase z and time t; Controllable load, the characteristics of the load are given by: Among them, P lflex,j,z,t is the controlled active power demand at phase z of node j, and at time t, P shift,j,z is the load that can be transferred, and n j,z,t ∈{-1,0,1} indicates that when the initial demand P l,j,z,t An integer variable representing the increase or decrease in load during the transfer; and the constraints associated with the BESS: in is the installed battery energy storage system BESS capacity connected to phase z at node j; and are fixed minimum and maximum per-unit limits for the battery state of charge; and is the available energy at node j, phase z and time t.

11. The data-driven active power distribution network local control system based on machine learning according to claim 10, It is characterized in that Uncertainty is handled through chance constraints, and the feasible space and current constraints are modified as follows: in The lower voltage amplitude constraint and the upper voltage amplitude constraint are tightened, I br This is the tightening of the current amplitude constraint.

12. The data-driven active power distribution network local control system based on machine learning according to claim 11, It is characterized in that Solving the objective function under constraints includes: calculating the optimal DER set point using a single scan based on the BFS algorithm and evaluating the uncertainty margin using the Monte Carlo method. The Monte Carlo method for evaluating the uncertainty margin includes: solving the deterministic OPF with tightened constraints and calculating the uncertainty margin When the change in tightening value between two subsequent iterations is below a threshold When , the BFS algorithm has converged, where the uncertainty margin for: The superscript 0 indicates the value at the operating point where the prediction error is zero.

13. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.