366
Statistical and Adaptive Signal Processing - Solution Manual
%Lattice
Ef(m) = lambda*Efold(m) + alphaold(m)*conj(ef(m))*ef(m);
cf(m) = lambda*Efold(m)/Ef(m);
sf(m) = alphaold(m)*ef(m)/Ef(m);
Eb(m) = lambda*Ebold(m) + alpha(m)*conj(eb(m))*eb(m);
cb(m) = lambda*Ebold(m)/Eb(m);
sb(m) = alpha(m)*eb(m)/Eb(m);
ef(m+1) = ef(m) + conj(kfold(m))*ebold(m);
kf(m) = cbold(m)*kfold(m) - sbold(m)*conj(ef(m));
eb(m+1) = ebold(m) + conj(kbold(m))*ef(m);
kb(m) = cf(m)*kbold(m) - sf(m)*conj(ebold(m));
alpha(m+1) = alpha(m) - abs(alpha(m)*eb(m))*abs(alpha(m)*eb(m))/Eb(m);
% Ladder
e(m+1)=e(m)-conj(kcold(m))*eb(m);
kc(m)= cb(m)*kcold(m) + sb(m)*conj(e(m));
end
er(n,i)=e(M+1);erf(n,i)=ef(M);erb(n,i)=eb(M);
Erf(n,i)=Eb(1); Erb(n,i)=Eb(M); al(n,i)=alpha(M);
% Time Delay
cbold=cb; cfold=cf;
sbold=sb; sfold=sf;
Ebold=Eb; Efold=Ef;
ebold=eb; efold=ef;
kfold=kf; kbold=kb; kcold=kc;
alphaold=alpha;
end
i
end
er2=er.^2;
er2m=mean(er2,2);
t=(1:N)’;
%plot(t,Erf,’r’,t,Erb,’b’);
%text(250,300,’\leftarrow\fontsize{9pt} E^f’);
%text(100,200,’E^b \rightarrow\fontsize{9pt} ’);
Jmin1=1;
%subplot(’position’,[0.1,0.55,0.85,0.4]);
semilogy(t,er2m,’r’);
axis([0,N,10^(-4), 10^0]);
title([’MSE Learning Curve (\lambda=.99, W=’ num2str(W) ’ )’],’fontsize’,10);
xlabel(’Number of iterations (n)’,’fontsize’,8);
ylabel(’Mean squared error’,’fontsize’,8);