| LTPDA Toolbox™ | contents | ![]() |
BUILDWHITENER1D builds a whitening filter based on the input frequency-series. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION:BUILDWHITENER1D builds a whitening filter based on the input frequency-series. The filter is built by fitting to the model provided. If no model is provided, a fit is made to a spectral-density estimate of the input time-series (made using psd+bin_data or lpsd). Note: The function assumes that the input model corresponds to the one-sided psd of the data to be whitened. ALGORITHM: 1) If no model provided, make psd+bin_data or 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 array of MIIR filters 4) Assemble into a parallel filterbank object CALL: b = buildWhitener1D(a, pl) [b1,b2,...,bn] = buildWhitener1D(a1,a2,...,an, pl); INPUT: - as is a time-series analysis object or a vector of analysis objects - pl is a plist with the input parameters OUTPUT: - b "whitening" filters, stored into a filterbank. Parameters Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| Method Details | |
|---|---|
| Access | public |
| Defining Class | ao |
| Sealed | 0 |
| Static | 0 |
| Sets for this method … |
|---|
| Default |
| PSD |
| LPSD |
Default |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| buildWhitener1D | |||
| RANGE | [] | none | The frequency range to evaluate the fitting. An empty value or [-inf inf] will include the whole range. The remaining part of the model will be completed according to the option chosen in the 'complete' parameter. |
| COMPLETE_HF | 'flat' |
|
Choose how to complete the frequency range up to fs/2.
|
| FS | [] | none | The sampling frequency to design the output filter on. If it is not a positive number, it will be taken from the model |
| MAXITER | 30 | none | Maximum number of iterations in fit routine. |
| POLETYPE | 1 |
|
Choose the pole type for fitting:
|
| MINORDER | 2 | none | Minimum order to fit with. |
| MAXORDER | 25 | none | Maximum order to fit with. |
| WEIGHTS | '1/abs' |
|
Choose weighting method:
|
| PLOT | 0 |
|
Plot results of each fitting step. |
| DISP | 0 |
|
Display the progress of the fitting iteration. |
| MSEVARTOL | 0.10000000000000001 | none | Mean Squared Error Variation - Check if the relative variation of the mean squared error is smaller than the value specified. This option is useful for finding the minimum of Chi-squared. |
| FITTOL | 0.01 | none | Mean Squared Error Value - Check if the mean squared error value is lower than the value specified. |
| RAND_STREAM | [] | none | Internal MATLAB state of the pseudorandom number generator. You can set the state with a structure which should contain all properties of the MATLAB class RandStream |
Example |
|---|
| plist('RANGE', [[]], 'COMPLETE_HF', 'flat', 'FS', [[]], 'MAXITER', [30], 'POLETYPE', [1], 'MINORDER', [2], 'MAXORDER', [25], 'WEIGHTS', '1/abs', 'PLOT', [false], 'DISP', [false], 'MSEVARTOL', [0.10000000000000001], 'FITTOL', [0.01], 'RAND_STREAM', [[]]) |
back to top
PSD |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| buildWhitener1D | |||
| MODEL | 'PSD' | none | A model estimation technique in the case of tsdata input: |
| RANGE | [] | none | The frequency range to evaluate the fitting. An empty value or [-inf inf] will include the whole range. The remaining part of the model will be completed according to the option chosen in the 'complete' parameter. |
| COMPLETE_HF | 'flat' |
|
Choose how to complete the frequency range up to fs/2.
|
| FS | [] | none | The sampling frequency to design the output filter on. If it is not a positive number, it will be taken from the model |
| MAXITER | 30 | none | Maximum number of iterations in fit routine. |
| POLETYPE | 1 |
|
Choose the pole type for fitting:
|
| MINORDER | 2 | none | Minimum order to fit with. |
| MAXORDER | 25 | none | Maximum order to fit with. |
| WEIGHTS | '1/abs' |
|
Choose weighting method:
|
| PLOT | 0 |
|
Plot results of each fitting step. |
| DISP | 0 |
|
Display the progress of the fitting iteration. |
| MSEVARTOL | 0.10000000000000001 | none | Mean Squared Error Variation - Check if the relative variation of the mean squared error is smaller than the value specified. This option is useful for finding the minimum of Chi-squared. |
| FITTOL | 0.01 | none | Mean Squared Error Value - Check if the mean squared error value is lower than the value specified. |
| RAND_STREAM | [] | none | Internal MATLAB state of the pseudorandom number generator. You can set the state with a structure which should contain all properties of the MATLAB class RandStream |
| psd | |||
| NFFT | -1 | none | The number of samples in each fft [default: length of input data]. A string value containing the variable 'fs' can also be used, e.g., plist('Nfft', '2*fs') |
| WIN | 'Hanning' |
|
The window to be applied to the data to remove the discontinuities at edges of segments. [default: taken from user prefs] Only the design parameters of the window object are used. Enter a string value containing the window name e.g. plist('Win', 'Kaiser', 'psll', 200) plist('Win', 'BH92') |
| PSLL | 200 | none | The peak sidelobe level for Kaiser windows. Note: it is ignored for all other windows |
| OLAP | 50 | none | The segment percent overlap [-1 == take from window function] |
| ORDER, N | 1 | none | The order of segment detrending:
|
| NAVS | 16 | none | Force number of averages. If set, and if Nfft was set to 0 or -1, the number of points for each window will be calculated to match the request. |
| DROP WINDOW SAMPLES | 1 |
|
Drop the recommended (by the window) number of samples of the final computed spectral series. |
| TIMES, SPLIT | [] | none | The time range to analyze. If not empty, sets the time interval to operate on. As in ao/split, the interval can be specified by:
|
| MASK | [] | none | Mask out segments in the averaging process. The mask should be a vector of logical values, one value per segment being averaged. The plist method [psdSegments] can be used to generate a default mask for your PSD settings. If empty, all segments will be included in the average. |
| SCALE | 'PSD' |
|
The scaling of output. Choose from:
|
| bin_data | |||
| METHOD | 'MEAN' | none | method for binning. Choose from:
|
| XSCALE | 'LOG' |
|
scaling of binning. Choose from:
|
| RESOLUTION | 50 | none | When setting logaritmic x scale, it sets the number of points per decade. When setting linear x scale, it sets the number of points. |
| XVALS | [] | none | List of x values to evaluate the binning between. It may be a vector or an ao, in which case it will take the x field |
| INHERIT_DY | 1 |
|
Choose what to do in the case of mean, and bins with only one point. Choose from:
|
Example |
|---|
| plist('MODEL', 'PSD', 'RANGE', [[]], 'COMPLETE_HF', 'flat', 'FS', [[]], 'MAXITER', [30], 'POLETYPE', [1], 'MINORDER', [2], 'MAXORDER', [25], 'WEIGHTS', '1/abs', 'PLOT', [false], 'DISP', [false], 'MSEVARTOL', [0.10000000000000001], 'FITTOL', [0.01], 'RAND_STREAM', [[]], 'NFFT', [-1], 'WIN', 'Hanning', 'PSLL', [200], 'OLAP', [50], 'ORDER', [1], 'NAVS', [16], 'DROP WINDOW SAMPLES', [true], 'TIMES', [[]], 'MASK', [[]], 'SCALE', 'PSD', 'METHOD', 'MEAN', 'XSCALE', 'LOG', 'RESOLUTION', [50], 'XVALS', [[]], 'INHERIT_DY', [true]) |
back to top
LPSD |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| buildWhitener1D | |||
| MODEL | 'LPSD' | none | A model estimation technique in the case of tsdata input: |
| RANGE | [] | none | The frequency range to evaluate the fitting. An empty value or [-inf inf] will include the whole range. The remaining part of the model will be completed according to the option chosen in the 'complete' parameter. |
| COMPLETE_HF | 'flat' |
|
Choose how to complete the frequency range up to fs/2.
|
| FS | [] | none | The sampling frequency to design the output filter on. If it is not a positive number, it will be taken from the model |
| MAXITER | 30 | none | Maximum number of iterations in fit routine. |
| POLETYPE | 1 |
|
Choose the pole type for fitting:
|
| MINORDER | 2 | none | Minimum order to fit with. |
| MAXORDER | 25 | none | Maximum order to fit with. |
| WEIGHTS | '1/abs' |
|
Choose weighting method:
|
| PLOT | 0 |
|
Plot results of each fitting step. |
| DISP | 0 |
|
Display the progress of the fitting iteration. |
| MSEVARTOL | 0.10000000000000001 | none | Mean Squared Error Variation - Check if the relative variation of the mean squared error is smaller than the value specified. This option is useful for finding the minimum of Chi-squared. |
| FITTOL | 0.01 | none | Mean Squared Error Value - Check if the mean squared error value is lower than the value specified. |
| RAND_STREAM | [] | none | Internal MATLAB state of the pseudorandom number generator. You can set the state with a structure which should contain all properties of the MATLAB class RandStream |
| lpsd | |||
| WIN | 'Hanning' |
|
The window to be applied to the data to remove the discontinuities at edges of segments. [default: taken from user prefs] Only the design parameters of the window object are used. Enter a string value containing the window name e.g. plist('Win', 'Kaiser', 'psll', 200) plist('Win', 'BH92') |
| PSLL | 200 | none | The peak sidelobe level for Kaiser windows. Note: it is ignored for all other windows |
| OLAP | -1 | none | The segment percent overlap [-1 == take from window function] |
| ORDER, N | 0 |
|
The order of segment detrending:
|
| DROP WINDOW SAMPLES | 1 |
|
Drop the recommended (by the window) number of samples of the final computed spectral series. |
| TIMES, SPLIT | [] | none | The time range to analyze. If not empty, sets the time interval to operate on. As in ao/split, the interval can be specified by:
|
| MASK | [] | none | Mask out segments in the averaging process. The mask should be a vector of logical values, one value per segment being averaged. The plist method [psdSegments] can be used to generate a default mask for your PSD settings. If empty, all segments will be included in the average. |
| KDES | 100 | none | The desired number of averages. |
| JDES | 1000 | none | The desired number of spectral frequencies to compute. |
| LMIN | 0 | none | The minimum segment length. |
| SCALE | 'PSD' |
|
The scaling of output. Choose from:
|
Example |
|---|
| plist('MODEL', 'LPSD', 'RANGE', [[]], 'COMPLETE_HF', 'flat', 'FS', [[]], 'MAXITER', [30], 'POLETYPE', [1], 'MINORDER', [2], 'MAXORDER', [25], 'WEIGHTS', '1/abs', 'PLOT', [false], 'DISP', [false], 'MSEVARTOL', [0.10000000000000001], 'FITTOL', [0.01], 'RAND_STREAM', [[]], 'WIN', 'Hanning', 'PSLL', [200], 'OLAP', [-1], 'ORDER', [0], 'DROP WINDOW SAMPLES', [true], 'TIMES', [[]], 'MASK', [[]], 'KDES', [100], 'JDES', [1000], 'LMIN', [0], 'SCALE', 'PSD') |
back to top
| Some information of the method ao/buildWhitener1D are listed below: | |
|---|---|
| Class name | ao |
| Method name | buildWhitener1D |
| Category | Signal Processing |
| Package name | ltpda |
| Can be used as modifier | 1 |
| Supported numeric types | {'double'} |
|
Method: ao/blrms | Method: ao/cdfplot | ![]() |
©LTP Team