A distributed photovoltaic hierarchical coordination control method based on microgrid architecture

By constructing a three-layer control architecture for microgrids, the randomness and intermittency of distributed photovoltaic power generation are solved, achieving stable, self-healing, and economical operation of the system, reducing operating costs and carbon emissions, and improving the system's autonomy and fault handling speed.

CN120914859BActive Publication Date: 2026-05-22BENXI POWER SUPPLY COMPANY OF STATE GRID LIAONINGELECTRIC POWER SUPPLY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BENXI POWER SUPPLY COMPANY OF STATE GRID LIAONINGELECTRIC POWER SUPPLY
Filing Date
2025-08-22
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing technologies are ill-equipped to handle the randomness and intermittency of distributed photovoltaic power generation, lack a hierarchical coordination mechanism, resulting in large fluctuations in power output, slow dispatch response speed, failure to coordinate economic and environmental benefits, and insufficient fault handling capabilities, thus affecting system stability and reliability.

Method used

A three-layer control architecture based on microgrid architecture is constructed, including the device layer, microgrid layer and regional layer. Through data acquisition, fault monitoring, voltage stabilization control, economic and environmental optimization and negative feedback regulation, combined with strategies such as MPPT control, model predictive control and Lagrange dual decomposition, global coordinated optimization and fault self-healing are achieved.

Benefits of technology

It has enabled the stable, self-healing, economical and environmentally friendly operation of distributed photovoltaic systems, reduced operating costs and carbon emissions, and improved the system's autonomy and fault handling speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120914859B_ABST
    Figure CN120914859B_ABST
Patent Text Reader

Abstract

The application discloses a kind of distributed photovoltaic layered coordination control methods based on microgrid architecture, it is related to distributed photovoltaic control technical field, to equipment layer, microgrid layer, three-layer architecture of area layer as core, equipment layer realizes MPPT control with the improved disturbance observation method, and reactive power is adjusted according to target power factor;Microgrid layer uses model predictive control to optimize power distribution, and controls energy storage charging and discharging by state machine strategy;Area layer is coordinated by multi-microgrid through multi-objective optimization function and Lagrange dual decomposition algorithm, improves decision accuracy in combination with combined load prediction, relies on distributed consistency algorithm to realize interlayer information synchronization, constructs multilevel fault detection and layered self-healing mechanism to guarantee operation, maintain voltage stability by layered voltage control, output optimal control parameters by economic and environmental optimization, then form closed loop by negative feedback regulation, cooperate robust model predictive control to deal with uncertainty, ensure reliable operation of system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed photovoltaic control technology, specifically a distributed photovoltaic hierarchical coordination control method based on a microgrid architecture. Background Technology

[0002] With the rapid development and large-scale application of distributed photovoltaic (PV) power generation technology, traditional centralized grid control modes face severe challenges. Existing technologies suffer from the following main deficiencies: Traditional centralized control architectures struggle to cope with the randomness and intermittency of distributed PV. Distributed PV power generation is significantly affected by weather conditions, resulting in large power output fluctuations. Traditional dispatch systems have slow response times, making real-time tracking and rapid adjustment difficult. Existing distributed control methods lack effective hierarchical coordination mechanisms. Most research focuses on a single control level, such as inverter-level or microgrid-level control, lacking global coordination and optimization from the equipment level to the regional level. Furthermore, existing control methods often prioritize power balance, neglecting a holistic consideration of economic and environmental benefits. Some solutions optimize economics solely by reducing electricity purchase costs, ignoring grid loss costs in inter-microgrid power exchange and energy storage system maintenance costs. Other studies, while focusing on environmental indicators, fail to establish a quantitative correlation between carbon emission costs and power dispatch, leading to phenomena such as "high-carbon electricity purchase" and "redundant energy storage charging and discharging" during system operation.

[0003] Furthermore, insufficient fault handling capabilities are also a key bottleneck restricting the development of distributed photovoltaic systems. Traditional fault detection methods rely heavily on single indicators, making it difficult to identify hidden faults such as equipment aging and communication interruptions. Moreover, they lack a layered self-healing mechanism, often resorting to a complete shutdown maintenance mode after a fault occurs, resulting in system power outages lasting several minutes and severely impacting the reliability of power supply for users.

[0004] In summary, the shortcomings of existing technologies in terms of control architecture coordination, operational stability, economic and environmental integration, and fault self-healing capabilities have become core obstacles restricting the large-scale and high-quality development of distributed photovoltaic systems. There is an urgent need to build a new control method that is multi-level coordinated, highly robust, and adaptable to all scenarios. Summary of the Invention

[0005] The purpose of this invention is to provide a distributed photovoltaic hierarchical coordination control method based on a microgrid architecture. Based on a three-layer architecture of equipment layer, microgrid layer and regional layer, this method achieves stable, self-healing, economical and environmentally friendly operation of the distributed photovoltaic system through data acquisition and preprocessing, fault monitoring and diagnosis, voltage stabilization control, economic and environmental optimization and negative feedback regulation, combined with strategies such as MPPT control, model predictive control and Lagrange dual decomposition.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A hierarchical coordinated control method for distributed photovoltaic systems based on a microgrid architecture, characterized by the following steps:

[0008] S1: Construct a three-layer control architecture consisting of the device layer, microgrid layer, and regional layer. The device layer is responsible for the local control of a single distributed photovoltaic device, the microgrid layer coordinates multiple distributed power sources and loads within the microgrid, and the regional layer coordinates the operation of multiple microgrid layers.

[0009] S2: Data acquisition and preprocessing, real-time acquisition of operational data at each level, filtering of the acquired data, removal of outliers, and import of the data into the three-layer control architecture for execution;

[0010] S3: Fault monitoring and diagnosis. Through a multi-level fault detection mechanism and self-healing control strategy, it continuously monitors the three-layer control architecture of equipment layer, microgrid layer, and area layer. When a fault is detected, it initiates a layered and progressive self-healing control decision.

[0011] S4: Voltage stability judgment. For unstable voltage, a hierarchical voltage control strategy is adopted. Each layer coordinates to maintain voltage stability. The voltage regulation of the equipment layer adopts droop control, and the voltage regulation of the microgrid layer adopts secondary control to eliminate the steady-state error of droop control. The regional layer achieves voltage coordination by optimizing the power exchange of each microgrid. The voltage control strategy is selected based on the fault diagnosis results of S3.

[0012] S5: Economic and environmental optimization. For stable voltage and voltage control strategy after S4, the objective function is determined by comprehensively considering economic and environmental benefits. By solving the multi-objective optimization function, the optimal control parameters of each level are obtained, including MPPT control parameters of equipment layer, power allocation command of microgrid layer, and power exchange command between microgrids of area layer, to obtain the final control command.

[0013] S6: Negative feedback regulation evaluates the execution effect of the final control command, feeds back the deviation data to each layer of the control architecture, dynamically adjusts the control parameters, forms a closed-loop optimized control, and returns the evaluation data to the three-layer control architecture of the device layer, microgrid layer, and area layer for optimization.

