Microgrid power balance control methods, devices, equipment, and storage media
By constructing a closed-loop control method based on real-time data-driven target power prediction and adaptive dynamic weights in microgrids, the problem of the disconnect between source load prediction and fast response is solved, achieving efficient power balance control of microgrids and improving operational stability and economy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHIJIAZHUANG KE ELECTRIC
- Filing Date
- 2026-05-11
- Publication Date
- 2026-07-31
AI Technical Summary
In existing microgrid power balance control technologies, source-load prediction, optimized scheduling, and rapid response are independent modules that are serially separated. This makes it impossible to balance prediction accuracy and control real-time performance, resulting in problems such as control response lag, waste of regulation resources, and system frequency and voltage exceeding limits. This limits the large-scale promotion and engineering implementation of microgrids with a high proportion of renewable energy.
By predicting target power based on real-time power data and meteorological data, the source-load prediction difference and the total power difference are calculated. The target control level is determined and an adaptive dynamic weight is constructed to form a multi-level power difference threshold. The target optimization model is constructed and microgrid power optimization control commands are generated, realizing deep integration and closed-loop control of source-load prediction and control levels.
It achieves a balance between prediction accuracy and control response, avoids control lag and waste of regulation resources, improves the operational stability and economy of microgrids, and provides support for the large-scale promotion of microgrids with a high proportion of renewable energy.
Smart Images

