# Prediction-Based Energy Saving Mechanism in 3 GPP NB-IoT Networks
## 4 Prediction-Based Energy Saving Mechanism
### Prediction of Processing Delay  
The processing delay for downlink packets varies according to the protocol category, application type, and device performance. The PPE manages the prediction metrics for each session and UE. We introduce the predictive processing delay, \(T_{CID,PID}\) according to the cell ID (UE cell ID-CID) and the packet type (packet type ID-PID). Hence, we define the \(k\)-th predictive processing delay as \(T_{CID,PID}(k)\) and modified predictive processing delay \(T^{\prime}_{CID,PID}(k)\), which applies the carried information with weight \((1-\alpha)\) by  
\[T_{CID,PID}(\mathbf{k})=\alpha\times\ T_{CID,PID}(k)+(1-\alpha)\times T_{info} \tag{1}\]  
where \(T_{info}\) is the received information from the MME.  
For a given session and UE, the processing delay can be very similar with its previous value under the same UE load. Therefore, the proposed algorithm uses the previous value as a prediction reference. The prediction result and statistics of past predictions are also considered. Whether the previous prediction was successful can be confirmed through the decoding result of the preassigned radio resource. The variation of the predictive processing delay follows these criteria: if the previous prediction failed and the current probability, \(P\), of successful delay prediction is smaller than the target probability, \(P_{o}\), of successful delay prediction, then the PPE increases the predictive processing delay; if the previous prediction succeeded and \(P\) is greater than \(P_{o}\), then the PPE reduces the predictive processing delay; whereas the PPE holds previous value otherwise. The corresponding expression is:  
\[T_{CID,PID}(i)=\left\{\begin{array}{ll}\min\bigl{\{}\bigl{(}1+\Gamma*R_{up }\bigr{)}\times T^{\prime}_{CID,PID}(i-1),\ T_{max}\bigr{\}},&\mbox{ if $P<P_{o}$ and $CRC= NOK$;}\\ \max\bigl{\{}(1-\Gamma*R_{down})\times T^{\prime}_{CID,PID}(i-1),\ T_{min} \bigr{\}},&\mbox{ if $P>P_{o}$ and $CRC=OK$;}\\ T^{\prime}_{CID,PID}(i-1),&\mbox{ otherwise,}\end{array}\right. \tag{2}\]  
where:  
* \(\Gamma=\ |P-P_{o}|\),
* R\({}_{down}\) and R\({}_{up}\) are compensation steps,
* R\({}_{down}=\) R\({}_{up}\times(1-P_{o})/P_{o}\), and
* \(T_{max}\) and \(T_{min}\) are the upper and lower boundaries, respectively.  
The variation step has a  
```
1:Initialization: \(P_{o}\)=0.9, \(P\)=0.0, \(R_{up}\)=0.5, \(R_{down}\)= \((1-P_{o})/P_{o}\), \(T\)(0)=0, \(\alpha\)=0.8 for NAS/APP/IP packet, \(\alpha\)=1.0 for RLC/RRC packet, CRC=0, k=1, \(T_{max}\)=30,000, \(T_{min}\)=10, \(W_{p}\)=256
2:Prediction:
3:k = k + 1
4:\(\Gamma\) = \(\mid\)\(P\) - \(P_{o}\)\(\mid\)
5:\(T\) = \(\alpha\times T(k-1)\) + \((1-\alpha)\times T_{inf_{o}}\)
6:if\(P<P_{o}\) and CRC = 0 then
7:\(T(k)\) = min[\(T\times(1+\Gamma\times R_{up})\), \(T_{max}\)]
8:elseif\(P>P_{o}\) and CRC = 1 then
9:\(T(k)\) = max[\(T\times(1-\Gamma\times R_{down})\), \(T_{min}\)]
10:else
11:\(T(k)\) = \(T(k-1)\)
12:endif
13:NPUSCH result update:
14:ifNPUSCH_CRC = OK then
15: CRC = 1
16:else
17: CRC = 0
18:endif
19:ifk \(<W_{p}\)then
20:\(P\) = (\(P\times\) (k-1) + CRC)/k
21:else
22:\(P\) = (\(P\times\) (\(W_{p}\)-1) + CRC)/\(W_{p}\)
23:endif
```  
**Algorithm 1** Proposed prediction algorithm for processing delay in an NB-IoT network