Optimal and Adaptive Filtering Murat ney M.Uney@ed.ac.uk Institute - - PowerPoint PPT Presentation

optimal and adaptive filtering
SMART_READER_LITE
LIVE PREVIEW

Optimal and Adaptive Filtering Murat ney M.Uney@ed.ac.uk Institute - - PowerPoint PPT Presentation

Optimal and Adaptive Filtering Murat ney M.Uney@ed.ac.uk Institute for Digital Communications (IDCOM) 26/06/2017 Murat ney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 1 / 69 Table of Contents Optimal Filtering 1 Optimal filter


slide-1
SLIDE 1

Optimal and Adaptive Filtering

Murat Üney

M.Uney@ed.ac.uk

Institute for Digital Communications (IDCOM)

26/06/2017

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

slide-2
SLIDE 2

Table of Contents

1

Optimal Filtering Optimal filter design Application examples Optimal solution: Wiener-Hopf equations Example: Wiener equaliser

2

Adaptive filtering Introduction Recursive Least Squares Adaptation Least Mean Square Algorithm Applications

3

Optimal signal detection Application examples and optimal hypothesis testing Additive white and coloured noise

4

Summary

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

slide-3
SLIDE 3

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

slide-4
SLIDE 4

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 squared error (MSE) ξ = E

  • e(n)

2 .

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

slide-5
SLIDE 5

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 .

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

slide-6
SLIDE 6

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 min

h ξ(h)

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

slide-7
SLIDE 7

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

slide-8
SLIDE 8

Optimal Filtering Application examples

Application examples

1) Prediction, interpolation and smoothing of signals d = 1

◮ Prediction for anti-aircraft fire control. Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 7 / 69

slide-9
SLIDE 9

Optimal Filtering Application examples

Application examples

1) Prediction, interpolation and smoothing of signals d = −1 (smoothing) d = −1/2 (interpolation)

◮ Signal denoising applications, estimation of missing data points. Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 8 / 69

slide-10
SLIDE 10

Optimal Filtering Application examples

Application examples

2) System identification

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

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

slide-11
SLIDE 11

Optimal Filtering Application examples

Application examples

2) System identification

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

Echo cancellation in full duplex data transmission.

signal + received echo synthesized echo ) x

^

(n e ) n (n x ) Σ y(n) line two−wire earpiece transmitter microphone receiver filter ( transformer hybrid

Modem

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

slide-12
SLIDE 12

Optimal Filtering Application examples

Application examples

3) Inverse System identification

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

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

slide-13
SLIDE 13

Optimal Filtering Application examples

Application examples

3) Inverse System identification

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

◮ Channel equalisation in digital communication systems. Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 10 / 69

slide-14
SLIDE 14

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Normal equations

Consider the MSE ξ(h) = E

  • (e(n))2

The optimal filter satisfies ∇ξ(h)|hopt = 0. Equivalently, for all j = . . . , −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)]

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

slide-15
SLIDE 15

Optimal Filtering Optimal solution: Wiener-Hopf equations

Optimal solution: Normal equations

Consider the MSE ξ(h) = E

  • (e(n))2

The optimal filter satisfies ∇ξ(h)|hopt = 0. Equivalently, for all j = . . . , −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

slide-16
SLIDE 16

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”.

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

slide-17
SLIDE 17

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

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

Optimal Filtering Optimal solution: Wiener-Hopf equations

The Wiener filter

Wiener-Hopf equations can be solved indirectly, in the complex spectral domain: hopt(n) ∗ ryy(n) = rxy(n) ↔ Hopt(z)Pyy(z) = Pxy(z)

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

slide-20
SLIDE 20

Optimal Filtering Optimal solution: Wiener-Hopf equations

The Wiener filter

Wiener-Hopf equations can be solved indirectly, in the complex spectral domain: hopt(n) ∗ ryy(n) = rxy(n) ↔ Hopt(z)Pyy(z) = Pxy(z)

Result (The Wiener filter)

Hopt(z) = Pxy(z) Pyy(z)

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

slide-21
SLIDE 21

Optimal Filtering Optimal solution: Wiener-Hopf equations

The Wiener filter

Wiener-Hopf equations can be solved indirectly, in the complex spectral 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, is non-causal, in general.

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

slide-22
SLIDE 22

