# Hardware Mechanism for Energy Saving in WiFi Access Points
## 2 The Mechanism for Energy Saving in WiFi AP
### Mathematical Model Analysis
The best values of coefficients \(w\) can be obtained in practice calibrating the work of the AP. The formal expressions of \(I_{c}\) and \(I_{d}\) are well known. So, next we focus on how to optimize their values. \[I_{c}(t)=\left\{ \begin{array}{ll}I_{c}(t)=\sum\limits_{i=0}^{n}w_{i}\ i^{i};&0<t\leq T_{e}\\ &w_{t};&T_{e}<t\leq T_{ct}\\ I_{p}(t)=w_{o}\ t^{-w_{r}}\ (w_{o}>0\ \text{and}\ w_{r}>0);&T_{ct}<t\leq T_{c} \end{array} \right. \tag{4}\]  
Figure 3: Graphic and formal model of our system with our mechanism working in the charge period. The values of \(w_{i}\), \(w_{t}\), \(w_{o}\), \(w_{r}\) and temporal limits: \(T_{c}\) y \(T_{ct}\) determine the minimum value of \(T_{c}\). Those parameters depend on the battery fabric. In general, the safety conditions must be taken into account to adjust their values. \[I_{d}(t)=w_{s}\ t+w_{f} \tag{5}\]  
where \(w_{s}\approx 0\) y \(w_{f}>0\). Which means that its slope (\(+w_{s}\)) is positive and very little. This allows the battery to start working with a high current value (\(w_{f}>0\)) and to maintain working the AP in correct and safe margins. An initial voltage must be supplied for that initial current value be assured. \(\bullet\) Optimizing energy saving in several charge and discharge cycles: let us now consider \(k\) (\(0\leq k\leq K\)) charge and discharge consecutive cycles. That is, \(T=k\) (\(T_{c}+T_{d}\)). The main idea is to observe which conditions must be accomplished for energy saving (minimize the amount of power \(S\) supplies). Let us work with mean values of \(P\), \(P^{\prime}\) and \(P^{\prime\prime}\):  
\[\overline{P}=\overline{V}\ \overline{I}\ T \tag{6}\]  
\[\overline{P^{\prime}}=\overline{V}\ \overline{I}\ T_{c}+(\frac{1}{w_{v}}- \frac{1}{w_{c}})\overline{V}\ \overline{I}_{c}T_{c} \tag{7}\]  
\[\overline{P^{\prime\prime}}=\frac{w_{b}}{w_{d}}\overline{V}\ \overline{I}_{d}T_{d} \tag{8}\]  
\(WoS_{k}\) is the difference of power consumption with and without our mechanism in charge and discharge cycle \(k\) (\((\overline{P}-\overline{P^{\prime}})_{k}\)), and **WoS** is a vector which entries are positive, negative or zero values depending on where a save, waste or null energy saving was obtained in each iteration k. The sum of all values of **WoS** results in the save or waste of energy in \(k\) charge and discharge cycles. If it is assured that in each iteration we obtain energy saving, then, on average we trivially will obtain energy saving in the charge and discharge cycle \(k\) (more restrictive case). Let us now show the conditions under the energy saving is obtained in that case:  
\[\overline{V}\ \overline{I}\ T-\ \overline{V}\ \overline{I}\ T_{c}-(\frac{1}{w_{v }}-\frac{1}{w_{c}})\overline{V}\ \overline{I}_{c}T_{c}>0 \tag{9}\]  
That is,  
\[\overline{I}\ T_{d}>(\frac{1}{w_{v}}-\frac{1}{w_{c}})\overline{I}_{c}T_{c} \tag{10}\]  
As \(\overline{I}_{c}<\overline{I}\), the condition \(T_{d}>T_{c}\) will be achieved when \(w_{v}>w_{c}\). It is shown that, theoretically we can calculate the values of coefficients \(w\) that will result in energy saving after \(k\) charge and discharge cycles. Finding an optimal analytical solution to the above equations is very difficult. Simulating the equations using probability distribution for entries of WoS could illustrate more about the dimension of values for coefficients \(w\). We focus in the demonstration that it is possible to calibrate the values of coefficients \(w\) in a practical implementation for obtaining energy saving.