Click here to return to the Filters section.
This module implements the Modified Filtered-X LMS algorithm which is an adaptive FIR filter based on minimizing the least mean squared value of the error signal. The algorithm is applied to noise cancellation applications where it takes into account the fact that the point of cancellation is not at the anti-noise output speaker but at the position of the error microphone. The module provides a training mode which enables training and estimating the secondary paths between the output speakers and the error microphones as FIR filter coefficients. These coefficients are then used in the run-time mode of the module to take into account the paths and provide effective noise cancellation based on the reference inputs.
The module can be found at the below location in the tree tool box:
The above figure shows the block diagram of the MFxLMS system where,
the coefficient update equation is given as:
W(n)= W(n-1)+ step size *(e(n-1)* xf(n-1))
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Reference | dec- audio | Reference noise signal. |
Pin 1: Error | dec- audio | Error signal. |
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Anti-Noise | decimal - audio | Anti-Noise Signal |
Pin 1: Mean Square Error | decimal - audio | Mean square error signal. |
The reference, error and anti-noise can be grown independently. Undo and Redo will not be supported for this module's growth functionality.
The module features two modes
The modes can be selected by selecting the appropriate mode tab in the MFXLMS settings form.
NOTE: Changing modes requires a re-download operation to be performed.
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Current Output | 0 | 0-Number of Outputs-1 | Output selection for which secondary paths are to be estimated |
Step Size | 0.9 | 0.000001- 0.999999 | LMS step size |
Start | 0 | 0/1 | Starts or stops secondary path training |
Upload | - | - | Opens up SP coefficient form from where SP coefficients can be saved |
Secondary Path Filter Length | 32 | 8-256 | Secondary path LMS filter tap length |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Filter Length | 32 | 8-256 | MFXLMS Filter length |
Step Size | 0.9 | 0.000001- 0.999999 | LMS step size |
Pause | 0 | 0/1 | Pause or resume MFXLMS coefficient update |
Reset | 0 | 0/1 | Resets the MFXLMS Filter coefficients and states |
Initial LMS Coefficients | - | - | Opens up LMS coefficient form from where the initial LMS coefficients can be loaded |
Current LMS Coefficients | - | - | Opens up LMS coefficient form from where the current converged LMS coefficients can be saved to a text file |
GUI Control Name | Compiler Name | Function Description |
---|
coeffsSP | MFxLMSS300Alg1coeffsSP1 | Secondary path LMS filter coefficient set |
StepSizeSP | MFxLMSS300Alg1StepSizeSP1 | Secondary path LMS filter step size |
Start | MFxLMSS300Alg1Start1 | Start Secondary path LMS training |
currentOutput | MFxLMSS300Alg1CurrentOutput1 | Output selection for secondary path training |
GUI Control Name | Compiler Name | Function Description |
---|---|---|
coeffs | MFxLMSS300Alg1coeffs1 | Run-time LMS filter coefficient set |
coeffsSP | MFxLMSS300Alg1coeffsSP1 | Secondary path LMS filter coefficient set |
StepSizeLMS | MFxLMSS300Alg1StepSizeLMS1 | Run-time LMS filter step size |
Pause | MFxLMSS300Alg1Pause1 | Pause/resume LMS training |
Reset | MFxLMSS300Alg1Reset1 | Reset LMS Filter |
Here,
This section demonstrates active noise cancellation using the MFXLMS filter module. The module is run at a lower sample rate of 2000Hz by means of a down-sampling module, the output is later up-sampled to the input sample rate by means of a up sampling module.The down and up sampling module chain is constructed in hierarchy boards as show below. the Anti- aliasing filters are included in the signal chain.
The below schematic shows the module in the training mode. The inputs are muted. To obtain the secondary path coefficients, the training tab is opened in the form, the tap length, step size and the output selection is set and the module is downloaded in the training mode. To start the training the start button is clicked. The training is stopped by clicking on the stop button. Then click on Upload button, the coefficients will be displayed in a window. This can be saved in a text file.
The below schematic shows the module in the run time mode. The Run-time LMS tap-length, Step size are set. The Secondary path coefficients can be set by using the file exported in the training mode. The input reference approximates the error signal to be cancelled. The error microphone output is fed to the error pin( this error input is the residual from the destructive interference between the noise and the anti-noise signal in the acoustic domain). The Anti noise pin is connected to the cancellation speaker to cancel the noise in the acoustic domain. The schematic is link compile downloaded. The mean square error pin is monitored to observe the drop in the error levels indicating noise cancellation.
On convergence, the LMS coefficients may be read and saved to a text file by clicking the current LMS coefficients button. These coefficients can be loaded as the initial LMS coefficients using the initial LMS coefficients for faster convergence.