Filling data gaps in a periodic timeseries in MATLAB
12 Ansichten (letzte 30 Tage)
I am looking for a method to fill in data gaps in a time-series that contains periodic data (in this case with a frequency equal to a tidal frequency, so both semi-diurnal and spring/neap frequencies) using MATLAB. The data series also contains noise which I would like to superimpose on top of the artificial data that fills the time gap. The data has a certain trend that I want to preserve. Ideally I would be looking at a method that uses the recorded data on either side of the time gap. The data files are too large to post here. However the sampling rate is 5 mins and there is approximately a week worth of data missing.
Is there anyway of doing this in Matlab?
Bruno Pop-Stefanov am 24 Okt. 2014
Bearbeitet: Bruno Pop-Stefanov am 24 Okt. 2014
This is definitely not an easy problem. There are several ways you can go about this.
1) Curve Fitting
The easiest method would be to try to fit a curve to the data you have. Curve Fitting Toolbox has an app that allows you to quickly try different models, adjust parameters, and immediately see whether you found a good fit or not. The downside of this method would be that it only estimates the parameters of a curve. It won't estimate the noise. You'll get a smooth curve for the week of missing points, instead of noisy measurements.
Read more here:
There are also numerous other examples listed here:
2) Time Series Regression
A better approach would be to estimate your time series as an auto-regressive model (AR, MA, ARMA, ARMAX, GARCH, or others). Econometrics Toolbox provides tools for estimation, simulation and forecasting of time series.
Take a look at the examples on this page and see if you could adapt something your problem:
I am not sure whether you can use the left and right ends of your data to estimate a model at once, or if you can only use once at a time.