LMS adaptive Viner filter

Source: Internet
Author: User
Tags apm

I. background

The Gini filter parameters are fixed and suitable for Stable Random Signals. Kalman filter parameters are time-varying and suitable for non-Stable Random Signals. However, the two filters can obtain optimal filtering only when the statistical characteristics of signal and noise are a prior known. In practical applications, we often cannot obtain a prior knowledge of the statistical characteristics of signals and noise. In this case, the adaptive filtering technology can achieve excellent filtering performance, so it has good application value. Common adaptive filtering technologies include least mean square (LMS) adaptive filter, Recursive Least Square (RLS) filter, lattice filter, and Infinite Impulse Response (IIR) filter. The application of these adaptive filtering technologies includes Adaptive Noise Cancellation, adaptive spectral line enhancement, and ripple.

Ii. Theoretical knowledge of LMS adaptive question filter

 

 

 

Iii. MATLAB simulation using the above conclusions

First, use the built-in Matlab function to read and save a piece of audio, and then add Gaussian white noise interference to it to filter the processed signal LMS algorithm. And generate and save the corresponding audio files. We can view the effect of LMS Filtering in two ways: audio audition and image observation.

M script code

1% -- 14-10-25 -- % 2% function: LMS adaptive noise offset 3% inputs: 4% outputs: 5 clc; 6 clear; 7 [ref, FS] =wavread('in.wav '); 8 APM = 1; % noise margin 9 firlen = 160; % defined filter length 10 mu = 0.002; % iteration step 11 A = zeros (1, firlen ); % generate a row with a 160 column vector 12 datalen = length (REF); % assign a value to ref signal vector 13 eout = zeros (1, datalen ); % generates a column of datalen vectors with a value of 14 E = zeros (1, datalen); 15 firin = zeros (1, firlen); 16 firout = zeros (1, datalen ); 17 noise = APM * rand (1, datalen); % generate random noise 18 near = ref '+ noise; % add noise 19 for I = firlen: datalen20 firout (I) = A * (near (I-firlen + 1: I) '; % FIR filter, realize Horizontal Filter operation 21 E (I) = REF (I) -firout (I); % returns the error signal 22 A = a + 2 * mu * E (I) * (near (I-firlen + 1: I )); % LMS coefficient updated 23 eout (I) = E (I) * E (I); 24 end25 wavwrite(firout,fs,'firout.wav '); 26 wavwrite(eout,fs,'eout.wav'); 27 '); 28 wavplay (firout, FS); 29 figure (1) 30 subplot (411); 31 plot (REF); 32 title ('original sign'); 33 subplot (412 ); 34 plot (near); 35 title ('voice plus Noise'); 36 subplot (413); 37 plot (Noise); 38 title ('noise '); 39 subplot (414); 40 plot (firout); 41 title ('Adaptive denoising sign ');
Wave. m

Run

4. Download source files

LMS filter1.0.rar
115 online storage package code: 5lbagoebt972
Http://115.com/lb/5lbagoebt972

LMS adaptive Viner filter

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.