# Energy-Optimized Content Refreshing of Age-of-Information-Aware Edge Caches in IoT Systems
## 4 Model-Driven Cache-Management Optimization  
### Energy-Optimized Cache Refresh  
We propose a model-driven method to choose the two parameters \(w\) and \(s\) that minimize \(c_{\overline{\beta}}\), under the constraint given by the AoI requirement. More in detail, \(w\) and \(s\) are the solutions to the following optimization problem:  
\[min_{w,s}\ c_{\overline{\beta}}\]  
s.t.  
\[s\geq s_{min} \tag{11}\]  
\[P_{AoI}(AoI_{a})\leq\alpha \tag{12}\]  
The constraint (11) is the hardware constraint of the device, while the constraint (12) is the AoI requirement of the application. The latter can be expressed in a solvable form using our proposed model. Indeed, since the model allows us to compute the closed form of the probability distribution function, we can derive a condition on \(w\) such that the probability distribution function goes through the point \((AoI_{a},y)\), with \(y\geq\alpha\). So, we need to find \(\delta\), \(s\), and \(w\) such that \(AoI_{a}=\delta W\) and \(P_{AoI}(\delta W)\geq\alpha\). We obtain:  
* If \(1\leq\delta w\leq w\) (i.e., \(s\leq AoI_{a}\leq W\)) : \[w\leq\frac{AoI_{a}}{\alpha s}+\frac{e^{-\lambda s}(1-\alpha)}{(1-e^{-\lambda s })\alpha}\] (13)
* If \(0\leq\delta w<1\) (i.e., \(0\leq AoI_{a}<s\)): \[w\leq\frac{\frac{AoI_{a}}{\alpha s}-e^{-\lambda s}}{1-e^{-\lambda s}}\] (14) Therefore, \(g(s)\leq w\leq h(s)\), with: \[h(s)=\begin{cases}h_{1}(s)=\frac{AoI_{a}}{\alpha s}+\frac{e^{-\lambda s}(1- \alpha)}{(1-e^{-\lambda s})\alpha}&s\leq AoI_{a}\\ h_{2}(s)=\frac{AoI_{a}}{1-e^{-\lambda s}}&s> AoI_{a}\end{cases}\] (15) and \[g(s)=\frac{AoI_{a}}{s}.\] (16)  
An example of the feasible region where values of \(w\) and \(s\) satisfying the AoI requirement must fall is shown in Figure 3. Note that, although the region is highlighted as a two-dimensional area, the admissible solutions are only those on the segments for which \(w\) takes an integer value.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Sensor** & \(c_{S}/c_{T}\) & – \\ \hline MMA7269Q (Accelerometer) & 0.0000268 & 0.97 \\ GE/Telaire 6004 (CO\({}_{2}\) sensor) & 1249.25 & 0.0008 \\ SHT1X (H) (Humidity sensor) & 0.4 & 0.71 \\ SHT1X (T) (Temperature sensor) & 1.5 & 0.4 \\ CP 18 (Proximity sensor) & 0.267 & 0.8 \\ LUC-M10 (Level sensor) & 9.22 & 0.098 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Exemplary values of \(\overline{\beta}\) computed from commercial-sensors parameters [3].  
Finally, the optimization problem can be reformulated as follows:  
\[min_{w,s}\ \ \ c_{\overline{\beta}} \tag{17}\]  
s.t.  
\[s\geq s_{min}\]  
\[g(s)\leq w\leq h(s)\]  
\[w\in\mathbb{Z}^{+}\text{, }s\in\mathbb{R}^{+}\text{.}\]  
In Figure 4 we show the values of \(c_{\overline{\beta}}\) inside the feasible region for different types of sensors, expressed by different values of \(\overline{\beta}\). For clarity, in the figure we reported the values of \(c_{\overline{\beta}}\) for all the pairs of values of \(w\) and \(s\) inside the feasible region; however, the only admissible pairs are those having \(w\in\mathbb{Z}^{+}\). We can notice that for \(\overline{\beta}=0\) (the energy consumption for transmitting is zero, i.e., \(c_{T}=0\)) the minimum value of \(c_{\overline{\beta}}\) is on the lower right corner of the feasible region; as \(\overline{\beta}\) increases, the minimum value starts shifting on the left, up to the top left corner of the feasible region when \(\overline{\beta}=1\) (the energy consumption for sampling is zero, i.e., \(c_{S}=0\)). In the following, we study the objective function for the extreme cases of a device for which the energy consumption for transmitting is zero and a device for which the energy consumption for sampling is zero, having respectively, \(\overline{\beta}=0\), \(\overline{\beta}=1\), and then for the general case of \(0<\overline{\beta}<1\), representing hybrid sensors.