Optimal Scheduling Of Storage For Grid-Connected PV Robert Davy2 and Jing Huang1, CSIRO, Canberra
OCEANS AND ATMOSPHERE 1 / SCIENTIFIC COMPUTING 2
The use of linear programming to optimise storage in renewable energy systems is well known. We use the Minizinc language to formulate and solve this problem. Minizinc allows optimisation problems to be expressed in a high level way that is independent of the backend solver. Minizinc (www.minizinc.org) is a free and open-source tool developed at Monash University in conjunction with CSIRO (Data61) and Melbourne University.
Framing the Problem
Simulations
Constraints: • Limit inverter power for battery system. • Allow for resistive losses in battery system. • Enforce battery state-of-charge limits. • Ensure sum of net power at the meter is zero.
The Minizinc solver was called using a small web application written in Python/Django. This allows the system parameter space to be explored easily. Here we consider: • Solar PV scaled up to 3kW with 10kWh battery, • afternoon peak price, small feed-in tariff.
Minimize cost to consumer: • Minimize total cost assuming time of day pricing and feed-in tariff. • Place small penalty on excess battery usage.
Five days during summer: Load and solar PV (normalised)
Assumptions: • Consumer load is known into the future. • Time of day pricing is known and fixed. Data: • Day ahead solar forecasts provided by CSIRO CCAM model. • Load and actual solar PV based on average of many households. * Implementation: • Optimisation uses up to one month of data and forecast. • For each day, run optimisation 48h ahead, keeping only the first 24h.
Case 1: perfect solar forecast – costs zero or negative at all times (earning income) Optimised energy cost
Battery state of charge
Example Minizinc code The problem is expressed easily within Minizinc and solved using a mixed integer programming solver. The majority of the code is shown below. % Input time series – array[1..T] of float: array[1..T] of float: array[1..T] of float:
load, PV forecast and energy price Pload; Ppv; Epr;
% x is the net load to be solved. % t1 and t2 are its positive and negative excursions array[1..T] of var 0..peakNet: t1; array[1..T] of var 0..peakNet: t2; array[1..T] of var -peakNet..peakNet: x; constraint forall(i in 1..T)(x[i] = t1[i]-t2[i]); % Pb is the battery power % s1 and s2 are its positive and negative excursions array[1..T] of var 0..Pmax: s1; array[1..T] of var 0..Pmin: s2; array[1..T] of var -Pmin..Pmax: Pb; constraint forall(i in 1..T)(Pb[i] = s1[i]-s2[i]);
Case 2: forecasting errors result in sometimes paying for energy Optimised energy cost
Solar PV – measured and forecast
% Kirchoff's current law at the meter constraint forall(i in 1..T)(x[i] = Pload[i] - Ppv[i] - Pb[i]); % State of charge constraints incorporating resistive loss (alpha) array[1..T+1] of var 0.0..Emax: SOC; constraint SOC[1] = E0; constraint forall(i in 2..T+1)( SOC[i] = E0 + delt*sum(j in 1..i-1)((1alpha)*s2[j]-(1+alpha)*s1[j])); % Consumer’s energy cost as function of time % FIT = feed-in tariff % gamma = small penalty on excessive battery use % delt = time step in hours constraint forall(i in 1..T)(cost[i] = delt*(Epr[i]-FIT)*(t1[i] + t2[i])/2.0 + delt*(Epr[i]+FIT)*(t1[i]-t2[i])/2.0 + gamma*(s1[i]+s2[i])); % Minimise sum of costs solve minimize (sum(k in 1..T)(cost[k]));
FOR FURTHER INFORMATION
Robert Davy e
[email protected] w confluence.csiro.au/display/SC
In this case study we have shown that solar forecast accuracy is important for the optimisation of battery scheduling.
*Resources Solar PV measurements and load data based on a number of dwellings in the Adelaide area. Source: CSIRO Land & Water, Built Environment & Energy. (Load data was further smoothed). Minizinc script with sample input and instructions is available for download at the DOI address listed below.
REFERENCES
ACKNOWLEDGEMENTS
Nottrott, A., Kleissl, J., & Washom, B. (2013). Energy dispatch schedule optimization and cost benefit analysis for gridconnected, photovoltaic-battery storage systems. Renewable Energy, 55, 230-240. Davy, Robert; Huang, Jing (2016): Minizinc script to optimise battery energy storage with solar PV. v1. CSIRO. Software Collection. http://doi.org/10.4225/08/5828ef6dc276a
The authors would like to thank: - Ms Melissa James (CSIRO) for supply of the household measurements. - Dr Guido Tack (Monash University) for general advice regarding Minizinc.