Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal...

16
Detection theory 101 ELEC-E5410 Signal Processing for Communications

Transcript of Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal...

Page 1: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Detection theory 101 ELEC-E5410 Signal Processing for Communications

Page 2: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Binary hypothesis testing

•  Null hypothesis H0: e.g. noise only

•  Alternative hypothesis H1: signal + noise

•  Trade-off between •  Probability of false alarm

(decide H1 when H0 is true) •  Miss

•  Both depend on threshold γ

PFA

p(x;H1) p(x;H0)

γ

Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998

Page 3: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Likelihood ratio/Neyman-Pearson test

•  For a given false alarm rate PFA, the probability of detection PD is maximized with the likelihood ratio test

where the threshold γ is

•  Assumes that the PDFs p(.) are completely known

R.W.

3

Page 4: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Detection of constant signal level in white Gaussian noise (WGN) using N samples

R.W.

4

•  Formulas to calculate detection and false alarm probabilities

Page 5: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Receiver operation characteristics (ROC) •  Way to measure the

performance of detectors •  The performance of a

detector is always above the diagonal, because the diagonal is the same as guessing

R.W.

5

ROC for a constant signal in WGN

Page 6: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Bayesian detector

•  Another, probabilistic, approach for detection •  Assign prior probabilities to events (if possible) and minimize

the probability of error

•  Bayesian detector becomes

R.W.

6

Page 7: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Bayesian detector

•  Assign costs to the decisions and minimize Bayes risk

where Cij is the cost of deciding Hi when Hj is the true event •  Bayesian detector

•  Assumes perfect knowledge of PDFs, probabilities and risks

© R.W.

7

Page 8: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Generalized likelihood ratio test (GLRT)

© R.W.

8

•  Decide between H1 and H0 when parameters of the PDFs depend on the set of unknown parameters θi

•  Unknown parameters are estimated by maximum-likelihood estimation and substituted in the generalized likelihood ratio

•  There is no optimality associated to GLRT, but it works often well in practise

Page 9: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Generalized likelihood ratio test (GLRT)

© R.W.

9

•  Another form of GLRT is

•  Special case when the PDF under H0 is completely known (e.g. H0 is noise only hypothesis and noise power is known)

Bayesian test or the minimum probability of error detector

L(x) =p(x|H

1

)

p(x|H0

)>

P (H0

)

P (H1

)= �

Probability of error

P (H0

|H1

)P (H1

) + P (H1

|H0

)P (H0

)

Bayes risk

R =1X

i=0

1X

j=0

C

ij

P (Hi

|Hj

)P (Hj

)

L(x) =p(x|H

1

)

p(x|H0

)>

(C10

� C

00

)P (H0

)

(C01

� C

11

)P (H1

)= �

The general problem is to decide between Ho and H1 when the PDFsdepend on a set of unknown parameters

Generalized likelihood ratio test (GLRT). Estimate unknown parameters.Although there is no optimality associated with the GLRT, in practice, itappears to work quite well.

L

G

(x) =p(x; ✓

1

,H1

)

p(x; ✓0

,H0

)> �

where ✓i

is MLE of the parameter vector ✓i

Another form of the GLRT is

L

G

(x) =max✓1 p(x; ✓1

,H1

)

max✓0 p(x; ✓0

,H0

)> �

In the special case when the PDF under H0 is completely known

L

G

(x) = max✓1

p(x; ✓1

,H1

)

p(x;✓0

,H0

)> �

11

Page 10: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Uniformly most powerful test (UMP)

•  Uniformly most powerful test (UMP) yields the highest probability of detection for any signal parameter, say, A

•  For UMP, test statistic and threshold must be found without the knowledge of A

•  For UMP to exist the parameter test must be one-sided

•  One-sided:

•  Two-sided:

© R.W.

10

Page 11: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Bayesian approach

•  Unknown parameters are considered as realizations of random variables and prior PDFs are assigned to them

