1. dia - PowerPoint PPT Presentation

1 / 247
About This Presentation
Title:

1. dia

Description:

WAVELETS AND FILTER BANKS Ildik L szl , PhD ELTE UNIV., BUDAPEST, HUNGARY ildiko_at_inf.elte.hu – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 248
Provided by: Lsz3
Category:

less

Transcript and Presenter's Notes

Title: 1. dia


1
WAVELETS AND FILTER BANKS
Ildikó László, PhD ELTE UNIV., BUDAPEST, HUNGARY
ildiko_at_inf.elte.hu
2
NEWER VERSION BUT STILL NEEDS IMPROOVMENTS AND
CORRECTIONS!!!
3
BIBLIOGRAPHY - G. Strang, T. NguyenWavelets
and Filter Banks, Wellesly-Cambridge
Press - F. Schipp, W.R. WadeTransforms on
Normed Fields - Ingrid Daubechies Ten
Lectures on Wavelets - Stephane
Mallat A Wavelet tour of Signal
Processing - Charles K. Chui An Introduction
to Wavelets etc.
4
AT THE END YOU WILL HAVE TO BE ABLE TO GET
THINGS LIKE
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
Some rows (10...) of A4
50
150
200
100
250
50
150
200
100
250
50
150
200
100
250
14
Some rows (10...) of A3
50
150
200
100
250
50
150
200
100
250
50
150
200
100
250
15
Some rows (22...) of A4
50
150
200
100
250
50
150
200
100
250
50
150
200
100
250
16
Some rows (48...) of A3
50
150
200
100
250
50
150
200
100
250
50
150
200
100
250
17
  • INTRODUCTION
  • - the classical Fourier analysis where a signal
    is
  • represented by its trigonometric Fourier
  • transform, is one of the most widely spread tools
  • in signal and image processing
  • - at the end of the 19th century Du Bois-Reymond
  • constructed a continuous function with divergent
  • Fourier series
  • - Hilbert whether there exist any orthonormal
  • system for which the Fourier series with respect
    to
  • this system do not posses this singularity?

18
- Alfred Haar in 1909 constructed such an
orthonormal system for which the
Haar-Fourier series of continuous functions
converge uniformly
- This was the first wavelet (1910, Szeged, PhD)
19
  • The basic goal of Fourier series is to take a
  • signal considered as a function of time
  • variable t, and decompose it into its various
  • frequency components
  • -The basic building blocks are sin(nt) and
    cos(nt),
  • which vibrate at a frequency of n times per
  • interval.
  • - Consider the following function

20
- This function has three components that
vibrate at frequency 1 the sin(t) part, at
frequency 3 the 2cos(3t) part, at frequency 50
the 0.3sin(50t) part
  • we can express a function f(t) in terms
  • of the basis functions, sine and cosine

21
  • A trigonometric expansion is a sum of the
  • form

where the sum could be finite or infinite.
  • One disadvantage of Fourier series is that its
  • building blocks, sines and cosines, are periodic
  • waves that continue forever.

22
- In many appl., given a signal one is
interested in its frequency component locally in
time (similar to music notation, which tells the
player which notes frequency inf. to play at
any given moment) - The standard Fourier
transform,
also gives the frequency content of
23

,
.

24
(No Transcript)
25
(No Transcript)
26
- but inf. concerning time-localization of e.g.,
high frequency bursts cannot be read off easily
from
- time localization can be achieved by first
windowing the signal
f(t)
1
g(t)
0
27
- which is the windowed Fourier transform -
cuts off only a well-localized slice of
-The wavelet transform provides a
similar time-frequency description, with a
few important differences
28
Fourier transform - represents the frequency
comp. of a signal - doesnt offer
localization in time Wavelet transform
- cuts up a signal into frequency
components - studies each component with a
resolution matched to its scale -
offers localization in time
29
- A wavelet
is a function of zero average
- which is dilated by j and translated by k
- j is the scaling parameter - k is the
translation coeff. allows us to move the time
localization centre f is localized around k
30
Wavelets - compactly supported small waves
(dont extend from infty to infty) Each
wavelet - is built up from the same
MOTHER wavelet by
translation and dilation
wjk(x) 2j/2w(2jx - k)
31
- the wavelet transform of f at the scale j and
position k is computed by correlating f with
the wavelet
- have only recently been used 1988 Ingrid
Daubechies
32
Wavelets - basis functions - linearly
indep. functions Fourier and Wavelet
transforms - representation of a signal
f(t) by basis
functions
33
- The Fourier transform of a complex, two
dimensional function f(x,y) is given by
- where and are referred to as
frequencies - the inverse Fourier transform
34
- that is, f(x,y) is a linear combination of
elementary functions, where the complex number
is a weighting factor
when dealing with linear systems this can be
used for decomposing a complicated input signal
into more simple inputs - that is, the response
of the system can be calculated as the
superposition of the responses given by the
system to each of these elementary functions of
the form
35
(No Transcript)
36
- Examples - Fourier transform theorems -
Linear Systems. Invariant Linear Systems -
Sampling theory
37
Let us consider a rectangular lattice of samples
of the function g(x,y) as defined
g_s(x,y)comb(x/X) comb(y/Y)
y
x
Y
X
38
  • The sampled function g consists of an array of
  • functions, spaced at intervals of width X in the
    x
  • direction and Y in the y direction.
  • The area under each function is proportional
    to
  • the value of the g function at that particular
    point.
  • The spectrum G_s of g_s can be found by
    convolving
  • the transform of the comb function with the
    transform
  • of g.

