Micro-grid energy management optimization prediction method

By constructing a multi-source data acquisition network and a physical augmentation prediction model, and combining digital twin technology to simulate extreme scenarios, the problem of incomplete prediction characteristics of microgrids has been solved, achieving high-precision prediction of photovoltaic output and load demand, and ensuring the supply and demand balance and equipment safety of microgrids.

CN122000867APending Publication Date: 2026-05-08SUZHOU EPOWER CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU EPOWER CORP LTD
Filing Date
2025-12-31
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies rely on a single data source for microgrid forecasting, resulting in incomplete forecast features and an inability to fully integrate multi-source information from meteorology, environment, and equipment operation. Furthermore, conventional forecasting models ignore physical operating conditions such as dust accumulation on photovoltaic modules and temperature, leading to systematic biases in the forecast results.

Method used

A data acquisition network is constructed to synchronously collect multi-source data. Multi-source feature vectors are generated through an edge computing gateway. A physical enhancement prediction model is built, embedding the dust accumulation impact index and temperature coefficient correction factor. A digital twin extreme scenario simulation unit is used to simulate the energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, generate and correct the initial scheduling strategy, and finally optimize the model and scenario library parameters through a parameter update unit.

Benefits of technology

It enables high-precision prediction of photovoltaic power output and load demand, reflects the real impact of physical conditions, prevents systematic deviations, ensures supply and demand balance and equipment safety, and improves the economy and safety of microgrid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000867A_ABST
    Figure CN122000867A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of micro-grid management optimization prediction, and discloses a micro-grid energy management optimization prediction method, which comprises the following steps: constructing a data acquisition network, synchronously acquiring basic meteorological data, enhanced meteorological data and micro-grid equipment operation data, and fusing through an edge computing gateway to generate a multi-source feature vector; and building a physical enhanced prediction model, taking Transform as a core, embedding an ash deposition influence index and a temperature coefficient correction factor, carrying out interval prediction on the photovoltaic output and load demand of the micro-grid, and outputting a confidence interval result. Basic meteorology is introduced into the prediction model, multi-source fusion of meteorology and micro-grid equipment operation data is enhanced, and high-precision prediction of photovoltaic output and load demand is realized in combination with Transform time sequence feature extraction capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid management optimization and prediction technology, specifically to a microgrid energy management optimization and prediction method. Background Technology

[0002] Microgrid energy management optimization technology belongs to the field of smart grid and distributed energy management. Its purpose is to optimize the scheduling of various energy sources, load demands, and energy storage systems within the microgrid, under conditions that meet power balance, security constraints, power quality, and reserve capacity requirements. This enables the rational configuration of unit start-up and shutdown, energy storage charging and discharging, and demand response strategies. The technology constructs an optimization model and introduces constraints and optimization objectives, such as operating costs, carbon emissions, and energy storage lifetime. Combined with prediction results, it dynamically controls the microgrid to improve energy utilization efficiency, reduce operating costs, and ensure the safe and reliable operation of the microgrid.

[0003] With the widespread application of distributed renewable energy in microgrids, achieving high-precision forecasting and high-reliability dispatching under complex meteorological conditions, equipment operation fluctuations, and load demand changes has become a key issue in microgrid energy management. Existing technologies mostly rely on a single data source for forecasting, failing to fully integrate multi-source information from meteorology, environment, and equipment operation, resulting in incomplete forecast characteristics. Furthermore, conventional forecasting models are mostly data-driven, ignoring physical operating conditions such as dust accumulation on photovoltaic modules and temperature, making it difficult to reflect the actual operating state and leading to systematic biases in the forecast results. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a microgrid energy management optimization prediction method, which solves the problem that existing technologies rely on a single data source for prediction, resulting in incomplete prediction features.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a microgrid energy management optimization prediction method, comprising the following steps: A data acquisition network is constructed to simultaneously collect basic meteorological data, enhanced meteorological data, and microgrid equipment operation data, and multi-source feature vectors are generated by fusing them through an edge computing gateway. A physical enhancement prediction model was built, with Transformer as the core, and dust accumulation impact index and temperature coefficient correction factor were embedded to make interval predictions on microgrid photovoltaic output and load demand and output confidence interval results. Based on multi-source feature vectors and prediction results, the digital twin extreme scenario pre-simulation unit is invoked to simulate the energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, and generate an initial scheduling strategy. The initial scheduling strategy is modified to generate the final microgrid energy scheduling command and send it to the edge execution device; The system collects feedback data after the execution of scheduling instructions, inputs it into the parameter update unit, automatically calibrates the feature weights of the prediction model, and iteratively optimizes the parameters of the digital twin scenario library.

[0006] Preferably, the construction process of the data acquisition network includes: Sensing terminals are deployed in a distributed manner in the microgrid area to collect basic meteorological data through temperature, humidity, wind speed, and precipitation sensors, enhanced meteorological data through solar radiation sensors and cloud cover collectors, and microgrid equipment operation data through current, voltage, and power sensors. Set up a partition edge acquisition node to receive the first-level data through wired and wireless communication. After deduplication, outlier removal and format standardization preprocessing, structured data is formed.

[0007] Preferably, the multi-source feature vector fusion generation process includes: The edge computing gateway receives basic meteorological data, enhanced meteorological data, and microgrid device operation data from the edge aggregation layer. Using the gateway clock as a reference, timestamp calibration is performed on data from different sources to ensure timing consistency; Outliers were removed using the 3σ principle, and missing data were supplemented using linear interpolation to achieve format standardization. Extract statistical features such as mean and rate of change from meteorological data, and extract power fluctuation and status-coded operation features from equipment data; The extracted multi-dimensional features are subjected to dimensional matching and normalization processing, and combined to form a multi-source feature vector containing meteorological and equipment operation features.

[0008] Preferably, the process of building the physical augmentation prediction model includes: The Transformer model is used as the core to process the time-series characteristics of photovoltaic power output and load demand, and to optimize the model prediction bias. Calculate the dust accumulation impact index and temperature coefficient correction factor, and embed them as additional features into the feature input layer of Transformer for the fusion of physical mechanism and data model; A Bayesian probability optimization method is introduced into the training of the physical augmentation prediction model to fit the prediction error distribution based on historical data and set the confidence level. The system forecasts the photovoltaic output and load demand of microgrids and outputs the corresponding forecast intervals and confidence intervals.

[0009] Preferably, the calculation process for the dust accumulation impact index and the temperature coefficient correction factor includes: Collect real-time monitoring data of dust accumulation thickness on the surface of photovoltaic panels, and determine the current transmittance attenuation coefficient by combining the corresponding relationship table of dust accumulation thickness and transmittance attenuation coefficient calibrated in the laboratory. The dust accumulation impact index is obtained by weighting the attenuation coefficient and the dust accumulation time. Obtain the measured ambient temperature and the rated operating temperature of the photovoltaic modules and load equipment, and calculate the temperature deviation value; Based on the temperature-efficiency correction curve of the equipment at the factory, find the efficiency correction coefficient for the corresponding deviation value; The correction coefficient is normalized to obtain the temperature coefficient correction factor.

[0010] Preferably, the workflow of the digital twin extreme scenario pre-simulation unit includes: Import real-time operating data from the microgrid's physical topology, equipment parameters, and multi-source feature vectors to construct a digital twin that is 1:1 mapped to the physical microgrid; It includes typical extreme operating conditions of microgrids, including extreme weather scenarios, equipment failure scenarios, and load change scenarios, and clarifies the triggering conditions and parameter boundaries for each scenario; Using the prediction results as input, the unit's built-in energy flow calculation model is invoked to simulate the energy storage charging and discharging thresholds and load regulation priorities under different extreme scenarios; By analyzing the simulation results, the energy storage operation threshold and load regulation sequence that meet the supply and demand balance of the microgrid under various extreme scenarios are determined, providing data support for the generation of the initial energy dispatch strategy.

[0011] Preferably, the process for generating the initial energy scheduling strategy includes: The multi-source feature vectors and the photovoltaic output and load demand prediction results are imported into the digital twin extreme scenario pre-simulation unit, and extreme scenarios that match the current operating conditions are selected from the unit scenario library. The digital twin extreme scenario simulation unit simulates the minimum discharge threshold and maximum charging threshold of energy storage under different scenarios based on the current SOC of energy storage and the rated charge and discharge rate of the equipment in the multi-source feature vector, combined with the predicted photovoltaic output surplus and deficit. Based on the load type and predicted load demand change trend in the multi-source feature vectors, and following the principle of prioritizing the supply of important loads, the load adjustment priority is determined by the built-in hierarchical rules of the digital twin extreme scenario pre-simulation unit. By calling the energy flow model built into the digital twin extreme scenario simulation unit, the simulated energy storage charging and discharging thresholds, load adjustment priorities, and predicted photovoltaic output and load demand are combined to calculate the microgrid supply and demand difference under different scenarios and determine whether the balance condition of output ≥ demand and equipment loss is met. Based on the supply and demand balance results, determine the energy storage operation instructions and load adjustment schemes, and combine them to form a preliminary dispatch strategy; The initial strategy is simulated in extreme scenarios by using a digital twin extreme scenario simulation unit. If there are equipment overruns or supply and demand imbalances, the thresholds and priorities are fine-tuned to finally generate the initial energy scheduling strategy.