Figure CN122495334A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of power grid control technology, and more specifically, relates to a microgrid power balance control method, device, equipment, and storage medium. Background Technology
[0002] A microgrid is a small-scale power generation and distribution system that integrates distributed renewable energy, energy storage units, controllable loads, and control devices. It is a core functional unit for achieving high-proportion renewable energy consumption and building a new type of power system. The core control objective of a microgrid is to maintain real-time power balance, ensure frequency / voltage stability, and achieve optimal operating economy under the operating characteristics of strong random renewable energy output and strong dynamic load demand.
[0003] Current microgrid power balance control technologies mostly adopt a layered architecture of "source load prediction - centralized optimization scheduling - local fast response," which addresses the basic requirements of operational economy and transient stability. However, in existing technologies, source load prediction, optimization scheduling, and fast response are independent modules that are serially separated. This makes it impossible to simultaneously ensure the accuracy of source load prediction and the real-time performance of control response, which can easily lead to problems such as control response lag, waste of regulation resources, and system frequency and voltage exceeding limits. This restricts the large-scale promotion and engineering implementation of microgrids with a high proportion of renewable energy. Summary of the Invention
[0004] The purpose of this application is to provide a microgrid power balance control method, device, equipment, and storage medium to solve the problem of not being able to simultaneously achieve prediction accuracy and control real-time performance. To address the above problem, the technical solution provided by this application is as follows: Firstly, a microgrid power balance control method is provided, including: The target power prediction result is obtained based on the real-time power data, real-time meteorological data and future meteorological data of the microgrid, and the source-load prediction difference is calculated based on the real-time power data of the microgrid and the target power prediction result. The full-link power difference of the microgrid is calculated based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid. The target control level is determined based on the relationship between the full-link power difference of the microgrid and the preset multi-level power difference threshold. The operating condition adaptive dynamic weight is determined based on the target control level. The target optimization model is constructed based on the operating condition adaptive dynamic weight. The target control level is a fast response control level, an optimized scheduling control level, or a forward planning control level. Based on the target power prediction results, the source-load prediction difference, the microgrid full-link power difference, the constraint boundary parameters, and the microgrid operating cost parameters, the multi-terminal power allocation value of the microgrid is obtained by solving the target optimization model. Based on the multi-terminal power allocation value and the target control level, a microgrid power optimization control command is generated; the microgrid power optimization control command is used to instruct the fast response control layer, the optimized scheduling control layer, and the forward planning control layer to perform control operations.
[0005] Secondly, a microgrid power balance control device is provided, comprising: The source-load prediction module is used to predict the target power based on the real-time power data, real-time meteorological data and future meteorological data of the microgrid, and to calculate the source-load prediction difference based on the real-time power data of the microgrid and the target power prediction result. The target optimization model construction module is used to calculate the full-link power difference of the microgrid based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid; determine the target control level based on the relationship between the full-link power difference of the microgrid and the preset multi-level power difference threshold; determine the operating condition adaptive dynamic weights based on the target control level; and construct the target optimization model based on the operating condition adaptive dynamic weights; the target control level is a fast response control layer, an optimized scheduling control layer, or a forward planning control layer. The power allocation calculation module is used to obtain the multi-terminal power allocation value of the microgrid by solving the target optimization model based on the target power prediction result, the source-load prediction difference, the microgrid full-link power difference, constraint boundary parameters and microgrid operating cost parameters. The power optimization control module is used to generate microgrid power optimization control instructions based on the multi-terminal power allocation value and the target control level; the microgrid power optimization control instructions are used to instruct the fast response control layer, the optimized scheduling control layer and the forward planning control layer to perform control operations.
[0006] Thirdly, embodiments of this application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the microgrid power balance control method provided by any possible implementation of the first aspect.
[0007] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the microgrid power balance control method provided by any possible implementation of the first aspect.
[0008] The beneficial effects of the technical solution provided in this application are as follows: Compared with related technologies, the microgrid power balance control method, apparatus, device, and storage medium provided in this application are as follows: This application addresses the core deficiency in existing technologies where source-load prediction, optimization scheduling, and rapid response are sequentially disconnected. This solution uses the source-load prediction difference and the total power difference across the entire link as a linkage link, deeply connecting power prediction, control level determination, optimization model construction, and control command generation to form a complete closed-loop control logic, fundamentally eliminating the operational risks caused by the disconnect between these links.
[0009] This application's embodiments achieve a balance between prediction accuracy and real-time control response. By employing a multi-level power difference threshold matching differential target control hierarchy and dynamically adjusting the optimization model based on real-time operating conditions, this approach ensures the economic efficiency of microgrid operation through accurate power prediction while achieving efficient response to control commands via hierarchical rapid matching. This effectively avoids problems such as control lag, waste of regulation resources, and system frequency and voltage exceeding limits, thereby improving the stability and economy of microgrid operation and providing core support for the large-scale promotion and engineering implementation of high-proportion renewable energy microgrids. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0011] Figure 1 A schematic flowchart of the microgrid power balance control method provided in the embodiments of this application; Figure 2 This is a structural block diagram of a microgrid power balance control device provided in an embodiment of this application; Figure 3 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0012] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0013] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.” When describing multiple (two or more) items, if the relationship between the multiple items is not explicitly defined, the multiple items can refer to one, several or all of the multiple items. For example, the description of "parameter A includes A1, A2, A3" can be implemented as parameter A includes A1 or A2 or A3, or it can be implemented as parameter A includes at least two of the three items A1, A2 and A3.
[0014] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0016] This application provides a microgrid power balance control method, which can be executed by electronic devices, such as... Figure 1 As shown, the method may include: S101: The target power prediction result is obtained based on the real-time power data, real-time meteorological data and future meteorological data of the microgrid. The source-load prediction difference is calculated based on the real-time power data and target power prediction result of the microgrid.
[0017] In this embodiment, the target power prediction result is obtained based on the microgrid's real-time power data, real-time meteorological data, and future meteorological data, including: Based on real-time power data, real-time meteorological data, and future meteorological data of the microgrid, the initial prediction results are obtained through the target source load power prediction model. The target source load power prediction model is trained on the initial source load power prediction model based on LSTM and attention based on the historical power data and historical meteorological data of the microgrid. The initial prediction results are compensated for errors based on historical prediction error data of the target source load power prediction model to obtain the target power prediction results.
[0018] In this embodiment, the target power prediction results include the target renewable energy predicted output and the target load predicted power; The source-load prediction difference is calculated based on the real-time power data and target power prediction results of the microgrid, including: Based on the real-time power data of the microgrid, the real-time renewable energy output and real-time load power at the current moment can be obtained. The difference between the target renewable energy forecast output and the real-time renewable energy output is calculated as the renewable energy output difference; The difference between the target load forecast power and the real-time load power is calculated as the load power difference; The difference between renewable energy output and load power is used as the source-load forecast difference.
[0019] In this embodiment, the real-time power data of the microgrid refers to the real-time power output of the power generation and consumption units within the microgrid, such as the real-time output power of distributed power sources and the real-time demand power of local loads. Real-time meteorological data refers to the meteorological environmental parameters collected in real-time in the area where the microgrid is located, such as real-time irradiance, wind speed, and ambient temperature. Future meteorological data refers to the meteorological forecast data for the corresponding area in the future, such as irradiance and wind speed forecast data for the next hour, measured in 15-minute increments. The target power prediction result refers to the ultra-short-term predicted value of the microgrid source-load power after error compensation correction, including the predicted output of target renewable energy and the predicted power of target load, such as the predicted output of photovoltaic and wind power and the predicted load power for the next hour, measured in minute increments. The source-load prediction difference refers to the deviation between the predicted source-load value and the real-time measured value, including the difference in renewable energy output and the difference in load power, which can be calculated based on the difference between the predicted value and the real-time value. The target source-load power prediction model refers to a deep learning model for source-load power prediction trained on historical data. It is built upon a Long Short-Term Memory (LSTM) network and an attention mechanism, and can be trained using historical power data and historical meteorological data from microgrids. The initial prediction result refers to the power prediction value directly output by the model without error compensation. Historical prediction error data refers to the deviation between the model's past predictions and corresponding measured values; error compensation refers to the process of correcting the initial prediction result based on this data.
[0020] For example, this embodiment takes a high-proportion renewable energy microgrid in an industrial park as the implementation object. The system has a rated capacity of 1000kVA and is configured with a 500kW photovoltaic power station, a 300kW wind power station, and a 200kWh / 100kW lithium iron phosphate energy storage system. The specific technical implementation steps are as follows: This embodiment can collect microgrid electrical operation data at a set acquisition frequency of 10ms per acquisition, extracting real-time power data, including real-time output power of photovoltaic and wind power and real-time demand power of local loads; collect real-time meteorological data at a frequency of 1min per acquisition, including real-time irradiance, wind speed and ambient temperature, and simultaneously acquire future meteorological data for the next 4 hours in 15-minute increments issued by the meteorological department, extracting forecast data for the next hour as model input; simultaneously collect historical power data of the microgrid in minute increments over the past 24 hours and historical meteorological data for the corresponding time periods, complete data cleaning and normalization preprocessing, remove abnormal jump data, and provide basic data support for model training and prediction.
[0021] This embodiment can supervise the training of an initial source-load power prediction model built on LSTM and an attention mechanism based on preprocessed historical power and meteorological data. Using historical power data as labels, the model parameters are iteratively optimized until the model converges, resulting in a trained target source-load power prediction model. Preprocessed real-time power data, real-time meteorological data, and one-hour weather forecast data are input into the trained target source-load power prediction model. The model extracts power time-series features through an LSTM network and assigns high weights to meteorological features strongly correlated with power fluctuations, such as irradiance and wind speed, using an attention mechanism to filter out invalid interference features. The model then outputs initial prediction results, including initial renewable energy predicted output and initial load predicted power.
[0022] This embodiment can collect historical prediction error data from the target source-load power prediction model, i.e., the deviation data between the predicted values and the corresponding measured values for historical periods. An error compensation model is constructed based on extreme learning machine, and the training and updating of the error compensation model are completed. The initial prediction results are input into the trained error compensation model, and the initial prediction results are corrected in real time online to obtain the final target power prediction results, including the target renewable energy predicted output and the target load predicted power. Every 15 minutes, the minute-by-minute target power prediction results for the next hour are regenerated based on the latest collected data, matching the time window for subsequent minute-level scheduling.
[0023] This embodiment can extract the real-time renewable energy output and real-time load power from the real-time power data of the microgrid. It can calculate the difference between the target renewable energy output forecast and the real-time renewable energy output to obtain the renewable energy output difference; it can also calculate the difference between the target load power forecast and the real-time load power to obtain the load power difference. The renewable energy output difference and the load power difference are combined to obtain the final source-load prediction difference. Furthermore, this embodiment can collect the source-load prediction difference every 2 minutes. When the source-load prediction difference exceeds 5% of the corresponding prediction value, it immediately triggers an online update of the error compensation model's parameters to match the boundary requirements of subsequent millisecond-level control.
[0024] For example, the initial source-load power prediction model in this embodiment adopts a two-layer main structure of LSTM network combined with attention mechanism, and is equipped with an Extreme Learning Machine (ELM) error compensation module to form a complete model. In the main structure, the basic feature extraction layer is a two-layer bidirectional LSTM network with 64 neurons in each layer, used to extract long-term time-series dependent features of source-load power and capture the time-series variation law of renewable energy output and load power; the attention mechanism layer is connected to the output of LSTM network and is used to adaptively allocate weights to input features, giving higher weights to meteorological features that are strongly correlated with power fluctuations, such as irradiance and wind speed, filtering out invalid interference features, and finally outputting the initial prediction result. The supporting error compensation module adopts a single hidden layer ELM network with 32 neurons in the hidden layer, used to correct the initial prediction result online in real time to obtain the final target power prediction result.
[0025] This embodiment can be implemented using an industrial park microgrid, with historical operating data from the site over the past 12 months as the training basis. The data sampling interval is 1 minute, with 80% of the data used as the training set, 10% as the validation set, and 10% as the test set. The training process is divided into two stages. In the first stage, the initial model using the LSTM-attention mechanism is trained under supervision, using historical measured power data as labels. The Adam optimizer is used to iteratively optimize the model parameters, with an initial learning rate of 0.001 and an iteration batch size of 32. Iteration stops when the mean absolute percentage error of the validation set is below 3%, completing the training of the basic prediction model. In the second stage, based on the historical prediction error data of the basic model, the ELM error compensation network is trained to complete the overall construction of the target source-load power prediction model. The trained model can be directly deployed to the microgrid central controller.
[0026] In actual operation, this embodiment can input real-time power data, real-time meteorological data, and one-hour weather forecast data of the microgrid into the trained model. After feature extraction by the LSTM network and weight allocation by the attention mechanism, the initial prediction result is obtained. Then, the ELM network completes error compensation and outputs the final target power prediction result. This embodiment can regenerate the minute-by-minute prediction curve for the next hour every 15 minutes based on the latest collected data to match the minute-level rolling scheduling requirements. Every 2 minutes, the source-load prediction difference between the predicted value and the measured value is checked. When the difference exceeds 5% of the corresponding predicted value, the online parameter update of the ELM network is immediately triggered to match the boundary requirements of subsequent millisecond-level emergency control, providing accurate data support for subsequent full-link power difference calculation and control level determination.
[0027] This embodiment can effectively improve the accuracy of source-load power prediction, realize deep linkage between the prediction stage and the subsequent control stage, take into account both prediction accuracy and control response real-time performance, reduce the adverse effects of prediction deviation on microgrid power balance control from the root, and ensure the stable and economical operation of microgrid.
[0028] S102: Calculate the full-link power difference of the microgrid based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interactive power between the large power grid and the microgrid; determine the target control level based on the relationship between the full-link power difference of the microgrid and the preset multi-level power difference threshold; determine the operating condition adaptive dynamic weight based on the target control level; and construct the target optimization model based on the operating condition adaptive dynamic weight; the target control level is a fast response control level, an optimized scheduling control level, or a forward planning control level.
[0029] In this embodiment, the real-time charging and discharging power of energy storage includes the real-time charging power and the real-time discharging power of energy storage; the real-time interaction power between the large power grid and the microgrid includes the input power from the large power grid to the microgrid and the output power from the microgrid to the large power grid; and the source-load forecast difference includes the difference in renewable energy output and the difference in load power. The full-link power difference of the microgrid is calculated based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid, including: Based on the predicted source-load difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid, the full-link power difference of the microgrid is calculated using the full-link real-time power difference calculation formula. The formula for calculating the real-time power difference across the entire link is as follows:
[0030]
[0031] Where t is the current time, Let t be the total power difference of the microgrid at time t. The difference in contribution to renewable energy, For the difference in load power, Let be the real-time discharge power of the stored energy at time t. Let be the real-time charging power of the energy storage at time t. Let be the input power from the large power grid to the microgrid at time t. Let t be the output power of the microgrid to the main grid. Let t be the actual transmission loss of the line at time t. Let be the real-time line current at time t. This is the equivalent resistance of the circuit.
[0032] In this embodiment, the multi-level power difference threshold is determined based on the rated capacity of the microgrid. The multi-level power difference threshold includes a first-level power difference threshold, a second-level power difference threshold, and a third-level power difference threshold. The first-level power difference threshold, the second-level power difference threshold, and the third-level power difference threshold decrease sequentially. The adaptive dynamic weight of the operating condition includes economic weight and system stability weight. The target control level is determined based on the relationship between the power difference across the entire microgrid link and the preset multi-level power difference thresholds, including: If the total power difference across the microgrid is greater than the first-level power difference threshold, then the dominant control layer is determined to be the fast response control layer. If the total power difference across the microgrid is not greater than the first-level power difference threshold but is greater than the second-level power difference threshold, then the dominant control layer is determined to be the optimized scheduling control layer. If the total power difference across the microgrid is not greater than the secondary power difference threshold, then the dominant control layer is determined to be the forward planning control layer. The control time scales of each control layer are different; the fast response control layer is used for power balance control under millisecond-level emergency conditions, the optimized scheduling control layer is used for power balance control under second-level correction conditions, and the forward planning control layer is used for power balance control under minute-level economic conditions.
[0033] In this embodiment, the adaptive dynamic weights for operating conditions include economic weights and system stability weights; The adaptive dynamic weights for operating conditions are determined based on the target control hierarchy, including: If the target control level is the fast response control level, then the first-level weight coefficient corresponding to the fast response control level is determined as the working condition adaptive dynamic weight. If the target control level is the optimized scheduling control level, then the secondary weight coefficients corresponding to the optimized scheduling control level are determined as the adaptive dynamic weights for the operating conditions. If the target control level is the forward planning control level, then the three-level weight coefficients corresponding to the forward planning control level are determined as the adaptive dynamic weights for the operating conditions. The ratios of the economic weight to the system stability weight corresponding to the first-level weight coefficient, the second-level weight coefficient, and the third-level weight coefficient increase sequentially.
[0034] In this embodiment, the target optimization model is:
[0035] in, The objective function value, As an economic weight, For system stability weights, For microgrid operating cost parameters, This represents the system power fluctuation. Microgrid operating costs can include equipment maintenance costs, mains grid electricity purchase costs, and diesel generator fuel costs.
[0036] In this embodiment, the microgrid end-to-end power difference refers to the difference between the total power generated on the generation side and the total power consumed on the consumption side of the entire microgrid system in real time. It is used to characterize the degree of real-time power imbalance in the system and can be calculated based on the source-load prediction difference, the real-time charging and discharging power of energy storage, the real-time interactive power of the main grid, and line transmission losses. The multi-level power difference threshold refers to a set of critical values set based on the rated capacity of the microgrid to classify the power fluctuation levels of the system, including the first-level power difference threshold, the second-level power difference threshold, and the third-level power difference threshold, used to match the corresponding control levels. The values of the first-level power difference threshold, the second-level power difference threshold, and the third-level power difference threshold decrease sequentially. The first-level power difference threshold is the largest critical value among the multi-level thresholds, used to determine emergency conditions of large power fluctuations in the system. It can be set to 5% of the microgrid's rated capacity and calculated based on the microgrid's rated capacity. The second-level power difference threshold is the critical value between the first-level and third-level power difference thresholds, used to determine correction conditions of moderate power fluctuations in the system. It can be set to 2% of the microgrid's rated capacity. The third-level power difference threshold is the smallest critical value, used to determine the economic conditions of stable system operation. Adaptive dynamic weights refer to coefficients that adjust in real time according to the system's operating conditions and are used to allocate the priority of optimization objectives. These include economic weights and system stability weights, determined according to the target control level. The economic weight corresponds to the goal of minimizing system operating costs; a larger value prioritizes economic efficiency. The system stability weight corresponds to the goal of minimizing system power fluctuations; a larger value prioritizes operational stability. The first-level, second-level, and third-level weight coefficients are the weight combinations corresponding to the fast response control layer, the optimized scheduling control layer, and the forward planning control layer, respectively. The ratio of the economic weight to the system stability weight increases sequentially. Actual transmission loss refers to the real-time power loss of a microgrid transmission line caused by resistance heating. It is used for accurate calculation of the power difference across the entire link and can be calculated based on the real-time current and equivalent resistance of the line.
[0037] For example, this embodiment takes a high-proportion renewable energy grid-connected microgrid in an industrial park as the implementation object. The core system configuration is a rated capacity of 1000kVA, a 500kW photovoltaic power station, a 300kW wind power station, a 200kWh / 100kW lithium iron phosphate energy storage system, a 100kW diesel generator backup unit, a 10kV mains grid connection interface, and a line equivalent resistance of 0.5Ω. The specific technical implementation steps are as follows: The first step is the real-time acquisition and standardized preprocessing of basic operational data. In this embodiment, a microgrid monitoring and control device can acquire real-time data across the entire electrical operation chain at a frequency of 10ms, including real-time output of photovoltaic and wind power, real-time local load demand, real-time charging and discharging power of energy storage, input power from the main grid to the microgrid, output power from the microgrid to the main grid, and real-time RMS values of the three-phase current of the lines. This embodiment can also acquire energy storage state of charge (SOC) and battery temperature data at a frequency of 100ms. All acquired data is transmitted to the microgrid central controller in real time. This embodiment can preprocess the acquired raw data, removing abnormal jump values using the 3σ criterion, and completing missing data using linear interpolation between adjacent time points, thus completing the data normalization process and providing standardized data support for subsequent calculations.
[0038] The second step is the real-time rolling calculation of the microgrid's total power difference. The central controller calculates the total power difference in a rolling manner based on preprocessed real-time data with a period of 10ms. First, this embodiment can calculate the actual transmission loss of the line. Based on the collected real-time effective value of the line current and the preset equivalent resistance of the line, the actual transmission loss of the line at the current moment is calculated. This embodiment can then combine the renewable energy output difference, load power difference, real-time charging and discharging power of energy storage, and real-time interaction power of the main grid obtained in the previous steps, and substitute them into the total power difference calculation formula to obtain the current total power difference of the microgrid. For example, in a midday cloud cover scenario, the collected renewable energy output difference is -80kW, load power difference is 5kW, real-time energy storage discharge power is 50kW, real-time charging power is 0kW, main grid input power is 0kW, output power is 0kW, and actual line transmission loss is 5kW. The calculated total power difference at the current moment is -110kW.
[0039] The third step is the preset and calibration of multi-level power difference thresholds. This embodiment uses the microgrid's rated capacity as the sole unified benchmark to calibrate multi-level power difference thresholds. The first-level power difference threshold is set to 5% of the microgrid's rated capacity, i.e., 50kW; the second-level power difference threshold is set to 2% of the microgrid's rated capacity, i.e., 20kW; the third-level power difference threshold is the same as the second-level threshold, also 20kW, with the thresholds decreasing sequentially from first-level to third-level. This threshold setting has been verified through offline simulation and can accurately match different power fluctuation scenarios in the microgrid, avoiding false triggering at the control level. The threshold parameters are preset in the microgrid's central controller and can be adjusted synchronously based on the rated capacity according to microgrid expansion and upgrades.
[0040] The fourth step is real-time determination of the target control level. The central controller compares the absolute value of the full-link power difference calculated in real time with the preset multi-level power difference thresholds to uniquely determine the target control level at the current moment. For example, when the absolute value of the full-link power difference is 110kW, which is greater than the first-level power difference threshold of 50kW, the dominant control level is immediately determined to be the fast response control level; when the transient stability is achieved, and the absolute value of the full-link power difference falls back to 35kW, which is not greater than the first-level threshold but greater than the second-level threshold, the dominant control level is determined to be the optimized scheduling control level; when the steady-state correction is completed, and the absolute value of the full-link power difference falls back to 15kW, which is not greater than the second-level threshold, the dominant control level is determined to be the forward planning control level. The entire determination process is synchronized with the data acquisition frequency and executed in milliseconds to ensure that the level switch is completed immediately when the operating conditions change.
[0041] The fifth step is the matching and determination of adaptive dynamic weights for operating conditions. In this embodiment, based on the determined target control level, corresponding weight coefficients are matched as adaptive dynamic weights for operating conditions. These weight coefficients are pre-set in the central controller and correspond one-to-one with the control level. When the target control level is the fast response control level, a first-level weight coefficient is determined as the adaptive dynamic weight for operating conditions, with a system stability weight of 0.8 and an economic weight of 0.2. When the target control level is the optimized scheduling control level, a second-level weight coefficient is determined as the adaptive dynamic weight for operating conditions, with a system stability weight of 0.5 and an economic weight of 0.5. When the target control level is the forward planning control level, a third-level weight coefficient is determined as the adaptive dynamic weight for operating conditions, with a system stability weight of 0.2 and an economic weight of 0.8. The ratio of the economic weight to the system stability weight increases sequentially for each of the three levels.
[0042] Step 6: Construction of the target optimization model. This embodiment can construct a dual-objective optimization model based on the matched operating condition adaptive dynamic weights. The dual optimization objectives are minimizing the microgrid operating cost and minimizing system power fluctuations. At the same time, four rigid constraints are preset: power balance constraints, equipment rated parameter constraints, system safety and stability constraints, and energy storage SOC hard protection constraints. This provides a complete model foundation for subsequent model solving and control command generation.
[0043] This embodiment sets multi-level power difference thresholds based on the microgrid's rated capacity as a unified benchmark, solving the core defects of existing technologies such as the disconnect between control thresholds and system scale, and the susceptibility to hierarchical mis-triggering. This embodiment achieves real-time adaptation of optimization targets to system operating conditions through deep binding of target control levels and adaptive dynamic weights. At the same time, this embodiment realizes a closed-loop process for power difference calculation, level determination, and optimization modeling, taking into account both system transient stability and operational economy, and improving the reliability and economy of microgrid operation.
[0044] S103: Based on the target power prediction results, source-load prediction difference, microgrid full-link power difference, constraint boundary parameters, and microgrid operating cost parameters, the multi-terminal power allocation value of the microgrid is obtained by solving the target optimization model.
[0045] In this embodiment, constraint boundary parameters refer to rigid limiting parameters that cannot be broken for the safe and stable operation of the microgrid. These may include, for example, the upper and lower limits of equipment rated operation, the hard protection range of energy storage SOC, and the allowable fluctuation range of system frequency and voltage, used to define the solution boundary of the optimization model. Microgrid operating cost parameters refer to the basic coefficients for calculating the full-cycle operating cost of the microgrid. These may include, for example, the time-of-use electricity price of the main grid, the unit fuel cost of diesel generators, and the unit operation and maintenance cost of equipment, which can be obtained based on the publicly available electricity price of the grid and the parameters of the equipment manufacturer. The objective optimization model refers to the condition-adaptive dynamic weighted bi-objective optimization model used to solve for the globally optimal power allocation scheme. The multi-terminal power allocation value refers to the target power setting value of each controllable unit, which is the direct output result of the optimization model.
[0046] For example, this embodiment takes a high-proportion renewable energy grid-connected microgrid in an industrial park as the implementation object. The system has a rated capacity of 1000kVA, and is equipped with a 500kW photovoltaic power station, a 300kW wind power station, a 200kWh / 100kW lithium iron phosphate energy storage system, a 100kW diesel generator backup unit, a 10kV mains grid connection interface, and a line equivalent resistance of 0.5Ω. The specific technical implementation steps are as follows: The first step is to optimize the collection and standardization preprocessing of model input parameters. The microgrid central controller collects the full-link input parameters in real time. The target power prediction result comes from the output of the preceding fusion prediction model, which updates the predicted renewable energy output and load power for the next hour every 15 minutes. The source-load prediction difference is the deviation data between the predicted value calculated every 2 minutes and the real-time measured value. The microgrid full-link power difference is the real-time power imbalance data of the system calculated on a rolling basis with a 10ms cycle. The constraint boundary parameters are pre-set in the central controller, specifically including the maximum output of photovoltaic power of 500kW, the maximum output of wind power of 300kW, the maximum charging and discharging power of energy storage of 100kW, and the maximum interactive power of the grid connection interface. The system parameters are: ±300kW, energy storage SOC hard protection range of 20% to 90%, healthy operation range of 40% to 80%, system frequency allowable fluctuation range of ±0.2Hz, and voltage allowable fluctuation range of ±7% of the rated value. Microgrid operating cost parameters are derived from publicly available time-of-use tariffs from the power grid company and maintenance parameters provided by equipment manufacturers. Specifically, these include the peak-hour electricity purchase price of the main grid (0.85 yuan / kWh), the flat-hour price (0.55 yuan / kWh), the valley-hour price (0.25 yuan / kWh), the grid-connected electricity price (0.39 yuan / kWh), the unit fuel cost of diesel generators (2.1 yuan / kWh), and the unit maintenance cost of each piece of equipment (0.03 yuan / kWh). All collected parameters are preprocessed with normalization to remove anomalous jump data, providing standardized input for model solving.
[0047] The second step is to lock the target optimization model and initialize the solution algorithm. This embodiment can lock the target priority of the dual-objective optimization model based on the target control level and adaptive dynamic weights of the operating conditions determined in the previous steps. For example, if the absolute value of the current system's total power difference is 15kW, which is not greater than the secondary power difference threshold of 20kW, it is determined to be a Level 3 economic operating condition, corresponding to an economic weight of 0.8 and a system stability weight of 0.2, thus locking the core calculation rules of the optimization model. Simultaneously, the initialization settings of the solution algorithm are completed. An improved non-dominated sorting genetic algorithm is adopted, with a population size of 100, a maximum number of generations of evolution of 50, a crossover probability of 0.9, and a mutation probability of 0.1, completing the algorithm initialization.
[0048] The third step is iterative solution with constraint pre-verification. The algorithm randomly generates an initial population, with each individual in the population corresponding to a set of candidate schemes for multi-terminal power allocation in the microgrid. In this embodiment, constraint compliance pre-verification is performed on each set of candidate schemes, checking whether all constraint boundary parameters are met. Candidate schemes that do not meet any constraint are directly determined as invalid solutions and removed from the population. In this embodiment, the dual objective function value is calculated for valid candidate schemes that pass the verification, and non-dominated sorting and congestion calculation are performed. The next generation population is generated through selection, crossover, and mutation operations. At the same time, an elite retention strategy is used to merge excellent individuals from the parent generation into the offspring population, and the iterative verification and calculation process is repeated. When the number of iterations reaches 32 generations, the objective function value reaches the preset convergence threshold, the iteration is terminated, and the converged Pareto optimal solution set is output.
[0049] The fourth step is the final determination of the multi-terminal power allocation values. This embodiment can, based on the priority requirements of the current Level 3 economic operating conditions, select the optimal compromise solution with the lowest operating cost from the Pareto optimal solution set, ultimately obtaining the microgrid's multi-terminal power allocation values. Specifically, these include a target output of 480kW for photovoltaic power, 280kW for wind power, 50kW for energy storage discharge power, 0kW for the main grid's target interactive power, 0kW for diesel generator output, and 0kW for flexible load adjustment, thus completing the solution and output of the multi-terminal power allocation values.
[0050] This embodiment can achieve globally optimal power allocation for multiple controllable units in a microgrid, taking into account both the economic efficiency and power stability of system operation. By constraining pre-verification, it avoids the risk of equipment exceeding limits from the source, provides an accurate and reliable execution benchmark for power balance control, and effectively improves the level of renewable energy consumption.
[0051] S104: Generate microgrid power optimization control commands based on multi-terminal power allocation values and target control hierarchy.
[0052] In this embodiment, the microgrid power optimization control command includes device-level execution commands for each controllable unit of the microgrid; Microgrid power optimization control commands are generated based on multi-terminal power allocation values and target control hierarchy, including: Based on the time scale and hierarchical coordination rules corresponding to the target control level, the multi-terminal power allocation value is coordinated and corrected to obtain the corrected power allocation benchmark. The revised power allocation reference is converted into device-level execution instructions for each controllable unit of the microgrid. According to the instruction execution priority and control cycle corresponding to the target control level, the device-level execution instructions of each controllable unit of the microgrid are sent to the central controller and local execution unit of the corresponding control level.
[0053] In this embodiment, the microgrid power optimization control command refers to the executable command used to regulate the operating state of each unit in the microgrid, including device-level execution commands for each controllable unit, which can be generated based on multi-terminal power allocation values and the target control level. Each controllable unit in the microgrid refers to an electrical device within the microgrid that can actively adjust its operating state, such as distributed power converters, energy storage converters, grid-connected interface controllers, flexible load control units, and standby power generation units. The device-level execution command refers to a specific operating parameter command that can be directly issued to a single device for execution, such as energy storage charging and discharging power commands and inverter output setting commands. The time scale refers to the command execution and update cycle corresponding to the control level, such as the millisecond-level time scale corresponding to the fast response control layer. The hierarchical coordination rule refers to the preset rules for feedforward-feedback bidirectional linkage between the three-layer control architecture, used to achieve conflict-free command coordination between levels. Coordination correction refers to the adaptation adjustment of multi-terminal power allocation values based on the hierarchical coordination rules; the corrected power allocation benchmark refers to the adjusted steady-state power operation target value. Command execution priority refers to the order in which commands at different control levels are executed; control cycle refers to the fixed interval between command updates; central controller refers to the core equipment for global control of the microgrid; and local execution unit refers to the local controller that is associated with each device.
[0054] For example, this embodiment takes a high-proportion renewable energy grid-connected microgrid in an industrial park as the implementation object. The system has a rated capacity of 1000kVA and is configured with a 500kW photovoltaic power station, a 300kW wind power station, a 200kWh / 100kW lithium iron phosphate energy storage system, a 100kW diesel generator backup unit, and a 10kV mains grid connection interface. The preset first-level power difference threshold is 50kW, and the preset second-level power difference threshold is 20kW. The hierarchical coordination rules are preset in the microgrid central controller. The specific technical implementation steps are as follows: The first step is the real-time aggregation of multi-terminal power allocation values and basic parameters of the target control level. The microgrid central controller receives the multi-terminal power allocation values output from the optimization model in real time, simultaneously locks the target control level that has been determined at the current moment, and retrieves the corresponding time scale and level coordination rules. For example, if cloud cover at midday causes a sharp drop in photovoltaic output, and the absolute value of the power difference across the entire system is 110kW, which is greater than the first-level threshold of 50kW, the target control level is determined to be the fast response control level, with a corresponding time scale of milliseconds, and the downlink feedforward coordination rules are retrieved; when the absolute value of the power difference is 35kW after transient stabilization, the target control level is determined to be the optimized scheduling control level, with a corresponding time scale of seconds, and the uplink feedback and downlink reference coordination rules are retrieved; when the absolute value of the power difference is 15kW after steady-state correction, the target control level is determined to be the forward planning control level, with a corresponding time scale of minutes, and the rolling scheduling reference distribution coordination rules are retrieved.
[0055] The second step is the collaborative correction of multi-terminal power allocation values based on hierarchical collaborative rules. The central controller adapts and adjusts the multi-terminal power allocation values according to the collaborative rules corresponding to the target control level, obtaining the corrected power allocation benchmark. For the fast-response control layer scenario, the multi-terminal power allocation values are: 500kW full photovoltaic power generation, 300kW full wind power generation, 100kW full energy storage discharge, and 0kW large-grid interaction power. Based on the downlink feedforward collaborative rules, this power allocation value is synchronously fed forward to the optimized scheduling control layer and the forward planning control layer. This triggers the optimized scheduling layer to pre-calculate the correction amount in advance, and the forward planning layer to update the prediction curve. Simultaneously, it verifies whether the allocation value meets the hard protection constraint of the energy storage SOC. Currently, the energy storage SOC is 55%, which is within the healthy range and requires no adjustment. Finally, the corrected power allocation benchmark is obtained. For the optimized scheduling control layer scenario, based on the uplink feedback coordination rules, the system receives the rolling scheduling benchmark from the forward planning layer, performs steady-state correction on the multi-terminal power allocation values, and smoothly adjusts the energy storage discharge power from 100kW to 50kW. Simultaneously, the correction result is fed back to the fast response control layer to optimize the droop control coefficient, resulting in the corrected power allocation benchmark. For the forward planning control layer scenario, based on the rolling scheduling coordination rules, the multi-terminal power allocation values are sent to the optimized scheduling control layer as the scheduling benchmark for the next 15 minutes, completing the coordinated correction.
[0056] The third step is the conversion of the revised power allocation benchmark into device-level execution commands. The central controller converts each power target value in the revised power allocation benchmark into a corresponding device-level execution command for the controllable unit, specifying the execution parameters and adjustment rate requirements of the command. For example, the photovoltaic target output of 500kW is converted into the maximum power point tracking control parameters and output limit command for the photovoltaic inverter; the energy storage target discharge power of 100kW is converted into the charging and discharging power command for the energy storage converter, setting the adjustment rate to 2kW / ms to ensure full-power operation within 50ms; the diesel generator target output of 0kW is converted into a standby command; and the grid target interaction power of 0kW is converted into a power interlock command for the grid connection interface, completing the conversion of all device-level execution commands.
[0057] The fourth step is the hierarchical issuance and execution of device-level execution instructions. The central controller issues instructions according to the instruction execution priority and control cycle corresponding to the target control level. In the fast response control layer scenario, the instruction execution priority is set to the highest level, the control cycle is 50ms, and the device-level execution instructions are directly issued to the local execution units of each unit, while the central controller is simultaneously copied for backup. In the optimized scheduling control layer scenario, the instruction priority is set to the medium level, the control cycle is 2s, and the instructions are first issued to the central controller to complete steady-state verification, and then issued to the local execution units. In the forward planning control layer scenario, the instruction priority is set to the normal level, the control cycle is 15min, and the instructions are issued and executed segment by segment according to the rolling scheduling window.
[0058] This embodiment achieves deep adaptation between power allocation commands and control levels, solving the defects of serial fragmentation and command conflicts in existing hierarchical control, ensuring rapid response of control commands and global optimal coordination, and improving the stability and economy of microgrid power balance control.
[0059] Based on the same principle as the microgrid power balance control method provided in the embodiments of this application, the embodiments of this application also provide a microgrid power balance control device, such as... Figure 2 As shown, the microgrid power balance control device 20 may specifically include: a source load prediction module 21, a target optimization model construction module 22, a power allocation calculation module 23, and a power optimization control module. The source load prediction module 21 is used to predict the target power prediction result based on the real-time power data, real-time meteorological data, and future meteorological data of the microgrid, and to calculate the source load prediction difference based on the real-time power data of the microgrid and the target power prediction result. The target optimization model construction module 22 is used to calculate the full-link power difference of the microgrid based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid; determine the target control level based on the relationship between the full-link power difference of the microgrid and the preset multi-level power difference threshold; determine the operating condition adaptive dynamic weight based on the target control level; and construct the target optimization model based on the operating condition adaptive dynamic weight; the target control level is a fast response control level, an optimized scheduling control level, or a forward planning control level. The power allocation calculation module 23 is used to obtain the multi-terminal power allocation value of the microgrid by solving the target optimization model based on the target power prediction result, the source-load prediction difference, the microgrid full-link power difference, constraint boundary parameters and microgrid operating cost parameters. The power optimization control module 24 is used to generate microgrid power optimization control instructions based on the multi-terminal power allocation value and the target control level; the microgrid power optimization control instructions are used to instruct the fast response control layer, the optimized scheduling control layer and the forward planning control layer to perform control operations.
[0060] In one embodiment of this application, the source load prediction module 21 is specifically used to: obtain an initial prediction result through a target source load power prediction model based on real-time power data, real-time meteorological data and future meteorological data of the microgrid; the target source load power prediction model is obtained by training an initial source load power prediction model based on LSTM and attention based on historical power data and historical meteorological data of the microgrid. The initial prediction result is compensated for errors based on the historical prediction error data of the target source load power prediction model to obtain the target power prediction result.
[0061] In one embodiment of this application, the real-time energy storage charging and discharging power includes real-time energy storage charging power and real-time energy storage discharging power; the real-time interaction power between the large power grid and the microgrid includes the input power from the large power grid to the microgrid and the output power from the microgrid to the large power grid; the source-load prediction difference includes the renewable energy output difference and the load power difference; the target optimization model construction module 22 is specifically used to: calculate the full-link power difference of the microgrid based on the source-load prediction difference, the real-time energy storage charging and discharging power of the microgrid, and the real-time interaction power between the large power grid and the microgrid, using the full-link real-time power difference calculation formula; The formula for calculating the real-time power difference across the entire link is as follows:
[0062]
[0063] Where t is the current time, Let t be the total power difference of the microgrid at time t. The difference in contribution to renewable energy, For the difference in load power, Let be the real-time discharge power of the stored energy at time t. Let be the real-time charging power of the energy storage at time t. Let be the input power from the large power grid to the microgrid at time t. Let t be the output power of the microgrid to the main grid. Let t be the actual transmission loss of the line at time t. Let be the real-time line current at time t. This is the equivalent resistance of the circuit.
[0064] In one embodiment of this application, the multi-level power difference threshold is determined based on the rated capacity of the microgrid. The multi-level power difference threshold includes a first-level power difference threshold, a second-level power difference threshold, and a third-level power difference threshold. The first-level power difference threshold, the second-level power difference threshold, and the third-level power difference threshold decrease sequentially. The adaptive dynamic weight of the operating condition includes an economic weight and a system stability weight. The target optimization model construction module 22 is further used to: if the power difference across the entire microgrid link is greater than the first-level power difference threshold, then determine the dominant control layer as the fast response control layer. If the total power difference of the microgrid is not greater than the first-level power difference threshold but is greater than the second-level power difference threshold, then the dominant control layer is determined to be the optimized scheduling control layer. If the total power difference of the microgrid is not greater than the secondary power difference threshold, then the dominant control layer is determined to be the forward planning control layer. The control time scales of each control layer are different; the fast response control layer is used for power balance control under millisecond-level emergency conditions, the optimized scheduling control layer is used for power balance control under second-level correction conditions, and the forward planning control layer is used for power balance control under minute-level economic conditions.
[0065] In one embodiment of this application, the target optimization model construction module 22 is further configured to: if the target control level is the fast response control level, determine the first-level weight coefficient corresponding to the fast response control level as the working condition adaptive dynamic weight; If the target control level is the optimized scheduling control level, then the secondary weight coefficient corresponding to the optimized scheduling control level is determined as the working condition adaptive dynamic weight. If the target control level is the forward planning control level, then the three-level weight coefficients corresponding to the forward planning control level are determined as the working condition adaptive dynamic weights. The ratios of the economic weight to the system stability weight corresponding to the first-level weight coefficient, the second-level weight coefficient, and the third-level weight coefficient increase sequentially.
[0066] In one embodiment of this application, the target power prediction result includes the target renewable energy predicted output and the target load predicted power; the source-load prediction module 21 is further configured to: obtain the real-time renewable energy output and real-time load power at the current moment based on the real-time power data of the microgrid; The difference between the predicted output of the target renewable energy source and the real-time renewable energy output is calculated as the renewable energy output difference; The difference between the target load prediction power and the real-time load power is calculated as the load power difference; The difference in renewable energy output and the difference in load power are used as the source-load prediction difference.
[0067] In one embodiment of this application, the microgrid power optimization control command includes device-level execution commands for each controllable unit of the microgrid; the power optimization control module 24 is specifically used to: based on the time scale and hierarchical coordination rules corresponding to the target control level, coordinately correct the multi-terminal power allocation value to obtain the corrected power allocation benchmark; The modified power allocation reference is converted into device-level execution instructions for each controllable unit of the microgrid. According to the instruction execution priority and control cycle corresponding to the target control level, the device-level execution instructions of each controllable unit of the microgrid are sent to the central controller and local execution unit of the corresponding control level.
[0068] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0069] Figure 3 A schematic diagram of the structure of an electronic device to which this application embodiment applies is shown, such as... Figure 3 As shown, the electronic device can be used to implement the methods provided in any embodiment of this application.
[0070] like Figure 3 As shown, the electronic device 300 may primarily include at least one processor 301. Figure 3 The diagram shows components such as a memory 302, a communication module 303, and an input / output interface 304. Optionally, these components can be connected and communicate with each other via a bus 305. It should be noted that... Figure 3 The structure of the electronic device 300 shown is merely illustrative and does not constitute a limitation on the electronic devices to which the methods provided in the embodiments of this application are applicable.
[0071] The memory 302 can be used to store operating systems and applications, etc. The applications can include computer programs that implement the methods shown in the embodiments of this application when invoked by the processor 301, and can also include programs for implementing other functions or services. The memory 302 can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and computer programs, or it can be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0072] Processor 301 is connected to memory 302 via bus 305 and implements corresponding functions by calling the application programs stored in memory 302. Processor 301 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0073] Electronic device 300 can connect to a network via communication module 303 (which may include, but is not limited to, components such as a network interface) to communicate with other devices (such as user terminals or servers) through the network and achieve data interaction, such as sending data to or receiving data from other devices. Communication module 303 may include wired network interfaces and / or wireless network interfaces, meaning the communication module may include at least one of wired or wireless communication modules.
[0074] The electronic device 300 can connect to necessary input / output devices, such as a keyboard or display device, via the input / output interface 304. The electronic device 300 itself may have a display device, and other external display devices can also be connected via the input / output interface 304. Optionally, a storage device, such as a hard drive, can also be connected via the input / output interface 304 to store data from the electronic device 300, retrieve data from the storage device, or store data from the storage device in the memory 302. It is understood that the input / output interface 304 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 304 can be a component of the electronic device 300 or an external device connected to the electronic device 300 when needed.
[0075] The bus 305 used to connect the components may include a path for transmitting information between the components. The bus 305 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Depending on its function, the bus 305 may be divided into an address bus, a data bus, a control bus, etc.
[0076] Optionally, for the solution provided in the embodiments of this application, the memory 302 can be used to store a computer program that executes the solution of this application, and the processor 301 runs the computer program. When the processor 301 runs the computer program, it implements the operation of the method or apparatus provided in the embodiments of this application.
[0077] Based on the same principle as the method provided in the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the corresponding content of the aforementioned method embodiments.
[0078] It should be noted that the terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0079] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0080] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0081] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A microgrid power balance control method, characterized in that, include: The target power prediction result is obtained based on the real-time power data, real-time meteorological data and future meteorological data of the microgrid, and the source-load prediction difference is calculated based on the real-time power data of the microgrid and the target power prediction result. The full-link power difference of the microgrid is calculated based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid. The target control level is determined based on the relationship between the full-link power difference of the microgrid and the preset multi-level power difference threshold. The operating condition adaptive dynamic weight is determined based on the target control level. The target optimization model is constructed based on the operating condition adaptive dynamic weight. The target control level is a rapid response control layer, an optimized scheduling control layer, or a forward-looking planning control layer; Based on the target power prediction results, the source-load prediction difference, the microgrid full-link power difference, the constraint boundary parameters, and the microgrid operating cost parameters, the multi-terminal power allocation value of the microgrid is obtained by solving the target optimization model. Based on the multi-terminal power allocation value and the target control level, a microgrid power optimization control command is generated; the microgrid power optimization control command is used to instruct the fast response control layer, the optimized scheduling control layer, and the forward planning control layer to perform control operations.
2. The microgrid power balance control method as described in claim 1, characterized in that, The target power prediction results obtained from the real-time power data, real-time meteorological data, and future meteorological data based on the microgrid include: Based on real-time power data, real-time meteorological data, and future meteorological data of the microgrid, an initial prediction result is obtained through a target source load power prediction model. The target source load power prediction model is trained on the initial source load power prediction model based on LSTM and attention based on the historical power data and historical meteorological data of the microgrid. The initial prediction result is compensated for errors based on the historical prediction error data of the target source load power prediction model to obtain the target power prediction result.
3. The microgrid power balance control method as described in claim 1, characterized in that, The real-time charging and discharging power of the energy storage includes the real-time charging power and the real-time discharging power of the energy storage; the real-time interaction power between the large power grid and the microgrid includes the input power from the large power grid to the microgrid and the output power from the microgrid to the large power grid; and the source-load prediction difference includes the difference in renewable energy output and the difference in load power. The calculation of the full-link power difference of the microgrid based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid includes: Based on the predicted source-load difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid, the full-link power difference of the microgrid is calculated using the full-link real-time power difference calculation formula. The formula for calculating the real-time power difference across the entire link is as follows: Where t is the current time, Let t be the total power difference of the microgrid at time t. The difference in contribution to renewable energy, For the difference in load power, Let be the real-time discharge power of the stored energy at time t. Let be the real-time charging power of the energy storage at time t. Let be the input power from the large power grid to the microgrid at time t. Let t be the output power of the microgrid to the main grid. Let t be the actual transmission loss of the line at time t. Let be the real-time line current at time t. This is the equivalent resistance of the circuit.
4. The microgrid power balance control method as described in claim 1, characterized in that, The multi-level power difference threshold is determined based on the rated capacity of the microgrid. The multi-level power difference threshold includes a first-level power difference threshold, a second-level power difference threshold, and a third-level power difference threshold. The first-level power difference threshold, the second-level power difference threshold, and the third-level power difference threshold decrease sequentially. The adaptive dynamic weight of the operating condition includes an economic weight and a system stability weight. The determination of the target control level based on the relationship between the power difference across the entire microgrid and a preset multi-level power difference threshold includes: If the total power difference across the microgrid is greater than the first-level power difference threshold, then the dominant control layer is determined to be the fast response control layer. If the total power difference of the microgrid is not greater than the first-level power difference threshold but is greater than the second-level power difference threshold, then the dominant control layer is determined to be the optimized scheduling control layer. If the total power difference of the microgrid is not greater than the secondary power difference threshold, then the dominant control layer is determined to be the forward planning control layer. The control time scales of each control layer are different; the fast response control layer is used for power balance control under millisecond-level emergency conditions, the optimized scheduling control layer is used for power balance control under second-level correction conditions, and the forward planning control layer is used for power balance control under minute-level economic conditions.
5. The microgrid power balance control method as described in claim 1, characterized in that, The adaptive dynamic weights for operating conditions include economic weights and system stability weights. The determination of adaptive dynamic weights for operating conditions based on the target control level includes: If the target control level is the fast response control level, then the first-level weight coefficient corresponding to the fast response control level is determined as the working condition adaptive dynamic weight. If the target control level is the optimized scheduling control level, then the secondary weight coefficient corresponding to the optimized scheduling control level is determined as the working condition adaptive dynamic weight. If the target control level is the forward planning control level, then the three-level weight coefficients corresponding to the forward planning control level are determined as the working condition adaptive dynamic weights. The ratios of the economic weight to the system stability weight corresponding to the first-level weight coefficient, the second-level weight coefficient, and the third-level weight coefficient increase sequentially.
6. The microgrid power balance control method as described in claim 1, characterized in that, The target power prediction results include the target renewable energy predicted output and the target load predicted power; The calculation of the source-load prediction difference based on the real-time power data of the microgrid and the target power prediction result includes: The real-time renewable energy output and real-time load power at the current moment are obtained based on the real-time power data of the microgrid. The difference between the predicted output of the target renewable energy source and the real-time renewable energy output is calculated as the renewable energy output difference; The difference between the target load prediction power and the real-time load power is calculated as the load power difference; The difference in renewable energy output and the difference in load power are used as the source-load prediction difference.
7. The microgrid power balance control method as described in claim 1, characterized in that, The microgrid power optimization control command includes device-level execution commands for each controllable unit of the microgrid. The generation of microgrid power optimization control commands based on the multi-terminal power allocation values and the target control level includes: Based on the time scale and hierarchical coordination rules corresponding to the target control level, the multi-terminal power allocation value is coordinated and corrected to obtain the corrected power allocation benchmark. The modified power allocation reference is converted into device-level execution instructions for each controllable unit of the microgrid. According to the instruction execution priority and control cycle corresponding to the target control level, the device-level execution instructions of each controllable unit of the microgrid are sent to the central controller and local execution unit of the corresponding control level.
8. A microgrid power balance control device, characterized in that, include: The source-load prediction module is used to predict the target power based on the real-time power data, real-time meteorological data and future meteorological data of the microgrid, and to calculate the source-load prediction difference based on the real-time power data of the microgrid and the target power prediction result. The target optimization model construction module is used to calculate the full-link power difference of the microgrid based on the source-load prediction difference, the real-time charging and discharging power of the microgrid's energy storage, and the real-time interaction power between the large power grid and the microgrid; determine the target control level based on the relationship between the full-link power difference of the microgrid and the preset multi-level power difference threshold; determine the operating condition adaptive dynamic weight based on the target control level; and construct the target optimization model based on the operating condition adaptive dynamic weight. The target control level is a rapid response control layer, an optimized scheduling control layer, or a forward-looking planning control layer; The power allocation calculation module is used to obtain the multi-terminal power allocation value of the microgrid by solving the target optimization model based on the target power prediction result, the source-load prediction difference, the microgrid full-link power difference, constraint boundary parameters and microgrid operating cost parameters. The power optimization control module is used to generate microgrid power optimization control instructions based on the multi-terminal power allocation value and the target control level; the microgrid power optimization control instructions are used to instruct the fast response control layer, the optimized scheduling control layer and the forward planning control layer to perform control operations.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the microgrid power balance control method according to any one of claims 1 to 7 when running the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the microgrid power balance control method according to any one of claims 1 to 7.