A Method and System for Constructing Distributed Power Generation Models Based on Large-Scale Urban Power Grid Microgrids

By constructing a distributed power generation model based on a large urban power grid microgrid, and employing multi-dimensional standardized features and dual-scale error decomposition, combined with reinforcement learning-based near-end policy optimization, the problems of difficult cross-type transfer and insufficient robustness under extreme conditions in existing technologies are solved, achieving long-term model stability and accurate adaptation under extreme conditions.

CN123116523APending Publication Date: 2026-11-17STATE GRID JIANGSU ELECTRIC POWER CO LTD NANJING POWER SUPPLY COMPANY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611224420.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing distributed generation modeling methods in large urban power grids suffer from difficulties in cross-type migration, high modeling costs, poor engineering reusability, difficulty in balancing trend interpretability and short-to-medium-term error correction capabilities, and lack of robustness to extreme operating conditions and long-term adaptive update capabilities.

Method used

A distributed power generation model based on a large urban power grid microgrid is adopted. A regional trend output model is constructed through multi-dimensional standardized features. By combining dual-scale error decomposition and near-end strategy optimization through reinforcement learning, the slowly changing parameters are adaptively updated. A comprehensive risk index is constructed for robust adaptation to extreme operating conditions.

Benefits of technology

It achieves unified coverage of multiple types of distributed power sources, hierarchically corrects errors at multiple spatiotemporal scales, ensures the long-term stability of the model and its robustness under extreme conditions, reduces modeling costs and complexity, and meets the real-time requirements of power grid planning simulation and scheduling verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116523A_ABST
    Figure CN123116523A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for constructing a distributed power generation model based on a large-scale urban power grid microgrid, belonging to the field of microgrid distributed power generation modeling technology. The method first constructs a physical trend layer encompassing physical mechanisms; it then constructs a dual-scale error decomposition and correction mechanism, decomposing errors into minute-level fluctuation errors and hour-level system deviations and adaptively fusing and correcting them; based on deep reinforcement learning, it constructs a slow-varying parameter self-updating mechanism, dynamically updating key slow-varying parameters such as temperature coefficient, efficiency baseline, and effective cut-in wind speed drift daily / weekly and projecting constraints within the physically feasible domain. This invention, while ensuring interpretability and engineering deployability, achieves unified coverage of multiple types of distributed power sources, hierarchical correction of multi-temporal and spatial scale errors, long-term adaptive updates, and robust adaptation to extreme scenarios. It can be used in power grid planning simulation, scheduling verification, and operation evaluation scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid distributed power generation modeling technology, and in particular to a method and system for constructing distributed power generation models based on large urban power grid microgrids. Background Technology

[0002] With the large-scale integration of distributed photovoltaic (PV) and distributed wind power into urban power grids and industrial microgrids, power output exhibits strong randomness, volatility, and scenario dependence, posing significant challenges to planning simulation, power flow verification, scheduling planning, and safety assessment. Under conditions of dense urban core loads, numerous feeders, complex grid structures, and frequent adjustments to operating modes, the computational load and data maintenance costs of traditional unit-based fine-grained modeling have increased significantly, posing challenges to city-level planning simulation, power flow and safety verification, scheduling planning, and risk assessment. Engineeringly, there is a need for an equivalent model system that can reflect physical mechanisms and trends, cover errors across multiple time scales, and maintain long-term stability under scenarios such as equipment aging and extreme weather.

[0003] In the process of realizing this invention, the inventors discovered that the prior art has at least the following drawbacks and shortcomings: 1. Existing modeling methods often model each type of power source separately, lacking a unified framework and a universal modeling mechanism with configurable parameter interfaces, resulting in difficulties in cross-type migration, high modeling costs, and poor engineering reusability; 2. Existing methods often have to choose between pure mechanistic models and pure data-driven models, making it difficult to simultaneously take into account both trend interpretability and short- to medium-term error correction capabilities. This results in short-term fluctuations, intraday energy deviations, and long-term drifts being difficult to characterize in a unified manner. 3. For slow-changing factors such as equipment aging, parameter drift, and long-term environmental changes, existing models usually rely on manual periodic calibration or static parameter updates. The accuracy decays significantly over time, maintenance costs are high, and it is difficult to meet the requirements for long-term stability. 4. For extreme conditions such as strong cloud formations, strong gusts, icing, and typhoons, existing models lack deployable scene recognition and adaptive adjustment mechanisms, making it difficult to suppress systematic overestimation risks and quickly restore accuracy and robustness in extreme scenarios.

[0004] Therefore, in summary, existing equivalent modeling methods for distributed generation have significant shortcomings in terms of generality, multi-timescale coverage, long-term adaptive update capability, and robustness under extreme conditions. There is an urgent need for a general and accurate equivalent modeling method for large-scale urban power grid applications that can achieve unified coverage of multiple types of distributed generation, hierarchical correction of multi-temporal and spatial scale errors, dynamic updating of slowly varying parameters, and robust adaptation to extreme conditions. Summary of the Invention

[0005] This application provides a method and system for constructing a general and accurate model of distributed generation in microgrids of large urban power grids, which is used to solve the technical problems existing in the background art mentioned above.

[0006] The first aspect of this application provides a method for constructing a distributed power generation model based on a large-scale urban power grid microgrid, including: Based on the multi-point cluster access of distributed photovoltaic power sources and distributed wind power sources in urban power grids and park microgrids, a regional trend output general model of distributed power sources is constructed based on multi-dimensional standardized features of meteorological characteristics, equipment status characteristics, and operating condition characteristics. The multi-dimensional standardized features include slowly varying parameters that reflect the temperature sensitivity and efficiency baseline of photovoltaic power sources. A dual-scale error decomposition mechanism is adopted to decompose the model error into short-time random error and medium-time system deviation. The short-time random error and medium-time system deviation obtained by the decomposition are used to correct the regional trend power output general model, resulting in a distributed power output model corrected by dual-scale error. The optimal action is obtained by using a near-end policy optimization method based on reinforcement learning. The optimal action is used as the update amount of the slowly varying parameters. The updated slowly varying parameters are then substituted into the general regional trend power output model to update the general regional trend power output model. Based on the updated general regional trend power output model and the distributed power output model corrected by dual-scale error, the distributed power output model after slowly varying parameter calibration is obtained. A comprehensive risk index is constructed, and the risk level of the current operating condition is determined based on the comprehensive risk index. When the risk level is determined to be low, the distributed power generation output model calibrated with slow-varying parameters is directly output. The distributed power generation output model calibrated with slow-varying parameters is used for power grid planning simulation, scheduling verification, and operation evaluation.

[0007] Furthermore, including: The process of constructing the comprehensive risk index includes: The set of working conditions is defined based on normal scenarios and typical extreme scenarios, and a set of candidate extreme working conditions is selected using typical screening rules. A classifier is used to output the scenario probability distribution of the candidate extreme working conditions set, thereby obtaining a comprehensive risk index.

[0008] Furthermore, including: The process of using a classifier to output the scenario probability distribution of the candidate extreme working condition set, and then constructing a comprehensive risk index, includes: Define a set of operating conditions, including six typical operating conditions: normal, strong cloud change or rapid shading, strong gusts, high temperature heat wave, low temperature icing, and rainstorm / typhoon; use online-accessible features to identify operating conditions, including fluctuation coefficient, irradiance change rate, wind speed change rate, ambient temperature, temperature change, and meteorological / equipment alarm markers, and construct a real-time feature vector. Typical screening rules are used to coarsely screen extreme working conditions. Specifically, strong cloud changes are judged based on whether the rate of change of irradiance exceeds the threshold, strong gusts and typhoons are judged based on whether the rate of change of wind speed exceeds the threshold, high temperature heat waves are judged based on whether the temperature exceeds the high temperature threshold, and low temperature icing is judged based on whether the temperature is lower than the icing threshold and there is an alarm mark. In this way, all possible candidate extreme working conditions that may be triggered at the current moment are screened out. Calculate the comprehensive risk index, which is the sum of the probabilities of all abnormal operating conditions. If the comprehensive risk index is lower than or equal to the preset risk threshold, it is judged as low risk; if the comprehensive risk index is higher than the risk threshold, it is judged as high risk.

[0009] Furthermore, including: The method further includes: when the current operating condition is judged to be high-risk based on the comprehensive risk index, introducing a trend term robust reduction coefficient, a short-term coefficient, and a medium-term coefficient to adjust the adaptively updated distributed power output model to obtain the final robust equivalent model.