[0012] Preferably, the modification process of the initial scheduling strategy includes: The multi-source feature vectors and the photovoltaic output and load demand prediction results are used as the basis for strategy correction; Based on the equipment manufacturing standards and microgrid operation specifications, the safe operation boundary of core equipment is determined and the equipment safety constraint threshold is extracted. The energy storage charging and discharging commands, photovoltaic power allocation schemes, and load adjustment plans in the initial scheduling strategy are compared with the aforementioned safety constraint thresholds to determine whether there are any conflicts. By combining the predicted photovoltaic output range and load demand range, the microgrid supply and demand gap after the initial strategy is implemented is calculated to determine whether the balance condition of photovoltaic output plus energy storage discharge ≥ load demand plus equipment operating losses is met. If there is a supply and demand gap or excess surplus, it is marked as an item that needs to be corrected. For safety conflicts, priority should be given to correcting according to the equipment safety threshold. For supply and demand imbalances, if there is a gap, priority should be given to reducing non-core loads. If there is an excess, the energy storage charging command should be adjusted to the SOC safety limit. The revised energy storage operation instructions, photovoltaic power output control scheme, and load regulation plan are integrated to form the final microgrid energy dispatch instructions, which are then sent to edge execution devices via industrial Ethernet.

[0013] Preferably, the workflow of the parameter update unit includes: The microgrid operation data received after the execution of the dispatch command is received is used to extract core related parameters, including actual photovoltaic output, actual load demand, real-time equipment operation parameters and environmental measurement data, to form a dataset for unit processing. The actual values ​​in the dataset are compared with the interval prediction results output by the prediction model to calculate the prediction deviation value. The contribution of the input features of the prediction model to the deviation is analyzed by the SHAP value feature importance algorithm, and high-impact features with contribution values ​​exceeding the preset threshold are marked. Based on the feature contribution calculation results, the gradient descent method is used to adjust the feature weights of the Transformer prediction model in reverse. The device operating parameters and environmental measurement data in the dataset are compared with the preset parameters of the corresponding scenarios in the digital twin scenario library. The parameter deviation rate is calculated, and abnormal scenario parameters with deviation rates exceeding the set threshold are filtered out. For abnormal scenario parameters, the least squares method is used to fit the mapping relationship between the feedback data and the preset parameters in the scenario library, generate parameter correction coefficients, update the corresponding parameters in the scenario library with the correction coefficients, and record new working conditions not covered in the feedback data as new scenarios into the scenario library to supplement the scenario dimensions. The calibrated prediction model feature weights and optimized digital twin scenario library parameters are output to the next round of microgrid prediction and scheduling process. After obtaining the new round of scheduling feedback data, the prediction deviation rate and scenario parameter deviation rate are recalculated. If both types of deviation rates drop to within the set threshold, the current round of work is completed. If the target is not met, the above steps are repeated until the microgrid operation accuracy requirements are met.

[0014] Preferably, a microgrid energy management optimization and prediction system includes: The data acquisition and fusion module constructs a data acquisition network to simultaneously collect basic meteorological data, enhanced meteorological data, and microgrid equipment operation data, and generates multi-source feature vectors through edge computing gateways. The physical enhancement prediction module builds a physical enhancement prediction model with Transformer as the core, embedding the dust accumulation impact index and temperature coefficient correction factor to perform interval prediction of microgrid photovoltaic output and load demand and output confidence interval results. The digital twin pre-simulation and initial strategy generation module, based on multi-source feature vectors and prediction results, calls the digital twin extreme scenario pre-simulation unit to simulate energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, and generates an initial scheduling strategy. The scheduling strategy correction and instruction issuance module corrects the initial scheduling strategy, generates the final microgrid energy scheduling instruction, and issues it to the edge execution device. The parameter closed-loop update module collects feedback data after the execution of scheduling instructions, inputs it into the parameter update unit, and automatically calibrates the feature weights of the prediction model and iteratively optimizes the parameters of the digital twin scenario library.

[0015] This invention provides a method for optimizing and predicting energy management in microgrids. It offers the following advantages:

[0016] 1. This invention achieves high-precision prediction of photovoltaic power output and load demand by introducing multi-source fusion of basic meteorological, enhanced meteorological, and microgrid equipment operation data into the prediction model and combining it with the time series feature extraction capability of Transformer. At the same time, the model embeds the dust accumulation impact index and temperature coefficient correction factor, so that the prediction results can reflect the real impact of physical conditions on energy conversion efficiency and prevent the systematic bias that exists in traditional pure data-driven methods.

[0017] 2. This invention utilizes digital twin technology to construct a virtual model that corresponds one-to-one with the actual microgrid, and imports a scenario library of extreme weather, equipment failure and load change scenarios into it to simulate energy flow under different operating conditions. Through the simulation results, the performance of energy storage charging and discharging thresholds and load adjustment priorities under extreme conditions can be evaluated in advance, avoiding the failure of scheduling strategies due to environmental changes in actual operation.

[0018] 3. After generating the initial scheduling strategy, this invention introduces equipment safety boundaries and operating specifications for multi-dimensional comparison. This can effectively identify and correct potential risks in the scheduling strategy that may lead to overcharging or over-discharging of energy storage, over-allocation of photovoltaic output, or unreasonable load allocation. At the same time, combined with the interval prediction of photovoltaic output and load demand, non-core loads can be prioritized to be reduced for supply and demand gaps, and energy storage charging can be adjusted to the safe upper limit for energy surpluses. This ensures the achievement of the dual goals of supply and demand balance and equipment safety. Through this correction mechanism, losses caused by equipment over-limit operation are avoided, and efficient use of energy is achieved, significantly improving the economy and safety of microgrid operation. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is a schematic diagram of the framework of the present invention. Detailed Implementation

[0020] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Example 1: Please see the appendix Figure 1-2 This invention provides a microgrid energy management optimization prediction method, comprising the following steps: A data acquisition network is constructed to simultaneously collect basic meteorological data, enhanced meteorological data, and microgrid equipment operation data, and multi-source feature vectors are generated by fusing them through an edge computing gateway. A physical enhancement prediction model was built, with Transformer as the core, and dust accumulation impact index and temperature coefficient correction factor were embedded to make interval predictions on microgrid photovoltaic output and load demand and output confidence interval results. Based on multi-source feature vectors and prediction results, the digital twin extreme scenario pre-simulation unit is invoked to simulate the energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, and generate an initial scheduling strategy. The initial scheduling strategy is modified to generate the final microgrid energy scheduling command and send it to the edge execution device; The system collects feedback data after the execution of scheduling instructions, inputs it into the parameter update unit, automatically calibrates the feature weights of the prediction model, and iteratively optimizes the parameters of the digital twin scenario library.

[0022] Furthermore, the construction process of the data acquisition network includes: Sensing terminals are deployed in a distributed manner in the microgrid area to collect basic meteorological data through temperature, humidity, wind speed, and precipitation sensors, enhanced meteorological data through solar radiation sensors and cloud cover collectors, and microgrid equipment operation data through current, voltage, and power sensors. Set up a partition edge acquisition node to receive the first-level data through wired and wireless communication. After deduplication, outlier removal and format standardization preprocessing, structured data is formed.

[0023] Specifically, temperature and humidity sensors, wind speed sensors, and precipitation sensors are deployed along the photovoltaic array to collect basic meteorological data. At the same time, solar radiation sensors and cloud cover collectors are deployed at the center of each photovoltaic array to collect enhanced meteorological data. In addition, current sensors and voltage sensors are connected in series at the output of the photovoltaic inverter, and a power sensor is integrated in the inverter control cabinet to collect real-time operating data of the photovoltaic equipment. Temperature, humidity, and wind speed sensors are deployed on the outside of the energy storage container to collect basic meteorological data. Current and voltage sensors are installed at the input and output of the energy storage converter, respectively. A power sensor is integrated in the energy storage battery cluster management unit to collect equipment operating data such as energy storage charging and discharging current, voltage, power, and individual battery voltage and temperature. The collected data is temporarily stored in the local cache of the sensing terminal to avoid data loss. For sensing terminals ≤100m from the edge node, wired communication is used; for terminals >100m from the edge node or where wiring is difficult, wireless communication is used. Some mobile or temporary monitoring terminals use 4G industrial module communication to ensure full data coverage. Each edge node is equipped with an independent data receiving port, and a unique communication link is established with the sensing terminal in the corresponding partition through port mapping. The node receives the first-level raw data uploaded by the terminal, converts the raw data into digital signals, and temporarily stores it in the node's local database. The terminal ID-collection timestamp is used as a unique identifier. The currently received data is compared with the historical data in the local database within the last 10 seconds. If the unique identifier is the same and the data value difference is ≤0.1%, it is judged as duplicate data and is discarded directly. If the unique identifier is the same but the data value difference is >0.1%, the latest data is retained and marked as data to be verified. Further judgment is made by combining data from adjacent time points. A dual judgment method based on the 3σ principle and industry experience threshold is adopted. Specifically, the mean μ and standard deviation σ of a certain type of data within the past hour are calculated first. If the current data value exceeds the range of [μ-3σ, μ+3σ], it is initially judged as an outlier. Then, a second verification is performed by combining the experience threshold of microgrid operation. If it exceeds the experience threshold, it is confirmed as an outlier and removed. If it does not exceed the experience threshold but exceeds the 3σ range, the mean of the data at three adjacent time points is used to replace the outlier. The preprocessed data of different types are uniformly converted into JSON format, with fields including terminal ID, data type, acquisition timestamp, data value, data unit, and preprocessing status. After preprocessing, structured data is formed and stored in the structured database of the edge acquisition node. The structured data is uploaded to the central control platform once every 5 minutes to provide a standardized data source for subsequent multi-source feature vector fusion. Through the above steps, sensing terminals are deployed in a distributed manner in the microgrid area to achieve full-dimensional coverage of basic meteorological, enhanced meteorological, and equipment operation data collection, solving the problem of incomplete data dimensions. Then, edge collection nodes are set up in the partitions to ensure the integrity of data reception through wired and wireless communication. After deduplication, outlier removal, and format standardization preprocessing, the problems of data time sequence misalignment and abnormal residue are effectively eliminated, forming high-quality structured data. This provides accurate and standardized basic data support for subsequent multi-source feature vector fusion, prediction model training, and scheduling strategy generation.

