9

"Is there a way to measure frequency (detect pitch) better than FFT, that is, with better resolution in less acquisition time?" yes there is. or are. there are multiple better ways to do musical pitch detection in real time that are far, far better than running an FFT. consider : Average Magnitude Difference Function (AMDF) $$ Q_x[k] = \sum_n |x[n] - ...


7

Slope from all samples obtained To summarize the question's problem, you want to calculate the slope based on all samples obtained thus far, and as new samples are obtained, update the slope without going through all the samples again. On the page you cite is the equation for calculation of the slope $m_n$ that together with $b_n$ minimizes the sum of ...


5

*STOP! If you only want a hint and not the complete solution please see Stanley P.'s or Peter K.'s answers. * Since you do not specify if there is model for the temperature evolving over time $n$, I will derive an estimator which is a combination of $Y_1$ and $Y_2$ for each fixed $n$. Let $\alpha \in (0,1)$ and suppose the estimate of $X$ can be written as $...


5

There are, a few discrepancies that might be making a difference here. My suggestion would be to edit the question for clarity. There are quite a few assumptions that lead to non-straightforward thinking about the problem which I have tried to address to an extent and I would be happy to modify the response in light of more information. In machine ...


4

So Least squares estimator is as it literally - the estimator which brings the mean square error to minimum. In the case of Gaussian white noise it has a simple and analytic solution. I recommend you develop it yourself, if your'e comfortable with matrices calculus it is not that hard. You can generate tons of estimators by defining different cost functions....


3

I already answered your question here: https://stackoverflow.com/questions/33667275/fast-frequency-measurement/33678202#33678202 But, in summary, in certain circumstances, you can interpolate an FFT result to finer resolution that FFT bin spacing, thus allowing you to use a shorter data window for better time resolution. But FFT frequency is not pitch ...


3

Given data $ { \left\{ {x}_{i} \right\} }_{i = 1}^{N} $ the Empirical STD of the data is well defined: $$ STD = \sqrt{ \frac{1}{N - 1} \sum_{i = 1}^{N} { \left( {x}_{i} - \bar{x} \right) }^{2} } $$ Where $ \bar{x} $ is the empirical mean of the data given by: $$ \bar{x} = \frac{1}{N} \sum_{i = 1}^{N} {x}_{i} $$ Now, if there's a model on the data (Such ...


3

There are really great answers. I will try to give the Sequential Least Squares approach which generalizes to any Linear Model. Sequential Least Squares Model We're after solving the Linear Least Squares model: $$ \arg \min_{\boldsymbol{\theta}} {\left\| H \boldsymbol{\theta} - \boldsymbol{x} \right\|}_{2}^{2} $$ Now imagine that we have new measurement ...


3

Since your signal isn't sampled uniformly some strange things might happen when you apply FFT and look at the results. What you should do is estimate the Uniform DFT of the Non Uniform Time Series. One easy way to do it is use the reference code and analysis I posted on the question - Frequency Analysis of a Signal Without a Constant Sampling Frequency (...


3

Basically I'd do something like: $$ \frac{ {\sigma}_{2}^{2} }{ {\sigma}_{1}^{2} + {\sigma}_{2}^{2}} {r}_{1} + \frac{ {\sigma}_{1}^{2} }{ {\sigma}_{1}^{2} + {\sigma}_{2}^{2}} {r}_{2} $$ This is the optimal weighing given knowledge of the Variance only (Well, linear). Basically it assumes the cross correlation is 0. Derivation There are many ways to derive ...


2

I am not entirely sure what matlab's LASSO routine does so I started with Ordinary Least Squares (OLS) and worked backwards. From an OLS perspective X1 as you have it won't work. You've got a regressor that is as all ones, but your parameter inputs for you example data (r) doesn't contain an offset. Essentially your model doesn't fit you're data well, ...


2