[0010] Furthermore, including: The regional trend output general model for distributed power sources, constructed based on multi-dimensional standardized features including meteorological characteristics, equipment status characteristics, and operating condition characteristics, includes: Construct a photovoltaic distributed power generation output model, with the environmental impact function expressed as: The basic characteristic function of the equipment is expressed as follows: The efficiency function is expressed as: ;in, P stc The rated output power of a photovoltaic array or photovoltaic sub-cluster under standard test conditions; for t Solar irradiance at any given time; G stc For irradiation intensity, Let t be the component temperature or equivalent temperature of the distributed power source at time t; T stc Rated temperature Photovoltaic temperature coefficient; For inverter efficiency; Construct a distributed wind power generation output model, with the environmental impact function expressed as: ; The basic characteristic function of the equipment is expressed as follows: ; The efficiency function is expressed as: ; In the formula, This is the wind speed reference drift coefficient; This is the fan degradation coefficient; ; In the formula, For piecewise functions: when v < v in or v ≥ v out The output is 0 when... v in ≤ v < v r It increases proportionally to the volume; when v r ≤ v < v out The output is at rated power. For information from meteorological observations or cabin conditions t Wind speed at any moment To cut into wind speed, For rated wind speed, To cut off the wind speed; A general model for distributed generation is constructed based on the output models of photovoltaic distributed generation and wind distributed generation, and is expressed as follows: In the formula, This is the capacity weighting coefficient, determined based on the installed capacity ratio of the distributed power supply cluster. The meteorological feature input vector; These are the basic equipment parameters for photovoltaic distributed power sources or wind power distributed power sources. These are the basic efficiency parameters for photovoltaic distributed power sources or wind power distributed power sources. These are the environmental impact function, the equipment basic characteristic function, and the efficiency function, respectively.

[0011] Furthermore, including: The dual-scale error decomposition mechanism decomposes the model error into short-time random error and medium-time systematic bias, including: The overall residual is calculated based on the historical measured power output and the output of the general model of distributed power sources: ; in, Contribute to historical measurements This is the output of the general model of the distributed power source; The total residual is decomposed into short-time random errors on a time scale. Deviation from hourly time system ,in, Used to characterize low-frequency system bias within an hourly window. Used to characterize minute-level rapid fluctuation residuals after subtracting mid-time bias; Two LSTM network models are set up, denoted as the short-time correction sub-model and the medium-time correction sub-model, respectively. The short-time correction sub-model utilizes the input feature parameters. The short-term error correction prediction short-term error before 1 and 2 short time steps is used as input, and the mid-time correction sub-model uses hourly mean parameters. The predicted time error at the first and second time steps is used as input; the error is corrected sequentially over time, and the final output is the error correction amount at the current time. and .

[0012] Furthermore, including: The obtained distributed power output model after dual-scale error correction includes: An adaptive dual-weighting mechanism is used to fuse two types of corrections, with the weights driven by local error statistics: In the formula, , These are the standard deviations of errors within the minute window and the hour window, respectively. and The upper bound of experience, The scaling factor is used; finally, the distributed power output after dual-scale error correction is: .

[0013] Furthermore, including: The input feature parameters and hourly average parameters , is represented as: ; In the formula, Input features for the short-term correction sub-model Input features for the mid-time correction sub-model; t At any given time, solar irradiance for t The component temperature or equivalent temperature of the distributed power source at all times. for t Wind speed at any moment This represents the average value of the corresponding parameter within the hour preceding this time step.

[0014] Furthermore, including: The step of using a reinforcement learning-based proximal policy optimization method to obtain the optimal action, and using the optimal action as the update amount for the slowly varying parameters, includes: The slowly varying parameters that need to be considered are set as the action space, expressed as: ; in, These respectively reflect the photovoltaic temperature sensitivity and efficiency baseline. Let be the photovoltaic temperature coefficient at time t. This indicates the efficiency of the photovoltaic inverter. This is the wind speed reference drift coefficient; This represents the fan degradation coefficient.

[0015] Furthermore, including: The update process of the general model for regional trend output includes: Randomly initialize the parameters of the agent's policy network (Actor) and value network (Critic); The agent operates based on the current policy, in a simulation or historical data environment, and each step depends on the state. Select Action The physical model parameters are updated, the action corresponding to the adjustment amount of the slowly varying parameters. This adjustment amount is applied to the physical model parameters in the general regional trend output model to update the general regional trend output model. A new error is calculated based on the output of the updated general regional trend output model and the measured output. And calculate the reward This forms a trajectory of state, action, and reward; Using value network Critic and generalized advantage estimation methods, we evaluate the performance of each action relative to the average level. The agent updates the parameters of the policy network Actor by optimizing a pruning objective function. The objective function pursues higher rewards while limiting the difference between the new and old policies to ensure the stability of the learning process. Repeat the above steps until the model error converges; After training, the agent periodically calculates the optimal action based on the latest state, and uses the parameter adjustment amount corresponding to the optimal action as the update amount of the slowly varying parameters, which is then substituted into the general regional trend output model to update the general regional trend output model. Based on the updated general regional trend output model and the distributed power output model corrected by dual-scale error, the distributed power output model after slowly varying parameters is obtained, realizing the adaptive update of the model.

[0016] Furthermore, including: The process of obtaining the final robust equivalent model includes: When a high-risk event is triggered, three types of adaptive adjustment coefficients are introduced, corresponding to different levels of the distributed power generation model calibrated with slowly varying parameters: The robust reduction factor of the trend term is applied to the physical trend term to address the systemic overestimation risk caused by icing, typhoons, etc. The short-term correction enhancement coefficient is applied to the minute-level residual correction term to enhance short-term fluctuation compensation under strong cloud changes and strong gusts. The mid-time correction enhancement factor is applied to the hour-level residual correction term to enhance mid-time deviation compensation under conditions such as continuous heat waves. The empirical coefficients for each extreme scenario are identified from historical data through least squares regression. During real-time operation, the empirical coefficients for each scenario are weighted and averaged using the current scenario probability to obtain the comprehensive adjustment coefficient. Based on the risk assessment results, the final robust equivalent model is output: for low risk, the results of the first three layers are directly output; for high risk, the physical trend term is multiplied by the robust reduction factor of the trend term for overall discounting, and the minute-level residual correction term and the medium-time residual correction term are multiplied by the corresponding enhancement factor and then superimposed for output to achieve robust correction under extreme conditions.

[0017] Secondly, the present invention also provides a distributed power generation model construction system based on a large-scale urban power grid microgrid, comprising: A general model construction module is used to construct a regional trend output general model of distributed power sources based on multi-dimensional standardized features of meteorological characteristics, equipment status characteristics, and operating condition characteristics, according to the multi-point cluster access of distributed photovoltaic power sources and distributed wind power sources in urban power grids and park microgrids. The multi-dimensional standardized features include slowly varying parameters that reflect the temperature sensitivity and efficiency baseline of photovoltaic power sources. The dual-scale error correction module is used to decompose the model error into short-time random error and medium-time system deviation using a dual-scale error decomposition mechanism, and to add the decomposed short-time random error and medium-time system deviation as residual corrections to the output of the regional trend output general model, thereby obtaining a distributed power output model with dual-scale error correction. The slowly varying parameter adaptive update module is used to obtain the best action using a proximal policy optimization method based on reinforcement learning, use the best action as the update amount of the slowly varying parameters, and substitute the updated slowly varying parameters into the regional trend output general model to update the regional trend output general model; based on the updated regional trend output general model and the distributed power output model corrected by dual-scale error, a distributed power output model calibrated by the slowly varying parameters is obtained. The robust equivalent model output module is used to construct a comprehensive risk index and determine the risk level of the current operating condition based on the comprehensive risk index. When the risk level is determined to be low, the distributed power generation output model calibrated with slow-varying parameters is directly output. The distributed power generation output model calibrated with slow-varying parameters is used for power grid planning simulation, scheduling verification, and operation evaluation.

[0018] Thirdly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the distributed power generation model construction method based on a large urban power grid microgrid described in the first aspect.

[0019] Thirdly, the present invention also provides an electronic device, characterized in that it includes a processor and a memory, the processor being electrically connected to the memory, the memory being used to store instructions and data, and the processor being used to execute the steps of the distributed power source model construction method based on a large urban power grid microgrid as described in the first aspect.

