Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm...

83
Optimal and Adaptive Filtering Murat Üney [email protected] Institute for Digital Communications (IDCOM) 26/06/2017 Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 1 / 69

Transcript of Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm...

Page 1: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal and Adaptive Filtering

Murat Üney

[email protected]

Institute for Digital Communications (IDCOM)

26/06/2017Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 1 / 69

Page 2: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Table of Contents1 Optimal Filtering

Optimal filter designApplication examplesOptimal solution: Wiener-Hopf equationsExample: Wiener equaliser

2 Adaptive filteringIntroductionRecursive Least Squares AdaptationLeast Mean Square AlgorithmApplications

3 Optimal signal detectionApplication examples and optimal hypothesis testingAdditive white and coloured noise

4 Summary

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 2 / 69

Page 3: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal filter design

Optimal filter design

Linear time

invariant system

Observation

sequence

Estimation

Figure 1: Optimal filtering scenario.

y(n): Observation related to a stationary signal of interest x(n).h(n): The impulse response of an LTI estimator.x(n): Estimate of x(n) given by

x(n) = h(n) ∗ y(n) =∞∑

i=−∞h(i)y(n − i).

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 3 / 69

Page 4: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal filter design

Optimal filter design

Linear time

invariant system

Observation

sequence

Estimation

Figure 1: Optimal filtering scenario.

Find h(n) with the best error performance:

e(n) = x(n)− x(n) = x(n)− h(n) ∗ y(n)

The error performance is measured by the mean squarederror (MSE)

ξ = E[(

e(n))2].

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 4 / 69

Page 5: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal filter design

Optimal filter design

Linear time

invariant system

Observation

sequence

Estimation

Figure 1: Optimal filtering scenario.

The MSE is a function of h(n), i.e.,

h = [· · · ,h(−2),h(−1),h(0),h(1),h(2), · · · ]

ξ(h) = E[(

e(n))2]

= E[(

x(n)− h(n) ∗ y(n))2].

Thus, optimal filtering problem is

hopt = arg minhξ(h)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 5 / 69

Page 6: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal filter design

Optimal filter design

Linear time

invariant system

Observation

sequence

Estimation

Figure 1: Optimal filtering scenario.

The MSE is a function of h(n), i.e.,

h = [· · · ,h(−2),h(−1),h(0),h(1),h(2), · · · ]

ξ(h) = E[(

e(n))2]

= E[(

x(n)− h(n) ∗ y(n))2].

Thus, optimal filtering problem is

hopt = arg minhξ(h)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 5 / 69

Page 7: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples

1) Prediction, interpolation and smoothing of signals

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 6 / 69

Page 8: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples1) Prediction, interpolation and smoothing of signals

d = 1

I Prediction for anti-aircraft fire control.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 7 / 69

Page 9: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples1) Prediction, interpolation and smoothing of signals

d = −1 (smoothing) d = −1/2 (interpolation)

I Signal denoising applications, estimation of missing data points.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 8 / 69

Page 10: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples2) System identification

Figure 2: System identification using a training sequence t(n) from anergodic and stationary ensemble.

Echo cancellation in fullduplex data transmission.

signal +received

echosynthesized

echo

)x

(ne )

n

(nx )Σ

y(n)

linetwo−wire

earpiece

transmitter

microphone

receiver

filter

(

transformer

hybridModem

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 9 / 69

Page 11: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples2) System identification

Figure 2: System identification using a training sequence t(n) from anergodic and stationary ensemble.

Echo cancellation in fullduplex data transmission.

signal +received

echosynthesized

echo

)x

(ne )

n

(nx )Σ

y(n)

linetwo−wire

earpiece

transmitter

microphone

receiver

filter

(

transformer

hybridModem

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 9 / 69

Page 12: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples3) Inverse System identification

Figure 3: Inverse system identification using x(n) as a training sequence.

I Channel equalisation in digital communication systems.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 10 / 69

Page 13: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Application examples

Application examples3) Inverse System identification

Figure 3: Inverse system identification using x(n) as a training sequence.

I Channel equalisation in digital communication systems.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 10 / 69

Page 14: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Normal equationsConsider the MSE ξ(h) = E

[(e(n))2

]The optimal filter satisfies ∇ξ(h)|hopt = 0. Equivalently, for allj = . . . ,−2,−1,0,1,2, . . .

∂ξ

∂h(j)= E

[2e(n)

∂e(n)

∂h(j)

]= E

[2e(n)

∂(x(n)−

∑∞i=−∞ h(i)y(n − i)

)∂h(j)

]

= E[2e(n)

∂ (−h(j)y(n − j))

∂h(j)

]= −2E [e(n)y(n − j)]

Hence, the optimal filter solves the “normal equations”

