# Estimation of the Measurement Accuracy of Wireless Passive Resonance Sensors
## 4 Calculating the Natural Frequency of a Decaying Oscillator
### Fine Search for the Carrier Frequency
Figure 12 shows three examples of the convergence of [PERSON]'s algorithm (Equations (50) and (51)) for three different signal-to-noise ratios. For the simulation, we calculated the complex values in Matlab [43] for a phasor with a center frequency of 1, a quality factor of 100.23 to avoid a period in the sampled signal, and a given starting phase. The sampling times were chosen to \(t_{i}=i\cdot 0.35,i=1\ldots N\) until \(t=1.0633\cdot Q/f_{0}\) is reached, which defines \(N\). We then added complex noise according to the signal-to-noise level under study. A new noise signal was generated with each run. The following fast Fourier transform was performed with a zero padding of N points. The frequency of the maximum of the amplitude was taken as the first estimate of the natural frequency, and the values to the left and right of it were used for the improvement algorithm in Equations (50) and (51). The resulting improved natural frequency was taken as the new center, and the values of the left and right frequency points half a FFT step size apart were calculated using the DFT in Equation (48). This was repeated five times, and the updated natural frequencies were plotted along with \(\pm 1\sigma\) of the Cramer-Rao lower bound, which is shown in dashed lines. The estimated center frequencies start on the left with the frequency of the sampling point of the maximum of the spectrum calculated with a zero padding of N points and then converge very quickly to the best estimate for that dataset. According to the definition shown in Equation (19), the signal-to-noise ratio is 20 dB for the left graph, 10 dB for the middle one and 0 dB for the right one. Ten examples are shown for each signal-to-noise value. Note the different scaling of the ordinates of the graphs. Figure 13 shows the histograms for the simulations shown in Figure 12 for 2000 runs each. The signal-to-noise ratios again are 20 dB (left), 10 dB (middle) and 0 dB (right). In addition, the normalized Gaussian of the corresponding Cramer-Rao lower bound is shown. Depicted is an area of \(\pm 6\sigma\) of the Cramer-Rao lower bound, which leads to a different abscissa scaling. Figure 12: Convergence of above algorithm for 20 dB (**left**), 10 dB (**middle**) and 0 dB (**right**) signal-to-noise ratio according to Equation (19). The resonator has a center frequency of 1 and a quality of 100. \(\pm 1\sigma\) of the Cramer–Rao lower bound is shown in blue dashed lines. The estimated center frequencies start on the left at the nearest sampling point of the spectrum calculated via FFT and then converge very quickly to the best estimate for this data set. Each time, 10 examples with varied noise are shown. Note the different scaling of the ordinates of the graphs. Figure 10:0 Histogram of 5000 runs of the simulations shown in Figure 12, plotted against \(\pm 6\sigma\) of the Cramer–Rao lower bound. The signal-to-noise ratios again are 20 dB (**left**), 10 dB (**middle**) and 0 dB (**right**). The normalized Gaussian functions of the corresponding Cramer–Rao lower bounds are also shown in red. The histograms show a somewhat broader distribution function than the analytical Gaussian distributions; in particular, there are missing entries near the mean value, but there is a clear excess of entries in the outer ranges. This behavior can be seen very clearly in the comparison of the cumulative density functions in Figure 10:1 The signal-to-noise ratios again are 20 dB (left), 10 dB (middle) and 0 dB (right).