# Estimation of the Measurement Accuracy of Wireless Passive Resonance Sensors
## 3 Cramer-Rao Lower Bounds for Exponentially Decaying Phasors
### Maximum Likelihood Estimation of \(\chi\) and \(\sigma_{n}\)  
If the noise is Gaussian distributed, with mean \(\mu_{n}\) and variance \(\sigma_{n}\)2, the probability density function \(f(z_{n};\chi)\) of a single sample point can be modeled as  
Footnote 2: The probability density function \(f(z_{n};\chi)\) is defined as \(\tilde{f}(z_{n};\chi)=\frac{1}{2\pi\sigma_{n}}e^{-\frac{1}{2\sigma_{n}}\sum _{n=0}^{N-1}\left|z_{n}-\mu_{n}\right|^{2}}.\)  
\(f(z_{n};\chi)\) gives the probability of measuring \(z_{n}\) if \(\mu_{n}\) was the true value. Obviously, \(f(z_{n};\chi)\) is maximal when \(\mu_{n}=z_{n}\). Now, we adapt our analytical signal, which is described by the four parameters in the state vector \(\chi\), to the measurement points in such a way that the deviation of the measurement points from the analytic signal corresponds to the narrowest possible Gaussian distribution. This is accomplished by multiplying all probability density functions of all linearly independent samples in the measurement vector, yielding the joint probability density function \(f(z;\chi)\), also called the likelihood function, and finding the global maximum of this function,  
\[f(z;\chi)=\prod_{n=0}^{N-1}f(z_{n};\chi)=\left(\frac{1}{2\pi\sigma_{n}}^{N} \right)^{N}e^{-\frac{1}{2\sigma_{n}}\sum_{n=0}^{N-1}\left|z_{n}-\mu_{n}\right| ^{2}}. \tag{29}\]  
The assumption that the noise is linearly independent for each sample and for the real and imaginary components applies when the sampling frequency corresponds to the Nyquist frequency and when interference from spurious reflections and crosstalk between I and Q channels are negligible. The maximum stays the same if we analyze the logarithm of Equation (29), since the logarithm is a monotonic function. This results in the so-called log-likelihood function  
\[\log(f(z;\chi))=-N\log\Bigl{(}2\pi{\sigma_{n}}^{2}\Bigr{)}-\frac{1}{2{\sigma_{n }}^{2}}\sum_{n=0}^{N-1}(z_{n}-\mu_{n})^{*}(z_{n}-\mu_{n}). \tag{30}\]  
The best estimate of the variables in \(\chi\) maximizes the probability that our measurements will turn out as we obtain them. In this case, they maximize \(f(z;\chi)\) in Equation (29) or (30) for a given measurement \(z_{n}\). Of the five variables in the likelihood function, \(\bar{b}\), \(\alpha\), \(\hat{\omega}\), \(\bar{\varphi}\) and \(\sigma_{n}\), three (\(\bar{b}\), \(\bar{\varphi}\) and \(\sigma_{n}\)) can be calculated analytically from Equation (30) once \(\alpha\) and \(\bar{\omega}\) are determined (see Appendix B). For \(\bar{\varphi}\) we get (see Appendix B.1, Equation (A43)):  
\[\bar{\varphi}=\arg\sum_{n=0}^{N-1}z_{n}e^{-\alpha nT}e^{-j\bar{\omega}nT} \tag{31}\]  
After multiplication of the measurement points by the phase factor \(e^{-j\bar{\omega}nT}\), which removes the carrier frequency, all measuring points are distributed in a Gaussian shape around a certain phase angle. The best estimate for the initial phase \(\bar{\varphi}\) is then the phase angle of the weighted sum of all measurement points without carrier frequency multiplied by the associated amplitude of the decaying resonator \(e^{-\alpha nT}\). This reduces the impact of noise, especially in the low useful signal region. For \(\bar{b}\), we obtain (see Appendix B.2, Equation (A44)):  
\[\bar{b}=\frac{1-e^{-2\alpha T}}{1-e^{-2N\alpha T}}\cdot\left|\sum_{n=0}^{N-1} z_{n}e^{-\alpha nT}e^{-j\bar{\omega}nT}\right| \tag{32}\]  
We remove the carrier frequency from the measurement points, multiply it by the associated amplitudes of the decaying resonator signal, analogous to a matched filter, and sum up all values. We divide the result by the analytically calculated sum of the sampled powers of a decaying resonator of the same quality factor that begins with amplitude 1. Using the estimates for \(\chi\), we can calculate an estimate of the standard deviation of the Gaussian noise using the mean squared error between the measured signal and the estimates (see Appendix B.3, Equation (A47)).