Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Five reference frequency domain subband adaptive echo cancellation filter

Discussion

Subband Kalman based multi-reference echo canceler with support for multiple input channels.

I/O Pins

This module works in conjunction with the WOLA filterbank modules and accepts complex data. The default module has two input pins, and one output pin. The first input can have any number of microphone signals. The second input is for the reference channels, which can be any number depending on the module used.

...

The reference signals and states are shared among the microphones, saving memory and MIPS over using several instances. The error output pin will have one channel per microphone input.

User Parameters

At instantiation time the maximum number of taps must be defined. The number of taps actually used is runtime parameter numTaps, found in the module inspector or the module properties view. numTaps allows you to vary the filter length at runtime to verify performance and CPU load.

...

The FFTSize parameter is set at instantiation and used to calculate an internal adaptation constant. This is normally the FFT size of the WOLA Analysis module upstream of this module. FFTSize is often (blocksize-1) * 2 unless sub bands are split to multiple AECs.

Optional Input Pins

Additional input pins can be enabled with resetPinsEn. These control pins can be used to modify the behavior of the module at runtime, as described below:

...

freeze: This pin must have one INT32 value per microphone channel. A non-zero value will freeze adaptation of the filter weights for that channel. The existing frozen filter weights will continue to be applied, but the RNS weights will reset since they are highly dependent on reference levels.

Optional Output Pins

Three module arguments can be used to add rns weights and debug outputs.

...

The PXTerm array is complex, and is ordered per channel as [b1t1x1 b1t1x2... b1t1xX b1t2x1 ... b1tTx1 ... bBtTxX], where t# is tap number, T is maxTaps, b# is bin number, B is number of input bins, x is the cross term number, and X is the number of cross terms.

Type Definition

Code Block
typedef struct _ModuleSbKalmanAEC5RefV1
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 maxTaps;                                // Maximum length of the filter
    INT32 numTaps;                                // Current length of the filter
    FLOAT32 V;                                    // Adaptation constant
    FLOAT32 smoothingTime;                        // Time constant of the smoothing process.
    FLOAT32 A;                                    // Smoothing factor
    FLOAT32 p0;                                   // Starting value for covariance estimate
    INT32 enableRNS;                              // Enable residual noise suppression
    INT32 firstRun;                               // First run for setting P from p0 on startup
    FLOAT32 FFTSize;                              // FFT Size used for WOLA (WOLA numBins)
    INT32 stateIndex;                             // Circular buffer index. [0 numTaps-1]
    INT32 logicInputsEnabled;                     // track if reset input pins are enabled
    INT32 enableW2Output;                         // tracker for rns weight output enable
    INT32 enableWOutput;                          // tracker for aec weight output enable
    INT32 enablePVOutput;                         // tracker for rns weight output enable
    INT32 scratchIndex;                           // tracker for which pin scratch is on
    INT32 RNS_numPoints;                          // Number of values in the lookup table. The total table size is [maxPoints 2].
    INT32 RNS_order;                              // Order of the interpolation. This can be either 2 (for linear) or 4 (for pchip).
    FLOAT32* WW1;                                 // Adaptive filter coefficients.
    FLOAT32* P;                                   // Real estimation error covariance matrix.
    FLOAT32* PXTerm;                              // Estimation error covariance matrix - the off-diagonal terms.
    FLOAT32* CC;                                  // Complex state variables (previous inputs).
    FLOAT32* corrC;                               // Stores all the correlation between reference signals per bin and tap - diagonal part. Real number.
    FLOAT32* corrCXTerm;                          // Correlation between ref channels - the off-diagonal terms.
    FLOAT32* W2;                                  // Residual noise suppression weights.
    FLOAT32* RNS_table;                           // Lookup table. The first row is the X values and the second row is the Y values.
    FLOAT32* RNS_polyCoeffs;                      // Interpolation coefficients returned by the grid control.
} ModuleSbKalmanAEC5RefV1Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

maxTaps

int

const

0

16

Unrestricted

samples

numTaps

int

parameter

0

16

1:1:16

samples

V

float

derived

0

0.97154

Unrestricted

smoothingTime

float

parameter

0

30

0.1:1000

sec

A

float

derived

0

1

0:1

p0

float

parameter

0

1

Unrestricted

enableRNS

int

parameter

0

1

0:1:1

firstRun

int

state

0

0

Unrestricted

FFTSize

float

derived

1

512

Unrestricted

stateIndex

int

state

1

0

Unrestricted

logicInputsEnabled

int

const

1

0

Unrestricted

enableW2Output

int

const

1

0

Unrestricted

enableWOutput

int

const

1

0

Unrestricted

enablePVOutput

int

const

1

0

Unrestricted

scratchIndex

int

const

1

3

Unrestricted

RNS_numPoints

int

const

1

7

4:1:1000

RNS_order

int

const

1

2

2:2:4

WW1

float*

state

0

[80 x 32]

Unrestricted

P

float*

state

0

[80 x 32]

Unrestricted

PXTerm

float*

state

0

[160 x 32]

Unrestricted

CC

float*

state

0

[80 x 32]

Unrestricted

corrC

float*

state

0

[80 x 32]

Unrestricted

corrCXTerm

float*

state

0

[160 x 32]

Unrestricted

W2

float*

state

0

[32 x 1]

Unrestricted

RNS_table

float*

parameter

1

[2 x 7]

Unrestricted

RNS_polyCoeffs

float*

state

1

[4 x 6]

Unrestricted

Pins

Input Pins

Name: dataIn

Description: Mic inputs

...

Sample rate range: Unrestricted

Complex support: Complex

Output Pins

Name: errorSignal

Description: Error signal = difference between filter output and each channels data input

Data type: float

Scratch Pins

Channel count: 1

Block size: 26

Sample rate: 48000

MATLAB Usage

File Name: sb_kalman_aec_5ref_v1_module.m

...