5.2 Proposed Model
5.2.1 Real-time Storage Controller
A new RTOS model for storage is formulated as an MILP problem. Its chief aim is to optimally coordinate the storage, grid, and load to minimize the electricity cost for the consumer. It also seeks to reduce storage OPEX and to adapt the storage SOC to create a reserve margin that partially feeds the load in case of grid power outages. All the objectives are integrated into a single objective function as formulated in the following:
Minimize :
PtS,Chg, PtS,Dhg, PtSlk,LCr, SOCtSlk,Res
Cost Function = X
t∈Ni
(PtF L+PtS,Chg −PtS,Dhg). EtF M rk
+CS,ChgO. PtS,Chg+CS,DhgO. PtS,Dhg+ρP nl,LCr. PtSlk,LCr+ρP nl,Res. SOCtSlk,Res !
.∆T.(5.1)
This includes the following three terms: (i) Electricity cost: (PtF L +PtS,Chg −P
S,Dhg
t ). EtF M rk.∆T
(ii) Total OPEX: (CS,ChgO. PS,Chg
t +CS,DhgO. P
S,Dhg
t ).∆T
(iii) Penalty terms: (ρP nl,LCr. PtSlk,LCr+ρP nl,Res. SOC Slk,Res
5.2. Proposed Model 81
subject to the following physical constraints of storage:
bS,Chgt . P S,Chg min ≤P S,Chg t ≤b S,Chg t . PmaxS,Chg ∀t∈ Ni (5.2) bS,Dhgt . PminS,Dhg ≤PtS,Dhg ≤bS,Dhgt . PmaxS,Dhg ∀t∈ Ni (5.3) SOCtS−SOCtS−1+PtS,Dhg/ηS,Dhg−ηS,Chg. PtS,Chg +ηS,Dsp. SOCtS.∆T = 0
∀t∈ Ni, (5.4)
subject to the following reserve-provision constraints:
SOCS,Res+SOCminS −SOCtSlk,Res ≤SOCtS ≤SOCmaxS ∀t∈ Ni (5.5)
0≤SOCtSlk,Res ≤SOCS,Res ∀t∈ Ni, (5.6)
subject to the following constraint to ensure no power is injected into the grid:
PtS,Dhg ≤PtF L ∀t∈ Ni, (5.7)
and subject to the following constraints to fulfill the load demand in case of grid power outages:
PtS,Dhg =PtF L−PtSlk,LCr ∀t∈ Ni∧StGrd= 0 (5.8)
0≤PtSlk,LCr ∀t∈ Ni, (5.9)
whereNiis the set of time steps, rolling over theT–hour time notation, defined as follows:
Ni ={i, . . . , i+N −1}, (5.10)
whereirefers to the present time step, defined in aT–hour time notation divided by the
time interval ∆T. For instance, at 5:00 am and for ∆T = 1, i= 5/1 = 5. In (5.1)–(5.10),
except EF M rk
t , other parameters are non-negative (refer to the nomenclature for defini-
tions of parameters).
The objective function, stated in (5.1), includes the cost of purchasing electricity from the market for the total load-storage system and storage OPEX for charging and discharging within the optimization horizon. It also includes penalty terms which will be explained in the following sections. In (5.1),EF M rk
t is the electricity price forecast at
the time step t while it is equal to the actual price at the present moment, i.e., t= 1. In
addition, in (5.1), PtF L represents the load power forecast in the next T hours. The load
Equations (5.2) and (5.3) express storage charging and discharging power constraints, respectively. The storage energy balance is stated by (5.4), defining the relation of SOC at the two consecutive time steps t and t−∆T.
Equation (5.5) expresses the SOC constraint. By adding SOCS,Res to (5.5), the
lower bound of SOC is considered higher than the physically limited SOC (i.e., SOCS min)
to create reserved energy in the storage reservoir. The reserved energy SOCS,Res can
support the load in case of grid power outages. The slack variableSOCtSlk,Res is included
in the constraint (5.5) to optimally decide when and how much reserved energy should be released. This is performed by adapting the lower bound of SOC using the slack variable. As stated by (5.1), this slack variable is penalized to preferably prevent non-zero values. Any non-zero value for the slack variable tends to increase the value of the objective function. The optimization problem always tends to minimize the objective function. Thus, the slack variable is set to zero by the optimization problem solver unless a non- zero value is required to feed the load in case of grid power outages. The zero value for the slack variable is preferred to ensure that the reserved energy is used only in contingencies not in the presence of the grid. Equation (5.6) ensures that the physically limited SOC constraint is not violated by the slack variable. Equation (5.7) ensures that no power is injected to the grid since the load-storage system is considered as an electricity consumer at all times in this study.
As shown in Fig. 5.1, the load power is provided by the grid and storage discharging. If the grid power is interrupted (i.e., SGrd
t = 0), the only source of power for the load
is storage. This is realized by the constraint (5.8), through which the load requirement is fulfilled as part of the optimization problem. Using the slack variable PtSlk,LCr, the
requested power by the load can be curtailed if storage cannot completely fulfill the load requirement. PtSlk,LCr is penalized in (5.1) to preferably prevent non-zero values that
would minimize the load curtailment.
In order for the proper operation of the optimization problem, the following constraint should be met:
ρP nl,LCr. PtSlk,LCr > ρP nl,Res. SOCtSlk,Res ∀PtSlk,LCr >0 ∧ ∀SOC
Slk,Res
t >0 ∧ ∀t ∈ Ni. (5.11)
The constraint (5.11) imposes a larger penalty for load curtailment than usage of reserved energy. This forces the storage controller to use the reserved energy to meet the load requirement. No load curtailment is performed unless the entire reserved energy is used or if the load requirement is higher than the maximum discharging power of storage.
5.2. Proposed Model 83
Equation (5.11) can be met by (5.12), as follows:
ρP nl,LCr ρP nl,Res. (5.12)
Finally, as shown in Fig. 5.1, the charging/discharging power set-point in the present time step i is commanded to the storage unit by the storage controller.