8

I assume the model to be: $$ x \left[ n \right] = \sin \left[ 2 \pi \frac{f}{ {f}_{s} } n + \phi \right] + w \left[ n \right] $$ Where $ w \left[ n \right] $ is white noise uncorrelated with the signal itself. The obvious method here would be using DFT as the Maximum Likelihood Estimator of such case. It will probably be able to generate the best results in ...


7

We can build a non linear dynamic model in order to estimate the parameters of a sine signal. Let's model the signal as $ a \sin \left( \phi \right) $ where $ \phi $ is the instantaneous phase. So the model could be also written as $ a \sin \left( \omega t + \psi \right) $. Then the model can be: $$ {a}_{k} \sin \left( {\omega}_{k} {t}_{k} + \psi \right) = {...


7

This isn't quite what you're asking, because it neglects the amplitude, $A$, but it's a relatively straightforward example of application of an extended Kalman filter to the frequency tracking problem. See section 1.2 of this PDF, that I wrote some time ago. I'd also recommend starting with B. D. O. Anderson and J. B. Moore, Optimal Filtering, Prentice-Hall, ...


7

For classic Kalman Filter, where $ {Q}_{k} = Q $ and $ {R}_{k} = R $, namely the process noise covariance and the measurement noise covariance (I'm using Wikipedia - Kalman Filter notations) the Posterior Covariance $ {P}_{k} $ is a deterministic matrix independent of the measurements themselves. Since your code set the measurement and the process noise to ...


6

I'm copying my answer to Estimate and Track the Amplitude, Frequency and Phase of a Sine Signal Using a Kalman Filter which solves a more general problem with example code: We can build a non linear dynamic model in order to estimate the parameters of a sine signal. Let's model the signal as $ a \sin \left( \phi \right) $ where $ \phi $ is the instantaneous ...


5

This is a nice question. The math is actually pretty simple once you embrace the method I derived the Wiener Filter in - How Is the Formula for the Wiener Deconvolution Derived? So, here is the model: $$ \boldsymbol{y}_{i} = \boldsymbol{h}_{i} \ast \boldsymbol{x} + \boldsymbol{w}, \; i = 1, 2, \ldots, n $$ Where $ \boldsymbol{w} $ is an additive white ...


5

Solving the Linear Combination of Real Harmonic Signal The data model is given by: $$ x \left( t \right) = \sum_{i = 1}^{M} {a}_{i} \sin \left( 2 \pi {f}_{i} t + {\phi}_{i} \right) + n \left( t \right) $$ Where $ M, {\left\{ {a}_{i} \right\}}_{i = 1}^{M}, {\left\{ {f}_{i} \right\}}_{i = 1}^{M}, {\left\{ {\phi}_{i} \right\}}_{i = 1}^{M} $ are unknown ...


4

This is exactly where the Dynamic Model comes into play. The whole idea of the Kalman Filter is that you have a model which connects between variables which are measured to those which are not measured (Estimation) or measured differently (Fusion). Since the velocity is the derivative of the location over time you have a model which connects them both. Once ...


4

First of all, you're trying to evaluate the derivative of an exponential. If the base of the exponential is positive, the derivative exists. However, if the base is negative, the derivative does not exist. It would be pointless to use a Kalman filter when you have an exponential with a negative base. Secondly, your model of the echo envelope is $$ A(t) = ...


3

You have $$ f\left(\mathbf x, u\right) = \begin{bmatrix}\frac{-1}{T}\tau+\frac{K}{T} u \\ \frac{\tau}{mr} \\ 0 \end{bmatrix} \tag a $$ From which you (eventually) derive $$ \mathbf {A}_d=\begin{bmatrix} 1-\frac{\Delta T}{T} & 0 &0 \\ \frac{\Delta T}{m_{op} r} & 1 & \frac{-\tau_{op} \Delta T}{m_{op}^{2} r}\\ 0& 0 & 1 \end{bmatrix} \tag ...


3

Let's define the true transfer function $H_0=P_{xy}/P_{xx}=P_{yy}/P_{yx}$. $H_1$: The transfer function is computed as the ratio of the cross spectrum between the input and output signals, to the input autospectrum: $P_{xy}/P_{xx}$. The $H_1$ estimator assumes that there is no noise on the input and consequently that all the input measurements are accurate. ...


3

Proving that the H1 estimator ignores noise on the output: If we assume that the output is the input processed by the transfer function plus some output noise, we have $Y = H(f)X(f) + N$, where everything is in the freq domain. So, $S_{xy}(f) = E[X(f)^*Y(f)] = E[X(f)^*(H(f)X(f) + N(f))]$. where E[] denotes expectation and * denotes complex conjugate. If you ...


3

I've used the first technique before. The idea is that you have some chunk of time domain samples where you know only noise is present and use that to get an estimate of the noise power, $P_n$. Then you determine the total received power, which will have contributions from both signal and noise, $P_{s+n}$. When you take the ratio of these, you get: $$\frac{...


3

If you have a low-noise and well-sampled signal, a quick way to estimate it is to find $\sqrt{-f''(t)/f(t)}$. For a signal $f(t)=A sin(\omega t+\phi)$ the second derivative is $-A \omega^2 sin(\omega t+\phi)$ which is $-\omega^2$ times the original. This is useful if you want a quick response and only have part of a cycle, so no zero-crossings. But obviously ...


3

A common way to do this is to take the FFT of the input signal. Since the frequency might not be right at a FFT bin, usually a second step of interpolation is done after choosing the initial peak. A couple reasons why this is commonly done is that it is the maximum likelihood solution for the AWGN case and no matter what platform you are implementing on ...


2

This depends on the precision needed. If it's a pure sine wave that's noise free, you can get a very quick estimate by measuring the difference between two zero crossings. The tricky part is that most sine wave frequencies are not integer dividers of the sample rate, so the actual zero-crossing falls between two samples and there is some inherent measurement ...


2

Applying ssq_cwt with extract_ridges, I obtain below. Improvable with better windowing, more samples. Smoothing can be applied on amplitude plot to make it more interpretable without losing much accuracy. import numpy as np from ssqueezepy import ssq_cwt, extract_ridges from ssqueezepy.visuals import plot, imshow # z = see OP's code; used np.random.seed(...


2

As others have already mentioned in the comments, the question shows on research effort, is far too broad and needs clarification. Depending on the requirements, the MUSIC (or ESPRIT) algorithm may be a suitable approach to efficiently find a high resolution frequency esimate. The algorithm is specifically intended for finding the frequency of sinusoids in ...


2

You're forgetting an important property of the autocorrelation sequence: $$r_{xx}[k]=r_{xx}^*[-k]\tag{1}$$ I.e., it is conjugate symmetric, which is necessary for the power spectrum to be real-valued. Because of this symmetry, the autocorrelation sequence is only given for non-negative values of $k$. If you use $(1)$, you obtain $$S_{xx}(f)=1+b_1^2+b_2^2+...


2

The autocorrelation of white Gaussian noise is a delta. When the noise is filtered or band-limited, as is the case here, the autocorrelation becomes a sinc. This has interesting consequences, for example in telecommunications, where the noise at the output of a matched filter is uncorrelated only at certain time delays -- fortunately, the time delays we're ...


2

Try looking at the error term $$e(k) = \mathbf{y}(k) - \mathbf{C}_d\cdot\hat{\mathbf{x}}(k)$$ and testing it for whiteness. If the state estimate is good, then all the predictable component will be predicted and the remainder will be white noise (unpredictable).


1

I think you may do one of the following: Given a Parametric Model of the Signal You may use least squares. In case the model is Linear you may use linear least squares (For instance, polynomial regression). If the model is not linear, then a non linear least squares. Given a Dynamic Model of the Signal If you have a model which connect the signal u[t] to u[...


1

To first clarify, this formula referenced by the OP is not showing the introduction of carrier frequency offset but rather is demonstrating multipath fading (the formula shows two different propagation paths each with a different phase offset and amplitude coefficient): $$y_q(t) = x(t)cos(2πf_c t + ∅) * h(t) + α x(t)cos(2πf_c t +φ) * h(t) $$ Phase ...


1

So, according to your text, $$ H := F^bh,$$ i.e. what you call the bit-reversed order FFT of the channel impulse response. Since "bit-reversed order" just implies you're permuting outputs of the FFT, $F^b$ is just a row permutation $\Pi_{BR}$ of the standard DFT matrix $D$. Since the "proper" DFT actually leads to a diagonal $H$ (as a ...


1

You mention using pYIN, which was considered state-of-the-art in pitch/fundamental frequency estimation up until recently. The little hacks and suggestions here are misplaced - I don't think you'll make pYIN significantly better. The next step up is CREPE, the current best performing pitch detection algorithm with a deep neural network: https://github.com/...


1

If your input signal features many strong harmonics that are all strict multiples of a (possibly attenuated) fundamental, it seems reasonable to look into cepstrum analysis, as that finds the periodicity of the spectrum. Pitch analysis has been studied for a long time and it is evidently hard to get generally and robustly «right». I wonder if a panel of ...


1

FFT is poorly-equipped for this task$^{1}$; time-frequency localization, like STFT or CWT, is preferred. Said representations can be refined further to trace out frequency and amplitude over time with synchrosqueezing. 1: I originally understood the question as tracking instantaneous amplitude and frequency modulations of a (non-stationary) signal, which isn'...


1

The standard method of dealing with spectral leakage is time domain windowing. This involves a fair bit of tradeoff: main lobe width, side lobe peaks & distribution, stop band attenuation, etc. These tradeoffs are controlled by choosing the window type and window parameters (if applicable). What the best trade off is, really depends on your specific ...


1

There is nothing wrong about subtracting the bias. For the Weiner filter, the operation is a matrix multiply, there are no non-linear operations taking place which is reason everything works out. There are two possible ways to do it: Subtract the bias before the filter. In this case you'll have a Weiner filter, $G_1$, which will produce $\hat{x}$ given $x+n$...


1

Why don't you simply compute $X^{H} X / N$ ? clear all; close all; fs = 4000; N = 100*fs; R = 0.5;% overlap percent Nseg = fs; M = 8; I noticed your data was not complex, since you metioned complex in the question here I made it complex. X = 0.5*randn(N,M) + 0.5j *randn(N,M); This will be close to the identity matrix there will be small complex ...


Only top voted, non community-wiki answers of a minimum length are eligible