[0020] One or more technical solutions provided in this application have at least the following technical effects or advantages: (1) This invention integrates photovoltaic and wind power into a decomposable general expression of the product of environmental impact × equipment basic characteristics × efficiency, achieving coverage of multiple types of distributed power sources by a single model system. Through the design of configurable parameter interfaces, there is no need to design separate models for photovoltaic and wind power, which significantly reduces the modeling cost and migration difficulty of cross-type power sources. The physical trend output of this layer serves as the benchmark for all subsequent corrections, ensuring that the model has clear physical meaning and interpretability under any operating condition.

[0021] (2) This invention uses PPO deep reinforcement learning to dynamically update four key slowly varying parameters: photovoltaic temperature coefficient, photovoltaic inverter efficiency baseline, wind turbine effective cut-in wind speed drift coefficient, and wind turbine degradation coefficient. The state space integrates meteorological features, equipment health status (SOH), the current slowly varying parameter set, and model error. The reward function simultaneously constrains accuracy and parameter change smoothness, ensuring that the updated parameter projection constraints are within the physically feasible domain. The further improvement from M2 to M3 proves the effectiveness of the self-updating of slowly varying parameters. Daily / weekly automatic calibration avoids the problem of accuracy decay over time caused by traditional methods relying on manual periodic calibration, ensuring the stability and accuracy of the model throughout its entire life cycle.

[0022] (3) This invention achieves adaptive model switching between normal and extreme operating conditions by defining the operating condition set, extracting feature vectors, filtering rule thresholds, probabilistic output using Softmax, and calculating the comprehensive risk index. Three types of adaptive adjustment coefficients are introduced: the trend term robust reduction coefficient, the short-term coefficient, and the medium-term coefficient, enabling precise hierarchical adjustment that corrects problems wherever they occur. Under the extreme operating condition verification window of overlapping icing and typhoons, the proposed equivalent modeling results follow the actual power change trend without long-term deviation, proving that this invention, through historical residual causal correction and risk constraints, enables the equivalent model to adapt to power changes under abnormal operating conditions such as icing and typhoons.

[0023] Therefore, while ensuring physical interpretability and engineering deployability, the invention achieves unified coverage of multiple types of distributed power sources, hierarchical correction of errors at multiple spatiotemporal scales, long-term adaptive updates, and robust adaptation to extreme scenarios. The model structure is clear and highly interpretable, with all features and parameters derived from engineering-available data. The training and inference processes meet the real-time requirements of power grid dispatching and can be directly integrated into existing power grid planning simulation and dispatch verification platforms. It is effectively applied to scenarios such as planning simulation, dispatch verification, and operation evaluation of large-scale urban power grids. Attached Figure Description

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

[0025] Figure 1 A flowchart of a general and accurate equivalent modeling method for distributed power sources in large-scale urban power grid microgrids provided in an embodiment of the present invention; Figure 2 This is a schematic diagram comparing the model with the actual power provided in the embodiments of the present invention; Figure 3 This is a schematic diagram showing the error comparison between M1, M2, the complete model, and the actual power provided in the embodiments of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0027] It should be noted that the terms "first," "second," etc., in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices.

[0028] This invention proposes a general and accurate equivalent modeling method for distributed power sources in microgrids of large urban power grids, such as... Figure 1 As shown, the model is constructed by stacking four general levels. After training, deployment and online updates, it achieves unified equivalent modeling and robust adaptation to various types of distributed power sources.

[0029] Step S1: Construct a physical trend layer model that covers the physical characteristics of distributed power sources, forming a physical trend layer; S1, which constructs distributed power sources, encompasses both photovoltaic and wind power generation. These can be selected and connected to subsequent levels as needed. The unified modeling form for their respective physical characteristics is as follows: The steps are described below, and the subscript functions are summarized as follows: PV is photovoltaic, WT is wind turbine, irr is related to solar irradiance, temp is related to temperature, inv is related to inverter, phy is related to physical characteristics, stc is related to standard test environment, base is uncorrected initial variable, eff is related to efficiency, deg is related to equipment degradation, and cluster is related to equipment cluster.

[0030] The goal of a photovoltaic system physical characteristic model is to capture the deterministic portion of photovoltaic output variation with the environment under given irradiance and temperature conditions. To enhance interpretability and provide an interface for subsequent parameter updates, this invention writes the photovoltaic mechanism model in a product-decomposable form: the trend is jointly determined by the irradiance scaling term, the temperature reduction term, and the inverter efficiency term.

[0031]

[0032] In the formula, P stc Rated power under standard test conditions; for t The intensity of sunlight radiation at any given time; G stc =1000 W / m 2 ; T The component temperature or equivalent temperature; T stc The standard temperature is 25°C. Temperature coefficient; η inv For inverter efficiency; A physical trend model for photovoltaic power generation; This is a function of the amount of electricity generated under solar irradiation. The power generation reduction function due to temperature; The power generation reduction function due to inverter efficiency t For time.

[0033] How to obtain: Pstc The inverter's rated parameters are from the equipment ledger; G and T Source: Weather station / online temperature measurement; η inv It can be estimated from the efficiency curves and operating points of photovoltaic manufacturers. Scale attribution: G , T For short- to medium-term input (minutes to hours); temperature coefficient and inverter efficiency η inv As this is a slowly variable parameter, its effective value is subsequently calibrated by DRL weekly / monthly.

[0034] The wind power physical characteristic model uses typical piecewise power curves to characterize the cut-in, rated, and cut-out operating conditions, as shown below: In the formula, For piecewise functions: when v < v in or v ≥ v out The output is 0 when... v in ≤ v < v r It increases proportionally to the volume; when v r ≤ v < v out The output is at rated power. This structure remains interpretable and consistent with the commonly used power curves for wind turbines.

[0035] Variable acquisition: v Wind speed from meteorological observations or cabin wind speed; cut-in wind speed v in Rated wind speed v r Cut-off wind speed v out These are slowly varying parameters, derived from the equipment specifications, and their effective values ​​are allowed to change slowly thereafter.

[0036] Based on the above fundamental classifications, photovoltaic (PV) power generation and wind power generation are modeled in a unified form as a new energy power generation physical trend layer. PV or wind power generation can be selected according to actual needs, facilitating the overlay of other layers in subsequent steps. The core function of this layer is to capture the deterministic trend of distributed power output. It employs a product-decomposable general expression and adapts to different types of power sources such as PV and wind power through a configurable parameter interface. Referring to the commonalities in the trend models of the aforementioned power sources, a general model for distributed power generation is constructed. (7) In the formula, This is the capacity weighting coefficient, determined based on the installed capacity ratio of the distributed power supply cluster. The meteorological feature input vector, These represent light intensity, wind speed, and ambient temperature or component temperature, respectively, all of which can be obtained in real time through weather stations or SCADA systems. Basic equipment parameters, such as the temperature coefficient in photovoltaic scenarios. Or the effective wind speed drift coefficient in wind power scenarios ; Basic efficiency parameters; such as inverter efficiency in photovoltaic scenarios. Or the degradation coefficient in wind power scenarios , These are the environmental impact function, the equipment basic characteristic function, and the efficiency function, respectively, which are configured to adapt to different power supply types.

[0037] In other words, the irradiance and temperature parameters of the photovoltaic system in this embodiment are incorporated into the photovoltaic system. and The wind speed curve and degradation parameters of wind power are incorporated into the wind power system. and After that, the subsequent correction layers, namely the LSTM error correction and update layers, i.e., the PPO reinforcement learning, no longer need to distinguish between photovoltaic and wind power processing; they only need to target this unified... This greatly reduces the complexity of the system.

[0038] In formula (7), The capacity weights are dimensionless. This is the environmental impact function, with the dimension of power (MW). and Since both are dimensionless, the dimension of the general model of distributed power sources is power (MW).

[0039] For photovoltaics, the above parameters are as follows:

[0040] In the formula, P stc The rated power of the photovoltaic array or photovoltaic sub-cluster under standard test conditions is provided by the photovoltaic manufacturer. for t The intensity of sunlight radiation at any given time; G stc The rated standard irradiance of sunlight under standard test conditions is taken as 1000 W / m. 2 This is used to normalize the actual irradiation intensity; for t The component temperature or equivalent temperature of the distributed power source at all times;T stc The rated temperature for standard test conditions is 25 °C. Photovoltaic temperature coefficient; For inverter efficiency. In this embodiment, by utilizing the base, i.e., the structure of layer S1, and (t), i.e., the update variable of layer S3, it is clearly shown that S1 is responsible for defining the physical logic, and S3 is responsible for providing the specific values, such as... and They actually mean the same thing; both refer to the photovoltaic temperature coefficient.

