## 3 Economic Model  
The EMS takes into account the different cost items related to the energy storage system, the PV system, and energy bought and sold in the electricity market [32]. The cost of the energy storage system (\(C_{ESS}\)) is modeled by considering two components. The first one, the Balance of System Cost (\(C_{BSC}\)), is a function of the characteristics of the power electronics components, drivers and control logic for battery charge/discharge but it does not take into account the capacity of the battery. The second component is a cost that depends directly on the battery storage capacity (\(C_{Bat}\)).  
The total cost is defined as follows:  
\[C_{ESS}=C_{BSC}+C_{Bat} \tag{1}\]  
The cost of the PV Generator (\(C_{PVG}\)) is a function of the installed power and depends on the following factors: the number of PV modules; the installation cost of the modules on the roof; the inverter cost; and inclusive of the control logic. As in the previous case, these cost items can be divided into Balance of System Cost (\(C_{BSC}\)) and PV Modules cost (\(C_{PVM}\)) as follows:  
\[C_{PVG}=C_{BSC}+C_{PVM} \tag{2}\]  
The hardware cost for the EMS system control logic is included in BSC costs of the storage system and PV generator. The cost of the electricity absorbed from the grid (\(C_{EGrid}\)) is calculated by considering a time-variable rate with 15-minute intervals as follows:  
\[C_{EGrid}=E_{Grid}\times T_{EGrid} \tag{3}\]  
The case of the Italian Power Exchange (IPEx) is considered, with particular reference to the \"Mercato del Giorno Prima\" (day ahead auction market) and to the \"Prezzo Unico Nazionale\" (PUN), i.e., the National Single Price during the year 2015 as shown in Figure 4.  
In this market, the accepted demand bids related to consuming units belonging to Italian geographical zones, are valued at the PUN; this price is equal to the average of the prices of the geographical zones, weighted for the quantities purchased in those zones. The end user can buy the energy through a market participant that realizes its profits by selling energy at a higher price considering a price plus fee. The total price of the acquired energy considers the use of the national electricity grid both for the services provided by the Distribution System Operator (DSO) and for those provided by the Transmission System Operator (TSO), in addition to state taxes.  
In summary, and by simplifying the complex structure of the Italian electricity bill, for a typical residential user, the cost of electrical energy consists of different parts, generally contributing as follows to the electricity bill, as also shown in Figure 5:  
\(\bullet\) 44% electrical power from the grid (\(C_{EGrid}\));  
\(\bullet\) 43% electricity power system services by DSO and TSO (\(C_{PSS}\)); and  
\(\bullet\) 13% government taxes (Tax).  
In addition to the cost of electricity from the grid (\(C_{EGrid}\)), the cost components related to the services of the electrical distribution system (\(C_{PSS}\)) are analytically calculated and expressed as a total cost of power system services as:  
\[C_{PSS_{AI}}=f\big{\{}E_{Grid_{\alpha}}\big{\}} \tag{4}\]  
Figure 4: Energy Price based on “Prezzo Unico Nazionale” (PUN) during the year 2015.  
Figure 5: Cost components of the Italian electricity bill.  
For each energy range \(E_{Grid}\), there is a certain value of \(C_{PSS}\). Then, the total cost of energy from the grid is shown in Equation (5):  
\[C_{Grid}=C_{EGrid}+C_{PSS} \tag{5}\]  
Figure 6 shows the hardware cost considered in the Economic Model.  
The energy fed by the PV system into the grid (\(E_{SSP}\)) is sold to the DSO, and is regulated by the Authority \"Autorita per l'Energia Elettrica, il Gas e il Sistema Idrico\" (AEEGSI, Electricity, Gas and Water System Regulator) through a sale contract called \"Scambio Sul Posto\" (SSP, Net Metering Service). The electricity sold remuneration (\(P_{SSP}\)) is determined through a sale rate (\(T_{SSP}\)), based on the values applied for 2015:  
\[P_{SSP}=E_{SSP}\times T_{SSP} \tag{6}\]