[0024] Furthermore, the multi-source feature vector fusion generation process includes: The edge computing gateway receives basic meteorological data, enhanced meteorological data, and microgrid device operation data from the edge aggregation layer. Using the gateway clock as a reference, timestamp calibration is performed on data from different sources to ensure timing consistency; Outliers were removed using the 3σ principle, and missing data were supplemented using linear interpolation to achieve format standardization. Extract statistical features such as mean and rate of change from meteorological data, and extract power fluctuation and status-coded operation features from equipment data; The extracted multi-dimensional features are subjected to dimensional matching and normalization processing, and combined to form a multi-source feature vector containing meteorological and equipment operation features.

[0025] Specifically, the edge computing gateway is pre-configured with three data receiving ports, corresponding to the edge aggregation layer nodes of the photovoltaic array area, energy storage system area, and load concentration area, respectively. It uses Modbus-TCP and LoRa protocols to receive data. The gateway classifies and organizes the received raw data according to data type and partition. For example, it puts the photovoltaic array area - basic meteorological data and the energy storage system area - equipment operation data into different data queues. At the same time, it verifies the integrity of the data. Specifically, if a certain type of data is not acquired for two consecutive receiving cycles, a local alarm is triggered and it is marked as a data queue to be supplemented, in preparation for subsequent missing value processing. To address the differences in collection frequencies of data from different sources, calibration is achieved using interpolation alignment and timestamp replacement. Specifically, this includes determining the calibration time granularity, mapping the original timestamp, and replacing and interpolating the timestamp. Determining the calibration time granularity involves unifying the calibrated data time series to 15-minute time slices, based on the input requirements of the subsequent prediction model (Transformer model). Each time slice corresponds to multi-source data within 15 minutes. The original timestamp mapping involves extracting the original collection timestamp of each data point and mapping it to the nearest 15-minute time slice. Timestamp replacement and interpolation involve uniformly replacing the timestamps of all data within the same time slice with the slice start time of the gateway clock. If a certain type of data has only 3 collection points within a time slice, linear interpolation is used to supplement it to 15 data points, ensuring consistent temporal density for all types of data within the same time slice. After calibration, the temporal deviation of multi-source data within the same time slice is ≤1 second, meeting the temporal consistency requirements for subsequent feature extraction. For calibrated single-type data, such as temperature data of the photovoltaic array area within a certain time slice, outliers are removed according to the following steps: Calculate the mean μ and standard deviation σ of this type of data within the current time slice. Set the outlier judgment interval as [μ-3σ, μ+3σ]. If a data point exceeds this interval, it is judged as an outlier and marked. Simultaneously, the mean of the two valid data points before and after the outlier is used to replace it, avoiding data gaps. The calculation steps for the mean μ and standard deviation σ are as follows: When calculating the mean μ, first determine the range of the current time slice, filter valid data of the same dimension within this range, add all valid data to obtain the sum, and then divide the sum by the number of valid data points. When calculating the standard deviation σ, based on the obtained mean μ and the same batch of valid data, first calculate the deviation of each data point from μ and square it, then sum the squares to obtain the sum of squared deviations. If it is full data, divide the sum of squares by the number of data points; if it is sampled data, divide by the number of data points minus 1 to obtain the variance. Finally, take the arithmetic square root of the variance to obtain σ. For the data queue marked as to be supplemented during the source data sorting stage, a cross-time slice linear interpolation process is adopted. Specifically, the corresponding data of one normal time slice before and after the missing data slice are extracted, and the supplementary value of the missing slice is calculated according to the time interval ratio: missing slice supplementary value = previous slice value - (previous slice value - next slice value) × (missing slice duration / total interval duration). This ensures that the supplementary data conforms to the data change trend. All processed data is uniformly converted into JSON format, and the field design is adapted to the microgrid feature extraction requirements. Based on standardized time-slice data, features are extracted according to meteorological data-equipment data classification to ensure strong correlation between features and photovoltaic output and load demand forecasts. Two types of statistical features are extracted for basic and enhanced meteorological data: mean features and rate of change features. The mean feature calculates the average value of a single type of meteorological data within each time slice, reflecting the overall level of meteorological conditions during that period. The rate of change feature calculates the rate of change between the current time slice mean and the mean of the previous adjacent time slice, using the formula: Rate of Change = (Current Mean - Previous Mean) / Previous Mean × 100%. For example, for the current, voltage, and power data of photovoltaic, energy storage, and load, two types of operational features are extracted: power fluctuation features and state coding features. The features include power fluctuation features, which calculate the variance and peak-to-valley difference of the equipment power data in each time slice. The variance reflects power stability, and the peak-to-valley difference = maximum power - minimum power in that period, reflecting the energy storage adjustment range. The status coding features are used to numerically code the equipment operating status. For example, the photovoltaic inverter is coded as 1 for normal operation, 0.5 for low power protection, and 0 for fault shutdown. The energy storage PCS is coded as 1 for charging, -1 for discharging, and 0 for standby. The discrete status is converted into numerical features that the model can recognize. In each time slice, a total of 19 basic features are extracted, including meteorological mean (5), meteorological change rate (5), power fluctuation (6), and status coding (3), forming a preliminary feature set. Using 15-minute time slices as a unified dimensional unit, the 19 basic features extracted within the same time slice are sorted by meteorological features - equipment features, ensuring that each time slice corresponds to one feature set (dimensional 19). If a certain equipment feature is missing in a time slice due to equipment failure, the feature value is set to 0, and a note indicating equipment failure is added to the feature vector to avoid dimension loss. To eliminate the impact of differences in feature dimensions on the prediction model, Min-Max normalization is used for all features, with the formula: Normalized eigenvalue = (current eigenvalue - historical minimum value of the eigenvalue) / (historical maximum value of the eigenvalue - historical minimum value of the eigenvalue); For example, the historical minimum value of solar radiation is 0W / ㎡, the maximum value is 1200W / ㎡, and the current value is 775W / ㎡. The normalized value is (775-0) / (1200-0)≈0.646. The 19 normalized features are arranged in a fixed order (basic meteorological mean - enhanced meteorological mean - meteorological change rate - photovoltaic power fluctuation - energy storage power fluctuation - load power fluctuation - equipment status code) to form a multi-source feature vector with a dimension of 19. The generated multi-source feature vector is stored in the gateway's local feature database and uploaded to the microgrid central control platform at a frequency of once every 15 minutes. It is directly used as the input data for the subsequent physical enhancement prediction model, providing high-quality feature support with consistent time series, unified dimensions, and adapted units for photovoltaic output and load demand prediction. Through the above steps, after receiving basic meteorological, enhanced meteorological, and equipment operation data from the edge aggregation layer, the edge computing gateway calibrates the timestamps of data from different sources using the gateway clock to ensure time sequence consistency. Outliers are removed using the 3σ principle, missing data is supplemented by linear interpolation, and format standardization is completed to improve data quality. Then, mean and rate of change statistical features are extracted from meteorological data, and power fluctuation and status coding operation features are extracted from equipment data. Finally, multi-source feature vectors are formed through dimension matching and normalization processing, providing core data support with time sequence consistency, reliable quality, and dimension adaptation for subsequent prediction model training and scheduling strategy generation.

[0026] Furthermore, the process of building a physics-enhanced prediction model includes: The Transformer model is used as the core to process the time-series characteristics of photovoltaic power output and load demand, and to optimize the model prediction bias. Calculate the dust accumulation impact index and temperature coefficient correction factor, and embed them as additional features into the feature input layer of Transformer for the fusion of physical mechanism and data model; A Bayesian probability optimization method is introduced into the training of the physical augmentation prediction model to fit the prediction error distribution based on historical data and set the confidence level. The system forecasts the photovoltaic output and load demand of microgrids and outputs the corresponding forecast intervals and confidence intervals.