[0041] For wind power, the above parameters are as follows: In the formula, This is the wind speed reference drift coefficient; This is the wind turbine degradation coefficient. In the formula, For piecewise functions: when v < v in or v ≥ v out The output is 0 when... v in ≤ v < v r It increases proportionally to the volume; when v r ≤ v < v out The output is at rated power. v Sources from meteorological observations or cabin wind speed, v in To cut into wind speed, v r For rated wind speed, v out To cut off the wind speed.

[0042] In this embodiment, for wind power, its basic physical characteristics, such as cut-in / cut-out wind speeds, are embedded in the environmental impact function. In the middle, and It is primarily responsible for characterizing the global multiplicative drift caused by leaf contamination and changes in control strategies.

[0043] Therefore, the complete mapping of the photovoltaic part includes: the mapping between formula (2) and formula (8) above, G(t) as the input feature of LSTM, the mapping between formula (3) and formula (9), and the mapping between formula (4) and formula (10). It is one of the action variables of PPO below. Formula (1) serves as a general model for the photovoltaic example to be substituted into formula (7), providing a reference output for subsequent steps. .

[0044] The mapping of the wind power part includes: Formula (6) is mapped to Formula (11). As input features of the LSTM, formula (12) is used to reflect the slow drift of the effective cut-in wind speed and is one of the PPO action variables. Formula (13) is used to reflect the attenuation of the equivalent available power of the wind turbine and is one of the PPO action variables. Therefore, in this embodiment, the above models all use pure physical steady-state variables, such as G, T, and v, which ensures that the model has a clear physical meaning under any circumstances.

[0045] Since a microgrid in a park contains hundreds or thousands of inverters, large areas of photovoltaic panels, and clusters of wind turbines, this embodiment uses capacity weighting. These individual models can be directly linearly superimposed into a region equivalent model. This completes the qualitative change from microscopic individual units to macroscopic stations, specifically: If distributed power sources are clustered and connected to a system, the general model for obtaining regional trend output using capacity-weighted aggregation is as follows: In the formula, N This refers to the number of wind turbines or the number of sub-clusters. For the first i The capacity proportion weight of each subarray / unit. In subsequent derivations, if it is necessary to consider the distributed power supply cluster access system, then use... A replacement will suffice.

[0046] Step S2: Construct a dual-scale error decomposition mechanism to achieve separable modeling and controllable correction of volatility and systematic deviations, forming a short-to-medium-term error correction layer.

[0047] In this embodiment, in order to achieve steps S2, S3 and S4, it is first necessary to construct a multi-level, multi-dimensional influencing factor feature system. Specifically: Construct a multi-dimensional standardized feature system covering meteorological characteristics, equipment status characteristics, and operating condition characteristics to provide data support for general modeling and scene recognition: (1) Meteorological characteristics: including wind speed Light intensity Ambient or equipment temperature Irradiation variation rate Wind speed change rate Sudden temperature changes Among them, wind speed and light intensity are used to characterize the energy input of distributed power sources, while temperature and various rates of change are used to capture the dynamic fluctuations of meteorological conditions.

[0048] (2) Equipment condition characteristics: including aging factor Health status Effective temperature coefficient Effective inverter efficiency Cut-in wind speed offset The SOH is a comprehensive evaluation based on equipment operation data and maintenance records. The aging factor is obtained through SOH mapping, and the remaining parameters are used to characterize the evolution of equipment performance.

[0049] (3) Operating condition characteristics: including fluctuation coefficient (Ratio of standard deviation to mean within a minute window), local standard deviation of error Load matching degree Alarm markers The fluctuation coefficient and error statistics are used to characterize the dynamic characteristics of output force and error, and the alarm flag integrates meteorological warnings and equipment failure information.

[0050] All elements in the input features of the short-time correction sub-model and the medium-time correction sub-model are preprocessed using the z-score normalization method, with the following formula: (16) In the formula, μ The mean of the training set, σ To ensure data scaling consistency, the statistics used in the offline training phase are adopted for online inference, serving as the standard deviation of the training set. Missing and outlier data are removed using a dual rule of physical boundary and neighborhood consistency to guarantee feature quality.

[0051] After constructing the above-mentioned multi-dimensional standardized feature system, the implementation of step S2 requires clarification. The core purpose of this data system is to organize the scattered multi-source data from the power grid site into a standardized, layered, and quality-controllable common input interface, so that the three layers of steps S2, S3, and S4 can each take what they need and perform parallel modeling and inference without interfering with each other.

[0052] In this embodiment, for S2, a dual-scale error decomposition mechanism is constructed to achieve separable modeling and controllable correction of volatility and systematic deviation, including an offline stage and an online stage. The offline stage includes: Step S21: For the residual between the physical trend layer output and the actual output, this invention employs a dual-scale LSTM network for residual learning and rolling correction. First, the overall residual is calculated based on the historical measured output and the physical trend layer output: (17) in, To measure the actual output, the active power output data collected by the grid-connected metering of distributed power sources or the dispatch master station is obtained after time alignment, missing value removal and outlier processing. This is the output of the physical trend layer for a general model of distributed power sources.

[0053] In this embodiment, The output is calculated based on light intensity, temperature, wind speed, and nameplate parameters. This is the actual value measured by the grid-connected meter, therefore, For residuals not accounted for by the physical model, such as sudden cloud cover, wind turbine wake effects, and instantaneous efficiency fluctuations of equipment, LSTM learns the residuals instead of directly learning the power. This is a classic optimal practice in control theory and forecasting. Because the physical trend already accounts for 80% to 90% of the output, LSTM only needs to fit the remaining 10% to 20% of nonlinear error, greatly reducing the training difficulty and significantly improving generalization ability. For example, if the physical model predicts a theoretical output of 100kW, and the power station's meter records an actual output of 85kW, the residual is recorded as -15kW. A negative number indicates that the physical model overestimated the actual output. In this embodiment, the model predicting the residual predicts the current residual as -14kW. This predicted residual is used to correct the physical model's output of 100-14=86kW. At this point, 86kW is closer to the actual 85kW than the initial 100kW.

[0054] Step S22: Decompose the total residuals into minute-level short-time random errors according to the time scale. Deviation from hourly time system .in, Used to characterize low-frequency system bias within an hourly window. Used to characterize minute-level rapid fluctuation residuals after deducting time deviations.

[0055] For example, the minute-level rapid fluctuation residuals after medium time deviation can be understood as follows: First, for the overall residuals Perform a moving average to calculate the systematic deviation over the past hourly window. Here, we assume a step size of 5 minutes. Therefore, there are 12 points in one hour, allowing us to obtain the bias of the model predictions over one hour. Once the average bias over the past hour is calculated, this average bias is subtracted from the current total residual. This means obtaining the purely random rapid fluctuations caused by the disturbance. It also means obtaining the labels for LSTM training.

[0056] The online phase includes: Step S22: Due to the current time t measured value It hasn't happened yet, therefore, an LSTM network model is used for prediction, and the output is... and Specifically, this embodiment sets up two LSTM network models, denoted as the short-time correction sub-model and the medium-time correction sub-model, respectively. First, it is determined that the short-time correction sub-model uses the current parameters. The short-term error correction predictions at 1 and 2 short time steps are used as inputs, and the medium-term correction sub-model utilizes hourly mean parameters. The mid-time error is corrected for the mid-time error of the prediction before the mid-time steps 1 and 2.

[0057] In this embodiment, a dual-scale LSTM network is used for time-by-time rolling correction. The input features for the two time scales are: (18) In the formula, Input features for the short-term correction sub-model Input features for the mid-time correction sub-model; This represents the average of the parameters within the hour preceding this time step.

[0058] In this formula (18), the input feature sequence includes Due to the short time scale t The time step is 5 minutes, which is suitable for medium time scales. t The time step is 1 hour; therefore, t -1 means 5 minutes ago. t -2 represents data from 10 minutes ago. In this embodiment, data from the previous 5 minutes and 10 minutes are sufficient to determine the current direction and acceleration of the fluctuation. Therefore... The LSTM model needs to explicitly define whether the power fluctuations caused by interference accelerate or slow down. Therefore, t -3 means 3 hours ago. t -6 represents 6 hours ago. In this embodiment, by utilizing the system deviations from 3 hours and 6 hours ago, we can avoid minute-level noise and clearly see the systematic drift trend within a half-day period. By comparing the errors from 3 hours ago and 6 hours ago, the LSTM model can determine that the system bias is continuously worsening.

