how can we find or display mean square error of Block LMS algorithm? The code is as follows:

조회 수: 5 (최근 30일)
%BLOCKLMS % Call: % [e,w]=blocklms(mu,M,u,Dalton); % % Input arguments: % mu = step size, dim 1x1 % M = filter length, dim 1x1 % u = input signal, dim Nx1 % d = desired signal, dim Nx1 % % Output arguments: % e = estimation error, dim Nx1 % w = final filter coefficients, dim Mx1 % % The length N is adjusted such that N/M is integer! % %initialization M=100; N=200; w=zeros(M,1); L=floor(N/M)*M; d=zeros(N,1); u=zeros(N,1); d=d(:); e=d; u=u(:); %no. of blocks Blocks=N/M; %Loop, BlockLMS for k=1:Blocks-1 %Set up input signal matrix, dim. MxM (cf. example 1, Haykin p. 448) umat=toeplitz(u(k*M:1:(k+1)*M-1),u(k*M:-1:(k-1)*M+1)); %Set up vector with desired signal dvec=d(k*M:1:(k+1)*M-1); %calculate output signal (Eq.10.5) yvec=umat.*w; %calculate error vector (Eq.10.8) evec=dvec-yvec; %log error e(k*M:1:(k+1)*M-1)=evec; %calculate gradient estimate (Eq.10.11) phi=umat.'*evec; %update filter coefficients (Eq.10.10) w=w+mu*phi; end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Adaptive Filters에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by