[0027] Specifically, an improved Transformer model is used as the core time-series feature processor to adapt to the characteristics of photovoltaic output and load demand in microgrids. The specific structure is as follows: an encoder module with 6 encoder layers, each layer containing a multi-head self-attention mechanism and a feedforward neural network, used to capture the long-short-term dependencies of the input sequence; and a decoder module with 6 decoder layers, each layer containing a multi-head self-attention mechanism and an encoder-decoder attention mechanism, used to map the features extracted by the encoder to the predicted output. The input and output dimensions are as follows: the input is a preprocessed multi-source feature vector, and the output is the predicted value of photovoltaic output and load demand for the next 24 hours. Location encoding is added to the input features to enable the model to recognize temporal relationships. A sliding window and a multi-objective loss function are used for training. The sliding window selects historical data to enhance sample diversity. The loss function combines MSE (mean squared error, which optimizes point prediction accuracy) and interval coverage loss. The formula is: Total loss = 0.7 × MSE + 0.3 × (1 - coverage). In building a physically-enhanced prediction model, two key correction factors are calculated to address the physical impacts of dust accumulation and temperature on photovoltaic output and load demand. Specifically, the dust accumulation impact index integrates the thickness and duration of dust accumulation on the photovoltaic panel to quantify the transmittance attenuation effect caused by dust accumulation; the temperature coefficient correction factor is based on the deviation between the measured ambient temperature and the rated operating temperature of the equipment, reflecting the impact of temperature fluctuations on equipment efficiency. These two factors are used as additional physical features and directly concatenated to the feature input layer of the Transformer model, fusing with the original multi-source feature vector. This allows the model to capture the temporal patterns of data while incorporating physical mechanism constraints, achieving a deep integration of physical mechanisms and data-driven models, and reducing prediction bias caused by pure data models neglecting physical laws.

[0028] Bayesian optimization efficiently searches for optimal hyperparameters by constructing a probabilistic surrogate model of the objective function. The principle is as follows: First, the probabilistic surrogate model is trained with a small number of initial hyperparameter samples. This model not only approximates the output trend of the objective function but also quantifies the uncertainty of prediction. Next, by collecting data from the surrogate model's predictions and uncertainties, hyperparameter combinations that may improve the objective function value or have high uncertainty are prioritized as the next evaluation point. After evaluation, new samples are added to the dataset, the surrogate model is updated, and this process of updating the model, selecting the next point, and evaluating is repeated until the optimal hyperparameters are found. In this embodiment, the optimization objects are the learning rate (0.0001-0.001), batch size (32-128), and number of encoder layers (4-8). The optimization objective is to minimize the validation set MSE. The number of iterations is set to 50, and the final output is the optimal hyperparameter combination. Based on historical prediction data, the error probability distribution is fitted. Specifically, for each historical prediction point, the error eᵢ = actual value - predicted value at the model point is calculated. The KS test is used to verify whether the error conforms to a normal distribution. In this scenario, both the photovoltaic power output error and the load demand error pass the test. The maximum likelihood estimation method is used to calculate the mean μ of the error sequence. e With standard deviation σ e (Photovoltaic output error σ) e ≈5% × rated power, load demand error σ e (≈3% × average load), based on the microgrid dispatch requirements, the preset information level is 95%, corresponding to a normal distribution quantile of 1.96; The multi-source feature vectors generated in real time are arranged into an input sequence in chronological order. The trained Transformer model outputs predicted values ​​for the next 24 hours. Based on the fitted error distribution and a preset confidence level, the upper and lower limits of the interval for each predicted point are calculated, where the upper limit of the photovoltaic output prediction is... Lower limit of photovoltaic output forecast The forecast results are output in JSON format, including forecast time, confidence level, photovoltaic output range (upper limit, lower limit, and point forecast value for each time point), load demand range (upper limit, lower limit, and point forecast value for each time point), and historical range coverage. By providing the above steps, the physical enhancement prediction model uses the Transformer as its core to accurately capture the temporal characteristics of photovoltaic output and load demand and optimize prediction bias. By calculating the dust accumulation impact index and temperature coefficient correction factor and embedding them into the input layer, it achieves deep integration of physical mechanisms and data models. Then, it introduces Bayesian probability optimization, fits the prediction error distribution based on historical data and sets confidence levels, and finally can accurately predict the photovoltaic output and load demand of microgrids, outputting prediction interval results with confidence intervals. This not only solves the bias problem of pure data models ignoring physical laws, but also quantifies prediction uncertainty, providing high-precision and high-reliability data support for the subsequent generation of microgrid dispatch strategies.

[0029] Furthermore, the calculation process for the dust accumulation impact index and temperature coefficient correction factor includes: Collect real-time monitoring data of dust accumulation thickness on the surface of photovoltaic panels, and determine the current transmittance attenuation coefficient by combining the corresponding relationship table of dust accumulation thickness and transmittance attenuation coefficient calibrated in the laboratory. The dust accumulation impact index is obtained by weighting the attenuation coefficient and the dust accumulation time. Obtain the measured ambient temperature and the rated operating temperature of the photovoltaic modules and load equipment, and calculate the temperature deviation value; Based on the temperature-efficiency correction curve of the equipment at the factory, find the efficiency correction coefficient for the corresponding deviation value; The correction coefficient is normalized to obtain the temperature coefficient correction factor.

[0030] Specifically, a laser thickness sensor is deployed to collect real-time data on the dust accumulation thickness on the photovoltaic panel surface. Each collection generates three consecutive data points, and the average value is taken as the measured dust accumulation thickness at the current moment. If the data at a monitoring point exceeds the reasonable range of 0-5mm, it is judged as an outlier and replaced with the linear interpolation result of two adjacent valid data points to ensure data validity. The dust accumulation thickness-transmittance attenuation coefficient correspondence table pre-stored in the microgrid control platform database is called. This table is generated by simulating photovoltaic panel transmittance tests under different dust accumulation thicknesses in the laboratory. If the real-time collected dust accumulation thickness is not a discrete value in the table, the corresponding attenuation coefficient is calculated using linear interpolation. The formula is: ; in, and The table shows the thickness compared to the measured thickness. The two closest thickness values, and This represents the attenuation coefficient for the corresponding thickness. The difference between the time the photovoltaic panels were last cleaned and the current calculated time is recorded by the microgrid control platform; this difference represents the duration of dust accumulation. ,like >7 days, according to =Calculated over 7 days, combined with the attenuation coefficient The ash accumulation impact index is calculated using a weighted formula based on the accumulation time. The formula is as follows: Dust accumulation impact index ; Wherein, 0.05 is the time decay weighting coefficient, and the exponent ranges from [0.4, 1.0]. The closer the value is to 1.0, the smaller the impact of dust accumulation; the closer the value is to 0.4, the greater the impact of dust accumulation. Temperature data is collected by deploying high-precision temperature and humidity sensors in the photovoltaic array area and the load concentration area to determine the rated operating temperature of the photovoltaic modules. Rated operating temperature of load equipment All parameters were extracted from the equipment's manufacturer's technical specifications and pre-stored in the control platform's equipment parameter database. Calculations were performed based on photovoltaic applications. , load Match each separately; Calculate temperature deviation according to equipment type. The formula is: Photovoltaic module temperature deviation: ; Temperature deviation of load equipment: ; Access the temperature-efficiency correction curve provided by the equipment manufacturer, and query the corresponding efficiency correction coefficient based on the temperature deviation. The photovoltaic module correction curve, specifically, is when... When ∈[-20℃, 0℃], =1.0 + 0.002 × | |, when When ∈(0℃,30℃), =1.0-0.004× ; The specific load equipment correction curve is as follows: when When ∈[-10℃, 5℃], =1.0, when When ∈(5℃,15℃), =1.0-0.005×( -5); Min-Max normalization is used to map the correction coefficient to the interval [0.5, 1.0] to avoid the influence of extreme values. The formula is as follows: Temperature coefficient correction factor ; in, To correct the historical maximum value of the coefficient, This is the historical minimum value of the correction coefficient; After the dust accumulation impact index and temperature coefficient correction factor are calculated, they are stored in the control platform feature database according to equipment type. The output format is JSON, which is then directly used as additional physical features and concatenated to the feature input layer of the Transformer model. It is fused with multi-source feature vectors to support the training and prediction of the physical enhancement prediction model. Through the above steps, the thickness of dust accumulation on the photovoltaic panel surface is collected, and the transmittance attenuation coefficient is determined by combining it with the corresponding relationship table calibrated in the laboratory. Then, a dust accumulation impact index is obtained through weighted calculation with the dust accumulation time, which can accurately quantify the physical impact of dust accumulation on photovoltaic transmittance. Simultaneously, the temperature deviation is calculated by obtaining the measured ambient temperature and the equipment's rated operating temperature. Based on the equipment's factory correction curve, the efficiency correction coefficient is found and normalized to obtain the temperature coefficient correction factor, which accurately reflects the effect of temperature fluctuations on the efficiency of photovoltaic modules and load equipment. These two types of factors can be embedded as physical features into the prediction model, effectively compensating for the shortcomings of pure data models that ignore the physical laws of dust accumulation and temperature. This provides a physical correction basis that fits the actual operating conditions for subsequent photovoltaic output and load demand predictions, significantly reducing prediction deviations and improving the reliability and accuracy of the prediction model.

