A Photovoltaic Energy Storage Scheduling Method and System Considering the Uncertainty of Source and Load
By establishing building load and photovoltaic power generation prediction models and using Latin hypercube sampling to generate typical source load scenarios, the problem of failure to fully consider source load uncertainty in the existing technology is solved, and a more robust energy scheduling strategy is achieved, which improves energy utilization and reduces electricity consumption costs.
Patent Information
- Application Number
- CN202411796074.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing energy scheduling algorithms fail to fully consider the uncertainty of source load output, resulting in less practicality.
By pre-establishing building load prediction models and photovoltaic power generation prediction models, several typical source load scenarios are generated using the Latin hypercube sampling method, and the energy scheduling strategies of the photovoltaic energy storage system are determined based on these scenarios.
Effectively respond to the uncertainty of source load output, especially extreme operating conditions, so as to enhance the robustness of energy scheduling strategies, improve energy utilization, and reduce user electricity costs.
Smart Images

Figure CN119298177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy scheduling, and in particular to a photovoltaic energy storage scheduling method and system taking into account source-load uncertainty. Background Art
[0002] In recent years, with the increasingly serious environmental pollution caused by traditional power production and the continuous development of new energy technologies, the scale of renewable energy such as wind and light connected to the energy Internet has gradually expanded. Although wind and light energy have advantages such as cleanliness and renewability, they are random, intermittent and volatile in actual deployment, which often makes it difficult to achieve reasonable energy scheduling, resulting in low energy utilization efficiency, which in turn leads to energy waste and increased electricity costs.
[0003] At present, in order to improve energy utilization efficiency, dispatching algorithms that can respond to changes in energy supply and demand in real time are usually developed, such as dispatching algorithms based on optimization theory and artificial intelligence. However, existing dispatching algorithms fail to fully consider the uncertainty of source and load output and are less practical.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a photovoltaic energy storage scheduling method and system that takes into account the uncertainty of source and load in view of the above-mentioned defects of the prior art, aiming to solve the problem that the existing energy scheduling algorithm fails to fully consider the uncertainty of source and load output and has low practicality.
[0006] The technical solution adopted by the present invention to solve the problem is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a photovoltaic energy storage scheduling method considering source-load uncertainty, the method comprising:
[0008] Pre-establishing a building load prediction model and a photovoltaic power generation prediction model, wherein the building load prediction model is used to predict the future hourly load power consumption, and the photovoltaic power generation prediction model is used to predict the future hourly photovoltaic power generation;
[0009] Based on the building load prediction model and the photovoltaic power generation prediction model, a number of typical source-load scenarios are generated by a Latin hypercube sampling method; wherein each of the source-load scenarios includes a load power consumption scenario corresponding to the building load prediction model, and a photovoltaic power generation scenario corresponding to the photovoltaic power generation prediction model;
[0010] The energy dispatch strategy of the photovoltaic energy storage system is determined according to each of the source-load scenarios.
[0011] Second aspect, the embodiment of the present invention further provides a photovoltaic energy storage scheduling method system considering source-load uncertainty, and the system includes:
[0012] A model prediction module, configured to pre-establish a building load prediction model and a photovoltaic power generation prediction model, wherein the building load prediction model is used to predict the hourly load power consumption in the future, and the photovoltaic power generation prediction model is used to predict the hourly photovoltaic power generation in the future;
[0013] An electricity consumption scenario generation module, configured to generate a number of typical source-load scenarios based on the building load prediction model and the photovoltaic power generation prediction model through the Latin hypercube sampling method; wherein each source-load scenario includes a load electricity consumption scenario corresponding to the building load prediction model and a photovoltaic power generation scenario corresponding to the photovoltaic power generation prediction model;
[0014] An optimal scheduling control module, configured to determine the energy scheduling strategy of the photovoltaic energy storage system according to each source-load scenario.
[0015] Advantages of the present invention: The embodiment of the present invention uses a machine learning model for photovoltaic and load prediction, and generates a number of typical scenarios using Latin hypercube sampling based on the prediction results. The generation process of these typical scenarios fully considers the scenario uncertainty. Therefore, by comprehensively considering these typical scenarios to generate the energy scheduling strategy of the photovoltaic energy storage system, it can effectively cope with the uncertainty of source-load output, especially in response to extreme working conditions, thereby effectively enhancing the robustness of the energy scheduling strategy, and further improving the energy utilization rate and reducing the electricity cost of users. Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a schematic flowchart of the photovoltaic energy storage scheduling method considering source-load uncertainty provided by the embodiment of the present invention.
[0018] Figure 2 It is a schematic diagram of parameter settings of the inverter provided by the embodiment of the present invention.
[0019] Figure 3 It is a schematic diagram of the power energy scheduling control logic in the load priority mode provided by the embodiment of the present invention.
[0020] Figure 4 It is a schematic diagram of the power energy scheduling control logic in the battery priority mode provided by the embodiment of the present invention.
[0021] Figure 5 It is the power grid priority mode power scheduling control logic diagram provided by the embodiment of the present invention.
[0022] Figure 6 It is the battery charge and discharge effect diagram of the photovoltaic energy storage scheduling strategy considering the uncertainty of power generation and load provided by the embodiment of the present invention.
[0023] Figure 7 It is the module schematic diagram of the photovoltaic energy storage scheduling system considering the uncertainty of power generation and load provided by the embodiment of the present invention.
[0024] Figure 8 It is the principle block diagram of the terminal provided by the embodiment of the present invention. Detailed implementation manners
[0025] The present invention discloses a photovoltaic energy storage scheduling method and system considering the uncertainty of power generation and load. To make the purpose, technical solution and effect of the present invention clearer and more definite, the following further describes the present invention in detail with reference to the accompanying drawings and by way of examples. It should be understood that the specific examples described herein are only used to explain the present invention and are not used to limit the present invention.
[0026] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention means the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.
[0027] Those skilled in the art of the present technology can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.
[0028] In view of the above defects of the prior art, the present invention provides a photovoltaic energy storage scheduling method considering the uncertainty of source and load. The method includes pre-establishing a building load prediction model and a photovoltaic power generation prediction model. The building load prediction model is used to predict the hourly load power consumption in the future, and the photovoltaic power generation prediction model is used to predict the hourly photovoltaic power generation in the future. Based on the building load prediction model and the photovoltaic power generation prediction model, a number of typical source-load scenarios are generated by the Latin hypercube sampling method. Each of the source-load scenarios includes a load power consumption scenario corresponding to the building load prediction model and a photovoltaic power generation scenario corresponding to the photovoltaic power generation prediction model. An energy scheduling strategy for the photovoltaic energy storage system is determined according to each of the source-load scenarios. The present invention uses a machine learning model for photovoltaic and load prediction, and generates a number of typical scenarios based on the prediction results using Latin hypercube sampling. The generation process of these typical scenarios fully considers the scenario uncertainty. Therefore, by comprehensively considering these typical scenarios to generate an energy scheduling strategy for the photovoltaic energy storage system, the uncertainty of source-load output can be effectively addressed, especially in response to extreme working conditions, thereby effectively enhancing the robustness of the energy scheduling strategy, further improving the energy utilization rate, and reducing the electricity cost of users.
[0029] As Figure 1 shown, the method specifically includes the following steps:
[0030] Step S100: Pre-establish a building load prediction model and a photovoltaic power generation prediction model. The building load prediction model is used to predict the hourly load power consumption in the future, and the photovoltaic power generation prediction model is used to predict the hourly photovoltaic power generation in the future.
[0031] Specifically, in this embodiment, relevant data of the research object will be pre-collected. The research object can be a specified building and its photovoltaic energy storage system. Two prediction models are constructed by collecting data, one is a building load prediction model, and the other is a photovoltaic power generation prediction model. The former is used to predict the hourly load power consumption in the future, and the latter is used to predict the hourly photovoltaic power generation in the future.
[0032] In one implementation, the input data of the building load prediction model is meteorological data, date data, and historical building electricity consumption data, and the output data is the hourly load power consumption in the future. The date data of the building load prediction model includes characteristic data indicating whether it is a working day; the input data of the photovoltaic power generation prediction model is meteorological data, date data, and historical photovoltaic power generation data, and the output data is the hourly photovoltaic power generation in the future.
[0033] Specifically, in this embodiment, meteorological data, date data, historical building electricity consumption data, and historical photovoltaic power generation data of the research object are collected, and a building load prediction model and a photovoltaic power generation prediction model are established respectively. Both prediction models are hourly prediction models. Since the building electricity load varies greatly between weekdays and non-weekdays, the building load prediction model adds an input feature of whether it is a weekday compared to the photovoltaic power generation prediction model.
[0034] For example, obtain the original data of the photovoltaic power generation and building electricity consumption of a building over a period of time, as well as the meteorological data and date data during this period, and perform feature engineering. The data collection interval can be once per hour. Among them, the original data can include hourly photovoltaic power generation and building electricity load data, and the meteorological data can include outdoor temperature, humidity, and solar short-wave radiation data. To facilitate the model to understand the data, features such as the time of day, date, and whether it is a weekday are generated for the date data. Both the photovoltaic power generation and the building electricity load have obvious time periodicities. Extract the historical photovoltaic power generation data and historical building electricity consumption data of the previous period as lag features to predict the future photovoltaic power generation and load electricity consumption.
[0035] Furthermore, the input data of the building load prediction model are the hour of the day, whether it is a weekday, outdoor temperature, solar radiation, and the building consumption of the previous hour, and the output data are the hourly load electricity consumption for the next day; the input data of the photovoltaic power generation prediction model are the hour of the day, outdoor temperature, solar radiation, and the photovoltaic power generation of the previous hour, and the output data are the hourly photovoltaic power generation for the next day.
[0036] Specifically, for the prediction process of the load electricity consumption, the xgboost algorithm (an ensemble learning algorithm based on gradient boosting decision trees) can be used to take the hour of the day, whether it is a weekday, outdoor temperature, solar radiation (or called solar short-wave radiation data), and the historical building electricity consumption data as feature inputs to establish a building load prediction model, and finally output the hourly load electricity consumption (or called building electricity consumption, building electricity load) for the next day. For the prediction process of the photovoltaic power generation, the xgboost algorithm can be used to take the hour of the day, outdoor temperature, solar radiation, and the historical photovoltaic power generation data as feature inputs to establish a photovoltaic power generation prediction model, and finally output the hourly photovoltaic power generation for the next day.
[0037] For example, meteorological data and date data of the research object are collected as feature inputs. For the building load prediction model, since the load electricity consumption has a large difference in values between weekdays and non-weekdays, a new feature "is weekday" is constructed according to whether it is a weekday. For example, when the date is a weekday, the value of this feature is 1, and when it is a non-weekday, it is 0. Secondly, because the load electricity consumption is greatly affected by historical values, the load electricity consumption in the previous hour is added as a model feature. Finally, the input data of the building load prediction model includes: the number of hours in a day, whether it is a weekday, outdoor temperature, solar radiation, and the load electricity consumption in the previous hour, a total of 5 input features. For the photovoltaic power generation prediction model, since the photovoltaic power generation is less affected by weekdays and non-weekdays, the feature "is weekday" is not added. Compared with the building load prediction model, except that the former uses the photovoltaic power generation in the previous hour and the latter uses the load electricity consumption in the previous hour, and the former does not have the feature "is weekday", the other input features of the two are the same. Finally, the output data of the building load prediction model is the hourly load electricity consumption for the next day, and the output data of the photovoltaic power generation prediction model is the hourly photovoltaic power generation for the next day.
[0038] Furthermore, for the training processes of the building load prediction model and the photovoltaic power generation prediction model, the collected original data can be divided into a training set and a test set, and the division ratio is 9:1. The training set is used for model training, and the test set is used for the evaluation of the final model. For example, the model uses the historical data of the previous 31 days for training and predicts the photovoltaic power generation or load electricity consumption for the subsequent day.
[0039] By comprehensively analyzing the training time and coefficient of determination ( ) of the building load prediction model and the photovoltaic power generation prediction model, the overall prediction performance of the prediction model is evaluated.
[0040] The calculation formula of the evaluation index is:
[0041] ;
[0042] In the formula, is the predicted output of the i-th data point, is the actual value of the i-th data point, is the average value of the samples, that is, the average of all actual values. The closer the value of the coefficient of determination ( ) is to 1, the better the prediction model can explain the volatility of the observed data and the better the fitting degree to the real data.
[0043] For example, historical data from June 19, 2018 to July 19, 2018 is used for model training to predict the photovoltaic power generation data and load power consumption data from July 20, 2018 to August 19, 2018. The prediction results show that the coefficient of determination ( ) of the photovoltaic power generation prediction model is 0.91, and the root mean square error (RMSE) is 0.62; the coefficient of determination ( ) of the building load prediction model is 0.95, and the root mean square error (RMSE) is 0.53.
[0044] Step S200, based on the building load prediction model and the photovoltaic power generation prediction model, generate a number of typical source-load scenarios through the Latin hypercube sampling method; wherein, each of the source-load scenarios includes a load power consumption scenario corresponding to the building load prediction model and a photovoltaic power generation scenario corresponding to the photovoltaic power generation prediction model.
[0045] This embodiment uses a multi-scenario method to describe the uncertainties of renewable energy (i.e., photovoltaic power generation) and load power consumption. The Latin hypercube sampling method is specifically adopted in this embodiment: the possible value range of each input variable is divided into intervals with equal probability, and then a sample is drawn from each interval to ensure that the sampling of all variables covers their entire range. Applying the hypercube sampling method to the scenario generation process can effectively reduce sample repeatability and achieve better results with a relatively small sample size.
[0046] In one implementation, generating a number of typical source-load scenarios through the Latin hypercube sampling method based on the building load prediction model and the photovoltaic power generation prediction model includes:
[0047] For each of the building load prediction model and the photovoltaic power generation prediction model, obtain the prediction data for the target historical time period through this prediction model;
[0048] According to the prediction data and the real data corresponding to the target historical time period, calculate the probability distribution function of the error percentage per hour for the target historical time period;
[0049] Determine a number of sampling points according to the probability distribution function, and determine a scenario according to the sample value of each sampling point to obtain a number of scenarios;
[0050] Perform scenario reduction according to each scenario to obtain a number of target scenarios and the scenario probabilities of each of the target scenarios; wherein, the target scenario of the building load prediction model is the load power consumption scenario, and the target scenario of the photovoltaic power generation prediction model is the photovoltaic power generation scenario;
[0051] Pair each of the load power consumption scenarios with each of the photovoltaic power generation scenarios to obtain a number of source-load scenarios.
[0052] Specifically, in this embodiment, the principle of generating scenarios based on the building load prediction model or the photovoltaic power generation prediction model is the same. Therefore, this embodiment takes one prediction model as an example to illustrate the scenario generation process. First, select a target historical time period (for example, one month), and this target historical time period needs to have real data related to the prediction performance of the prediction model. Obtain the prediction data for this target historical time period through the prediction model, subtract the prediction data from the known real data and divide by the real data to obtain the probability distribution function of the error percentage for the target historical time period (for example, a normal distribution function). Use the Latin hypercube sampling method to sample the probability distribution of the error percentage per hour, and obtain a number of target scenarios after scenario reduction. For the convenience of distinction, this embodiment defines the target scenarios of the building load prediction model as load power consumption scenarios, and the target scenarios of the photovoltaic power generation prediction model as photovoltaic power generation scenarios. Randomly pair all load power consumption scenarios with all photovoltaic power generation scenarios to obtain a number of typical source-load scenarios, and these typical source-load scenarios fully consider scenario uncertainty. The scenario generation method in this embodiment has low requirements for the amount of data, strong model interpretability, avoids complex calculations, and improves the operation efficiency and speed.
[0053] In one implementation, according to the prediction data and the real data corresponding to the target historical time period, calculating the probability distribution function of the error percentage per hour for the target historical time period includes:
[0054] Subtract the real data corresponding to the target historical time period from the prediction data and divide by the real data to obtain the probability distribution function of the error percentage per hour for the target historical time period.
[0055] Illustrate with an example. First, use the building load prediction model and the photovoltaic power generation prediction model to predict the photovoltaic power generation and load power consumption from July 20, 2018 to August 19, 2018. Then subtract the predicted values of the photovoltaic power generation and load power consumption from the real values and divide by the real values to obtain the probability distribution of the error percentage per hour for this month. Considering that the generation of a large number of scenarios will increase the computational complexity, the synchronous back substitution elimination method can be used for scenario reduction to obtain 5 photovoltaic power generation scenarios, 5 load power consumption scenarios, and the corresponding scenario probabilities for each scenario. The reduced typical scenario set can well reflect the probability distribution of the original scenario set.
[0056] In one implementation, determining a number of sampling points according to the probability distribution function, and determining a scenario according to the sample value of each sampling point includes:
[0057] Divide a number of probability intervals equally according to the probability distribution function;
[0058] Determine the sampling points corresponding to each of the probability intervals according to the random numbers within each of the probability intervals;
[0059] Perform an inverse transformation on the probability distribution function to obtain the sample values corresponding to each of the sampling points;
[0060] Determine a scenario according to the sample value of each sampling point.
[0061] Specifically, when using the Latin hypercube sampling method for multi-scenario generation, first divide the probability distribution function equally into n probability intervals, and then use the random numbers within each probability interval as sampling points, and finally perform an inverse transformation on the probability distribution function to obtain the sample values of the sampling points .
[0062] For example, taking photovoltaic power generation as an example, assume that the error between the predicted value and the true value of the hourly photovoltaic power generation from July 20, 2018 to August 19, 2018 follows a normal distribution N( , ), is the mean value of the error from July 20 to August 19, is the percentage of its fluctuation. Divide the hourly error percentage probability distribution into 100 intervals for equally spaced random sampling to ensure that the value range of each variable is evenly covered and improve the representativeness of the samples. Similarly, the error sampling of load power consumption can be realized, which will not be elaborated here.
[0063] In one implementation, perform scenario reduction according to each scenario to obtain a number of target scenarios and the scenario probabilities of each of the target scenarios, including:
[0064] Calculate the Euclidean distance between each pair of scenarios;
[0065] For each scenario, select another scenario with the smallest Euclidean distance from this scenario as the paired scenario to obtain a scenario combination, and calculate the product of the Euclidean distance and the scenario probability of the paired scenario;
[0066] Screen out the scenario combination with the smallest product from each scenario combination, delete the scenario with the smallest scenario probability in this scenario combination, and add the scenario probability of the deleted scenario to the other scenario in the same scenario combination;
[0067] Judge whether the remaining total number of scenarios reaches a preset value. If not, continue to execute the step of calculating the Euclidean distance between each pair of scenarios until the remaining total number of scenarios reaches the preset value, and use the remaining scenarios as the target scenarios.
[0068] Specifically, considering that the generation of a large number of scenarios will increase the computational complexity, this embodiment adopts the synchronous back substitution method for scenario reduction, and the reduced typical scenario set can well reflect the probability distribution of the original scenario set.
[0069] For example, assuming that the number of photovoltaic power generation scenarios generated by the Latin hypercube sampling method is N, and the number after scenario reduction is n, the steps of scenario reduction are as follows:
[0070] Step (1) Initialization: The probability value of each scenario is , and the initial reduced number of scenarios is .
[0071] Step (2) Calculate the Euclidean distance of each scenario , and the calculation method is:
[0072] ;
[0073] In the formula, is the photovoltaic power generation value of the i-th scenario at time t, is the photovoltaic power generation value of the j-th scenario at time t.
[0074] Step (3) Select the scenario with the smallest distance from the scenario , and calculate the product of the Euclidean distance and the scenario probability, denoted as:
[0075] ;
[0076] Among them, the deleted scenario is determined by , the Euclidean distance reflects the similarity between two scenarios, and the scenario probability represents the possibility of the occurrence of the scenario. If the product of the Euclidean distance and the scenario probability of two scenarios and is the smallest, then the one with the smallest scenario probability in this scenario combination is deleted;
[0077] Step (4) Delete the scenario determined above, and add the scenario probability of the deleted scenario to the scenario probability of the sample with the closest Euclidean distance to it, so as to ensure that the sum of probabilities is 1. After deleting the scenario , the scenario probability can be updated to .
[0078] Step (5) Repeat the above steps (2)-(4) until the remaining number of scenarios reaches the set value.
[0079] The reduction process of the load power consumption scenario is similar to the above steps and will not be elaborated here.
[0080] Suppose 100 photovoltaic power generation scenarios and 100 power consumption load scenarios that follow a probability distribution are generated respectively by Latin hypercube sampling, and different types of scenarios are subjected to scenario reduction. The initial number of scenarios N = 100, and the probability of each scenario in the above step (1) is = 1 / 100. Scenario reduction is carried out through Euclidean distance. In steps (3) and (4), the two closest scenarios are found, merged, and then one scenario is deleted, and the probability of the other scenario becomes 2 / 100, and the loop is repeated until 5 scenarios are reduced and the probabilities of these 5 scenarios are obtained. Finally, 5 photovoltaic power generation scenarios and 5 power consumption load scenarios are obtained, and these typical scenarios with corresponding probabilities after scenario reduction are exported.
[0081] Step S300: Determine the energy scheduling strategy of the photovoltaic energy storage system according to each of the source-load scenarios.
[0082] Specifically, in this embodiment, a machine learning model is used for photovoltaic and load prediction, and several typical scenarios are generated by Latin hypercube sampling based on the prediction results. The generation process of these typical scenarios fully considers the scenario uncertainty. Therefore, by comprehensively considering these typical scenarios to generate the energy scheduling strategy of the photovoltaic energy storage system, the uncertainty of the source-load output can be effectively addressed, especially in response to extreme working conditions, thereby effectively enhancing the robustness of the energy scheduling strategy, and further improving the energy utilization rate and reducing the user's electricity cost.
[0083] In one implementation, determining the energy scheduling strategy of the photovoltaic energy storage system according to each of the source-load scenarios includes:
[0084] Establish an objective function based on the system's daily electricity cost;
[0085] Set constraint conditions according to the device operation information of the inverter;
[0086] Determine the power flow direction and several working modes during the system operation, and set the relationship between different cut-off power and the power flow direction based on each of the working modes;
[0087] Establish a genetic algorithm using the objective function and the constraint conditions, and search for the optimal hourly parameter combination of the inverter under each of the source-load scenarios through the genetic algorithm; wherein, the hourly parameter combination includes the optimal working mode and the cut-off power setting value per hour;
[0088] Dispatch the inverter and / or the battery pack according to the searched hourly parameter combination.
[0089] Specifically, this embodiment mainly models the control strategies for the inverter and / or the battery pack. First, determine the power flow direction during system operation (i.e., the priority of power flow direction under different working modes), comprehensively consider the multiple typical source-load scenarios generated above, and establish an optimization objective with the minimum daily electricity cost of the system (the electricity cost is equal to the electricity purchase cost minus the income from photovoltaic power generation feeding into the grid), that is, obtain the objective function. Secondly, according to the device operation setting constraints of the inverter, ensure that the result of the optimization solution can be applied to the actual working conditions. In addition, study various working modes of the inverter, set the relationship between different cut-off power levels and the power flow direction during system operation, and use the genetic algorithm to optimize the hourly setting parameter combinations of the inverter under all scenarios in a day.
[0090] Since the research object of this embodiment is a real photovoltaic energy storage system, in the real world, it is impossible to directly optimize the energy flow among the photovoltaic, the grid, the battery, and the load. Only by changing the selection of the working mode at a certain moment and the battery charge and discharge amount can indirectly affect the magnitude and direction of the above energy flow. Therefore, the variable to be optimized is the setting value of the inverter in the real photovoltaic energy storage system. This embodiment sets the optimization variables as the hourly working mode (or called electricity consumption mode) and the cut-off power level setting value of the inverter. Finally, obtain the hourly setting parameter combinations of the inverter when considering the scenario uncertainty and with the minimum daily electricity cost, and transmit these setting parameters to the inverter and / or the battery through serial communication to achieve intelligent control. In the test stage, the daily electricity consumption strategy can also be formulated through the optimal hourly setting parameter combinations searched out, and the operation data of the inverter based on this daily electricity consumption strategy is compared with the operation data of the inverter based on the default electricity consumption strategy to test the robustness of this daily electricity consumption strategy.
[0091] For example, the inverter in this embodiment can specifically adopt a hybrid inverter. As Figure 2 shown, the values that the inverter can set by itself within a certain period of time include different working modes, cut-off power levels, and charge and discharge power magnitudes. This embodiment sets three working modes for the inverter: load priority mode, battery priority mode, and grid priority mode. The energy scheduling strategies under the three working modes are as Figure 3 , Figure 4 , Figure 5As shown in the figure, the photovoltaic energy storage scheduling method considering source-load uncertainty in this embodiment is also established based on this. The energy scheduling strategy in the load priority mode is that the photovoltaic power first satisfies the load usage, and the excess electricity is judged whether to charge the battery or feed it into the grid according to the relationship between the cut-off power and the battery power; the energy scheduling strategy in the battery priority mode is that the photovoltaic power first satisfies the electricity required by the battery, and the photovoltaic power will only supply power to the load or feed it into the grid when the battery does not need to be charged; the grid priority mode is very similar to the load priority mode. The difference is that in the grid priority mode, when the set cut-off power is less than the battery power, the battery will discharge, while in the load priority mode, the battery will not discharge.
[0092] Since the charge-discharge power is set to 100%, only optimizing the charge-discharge cut-off power value per hour can also meet all situations where both the charge-discharge cut-off power and the charge-discharge power are used as optimization variables. Therefore, in order to simplify the solution of the model, this embodiment finally sets the variables to be optimized as the selection of the working mode per hour and the size of the cut-off power per hour (or called the cut-off charge of the battery per hour) in a day. Combining all the source-load scenarios obtained above for parameter optimization, for example, 5 load power consumption scenarios and 5 photovoltaic power consumption scenarios, then 5*5 = 25 source-load scenarios can be combined, and it is necessary to find the optimal parameter combination per hour that meets the 25 source-load scenarios. Finally, the results obtained by optimization are applied to the actual photovoltaic energy storage system, so as to achieve the purpose of saving the user's electricity cost. As Figure 6 shown, it shows the battery charge-discharge effect diagram after adopting the method of this embodiment.
[0093] In one implementation, the genetic algorithm is used for:
[0094] Determine the parameter combination per hour to be optimized, and randomly generate a set of initial solutions as a population based on the parameter combination per hour to be optimized; wherein, each initial solution is an individual in the population;
[0095] Take the objective function as the fitness function, and calculate the fitness of each individual under each source-load scenario;
[0096] Judge whether the preset stop condition is satisfied currently;
[0097] If not, then reproduce according to the fitness of each individual to obtain a new population; the reproduction process includes individual selection, crossover operation, mutation operation and individual replacement;
[0098] Continue to execute the step of calculating the fitness of each individual under each source-load scenario until the stop condition is satisfied, and select the individual with the highest fitness as the optimal solution.
[0099] Specifically, in this embodiment, it is necessary to optimize and solve the hourly setting parameter combinations of the inverter. First, determine the hourly setting parameter combinations to be optimized, including the optimal operating mode per hour and the cut-off power setting value, and randomly generate a set of initial solutions based on this, which is called a population. Each solution is called an individual, usually represented by a chromosome. Take the aforementioned established objective function as the fitness function, evaluate the quality of each individual through the fitness function, and select individuals for reproduction according to the fitness of each individual. The principle of survival of the fittest can be adopted for reproduction, that is, the probability of an individual with a higher fitness being selected is greater to ensure the transmission of excellent genes. During reproduction, perform a crossover operation on the two selected individuals to generate new individuals (offspring). The crossover process simulates gene recombination in biological inheritance and adopts the single-point crossover or multi-point crossover method. Further, random mutation can also be performed on the new individuals to increase the diversity of the population and prevent falling into a local optimum. The mutation operation can randomly change some genes of an individual within a small range. For example, each new individual has a 10% probability of undergoing mutation. Add the newly generated individuals to the population, and select and retain some better individuals according to the fitness to form a new population. Repeat the above operations of fitness evaluation, selection, crossover, mutation, and replacement until the stop condition is met, and output the result. In this embodiment, the stop condition can be reaching the set number of iterations, or the fitness value converges to a stable value (i.e., finding the optimal solution), and the individual with the highest fitness can be used as the optimal solution.
[0100] In one implementation, taking the objective function as the fitness function, calculate the fitness of each individual under each source-load scenario, including:
[0101] Calculate the objective function value of each individual under each source-load scenario through the objective function; wherein, for each source-load scenario, calculate the objective function values corresponding to the load power consumption scenario and the photovoltaic power generation scenario respectively through the objective function, and determine the objective function value corresponding to this source-load scenario according to the sum of the products of the two objective function values and their respective corresponding scenario probabilities;
[0102] Determine the fitness of this individual according to the objective function values under each source-load scenario.
[0103] Specifically, this embodiment takes the minimum daily power consumption cost of the system as the optimization objective, and establishes the objective function as follows:
[0104] ;
[0105] In the formula, is the daily power consumption cost; is the probability corresponding to scenario ; is the power purchase amount from the power grid at the t-th hour under scenario ; is the electricity purchase price for the t-th hour; is the electricity sold to the power grid at the t-th hour under the scenario ; is the on-grid electricity price for the t-th hour.
[0106] Taking an individual as an example, the fitness of this individual is calculated as follows: for each source-load scenario, calculate the objective function value of each scenario in this source-load scenario through the above objective function, and then take the sum of the products of the objective function values of each scenario and their respective scenario probabilities as the objective function value of this source-load scenario. Determine the fitness of this individual by integrating the objective function values of all source-load scenarios.
[0107] The advantages of the present invention are as follows:
[0108] (1) Efficient optimization: Considering prediction uncertainty for energy management. Use the Latin hypercube sampling method to sample the percentage error of hourly photovoltaic output and electricity load. The required sampling samples are only one month's data. Obtain the corresponding probability distribution for each hour based on this one-month historical data of percentage errors, and then perform equally spaced sampling on the obtained probability distribution to generate photovoltaic and load scenarios, and perform scenario reduction to obtain typical photovoltaic and load scenarios. The finally obtained scenarios fully consider extreme scenarios with large prediction errors, and effectively simplify the scenario generation process, avoiding a large number of complex calculations in Monte Carlo simulation, improving the operation speed. In addition, the white-box nature of this method can also intuitively explain the system operation mechanism. Compared with traditional energy management strategy research, the scheduling strategy obtained by this method has better robustness and can better cope with future uncertainties.
[0109] (2) Strong practicability: Modeling the control logic of real inverters and equipment operation constraints. Use the genetic algorithm to optimize the custom working mode and cut-off electricity setting value to ensure that the obtained results can be directly applied to the energy scheduling method of real equipment, having stronger advantages in dealing with non-ideal factors and complex operating conditions, avoiding the complex dynamic phenomena in the equipment that cannot be accurately captured by the simulation model, and being able to more accurately reflect the actual behavior of the equipment. Compared with the simulation simulation that is difficult to comprehensively consider equipment constraints, this method can better cope with the complexity in actual operation, reduce the deviation caused by inaccurate model assumptions, and is more reliable. The obtained optimal parameters can be directly applied to real equipment, reducing the complexity of model conversion and adaptation, and improving the efficiency and effectiveness of energy management.
[0110] Based on the above embodiments, the present invention also provides a photovoltaic energy storage scheduling system considering source-load uncertainty, as Figure 7 shown, the system includes:
[0111] A model prediction module is used to pre - establish a building load prediction model and a photovoltaic power generation prediction model. Among them, the building load prediction model is used to predict the hourly load electricity consumption in the future, and the photovoltaic power generation prediction model is used to predict the hourly photovoltaic power generation in the future;
[0112] An electricity consumption scenario generation module is used to generate a number of typical source - load scenarios based on the building load prediction model and the photovoltaic power generation prediction model through the Latin hypercube sampling method. Among them, each source - load scenario includes a load electricity consumption scenario corresponding to the building load prediction model and a photovoltaic power generation scenario corresponding to the photovoltaic power generation prediction model;
[0113] An optimal scheduling control module is used to determine the energy scheduling strategy of the photovoltaic energy storage system according to each source - load scenario.
[0114] Based on the above - mentioned embodiments, the present invention also provides a terminal, and its principle block diagram can be as Figure 8 shown. The terminal includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non - volatile storage medium and an internal memory. The non - volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non - volatile storage medium. The network interface of the terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a photovoltaic energy storage scheduling method considering source - load uncertainty. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.
[0115] Those skilled in the art can understand that Figure 8 the principle block diagram shown only shows the block diagram of some structures related to the solution of the present invention, and does not constitute a limitation on the terminal to which the solution of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0116] In one implementation, more than one program is stored in the memory of the terminal, and is configured to be executed by more than one processor. The more than one program includes instructions for performing a photovoltaic energy storage scheduling method considering source - load uncertainty.
[0117] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0118] In summary, the present invention discloses a photovoltaic energy storage scheduling method and system considering source-load uncertainty, which relates to the technical field of energy scheduling. The method includes pre-establishing a building load prediction model and a photovoltaic power generation prediction model, where the building load prediction model is used to predict the hourly load power consumption in the future, and the photovoltaic power generation prediction model is used to predict the hourly photovoltaic power generation in the future; based on the building load prediction model and the photovoltaic power generation prediction model, a number of typical source-load scenarios are generated by the Latin hypercube sampling method; each of the source-load scenarios includes a load power consumption scenario corresponding to the building load prediction model and a photovoltaic power generation scenario corresponding to the photovoltaic power generation prediction model; and an energy scheduling strategy for the photovoltaic energy storage system is determined according to each of the source-load scenarios. The present invention uses a machine learning model for photovoltaic and load prediction, and generates a number of typical scenarios by Latin hypercube sampling based on the prediction results. The generation process of these typical scenarios fully considers scenario uncertainty. Therefore, by comprehensively considering these typical scenarios to generate an energy scheduling strategy for the photovoltaic energy storage system, it can effectively cope with the uncertainty of source-load output, especially in extreme working conditions, thereby effectively enhancing the robustness of the energy scheduling strategy, and further improving the energy utilization rate and reducing the electricity cost of users.
[0119] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or modifications can be made according to the above description, and all such improvements and modifications shall fall within the protection scope of the appended claims of the present invention.
Claims
1. A photovoltaic energy storage scheduling method considering source-load uncertainty, characterized in that: The method comprises: Pre-establishing a building load prediction model and a photovoltaic power generation prediction model, wherein the building load prediction model is used to predict the future hourly load power consumption, and the photovoltaic power generation prediction model is used to predict the future hourly photovoltaic power generation; For each prediction model, the prediction data of the target historical time period is obtained through the prediction model; wherein the prediction model is the building load prediction model or the photovoltaic power generation prediction model; the prediction data is subtracted from the real data corresponding to the target historical time period and divided by the real data to obtain a probability distribution function of the error percentage per hour of the target historical time period; Divide a number of probability intervals equally according to the probability distribution function, determine the sampling points corresponding to each probability interval according to the random numbers in each probability interval; perform an inverse transformation on the probability distribution function to obtain the sample values corresponding to each sampling point; determine a scene according to the sample value of each sampling point to obtain a number of scenes; calculate the Euclidean distance between each scene; For each scene, another scene with the smallest Euclidean distance to the scene is selected as a pairing scene to obtain a scene combination, and the product of the Euclidean distance and the scene probability of the pairing scene is calculated; the scene combination with the smallest product is screened out from each scene combination, the scene with the smallest scene probability in the scene combination is deleted, and the scene probability of the deleted scene is superimposed on another scene in the same scene combination; Determine whether the total number of remaining scenes reaches a preset value. If not, continue to execute the step of calculating the Euclidean distance between each scene until the total number of remaining scenes reaches the preset value, and use the remaining scenes as target scenes; wherein the target scene of the building load prediction model is the load power consumption scene, and the target scene of the photovoltaic power generation prediction model is the photovoltaic power generation scene; each of the load power consumption scenes and each of the photovoltaic power generation scenes are combined in pairs to obtain a number of source-load scenes; wherein each of the source-load scenes includes a load power consumption scene corresponding to the building load prediction model, and a photovoltaic power generation scene corresponding to the photovoltaic power generation prediction model; Establish an objective function based on the system's daily electricity cost; Set constraints based on the inverter's equipment operation information; Determine the power trend and several working modes in the operation of the system, and set different cut-off power and power trend relationships based on each of the working modes; A genetic algorithm is established using the objective function and the constraint conditions, and the optimal hourly setting parameter combination of the inverter under each source-load scenario is searched through the genetic algorithm; wherein the hourly setting parameter combination includes the optimal working mode and cut-off power setting value per hour; The inverter and / or battery group is dispatched according to the searched hourly setting parameter combination.
2. The photovoltaic energy storage scheduling method considering source-load uncertainty according to claim 1 is characterized in that: The input data of the building load prediction model are the number of hours in a day, whether it is a weekday, the outdoor temperature, the solar radiation, and the historical data of building electricity consumption, and the output data are the hourly load power consumption for the next day; the input data of the photovoltaic power generation prediction model are the number of hours in a day, the outdoor temperature, the solar radiation, and the historical data of photovoltaic power generation, and the output data are the hourly photovoltaic power generation for the next day.
3. The photovoltaic energy storage scheduling method considering source-load uncertainty according to claim 1 is characterized in that: The genetic algorithm is used to: Determine an hourly setting parameter combination to be optimized, and randomly generate a set of initial solutions as a population based on the hourly setting parameter combination to be optimized; wherein each of the initial solutions is an individual in the population; Taking the objective function as the fitness function, calculating the fitness of each individual under each source-load scenario; Determine whether the preset stop condition is currently met; If not, then reproduce according to the fitness of each individual to obtain a new population; the reproduction process includes individual selection, crossover operation, mutation operation and individual replacement; Continue to perform the step of calculating the fitness of each individual under each source-load scenario until the stop condition is met, and select the individual with the highest fitness as the optimal solution.
4. The photovoltaic energy storage scheduling method considering source-load uncertainty according to claim 3 is characterized in that: The objective function is used as a fitness function to calculate the fitness of each individual under each source-load scenario, including: The objective function value of each individual in each source-load scenario is calculated by the objective function; wherein, for each source-load scenario, the objective function values corresponding to the load power consumption scenario and the photovoltaic power generation scenario are calculated by the objective function, and the objective function value corresponding to the source-load scenario is determined according to the sum of the products of the two objective function values and the corresponding scenario probabilities; The fitness of the individual is determined according to the objective function value under each source-load scenario.
5. A photovoltaic energy storage scheduling method system considering source-load uncertainty, characterized in that: The system comprises: A model prediction module is used to pre-establish a building load prediction model and a photovoltaic power generation prediction model, wherein the building load prediction model is used to predict the future hourly load power consumption, and the photovoltaic power generation prediction model is used to predict the future hourly photovoltaic power generation; A power consumption scenario generation module is used to obtain the prediction data of the target historical time period through each prediction model; wherein the prediction model is the building load prediction model or the photovoltaic power generation prediction model; the prediction data is subtracted from the real data corresponding to the target historical time period and divided by the real data to obtain the probability distribution function of the error percentage per hour of the target historical time period; Divide a number of probability intervals equally according to the probability distribution function, determine the sampling points corresponding to each probability interval according to the random numbers in each probability interval; perform an inverse transformation on the probability distribution function to obtain the sample values corresponding to each sampling point; determine a scene according to the sample value of each sampling point to obtain a number of scenes; calculate the Euclidean distance between each scene; For each scene, another scene with the smallest Euclidean distance to the scene is selected as a pairing scene to obtain a scene combination, and the product of the Euclidean distance and the scene probability of the pairing scene is calculated; the scene combination with the smallest product is screened out from each scene combination, the scene with the smallest scene probability in the scene combination is deleted, and the scene probability of the deleted scene is superimposed on another scene in the same scene combination; Determine whether the total number of remaining scenes reaches a preset value. If not, continue to execute the step of calculating the Euclidean distance between each scene until the total number of remaining scenes reaches the preset value, and use the remaining scenes as target scenes; wherein the target scene of the building load prediction model is the load power consumption scene, and the target scene of the photovoltaic power generation prediction model is the photovoltaic power generation scene; each of the load power consumption scenes and each of the photovoltaic power generation scenes are combined in pairs to obtain a number of source-load scenes; wherein each of the source-load scenes includes a load power consumption scene corresponding to the building load prediction model, and a photovoltaic power generation scene corresponding to the photovoltaic power generation prediction model; Optimization dispatch control module, used to establish the objective function according to the daily electricity cost of the system; Set constraints based on the inverter's equipment operation information; Determine the power trend and several working modes in the operation of the system, and set different cut-off power and power trend relationships based on each of the working modes; A genetic algorithm is established using the objective function and the constraint conditions, and the optimal hourly setting parameter combination of the inverter under each source-load scenario is searched through the genetic algorithm; wherein the hourly setting parameter combination includes the optimal working mode and cut-off power setting value per hour; The inverter and / or battery group is dispatched according to the searched hourly setting parameter combination.
Citation Information
Patent Citations
Household grid-connected cooperative economic dispatching optimization method giving consideration to uncertainty factors
CN107276121A