E [e(n)y(n − j)] = 0, j = . . . ,−2,−1,0,1,2, . . .

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 11 / 69

Page 15: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Normal equationsConsider the MSE ξ(h) = E

[(e(n))2

]The optimal filter satisfies ∇ξ(h)|hopt = 0. Equivalently, for allj = . . . ,−2,−1,0,1,2, . . .

∂ξ

∂h(j)= E

[2e(n)

∂e(n)

∂h(j)

]= E

[2e(n)

∂(x(n)−

∑∞i=−∞ h(i)y(n − i)

)∂h(j)

]

= E[2e(n)

∂ (−h(j)y(n − j))

∂h(j)

]= −2E [e(n)y(n − j)]

Hence, the optimal filter solves the “normal equations”

E [e(n)y(n − j)] = 0, j = . . . ,−2,−1,0,1,2, . . .

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 11 / 69

Page 16: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Wiener-Hopf equations

The error of hopt is orthogonal to its observations, i.e., for all j ∈ Z

E [eopt (n)y(n − j)] = 0

which is known as “the principle of orthogonality”.

Furthermore,

E [eopt (n)y(n − j)] = E

[(x(n)−

∞∑i=−∞

hopt (i)y(n − i)

)y(n − j)

]

= E [x(n)y(n − j)]−∞∑

i=−∞

hopt (i)E [y(n − i)y(n − j)] = 0

Result (Wiener-Hopf equations)∞∑

i=−∞hopt (i)ryy (i − j) = rxy (j)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 12 / 69

Page 17: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Wiener-Hopf equations

The error of hopt is orthogonal to its observations, i.e., for all j ∈ Z

E [eopt (n)y(n − j)] = 0

which is known as “the principle of orthogonality”.Furthermore,

E [eopt (n)y(n − j)] = E

[(x(n)−

∞∑i=−∞

hopt (i)y(n − i)

)y(n − j)

]

= E [x(n)y(n − j)]−∞∑

i=−∞

hopt (i)E [y(n − i)y(n − j)] = 0

Result (Wiener-Hopf equations)∞∑

i=−∞hopt (i)ryy (i − j) = rxy (j)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 12 / 69

Page 18: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Wiener-Hopf equations

The error of hopt is orthogonal to its observations, i.e., for all j ∈ Z

E [eopt (n)y(n − j)] = 0

which is known as “the principle of orthogonality”.Furthermore,

E [eopt (n)y(n − j)] = E

[(x(n)−

∞∑i=−∞

hopt (i)y(n − i)

)y(n − j)

]

= E [x(n)y(n − j)]−∞∑

i=−∞

hopt (i)E [y(n − i)y(n − j)] = 0

Result (Wiener-Hopf equations)∞∑

i=−∞hopt (i)ryy (i − j) = rxy (j)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 12 / 69

Page 19: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

The Wiener filter

Wiener-Hopf equations can be solved indirectly, in the complexspectral domain:

hopt (n) ∗ ryy (n) = rxy (n)↔ Hopt (z)Pyy (z) = Pxy (z)

Result (The Wiener filter)

Hopt (z) =Pxy (z)

Pyy (z)

The optimal filter has an infinite impulse response (IIR), and, isnon-causal, in general.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 13 / 69

Page 20: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

The Wiener filter

Wiener-Hopf equations can be solved indirectly, in the complexspectral domain:

hopt (n) ∗ ryy (n) = rxy (n)↔ Hopt (z)Pyy (z) = Pxy (z)

Result (The Wiener filter)

Hopt (z) =Pxy (z)

Pyy (z)

The optimal filter has an infinite impulse response (IIR), and, isnon-causal, in general.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 13 / 69

Page 21: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

The Wiener filter

Wiener-Hopf equations can be solved indirectly, in the complexspectral domain:

hopt (n) ∗ ryy (n) = rxy (n)↔ Hopt (z)Pyy (z) = Pxy (z)

Result (The Wiener filter)

Hopt (z) =Pxy (z)

Pyy (z)

The optimal filter has an infinite impulse response (IIR), and, isnon-causal, in general.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 13 / 69

Page 22: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

Causal Wiener filter

We project the unconstrained solution Hopt (z) onto the set ofcausal and stable IIR filters by a two step procedure:First, factorise Pyy (z) into causal (right sided) Qyy (z), andanti-causal (left sided) parts Q∗yy (1/z∗), i.e.,Pyy (z) = σ2

y Qyy (z)Q∗yy (1/z∗).Select the causal (right sided) part of Pxy (z)/Q∗yy (1/z∗).

Result (Causal Wiener filter)

H+opt (z) =

1σ2

y Qyy (z)

[Pxy (z)

Q∗yy (1/z∗)

]+

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 14 / 69

Page 23: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

