project: oakland ecoblock microgrid
TRANSCRIPT
ENE 2XX: Renewable Energy Systems and ControlTsinghua-Berkeley Shenzhen Institute
Summer 2017Professor Scott Moura
Project: Oakland EcoBlock Microgrid
Due: Friday July 14, 2017 at 17:00 CST
This project provides hands-on practice for optimization and data analysis with application to microgrids.
ObjectiveConsider a microgrid that consists of load, photovoltaic generation, battery energy storage system, and agrid interconnection. Your objectives are to (i) find the optimal size for the PV generator and battery; and(ii) determine the optimal power flow between all the components.
BackgroundMicrogrids are growing in popularity around the world. The integration of renewables and decreasing costof PV and batteries has fueled this growth. In this project, we consider a microgrid that is currently underplanning near UC Berkeley: the Oakland EcoBlock.
Figure 1: Artist drawing of Oakland EcoBlock. Rooftop PV is shaded yellow. The building shaded in graycontains the battery energy storage.
The Oakland EcoBlock is comprised of 28 buildings and approximately 110 inhabitants. Within the next
Page 1 of 4
ENE 2XX: Renewable Energy Systems and ControlTsinghua-Berkeley Shenzhen Institute
Summer 2017Professor Scott Moura
several years, we plan to install rooftop solar photovoltaics and a battery energy storage system. However,it is unclear how much solar and storage is optimal, especially when considering uncertainty in load andgeneration. Unfortunately, there are not many tools for microgrid planning and control. In this project, youwill design such a tool.
1 Problem Formulation
We consider a single facility (i.e. the Oakland Ecoblock) with rooftop solar, energy storage, and gridconnection. The combined optimal sizing and energy management problem can be formulated as:
minimize cb · b+ cs · s+
N∑k=0
cG(k) ·G(k) (1)
subject to: s · S(k) +Bd(k)−Bc(k) +G(k) = L(k) Power balance (2)
E(k + 1) = E(k) +
[ηcBc(k)− 1
ηdBd(k)
]∆t battery dynamics (3)
0 ≤ E(k) ≤ b · Emax battery energy limits (4)0 ≤ Bc(k) ≤ b ·Bmax, 0 ≤ Bd(k) ≤ b ·Bmax battery power limits (5)−Gmax ≤ G(k) ≤ Gmax grid power limits (6)smin ≤ s ≤ smax, bmin ≤ b ≤ bmax solar, battery scale limits (7)
The notation is defined in Table 1. Optimization variables are color-coded in blue. Notice that (1)-(7) is alinear program (LP) with respect to the optimization variables. For clarity, we highlight that S(k), L(k) areNOT optimization variables, as the environment imposes these inputs on our system.
1.1 Program Reduction
First, we eliminate G(k) by solving (2) for G(k) = L(k)− s · S(k)−Bd(k) +Bc(k) and substituting into (1)and (6), yielding the simplified program:
minimize cb · b+ cs · s+
N∑k=0
cG(k) · [L(k)− s · S(k)−Bd(k) +Bc(k)] (8)
subject to: E(k + 1) = E(k) +
[ηcBc(k)− 1
ηdBd(k)
]∆t (9)
0 ≤ E(k) ≤ b · Emax (10)0 ≤ Bc(k) ≤ b ·Bmax, 0 ≤ Bd(k) ≤ b ·Bmax (11)−Gmax ≤ L(k)− s · S(k)−Bd(k) +Bc(k) ≤ Gmax (12)smin ≤ s ≤ smax, bmin ≤ b ≤ bmax (13)
Page 2 of 4
ENE 2XX: Renewable Energy Systems and ControlTsinghua-Berkeley Shenzhen Institute
Summer 2017Professor Scott Moura
Table 1: Notation and Parameter Values
Variable Value Units Descriptions, b optimize [-] Scale factors for solar size, battery sizeS(k) data provided [kW] Power generated from solarBd(k), Bc(k) optimize [kW] Power discharged from / charged into batteryG(k) optimize [kW] Power imported from gridL(k) data provided [kW] Power load of buildingE(k) optimize [kWh] Energy level of batterycb data provided [USD/kWh/day] Marginal levelized cost of scaling battery sizecs data provided [USD/kW/day] Marginal levelized cost of scaling solar sizecG(k) data provided [USD/kW] Time-of-use cost of grid-imported power∆t 1 [hr] Time stepηc, ηd 0.9 [-] Battery charge, discharge efficiency ∈ [0, 1]
Emax 400 [kWh] Nominal battery energy capacityBmax 100 [kW] Nominal battery power capacityGmax 400 [kW] Maximum grid power (import & export)smin, smax [0,1200] [-] Solar scale limitsbmin, bmax [0,5] [-] Battery scale limits
where the optimization variables are now b, s, E(k), Bd(k), Bc(k). We still have a LP. In (8) and (12), the redvariables denote random quantities, namely load L(k) and solar power S(k). We suppose random variablesL(k), S(k) are independent Gaussian random variables:
L(k) ∼ N(L(k), σ2
L(k))
(14)
S(k) ∼ N(S(k), σ2
S(k))
(15)
You must compute the mean and variance from the provided data, discussed next. Then, reformulateyour stochastic LP into a second order cone program (SOCP) using the method of chance constraints oninequalities (12). You will also need to use the expectation operator in the objective function (8).
2 Data
Download General_Data_for_EcoBlock.zip from the course website, and unzip. Open and read ReadMe.docx.The ZIP file contains three types of data:
• Nominal solar PV generation (in kW)
Page 3 of 4
ENE 2XX: Renewable Energy Systems and ControlTsinghua-Berkeley Shenzhen Institute
Summer 2017Professor Scott Moura
• Total EcoBlock electricity load (in kW)
• Electricity cost (in USD/kW)
From this data, you are required to compute means, variances for the chance constraints. In addition, youare free to conduct any other data analysis you wish.
3 Customize Your Project!
At minimum, you are required to report:
• the optimal PV and battery sizes (in kW)
• a 24-hr simulation for the optimal PV, battery, grid, and load powers
Beyond this, you are encouraged to customize your project. How would you extend this work? Someextensions include, but are not limit to:
• Demand charges, i.e. costs associated with the maximum grid power cD ·maxkG(k).
• Risk-based optimization, i.e. minimizing a weighted sum of expected operating costs and variance ofoperating costs.
• Transformer sizing, i.e. add transformer cost to the objective function and scale the grid power limits
• EV charging, i.e. a load C(k) which is flexible subject to delivering sufficient energy by a certaindeadline
• EV charging station type, i.e. optimize the type of charging station: L1, L2, or DC fast charge
• Vehicle-to-building (V2B) or vehicle-to-grid (V2G), i.e. consider bi-directional EV charging stations
• Islanded operation, i.e. optimize PV and storage size while ensuring at least 72 hours of islandedoperation (G(k) = 0)
Please ask questions that YOU finding interesting, and then try to solve them!
Deliverables
Submit the following by e-mail. Be sure that the function files are named exactly as specified (includingspelling and case). Please do NOT zip files.
LASTNAME_FIRSTNAME_PROJECT.PDFLASTNAME_FIRSTNAME_PROJECT.xyz which contains your respective Matlab or Python files, i.e. xyz ∈{m, ipynb}.
Page 4 of 4