| LTPDA Toolbox | contents | ![]() |
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.
b = whiten1D(a, pl)
[b1,b2,...,bn] = whiten1D(a1,a2,...,an, pl);
Accuracy tolerance criteria
% 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)
|
Noise whitening | whiten2D | ![]() |
©LTP Team