FIR Wiener-Hopf equations

h0h -1Nh

)

(n)

1

n(y

Σ

output

sequence{ }

. . .

x{ }

received

z-1 z-1 z-1

Figure 4: A finite impulse response (FIR) estimator.

Wiener-Hopf equations for the FIR optimal filter of N taps:

Result (FIR Wiener-Hopf equations)∑N−1i=0 hopt (i)ryy (i − j) = rxy (j), for j = 0,1, ...,N − 1.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 15 / 69

Page 24: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

FIR Wiener Filter

FIR Wiener-Hopf equations in vector-matrix form.ryy (0) ryy (1) . . . ryy (N − 1)

ryy (1) ryy (0) . . . ryy (N − 2)

......

......

ryy (N − 1) ryy (N − 2) . . . ryy (0)

︸ ︷︷ ︸,Ryy : Autocorrelation matrix of y(n) which is Toeplitz.

h(0)

h(1)

...h(N − 1)

︸ ︷︷ ︸

,hopt

=

rxy (0)

rxy (1)

...rxy (N − 1)

︸ ︷︷ ︸

,rxy

Result (FIR Wiener filter)

hopt = R−1yy rxy .

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 16 / 69

Page 25: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

FIR Wiener Filter

FIR Wiener-Hopf equations in vector-matrix form.ryy (0) ryy (1) . . . ryy (N − 1)

ryy (1) ryy (0) . . . ryy (N − 2)

......

......

ryy (N − 1) ryy (N − 2) . . . ryy (0)

︸ ︷︷ ︸,Ryy : Autocorrelation matrix of y(n) which is Toeplitz.

h(0)

h(1)

...h(N − 1)

︸ ︷︷ ︸

,hopt

=

rxy (0)

rxy (1)

...rxy (N − 1)

︸ ︷︷ ︸

,rxy

Result (FIR Wiener filter)

hopt = R−1yy rxy .

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 16 / 69

Page 26: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Optimal solution: Wiener-Hopf equations

MSE surfaceMSE is a quadratic function of h

ξ(h) = hT Ryyh− 2hT rxy + E[(x(n))2

]∇ξ(h) = 2Ryyh− 2rxy

−20

0

20

−20

0

20

0

10

20

30

40

tap 0

MSE surface

tap 1

MS

E (

dB

)

(a)

−30 −20 −10 0 10 20 30−30

−20

−10

0

10

20

30

tap 0

tap 1

MSE contours with gradient vectors

(b)

Figure 5: For a 2-tap Wiener filtering example: (a) the MSE surface, (b)gradient vectors.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 17 / 69

Page 27: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Example: Wiener equaliser

^

z

^{x (n-d

{ (e

)}

n-d

x (n-d )}

{x (

)}

)}

( )

{

η

n

x (n)}

(n)η

y(n){ }

y(n){ }

(

n

z

( )z

)

{

) (

z )(H

H

z{ (n-d )}x

-d

(b)

(a)

noise

data

data

noise

equaliser

equaliser

C

channel

C

channelΣ

Σ

Σ

Figure 6: (a) The Wiener equaliser. (b) Alternative formulation.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 18 / 69

Page 28: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.

For notational convenience define:

x ′(n) = x(n − d)

e′(n) = x(n − d)− x(n − d) (1)

Label the output of the channel filter as y ′(n) where

y(n) = y ′(n) + η(n)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 19 / 69

Page 29: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.Wiener filter

hopt = Ryy−1rx ′y (2)

The (i , j)th entry in Ryy is

ryy (j − i) = E [y(j)y(i)]

= E[(y ′(j) + η(j))(y ′(i) + η(i))

]= ry ′y ′(j − i) + σ2

ηδ(j − i)

↔ Pyy (z) = Py ′y ′(z) + σ2η

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 20 / 69

Page 30: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.Wiener filter

hopt = Ryy−1rx ′y (2)

The (i , j)th entry in Ryy is

ryy (j − i) = E [y(j)y(i)]

= E[(y ′(j) + η(j))(y ′(i) + η(i))

]= ry ′y ′(j − i) + σ2

ηδ(j − i)

↔ Pyy (z) = Py ′y ′(z) + σ2η

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 20 / 69

Page 31: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.

Remember y ′(n) = c(n) ∗ x(n)

↔ ry ′y ′ = c(n) ∗ c(−n) ∗ rxx (n)↔ Py ′y ′(z) = C(z)C(z−1)Pxx (z)

Consider a white data sequence x(n), i.e.,

rxx (n) = σ2xδ(n)↔ Pxx (z) = σ2

x .

Then, the complex spectra of the autocorrelation sequence ofinterest is

Pyy (z) = Py ′y ′(z) + σ2x = C(z)C(z−1)σ2

x + σ2η

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 21 / 69

Page 32: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.Wiener filter

hopt = Ryy−1rx ′y (3)

The (j)th entry in rx ′y is

rx ′y (j) = E[x ′(n)y(n − j)

]= E

[x(n − d)(y ′(n − j) + η(n − j))

]= rxy ′(j − d)

↔ Px ′y (z) = Pxy ′(z)z−d (4)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 22 / 69

Page 33: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.Wiener filter

hopt = Ryy−1rx ′y (3)

The (j)th entry in rx ′y is

rx ′y (j) = E[x ′(n)y(n − j)

]= E

[x(n − d)(y ′(n − j) + η(n − j))

]= rxy ′(j − d)

↔ Px ′y (z) = Pxy ′(z)z−d (4)Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 22 / 69

Page 34: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

e’(n)

y’(n)

x’(n)

)}

