Computer exercise 3: Normalized Least Mean Square

Similar documents
Computer exercise 4: Fast Least Mean Square

COMPARATIVE STUDY OF VARIOUS FIXED AND VARIABLE ADAPTIVE FILTERS IN WIRELESS COMMUNICATION FOR ECHO CANCELLATION USING SIMULINK MODEL

Speech Enhancement Based On Noise Reduction

Performance Analysis of gradient decent adaptive filters for noise cancellation in Signal Processing

Acoustic Echo Cancellation for Noisy Signals

Performance Analysis of Feedforward Adaptive Noise Canceller Using Nfxlms Algorithm

DESIGN AND IMPLEMENTATION OF ADAPTIVE ECHO CANCELLER BASED LMS & NLMS ALGORITHM

Adaptive Line Enhancer (ALE)

MATLAB SIMULATOR FOR ADAPTIVE FILTERS

Design and Implementation on a Sub-band based Acoustic Echo Cancellation Approach

Acoustic Echo Cancellation using LMS Algorithm

Adaptive Systems Homework Assignment 3

IMPULSE NOISE CANCELLATION ON POWER LINES

Application of Affine Projection Algorithm in Adaptive Noise Cancellation

A Comparison of the Convolutive Model and Real Recording for Using in Acoustic Echo Cancellation

Optimal Adaptive Filtering Technique for Tamil Speech Enhancement

Audio Restoration Based on DSP Tools

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

Development of Real-Time Adaptive Noise Canceller and Echo Canceller

A Novel Adaptive Algorithm for

ROBUST echo cancellation requires a method for adjusting

Advanced Functions of Java-DSP for use in Electrical and Computer Engineering Senior Level Courses

A Three-Microphone Adaptive Noise Canceller for Minimizing Reverberation and Signal Distortion

Research of an improved variable step size and forgetting echo cancellation algorithm 1

Design and Evaluation of Modified Adaptive Block Normalized Algorithm for Acoustic Echo Cancellation in Hands-Free Communications

Analysis of LMS and NLMS Adaptive Beamforming Algorithms

Active Noise Cancellation in Audio Signal Processing

A New Method For Active Noise Control Systems With Online Acoustic Feedback Path Modeling

Acoustic echo cancellers for mobile devices

Evaluation of a Multiple versus a Single Reference MIMO ANC Algorithm on Dornier 328 Test Data Set

Implementation of Optimized Proportionate Adaptive Algorithm for Acoustic Echo Cancellation in Speech Signals

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

Architecture design for Adaptive Noise Cancellation

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

Acoustic Echo Cancellation: Dual Architecture Implementation

STUDY OF ADAPTIVE SIGNAL PROCESSING

Performance Analysis of Acoustic Echo Cancellation Techniques

Cancellation of Unwanted Audio to Support Interactive Computer Music

Acoustic Echo Reduction Using Adaptive Filter: A Literature Review

Adaptive Filters Application of Linear Prediction

Global Journal of Advance Engineering Technologies and Sciences

Comparative Study of Different Algorithms for the Design of Adaptive Filter for Noise Cancellation

IN357: ADAPTIVE FILTERS

Impulsive Noise Reduction Method Based on Clipping and Adaptive Filters in AWGN Channel

Lab 6. Advanced Filter Design in Matlab

ADAPTIVE NOISE CANCELLING IN HEADSETS

University Ibn Tofail, B.P. 133, Kenitra, Morocco. University Moulay Ismail, B.P Meknes, Morocco

ZLS38500 Firmware for Handsfree Car Kits

A variable step-size LMS adaptive filtering algorithm for speech denoising in VoIP

Multirate Algorithm for Acoustic Echo Cancellation

A REVIEW OF ACTIVE NOISE CONTROL ALGORITHMS TOWARDS A USER-IMPLEMENTABLE AFTERMARKET ANC SYSTEM. Marko Stamenovic