[0031] Furthermore, the workflow of the digital twin extreme scenario rehearsal unit includes: Import real-time operating data from the microgrid's physical topology, equipment parameters, and multi-source feature vectors to construct a digital twin that is 1:1 mapped to the physical microgrid; It includes typical extreme operating conditions of microgrids, including extreme weather scenarios, equipment failure scenarios, and load change scenarios, and clarifies the triggering conditions and parameter boundaries for each scenario; Using the prediction results as input, the unit's built-in energy flow calculation model is invoked to simulate the energy storage charging and discharging thresholds and load regulation priorities under different extreme scenarios; By analyzing the simulation results, the energy storage operation threshold and load regulation sequence that meet the supply and demand balance of the microgrid under various extreme scenarios are determined, providing data support for the generation of the initial energy dispatch strategy.

[0032] Specifically, the topology analysis module built into the digital twin extreme scenario simulation unit imports microgrid CAD design drawings and on-site measured topology data, transforming them into a digital topology model. This includes clearly defining the location coordinates and connection relationships of photovoltaic arrays, energy storage systems, load nodes, and transmission lines, ensuring the topology structure is completely consistent with the physical microgrid. Rated parameters of key equipment are retrieved from the microgrid equipment parameter library, categorized by equipment type, and entered into the twin. Real-time data from multi-source feature vectors, including photovoltaic output, energy storage SOC, load power, and ambient temperature, are received via industrial Ethernet. This data is then compared with the twin model. The corresponding device nodes are bound in the twin to achieve real-time synchronization between the physical device status and the digital model status. Point cloud scanning and parameter verification are used to verify the power and voltage data of key nodes in the twin. If the deviation between the photovoltaic combiner box power displayed in the digital model and the measured value of the physical device is >1%, the device efficiency parameters in the twin are corrected to reduce the deviation to within 1%, ensuring 1:1 mapping accuracy. A mature digital twin visualization engine is called to render the digital topology model into a three-dimensional visualization scene, supporting zooming, roaming and real-time labeling of device status, so that operators can intuitively view the microgrid operation status. Extreme operating conditions are categorized into three types based on their impact dimensions. Each type of scenario has a clearly defined manifestation, triggering conditions, and parameter boundaries, which are pre-stored in a unit scenario library. These include extreme weather scenarios, equipment failure scenarios, and load change scenarios. Extreme weather scenarios further include extreme high-temperature scenarios, triggered by an ambient temperature ≥40℃ for more than 2 hours, with parameter boundaries of photovoltaic panel operating temperature ≤85℃ and energy storage cooling system load ≤120% of rated power; and typhoon and rainstorm scenarios, triggered by wind speed ≥10.8m / s and precipitation. ≥50mm / 2h, parameter boundaries are: photovoltaic array wind resistance level ≤12, outdoor equipment waterproof level ≥IP65; blizzard and low temperature scenario, triggering condition is: ambient temperature ≤-5℃ and snowfall ≥10mm / h, parameter boundaries are: energy storage battery operating temperature ≥-20℃, transmission line icing thickness ≤10mm; equipment failure scenario includes photovoltaic inverter failure, triggering condition is: inverter output current fluctuation >20% or no output for 10s, parameter boundaries are: photovoltaic array output associated with the faulty inverter ≤5% of rated power. The system is designed to detect various scenarios, including: PCS failure (triggered by a PCS charging / discharging current deviation > 15% or communication interruption, with parameters specifying that the faulty storage cabinet cannot participate in charging / discharging and the remaining storage capacity must meet the load backup power supply requirement for ≥ 2 hours); load-side distribution failure (triggered by a load input voltage < 0.9 times the rated voltage for 30 seconds, with parameters specifying that the load in the fault area needs to be reduced by ≥ 30% to restore voltage); sudden load changes (including a sudden increase in industrial load, triggered by an increase of ≥ 50% in industrial load power within 10 minutes, with parameters specifying that the total microgrid load ≤ the rated output of photovoltaics plus the maximum discharge power of energy storage); and sudden drop in commercial load (triggered by a decrease of ≥ 40% in commercial load within 15 minutes, with parameters specifying that the surplus of photovoltaic output ≤ the maximum charging power of energy storage plus the grid backfeed limit). The unit has a built-in scenario trigger monitoring module that compares real-time data in multi-source feature vectors with scenario trigger conditions. When an ambient temperature ≥ 40℃ is detected and remains above 2 hours, an extreme high-temperature scenario is automatically triggered. It also supports manual recall of specific scenarios from the scenario library to meet flexible pre-simulation requirements. A mature energy flow calculation framework based on node power balance is adopted, with each node of the microgrid as the calculation unit. The framework satisfies the condition that inflow power = outflow power + losses, considering equipment constraints such as energy storage SOC and photovoltaic output limits. Adapting to the distributed characteristics of the microgrid, the prediction results output by the physical augmentation prediction model are used as the core input. Combined with the parameter boundaries of the current extreme scenarios, the constraints of the model calculation are determined. For different extreme scenarios, the energy flow model iteratively calculates the energy storage charging and discharging thresholds that satisfy supply and demand balance without exceeding limits. Specifically, when photovoltaic panel efficiency decreases, leading to reduced output, the energy storage discharge threshold is increased during model simulation, raising the lower discharge limit from 20% SOC to 30% SOC to avoid deep discharge affecting battery life. The upper charging limit is maintained at 80% SOC to prevent overcharging. Overcharging at low temperature was investigated, and the supply-demand difference under different thresholds was calculated. When the discharge threshold was 30% and the charging threshold was 80%, the supply-demand difference in the next 4 hours was ≤5%. This threshold was determined as a candidate value. Based on the preset rules of the supply guarantee level and the load reduction demand calculated by the energy flow model, the load adjustment priority was simulated. Specifically, the priority division standard was as follows: Level 1 - medical load and emergency lighting; Level 2 - commercial core load and industrial key equipment; Level 3 - commercial non-core load and industrial non-production load. In the scenario of a sudden increase in industrial load, the energy flow model calculated that 0.4MW of load needed to be reduced. During the simulation, the load was sorted from low to high priority. First, the Level 3 industrial non-production load was reduced, and then the Level 3 commercial air conditioning auxiliary equipment was reduced to ensure that the Level 1-2 loads were not affected. This adjustment priority was determined as a candidate scheme. For each extreme scenario simulation, the focus is on analyzing the supply-demand balance index and equipment safety index. Specifically, the supply-demand balance index involves calculating the total supply-demand difference of the microgrid during the simulation period. If the absolute value of the difference is ≤5%, supply and demand are considered balanced. If the difference is >5%, the energy flow model is returned to readjust the energy storage threshold or load regulation until the difference is ≤5%. The equipment safety index involves checking whether the power and temperature of each device exceed parameter boundaries. For example, in extreme high-temperature scenarios, if the energy storage PCS discharge power reaches 2.8MW (rated 2.5MW, exceeding by 12%), it is considered out of limit, and the energy storage discharge power needs to be reduced to 2.5MW, while simultaneously increasing the load reduction to ensure equipment safety. When the simulation results satisfy both supply-demand balance and equipment safety... After strict requirements are set, the unit outputs a standardized data report to support the generation of the initial energy dispatch strategy. The core content of the report includes energy storage operation thresholds, such as an upper limit of 80% SOC for charging and a lower limit of 30% SOC for discharging in extreme high temperature scenarios, and an upper limit of 70% SOC for charging and a lower limit of 20% SOC for discharging in photovoltaic inverter failure scenarios. The report also includes load adjustment order, such as cutting industrial non-production loads first and then commercial air conditioning auxiliary units in scenarios of sudden increase in industrial load, and not reducing loads at levels 1 and 2. The report also includes scenario adaptation suggestions, such as charging the energy storage SOC to above 70% in advance in snowstorm and low temperature scenarios to cope with the decline in photovoltaic output. The output data is synchronized to the microgrid central control platform in JSON format and directly serves as the core basis for the formulation of the initial dispatch strategy. Through the above steps, a 1:1 digital twin is constructed to reproduce the microgrid state, including extreme weather, equipment failure, and load change scenarios and defining their boundaries. The prediction results drive the energy flow model to simulate energy storage thresholds and load priorities, analyze and determine supply and demand balance schemes, support initial scheduling, prevent simulation disconnection and other problems, and improve strategy security and adaptability.

[0033] Furthermore, the process for generating the initial energy scheduling strategy includes: The multi-source feature vectors and the photovoltaic output and load demand prediction results are imported into the digital twin extreme scenario pre-simulation unit, and extreme scenarios that match the current operating conditions are selected from the unit scenario library. The digital twin extreme scenario simulation unit simulates the minimum discharge threshold and maximum charging threshold of energy storage under different scenarios based on the current SOC of energy storage and the rated charge and discharge rate of the equipment in the multi-source feature vector, combined with the predicted photovoltaic output surplus and deficit. Based on the load type and predicted load demand change trend in the multi-source feature vectors, and following the principle of prioritizing the supply of important loads, the load adjustment priority is determined by the built-in hierarchical rules of the digital twin extreme scenario pre-simulation unit. By calling the energy flow model built into the digital twin extreme scenario simulation unit, the simulated energy storage charging and discharging thresholds, load adjustment priorities, and predicted photovoltaic output and load demand are combined to calculate the microgrid supply and demand difference under different scenarios and determine whether the balance condition of output ≥ demand and equipment loss is met. Based on the supply and demand balance results, determine the energy storage operation instructions and load adjustment schemes, and combine them to form a preliminary dispatch strategy; The initial strategy is simulated in extreme scenarios by using a digital twin extreme scenario simulation unit. If there are equipment overruns or supply and demand imbalances, the thresholds and priorities are fine-tuned to finally generate the initial energy scheduling strategy.

