neil's webbly world

me@njohnson.co.uk
 The Walsh Transform The heart of Walsh functions is the Walsh transform. In itself it is quite simple: Ok, what I actually mean is that it is a summation over a window of data. To turn it into something more readable, lets say there are N samples (where N is some power of 2, eg. 16, 32, 64, etc), then we can calculate the Walsh coefficients from: The above equations are for analysis, while what we want for synthesis are the opposite functions, that generate x(t). The following equation does just that: The only extra maths involved in this is to generate the individual Walsh functions, which we need to do the above calculations. There are basically two main methods to use: Hadamard matrices, and a recursive function. Hadamard matrix For a brief summary have a look here. The Hadamard matrix is useful if you have lots of memory to spare, which you could fill with a precalculated Hadamard matrix from which you can pluck the Walsh functions from. To work out which row of the matrix corresponds to which Walsh function, just count up the number of sign changes - the number you arrive at is the Walsh function number. For example, if there are 4 sign changes in a row, then that row corresponds to WAL(4,t) Difference Equation Another way of calculating Walsh functions is to use a difference equation, in particular the one devised by Harmuth as shown below. This method uses a recursive function to calculate a single point for a single Walsh function at a time, which stops recursing for WAL(0,t) = 1. However, it is conceptually easier to use, if somewhat slower. The Tcl Walsh viewer uses a variation on the difference equation to, in effect, recursively home in on a section of the Hadamard matrix (which, in effect, is what the difference equation does).