or for JLsa
- Adsptwe gain parameter
0 1000 £000 3000 4000 5000 8000 7000 8000 3000 1 0000
0 1000 £000 3000 4000 5000 8000 7000 8000 3000 1 0000
0 1000 ZKJO 3000 4000 5000 6000 7000 8000 9000 10000
Oulpul Silil
0 1000 ZKJO 3000 4000 5000 6000 7000 8000 9000 10000
Oulpul Silil
- _J_L_
0 1000 2000 3000 4000 5000 6000 70110 8000 9000 10W0
iterations
FIGURE 6.13: An automatic gain control adjusts the parameter a (in the top panel) automatically to achieve the desired output power.
Try them!
Perhaps the best way to formally describe how the algorithms work is to plot the performance functions. But it is not possible to directly plot Jls{o) or Jn{o) since they depend on the data sequence s[k]. What is possible (and often leads to useful insights) is to plot the performance function averaged over a number of data points (this is also called the error surface). As long as the st.epsize is small enough and the average is long enough, then the mean behavior of the algorithm will be dictated by the shape of the error surface in the same way that the objective function of the exact, steepest, descent, algorithm (for instance, the objectives (6.4) and (6.8)) dictate the evolution of the algorithms (6.6) and (6.9).
The following code agcerrorsurf .m shows how to calculate the error surface for Jjv(c)- The variable n specifies how many terms to average over, and tot sums up the behavior of the algorithm to all n updates at. each possible parameter value a. The average of these (tot/n) is a. close (numerical) approximation to Jn{o) of (6.14). Plotting over all a gives the error surface.
agcerrorsurf.m: draw error surface n=10000;
"/, number of steps in simulation
"/« generate random inputs
"/« all specifies range of values of a
"/« for each value a tot=0; for i=l:n tot=tot+abs (a) * ((1/3) *a~2*r (i) ~2-ds) ; "/, total cost over all possibilities end
Similarly, the error surface for -Jls{o) can be plotted using tot=tot+0.25*(a~2*r(i)~2-ds)~2; 7, error surface for JLS
The output of agcerrorsurf .mfor both objective functions is shown in Figure 6.14. Observe that zero (which is a critical point of the error surface) is a local maximum in both cases. The final converged answers (a « 0.38 for Jjv(a) and a « 0.22 for JLsia)) occur at minima. Were the algorithm to be initialized improperly to a negative value, then it would converge to the negative of these values. As with the algorithms in Figure 6.10, examination of the error surfaces shows why the algorithms converge as they do. The parameter a descends the error surface, until it can go no further.
But why do the two algorithms converge to different places? The facile answer is that they are different because the they minimize different performance functions. Indeed, the error surfaces in Figure 6.14 show minima in different locations. The convergent value of a « 0.38 for Jjv(a) is explicable because 0.382 « 0.15 = d2. The convergent value of a = 0.22 for -Jls{o) is calculated in closed form in Problem 6.18, and this value does a good job mimimizing its cost, but it is has not necessarily solved the problem of making a2 close to d2. Rather, Jls(u) calculates a more conservative gain value that penalizes devaitions from d2 more strongly than does Jjv(a). The moral is this: beware your performance functions - they may do what you ask.
6.17. Use agcgrad.m to investigate the AGC algorithm.
(a) What range of stepsize mu works? Can the stepsize be too small? Can the stepsize be too large?
(b) How does the stepsize mu effect the convergence rate?
(c) How does the variance of the input effect the convergent value of a?
(d) What range of averages lenavg works? Can lenavg be too small? Can lenavg be too large?
(e) How does lenavg effect the convergence rate?
6.18. Show that the value of a that achieves the minimum of Ji,s{a) can be expressed as
Is there a way to use this (closed form) solution to replace the iteration (6.13)? 6.19. Consider the alternative objective function J(a) = jja2( jj s — d2). Calculate the derivative and implement a variation of the AGC algorithm that minimizes this objective. How does this version compare to the algorithms (6.13) and (6.15)? Draw the error surface for this algorithm. Which version is preferable?
"/, take average value, and save
Post a comment