| Purpose |
| Sample per sample filtering and coefficient update using the Variable Step Size LMS (VSSLMS) algorithm. |
| Syntax |
[w,g,mu,y,e]= asptvsslms(x,w,g,d,mu,roh)
[w,g,mu,y,e]= asptvsslms(x,w,g,d,mu,roh,mu_min,mu_max)
|
| Description |
asptvsslms() implements the Variable Step Size LMS adaptive algorithm used to update transversal adaptive filters. VSSLMS does not only adjust the filter coefficients but also adjusts the step size asptvsslms() takes an input samples delay line mu_min and mu_max optional input arguments are given, each element of the step size vector is constrained to those limits.
The update equation of asptvsslms() is given by
asptvsslms() for an FIR adaptive filter of Input Parameters [Size] :: x : input samples delay line [L x 1] d : desired response [1 x 1] w : filter coef. vector w(n-1) [L x 1] g : gradient vector g(n-1) [L x 1] mu : vector of step sizes mu(n-1) [L x 1] roh : gradient vector step size [1 x 1] mu_min : lower bound for mu [1 x 1] mu_max : higher bound for mu [1 x 1] Output parameters:: w : updated filter coefficients w(n) y : filter output y(n) g : updated gradient vector g(n) mu : updated vector of step sizes mu(n) e : error sample, e(n)=d(n)-y(n) |
| Example |
% VSSLMS used in a system identification application. % By the end of this script the adaptive filter w should % have the same coefficients as the unknown filter h. iter = 5000; % Number of samples to process % Complex unknown impulse response h = [.9 + i*.4; 0.7+ i*.2; .5; .3+i*.1; .1]; xn = 2*(rand(iter,1)-0.5); % Input signal, zero mean random. % although xn is real, dn will be complex since h is complex dn = osfilter(h,xn); % Unknown filter output en = zeros(iter,1); % vector to collect the error mu0 = 0.05*ones(10,1); % initial step size muv = zeros(iter,1); % evolution of mu with time % Initialize the VSSLMS algorithm with a filter of 10 coef. [w,x,d,y,e,g,mu] = init_vsslms(10,[],[],[],mu0); %% Processing Loop for (m=1:iter) % update the input delay line x = [xn(m,:); x(1:end-1,:)]; d = dn(m,:) + 1e-3*rand; % additive noise of var = 1e-6 % call VSSLMS to calculate the filter output, estimation error % and update the coefficients and step sizes. [w,g,mu,y,e] = asptvsslms(x,w,g,d,mu,1e-3,1e-6,.99); % save the last error sample to plot later en(m,:) = e; muv(m) = mean(mu); end; % display the results % display the results subplot(3,3,1);stem([real(w) imag(conj(w))]); grid; eb = filter(.1, [1 -.9], en .* conj(en)); subplot(3,3,2);plot(10*log10(eb ));grid subplot(3,3,3);plot(muv); grid;Running the above script will produce the graph shown in Fig. 4.23. The left-side graph of the figure shows the adaptive filter coefficients after convergence which are almost identical to the unknown filter h. The middle graph shows the mean square error in dB versus time during the adaptation process, which is usually called the learning curve. The lower limit of the error signal power in the learning curve is defined here by the additive white noise added at the filter output (-60 dB). The right-side graph shows the evolution of the mean value of the step size vector with time.
|
| Remarks |
Like the LMS, the VSSLMS is also a stochastic implementation of the steepest-descent algorithm where the mean value of the filter coefficients converge towards their optimal solution. Therefore, the filter coefficients will fluctuate about their optimum values given by the Wiener solution. The amplitude of the fluctuations is controlled by the step size. The smaller the step size, the smaller the fluctuations (less final misadjustment) but also the slower the adaptive coefficients converge to their optimal values. The improvement the VSSLMS introduces is that a separate step size is used for each filter coefficient, and the algorithm adapts those step sizes. When a coefficient is far from its optimal value, its corresponding step size is increased to converge faster. Conversely, when a coefficient is near its optimal value, the step size is decreased to decrease the final misadjustment. Similar to the LMS, the following points also apply to the VSSLMS.
|
| Resources |
The resources required to implement the VSSLMS algorithm for a transversal adaptive FIR filter of
|
| See Also |
| INIT_ VSSLMS, MODEL_ VSSLMS, ASPTNLMS, ASPTLMS, ASPTLCLMS. |
| Reference |
| [11] for extensive analysis of the LMS and the steepest-descent search method. |