I am dealing with a problem where I need to make a decision on a 500khz signal under 100usec. The signal is noisy and I am detecting a peak in the incoming signal. Currently I do a 7 step mean filter (down sample by 7) and a moving average of 8 taps following that. This delays my signal 56 samples roughly 112 usec. (2 usec* 7 * 8) If I reduce the filter taps the noise starts to confuse my detector and it starts to fail. Noise is white Gaussian noise, there are no dominant frequencies in the noise.

I am not just interested in the presence of the peak (that would have been a simpler problem) but I am also interested in rise and fall time of the peak. The peak base duration could be between 50 samples (100uSec) to 5,000 samples (10msec). In slow cases the decision speed doesn't matter but in high speeds, the decision speed does make a difference.

My current detector is crude but very efficient. I basically look back filtered signals in time to see if certain thresholds are met or not to make a decision if there is a peak. Once I suspect there is a peak, I find the rise and fall time. This whole operation takes less than 50usec and very optimized. I loose another 100usec in time due to filter memory and I wanted to see if I could get a better detector design.

I have considered several options, such as derivative of the signal (gave up due to noise), matched filter (due to wide frequency range, difficult to design a filter that would work well etc.)

I am looking for ideas to optimize my decision time from its 150usec to 100usec range by reducing the filter delay but not impacting the filter quality.

  • $\begingroup$ Do you know anything about the characteristics of the noise ? $\endgroup$
    – Paul R
    Nov 11, 2012 at 16:45
  • $\begingroup$ @PaulR I checked, there are no dominant frequencies in the noise, it appears it is voltage noise trickling into ADC. How would knowing the noise would help? I can do experiments. $\endgroup$
    – Ktuncer
    Nov 12, 2012 at 0:56
  • $\begingroup$ What is 50 usec? Is it required time delay or is it length of your signal? What is length of your " special pattern in the incoming signal"? $\endgroup$
    – SergV
    Nov 12, 2012 at 3:53
  • 3
    $\begingroup$ You need to clarify the problem. On the one hand you claim you're attempting to detect a pattern. Your most recent comment suggests your estimating a peak. These are two different problems. If it's a detection problem and your "special pattern" is well defined, then you want to look at what the optimal detector is. Most likely (most common noise/model assumptions), you'll be doing thresholding on matched filtering. $\endgroup$
    – Bryan
    Nov 14, 2012 at 13:43
  • 1
    $\begingroup$ @Ktuncer you're missing the forrest through the trees here. How can we answer your question when you add pertinent information with every comment? If you want an answer, edit your question to include the details you've given in the comments and as much additional detail about your problem and constraints as possible. $\endgroup$
    – Bryan
    Nov 16, 2012 at 14:07

1 Answer 1


It is quite very difficult to give a correct answer, because you do not give the full information. But I will try. One of standard way is using "matching filter":



If length of your signal pattern is quite small (<50 usec) you can use this method.

  • $\begingroup$ I looked at matched filters. I have a pretty good idea how my signal looks like however I have a very wide range of frequencies I am detecting and this would require me to run the filter several times which would be prohibitively slow. $\endgroup$
    – Ktuncer
    Nov 17, 2012 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.