LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak detection algorithm on FPGA

Hello,

 

i'm wondering if you can suggest me how to implement a robust algorithm to detect peaks in a sampled signal directly on FPGA 'cause i haven't found anything about this.

 

My Signal consists of a pulses train with different amplitudes and i want to catch the peaks.

Every pulse has a duration of 15-20 us and the input signal is sampled @ 1Mhz.

 

Until now i've implemented a while loop with a circular buffer of only 3 elements and i compare actual read value @ Tn with value buffered @ Tn-3 and if this last one is greater than actual i take that as peak.

 

I have created histogram of detected peaks.

I've tested this with a square wave and what i get here is a perfect peak in histogram corresponding to the peak value of square waveform , but if i put as input signal a sinewave i have a lot of noise and many Bins in histogram are rising. 

 

 

Thanks in advance.

 

 

0 Kudos
Message 1 of 3
(3,414 Views)

Hey

Have you tried zeroing your signal. I think that if the phase on the signal is not perfectly aligned with your 1MHz acquisition you will see this. When the acquired signal crosses zero, that should become your point to start counting from to do the histogram of peaks. What you are doing sounds right but the signal variation has caught me out before.

 

Mike

0 Kudos
Message 2 of 3
(3,405 Views)

Hi Mariano,

 

I wonder if you have found the method? I have encountered the same issue with my project.

 

Frank

0 Kudos
Message 3 of 3
(2,442 Views)