# Estimation of the Measurement Accuracy of Wireless Passive Resonance Sensors
## 4 Calculating the Natural Frequency of a Decaying Oscillator
### Weighting for Improving the Signal-to-Noise Ratio
\(\pm 1\sigma\) of the Cramer–Rao lower bound is again shown in blue dashed lines. Figure 17: **Left**: Reduction in the convergence behavior of the algorithm as a function of the sample length for sample lengths between \(1\cdot Q/f_{d}\) and \(20\cdot Q/f_{d}\). The quality factor of the resonator signal is 100 and the initial signal-to-noise ratio is 0 dB. The probability of convergence of the algorithm decreases as the sample length increases from 100% to 20%. The **right** graph shows for the sample length of \(20\cdot Q/f_{d}\) the few remaining correct detections of the natural frequency for 5000 runs. There are still some hits within \(1\sigma_{f_{d}}\), but only 20%. Figure 17 shows on the right the histogram around the correct natural frequency for 5000 runs with a sample length of \(20\cdot Q/f_{d}\). The \(1\sigma\) probability distribution of the Cramer-Rao lower bound is also shown. The impact of noise can be significantly reduced by weighting the signal in the time domain with an exponentially decaying window, which is similar to Equations (31) and (32) [52], see also Appendix D. As a result, the noise terms become correlated but remain mean-free. For this purpose, in a first step, the noisy natural frequency \(f_{d}\) and damping term \(\alpha\) are determined from the unweighted time domain signal, and in a second analysis step, the measurement signal \(z_{n}\) is weighted with the function \(e^{-n\gamma\cdot\alpha T}\), resulting in \(w_{n}\). Using this new time domain signal, the natural frequency and damping constant are determined again. [PERSON] gives for the weight factor \(\gamma\) an approximation [52]  
\[w_{n} = z_{n}e^{-n\gamma\cdot\alpha T},\qquad\text{with}\] \[\gamma = \left\{ \begin{array}{ll}0.02(\alpha NT)^{2}+0.02(\alpha NT)+0. 39&\qquad\text{for}\quad 0<(\alpha NT)\leq 3\\ 1-1.08e^{-0.41(\alpha NT)}-0.07e^{-0.08(\alpha NT)}&\qquad\text{for}\qquad( \alpha NT)>3\end{array} \right.. \tag{56}\]  
Figure 18 shows \(\gamma\) on the left as a function of \(\alpha NT\). When this weighting function is applied to the signal used in the center plot of Figure 17, i.e., on the decay signal of a resonator with a quality factor of 100 and an initial signal-to-noise ratio of 0 dB, the detection probability remains constant at 100% for all sample lengths from \(1\cdot Q/f_{d}\) to \(50\cdot Q/f_{d}\). Even for the sample length of \(1\cdot Q/f_{d}\), the weighting improves the detection probability at low signal-to-noise ratios, as can be seen in the right diagram of Figure 18. The red line is identical to the middle curve in Figure 18 and shows the detection probability of the algorithm for an unweighted signal as a function of the signal-to-noise ratio for a resonator signal with a quality factor of 100. The blue line uses the same signals but applies the weighting function of Equation (56). This shifts the detection probability by approximately 3 dB to lower signal-to-noise ratios. If the measurement data are weighted according to the weight function in Equation (56), the resulting distribution of the simulation results corresponds to the Gaussian functions of the Cramer-Rao lower bound. Figure 19 shows the cumulative distribution functions along with the corresponding Gaussian functions for 5000 simulations of a resonator signal with a quality of 100 and signal-to-noise ratios of 20 dB (left), 10 dB (middle), and 0 dB (right). The curves are so close together that they can hardly be distinguished. Figure 18: The left diagram shows the weighting coefficient \(\gamma\) according to Equation (56) as a function of \(\alpha NT\). The improvement in the convergence probability of the algorithm by the weighting function is shown in the right diagram for a resonator signal with a quality factor of 100 and an initial signal-to-noise ratio of 0 dB. The red line was calculated without weighting and the blue line with weighting. The detection probability shifts by approximately 3 dB to lower signal-to-noise ratios.