[0034] Specifically, core features representing the current and future operating conditions are extracted from multi-source feature vectors and prediction results to form a current operating condition feature vector with fixed dimensions. Standard feature vectors of each extreme scenario are retrieved from the scenario library of the digital twin extreme scenario pre-simulation unit. Cosine similarity is used to calculate the matching degree between the current operating condition feature vector and the standard feature vectors of each scenario. The calculated matching degree is compared with a preset threshold. Scenarios with a matching degree ≥ 0.8 are judged to match the current operating condition and included in the subsequent pre-simulation range. Core parameters are extracted from multi-source feature vectors, including the current SOC of energy storage (55%) and the rated charge / discharge rate of energy storage PCS (1C). Combined with the prediction results, the surplus and deficit periods of photovoltaic output are determined. The digital twin extreme scenario simulation unit simulates based on the energy flow model, following the principle of not overcharging during surplus periods and not deep discharging during deficit periods. During surplus periods, the upper limit of the charging threshold is set to 75% SOC, and during deficit periods, the lower limit of the discharging threshold is set to 30% SOC, forming a threshold range of charging ≤75% SOC and discharging ≥30% SOC. Load classification is analyzed from multi-source feature vectors, specifically including Level 1: Emergency lighting (0.1MW), medical equipment (0.4MW); Level 2: Commercial POS systems (0.5MW), industrial production lines (1.0MW); Level 3: Air conditioning auxiliary units (0.6MW), non-production lighting (0.4MW). The predicted trend is a slight increase in load over the next 4 hours, with no risk of sudden changes. Based on the priority supply rule for important loads built into the pre-simulation unit (Level 1 > Level 2 > Level 3), combined with the ranking of reducible loads, the first priority for reduction is Level 3 non-production lighting (0.4MW, with the least impact from reduction), the second priority for reduction is Level 3 air conditioning auxiliary units (0.6MW, which can be reduced in stages). For Level 1 and 2 loads, reduction of Level 2 loads is only considered when the gap is greater than 1.0MW, and they are currently not included in the adjustment scope. The pre-simulation unit energy flow model is invoked, and the energy storage threshold, load priority, and forecast data are input to calculate the supply-demand difference for each time period, including: 0-1h: PV 3.5MW + energy storage without discharge - load 3.0MW + loss 0.07MW (2%), surplus 0.43MW, which can be charged to 70% SOC at 0.43MW, meeting the threshold; 1-2h: PV 3.2MW + energy storage without discharge - load 3.1MW + loss 0.06MW, surplus 0.04MW, continue charging to 70% SOC; 2-3h: PV... 2.8MW + 0.45MW energy storage discharge - 3.2MW load + 0.06MW loss, difference 0.01MW, approximately balanced. 3-4h: 2.6MW photovoltaic + 0.45MW energy storage discharge - 3.1MW load + 0.05MW loss, difference 0.1MW, requires fine-tuning. The balance condition is based on the absolute value of the difference ≤ 0.05MW during the time period. 3-4h requires an additional reduction of 0.1MW of level 3 non-production lighting to reduce the difference to 0. The above results are structured according to time period - equipment - operation to form a preliminary strategy. The initial strategy was imported into the pre-simulation unit to simulate extreme situations under the scenario of fluctuating photovoltaic output and slight load increase, such as a sudden drop in photovoltaic output to 2.4MW in 3-4 hours. Under the original strategy: 2.4MW + 0.45MW = 2.85MW < 3.1MW + 0.05MW = 3.15MW, with a shortfall of 0.3MW, triggering an equipment overload warning. The energy storage discharge threshold was fine-tuned: the discharge power in 3-4 hours was increased to 0.5MW, and the lower limit of SOC was temporarily reduced to 28%, which is allowed in the short term but not for long-term operation, supplementing load adjustment. In the second priority, 0.2MW of the level 3 air conditioning auxiliary units were reduced. After another pre-simulation, 2.4MW + 0.5MW = 2.9MW ≥ 3.1MW - 0.2MW + 0.05MW = 2.95MW was approximately balanced, with no equipment exceeding the limit. The optimized strategy was verified by the pre-simulation to meet the supply and demand balance and equipment safety, and was output to the microgrid control platform in a standardized command format, including the energy storage charging and discharging period, power, SOC constraint, load reduction target, period, and value, and emergency trigger conditions. Through the above steps, the multi-source feature vectors and the photovoltaic output and load demand prediction results are imported into the digital twin extreme scenario pre-simulation unit. After screening and matching the extreme scenarios of the current operating conditions, the energy storage charging and discharging thresholds are simulated, the load adjustment priority is determined according to the principle of "prioritizing the supply of important loads", and then the energy flow model is called to verify the supply and demand balance to form a preliminary scheduling strategy. After the pre-simulation and fine-tuning of equipment over-limit and supply and demand imbalance issues, the final generated initial energy scheduling strategy can accurately adapt to the operating conditions, avoid energy storage over-limit and improper load supply, ensure the supply and demand balance of the microgrid and the safety of equipment, significantly improve the adaptability and reliability of the scheduling strategy, and provide support for the stable operation of the microgrid.

[0035] Furthermore, the initial scheduling policy modification process includes: The multi-source feature vectors and the photovoltaic output and load demand forecast results are used as the basis for strategy correction; Based on the equipment manufacturing standards and microgrid operation specifications, the safe operation boundary of core equipment is determined and the equipment safety constraint threshold is extracted. The energy storage charging and discharging instructions, photovoltaic power allocation scheme, and load adjustment plan in the initial scheduling strategy are compared with the safety constraint thresholds to determine whether there are any conflicts. By combining the predicted photovoltaic output range and load demand range, the microgrid supply and demand gap after the initial strategy is implemented is calculated to determine whether the balance condition of photovoltaic output plus energy storage discharge ≥ load demand plus equipment operating losses is met. If there is a supply and demand gap or excess surplus, it is marked as an item that needs to be corrected. For safety conflicts, priority should be given to correcting according to the equipment safety threshold. For supply and demand imbalances, if there is a gap, priority should be given to reducing non-core loads. If there is an excess, the energy storage charging command should be adjusted to the SOC safety limit. The revised energy storage operation instructions, photovoltaic power output control scheme, and load regulation plan are integrated to form the final microgrid energy dispatch instructions, which are then sent to edge execution devices via industrial Ethernet.

[0036] Specifically, two types of basic data are called from the microgrid data platform and encapsulated in a structured manner at a time granularity of 15 minutes. The multi-source feature vector contains real-time equipment status and environmental parameters. The prediction result is the output of the physical enhancement prediction model for the next 4 hours, including the photovoltaic output range [3.0-3.6MW], the load demand range [3.1-3.3MW], and the equipment loss coefficient. The data is converted into a standardized JSON format. Based on the equipment manufacturer's technical manuals, such as energy storage batteries and photovoltaic inverters, and the "Microgrid Operation Specification" (DL / T5485-2010), the safety constraint thresholds for three types of core equipment are clearly defined and stored in a safety constraint database, supporting real-time retrieval by equipment ID. The core instructions of the initial scheduling strategy to be corrected include: Energy storage operation: charging at 5.5MW power from 10:00 to 12:00, with a target SOC of 85%; discharging at 5.2MW power from 12:00 to 14:00; Photovoltaic output allocation: full grid connection (3.0- 3.6MW), load regulation: no reduction (maintain 3.1-3.3MW), compare each item with the command parameters and threshold range, mark conflict items, such as energy storage charging power 5.5MW > rated 5MW, exceeding by 10%, and target SOC 85% > safety limit 80%, then mark it as energy storage charging over-limit conflict, if energy storage discharge power 5.2MW ≤ 1.2 times rated (6MW), but duration 2h > 10min, then mark it as energy storage long-term overload conflict, the current parameters are all within the threshold, indicating that there is no conflict between photovoltaic inverter and load voltage; Based on the forecast range and initial strategy, the supply-demand difference is calculated under the worst-case scenario as follows: PV output lower limit + energy storage discharge power - (load demand upper limit + total loss). Total loss = PV output lower limit × 2% + energy storage discharge power × 1.5%. A reasonable surplus range is set at 0-0.5MW, with an allowable deficit of ≤0.3MW. The current 4.762MW > 0.5MW is marked as an excess surplus requiring correction. In targeted correction operations, safety conflicts are addressed first, with the highest priority being the reduction of the initial strategy's 5.5MW energy storage charging power to the rated 5MW, lowering the target SOC from 85% to the 80% safety limit. Simultaneously, the 5.2MW energy storage discharge power is reduced to the rated 5MW to avoid long-term overload. Next, supply and demand imbalances are addressed, with the second highest priority being the excess surplus. The adjusted energy storage charging command is used to absorb 2.5MW·h of surplus at 80% SOC. The remaining surplus is then absorbed by limiting photovoltaic output to 1.969MW, without exceeding the inverter's safety threshold. This ensures that the correction meets both equipment safety constraints and balances microgrid supply and demand. The revised instructions are structured according to device-time period-operation parameters to form the final scheduling instructions. The instructions are then sent to the edge execution devices via industrial Ethernet, and device instruction confirmation messages are received. By following the steps above, based on multi-source feature vectors and photovoltaic and load forecasting results, and combined with equipment factory standards and microgrid specifications, safety constraint thresholds are determined. First, the initial strategy is compared to identify safety conflicts. Then, the supply and demand difference is calculated to mark imbalance items. Subsequently, conflicts are corrected according to the safety thresholds. Targeted measures are taken to fill gaps by reducing non-core loads or adjusting energy storage charging to the safety limit to eliminate surpluses. Finally, integrated instructions are issued. This approach can effectively avoid equipment over-limit risks, resolve supply and demand imbalances, and ensure the safe and stable operation of the microgrid.