LMS and RLS based Adaptive Filter Design for Different Signals

Enhancement of Speech in Noisy Conditions

Digital Signal Processing ETI

Laboration Exercises in Digital Signal Processing

Modeling and Analysis of an Adaptive Filter for a DSP Based Programmable Hearing Aid Using Normalize Least Mean Square Algorithm

EE 422G - Signals and Systems Laboratory

GSM Interference Cancellation For Forensic Audio


ADAPTIVE ACTIVE NOISE CONTROL SYSTEM FOR SECONDARY PATH FLUCTUATION PROBLEM

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Digital Signal Processing ETI

Passive Inter-modulation Cancellation in FDD System

A Diffusion Strategy for the Multichannel Active Noise Control System in Distributed Network

AN AUTOREGRESSIVE BASED LFM REVERBERATION SUPPRESSION FOR RADAR AND SONAR APPLICATIONS

A VSSLMS ALGORITHM BASED ON ERROR AUTOCORRELATION

Project I: Phase Tracking and Baud Timing Correction Systems

Acoustic Echo Cancellation (AEC)

A FEEDFORWARD ACTIVE NOISE CONTROL SYSTEM FOR DUCTS USING A PASSIVE SILENCER TO REDUCE ACOUSTIC FEEDBACK

Analysis of LMS Algorithm in Wavelet Domain

Equalization of Audio Channels A Practical Approach for Speech Communication. Nils Westerlund

Design and Implementation of Adaptive Echo Canceller Based LMS & NLMS Algorithm

An Adaptive Feedback Interference Cancellation Algorithm for Digital On-channel Repeaters in DTTB Networks

Lab S-5: DLTI GUI and Nulling Filters. Please read through the information below prior to attending your lab.

Abstract of PhD Thesis

Analysis/synthesis coding

An Effective Implementation of Noise Cancellation for Audio Enhancement using Adaptive Filtering Algorithm

REAL-TIME PROCESSING ALGORITHMS

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 50, NO. 12, DECEMBER

REAL-TIME BLIND SOURCE SEPARATION FOR MOVING SPEAKERS USING BLOCKWISE ICA AND RESIDUAL CROSSTALK SUBTRACTION

University of New Hampshire InterOperability Laboratory Gigabit Ethernet Consortium

ECG Signal Denoising Using Digital Filter and Adaptive Filter

Hardware Implementation of Adaptive Algorithms for Noise Cancellation

George Mason University ECE 201: Introduction to Signal Analysis Spring 2017

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

Performance Evaluation of Adaptive Filters for Noise Cancellation

Pattern Recognition. Part 6: Bandwidth Extension. Gerhard Schmidt

AC : TEACHING ADAPTIVE FILTERS AND APPLICATIONS IN ELECTRICAL AND COMPUTER ENGINEERING TECHNOLOGY PRO- GRAM

Automotive three-microphone voice activity detector and noise-canceller

An Echo Canceller with Frequency Dependent NLP Attenuation

Adaptive Kalman Filter based Channel Equalizer

Noise Reduction Technique for ECG Signals Using Adaptive Filters

Brief Introduction to Signals & Systems. Phani Chavali

Performance Enhancement of Adaptive Acoustic Echo Canceller Using a New Time Varying Step Size LMS Algorithm (NVSSLMS)

Performance Evaluation of Adaptive Line Enhancer Implementated with LMS, NLMS and BLMS Algorithm for Frequency Range 3-300Hz

Case study for voice amplification in a highly absorptive conference room using negative absorption tuning by the YAMAHA Active Field Control system

Revision of Channel Coding

Filters. Phani Chavali

Dual Transfer Function GSC and Application to Joint Noise Reduction and Acoustic Echo Cancellation

A Novel Hybrid Technique for Acoustic Echo Cancellation and Noise reduction Using LMS Filter and ANFIS Based Nonlinear Filter

Transcription:

1 Computer exercise 3: Normalized Least Mean Square This exercise is about the normalized least mean square (LMS) algorithm, a variation of the standard LMS algorithm, which has been the topic of the previous computer exercise. The application example in this exercise is echo cancellation in long-distance telephony. Read the description of the application below before you start with the assignments. Echo cancellation in long-distance telephony long-distance telephone system short distance long distance hybrid 1 signal from subscriber A hybrid 2 short distance out 1 in 2 signal from/to subscriber A B line termination system B signal from/to subscriber B in 1 out 2 2-wire subscriber line signal from subscriber B 4-wire station-to-station 2-wire subscriber line Long-distance telephony employs four copper wires between two central offices. In each central office, a hybrid connects the four-wire circuit to the two-wire circuit used between the central office and the subscriber. The hybrid includes a balancing impedance in order to avoid echoes, as depicted in the figure above. The signal generated by subscriber A is transmitted from hybrid 1 to hybrid 2 via the path marked by out 1 and in 2. If the balancing impedance in hybrid 2 is perfect, there is no echo from subscriber A leaking back via out 2. However, in practice there is always an echo due to imperfect balancing. If the distance between the central offices is large enough, subscriber A receives an echo of her/his own signal. If the echo is received more than 100ms after speaking, it starts to severely disturb the communication.

2 u(n) from microphone, subscriber A long distance FIR filter adaptive algorithm to speaker, subscriber A ˆd(n) H(z) hybrid 2 Σ d(n) e(n) + + + Σ to speaker, subscriber B from microphone, subscriber B In order eliminate the echo, often an adaptive filter is used, which tries to model the behaviour of the hybrid characterized by H(z). Ideally, there would be no echo, i.e., H(z) = 0. In the picture shown above, hybrid 2 causes an echo of the signal of subscriber A. Estimating H(z), the echo of subscriber A can be predicted ( ˆd(n) ) and subtracted form the signal that returns to subscriber A ( e(n) ). If subscriber A and subscriber B talk at the same time, the adaptation is more difficult. In order to avoid convergence problems in the adaptive filter in case of double talk, the adaptation process is stopped, i.e., the coefficients are being frozen. In this computer exercise we assume that subscriber B is silent. Then e(n) is the residual echo, which the adaptive filter did not manage to eliminate. In order to assess the quality of an echo cancellation circuit, the measure ERLE (Echo Return Loss Enhancement) is used. ERLE as a function of the discrete-time index n is defined as the ratio of the instantaneous power of signal d(n) and the instantaneous power of the residual echo e(n): ( ) Pd (n) ERLE(n) = 10 log 10. P e (n) The instantaneous signal power can be estimated by squaring d(n) followed by a lowpass filter. In Matlab, ERLE is calculated as follows: calculation of ERLE hybrid output signal: d(n) residual echo: e(n)

3 filtering of squared signals (IIR-filter) Pd=filter(1,[1, -0.98],d.^2); Pe=filter(1,[1, -0.98],e.^2); ERLE erle=10*log10(pd./pe); ERLE is expressed in db. The higher the value, the better the echo canceller. Furthermore, ERLE as a function of the discrete-time index n provides information about the convergence behaviour of the canceller. The input signal of an echo canceller system is often a speech signal. Speech signals are non-stationary, which makes the choice of µ rather difficult. One advantage of the NLMS algorithm is the simple choice of its step size µ. Exercises Computer exercise 3.1 In order to lower the influence of the input signal amplitude on the gradient noise, the step size is scaled: µ is divided by the variance of the input signal u(n). In case the input signal is zero, a positive constant in the denominator prevents the step size from being infinite. This modification of the LMS is referred to as normalized LMS (NLMS), described by the following equations: e(n) = d(n) ŵ H (n)u(n) µ ŵ(n + 1) = ŵ(n) + a + u H (n)u(n) u(n)e (n), where 0 < µ < 2 is the step size and a is a positive constant. Program the NLMS algorithm according to these equations! function [e,w]=nlms(mu,m,u,d,a); Normalized LMS Call: [e,w]=nlms(mu,m,u,d,a); Input arguments: mu = step size, dim 1x1 M = filter length, dim 1x1 u = input signal, dim Nx1 a = constant, dim 1x1

