LMS Algorithm de-noising

Source: Internet
Author: User
Tags cos sin

LMS is widely used in speech enhancement, and is one of the most common algorithms, which is also the theoretical basis or component of many more complex algorithms, such as the important method--GSC (generalized sidelobe cancellation) in array speech enhancement. The LMS algorithm extends from the original version to many variant structures, such as normalized LMS, variable step LMS, and so on. These are some of the optimizations that have been made to the iterative parts of the LMS.

Recently saw the realization of the GSC, the previous written procedures again looked again, almost consolidated again, I hope I can not forget the I have this broken memory, sometimes really very helpless!

The first is the theoretical part derivation, which is not detailed here, briefly giving the process:

Adaptive linear combination and LMS schematic diagram

The MATLAB implementation program is as follows (variable step LMS):

clear;% working space cleanup
Close all% ...
sysorder=5;% Number of Taps ...
samples_per_period=50; % Cycle Sampling frequency
n=10*samples_per_period-1;% Total Sample Count
Signal=cos (Pi*0.02*[0:n-1]) +sin (2*pi*0.02*[0:n-1]) +cos (3*pi*0.02*[0:n-1]) +sin (4*pi*0.02*[0:n-1]) +cos (5*pi*0.02 *[0:n-1]) ...
+sin (6*pi*0.02*[0:n-1]) +cos (7*pi*0.02*[0:n-1]) +sin (8*pi*0.02*[0:n-1]) +cos (9*pi*0.02*[0:n-1]);% initial input signal/desired signal
Figure ()% first sub-graph of the drawing 1
Subplot (2,1,1);
Plot (signal);
Title (' Ideal input for adaptive filter ');
nvar=0.5;% Noise Variance
NOISE=NVAR*RANDN (1,n);% noise signal
x=signal+noise;% input signal with additive noise
Delayx=[0 x];% Input Signal delay
Subplot (2,1,2); the second sub-figure of the graph 1
Plot (Delayx);
Title (' Noise input for adaptive filter ');
Signal=[signal 0];
%m=32;% Filter Length
M=length (signal);%m to receive data length
mu=0.002;% Iteration Step
Totallength=size (x,1);% step
N=size (signal,2);%60 nodes as training sequences
The start of the% algorithm
W=zeros (sysorder,1);% initialization
For n=sysorder:n
Y (1:sysorder) =x (1:sysorder); % first five values are assigned to original values
Y (n) =x (n-sysorder+1:1:n) *w; % System Output
E (n) =y (n)-signal (n); % system error
If n<200
Step=mu./(1+abs (E (n)). ^2);
W=w+step*x (n:-1:n-sysorder+1) ' *e (n);% iterative equation
%initial_status=initlms (Zeros (1,m), mu),% filter Set initial value
%[y,e,initial_status]=adaptlms (x,signal,initial_status);%lms Adaptive Filter Output
Figure ()% first sub-graph of the drawing 2
Subplot (2,1,1);
Plot (0:n-1,y, ' R ', 1:n, signal, ' B ');
Title (' Comparison of the predicted signal to the actual signal ');
Legend (' Predictive signal ', ' actual signal ');
error=signal-y;% Output Error Signal
Subplot (2,1,2); the second sub-figure of the graph 2
Plot (error);
Title (' Predictive error of adaptive filter ');

The results of the simulation tracking filter graph show that the predicted signal can track the real signal transformation after the LMS convergence, and remove the noise signal (the signal with noise is not mapped). Where the prediction error is caused by misalignment of the signal, a delay is introduced in the program:

LMS Algorithm de-noising

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.