# Energy-Optimized Content Refreshing of Age-of-Information-Aware Edge Caches in IoT Systems
## 4 Model-Driven Cache-Management Optimization
### Sensitivity Analysis  
The cache optimizer needs to receive as inputs the AoI requirements of the application, i.e., \(\alpha\) and \(AoI_{\alpha}\), and the request rate \(\lambda\). The proxy receives the values of \(\alpha\) and \(AoI_{\alpha}\) from the server during the initial configuration phase; instead, it needs to estimate the value of the request rate \(\lambda\). So, the estimated value of \(\lambda\) may be affected by an estimation error, or the actual value of \(\lambda\) may not be constant but have some small fluctuations that are not seen by the proxy.  
To assess the sensitivity of the proposed model to variations of the parameter \(\lambda\), we evaluate our model in a sample scenario in which we assume that the AoI requirements are \(\alpha=0.9\) and \(AoI_{\alpha}=420\) s, for different values of \(\overline{\beta}\) and \(\lambda\). Typically, estimating the rate of a Poisson process requires estimating the mean interarrival time; so, in the following, we show the sensitivity of our model when the estimated mean interarrival time, denoted as \(\overline{T}\), is different from the actual mean interarrival time, denoted as \(T\). Since we want to evaluate the impact of an estimation error of \(T\), we are considering devices where the predominant energy cost is the transmission energy cost, i.e., \(\overline{\beta}\to 1\): indeed, in these cases \(c_{\overline{\beta}}\) also depends on the request rate and hence is more affected by estimation errors on \(T\).  
Call \(w^{*}\) and \(s^{*}\) the optimum values obtained considering the mean interarrival time \(T\) and call \(\overline{w}\) and \(\overline{s}\) the optimum values obtained considering the estimated interarrival time \(\overline{T}\). Figure 8 shows the percentage variation of \(c_{\overline{\beta}}\), calculated as follows:  
\[\frac{c_{\overline{\beta}}(T,\ \overline{w},\ \overline{s})-c_{\overline{ \beta}}(T,\ w^{*},\ \ s^{*})}{c_{\overline{\beta}}(T,\ w^{*},\ \ s^{*})}*100 \tag{18}\]  
as a function of the percentage variation of \(T\), i.e., \(100\big{(}\overline{T}-T\big{)}/T\). Moreover, call \(\pi_{\alpha}\) the \(\alpha\)-th percentile of \(P_{AoI}\). Figure 9 shows the percentage variation of \(\pi_{\alpha}\), calculated as follows:  
\[\frac{\pi_{\alpha}(T,\ \overline{w},\ \overline{s})-\pi_{\alpha}(T,\ w^{*},\ \ s^{*})}{\pi_{\alpha}(T,\ w^{*},\ \ s^{*})}*100 \tag{19}\]  
as a function of the percentage variation of \(T\).  
Figure 8: Percentage variation of the normalized energy cost for \(\lambda=1/1800\) s\({}^{-1}\), \(\overline{\beta}=0.95\) (circles), \(\overline{\beta}=0.995\) (diamonds), \(\overline{\beta}=1\) (crosses).  
From Figure 8 we can notice that when \(T\) is underestimated, the resulting energy consumption cost is larger than the minimum value, though the variation is small. On the other hand, when \(T\) is overestimated, the energy consumption is smaller, but the AoI requirement is not satisfied (see Figure 9). However, for small variations of \(T\), the percentage variation of \(\pi_{a}\) is small.  
Finally, Figure 10 shows the percentage variation of \(c_{\overline{\beta}}\) for different values of \(\lambda=1/T\). We can notice that lower rates are more affected by estimation errors, because as \(\lambda\) tends to zero, also the transmission energy cost tends to zero, and hence larger errors on \(T\) have a larger impact on \(c_{\overline{\beta}}\). However, the graphs show that the model is robust, indeed if we assume that \(T\) varies up to 30%, in the worst case the error is slightly more than 10%.