[0037] Furthermore, the workflow of the parameter update unit includes: The microgrid operation data received after the execution of the dispatch command is received is used to extract core related parameters, including actual photovoltaic output, actual load demand, real-time equipment operation parameters and environmental measurement data, to form a dataset for unit processing. The actual values ​​in the dataset are compared with the interval prediction results output by the prediction model to calculate the prediction deviation value. The contribution of the input features of the prediction model to the deviation is analyzed by the SHAP value feature importance algorithm, and high-impact features with contribution values ​​exceeding the preset threshold are marked. Based on the feature contribution calculation results, the gradient descent method is used to adjust the feature weights of the Transformer prediction model in reverse. The device operating parameters and environmental measurement data in the dataset are compared with the preset parameters of the corresponding scenarios in the digital twin scenario library. The parameter deviation rate is calculated, and abnormal scenario parameters with deviation rates exceeding the set threshold are filtered out. For abnormal scenario parameters, the least squares method is used to fit the mapping relationship between the feedback data and the preset parameters in the scenario library, generate parameter correction coefficients, update the corresponding parameters in the scenario library with the correction coefficients, and record new working conditions not covered in the feedback data as new scenarios into the scenario library to supplement the scenario dimensions. The calibrated prediction model feature weights and optimized digital twin scenario library parameters are output to the next round of microgrid prediction and scheduling process. After obtaining the new round of scheduling feedback data, the prediction deviation rate and scenario parameter deviation rate are recalculated. If both types of deviation rates drop to within the set threshold, the current round of work is completed. If the target is not met, the above steps are repeated until the microgrid operation accuracy requirements are met.

[0038] Specifically, the system receives real-time feedback data after the execution of scheduling instructions via industrial Ethernet, including actual photovoltaic output, actual load demand, real-time SOC of energy storage, charging and discharging power of energy storage PCS, photovoltaic inverter temperature, load-side voltage, ambient temperature, solar radiation intensity, wind speed, instruction execution success rate, and equipment alarm information. The data is then encapsulated into a dataset for unit processing by timestamp, data type, and numerical value. By comparing the actual values ​​in the dataset with the interval prediction results of the physical augmentation prediction model, two types of bias are calculated, specifically including the absolute deviation between the actual value and the midpoint of the prediction interval. The formula is as follows: Deviation = |Actual value − (Upper limit of interval + Lower limit of interval) / 2 |; Coverage deviation, whether the actual value falls within the prediction interval, is quantified by the Shapley value to determine the contribution of each input feature to the model output, ranging from [-1, 1]. The larger the absolute value, the stronger the influence. The input features include 12 dimensions. The contribution of solar radiation intensity to the photovoltaic prediction deviation is calculated to be 0.25, which is marked as a high-impact feature. The preset contribution threshold is 20%, and only features exceeding the threshold are marked for subsequent model adjustment. To address the high-impact features of the labeled data, a gradient descent method was used to adjust the feature weights of the Transformer model. In practical applications, taking solar radiation intensity as an example, its original weight was 0.15. Because it contributes positively to the bias, the weight was reduced to 0.12 using gradient descent, decreasing the model's sensitivity to this feature and thus reducing prediction bias. After adjustment, validation set testing showed that the average deviation between the midpoint of the photovoltaic prediction interval and the actual value decreased from 0.15MW to 0.08MW.

[0039] The deviation rate is calculated by comparing the equipment operating parameters and environmental data in the dataset with the preset parameters of the photovoltaic output fluctuation scenario in the digital twin scenario library. Deviation rate = |Actual value − Scene preset value| / Scene preset value × 100%; For example, the preset ambient temperature corresponding to the 3.2MW photovoltaic output in the scenario library is 27℃. The actual temperature is 29℃. The deviation rate is approximately 7.4% (|29-27| / 27×100%), which does not exceed the 15% threshold and is not marked for now. The preset SOC value for energy storage is 58%, and the actual value is 62%. The deviation rate is approximately 6.9% (|62-58| / 58×100%), which is normal. If the deviation rate of a certain parameter exceeds 15%, the least squares method is used to fit the mapping relationship between the actual wind speed and the photovoltaic power output attenuation coefficient, generating a correction coefficient of 1.2, and updating the corresponding parameter in the scenario library. When an uncovered working condition appears in the feedback data, it is recorded as a new scenario in the scenario library, including triggering conditions, parameter boundaries, etc. The calibrated Transformer model feature weights, optimized digital twin scene library parameters, and newly added scenes are packaged and output to the next round of prediction and scheduling process as input parameters. The standard is set as prediction deviation rate ≤5% and scene parameter deviation rate ≤10%. After obtaining the new round of scheduling feedback data, the two types of deviation rates are recalculated. If the prediction deviation rate is 7% and the scene parameter deviation rate is 12% after the first iteration, which does not meet the standard, the above steps are repeated. After the second iteration, the prediction deviation rate is 4.8% and the scene parameter deviation rate is 8.5%, which both meet the standard, and the current round of update is terminated. Through the above steps, the parameter update unit constructs a dataset by receiving scheduling feedback data, compares the actual values ​​with the prediction results to calculate the deviation, and uses SHAP values ​​to mark high-impact features. It then uses gradient descent to adjust the feature weights of the Transformer model to improve prediction accuracy. Simultaneously, it compares the parameters of equipment, environment data, and twin scenario library, uses least squares to correct abnormal parameters, adds new operating scenarios, and iteratively verifies the deviation rate until it reaches the target. After that, it outputs optimized parameters, realizing dynamic closed-loop optimization of the prediction model and scenario library, continuously improving the prediction and scheduling accuracy of the microgrid, and ensuring stable operation.

[0040] Example 2: A microgrid energy management optimization and prediction system, comprising: The data acquisition and fusion module constructs a data acquisition network to simultaneously collect basic meteorological data, enhanced meteorological data, and microgrid equipment operation data, and generates multi-source feature vectors through edge computing gateways. The physical enhancement prediction module builds a physical enhancement prediction model with Transformer as the core, embedding the dust accumulation impact index and temperature coefficient correction factor to perform interval prediction of microgrid photovoltaic output and load demand and output confidence interval results. The digital twin pre-simulation and initial strategy generation module, based on multi-source feature vectors and prediction results, calls the digital twin extreme scenario pre-simulation unit to simulate energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, and generates an initial scheduling strategy. The scheduling strategy correction and instruction issuance module corrects the initial scheduling strategy, generates the final microgrid energy scheduling instruction, and issues it to the edge execution device. The parameter closed-loop update module collects feedback data after the execution of scheduling instructions, inputs it into the parameter update unit, and automatically calibrates the feature weights of the prediction model and iteratively optimizes the parameters of the digital twin scenario library.

[0041] Specifically, the data acquisition and fusion module first collects meteorological and equipment data, which is then fused into multi-source feature vectors via an edge gateway; the physical enhancement prediction module uses Transformer as its core, embedding ash accumulation and temperature factors to predict photovoltaic and load ranges; the digital twin simulation module combines data to simulate energy storage thresholds and load priorities to generate an initial strategy; the scheduling strategy correction module corrects the strategy and then issues the final command; the parameter closed-loop update module collects feedback data, calibrates model weights, and optimizes the twin scenario library to achieve closed-loop optimization.

[0042] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A microgrid energy management optimization prediction method, characterized in that, Includes the following steps: A data acquisition network is constructed to simultaneously collect basic meteorological data, enhanced meteorological data, and microgrid equipment operation data, and multi-source feature vectors are generated by fusing them through an edge computing gateway. A physical enhancement prediction model was built, with Transformer as the core, and dust accumulation impact index and temperature coefficient correction factor were embedded to make interval predictions on microgrid photovoltaic output and load demand and output confidence interval results. Based on multi-source feature vectors and prediction results, the digital twin extreme scenario pre-simulation unit is invoked to simulate the energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, and generate an initial scheduling strategy. The initial scheduling strategy is modified to generate the final microgrid energy scheduling command and send it to the edge execution device; The system collects feedback data after the execution of scheduling instructions, inputs it into the parameter update unit, automatically calibrates the feature weights of the prediction model, and iteratively optimizes the parameters of the digital twin scenario library.

