whiten1D


Description

whiten1D whitens input time-series. Whitening filter is constructed by a fitting procedure to the model provided. If no model is provided, a fit is made to a log-spectral-density estimate of the time-series (made using lpsd). Note: The function assumes that the input model corresponds to the one-sided psd of the data to be whitened.

Call

    b = whiten1D(a, pl)
    [b1,b2,...,bn] = whiten1D(a1,a2,...,an, pl);
  

Inputs

Outputs

Algorithm

  1. If no model provided, make lpsd of time-series and take it as a model for the data power spectral density
  2. Fit a set of partial fraction z-domain filters using utils.math.psd2wf. The fit is automatically stopped when the accuracy tolerance is reached.
  3. Convert to bank of MIIR filters.
  4. Filter time-series in parallel

Accuracy tolerance criteria

Parameters

parameters passed to lpsd()

Example

  % Generate white noise
  fs = 1;
  a = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', 10000, 'yunits','m'));

  % filter
  pzm = pzmodel(1e-2, {0.01}, {0.1});
  ft = miir(pzm,plist('fs',fs));

  % coloring white noise
  af = filter(a, ft);

  % Whitening colored noise
  pl = plist(...
      'model', [], ...
      'MaxIter', 30, ...
      'PoleType', 2, ...
      'MinOrder', 2, ...
      'MaxOrder', 9, ...
      'Weights', 2, ...
      'Plot', false,...
      'Disp', false,...
      'RMSEVar', 3,...
      'FitTolerance', 0.6); % tolerancee on fit residuals spectral flatness

  aw = whiten1D(af,pl);

  % Calculate psd of colored and whitened data
  afxx = af.psd;
  awxx = aw.psd;

  % plotting
  iplot(afxx,awxx)
  




©LTP Team