πH−
2=avg πe(t)B
td−avg πe(t)B
tmw (3.24)
whereavg πe(t)B
td is the average ofπe(t)B on that day andavg πe(t)B
tmwis the expected average ofπe(t)B for the next day. Hence, the penalty/bonus factors are defined as the difference between today’s and tomorrow’s price of the electricity consumed by the electrolyser. Combined with these factors, Equation3.22acts upon the optimization process, ensuring the tank is either above the set point, if the price of the electricity will rise the next day, or below the set point, if the price of electricity will drop in the next day. This mechanism allows theH2PP operator to look ahead for the best opportunities to produce and sellH2, increasing its profit.
Daily revenue: the daily revenue, which ignores the influence of the penalties caused by the last period constraints can be determined by:
T t=1
∑
−PELEC(t)·πe(t)B +PFC(t)·πe(t)S +mCHPH
2(t)·πCHPH
2(t)+mFLH
2(t)·πHFL
2(t)+mT RSPH
2(t)·πHT RSP
2(t)
−PCPFL(t)·πe(t)B −PCPT RSP(t)·πe(t)B
(3.25)
At last, in the third step, the results of the optimization problem are computed, which include the cost of operating the grid over a single day, the energy traded with the SU, the energy acquired from each CHP, the energy bought and sold by each BESS, the energy bought and sold by the H2PP, and the produced and soldH2.
Figure 3.3: Overview of the VPP cost minimization algorithm.
3.3.2 Mathematical formulation
The objective function, presented in Equation3.26, is formulated with the aim of minimizing operating costs. It considers the cost of buying electricity from the SU, CHP, wind and solar PV power plants and from multiple BESS. It also considers the cost of buying electricity to supply theH2PP and the earnings from sellingH2to different customers.
min. f=
T t=1
∑
"N
DG
g=1
∑
PDG(g,t)πDG(g,t)+PDG(g,t)Cut πDG(g,t)Cut
−PGrid(t)exportπGrid(t)export +
Nload
∑
l=1
PL(l,t)ShedπL(l,t)Shed
+
NStorage st=1
∑
PDch(st,t)πDch(st,t)−PCh(st,t)πCh(st,t)
−PFC(t)πe(t)S +PELEC(t)πe(t)B
−mCHPH
2(t)πCHPH
2(t)−mFLH
2(t)πHFL
2(t)−mT RSPH
2(t)πHT RSP
2(t) +PCPFL(t)πe(t)B +PCPT RSP(t)πe(t)B
#
(3.26)
where, for each intervalt∈T,PDG(g,t)is the electricity produced by each resource (excluding the FC),πDG(g,t)is the bid price of each resource,PDG(g,t)Cut is the electricity curtailed in each DG unit,πDG(g,t)Cut is the value paid to each DG unit to compensate for the curtailed electricity,PGrid(t)export is the electricity exported to the SU,πGrid(t)export is the price at which that electricity is exported,PL(l,t)Shed is the shedded load,πL(l,tShed)is the value paid to each load to compensate it for being shedded,PDch(st,t) is the electricity supplied by each BESS, πDch(st,t)is the storage discharge price of each BESS, PCh(st,t)is the electricity acquired by each BESS,πCh(st,t)is the storage charge price of each BESS, PFC(t) is the electricity supplied by the fuel cell,πe(t)S is the bid price at which the fuel cell sells electricity,PELEC(t) is the electricity consumed by the electrolyser,πe(t)B is the bid price at which the H2PP buys electricity to power the electrolyser and compressors, mCHPH
2(t) is the mass ofH2 consumed by the CHP andπHCHP
2 is the price it pays per unit ofH2,mFLH
2(t)is the mass ofH2sold to the forklift fleet andπHFL2 is the price the fleet pays per unit of H2, mT RSPH
2(t) is the mass of H2 loaded into the tube trailer in each period andπHT RSP2 is the price the trailer operator pays per unit ofH2,PCPFL(t)is the electricity consumed by the forklift fleet compressor,PT RSPFL (t)is the electricity consumed by the trailer compressor.
The objective function is subjected to a set of constraints related not only to the equipment of theH2PP but also to the SU, DG units, BESS, load, power flow and bus voltage.
Generation constraints:all the production units obey a set of constraints:
PDG(g,t)≤PDG(g,t)Max , ∀t;∀g∈{SU connection and thermal production} (3.27)
PDG(g,t)=PDG(g,tMax ), ∀t;∀g∈{Wind and PV production} (3.28)
PDG(g,t)Cut ≤PDG(g,t), ∀t;∀g (3.29)
QDG(g,t)≤
PDG(g,t)−PDG(g,t)Cut
tanϕ(g,t), ∀t;∀g (3.30)
QDG(g,t)≥0, ∀t;∀g (3.31)
wherePDG(g,tMax )is the maximum power that each resource can supply andQDG(g,t)is the reactive power supplied by each DG unit. Equations 3.27and3.28limit the maximum power that each
resource supplies to the grid. Equation3.29restricts the maximum power to be curtailed in each resource. Equations3.30and3.31dictate the reactive power produced by each resource.
Export constraints: the energy to be exported to the SU is limited by the interconnection between the two areas:
PGrid(t)Export ≤PGrid(t)Max , ∀t (3.32) wherePGrid(t)Max is the maximum power that can be transferred between the transferred SU and the VPP. Equation 3.32limits this power transfer according to the maximum capacity of the lines/substation connecting the two parts.
Load constraints:the load inside the distribution is subjected to two constraints:
PL(l,t)Shed ≤PL(l,t), ∀t;∀l (3.33)
QL(l,t)=
PL(l,t)−PL(l,t)Shed
tanϕ(l,t), ∀t;∀l (3.34)
wherePL(l,t)is the active power of each load for each hour and QL(l,t) is the corresponding reactive power. Equation 3.33 limits load shedding and Equation 3.34 sets the reactive power consumed by each load.
Storage constraints:the operation of the available BESS is dictated by:
PCh(st,t)≤PCh(st,t)Max Y(st,t), ∀t;∀st (3.35)
PDch(st,t)≤PDch(st,t)Max X(st,t), ∀t;∀st (3.36)
Y(st,t)binary, ∀t;∀st (3.37)
X(st,t)binary, ∀t;∀st (3.38)
Y(st,t)+X(st,t)≤1, ∀t;∀st (3.39)
SOC(st)Min≤SOC(st,t)≤SOCMax(st), ∀t;∀st (3.40)
SOC(st,t)=SOC(st,t−1)+ηCh(st)PCh(st,t)− 1
ηDch(st)PDch(st,t), ∀t;∀st (3.41) wherePCh(st,t)Max is the maximum charging rate of each BESS,Y(st,t)is a binary variable which indicates if they are charging or not (not charging:Y(st,t)=0 and charging:Y(st,t)=1),PDch(st,t)Max is the maximum discharging rate of each BESS, X(st,t) is a binary variable which indicates if they are
discharging or not (not discharging:X(st,t)=0 and discharging: X(st,t)=1). SOC(st)Minis the minimum admissible SOC of each BESS,SOC(st,t)is their current SOC andSOCMax(st) is the maximum admis-sible SOC andηCh(st)andηDch(st)are the charging and discharging efficiencies. Equations3.35 and3.36limit the charging and discharging process to the maximum admissible rates, Equations 3.37and3.38setY(st,t)andX(st,t)as binary variables, Equation3.39assures both variables are not set to 1 simultaneously (i.e., the BESS can not charge and discharge at the same time). Equation 3.40limits the SOC of each BESS and Equation3.41calculates the SOC for all BESS at the end of hour t, according to their SOC at the end of the previous hour and according to the energy charged/discharged during the hour t.
Hydrogen Power Plant constraints: the restrictions associated with the operation of all the components of theH2PP are mostly similar to the ones already presented in Subsection 3.2.2.
However, for the sake of completeness and since there are some minor differences, these con-straints are presented next.
Electrolyser constrains:
mELECH
2(t) = PELEC(t)·ηELEC
HHVH2
(3.42)
PELEC(t)≥PELECmin ·BELEC(t) (3.43)
PELEC(t)≤PELECMax ·BELEC(t) (3.44) Fuel cell constraints:
mFCH
2(t)= PFC(t)
ηFC·HHVH2 (3.45)
PFC(t)≥PFCmin·BFC(t) (3.46)
PFC(t)≤PFCMax·BFC(t) (3.47)
BELEC(t)+BFC(t)≤1 (3.48)
CHP constraints:
0≤mCHPH
2(t)≤mCHPH
2req(t) (3.49)
Forklift fleet constraints
0≤mFLH
2(t)≤mFLH
2req(t) (3.50)
Forklift fleet compressor constraints:
PCPFL(t)=PCPFL·mFLH
2(t) (3.51)
0≤mFLH
2(t)≤mFL CP maxH2 (3.52)
Transportation tube trailer constraints:
T
∑
t=1
mT RSPH
2(t)·BT RSP(t) =mT TH2 ·BT T (3.53)
T
∑
t=1
BT RSP(t) ≤TChT T (3.54)
G t=1
∑
1−BT RSP(t)
=0, G=Min n
T,[TChT T−Ch(0)]BT RSP(0) o
(3.55)
k+TChT T−1 n=t
∑
BT RSP(n) ≥TChT T
BT RSP(t) −BT RSP(t−1)
, ∀t=G+1· · ·T−TChT T+1 (3.56)
T n=t
∑
BT RSP(n) −
BT RSP(t) −BT RSP(t−1)
≥0, ∀t=T−TChT T+2· · ·T (3.57) Transportation tube trailer compressor constraints:
PCPT RSP(t)=PCPT RSP·mT RSPH
2(t) (3.58)
0≤mT RSPH
2(t) ≤mT RSP CP max
H2 (3.59)
Storage tank constraints: theH2storage tank is still modelled by the following constraints:
mTankH
2(t)=mTankH
2(t−1)+mELECH
2(t) −mFCH
2(t)−mCHPH
2(t)−mFLH
2(t)−mT RSPH
2(t) (3.60)
mTank minH2 ≤mTank(t) ≤mTank maxH2 (3.61) However, in this model, as it stands, theH2storage tank would most likely be at its minimum capacity at the last hour of each day, because there is no incentive to store any extra H2. In an attempt to mitigate this issue, a new restriction is added.
mTankH
2(24)≥mTankH
2SP (3.62)
wheremTankH
2(24)is theH2mass inside the tank in the last hour of the day andmTankH
2SPis a prede-finedH2 mass set point. Equation3.62assures that theH2PP spares a specified amount ofH2to be used the next day.
Power flow constraints:the next constraints are used to calculate the power flow in the grid:
Vi(t)2 Gii+Vi(t)
∑
j∈y
h Vj(t)
Gi jcos
θi(t)−θj(t)
−Bjisin
θi(t)−θj(t) i
=
NDGi
∑
g=1
PDG(g,t)i −PDG(g,t)Cut,i
+PGrid(g,t)Import −PGrid(g,t)Export +
Nstoragei
∑
st=1
PDch(st,t)i −PCh(g,t)i
−
Nloadi
∑
st=1
PLoad(l,ti )
+PFC(t)−PELEC(t), ∀t;∀i
(3.63)
−Vi(t)2 Bii+Vi(t)
∑
j∈y
h Vj(t)
Gi jcos
θi(t)−θj(t)
−Bjisin
θi(t)−θj(t) i
=
NDGi
∑
g=1
QiDG(g,t)
+QImportGrid(t)−QExportGrid(t)−
Nloadi
∑
i=1
QiLoad(l,t)
, ∀t;∀i
(3.64)
whereVi(t)andVj(t)are the voltage in buses i and j,Giiis the real part of the element ii in the admittance matrix,Biiis the imaginary part of the element ii in the admittance matrix andθi(t)and θj(t)are the voltage angles in buses i and j, respectively. Equation3.63calculates the active power balance in bus i for the hour t and Equation3.64calculates the reactive power balance in bus i for the hour t.
Voltage constraints:voltage magnitude and angle obey the following restrictions:
Vi(t)min≤Vi(t)≤Vi(t)Max, ∀t;∀i (3.65)
θi(t)min≤θi(t)≤θi(t)Max, ∀t;∀i (3.66) whereVi(tmin) andVi(t)Maxare the minimum and maximum admissible voltages andθi(t)minandθi(t)Max are the minimum and maximum admissible voltages angles. Equation 3.65 limits the voltage magnitude in each bus and Equation3.66sets the limits for voltage angles.
Daily operating cost: the daily operating cost is provided by:
T t=1
∑
"
NDG g=1
∑
PDG(g,t)πDG(g,t)+PDG(g,tCut )πDG(g,t)Cut
−PGrid(t)exportπGrid(texport)+
Nload
∑
l=1
PL(l,t)ShedπL(l,t)Shed
+
NStorage st=1
∑
PDch(st,t)πDch(st,t)−PCh(st,t)πCh(st,t)
−PFC(t)·0+PELEC(t)πe(t)B
−mCHPH
2(t)πHCHP
2(t)−mFLH
2(t)πHFL
2(t)−mT RSPH
2(t)πHT RSP
2(t) +PCPFL(t)πe(tB )+PCPT RSP(t)πe(tB )
#
(3.67)
The difference between Equation 3.26(objective function) and Equation3.67is that, in the former, the bid price of the fuel cell is set to have a certain value greater than zero. Meanwhile,
in the latter, the bid price of the fuel cell is set to zero. The explanation behind this reasoning is quite simple. First, if the bid price of the fuel cell was set to zero in the objective function, all the produced H2 would be sold to external customers, and none of it would be used in the fuel cell to generate electricity. This would happen because, using theH2 to power the fuel cell and generate electricity would most likely result in a lower economic benefit than selling theH2to the customers, who would actually pay for it. As a consequence, the bid price of the fuel cell can not be set to zero in Equation3.26to ensure that the operation of this resource is not disfavoured when compared to the supply ofH2 to the customers. However, when the daily operating cost is to be calculated, in Equation3.67, the bid price of the fuel cell has to be set to zero, because this device does not provide direct revenue to the grid operator. Instead, the usage of the fuel cell avoids the purchase of electricity from the SU or from the CHP. In short, when calculating the real operating cost using Equation 3.67, the bid price of the fuel cell is set to zero, because the usage of this device does not result in direct revenue to the grid operator. Instead, it avoids the acquisition of more expensive electricity from other sources.
Daily electricity cost:the daily operating cost excludingH2sale is given by:
T
∑
t=1
"
NDG
∑
g=1
PDG(g,t)πDG(g,t)+PDG(g,t)Cut πDG(g,t)Cut
−PGrid(t)exportπGrid(t)export +
Nload
∑
l=1
PL(l,t)ShedπL(l,t)Shed
+
NStorage
∑
st=1
PDch(st,t)πDch(st,t)−PCh(st,t)πCh(st,t)
−PFC(t)·0+PELEC(t)πe(t)B
# (3.68)
Equation3.68is used to calculate the cost of operating the distribution grid when theH2PP is present, but excluding the revenue that results from H2 commercialization. In other words, it represents the expenses with electricity only.
Simulation of a H 2 PP in an Energy Market
In this chapter, the first set of simulations centred around the operation of aH2PP are described, and its results are presented and analysed. It is assumed a standalone participation of theH2PP in an energy market, where it acquires electricity to produceH2. The producedH2is then sold to different customers or used in a fuel cell to produce electrical energy. This first set of simulations is meant to evaluate the economic performance of an investment in this conceptualH2PP. To this end, theH2PP operation, based on the formulation described in Section3.2, is simulated under a significant amount of different scenarios and sub-scenarios.
First, the technical and economical characteristics of thisH2PP are detailed. This is followed by a description of its potential customer portfolio. Afterwards, the simulation scenarios are de-scribed and, at last, their results are presented and analysed. The proposed optimization model is implemented using MATLAB and GAMS.
The main objective of this study is to develop a better understanding of the costs associated with the production of electrolyticH2, particularly when using energy harvested from RES.