^{x (n−d)}{x (n)}

(n)η

y(n){ }

( )z

({

z )H

z{ (n−d)}

−d

data

equaliser

C

channelΣ

Σ

x

n−de

(

Figure 7: Channel equalisation scenario.

Remember y ′(n) = c(n) ∗ x(n)

↔ rxy ′ = c(−n) ∗ rxx (n)↔ Pxy ′(z) = C(z−1)Pxx (z)

Then, the complex spectra of the cross correlation sequence ofinterest is

Px ′y (z) = Pxy ′(z)z−d = σ2x C(z−1)z−d

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 23 / 69

Page 35: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal Filtering Example: Wiener equaliser

Wiener equaliserSuppose that c = [c(0) = 0.5, c(1) = 1]T ↔ C(z) = (0.5 + z−1)

Then,

Pyy (z) = C(z)C(z−1)σ2x + σ2

η = (0.5 + z−1)(0.5 + z)σ2x + σ2

η

Px ′y (z) = σ2x C(z−1)z−d = (0.5z−d + z−d+1)σ2

x

Suppose that d = 1, σ2x = 1, and, σ2

η = 0.1

ryy (0) = 1.35, ryy (1) = 0.5, and ryy (2) = 0rx ′y (0) = 1, rx ′y (1) = 0.5, and rx ′y (2) = 0

The Wiener filter is obtained as

hopt =

1.35 0.5 0

0.5 1.35 0.50 0.5 1.35

−1 1

0.50

=

0.690.13−0.05

The MSE is found as ξ(hopt ) = σ2

x − hToptrx ′y = 0.24.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 24 / 69

Page 36: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Introduction

Adaptive filtering - Introduction

ΣΣ

. . .

z-1

z-1

z-1

observed

sequenceestimated

signal

training

sequence

impulse

response error

signal

adaptation

algorithm

Figure 8: FIR adaptive filtering configuration.

For notational convenience, definey(n) , [y(n), y(n − 1), . . . , y(n − N + 1)]T , h(n) , [h0, h1, . . . , hN−1]T

The output of the adaptive filter is

x(n) = hT (n)y(n)

Optimum solutionhopt = R−1

yy rxy

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 25 / 69

Page 37: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Recursive Least Squares Adaptation

Recursive least squaresMinimise cost function

ξ(n) =n∑

k=0

(x(k)− x(k))2 (5)

SolutionRyy (n)h(n) = rxy (n)

LS “autocorrelation” matrix

Ryy (n) =n∑

k=0

y(k)yT (k)

LS “cross-correlation” vector

rxy (n) =n∑

k=0

y(k)x(k)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 26 / 69

Page 38: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Recursive Least Squares Adaptation

Recursive least squaresRecursive relationships

Ryy (n) = Ryy (n − 1) + y(n)yT (n)

rxy (n) = rxy (n − 1) + y(n)x(n)

Substitute for rxy

Ryy (n)h(n) = Ryy (n − 1)h(n − 1) + y(n)x(n)

Replace Ryy (n − 1)

Ryy (n)h(n) =(

Ryy (n)− y(n)yT (n))

h(n − 1) + y(n)x(n)

Multiple both sides by R−1yy (n)

h(n) = h(n − 1) + R−1yy (n)y(n)e(n)

e(n) = x(n)− hT (n − 1)y(n)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 27 / 69

Page 39: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Recursive Least Squares Adaptation

Recursive least squares

Recursive relationships

Ryy (n) = Ryy (n − 1) + y(n)yT (n)

Apply Sherman-Morrison identity

R−1yy (n) = R−1

yy (n − 1)−R−1

yy (n − 1)y(n)yT (n)R−1yy (n − 1)

1 + yT (n)R−1yy (n − 1)y(n)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 28 / 69

Page 40: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Recursive Least Squares Adaptation

Summary

Recursive least squares (RLS) algorithm:

1: Ryy (0) = 1δ IN with small positive δ . Initialisation 1

2: h(0) = 0 . Initialisation 23: for n = 1,2,3, . . . do . Iterations4: x(n) = hT (n − 1)y(n) . Estimate x(n)5: e(n) = x(n)− x(n) . Find the error

6: R−1yy (n) = 1

α

(R−1

yy (n − 1)− R−1yy (n−1)y(n)yT (n)R−1

yy (n−1)α+yT (n)R−1

yy (n−1)y(n)

). Update the inverse of the autocorrelationmatrix

7: h(n) = h(n− 1) + R−1yy (n)y(n)e(n) . Update the filter

coefficients8: end for

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 29 / 69

Page 41: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Stochastic gradient algorithms

MSE contour - 2-tap example:

42 6 8 100

10

8

6

4

2

wieneroptimum(MMSE)

1h

h0

constantMSE

ofcontour

Figure 9: Method of steepest descent.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 30 / 69

Page 42: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Steepest descentMSE contour - 2-tap example:

42 6 8 100

10

8

6

4

2 ∆

1h

vector (n)

gradient

h0

guessinitial

h(n)

h

The gradient vector

∇h(n) =

[∂ξ

∂h(0),∂ξ

∂h(1), . . . ,

∂ξ

∂h(N − 1)

]T∣∣∣∣∣h=h(n)

= 2Ryyh(n)−2rxy

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 31 / 69

Page 43: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Steepest descentMSE contour - 2-tap example:

1h

µ-

h00

10

8

6

4

2

42 6 8 10

(n)h

Update initial guess in the direction of steepest descent:

h(n + 1) = h(n)− µ∇h(n)

Step-size µ.Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 32 / 69

Page 44: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Steepest descent

MSE contour - 2-tap example:

1h

h00

10

8

6

4

2

42 6 8 10

Gradient at new guess.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 33 / 69

Page 45: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Convergence of steepest descentMSE contour - 2-tap example:

42 6 8 100

10

8

6

4

2

1h

h0

constantMSE

ofcontour

optimum(MMSE)

Wiener

vector (n)

gradient

guessinitial

h(n)

h

h(n + 1) = h(n)− µ∇h(n)

∇h(n) =

[∂ξ

∂h(0),∂ξ

∂h(1), . . . ,

∂ξ

∂h(N − 1)

]T∣∣∣∣∣h=h(n)

= 2Ryyh(n)− 2rxy

0 < µ <1

λmax(6)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 34 / 69

Page 46: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Stochastic gradient algorithms

A time recursion:

h(n + 1) = h(n)− µ∇h(n)

The exact gradient:

∇h(n) = −2E[y(n)(x(n)− y(n)T h(n))

]= −2E [y(n)e(n)]

A simple estimate of the gradient

∇h(n) = −2y(n + 1)e(n + 1)

The errore(n + 1) = x(n + 1)− h(n)T y(n + 1) (7)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 35 / 69

Page 47: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

The Least-mean-squares (LMS) algorithm:

1: h(0) = 0 . Initialisation2: for n = 1,2,3, . . . do . Iterations3: x(n) = hT (n − 1)y(n) . Estimate x(n)4: e(n) = x(n)− x(n) . Find the error5: h(n) = h(n − 1) + 2µy(n)e(n) . Update the filtercoefficients

6: end for

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 36 / 69

Page 48: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

LMS block diagram

n)e

(n)x

)

