Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide an energy optimization scheduling method for a smart power grid, and the energy optimization scheduling of a micro-grid is realized.
In order to achieve the above object, the present invention can be realized by the following technical solutions:
an energy optimization scheduling method of a smart grid is used for an economic and environment-friendly micro-grid to obtain optimized scheduling, and comprises the following steps: 1) and (3) predicting relevant power data of the microgrid: forecasting the wind speed, the irradiance and the power load by an ARIMA forecasting method by collecting historical data of the wind speed, the irradiance and the power load of the micro-grid; determining a transaction attitude hierarchy according to the predicted power data of the microgrid and in consideration of weather conditions, thereby using a battery energy storage system in a planned manner and calculating the bidding price and the bidding electric quantity in a future period; 2) designing an optimizer: and the predicted value related to the microgrid is used as the input of an optimizer, and the optimal transaction pair of the microgrid is searched by adopting a particle swarm optimization algorithm so as to save the power cost.
The step 1) specifically comprises the following steps:
11) firstly, historical data of the wind speed, irradiance and power load of a microgrid are collected, time sequences are formed by the historical data, a wind speed prediction model, an irradiance prediction model and a power load prediction model are respectively established for the time sequences of the wind speed, irradiance and load by adopting an ARIMA method, and relevant data of the wind speed, irradiance and power load in n periods in the future are predicted; and then, converting the predicted wind speed and irradiance data into power generation data through a simulation model, and calculating the power condition in the nth time period according to the power generation amount and the power load of the microgrid in the nth time period and in consideration of the charging and discharging amount of a battery Energy Storage System (ESS).
12) If the generated electric quantity is larger than the total load demand in the nth period in the future, the ESS uses the maximum SoC to charge, and if the residual electric quantity exists, the ESS can be sold; otherwise, if the generated electric quantity is less than the total load demand, the electric quantity of the ESS is released to meet the load demand, and if the generated electric quantity is not enough, the insufficient electric quantity is purchased.
13) Under the condition of considering the charging and discharging electric quantity of the ESS of the microgrid, calculating the electric power condition of the microgrid in each future time period, and determining the role of the microgrid according to the electric power condition of each future time period. When the remaining power is available in the next time period, it will become the supplier, otherwise it will become the demand side.
14) The trading capacity of the microgrid is determined according to the power condition and the weather condition of the microgrid in each future period, and the trading attitude proportion is designed to determine whether the trading attitude of the microgrid is optimistic or conservative. When the remaining electric quantity exists in the future and the weather is sunny, the micro-grid has optimistic transaction attitude; when the electric quantity is insufficient in the future and the rainy day exists, the micro-grid has a conservative transaction attitude.
15) The invention adopts the transaction attitude proportion to determine the bidding electricity price of the microgrid, the targets of a supplier and a demander are different, the supplier wants to earn more money, and the demander wants to buy cheaper points. When the supplier is in conservative attitude, the bidding selling price is set to be a fixed price which is slightly lower than the selling price of the power company; when the supplier is in optimistic attitude, the bid selling price is changed linearly according to the size of attitude proportion; the requesting party is opposite the supplying party.
16) The present invention employs a transaction attitude ratio for determining the bid amount of the microgrid, taking into account the power conditions and the energy of the ESS for each future time period. If the microgrid has a remaining power generation capacity in the next time period and the future, the transaction attitude proportion is a factor for determining how much energy the ESS is transacting with other microgrids; however, when the microgrid is in short supply of power during the next time period and the future, the microgrid purchases power in advance to charge the ESS according to the transaction attitude proportion.
The step 2) specifically comprises the following steps:
21) since the goal of each microgrid is to save energy costs and gain additional economic benefits, the present invention employs trade attitude proportions and optimization times for determining the period of the microgrid. In the optimization process, the microgrid is considered as a particle. The particles are classified into early and late stages. In the early stages of optimization, price is the primary consideration; in the later stage of optimization, the electric quantity is taken as a main consideration factor.
22) Determining cost functions of the supplier and the demander based on the age of the particles is used to estimate fitness. Finding the individual optimal position P of the particle at the kth iteration by using a cost functioniAnd a global optimum position G.
23) When the maximum transaction iteration has not been completed, the velocity and position of the particle will be updated.
24) When the transaction iteration is finished, selecting pairs; and when the optimization time is over, obtaining the optimal pair solution, namely obtaining the optimal trading pair, trading price and trading volume.
Compared with the prior art, the invention has the following advantages:
1. the prediction accuracy is high. The invention provides a prediction method based on an ARIMA model, which is used for predicting the wind speed, irradiance and power load of a micro-grid. According to the method, corresponding historical data of a micro-grid for continuous days is used as a training set, an ARIMA model is established, corresponding power data are predicted, and compared with other methods, the power data can be accurately predicted by predicting the power data based on the ARIMA model.
2. The scheduling operation stability is strong. According to the method, the ARIMA model is utilized to predict the electric power data related to the micro-grid, the charging and discharging states and the weather states of the ESS in the micro-grid are considered, the transaction attitude proportion of the micro-grid is calculated, the bidding electricity price and the bidding electricity quantity of the micro-grid are calculated, and then the particle swarm optimization algorithm is adopted to search the optimal transaction pair of the particles. Through prediction and optimization in each hour, energy scheduling and operation of the micro-grid can be more stable.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments.
The system structure of the micro-grid in the smart grid comprises the following components:
energy Storage System (ESS) module: and the micro-grid determines the charging or discharging power of the ESS according to an energy optimization scheduling algorithm.
Wind power generation system module: wind turbines are used to convert wind energy into electrical energy and supply the generated power to the electrical loads of the microgrid, with the remaining power charging the ESS.
Photovoltaic power generation system module: the photovoltaic cells are utilized to convert the illumination into electrical energy and supply the generated electrical energy to the electrical load of the microgrid, and the rest of the electrical energy charges the ESS.
Micro-grid load: residential, commercial and industrial loads.
The intelligent power grid energy optimization scheduling method based on model prediction control is shown in fig. 1 and comprises a prediction model and an optimizer, wherein the process of building the prediction model is shown in fig. 2. Each microgrid sets up a respective prediction model to predict future power conditions by collecting power utilization historical data and sensor historical data generated by renewable energy sources, and predicts the bidding price and the bidding electric quantity by combining weather conditions; and then the optimizer designs the optimizer by adopting an optimization algorithm according to the bidding electricity price and the bidding electric quantity of each microgrid, so as to obtain the optimal transaction pair, transaction price and transaction quantity. And according to the result output by the optimizer, the dispatching equipment controller executes the required power exchange and feeds back the information of the actual power transaction with the power company to the prediction model. Through the rolling prediction and optimization of each hour, the electric quantity optimization scheduling of the micro-grid is realized, and therefore the electric power cost is saved.
The intelligent power grid energy optimization scheduling method based on model predictive control comprises the following steps:
1. micro-grid prediction model establishment
(1) ARIMA models for respectively establishing wind speed, irradiance and electric load
Historical data of wind speed, irradiance and power load of a micro-grid for continuous days and hours are used as input of an ARIMA model through a sensor, a corresponding prediction model is established by using an ARIMA method, and a flow chart of ARIMA model establishment is shown in FIG. 3.
According to the modeling flow of fig. 3, first, when an ARIMA model is established, corresponding historical data are formed into a time series, an autocorrelation function (ACF) and a partial autocorrelation function (PACF) are calculated, an autocorrelation function graph and a partial autocorrelation function graph are drawn, and whether the model is stable or not can be judged through the graphs. If the ACF graph and the PACF graph of the time sequence are not ended, slow attenuation or periodic attenuation occurs, the sequence is considered to be unstable, and the unstable time sequence needs to be converted into a stable time sequence through differential processing.
Then, after the model is temporarily set as a stable model according to ACF and PACF graphs of a time sequence, parameters of the model are estimated by adopting a maximum likelihood estimation method, an Akaichi Information Criterion (AIC) and a Bayesian Information Criterion (BIC) in the model are calculated, and in order to obtain the optimal fitness of the ARIMA model, the minimum value of the AIC and the BIC needs to be found out, so that the order of the model is determined.
And then, judging whether the model is reasonable or not by checking whether the residual sequence of the fitting model is white noise or not, if the model is not reasonable, carrying out model identification and check again, and selecting the model again until a reasonable fitting model is obtained.
Finally, a reasonably fit model is used to predict wind speed, irradiance, and power load data for a few future periods.
Examples
In order to verify the accuracy of an ARIMA prediction method in a prediction model, historical data of wind speed and irradiance in a certain area in eight days are adopted, the sampling time interval is 1h, the historical data of the previous seven days are used as input data of the ARIMA model, the data of the wind speed and irradiance in the eighth day are predicted through the ARIMA model, and are respectively compared with actual wind speed and irradiance data in the eighth day.
The prediction accuracy is estimated by using the Root Mean Square Error (RMSE), and as shown in formula (1), the smaller the RMSE value is, the higher the prediction accuracy is.
Where n is the number of prediction data, y
iAnd
respectively actual data and predicted data
To accurately assess the accuracy of the ARIMA model prediction, the error rate is calculated using equation (2):
where ER is the error rate of the predicted data, ymax、yminThe maximum and minimum values of the actual data, respectively.
Through simulation of an ARIMA model, a comparison graph of a predicted value and an actual value of wind speed is shown in FIG. 5, a comparison graph of a predicted value and an actual value of irradiance is shown in FIG. 6, and the comparison graph is calculated by an equation (1) and an equation (2), wherein the RMSE value of the wind speed prediction is 0.236m/s, and the corresponding error rate is 2.48%; RMSE value of irradiance was 77.18w/m2The corresponding error rate is 7.63%.
To verify the variation of the ARIMA model in predicting the error over a plurality of time periods in the future, so as to optimize the model prediction results over a plurality of time periods, the error rate of the microgrid-related prediction data is given below, as shown in table 1. As can be seen from the table, the average error rate will increase as the number of future time periods increases.
TABLE 1 error Rate of themicrogrid 1 at various predicted future time periods
(2) Calculating future power conditions
The future wind speed and irradiance are predicted through the ARIMA model, the power generation capacity is converted according to the simulation model, and the electric load and the power generation capacity of the microgrid in the nth time period are predicted through the ARIMA model.
If the renewable energy source generates more electricity than the total load demand in the nth period in the future, the ESS will be charged in the maximum state of charge, if there is remaining electricity, the remaining electricity can be sold, and the electricity sold by the microgrid in the nth period in the future is:
En=Egl,n-min(Egl,n,SOCmax-SOCn-1) (3)
in the formula, EnFor the electric quantity of the microgrid in the nth period of the future, Egl,nFor the difference between the power generation amount and the power load in the n-th period in the future, SOCn-1For future ESS charge states during the (n-1) th period,SOCmaxis the maximum state of charge of the ESS.
If the electric quantity generated by the renewable energy source in the nth period in the future is smaller than the total load demand, the ESS releases the electric quantity in the state of meeting the minimum electric quantity to meet the load demand, and if the ESS releases the electric quantity and does not meet the load demand, the insufficient electric quantity needs to be purchased, the electric quantity purchased by the microgrid in the nth period in the future is as follows:
En=Egl,n+min(|Egl,n|,SOCn-1-SOCmin) (4)
in the formula, SOCminIs the minimum state of charge of the ESS.
(3) Determining the role of the microgrid (supplier or demander)
After the electric quantity condition of the microgrid in the nth period in the future is estimated, whether the microgrid is a supplier or a demander can be judged according to the electric quantity condition. When E is1If the power is more than 0, the micro-grid is regarded as a supplier; when E is1If the number is less than 0, the micro-grid is regarded as a demand side; when E is1When the total electric quantity is 0, the judgment can be made according to the total electric quantity conditions of the 2 nd, 3 rd, 3. Because the error rate increases along with the increase of the number of future time intervals when the ARIMA model is adopted to predict the related data of the microgrid, the method calculates the confidence prediction values of the future N time intervals to measure the weight of the electric quantity condition of the future time intervals, and the calculation method of the confidence prediction values of the future time intervals is shown in the formula (5).
In the formula, WeinFor the future nth period confidence prediction, N is the number of future periods.
When the electric quantity condition of the microgrid in the 1 st period in the future is zero, the total electric quantity condition of the microgrid in the 2 nd, 3 rd,.
In the formula, EffThe total electric quantity condition of the future 2 nd, 3 rd, and N th time periods.
After calculating the total electric quantity of the microgrid in the future 2 nd, 3 rd, and N th periods, when E isffWhen the power supply is more than or equal to 0, the micro-grid is regarded as a supplier; when E isffIf the number is less than 0, the micro-grid is regarded as a demand side.
(4) Trading attitude ratio of microgrid
Whether the microgrid is a supplier or a demander, the desire to trade will depend on future power and weather conditions, which can be divided into various states. In the present invention, the charge condition is divided into a high state (which may be represented by Energy ═ 1 ") and a low state (which may be represented by Energy ═ 0"); the weather conditions are divided into sunny conditions and rainy conditions. When the Weather condition is a sunny state, the microgrid serving as the supplier has optimistic selling desire (which can be represented by Weather ═ 1), and the microgrid serving as the demand side has not very strong purchasing desire (which can be represented by Weather ═ 0); on the contrary, when the Weather condition is the rainy Weather condition, the selling desire of the microgrid as the supplier is not very strong (which can be represented by Weather ═ 0), and the microgrid as the demand side will have an optimistic purchasing desire (which can be represented by Weather ═ 1).
The method can be used for judging the electric quantity state of the microgrid in the nth period in the future by comparing the electric quantity condition of the microgrid in the nth period in the future with a set electric quantity threshold value. When the electric quantity condition of the microgrid in the nth period in the future is larger than the threshold value, the electric quantity state of the microgrid in the nth period in the future is considered to be a high state; and when the electric quantity condition of the microgrid in the nth period in the future is smaller than the threshold value, the electric quantity state of the microgrid in the nth period in the future is considered to be a low state.
According to the electric quantity state and the weather condition of the microgrid, the total number and the distribution attitude levels of the microgrid in the future N time periods can be calculated, and the calculation is respectively shown as a formula (7) and a formula (8).
Leveltotal=(NumEnergy×NumWeather) (7)
In the formula, NumEnergyAnd NumWeatherState number respectively representing electricity quantity condition and weather condition, LeveltotalFor the total number of attitude hierarchy levels, Level, in the future N time periodsfTo distribute attitude hierarchies, WeathernEnergy for the weather conditions of the future time period nnThe electric quantity condition of the future nth time period.
Thus, the trade Attitude ratio (attetude) of the microgrid is:
(5) calculating the bid price of the micro-grid
When the supplier is in a conservative trading attitude, the bidding selling price is set to be a fixed price which is slightly lower than the selling price of the power company; when the supplier is in an optimistic trading attitude, the ESS is fully charged at the moment, the redundant electric quantity can be wasted, so that the microgrid sells the redundant electric quantity in the optimistic trading attitude, and the bid selling price is gradually reduced along with the increase of the trading attitude proportion. When the buying demander is in a conservative trading attitude, the bidding buying price is set to be a fixed price which is slightly higher than the buying price of the power company; when the demand side is in an optimistic trading attitude, the ESS releases the electric quantity to the minimum value, the insufficient electric quantity needs to be purchased to meet the load demand, and the bidding and buying price is slightly lower than the selling price of the electric power company and rises along with the rising of the trading attitude proportion. Calculation formulas of the micro-grid bid selling price and the bid buying price are respectively shown as a formula (10) and a formula (11).
Wherein Price issell、PricebuyThe bid selling price and the bid buying price, UP, of the microgrid respectivelysell、UPbuyThe price is the selling price and the buying price of the power company respectively, and dp is the difference that the bidding selling price of the micro-grid is slightly lower than the selling price of the power company or the bidding buying price of the micro-grid is slightly higher than the buying price of the power company.
(6) Calculating the bid electric quantity of the micro-grid
According to the electric quantity situation of the micro-grid in the future 1 st period, the bidding electric quantity of the micro-grid is discussed in three situations:
a. the microgrid has a residual capacity in the 1 st period of the future, namely E1>0,
b. The microgrid has no remaining capacity in the 1 st period of time in the future, namely E1=0,
Capsell=min(SOC1-SOCmin,Eff×Attitude)if EffNot less than 0 and SOC1>SOCmin (13)
Cap=0if EffNot less than 0 and SOC1≤SOCmin (14)
Capbuy=min(SOCmax-SOC1,|Eff|×Attitude)if Eff<0 (15)
c. The microgrid is low in power in the 1 st period in the future, namely E1<0,
In the formula, CapsellRepresenting the amount of bid power, Cap, sold when the microgrid is a sellerbuyIndicating when the microgrid is a buyerAmount of bid to be purchased, E1For the electric quantity of the microgrid in the 1 st period of time in the future, EffFor the total electric quantity, SOC, of the micro-grid in N-1 future time periods except the 1 st future time period1For the state of charge, SOC, of the ESS in the microgrid during the future 1 st periodmaxIs the maximum state of charge, SOC, of the ESS in the microgridminIs the minimum state of charge of the ESS in the microgrid.
2. Optimizer design
After the bidding electricity price and the bidding electric quantity of each micro-grid are predicted through the prediction model, the optimal transaction pair of the micro-grid is found by adopting a particle swarm optimization algorithm, and the optimization process is shown in fig. 4. For each microgrid, the aim is to save energy costs and obtain additional economic benefits, therefore price is the main consideration in the early stages of optimization; when the optimization time is urgent, the micro-grid hopes to quickly find a trading partner meeting the power consumption requirement of the micro-grid, and therefore the electric quantity becomes a main consideration factor in the later period of optimization. In the invention, each microgrid is regarded as a particle, the optimization period of each particle is determined by using the relationship among the transaction attitude proportion, the optimization time and the remaining optimization time, the optimization period is divided into an early stage and a late stage, and the relational expression is shown as a formula (17).
Wherein MG is micro-grid, Attitude is trade Attitude ratio of micro-grid, ToptOptimization time for particle swarm optimization algorithm, Trest_opAnd t is the residual optimization time of the particle swarm optimization algorithm.
If the transaction attitude proportion is smaller than the ratio of the remaining optimization time to the total optimization time, the micro-grid is regarded as an early particle, and the particle target focuses on the bid price; if the transaction attitude ratio is greater than or equal to the ratio of the remaining optimization time to the total optimization time, the microgrid is considered to be a late-stage particle, and the particle target focuses on the bid amount.
According to different optimization periods of each particle, four different populations of particles are in the optimizer, namely early supplier particles, late supplier particles, early demand particles and late demand particles. When the particles are early-stage demand side particles, the supplier particles with the lowest selling price are aimed to be pursued, and when the particles are late-stage demand side particles, the supplier particles with the largest selling amount are aimed to be pursued; when the particles are early supplier particles, the objective is to buy the highest-priced consumer particles, and when the particles are late supplier particles, the objective is to buy the largest amount of consumer particles.
The cost function of the particles is determined according to different groups of particles, and the individual optimal position P at the k-th iteration is found according to the cost functions in different time periodsiAnd a global optimum position G. Cost functions of the demand side and the supply side are expressed by equations (18) and (19), respectively.
In the formula, MG
iDenoted as the ith particle, k denotes the number of iterations in the particle swarm algorithm,
denotes the ith particle MG
iIndividual best position at kth iteration, F
buy(i) Denotes the ith particle MG
iAs a function of the cost of the demander, F
sell(i) Denotes the ith particle MG
iAs a cost function of the supplier, Early
demandIndicating an early demand square particle, Later
demandIndicating late-requiring particle, Early
sup plyIndicating early donor particle, Later
sup plyIndicating late donor particles.
When the transaction iteration has not ended, the velocity and position of the particle are updated according to equations (20) and (21).
In the formula, r1,r2Random numbers uniformly distributed in the interval of (0, 1); c. C1,c2Referred to as learning factors.
When the transaction iteration ends, the paired solutions may generate collisions where more than two particles within a population of particles seek one particle within the target population simultaneously or a particle acting as a particle and a target seeks a different population of particles simultaneously. In the invention, in order to solve the conflict generated by particle pairing in the optimization process, firstly, the particles which are found to be paired are found out, and the particles with the highest transaction attitude proportion are selected to be paired; then if the number of the paired particles exceeds two, selecting the particle with the maximum non-transaction weight to pair; and finally, if the number of the paired particles still exceeds two, distributing the electric quantity according to the electric quantity demand proportion of the particles by adopting a fair distribution strategy.
When a fair distribution method is adopted, paired particles are divided into a supply group and a demand group, and when the total selling electric quantity is greater than or equal to the total purchasing electric quantity, the electric quantity sold to the demand group by each particle in the supply group in a fair distribution mode is as follows:
when the total selling electric quantity is smaller than the total purchasing electric quantity, the particles in the demand group purchase the electric quantity from the supply group in a fair distribution mode as follows:
in the formula, SUG
sumFor supply groupsThe total electricity quantity sold is the electricity quantity sold,
indicating the selling electricity quantity, DEG, of the ith particle
sumFor the total amount of power purchased for the demand set,
indicating the shortage of the j-th particle.
By adopting the three solutions to the conflict-generating trading pair, each particle can obtain the optimal trading electric quantity, so that the energy of the smart grid is optimally scheduled.
Examples
The section participates in electric power transaction through 30 micro-grids, the 30 micro-grids forecast bid electricity price, bid electricity quantity and transaction attitude proportion of a plurality of forecast future time periods (including 1 time period in the future, 2 time periods in the future, 3 time periods in the future, 4 time periods in the future and 5 time periods in the future) are used as the input of a market (optimizer), and the 30 micro-grids are enabled to find the most appropriate electric power trader by adopting a PSO method, so that the total cost reaches the optimal value. And finally, applying the obtained optimal trading method to energy scheduling in the next time period.
The total cost for a smart grid containing 30 micro-grids is shown in fig. 7. In conventional approaches, the ESS is used as a UPS, only for emergency situations, so the power transaction only addresses the power demand response problem for the current time period; while in open-loop predictive future dispatch (24h), ESS also acts as UPS, the main difference from the traditional approach is that power trading solves the problem of predicting the 24h future power demand response. As can be seen from fig. 7, the total cost of the 30 micro-grids predicted in different periods in the future by adopting the MPO method is better than that of the traditional method and that of the open-loop predicted future scheduling (24 h); the total cost of the method adopting the open-loop prediction future scheduling (24h) in one day is 103335.3 yuan more than that of the traditional method in one day, and accounts for 50.7% of the total cost of the traditional method; and the total cost of the MPO method for predicting thefuture 3 time intervals in one day is less than that of the traditional method, which costs 77783.8 yuan and accounts for 38.17 percent of the total cost of the traditional method.