[0014] Step S1: The device-level control system is responsible for the local control of a single distributed photovoltaic device. The state variables of its device-level controller are defined as follows:

[0015] S i =[V i ,I i ,T i H i ,θ i ]

[0016] In the formula, V i I iThese represent voltage and current, respectively; T represents temperature; and H represents temperature. i For humidity, θ i These are equipment status parameters; status variables are used to monitor the equipment's operating status in real time, providing a data foundation for fault detection and MPPT control.

[0017] The power control equation for the device layer is:

[0018] P i (t)=η i ·A i ·G(t)·[1-β i (T i (t)-T ref )]

[0019] In the formula, P i (t) represents the output power of the i-th photovoltaic device, η i For conversion efficiency, A i Let G(t) be the area of ​​the photovoltaic panel, G(t) be the solar radiation intensity, and β be the solar radiation intensity. i T is the temperature coefficient. ref For reference temperature;

[0020] The device layer employs an improved perturbation-observation method to achieve maximum power point tracking (MPPT) control. The improved MPPT algorithm introduces an adaptive step size adjustment mechanism, the formula of which is as follows:

[0021]

[0022] In the formula, ΔV(k+1) is the voltage perturbation amount (V) at step k+1, that is, the voltage change to be applied in the next step; ΔV(k) is the voltage perturbation amount at step k, that is, the voltage change in the current step; k is the discrete time step index, representing the number of iterations of the MPPT algorithm; γ is the adjustment factor, 0<γ<1, used to control the size of the perturbation step; dP / dV is the derivative of power with respect to voltage at the current moment (W / V), representing the slope of the power-voltage curve; dP / dV(k-1) is the derivative of power with respect to voltage at the previous moment (W / V); P is the output power of the photovoltaic array (W); V is the terminal voltage of the photovoltaic array (V).

[0023] Condition 1:

[0024] Physical meaning: The current power change direction is the same as the previous step.

[0025] Control strategy: Continue to perturb in the same direction, maintaining the original perturbation direction.

[0026] Mathematical expression: ΔV(k+1)=γ·ΔV(k)

[0027] Condition 2:

[0028] Physical meaning: The current power change direction is opposite to the previous step, and it may have already passed the maximum power point.

[0029] Control strategy: Reverse perturbation to find the maximum power point

[0030] Mathematical expression: ΔV(k+1)=-γ·ΔV(k)

[0031] The voltage disturbance ΔV(k) is used to adjust the operating point of the photovoltaic array to achieve maximum power point tracking. This disturbance is transmitted to the voltage control loop to participate in voltage stability control.

[0032] Step S1, the equipment layer, also includes reactive power control, which automatically adjusts the power factor based on the grid voltage conditions.

[0033] Q i (t)=P i (t)·tan(cos -1 (PF target ))

[0034] In the formula, Q i (t) represents reactive power, P i (t) represents the output power of the i-th photovoltaic device, PF target For the target power factor, cos -1 (PF target ) is the inverse cosine function, representing the angle corresponding to the target power factor, with its unit being radians; tan(cos -1 (PF target The tangent function is used, with the angle mentioned above as the input parameter. The tangent value equals the ratio of reactive power to active power, i.e., tanφ = Q / P. Here, the required reactive power ratio is directly derived from the target power factor.

[0035] Step S1: The microgrid layer controls and coordinates multiple distributed power sources and loads within the microgrid, thereby achieving power balance and voltage stability within the microgrid. The power balance constraint of the microgrid layer is defined as follows:

[0036]

[0037] In the formula, P pv,i (t) represents the photovoltaic power generation, P es,j (t) represents the power of the energy storage system, P grid (t) represents the power exchanged with the main grid, P l,k (t) represents the load power;

[0038] The microgrid layer employs Model Predictive Control (MPC) to achieve coordinated optimization across multiple time scales. The prediction model is established as follows:

[0039] x(k+1)=Ax(k)+Bu(k)+Ed(k)

[0040] In the formula, x(k) is the state vector, u(k) is the control vector, d(k) is the disturbance vector, and A, B, and E are the system matrices;

[0041] The objective function for optimizing the microgrid layer is set as follows:

[0042]

[0043] In the formula, N p To predict the time domain length, x(k) is the state vector, u(k) is the control vector, and x... T (k) is the transpose of x(k), u T (k) is the transpose of u(k), Q, R, and S are weight matrices, and the objective function is a quadratic cost. The first term x T (k)Qx(k) represents the penalty for state deviation, and the second term u T (k)Ru(k) represents the penalty for the controlled action, and the third term x T (N p )Sx(N p This is a terminal cost to ensure system stability at the end of the prediction time domain. It focuses on state prediction and control optimization within a single microgrid.

[0044] Step S1: Microgrid Layer Control and Coordination. The charging and discharging control of the energy storage system within the microgrid adopts a state machine switching strategy.

[0045]

[0046] In the formula, SOC represents the state of charge, and P surplus For the remaining power, P deficit For power deficit, P smooth To smooth out power.

[0047] The first scenario: When the energy storage state of charge is below the minimum value and there is remaining power, it is charged at maximum power.

[0048] The second scenario: When the energy storage state of charge is higher than the maximum value and there is a power deficit, it discharges at maximum power.

[0049] The third scenario: Smooth power adjustment in other situations.

[0050] This is a state machine control strategy that ensures the energy storage system operates within a safe range while balancing power supply and demand within the microgrid.

[0051] Step S1: The regional layer coordinates the operation of multiple microgrids to achieve overall optimization within the region. The multi-objective optimization function of the regional layer is:

[0052] minJ=w1J cost +w2J loss +w3J emission

[0053] In the formula, J cost For operating costs, J loss For network loss, J emission For carbon emissions, w1, w2, and w3 are weighting coefficients;

[0054] Focus on the coordination among multiple microgrids, taking into account overall objectives such as economic efficiency, network losses, and carbon emissions;

[0055] The regional layer employs a distributed optimization algorithm to solve the multi-micronet coordination problem. The distributed algorithm framework based on Lagrange dual decomposition is as follows:

[0056]

[0057] In the formula, f i (x i Let g(x) be the objective function of the i-th micronet, g(x) be the coupling constraint, and λ be the Lagrange multiplier.

[0058] Algorithm principle:

[0059] 1) Problem decomposition: The multi-micronet coordination problem is decomposed into multiple sub-problems, and each micronet independently optimizes its own objective function;

[0060] 2) Coupling constraint handling: Coupling constraints between microgrids (such as power balance constraints) are handled using Lagrange multipliers;

[0061] 3) Iterative solution: Each microgrid solves its own subproblem in parallel, and coordination is achieved through the update of Lagrange multipliers.

[0062] Mechanisms for achieving coordination:

[0063] 1) Each microgrid perceives the "shadow price" of the overall system constraints through Lagrange multipliers;

[0064] 2) While optimizing its own objectives, it automatically considers the impact on the overall system;

[0065] 3) Ultimately, a globally optimal coordinated operating state is achieved.

[0066] The dual decomposition iterative process is as follows:

[0067] x i k+1 =argminx i [fi (x i )+(λ k ) T g i (x i )]

[0068] λ k+1 =λ k +ρg(x k+1 )

[0069] In the formula, ρ is the step size parameter; x i k+1 f is the decision variable for the i-th microgrid in the (k+1)-th iteration; i (x i Let λ be the local objective function of the i-th microgrid; k Let g be the Lagrange multiplier vector for the k-th iteration, representing the shadow price of the constraint; i (x i ) represents the constraint function associated with the i-th microgrid; ρ is the step size parameter, controlling the update speed of the Lagrange multipliers; λ k+1 Let g(x) be the Lagrange multiplier vector for the (k+1)th iteration; k+1 ) represents the value of the global constraint function at the solution of the (k+1)th iteration.

[0070] The regional layer also includes load forecasting, employing combined forecasting methods to improve forecast accuracy:

[0071]

[0072] In the formula, For load forecasting, h is the forecast time step, and α1, α2, and α3 are the combined weights.

[0073] The role of load forecasting includes: forecasting basis: providing future load information for multi-objective optimization at the regional level; optimization input: the forecasting results serve as important input parameters for the MPC forecasting model; decision support: helping the system make power allocation and energy storage scheduling decisions in advance.

[0074] Load forecasting is an auxiliary technology that supports the main control process. Its forecast results are input into the S5 economic and environmental optimization step to improve the accuracy and economy of the system's predictive control, and serve as a supporting technology for regional-level decision-making.

[0075] Step S1 specifically involves using a distributed consensus algorithm to achieve information synchronization and coordinated control between different control layers. The basic form of the consensus algorithm is as follows:

[0076]

[0077] In the formula, Let N be the rate of change of the state of the i-th node.i Let a be the set of neighbors of node i. ij `x` is an element of the adjacency matrix, representing the connection strength between nodes `i` and `j`, and is either 0 or 1; `j` is the index number of the neighboring node; `x`... i Let x be the current state variables of node i, including voltage, frequency, and power; j Let j be the state variable of the neighbor node, where the nodes include device layer nodes, such as the controllers of various distributed photovoltaic inverters, energy storage converters and other equipment; microgrid layer nodes, such as the central controllers of various microgrids; and regional layer nodes, such as the regional dispatch center or main controller.

[0078] Through the consensus algorithm, the state variable x of each control node i Gradually converge to a consistent value to achieve information synchronization between the device layer, microgrid layer, and region layer, where x i These represent the key state parameters of each layer. The rate of change of the state of each node i depends on the state difference with its neighbor node j. Through continuous information exchange, the states of all nodes eventually tend to be consistent.

[0079] To improve convergence speed, a weighted consensus algorithm is introduced:

[0080]

[0081] In the formula, w ij Let w be the communication weight coefficient between nodes i and j, 0 ≤ w ij ≤1; u i External input signals for node i include upper-level control commands and reference values; Let be the rate of change of node i, representing how quickly its state changes over time; i is the index number of the current node, including device, micronet, or area controller number; j is the index number of the neighboring node; N i Let x be the set of neighbors of node i, specifically other nodes that communicate directly with node i; i Let x be the current state variables of node i, including voltage, frequency, and power; j Let j be the state variable of the neighboring node j.

[0082] Inter-layer information transmission adopts an event-triggered mechanism to reduce communication burden. The event triggering conditions are designed as follows:

[0083] |e i (t)|≥α|x i (t)|+β

[0084] In the formula, e i (t) represents the measurement error of the i-th node at time t; x i (t) represents the actual state variables of the i-th node at time t, including voltage and power; α and β are the trigger threshold parameters.

[0085] Unlike traditional periodic communication, the event-triggered mechanism only communicates and updates control when "needed".

[0086] Trigger condition design:

[0087] The event-triggered mechanism monitors measurement error e. i (t) and state variable x i The ratio of (t) is set so that data is only sent when it exceeds a set threshold, which effectively reduces unnecessary communication and lowers the network load.

[0088] Workflow:

[0089] 1) Continuous monitoring: Each node continuously monitors its own state variables and estimation errors.

[0090] 2) Condition judgment: Real-time calculation to determine whether the triggering conditions are met.

[0091] 3) Event Trigger: Send data or update control immediately when conditions are met.

[0092] 4) Status Reset: Upon triggering, the accumulated error is reset, and a new monitoring cycle begins.

[0093] Application scenarios include:

[0094] Equipment layer: Inverter status monitoring, reporting only when there are significant changes in voltage or current.

[0095] Microgrid layer: Power balance monitoring, adjustments are made only when the power imbalance exceeds a threshold.

[0096] Regional layer: Coordination between micronets, communicating only when power reallocation is needed.

[0097] This mechanism is suitable for distributed photovoltaic systems because changes in sunlight and load are relatively slow and predictable, and do not require high-frequency continuous communication.

[0098] Step S3: When a fault is detected, the system automatically starts the corresponding self-healing control strategy to ensure the continuous and stable operation of the system.

[0099] Communication fault detection uses a timestamp-based method:

[0100]

[0101] In the formula, T fault For communication failure flags, t current t represents the current time. last T is the last time data was received. threshold The fault judgment threshold;

[0102] Testing process:

[0103] 1) Timestamp recording: Record the reception time t for each received data packet. last

[0104] 2) Real-time monitoring: The system clock provides the current time t. current

[0105] 3) Timeout Detection: Calculate the time difference and compare it with the threshold T. threshold Compare

[0106] 4) Fault confirmation: If the timeout occurs, it is determined to be a communication failure.

[0107] It also includes a multi-level fault detection mechanism, including equipment-level fault detection, microgrid-level fault detection and regional-level fault detection;

[0108] Equipment-level fault detection employs statistical process control methods:

[0109] T 2 =(x-μ) T S -1 (x-μ)

[0110] In the formula, μ is the mean vector of historical normal operation data, and S is the covariance matrix of historical normal operation data; T 2 For Hotelling T 2 Statistics are used in multivariate statistical process control; x is the current observed state vector, including voltage, current, and temperature; S⁻¹ is the inverse of the covariance matrix. This is the matrix transpose symbol;

[0111] The fault detection threshold is:

[0112]

[0113] In the formula, m is the number of samples, p is the dimension of the variable, and B is the beta function;

[0114] Microgrid-level fault detection is based on residual analysis:

[0115]

[0116] In the formula, y(k) is the actual output. For predicting output;

[0117] Self-healing control adopts a layered and progressive strategy, with priority levels as follows: device-level self-healing, microgrid-level reconstruction, and regional-level coordination.

[0118] Among them, device-level self-healing uses fault isolation and backup equipment deployment; microgrid-level reconfiguration bypasses fault areas by changing the network topology; and regional coordination achieves overall balance by redistributing the power of each microgrid.

[0119] Step S5: The system objective function comprehensively considers economic and environmental benefits.

[0120] By minimizing the objective function J, the optimal power allocation scheme and equipment operating parameters are obtained, and specific control commands are generated, including: power reference values ​​for each photovoltaic device, charging and discharging power of the energy storage system, and power exchange commands between microgrids.