Very intuitively, the Generalized Cross-Correlation is a "standard" cross-correlation of the windowed signals (I'll restrict myself to window-GCC, I'm pretty certain there's others, too!). Windowing happens to increase the "peakiness" of the cross-correlation. It's basically down to the same trade-off between temporal and spectral precision that you ...


2

changing the notation to something better, i think the summations have to go in both the numerator and denominator: $$ \hat{m} = \frac{\sum_n b[n]a^*[n]}{\sum_n a[n]a^*[n] - \sum_n \sigma^2_{N_a} } $$ This is a plot showing: The variation in choosing different $\sigma_{N_a}^2$ values from the true value. The true value is shown by the red line. Upshot: ...


2

Remarks The MMSE is Bayesian Framework. Namely it should be employed between random variables which have joint distribution. In your case it seems $ x \left[ n \right] $ is a deterministic parameter hence Parameter Estimation framework should be employed. Parameter Estimation In the case above it seems the Maximum Likelihood Estimation fits. Since the data ...


2

I'm going to assume that we have no information about how $X[n]$ varies with time, so we can just do one-at-time estimation of $X[n]$ using $Y_1[n]$ and $Y_2[n]$. One way to get an estimate from $Y_1$ and $Y_2$ is to average the measurements: $$ \hat{X}[n] = \frac{Y_1[n] + Y_2[n]}{2} $$ Using the fact that the sum of two independent Gaussian variables, $A$...


2

There are 3 major reasons in my opinion which makes the Maximum Likelihood Estimator so popular: Intuition It is very clear what's the logic behind this method and what you maximize. It makes sense even if you have little knowledge in probability and statistics. Properties It has great properties (Some are only asymptotically, namely with many samples) such ...


2

Coming up with a "good" estimator for a parameter of interest is not an easy task because it is important to define what good means. There are many ways of defining it, depending on your application. "Good" and "optimal" mean the same thing. Maximum likelihood (ML) estimation arises from one specific intuitively pleasing way of defining good: an estimator ...


2

I think you are going to be stuck with an iterative approach. $$ y = a (1-e^{-bt + c}) + d $$ First rewrite your equation like this: $$ y = g + h e^{-bt} $$ Where: $$ g = a + d $$ $$ h = -a e^c $$ You have a set of values $(t_n, y_n)$. Consider the $y$ values as a single vector $\vec Y $. Then pick an initial value for $b$ and construct a vector $\...


2

I understand your question like this You have new points $(x_i,y_i)$ coming in constantly, and would like to update the estimate of your slope $m$, analogously as you would with a running average (ie without computing the whole sums again for all the values). Suggestion Why don't you simply take the formula that is given in your link and split the terms ...


2

A simple solution is to calculate the first coefficient of a DFT of appropriate length, using the summation formula instead of FFT. To get amplitude and phase, transform the result to polar coordinates.


2

My guess would be that the DC peak is part of the transient response, thus it decreases to zero over time T as the oscillating parts of your signal continue. But I don't know what your signal is so that's a guess


2

I think I got the answer: I look at the step response of the system. $H(s) = \frac{1}{ms^2+ds+c}$ The limit of the step response equals my parameter $1/c$ $y(\infty)=\lim_{s\rightarrow 0} s\cdot \frac{1}{s} \cdot H(s) = \frac{1}{c}$ Using $c$ and $c/m$ from the measurements above I can calculate the mass $m$. I hope this is right, but the results ...


1

i actually had this as a problem for my master's thesis 4 decades ago. it was before i was doing anything in audio. the application was predicting the equilibrium pressure of a very slow osmosis experiment (where the time constant was about a minute). this was for a process ostensibly obeying this physical equation: $$ \frac{d}{dt}P(t) = k\big(P_\text{eq}...


1

Hi: In order to estimate the variance, you need to have an underlying model for your signal. So, suppose that the model is $y_{t+1} = y_t + \epsilon_t$ $~\forall ~ t = 1,\ldots n $. assuming that $E(\epsilon_t) = 0$ and $var(\epsilon_t) = \sigma^2$. In this case, you would difference your data in order to get estimates of $\epsilon_{t}$ at each time $t$, ...


1

Hi: I don't know about BJ or OE but, as far as the other three go, it REALLY MATTERS which one you choose because ARX has no MA or differencing terms, ARMAX has no differencing terms and ARIMAX has both. But, even within any of the three models, there are major choices to be made as far as A) the number of lags of y, the number of lags of X ( and, in the ...


1

Let's see: Maximum Likelihood (ML) - A Method to estimate parameters (MLE - Maximum Likelihood Estimator). Given a PDF of samples, what is the parameter value which maximizes the probability of the observations. Least Squares (LS) - Least Squares model for estimating parameters. Sometime coincides with the MLE (Usually in the case of Gaussian Noise). ...


1

Your true AR model is order 4. If an AR(16) model did a good job, then 12 of its parameters should be zero. Because of noise effects / overfitting, those 12 parameters are NOT zero and, more than likely, the other matching parameters will be more inaccurate because of this. Hence the error in an AR(16) will be larger than that for an AR(4) fit.


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