Microgrid control method, program product and readable storage medium
By optimizing voltage and frequency parameters through multi-source feature fusion and deep reinforcement learning, the problems of voltage/frequency fluctuations and uneven power distribution in photovoltaic-storage-charging-thermal microgrids were solved, and the system achieved stable and efficient operation.
Patent Information
- Application Number
- CN202511537391.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-10-27
AI Technical Summary
In the context of photovoltaic-storage-charging-thermal microgrids, existing technologies suffer from voltage/frequency fluctuations, making it difficult to maintain system stability. They also exhibit uneven power distribution among multiple devices, weak dynamic adaptability, and an inability to cope with complex changes in photovoltaic output and load demand.
By collecting operational and environmental data from microgrids and grid-connected equipment, multi-source feature fusion processing is performed. Intelligent prediction models are used to predict future energy output and load demand. Combined with deep reinforcement learning models, voltage and frequency parameters are optimized to achieve real-time optimal configuration and power allocation.
It significantly improves the stability and energy efficiency of microgrids, reduces voltage and frequency anomalies, lowers circulating current and losses, and enhances the ability to predict and respond to complex scenarios.
Smart Images

Figure CN121012035A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid control, and in particular to a microgrid control method, program product, and readable storage medium. Background Technology
[0002] Grid-mounted inverters are key devices for connecting distributed energy resources to the grid. They can actively adjust output voltage and frequency, possessing functions similar to traditional synchronous generators, and providing support for autonomous control of microgrids. In photovoltaic-storage-charging-thermal microgrid scenarios, multiple grid-mounted inverters operating in parallel face three core challenges: first, voltage / frequency fluctuations are easy to occur, making it difficult to maintain system stability; second, uneven power distribution among multiple devices leads to prominent circulating current and loss issues; and third, weak dynamic adaptation capabilities make it unable to cope with complex changes in photovoltaic output and load demand.
[0003] While existing technologies such as multi-band adaptive virtual impedance and sliding mode inertia enhancement can improve parallel performance, and algorithms such as RBF neural networks can adjust virtual inertia and damping, they have significant drawbacks: control parameters are mostly statically configured, making it difficult to adapt to the complex dynamic characteristics of photovoltaic storage charging and heating scenarios, and unable to achieve real-time optimization of voltage / frequency parameters; control decisions are concentrated in local or single central controllers, lacking global coordination, and making it difficult to solve the problem of uneven power distribution among multiple devices; the application of AI algorithms is limited to the adjustment of parameters of a single device, without covering multi-source data and the global system, and cannot meet the requirements of dynamic adaptation and global stability. Summary of the Invention
[0004] One object of the present invention is to provide a microgrid control method, program product, and readable storage medium that at least partially solves the above-mentioned problems.
[0005] A further objective of this invention is to reduce voltage and frequency anomalies at the source by optimizing the voltage and frequency parameters of various grid-type devices, thereby laying a crucial foundation for the stable operation of microgrids.
[0006] Another further objective of this invention is to achieve real-time optimal configuration of voltage and frequency parameters, coordinate power distribution among multiple devices, and reduce circulating current and losses.
[0007] In particular, according to a first aspect of the present invention, the present invention provides a microgrid control method, comprising: Collect operational data of the microgrid and its various network-type devices, as well as environmental data of the environment in which the microgrid is located; The collected operational data and environmental data are subjected to multi-source feature fusion processing. Based on the fused features, the energy output, load demand and power fluctuation amplitude of the microgrid are predicted within a future preset time period. Based on the prediction results and the current state of each of the network-type devices, the voltage and frequency parameters of each of the network-type devices are optimized; The optimized voltage and frequency parameters are used as parameter adjustment commands and sent to the corresponding network-type devices, so that each network-type device can operate based on the sent parameter adjustment commands.
[0008] Optionally, the grid-type equipment includes photovoltaic inverters, energy storage converters, charging piles, and heat pumps, and each of the grid-type equipment integrates a grid-type virtual synchronous machine. The step of performing multi-source feature fusion processing on the collected operating data and environmental data includes: The fluctuation sequence of photovoltaic output is extracted based on the operating data of the photovoltaic inverter, the rate of change of charging and discharging power is extracted based on the operating data of the energy storage converter, and the time series data of the number of charging piles is extracted based on the operating data of the charging piles as time series features. The state of charge is extracted based on the operating data of the energy storage converter, the operating mode is extracted based on the operating data of the heat pump, and the bus voltage deviation and frequency fluctuation amplitude are extracted based on the operating data of the microgrid as state characteristics. Based on the environmental data, light intensity, ambient temperature, and power grid voltage stability level are extracted as environmental characteristics. By integrating the temporal features, the state features, and the environmental features, a multi-dimensional feature matrix for prediction is constructed.
[0009] Optionally, the step of predicting the energy output, load demand, and power fluctuation amplitude of the microgrid within a preset future time period based on the fused features includes: The intelligent prediction model learns the temporal dependencies in the multi-dimensional feature rectangles, and outputs the predicted results of the energy output, load demand and power fluctuation amplitude of the microgrid in the future preset time period through model inference.
[0010] Optionally, the step of optimizing the voltage and frequency parameters of each of the network-type devices based on the prediction results and the current state of each of the network-type devices includes: The parameters are optimized using a deep reinforcement learning model. The state space of the deep reinforcement learning model includes the prediction results output by the intelligent prediction model and the control parameters of the virtual synchronizer integrated by each of the network-type devices. The action space of the deep reinforcement learning model is defined as the adjustment action of the virtual inertia, damping coefficient and virtual impedance parameters of each virtual synchronizer; The reward function of the deep reinforcement learning model is constructed, which is a weighted combination function of frequency deviation, power allocation error and device loss rate; Through continuous interaction between the deep reinforcement learning model and the microgrid operating environment, the accumulated reward is maximized to generate parameter configuration strategies, thereby optimizing the voltage and frequency parameters of each of the grid-type devices.
[0011] Optionally, the step of optimizing the voltage and frequency parameters of each of the network-type devices based on the prediction results and the current state of each of the network-type devices includes: Obtain the operating status parameters of each of the network-type devices, including the current output voltage, output frequency, and control parameters of the virtual synchronizer; Based on the predicted results of the energy output, load demand and power fluctuation amplitude of the microgrid within the future preset time period, the voltage parameters and frequency parameters of each of the network-type devices are iteratively optimized through a deep reinforcement learning model. The output should meet the target voltage and frequency parameters.
[0012] Optionally, the microgrid control method also includes: Detect the power fluctuation amplitude of the microgrid; When the power fluctuation exceeds a preset threshold, an emergency optimization mechanism is triggered to shorten the parameter optimization execution cycle of the deep reinforcement learning model. After quickly re-optimizing the deep reinforcement learning model, the parameter adjustment command is reissued to each of the network devices.
[0013] Optionally, the microgrid control method also includes: The deep reinforcement learning model is periodically trained offline using historical data generated from the operation of the microgrid, and the optimization strategy of the deep reinforcement learning model is dynamically updated to adapt to the long-term changes in the operating characteristics of the microgrid.
[0014] Optionally, the operational data and the environmental data are collected for a first preset duration; The intelligent prediction model is inferred for a second preset duration, and the parameters of the deep reinforcement learning model are optimized for a third preset duration that is longer than the second preset duration.
[0015] According to a second aspect of the present invention, the present invention provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the microgrid control method described in any one of the above descriptions.
[0016] According to a third aspect of the present invention, a machine-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the microgrid control method described in any one of the preceding descriptions.
[0017] The microgrid control method of this invention comprehensively perceives the system status by collecting multi-dimensional data on the microgrid as a whole, grid-connected devices, and the environment, avoiding the limitations of a single perspective. After multi-source feature fusion processing, it predicts future energy output, load demand, and power fluctuations, transforming passive response into proactive prediction and allowing time for parameter adjustment. Then, it combines the prediction results with the current status of the devices to optimize voltage and frequency parameters, which are then issued as commands for execution. In this way, the voltage and frequency parameters of each grid-connected device can be optimized, reducing voltage and frequency anomalies at the source and improving the system's anti-interference capability.
[0018] Furthermore, the microgrid control method of this invention significantly improves prediction accuracy and foresight by learning the temporal dependencies in a multi-dimensional feature matrix and reasoning about prediction results through an intelligent prediction model. The intelligent model can deeply mine the dynamic correlations between multi-dimensional features such as photovoltaic power output fluctuations, load changes, and environmental factors, capturing complex dynamic patterns more accurately than traditional methods. Based on this, the predicted results of energy output, load demand, and power fluctuations provide a reliable forward-looking basis for subsequent parameter optimization, making voltage and frequency parameter adjustments more targeted. This further enhances the ability to predict and respond to the intermittency and randomness of grid-connected equipment and loads, laying a crucial foundation for the stable and efficient operation of the microgrid.
[0019] Furthermore, the microgrid control method of this invention significantly improves the accuracy and coordination of global microgrid regulation by optimizing parameters through a deep reinforcement learning model. The model incorporates prediction results and current control parameters of the virtual synchronous machine into the state space, achieving a comprehensive consideration of the system's future and current states. It uses core parameters such as virtual inertia and damping coefficients to adjust the action space, directly affecting the voltage and frequency characteristics of grid-connected equipment. By integrating a reward function that incorporates frequency deviation, power allocation error, and equipment loss rate, a multi-objective optimization framework for stability, balance, and economy is constructed. Through continuous interaction with the operating environment to maximize cumulative rewards, it can dynamically adapt to scenarios such as photovoltaic power output fluctuations and random load changes, achieving real-time optimal configuration of voltage / frequency parameters. It can also coordinate power allocation among multiple devices, reducing circulating current and losses, thus improving energy efficiency and equipment lifespan while ensuring stable system operation.
[0020] The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description
[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic flowchart of a microgrid control method according to an embodiment of the present invention; Figure 2 This is a schematic flowchart of multi-source fusion processing according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a computer program product according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a machine-readable storage medium according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0022] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.
[0023] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0024] This embodiment provides a microgrid control system, including an edge AI control layer, a local execution layer, and a perception layer.
[0025] The edge AI control layer is the core decision-making unit of the entire microgrid control system. Based on the RK3588 chip, it constructs an intelligent coordination controller. The RK3588 chip boasts high-performance computing power and low power consumption, meeting the needs of AI model inference and real-time optimization. The edge AI control layer integrates four core functional modules: a multi-source data acquisition module, which aggregates device operation data and environmental data uploaded from the perception layer via a communication link, providing raw data support for subsequent processing; an AI model training and inference module, responsible for loading and running Long Short-Term Memory (LSTM) prediction models and Deep Reinforcement Learning (DRL) optimization models, while also supporting offline incremental training, such as updating model parameters during idle nighttime periods; a global parameter optimization module, aiming for system stability and optimal efficiency, calculates the optimal voltage and frequency control parameters for each network configuration by combining prediction results and device status; and a communication interaction module, enabling bidirectional data interaction with the local execution layer, sending parameter adjustment commands downwards and receiving device execution status feedback upwards, ensuring real-time and reliable command transmission.
[0026] The local execution layer is deployed in various grid-connected devices, including photovoltaic inverters, energy storage converters, charging piles, and heat pumps. The core of the local execution layer is the integration of a grid-connected virtual synchronous machine (VRSM) control module into these devices. The VRSM can simulate the voltage and frequency regulation characteristics of a traditional synchronous generator, solving the stability issues of new energy equipment during grid connection. The VRSM control module comprises three key units: a local power calculation unit that calculates the current active and reactive power output values of the device in real time, providing the edge AI control layer with device operating status data; a dual-loop control unit that accurately tracks parameter commands issued by the edge AI control layer through nested control logic of voltage and current loops, avoiding voltage and current overshoot; and a parameter execution unit that converts optimized VRSM control parameters (such as virtual inertia and damping coefficient) into hardware-executable operations, directly adjusting the device's output characteristics.
[0027] The perception layer forms the foundation for the system's data acquisition. By deploying various high-precision sensors and monitoring modules, it enables real-time acquisition of data across all dimensions. Among these, electrical parameter sensors include voltage, current, and power sensors. For example, a DC power sensor with an accuracy of 0.5 class can acquire electrical parameters such as bus voltage, equipment output current, and total system power. The environmental monitoring module includes photovoltaic irradiance sensors and temperature sensors. The photovoltaic irradiance sensor has a measurement range of 0-2000W / m² and can collect environmental factors affecting microgrid output and load. The equipment status monitoring module collects real-time equipment-specific data such as photovoltaic output, energy storage charge status, number of charging piles connected, and heat pump operation mode (e.g., heating / cooling). Finally, all collected data is aggregated and uploaded to the edge AI control layer.
[0028] After receiving data from the perception layer, the edge AI control layer does not directly use it for optimization. Instead, it first performs multi-source feature fusion processing. By extracting key features, eliminating data redundancy, and mining feature correlations, it constructs a multi-dimensional feature matrix that accurately reflects the system state. The multi-dimensional feature matrix specifically includes three types of features: time-series features, which reflect the changing patterns of data over time, including the 15-minute fluctuation sequence of photovoltaic power output, the rate of change of energy storage charging and discharging power, and time-series data on the number of charging piles connected.
[0029] Among them, the 15-minute fluctuation sequence of photovoltaic output reflects the short-term stability of photovoltaic output, such as a sudden drop in output caused by cloud cover; the change rate of energy storage charging and discharging power reflects the charging and discharging speed of energy storage, which can avoid overcharging and over-discharging; the time-series data of the number of charging piles connected reflects the trend of load changes, such as the surge in charging demand during rush hour; the status characteristics reflect the current operating status of the system and equipment, including the energy storage state of charge, heat pump operating mode, bus voltage deviation, and frequency fluctuation amplitude. The energy storage state of charge determines the rechargeable and discharging capacity of the energy storage, and can prevent forced discharge when the energy storage state of charge is too low, thus avoiding damage to the battery. The power consumption of heat pumps varies greatly depending on the operating mode, requiring targeted adjustments to the power supply strategy. Bus voltage deviation reflects system voltage stability; excessive deviation can affect normal equipment operation. Frequency fluctuation amplitude reflects the system's power supply and demand balance; fluctuations exceeding the range may trigger protection shutdowns. Environmental characteristics reflect the impact of the external environment on the system, including light intensity, ambient temperature, and grid voltage stability level. Light intensity directly determines the upper limit of photovoltaic output, ambient temperature affects heat pump load and battery performance, and grid voltage stability level can determine the reliability of the external power grid, providing a basis for off-grid / grid-connected switching.
[0030] Based on the aforementioned multi-dimensional feature matrix, a Long Short-Term Memory (LSTM) prediction model is adopted. LSTM prediction models excel at capturing long-term dependencies in time-series data, such as the daytime periodicity of photovoltaic output and the time-varying nature of charging pile loads, effectively avoiding the lag of traditional prediction methods. Ultimately, the prediction model outputs three key prediction results for the next three minutes: the photovoltaic output prediction value can predict the future power generation provided by photovoltaic energy, providing a basis for energy storage charging and discharging plans; the load demand prediction value can predict the total electricity demand of charging piles, heat pumps, and other equipment in the future, avoiding power shortages; and the power fluctuation amplitude prediction value can predict the range of changes in the future system power supply and demand difference, identifying fluctuation risks in advance, such as power shortages caused by sudden load increases.
[0031] The edge AI control layer takes minimizing frequency fluctuations (ensuring system stability), minimizing power distribution errors (avoiding equipment overload), and equalizing equipment losses (extending equipment lifespan) as its three major optimization objectives. It constructs a deep reinforcement learning (DRL) optimization model and gradually finds the optimal virtual synchronizer control parameters through a cycle of state perception, action decision-making, and reward feedback.
[0032] The DRL model is specifically designed as follows: The state space defines the perception range of the DRL model, containing two core pieces of information: first, the three types of prediction results output by the LSTM model, which can anticipate future risks; and second, the current virtual synchronous machine control parameters (virtual inertia J, damping coefficient D, and virtual impedance Z) of each device, reflecting the current control state of the device and ensuring that the model's decisions consider both future changes and the actual capabilities of the device. The action space defines the adjustment operations that the DRL model can execute, i.e., the adjustment range and step size of the virtual synchronous machine control (VSG) parameters of each device. Multi-objective optimization is achieved through weighted combination, as shown in the formula: R=α×(1-|Δf| / f0)+β×(1-ΔP / P n )+γ×(1-Σ(P_loss,i / P_rated,i) / n).
[0033] Where R is the reward function, α, β, and γ are weighting coefficients, Δf is the frequency deviation, ΔP is the power allocation error, P_loss,i is the loss of the i-th device, f0 is the rated frequency of the microgrid, and P n Let P_rated,i be the rated power of the grid-type equipment in the microgrid, where P_rated,i is the rated power of the i-th grid-type equipment; and n is the total number of grid-type equipment in the microgrid.
[0034] The DRL model continuously interacts with the microgrid's operating environment. For example, in each round of interaction, it adjusts actions based on the current state and outputs parameters, then calculates rewards based on actual operating results, continuously optimizing the decision-making strategy. Ultimately, it outputs the globally optimal combination of virtual synchronous machine control parameters. For instance, it matches a larger virtual impedance to the photovoltaic inverter to suppress circulating current, and a larger virtual inertia to the energy storage converter to stabilize the frequency. The system achieves closed-loop control of data acquisition, prediction, optimization, and execution by clearly defining the execution cycle and interaction logic of each level. The specific process is as follows: In the data acquisition and uploading phase, the perception layer collects all data every 10ms. This high-frequency acquisition allows for timely capture of sudden changes, such as a charging pile suddenly connecting. The local execution layer synchronously calculates the current active / reactive power of the device and uploads the data to the edge AI control layer via communication (500kbps baud rate to ensure low latency). In the prediction model running phase, the edge AI control layer runs the LSTM model every 50ms. Since prediction requires multiple sets of collected data (e.g., 5 sets of data can be accumulated in 50ms if collected every 10ms), this cycle ensures both prediction accuracy and rapid updates of prediction results, providing the latest basis for optimization. In the optimization and command issuance phase, the edge AI control layer executes DRL model optimization every 200ms. Optimization requires multiple rounds of iterative calculations, and the longer cycle than prediction ensures accuracy. After generating control parameter adjustment commands for the virtual synchronizers of each device, the optimization process continues. The command is then sent to the local execution layer. In the local execution and stability control phase, after receiving the command, the local execution layer adjusts the output voltage through a multi-band adaptive virtual impedance model. This model matches different impedance values for harmonic interference at different frequencies, which can suppress circulating current. At the same time, it combines a sliding mode inertia enhancement mechanism to quickly respond to frequency changes. For example, when a sudden increase in load causes a drop in frequency, the virtual inertia is rapidly increased to slow down the frequency drop and ensure that the device output meets the command requirements. In the emergency optimization mechanism phase, when the edge AI control layer detects that the power fluctuation exceeds the preset threshold (such as fluctuation exceeding 20% of the rated power), it immediately triggers the emergency optimization mode, shortening the DRL model optimization cycle from 200ms to 50ms. Through high-frequency optimization, the parameters are quickly corrected to avoid the fluctuation from expanding and to ensure that the system can quickly recover stability in extreme scenarios (such as a sudden drop in photovoltaic output or multiple charging piles being connected at the same time).
[0035] In photovoltaic-storage-charging-heating scenarios, the system faces complex challenges such as fluctuating photovoltaic output due to sunlight, random variations in the number of charging piles connected, and heat pump load adjustments based on temperature. This solution utilizes a Long Short-Term Memory (LSTM) network prediction model to anticipate future energy output, load demand, and power fluctuation trends. It then combines this with a deep reinforcement learning model to optimize grid parameters, enabling them to adapt to the complex fluctuations in the scenario. Practical application verification has shown that this approach can reduce microgrid frequency fluctuations by over 40% and control power allocation errors to within 5%, effectively avoiding system instability caused by delayed parameter adjustments.
[0036] This solution adopts a hierarchical control architecture consisting of an edge AI control layer and a local execution layer. The edge AI control layer, based on a global perspective, integrates all device status and environmental data for parameter optimization, ensuring global and optimal decision-making. The local execution layer focuses on receiving and executing optimization commands in real time, rapidly responding to device adjustment needs. This architecture avoids the communication latency issues caused by centralized data transmission in traditional centralized control models, and also solves the problem of single local control focusing only on its own state and easily getting trapped in local optima. Ultimately, this results in a 15%-20% reduction in overall device losses, improving the economic efficiency and energy efficiency of microgrid operation.
[0037] To address potential extreme situations in photovoltaic-storage-charging-thermal scenarios, such as sudden concentrated access to charging piles or a sharp drop in photovoltaic output due to cloud cover, this solution utilizes multi-source feature fusion technology to comprehensively capture system operating status and external environmental changes, promptly identifying power fluctuation risks. Simultaneously, an emergency optimization mechanism is designed: when a power fluctuation exceeds a preset threshold, the optimization cycle of the deep reinforcement learning model is immediately shortened, and the optimal parameters are quickly recalculated and distributed. Under these extreme scenarios, the system's recovery time can be reduced to less than 0.3 seconds, significantly improving the microgrid's ability to cope with emergencies compared to the existing 1-second recovery time standard, ensuring continuous and stable system operation.
[0038] Based on the above-described microgrid control system, this invention provides a microgrid control method. Figure 1 This is a schematic flowchart of a microgrid control method according to an embodiment of the present invention, such as... Figure 1 As shown, the microgrid control method includes at least the following steps S102 to S108.
[0039] Step S102: Collect operational data of the microgrid and its various network-type devices, as well as environmental data of the environment in which the microgrid is located.
[0040] Step S104: Perform multi-source feature fusion processing on the collected operational data and environmental data, and predict the energy output, load demand and power fluctuation amplitude of the microgrid within a preset time period based on the fused features.
[0041] Step S106: Based on the prediction results and the current status of each network-type device, optimize the voltage and frequency parameters of each network-type device.
[0042] Step S108: The optimized voltage and frequency parameters are used as parameter adjustment commands and sent to the corresponding network-type devices so that each network-type device can operate based on the sent parameter adjustment commands.
[0043] The microgrid control method of this invention comprehensively perceives the system status by collecting multi-dimensional data on the microgrid as a whole, grid-connected devices, and the environment, avoiding the limitations of a single perspective. After multi-source feature fusion processing, it predicts future energy output, load demand, and power fluctuations, transforming passive response into proactive prediction and allowing time for parameter adjustment. Then, it combines the prediction results with the current status of the devices to optimize voltage and frequency parameters, which are then issued as commands for execution. In this way, the voltage and frequency parameters of each grid-connected device can be optimized, reducing voltage and frequency anomalies at the source and improving the system's anti-interference capability.
[0044] In one alternative embodiment, the grid-connected devices may include photovoltaic inverters, energy storage converters, charging piles, and heat pumps, and each grid-connected device integrates a grid-connected virtual synchronous machine.
[0045] Figure 2 This is a schematic flowchart of a multi-source fusion process according to an embodiment of the present invention, such as... Figure 2 As shown, multi-source feature fusion processing of the collected operational data and environmental data may include the following steps S202 to S208.
[0046] Step S202: Extract the fluctuation sequence of photovoltaic output based on the operating data of the photovoltaic inverter, extract the rate of change of charging and discharging power based on the operating data of the energy storage converter, and extract the time series data of the number of charging piles based on the operating data of the charging piles, as time series features.
[0047] Step S204: Extract the state of charge based on the operating data of the energy storage converter, extract the operating mode based on the operating data of the heat pump, and extract the bus voltage deviation and frequency fluctuation amplitude based on the operating data of the microgrid as state characteristics.
[0048] Step S206: Extract light intensity, ambient temperature, and power grid voltage stability level from environmental data as environmental features.
[0049] Step S208: Integrate temporal features, state features, and environmental features to construct a multi-dimensional feature matrix for prediction.
[0050] It is understandable that for different grid-type equipment such as photovoltaic inverters and energy storage converters, features strongly correlated with their core characteristics (such as photovoltaic output fluctuation sequences reflecting photovoltaic intermittency and energy storage state of charge reflecting energy storage regulation capability) are extracted, while environmental features (such as the direct correlation between light intensity and photovoltaic output) are incorporated to achieve targeted fusion of multi-dimensional data from equipment, systems, and environment, avoid interference from irrelevant data, and provide high-quality input for prediction.
[0051] Time-series features capture dynamic trends (such as the increase or decrease in the number of charging piles connected over time), state features reflect the current operating baseline (such as the bus voltage deviation reflecting the system's real-time stability), and environmental features reveal external influencing factors (such as the effect of temperature on heat pump load). The multi-dimensional feature matrix formed by integrating these three features provides comprehensive feature basis for intelligent prediction models and improves prediction accuracy.
[0052] By extracting different types of features in a hierarchical manner, the multi-dimensional feature matrix can reflect both the common patterns of photovoltaic-storage-charging-thermal scenarios (such as the periodicity of power fluctuations) and the individual differences of equipment (such as the different response characteristics of energy storage and heat pumps). The prediction model trained based on this matrix can more accurately capture the complex dynamics of the scenario (such as the chain reaction caused by sudden changes in illumination), providing a reliable forward-looking basis for subsequent parameter optimization and enhancing the system's ability to predict and respond to scenario fluctuations.
[0053] In an optional embodiment, when predicting the energy output, load demand, and power fluctuation amplitude of a microgrid within a preset future time period based on the fused features, an intelligent prediction model can be used to learn the temporal dependencies in the multi-dimensional feature rectangles, and the prediction results of the energy output, load demand, and power fluctuation amplitude of the microgrid within the preset future time period can be output through model inference.
[0054] The microgrid control method of this invention significantly improves prediction accuracy and foresight by learning the temporal dependencies in a multi-dimensional feature matrix and reasoning about prediction results through an intelligent prediction model. The intelligent model can deeply mine the dynamic correlations between multi-dimensional features such as photovoltaic power output fluctuations, load changes, and environmental factors, capturing complex dynamic patterns more accurately than traditional methods. Based on this, the predicted results of energy output, load demand, and power fluctuations provide a reliable forward-looking basis for subsequent parameter optimization, making voltage and frequency parameter adjustments more targeted. This further enhances the ability to predict and respond to the intermittency and randomness of grid-connected equipment and loads, laying a crucial foundation for the stable and efficient operation of microgrids.
[0055] In one optional embodiment, when optimizing the voltage and frequency parameters of each grid-type device based on the prediction results and the current state of each device, a deep reinforcement learning model can be used for parameter optimization. The state space of the deep reinforcement learning model includes the prediction results output by the intelligent prediction model and the control parameters of the virtual synchronous machines integrated in each grid-type device. The action space of the deep reinforcement learning model is defined as the adjustment actions of the virtual inertia, damping coefficient, and virtual impedance parameters of each virtual synchronous machine. A reward function for the deep reinforcement learning model is constructed, which is a weighted combination function of frequency deviation, power allocation error, and device loss rate. Through continuous interaction between the deep reinforcement learning model and the microgrid operating environment, the accumulated reward is maximized to generate a parameter configuration strategy, thereby completing the optimization of the voltage and frequency parameters of each grid-type device.
[0056] By incorporating the prediction results output by the intelligent prediction model and the current control parameters of the virtual synchronous machine into the state space, the model can know in advance the future energy output, load demand and power fluctuation trends (such as predicting a sharp drop in photovoltaic output in 10 minutes), and also grasp the current operating basis of the equipment (such as the current value of virtual inertia and the current setting of damping coefficient), thus avoiding the short-sightedness caused by optimization relying solely on real-time status.
[0057] The action space is defined as the adjustment actions of virtual inertia, damping coefficient, and virtual impedance parameters because these three parameters directly determine the voltage and frequency regulation characteristics of the virtual synchronizer: virtual inertia affects the rate of frequency change (the larger the inertia, the slower the frequency drops), the damping coefficient suppresses frequency oscillations (the larger the damping, the faster the frequency recovers), and virtual impedance balances power distribution (impedance matching can reduce circulating current between devices). By precisely adjusting these three parameters, the optimization effect of the device's output voltage and frequency can be directly translated into a strong correlation between the model's actions and the control objective.
[0058] The reward function is designed as a weighted combination of frequency deviation, power allocation error, and equipment loss rate. Essentially, it clarifies the optimization priorities of the model: a high weight for frequency deviation prioritizes ensuring system frequency stability (avoiding protection shutdowns); a high weight for power allocation error focuses on balancing the load of each device (preventing overload of a single device); and a high weight for equipment loss rate extends equipment lifespan (reducing maintenance costs). The model continuously interacts with the microgrid environment (calculating rewards based on actual operating frequency, power, and loss data after each parameter adjustment), constantly learning the parameter combinations that maximize cumulative rewards. Ultimately, it generates a globally optimal configuration strategy that balances multiple objectives, overcoming the limitations of single-objective optimization while ensuring that parameter adjustments align with the actual operating needs of the microgrid.
[0059] The microgrid control method of this invention significantly improves the accuracy and coordination of global microgrid regulation by optimizing parameters through a deep reinforcement learning model. The model incorporates the prediction results and the current control parameters of the virtual synchronous machine into the state space, realizing a comprehensive consideration of the future and current states of the system; it uses core parameters such as virtual inertia and damping coefficient to adjust the action space, directly affecting the voltage and frequency characteristics of grid-connected equipment; and it constructs a multi-objective optimization guide that integrates frequency deviation, power distribution error, and equipment loss rate through a reward function.
[0060] By continuously interacting with the operating environment to maximize accumulated rewards, it can dynamically adapt to scenarios such as photovoltaic output fluctuations and random load changes, achieving real-time optimal configuration of voltage / frequency parameters. It can also coordinate power distribution among multiple devices, reducing circulating current and losses. While ensuring stable system operation, it improves energy utilization efficiency and equipment lifespan.
[0061] In some embodiments, when optimizing the voltage and frequency parameters of each grid-type device based on the prediction results and the current state of each grid-type device, the operating state parameters of each grid-type device can be obtained. The state parameters include the current output voltage, output frequency, and control parameters of the virtual synchronous machine. Then, based on the prediction results of the microgrid's energy output, load demand, and power fluctuation amplitude within a preset future time period, the voltage and frequency parameters of each grid-type device are iteratively optimized through a deep reinforcement learning model. Finally, the desired voltage and frequency parameters that meet the target are output.
[0062] By acquiring the current output voltage, frequency, and virtual synchronous machine control parameters of the equipment, we can accurately grasp the real-time operating boundaries of the equipment (such as the current load limit of energy storage and the output capacity of the inverter), avoiding execution failures or hardware damage caused by optimization parameters exceeding the physical thresholds of the equipment, and making optimization strategies more feasible. Combining future energy output, load, and fluctuation forecasts, we can proactively avoid potential power imbalance risks; by overlaying the current status parameters of the equipment, we can take into account both short-term emergency adjustments and long-term stability requirements. Compared with optimization that relies solely on historical or real-time data, it can better balance system stability and equipment operating efficiency.
[0063] More importantly, through multiple rounds of iterative calculations, deep reinforcement learning models can explore the globally optimal parameter combination under multiple objective constraints such as "frequency stability, power balance, and minimum loss," avoiding local optima. The final output voltage and frequency parameters, as the desired voltage and frequency parameters, can more accurately match the microgrid's operational needs and effectively reduce voltage deviation, frequency fluctuations, and equipment losses.
[0064] In some embodiments, the power fluctuation amplitude of the microgrid can be detected. When the power fluctuation amplitude exceeds a preset threshold, an emergency optimization mechanism is triggered to shorten the parameter optimization execution cycle of the deep reinforcement learning model. After the deep reinforcement learning model is quickly re-optimized, parameter adjustment instructions are reissued to each network device.
[0065] When power fluctuations exceed the threshold (such as sudden access to charging piles or a sudden drop in photovoltaic output), shortening the reinforcement learning optimization cycle (e.g., from 200ms to 50ms) can quickly generate new optimal parameter instructions, avoiding voltage / frequency instability caused by optimization lag under traditional fixed cycles, keeping fluctuations within a small range, and preventing equipment protection shutdowns or system crashes.
[0066] Furthermore, the emergency optimization mechanism is specifically designed to address sudden scenarios. It does not rely on slow adjustments over a regular cycle. It can balance power supply and demand by re-optimizing parameters in a short time (such as increasing the energy storage discharge power and adjusting the virtual inertia to suppress frequency drops), enabling the system to quickly recover stability under extreme conditions. Compared with solutions without an emergency mechanism, the stable recovery time is significantly shortened (e.g., from 1 second to within 0.3 seconds).
[0067] In some embodiments, historical data generated by the operation of the microgrid can be used periodically to perform offline incremental training on the deep reinforcement learning model, and the optimization strategy of the deep reinforcement learning model can be dynamically updated to adapt to the long-term changes in the operating characteristics of the microgrid.
[0068] It is understandable that during long-term operation of microgrids, situations such as equipment performance degradation (e.g., decreased energy storage capacity), changes in load characteristics (e.g., changes in user behavior at charging stations), and adjustments in environmental impact trends (e.g., changes in seasonal sunlight patterns) will occur. By training offline incrementally using historical data, the model can dynamically learn these long-term changing patterns, update and optimize strategies, avoid the decrease in control accuracy caused by a decline in the adaptability of the initial model, and ensure that parameter optimization remains consistent with the actual scenario during long-term operation.
[0069] In this way, the normal operation of the microgrid can be maintained without interrupting the operation. The model can be trained based on historical data during idle periods such as nighttime, which will not affect the real-time control of the system. At the same time, the model can continuously absorb new operating experience (such as parameter adjustment cases under extreme weather conditions) and gradually improve its adaptability to complex scenarios. Compared with a fixed model, it can continuously optimize the effects of frequency stability, power distribution and equipment loss control.
[0070] Offline incremental training can update existing model parameters without building a new model from scratch, reducing the investment of computing power and time. At the same time, historical data can be accumulated and reused over a long period of time. As the amount of data increases, the model optimization strategy will become more accurate, which is conducive to improving the economy and reliability of microgrid operation in the long term.
[0071] In some embodiments, runtime data and environmental data are collected for a first preset duration, inference of the intelligent prediction model is performed for a second preset duration, and parameter optimization of the deep reinforcement learning model is performed for a third preset duration longer than the second preset duration.
[0072] For example, the first preset duration is 10ms, the second preset duration is 50ms, and the third preset duration is 200ms.
[0073] The 10ms high-frequency acquisition of operational and environmental data can capture rapid fluctuations such as sudden changes in photovoltaic output and sudden access to charging piles in real time, avoiding misjudgments of status caused by data lag, providing a high-fidelity data source for subsequent processing, and laying a solid foundation for perception accuracy.
[0074] The intelligent prediction model inference is executed in 50ms. It constructs complete time-series features by collecting 5 sets of data in 10ms increments to ensure prediction accuracy, and can also quickly update future output and load trends to provide near real-time basis for parameter optimization, thus balancing real-time performance and prediction reliability.
[0075] The deep reinforcement learning parameter optimization is performed in 200ms, which is longer than the prediction cycle. Sufficient computing power can be reserved to complete multiple rounds of iteration, ensuring the output of globally optimal parameters and avoiding local optima or system oscillations in short-cycle optimization. At the same time, it matches the device response speed to ensure stable parameter execution.
[0076] It should be understood that in some embodiments, the components may be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods may be implemented using software or firmware stored in memory and executed by a suitable instruction execution system.
[0077] This embodiment also provides a computer program product 10, a machine-readable storage medium 20, and a computer device 30. Figure 3 This is a schematic diagram of a computer program product according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a machine-readable storage medium according to an embodiment of the present invention. Figure 5 This is a schematic diagram of a computer device according to an embodiment of the present invention. The computer program product 10 includes a computer program 11, which, when executed by the processor 32, implements the steps of any of the above-described microgrid control methods. A machine-readable storage medium 20 stores the computer program 11 thereon, which, when executed by the processor 32, implements the steps of the microgrid control method of any of the above-described embodiments. The computer device 30 may include a memory 31, a processor 32, and the computer program 11 stored in the memory 31 and running on the processor 32.
[0078] The computer program 11 used to perform the operations of this invention may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages and procedural programming languages. The computer program 11 may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, to perform aspects of this invention, electronic circuits, including, for example, programmable logic circuits, Field-Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), may execute computer-readable program instructions to personalize the electronic circuits by utilizing state information from computer-readable program instructions.
[0079] For the purposes of this embodiment, computer program product 10 is a related product that includes computer program 11.
[0080] For the purposes of this embodiment, the machine-readable storage medium 20 is a tangible device capable of holding and storing a computer program 11. It can be any device capable of containing, storing, communicating, propagating, or transmitting the program 11 for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the machine-readable storage medium 20 include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical encoding device, and any suitable combination thereof.
[0081] Computer device 30 can be, for example, a server, desktop computer, laptop computer, tablet computer, or smartphone. In some examples, computer device 30 can be a cloud computing node. Computer device 30 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer device 30 can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can reside on local or remote computing system storage media, including storage devices.
[0082] Computer device 30 may include a processor 32 adapted to execute stored instructions and a memory 31 that provides temporary storage space for the operation of said instructions during operation. The processor 32 may be a single-core processor, a multi-core processor, a computing cluster, or any other configuration. The memory 31 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.
[0083] Computer device 30 may also include a network adapter / interface and an input / output (I / O) interface. The I / O interface allows external devices that can be connected to the computer device to input and output data. The network adapter / interface provides communication between the computer device and a network, typically represented as a communication network.
[0084] Therefore, those skilled in the art should recognize that although numerous exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications conforming to the principles of the present invention can be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Thus, the scope of the present invention should be understood and construed as covering all such other variations or modifications.
Claims
1. A microgrid control method, characterized in that, include: Collect operational data of the microgrid and its various network-type devices, as well as environmental data of the environment in which the microgrid is located; The collected operational data and environmental data are subjected to multi-source feature fusion processing. Based on the fused features, the energy output, load demand and power fluctuation amplitude of the microgrid are predicted within a future preset time period. Based on the prediction results and the current state of each of the network-type devices, the voltage and frequency parameters of each of the network-type devices are optimized; The optimized voltage and frequency parameters are used as parameter adjustment commands and sent to the corresponding network-type devices, so that each network-type device can operate based on the sent parameter adjustment commands.
2. The microgrid control method according to claim 1, characterized in that, The grid-type equipment includes photovoltaic inverters, energy storage converters, charging piles, and heat pumps, and each of the grid-type equipment integrates a grid-type virtual synchronous machine. The step of performing multi-source feature fusion processing on the collected operating data and environmental data includes: The fluctuation sequence of photovoltaic output is extracted based on the operating data of the photovoltaic inverter, the rate of change of charging and discharging power is extracted based on the operating data of the energy storage converter, and the time series data of the number of charging piles is extracted based on the operating data of the charging piles as time series features. The state of charge is extracted based on the operating data of the energy storage converter, the operating mode is extracted based on the operating data of the heat pump, and the bus voltage deviation and frequency fluctuation amplitude are extracted based on the operating data of the microgrid as state characteristics. Based on the environmental data, light intensity, ambient temperature, and power grid voltage stability level are extracted as environmental characteristics. By integrating the temporal features, the state features, and the environmental features, a multi-dimensional feature matrix for prediction is constructed.
3. The microgrid control method according to claim 2, characterized in that, The steps for predicting the energy output, load demand, and power fluctuation amplitude of the microgrid within a preset future time period based on the fused features include: The intelligent prediction model learns the temporal dependencies in the multi-dimensional feature rectangles, and outputs the predicted results of the energy output, load demand and power fluctuation amplitude of the microgrid in the future preset time period through model inference.
4. The microgrid control method according to claim 3, characterized in that, Based on the prediction results and the current state of each of the network-type devices, the steps for optimizing the voltage and frequency parameters of each of the network-type devices include: The parameters are optimized using a deep reinforcement learning model. The state space of the deep reinforcement learning model includes the prediction results output by the intelligent prediction model and the control parameters of the virtual synchronizer integrated by each of the network-type devices. The action space of the deep reinforcement learning model is defined as the adjustment action of the virtual inertia, damping coefficient and virtual impedance parameters of each virtual synchronizer; The reward function of the deep reinforcement learning model is constructed, which is a weighted combination function of frequency deviation, power allocation error and device loss rate; Through continuous interaction between the deep reinforcement learning model and the microgrid operating environment, the accumulated reward is maximized to generate parameter configuration strategies, thereby optimizing the voltage and frequency parameters of each of the grid-type devices.
5. The microgrid control method according to claim 4, characterized in that, Based on the prediction results and the current state of each of the network-type devices, the steps for optimizing the voltage and frequency parameters of each of the network-type devices include: Obtain the operating status parameters of each of the network-type devices, including the current output voltage, output frequency, and control parameters of the virtual synchronizer; Based on the predicted results of the energy output, load demand and power fluctuation amplitude of the microgrid within the future preset time period, the voltage parameters and frequency parameters of each of the network-type devices are iteratively optimized through a deep reinforcement learning model. The output should meet the target voltage and frequency parameters.
6. The microgrid control method according to claim 4, characterized in that... Also includes: Detect the power fluctuation amplitude of the microgrid; When the power fluctuation exceeds a preset threshold, an emergency optimization mechanism is triggered to shorten the parameter optimization execution cycle of the deep reinforcement learning model. After quickly re-optimizing the deep reinforcement learning model, the parameter adjustment command is reissued to each of the network devices.
7. The microgrid control method according to claim 4, characterized in that... Also includes: The deep reinforcement learning model is periodically trained offline using historical data generated from the operation of the microgrid, and the optimization strategy of the deep reinforcement learning model is dynamically updated to adapt to the long-term changes in the operating characteristics of the microgrid.
8. The microgrid control method according to claim 4, characterized in that, The operational data and environmental data are collected for a first preset duration. The intelligent prediction model is inferred for a second preset duration, and the parameters of the deep reinforcement learning model are optimized for a third preset duration that is longer than the second preset duration.
9. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the microgrid control method according to any one of claims 1-8.
10. A machine-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the microgrid control method according to any one of claims 1-8.
Citation Information
Patent Citations
Power load prediction method based on multi-source heterogeneous data feature fusion, system equipment and medium
CN119401452A
Microgrid control method and system
CN119906143A
Micro-grid energy management method and system based on deep reinforcement learning
CN120109917A
Optical storage direct flexible system short-term load prediction method based on multilevel data association fusion
CN120127625A
Intelligent scheduling control method for optical storage charging and discharging integrated power station
CN120300930A
Cited By
Anti-countercurrent control device and method for three-phase four-wire converter
CN121813286A
Integrated circuit power supply power fusion self-healing control method and device
CN122092666A
Parameter acquisition method and device, storage medium, program product and system
CN122137098A
Parameter acquisition method and device, storage medium, program product and system
CN122137098B