[0121]

[0122] In the formula, C grid (t) represents the cost of electricity purchase, C maint (t) represents maintenance costs, C emiss (t) represents the carbon emission cost, R sell (t) represents the revenue from electricity sales.

[0123] The formula for calculating electricity purchase cost is as follows:

[0124]

[0125] In the formula, C grid (t) represents the electricity purchase cost (in yuan) at time t. For the purchased power, π buy (t) represents the electricity purchase price, and Δt represents the time step (hours).

[0126] The carbon emission cost is calculated as follows:

[0127]

[0128] In the formula, As a carbon emission factor, π carbon For carbon prices, The power purchased is Δt, which is the time step (in hours).

[0129] Robust model predictive control is used to handle uncertainties throughout the entire process. Uncertainty factors are present throughout the hierarchical coordinated control process, and are uniformly handled and compensated at each step through robust control methods. The uncertainty model is established as follows:

[0130] x(k+1)=Ax(k)+Bu(k)+w(k)

[0131] In the formula, x(k+1) is the system state vector at time k+1, w(k) is the bounded disturbance, x(k) is the system state vector at time k, including voltage, current, and power, A is the system state transition matrix, used to describe the dynamic characteristics of the system; B is the control input matrix, used to describe the control action; u(k) is the control input vector at time k; w(k) is the bounded disturbance vector at time k, representing various uncertainties, and k is the discrete time step index;

[0132] The tubular invariant set of robust control is defined as:

[0133]

[0134] In the formula, x is the set of state constraints, U is the set of control constraints, and K is the feedback gain matrix. The optimization problem under uncertainty is expressed as:

[0135] min u max w∈W J(x,u,w)

[0136] In the formula, u is the control decision variable, and w is the uncertainty parameter. W is the set of constraints for the uncertainty parameters; J(x,u,w) is the objective function value under uncertainty w.

[0137] This min-max formulation means finding the optimal control strategy in the worst-case scenario to ensure the robustness of the system.

[0138] Using the scene tree method to handle randomness and uncertainty:

[0139]

[0140] In the formula, ω i For the i-th scene, Let be the random variable implementation for the i-th scenario at time t.

[0141] The scene tree method constructs multiple possible future scenes, each corresponding to different combinations of lighting and load. The system optimizes and solves for all scenes, selecting the most robust control strategy.

[0142] System uncertainties include external environmental uncertainties, equipment parameter uncertainties, and measurement uncertainties. Among them, external environmental uncertainties include changes in light intensity (cloud cover, weather changes), temperature fluctuations (affecting photovoltaic power generation efficiency), and load randomness (the unpredictability of user electricity consumption behavior).

[0143] Uncertainties in equipment parameters include photovoltaic panel aging (gradually decreasing efficiency), inverter parameter drift (parameter changes caused by long-term operation), and line impedance changes (temperature and load affecting line parameters).

[0144] Measurement uncertainties include sensor errors (limitations on measurement accuracy), communication delays (time uncertainty in data transmission), and quantization errors (limitations on A / D conversion accuracy).

[0145] This distributed photovoltaic (PV) hierarchical coordinated control method is based on a "three-layer architecture, closed-loop optimization, and multi-strategy collaboration." Through hierarchical management and information interaction at the equipment, microgrid, and regional levels, it achieves stable operation, fault self-healing, and economic and environmental optimization of the distributed PV system. The specific mechanism is as follows: First, the system is based on a three-layer control architecture: The equipment layer focuses on the precise local control of individual distributed PV devices. By improving the disturbance observation method and introducing an adaptive step size adjustment mechanism, it dynamically adjusts the voltage disturbance based on the slope of the power-voltage curve to achieve maximum power point tracking (MPPT). Simultaneously, it automatically adjusts reactive power according to the grid voltage and uses the target power factor to infer reactive power demand, providing stable equipment for the upper-level control. The system prepares operational data; the microgrid layer aims to coordinate the power supply and load balance within the microgrid. Based on model predictive control (MPC), it constructs a multi-time-scale optimization model, optimizes power allocation by balancing state deviation and control action costs through a quadratic objective function, and relies on state machine switching strategies to manage the charging and discharging of the energy storage system based on parameters such as the energy storage state of charge and remaining power, maintaining voltage stability and power balance within the microgrid; the regional layer coordinates multiple microgrids from a global perspective. Through a multi-objective optimization function, it integrates operating costs, grid losses, carbon emissions, and the Lagrange dual decomposition algorithm to decompose the global problem into microgrid sub-problems for parallel solution. Combined with combined load forecasting results, it achieves the optimal allocation of power exchange between microgrids, taking into account both system economy and environmental benefits.

[0146] Secondly, the system ensures reliability through end-to-end data interaction and closed-loop control: real-time collection of operational data at each level, followed by filtering and outlier removal preprocessing before inputting into the three-layer architecture; relying on a distributed consensus algorithm, including weighted improvement and event triggering mechanisms, communication is only established when the state error exceeds the threshold to achieve inter-layer information synchronization, reducing network communication burden; simultaneously, a multi-level fault detection mechanism is constructed, encompassing "device level - microgrid level - region level"—the device level utilizes Hotling T... 2 The system monitors the status of multiple variables such as voltage and current using statistical methods. At the microgrid level, residual analysis is used to compare actual and predicted outputs to identify anomalies. Communication faults are identified by timestamp timeouts. Once a fault is detected, a hierarchical and progressive self-healing strategy is immediately initiated, prioritizing equipment fault isolation and backup deployment, followed by microgrid topology reconstruction, and finally regional layer power redistribution to ensure continuous system operation.

[0147] Finally, the system achieves dynamic optimization based on stable operation: First, voltage stability is assessed. Unstable voltage is addressed through layered control, with equipment-level droop control, microgrid-level secondary control eliminating steady-state errors, and regional-level power exchange optimization restoring stability. Stable voltage then enters the economic and environmental optimization phase. By minimizing the objective function, the system comprehensively considers electricity purchase costs, maintenance costs, carbon emission costs, and electricity sales revenue, clarifying the quantitative calculation methods for electricity purchase and carbon emission costs to solve the multi-objective optimization problem. This results in the output of optimal control parameters such as equipment-level MPPT parameters and microgrid-level power allocation commands. Simultaneously, the system introduces a negative feedback adjustment mechanism to evaluate the execution effect of control commands, monitor indicators such as voltage deviation and power tracking error, and feed the deviation data back to each layer of the architecture to dynamically adjust control parameters, forming a closed-loop optimization. Furthermore, robust model predictive control is used to construct a tubular invariant set, and a scenario tree method is employed to handle uncertainties such as light fluctuations, equipment aging, and measurement errors, ensuring the robustness of the control strategy and ultimately achieving efficient, stable, and economical operation of the distributed photovoltaic system.

[0148] Compared with the prior art, the beneficial effects of the present invention are:

[0149] 1. A complete three-layer control architecture was constructed, realizing comprehensive coordinated control from the device level to the regional level. This effectively solved the control complexity problem brought about by the large-scale integration of distributed photovoltaics. Through hierarchical distributed control, the system can achieve global coordination while ensuring local optimization, significantly improving the control effect.

[0150] 2. An efficient information transmission and coordination mechanism was designed, and a distributed consensus algorithm and event triggering mechanism were adopted. While ensuring control performance, the communication burden was greatly reduced, the system's dependence on the communication network was significantly reduced, and the system's autonomy and reliability were improved.

[0151] 3. A multi-objective optimization model was established, comprehensively considering multiple objectives such as economy, stability, and environmental protection, achieving the overall optimal operation of the system. Through intelligent coordinated control, system operating costs were reduced by 18.6%, carbon emissions were reduced by 25.2%, resulting in significant economic and environmental benefits.

[0152] 4. The robust control method effectively handles various uncertainties, significantly improving the system's anti-interference ability and adaptability. Under uncertain conditions such as changes in illumination and load fluctuations, the system can still maintain stable operation, with voltage deviation controlled within 1.3%.

[0153] 5. A comprehensive fault detection and self-healing mechanism has been designed. The system has the ability to quickly detect, isolate, and recover from faults. Under various fault scenarios, the system can complete fault handling within seconds, ensuring the continuous and stable operation of the system. Attached Figure Description

[0154] Figure 1 This is a flowchart of a distributed photovoltaic hierarchical coordination control method based on a microgrid architecture according to the present invention.

[0155] Figure 2 This diagram shows the comparison results of different control methods in various performance indicators of the distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to the present invention.

[0156] Figure 3 This is a diagram illustrating the system recovery performance under different fault scenarios of a distributed photovoltaic hierarchical coordination control method based on a microgrid architecture, as described in this invention. Detailed Implementation

[0157] The technical solutions of the present invention will now be described in detail with reference to the accompanying drawings.

[0158] See Figure 1 The specific implementation method includes the following steps:

[0159] A three-layer control architecture is constructed, consisting of the equipment layer, the microgrid layer, and the regional layer. The equipment layer is responsible for the local control of a single distributed photovoltaic device, the microgrid layer coordinates multiple distributed power sources and loads within the microgrid, and the regional layer coordinates the operation of multiple microgrid layers.

[0160] The device-level control system is responsible for the local control of a single distributed photovoltaic device, and the state variables of its device-level controller are defined as follows:

[0161] S i =[V i ,I i ,T i H i ,θ i ]

[0162] In the formula, V i I i These represent voltage and current, respectively; T represents temperature; and H represents temperature. i For humidity, θ i These are device status parameters;

[0163] The power control equation for the device layer is:

[0164] P i (t)=η i ·A i ·G(t)·[1-β i (T i (t)-T ref )]

[0165] In the formula, P i (t) represents the output power of the i-th photovoltaic device, η iFor conversion efficiency, A i Let G(t) be the area of ​​the photovoltaic panel, G(t) be the solar radiation intensity, and β be the solar radiation intensity. i T is the temperature coefficient. ref For reference temperature;

[0166] The device layer employs an improved perturbation-observation method to achieve maximum power point tracking (MPPT) control. The improved MPPT algorithm introduces an adaptive step size adjustment mechanism, the formula of which is as follows:

[0167]

[0168] In the formula, ΔV(k+1) is the voltage perturbation amount (V) at step k+1, that is, the voltage change to be applied in the next step; ΔV(k) is the voltage perturbation amount at step k, that is, the voltage change in the current step; k is the discrete time step index, representing the number of iterations of the MPPT algorithm; γ is the adjustment factor, 0<γ<1, used to control the size of the perturbation step; dP / dV is the derivative of power with respect to voltage at the current moment (W / V), representing the slope of the power-voltage curve; dP / dV(k-1) is the derivative of power with respect to voltage at the previous moment (W / V); P is the output power of the photovoltaic array (W); V is the terminal voltage of the photovoltaic array (V).

[0169] The equipment layer also includes reactive power control, which automatically adjusts the power factor based on grid voltage conditions.

[0170] Q i (t)=P i (t)·tan(cos -1 (PF target ))

[0171] In the formula, Q i (t) represents reactive power, P i (t) represents the output power of the i-th photovoltaic device, PF target For the target power factor, cos -1 (PF target ) is the inverse cosine function, representing the angle corresponding to the target power factor, with its unit being radians; tan(cos -1 (PF target )) is the tangent function, and the input parameter is the angle mentioned above; the tangent value is equal to the ratio of reactive power to active power, that is, tanφ=Q / P.

[0172] The microgrid layer controls and coordinates multiple distributed power sources and loads within the microgrid, thereby achieving power balance and voltage stability within the microgrid. The power balance constraint of the microgrid layer is defined as follows:

[0173]

[0174] In the formula, Ppv,i (t) represents the photovoltaic power generation, P es,j (t) represents the power of the energy storage system, P grid (t) represents the power exchanged with the main grid, P l,k (t) represents the load power;

[0175] The microgrid layer employs Model Predictive Control (MPC) to achieve coordinated optimization across multiple time scales. The prediction model is established as follows:

[0176] x(k+1)=Ax(k)+Bu(k)+Ed(k)

[0177] In the formula, x(k) is the state vector, u(k) is the control vector, d(k) is the disturbance vector, and A, B, and E are the system matrices;

[0178] The objective function for optimizing the microgrid layer is set as follows:

[0179]

