• 大小: 1.07M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-24
  • 语言: Matlab
  • 标签: fdaf  频域  LMS  

资源简介

matlab频域自适应滤波器(FDAF)演示,自适应LMS算法。

资源截图

代码片段和文件信息

% FDAFdemo        Frequency-domain Adaptive Filter (FDAF) Demo
%
% by Lee Gan and Kuo 2008
% Subband Adaptive Filtering: Theory and Implementation
% Publisher: John Wiley and Sons Ltd


addpath ‘..\Common‘;                % Functions in Common folder
clear all; close all;

% Adaptive filter parameters

M = 256;
mu = 0.5;                           % Step size for contrained FDAF 
mu_unconst = 0.001;                 % Step size for unconstrained FDAF 

% Run parameters

iter = 8.0*80000;                   % Number of iterations
un = randn(1iter);                 % White noise

% Coloured noise

% un = randn(1iter);               % Input signal un
% a = [1; -0.975;  0.95];           % AR(2) complex pole
% un = filter(1aun);
b = load(‘h1.dat‘);                 % Unknown system (select h1 or h2)
b = b(1:M);                         % Truncate to length M

select = input(‘Select (1) Constrained FDAF (2) Unconstrained FDAF: ‘‘s‘);
                                    % Select case (1) or (2) in run time

if str2num(select) == 1
    disp(sprintf(‘Constrained FDAF step size = %.5f‘mu));
else
    disp(sprintf(‘Unconstrained FDAF step size = %.5f‘mu_unconst));
end

% Adaptation process

[undnvn] = GenerateResponses(iterb);
tic;
S = FDAFinit(zeros(M1)mumu_unconstiter);
                                    % Initialization
S.unknownsys = b;
S.select = str2num(select);
[enS] = FDAFadapt(undnS);        % Perform FDAF algorithm

EML = S.eml.^2;                     % System error norm (normalized)
err_sqr = en.^2;
    
disp(sprintf(‘Total time = %.3f mins‘toc/60));

figure;
temp = real(ifft(S.weight));
w = temp(1:S.length);
c = stem([bw]);
legend(‘Actual‘‘Estimated‘);
title(‘System identification of an FIR filter‘); grid on;

figure;
q = 0.99; MSE = filter((1-q)[1 -q]err_sqr);
hold on; plot((0:length(MSE)-1)/102410*log10(MSE));
axis([0 iter/1024 -60 10]);
xlabel(‘Number of iterations (\times 1024 input samples)‘); 
ylabel(‘Mean-square error (with delay)‘);
title(‘FDAFdemo‘);
grid on;

figure;
hold on; plot((0:length(EML)-1)/102410*log10(EML));
xlabel(‘Number of iterations (\times 1024 input samples)‘); 
ylabel(‘Misalignment (dB)‘);
title(‘FDAFdemo‘);
grid on;



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        2288  2020-09-24 03:00  FDAFdemo.m
     文件        1609  2020-09-24 03:00  Common\AmpResp.m
     文件        2273  2020-09-24 03:00  Common\APadapt.m
     文件         836  2020-09-24 03:00  Common\APinit.m
     文件         383  2020-09-24 03:00  Common\DCTmatrix_TypeIV.m
     文件        1369  2020-09-24 03:00  Common\dist_alias.m
     文件        2762  2020-09-24 03:00  Common\DSAFadapt_Merched_cllp.m
     文件        2732  2020-09-24 03:00  Common\DSAFadapt_Morgan_cllp.m
     文件        2507  2020-09-24 03:00  Common\DSAFinit_Merched.m
     文件        1810  2020-09-24 03:00  Common\DSAFinit_Morgan.m
     文件       80226  2020-09-24 03:00  Common\engine_1.WAV
     文件       80226  2020-09-24 03:00  Common\engine_2.WAV
     文件       55934  2020-09-24 03:00  Common\far.wav
     文件        1800  2020-09-24 03:00  Common\fb.dat
     文件        2456  2020-09-24 03:00  Common\fdaf.m
     文件        2514  2020-09-24 03:00  Common\FDAFadapt.m
     文件        1273  2020-09-24 03:00  Common\FDAFinit.m
     文件         551  2020-09-24 03:00  Common\FreqResp.m
     文件        2602  2020-09-24 03:00  Common\FXLMSadapt.m
     文件        1327  2020-09-24 03:00  Common\FXLMSinit.m
     文件        2804  2020-09-24 03:00  Common\FXNLMSadapt.m
     文件        1390  2020-09-24 03:00  Common\FXNLMSinit.m
     文件        2151  2020-09-24 03:00  Common\GenerateResponses.m
     文件        1042  2020-09-24 03:00  Common\GenerateResponses_speech.m
     文件       24232  2020-09-24 03:00  Common\h1.dat
     文件       23027  2020-09-24 03:00  Common\h2.dat
     文件        2463  2020-09-24 03:00  Common\HALMSadapt.m
     文件         957  2020-09-24 03:00  Common\HALMSinit.m
     文件        2624  2020-09-24 03:00  Common\HANLMSadapt.m
     文件        1069  2020-09-24 03:00  Common\HANLMSinit.m
     文件         560  2020-09-24 03:00  Common\Homer.mat
............此处省略45个文件信息

评论

共有 条评论