Country micro energy network optimization scheduling system and method based on adaptive dynamic programming
By combining adaptive dynamic programming algorithm with Markov decision process and piecewise linear function approximation value function, the problem of multi-period optimization and uncertainty in microgrid scheduling is solved, realizing global coordinated optimization scheduling of distributed energy and electric vehicle units, and improving system stability and energy utilization efficiency.
Patent Information
- Application Number
- CN202511331462.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2025-12-16
AI Technical Summary
Traditional microgrid scheduling methods are difficult to effectively handle multi-period optimization problems and strong uncertainties, especially when facing the complex situation of distributed energy and electric vehicle charging, which leads to complex grid load management and difficulty in achieving global optimization scheduling.
An adaptive dynamic programming algorithm is used in conjunction with Markov decision processes and piecewise linear function approximation functions to establish a multi-period optimization model, which acquires distributed energy and load data in real time and optimizes the scheduling of distributed energy, energy storage units and electric vehicle units.
It enables real-time online optimization of microgrids, reduces reliance on short-term forecast information, avoids the disaster of dimensionality, achieves global coordinated optimization scheduling, and improves energy utilization efficiency and system stability.
Smart Images

Figure CN121146191A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distributed energy management and smart grid dispatching, specifically relating to an optimized dispatching system and method for rural microgrids based on adaptive dynamic programming. Background Technology
[0002] With the large-scale integration of distributed renewable energy into rural power grids, grid operation faces challenges such as volatility and uncertainty. Simultaneously, the widespread adoption of electric vehicles in rural areas complicates grid load management. Electric vehicle charging not only increases grid load pressure but also presents new challenges to microgrid scheduling due to the uncertainty of charging times. Traditional microgrid scheduling methods are susceptible to the stochastic nature of renewable energy output and suffer from the "curse of dimensionality" when dealing with complex problems. Existing microgrid scheduling methods, such as model predictive control-based scheduling strategies, while performing well in short-term optimization, have limitations in handling long-term uncertainties and load fluctuations, especially when facing multiple distributed energy sources and mobile energy storage devices, where traditional methods struggle to achieve global optimal scheduling. Therefore, a scheduling method is needed that can effectively handle multi-period optimization problems and maintain efficient and stable operation under strong uncertainty. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this application proposes an optimized scheduling system and method for rural microgrids based on adaptive dynamic programming.
[0004] In the first aspect, this application proposes an optimized scheduling system for rural microgrids based on adaptive dynamic programming, including: a scheduling control unit;
[0005] The dispatch control unit is connected to the distributed energy unit, energy storage unit, electric vehicle unit, and load unit respectively; the distributed energy unit, energy storage unit, electric vehicle unit, dispatch control unit, and load unit are respectively connected to the microgrid bus.
[0006] The scheduling and control unit is used to establish a multi-period optimization model for the rural microgrid based on real-time data of the power generation of the distributed energy unit and the load required by the load unit using a Markov decision process. For the multi-period optimization model, an adaptive dynamic programming algorithm is adopted, combined with a piecewise linear function approximation function, to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is used to perform multi-period optimization scheduling of the distributed energy unit, energy storage unit and electric vehicle unit.
[0007] Secondly, this application proposes an adaptive dynamic programming-based rural microgrid optimization scheduling method, implemented using the adaptive dynamic programming-based rural microgrid optimization scheduling system described in the first aspect, comprising:
[0008] The system acquires real-time data on the power generation of distributed energy units and the load required by the load units. The power generation of distributed energy units includes the maximum output of wind turbines, the maximum output of photovoltaic power generation modules, the output of gas turbines, and the output of fuel cells.
[0009] Based on real-time data of the power generation of distributed energy units and the load required by load units, a multi-period optimization model of the state of rural microgrids is established using Markov decision process. An adaptive dynamic programming algorithm is adopted, combined with a piecewise linear function to approximate the value function, to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is used to schedule distributed energy units, energy storage units and electric vehicle units.
[0010] Based on real-time data of the power generation of distributed energy units and the load required by load units, a multi-period optimization model for the state of rural microgrids is established using Markov decision processes. The calculation formula is as follows:
[0011] ;
[0012] ;
[0013] ;
[0014] in, For state variables, For the gas turbine in the previous period of efforts, For fuel cells in the previous period of efforts, The state of charge of an electric vehicle's energy storage during time period t. This represents the maximum power output of the wind turbine during time period t. This represents the maximum output value obtained by the photovoltaic power generation module during time period t. The active load of the system during time period t. The time-of-use electricity price for system time period t. As decision variables, For time period t, the active power output of the gas turbine is... The active power output of the fuel cell during time period t. Let t be the active power output of the wind turbine. The active power output of the photovoltaic power generation module during time period t. The reactive power output of the gas turbine during time period t. The reactive power output of the fuel cell during time period t. Let t be the reactive power output of the wind turbine. The reactive power output of the photovoltaic power generation module during time period t. The power exchanged between the system and the microgrid during time period t. The charging power of the electric vehicle during time period t. Let t be the discharge power of the electric vehicle. The charging status of the electric vehicle during time period t. Let t represent the discharge state of the electric vehicle during time period t. Let be the voltage amplitude of the i-th node of the microgrid during time period t. Let be the phase angle of the node in time period t. Used to model random quantities in a system and characterize the uncertainty of rural microgrids, representing The external state information obtained between time t and t includes: the day-ahead forecast error power of wind power in the current time period t, the day-ahead forecast error power of photovoltaic power generation modules, the forecast error of load in time period t, and the forecast error of electricity price. The time period within the day The actual values of the decision variables The period before the day The predicted value.
[0015] The method employs an adaptive dynamic programming algorithm, combined with a piecewise linear function to approximate the value function, to obtain a multi-time-period optimized scheduling scheme, including:
[0016] Step S2.1: Initialize the piecewise linear function;
[0017] Step S2.2: Set the total number of time periods, and set the current time period t to 1;
[0018] Step S2.3: Update external status information, which includes: the day-ahead forecast error power of wind power in the current time period t, the day-ahead forecast error power of photovoltaic power generation modules, the forecast error of load in time period t, and the forecast error of electricity price;
[0019] Step S2.4: Solve the Bellman equation based on piecewise linear functions under constraints to obtain the values of the decision variables. The Bellman equation is constructed using state variables and decision variables.
[0020] Step S2.5: Determine whether time period t is less than T;
[0021] Step S2.6: If t is less than T, calculate the slope sampling observation, update the pre-trained slope, and t = t + 1. Proceed to step 2.3 to update the external state information at the next time step.
[0022] Step S2.7: If t equals T, then output the values of the decision variables for all time periods, and use the values of the decision variables for all time periods as the multi-time period optimization scheduling scheme.
[0023] The pre-training slope, the training process includes:
[0024] Step S100: Set the total number of iterations and initialize the piecewise linear function;
[0025] Step S101: Set the total number of time periods, and set the current time period t to 1;
[0026] Step S102: Update the external state information for the next time step;
[0027] Step S103: Solve the Bellman equation based on piecewise linear functions under constraints to obtain the values of the decision variables. The Bellman equation is constructed using state variables and decision variables.
[0028] Step S104: Determine whether time period t is less than T;
[0029] Step S105: If t is less than T, calculate the slope sampling observation, update the slope of the piecewise function, and perform a state transition. Also, increment the time interval t by 1 and proceed to step S102.
[0030] Step S106: If t is not less than T, then determine whether the current iteration number is less than the total iteration number;
[0031] Step S107: If the current iteration count is less than the total iteration count, increment time interval t by 1 and proceed to step S101 to continue iterating;
[0032] Step S108: If the current iteration number is not less than the total iteration number, output the final updated piecewise function slope and use the final updated piecewise function slope as the pre-training slope.
[0033] The Bellman equation is constructed using state variables and decision variables, and its calculation formula is as follows:
[0034] ;
[0035] ;
[0036] in, Let L be an approximation of the post-decision function, and L be the total number of segments in the piecewise linear function. For energy storage of electric vehicles after the decision is made, The state of charge of the electric vehicle's energy storage in the l-th segment of time period t. Let be the slope of the piecewise linear function in the l-th segment of time interval t. As decision variables, For state variables, For state The value function at that point, Let t be the immediate cost for time period t. The state-value function after the decision. These are the state variables after the decision.
[0037] The slope sampling observation value is calculated using the following formula:
[0038] ;
[0039] Where L is the total number of segments in the piecewise linear function. For the nth iteration, the sampled observation value of the slope of the l-th piecewise linear function in time period t is... This is an approximation of the state-value function after the decision in the (n-1)th iteration. The state of charge of the electric vehicle's energy storage in the l-th segment of time period t. Let be the slope of the piecewise linear function in the i-th segment during time interval t of the (n-1)-th iteration. Let be the length to fill the x-coordinate corresponding to segment i. The immediate cost for the t+1 period. Let be the slope of the piecewise linear function in the i-th segment during the (n-1)th iteration and time interval t+1. This represents the length of the horizontal axis filled in segment i during time period t+1. This represents the state of charge of the electric vehicle's energy storage during time period t+1.
[0040] The slope of the updated piecewise function is calculated as follows:
[0041] ;
[0042] in, Let l be the slope of the piecewise linear function in the l-th segment during the t-th iteration. Update the step size for slope. Let l be the slope of the piecewise linear function in the (n-1)th iteration, time interval t. This represents the sampled observation of the slope of the piecewise linear function in the l-th segment during the t-th time period of the nth iteration.
[0043] Thirdly, this application proposes an electronic device, comprising: one or more processors, and a memory for storing instructions, which, when executed by the one or more processors, cause the one or more processors to execute the aforementioned rural microgrid optimization scheduling method based on adaptive dynamic programming.
[0044] Fourthly, this application proposes a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the aforementioned adaptive dynamic programming-based rural microgrid optimization scheduling method.
[0045] Beneficial effects:
[0046] This application proposes an optimized scheduling system and method for rural microgrids based on adaptive dynamic programming. By acquiring real-time data on photovoltaic power generation, electric vehicle charging behavior, and load demand, and combining it with piecewise linear functions to approximate the value function, the system achieves real-time online optimization of the microgrid's state. This reduces reliance on short-term forecast information and avoids the "curse of dimensionality" problem in traditional dynamic programming, enabling global coordinated and optimized scheduling of distributed energy sources, electric vehicle units, and energy storage units within the microgrid. Attached Figure Description
[0047] Figure 1 The principle block diagram of the rural microgrid optimization scheduling system based on adaptive dynamic programming in this application embodiment;
[0048] Figure 2 A schematic diagram of the electric vehicle unit according to an embodiment of this application;
[0049] Figure 3 A schematic diagram of the scheduling control unit in an embodiment of this application;
[0050] Figure 4 This application provides a schematic diagram of the scheduling process for the electric vehicle charging module and the electric vehicle discharging module in an embodiment of the present application.
[0051] Figure 5 A schematic diagram of the cluster analysis process of the prediction module in the scheduling control unit of this application embodiment;
[0052] Figure 6 Flowchart of the rural microgrid optimization scheduling method based on adaptive dynamic programming in this application embodiment;
[0053] Figure 7 The flowchart of slope training in this application embodiment. Detailed Implementation
[0054] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0055] Example 1:
[0056] This embodiment proposes an optimized scheduling system for rural microgrids based on adaptive dynamic programming, such as... Figure 1 As shown, it includes: a scheduling and control unit;
[0057] The dispatch control unit is connected to the distributed energy unit, energy storage unit, electric vehicle unit, and load unit respectively; the distributed energy unit, energy storage unit, electric vehicle unit, dispatch control unit, and load unit are respectively connected to the microgrid bus.
[0058] The scheduling and control unit is used to establish a multi-period optimization model for the rural microgrid based on real-time data of the power generation of the distributed energy unit and the load required by the load unit using a Markov decision process. For the multi-period optimization model, an adaptive dynamic programming algorithm is used, combined with a piecewise linear function approximation function, to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is used to perform multi-period optimization scheduling of the distributed energy unit, energy storage unit and electric vehicle unit.
[0059] In this embodiment, the distributed energy unit is used to supply electricity and backup power to the rural microgrid;
[0060] The energy storage unit is used to store or release electrical energy from the rural microgrid;
[0061] The electric vehicle unit is used to assist the system in balancing the load unit through a charging and discharging strategy;
[0062] The load unit is used to provide load to the rural microgrid.
[0063] In this embodiment, the charging and discharging strategy assistance system includes: an electric vehicle charging module and an electric vehicle discharging module;
[0064] The electric vehicle charging module is used to charge the electric vehicle when the load of the rural microgrid is lower than the first load threshold, and to release electrical energy to the rural microgrid when the load of the rural microgrid is equal to or higher than the first load threshold.
[0065] The scheduling and control unit includes: a prediction module and a decision module; the prediction module and the decision module are connected.
[0066] The prediction module is used to obtain real-time data on the power generation of the distributed energy unit and the load required by the load unit.
[0067] The decision module is used to establish a multi-period optimization model of the rural microgrid based on the real-time data of the power generation of the distributed energy unit and the load required by the load unit, using the Markov decision process, and adopting an adaptive dynamic programming algorithm combined with a piecewise linear function approximation function to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is then used to schedule the distributed energy unit, energy storage unit and electric vehicle unit.
[0068] In this embodiment, the distributed energy unit includes a wind turbine, rooftop photovoltaic modules, a micro gas turbine, and a fuel cell, which are used for the main energy supply and backup power regulation of the rural microgrid, respectively. The localized production and consumption of the distributed energy unit gives the microgrid a high degree of energy independence, especially in islanded mode disconnected from the main grid. The distributed energy unit works in conjunction with the dispatch control unit to optimize the output power of wind power, photovoltaic power, and fuel cells using real-time data.
[0069] The energy storage unit includes a battery module and a battery management module. The battery module is connected to the microgrid via a bidirectional DC / DC converter for energy storage and release. The battery management module controls the battery's charge and discharge state through an optimization algorithm, adjusting the battery's operating mode according to current power demand and supply conditions. Specifically, the battery management module employs an adaptive charge and discharge control algorithm based on battery state, dynamically adjusting the battery's operating mode according to the battery's state of charge (SOC) and system load requirements to ensure efficient operation and longevity of the energy storage system.
[0070] The electric vehicle unit, acting as a mobile energy storage device, utilizes a charging and discharging strategy auxiliary system for load balancing and communicates with the dispatch control unit. Specifically, the electric vehicle unit discharges during peak load periods and charges during off-peak periods to balance the power load of the microgrid and improve the utilization rate of distributed energy resources. The charging and discharging strategy auxiliary system includes an electric vehicle charging module and an electric vehicle discharging module, such as... Figure 2 As shown, the electric vehicle charging module charges electric vehicles during periods of low grid load, while the electric vehicle discharging module releases energy into the microgrid during peak load periods, reducing external power demand and improving the economic efficiency of system operation. The main function of the charging and discharging strategy auxiliary system is to manage the energy flow of electric vehicles as mobile energy storage devices within the microgrid. This system dynamically adjusts the charging and discharging behavior of electric vehicles based on factors such as real-time demand of the microgrid, renewable energy generation forecasts, energy storage status, electricity price fluctuations, and the usage time and remaining power of electric vehicle users, thus assisting in system load balancing. The system sets different charging and discharging priorities based on the charging needs of electric vehicle users, vehicle off-grid time, battery status, and the overall load of the microgrid, employing a dynamic pricing-driven strategy. This enhances the value of electric vehicles as mobile energy storage devices and provides significant benefits in load balancing, energy utilization, and cost savings.
[0071] In this embodiment, the electric vehicle charging module connects to the microgrid control center via the CAN communication protocol to achieve real-time monitoring of the electric vehicle charging status and dynamically adjusts the charging power according to the system load based on the optimization instructions of the scheduling control unit. The electric vehicle discharging module is used to feed electrical energy back to the microgrid via V2G (vehicle-to-grid) technology during peak grid load periods and optimize the discharge rate based on real-time load data to ensure a balance between system power supply and demand.
[0072] The scheduling and control unit is based on the Adaptive / Approximate Dynamic Programming (ADP) algorithm and utilizes a Markov Decision Process (MDP) to model the microgrid state, achieving multi-time-period optimized scheduling. Specifically, the scheduling and control unit avoids the curse of dimensionality in dynamic programming by real-time monitoring of the system state and combining a value function approximated by a piecewise linear function, thus achieving optimal scheduling of distributed energy resources and electric vehicle units. Distributed energy units are connected to the microgrid bus, energy storage units are connected to the microgrid via bidirectional DC-DC converters, electric vehicle units are connected to the microgrid bus, the scheduling and control unit is connected to the microgrid bus, and load units are connected to the microgrid bus.
[0073] In this embodiment, the scheduling control unit includes a prediction module and a decision-making module, such as... Figure 3 As shown, the prediction module acquires and processes real-time data on distributed energy generation and load demand. The decision-making module generates the optimal scheduling strategy using an algorithm based on Markov decision processes and sends scheduling instructions to each unit. The prediction module, through communication interfaces with wind turbines, photovoltaic modules, and electric vehicle units, acquires real-time operating status and external environmental data for each unit and predicts future electricity demand and distributed generation based on historical data and machine learning algorithms. Specifically, the prediction module uses a multi-layer neural network model to analyze historical load and weather data to obtain the impact of environmental variables such as wind speed and solar radiation on distributed energy output. The prediction module further combines electric vehicle charging behavior data, identifies typical charging patterns through cluster analysis, and generates predicted values for future load demand based on historical load fluctuations of the system.
[0074] The decision-making module, based on future data provided by the prediction module and combined with the optimization results of the ADP (Adaptive Dynamic Programming) algorithm, dynamically generates scheduling strategies for distributed energy, energy storage units, and electric vehicles, and sends instructions to each unit to achieve globally optimal microgrid scheduling.
[0075] The decision-making module includes a decision optimization submodule and a feedback control submodule. The decision optimization submodule estimates the energy storage state of electric vehicles using a piecewise linear approximation method based on the optimal value function generated by the ADP algorithm, thereby calculating the optimal scheduling strategy for the system. This module can adjust the scheduling decisions of wind turbines, photovoltaic modules, gas turbines, and electric vehicles in real time without relying on long-term load forecasting, reducing external power input.
[0076] The feedback control submodule dynamically adjusts the scheduling strategy based on real-time monitoring of the system status, ensuring the stability of power supply and the economy of the system during actual operation. By comparing the actual execution results with predicted data, the feedback control submodule can quickly respond to sudden load changes and dynamically modify the output power of each unit or the charging and discharging behavior of energy storage units to maintain the balance of the power system.
[0077] The load unit includes household loads, which are connected to the microgrid bus and adjust power demand in response to the system's optimized scheduling strategy.
[0078] The electric vehicle charging module and electric vehicle discharging module of the charging and discharging strategy auxiliary system in the electric vehicle unit, such as Figure 4 As shown, its execution steps can be summarized as follows:
[0079] Step 11: The electric vehicle unit connects to the scheduling control unit using the CAN communication protocol and sends the electric vehicle's charging status, remaining power, and battery health status to the scheduling control unit in real time.
[0080] Step 12: Based on the microgrid load status, the scheduling control unit sends optimization commands to adjust the charging power of electric vehicles. During periods when the load is below a preset load threshold, the electric vehicle charging module increases the charging power according to the optimization commands, thereby achieving efficient charging of electric vehicles.
[0081] Step 13: The dispatch control unit combines electricity price fluctuations with real-time forecasts of renewable energy generation to perform multi-period optimization scheduling, thereby dynamically allocating electric vehicle charging tasks and prioritizing charging during periods when the electricity price is lower than a preset electricity price threshold or when renewable energy generation is higher than a preset generation threshold, thus maximizing economic benefits.
[0082] Step 14: During periods when the grid load is higher than the preset load threshold, electric vehicles use V2G (Vehicle-to-Grid) technology to feed the stored electrical energy back to the microgrid via an inverter.
[0083] In this embodiment, this process is achieved through a V2G bidirectional charging and discharging interface to ensure the bidirectional nature of the power flow.
[0084] Step 15: Based on real-time load data, the electric vehicle discharge module calculates the current load demand and system energy storage status, and dynamically adjusts the discharge rate.
[0085] In this embodiment, by optimizing the algorithm, it is ensured that the discharge rate meets the system's power requirements while maximizing the protection of the electric vehicle battery's lifespan.
[0086] Step 16: The system combines the electric vehicle user's trip plan, remaining battery power, and off-grid time to set discharge priority, ensuring that the vehicle has enough remaining battery power to support driving needs before the user needs to use the vehicle.
[0087] Furthermore, clustering analysis techniques in the prediction module of the scheduling and control unit, such as... Figure 5 As shown, the steps can be summarized as follows:
[0088] Step 21: Preprocess the received data, which is electric vehicle charging behavior data.
[0089] Specifically, the electric vehicle charging behavior data is organized into a time series format, including information such as charging time, charging amount, charging duration, and charging location for each electric vehicle. The charging data is normalized using the Z-score standardization method to avoid the impact of differences in the magnitude of different features on the clustering results.
[0090] Step 22: Extract features from the preprocessed data.
[0091] Specifically, charging behavior data exhibits significant time dependencies, and the timing and duration of charging influence pattern recognition. Recurrent Neural Networks (RNNs) can capture dynamic features in time series data, especially long-short-term dependencies. By inputting time-series charging data into an RNN model, a feature vector is obtained for each time step (e.g., charging start time, end time, charging amount, etc.). The hidden layers of the RNN process the time-series data step-by-step through a recursive structure, capturing temporal dependencies. Improved RNNs, such as Long Short-Term Memory (LSTM) or Gated Recurrent Units (GRUs), are used to further enhance the ability to capture long-term dependencies. Finally, the high-dimensional time-series features extracted by the RNN are mapped to a low-dimensional embedding space, generating a low-dimensional representation of each electric vehicle charging behavior.
[0092] Hidden state at each time step You can input data The hidden state of the previous time step The calculation yielded: ;
[0093] in, Let be the hidden layer weight matrix, representing the weights of the previous hidden state. Impact on the current hidden state The input weight matrix represents the current input. The effect on the hidden state, For bias vectors, This is the activation function.
[0094] Step 23: Optimize the embedding space of the low-dimensional representation of each electric vehicle charging behavior to obtain optimized features;
[0095] In this embodiment, to make the representation of the low-dimensional embedding space more suitable for clustering tasks, the clustering analysis technique employs a joint optimization strategy. This strategy adjusts the data embedding representation during model training, making it easier to cluster in the low-dimensional space. Using an autoencoder structure, a decoder remaps the low-dimensional representation of each electric vehicle charging behavior back to the high-dimensional space, and calculates the error between the reconstructed data and the original data. K-means and other clustering algorithms are used for initial clustering of the low-dimensional representation, with cluster centers as one of the optimization objectives. By minimizing the distance between the low-dimensional embedded data and its cluster centers, the data becomes easier to cluster.
[0096] The formula for calculating the reconstruction error is: ;in, For reconstruction error, The original input data matrix, The reconstructed data is the output of the autoencoder decoding. For the encoder The representation vector mapped to the low-dimensional embedding space. This is the function that maps the low-dimensional representation back to the original data space for the decoder.
[0097] Step 24: Perform low-dimensional spatial clustering on the optimized features to obtain the clustering results, and classify the clustering results as electric vehicle charging behavior data;
[0098] In this embodiment, after the electric vehicle charging behavior data is successfully embedded into a low-dimensional representation space, the K-means clustering algorithm is used to perform cluster analysis in this low-dimensional space. Several cluster centers are selected using a random initialization method, and the cluster centers are then analyzed based on the Euclidean distance between each data point and the cluster center. ,in, For clustering loss, Let be the representation of the i-th sample in the low-dimensional embedding space (from the encoder output). Let N be the cluster center of the i-th sample, and N be the total number of data samples. Assign each point to the nearest cluster center. Recalculate the centroid of each cluster and update the position of the cluster centers. Repeat the data point assignment and cluster center update steps until the clustering results converge.
[0099] Through clustering, the system categorizes electric vehicle charging behavior data into three modes: nighttime charging, fast charging, and daytime charging. Once these modes are identified, the system can leverage this data with multi-time-period optimization scheduling to develop more personalized microgrid scheduling strategies. For example, it can concentrate charging at night to reduce daytime peak load, or optimize energy storage management based on different users' charging patterns.
[0100] In this embodiment, the rural microgrid optimization scheduling method based on adaptive dynamic programming in Embodiment 2 is executed in the decision optimization submodule of the scheduling control unit.
[0101] Example 2:
[0102] This embodiment proposes an adaptive dynamic programming-based rural microgrid optimization scheduling method, implemented using the adaptive dynamic programming-based rural microgrid optimization scheduling system described in the first aspect, such as... Figure 6 As shown, it includes:
[0103] Step S1: Obtain real-time data on the power generation of the distributed energy unit and the load required by the load unit. The power generation of the distributed energy unit includes the maximum output value of the wind turbine, the maximum output value of the photovoltaic power generation module, the output of the gas turbine, and the output of the fuel cell.
[0104] Step S2: Based on the real-time data of the power generation of the distributed energy unit and the load required by the load unit, a multi-period optimization model of the state of the rural microgrid is established using the Markov decision process. An adaptive dynamic programming algorithm is adopted, combined with a piecewise linear function to approximate the value function, to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is used to schedule the distributed energy unit, energy storage unit and electric vehicle unit.
[0105] Based on real-time data of the power generation of distributed energy units and the load required by load units, a multi-period optimization model for the state of rural microgrids is established using Markov decision processes. The calculation formula is as follows:
[0106] ;
[0107] ;
[0108] ;
[0109] in, For state variables, For the gas turbine in the previous period of efforts, For fuel cells in the previous period of efforts, The state of charge of an electric vehicle's energy storage during time period t. This represents the maximum power output of the wind turbine during time period t. This represents the maximum output value obtained by the photovoltaic power generation module during time period t. The active load of the system during time period t. The time-of-use electricity price for system time period t. As decision variables, For time period t, the active power output of the gas turbine is... The active power output of the fuel cell during time period t. Let t be the active power output of the wind turbine. The active power output of the photovoltaic power generation module during time period t. The reactive power output of the gas turbine during time period t. The reactive power output of the fuel cell during time period t. Let t be the reactive power output of the wind turbine. The reactive power output of the photovoltaic power generation module during time period t. The power exchanged between the system and the microgrid during time period t. The charging power of the electric vehicle during time period t. Let t be the discharge power of the electric vehicle. The charging status of the electric vehicle during time period t. Let t represent the discharge state of the electric vehicle during time period t. Let t be the voltage amplitude of the i-th node of the microgrid during time period t (i.e., the node voltage of the node in the microgrid topology). Let be the phase angle of the node in time period t. Used to model random quantities in a system and characterize the uncertainty of rural microgrids, representing The external state information obtained between time t and t includes: the day-ahead forecast error power of wind power in the current time period t, the day-ahead forecast error power of photovoltaic power generation modules, the forecast error of load in time period t, and the forecast error of electricity price. The time period within the day The actual values of the decision variables The period before the day The forecast values (the day-ahead forecast values refer to the forecast values obtained the previous day for the next day's load, renewable energy output, and time-of-use electricity prices).
[0110] After establishing a multi-time-period optimization model, the value function is approximated using a piecewise linear function. The slopes of the piecewise linear function before and after each iteration are then compared. If the slopes are equal, a well-trained piecewise linear function is output, preparing for subsequent real-time optimization. If the slopes are not equal, the iteration count is incremented by 1, and the approximation of the value function using the piecewise linear function continues.
[0111] The method employs an adaptive dynamic programming algorithm, combined with a piecewise linear function to approximate the value function, to obtain a multi-time-period optimized scheduling scheme, such as... Figure 7 The process outlined in the dashed line includes:
[0112] Step S2.1: Initialize the piecewise linear function;
[0113] Step S2.2: Set the total number of time periods, and set the current time period t to 1;
[0114] Step S2.3: Update external status information, which includes: the day-ahead forecast error power of wind power in the current time period t, the day-ahead forecast error power of photovoltaic power generation modules, the forecast error of load in time period t, and the forecast error of electricity price;
[0115] Step S2.4: Solve the Bellman equation based on piecewise linear functions under constraints to obtain the values of the decision variables. The Bellman equation is constructed using state variables and decision variables.
[0116] The Bellman equation is constructed using state variables and decision variables, and its calculation formula is as follows:
[0117] ;
[0118] ;
[0119] in, Let L be an approximation of the post-decision function, and L be the total number of segments in the piecewise linear function. For energy storage of electric vehicles after the decision is made, The state of charge of the electric vehicle's energy storage in the l-th segment of time period t. Let be the slope of the piecewise linear function in the l-th segment of time interval t. As decision variables, For state variables, For state The value function at that point, Let t be the immediate cost for time period t. The state-value function after the decision. These are the state variables after the decision.
[0120] The constraints are as follows:
[0121] (1) Distributed energy units:
[0122] ;
[0123] ;
[0124] ;
[0125] ;
[0126] in, For time period t, the active power output of the gas turbine is... The active power output of the fuel cell during time period t. Let t be the ramp rate of the gas turbine. Let t be the ramp rate of the fuel cell during time period t.
[0127] (2) Electric vehicle unit:
[0128] ;
[0129] ;
[0130] ;
[0131] ;
[0132] ;
[0133] in, The state of charge of an electric vehicle's energy storage during time period t. Energy storage for electric vehicles during the period The state of charge, The charging power for electric vehicles, For the discharge power of electric vehicles, For charging efficiency, For discharge efficiency, The charging status of electric vehicles. This refers to the discharge state of the electric vehicle.
[0134] (3) Microgrid transmission power constraints:
[0135] ;
[0136] in, This refers to the power exchanged between the system and the power grid. This represents the minimum power exchanged between the system and the power grid. This represents the maximum value of the power exchanged between the system and the power grid.
[0137] (4) Microgrid power balance constraints:
[0138] ;
[0139] in, For time period t, the active power output of the gas turbine is... The active power output of the fuel cell during time period t. This represents the maximum power output of the wind turbine during time period t. This represents the maximum output value obtained by the photovoltaic power generation module during time period t. The power exchanged between the system and the power grid during time period t. Let t be the discharge power of the electric vehicle. For time period t, step S2.5: Determine whether time period t is less than T;
[0140] Step S2.6: If t is less than T, calculate the slope sampling observation, update the pre-trained slope, and t = t + 1. Proceed to step 2.3 to update the external state information at the next time step.
[0141] Step S2.7: If t equals T, then output the values of the decision variables for all time periods, and use the values of the decision variables for all time periods as the multi-time period optimization scheduling scheme.
[0142] In this embodiment, the adaptive dynamic programming (ADP) algorithm is used to solve the multi-time period optimization problem of microgrids. The value functions of electric vehicle units and energy storage units are estimated by the piecewise linear function approximation method, thereby avoiding the curse of dimensionality in dynamic programming.
[0143] Based on the predicted distributed energy generation and load demand, the operating status of each unit is adjusted in real time, especially the charging and discharging strategies of electric vehicles, in order to achieve the global optimal scheduling of the system.
[0144] Based on the real-time acquired microgrid status information, the dispatch control unit uses optimization algorithms to dynamically adjust the working modes of distributed energy units, energy storage units, and electric vehicle units to ensure stable system operation and minimize dependence on external power.
[0145] Optimize the charging and discharging behavior of electric vehicles by discharging during peak load periods to reduce load and charging during off-peak periods to absorb excess renewable energy, thereby improving energy efficiency.
[0146] The battery management module of the energy storage unit controls the charging and discharging process of the battery through optimized algorithms, dynamically adjusts the battery state to adapt to changes in grid load, and ensures the balance between supply and demand in the system.
[0147] The slope of the pre-training, such as Figure 7The solid line represents the training process, which includes:
[0148] Step S100: Set the total number of iterations and initialize the piecewise linear function;
[0149] Step S101: Set the total number of time periods, and set the current time period t to 1;
[0150] Step S102: Update the external state information for the next time step;
[0151] Step S103: Solve the Bellman equation based on piecewise linear functions under constraints to obtain the values of the decision variables. The Bellman equation is constructed using state variables and decision variables.
[0152] Step S104: Determine whether time period t is less than T;
[0153] Step S105: If t is less than T, calculate the slope sampling observation, update the slope of the piecewise function, and perform a state transition. Also, increment the time interval t by 1 and proceed to step S102.
[0154] The slope sampling observation value is calculated using the following formula:
[0155] ;
[0156] Where L is the total number of segments in the piecewise linear function. For the nth iteration, the sampled observation value of the slope of the l-th piecewise linear function in time period t is... This is an approximation of the state-value function after the decision in the (n-1)th iteration. The state of charge of the electric vehicle's energy storage in the l-th segment of time period t. Let be the slope of the piecewise linear function in the i-th segment during time interval t of the (n-1)-th iteration. Let be the length to fill the x-coordinate corresponding to segment i. The immediate cost for the t+1 period. Let be the slope of the piecewise linear function in the i-th segment during the (n-1)th iteration and time interval t+1. This represents the length of the horizontal axis filled in segment i during time period t+1. This represents the state of charge of the electric vehicle's energy storage during time period t+1.
[0157] The slope of the updated piecewise function is calculated as follows:
[0158] ;
[0159] in, Let l be the slope of the piecewise linear function in the l-th segment during the t-th iteration. Update the step size for slope. Let l be the slope of the piecewise linear function in the (n-1)th iteration, time interval t. This represents the sampled observation of the slope of the piecewise linear function in the l-th segment during the t-th time period of the nth iteration.
[0160] The state transition is then performed, and the calculation formula is as follows:
[0161] ;
[0162] in, Used to model random quantities in a system and characterize the uncertainty of rural microgrids, representing External state information obtained between t and t. The time period within the day The actual values of the decision variables The period before the day The predicted value.
[0163] Step S106: If t is not less than T, then determine whether the current iteration number is less than the total iteration number;
[0164] Step S107: If the current iteration count is less than the total iteration count, increment time interval t by 1 and proceed to step S101 to continue iterating;
[0165] Step S108: If the current iteration number is not less than the total iteration number, output the final updated piecewise function slope and use the final updated piecewise function slope as the pre-training slope.
[0166] Example 3:
[0167] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the rural microgrid optimization scheduling method based on adaptive dynamic programming.
[0168] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the rural microgrid optimization scheduling method based on adaptive dynamic programming as described in the embodiments. It is understood that the electronic device may also include input / output (I / O) interfaces and communication components.
[0169] The processor is used to execute all or part of the steps in the adaptive dynamic programming-based rural microgrid optimal scheduling method as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
[0170] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the rural microgrid optimization scheduling method based on adaptive dynamic programming described in the above embodiments.
[0171] Example 4:
[0172] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0173] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the rural microgrid optimization scheduling method based on adaptive dynamic programming described in the various embodiments of this application.
[0174] The aforementioned storage media include: flash memory, hard disks, multimedia cards, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disks, optical discs, servers, APP (Application) application stores, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the aforementioned adaptive dynamic programming-based rural microgrid optimization scheduling method.
[0175] Example 5:
[0176] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the aforementioned rural microgrid optimization scheduling method based on adaptive dynamic programming.
[0177] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.
[0178] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0179] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of equivalent technology of this disclosure, then the intent of this disclosure also includes such modifications and variations.
Claims
1. A rural microgrid optimization scheduling system based on adaptive dynamic programming, characterized in that, include: Dispatch and control unit; The dispatch control unit is connected to the distributed energy unit, energy storage unit, electric vehicle unit, and load unit respectively; the distributed energy unit, energy storage unit, electric vehicle unit, dispatch control unit, and load unit are respectively connected to the microgrid bus. The scheduling and control unit is used to establish a multi-period optimization model for the rural microgrid based on real-time data of the power generation of the distributed energy unit and the load required by the load unit using a Markov decision process. For the multi-period optimization model, an adaptive dynamic programming algorithm is adopted, combined with a piecewise linear function approximation function, to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is used to perform multi-period optimization scheduling of the distributed energy unit, energy storage unit and electric vehicle unit.
2. A method for optimizing the scheduling of rural microgrids based on adaptive dynamic programming, implemented using the rural microgrid optimization scheduling system based on adaptive dynamic programming as described in claim 1, characterized in that... include: The system acquires real-time data on the power generation of distributed energy units and the load required by the load units. The power generation of distributed energy units includes the maximum output of wind turbines, the maximum output of photovoltaic power generation modules, the output of gas turbines, and the output of fuel cells. Based on real-time data of the power generation of distributed energy units and the load required by load units, a multi-period optimization model of the state of rural microgrids is established using Markov decision process. An adaptive dynamic programming algorithm is adopted, combined with a piecewise linear function to approximate the value function, to obtain a multi-period optimization scheduling scheme. The multi-period optimization scheduling scheme is used to schedule distributed energy units, energy storage units and electric vehicle units.
3. The rural microgrid optimization scheduling method based on adaptive dynamic programming according to claim 2, characterized in that, Based on real-time data of the power generation of distributed energy units and the load required by load units, a multi-period optimization model for the state of rural microgrids is established using Markov decision processes. The calculation formula is as follows: ; ; ; in, For state variables, For the gas turbine in the previous period of efforts, For fuel cells in the previous period of efforts, The state of charge of an electric vehicle's energy storage during time period t. This represents the maximum power output of the wind turbine during time period t. This represents the maximum output value obtained by the photovoltaic power generation module during time period t. The active load of the system during time period t. The time-of-use electricity price for system time period t. As decision variables, For time period t, the active power output of the gas turbine is... The active power output of the fuel cell during time period t. Let t be the active power output of the wind turbine. The active power output of the photovoltaic power generation module during time period t. The reactive power output of the gas turbine during time period t. The reactive power output of the fuel cell during time period t. Let t be the reactive power output of the wind turbine. The reactive power output of the photovoltaic power generation module during time period t. The power exchanged between the system and the microgrid during time period t. The charging power of the electric vehicle during time period t. Let t be the discharge power of the electric vehicle. The charging status of the electric vehicle during time period t. Let t represent the discharge state of the electric vehicle during time period t. Let be the voltage amplitude of the i-th node of the microgrid during time period t. Let be the phase angle of the node in time period t. Used to model random quantities in a system and characterize the uncertainty of rural microgrids, representing The external state information obtained between time t and t includes: the day-ahead forecast error power of wind power in the current time period t, the day-ahead forecast error power of photovoltaic power generation modules, the forecast error of load in time period t, and the forecast error of electricity price. The time period within the day The actual values of the decision variables The period before the day The predicted value.
4. The rural microgrid optimization scheduling method based on adaptive dynamic programming according to claim 2, characterized in that, The method employs an adaptive dynamic programming algorithm, combined with a piecewise linear function to approximate the value function, to obtain a multi-time-period optimized scheduling scheme, including: Step S2.1: Initialize the piecewise linear function; Step S2.2: Set the total number of time periods, and set the current time period t to 1; Step S2.3: Update external status information, which includes: the day-ahead forecast error power of wind power in the current time period t, the day-ahead forecast error power of photovoltaic power generation modules, the forecast error of load in time period t, and the forecast error of electricity price; Step S2.4: Solve the Bellman equation based on piecewise linear functions under constraints to obtain the values of the decision variables. The Bellman equation is constructed using state variables and decision variables. Step S2.5: Determine whether time period t is less than T; Step S2.6: If t is less than T, calculate the slope sampling observation, update the pre-trained slope, and t = t + 1. Proceed to step 2.3 to update the external state information at the next time step. Step S2.6: If t equals T, then output the values of the decision variables for all time periods, and use the values of the decision variables for all time periods as the multi-time period optimization scheduling scheme.
5. The rural microgrid optimization scheduling method based on adaptive dynamic programming according to claim 4, characterized in that, The pre-training slope, the training process includes: Step S100: Set the total number of iterations and initialize the piecewise linear function; Step S101: Set the total number of time periods, and set the current time period t to 1; Step S102: Update the external state information for the next time step; Step S103: Solve the Bellman equation based on piecewise linear functions under constraints to obtain the values of the decision variables. The Bellman equation is constructed using state variables and decision variables. Step S104: Determine whether time period t is less than T; Step S105: If t is less than T, calculate the slope sampling observation, update the slope of the piecewise function, and perform a state transition. Also, increment the time interval t by 1 and proceed to step S102. Step S106: If t is not less than T, then determine whether the current iteration number is less than the total iteration number; Step S107: If the current iteration count is less than the total iteration count, increment time interval t by 1 and proceed to step S101 to continue iterating; Step S108: If the current iteration number is not less than the total iteration number, output the final updated piecewise function slope and use the final updated piecewise function slope as the pre-training slope.
6. The rural microgrid optimization scheduling method based on adaptive dynamic programming according to claim 5, characterized in that, The Bellman equation is constructed using state variables and decision variables, and its calculation formula is as follows: ; ; in, Let L be an approximation of the post-decision function, and L be the total number of segments in the piecewise linear function. For energy storage of electric vehicles after the decision is made, The state of charge of the electric vehicle's energy storage in the l-th segment of time period t. Let be the slope of the piecewise linear function in the l-th segment of time interval t. As decision variables, For state variables, For state The value function at that point, Let t be the immediate cost for time period t. The state-value function after the decision. These are the state variables after the decision.
7. The rural microgrid optimization scheduling method based on adaptive dynamic programming according to claim 5, characterized in that, The slope sampling observation value is calculated using the following formula: ; Where L is the total number of segments in the piecewise linear function. For the nth iteration, the sampled observation value of the slope of the l-th piecewise linear function in time period t is... This is an approximation of the state-value function after the decision in the (n-1)th iteration. The state of charge of the electric vehicle's energy storage in the l-th segment of time period t. Let be the slope of the piecewise linear function in the i-th segment during time interval t of the (n-1)-th iteration. Let be the length to fill the x-coordinate corresponding to segment i. The immediate cost for the t+1 period. Let be the slope of the piecewise linear function in the i-th segment during the (n-1)th iteration and time interval t+1. This represents the length of the horizontal axis filled in segment i during time period t+1. This represents the state of charge of the electric vehicle's energy storage during time period t+1.
8. The rural microgrid optimization scheduling method based on adaptive dynamic programming according to claim 7, characterized in that, The slope of the updated piecewise function is calculated as follows: ; in, Let l be the slope of the piecewise linear function in the l-th segment during the t-th iteration. Update the step size for slope. Let l be the slope of the piecewise linear function in the (n-1)th iteration, time interval t. This represents the sampled observation of the slope of the piecewise linear function in the l-th segment during the t-th time period of the nth iteration.
9. An electronic device, characterized in that, include: One or more processors, and a memory for storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the rural microgrid optimization scheduling method based on adaptive dynamic programming as described in any one of claims 2 to 8.
10. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed, cause the processor to perform the rural microgrid optimization scheduling method based on adaptive dynamic programming as described in any one of claims 2 to 8.
Citation Information
Cited By
Regional microgrid planning control method and device based on cycle division
CN122264369A