h

(

n

Σ

z

(nΣ

(-1

0

z

h1 2

-1

h

scaled error

y

x^

1hN-

z-1

Σ Σ

Σ

-1z-1z

Figure 10: Least mean-square adaptive filtering.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 37 / 69

Page 49: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Convergence of the LMSMSE contour - 2-tap example:

42 6 8 100

10

8

6

4

2

1h

h0

constantMSE

ofcontour

optimum(MMSE)

Wiener

vector (n)

gradient

guessinitial

h(n)

h

Eigenvalues of Ryy (in this example, λ0 and λ1).The largest time constant τmax >

λmax2λmin

Eigenvalue ratio (EVR) is λmaxλmin

Practical range for step-size 0 < µ < 13Nσ2

y

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 38 / 69

Page 50: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Eigenvalue ratio (EVR)

(a)

vmax

Wieneroptimum

v

1/λmin

min

1/λmax

constant MSE

contour of

(b)0 2 4 6

0

2

4

6

tap 0

tap 1

(c)0 2 4 6

0

2

4

6

tap 0ta

p 1

Figure 11: Eigenvectors, eigenvalues and convergence: (a) the relationshipbetween eigenvectors, eigenvalues and the contours of constant MSE; (b)steepest descent for EVR of 2; (c) EVR of 4.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 39 / 69

Page 51: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Comparison of RLS and LMS

system

white

noise

white

noise

h (n)

filteradaptive

opt

unknown

h

y(n)noiseshapingfilter

x(n)

x(n)^

Σ

Σ

Figure 12: Adaptive system identification configuration.

Error vector norm

ρ(n) = E[(h(n)− hopt )

T (h(n)− hopt )]

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 40 / 69

Page 52: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Comparison: Performance

0 200 400 600 800 1000−80

−70

−60

−50

−40

−30

−20

−10

0

iterations

no

rm (

dB

) LMS

RLS

Figure 13: Covergence plots for N = 16 taps adaptive filtering in the systemidentification configuration: EVR = 1 (i.e., the impulse response of the noiseshaping filter is δ(n)).

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 41 / 69

Page 53: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Comparison: Performance

0 200 400 600 800 1000−80

−70

−60

−50

−40

−30

−20

−10

0

iterations

no

rm (

dB

)LMS

RLS

Figure 14: Covergence plots for N = 16 taps adaptive filtering in the systemidentification configuration: EVR = 11.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 42 / 69

Page 54: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Comparison: Performance

0 200 400 600 800 1000−70

−60

−50

−40

−30

−20

−10

0

iterations

no

rm (

dB

)

LMS

RLS

Figure 15: Covergence plots for N = 16 taps adaptive filtering in the systemidentification configuration: EVR (and, correspondingly the spectral colorationof the input signal) progressively increases to 68.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 43 / 69

Page 55: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Least Mean Square Algorithm

Comparison: Complexity

Table: Complexity comparison of N-point FIR filter algorithms.

Algorithm Implementation Computational load

class

multiplications adds/subtractions divisions

RLS fast Kalman 10N+1 9N+1 2

SG LMS 2N 2N −

BLMS (via FFT) 10log(N )+8 15log(N )+30 −

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 44 / 69

Page 56: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Applications

Adaptive filtering algorithms can be used in all application areas ofoptimal filtering.Some examples:

I Adaptive line enhancementI Adaptive tone suppressionI Echo cancellationI Channel equalisation

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 45 / 69

Page 57: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

(a)

x n(^ )

y(n

(ne

(nx) )

)

unknown

system

adaptive

lterΣ

(b)

^(n)

e

Σunknown

system

adaptive

lter

(n)x(n)yx

(n)

(c)

(n)delay

adaptive

lterΣ

y(n)x ^ (n)x

e(n)

Figure 16: Adaptive filtering configurations: (a) direct system modelling; (b)inverse system modelling; (c) linear prediction.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 46 / 69

Page 58: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Adaptive line enhancement

(a) frequency0

spectrum

signal

noise

ω0

narrow-band

broad-band

(b)

n)x

(n)e

(n)

(

a1a0 a2

Σ

prediction

predictionerror

^x

z-1

z-1

z-1

Σ

signal

noise

Figure 17: Adaptive line enhacement: (a) signal spectrum; (b) systemconfiguration.Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 47 / 69

Page 59: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Adaptive predictor

x(n−3)

prediction filter

prediction error filter

x(n−1) x(n−2)x

a1a0 a2

Σ

z−1

z−1

z−1

Σ

n)(

prediction signal

x(n)^

noisepredictionerror e (n)

Prediction filter: a0 + a1z−1 + a2z−2

Prediction error filter: 1− a0z−1 − a1zz−2 − a2z−3

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 48 / 69

Page 60: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Adaptive tone suppression

(a)

signalspectrum

interference

frequency0

spectrum

ω0

(b)

n)x

(n)e

(n)

(

a1a0 a2

Σ

prediction

predictionerror

^x

z-1

z-1

z-1

Σ

interference

signal

Figure 18: Adaptive tone suppression: (a) signal spectrum; (b) systemconfiguration.Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 49 / 69

Page 61: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Adaptive noise whitening

(a) frequency0

spectrum

ω0

coloured noise

(b)

n)x

(n)e

(n)

(

a1a0 a2

Σ

prediction

predictionerror

^x

z-1

z-1

z-1

Σ whitened noise

Figure 19: Adaptive noise whitening: (a) input spectrum; (b) systemconfiguration.Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 50 / 69

Page 62: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Echo cancellation

A typical telephone connection

Telephone A Telephone B

two−wireline

earpiece

transmitter

microphone

receiver

hybrid

transformer

hybrid

transformer

transmitter

receiver

Hybrid transformers to route signal paths.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 51 / 69

Page 63: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Echo cancellation (contd)

Echo paths in a telephone system

near end echo

far end echo

Telephone BTelephone A

two−wireline

earpiece

transmitter

microphone

receiver

hybrid

transformer

hybrid

transformer

transmitter

receiver

Near and far echo paths.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 52 / 69

Page 64: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Echo cancellation (contd)

signal +received

echosynthesized

echo

)x

(ne )

n

(nx )Σ

y(n)

linetwo−wire

earpiece

transmitter

microphone

receiver

filter

(

transformer

hybrid

Fixed filter?

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 53 / 69

Page 65: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Echo cancellation (contd)

x )n()e n(

(nx )Σ

y(n)

linetwo-wire

earpiece

transmitter

microphone

receiver

hybrid

transformer

adaptive

filter

Figure 20: Application of adaptive echo cancellation in a telephone handset.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 54 / 69

Page 66: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Channel equalisation

)(nx ) n

n- dx( )

(y

noise

error

Σadaptivefilterfilter

channel

(n- d )xΣdelay

Figure 21: Adaptive equaliser system configuration.

Simple channely(n) = ±h0 + noise

Decision circuit

if y(n) ≥ 0 then x(n) = +1 elsex(n) = −1

Channel with intersymbol interference (ISI)

y(n) =2∑

i=0

hix(n − i) + noise

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 55 / 69

Page 67: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Adaptive filtering Applications

Channel equalisation

)

y(n (n)) x

(x n

Σ

(n)e

transversalfilter circuit

decision

delay

Figure 22: Decision directed equaliser.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 56 / 69

Page 68: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detection - Introduction

Example: Detection of gravitational waves

Figure 23: Gravitational waves from a binary black hole merger (left, Uni.

of Birmingham, Gravitational Wave Group), LIGO block diagram (middle), expectedsignal (right) Abbot et. al.,“Observation of gravitational waves from a binary black hole merger”, Phys. Rev.

Let., Feb. 2016..

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 57 / 69

Page 69: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detection - Introduction

Example: Detection of gravitational waves

Figure 23: Gravitational waves from a binary black hole merger (left, Uni.

of Birmingham, Gravitational Wave Group), LIGO block diagram (middle), expectedsignal (right) Abbot et. al.,“Observation of gravitational waves from a binary black hole merger”, Phys. Rev.

Let., Feb. 2016..

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 57 / 69

Page 70: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detectionSignal detection as 2-ary (binary) hypothesis testing:

H0 : y(n) = η(n)

H1 : y(n) = x(n) + η(n) (8)

In a sense, decide which of the two possible ensembles y(n) isgenerated from.Finite length signals, i.e.,

n = 0,1,2, ...,N − 1

Vector notation

H0 : y = η

H1 : y = x + η

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 58 / 69

Page 71: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detectionExample (radar): In active sensing, x(t) is the probing waveformsubject to design.

y(n) = a0x(n − n0) + a1x(n − n1) + · · ·+ η(n) (9)

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

-1

0

1

-1

0

1

-1

0

1

Figure 24: Probing waveform x(n) and returns from the surveillanceregion constituting y(n).

A similar problem also arises in digital communications.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 59 / 69

Page 72: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detectionExample (radar): In active sensing, x(t) is the probing waveformsubject to design.

y(n) = a0x(n − n0) + a1x(n − n1) + · · ·+ η(n) (9)

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

-1

0

1

-1

0

1

-1

0

1

Figure 24: Probing waveform x(n) and returns from the surveillanceregion constituting y(n).

A similar problem also arises in digital communications.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 59 / 69

Page 73: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Bayesian hypothesis testingConsider a random variable H with H = H(ζ) and H ∈ {H0,H1}.The measurement y = y(ζ) is a realisation of y.The measurement model specifies the likelihood pY|H(y |H)

Find the probabilities of H = H1 and H = H0 based on themeasurement vector y .Decide on the hypothesis with the maximum a posterioriprobability:

Find the maximum a-posteriori (MAP) estimate of H.

H = arg maxH∈{H0,H1}

PH|y(H|y) (10)

where the a posterior probability of H is given by

PH|y(Hi |y) =pY|H(y |Hi )PH(Hi )

pY|H(y |H0)PH(H0) + pY|H(y |H1)PH(H1)(11)

for i = 0,1.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 60 / 69

Page 74: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Bayesian hypothesis testingConsider a random variable H with H = H(ζ) and H ∈ {H0,H1}.The measurement y = y(ζ) is a realisation of y.The measurement model specifies the likelihood pY|H(y |H)

Find the probabilities of H = H1 and H = H0 based on themeasurement vector y .Decide on the hypothesis with the maximum a posterioriprobability:Find the maximum a-posteriori (MAP) estimate of H.

H = arg maxH∈{H0,H1}

PH|y(H|y) (10)

where the a posterior probability of H is given by

PH|y(Hi |y) =pY|H(y |Hi )PH(Hi )

pY|H(y |H0)PH(H0) + pY|H(y |H1)PH(H1)(11)

for i = 0,1.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 60 / 69

Page 75: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Application examples and optimal hypothesis testing

Bayesian hypothesis testing: The likelihood ratio test

MAP decision rule:

H = arg maxH∈{H0,H1}

P(H|y)

MAP decision as a likelihood ratio test:

p(H1|y)H=H1><

H=H0

p(H0|y)

p(y |H1)P(H1)H1><H0

p(y |H0)P(H0)

p(y |H1)

p(y |H0)

H1><H0

P(H0)

P(H1)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 61 / 69

Page 76: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Additive white and coloured noise

Bayesian hypothesis testing - AWGN Example

Example: Detection of deterministic signals in additive whiteGaussian noise:

H0 : y = η

H1 : y = x + η

where x is a known vector, η ∼ N (.; 0, σ2I).The likelihoods are specified by the noise distribution:

p(y |H1)

p(y |H0)

H1><H0

P(H0)

P(H1)

N (y ; x, σ2I)N (y ; 0, σ2I)

H1><H0

P(H0)

P(H1)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 62 / 69

Page 77: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals - AWGN (contd)The numerator and denominator of the likelihood ratio are

p(y |H1) = N (y − x; 0, σ2I)

=1

(2πσ2)N/2

N−1∏n=0

exp{− (y(n)− x(n))2

2σ2

}

=1

(2πσ2)N/2 exp

{− 1

2σ2

(N−1∑n=0

(y(n)− x(n))2

)}(12)

Similarlyp(y |H0) = N (y ; 0, σ2I)

=1

(2πσ2)N/2 exp

{− 1

2σ2

(N−1∑n=0

(y(n))2

)}(13)

Therefore

p(y |H1)

p(y |H0)= exp

{1σ2

(N−1∑n=0

(y(n)x(n)− 12

x(n)2)

)}(14)

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 63 / 69

Page 78: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals - AWGN (contd)

Take the logarithm of both sides of the likelihood ratio test

log exp

{1σ2

(N−1∑n=0

(y(n)x(n)− 12

x(n)2)

)}H1><H0

logP(H0)

P(H1)

Now, we have a linear statistical test

N−1∑n=0

y(n)x(n)H1><H0

σ2 logP(H0)

P(H1)+

12

N−1∑n=0

x(n)2

︸ ︷︷ ︸,τ :Decision threshold

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 64 / 69

Page 79: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals - AWGN (contd)

Matched filtering for optimal detection:

0 5 10 15 20 25 30 35 40

-0.5

0

0.5

1

0 5 10 15 20 25 30 35 40

0

0.5

1

-100

30

-150

60

-120

90-90

120

-60

150

-30

180

0

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 65 / 69

Page 80: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals under colourednoise

For the case, the noise sequence ρ(n) has an auto-correlationfunction rν [l] different than rν [l] = σ2

η × δ[l], and,

H0 : y = ν

H1 : y = x + νν ∼ N

.; 0, Cν =

rν (0) rν (−1) . . . rν (−N + 1)

rν (1) rν (0) . . . rν (−N + 2)

.

.

....

.

.

....

rν (N − 1) rν (N − 2) . . . rν (0)

Whitening

lter

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 66 / 69

Page 81: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals - coloured noise ex.

0

5

10

15

20

H1�(t)

�(t)

�0.04 �0.02 0.00 0.02 0.04

GPS time relative to 1126259462.4204(s)

0

< >

(upper left) Noise (amplitude) spectral density. (upper right) Abstract, Abbot et. al., Phys. Rev. Let., Feb. 2016.. (lower left)

Matched filter outputs: Best MF (blue) and the expected MF (purple). (lower right) Measurement, reconstructed and noise signals

around the detection.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 67 / 69

Page 82: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Summary

Summary

Optimal filtering: Problem statementGeneral solution via Wiener-Hopf equationsFIR Wiener filterAdaptive filtering as an online optimal filtering strategyRecursive least-squares (RLS) algorithmLeast mean-square (LMS) algorithmApplication examplesOptimal signal detection via matched filtering

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 68 / 69

Page 83: Optimal and Adaptive Filtering - University of Edinburgh · Least Mean Square Algorithm Applications 3 Optimal signal detection ... I Channel equalisation in digital communication

Summary

Further reading

C. Therrien, Discrete Random Signals and Statistical SignalProcessing, Prentice-Hall, 1992.S. Haykin, Adaptive Filter Theory, 5th ed., Prentice-Hall, 2013.B. Mulgrew, P. Grant, J. Thompson, Digital Signal Processing:Concepts and Applications, 2nd ed., Palgrave Macmillan, 2003.D. Manolakis, V. Ingle, S. Kogon, Statistical and Adaptive SignalProcessing, McGraw Hill, 2000.

Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 69 / 69