39
f
G(f , f )
y
x
y
G(f , f )
f
x
y
y
f
x
f
x
1/X
1/Y
40
1.2 1.0 -1 -1.2
1 1 0 0 1 -1 0 0 0 0 1 1 0
0 1 -1
1.2 1
T
X
-1 -1.2
2.2 0.2 -2.2 0.2
y T x

1.1 1.1 -1.1 -1.1
x T(-1) y
Compressed, reconstructed y(1)y(3)0
41
  • Convolution example
  • n 0, 1, 2
  • k 0, 1, 2
  • n0 x(2) x(1) x(0) y(0)h(0)x(0)
  • h(0) h(1) h(2)
  • n1 x(2) x(1) x(0) y(1)h(0)x(1)
  • h(0) h(1) h(2) h(1)x(0)
  • n2 x(2) x(1) x(0)
  • h(0) h(1) h(2)
  • y(2)h(0)x(2)h(1)x(1)h(2)x(0)

42
FILTERS - A Filter a linear time-invariant
operator - can be characterized by its impulse
response function - acts
on an input vector x the
output y
is a convolution of x and the impulse response
of the system
43
- let us consider the input signal x(n) with the
pure frequency
- then the output in the time domain is
- where the last term can be recognized as the
Fourier transform of the impulse response of the
system
44
- the Fourier transform of the output signal
45
What is the connection between WAVELETS, FILTERS
and FILTER BANKS? - it is the High_Pass that
leads to w(t) - the Low_Pass filter leads to a
scaling function
- the scaling function in continuous time
comes from an infinite repetition of the
lowpass filter, with rescaling at each
repetition - the wavelet follows from
by just one application of the highpass
filter.
46
- averages come from the scaling functions -
details come from the wavelets.
signal at level j (local averages)
signal at level
(j1) details at level j (local differences)
47
  • LOW-PASS FILTER or MOVING
  • AVERAGE

To build up the simplest lowpass filter, we use
the Haar filter coefficients h(0)1/2 and
h(1)1/2. - the output at time tn is the average
of the input x(n) and that at time tn-1 x(n-1).
48
  • y(n)1/2 x(n)1/2 x(n-1)
  • Every linear operator acting on a signal
  • x can be represented by a matrix yHx

averaging filter1/2 (identity) 1/2 (delay)
. x(-1) x(0) x(1) .
. y(-1) y(0) y(1) .
½ 0 0 0 0 ½ ½ 0 0 0 0 ½ ½ 0
0 0 0 ½ ½ 0 0 0 0 . .

49
- with the simple input signal, with pure
frequency
- that is, the output can be written as
y(n)SOMETHING x(n)
- this something is expressing the effect
of our filter, or system on the input signal
50
- The frequency response or transfer function
of the system
- because this is a periodic function, we want
- it results
51
- the first term is the amplitude, or
magnitude of the transfer function
- the second term is its phase
52
  • Low-Pass Filter H_0 (Frequency response
    function, or transfer function)

IMPORTANT our filters are CASUAL, that is the
output cannot arrive earlier than the input!!!
1
H_0
pi
0
-pi
pi
0
-pi
The magnitude
The phase of H_0
53
High-PASS FILTER or MOVING
DIFFERENCE Ex. with the Haar coeff. h(0)1/2
h(1)-1/2 The output at tn y(n)1/2 x(n)-1/2
x(n-1)
. x(-1) x(0) x(1) .
½ 0 0 0 0 -½ ½ 0 0 0 0 -½ ½
0 0 0 0 -½ ½ 0 0 0 0 . .
. y(-1) y(0) y(1) .

The number of the coefficients is finite! It
results the impulse response is also finite
FIR!
54
- a highpass filter takes differences, i.e.
picks out the bumps in the signal difference
filter1/2(identity)-1/2(delay).
55
- the quantity
- is the highpass response, or the transfer
function of the highpass filter. - it results
56
- the magnitude of this periodic highpass
filter is
- the second term is the phase of the highpass
transfer function
57
High-Pass Filter H_1
H_1
1
pi/2
0
pi
-pi
pi
-pi
0
The magnitude and phase of the High-Pass
filter
58
- although there is a discontinuity in the
phase at we still say,
that this is a linear phase filter
H_0 ( ) C( ) H_0( )
2
H_1 ( ) D( ) H_1( )
2
59
FILTER BANK LOW_PASS and HIGH_PASS DOWNSAMPLING
Output at level j1 Scaling coeff. ajk
Input signal x(n)
C
2
D
2

Wavelet coefficients at level j1 bjk
60
  • -THE OUTPUT OF THE LOW_PASS FILTER IS
  • NOT A FINAL OUTPUT
  • - the result an average of the original signal
  • -THIS IS THAT OUTPUT WHICH CAN (WILL) BE
  • FILTERED AGAIN
  • GOES TO THE NEXT LEVEL
  • - filtered by the lowpass
  • -results in an even coarser average
  • of the original signal
  • - filtered by the highpass
  • - fine details of the previously
  • averaged signal