[0059] Therefore, it can be understood as ,in, This refers to the function corresponding to the LSTM model. The training process of the dual-scale LSTM network is well-known to those skilled in the art and will not be described in detail here.

[0060] Therefore, the learning objective of a dual-scale LSTM network is not to directly output the power value, but to output the error correction amount at the current time step. and This is then superimposed with the output of the physical trend layer to form the corrected equivalent power.

[0061] Step S23: An adaptive dual-weighting mechanism is used to fuse the two types of corrections, with the weights driven by local error statistics.

[0062] In the formula, These are the standard deviations of errors within the minute window and the hour window, respectively. and The upper bound of experience, This is a scaling factor. In this embodiment, preferably, The value ranges from 0.5 to 2.0, and is tuned using a validation set with the goal of minimizing the root mean square error. and We take three times the standard deviation of the error within the minute window and hour window of the training set, respectively, as the empirical upper bound.

[0063] Step S24: Finally, the distributed power output after dual-scale error correction is:

[0064] In the formula, and The dimensionless adaptive weights are calculated from the ratio of the standard deviations of the errors. and All are power residual corrections obtained after training the LSTM model, in units of 1 / 2 Ω. Consistent. Therefore, and It is still a power quantity, and when added to the output of the physical trend layer, it satisfies the consistency of dimensions.

[0065] The motivation for building this fusion model is that the physical trend layer is responsible for providing interpretable baseline output, short-time LSTM predicts minute-level random fluctuations, and medium-time LSTM predicts hour-level system deviations; the adaptive weights adjust the contribution of the two types of corrections according to the strength of local error fluctuations, avoiding over-correction when the error is unstable at a certain time scale, and at the same time providing a clear signal interface for the long-term optimization of step S3 and the extreme constraints of step S4.

[0066] Step S3: Design a slow-varying parameter self-update mechanism based on deep reinforcement learning to achieve adaptive equivalence without long-term accuracy degradation, forming a slow-varying parameter correction layer; Specifically, for S3, a slow-varying parameter self-update mechanism based on deep reinforcement learning is designed to achieve adaptive equivalence without long-term accuracy degradation: To address long-term, slowly changing factors such as equipment aging and parameter drift, this embodiment employs Proximal Policy Optimization (PPO) from deep reinforcement learning algorithms to dynamically update key slowly changing parameters and avoid model accuracy degradation.

[0067] MDP modeling process: The parameter update problem is transformed into a Markov decision process. In each update cycle, the agent observes the current operating conditions and equipment status, selects parameter adjustment actions, so that the power error of the updated model is minimized in the subsequent period of time, while keeping the parameter changes smooth, physically interpretable and not violating the boundary constraints.

[0068] In this embodiment, the state space of deep reinforcement learning can be represented as:

[0069] The model error expression is:

[0070] In the formula, SOH (t) represents the health status of the equipment (which can be obtained from a comprehensive online assessment of components / inverters / wind turbines); This is the set of slowly changing parameters to be updated. e ( t The current model error is represented by ). The state is summarized within a slowly changing update cycle (e.g., expressed as daily averages and intraday statistics) to ensure time consistency in decision-making; For the training dataset, The measured output force in formula (17) is .

[0071] The action space of deep reinforcement learning contains only a small number of parameter increments that have the most direct impact on power and have clear physical meaning, avoiding excessive parameters that lead to unrecognizable and redundant parameters. It directly sets the slowly varying parameters that need to be considered as the action space. Scale attribution explanation: These respectively reflect the photovoltaic temperature sensitivity and efficiency baseline. As shown in formulas (3) and (9), it represents the photovoltaic temperature coefficient. This is reflected in formulas (4) and (10), which represent the photovoltaic inverter efficiency; The drift coefficient reflects the effective cut-in threshold of the wind turbine; The reduction in the equivalent usable power of the wind turbine is reflected in formulas (6) and (13), respectively. This is the wind speed reference drift coefficient; These four quantities—wind turbine degradation coefficient, wind ... For example, if the temperature coefficient is too high, the model may underestimate the output force and calculate the motion space. For example, if the temperature coefficient is lowered by 0.0005, after the action is executed, the parameters in the physical model are updated, and the system enters the state of the next moment. ,Right now .

[0072] The reward function prioritizes power accuracy while penalizing motion amplitude to ensure that slowly varying parameters change smoothly within the update cycle. In the formula, the first term directly minimizes the mean square error; the second term suppresses drastic adjustments and prevents aging-related parameters from changing frequently within a day; the third term improves cross-operating condition adaptability, so that the relative error under different output levels is also constrained. Rated power, β , ρ The weighting coefficients are determined by parameter tuning of the validation set.

[0073] The training process includes: Step 1, Initialization: Randomly initialize the parameters of the policy network (Actor) and value network (Critic) of the PPO; Step 2, Gathering Experience: The agent operates based on the current policy in a simulation or historical data environment, adjusting each step according to the state. Select Action Update the physical model parameters to obtain new errors. And calculate the reward This forms a trajectory of state-action-reward; Step 3: Calculate the advantage: Use methods such as Value Network Critic and Generalized Advantage Estimation (GAE) to evaluate the performance of each action compared to the average level; Step 4, Policy Update (the core of PPO): The agent updates the parameters of the policy network (Actor) by optimizing a pruning objective function. This objective function, while pursuing higher rewards, limits the difference between the new and old policies, ensuring a stable learning process. The core update formula can be summarized as follows: ; in, It is the probability ratio of the new strategy to the old strategy. This involves pruning hyperparameters. This update is performed iteratively using gradient ascent, such as with the Adam optimizer.

[0074] Step 5, Iteration and Deployment: Repeat steps 2-4 until the model error converges. After training, it can be deployed in the actual power grid: the agent periodically adjusts its state according to the latest data. Calculate the optimal action The updated slowly varying parameters are then substituted into the formula (26) of the physical trend layer in step S1 and the error correction layer in step S2 to achieve adaptive updating of the model.

[0075] Therefore, when using this layer of optimization, the optimal action is obtained through near-end strategy optimization. Next, the optimal action is used as the update value of the slowly varying parameters. Then, the updated slowly varying parameters are substituted into the physical trend layer and the dual-scale error correction layer to obtain the output of the distributed power source after slowly varying calibration. That is, the output after calibration in step S3 is equal to the output of the physical trend and dual-scale residual correction after being corrected by the slowly varying parameters. This output can be expressed as:

[0076] In the formula, The explanation has already been given in formula (7). This is the capacity weighting coefficient. The meteorological feature input vector, These respectively reflect the photovoltaic temperature sensitivity and efficiency baseline. These are the environmental impact function, the equipment basic characteristic function, and the efficiency function, respectively. and The dimensionless adaptive weights are calculated from the ratio of the standard deviations of the errors. and All of these are power residual corrections obtained after training the LSTM model.

[0077] In this formula, Part of it is the physical trend layer corresponding to the slowly changing parameters after step S3 update. The data is the LSTM output after step S2 and the data after adaptive weight fusion.

[0078] Under normal operating conditions, formula (26) yields the final output. However, under extreme operating conditions, step S4 of this embodiment determines whether to enable robust adjustment through a comprehensive risk index, and introduces three types of adaptive adjustment coefficients for risk constraints when necessary, forming a complete four-layer architecture final output.

[0079] Step S4: Construct a probability-weighted scene recognition and working condition adaptive adjustment mechanism to achieve robust correction under extreme scenarios and form an extreme working condition robust layer.

[0080] Specifically, this includes: Step S41: Defining the set of operating conditions and extracting real-time feature vectors. A set of operating conditions is defined, including six typical conditions: normal, strong cloud cover / rapid obstruction, strong gusts, high temperature heat wave, low temperature icing, and heavy rain / typhoon. To ensure project deployability, only online-accessible features are used for operating condition identification, including fluctuation coefficient, irradiance variation rate, wind speed variation rate, ambient temperature, temperature abrupt change, and meteorological / equipment alarm markers, to construct a real-time feature vector.

[0081] Step S42: Use rule-based thresholds for coarse screening to generate a set of candidate extreme working conditions. Typical screening rules are used to coarsely screen extreme conditions: strong cloud formations are identified based on whether the rate of change in irradiance exceeds a threshold; strong gusts and typhoons are identified based on whether the rate of change in wind speed exceeds a threshold; heat waves are identified based on whether the temperature exceeds a high-temperature threshold; and low-temperature icing is identified based on whether the temperature is below an icing threshold and an alarm marker is present. This process filters out the set of all possible extreme conditions that could be triggered at the current moment.

