Community microgrid scheduling method considering photovoltaic energy storage
By constructing a large-scale model for photovoltaic power output prediction and user behavior understanding based on the Transformer architecture, and combining it with deep reinforcement learning algorithms, high-precision prediction and dynamic scheduling of community microgrids were achieved. This solved the problems of low prediction accuracy and slow response in existing technologies, and ensured the stability and economy of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN YUZHEN CULTURE MEDIA CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies fail to fully utilize the capabilities of large AI models in deep feature extraction, long-term time-series dependency capture, and generalization learning. This results in low prediction accuracy, rigid scheduling strategies, and slow system response for community microgrids when facing complex scenarios such as massive distributed resource access, rapid changes in user habits, and frequent extreme weather events.
By employing a large-scale photovoltaic power output prediction model and a large-scale user behavior understanding model based on the Transformer architecture, combined with deep reinforcement learning algorithms, a multi-objective dynamic optimization scheduling model is constructed to generate real-time scheduling instructions. Through an online learning mechanism, iterative corrections are made to achieve accurate prediction and dynamic scheduling of photovoltaic power generation and user demand.
It improves the prediction accuracy of photovoltaic power generation and user electricity consumption behavior, reduces prediction errors, achieves millisecond-level response capability, ensures the stable operation and economic benefits of community microgrids in complex environments, extends the service life of energy storage equipment, and reduces voltage fluctuations and energy waste.
Smart Images

