Signal detection
Let r[n] be a noisy signal that is either:
H0:R[n]=W[n]
H1:R[n]=s[n]+W[n]
where s[n] is the signal that we are trying to detect, and W[n] is an i.i.d. zero-mean Gaussian process with variance σ2.
The maximum a posteriori rule can be written as:
f(r[0],r[1],…,r[L−1]|H1)f(r[0],r[1],…,r[L−1]|H0)′H′1⏞><⏟′H′0p0p1
Given that W[n] is Gaussian, this can be rewritten as:
∏L−1n=0(1σ√2πe−(r[n]−s[n])22σ2)∏L−1n=0(1σ√2πe−(r[n])22σ2)′H′1⏞><⏟′H′0p0p1
After some simplifications, we get:
g=L−1∑n=0r[n]s[n]′H′1⏞><⏟′H′0σ2lnη+ε2=γ
where η=p0p1 and ε=∑L−1n=0s2[n] (Energy)
Let G be the random variable of which g is a realized value. Similarly, R[n] is the random process of which r[n] is a realized instance. Then,
G=L−1∑n=0R[n]s[n]
The distributions of G are:
H0:G∼N(0,σ2ε) H1:G∼N(ε,σ2ε)
Note that the variance is the same in both cases.
Matched filter
A matched filter is used to detect a known signal s[n] in white Gaussian noise.
The filter is the time reverse of the signal:
h[n]=s[−n]
In the frequency domain:
H(ejΩ)=S(e−jΩ)=|S(ejΩ)|e−j∠S(ejΩ)
Consider filtering a noisy signal r[n] with the matched filter h[n]:
g[n]=(h∗r)[n]=(←s∗r)[n]
In the ideal case where r[n]=s[n], the output is deteministic autocorrelation:
g[n]=(h∗r)[n]=(s∗←s)[n]=ˉRss[n]
The matched filter maximizes the spread between the H0 and H1 cases.
Compare the g[n] with the threshold γ=σ2Wlnp0p1+ε2. If g[n]>γ, declare ′H′1. Otherwise, declare ′H′0.
Probability of error
The conditional probability of false alarm is:
PFA=Q(γσ√ε)
PM=1−Q(γ−εσ√ε)
Total probability is:
Pe=p0PFA+p1PM