next up previous
Next: About this document ... Up: wht Previous: Fast Walsh-Hadamard Transform (Sequency

A Simple Example

Consider a signal vector of N=4 elements (samples):

\begin{displaymath}{\bf x}=[x_0, x_1, x_2, x_3]^T=[0, 1, 2, 3]^T \end{displaymath}

The corresponding 4 by 4 WHT matrix (Hadamard ordered) is:

\begin{displaymath}{\bf H}_h=\frac{1}{2} \left[ \begin{array}{rrrr} 1 & 1 & 1 & ...
...& -1  1 & 1 & -1 & -1  1 & -1 & -1 & 1 \end{array} \right]
\end{displaymath}

The rows (or colums) of this matrix can be reordered according to their sequency by the following mapping:

\begin{displaymath}\begin{tabular}{ccccc}
sequency order & 0 & 1 & 2 & 3 \\
bin...
...10 & 11 & 01 \\
Hadamard order & 0 & 2 & 3 & 1
\end{tabular}\end{displaymath}

to get the sequency ordered (also called Walsh ordered) matrix

\begin{displaymath}{\bf H}_w=\frac{1}{2} \left[ \begin{array}{rrrr} 1 & 1 & 1 & ...
...1 & 1 & -1 \end{array} \right]=\frac{1}{2}[h_0, h_1, h_2, h_3]
\end{displaymath}

where ${\bf h}_i$ is the ith colum (or row) vector of the symmetric matrix ${\bf H}_w^T={\bf H}_w$ representing a square wave of sequency $i$ (with $i$ zero-crossings). Now the sequency spectrum of the signal can be found as

\begin{displaymath}{\bf X}={\bf H}_w {\bf x} =\frac{1}{2} \left[ \begin{array}{r...
...\left[ \begin{array}{r} 3  -2  0  -1 \end{array} \right] \end{displaymath}

and the inverse transform (note $H_w^{-1}=H_w$) represents the signal vector as a linear combination of a set of square waves of different sequencies:

\begin{displaymath}
{\bf x}={\bf H}_w {\bf X}=\frac{1}{2}[h_0, h_1, h_2, h_3]
...
... -2  0  -1 \end{array} \right]
=\frac{3h_0-2h_1-h_3}{2}
\end{displaymath}

wht_example_0.gif

wht_example_1.gif

We can also verify that indeed the inverse transform will produce the original signal from its spectrum:

\begin{displaymath}{\bf x}={\bf H}_w {\bf X}=\frac{1}{2}\left[ \begin{array}{rrr...
... =\left[ \begin{array}{c} 0  1  2  3 \end{array} \right]
\end{displaymath}


next up previous
Next: About this document ... Up: wht Previous: Fast Walsh-Hadamard Transform (Sequency
Ruye Wang 2013-10-22