WLANA

From STX Wiki
Jump to navigationJump to search

WLANA - general wavelet analysis

A general wavelet analysis SPAtom (Project: MBBM/VA - WLLib).

Usage:

SPU WLANA WAVE HOPSIZE ITYPE MAXSIZE FTYPE FCNT FPAR1 FPAR2 WTYPE F0 ACUT ORDER USEDS OTYPE AMAX AREF

Inputs:
WAVE
The input signal wave item (mono)
HOPSIZE
The distance between frames in samples
ITYPE
The input frame alignment (values: BEGIN, CENTER)
MAXSIZE
The maximum signal queue length
FTYPE
The frequency bin definition type (values: RANGEQ, RANGED, DELTA, QUOTIENT, VECTOR)
FCNT
The number of bins. The default is 1.
FPAR1, FPAR2
The frequency bin definition parameters
WTYPE
The type of wavelet function. The following values are supported:
MORLET|GAUSSGENERAL|LAPLACE|GAUSSNDERIV|MEXICANHAT|GOUPILLAUD|MORLETII
F0
The number of sin/cos cycles per window. It should be in the range 2<F0<7. This parameter has no meaning for wavelet types GAUSSNDERIV and MEXICANHAT. The default is 5.
ACUT
The filter length relative to the Gaussian function. The value should be in the range 1<ACUT<3. The default is 3.
ORDER
Only used for GAUSSGENERAL and GAUSSNDERIV wavelets.The default is 2. For GAUSSGENERAL wavelets, ORDER is the exponent (power) and must be >= 1 and in the range 1<ORDER<4. For GAUSSNDERIV wavelets, ORDER is the derivation order and must be >=1 and is converted to the nearest integer.
USEDS
The use downsampling (values: YES, NO). If turned on,
OTYPE
The type of output spectrum (values: REALIMAG|LINAMPPHASE|LOGAMPPHASE)
AMAX
An amplitude value > 0. The default is 1.
AREF
A reference amplitude > 0. The default is 1.
Outputs:
Y1
The real part or amplitude
Y2
The imaginary part or phase
F
The frequency bins
LMAX
The maximum frame length in samples
I
The number of processed frames
N
The maximum number of frames
SR
The sampling rate in Hz
Function:

Downsampling

If enabled, the wavelet spectrum is computed from the highest to the lowest bin (nFBins-1, .., 0) and on each bin i where f[i] fulfills the switch criterion defined below, a 1:2 downsampling is applied to the signal.

switch criterion:

5505.png

where:

f[i] - frequency of bin i

dSRate - sampling rate

dDFStep - normalized downsampling step switch frequency

D - current number of downsampling steps, starts with 0 (= no downsampling) and is incremented by 1 for each downsampling step

A FIR filter is used for anti-aliasing. The length of this filter depends on the cutoff frequency (parameter dDFCut). The downsampling frequency parameters are normalized frequencies (= scaled by 1/dSRate).

Each downsampling step increases the frame length in the following way:

5506.png

where:

LD - maximum frame length for step D (=nDown..1); Note: LnDown is the length of the wavelet for the lowest frequency bin at the highest downsampling step

L0 - is the required frame length for the original sampling rate

M - number of filter coefficients (half filter length)

Navigation menu

Personal tools