## 3 MG-Based BTS Operation
### Processing and Energy Management Systems
#### 3.4.2 Energy Management System  
The proposed EMS is focused on optimizing the monetary benefits obtained by managing the charging and discharging of the BESS in conjunction with the generation of PV energy and the management of non-critical loads. To implement this strategy, it is necessary to participate in an electricity market with a two-tariff pricing scheme. These markets are common in many countries, as this pricing scheme encourages the consumption of energy in periods where the energy demand is lower. This is the case on the Spanish electricity market [53]. In this type of billing, prices are significantly more expensive for the peak time (PT) tariff in comparison the off-peak (OT) tariff. This type of pricing scheme is particularly recommended for the case under study for two reasons: (i) the PV energy generation takes place mostly during the PT period, which encourages self-consumption at times when the price of energy is higher; and (ii) the energy consumption in the BTS does not tend to vary greatly during the day and the average daily price of energy with two periods is usually lower than the default tariff, which makes the total price of energy consumed by the BTS lower in the case of a two-tariff pricing scheme [54]. In the proposed EMS, it is considered that the installed PV power is less than or equal to the one consumed by the loads installed in the BTS, since the installed equipment does not allow grid feeding. Nevertheless, this strategy can be extended by considering a surplus of PV that can either be injected into the grid or used for battery charging. In this work, it is also assumed that the BESS is working at the proper temperature thanks to the cooling equipment. Regarding the BESS size, in this work, only the back-up batteries previously installed in the BTS are considered. A further increase in the BESS size could be feasible for new BTS projects, in which more efficient storage technologies, such as Lithium-ion, can be implemented, or if the current battery prices decrease. Since the back-up batteries are used in the EMS strategy, they will not always be fully charged in case of a power outage. To overcome this drawback, three actions are taken:  
* It is always guaranteed that the BESS discharge, scheduled by the EMS, does not exceed a minimum level so that the power support is available in the case of an outage. * The BESS is charged, after a discharge process, at the beginning of the off-peak tariff period when the electricity price is low. This increases the number of hours during the day in which the BESS is fully charged. * In the event of a power outage, non-critical loads are disconnected to maximize the back-up time provided by the BESS. It is possible to obtain multiple operating states by using the installed switches (see Table 1). The following states provide an optimal solution for the operation of the BTS while at the same time making an efficient use of the BESS:  
* State 0 or Back-up State: this state comes into operation when there is a drop off in the main grid. In this state, which rarely occurs in countries with reliable grids, the consumption of the installation is reduced to only the critical loads, and the BTS is powered by the BESS and the energy available from the PV modules at that time. * State 1 or Transition State (Peak Tariff) or Battery Charging State (Off-Peak Tariff): this state is used as a transition state in the case of working in the Peak tariff period. The BTS remains in this state for a maximum of 30 s. During the Off-peak tariff period, this state is used to charge the battery. * State 2 or No Battery State: in this state, the BESS is disconnected, either because it has already been charged to the desired level in the Off-Peak tariff period or because it has been discharged to the defined level in the Peak-tariff period. * State 3 or Battery Discharging State: the BESS is discharged by powering either part or all of the non-critical loads.