[0082] Step S43: Softmax probability calculation, output probability distribution for each scene. A lightweight Softmax classifier is used for the candidate extreme working condition set. The real-time feature vector is used as input, and the score of each scenario is calculated by a lightweight fully connected neural network and then normalized to output the probability of occurrence of each candidate extreme working condition. The update frequency is 10 minutes.

[0083] Step S44: Calculate the comprehensive risk index to achieve adaptive model selection. Calculate the comprehensive risk index, which is the sum of the probabilities of all abnormal operating conditions. If the comprehensive risk index is lower than or equal to the preset risk threshold, it is judged as low risk, and the basic model is activated (only the first three layers are activated, and extreme condition handling is not activated); if the comprehensive risk index is higher than the risk threshold, it is judged as high risk, the complete four-layer model is activated, and the extreme condition robust layer is activated.

[0084] Step S45: Introduce adaptive adjustment coefficients for three types of operating conditions, and output the hierarchical adjustment model. When high-risk conditions are triggered, three types of adaptive adjustment coefficients are introduced, each acting at a different level: a robust reduction coefficient for the trend term acts on the physical trend term to address systemic overestimation risks caused by icing, typhoons, etc.; a short-term correction enhancement coefficient acts on the minute-level residual correction term to enhance short-term fluctuation compensation under conditions of strong cloud formations and strong gusts; and a medium-term correction enhancement coefficient acts on the hour-level residual correction term to enhance medium-term deviation compensation under conditions such as persistent heat waves. The empirical coefficients for each extreme scenario are identified from historical data through least-squares regression. During real-time operation, the empirical coefficients for each scenario are weighted and averaged using the current scenario probability to obtain the comprehensive adjustment coefficient.

[0085] Step S46: Output the final robust equivalent model Based on the risk assessment results, the final robust equivalent model is output: for low risk, the results of the first three layers are directly output; for high risk, the physical trend term is multiplied by the trend term robust reduction factor for overall discounting, and the minute-level residual correction term and the mid-time residual correction term are multiplied by their corresponding enhancement factors and then superimposed for output, achieving robust correction under extreme conditions. This model adaptively selects model combinations of different complexities according to different operating conditions, ensuring both accuracy and computational efficiency.

[0086] Specifically, in this embodiment, for S4, a probability-weighted scene recognition and working condition adaptive adjustment coefficient mechanism is constructed to achieve robust correction under extreme working conditions: By introducing a working condition identification and adaptive adjustment coefficient mechanism, the robustness of the model under extreme scenarios is improved. Define the set of working conditions C This includes normal and typical extreme scenarios: Normal (N), Strong Cloud Change / Rapid Occlusion (CV), Strong Gusts (GU), High Temperature Heatwave (HT), Low Temperature Icing (IC), and Heavy Rain / Typhoon (TY). To ensure deployability, condition identification uses only available features: fluctuation coefficients. λ Irradiation variation rate Wind speed change rate ,temperature T and temperature change Δ T It can also integrate weather warnings or maintenance alarm tags. Finally, based on feature vectors... z ( t The scene probability distribution is obtained by using a rule-based thresholding method combined with probabilistic output. : In the formula, This is an alarm flag used to indicate whether there are external warnings or equipment alarms related to extreme operating conditions; its value can be a binary variable of 0 or 1. =1 indicates the presence of a weather warning, maintenance alarm, or equipment malfunction alarm. =0 indicates that no relevant alarms were received.

[0087] First, use typical screening rules to filter the set of candidate extreme working conditions: in, To ensure that the Softmax denominator is not empty, and to include at least the normal operating condition N and at least one candidate extreme scenario, the selection function for each operating condition is as follows: for: In the formula, This is a function that indicates whether the threshold condition is met; it is an indicator function. If the condition is true, it is 1, and if the condition is false, it is 0. The threshold for the rate of change of irradiance; The threshold for the rate of change of wind speed in strong gusts; The threshold for excessively high ambient temperature; This is the icing temperature threshold. The threshold for the rate of change of typhoon wind speed; For candidate set A lightweight Softmax classifier is used to output the scene probability distribution, with an update frequency of 10 minutes.

[0088]

[0089] In the formula, A basic fully connected neural network is used to output the probability of each scene; this probability is then normalized. .

[0090] Under normal operating conditions, a basic model combination is used; under extreme operating conditions, a complete four-layer architecture is activated, with the adaptive coefficients and model complexity dynamically adjusted by scenario probability. A comprehensive risk index is defined to determine the model combination mode:

[0091] It means the sum of probabilities of all operating conditions other than the normal operating condition. The model selection strategy can be written as: In the formula, The base model is activated when the risk threshold is low. That is, it does not include extreme working conditions, but only includes the first three layers: physical trend layer, short and medium-term error correction layer, and slow-varying parameter correction layer; when there is high risk, an extreme working condition robust layer is added to complete the model. The method for determining the threshold is as follows: based on historical validation set data, with the goal of maximizing the improvement rate of model accuracy under extreme working conditions, the optimal threshold is selected through grid search, and the value range is usually 0.3 to 0.7.

[0092] Three types of adaptive adjustment coefficients are introduced: ① Robust reduction coefficient for trend term ① Used to cover systemic overestimation risks caused by icing, typhoons, etc.; ② Short-term coefficient Used to enhance minute-level corrections under strong cloud cover / strong gusts; ③ Medium-time coefficient This is used to enhance hourly-level corrections under conditions such as sustained heat waves. The expressions for the adaptive adjustment coefficients for the three operating conditions are as follows: In the formula, Representing a scene The robust reduction factor of the downtrend term is a conservative reduction measure taken to avoid overestimating the possibility of a certain type of risky working condition. For the scene The adjustment factor for short-time residual correction; For the scene Adjustment coefficient for residual correction in the medium to long term.

[0093] In this embodiment, when the probability of a certain scenario... When it is below 0.05, it can be removed from... Low-probability scenarios are excluded to avoid excessive influence of the adjustment coefficient.

[0094] Various scenarios and For historical experience values, least squares regression should be performed using historical datasets from the relevant scenario.

[0095] In the formula, For the scene c Historical data below; This is the sampling time set of the training set. In this embodiment, the least squares method is used to identify parameters with the objective of minimizing the sum of squared residuals, ultimately obtaining... and These two values, that is, finding an optimal set of values. This minimizes the difference between the predicted output and the historical actual output. When the current scenario is identified... c At that time, directly take out the formula (37) to calculate. The value was obtained by calculation using (35) and (36). and Finally, the formula (38) is used to calculate the final real-time output.

[0096] Combining the model selection rule expressed in equation (34), the final robust equivalent model expression is obtained as follows: The robust equivalent model set covers the above four-layer architecture and determines different combination forms according to actual working conditions; for two different application scenarios, normal working conditions and extreme working conditions, different combinations of models with different complexities can be selected to achieve a balance between accuracy and efficiency.

[0097] To verify the technical effectiveness of this invention, a simulation example of distributed power generation in a city park microgrid with a total installed capacity of 10MW (6MW photovoltaic and 4MW wind power) was constructed. The simulation step size was 5 minutes, with a total of 8640 sampling points. The first 20 days were used as the training set, and the last 10 days were used as the validation set. The four-layer model was stacked sequentially and named as M1 (single physical trend layer), M2 (physical trend layer + short-to-medium-term error correction layer), M3 (with a slowly changing parameter self-updating layer), and M4 (complete four-layer model, with adaptive switching between M3 and M4). The mean absolute error (MAE) of the complete model was 0.090MW, and the root mean square error (RMSE) was 0.162MW. In comparison, M1 had an MAE of 0.318MW and an RMSE of 0.720MW, and M2 had an MAE of 0.182MW and an RMSE of 0.423MW. The complete model reduces MAE by 71.7% and RMSE by 77.5% compared to M1, and reduces MAE by 50.5% and RMSE by 61.7% compared to M2, showing a significant improvement in accuracy.

[0098] The simulation scenarios include normal operation and extreme conditions such as icing / typhoon. Normal operation includes rapid changes in cloud cover and gusts, reflected in actual irradiance and wind speed. The icing / typhoon extreme conditions are set at the end of the validation set; low-temperature conditions simulate the decrease in available power output caused by icing, and typhoon gusts simulate rapid wind speed increases and power generation constraints. The proposed model's power curve validation is shown below. Figure 2As shown. The four-layer model of this application is stacked sequentially and named M1, M2, M3 and M4, namely a single physical trend layer (M1), a physical trend layer combined with a short-to-medium-term error correction layer (M2), and the proposed complete model (M3 and M4 adaptively switch). The error comparison between M1, M2, the complete model and the actual power is as follows: Figure 3 As shown.

[0099] like Figure 2 As shown, the background area represents the window where icing and typhoon overlap. It can be seen that under extreme operating conditions, the actual power exhibits a significant decrease and fluctuation, and the proposed equivalent modeling results can follow this trend without long-term deviation from the actual power. This result demonstrates that, after extreme operating conditions are triggered, this invention, through historical residual causal correction and risk constraints, enables the equivalent model to adapt to power changes under abnormal operating conditions such as icing and typhoons.

[0100] like Figure 3 As shown, the model error was calculated using the full validation set, and the M1, M2, and full models were compared. The absolute error of the full model was 0.090 MW, and the root mean square error was 0.162 MW; the absolute error of M1 was 0.318 MW, and the root mean square error was 0.720 MW; the absolute error of M2 was 0.182 MW, and the root mean square error was 0.423 MW. Therefore, compared to M1 which only uses physical trends and M2 which incorporates dual-scale residual correction, the full model in this embodiment has a lower mean absolute error and root mean square error on the full validation set.

[0101] In summary, simulation results show that the method described in this invention can maintain high fitting accuracy using a slowly varying parameter self-updating model under non-extreme operating conditions, and adaptively switch to a robust correction model under extreme operating conditions such as icing / typhoon, thereby improving the accuracy and operability of distributed power source equivalent modeling in complex operating scenarios.

[0102] Based on S1, S2, S3, and S4, the model training and dynamic update process is as follows: (1) Offline training phase. Historical data from multiple seasons, operating conditions, and SOH levels were collected to construct training and validation sets. The training process was as follows: ① Training the basic parameters of the physical trend layer; ② Training the LSTM dual-scale residual correction sub-model; ③ Constructing the MDP environment to train the PPO policy network; ④ Training the scene recognition model and the operating condition adaptive adjustment coefficient table; ⑤ Adapting the weight coefficients and operating condition adaptive adjustment coefficients through least squares regression using the latest dataset.

[0103] (2) Online inference and update stage. ① Real-time collection and preprocessing of feature data; ② Scene recognition module outputs scene probability distribution; ③ Model adaptation module selects the corresponding model combination and outputs the equivalent power in combination with the current slow-varying parameters; ④ Calculate the model error and error statistics; ⑤ Execute PPO parameter update on a daily / weekly or event-triggered mechanism to update the slow-varying parameter set.

[0104] (3) Training constraints. Time series cross-validation is used to ensure that the test set time period is later than the training set. The weights and working condition adjustment coefficients only use historical window statistical data to avoid future information leakage and ensure causal consistency between training and inference.

[0105] Through the foregoing detailed description of the general accurate equivalent modeling method for distributed power sources in large urban power grid microgrids, those skilled in the art will clearly understand that this application provides a general accurate equivalent modeling platform for distributed power sources in large urban power grid microgrids. Therefore, for the sake of brevity, further details are omitted here. Regarding the platform disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant details can be found in the method section.

[0106] On the other hand, this embodiment also provides a distributed power generation model construction system based on a large-scale urban power grid microgrid, including: A general model construction module is used to construct a regional trend output general model of distributed power sources based on the large-scale access of distributed photovoltaic power sources and distributed wind power sources in urban power grids and park microgrids, and on multi-dimensional standardized features of meteorological characteristics, equipment status characteristics, and operating condition characteristics; the multi-dimensional standardized features include slowly varying parameters that reflect the temperature sensitivity and efficiency baseline of photovoltaic power sources. The dual-scale error correction module is used to determine minute-level short-time random errors and hour-level medium-time system deviations using a dual-scale error decomposition mechanism, and to obtain a distributed power output model corrected by dual-scale error based on the regional trend power output general model. The slow-varying parameter adaptive update module is used to optimize and obtain the best action using a proximal strategy, then use the best action as the updated value of the slow-varying parameter, and substitute the updated slow-varying parameter into the regional trend output general model and the distributed power output model corrected by dual-scale error, so as to realize the adaptive update of the model. The extreme working condition scene identification module is used to define a set of working conditions based on normal scenes and typical extreme scenes, and to filter the candidate extreme working condition set using typical screening rules. The module then uses a lightweight Softmax classifier to output the scene probability distribution for the candidate extreme working condition set, thereby constructing a comprehensive risk index. The robust equivalent model output module is used to introduce three types of adaptive adjustment coefficients for different operating conditions, including the trend term robust reduction coefficient, short-time coefficient, and medium-time coefficient. Combined with the adaptively updated distributed power output model, the final robust equivalent model is obtained.

[0107] Through the foregoing detailed description of the general accurate equivalent modeling method for distributed power sources in large urban power grid microgrids, those skilled in the art can clearly understand that this application provides a general accurate equivalent modeling system for distributed power sources in large urban power grid microgrids. Therefore, for the sake of brevity, it will not be described in detail here.

[0108] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0109] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.

