An energy scheduling method for a light storage micro-grid based on an adaptive particle swarm algorithm
By constructing a supply and demand forecast comparison dataset and a dynamic risk-return evaluation function, the problem of insufficient historical residual trend modeling in the particle swarm optimization algorithm is solved, the optimality and practicality of the energy scheduling strategy for photovoltaic-storage microgrids are optimized, and the response accuracy and control effect of the scheduling strategy particles are improved.
Patent Information
- Application Number
- CN202511303709.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Existing energy scheduling methods for photovoltaic-storage microgrids based on particle swarm optimization fail to effectively incorporate historical residual trend modeling mechanisms, resulting in insufficient dynamic adjustment of particle credibility. Furthermore, they do not fully integrate scheduling execution costs with changes in the state of charge of energy storage, affecting the optimality and practicality of the scheduling strategy.
By constructing a supply and demand forecast comparison dataset, calculating the residual trend surface as a confidence correction factor, constructing a fitness evaluation function, and recording the strategy execution cost and energy storage state of charge change values in each iteration update, a dynamic risk-return evaluation function is constructed to optimize the scheduling strategy particle set.
It enables a collaborative quantitative assessment of the benefits and risks of scheduling strategy particles, thereby enhancing the response accuracy and control effectiveness of scheduling strategy particle sets in complex environments.
Smart Images

