In mathematics, the Haar wavelet is a sequence of rescaled "square-shaped" functions which together form a wavelet family or basis. Wavelet analysis is similar to Fourier analysis in that it allows a target function over an interval to be represented in terms of an orthonormal basis. The Haar sequence is now recognised as the first known wavelet basis and is extensively used as a teaching example.
The Haar sequence was proposed in 1909 by Alfréd Haar.[1] Haar used these functions to give an example of an orthonormal system for the space of square-integrable functions on the unit interval [0, 1]. The study of wavelets, and even the term "wavelet", did not come until much later. As a special case of the Daubechies wavelet, the Haar wavelet is also known as Db1.
The Haar wavelet is also the simplest possible wavelet. The technical disadvantage of the Haar wavelet is that it is not continuous, and therefore not differentiable. This property can, however, be an advantage for the analysis of signals with sudden transitions (discrete signals), such as monitoring of tool failure in machines.[2]
The Haar wavelet's mother wavelet function
\psi(t)
\psi(t)=\begin{cases} 1 &0\leqt<
1 | |
2 |
,\\ -1&
1 | |
2 |
\leqt<1,\\ 0&otherwise. \end{cases}
\varphi(t)
\varphi(t)=\begin{cases}1 &0\leqt<1,\\0&otherwise.\end{cases}
For every pair n, k of integers in
Z
R
\psin,k(t)=2n\psi(2nt-k), t\inR.
R
\intR\psin,(t)dt=0, \|\psin,
2 | |
\| | |
L2(R) |
=\intR\psin,(t)2dt=1.
\intR
\psi | |
n1,k1 |
(t)
\psi | |
n2,k2 |
(t)dt=
\delta | |
n1n2 |
\delta | |
k1k2 |
,
\deltaij
I | |
n1,k1 |
I | |
n2,k2 |
I | |
n1,k1 |
\psi | |
n2,k2 |
The Haar system on the real line is the set of functions
\{\psin,k(t) : n\inZ, k\inZ\}.
R
R
The Haar wavelet has several notable properties:
In this section, the discussion is restricted to the unit interval [0, 1] and to the Haar functions that are supported on [0, 1]. The system of functions considered by Haar in 1910,[3] called the Haar system on [0, 1] in this article, consists of the subset of Haar wavelets defined as
\{t\in[0,1]\mapsto\psin,k(t) : n,k\in\N\cup\{0\}, 0\leqk<2n\},
In Hilbert space terms, this Haar system on [0, 1] is a complete orthonormal system, i.e., an orthonormal basis, for the space L2([0, 1]) of square integrable functions on the unit interval.
The Haar system on [0, 1] - with the constant function 1 as first element, followed with the Haar functions ordered according to the lexicographic ordering of couples - is further a monotone Schauder basis for the space Lp([0, 1]) when .[4] This basis is unconditional when .[5]
There is a related Rademacher system consisting of sums of Haar functions,
rn(t)=2-n/2
2n-1 | |
\sum | |
k=0 |
\psin,(t), t\in[0,1], n\ge0.
The Faber - Schauder system[7] [8] is the family of continuous functions on [0, 1] consisting of the constant function 1, and of multiples of indefinite integrals of the functions in the Haar system on [0, 1], chosen to have norm 1 in the maximum norm. This system begins with s0 = 1, then is the indefinite integral vanishing at 0 of the function 1, first element of the Haar system on [0, 1]. Next, for every integer, functions are defined by the formula
sn,(t)=21
t | |
\int | |
0 |
\psin,(u)du, t\in[0,1], 0\lek<2n.
The Faber - Schauder system is a Schauder basis for the space C([0, 1]) of continuous functions on [0, 1].[4] For every f in C([0, 1]), the partial sum
fn+1=a0s0+a1s1+
n-1 | |
\sum | |
m=0 |
l(
2m-1 | |
\sum | |
k=0 |
am,ksm,r)\inC([0,1])
fn+2-fn+1=
2n-1 | |
\sum | |
k=0 |
l(f(xn,k)-fn+1(xn,)r)sn,=
2n-1 | |
\sum | |
k=0 |
an,sn,
The Franklin system is obtained from the Faber - Schauder system by the Gram - Schmidt orthonormalization procedure.[9] [10] Since the Franklin system has the same linear span as that of the Faber - Schauder system, this span is dense in C([0, 1]), hence in L2([0, 1]). The Franklin system is therefore an orthonormal basis for L2([0, 1]), consisting of continuous piecewise linear functions. P. Franklin proved in 1928 that this system is a Schauder basis for C([0, 1]).[11] The Franklin system is also an unconditional Schauder basis for the space Lp([0, 1]) when .[12] The Franklin system provides a Schauder basis in the disk algebra A(D).This was proved in 1974 by Bočkarev, after the existence of a basis for the disk algebra had remained open for more than forty years.[13]
Bočkarev's construction of a Schauder basis in A(D) goes as follows: let f be a complex valued Lipschitz function on [0, π]; then f is the sum of a cosine series with absolutely summable coefficients. Let T(f) be the element of A(D) defined by the complex power series with the same coefficients,
\left\{f:x\in[0,\pi] →
infty | |
\sum | |
n=0 |
an\cos(nx)\right\}\longrightarrow\left\{T(f):z →
infty | |
\sum | |
n=0 |
anzn, |z|\le1\right\}.
When dealing with 1-periodic continuous functions, or rather with continuous functions f on [0, 1] such that, one removes the function from the Faber - Schauder system, in order to obtain the periodic Faber - Schauder system. The periodic Franklin system is obtained by orthonormalization from the periodic Faber - -Schauder system.[14] One can prove Bočkarev's result on A(D) by proving that the periodic Franklin system on [0, 2π] is a basis for a Banach space Ar isomorphic to A(D). The space Ar consists of complex continuous functions on the unit circle T whose conjugate function is also continuous.
The 2×2 Haar matrix that is associated with the Haar wavelet is
H2=\begin{bmatrix}1&1\ 1&-1\end{bmatrix}.
(a0,a1,...,a2n,a2n+1)
\left(\left(a0,a1\right),\left(a2,a3\right),...,\left(a2n,a2n+1\right)\right)
H2
\left(\left(s0,d0\right),...,\left(sn,dn\right)\right)
If one has a sequence of length a multiple of four, one can build blocks of 4 elements and transform them in a similar manner with the 4×4 Haar matrix
H4=\begin{bmatrix}1&1&1&1\ 1&1&-1&-1\ 1&-1&0&0\ 0&0&1&-1\end{bmatrix},
Compare with a Walsh matrix, which is a non-localized 1/–1 matrix.
Generally, the 2N×2N Haar matrix can be derived by the following equation.
H2N=\begin{bmatrix}HN ⊗ [1,1]\ IN ⊗ [1,-1]\end{bmatrix}
where
IN=\begin{bmatrix}1&0&...&0\ 0&1&...&0\ \vdots&\vdots&\ddots&\vdots\ 0&0&...&1\end{bmatrix}
⊗
The Kronecker product of
A ⊗ B
A
B
A ⊗ B=\begin{bmatrix}a11B&...&a1nB\ \vdots&\ddots&\vdots\ am1B&...&amnB\end{bmatrix}.
An un-normalized 8-point Haar matrix
H8
H8=\begin{bmatrix}1&1&1&1&1&1&1&1\ 1&1&1&1&-1&-1&-1&-1\ 1&1&-1&-1&0&0&0&0&\ 0&0&0&0&1&1&-1&-1\ 1&-1&0&0&0&0&0&0&\ 0&0&1&-1&0&0&0&0\ 0&0&0&0&1&-1&0&0&\ 0&0&0&0&0&0&1&-1\end{bmatrix}.
Note that, the above matrix is an un-normalized Haar matrix. The Haar matrix required by the Haar transform should be normalized.
From the definition of the Haar matrix
H
H
Take the 8-point Haar matrix
H8
H8
H8
The Haar transform is the simplest of the wavelet transforms. This transform cross-multiplies a function against the Haar wavelet with various shifts and stretches, like the Fourier transform cross-multiplies a function against a sine wave with two phases and many stretches.[17]
The Haar transform is one of the oldest transform functions, proposed in 1910 by the Hungarian mathematician Alfréd Haar. It is found effective in applications such as signal and image compression in electrical and computer engineering as it provides a simple and computationally efficient approach for analysing the local aspects of a signal.
The Haar transform is derived from the Haar matrix. An example of a 4×4 Haar transformation matrix is shown below.
H4=
1 | |
2 |
\begin{bmatrix}1&1&1&1\ 1&1&-1&-1\ \sqrt{2}&-\sqrt{2}&0&0\ 0&0&\sqrt{2}&-\sqrt{2}\end{bmatrix}
The Haar transform can be thought of as a sampling process in which rows of the transformation matrix act as samples of finer and finer resolution.
Compare with the Walsh transform, which is also 1/–1, but is non-localized.
The Haar transform has the following properties
N=2k,k\inN
The Haar transform yn of an n-input function xn is
yn=Hnxn
The Haar transform matrix is real and orthogonal. Thus, the inverse Haar transform can be derived by the following equations.
H=H*,H-1=HT,i.e.HHT=I
where
I
T | |
H | |
4 |
H4=
1 | |
2 |
\begin{bmatrix}1&1&\sqrt{2}&0\ 1&1&-\sqrt{2}&0\ 1&-1&0&\sqrt{2}\ 1&-1&0&-\sqrt{2}\end{bmatrix} ⋅
1 | |
2 |
\begin{bmatrix}1&1&1&1\ 1&1&-1&-1\ \sqrt{2}&-\sqrt{2}&0&0\ 0&0&\sqrt{2}&-\sqrt{2}\end{bmatrix} =\begin{bmatrix}1&0&0&0\ 0&1&0&0\ 0&0&1&0\ 0&0&0&1\end{bmatrix}
Thus, the inverse Haar transform is
xn=HTyn
The Haar transform coefficients of a n=4-point signal
x4=[1,2,3,4]T
y4=H4x4=
1 | |
2 |
\begin{bmatrix}1&1&1&1\ 1&1&-1&-1\ \sqrt{2}&-\sqrt{2}&0&0\ 0&0&\sqrt{2}&-\sqrt{2}\end{bmatrix}\begin{bmatrix}1\ 2\ 3\ 4\end{bmatrix} =\begin{bmatrix}5\ -2\ -1/\sqrt{2}\ -1/\sqrt{2}\end{bmatrix}
The input signal can then be perfectly reconstructed by the inverse Haar transform
\hat{x4