You are on page 1of 25

Course 18.327 and 1.

130
Wavelets and Filter Banks
Numerical solution of PDEs: Galerkin
approximation; wavelet integrals
(projection coefficients, moments and
connection coefficients); convergence

Numerical Solution of Differential Equations


Main idea: look for an approximate solution that lies in Vj.
Approximate solution should converge to true
solution as j .
Consider the Poisson equation
leave boundary

= f(x) --------------- conditions till later


x2
Approximate solution:

uapprox(x) = c[k]2j/2 (2j x k) -----------


k

14243

j,k(x)
trial functions

Method of weighted residuals: Choose a set of test


functions, gn(x), and form a system of equations
(one for each n).

2uapprox
x2

gn(x)dx = f(x)gn(x) dx

One possibility: choose test functions to be Dirac


delta functions. This is the collocation method.

gn(x) = (x n/2j)

n integer

c[k]j,k
(n/2j) = f(n/2j)

----------------------------

Second possibility: choose test functions to be


scaling functions.
Galerkin method if synthesis functions are used
(test functions = trial functions)
Petrov-Galerkin method if analysis functions are used
e.g. Petrov-Galerkin
~
gn(x) = j,n(x)

~
Vj

~
~
c[k] x2 j,k(x) . j,n(x) dx = f(x)j,n(x) dx --------

Note: Petrov-Galerkin

Galerkin in orthogonal case


4

Two types of integrals are needed:


(a) Connection Coefficients

~ j
2
~

2j
j/2
j
j/2

(x) . (x)dx = 2 2 (2 x - k)2 (2 x - n)dx


2
- x

j,k

j,n

~
22j ()(
-

+ k n) d

= 22jh2/x2 [n k]
where h2/x2 [n] is defined by

~
h2/x2 [n] = (t)(t n)dt -----------------

connection coefficients

(b) Expansion coefficients

~
The integrals f(x)j,n(x)dx are the coefficents for
-

the expansion of f(x) in Vj.


fj(x) = rj[k] j,k(x)

--------------------------

with

j,k(x) dx
rj[k] = f(x) ~

--------------------------

So we can write the system of Galerkin equations as


a convolution:

22j c[k]h2/x2[n k] = rj[n] ----------------


k

Solve a deconvolution problem to find c[k] and


then find uapprox using equation .
Note: we must allow for the fact that the solution may
be non-unique, i.e. H2/x2() may have zeros.
Familiar example: 3-point finite difference
operator
h2/x2[n] = {1, -2, 1}
H2/x2(z) = 1 2z1 + z2 = (1 z1)2
H2/x2() has a 2nd order zero at = 0.
Suppose u0(x) is a solution. Then u0(x) + Ax + B is
also a solution. Need boundary conditions to fix
uapprox(x).
7

Determination of Connection Coefficients

2
2
h /x [n] = (t) (t n)dt
-
Simple numerical quadrature will not converge if
(t) behaves badly.
Instead, use the refinement equation to formulate an
eigenvalue problem.
(t) = 8 f0[k](2t k)
k
~
~
(t n) = 2 h0[l](2t 2n - l)
k

678

(t) = 2 f0[k](2t k)

Multiply and
Integrate

So
h2/x2[n] = 8 f0[k] h0[l]h2/x2[2n + l - k]
k

Daubechies 6
scaling function

First derivative
of Daubechies 6
scaling function
9

Reorganize as
h2/x2[n] = 8 h0[m 2n]( f0[m k]h2/x2[k])
m

Matrix form
h2/x2 = 8 A B h2/x2

m = 2n +l

eigenvalue problem

Need a normalization condition


use the moments
of the scaling function:
If h0[n] has at least 3 zeros at , we can write

~
2
2
2[k](t k) = t ; 2[k] = t (t k)dt
-
k
~
Differentiate twice, multiply by (t) and integrate:
2[k]h2/x2[- k] = 2!
k

Normalizing condition
10

Formula for the moments of the scaling function

l
k _ l(
-

- k)d

Recursive formula

00 = ()d = 1

r0

N
r-1
i
1
r
r

i
) 0
2r - 1 ( i ) ( h0[k]k
k=0
i=0
l
r
( rl )kl-r 0
r=0

kl =

11

How to enforce boundary conditions?


One idea extrapolate a polynomial:
p-1
u(x) = c[k]j,k(x) = a[l]xl
k
l=0
Relate c[k] to a[l] through moments. Extend c[k]
by extending underlying polynomial.
Extrapolated polynomial should satisfy boundary
constraints:
Dirichlet:
p-1
l
u(x0) = a[l]x0 =
l=0
Neumann:
p-1
u'(x0) = a[l]lx0l-1 =
l=0

Constraint
on a[l]
12

Convergence
Synthesis scaling function:
(x) = 2 f0[k](2x k)
k

We used the shifted and scaled versions, j,k(x), to


synthesize the solution. If F0() has p zeros at , then
we can exactly represent solutions which are degree
p 1 polynomials.
In general, we hope to achieve an approximate solution
that behaves like
u(x) = c[k]j,k(x) + O(hp)
k

where
h =

1
2j

= spacing of scaling functions

13

Reduction in error as a function of h

14

Multiscale Representation
e.g. 2u/x2 = f
Expand as

u = ck(x k) + dj,kw(2j x-k)


J

j=0 k

Galerkin gives a system


Ku = f
with typical entries

2
2j
2 x2 w(x
-

Km,n =

n)w(x-m)dx

15

Effect of Preconditioner

Multiscale equations: (WKWT)(Wu) = Wf


Preconditioned matrix: Kprec = DWKWTD
Simple diagonal preconditioner

1
1

D=

2
1

2
1

4
1

1
4

16

Matlab Example
Numerical solution of Partial
Differential Equations

17

The Problem
1. Helmholtz equation: uxx + a u = f
p=6;
% Order of wavelet scheme (pmin=3)
a=0
L = 3;
% Period.
nmin = 2; % Minimum resolution
nmax = 7; % Maximum resolution

18

Solution at Resolution 2

19

Solution at Resolution 3

20

Solution at Resolution 4

21

Solution at Resolution 5

22

Solution at Resolution 6

23

Solution at Resolution 7

24

Convergence Results

>> helmholtz slope =

5.9936

25

You might also like