2. The microgrid energy management optimization and prediction method according to claim 1, characterized in that, The construction process of the data acquisition network includes: Sensing terminals are deployed in a distributed manner in the microgrid area to collect basic meteorological data through temperature, humidity, wind speed, and precipitation sensors, enhanced meteorological data through solar radiation sensors and cloud cover collectors, and microgrid equipment operation data through current, voltage, and power sensors. Set up a partition edge acquisition node to receive the first-level data through wired and wireless communication. After deduplication, outlier removal and format standardization preprocessing, structured data is formed.

3. The microgrid energy management optimization prediction method according to claim 1, characterized in that, The multi-source feature vector fusion generation process includes: The edge computing gateway receives basic meteorological data, enhanced meteorological data, and microgrid device operation data from the edge aggregation layer. Using the gateway clock as a reference, timestamp calibration is performed on data from different sources to ensure timing consistency; Outliers were removed using the 3σ principle, and missing data were supplemented using linear interpolation to achieve format standardization. Extract statistical features such as mean and rate of change from meteorological data, and extract power fluctuation and status-coded operation features from equipment data; The extracted multi-dimensional features are subjected to dimensional matching and normalization processing, and combined to form a multi-source feature vector containing meteorological and equipment operation features.

4. The microgrid energy management optimization and prediction method according to claim 1, characterized in that, The process of building the physical augmentation prediction model includes: The Transformer model is used as the core to process the time-series characteristics of photovoltaic power output and load demand, and to optimize the model prediction bias. Calculate the dust accumulation impact index and temperature coefficient correction factor, and embed them as additional features into the feature input layer of Transformer for the fusion of physical mechanism and data model; A Bayesian probability optimization method is introduced into the training of the physical augmentation prediction model to fit the prediction error distribution based on historical data and set the confidence level. The system forecasts the photovoltaic output and load demand of microgrids and outputs the corresponding forecast intervals and confidence intervals.

5. The microgrid energy management optimization and prediction method according to claim 4, characterized in that, The calculation process for the dust accumulation impact index and the temperature coefficient correction factor includes: Collect real-time monitoring data of dust accumulation thickness on the surface of photovoltaic panels, and determine the current transmittance attenuation coefficient by combining the corresponding relationship table of dust accumulation thickness and transmittance attenuation coefficient calibrated in the laboratory. The dust accumulation impact index is obtained by weighting the attenuation coefficient and the dust accumulation time. Obtain the measured ambient temperature and the rated operating temperature of the photovoltaic modules and load equipment, and calculate the temperature deviation value; Based on the temperature-efficiency correction curve of the equipment at the factory, find the efficiency correction coefficient for the corresponding deviation value; The correction coefficient is normalized to obtain the temperature coefficient correction factor.

6. The microgrid energy management optimization prediction method according to claim 1, characterized in that, The workflow of the digital twin extreme scenario pre-simulation unit includes: Import real-time operating data from the microgrid's physical topology, equipment parameters, and multi-source feature vectors to construct a digital twin that is 1:1 mapped to the physical microgrid; It includes typical extreme operating conditions of microgrids, including extreme weather scenarios, equipment failure scenarios, and load change scenarios, and clarifies the triggering conditions and parameter boundaries for each scenario; Using the prediction results as input, the unit's built-in energy flow calculation model is invoked to simulate the energy storage charging and discharging thresholds and load regulation priorities under different extreme scenarios; By analyzing the simulation results, the energy storage operation threshold and load regulation sequence that meet the supply and demand balance of the microgrid under various extreme scenarios are determined, providing data support for the generation of the initial energy dispatch strategy.

7. The microgrid energy management optimization prediction method according to claim 1, characterized in that, The process for generating the initial energy scheduling strategy includes: The multi-source feature vectors and the photovoltaic output and load demand prediction results are imported into the digital twin extreme scenario pre-simulation unit, and extreme scenarios that match the current operating conditions are selected from the unit scenario library. The digital twin extreme scenario simulation unit simulates the minimum discharge threshold and maximum charging threshold of energy storage under different scenarios based on the current SOC of energy storage and the rated charge and discharge rate of the equipment in the multi-source feature vector, combined with the predicted photovoltaic output surplus and deficit. Based on the load type and predicted load demand change trend in the multi-source feature vectors, and following the principle of prioritizing the supply of important loads, the load adjustment priority is determined by the built-in hierarchical rules of the digital twin extreme scenario pre-simulation unit. By calling the energy flow model built into the digital twin extreme scenario simulation unit, the simulated energy storage charging and discharging thresholds, load adjustment priorities, and predicted photovoltaic output and load demand are combined to calculate the microgrid supply and demand difference under different scenarios and determine whether the balance condition of output ≥ demand and equipment loss is met. Based on the supply and demand balance results, determine the energy storage operation instructions and load adjustment schemes, and combine them to form a preliminary dispatch strategy; The initial strategy is simulated in extreme scenarios by using a digital twin extreme scenario simulation unit. If there are equipment overruns or supply and demand imbalances, the thresholds and priorities are fine-tuned to finally generate the initial energy scheduling strategy.

8. The microgrid energy management optimization and prediction method according to claim 1, characterized in that, The process for correcting the initial scheduling strategy includes: The multi-source feature vectors and the photovoltaic output and load demand prediction results are used as the basis for strategy correction; Based on the equipment manufacturing standards and microgrid operation specifications, the safe operation boundary of core equipment is determined and the equipment safety constraint threshold is extracted. The energy storage charging and discharging commands, photovoltaic power allocation schemes, and load adjustment plans in the initial scheduling strategy are compared with the aforementioned safety constraint thresholds to determine whether there are any conflicts. By combining the predicted photovoltaic output range and load demand range, the microgrid supply and demand difference after the initial strategy is implemented is calculated to determine whether the balance condition of photovoltaic output plus energy storage discharge ≥ load demand plus equipment operating losses is met. If there is a supply and demand gap or excess surplus, it is marked as an item that needs to be corrected. For safety conflicts, priority should be given to correcting according to the equipment safety threshold. For supply and demand imbalances, if there is a gap, priority should be given to reducing non-core loads. If there is an excess, the energy storage charging command should be adjusted to the SOC safety limit. The revised energy storage operation instructions, photovoltaic power output control scheme, and load regulation plan are integrated to form the final microgrid energy dispatch instructions, which are then sent to edge execution devices via industrial Ethernet.

9. The microgrid energy management optimization and prediction method according to claim 1, characterized in that, The workflow of the parameter update unit includes: The microgrid operation data received after the execution of the dispatch command is received is used to extract core related parameters, including actual photovoltaic output, actual load demand, real-time equipment operation parameters and environmental measurement data, to form a dataset for unit processing. The actual values ​​in the dataset are compared with the interval prediction results output by the prediction model to calculate the prediction deviation value. The contribution of the input features of the prediction model to the deviation is analyzed by the SHAP value feature importance algorithm, and high-impact features with contribution exceeding the preset threshold are marked. Based on the feature contribution calculation results, the gradient descent method is used to adjust the feature weights of the Transformer prediction model in reverse. The device operating parameters and environmental measurement data in the dataset are compared with the preset parameters of the corresponding scenarios in the digital twin scenario library. The parameter deviation rate is calculated, and abnormal scenario parameters with deviation rates exceeding the set threshold are filtered out. For abnormal scenario parameters, the least squares method is used to fit the mapping relationship between the feedback data and the preset parameters in the scenario library, generate parameter correction coefficients, update the corresponding parameters in the scenario library with the correction coefficients, and record new working conditions not covered in the feedback data as new scenarios into the scenario library to supplement the scenario dimensions. The calibrated prediction model feature weights and optimized digital twin scenario library parameters are output to the next round of microgrid prediction and scheduling process. After obtaining the new round of scheduling feedback data, the prediction deviation rate and scenario parameter deviation rate are recalculated. If both types of deviation rates drop to within the set threshold, the current round of work is completed. If the target is not met, the above steps are repeated until the microgrid operation accuracy requirements are met.

10. A microgrid energy management optimization prediction system, used in the microgrid energy management optimization prediction method according to any one of claims 1-9, characterized in that, include: The data acquisition and fusion module constructs a data acquisition network to simultaneously collect basic meteorological data, enhanced meteorological data, and microgrid equipment operation data, and generates multi-source feature vectors through edge computing gateways. The physical enhancement prediction module builds a physical enhancement prediction model with Transformer as the core, embedding the dust accumulation impact index and temperature coefficient correction factor to perform interval prediction of microgrid photovoltaic output and load demand and output confidence interval results. The digital twin pre-simulation and initial strategy generation module, based on multi-source feature vectors and prediction results, calls the digital twin extreme scenario pre-simulation unit to simulate energy storage charging and discharging thresholds and load adjustment priorities under different operating conditions, and generates an initial scheduling strategy. The scheduling strategy correction and instruction issuance module corrects the initial scheduling strategy, generates the final microgrid energy scheduling instruction, and issues it to the edge execution device. The parameter closed-loop update module collects feedback data after the execution of scheduling instructions, inputs it into the parameter update unit, and automatically calibrates the feature weights of the prediction model and iteratively optimizes the parameters of the digital twin scenario library.