# Accounting for Energy Cost When Designing Energy-Efficient Wireless Access Networks
## 2 Materials and Methods
### Strategy 1: Simple Algorithms
This is the current situation and is considered as the reference algorithm. 2. _Buy in advance_: This algorithm tries to exploit the variation of the energy price during the day, reacting to the demand and response program. It is based on the idea that energy is not bought whenever it is needed, but when energy is less expensive. Therefore, it is stored in the energy batteries as long as it is not needed. This solution is widely exploited in the power community. Nevertheless, it is not used in the scenario considered in this study. The scenario that we are investigating is peculiar. In fact, the communication network cannot shift its load according to the energy price because the quality of service has to be always guaranteed. The network can not plan its usage, which depends on the users. This is not present in other applications. Moreover, this scenario is very suitable for this solution because of the already present energy batteries, installed for the power consumption minimization. Therefore, no additional Capex expenditure is required. The storage of produced energy is not compromised because network energy status forecasts are considered (Step 11 in Figure 3). In particular, at each time slot \(t\), the algorithm iterates over a given number of the following time slots, and for each \(i\) of them, it defines: **I:**: time period from \(t\) to \(i\) (\(I=[t,i]\)). If \(t\) is the time slot at the minimum energy cost in \(I\) and if \(i\) needs that energy to be acquired (predicted stored and produced energy is not sufficient for that time interval), the definition of variable _bought_ occurs as follows: **bought:**: energy that can be bought at \(t\). It is the minimum space available in the storage from \(t\) up to \(i\). In this way, we avoid that produced energy in the following time interval that should be stored in the battery is wasted, because of the presence of the bought one. Therefore, the _bought_ amount of energy is taken from the grid at time slot \(t\) and stored in the batteries. In case the amount of energy bought during past time slots and allocated for the current one is not sufficient, the necessary amount is purchased from the power grid. The number of time slots over which the algorithm iterates (maximum duration of time interval \(I\)) is a parameter that is investigated in this study. Nevertheless, its maximum value is 23 h since that amount of time is indicated in the literature as the maximum time of storage to avoid substantial energy losses. This algorithm does not affect network parameters since it acts in a transparent way for the communication system. 3. _Buy and sell_: the solution exploits the fact that base stations are prosumers. In fact, they consume and produce electrical energy from their solar panel. This action makes the access network an active participant in the energy market: the network does not only buy and take energy from the traditional power grid, but also sells and injects energy into it. The energy is sold when the access network is not in a critical situation (Steps 4-6 in Figure 3): this is the condition in which energy strategies are not applied. Therefore, when the critical situation does not occur, at the current time interval \(t\), microcell base stations are not switched off because the amount of produced and stored energy is sufficient for the base stations supply for that time interval \(t\) and for all the time intervals belonging to the time window period. In this way, the sale and immediate purchase of energy are avoided. Preventing this kind of situation is convenient because energy is sold at a lower price than the one at which it is bought. The amount of energy sold is equal to the minimum amount of energy remaining in the storage for the time slots belonging to the time window period. Therefore, it is the quantity of electricity that is exceeded during the considered time period. Concerning energy sale price, in the literature, nothing is presented.