## 4 Simulation Results
With the battery charged, the EMS control logic enables the function \"thermal storage\" by controlling the temperature set point (Temp Set), as shown in Figure 8.5 The house behaves as a reservoir for thermal energy in a measure dependent on the thermal characteristics of the building materials. The \"Thermal Storage\" function adjusts the air conditioning system operating mode, by changing of its electricity demand, as shown in Figure 8.6  
Figure 8.7 Indoor, outdoor and set point temperatures. Figure 8.8 Use of the photovoltaic generated power. The energy profile of the house is thus modified by the EMS as well as with the allocation of \"shiftable loads\" at times when the cost of electric energy is lower. Figure 18 shows the total electric power absorbed/injected from/to the grid during the day. It is worth noting that the overall electricity demand decreases and a surplus of the energy generated by the PV system is injected into the grid only during the peak of PV power production. In a standard configuration, without considering the EMS, the PV Generator and the storage system, the electrical energy demand of the house is equal to 11.48 kWh/day, and is all provided by the grid. Considering the presence of the EMS, a PV generator of 1 kWp and an energy storage system of 4 kWh, the electric power absorbed from the grid is equal to 8.35 kWh/day, with an energy saving of 3.13 kWh. Moreover, 0.32 kWh are injected into the grid. To evaluate the benefits of the EMS, the Monte Carlo Simulation method is applied [26]. Specific function generators are designed to simulate the non-deterministic variables, in particular:  
* Energy real time price;
* Outdoor temperature;
* Initial indoor temperature;
* Set-point temperature;
* Initial State Of Charge (SOC); and  
Figure 8.9 Electrical energy absorbed by the air conditioning system. Figure 9.0 Power grid with EMS. * PV electrical energy production. Five possible levels of storage capacity are considered, from 4 kWh to 8 kWh in steps of 1 kWh, and these can be combined with two possible sizes of the PV generator: 1 kW or 2 kWp. For each specific configuration of the PV-battery hybrid system, many simulations are performed. As it is known, in the MCS method, which is used to study the trend of results obtained from multiple independent simulations, a control variable should be identified to determine when the solution converges to an acceptable value. The number of iterations \"N\" depends on the accepted tolerance \"\(\varepsilon\)\" that is selected based on the trade-off between accuracy and computing time. In particular, a specified tolerance \"\(\varepsilon\)\" is imposed as follows: Figure 9.1 (7) where \(E(X)\) is the mean value of the control variable of MCS sampling, \(\sigma(X)\) its standard deviation. A comparison between the cost with and without the hybrid PV-battery system and EMS is obtained by using the MCS [20; 26]. Simulation results are shown in next figures to evidence the difference in terms of Saved Energy Cost (SEC) [4; 8; 26; 32], considering a winter day (Figure 19). The number of simulations (N) guarantees the convergence of the results, as shown by the moving average in Figure 9.2  
Figure 9.3 Saved energy cost with the EMS and hybrid PV-ESS system. Figure 9.4 Moving average of the safe energy cost with EMS. The proposed method is applied to obtain the Hybrid PV-Energy Storage System optimal configuration. This economic evaluation considers only the cost components dependent on the energy absorbed from the grid (\(E_{Grid}\)). The initial cash outflow of the investment (\(I_{0}\)) (Table 1) for each configuration system is considered, such as the cost of the PV Generator (\(C_{PVG}\)) and the cost of the energy storage system (\(C_{ESS}\)). The total annual cost saving is achieved considering the reduction of costs related to:  
* Electricity Power System Services Cost (\(C_{PSS}\));
* Taxes (\(Tax\)); and
* Net Metering Service (\(P_{SSP}\)).