Trying to create autocorrelated random series
Mostrar comentarios más antiguos
I have a normalized autocorrelation function C(t) = exp(-t/tau), where tau is a constant. I also have a function, f(n_samples), for generating an array of random uncorrelated data with the desired distribution. How do I create a time series with sample interval, dt, that is autocorrelated given C(t), and the random distribution?
Thanks,
Patrick
Respuestas (1)
Shashank Prasanna
el 20 de En. de 2013
Editada: Shashank Prasanna
el 20 de En. de 2013
0 votos
I would start with creating an AR model whose error terms come from your f(n_samples) function. Estimate the model to create data and plot the auto-correlation function (autocorr function in the econ toolbox, or write your own/ find in file central submission).
I would set this up as an optimization problem where we would minimizes the error between the ACF and C(t) for the parameters for the AR model. I am not sure if there is a function that does what you ask automatically, but this should work.
2 comentarios
Patrick
el 21 de En. de 2013
Shashank Prasanna
el 21 de En. de 2013
The AR (Autoregressive) model I mentioned is a digital filter, think of it as an IIR filter. The summary of what I said above is that you have to find the coefficients of this filter, such that it will produce correlated signal, defined by C(t). But how do we find these coefficients? That is the question I tried to answer by optimization. I am unsure if there is a quicker or an established way though.
Categorías
Más información sobre Linear Predictive Coding en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!