Optimal Filtering Optimal solution: Wiener-Hopf equations

Causal Wiener filter

We project the unconstrained solution Hopt(z) onto the set of causal and stable IIR filters by a two step procedure: First, factorise Pyy(z) into causal (right sided) Qyy(z), and anti-causal (left sided) parts Q∗

yy(1/z∗), i.e.,

Pyy(z) = σ2

yQyy(z)Q∗ yy(1/z∗).

Select the causal (right sided) part of Pxy(z)/Q∗

yy(1/z∗).

Result (Causal Wiener filter)

H+

  • pt(z) =

1 σ2

yQyy(z)

  • Pxy(z)

Q∗

yy(1/z∗)

  • +

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

slide-23
SLIDE 23

Optimal Filtering Optimal solution: Wiener-Hopf equations

FIR Wiener-Hopf equations

h h

  • 1

N

h ) (n)

1

n ( y Σ

  • utput

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−1

i=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

slide-24
SLIDE 24

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

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

slide-25
SLIDE 25

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−1

yy rxy.

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

slide-26
SLIDE 26

Optimal Filtering Optimal solution: Wiener-Hopf equations

MSE surface

MSE is a quadratic function of h ξ(h) = hTRyyh − 2hTrxy + E

  • (x(n))2

∇ξ(h) = 2Ryyh − 2rxy

−20 20 −20 20 10 20 30 40 tap 0 MSE surface tap 1 MSE (dB)

(a)

−30 −20 −10 10 20 30 −30 −20 −10 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

slide-27
SLIDE 27

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

slide-28
SLIDE 28

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−d e (

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

slide-29
SLIDE 29

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−d e (

Figure 7: Channel equalisation scenario.

Wiener filter hopt = Ryy −1rx′y (2)

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

slide-30
SLIDE 30

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−d e (

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

slide-31
SLIDE 31

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−d e (

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) = σ2

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

Then, the complex spectra of the autocorrelation sequence of interest is Pyy(z) = Py′y′(z) + σ2

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

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

slide-32
SLIDE 32

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−d e (

Figure 7: Channel equalisation scenario.

Wiener filter hopt = Ryy −1rx′y (3)

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

slide-33
SLIDE 33

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−d e (

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

slide-34
SLIDE 34

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−d e (

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 of interest is Px′y(z) = Pxy′(z)z−d = σ2

xC(z−1)z−d

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

slide-35
SLIDE 35

Optimal Filtering Example: Wiener equaliser

Wiener equaliser

Suppose that c = [c(0) = 0.5, c(1) = 1]T ↔ C(z) = (0.5 + z−1) Then, Pyy(z) = C(z)C(z−1)σ2

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

Px′y(z) = σ2

xC(z−1)z−d = (0.5z−d + z−d+1)σ2 x

Suppose that d = 1, σ2

x = 1, and, σ2 η = 0.1

ryy(0) = 1.35, ryy(1) = 0.5, and ryy(2) = 0 rx′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.5 1.35 0.5 0.5 1.35      

−1 

  1 0.5    =    0.69 0.13 −0.05    The MSE is found as ξ(hopt) = σ2

x − hT

  • ptrx′y = 0.24.

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

slide-36
SLIDE 36

Adaptive filtering Introduction

Adaptive filtering - Introduction

Σ

Σ

. . .

z-1 z-1 z-1

  • bserved

sequence estimated signal training sequence impulse response error signal

adaptation algorithm

Figure 8: FIR adaptive filtering configuration.

For notational convenience, define

y(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 solution hopt = R−1

yy rxy

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

slide-37
SLIDE 37

Adaptive filtering Recursive Least Squares Adaptation

Recursive least squares

Minimise cost function ξ(n) =

n

  • k=0

(x(k) − ˆ x(k))2 (5) Solution Ryy(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

slide-38
SLIDE 38

Adaptive filtering Recursive Least Squares Adaptation

Recursive least squares

Recursive 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−1

yy (n)

h(n) = h(n − 1) + R−1

yy (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

slide-39
SLIDE 39

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−1

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

1 + yT(n)R−1

yy (n − 1)y(n)

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

slide-40
SLIDE 40

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 2

3: for n = 1, 2, 3, . . . do

⊲ Iterations

4:

ˆ x(n) = hT(n − 1)y(n) ⊲ Estimate x(n)

5:

e(n) = x(n) − ˆ x(n) ⊲ Find the error

6:

R−1

yy (n)

=

1 α

  • R−1

yy (n − 1) − R−1

yy (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 autocorrelation matrix

7:

h(n) = h(n − 1) + R−1

yy (n)y(n)e(n) ⊲ Update the filter

coefficients

8: end for

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

slide-41
SLIDE 41

Adaptive filtering Least Mean Square Algorithm

Stochastic gradient algorithms

MSE contour - 2-tap example:

4 2 6 8 10 10 8 6 4 2 wiener

  • ptimum

(MMSE)

1

h h0 constant MSE

  • f

contour Figure 9: Method of steepest descent.

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

slide-42
SLIDE 42

Adaptive filtering Least Mean Square Algorithm

Steepest descent

MSE contour - 2-tap example:

4 2 6 8 10 10 8 6 4 2 ∆

1

h vector

(n)

gradient h0 guess initial 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

slide-43
SLIDE 43

Adaptive filtering Least Mean Square Algorithm

Steepest descent

MSE contour - 2-tap example:

1

h µ

  • h0

10 8 6 4 2 4 2 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

slide-44
SLIDE 44

Adaptive filtering Least Mean Square Algorithm

Steepest descent

MSE contour - 2-tap example:

1

h h0 10 8 6 4 2 4 2 6 8 10

Gradient at new guess.

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

slide-45
SLIDE 45

Adaptive filtering Least Mean Square Algorithm

Convergence of steepest descent

MSE contour - 2-tap example:

4 2 6 8 10 10 8 6 4 2

1

h ∆ h0 constant MSE

  • f

contour

  • ptimum

(MMSE) Wiener

vector

(n)

gradient guess initial 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

slide-46
SLIDE 46

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)Th(n))
  • = −2E [y(n)e(n)]

A simple estimate of the gradient ˆ ∇h(n) = −2y(n + 1)e(n + 1) The error e(n + 1) = x(n + 1) − h(n)Ty(n + 1) (7)

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

slide-47
SLIDE 47

Adaptive filtering Least Mean Square Algorithm

The Least-mean-squares (LMS) algorithm:

1: h(0) = 0

⊲ Initialisation

2: for n = 1, 2, 3, . . . do

⊲ Iterations

3:

ˆ x(n) = hT(n − 1)y(n) ⊲ Estimate x(n)

4:

e(n) = x(n) − ˆ x(n) ⊲ Find the error

5:

h(n) = h(n − 1) + 2µy(n)e(n) ⊲ Update the filter coefficients

6: end for

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

slide-48
SLIDE 48

Adaptive filtering Least Mean Square Algorithm

LMS block diagram

n) e (n) x ) Σ ) h ( n Σ z (n Σ (

  • 1

z h1

2

  • 1

h scaled error y 2µ x

^ 1

hN- z-1 Σ Σ Σ

  • 1

z

  • 1

z

Figure 10: Least mean-square adaptive filtering.

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

slide-49
SLIDE 49

Adaptive filtering Least Mean Square Algorithm

Convergence of the LMS

MSE contour - 2-tap example:

4 2 6 8 10 10 8 6 4 2

1

h ∆ h0 constant MSE

  • f

contour

  • ptimum

(MMSE) Wiener

vector

(n)

gradient guess initial h(n)

h

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

2λmin

Eigenvalue ratio (EVR) is λmax

λmin

Practical range for step-size 0 < µ <

1 3Nσ2

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

slide-50
SLIDE 50

Adaptive filtering Least Mean Square Algorithm

Eigenvalue ratio (EVR)

(a)

v

max Wiener

  • ptimum

v 1/λmin

min

1/λmax

constant MSE contour of

(b)

2 4 6 2 4 6 tap 0 tap 1

(c)

2 4 6 2 4 6 tap 0 tap 1

Figure 11: Eigenvectors, eigenvalues and convergence: (a) the relationship between 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

slide-51
SLIDE 51

Adaptive filtering Least Mean Square Algorithm

Comparison of RLS and LMS

system white noise white noise h(n) filter adaptive

  • pt

unknown h y(n) noise shaping filter 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

slide-52
SLIDE 52

Adaptive filtering Least Mean Square Algorithm

Comparison: Performance

200 400 600 800 1000 −80 −70 −60 −50 −40 −30 −20 −10 iterations norm (dB)

LMS RLS

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

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

slide-53
SLIDE 53

Adaptive filtering Least Mean Square Algorithm

Comparison: Performance

200 400 600 800 1000 −80 −70 −60 −50 −40 −30 −20 −10 iterations norm (dB)

LMS RLS

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

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

slide-54
SLIDE 54

Adaptive filtering Least Mean Square Algorithm

Comparison: Performance

200 400 600 800 1000 −70 −60 −50 −40 −30 −20 −10 iterations norm (dB)

LMS RLS

Figure 15: Covergence plots for N = 16 taps adaptive filtering in the system identification configuration: EVR (and, correspondingly the spectral coloration

  • f the input signal) progressively increases to 68.

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

slide-55
SLIDE 55

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

slide-56
SLIDE 56

Adaptive filtering Applications

Applications

Adaptive filtering algorithms can be used in all application areas of

  • ptimal filtering.

Some examples:

◮ Adaptive line enhancement ◮ Adaptive tone suppression ◮ Echo cancellation ◮ Channel equalisation Murat Üney (IDCOM) Optimal and Adaptive Filtering 26/06/2017 45 / 69

slide-57
SLIDE 57

Adaptive filtering Applications

(a)

x n (

^

) y(n (n e (n x ) ) ) unknown system adaptive lter Σ

(b)

^

(n) e Σ unknown system adaptive lter (n) x (n) y x (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

slide-58
SLIDE 58

Adaptive filtering Applications

Adaptive line enhancement

(a) frequency spectrum signal noise ω0 narrow-band broad-band (b)

n) x (n) e (n) ( a1 a0 a2 Σ prediction prediction error

^

x z-1 z-1 z-1 Σ signal noise

Figure 17: Adaptive line enhacement: (a) signal spectrum; (b) system configuration.

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

slide-59
SLIDE 59

Adaptive filtering Applications

Adaptive predictor

x(n−3) prediction filter prediction error filter x(n−1) x(n−2)

x a1 a0 a2 Σ z−1 z−1 z−1 Σ n) ( prediction signal x(n)

^

noise prediction error 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

slide-60
SLIDE 60

Adaptive filtering Applications

Adaptive tone suppression

(a) signal spectrum interference frequency spectrum ω0 (b)

n) x (n) e (n) ( a1 a0 a2 Σ prediction prediction error

^

x z-1 z-1 z-1 Σ interference signal

Figure 18: Adaptive tone suppression: (a) signal spectrum; (b) system configuration.

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

slide-61
SLIDE 61

Adaptive filtering Applications

Adaptive noise whitening

(a) frequency spectrum ω0

coloured noise

(b)

n) x (n) e (n) ( a1 a0 a2 Σ prediction prediction error

^

x z-1 z-1 z-1 Σ whitened noise

Figure 19: Adaptive noise whitening: (a) input spectrum; (b) system configuration.

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

slide-62
SLIDE 62

Adaptive filtering Applications

Echo cancellation

A typical telephone connection

Telephone A Telephone B two−wire line 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

slide-63
SLIDE 63

Adaptive filtering Applications

Echo cancellation (contd)

Echo paths in a telephone system

near end echo far end echo Telephone B Telephone A two−wire line 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

slide-64
SLIDE 64

Adaptive filtering Applications

Echo cancellation (contd)

signal + received echo synthesized echo ) x

^

(n e ) n (n x ) Σ y(n) line two−wire earpiece transmitter microphone receiver filter ( transformer hybrid

Fixed filter?

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

slide-65
SLIDE 65

Adaptive filtering Applications

Echo cancellation (contd)

^

x ) n ( ) e n ( (n x ) Σ y(n) line two-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

slide-66
SLIDE 66

Adaptive filtering Applications

Channel equalisation

) (n x ) n n- d x( ) ( y noise error Σ adaptive filter filter channel (n- d )

^

x Σ delay

Figure 21: Adaptive equaliser system configuration.

Simple channel y(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

slide-67
SLIDE 67

Adaptive filtering Applications

Channel equalisation

) y(n (n) )

^

x ( x n Σ (n) e transversal filter circuit decision delay Figure 22: Decision directed equaliser.

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

slide-68
SLIDE 68

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detection - Introduction

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

slide-69
SLIDE 69

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.

  • f Birmingham, Gravitational Wave Group), LIGO block diagram (middle), expected

signal (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

slide-70
SLIDE 70

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detection

Signal 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) is generated 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

slide-71
SLIDE 71

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detection

Example (radar): In active sensing, x(t) is the probing waveform subject to design. y(n) = a0x(n − n0) + a1x(n − n1) + · · · + η(n) (9)

  • 10
30
  • 150
60
  • 120
90
  • 90
120
  • 60
150
  • 30
180
  • 10
30
  • 150
60
  • 120
90
  • 90
120
  • 60
150
  • 30
180
  • 10
30
  • 150
60
  • 120
90
  • 90
120
  • 60
150
  • 30
180
  • 1

1

  • 1

1

  • 1

1

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

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

slide-72
SLIDE 72

Optimal signal detection Application examples and optimal hypothesis testing

Optimal signal detection

Example (radar): In active sensing, x(t) is the probing waveform subject to design. y(n) = a0x(n − n0) + a1x(n − n1) + · · · + η(n) (9)

  • 10
30
  • 150
60
  • 120
90
  • 90
120
  • 60
150
  • 30
180
  • 10
30
  • 150
60
  • 120
90
  • 90
120
  • 60
150
  • 30
180
  • 10
30
  • 150
60
  • 120
90
  • 90
120
  • 60
150
  • 30
180
  • 1

1

  • 1

1

  • 1

1

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

A similar problem also arises in digital communications.

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

slide-73
SLIDE 73

Optimal signal detection Application examples and optimal hypothesis testing

Bayesian hypothesis testing

Consider 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 the measurement vector ¯ y. Decide on the hypothesis with the maximum a posteriori probability:

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

slide-74
SLIDE 74

Optimal signal detection Application examples and optimal hypothesis testing

Bayesian hypothesis testing

Consider 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 the measurement vector ¯ y. Decide on the hypothesis with the maximum a posteriori probability: Find the maximum a-posteriori (MAP) estimate of H. ˆ H = arg max

H∈{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

slide-75
SLIDE 75

Optimal signal detection Application examples and optimal hypothesis testing

Bayesian hypothesis testing: The likelihood ratio test

MAP decision rule: ˆ H = arg max

H∈{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

slide-76
SLIDE 76

Optimal signal detection Additive white and coloured noise

Bayesian hypothesis testing - AWGN Example

Example: Detection of deterministic signals in additive white Gaussian 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

slide-77
SLIDE 77

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)

Similarly

p(¯ 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) − 1 2x(n)2)

  • (14)

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

slide-78
SLIDE 78

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) − 1 2x(n)2)

  • H1

> < H0

log P(H0) P(H1)

Now, we have a linear statistical test

N−1

  • n=0

¯ y(n)x(n)

H1 > < H0

σ2 log P(H0) P(H1) + 1 2

N−1

  • n=0

x(n)2

  • τ:Decision threshold

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

slide-79
SLIDE 79

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals - AWGN (contd)

Matched filtering for optimal detection:

5 10 15 20 25 30 35 40

  • 0.5

0.5 1 5 10 15 20 25 30 35 40 0.5 1

  • 10

30

  • 150

60

  • 120

90

  • 90

120

  • 60

150

  • 30

180

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

slide-80
SLIDE 80

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals under coloured noise

For the case, the noise sequence ρ(n) has an auto-correlation function 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

slide-81
SLIDE 81

Optimal signal detection Additive white and coloured noise

Detection of deterministic signals - coloured noise ex.

5 10 15 20

H1

(t) (t) ✂0.04 ✂0.02

0.00 0.02 0.04

GPS time relative to 1 1 2 6 2 5 9 4 6 2 .4 2 4(s)

< >

(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

slide-82
SLIDE 82

Summary

Summary

Optimal filtering: Problem statement General solution via Wiener-Hopf equations FIR Wiener filter Adaptive filtering as an online optimal filtering strategy Recursive least-squares (RLS) algorithm Least mean-square (LMS) algorithm Application examples Optimal signal detection via matched filtering

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

slide-83
SLIDE 83

Summary

Further reading

  • C. Therrien, Discrete Random Signals and Statistical Signal

Processing, 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 Signal

Processing, McGraw Hill, 2000.

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