1

I need an algorithm that will detect the correct peak location in a "signal" (actually a series of data points). The signal is generated by a machine. The signal is nothing similar to an electrical signal (audio/radio frequency).

enter image description here
The data points could look like this:

[1, 2, 1, 3, 4, 5, 4, 3, 2, 1, 13, 14, 15, 18, 23, 19, 17, 15, 15, 15, 14, 11, 9, 4, 1, 1, 2, 2, 1, 2]

I think we could imagine that the signal was accidentally passed through a low-pass filter, and now we want to restore it.

NOTES:

After a peak, if the signal is not coming down fast enough we can consider that there are multiple peaks (you can best see that in the 'red' signal at the end of the series).

One advantage on my side is that the whole data series is available (save on disk). So, the signal does not have to be processed in real time.

IceCold
  • 113
  • 7
  • 1
    Welcome to SE. DSP. Apparently your guess "as a signal that was accidentally passed through a low-pass filter" sounds sound. You might need deconvolution or restoration. On your last picture, how do you know that your right-most red bump should be split in 3, and the center-left black one only in one peak? – Laurent Duval Jul 15 '16 at 11:55
  • 1
    @LaurentDuval "...'sounds sound." Lovely phrase! – Dilip Sarwate Jul 15 '16 at 13:00
  • @LaurentDuval-It is the first time when I have to do this kind of processing, so, can you point out how to implement such 'restoration' from programmatically point of view? Can you Please name a more specific deconvolution/restoration algorithm? I have tried some searches like "data point signal deconvolution library" but it only takes me to electronics forums and/or to advanced scientific articles. – IceCold Jul 15 '16 at 13:39
  • @LaurentDuval-A good 'peak' cannot be that long (as shown in the top image). When the signal is good (see the bottom image) a peak is only few 'pixels' (data points) wide. So, when the peak is too long, it must be more than one peak there (or the signal is really really really f*****). But in most cases, the supposition is good. So, any small un-uniformity must be the 'hidden' peak. – IceCold Jul 15 '16 at 13:44
  • @LaurentDuval-If the hidden peaks are a problem and are lost during deconvolution, I could try to un-hide them first, then pass the signal through the deconvolution algorithm. For example I could search the hidden peaks and bump the signal height with 50 percent. – IceCold Jul 15 '16 at 13:49
  • @DilipSarwate The Australian phrase for "politically correct" used to be "ideologically sound" before the Americanism took over. I prefer IS to PC. :-) – Peter K. Jul 15 '16 at 14:32
  • Will this help you (it will if you have the received file and then a copy of how that specific waveform should look prior to the channel distortion): http://dsp.stackexchange.com/questions/31318/compensating-loudspeaker-frequency-response-in-an-audio-signal/31326#31326 – Dan Boschen Jul 15 '16 at 16:08
  • Could this method be used for peak detection in this case? https://www.researchgate.net/publication/233735046_An_Efficient_Algorithm_for_Automatic_Peak_Detection_in_Noisy_Periodic_and_Quasi-Periodic_Signals – Juha P Jul 15 '16 at 19:37
  • @DanBoschen-Sorry, I don't quite understand. The 'signal' I show is the original signal, undistorted and unfiltered. – IceCold Jul 15 '16 at 20:01
  • Somebody said that a 1D FFT will help. – IceCold Jul 16 '16 at 16:08
  • @PeterK. Even better! Now we can say "He is IS in his ideas" :-) – Dilip Sarwate Jul 16 '16 at 20:21

1 Answers1

1

I can see in your Signal on the right, the "picks" are separated equidistantly. So this is my proposition: Subsample your signal and add a amplified Gaussian signal centered at each sample.

enter image description here

Gilles
  • 3,386
  • 3
  • 21
  • 28
  • You can select the amplification factor as the 'y' value of your sample, and you will need to test different subsample frequencies and different variances for your gaussians until you find a result that you liked it – Alexander Leon VI Jul 15 '16 at 22:16
  • Thanks. Can you add more explanations for the layman? How do I get that gaussian signal? How do I mix the signals? – IceCold Jul 16 '16 at 15:55
  • You can check Parzen Windows, is the same approach, but you are going to take equidistant samples instead of samples randomly selected. – Alexander Leon VI Jul 18 '16 at 15:39