# Using Matched Filter To Predict the Existence of An Event

I have a stream of signal, and I'm looking for the presence of a certain event (the signal), also I have a "model"(which is a an approximation of the original signal) for that signal, and I will adopt it as my matched filter. So I tried to choose the matched filter, without any mathematical calculation. When I was looking for the signal. I saw a pattern that appears repeatedly. And I expect that pattern is the signal.

1. Could I cross-correlate the matched filter every unit of time (for example, every 2 seconds) with the signal and see if the value of cross correlation approaches to 1, and based on that decide if that event is existing or not? To make things more clearly, the following is an algorithm of my approach

while (Signal s is Streaming)
{
S = epoch_the_signal(s)
x = cross_correlation(S,M)
if(x > Threshold)
{
print "The signal appears"}
}
}

2. What if I choose the matched filter as what is given in the literature (taking the matched filter as to increase the SNR. So I take what I expect to be the signal, and I used the formula, which is shown below to build the matched filter). does that will increase the noise that my model is including it in addition to the signal?

I think the hardest work is how to get the signal, not how to find the matched filter. Especially if it's biomedical signal.

• I don't understand your question; can you please clarify a few things? What is the "model" of a signal? Do you mean the pulse shape without noise? Also, what do you mean by 'cross-correlate a matched filter'? Can you try re-wording questions 2 and 3 -- I just don't understand. Maybe add some of the math you're thinking of, to make your question more precise? – MBaz Sep 30 '15 at 19:06

1. Yes. However cross correlating is matching so you got a mix-up in terminology. You can detect the presence of the signal this way.
2. Matched filter will always maximize the output SNR so it will not increase your noise. Given Gaussian noise it is also a Most Powerful test (I.e optimal).
• for point 2: But what if the matched filter itself contains noise. As I said I build the matched filter by observing the signal by eye, But, definitly my observation does not only represent the signal, but it's represent the signal including some of a noise. – hbak Oct 1 '15 at 14:25
• You mean the template signal the matched filter is not the actual signal but the signal plus noise? If that is the case the filter will match the received signal to your "eye observed" signal. – Nir Regev Oct 1 '15 at 16:26
• and if it's "bad" observation. Then my matched filter will decrease the SNR? – hbak Oct 1 '15 at 16:28
• No. It will match the received signal to your "bad" observation, maximizing the SNR for detecting the "bad" observation which obviously is not something you want. – Nir Regev Oct 1 '15 at 16:30