4 Output arguments: e = estimation error, dim Nx1 w = final filter coefficients, dim Mx1 Computer exercise 3.2 Create a function that calculates ERLE given the residual error e(n) and the output signal of the hybrid d(n)! function [r]=erle(e,d); Call: erle=erle(e,d); Input arguments: e = residual echo, dim Nx1 d = hybrid output signal, dim Nx1 Output arguments: erle = ERLE(n) in db, n=1..n, dim Nx1 Computer exercise 3.3 Download and unzip the file CE3data.tar.gz from the course web page. Load the file on the Matlab workspace by typing load hybrid_noise.mat. Now you have the input signal to the hybrid and the echo canceller inuand the output signal ind. The input signal is coloured noise. Determine the maximum step size of the LMS applied to the echo canceller with M=128 coefficients. Apply the thumb rule µ < 2, which is calculated Mr(0) in Matlab by mu_crit=2/(m*var(u)) Test the LMS applied to the echo canceller with M=128 and a value for µ that guarantees convergence and allows the fastest adaptation possible. The input signal and the desired signal are u and d, respectively. In order to investigate the convergence behaviour, use the function erle! Computer exercise 3.4 Now you shall apply the NLMS for adapting the echo canceller. Investigate, which µ is best. Use a 0.01. If you have found a suitable µ, compare the ERLE of LMS and NLMS. This can be done by typing run the adaptive echo cancellers with the corresponding parameters (...)

5 [e_a,w_a]=lms(...); [e_b,w_b]=nlms(...); evaluate the ERLE curves erle_a=erle(e_a,d); erle_b=erle(e_b,d); plot both curves in one plot LMS blue, NLMS red plot([1:length(d)],erle_a, b,[1:length(d)],erle_b, r ); xlabel( Sampel );ylabel( ERLE [db] ) The curves looks rather similar. If there is a difference, NLMS is superior, i.e., its ERLE exceeds the ERLE of the LMS and grows quicker. Listen to the residual echo! Use soundsc(e_a) and soundsc(e_b), respectively. Computer exercise 3.5 The signal used in the previous exercises is stationary. You shall now apply a non-stationary signal: A speech signal of the Swedish phrase Detta är en test signal ( This is a test signal ). This signal is stored in hybrid_speech.mat. Find the maximum µ, the LMS can use to adapt the echo canceller. Why is the match of the thumb rules worse compared to the previous exercise? Choose a value for µ that guarantees convergence and allows the quickest adaptation possible. Computer exercise 3.6 Now apply the NLMS. Choose µ such that it results in the quickest convergence. Compare the ERLE-curves of LMS and NLMS! Compare the residual echoes by listening. Finally, answer the following questions: What makes the choice of a step size for the NLMS easier? Why does the NLMS work better than the LMS for input signals with a strongly varying amplitude?

6 Program Code Normalized LMS function [e,w]=nlms(mu,m,u,d,a); Normalized LMS Call: [e,w]=nlms(mu,m,u,d,a); Input arguments: mu = step size, dim 1x1 M = filter length, dim 1x1 u = input signal, dim Nx1 a = constant, dim 1x1 Output arguments: e = estimation error, dim Nx1 w = final filter coefficients, dim Mx1 intial value 0 w=zeros(m,1); input signal length N=length(u); make sure that u and d are colon vectors u=u(:); d=d(:); NLMS for n=m:n uvec=u(n:-1:n-m+1); e(n)=d(n)-w *uvec; w=w+mu/(a+uvec *uvec)*uvec*conj(e(n)); end