[0110] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0111] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.

Claims

1. A method for constructing a distributed power generation model based on a large-scale urban power grid microgrid, characterized in that, include: Based on the multi-point cluster access of distributed photovoltaic power sources and distributed wind power sources in urban power grids and park microgrids, a regional trend output general model of distributed power sources is constructed based on multi-dimensional standardized features of meteorological characteristics, equipment status characteristics, and operating condition characteristics. The multi-dimensional standardized features include slowly varying parameters that reflect the temperature sensitivity and efficiency baseline of photovoltaic power sources. A dual-scale error decomposition mechanism is adopted to decompose the model error into short-time random error and medium-time system deviation. The short-time random error and medium-time system deviation obtained by the decomposition are used to correct the regional trend power output general model, resulting in a distributed power output model corrected by dual-scale error. The optimal action is obtained by using a near-end policy optimization method based on reinforcement learning. The optimal action is used as the update amount of the slowly varying parameters. The updated slowly varying parameters are then substituted into the general regional trend power output model to update the general regional trend power output model. Based on the updated general regional trend power output model and the distributed power output model corrected by dual-scale error, the distributed power output model after slowly varying parameter calibration is obtained. A comprehensive risk index is constructed, and the risk level of the current operating condition is determined based on the comprehensive risk index. When the risk level is determined to be low, the distributed power generation output model calibrated with slow-varying parameters is directly output. The distributed power generation output model calibrated with slow-varying parameters is used for power grid planning simulation, scheduling verification, and operation evaluation.

2. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 1, characterized in that, The process of constructing the comprehensive risk index includes: The set of working conditions is defined based on normal scenarios and typical extreme scenarios, and a set of candidate extreme working conditions is selected using typical screening rules. A classifier is used to output the scenario probability distribution of the candidate extreme working conditions set, thereby obtaining a comprehensive risk index.

3. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 2, characterized in that, The process of using a classifier to output the scenario probability distribution of the candidate extreme working condition set, and then constructing a comprehensive risk index, includes: Define a set of operating conditions, including six typical operating conditions: normal, strong cloud change or rapid shading, strong gusts, high temperature heat wave, low temperature icing, and rainstorm / typhoon; use online-accessible features to identify operating conditions, including fluctuation coefficient, irradiance change rate, wind speed change rate, ambient temperature, temperature change, and meteorological / equipment alarm markers, and construct a real-time feature vector. Typical screening rules are used to coarsely screen extreme working conditions. Specifically, strong cloud changes are judged based on whether the rate of change of irradiance exceeds the threshold, strong gusts and typhoons are judged based on whether the rate of change of wind speed exceeds the threshold, high temperature heat waves are judged based on whether the temperature exceeds the high temperature threshold, and low temperature icing is judged based on whether the temperature is lower than the icing threshold and there is an alarm mark. In this way, all possible candidate extreme working conditions that may be triggered at the current moment are screened out. Calculate the comprehensive risk index, which is the sum of the probabilities of all abnormal operating conditions. If the comprehensive risk index is lower than or equal to the preset risk threshold, it is judged as low risk; if the comprehensive risk index is higher than the risk threshold, it is judged as high risk.

4. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 2, characterized in that, The method further includes: when the current operating condition is judged to be high-risk based on the comprehensive risk index, introducing a trend term robust reduction coefficient, a short-term coefficient, and a medium-term coefficient to adjust the adaptively updated distributed power output model to obtain the final robust equivalent model.

5. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 3, characterized in that, The regional trend output general model for distributed power sources, constructed based on multi-dimensional standardized features including meteorological characteristics, equipment status characteristics, and operating condition characteristics, includes: Construct a photovoltaic distributed power generation output model, with the environmental impact function expressed as: The basic characteristic function of the equipment is expressed as follows: The efficiency function is expressed as: ;in, P stc The rated output power of a photovoltaic array or photovoltaic sub-cluster under standard test conditions; for t Solar irradiance at any given time; G stc For irradiation intensity, Let t be the component temperature or equivalent temperature of the distributed power source at time t; T stc Rated temperature Photovoltaic temperature coefficient; For inverter efficiency; Construct a distributed wind power generation output model, with the environmental impact function expressed as: ; The basic characteristic function of the equipment is expressed as follows: ; The efficiency function is expressed as: ; In the formula, This is the wind speed reference drift coefficient; This is the fan degradation coefficient; ; In the formula, For piecewise functions: when v < v in or v ≥ v out The output is 0 when... v in ≤ v < v r It increases proportionally to the volume; when v r ≤ v < v out The output is at rated power. For information from meteorological observations or cabin conditions t Wind speed at any moment To cut into wind speed, For rated wind speed, To cut off the wind speed; A general model for distributed generation is constructed based on the output models of photovoltaic distributed generation and wind distributed generation, and is expressed as follows: In the formula, This is the capacity weighting coefficient, determined based on the installed capacity ratio of the distributed power supply cluster. The meteorological feature input vector; These are the basic equipment parameters for photovoltaic distributed power sources or wind power distributed power sources. These are the basic efficiency parameters for photovoltaic distributed power sources or wind power distributed power sources. These are the environmental impact function, the equipment basic characteristic function, and the efficiency function, respectively.

6. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 5, characterized in that, The dual-scale error decomposition mechanism decomposes the model error into short-time random error and medium-time systematic bias, including: The overall residual is calculated based on the historical measured power output and the output of the general model of distributed power sources: ; in, Contribute to historical measurements This is the output of the general model of the distributed power source; The total residual is decomposed into short-time random errors on a time scale. Deviation from hourly time system ,in, Used to characterize low-frequency system bias within an hourly window Used to characterize minute-level rapid fluctuation residuals after subtracting mid-time bias; Two LSTM network models are set up, denoted as the short-time correction sub-model and the medium-time correction sub-model, respectively. The short-time correction sub-model utilizes the input feature parameters. The short-term error correction prediction short-term error before 1 and 2 short time steps is used as input, and the mid-time correction sub-model uses hourly mean parameters. The predicted time error at the first and second time steps is used as input; the error is corrected sequentially over time, and the final output is the error correction amount at the current time. and .

7. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 6, characterized in that, The obtained distributed power output model after dual-scale error correction includes: An adaptive dual-weighting mechanism is used to fuse two types of corrections, with the weights driven by local error statistics: ; In the formula, These are the standard deviations of errors within the minute window and the hour window, respectively. and The upper bound of experience, The scaling factor is used; finally, the distributed power output after dual-scale error correction is: .

8. The method for constructing a general and accurate model of distributed power generation in a large-scale urban power grid microgrid according to claim 6, characterized in that, The input feature parameters and hourly average parameters , represented as: ; In the formula, Input features for the short-term correction sub-model Input features for the mid-time correction sub-model; for t At any given time, solar irradiance for t The component temperature or equivalent temperature of the distributed power source at all times. for t Wind speed at any moment This represents the average value of the corresponding parameter within the hour preceding this time step.

9. The method for constructing a general and accurate model of distributed power generation in a large-scale urban power grid microgrid according to claim 8, characterized in that, The step of using a reinforcement learning-based proximal policy optimization method to obtain the optimal action, and using the optimal action as the update amount for the slowly varying parameters, includes: The slowly varying parameters that need to be considered are set as the action space, expressed as: ; in, These respectively reflect the photovoltaic temperature sensitivity and efficiency baseline. Let be the photovoltaic temperature coefficient at time t. This indicates the efficiency of the photovoltaic inverter. This is the wind speed reference drift coefficient; This represents the fan degradation coefficient.

10. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 5, characterized in that, The update process of the general model for regional trend output includes: Randomly initialize the parameters of the agent's policy network (Actor) and value network (Critic); The agent operates based on the current policy, in a simulation or historical data environment, and each step depends on the state. Select Action The physical model parameters are updated, the action corresponding to the adjustment amount of the slowly varying parameters. This adjustment amount is applied to the physical model parameters in the general regional trend output model to update the general regional trend output model. A new error is calculated based on the output of the updated general regional trend output model and the measured output. And calculate the reward This forms a trajectory of state, action, and reward; Using value network Critic and generalized advantage estimation methods, we evaluate the performance of each action relative to the average level. The agent updates the parameters of the policy network Actor by optimizing a pruning objective function. The objective function pursues higher rewards while limiting the difference between the new and old policies to ensure the stability of the learning process. Repeat the above steps until the model error converges; After training, the agent periodically calculates the optimal action based on the latest state, and uses the parameter adjustment amount corresponding to the optimal action as the update amount of the slowly varying parameters, which is then substituted into the general regional trend output model to update the general regional trend output model. Based on the updated general regional trend output model and the distributed power output model corrected by dual-scale error, the distributed power output model after slowly varying parameters is obtained, realizing the adaptive update of the model.

11. The method for constructing a distributed power generation model based on a large-scale urban power grid microgrid according to claim 10, characterized in that, The process of obtaining the final robust equivalent model includes: When a high-risk event is triggered, three types of adaptive adjustment coefficients are introduced, corresponding to different levels of the distributed power generation model calibrated with slowly varying parameters: The robust reduction factor of the trend term is applied to the physical trend term to address the systemic overestimation risk caused by icing, typhoons, etc. The short-term correction enhancement coefficient is applied to the minute-level residual correction term to enhance short-term fluctuation compensation under strong cloud changes and strong gusts. The mid-time correction enhancement factor is applied to the hour-level residual correction term to enhance mid-time deviation compensation under conditions such as continuous heat waves. The empirical coefficients for each extreme scenario are identified from historical data through least squares regression. During real-time operation, the empirical coefficients for each scenario are weighted and averaged using the current scenario probability to obtain the comprehensive adjustment coefficient. Based on the risk assessment results, the final robust equivalent model is output: for low risk, the results of the first three layers are directly output; for high risk, the physical trend term is multiplied by the robust reduction factor of the trend term for overall discounting, and the minute-level residual correction term and the medium-time residual correction term are multiplied by the corresponding enhancement factor and then superimposed for output to achieve robust correction under extreme conditions.

12. A construction system based on the distributed power generation model construction method for large-scale urban power grid microgrids as described in any one of claims 1-11, characterized in that, include: A general model construction module is used to construct a regional trend output general model of distributed power sources based on multi-dimensional standardized features of meteorological characteristics, equipment status characteristics, and operating condition characteristics, according to the multi-point cluster access of distributed photovoltaic power sources and distributed wind power sources in urban power grids and park microgrids. The multi-dimensional standardized features include slowly varying parameters that reflect the temperature sensitivity and efficiency baseline of photovoltaic power sources. The dual-scale error correction module is used to decompose the model error into short-time random error and medium-time system deviation using a dual-scale error decomposition mechanism, and to add the decomposed short-time random error and medium-time system deviation as residual corrections to the output of the regional trend output general model, thereby obtaining a distributed power output model with dual-scale error correction. The slowly varying parameter adaptive update module is used to obtain the best action using a proximal policy optimization method based on reinforcement learning, use the best action as the update amount of the slowly varying parameters, and substitute the updated slowly varying parameters into the regional trend output general model to update the regional trend output general model; based on the updated regional trend output general model and the distributed power output model corrected by dual-scale error, a distributed power output model calibrated by the slowly varying parameters is obtained. The robust equivalent model output module is used to construct a comprehensive risk index and determine the risk level of the current operating condition based on the comprehensive risk index. When the risk level is determined to be low, the distributed power generation output model calibrated with slow-varying parameters is directly output. The distributed power generation output model calibrated with slow-varying parameters is used for power grid planning simulation, scheduling verification, and operation evaluation.

13. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the distributed power generation model construction method based on a large urban power grid microgrid as described in any one of claims 1 to 11.

14. An electronic device, characterized in that, The device includes a processor and a memory, the processor being electrically connected to the memory, the memory being used to store instructions and data, and the processor being used to execute the steps of the distributed power generation model construction method based on a large urban power grid microgrid as described in any one of claims 1 to 11.