Profit

The net cost provides an indication of the total cost over a given time interval. When exploring different design alternatives (EES architectures, policies), a most useful metric is the actual profit of a given configuration. Defining a profit would, however, require to set a baseline to compare against; since the key element that has the most sizable impact on profit is the presence of renewable power sources, our definition of profit focuses on the net balance of the energy provided from power sources to the load and not requested from the grid (at the price *pE*,*buy*). From this energy we need to subtract the net cost defined in Equation (7) .

$$Profit(t) = \sum\_{\tau=0}^{t} \left( p\_{E,hyy}(t) \cdot \frac{E\_{p\diamond2load}(t)}{\eta\_{conv}} \right) - \mathbb{C}\_{net}(t) \tag{9}$$

Clearly, the profit is monotonically increasing with *t* during the lifetime of EES. The positive value of profit illustrates the given configuration can bring real benefit to the users, while the negative value indicates the given configuration is not a profitable one.

#### *3.3. Interaction with the Power Layer*

As stated in the previous section, some cost models depend on the power flows in the EES. The concurrent simulation of the cost and power layer is, therefore, essential to ge<sup>t</sup> an accurate estimation of the total EES costs. The generic inter-layer interaction depicted in Figure 1 shows generic connection between two layers. However, there are distinct types of interactions among the power and cost layers.

The first one involves *an individual component* in the two layers (Figure 2). The power model of a component *Ci* sends the following information to its cost model:


The second type of interaction involves the two buses as it concerns *aggregate* information (Figure 2c). The power bus forwards to the cost bus the following information:


There is, however, also a feedback flow *from* the cost bus *to* the power bus. The former can in fact provide information to the power layer that can be used to design and apply specific power managemen<sup>t</sup> policies. Examples of such information are:


The next section will present the implementation details (software infrastructure, timing model, etc.) of the overall intra-layer and inter-layer signal interaction.
