基本信息
源码名称:Subband adaptive filter
源码大小:2.96KB
文件格式:.zip
开发语言:MATLAB
更新时间:2021-07-12
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍
关于子带滤波器的代码,LMS、NLMS算法

for l=1:Nr
    disp(['Run: ' num2str(l)])
    nc=normrnd(0,0.01,1,N*M);       % noise at system output 
    xin = color1(N*M,1);             % input signal
    d=filter(B,A,xin(1:end));       % desired signal
    d=d nc;                         % unknown system output
    
    
     % Analysis of desired and input signals
    for k=1:M
        x_temp=filter(hk(k,:),1,d);
        dsb(k,:)=x_temp(find(mod((1:length(x_temp))-1,L)==0)); % desired signal split in subbands
        x_temp=filter(hk(k,:),1,xin);
        xsb(k,:)=x_temp(find(mod((1:length(x_temp))-1,L)==0)); % input signal split in subbands
    end;
    
    %initializing temporary values
    w_ol =zeros(1,Nw 1);      % initial coefficient vector for subband m
    for m=1:M
        x_ol(m,:)=[zeros(1,Nw 1)];    % initial input vector for subband m
    end
    
     %Adaption Process
    for k=1:N
      if mod(k,200)==0 disp(['Iteration: ' num2str(k)]), end;
      temp_error = zeros(1,Nw 1);
      for m=1:M 
          
          x_ol(m,:)=[xsb(m,k) x_ol(m,1:Nw)]; % new input vector for subband m
          x_temp=shiftdim(x_ol(m,:),1);
          w_temp=shiftdim(w_ol,1);
          e_ol(m,l,k)=dsb(m,k)-w_temp'*x_temp;   % error at subband m
          
          denom=(gamma x_ol(m,:)*x_temp);
          temp_error = temp_error ( (e_ol(m,l,k)*shiftdim(x_temp,1))/denom);   
      end
      w_ol = w_ol u*(temp_error); 
      
    end

end