•  Requires prior knowledge of unknown parameters whereas GLRT does not

•  Requires multidimensional integration over unknown parameters

© R.W.

11

Page 12: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Example: unknown signal in WGN

•  GLRT approach:

•  MLE estimate of the unknown signal s[n] is clearly x[n] •  The test becomes

•  This is simply the energy detector

© R.W.

12

Page 13: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Example: known signal in WGN with unknown amplitude •  The detector becomes

•  The detector is simply a correlator

© R.W.

13

Page 14: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Example: known signal in WGN with unknown amplitude •  Threshold seems to depend on the amplitude so the test does

not look UMP •  However H0 is noise only and therefore

•  Given PFA the threshold is independent of A •  If the sign of the amplitude is known, the test is UMP •  If the sign is unknown the test is GLRT and MLE of A is

•  The detector is simply a correlator

© R.W.

14

Detector becomes

N�1X

n=0

s[n]x[n] >�

2 ln � + A

2

2

PN�1

n=0

s

2[n]

A

= �

0

if A > 0. This is a correlator. However, UMP test exists because for givenP

FA

the threshold does not depend on the amplitude and

0 = Q

�1

P

FA

rN

2

!

If the sign of the amplitude is not known, there is no UMP test and wehave to resort to GLRT. A is replaced by its MLE estimate

A =

PN�1

n=0

s[n]x[n]P

N�1

n=0

s

2[n]

Unknown timing. Search for

max

N�1X

n=0

s[n]x[n� ⌧ ]

Sinusoid in WGN, phase and frequency known

s[n] = cos(2⇡fnT + ✓)

Sinusoid in WGN, phase unknown, frequency known

s[n] = exp(j2⇡fnT )

Probability of false alarm in this case

P

FA

= exp

✓� ln �

22

Page 15: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Example: sinusoidal signal in WGN

•  Coherent: unknown amplitude, known frequency and phase: •  Uncoherent: unknown amplitude, known frequency and

unknown phase:

•  Uncoherent detector, PFA instead of Q-1():

© R.W.

15

Sinusoid in WGN, phase and frequency known

s[n] = cos(2⇡fnT + ✓)

Sinusoid in WGN, phase unknown, frequency known

s[n] = exp(j2⇡fnT )

Probability of false alarm in this case

P

FA

= exp

✓� ln �

14

Page 16: Detection theory 101 - Aalto€¦ · Inspired by S.M. Kay, Fundamentals of statistical signal processing. Detection theory, Prentice-Hall, 1998 . Likelihood ratio/Neyman-Pearson test

Example: sinusoidal signal in WGN

•  Unknown arrival time: Determine MLE of the timing

•  Unknown frequency: Estimate frequency as the max. peak of the periodogram

© R.W.

16

which is simply energy detectorKnown signal with unknown amplitude in WGN

1

(2⇡�

2)

N/2 exp(� 1

2�

2

PN�1

n=0

(x[n]� As[n])2)

1

(2⇡�

2)

N/2 exp(� 1

2�

2

PN�1

n=0

x[n]2)> �

Taking logarithm and simplifying

� 1

2�2

N�1X

n=0

(�2As[n]x[n] + A

2

s

2[n]) > ln �

Detector becomes

N�1X

n=0

s[n]x[n] >�

2 ln � + A

2

2

PN�1

n=0

s

2[n]

A

= �

0

if A > 0. This is a correlator. However, UMP test exists because for givenP

FA

the threshold does not depend on the amplitude and

0 = Q

�1(PFA

)

rN

2

If the sign of the amplitude is not known, there is no UMP test and wehave to resort to GLRT. A is replaced by its MLE estimate

A =

PN�1

n=0

s[n]x[n]P

N�1

n=0

s

2[n]

Unknown timing. Search for

max

N�1X

n=0

s[n]x[n� ⌧ ]

13