next up previous [pdf]

Next: HELIX LOW-CUT FILTER Up: WILSON-BURG SPECTRAL FACTORIZATION Previous: WILSON-BURG SPECTRAL FACTORIZATION

Wilson-Burg theory

Newton's iteration for square roots

$\displaystyle a_{t+1} \eq \frac{1}{ 2} \ \left( a_t \ +\ \frac{s}{ a_t} \right)$ (16)

converges quadratically starting from any real initial guess $ a_0$ except zero. When $ a_0$ is negative, Newton's iteration converges to the negative square root.

Quadratic convergence means that the square of the error $ a_t-\sqrt{s}$ at one iteration is proportional to the error at the next iteration

$\displaystyle a_{t+1} - \sqrt{s} \quad\sim\quad ( a_t-\sqrt{s})^2
\eq a_t^2 - 2 a_t \sqrt{s} + s \quad > \quad 0$     (17)

so, for example if the error is one significant digit at one iteration, at the next iteration it is two digits, then four, etc. We cannot use equation (17) in place of the Newton iteration itself, because it uses the answer $ \sqrt{s}$ to get the answer $ a_{t+1}$ , and also we need the factor of proportionality. Notice, however, if we take the factor to be $ 1/(2a_t)$ , then $ \sqrt{s}$ cancels and equation (17) becomes itself the Newton iteration (16).

Another interesting feature of the Newton iteration is that all iterations (except possibly the initial guess) are above the ultimate square root. This is obvious from equation (17).

We can insert spectral functions in the Newton square-root iteration, for example $ s(\omega)$ and $ a(\omega)$ . Where the first guess $ a_0$ happens to match $ \sqrt{s}$ , it will match $ \sqrt{s}$ at all iterations. The Newton iteration is

$\displaystyle 2\ \frac{a_{t+1}}{ a_t} \eq 1 \ +\ \frac{s}{ a_t^2}$ (18)

Something inspires Wilson to express the spectrum $ S=\bar A A$ as a $ Z$ -transform and then write the iteration

$\displaystyle \frac{\bar A_{t+1}(1/Z) }{ \bar A_t(1/Z)} \ +\ \frac{A_{t+1}(Z) }{ A_t(Z)} \eq 1 \ +\ \frac{S(Z) }{ \bar A_t(1/Z)\ A_t(Z)}$ (19)

Now we are ready for the algorithm: Compute the right side of (19) by polynomial division forwards and backwards and then add 1. Then abandon negative lags and take half of the zero lag. Now you have $ A_{t+1}(Z) / A_t(Z)$ . Multiply out (convolve) the denominator $ A_t(Z)$ , and you have the desired result $ A_{t+1}(Z)$ . Iterate as long as you wish.

(Parenthetically, for those people familiar with the idea of minimum phase (if not, see FGDP or PVI), we show that $ A_{t+1}(Z)$ is minimum phase: Both sides of (19) are positive, as noted earlier. Both terms on the right are positive. Since the Newton iteration always overestimates, the 1 dominates the rightmost term. After masking off the negative powers of $ Z$ (and half the zero power), the right side of (19) adds two wavelets. The 1/2 is wholly real, and hence its real part always dominates the real part of the rightmost term. Thus (after masking negative powers) the wavelet on the right side of (19) has a positive real part, so the phase cannot loop about the origin. This wavelet multiplies $ A_t(Z)$ to give the final wavelet $ A_{t+1}(Z)$ and the product of two minimum-phase wavelets is minimum phase.)

The input of the program is the spectrum $ S(Z)$ and the output is the factor $ A(Z)$ , a function with the spectrum $ S(Z)$ . I mention here that in later chapters of this book, the factor $ A(Z)$ is known as the inverse Prediction-Error Filter (PEF). In the Wilson-Burg code below, $ S(Z)$ and $ A(Z)$ are $ Z$ -transform polynomials but their lead coefficients are extracted off, so for example, $ A(z) = (a_0) + (a_1 Z + a_2 Z^2 + \cdots)$ is broken into the two parts a0 and aa.

user/gee/wilson.c
float wilson_factor(int niter    /* number of iterations */, 
		    float s0     /* zero-lag auto-correlation */, 
		    sf_filter ss /* input auto-correlation */, 
		    sf_filter aa /* output factor */, 
		    bool verb    /* verbosity flag */,
		    float tol    /* tolerance */)
/*< Factor >*/ 
{
    float eps;
    int i, iter;
    
    for(i=0; i < n2; i++) au[i] = 0.;
    au[n-1] = s0;
    b[0] = 1.;       /* initialize */
    
    for(i=0; i < ss->nh; i++) {  /* symmetrize input auto */
	au[n-1+ss->lag[i]] =  ss->flt[i];        
	au[n-1-ss->lag[i]] =  ss->flt[i];
    }                   
    
    sf_helicon_init( aa);           /* multiply polynoms */
    sf_polydiv_init( n2, aa);       /* divide   polynoms */
    for(iter=0; iter < niter; iter++) {
	sf_polydiv_lop(false,false, n2, n2, au, bb);  /* S/A */
	sf_polydiv_lop(true, false, n2, n2, cc, bb);  /* S/(AA') */
	eps = 0.;
	for(i=1; i < n; i++) {   /* b = plusside(1+cc) */
	    b[i] = 0.5*(cc[n-1+i] + cc[n-1-i]) / cc[n-1]; 
	    if (fabs(b[i]) > eps) eps = fabs(b[i]);
	}
	if (verb) sf_warning("wilson %d %f",iter,eps);
	if (eps < tol) break;
	
	sf_helicon_lop( false, false, n, n, b, c);   /* c = A b */
	
        /* put on helix */
	for(i=0; i < aa->nh; i++) aa->flt[i] = c[aa->lag[i]];              
    } 
    return sqrtf(cc[n-1]);
}

EXERCISES:

  1. Fomel's factorization: A simple trick to avoid division in square root computation is to run Newton's method on the inverse square root instead. The iteration is then $ R' = \frac{1}{ 2} R(3-R^2 X^2)$ where $ R$ converges (quadratically) to $ 1/\sqrt{X^2}$ . To get the square root, just multiply $ R$ by $ X^2$ . This leads to a reciprocal version of the Wilson-Burg algorithm. $ A\T/A + \bar A\T/ \bar A = 3 - A \bar A S $ Here is how it can work: Construct an inverse autocorrelation -- for example, an ideal isotropic smoother; make a guess for $ A$ (min-phase roughener); iterate: (1) compute $ 3 - A A* S$ , (2) take its causal part, (3) convolve with $ A$ to get $ A\T$ . Each iteration involves just three convolutions (could be even done without helix).


next up previous [pdf]

Next: HELIX LOW-CUT FILTER Up: WILSON-BURG SPECTRAL FACTORIZATION Previous: WILSON-BURG SPECTRAL FACTORIZATION

2011-08-18