Electricity Cost

Electricity cost is the instantaneous cost related to the money paid to (or received from) the utility provider as an effect of the total power balance in the system. This cost can be modeled as:

$$c\_{elcc}(t) = p\_E(t) \cdot \frac{E(t)}{\eta\_{conv}} \tag{6}$$

where *E*(*t*) = *P*(*t*) · Δ*t* is the energy to be bought (or sold) at time *t*; *P*(*t*) is the instantaneous power demand (positive or negative), which refers to the total balance of the EES, and its sign determines whether the power is being bought (*P*(*t*) > 0) or sold (*P*(*t*) < 0). *pE*(*t*) is the instantaneous electricity price (in currency/kWh); its value depends on the sign of *<sup>P</sup>*(*t*):

$$p\_E(t) = \begin{cases} \ p\_{E, \text{buy}} & \text{if } P(t) > 0\\ \ p\_{E, \text{sell}} & \text{if } P(t) < 0 \end{cases}$$

where typically *pE*,*sell* < *pE*,*buy*. *ηconv* ≤ 1 is the efficiency of the conversion process; i.e., how the nominally consumed energy *E*(*t*) is actually perceived [2].

Given that Equation (6) depends on the overall power flow (production vs. demand) of the EES evolution, this cost can only be computed by the cost bus, that, by collecting the individual signals from the components can have a global perspective on the system.