[0180] In the formula, N p To predict the time domain length, x(k) is the state vector, u(k) is the control vector, and x... T (k) is the transpose of x(k), u T (k) is the transpose of u(k), Q, R, and S are weight matrices, and the objective function is a quadratic cost. The first term x T (k)Qx(k) represents the penalty for state deviation, and the second term u T (k)Ru(k) represents the penalty for the controlled action, and the third term x T (N p )Sx(N p The terminal cost is used to ensure the stability of the system at the end of the prediction time domain.

[0181] The microgrid layer control coordinates the charging and discharging control of the energy storage system within the microgrid using a state machine switching strategy.

[0182]

[0183] In the formula, SOC represents the state of charge, and P surplus For the remaining power, P deficit For power deficit, P smooth To smooth out power.

[0184] The regional layer coordinates the operation of multiple microgrids to achieve overall optimization within the region. The multi-objective optimization function of the regional layer is:

[0185] minJ=w1J cost +w2J loss +w3Jemission

[0186] In the formula, J cost For operating costs, J loss For network loss, J emission For carbon emissions, w1, w2, and w3 are weighting coefficients;

[0187] The regional layer employs a distributed optimization algorithm to solve the multi-micronet coordination problem. The distributed algorithm framework based on Lagrange dual decomposition is as follows:

[0188]

[0189] In the formula, f i (x i Let g(x) be the objective function of the i-th micronet, g(x) be the coupling constraint, and λ be the Lagrange multiplier.

[0190] The dual decomposition iterative process is as follows:

[0191] x i k+1 =argminx i [f i (x i )+(λ k ) T g i (x i )]

[0192] λ k+1 =λ k +ρg(x k+1 )

[0193] In the formula, ρ is the step size parameter; x i k+1 f is the decision variable for the i-th microgrid in the (k+1)-th iteration; i (x i Let λ be the local objective function of the i-th microgrid; k Let g be the Lagrange multiplier vector for the k-th iteration, representing the shadow price of the constraint; i (x i ) represents the constraint function associated with the i-th microgrid; ρ is the step size parameter, controlling the update speed of the Lagrange multipliers; λ k+1 Let g(x) be the Lagrange multiplier vector for the (k+1)th iteration; k+1 () represents the value of the global constraint function at the solution of the (k+1)th iteration;

[0194] The regional layer also includes load forecasting, employing combined forecasting methods to improve forecast accuracy:

[0195]

[0196] In the formula, For load forecasting, h is the forecast time step, and α1, α2, and α3 are the combined weights.

[0197] Distributed consensus algorithms are used to synchronize information and coordinate control between different control layers. The basic form of the consensus algorithm is as follows:

[0198]

[0199] In the formula, Let N be the rate of change of the state of the i-th node. i Let a be the set of neighbors of node i. ij `x` is an element of the adjacency matrix, representing the connection strength between nodes `i` and `j`, and is either 0 or 1; `j` is the index number of the neighboring node; `x`... i Let x be the current state variables of node i, including voltage, frequency, and power; j Let j be the state variable of the neighbor node, where the nodes include device layer nodes, such as the controllers of various distributed photovoltaic inverters, energy storage converters and other equipment; microgrid layer nodes, such as the central controllers of various microgrids; and regional layer nodes, such as the regional dispatch center or main controller.

[0200] To improve convergence speed, a weighted consensus algorithm is introduced:

[0201]

[0202] In the formula, w ij w is the communication weighting coefficient between nodes i and j, 0 ≤ w ij ≤1; u i External input signals for node i include upper-level control commands and reference values; Let be the rate of change of node i, representing how quickly its state changes over time; i is the index number of the current node, including device, micronet, or area controller number; j is the index number of the neighboring node; N i Let x be the set of neighbors of node i, specifically other nodes that communicate directly with node i; i Let x be the current state variables of node i, including voltage, frequency, and power; j Let j be the state variable of the neighboring node j;

[0203] Inter-layer information transmission adopts an event-triggered mechanism to reduce communication burden. The event triggering conditions are designed as follows:

[0204] |e i (t)|≥α|x i (t)|+β

[0205] In the formula, e i (t) represents the measurement error of the i-th node at time t; x i(t) represents the actual state variables of the i-th node at time t, including voltage and power; α and β are the trigger threshold parameters.

[0206] Real-time collection of operational data from each level; filtering of the collected data to remove outliers; and importing the data into the three-tier control architecture for execution.

[0207] Through a multi-level fault detection mechanism and self-healing control strategy, the three-layer control architecture of equipment layer, microgrid layer and regional layer is continuously monitored. When a fault is detected, a layered and progressive self-healing control decision is initiated.

[0208] When a fault is detected, the system automatically activates the corresponding self-healing control strategy to ensure continuous and stable operation of the system.

[0209] Communication fault detection uses a timestamp-based method:

[0210]

[0211] In the formula, T fault For communication failure flags, t current t represents the current time. last T is the last time data was received. threshold The fault judgment threshold;

[0212] It also includes a multi-level fault detection mechanism, including equipment-level fault detection, microgrid-level fault detection and regional-level fault detection;

[0213] Equipment-level fault detection employs statistical process control methods:

[0214] T 2 =(x-μ) T S -1 (x-μ)

[0215] In the formula, μ is the mean vector of historical normal operation data, and S is the covariance matrix of historical normal operation data; T 2 For Hotelling T 2 Statistics are used in multivariate statistical process control; x is the current observed state vector, including voltage, current, and temperature; S⁻¹ is the inverse of the covariance matrix. This is the matrix transpose symbol;

[0216] The fault detection threshold is:

[0217]

[0218] In the formula, m is the number of samples, p is the dimension of the variable, and B is the beta function;

[0219] Microgrid-level fault detection is based on residual analysis:

[0220]

[0221] In the formula, y(k) is the actual output. For predicting output;

[0222] Self-healing control adopts a layered and progressive strategy, with the following priority levels: device-level self-healing, microgrid-level reconfiguration, and region-level coordination.

[0223] Among them, device-level self-healing uses fault isolation and backup equipment deployment; microgrid-level reconfiguration bypasses fault areas by changing the network topology; and regional coordination achieves overall balance by redistributing the power of each microgrid.

[0224] For unstable voltages, a hierarchical voltage control strategy is adopted, with each layer coordinating to maintain voltage stability. The equipment layer voltage regulation adopts droop control, and the microgrid layer voltage regulation adopts secondary control to eliminate the steady-state error of droop control. The regional layer achieves voltage coordination by optimizing the power exchange of each microgrid. The voltage control strategy is selected based on the S3 fault diagnosis results.

[0225] For stable voltage and the S4 voltage control strategy, the objective function is determined by comprehensively considering economic and environmental benefits. By solving the multi-objective optimization function, the optimal control parameters for each level are obtained, including the MPPT control parameters at the device level, the power allocation command at the microgrid level, and the inter-microgrid power exchange command at the regional level, resulting in the final control command. The system objective function comprehensively considers economic and environmental benefits.

[0226] By minimizing the objective function J, the optimal power allocation scheme and equipment operating parameters are obtained, and specific control commands are generated, including: power reference values ​​for each photovoltaic device, charging and discharging power of the energy storage system, and power exchange commands between microgrids. The minimization objective function is as follows:

[0227]

[0228] In the formula, C grid (t) represents the cost of electricity purchase, C maint (t) represents maintenance costs, C emiss (t) represents the carbon emission cost, R sell (t) represents the revenue from electricity sales;

[0229] The formula for calculating electricity purchase cost is as follows:

[0230]

[0231] In the formula, C grid (t) represents the electricity purchase cost (in yuan) at time t. For the purchased power, π buy(t) represents the electricity purchase price, and Δt represents the time step (hours);

[0232] The carbon emission cost is calculated as follows:

[0233]

[0234] In the formula, As a carbon emission factor, π carbon For carbon prices, The power purchased is Δt, which is the time step (in hours).

[0235] The final control command is evaluated for its execution effect. Deviation data is fed back to each layer of the control architecture, and control parameters are dynamically adjusted to form closed-loop optimized control. The evaluation data is then returned to the three-layer control architecture of the device layer, microgrid layer, and area layer for further optimization.

[0236] The entire process employs robust model predictive control to handle uncertainties. Uncertainty factors permeate the entire hierarchical coordinated control process, and are uniformly processed and compensated at each step through robust control methods. The uncertainty model is established as follows:

[0237] x(k+1)=Ax(k)+Bu(k)+w(k)

[0238] In the formula, x(k+1) is the system state vector at time k+1, x(k) is the system state vector at time k, including voltage, current, and power, A is the system state transition matrix, used to describe the dynamic characteristics of the system; B is the control input matrix, used to describe the control action; u(k) is the control input vector at time k; w(k) is the bounded disturbance vector at time k, representing various uncertainties, and k is the discrete time step index;

[0239] The tubular invariant set of robust control is defined as:

[0240]

[0241] In the formula, x is the set of state constraints, U is the set of control constraints, and K is the feedback gain matrix;

[0242] The optimization problem under uncertainty is formulated as follows:

[0243] min u max w∈W J(x,u,w)

[0244] In the formula, u is the control decision variable, and w is the uncertainty parameter. W Let J(x,u,w) be the set of constraints for the uncertainty parameters; J(x,u,w) is the objective function value under uncertainty w.

[0245] This min-max formulation means finding the optimal control strategy in the worst case to ensure the robustness of the system;

[0246] Using the scene tree method to handle randomness and uncertainty:

[0247]

[0248] In the formula, ω i For the i-th scene, Let be the random variable implementation for the i-th scene at time t;

[0249] The scene tree method constructs multiple possible future scenes, each corresponding to different combinations of lighting and load. The system optimizes and solves for all scenes, selecting the most robust control strategy.

[0250] System uncertainties include external environmental uncertainties, equipment parameter uncertainties, and measurement uncertainties. Among them, external environmental uncertainties include changes in light intensity (cloud cover, weather changes), temperature fluctuations (affecting photovoltaic power generation efficiency), and load randomness (the unpredictability of user electricity consumption behavior).

[0251] Uncertainties in equipment parameters include photovoltaic panel aging (gradually decreasing efficiency), inverter parameter drift (parameter changes caused by long-term operation), and line impedance changes (temperature and load affecting line parameters).

[0252] Measurement uncertainties include sensor errors (limitations on measurement accuracy), communication delays (time uncertainty in data transmission), and quantization errors (limitations on A / D conversion accuracy).

[0253] This embodiment establishes a regional power grid simulation model comprising three microgrids, each including distributed photovoltaic systems, energy storage systems, and various types of loads. The simulation platform is built based on MATLAB / Simulink, with a simulation time step of 0.01 seconds and a total simulation time of 24 hours.

[0254] The simulation scenarios include four typical conditions: normal operation, sudden change in illumination, sudden increase in load, and communication failure. The effectiveness of the patented method is verified by comparing and analyzing the system performance under different control strategies.

[0255] See Figure 2 The comparison results of different control methods on various performance indicators are shown:

[0256] See Figure 3 The system's recovery performance was demonstrated under different failure scenarios:

[0257] Simulation results show that the hierarchical coordinated control method proposed in this patent is significantly superior to traditional methods in terms of voltage stability, economy, and environmental friendliness. The system voltage deviation is reduced to 1.3%, operating costs are reduced by 18.6%, and carbon emissions are reduced by 25.2%. In terms of fault handling, the system has rapid detection and self-healing capabilities, and can resume normal operation in a short time.

Claims

1. A hierarchical coordinated control method for distributed photovoltaic systems based on a microgrid architecture, characterized in that, Includes the following steps: S1: Construct a three-layer control architecture consisting of the device layer, microgrid layer, and regional layer. The device layer is responsible for the local control of a single distributed photovoltaic device, the microgrid layer coordinates multiple distributed power sources and loads within the microgrid, and the regional layer coordinates the operation of multiple microgrid layers. S2: Data acquisition and preprocessing, real-time acquisition of operational data at each level, filtering of the acquired data, removal of outliers, and import of the data into the three-layer control architecture for execution; S3: Fault monitoring and diagnosis. Through a multi-level fault detection mechanism and self-healing control strategy, it continuously monitors the three-layer control architecture of equipment layer, microgrid layer, and area layer. When a fault is detected, it initiates a layered and progressive self-healing control decision. Step S3: When a fault is detected, the system automatically initiates the corresponding self-healing control decision to ensure continuous and stable operation of the system. Communication fault detection uses a timestamp-based method: In the formula, This is a communication failure indicator. For the current time, The last time data was received. The fault judgment threshold; It also includes a multi-level fault detection mechanism, including equipment-level fault detection, microgrid-level fault detection and regional-level fault detection; Equipment-level fault detection employs statistical process control methods: In the formula, This is the mean vector of historical normal operation data. S is the covariance matrix of historical normal operation data; T² is the Hotelling statistic, used for multivariate statistical process control; x is the current observed state vector, including voltage, current, and temperature; S⁻¹ is the inverse of the covariance matrix; and T is the matrix transpose sign. The fault detection threshold is: In the formula, For the sample size, For the dimension of the variable, For beta functions; Microgrid-level fault detection is based on residual analysis: In the formula, For the actual output, For predicting output; Self-healing control adopts a layered and progressive strategy, with the following priority levels: device-level self-healing, microgrid-level reconfiguration, and region-level coordination. Among them, device-level self-healing uses fault isolation and backup equipment deployment; microgrid-level reconfiguration bypasses fault areas by changing the network topology; and regional coordination achieves overall balance by redistributing the power of each microgrid. S4: Voltage stability judgment. For unstable voltage, a hierarchical voltage control strategy is adopted. Each layer coordinates to maintain voltage stability. The voltage regulation of the equipment layer adopts droop control, and the voltage regulation of the microgrid layer adopts secondary control to eliminate the steady-state error of droop control. The regional layer achieves voltage coordination by optimizing the power exchange of each microgrid. The voltage control strategy is selected based on the fault diagnosis results of S3. S5: Economic and environmental optimization. For stable voltage and voltage control strategy of S4, the economic and environmental benefits are comprehensively considered through objective function to determine multi-objective optimization function. By solving multi-objective optimization function, the optimal control parameters of each level are obtained, including MPPT control parameters of equipment layer, power distribution command of microgrid layer, and power exchange command between microgrids of area layer, and the final control command is obtained. S6: Negative feedback regulation evaluates the execution effect of the final control command, feeds back the deviation data to each layer of the control architecture, dynamically adjusts the control parameters, forms a closed-loop optimized control, and returns the evaluation data to the three-layer control architecture of the device layer, microgrid layer, and area layer for architecture optimization.

2. The distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to claim 1, characterized in that, Step S1: The device-level control system is responsible for the local control of a single distributed photovoltaic device. The state variables of its device-level controller are defined as follows: In the formula, Voltage and current, respectively, T i For temperature, For humidity, These are device status parameters; The power control equation for the device layer is: In the formula, Let be the output power of the i-th photovoltaic device. For conversion efficiency, For the area of ​​photovoltaic equipment, Solar radiation intensity, For temperature coefficient, For reference temperature; The device layer employs an improved perturbation-observation method to implement the Maximum Power Point Tracking (MPPT) algorithm. The MPPT algorithm introduces an adaptive step size adjustment mechanism, the formula of which is as follows: In the formula, is the voltage perturbation amount at step k+1, i.e., the voltage change to be applied in the next step; i.e., the voltage change in the current step; k is the discrete time step index, representing the number of iterations of the MPPT algorithm; γ is an adjustment factor, 0 < γ < 1, used to control the size of the disturbance step; dP / dV is the derivative of the current step power with respect to voltage, representing the slope of the power-voltage curve; dP(k-1) / dV(k-1) is the derivative of the previous step power with respect to voltage; P is the output power of the photovoltaic device; V is the terminal voltage of the photovoltaic device.

3. The distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to claim 1, characterized in that, Step S1, the equipment layer, also includes reactive power control, which automatically adjusts the power factor based on the grid voltage conditions. In the formula, Reactive power Let be the output power of the i-th photovoltaic device. For the target power factor, The inverse cosine function represents the angle corresponding to the target power factor, and its unit is radians; The input parameter is the angle mentioned above; the tangent value is equal to the ratio of reactive power to active power, i.e., tanφ=Q / P, where φ is the angle.

4. The distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to claim 1, characterized in that, Step S1: The microgrid layer coordinates multiple distributed power sources and loads within the microgrid to achieve power balance and voltage stability within the microgrid. The power balance constraint of the microgrid layer is defined as follows: In the formula, Photovoltaic power generation capacity, For the power of the energy storage system, In order to exchange power with the main network, For load power; The microgrid layer employs Model Predictive Control (MPC) to achieve coordinated optimization across multiple time scales. The prediction model is established as follows: In the formula, For state vectors, For control vectors, Let be the perturbation vector. For the system matrix; The objective function for optimizing the microgrid layer is set as follows: In the formula, To predict the length of the time domain, For state vectors, For control vectors, that is transpose, that is transpose, , , Given a weight matrix, the objective function is a quadratic form, with the first term... The second term represents the penalty for state deviation. The third item represents the punishment for controlling actions. To ensure the stability of the system at the end of the prediction time domain, at the cost of the terminal.

5. A distributed photovoltaic hierarchical coordination control method based on a microgrid architecture according to claim 4, characterized in that, Step S1: The charging and discharging control of the energy storage system within the microgrid is coordinated using a state machine switching strategy. In the formula, In a charged state, For the remaining power, This is due to a power deficit. To smooth out power.

6. The distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to claim 1, characterized in that, Step S1: The regional layer coordinates the operation of multiple microgrid layers to achieve overall optimization within the region. The multi-objective optimization function of the regional layer is: In the formula, For operating costs, For network loss, For carbon emissions, These are the weighting coefficients; The regional layer employs a distributed optimization algorithm to solve the multi-micronet coordination problem. The distributed algorithm framework based on Lagrange dual decomposition is as follows: In the formula, Let i be the objective function of the i-th microgrid. For coupling constraints, For Lagrange multipliers; The dual decomposition iterative process is as follows: In the formula, This is the step size parameter; Let be the decision variable for the i-th microgrid in the (k+1)-th iteration; Let i be the objective function of the i-th microgrid; Let be the Lagrange multiplier vector for the k-th iteration, representing the shadow price of the constraint; Let i be the constraint function associated with the i-th microgrid; The step size parameter controls the update rate of the Lagrange multipliers. Let be the Lagrange multiplier vector for the (k+1)th iteration; This represents the value of the global constraint function at the solution of the (k+1)th iteration. The regional layer also includes load forecasting, employing combined forecasting methods to improve forecast accuracy: In the formula, For load forecasting, h is the forecasting time step. , , For combined weights.

7. The distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to claim 1, characterized in that, Step S1 specifically involves using a distributed consensus algorithm to achieve information synchronization and coordinated control between different control layers. The basic form of the consensus algorithm is as follows: In the formula, Let be the rate of change of the state of the i-th node. Let i be the set of neighbors of node i. The elements of the adjacency matrix represent the connection strength between nodes i and j, and can be 0 or 1; j is the index number of the neighboring node. The current state variables of node i include voltage, frequency, and power; Let j be the state variable of the neighbor node, where the nodes include device layer nodes, device controllers of each distributed photovoltaic inverter and energy storage converter, microgrid layer nodes, central controllers of each microgrid, regional layer nodes, and regional dispatch centers or main controllers. To improve convergence speed, a weighted consensus algorithm is introduced: In the formula, The communication weight coefficient between nodes i and j, 0 ≤ ≤1; External input signals for node i include upper-level control commands and reference values; Let be the rate of change of the state of node i, representing how quickly the state changes over time; i is the index number of the current node, including the device, micronet, or area controller number; j is the index number of the neighboring node. Let i be the set of neighbors of node i, specifically other nodes that communicate directly with node i. The current state variables of node i include voltage, frequency, and power; Let j be the state variable of the neighboring node j; Inter-layer information transmission adopts an event-triggered mechanism to reduce communication burden. The event triggering conditions are designed as follows: In the formula, Let be the measurement error of the i-th node at time t; Let be the actual state variables of the i-th node at time t, including voltage and power; , This is the trigger threshold parameter.

8. The distributed photovoltaic hierarchical coordination control method based on microgrid architecture according to claim 1, characterized in that, Step S5: The objective function comprehensively considers both economic and environmental benefits. By minimizing the objective function, the optimal power allocation scheme and equipment operating parameters are obtained, and specific control commands are generated, including: power reference values ​​for each photovoltaic device, charging and discharging power of the energy storage system, and power exchange commands between microgrids. The minimization objective function is as follows: In the formula, For electricity purchase costs, To maintain costs, For carbon emission costs, Revenue from electricity sales; The formula for calculating electricity purchase cost is as follows: In the formula, Let be the cost of electricity purchase at time t. For the power purchase capacity, The electricity purchase price is Δt, where Δt is the time step. The carbon emission cost is calculated as follows: In the formula, As a carbon emission factor, For carbon prices, Δt represents the power purchased, and Δt represents the time step.

9. A distributed photovoltaic hierarchical coordination control method based on a microgrid architecture according to claim 1, characterized in that, Robust model predictive control (RBDC) is employed to handle uncertainty, which permeates the entire hierarchical coordinated control process. RBDC addresses and compensates for uncertainty at each step through unified processing. The uncertainty model is established as follows: In the formula, Let k+1 be the system state vector. Let k be the system state vector at time k, including voltage, current, and power. This is the system state transition matrix, used to describe the dynamic characteristics of the system; The control input matrix is ​​used to describe the control action; This is the control input vector at time k; Let k be the bounded perturbation vector at time k, representing the uncertainty factor, where k is the discrete time step index; The tubular invariant set of robust control is defined as: In the formula, Let U be the set of state constraints, U be the set of control constraints, and K be the feedback gain matrix. The optimization problem under uncertainty is formulated as follows: In the formula, u is the control decision variable, and w is the uncertainty parameter. For the set of constraints on the uncertain parameters; Let w be the objective function value under the uncertainty parameter w; This min-max formulation means finding the optimal control strategy in the worst case to ensure the robustness of the system; Using the scene tree method to handle randomness and uncertainty: In the formula, For the i-th scene, Let be the random variable implementation for the i-th scene at time t; The scene tree method constructs multiple possible future scenes, each corresponding to different combinations of lighting and load. The system optimizes and solves for all scenes, selecting the most robust control strategy.