# Fast and Reliable Burst Data Transmission for Backscatter Communications
## 4 CRFID Operating Procedure Optimization
### Goodput Analysis and Optimization  
We have already known that longer sleep time does not necessarily result in higher goodput when energy-harvesting conditions are poor. So how do we improve goodput by adapting to current energy-harvesting conditions? By continuously tracking the maximum harvest point, as shown in Figure 2, we can obtain the optimal sleep time and energy-harvesting rate, calculate the RF energy captured by the CRFID node, and further derive the optimal number of transmission frames under the current condition. Here, we use the gradient descent algorithm to approximate the optimal value.  
_Sleep time adaptation:_ As can be seen from Figure 2, the energy-harvesting rate curve is a concave function of sleep time (under specific harvesting conditions). A fast and efficient way to converge to the optimal value of the concave function is used by the gradient descent algorithm. The gradient descent algorithm works as follows. We initialize the sleep time and calculate the gradient at this time. Then, we look for the direction of the positive gradient and move a certain step size in this direction. We repeat this iteration until the difference in energy-harvesting rate between the two iterations is small enough to indicate that the local optimum has been reached. If the step size is too small, the convergence may be too slow, and if the step size is too large, convergence cannot be guaranteed. Therefore, we should choose the appropriate step size according to the gradient. In addition, if the harvest conditions change, the curve will change. Our gradient-based sleep time adaption algorithm runs continuously once it converges to the optimal value. It periodically checks the gradient under the current optimal conditions and moves along a positive gradient as the optimal harvest rate changes. In this way, we get the optimal harvesting rate and sleep time at different energy-harvesting conditions.  
_Optimal number of transmitted frames_: According to the above analysis, at the specific energy-harvesting condition, when the sleep time is \(t_{o}\), the energy-harvesting rate is the maximum \(H_{\text{max}}\). The radio frequency energy \(E(t)\) captured by the CRFID at this time is as follows:  
\[E(t)=\int_{0}^{t_{o}}C\times V^{2}\max\limits_{\text{max}}\times\tau^{-1}(1- \text{e}^{-t_{s}/t})\text{e}^{-t_{s}/t}dt_{s} \tag{3}\]  
Suppose that the average energy cost by a node to transmit or receive unit-bit data is \(e_{bit}\) and that the lengths of the data frame payload and the header (including the FCS field) are represented by \(l_{p}\) and \(l_{h}\), respectively. The energy cost required to transmit one frame is thus as follows:  
\[E_{frame}=e_{bit}\times(l_{p}+l_{h}) \tag{4}\]  
Figure 4: Operating procedure.  
The number of data frames for burst transmission in the \(k\)th duty cycle is represented by \(n_{k}\). Since the captured energy cannot be less than the energy required to transmit the frame, there is the following inequation.  
\[E(t_{k})\geq n_{k}E_{frame} \tag{5}\]  
According to Equation (5), the number of burst transmission data frames in the \(k\)th duty cycle satisfies the following inequation:  
\[n_{k}\leq\min\left\{\left\lfloor\frac{E(t_{k})}{E_{frame}}\right\rfloor,N+M- \sum\
olimits_{i=1}^{k-1}n_{i}\right\} \tag{6}\]  
where \(\bigsqcup\) represents rounding down and \(\sum\
olimits_{i=1}^{k-1}n_{i}\) represents the total number of burst data frames of the previous \(k\)-\(1\) duty cycles.