61
-the output of the HIGH_PASS FILTER
IS FINAL OUTPUT WILL NOT BE FILTERED
AGAIN - these are the WAVELET COEFFICIENTS
at the FINEST SCALE - HIGHEST FREQUENCY
COMPONENTS!!!
62
256
N
Some rows (139...) of A1
N/2
L_P
128
H_P
N/2
50
150
200
100
250
A1
Some rows (48...) of A3
L
0
32
H
0
0
1
0
1
15
45
60
30
A3
63
-the filter bank built up with the
Haar coefficients - IS ORTHOGONAL - scaling
functions come from the iteration of the
LOW_PASS FILTER -they are RESCAILED at
each ITERATINON - this results in COARSER
AND COARSER AVERAGING OF THE INPUT
SIGNAL
64
Some rows (10...) of A3
L_P1-32
15
45
60
30
65
Some rows (5...) of A4
L_P1-16
5
15
20
10
25
65
(No Transcript)
66
(No Transcript)
67
c(0)c(1) 2h(0)
Because of causality the upper triangle consists
of zeros only!
½ ½ 0 0 0 0 0 . . 0 0 ½ ½
0 0 0 . . 0 0 0 0 ½ ½ 0 . . 0 0
0 0 0 0 ½ . .
L( 2) C 2
d(0) 2/2, d(1) - 2/2
- ½ ½ 0 0 0 0 0 . . 0
0 -½ ½ 0 0 0 . . 0 0 0 0 -½ ½
0 . . 0 0 0 0 0 0 -½ . .
B( 2) D 2
H1
68
THIS MATRIX REPRESENTS THE WHOLE ANALYSIS BANK
  • 1 0 0 0 0 . .
  • 0 0 1 1 0 0 . .
  • . .
  • -1 1 0 0 0 0 . .
  • 0 0 -1 1 0 0 . .
  • . .

L_P
L B
( 2) C ( 2) D


1/ 2
H_P
THE ORTHOGONAL HAAR SYSTEM - FB
69
2 H
v ( 2) C x L x
0
0
C
2
X
D
2

v ( 2) D x B x
2 H
1
1
70
-The Analysis Matrix, or Analysis Bank built up
by the Haar coefficients is an orthogonal Filter
Bank -For an orthogonal system, the inverse
matrix the transpose -That is SA-1AT
71
THIS MATRIX REPRESENTS THE WHOLE SYNTHESIS BANK
  • 0 . -1 0 .
  • 1 0 . 1 0 .
  • 0 1 . 0 -1 .
  • 0 1 . 0 1 .
  • . .

-1
L B
T
T

1//2
L B
N/2
N/2
WHEN THE MATRIX IS ORTHOGONAL THE INVERSE IS THE
TRANSPOSE
72
DOWNSAMPLING - UPSAMPLING
. x(0) x(2) x(4) .
x(0) 0 x(2) 0 x(4)
. x(0) x(1) x(2) .
. x(0) x(2) x(4) .
( 2)
( 2)


73
- Repr. of the down- sampling op. by matrix
multiplication - as if every second row of a
unitary matrix would be missing!
. x(0) x(1) x(2) .
. x(0) x(2) x(4) .
1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 . . . .
. .

74
DOWNSAMPLING - UPSAMPLING
y(n) ( 2) x(n) x(2n)
u(n) ( 2) v(n)
v(n)
x(n)
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
u(n)
y(n)
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
75
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 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
x(0)x(-1) x(2)x(1) x(4)x(3) x(6)x(5) x(0)-x(-1
) x(2)-x(1) x(4)-x(3) x(6)-x(5)
x(-1) x(0) x(1) x(2) x(3) x(4) x(5) x(6)

