A somewhat more involved matched filter detector scheme would involve attempting to match a target time limited signal y=fy=f to a set of of time shifted and windowed versions of a single signal X={wStg|t∈R}X={wStg|t∈R} indexed by RR. The windowing funtion is given by w(t)=u(t-t1)-u(t-t2)w(t)=u(t-t1)-u(t-t2) where [t1,t2][t1,t2] is the interval to which ff is time limited. This scheme could be used to find portions of gg that have the same shape as ff. If the absolute value of the inner product of the normalized versions of ff and wStgwStg is large, which is the absolute value of the normalized correlation for standard inner products, then gg has a high degree of “likeness” to ff on the interval to which ff is time limited but left shifted by tt. Of course, if ff is not time limited, it means that the entire signal has a high degree of “likeness” to ff left shifted by tt.
Thus, in order to determine the most likely locations of a signal with the same shape as the target signal ff in a signal gg we wish to compute
t
m
=
argmax
t
∈
R
f
|
|
f
|
|
,
w
S
t
g
|
|
w
S
t
g
|
|
t
m
=
argmax
t
∈
R
f
|
|
f
|
|
,
w
S
t
g
|
|
w
S
t
g
|
|
(4)to provide the desired shift. Assuming the inner product space examined is L2(RL2(R (similar results hold for L2(R[a,b))L2(R[a,b)), l2(Z)l2(Z), and l2(Z[a,b))l2(Z[a,b))), this produces
t
m
=
argmax
t
∈
R
1
|
|
f
|
|
|
|
w
S
t
g
|
|
∫
-
∞
∞
f
(
τ
)
w
(
τ
)
g
(
τ
-
t
)
¯
d
τ
.
t
m
=
argmax
t
∈
R
1
|
|
f
|
|
|
|
w
S
t
g
|
|
∫
-
∞
∞
f
(
τ
)
w
(
τ
)
g
(
τ
-
t
)
¯
d
τ
.
(5)Since ff and ww are time limited to the same interval
t
m
=
argmax
t
∈
R
1
|
|
f
|
|
|
|
w
S
t
g
|
|
∫
t
1
t
2
f
(
τ
)
g
(
τ
-
t
)
¯
d
τ
.
t
m
=
argmax
t
∈
R
1
|
|
f
|
|
|
|
w
S
t
g
|
|
∫
t
1
t
2
f
(
τ
)
g
(
τ
-
t
)
¯
d
τ
.
(6)Making the subsitution h(t)=g(-t)¯h(t)=g(-t)¯,
t
m
=
argmax
t
∈
R
1
|
|
f
|
|
|
|
w
S
t
g
|
|
∫
t
1
t
2
f
(
τ
)
h
(
t
-
τ
)
d
τ
.
t
m
=
argmax
t
∈
R
1
|
|
f
|
|
|
|
w
S
t
g
|
|
∫
t
1
t
2
f
(
τ
)
h
(
t
-
τ
)
d
τ
.
(7)Noting that this expression contains a convolution operation
t
m
=
argmax
t
∈
R
(
f
*
h
)
(
t
)
|
|
f
|
|
|
|
w
S
t
g
|
|
.
t
m
=
argmax
t
∈
R
(
f
*
h
)
(
t
)
|
|
f
|
|
|
|
w
S
t
g
|
|
.
(8)where hh is the conjugate of the time reversed version of gg defined by
h
(
t
)
=
g
(
-
t
)
¯
.
h
(
t
)
=
g
(
-
t
)
¯
.
In the special case in which the target signal ff is not time limited, ww has unit value on the entire real line. Thus, the norm can be evaluated as ||wStg||=||Stg||=||g||=||h||||wStg||=||Stg||=||g||=||h||. Therefore, the function reduces to
tm=argmaxt∈R(f*h)(t)||f||||h||tm=argmaxt∈R(f*h)(t)||f||||h||
where h(t)=g(-t)¯.h(t)=g(-t)¯. The function
f*g=(f*h)(t)||f||||h||f*g=(f*h)(t)||f||||h||
is known as the normalized cross-correlation of ff and gg.
Hence, this matched filter scheme can be implemented as a convolution. Therefore, it may be expedient to implement it in the frequency domain. Similar results hold for the L2(R[a,b))L2(R[a,b)), l2(Z)l2(Z), and l2(Z[a,b])l2(Z[a,b]) spaces. It is especially useful to implement the l2(Z[a,b])l2(Z[a,b]) cases in the frequency domain as the power of the Fast Fourier Transform algorithm can be leveraged to quickly perform the computations in a computer program. In the L2(R[a,b))L2(R[a,b)) and l2(Z[a,b])l2(Z[a,b]) cases, care must be taken to zero pad the signal if wrap-around effects are not desired. Similar results also hold for spaces on higher dimensional intervals with the same inner products.
Of course, there is not necessarily exactly one instance of a target signal in a given signal. There could be one instance, more than one instance, or no instance of a target signal. Therefore, it is often more practical to identify all shifts corresponding to local maxima that are above a certain threshold.
The signal in Figure 4 contains an instance of the template signal seen in Figure 3 beginning at time t=s1t=s1 as shown by the plot in Figure 5. Therefore,
s
1
=
argmax
t
∈
R
f
|
|
f
|
|
,
w
S
t
g
|
|
w
S
t
g
|
|
.
s
1
=
argmax
t
∈
R
f
|
|
f
|
|
,
w
S
t
g
|
|
w
S
t
g
|
|
.
(9)
"My introduction to signal processing course at Rice University."