Figure CN120810608B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy scheduling technology, and in particular to an energy scheduling method for photovoltaic-storage microgrids based on an adaptive particle swarm optimization algorithm. Background Technology
[0002] With the increasingly widespread deployment of photovoltaic (PV) power generation and energy storage devices, microgrids are gradually evolving into multi-source collaborative energy networks with autonomous energy dispatch capabilities. To improve the economy and security of PV-storage collaborative operation in microgrids, researchers generally adopt prediction-driven energy dispatch strategies based on historical observation data. Conventional methods typically involve establishing predictive models of PV power and load power, constructing a supply-demand matching sequence within the dispatch period, and using intelligent optimization methods such as particle swarm optimization (PSO) to search for dispatch strategies and solve for parameters. In this process, PSO, due to its superior global search capability and adaptive parameter adjustment ability, is widely used in solving microgrid dispatch problems, effectively addressing the uncertainty of PV output and the diversity of load responses.
[0003] However, when faced with real-world scheduling scenarios with multidimensional perturbations, conventional optimization methods based on particle swarm optimization (PSO) have two limitations: First, they fail to introduce an effective historical residual trend modeling mechanism, thus making it impossible to dynamically adjust the credibility evaluation weights of each strategy particle during the iteration process; second, they do not fully integrate the impact of scheduling execution costs and changes in energy storage charge state on the overall scheduling strategy, resulting in a lack of risk-reward co-evaluation basis for particle update directions, thereby affecting the optimality of the particle swarm convergence path and the practicality of the scheduling strategy. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides an energy scheduling method for photovoltaic-storage microgrids based on an adaptive particle swarm optimization algorithm to address the problems of insufficient dynamic correction of particle credibility and lack of coordinated risk-reward evaluation.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides an energy scheduling method for a photovoltaic-storage microgrid based on an adaptive particle swarm optimization algorithm, comprising,
[0008] Collect historical photovoltaic power observation data and load power observation data to construct a supply and demand forecast comparison dataset within a unit scheduling cycle;
[0009] The residual trend surface is calculated based on the supply and demand forecast comparison dataset, and the residual trend surface is used as a confidence correction factor to construct the fitness evaluation function.
[0010] The fitness evaluation function is used to iteratively update the set of scheduling strategy particles, and the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle are recorded in each round of iteration.
[0011] A dynamic risk-reward assessment function is constructed based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and the risk-reward ratio of each scheduling strategy particle is calculated.
[0012] The set of scheduling strategy particles is replaced and optimized based on the risk-reward ratio of each scheduling strategy particle, and the scheduling strategy particle with the best fitness score and the highest risk-reward ratio is selected as the microgrid energy scheduling control command.
[0013] As a preferred embodiment of the photovoltaic-storage microgrid energy scheduling method based on adaptive particle swarm optimization algorithm described in this invention, the steps for collecting historical photovoltaic power observation data and load power observation data to construct a supply and demand forecast comparison dataset within a unit scheduling cycle are as follows.
[0014] Historical photovoltaic power observation data and load power observation data are collected, and a sliding time window sample sequence is extracted using a time sliding window of a set length. Then, the sliding time window sample sequence is normalized and time-aligned to construct the photovoltaic power input data sequence and the load power input data sequence.
[0015] The photovoltaic power input data sequence and the load power input data sequence are substituted into the joint prediction model for modeling and inference, and organized in time order to construct the photovoltaic prediction sequence and the load prediction sequence.
[0016] The photovoltaic forecast sequence and load forecast sequence within the scheduling period are paired by time index and arranged sequentially according to the scheduling time to construct a supply and demand forecast comparison dataset.
[0017] As a preferred embodiment of the energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm described in this invention, the method of setting a time sliding window of a fixed length is a method of generating a sliding window sample sequence by sliding a fixed-length time window on a continuous time series at a specified step size, performing equal-length segmentation with no overlap and partial overlap.
[0018] As a preferred embodiment of the energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm described in this invention, the steps of calculating the residual trend surface based on the supply and demand forecast comparison dataset and using the residual trend surface as a confidence correction factor to construct the fitness evaluation function are as follows:
[0019] The photovoltaic forecast sequence and the load forecast sequence in the supply and demand forecast comparison dataset within a unit scheduling cycle are compared and combined to generate a complete set of residual points.
[0020] Model the residual point set to generate the full-cycle residual trend surface equation, calculate the theoretical residual trend value at each time point, and take the absolute difference between the actual predicted residual and the theoretical residual trend value as the degree of residual deviation.
[0021] The degree of deviation of the residuals is standardized to generate a confidence correction factor, and a fitness evaluation function is constructed based on the confidence correction factor.
[0022] As a preferred embodiment of the photovoltaic-storage microgrid energy scheduling method based on adaptive particle swarm optimization algorithm described in this invention, the steps of iteratively updating the scheduling strategy particle set using a fitness evaluation function, and recording the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle in each iteration update, are as follows:
[0023] Based on the time length and time granularity of the scheduling cycle, the state parameter set and control parameter set of the scheduling strategy particle set are defined, and the fitness evaluation function is embedded into the parameterized particle structure to generate a scheduling strategy particle set with complete parameter configuration.
[0024] Iteratively search the set of scheduling strategy particles, call the fitness evaluation function to calculate the fitness score of the scheduling strategy particles, and update the optimal state and position of the scheduling strategy particles to obtain an adaptively updated set of scheduling strategy particles.
[0025] The adaptively updated scheduling strategy particle set is evaluated through strategy simulation. By combining load demand and photovoltaic power output data, the strategy execution cost and state of charge change value of the scheduling strategy particles are calculated.
[0026] As a preferred embodiment of the energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm described in this invention, the parameterized particle structure is a scheduling strategy particle data structure that has completed the assignment of state parameter sets and control parameter sets.
[0027] As a preferred embodiment of the photovoltaic-storage microgrid energy scheduling method based on adaptive particle swarm optimization algorithm described in this invention, the following steps are taken: A dynamic risk-reward evaluation function is constructed based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and the risk-reward ratio of each scheduling strategy particle is calculated.
[0028] Based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, a set of strategy execution cost and a set of energy storage state of charge change are constructed respectively.
[0029] The strategy execution cost set and the energy storage state of charge change set are normalized to generate a normalized strategy execution cost index set and a normalized state of charge change index set.
[0030] The normalized set of policy execution cost indicators is used as the risk indicator of the scheduling policy particle, and the normalized set of charge state change indicators is used as the revenue indicator of the scheduling policy particle. The risk-reward ratio of each scheduling policy particle is calculated.
[0031] As a preferred embodiment of the photovoltaic-storage microgrid energy scheduling method based on adaptive particle swarm optimization algorithm described in this invention, the steps of replacing and optimizing the scheduling strategy particle set according to the risk-reward ratio of each scheduling strategy particle, and selecting the scheduling strategy particle with the optimal fitness score and the highest risk-reward ratio as the microgrid energy scheduling control command are as follows.
[0032] The risk-reward ratio of the integrated scheduling strategy particles is a risk-reward ratio sequence. The scheduling strategy particle set is sorted in descending order according to the risk-reward ratio sequence, and the average risk-reward ratio is calculated.
[0033] Using the average risk-reward ratio of each scheduling strategy particle as the boundary, scheduling strategy particles with a risk-reward ratio higher than the average are selected to construct a set of scheduling strategy particles with a high risk-reward ratio. At the same time, scheduling strategy particles with a risk-reward ratio lower than the average are marked to form a set of scheduling strategy particles to be replaced.
[0034] Based on the high-risk-reward scheduling strategy particle set, the structure combination and perturbation operation are performed to generate a new scheduling strategy particle set. The corresponding particles in the original scheduling strategy particle set are replaced according to the marked positions in the scheduling strategy particle set to be replaced, thus forming the updated scheduling strategy particle set.
[0035] The updated set of scheduling strategy particles is sorted according to the risk-reward ratio. The scheduling strategy particles with the highest risk-reward ratio and the best fitness score are selected by combining the fitness score. The scheduling parameter configuration is extracted and converted into microgrid energy scheduling control instructions.
[0036] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the energy scheduling method for photovoltaic-storage microgrids based on the adaptive particle swarm algorithm as described in the first aspect of the present invention.
[0037] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the energy scheduling method for photovoltaic-storage microgrids based on the adaptive particle swarm algorithm as described in the first aspect of the present invention.
[0038] The beneficial effects of this invention are as follows: by constructing a dynamic risk-reward evaluation function based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and calculating the risk-reward ratio of each scheduling strategy particle, the invention achieves a synergistic quantitative evaluation of the execution effect of each scheduling strategy particle in terms of both benefit and risk. This provides a dual optimization basis for the replacement of scheduling strategy particles and the selection of control instructions, and enhances the response accuracy and control effectiveness of the scheduling strategy particle set in complex scheduling environments. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart of an energy scheduling method for photovoltaic-storage microgrids based on an adaptive particle swarm optimization algorithm.
[0041] Figure 2 A flowchart for constructing a supply and demand forecast comparison dataset.
[0042] Figure 3 A flowchart for constructing the fitness evaluation function.
[0043] Figure 4 A flowchart for optimizing the scheduling of particle sets according to the scheduling strategy. Detailed Implementation
[0044] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0045] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0046] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0047] Reference Figures 1-4This is one embodiment of the present invention, which provides an energy scheduling method for a photovoltaic-storage microgrid based on an adaptive particle swarm optimization algorithm, comprising the following steps:
[0048] S1: Collect historical photovoltaic power observation data and load power observation data to construct a supply and demand forecast comparison dataset within a unit scheduling cycle.
[0049] Specifically, it includes the following steps:
[0050] S1.1: Collect historical photovoltaic power observation data and load power observation data, and extract the sliding time window sample sequence using a time sliding window of a set length. Then, normalize and time-align the sliding time window sample sequence to construct the photovoltaic power input data sequence and the load power input data sequence.
[0051] Specifically, based on a unified time coordinate, historical photovoltaic power observation data and load power observation data within a continuous time period are collected from photovoltaic prediction devices and load prediction devices. The historical photovoltaic power observation data and load power observation data are then truncated using a time sliding window of a set length to generate multiple sliding time window sample sequences. Subsequently, each sliding time window sample sequence is normalized to standardize the range of historical photovoltaic power observation data and load power observation data to a unified interval, and time alignment is performed to finally construct the photovoltaic power input data sequence and the load power input data sequence.
[0052] It should be explained that historical photovoltaic power observation data consists of basic power generation data, environmental parameters, and equipment status parameters; load power observation data consists of categorized data and user behavior characteristics.
[0053] It should be explained that the time sliding window method with a set length is a standardized data segmentation processing method. Based on the specific scheduling task requirements (e.g., focusing on short-term fluctuations or medium-to-long-term trends), a fixed and continuous time period length is predetermined as the time window. Each time, the time window is moved backward on the time axis by a certain distance. Then, the continuous time series is segmented into equal intervals with no overlap or partial overlap, and the time window is shifted frame by frame in the forward direction along the time index sequence, dividing the continuous long time series into continuous and equal-length sliding window sample sequences.
[0054] It should be noted that time alignment processing involves pairwise resampling and interpolation of historical photovoltaic power observation data and load power observation data in the sliding time window sample sequence, aligning them on the same set of timestamps to eliminate timing deviations. Subsequently, the aligned sliding time window sample sequence is separated according to equipment type, and photovoltaic power data segments in all time windows are extracted and spliced into a continuous photovoltaic power input data sequence in chronological order. At the same time, load power data segments in all time windows are extracted and spliced into a load power input data sequence in the same chronological order.
[0055] S1.2: Substitute the photovoltaic power input data sequence and the load power input data sequence into the joint prediction model for modeling and reasoning, obtain the photovoltaic output prediction value and load prediction sequence at each time point, and then organize the photovoltaic output prediction value and load prediction sequence at each time point in chronological order to construct the photovoltaic prediction sequence and load prediction sequence within the scheduling cycle.
[0056] Specifically, the photovoltaic power input data sequence and load power are input into a joint prediction model based on a combination of long short-term memory network and support vector regression. The LSTM is used to capture the long-term and short-term dependencies of time series data, and the SVR is combined with its strong fitting ability for nonlinear relationships to perform joint analysis and prediction inference on the photovoltaic power input data sequence and load power, generating photovoltaic output and load power values at each time point. Then, the predicted photovoltaic output values at each time point are arranged in chronological order to form a photovoltaic prediction sequence within the scheduling period. Finally, the predicted load power values are organized in chronological order to form the corresponding load prediction sequence.
[0057] It should be explained that the joint prediction model is constructed based on a combination of the Long Short-Term Memory (LSTM) network algorithm and the Support Vector Regression (SVR) algorithm. The LSTM network algorithm is used to process the time series characteristics of the photovoltaic power input data sequence and the load power input data sequence, including the variation patterns, trends, and periodic fluctuations of photovoltaic power and load power over time. The SVR algorithm is used to perform nonlinear regression prediction of photovoltaic power and load power, combining time series characteristics with nonlinear fitting capabilities to construct the joint prediction model.
[0058] The joint prediction model is trained based on historical photovoltaic power data, historical load power data, and related feature data (such as weather conditions and time characteristics). During training, historical photovoltaic power data, historical load power data, and related feature data are used as input features. The parameters of the Long Short-Term Memory Network algorithm and the Support Vector Regression algorithm are continuously adjusted through optimization algorithms to improve the prediction accuracy of the joint prediction model, thereby completing the training of the joint prediction model.
[0059] S1.3: Pair the photovoltaic forecast sequence and load forecast sequence within the scheduling period according to the time index, and arrange them sequentially according to the scheduling time order to construct a supply and demand forecast comparison dataset within a unit scheduling period.
[0060] Specifically, the photovoltaic forecast sequence and the load forecast sequence within the scheduling period are mapped according to their respective time indices. The photovoltaic forecast values and load forecast values at the same time point in the photovoltaic forecast sequence and the load forecast sequence are formed into supply and demand data pairs. Then, the supply and demand data pairs are arranged sequentially according to the scheduling time order to construct a supply and demand forecast comparison dataset within a unit scheduling period.
[0061] For example, assuming the scheduling period is 24 hours and the time indices are 1 to 24, the photovoltaic forecast sequence contains photovoltaic forecast values from time point 1 to time point 24, and the load forecast sequence contains load forecast values from time point 1 to time point 24. The photovoltaic forecast value and load forecast value at each time point are paired to form a supply and demand data pair sequence containing 24 elements. Then, these supply and demand data pairs are arranged in order from early to late according to the time index, and finally, a supply and demand forecast comparison dataset within a unit scheduling period is constructed.
[0062] S2: Calculate the residual trend surface based on the supply and demand forecast comparison dataset, and use the residual trend surface as a confidence correction factor to construct the fitness evaluation function.
[0063] Specifically, it includes the following steps:
[0064] S2.1: Compare the photovoltaic output forecast value and the load power forecast value in the supply and demand forecast comparison dataset within the unit scheduling cycle point by point, calculate the power difference at each time point, and combine the power difference at each time point to generate a complete residual point set.
[0065] Specifically, based on the supply and demand forecast comparison dataset within a unit scheduling cycle, the photovoltaic output forecast value is subtracted from the load power forecast value at each time point to obtain the power difference at each time point. All power differences are combined in chronological order to form a complete residual point set.
[0066] S2.2: Model the actual predicted residuals at each time point in the complete residual point set, construct a residual trend surface equation based on full-cycle fitting, and calculate the theoretical residual trend value at each time point based on the residual trend surface equation. The absolute value of the difference between the actual predicted residuals at each time point and the theoretical residual trend value at each time point is taken as the degree of residual deviation of the overall residual trend.
[0067] Specifically, the actual predicted residuals at each time point in the complete residual point set are modeled for actual trends. A nonlinear regression algorithm is used to globally fit and optimize the actual predicted residuals at all time points within the complete scheduling cycle. A residual trend surface equation based on full-cycle fitting is constructed, and the theoretical residual trend value at each time point is calculated based on the residual trend surface equation. Then, the difference between the actual predicted residual at each time point and the theoretical residual trend value at the corresponding time point is used as the degree of residual deviation at each time point relative to the overall residual trend.
[0068] It should be explained that the nonlinear regression algorithm uses the timestamps of each time point within the scheduling period as independent variables and the actual predicted residuals at the corresponding time points as dependent variables. By minimizing the sum of squared global residuals, it iteratively optimizes the parameters of the nonlinear function, constructs an explicit equation that characterizes the nonlinear distribution law of the actual predicted residuals, and finally forms a residual trend surface equation based on full-cycle fitting.
[0069] The formula for the nonlinear regression algorithm is as follows:
[0070] ;
[0071] in, This represents the total number of time points within a single scheduling cycle. Indicates the time point index of the scheduling period. These represent the undetermined coefficients in the residual trend surface equation. Indicates the first The actual predicted residuals at each time point Indicates the first Scheduling time at each point in time, This represents the predicted output value of the residual trend surface equation.
[0072] S2.3: Standardize the degree of deviation of the residuals, generate a confidence correction factor, and construct a fitness evaluation function based on the confidence correction factor.
[0073] Specifically, based on the global maximum and global minimum residual deviation values at each time point within the residual deviation range, the range normalization method is used to linearly convert the residual deviation values into normalized residual deviation values. The normalized residual deviation values are then inverted to generate confidence correction factors for each time point. Subsequently, a fitness evaluation function is constructed based on the confidence correction factors.
[0074] It's important to explain that range normalization is a standardization technique that scales the original data to a specific numerical range using a linear transformation. Its core principle is to utilize the global range formed by the maximum and minimum values of the dataset as the scaling benchmark. The formula for range normalization is as follows:
[0075] ;
[0076] in, This represents the number of time points within a single scheduling cycle. Indicates the degree of deviation of the normalized residual. Indicates the first The degree of deviation of the residuals from the original value at each time point Indicates the degree of deviation of the global minimum residual. This indicates the degree of deviation of the global maximum residual.
[0077] It should be explained that the inversion operation is a linear transformation that converts the deviation of the normalized residual into a confidence standard with consistent dimensions and opposite direction, thereby constructing a fitness evaluation function with correct physical meaning.
[0078] It needs to be explained that the process of constructing the fitness evaluation function based on the confidence correction factor is as follows: obtain the confidence correction factor and the corresponding scheduling strategy benefit value at each time point in the retrieval period; use the confidence correction factor at each time point as the weight coefficient of the time node; perform confidence weight calibration on the scheduling strategy benefit value to generate the weighted benefit value at each time point; finally, accumulate the weighted benefit values of all time points in the scheduling period, and finally use it as the fitness evaluation function value.
[0079] S3: Use the fitness evaluation function to iteratively update the set of scheduling strategy particles, and record the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle in each round of iteration.
[0080] Specifically, the steps are as follows:
[0081] S3.1: Based on the time length and time granularity of the scheduling cycle, set the state parameter set and control parameter set of each scheduling strategy particle in the scheduling strategy particle set. Then, embed the fitness evaluation function into the scheduling strategy particle structure after setting the parameters to generate a scheduling strategy particle set with complete parameter configuration.
[0082] Specifically, the total number of time points in the scheduling cycle is calculated based on the scheduling cycle length and time granularity. The state parameter set dimension and control parameter set dimension of each scheduling strategy particle are defined according to the total number of time points in the scheduling cycle. Then, within the defined parameter dimension framework, each scheduling strategy particle in the scheduling strategy particle set is initialized, generating state parameter values and control parameter sets for each parameter space dimension. The state parameter values and control parameter sets are then filled to form the basic structure of the scheduling strategy particle. Subsequently, the fitness evaluation function is embedded as an internal evaluation function into the scheduling strategy particle structure. Finally, all scheduling strategy particles that have completed the configuration of state parameter values and control parameter sets and the embedding of the fitness evaluation function are integrated to generate a scheduling strategy particle set.
[0083] It should be explained that the scheduling cycle length refers to the total duration of the continuous time period covered by the energy scheduling strategy. It is the total operating cycle from the start time to the end time of the scheduling, including: start and end time points, complete time periods, and prediction sequence matching requirements; the time granularity is the time interval between adjacent decision points within the scheduling cycle, representing the minimum time resolution of strategy adjustment, including: discrete step length, update frequency, and equipment response constraints, etc. The total number of time points in the scheduling cycle is determined based on the proportional relationship between the scheduling cycle length and the time particles.
[0084] It needs to be explained that the defined parameter dimension framework is based on the total number of time points in the scheduling cycle to determine the number and distribution of dimensions of each scheduling strategy particle in terms of state parameters and control parameters. The definition of the parameter dimension framework is based on the time length and time granularity of the scheduling cycle. The total number of time points in a complete scheduling cycle is calculated. Then, based on the total number of time points, combined with the actual scheduling needs and control objectives of the microgrid, state parameters (e.g., energy storage state of charge, photovoltaic output state, etc.) and control parameters (e.g., charging and discharging power, purchased electricity, and load allocation ratio, etc.) are assigned to each scheduling time point to form a structured multidimensional parameter space. Finally, the structured multidimensional parameter space is used as the parameter dimension framework.
[0085] S3.2: Iteratively search each scheduling strategy particle in the scheduling strategy particle set, and call the fitness evaluation function to calculate the fitness score of each scheduling strategy particle in the scheduling cycle. Then update the optimal state and position of the scheduling strategy particles, and finally obtain the scheduling strategy particle set that has completed adaptive update.
[0086] Specifically, multiple iterations are performed on the scheduling strategy particle set. In each iteration, all scheduling strategy particles in the set are traversed, and the fitness score of each particle within the scheduling cycle is calculated using a fitness evaluation function. Then, based on the principle of particle swarm optimization, the current fitness score is compared with the individual historical best fitness score of the particle and with the collective historical best fitness score of the set. The position parameter set and state parameter set of the particle are updated according to the comparison results. At the same time, the individual optimal position parameter set and the collective optimal position parameter set of the particle are also updated. Finally, the set of scheduling strategy particles with all updated parameters is obtained.
[0087] The formula for calculating fitness score is as follows:
[0088] ;
[0089] in, This represents the sequential index of a time point within the scheduling period. This represents the total number of time points in the scheduling cycle. This represents the confidence level correction factor. This represents the benefit value of the scheduling strategy. This represents the fitness score.
[0090] It needs to be explained that multi-round iterative operation refers to the optimization loop of repeatedly executing the operation sequence of "evaluating particle fitness, comparing historical best values, and then updating particle position parameter set and state parameter set" according to a preset number of rounds. Each round of iteration completely traverses all particles in the scheduling strategy particle set, realizing the adaptive evolution of particle position parameter set and state parameter set.
[0091] The preset number of rounds is the threshold for the number of iterations to be executed in advance by the particle set of the scheduling strategy during optimization. It is determined based on the following core elements: optimization convergence characteristic analysis, resource constraints, and a balance of accuracy requirements.
[0092] It should be explained that the principle of particle swarm optimization is based on the biomimetic principle of swarm intelligence. The core idea is to drive all particles to make directional parameter corrections in the solution space by guiding the historical optimal solutions of individuals and the swarm in the particle set through the scheduling strategy. It includes the following core mechanisms: individual optimal guidance mechanism, swarm optimal guidance mechanism, and parameter update rules.
[0093] S3.3: Perform strategy simulation evaluation on the adaptively updated scheduling strategy particle set. Combine load demand and photovoltaic output data to calculate the strategy execution cost of each scheduling strategy particle in the complete scheduling cycle. At the same time, track the charge change curve and extract the charge state change value in each scheduling strategy particle.
[0094] Specifically, based on the load demand data sequence and the photovoltaic output data sequence, a complete scheduling cycle dynamic simulation is performed on each scheduling strategy particle in the adaptively updated scheduling strategy particle set to obtain the strategy execution cost value of the scheduling strategy particle at each time point within the scheduling cycle. Then, the total strategy execution cost is generated through an accumulation operation. At the same time, based on the change process of the state parameter set values of the scheduling strategy particles, a record of the energy storage charge change process is constructed, and the difference between the charge state at the termination time point and the charge state at the initial time point of the scheduling strategy particle is extracted as the charge state change value.
[0095] It should be explained that the dynamic simulation of the complete scheduling cycle refers to the simulation and deduction of the entire process of strategy action for a single scheduling strategy particle in a fixed time step. In the dynamic simulation of the complete scheduling cycle, the temporal change characteristics of the load demand data sequence and the photovoltaic power output data sequence are strictly followed. On the continuous time axis from the start time point to the end time point of the scheduling cycle, the values of state parameter sets such as energy storage charge state and power allocation parameters are updated in real time. At the same time, the strategy execution cost value at each time point is recorded, and finally a complete state evolution trajectory and cost details record covering the entire domain of the scheduling cycle are generated.
[0096] S4: Construct a dynamic risk-reward assessment function based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and calculate the risk-reward ratio of each scheduling strategy particle.
[0097] Specifically, it includes the following steps:
[0098] S4.1: Based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, construct the strategy execution cost set and the energy storage state of charge change set respectively.
[0099] Specifically, iterate through all scheduling strategy particles in the adaptively updated scheduling strategy particle set, and sequentially read the strategy execution cost value and state of charge change value corresponding to the scheduling strategy particle. Construct a strategy execution cost set from the strategy execution cost value and a storage state of charge change set from the state of charge change value.
[0100] S4.2: Normalize the set of strategy execution costs and the set of energy storage state of charge changes to generate a normalized set of strategy execution cost indicators and a normalized set of state of charge change indicators.
[0101] Specifically, the minimum and maximum values of all strategy execution cost values in the strategy execution cost set are extracted, and the minimum and maximum values of all energy storage state of charge change values in the energy storage state of charge change set are also extracted. Then, the minimum and maximum values of all strategy execution cost values are normalized to generate normalized strategy execution cost index values. At the same time, the minimum and maximum values of all energy storage state of charge change values are normalized to generate normalized state of charge change index values. Finally, all normalized strategy execution cost index values are integrated to generate a normalized strategy execution cost index set, and the normalized state of charge change index values are integrated to generate a normalized state of charge change index set.
[0102] It needs to be explained that the normalization transformation maps the minimum value of the strategy execution cost to 0 as the baseline, the maximum value of the strategy execution cost to 1 as the baseline, and the remaining strategy execution cost values are mapped proportionally to the normalized strategy execution cost index values in the interval [0,1] according to their relative positions with respect to the minimum and maximum values of the strategy execution cost. Similarly, the minimum value of the energy storage state of charge change value is mapped to 0, the maximum value of the energy storage state of charge change value is mapped to 1, and the remaining energy storage state of charge change values are mapped proportionally to the normalized state of charge change index values according to their relative positions.
[0103] S4.3: Use the normalized set of policy execution cost indicators as the risk indicators of scheduling policy particles, and use the normalized set of charge state change indicators as the revenue indicators of scheduling policy particles, and calculate the risk-reward ratio of each scheduling policy particle.
[0104] Specifically, each normalized strategy execution cost index value in the normalized strategy execution cost index set is defined as the scheduling strategy particle risk index value, and each normalized state of charge change index value in the normalized state of charge change index set is defined as the scheduling strategy particle revenue index value. Based on each scheduling strategy particle in the scheduling strategy particle set, the scheduling strategy particle risk index value and the scheduling strategy particle revenue index value are extracted. The risk-reward ratio is generated by dividing the scheduling strategy particle risk index value by the scheduling strategy particle revenue index value, and is used as the risk-reward ratio for each scheduling strategy particle.
[0105] S5: Replace and optimize the set of scheduling strategy particles according to the risk-reward ratio of each scheduling strategy particle, and select the scheduling strategy particle with the best fitness score and the highest risk-reward ratio as the microgrid energy scheduling control command.
[0106] Specifically, the steps are as follows:
[0107] S5.1: Integrate the risk-reward ratio of each scheduling strategy particle to generate a risk-reward ratio sequence of the scheduling strategy particle set, sort the scheduling strategy particle set in descending order according to the risk-reward ratio sequence, and calculate the average risk-reward ratio of each scheduling strategy particle.
[0108] Specifically, based on all scheduling strategy particles in the scheduling strategy particle set, the risk-reward ratio of each scheduling strategy particle is integrated into a risk-reward ratio sequence of the scheduling strategy particle set. Then, according to the magnitude of each risk-reward ratio in the risk-reward ratio sequence, they are arranged in descending order to generate a descending order of the risk-reward ratio sequence of the scheduling strategy particle set. At the same time, all risk-reward ratios in the risk-reward ratio sequence are accumulated, and the average risk-reward ratio is calculated by combining the number of scheduling strategy particles in the scheduling strategy particle set.
[0109] S5.2: Using the average risk-reward ratio as the boundary, select scheduling strategy particles with a risk-reward ratio higher than the average to construct a set of scheduling strategy particles with a high risk-reward ratio. At the same time, mark scheduling strategy particles with a risk-reward ratio lower than the average to form a set of scheduling strategy particles to be replaced.
[0110] Specifically, using the average risk-reward ratio of scheduling strategy particles as the dividing line, for each scheduling strategy particle in the set of scheduling strategy particles, the relationship between the risk-reward ratio of the scheduling strategy particles and the average risk-reward ratio is compared. Then, scheduling strategy particles with risk-reward ratios higher than the average risk-reward ratio are selected and integrated to construct a set of high-risk-reward scheduling strategy particles. At the same time, scheduling strategy particles with risk-reward ratios lower than the average risk-reward ratio are marked and integrated to form a set of scheduling strategy particles to be replaced.
[0111] S5.3: Based on the high-reward-risk ratio scheduling strategy particle set, perform structural combination and perturbation operations to generate a new scheduling strategy particle set. Then, according to the position of the scheduling strategy particle set to be replaced marked in the scheduling strategy particle set to be replaced, replace the original scheduling strategy particle set with the new scheduling strategy particle set, and finally form the replacement and updated scheduling strategy particle set.
[0112] Specifically, structural combination and perturbation operations are performed on the high-reward-risk ratio scheduling strategy particle set to generate a new scheduling strategy particle set. Then, based on the marked position of the scheduling strategy particle set to be replaced in the original scheduling strategy particle set, the new scheduling strategy particle set is used to replace the scheduling strategy particles in the original scheduling strategy particle set that are at the position of the scheduling strategy particle set to be replaced. Finally, they are integrated to form an updated scheduling strategy particle set.
[0113] It needs to be explained that the structural combination operation is the process of fusing and reconstructing the parameter configurations of multiple particles in the high-reward-risk-ratio scheduling strategy particle set. The technical essence is to select the position parameter sets and state parameter sets of two scheduling strategy particles, perform weighted average fusion, and generate a new scheduling strategy particle with fused parameter sets. The perturbation operation refers to the controlled random fluctuation introduced into the state parameter set and control parameter set of the original scheduling strategy particles in the high-reward-risk-ratio scheduling strategy particle set, generating a scheduling strategy particle with perturbation characteristics.
[0114] It should be explained that the location of the set of particles to be replaced refers to the sequence of location information formed by traversing the physical storage structure of the original set of particles to be replaced and recording the storage location index of each particle marked as to be replaced during the construction of the set of particles to be replaced.
[0115] S5.4: Sort the scheduling strategy particles in the updated scheduling strategy particle set by the risk-reward ratio, and combine the fitness score as a dual indicator screening criterion to select the scheduling strategy particle with the highest risk-reward ratio and the best fitness score. Then, extract the scheduling parameter configuration of the scheduling strategy particle with the highest fitness score and the best fitness score, and convert it into microgrid energy scheduling control instructions.
[0116] Specifically, the updated set of scheduling strategy particles is sorted in descending order by their risk-reward ratio to generate a risk-reward ratio sorting sequence. Simultaneously, the fitness score of each scheduling strategy particle is obtained, forming a fitness score set. Then, based on the risk-reward ratio sorting sequence and the fitness score set, the scheduling strategy particle with the highest ranking in the risk-reward ratio sorting sequence is selected first, and the scheduling strategy particle with the best fitness score among the highest-ranking risk-reward ratio particles is chosen. The position parameter set and state parameter set of the scheduling strategy particle with the highest risk-reward ratio and the best fitness score are extracted and converted into microgrid energy scheduling control commands.
[0117] This embodiment also provides a computer device applicable to the energy scheduling method of photovoltaic-storage microgrid based on adaptive particle swarm optimization algorithm, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the energy scheduling method of photovoltaic-storage microgrid based on adaptive particle swarm optimization algorithm as proposed in the above embodiment.
[0118] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0119] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the energy scheduling method for a photovoltaic-storage microgrid based on an adaptive particle swarm optimization algorithm as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0120] In summary, this invention achieves a synergistic quantitative evaluation of the benefits and risks of the execution effect of each scheduling strategy particle by constructing a dynamic risk-reward assessment function based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and calculating the risk-reward ratio of each scheduling strategy particle. This provides a dual optimization basis for scheduling strategy particle replacement and control command selection, and enhances the response accuracy and control effectiveness of the scheduling strategy particle set in complex scheduling environments.
[0121] It should be noted that 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for energy scheduling of photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm, characterized in that: include, Collect historical photovoltaic power observation data and load power observation data to construct a supply and demand forecast comparison dataset within a unit scheduling cycle; The residual trend surface is calculated based on the supply and demand forecast comparison dataset, and then used as a confidence level correction factor to construct the fitness evaluation function. The steps are as follows. The photovoltaic forecast sequence and the load forecast sequence in the supply and demand forecast comparison dataset within a unit scheduling cycle are compared and combined to generate a complete set of residual points. Model the residual point set to generate the full-cycle residual trend surface equation, calculate the theoretical residual trend value at each time point, and take the absolute difference between the actual predicted residual and the theoretical residual trend value as the degree of residual deviation. The degree of deviation of the residuals is standardized to generate a confidence correction factor, and a fitness evaluation function is constructed based on the confidence correction factor. The fitness evaluation function is used to iteratively update the set of scheduling strategy particles, and the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle are recorded in each round of iteration. A dynamic risk-reward assessment function is constructed based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and the risk-reward ratio of each scheduling strategy particle is calculated. The set of scheduling strategy particles is replaced and optimized based on the risk-reward ratio of each scheduling strategy particle, and the scheduling strategy particle with the best fitness score and the highest risk-reward ratio is selected as the microgrid energy scheduling control command.
2. The energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm as described in claim 1, characterized in that: The steps for collecting historical photovoltaic power observation data and load power observation data to construct a supply and demand forecast comparison dataset within a unit scheduling cycle are as follows. Historical photovoltaic power observation data and load power observation data are collected, and a sliding time window sample sequence is extracted using a time sliding window of a set length. Then, the sliding time window sample sequence is normalized and time-aligned to construct the photovoltaic power input data sequence and the load power input data sequence. The photovoltaic power input data sequence and the load power input data sequence are substituted into the joint prediction model for modeling and inference, and organized in time order to construct the photovoltaic prediction sequence and the load prediction sequence. The photovoltaic forecast sequence and load forecast sequence within the scheduling period are paired by time index and arranged sequentially according to the scheduling time to construct a supply and demand forecast comparison dataset.
3. The energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm as described in claim 2, characterized in that: The time sliding window method with a set length is a method of generating a sliding window sample sequence by sliding a time window of fixed length on a continuous time series at a specified step size, performing equal-length segmentation with no overlap and partial overlap.
4. The energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization algorithm as described in claim 1, characterized in that: The steps for iteratively updating the scheduling strategy particle set using a fitness evaluation function, and recording the strategy execution cost and energy storage state of charge change value for each scheduling strategy particle in each iteration, are as follows: Based on the time length and time granularity of the scheduling cycle, the state parameter set and control parameter set of the scheduling strategy particle set are defined, and the fitness evaluation function is embedded into the parameterized particle structure to generate a scheduling strategy particle set with complete parameter configuration. Iteratively search the set of scheduling strategy particles, call the fitness evaluation function to calculate the fitness score of the scheduling strategy particles, and update the optimal state and position of the scheduling strategy particles to obtain an adaptively updated set of scheduling strategy particles. The adaptively updated scheduling strategy particle set is evaluated through strategy simulation. By combining load demand and photovoltaic power output data, the strategy execution cost and state of charge change value of the scheduling strategy particles are calculated.
5. The energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization as described in claim 4, characterized in that: The parameterized particle structure is a scheduling strategy particle data structure that has completed the assignment of state parameter sets and control parameter sets.
6. The energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization as described in claim 1, characterized in that: The following steps describe the construction of a dynamic risk-reward assessment function based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, and the calculation of the risk-reward ratio for each scheduling strategy particle. Based on the strategy execution cost and energy storage state of charge change value corresponding to each scheduling strategy particle, a set of strategy execution cost and a set of energy storage state of charge change are constructed respectively. The strategy execution cost set and the energy storage state of charge change set are normalized to generate a normalized strategy execution cost index set and a normalized state of charge change index set. The normalized set of policy execution cost indicators is used as the risk indicator of the scheduling policy particle, and the normalized set of charge state change indicators is used as the revenue indicator of the scheduling policy particle. The risk-reward ratio of each scheduling policy particle is calculated.
7. The energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization as described in claim 1, characterized in that: The process of replacing and optimizing the set of scheduling strategy particles based on the risk-reward ratio of each scheduling strategy particle, and selecting the scheduling strategy particle with the optimal fitness score and the highest risk-reward ratio as the microgrid energy scheduling control command, is as follows: The risk-reward ratio of the integrated scheduling strategy particles is a risk-reward ratio sequence. The scheduling strategy particle set is sorted in descending order according to the risk-reward ratio sequence, and the average risk-reward ratio is calculated. Using the average risk-reward ratio of each scheduling strategy particle as the boundary, scheduling strategy particles with a risk-reward ratio higher than the average are selected to construct a set of scheduling strategy particles with a high risk-reward ratio. At the same time, scheduling strategy particles with a risk-reward ratio lower than the average are marked to form a set of scheduling strategy particles to be replaced. Based on the high-risk-reward scheduling strategy particle set, the structure combination and perturbation operation are performed to generate a new scheduling strategy particle set. The corresponding particles in the original scheduling strategy particle set are replaced according to the marked positions in the scheduling strategy particle set to be replaced, thus forming the updated scheduling strategy particle set. The updated set of scheduling strategy particles is sorted according to the risk-reward ratio. The scheduling strategy particles with the highest risk-reward ratio and the best fitness score are selected by combining the fitness score. The scheduling parameter configuration is extracted and converted into microgrid energy scheduling control instructions.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the energy scheduling method for photovoltaic-storage microgrids based on adaptive particle swarm optimization as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the energy scheduling method for photovoltaic-storage microgrids based on the adaptive particle swarm algorithm as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Micro-power-grid scheduling method based on quantum-behaved particle swarm optimization
CN105470947A
Microgrid group optimization scheduling strategy based on niche chaos particle swarm algorithm
CN112821470A