Figure CN122000972A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid dispatching technology, and in particular to a community microgrid dispatching method that takes into account photovoltaic energy storage. Background Technology
[0002] With the transformation of the global energy structure and the advancement of the "dual carbon" goal, the stable operation and efficient management of community microgrids are particularly important as key units connecting distributed renewable energy (such as photovoltaics), energy storage systems and diverse user loads.
[0003] Prior art 1, Chinese patent application number: CN202410366998.0, discloses a community microgrid scheduling method and system, which solves the shortcomings of the prior art, including the following steps: Step 1, acquire charging data of electric vehicles and determine the charging behavior pattern of electric vehicles based on the charging data; Step 2, simulate the disordered charging and discharging behavior of electric vehicles based on the charging mode, power battery characteristics and charging behavior pattern to obtain the total load curve of the community; Step 3, divide user demand into several time periods based on the total load curve, and use different time-of-use electricity prices for different time periods. Electric vehicles discharge when the electricity price is higher and charge when the electricity price is lower. Prior art two, Chinese patent application number: CN202411126407.9, discloses a community microgrid energy storage dispatching method, relating to the field of microgrid energy storage technology. Through demand surveys, data acquisition, connection between energy storage systems and power consumption systems, remote equipment control, and full-process management of microgrid dispatching, it effectively manages and controls different electricity demands within the community. Through methods such as peak-shaving dispatching, emergency dispatching, peak-shaving and valley-leveling dispatching, and other intelligent dispatching methods, it not only specifically meets different electricity demands but also reduces overall electricity fluctuations in the community power grid, mitigates community power grid risks, and utilizes peak-valley electricity price differences to obtain certain economic benefits. Reasonable electricity dispatching and energy storage dispatching can improve the stability and reliability of the power grid, reduce voltage fluctuations and grid faults. Through the management and dispatching of energy storage facilities, renewable energy can be better integrated, promoting the development and application of renewable energy, and driving energy transformation and sustainable development. Prior art three, Chinese patent application number: CN202510439197.7, discloses a community microgrid dispatching method and system considering photovoltaic energy storage, relating to the field of data processing technology. The method includes: collecting photovoltaic energy storage data within the community; identifying trends and periodicities in the data through time series analysis to obtain time series analysis results; constructing a neural network architecture based on the time series analysis results, and predicting future photovoltaic energy storage data based on the neural network architecture to obtain prediction results; and determining the dispatching strategy for power equipment based on the prediction results and the current operating status of the distribution network. This invention improves the utilization efficiency of photovoltaic energy storage systems, reduces electricity costs, and enhances power system stability by comprehensively utilizing time series analysis, neural network prediction, linear programming, and the cutting plane method. Current technologies 1, 2, and 3 fail to fully utilize the advantages of large AI models in deep feature extraction, long-term time-series dependency capture, and generalization learning capabilities. This results in low prediction accuracy, rigid scheduling strategies, and slow system response when facing complex scenarios such as massive distributed resource access, rapidly changing user habits, and frequent extreme weather events. Therefore, this invention provides a community microgrid scheduling method that incorporates photovoltaic energy storage. Summary of the Invention
[0004] To achieve the above objectives, the present invention adopts the following technical solution: One aspect of the present invention provides a community microgrid dispatching method considering photovoltaic energy storage, comprising the following steps: Collect multi-source heterogeneous data of the community microgrid, including photovoltaic power generation data, meteorological environment data, user-side load data, and energy storage battery operation status data; A large-scale photovoltaic power output prediction model based on the Transformer architecture is constructed. The multi-source heterogeneous data is input into the large-scale photovoltaic power output prediction model. The self-attention mechanism is used to capture the long-term time-series dependency features of the data, and the photovoltaic power generation prediction results within a preset time range are output. A large-scale model for understanding user behavior is constructed. Semantic features are extracted and clustered from historical user load data to identify implicit patterns in user electricity consumption behavior and predict the potential for responding to user demand in future periods. Based on the photovoltaic power generation prediction results and the user demand response potential, a multi-objective dynamic optimization scheduling model is constructed with the objectives of minimizing the community microgrid operating cost, minimizing grid power fluctuations, and minimizing carbon emissions. The multi-objective dynamic optimization scheduling model is solved using a deep reinforcement learning algorithm to generate real-time scheduling instructions that include energy storage charging and discharging power, photovoltaic absorption power, and load regulation strategies. The real-time scheduling instructions are sent to various smart terminal devices within the community, and the scheduling strategy is iteratively corrected based on the actual operating data fed back by the devices using the online learning mechanism of the large model.
[0005] In one optional implementation, after collecting the multi-source heterogeneous data of the community microgrid, the method further includes: The collected raw data is preprocessed, including missing value imputation, outlier removal, and normalization. The correlation between meteorological environmental data and photovoltaic power generation was calculated using the Pearson correlation coefficient analysis method, and key influencing factors were selected as the input feature vector of the photovoltaic output prediction model.
[0006] In one optional implementation, the construction of a large-scale photovoltaic power output prediction model based on the Transformer architecture specifically includes: An encoder-decoder structure is adopted, and a position encoding mechanism is introduced at the encoder end to preserve the time information of the time series; The weight allocation among photovoltaic power generation data at different times is calculated by using a multi-head self-attention mechanism, with a focus on the historical time period data that has the greatest impact on the current time. A feedforward neural network is used to perform a nonlinear transformation on the output of the attention mechanism, and residual connections and layer normalization operations are used to prevent model degradation, and the photovoltaic power generation prediction results are output.
[0007] In one optional implementation, after outputting the photovoltaic power generation prediction results within a preset time range, the method further includes: The concept of interval prediction is introduced, and the confidence interval of the photovoltaic power generation prediction result is calculated using the quantile regression algorithm; If the actual monitored photovoltaic power exceeds the confidence interval, it is determined to be a prediction anomaly, and the model retraining mechanism is triggered to update the model parameters.
[0008] In one optional implementation, the construction of the large-scale user behavior understanding model specifically includes: The user's historical electricity load data is transformed into a time-series graph structure, where nodes represent individual users and edges represent the similarity of electricity consumption between users. By using graph neural networks to aggregate time-series graph structure data, spatiotemporal electricity consumption characteristics of user groups within the community can be extracted. By combining natural language processing technology to parse the textual electricity demand submitted by users, unstructured demand is transformed into quantifiable power constraints and incorporated into the user demand response potential assessment.
[0009] In one optional implementation, the construction of the multi-objective dynamic optimization scheduling model specifically includes: Establish the objective function: ; in Operating costs include electricity purchase costs, equipment maintenance costs, and energy storage depreciation costs. Variance of grid power fluctuation; α represents carbon emissions; α, β, and γ are the weighting coefficients for each indicator. The constraints include upper and lower limits of the energy storage system's state of charge, charging and discharging power constraints, photovoltaic absorption constraints, and power balance constraints. These constraints are dynamically updated over time.
[0010] In one optional implementation, the step of solving the multi-objective dynamic optimization scheduling model using a deep reinforcement learning algorithm specifically includes: Construct an intelligent agent and define the current state space of the community microgrid as a vector containing the predicted output of photovoltaic power, current load, SOC status and real-time electricity price; The charging and discharging actions and load regulation actions of the energy storage system are defined as the action space; Set a reward function, and give a positive reward when the scheduling action reduces the objective function J value and satisfies the constraints, and give a negative penalty otherwise; The agent is trained using a proximal policy optimization algorithm or a deep Q-network algorithm to output the optimal real-time scheduling instructions. The aforementioned method of iteratively refining the scheduling strategy based on actual operational data fed back by the equipment, using an online learning mechanism of a large model, specifically includes: Establish a rolling forecast and feedback correction mechanism, and input the actual collected photovoltaic output and load data into the model at set time intervals; Calculate the error between the predicted value and the actual value, and use the backpropagation algorithm to adjust the network weights of the photovoltaic power output prediction model and the user behavior understanding model. By continuously inputting new samples, the model gains the ability to adapt and evolve with seasonal changes and shifts in user habits. It also includes emergency dispatch strategies: Monitor the voltage and frequency parameters at the connection point between the microgrid and the main power grid; When a fault is detected in the main power grid or parameters exceed the limit, the system automatically switches to off-grid operation mode. In off-grid operation mode, a large model is used to quickly generate an islanded operation scheduling strategy with the priority of ensuring power supply to critical loads as the core, and the energy storage system is adjusted to control and support the voltage and frequency of the community microgrid in voltage source mode.
[0011] Another aspect of the present invention provides a community microgrid dispatching system incorporating photovoltaic energy storage, comprising: The multi-dimensional data sensing module is used to collect multi-source heterogeneous data in the community microgrid in real time. The multi-source heterogeneous data includes real-time output data of photovoltaic power generation units, meteorological and environmental monitoring data, battery status data of energy storage systems, user-side smart load data, and power data interacting with the external power grid. The AI fusion prediction module is connected to the multi-dimensional data perception module and is configured with a deep learning prediction model based on spatiotemporal feature fusion. It is used to receive the multi-source heterogeneous data, extract the spatiotemporal correlation features of photovoltaic power output and the behavioral features of user load, and output the photovoltaic power prediction curve and the community load demand prediction curve within the future preset time window. The dynamic optimization decision module, connected to the AI fusion prediction module, is used to construct an objective function with multiple objectives, namely, minimizing system operating costs, minimizing power fluctuations, and optimizing the health loss of energy storage batteries. It combines the prediction curve and preset constraints to generate the optimal scheduling strategy for the current moment using an improved multi-objective particle swarm optimization algorithm. The edge computing control module is connected to the dynamic optimization decision module. It is used to receive the optimal scheduling strategy and parse it into specific control instructions for the photovoltaic inverter, energy storage converter and smart load terminal. At the same time, it monitors the equipment execution feedback in real time and performs local closed-loop correction if deviation occurs. The human-computer interaction and alarm module is used to visualize the microgrid's operating status, prediction data, and scheduling strategies, and to trigger tiered alarms when abnormal operating conditions are detected or prediction errors exceed thresholds.
[0012] In another aspect, the present invention provides an electronic device comprising: At least one memory stores computer-executable instructions non-transiently; At least one processor, configured to run the computer-executable instructions, The computer-executable instructions are executed by the processor to implement the aforementioned community microgrid scheduling method that considers photovoltaic energy storage.
[0013] In another aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by at least one processor, implement the aforementioned community microgrid scheduling method incorporating photovoltaic energy storage.
[0014] This invention collects multi-source heterogeneous data from a community microgrid, including photovoltaic (PV) power generation data, meteorological data, user-side load data, and energy storage battery operating status data. It constructs a large-scale PV output prediction model based on a Transformer architecture, inputs the multi-source heterogeneous data into this model, and uses a self-attention mechanism to capture long-term temporal dependency features of the data, outputting PV power generation prediction results within a preset time range. Furthermore, it constructs a large-scale user behavior understanding model, extracts semantic features and performs cluster analysis on historical user load data to identify implicit patterns in user electricity consumption behavior and predict future user demand response potential. Based on the PV power generation... Based on power prediction results and the user demand response potential, a multi-objective dynamic optimization scheduling model is constructed with the objectives of minimizing the operating cost of the community microgrid, minimizing grid power fluctuations, and minimizing carbon emissions. A deep reinforcement learning algorithm is used to solve the multi-objective dynamic optimization scheduling model, generating real-time scheduling instructions that include energy storage charging and discharging power, photovoltaic absorption power, and load regulation strategies. These real-time scheduling instructions are then distributed to various smart terminal devices within the community. Based on the actual operating data fed back by the devices, the scheduling strategy is iteratively corrected using an online learning mechanism of a large model. This invention possesses a self-evolving capability that becomes increasingly intelligent with use, ensuring the long-term stable operation of the community microgrid in complex environments. Attached Figure Description
[0015] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a community microgrid dispatching method considering photovoltaic energy storage provided in Embodiment 1 of the present invention; Figure 2 This is a framework diagram of a community microgrid dispatching system considering photovoltaic energy storage provided in Embodiment 3 of the present invention; Figure 3 This is a block diagram of the electronic device provided in Embodiment 4 of the present invention; Figure 4 This is a block diagram of a computer-readable storage medium provided in Embodiment 4 of the present invention. Detailed Implementation
[0016] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0017] Hereinafter, the terms "first," "second," etc., are used for descriptive convenience only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0018] In this invention, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, "connection" can be a fixed mechanical connection, a detachable mechanical connection, or an integral part; or, "connection" can be a direct connection or an indirect connection through an intermediate medium. Furthermore, unless otherwise explicitly specified and limited, the term "coupling" should be interpreted broadly. For example, "coupling" can be a direct electrical connection, such as physical contact and electrical conduction between two components; it can also be understood as an electrical connection between different components in a circuit structure through physical lines capable of transmitting electrical signals, such as copper foil or wires on a printed circuit board (PCB), to transmit electrical signals; or, "coupling" can be an indirect electrical connection between two components through an intermediate medium; or, "coupling" can be an electrical connection between two components in a non-contact manner, such as an electrical connection between two components using capacitive coupling to transmit electrical signals.
[0019] In this embodiment of the invention, directional terms such as "up," "down," "left," and "right" may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.
[0020] Example 1, as Figure 1 As shown, this embodiment of the invention provides a community microgrid dispatching method considering photovoltaic energy storage, comprising the following steps: Step S100: Collect multi-source heterogeneous data of the community microgrid, including photovoltaic power generation data, meteorological environment data, user-side load data and energy storage battery operation status data; Step S200: Construct a large-scale photovoltaic power output prediction model based on the Transformer architecture, input the multi-source heterogeneous data into the large-scale photovoltaic power output prediction model, use the self-attention mechanism to capture the long-term time-series dependency features of the data, and output the photovoltaic power generation prediction results within a preset time range. Step S300: Construct a large-scale user behavior understanding model, extract semantic features and perform cluster analysis on historical user load data, identify implicit patterns in user electricity consumption behavior, and predict the potential for responding to user demand in future periods. Step S400: Based on the photovoltaic power generation prediction results and the user demand response potential, a multi-objective dynamic optimization scheduling model is constructed with the objectives of minimizing the operating cost of the community microgrid, minimizing grid power fluctuations, and minimizing carbon emissions. Step S500: Solve the multi-objective dynamic optimization scheduling model using a deep reinforcement learning algorithm to generate real-time scheduling instructions that include energy storage charging and discharging power, photovoltaic absorption power, and load regulation strategies; Step S600: The real-time scheduling command is sent to each smart terminal device in the community, and the scheduling strategy is iteratively corrected based on the actual operation data fed back by the devices using the online learning mechanism of the large model.
[0021] In the above embodiments, the fluctuation trends of photovoltaic power generation and sudden patterns of user electricity consumption can be identified more accurately, significantly reducing prediction errors. High-precision prediction provides a reliable data foundation for subsequent dispatch decisions, effectively reducing dispatch failures and energy waste caused by inaccurate predictions. The introduction of Model Predictive Control (MPC) or deep reinforcement learning algorithms enables online dynamic adjustment of energy storage charging and discharging strategies based on real-time system status and continuously updated prediction results. It can respond to instantaneous fluctuations in photovoltaic output and sudden changes in load within milliseconds or minutes. Through rolling optimization and feedback correction, real-time dynamic balance between the source (photovoltaics), load (users), and storage (batteries) is achieved, significantly improving the microgrid's ability to mitigate random fluctuations.
[0022] This approach achieves deep synergy among multiple objectives, balancing economic efficiency with equipment lifespan and grid stability. A multi-objective dynamic optimization function is constructed, incorporating operating costs, power fluctuation penalties, and the cost of energy storage lifespan degradation. While pursuing peak shaving and valley filling and maximizing economic benefits, the charging and discharging strategies of energy storage are optimized through constraints, avoiding lifespan degradation caused by shallow charging / discharging or overcharging / discharging. This global optimization strategy not only reduces electricity costs for the community but also effectively extends the service life of energy storage equipment and reduces voltage fluctuations, achieving a win-win situation for economic benefits, equipment safety, and grid stability.
[0023] The system's robustness and self-healing capabilities in complex scenarios have been improved by introducing virtual inertial control and online adaptive learning mechanisms. This allows for rapid adjustment of control strategies under abnormal operating conditions, even simulating the inertia of a traditional generator to support grid frequency. When photovoltaic output drops sharply or grid disturbances occur, the system can utilize energy storage facilities to provide rapid support, preventing the community microgrid from collapsing. Simultaneously, through continuous online learning, the system can gradually adapt to seasonal changes and evolving user habits, possessing a self-evolving capability that becomes increasingly intelligent with use, ensuring the long-term stable operation of the community microgrid in complex environments.
[0024] Example 2, as Figure 1 As shown, based on Example 1, the steps provided in this embodiment of the invention, after collecting multi-source heterogeneous data from the community microgrid, further include: The collected raw data is preprocessed, including missing value imputation, outlier removal, and normalization. The correlation between meteorological environmental data and photovoltaic power generation was calculated using the Pearson correlation coefficient analysis method, and key influencing factors were selected as the input feature vector of the photovoltaic output prediction model.
[0025] In one optional implementation, the construction of a large-scale photovoltaic power output prediction model based on the Transformer architecture specifically includes: An encoder-decoder structure is adopted, and a position encoding mechanism is introduced at the encoder end to preserve the time information of the time series; The weight allocation among photovoltaic power generation data at different times is calculated by using a multi-head self-attention mechanism, with a focus on the historical time period data that has the greatest impact on the current time. A feedforward neural network is used to perform a nonlinear transformation on the output of the attention mechanism, and residual connections and layer normalization operations are used to prevent model degradation, and the photovoltaic power generation prediction results are output.
[0026] In one optional implementation, after outputting the photovoltaic power generation prediction results within a preset time range, the method further includes: The concept of interval prediction is introduced, and the confidence interval of the photovoltaic power generation prediction result is calculated using the quantile regression algorithm; If the actual monitored photovoltaic power exceeds the confidence interval, it is determined to be a prediction anomaly, and the model retraining mechanism is triggered to update the model parameters.
[0027] In one optional implementation, the construction of the large-scale user behavior understanding model specifically includes: The user's historical electricity load data is transformed into a time-series graph structure, where nodes represent individual users and edges represent the similarity of electricity consumption between users. By using graph neural networks to aggregate time-series graph structure data, spatiotemporal electricity consumption characteristics of user groups within the community can be extracted. By combining natural language processing technology to parse the textual electricity demand submitted by users, unstructured demand is transformed into quantifiable power constraints and incorporated into the user demand response potential assessment.
[0028] In one optional implementation, the construction of the multi-objective dynamic optimization scheduling model specifically includes: Establish the objective function: ; in Operating costs include electricity purchase costs, equipment maintenance costs, and energy storage depreciation costs. Variance of grid power fluctuation; α represents carbon emissions; α, β, and γ are the weighting coefficients for each indicator. The constraints include upper and lower limits of the energy storage system's state of charge, charging and discharging power constraints, photovoltaic absorption constraints, and power balance constraints. These constraints are dynamically updated over time.
[0029] In one optional implementation, the step of solving the multi-objective dynamic optimization scheduling model using a deep reinforcement learning algorithm specifically includes: Construct an intelligent agent and define the current state space of the community microgrid as a vector containing the predicted output of photovoltaic power, current load, SOC status and real-time electricity price; The charging and discharging actions and load regulation actions of the energy storage system are defined as the action space; Set a reward function, and give a positive reward when the scheduling action reduces the objective function J value and satisfies the constraints, and give a negative penalty otherwise; The agent is trained using a proximal policy optimization algorithm or a deep Q-network algorithm to output the optimal real-time scheduling instructions. The aforementioned method of iteratively refining the scheduling strategy based on actual operational data fed back by the equipment, using an online learning mechanism of a large model, specifically includes: Establish a rolling forecast and feedback correction mechanism, and input the actual collected photovoltaic output and load data into the model at set time intervals; Calculate the error between the predicted value and the actual value, and use the backpropagation algorithm to adjust the network weights of the photovoltaic power output prediction model and the user behavior understanding model. By continuously inputting new samples, the model gains the ability to adapt and evolve with seasonal changes and shifts in user habits. It also includes emergency dispatch strategies: Monitor the voltage and frequency parameters at the connection point between the microgrid and the main power grid; When a fault is detected in the main power grid or parameters exceed the limit, the system automatically switches to off-grid operation mode. In off-grid operation mode, a large model is used to quickly generate an islanded operation scheduling strategy with the priority of ensuring power supply to critical loads as the core, and the energy storage system is adjusted to control and support the voltage and frequency of the community microgrid in voltage source mode.
[0030] In the above embodiments, Step 1: Construct a multi-source heterogeneous data acquisition and preprocessing system: The system first collects multi-source heterogeneous data in real time through smart sensors, smart meters, and weather monitoring stations deployed in the community.
[0031] The above data includes: Photovoltaic data: real-time photovoltaic output power, module panel temperature, and irradiance; Energy storage side data: battery state of charge (SOC), battery state of health (SOH), charge / discharge current and voltage; Load-side data: community basic load (such as lighting, home appliances), electric vehicle access / exit time, and power battery characteristic data; External environmental data: weather forecast data (temperature, humidity, cloud cover), real-time electricity price of the power grid, and power grid frequency deviation.
[0032] The collected data was cleaned, outliers were removed using the Raida criterion, and the Min-Max normalization method was used to map the data to the [0,1] interval to construct a unified time series dataset.
[0033] Step 2: Joint forecasting of photovoltaics and load based on an improved Transformer architecture: Considering the strong temporal correlation and nonlinear characteristics of photovoltaic power output and electric vehicle load, this embodiment abandons the simple linear programming or single neural network in the prior art and adopts an improved Transformer model based on multi-head attention mechanism for prediction.
[0034] Feature embedding: Preprocessed photovoltaic data, meteorological data, and historical load data are embedded into the model according to the time step.
[0035] Spatiotemporal feature extraction: Self-attention layers are used to capture dependencies between different time steps (e.g., improving prediction accuracy by focusing on power generation on historically similar weather days). Simultaneously, location encoding is introduced to preserve the sequential information of the time series.
[0036] Predictive Output: The model outputs the photovoltaic power generation forecast curve P^pv(t) for the next 24 hours, and the total community load (including electric vehicles) forecast curve P^load(t). Compared with existing technologies, this step can more accurately identify the power drop caused by cloud cover and the load surge caused by electric vehicle cluster charging.
[0037] Step 3: Construct a multi-objective dynamic optimization scheduling model: Based on the prediction results obtained in step two, a multi-objective optimization function is constructed to minimize the microgrid operating cost, power fluctuation (i.e., the smoothness), and energy storage lifetime loss.
[0038] The constraints include: power balance constraints, upper and lower limits of energy storage SOC, charging and discharging power constraints, photovoltaic absorption constraints, and grid interaction power limits. This step overcomes the shortcomings of existing technologies that only consider the benefits of a single time-of-use electricity price.
[0039] Step 4: Solve for the optimal scheduling strategy based on deep reinforcement learning: Since the model constructed in step three is a complex optimization problem with high dimension and nonlinearity, traditional methods (such as the cutting plane method mentioned in prior art 3) are slow to solve and prone to getting trapped in local optima. This embodiment uses a deep Q-network (DQN) or proximal policy optimization (PPO) algorithm for online solution.
[0040] State space: defined as St={Ppv(t),Pload(t),SOC(t),Price(t)}, which represents the actual photovoltaic output, actual load, energy storage capacity, and real-time electricity price at the current moment.
[0041] Action space: defined as At = {Pess(t), Pev(t)}. This includes the charging and discharging power commands of the energy storage system and the control commands of the electric vehicle charging station.
[0042] Reward function: designed as Rt = -(Ccost + λ) |Pgrid(t)-Ptarget|) means that if the operating cost decreases and the grid-connected power becomes smooth after the system performs a certain action, a positive reward is given; otherwise, a penalty is given.
[0043] The intelligent agent learns the optimal control strategy for each state through tens of thousands of interactive training sessions with the microgrid environment. In actual operation, the system can directly output the optimal energy storage charging and discharging plan and electric vehicle scheduling instructions.
[0044] Step 5: Rolling Correction and Feedback Control To address prediction errors and unforeseen circumstances, this embodiment introduces a model predictive control (MPC) mechanism.
[0045] Every 15 minutes (one scheduling cycle), the system updates the prediction model using the latest measured data and recalculates the optimized trajectory for the next few hours, but only issues control commands for the first time step to the underlying devices (PCS inverter, charging pile controller).
[0046] If the actual photovoltaic output deviates from the predicted value by more than a threshold, the system immediately triggers dynamic replanning, adjusting the energy storage system from charging to discharging or reducing flexible loads to ensure power balance in the community microgrid. This step solves the problem of delayed dispatch response in existing technologies.
[0047] Through the above embodiments, community microgrids can not only accurately predict photovoltaic and load changes, but also balance economic benefits with grid stability. Compared with the simple time-of-use pricing dispatch of the existing technology, this method can respond to photovoltaic fluctuations more flexibly; compared with the static optimization of the existing technology, this method uses reinforcement learning to achieve millisecond-level dynamic response, significantly improving the renewable energy absorption rate and operational reliability of community microgrids.
[0048] Example 3, as Figure 3 As shown, based on Embodiment 1, this embodiment of the invention provides a community microgrid dispatching system considering photovoltaic energy storage, comprising: The multi-dimensional data sensing module is used to collect multi-source heterogeneous data in the community microgrid in real time. The multi-source heterogeneous data includes real-time output data of photovoltaic power generation units, meteorological and environmental monitoring data, battery status data of energy storage systems, user-side smart load data, and power data interacting with the external power grid. The AI fusion prediction module is connected to the multi-dimensional data perception module and is configured with a deep learning prediction model based on spatiotemporal feature fusion. It is used to receive the multi-source heterogeneous data, extract the spatiotemporal correlation features of photovoltaic power output and the behavioral features of user load, and output the photovoltaic power prediction curve and the community load demand prediction curve within the future preset time window. The dynamic optimization decision module, connected to the AI fusion prediction module, is used to construct an objective function with multiple objectives, namely, minimizing system operating costs, minimizing power fluctuations, and optimizing the health loss of energy storage batteries. It combines the prediction curve and preset constraints to generate the optimal scheduling strategy for the current moment using an improved multi-objective particle swarm optimization algorithm. The edge computing control module is connected to the dynamic optimization decision module. It is used to receive the optimal scheduling strategy and parse it into specific control instructions for the photovoltaic inverter, energy storage converter and smart load terminal. At the same time, it monitors the equipment execution feedback in real time and performs local closed-loop correction if deviation occurs. The human-computer interaction and alarm module is used to visualize the microgrid's operating status, prediction data, and scheduling strategies, and to trigger tiered alarms when abnormal operating conditions are detected or prediction errors exceed thresholds.
[0049] The AI fusion prediction module includes: The data preprocessing unit is used to clean and normalize the collected multi-source heterogeneous data, and to use the Pearson correlation coefficient to screen out meteorological characteristic factors that are strongly correlated with photovoltaic output. The spatiotemporal feature extraction unit uses an LSTM neural network or Transformer architecture with an attention mechanism to encode historical photovoltaic data and load data, capture long-distance dependencies between different time steps, and focus on key influencing periods through an attention weight matrix; The error compensation unit is used to compare the preliminary prediction results with the actual data collected in real time, calculate the prediction error, and use the Bayesian optimization algorithm to dynamically adjust the hyperparameters of the model online to correct the model bias.
[0050] The objective function expression in the dynamic optimization decision module is constructed as follows: ; in, Let t be the grid electricity price. For power exchange with the power grid; For the total load of the community, The target load smoothing value; Based on battery state of charge and charging / discharging power Calculated battery health degradation cost; , , These are weighting coefficients for economy, smoothness, and battery life, respectively, and these weighting coefficients can be adaptively adjusted according to the current season or grid demand.
[0051] The dynamic optimization decision module introduces a virtual inertial response constraint when solving the objective function, specifically: By adding frequency change rate and power ramp rate constraints to the constraints, the generated optimal scheduling strategy can instruct the energy storage system to simulate the inertial characteristics of a traditional synchronous generator and quickly process active power to support the frequency stability of the community microgrid when photovoltaic output fluctuates drastically, rather than scheduling based solely on economics.
[0052] The system also includes a user participation incentive module, which is configured as follows: Receive load reduction or energy storage discharge commands from the dynamic optimization decision module; Based on the current adjustable capacity and historical response records of users, a non-cooperative game model is constructed to calculate the optimal compensation electricity price for different users participating in the dispatch. Send a scheduling invitation containing a compensation amount to the user terminal, and update the user's strategy reputation score in the game model in real time based on the user's response.
[0053] The edge computing control module further includes an anomaly detection and isolation unit, used for: Real-time analysis of the output voltage and current waveforms of photovoltaic inverters and energy storage converters; Using trained agents based on deep deterministic policy gradient (DDPG) to identify equipment fault features; When a fault is detected in some photovoltaic modules or energy storage modules, the electrical connection path of the microgrid is automatically retopologically reprogrammed, the faulty part is disconnected, and the dynamic optimization decision module is triggered to recalculate the optimal scheduling strategy for the remaining healthy devices.
[0054] A model predictive control (MPC) unit is provided between the AI fusion prediction module and the dynamic optimization decision module for use in this purpose. Using a rolling optimization approach, only the control commands for the current time are implemented at each sampling time; At the next sampling moment, the latest state update is obtained by using the multi-dimensional data sensing module, and the future time domain trend is re-predicted, thus forming a closed-loop control mechanism of "prediction-rolling optimization-feedback correction" to cope with the uncertainty of photovoltaic output.
[0055] The system is configured with a multi-time-scale collaborative scheduling mode: On long time scales (such as hours), based on photovoltaic power prediction curves and time-of-use pricing, charge and discharge plans for energy storage systems are developed to maximize economic benefits. On short timescales (such as minutes or seconds), photovoltaic output power is smoothed and scheduling plans are tracked based on real-time power fluctuation data; The dynamic optimization decision-making module is responsible for coordinating scheduling instructions at both long and short time scales to prevent short-term adjustment actions from deviating from the economically optimal solution at the long-term time scale.
[0056] The system also integrates a carbon flow monitoring component for: The total carbon emissions of the microgrid under real-time dispatch are calculated based on the real-time carbon emission intensity factor of the external power grid and the clean attributes of community photovoltaic power generation. Incorporate total carbon emissions as a penalty into the objective function of the dynamic optimization decision module, or use it as a constraint to limit the proportion of electricity purchased from high-carbon grids, in order to promote the local consumption of green energy.
[0057] Example 4: Figure 3 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present invention is shown.
[0058] The electronic device may include a central processing unit / microprocessor / main control chip, etc. 4; and a storage medium 5, coupled to the central processing unit / microprocessor / main control chip, etc. 4, and storing computer-executable instructions therein for performing the steps of various methods of embodiments of the present invention when executed by the processor.
[0059] The central processing unit / microprocessor / main control chip, etc., can include, but are not limited to, one or more processors or microprocessors.
[0060] Storage medium 5 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (e.g., hard disk, floppy disk, solid-state drive, removable disk, CD-ROM, DVD-ROM, Blu-ray disc, etc.).
[0061] In addition, the electronic device may also include (but is not limited to) a data bus 6, an input / output bus / external bus / device bus 7, a display 8, and input / output devices 9 (e.g., keyboard, mouse, speaker, etc.).
[0062] The central processing unit / microprocessor / main control chip, etc. 4 can communicate with external devices (8, 9, etc.) via I / O bus 7 through wired or wireless network (not shown).
[0063] The storage medium 5 may also store at least one computer-executable instruction for performing the steps of various functions and / or methods in the embodiments described herein when the central processing unit / microprocessor / main control chip, etc., 4 is running.
[0064] In one embodiment, the at least one computer-executable instruction may also be compiled into or comprise a software product, wherein one or more computer-executable instructions are executed by a processor to perform the steps of the various functions and / or methods in the embodiments described herein.
[0065] Figure 4 A schematic diagram of a computer-readable storage medium according to an embodiment of the present invention is shown.
[0066] like Figure 4As shown, the non-transitory computer-readable storage medium 11 stores instructions, such as computer-readable instructions 10. When the computer-readable instructions 10 are executed by a processor, the various methods described above can be performed. The non-transitory computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-transitory non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. For example, the non-transitory computer-readable storage medium 11 can be connected to a computing device such as a computer, and then, when the computing device executes the computer-readable instructions 10 stored on the computer-readable storage medium 11, the various methods described above can be performed.
[0067] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0068] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0069] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0070] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the methods of the various embodiments of this invention through a computer device (which may be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0071] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A community microgrid dispatching method considering photovoltaic energy storage, characterized in that, Includes the following steps: Collect multi-source heterogeneous data of the community microgrid, including photovoltaic power generation data, meteorological environment data, user-side load data, and energy storage battery operation status data; A large-scale photovoltaic power output prediction model based on the Transformer architecture is constructed. The multi-source heterogeneous data is input into the large-scale photovoltaic power output prediction model. The long-term time-series dependency features of the data are captured by the self-attention mechanism, and the photovoltaic power generation prediction results within a preset time range are output. A large-scale model for understanding user behavior is constructed. Semantic features are extracted and clustered from historical user load data to identify implicit patterns in user electricity consumption behavior and predict the potential for responding to user demand in future periods. Based on the photovoltaic power generation prediction results and the user demand response potential, a multi-objective dynamic optimization scheduling model is constructed with the objectives of minimizing the community microgrid operating cost, minimizing grid power fluctuations, and minimizing carbon emissions. The multi-objective dynamic optimization scheduling model is solved using a deep reinforcement learning algorithm to generate real-time scheduling instructions that include energy storage charging and discharging power, photovoltaic power consumption, and load regulation strategies. The real-time scheduling instructions are sent to various smart terminal devices within the community, and the scheduling strategy is iteratively corrected based on the actual operating data fed back by the devices using the online learning mechanism of the large model.
2. The community microgrid dispatching method considering photovoltaic energy storage as described in claim 1, characterized in that, After collecting the multi-source heterogeneous data of the community microgrid, the process also includes: The collected raw data is preprocessed, including missing value imputation, outlier removal, and normalization. The correlation between meteorological environmental data and photovoltaic power generation was calculated using the Pearson correlation coefficient analysis method, and key influencing factors were selected as the input feature vector of the photovoltaic output prediction model.
3. A community microgrid dispatching method considering photovoltaic energy storage as described in claim 1, characterized in that, The construction of a large-scale photovoltaic power output prediction model based on the Transformer architecture specifically includes: An encoder-decoder structure is adopted, and a position encoding mechanism is introduced at the encoder end to preserve the time information of the time series; The weight allocation among photovoltaic power generation data at different times is calculated by using a multi-head self-attention mechanism, with a focus on the historical time period data that has the greatest impact on the current time. A feedforward neural network is used to perform a nonlinear transformation on the output of the attention mechanism, and residual connections and layer normalization operations are used to prevent model degradation, and the photovoltaic power generation prediction results are output.
4. A community microgrid dispatching method considering photovoltaic energy storage as described in claim 1, characterized in that, After outputting the photovoltaic power generation prediction results within the preset time range, the method further includes: The concept of interval prediction is introduced, and the confidence interval of the photovoltaic power generation prediction result is calculated using the quantile regression algorithm; If the actual monitored photovoltaic power exceeds the confidence interval, it is determined to be a prediction anomaly, and the model retraining mechanism is triggered to update the model parameters.
5. A community microgrid dispatching method considering photovoltaic energy storage as described in claim 1, characterized in that, The aforementioned construction of a large-scale user behavior understanding model specifically includes: The user's historical electricity load data is transformed into a time-series graph structure, where nodes represent individual users and edges represent the similarity of electricity consumption between users. By using graph neural networks to aggregate time-series graph structure data, spatiotemporal electricity consumption characteristics of user groups within the community can be extracted. By combining natural language processing technology to parse the textual electricity demand submitted by users, unstructured demand is transformed into quantifiable power constraints and incorporated into the user demand response potential assessment.
6. A community microgrid dispatching method considering photovoltaic energy storage as described in claim 1, characterized in that, The construction of the multi-objective dynamic optimization scheduling model specifically includes: Establish the objective function: ; in Operating costs include electricity purchase costs, equipment maintenance costs, and energy storage depreciation costs. The variance of grid power fluctuation; α represents carbon emissions; α, β, and γ are the weighting coefficients for each indicator. The constraints include upper and lower limits of the energy storage system's state of charge, charging and discharging power constraints, photovoltaic absorption constraints, and power balance constraints. These constraints are dynamically updated over time.
7. A community microgrid dispatching method considering photovoltaic energy storage as described in claim 1, characterized in that, The method of solving the multi-objective dynamic optimization scheduling model using a deep reinforcement learning algorithm specifically includes: Construct an intelligent agent and define the current state space of the community microgrid as a vector containing the predicted output of photovoltaic power, current load, SOC status and real-time electricity price; The charging and discharging actions and load regulation actions of the energy storage system are defined as the action space; Set a reward function, and give a positive reward when the scheduling action reduces the objective function J value and satisfies the constraints, and give a negative penalty otherwise; The agent is trained using a proximal policy optimization algorithm or a deep Q-network algorithm to output the optimal real-time scheduling instructions. The aforementioned method of iteratively refining the scheduling strategy based on actual operational data fed back by the equipment, using an online learning mechanism of a large model, specifically includes: Establish a rolling forecast and feedback correction mechanism, and input the actual collected photovoltaic output and load data into the model at set time intervals; Calculate the error between the predicted value and the actual value, and use the backpropagation algorithm to adjust the network weights of the photovoltaic power output prediction model and the user behavior understanding model. By continuously inputting new samples, the model gains the ability to adapt and evolve with seasonal changes and shifts in user habits. It also includes emergency dispatch strategies: Monitor the voltage and frequency parameters at the connection point between the microgrid and the main power grid; When a fault is detected in the main power grid or parameters exceed the limit, the system automatically switches to off-grid operation mode. In off-grid operation mode, a large model is used to quickly generate an islanded operation scheduling strategy with the priority of ensuring power supply to critical loads as the core, and the energy storage system is adjusted to control and support the voltage and frequency of the community microgrid in voltage source mode.
8. A community microgrid dispatching system considering photovoltaic energy storage, as described in any one of claims 1 to 7, characterized in that, include: The multi-dimensional data sensing module is used to collect multi-source heterogeneous data in the community microgrid in real time. The multi-source heterogeneous data includes real-time output data of photovoltaic power generation units, meteorological and environmental monitoring data, battery status data of energy storage systems, user-side smart load data, and power data interacting with the external power grid. The AI fusion prediction module is connected to the multi-dimensional data perception module and is configured with a deep learning prediction model based on spatiotemporal feature fusion. It is used to receive the multi-source heterogeneous data, extract the spatiotemporal correlation features of photovoltaic power output and the behavioral features of user load, and output the photovoltaic power prediction curve and the community load demand prediction curve within the future preset time window. The dynamic optimization decision module, connected to the AI fusion prediction module, is used to construct an objective function with multiple objectives, namely, minimizing system operating costs, minimizing power fluctuations, and optimizing the health loss of energy storage batteries. It combines the prediction curve and preset constraints to generate the optimal scheduling strategy for the current moment using an improved multi-objective particle swarm optimization algorithm. The edge computing control module is connected to the dynamic optimization decision module. It is used to receive the optimal scheduling strategy and parse it into specific control instructions for the photovoltaic inverter, energy storage converter and smart load terminal. At the same time, it monitors the equipment execution feedback in real time and performs local closed-loop correction if deviation occurs. The human-computer interaction and alarm module is used to visualize the microgrid's operating status, prediction data, and scheduling strategies, and to trigger tiered alarms when abnormal operating conditions are detected or prediction errors exceed thresholds.
9. An electronic device, comprising: At least one memory stores computer-executable instructions non-transiently; At least one processor, configured to run the computer-executable instructions, The computer-executable instructions are executed by the processor to implement a community microgrid scheduling method considering photovoltaic energy storage according to any one of claims 1-7.
10. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer-executable instructions that, when executed by at least one processor, implement a community microgrid scheduling method considering photovoltaic energy storage according to any one of claims 1-7.
Citation Information
Patent Citations
Community microgrid scheduling method and system
CN118412842A
A Community Microgrid Energy Storage Scheduling Method
CN119010039B
A Community Microgrid Scheduling Method Considering Photovoltaic Energy Storage
CN119994897B