Professional Documents
Culture Documents
Lect 6
Lect 6
FORWARD versus BACKWARD: Predicting the future versus (improper terminology) predicting the past;
Lattice lters
References : Chapter 3 from S. Haykin- Adaptive Filtering Theory - Prentice Hall, 2002.
2 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Notations, Denitions and Terminology
Time series:
u(1), u(2), u(3), . . . , u(n 1), u(n), u(n + 1), . . .
k=1
w
k
u(n k) = w
T
u(n 1)
Regressor vector
u(n 1) =
[
u(n 1) u(n 2) . . . u(n M)
]
T
u(n 1)
u(n 2)
u(n 3)
u(n M)
[
u(n 1) u(n 2) u(n 3) . . . u(n M)
]
=
=
R =
r (0) r (1) . . . r (M 1)
r (1) r (0) . . . r (M 2)
. . . .
. . . .
. . . .
r (M 1) r (M 2) . . . r (0)
autocorrelation matrix
r = E[u(n 1)u(n)] =
[
r (1) r (2) r (3) . . . r (M)
]
T
autocorrelation vector
r
B
= E[u(n 1)u(n M 1)] =
[
r (M) r (M 1) r (M 2) . . . r (1)
]
T
Superscript
B
is the vector reversing (Backward) operator. i.e. for any vector x, we have
x
B
=
[
x(1) x(2) x(3) . . . x(M)
]
B
=
[
x(M) x(M 1) x(M 2) . . . x(1)
]
4 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Optimal forward linear prediction
Optimality criterion
J(w) = E[f
M
(n)]
2
= E[u(n) w
T
u(n 1)]
2
J(a
M
) = E[f
M
(n)]
2
= E[a
T
M
[
u(n)
u(n 1)
]
]
2
Optimal solution:
Optimal Forward Predictor w
o
= R
1
r
Forward Prediction Error Power P
M
= r (0) r
T
w
o
a
M,0
a
M,1
a
M,2
.
.
a
M,M
P
M
0
0
.
.
0
Whenever R
M
is nonsingular, and a
M,0
is set to 1, there are unique solutions a
M
and P
M
.
8 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Optimal backward linear prediction
k=1
g
k
u(n k + 1) = g
T
u(n)
where the BACKWARD PREDICTOR is
g =
[
g
1
g
2
. . . g
M
]
T
Optimality criterion
J
b
(g) = E[b
M
(n)]
2
= E[u(n M) g
T
u(n)]
2
9 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Optimal backward linear prediction
Optimal solution:
Optimal Backward Predictor g
o
= R
1
r
B
= w
B
o
Forward Prediction Error Power P
M
= r (0) (r
B
)
T
g
o
= r (0) r
T
w
o
j =1
R
i ,j
x
Mj +1
=
M
j =1
r (i j )x
Mj +1
j =Mk+1
=
M
k=1
r (i M + k 1)x
k
=
M
k=1
R
Mi +1,k
x
k
= (Rx)
Mi +1
= (Rx)
B
i
11 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Relations between Backward and Forward predictors
The Forward and Backward optimal predictors are solutions of the systems
Rw
o
= r
Rg
o
= r
B
Rg
o
= r
B
= (Rw
o
)
B
= Rw
B
o
and since R is supposed nonsingular, we have
g
o
= w
B
o
12 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Augmented Wiener-Hopf equations for Backward
prediction
c
M,0
c
M,1
c
M,2
.
.
c
M,M
a
M,M
a
M,M1
a
M,M2
.
.
a
M,0
0
0
0
.
.
P
M
The augmented Wiener-Hopf equations for forward and backward prediction are very similar and they help in
nding recursive in order recursions, as shown next.
14 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Levinson Durbin algorithm
The augmented Wiener-Hopf equations for forward and backward prediction provide a short derivation of
Levinson-Durbin main recursions.
Stressing the order of the lter: all variables will receive a subscript expressing the order of the predictor:
R
m
, r
m
, a
m
, w
o
m
.
Several order recursive equations can be written for the involved quantities:
r
m+1
=
[
r (1) r (2) . . . r (m) r (m + 1)
]
T
=
[
r
m
r (m + 1)
]
R
m+1
=
[
R
m
r
B
m
(r
B
m
)
T
r (0)
]
=
[
r (0) r
T
m
r
m
R
m
]
15 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
LD recursion derivation:
Let dene the vectors and the scalar
m1
and evaluate them using augmented WH equations:
=
[
a
m1
0
]
m1
P
m1
[
0
a
B
m1
]
(2)
m1
= r
T
m
a
B
m1
= a
T
m1
r
B
m
= r (m) +
m1
k=1
a
m1,k
r (m k)
Multiplying the right hand side of Equation (2) by R
m+1
=
[
R
m
r
B
m
(r
B
m
)
T
r (0)
]
=
[
r (0) r
T
m
r
m
R
m
]
we obtain
R
m+1
= R
m+1
{
[
a
m1
0
]
m
P
m1
[
0
a
B
m1
]
}
=
[
R
m
r
B
m
(r
B
m
)
T
r (0)
]
[
a
m1
0
]
m1
P
m1
[
r (0) r
T
m
r
m
R
m
] [
0
a
B
m1
]
=
[
R
m
a
m1
(r
B
m
)
T
a
m1
]
m1
P
m1
[
r
T
m
a
B
m1
R
m
a
B
m1
]
=
[
R
m
a
m1
m1
]
m1
P
m1
[
m1
R
m
a
B
m1
]
=
P
m1
0
m1
m1
m1
P
m1
m1
0
m1
P
m1
P
m1
2
m1
P
m1
0
m1
m1
m1
P
m1
2
m1
P
m1
0
m
16 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
LD recursion proof:
Recall the augmented WH equation
R
M+1
a
M
=
[
P
M
0
]
Now using (1) = a
m1,0
= 1, and since we suppose R
m
nonsingular, the unique solution of
R
m+1
=
P
m1
2
m1
P
m1
0
m
2
m1
P
m1
= P
m1
(1
2
m1
P
2
m1
) = P
m1
(1
2
m
)
with the notation
m
=
m1
P
m1
17 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Levinson Durbin recursions
Levinson Durbin recursions
a
m
=
[
a
m1
0
]
+
m
[
0
a
B
m1
]
Vector form of L D recursions
a
m,k
= a
m1,k
+
m
a
m1,mk
, k = 0, 1, . . . , m Scalar form of L D recursions
m1
= a
T
m1
r
B
m
= r (m) +
m1
k=1
a
m1,k
r (m k)
m
=
m1
P
m1
P
m
= P
m1
(1
2
m
)
18 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
LD recursion variables:
Interpretation of
m
and
m
1.
m1
= E[f
m1
(n)b
m1
(n 1)]
Proof (Solution of Problem 9 page 238 in [Haykin91])
E[f
m1
(n)b
m1
(n 1)] = E[a
T
m1
u(n)][u(n 1)
T
a
B
m1
] = a
T
m1
[
r
T
m
R
m1
r
B
m1
]
[
w
B
m1
1
]
=
[
1 w
T
m1
]
[
r
T
m
a
B
m1
0
m1
]
= r
T
m
a
B
m1
=
m1
2.
0
= E[f
0
(n)b
0
(n 1)] = E[u(n)u(n 1)] = r (1)
3. Iterating P
m
= P
m1
(1
2
m
) we obtain
P
m
= P
0
m
k=1
(1
2
k
)
4. Since the power of prediction error must be positive for all orders, the reection coecients are less than
unit in absolute value:
|
m
| 1 m = 0, . . . , M
5. Reection coecients equal last autoregressive coecient, for each order m:
m
= a
m,m
, m = M, M 1, . . . , 1
19 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Algorithm Levinson-Durbin
Given r (0), r (1), r (2), . . . , r (M)
(for example, estimated from data u(1), u(2), u(3), . . . , u(T) using r (k) =
1
T
T
n=k+1
u(n)u(n k))
1. Initialize
0
= r (1), P
0
= r (0)
2. For m = 1, . . . , M
2.1
m
=
m1
P
m1
2.2 a
m,0
= 1
2.3 a
m,k
= a
m1,k
+
m
a
m1,mk
, k = 1, . . . , m
2.4
m
= r (m + 1) +
m
k=1
a
m,k
r (m + 1 k)
2.5 P
m
= P
m1
(1
2
m
)
Computational complexity:
For the mth iteration of Step 2: 2m + 2 multiplications, 2m + 2 additions, 1 division
The overall computational complexity: O(M
2
) operations
20 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Algorithm (LD) Second form
Given r (0) and
1
,
2
, . . . ,
M
1. Initialize P
0
= r (0)
2. For m = 1, . . . , M
2.1 a
m,0
= 1
2.2 a
m,k
= a
m1,k
+
m
a
m1,mk
, k = 1, . . . , m
2.3 P
m
= P
m1
(1
2
m
)
21 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Inverse Levinson Durbin algorithm
a
m,k
= a
m1,k
+
m
a
m1,mk
a
m,mk
= a
m1,mk
+
m
a
m1,k
[
a
m,k
a
m,mk
]
=
[
1
m
m
1
] [
a
m1,mk
a
m1,k
]
and using the identity
m
= a
m,m
a
m1,k
=
a
m,k
a
m,m
a
m,mk
1 (a
m,m
)
2
k = 1, . . . , m
22 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Inverse Levinson Durbin algorithm
The second order properties of the AR process are perfectly described by the set of reection coecients
This immediately follows from the following property:
The sets {P
0
,
1
,
2
, . . . ,
M
} and {r (0), r (1), . . . , r (M)} are in one-to-one correspondence
Proof
(a) {r (0), r (1), . . . , r (M)}
(Algorithm L D)
= {P
0
,
1
,
2
, . . . ,
M
, }
(b) From
m+1
=
m
P
m
=
r (m + 1) +
m
k=1
a
m,k
r (m + 1 k)
P
m
we can obtain immediately
r
m+1
=
m+1
P
m
k=1
a
m,k
r (m + 1 k)
which can be iterated together with Algorithm LD form 2, to obtain all r (1), . . . , r (M).
23 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Whitening property of prediction error lters
In theory, a prediction error lter is capable of whitening a stationary discrete-time stochastic process
applied to its input, if the order of the lter is high enough.
Then all information in the original stochastic process u(n) is represented by the parameters
{P
M
, a
M,1
, a
M,2
, . . . , a
M,M
} (or, equivalently, by {P
0
,
1
,
2
, . . . ,
M
}).
A signal equivalent (as second order properties) can be generated starting from
{P
M
, a
M,1
, a
M,2
, . . . , a
M,M
} using the autoregressive dierence equation model.
These analyze and generate paradigms combine to provide the basic principle of vocoders.
24 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Lattice Predictors
m
1
] [
f
m1
(n)
b
m1
(n 1)
]
26 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Lattice Predictors
f
m
(n) = f
m1
(n) +
m
b
m1
(n 1)
b
m
(n) = b
m1
(n 1) +
m
f
m1
(n)
Using the time shifting operator q
1
, the prediction error recursions are given by
[
f
m
(n)
b
m
(n)
]
=
[
1
m
q
1
m
q
1
] [
f
m1
(n)
b
m1
(n)
]
which can now be iterated for m = 1, 2, . . . , M to obtain
[
f
M
(n)
b
M
(n)
]
=
[
1
M
q
1
M
q
1
]
[
1
M1
q
1
M1
q
1
]
. . .
[
1
1
q
1
1
q
1
] [
f
0
(n)
b
0
(n)
]
=
[
1
M
q
1
M
q
1
]
[
1
M1
q
1
M1
q
1
]
. . .
[
1
1
q
1
1
q
1
] [
1
1
]
u(n)
Having available the reexion coecients, all prediction errors of order m = 1, . . . , M can be computed using the
Lattice predictor, in 2M additions and 2M multiplications.
27 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Lattice Predictors
Some characteristics of the Lattice predictor:
1. It is the most ecient structure for generating simultaneously the forward and backward prediction errors.
2. The lattice structure is modular: increasing the order of the lter requires adding only one extra module,
leaving all other modules the same.
3. The various stages of a lattice are decoupled from each other in the following sense: The memory of the
lattice (storing b
0
(n 1), . . . , b
M1
(n 1)) contains orthogonal variables, thus the information
contained in u(n) is split in M pieces, which reduces gradually the redundancy of the signal.
4. The similar structure of the lattice lter stages makes the lter suitable for VLSI implementation.
28 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Lattice Inverse lters
m
=
2E[b
m1
(n 1)f
m1
(n)]
E[(f
2
m1
(n)] + E[b
2
m1
(n 1)]
31 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Burg estimation algorithm (not for exam)
N
n=1
we obtain one direct way to
estimate the parameters of the lattice lter, starting from the data available in lattice lter:
m
=
2
N
n=1
b
m1
(n 1)f
m1
(n)
N
n=1
[(f
2
m1
(n) + b
2
m1
(n 1)]
The parameters
1
, . . . ,
M
can be found solving rst for
1
, then using
1
to lter the data u(n) and
obtain f
1
(n) and b
1
(n), then nd the estimate of
2
....
There are other possible estimators, but Burg estimator ensures the condition || < 1 which is required for
the stability of the lattice lter.
32 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Gradient Adaptive Lattice Filters (not for exam)
J
m
2[f
m
(n)b
m1
(n 1) + f
m1
(n)b
m
(n)]
We obtain the updating equation for the parameter
m
m
(n + 1) =
m
(n)
1
2
m
(n)
J
m
=
m
(n)
m
(n)(f
m
(n)b
m1
(n 1) + f
m1
(n)b
m
(n))
In order to normalize the adaptation step, the following value of
m
(n) was suggested
m
(n) =
1
m1
(n)
where
m1
(N) =
N
i =1
[(f
2
m1
(i ) + b
2
m1
(i 1)] =
m1
(N 1) + f
2
m1
(N) + b
2
m1
(N 1)
represents the total energy of forward and backward prediction errors.
33 / 34
PREDICTION, PREDICTOR, PREDICTION ERROR
FORWARD and BACKWARD prediction
Levinson Durbin algorithm
Lattice lters
New AR parametrization: Reection coecients
Gradient Adaptive Lattice Filters
m1
(n) =
m1
(n 1) + (1 )[f
2
m1
(n) + b
2
m1
(n 1)]
with the forgetting factor close to 1, but 0 < < 1 allowing to forget the old history, which may be
irrelevant if the ltered signal is nonstationary.
34 / 34