76
Low_Pass part
High_Pass part
v ( 2) Cx Lx
0
. x(0)x(-1) x(2)x(1) x(4)x(3)
.
v ( 2) Dx Bx
1
Lx 1/ 2
. x(0)-x(-1) x(2)-x(1) x(4)-x(3)
.
Bx 1/ 2
77
RECONSTRUCTION
u ( 2)v
u ( 2)v
0
0
1
1
x(0)x(-1) 0 x(2)x(1) 0 x(4)x(3)
.
x(0)-x(-1) 0 x(2)-x(1) 0 x(4)-x(3)
.
u 1/ 2
u 1/ 2
0
1
- the Low_Pass part of the synthesis matrix
- the High_Pass part of the synthesis matrix
78
FILTERING AFTER UPSAMPLING RECOVERS THE INPUT
- DELAYED x(n-1)
x(0)x(-1) 0 x(2)x(1) 0 x(4)x(3)
.
x(0)x(-1) x(0)x(-1) x(2)x(1) x(2)x(1) x(4)x(
3) .
F filters 1/ 2
to give 1/2
w
0
Low_Pass Of the Synthesis
79
x(0)-x(-1) 0 x(2)-x(1) 0 x(4)-x(3)
.
-x(0)x(-1) x(0)-x(-1) -x(2) x(1)
x(2)-x(1) x(4) -x(3) .
G filters 1/ 2
to give
w
1
High_Pass For the Synthesis
w x(n-1) w
0
1
80
w_0(n) ½ (u_0(n) u_0(n-1)
w x(n-1) w
0
w_1(n) ½ (u_1(n) - u_1(n-1)
1
x(0)x(-1) x(0)x(-1) x(2)x(1) x(2)x(1) x(4)x(
3) .
-x(0)x(-1) x(0)-x(-1) x(1) -x(0)
x(2)-x(1) x(3) -x(2) .
1/2
w
w
1/2
0
1
w0(n)
w1(n)
1/2x(0)x(-1) x(0)-x(-1) x(n-1)
81
ANALYSIS
SYNTHESIS
L
F
2
2
x(n-1)
H
G
2
2
x(n)
82
Discret Wavelet Transform - DWT
Signal at level j
Signal at level j-1
L
2
H
2

Wavelet coefficients At level j bjk
83
Fast Wavelet Transform - FWT
Sign. at j1a
a
j1,k
j,k
Signal at lev. j-1
L
2
L
2

H
2

H
2
Wavelet coeff. at j1 b
Wavelet coeff. at lev. j b
j1,k
j,k
84
N
L
N/2
L
0
H

A
H
N/2
0
1
A1
A2
85
THE TRANSFORM OF A SIGNAL IN THE
FREQUENCY DOMAIN
y(n)
h(k)x(n-k)
Y( ) X( ) H( )
THE EFFECT OF THE DOWNSAMPLING IN THE FREQUENCY
DOMAIN
Y( ) ½ X( /2) X( /2 ) V( )
86
DOWNSAMPLING - UPSAMPLING
y(n) ( 2) x(n) x(2n)
u(n) ( 2) v(n)
v(n)
x(n)
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
u(n)
y(n)
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
87
- if our input signal is
then the output is
- ? the effect of the downsampling in the
frequency domain is?
88
(No Transcript)
89
- From where it results
- that is, two input signals, that of frequency
give the same output! - This means that the
recovery of the input signal from this output
wouldnt be possible.
90
x(n)
0 1 2 3 4 5 6 7
u(n)
y(n)
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
- again downsampling in time domain
91
X( /2)
X( )
X( /2 )
1
1
-
-2
-
-2
2
2
Period 4
Period 2
Thus the result of this output, would
be
V( )
1
That is, a constant! We could not recover the
original signal from this!
1/2
-
-2
2
92
X( )
1
-
-2
2
Aliasing
1
-
-2
2
- a high frequency component overlaps the low
frequency component
93
FIRST FILTER THEN DOWNSAMPLE
X( )
X( )
1
1
IS FILTERED
-
-2
-
-2
- /2
/2
2
2
X( /2)
X( /2 )
1/2
-
-2
2
-do not overlap
94
X( )
X( /2)
1
X( /2 )
1/2
-
-2
- /2
/2
-
-2
2
2
- as can be seen, if the signal is filtered
before downsampling, that is, is band limited,
then the alias doesnt overlap the original
signal - that is, the original signal can be
recovered
95
-RECONSTRUCTION
- the output of the filtered and downsampled
signal, is denoted by
- when we analyze a signal, first comes
filtering, then downsampling
- when we reconstruct a signal, first comes
upsampling, then filtering
96
- in the time domain the upsampled signal is
denoted by u and takes the form
- in the frequency domain this becomes simple,
as only the even indices enter the sum
97
y(n)v(n)x(2n) u(2k)v(k) u(2k1)0
x(n)
0 1 2 3 4 5 6 7
u(n)
y(n)
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
- downsampling and upsampling (and
filtering) in the time domain
98
UPSAMPLING after DOWNSAMPLING - the analysis bank
includes downsampling - the synthesis bank
includes upsampling -the two operations
- in the frequency domain
99
V( ) ½ X( /2) X( /2 )
X( )
X( /2)
1
X( /2 )
1/2
-
-2
- /2
/2
-
-2
2
2
U( ) V(2 ) ½ X( ) X( )
X( )
X( )
1/2
-
/2
/2
100
AT RECONSTRUCTION
U( ) V(2 ) ½ X( ) X( )
u ( 2)v
IMAGING ONE INPUT TWO OUTPUTS!
IF WAS FILTERED BEFORE ( 2)
X( )
X( /2)
1
X( /2 )
1/2
-
-2
- /2
/2
-
-2
2
2
V( ) ½ X( /2) X( /2 )
101
U( ) V(2 ) ½ X( ) X( )
X( )
X( )
1/2
-
/2
/2
THE OUTPUTS V( ) AND U( )FROM
DOWNSAMPLING AND UPSAMPLING STILL CONTAIN THE
ALIASING PART. BUT A NON- OVERLAPPING ALIAS CAN
BE FILTERED AWAY.
102
- SAMPLING OPERATIONS IN THE z-DOMAIN
- denoting
the Fourier transform
of x(n)
103
SCALING FUNCTIONS AND WAVELETS
Dilation eq. for the scaling function
F(t) 2
h_0(k) F(2t-k)
Wavelet eq.
w(t) 2
h_1(k) F(2t-k)
Then, for the Haar case we get
F(t) F(2t) F(2t-1)
w(t) F(2t) - F(2t-1)
104
Scaling Function - Haar coeff. h0 , h1
F(t-1)
F(t)
j0
1
1
k1
0
0
1
2
1
F(2t-1)
F(2t)
1
j1
1
1
-F(2t-1)
1
0
1
0
0
1
1/2
1/2
1/2
F(t) F(2t) F(2t-1)
105
F(t-1)
j0
1
k1
0
1
2
1
2
1
2
2k2 2k13
F(2t-2)
F(2t-3)
1
1
j1 k1
0
0
1
1.5
1.5
2
1
1
106
w(t)
w(2t)
w(2t-1)
1
1
1
1
1
1/2
0
0
0
1/2
1/2
w(t) F(2t) - F(2t-1)
The Haar Wavelets
!!!That is, the Haar wavelet basis is an
orthogonl basis.
107
1
2
1
2
F(2t-2)
F(2t-3)
1
1
j1 k1
0
0
1
1.5
1.5
2
1
1
w(t-1)
1
0
2
1
108
Averages (lowpass filter) - scaling coefficient
Differences (highpass filter) wavelet
coefficient
109
1 if k0
0 otherwise
Haar scaling functions and wavelets at the same
scaling level (same j) do not overlap. They are
orthogonal.
110
The rescaled Haar wavelets
wjk(x) 2j/2w(2jx - k)
form an orthonormal basis
111
Generally (for the Haar)
112
Different forms of the scaling function or
DILATION EQUATION
-with the original coeff.
- after downsampling
113
The wavelet equation (wavelets from filters)
114
Analysis of a function
Synthesis of a function
115
Perfect reconstruction - we will have causal
filters only, i.e. - at the output - PR with
delay - Perfect reconstruction means, that the
synthesis bank is the inverse of the analysis
bank - in the Haar ex. the
synthesis bank is the transpose of the analysis
bank
116
- Two channel FB Haar ex. are generally
low_pass and high_pass filters, but they are not
ideal
1
0
- aliasing
- Downsampling operation can produce aliasing
117
- if , that is the input has all
frequencies, than after downsampling, at the
output of the low_pass channel we have
- in the z domain
- where
118
- the goal is, to design the synthesis filters in
such a way, that there is no aliasing - only
an overall delay to be allowed
119
V( ) ½ X( /2) X( /2 )
X( )
X( /2)
1
X( /2 )
1/2
-
-2
- /2
/2
-
-2
2
2
X( )
X( )
1/2
-
/2
/2
120
A Filter Bank is a set of filters, linked by
sampling operators and delays.
L
F
2
2
x(n-1)
H
G
2
2
x(n)
Without ( 2) and ( 2) and delay,
PERFECT RECONSTRUCTION would mean F (z)H (z)
F (z)H (z) I (the identity matrix)
0
1
1
0
121
Without ( 2) and ( 2) with delay l
-l
F (z)H (z) F (z)H (z) I z
0
1
1
0
We expect an overall delay z as every filter
is causal. Lets follow the signal through the
filter
-l
Y( ) ½ X( /2) X( /2 ) V( )
After upsampling
U( ) V(2 ) ½ X( ) X( )
122
In the z domain V( z ) ½X(z )
X(-z ) After upsampling
½X(z) X(-z)
1/2
1/2
U(z)
So, at the output of the Lowpass filter we
have ½H (z)X(z) H (-z)X(-z) -the - sign
comes from
0
0
which -z

After filtering by the lowpass filter of the
synthesis we have ½F (z)H (z)X(z) H
(-z)X(-z)
0
0
0
123
For the highpass part we get a similar rel.
½F (z)H (z)X(z) H (-z)X(-z)
1
1
1
We find the output by adding up these two terms.
124
- For perfect reconstruction with a time delay
l, the output must be -that is, the distortion
term must be the alias term must be
zero.
The sampling operators introduced ALIASING These
are the last terms. ALIAS CANCELLATION CONDITION
½F (z)
H (-z)X(-z)
½F (z)
H (-z)X(-z)

0
0
0
1
1
From where it results
1.
F (z)
H (-z)
F (z)
H (-z)

0
0
0
1
1
125
If the alias cancellation eq. is fulfilled, then
at the output we have
½F (z)H (z)X(z) ½F (z)H (z)X(z)
0
0
1
1
To get PR, the output has to be x(n-l) which in
the z is X(z) z X(z)
-l
It results
z X(z)
-l
½F (z)H (z)F (z)H (z)X(z)
0
0
1
1
Finally, the NO DISTORTION CONDITION
-l
F (z)H (z)F (z)H (z)
2z
2.
0
1
1
0
126
The extra 2 is the result of that, that we
built up the FB from 2 filters.
These two conditions, in matrix form
H (z) H (-z) H (z) H (-z)
0
0
F (z) F (z)
2z 0
-l

0
1
1
1
The question is how to design filters that
meet these conditions? There are many ways! One
of them to determine some of the filters from
the others!
127
From the Alias Cancellation cond. we choose
F (z) H (-z) and F (z) - H (-z)
1
1
0
0
Define the product filter P (z) F (z) H
(z) and P
(z) F (z) H (z)
0
0
0
1
1
1
P (z) it is lowpass filter product, P (z)
highpass filter product
0
1
128
- from the alias cancellation condition results
Then, the No Distortion cond.
F (z)H (z)F (z)H (z)
F (z)H (z)-F (z)H (-z)


0
1
1
0
0
0
0
0
(cond. on odd powers)!!!
129
2.
P (z) P (-z)
-l
2z
0
0
Example
p, -q, r, -s, t
H
a, b, c
F (z) H (-z)
0
1
0
p, q, r, s, t
H
-a, b, -c
F (z) - H (-z)
1
0
1
STEPS - Design a lowpass prod. Filter
which satisfies eq. 2. -
Factor P into F and H . Then
find F and H .
0
0
0
1
1
130
1.
F (z)
H (-z)
F (z)
H (-z)

0
0
0
1
1
-l
F (z)H (z)F (z)H (z)
2z
2.
0
1
1
0
P (z) F (z) H (z)
0
0
0
P (z) F (z) H (z)
1
1
1
F (z) H (-z) and F (z) - H (-z)
1
1
0
0
2. (4.9)
P (z) P (-z)
-l
2z
0
0
131
  • - There are many ways to design P in step 1.
  • and there are many ways to factor it in step 2.
  • The length of P determines the sum of the
  • length of F and H .

0
0
0
0
IMPORTANT EQ. 2. IS A CONDITION ON THE ODD
POWERS! Those odd powers MUST HAVE coefficient
zero except z .
-l
Which has coefficient one.
Eq. 2. can be made a little more convenient. The
left side is an odd function, so l is odd!
132
Normalize P (z) by z to center it The
normalized product filter is P(z) z P (z).
l
0
l
0
l
P(-z)(-z) P (-z) -z P (-z)
l
0
0
THE PERFECT RECONSTRUCTION CONDITION THEN
P(z) P(-z) 2
3.
Or
P( ) P( ) 2
4.

- cond. on the even power
133
FILTER BANKS PERFECT RECONSTRUCTION
From 3. and 4. it results that P(z) must be
halfband filter!
That is, all even powers in P(z) are zero, except
the constant term, z which is 1!
0
The odd powers cancel, when P(z) combines with
P(-z).
134
In practice, many times we first determine
H
H
and
0
1
Ex.
Order flip
H
a, b, c, d
d,c,b,a
F (z) H (-z)
0
1
0
Alternating flip
Alternating sign
H
F (z) - H (-z)
-a, b, -c, d
d, -c, b, -a
0
1
1
135
Example
We have to choose the polynomial
in such a way to satisfy PR condition. That is,
the odd powers must have coefficient zero, except
has coefficient one.
A possible choice for
136
Results
- it results
137
The central term is
The centering operation gives P(z)
138
This is halfband the only term with even power
is
with coefficient 1. So, the PR
condition is verified. The odd powers cancel in
the sum.
- that is
- in the frequency domain
- halfband condition
139
- condition on the odd powers
- condition on the even powers
140
- How to factor - There are a variety of
factorizations in
- the polinomial prewious ex., has 6
roots. - the 2 roots from Q(z) are
- the other 4 roots are at z-1.
141
- note
Im
-4th order zero
Re
1
z-1
Ex.
Then H0
142
Im
-2nd order zero
-2nd order zero
Re
1
1
-1
z-1
- filter length 5 ¼ -1,2,6,2,-1
- filter length 3 ¼ 1,2,1
- symmetric filters, (linear phase)
143
-2nd order zero
-2nd order zero
1
-1
1
-1
Orthogonal filters (min. phase/max. phase) -
filter length 4 - filter length 4
144
- in this case one filter is the transpose of the
other - in the time domain - in the z domain
- the Haar filter bank
145
- from the alias cancellation cond.
- the product filter
- the perfect reconstruction cond.
146
Im
-2nd order zero
Re
1
z-1
- zeros of P(z)
147
Orthonormal Filter Banks
C
C
2
T
2
x(n-1)
D
D
T
2
2
x(n)
148
ORTHOGONALITY CONDITION or CONDITION O
c(3) c(2) c(1) c(0) 0 0 0 .
0 0 c(3) c(2) c(1) c(0) 0
. ..... d(3) d(2) d(1) d(0) 0
0 0 0 d(3) d(2) d(1) d(0)
0 .....
L B

149
c(3) 0 . d(3) 0 c(2) 0 . d(2)
0 c(1) c(3) . d(1) d(3) c(0) c(2)
. d(0) d(2) . c(1) .
0 d(1) . c(0) . 0 d(0)
L B

T
T
150
PR condition for orthogonal filter banks.
I 0 0 I
L B
T
T

L B
It results
T
LL I LB 0 BB I
c(n)c(n-k) (k) c(n)d(n-k) 0 d(n)d(n-k)
(k)
T
T
151
This condition above, is called Cond. O or
double shift orthogonality.
2
2
2
2
c(0) c(1) c(2) c(3) 1 and
c(0)c(2) c(1)c(3) 0
- Cond. O, imposes two constraints on four
coeff. - For the high_pass coeff. similar
relations hold.
152
2
2
2
2
d(0) d(1) d(2) d(3) 1 and
d(0)d(2) d(1)d(3) 0
- From these cond. results THE
FILTER LENGTH CANNOT BE ODD!!!
(Example!!!)
153
If the filter length would be odd (N1), then
c(4) c(3) c(2) c(1) c(0) 0 0 0
0 0 0 0 0 c(4) c(3)
c(2) c(1) c(0) 0 0 0 0 0
0 0 0 c(4) c(3) c(2) c(1)
c(0) 0 0 0 0 0 0 0
0 c(4) c(3) c(2) c(1) c(0) .....
d(4) d(3) d(2) d(1) d(0) 0 0
0 0 0 d(3) d(2) d(1) d(0)
0 0 .....
L B

154
For the orthogonality cond. c(4)0c(3)0c(2)
0c(1)0c(0)c(4)0 which would mean
c(0)c(4)0 !!! That is N cannot be even, so
the length of the Filter cannot be odd!!!
155
The PR, or halfband cond., or Cond. O For the
filters in the frequency and z Domain
C(z) C(-z) 2
2
2
C( ) C( ) 2
2
2

-where
156
D(z) D(-z) 2
2
2
D( ) D( ) 2
2
2

The highpass filter coeff. can be expressed by
the lowpass filter coeff. d(k)(-1) c(N-k)
k
Which is the alternating flip.
157
c(3) c(2) c(1) c(0) 0 0 0 .
0 0 c(3) c(2) c(1) c(0) 0
. ..... -c(0) c(1) -c(2) c(3) 0
0 0 0 -c(0) c(1) -c(2) c(3)
0 .....
L B

- In reality because of time reversal there is a
change in sign c(0), -c(1)...
The alt. flip cond. for the filters D(z)(-z)
C(-z ) where ze
-N
-1
158
It results, that the main problem is, to design
the lowpass filter C!!! It would be ideal to
have - symmetric - orthogonal filters But
this is possible only in the Haar case!
159
2
Let us denote P( ) C( )
Power Spectral Response it is an autocorrelation
function gt 0 C( ) C( )
That is, C( ) or C(z) is a spectral component
of a HALFBAND FILTER! It is real and
nonnegative.
2
A similar relation holds for P( ) D( )
1
160
This is a real and nonnegative filter
p(n)p(-n) Or
That is, p(n) is the autocorrelation of the
coeff. c(k). That is, P is symmetric, it is the
autocorrelation filter.
161
-C is the start of an orthogonal filter bank if
and only if the autocorrelation filter, P is a
HALFBAND FILTER! - in the z domain the halfband
filter cond. P(z)P(-z)2 - from where it
results
162
Example
This is never negative! The PR cond. is satisfied
P( ) 1 cos Or, in the z
domain P(z) 1
z z 2
-1
i
2
-i
P( ) C( ) (1 e )(1e ) /2
1cos
The requirement P( ) gt 0 is crucial!
163
That is
Is a halfband filter.
It is positive and 0 when or
z-1 When as well.
164
- for it results
- the coefficients come from the familiar
averaging filter
165
Another example the famous Daubechies
Orthogonal filter.
2
P( ) ( 1 cos ) (1- ½ cos )
Has a double zero at
- If we would keep the first term only the
square of the previous ex., - they would lead to
the hat function. - This would not yield a
halfband filter.
166
- In the z-domain we are squaring
which produces the even power term.
- This is not halfband! Daubechies extra factor
must be included to cancel this term.
167
- Thanks to this factor, we got a halfband
filter. In the z-domain is missing.
In the z domain P(z) 1/16 -z 9z 16 9z
-z
-3
-1
1
3
From where C(z)1/4 2(1 3)(3 3)z (3- 3)z
(1- 3)z
-3
-2
-1
168
-2nd order zero
-2nd order zero
1
-1
1
-1
Orthogonal filters (min. phase/max. phase) -
filter length 4 - filter length 4
169
- These are the 4 coeff. of the famous
Daubechies filter D4. 1.- The halfband filter
has P(z)P(-z)2. The factor C(z) goes into an
orthonormal filter bank. D(z) comes from C(z) by
an alternating flip. 2. The response C(z) has
a double zero at z-1. In the frequency domain C(
) has a double Zero at . The
response is flat at because of (1cos ) .
2
170
P( )
2
P( /2) 1
1
C( )
171
Spectral Factorization - Two questions arise
immediately - can every polynomial with
be factored into - how can
this spectral factorization be done? - The
answer to the first question is
YES, Féjer-Riesz Theorem - The answer to the
second question is not so easy- - there are
different methods
172
- Method A - zeros of a polynomial - with real
symmetric coeff. p(n), we have - If -When
is inside the unit circle, is
outside. - The roots on the unit circle must have
even multiplicity.
- real coeff. ensure that the complex conjugate
is a root when z is a root - the complex roots
of the unit circle come 4 at a time
173
- to get real filters, z and must stay
together - to get orthogonal filters z and
must go separately - this is the
spectral factorization C(z)C( )
174
MAXFLAT (DAUBECHIES) FILTERS
- these filters (and wavelets) are orthogonal -
the frequency responses have maximum flatness
at 0 and - the highpass
coefficients come from the lowpass by
alternating flip. Condition O for a maxflat
filter is a
normalized halfband filter - that is p(0)1
and p(2)p(4)...0
175
Condition Ap C( ) has a zero of order p
at
that is
- The eq. says that

176
- That is, the odd-numbered coefficients have the
same sum as the even-numbered coeff.
Cond. A1 on c(n)
177
- Cond. Ap on c(n)
for k0,1,...,p-1. - factor comes from the
k-th derivative of - comes from
substituting - Because
P also
vanishes when
178
The odd sum must be 1, since the only nonzero
even-numbered coeff. is p(0)1
The sum over all n is P(0)2. This yields
so the DC term at
is not reversed in sign.
179
The p zeros at mean that has a
factor
Condition Ap on
From where it results, that has a
factor
180
Example P( )2( ) ( )(
).
1cos 2
p
pk-1 k
1-cos 2
k
  • How to design Maxflat Filters
  • The coeff. of the H_P Filter come from
  • the L_P Filter coeff. by Alternating-Flip.
  • The degree of the product Filter P is
  • 2N4p-2

181
- Let us take the binomial series
truncated after p terms
- the remainder O, has order because this
is the first term to be dropped.
182
-we combine B(y) with the factor
that has p zeros at y1. - the variable y on
0,1 will correspond to the frequency on

- this product has exactly the flatness we want
at y0.
183
- It is a polinomial of degree 2p-1, with 2p
coeff., and satisfies p cond. at each
endpoint - its first p-1 derivatives are zero
at y0 and y1, except
- if we go from ordinary polinomials in y to
trigonometric polinomials in the change
from into
is
184
Then, we get
- In the z-domain
185
(No Transcript)
186
(No Transcript)
187
(No Transcript)
188
Daubechies orthogonal wavelets
189
Wrap around 3. (row127)4. (row128)
190
  • Biorthogonal PR
  • Theorem In a biorthogonal linear-phase Filter
  • Bank with two channels, the filter lengths are
  • all odd or all even! The analysis filter can be
  • both symmetric of odd length
  • - one symmetric and the other antisymmetric
  • of even length.

191
How to design orthogonal or biorthogonal filters?
- to have real valued filters z and z MUST
stay together - for biorthogonal filters z and
z MUST stay together - for orthogonal
filter z and z MUST go into different
filters this gives C(z)C(z )
-1
-1
-for an orthogonal FB, the filter length
cannot be odd!!!
192
The space L2 Definition For an interval
the space is the
set of all square integrable functions defined on
In other words,
193
-funcions that are discontinuous are allowed as
members of this space - all the ex. used are or
cont., or discontinuous at a finite set of
points - the condition
physically means that the total
energy of the signal is finite
194
- the space is infinite
dimensional - ex.if a0 and b1, then the set
of functions 1, t, t2, t3, ...is linearly
independent and belongs to
- the function f(t)1/t is an ex. of a function
that does not belong to since

195
L2 Inner Product Definition The L2 inner
product on is defined as
- remember for two vectors, X(x1,x2,x3),
and Y(y1,y2,y3) in R3, the standard
(Euclidian) inner product of X and Y is defined as
196
Multiresolution Analysis - recall that the
sampling theorem approximately reconstructs a
signal f from samples taken uniformly at
intervals of length T. - if the signal is band
limited and its Nyquist frequency is less than
1/T , then the reconstruction is perfect - the
smaller T is, the better we can approximate or
resolve the signal - the size of T measures
our resolution of the signal f.
197
- A typical FFT analysis of the samples taken
from f works at one resolution T. - if the
signal has bursts where it varies rapidly with
periods where it is slowly varying, this single
resolution analysis does not work well - to
solve this problem - replace the space of band
limited functions with one tailored to the
signal - analyze the signal using the scaled
versions of the same space, at resolutions T/2,
and so on - Hence the term
multiresolution analysis.
198
DEFINITION Let , j ...,
-2,-1,0,1,2,3,...be a sequence of subspaces of
functions in The collection of
subspaces is called a
multiresolution analysis with scaling function
if the following conditions hold
1. (nested)
2. (density)
3. (separation)
4. (scaling) The function f(x) belongs to
if and only if the function
belongs to
199
5. (orthonormal basis) The function
belongs to and the set
is an orthonormal basis
(using the inner product) for
- there may be several choices of
corresponding to a system of approximation spaces
- different choices for may yield
different multiresolution analysis -
dont have to be orthonormal
200
- all that is needed is a for which the set
is a basis.
-the most useful class of scaling functions are
those that have compact or finite support - the
Haar scaling function is a good example of a
compactly supported function - the scaling
functions associated with Daubechies wavelets
are not only compactly supported, but also
continuous
201
- the two sharp spikes noise - the signal can be
approximated using Haar building blocks
202
Haar Decomposition and Reconstruction Algorithms
- Decomposition Definition Suppose, j is any
nonnegative integer. The space of step functions
at level j, denoted by is defined to be
the space spanned by the set
over the real numbers.
203
is the space of piecewise constant
functions of finite support whose discontinuities
are contained in the set
- a function in is a piecewise constant
function with discontinuities contained in the
set of integers
204
-any function in is also contained in
which consists of piecewise const. fun. whose
discont. are contained in a set of half integers
205
- the same applies for and
- this containment is strict - for ex. the fun.
belongs to but does not belong
to - since is discont. at
x1/2.
206
y
x
0
1
-1
2
3
4
Graph of typical element in
A fun. in may not have disc. if for ex.
207
4
1
1/2
Graph of
-The graph of the function
1
2
3
-1
208
- contains all relevant information up to a
resolution scale of order - as j gets
larger, the resolution gets finer - One way to
decompose a signal efficiently is to construct
an orthonormal basis for - is
generated by and its translates and have
unit norm in that is
209
- if j is different from k then
- so the set
is an orthonormal basis for
210
- the idea is to decompose as an
orthogonal sum of and its
complement - if j1, the orthogonal complement
of in is generated by the
translates of some function
211
1. - is a member of and so
can be expressed as
for some choice of
(And only a finite number of the al are
nonzero.) 2. - is orthogonal to V0.
This is equivalent to
for all integers k.
212
- the first requirement means that is
built from blocks of width ½. - the second
requirement with k0 implies
- the smallest satisfying both of these
requirements is the function whose graph is
213
- This graph consists of two blocks of width
one-half and can be written as
1
1
1/2
-1
- satisfying the first requirement. - in addition
214
- thus, is orthogonal to - If
then the support of and
the support of do not overlap,
so
- therefore, belongs to and is
orthogonal to
215
MULTIRESOLUTION - wavelets produce a natural
multi- resolution of every image -
coarser and coarser approx. of func. f(t)
- averaging for bigger and bigger int. THE
SMOOTH SIGNAL at one level DETILS at the same
level COMBINE INTO A MULTI- RESOLUTION at the
next FINER LEVEL
216
coarse aver. at lev. j details at lev. j
(wave. coef.) signal at
the finer level j-1
217
Where
218
V2
W2
xa (t) a (t) b w (t) a (t)
b w (t) b w (t) a (t) b w (t)
b w (t) b w (t)
2k
2k
3k
3k
2k
2k
2k
2k
1k
1k
1k
1k
1k
1k
0k
2k
2k
0k
0k
0k
V0
W0
W1
W2
219
Some Applications - ECG Analysis (Laszlo,
Schipp) - Construction of Haar-like systems
Write a Comment
User Comments (0)
About PowerShow.com