LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure pulse heights in NI FPGA

Hi all,

 

i have a source that gives me input pulses of different height, what i need is to plot the distribution of these pulse heights in sbRIO FPGA.

 

In the FPGA i have to detect peaks, counting them relating to their height and delivering in output the number of occurrences to produce a "heights spectrum"

 

Is there some code examples of how to implement an algorithm in LabView FPGA to perform this type of task?

 

Thanks in advance.

 

MR

 

0 Kudos
Message 1 of 11
(4,633 Views)

When you say height, are you referring to amplitude? You might check out the Amplitude and Levels VI. Not sure if this really answers your question.

0 Kudos
Message 2 of 11
(4,623 Views)

yes amplitude of pulses:

 

i've seen on the web this type of task is often referred as PHA (Pulse height analyzer) or MCA (multichannel analyzer)

but also on this forum i haven't found any example of code implemented in FPGA to perform pulse height analysis and storing...

 

 

0 Kudos
Message 3 of 11
(4,612 Views)

I have not used  PHA or MCA before but the Amplitude and Levels Express VI can output the Negative peak and Positive peak of an input signal. This would be the first thing I would try. This however only gives the max and mins and not the everything in between. Might be able to do some creative programming to continually update output these values and store them.

0 Kudos
Message 4 of 11
(4,603 Views)

Do you have images that show the type of data that you're acquiring? I think that actual separation of the values into separate bins should be straight forward once a peak has been detected, however analysis of the waveform to determine what counts as a peak and what doesn't, especially if these peaks change in height, may not be as straight forward.

 

Finding a peak?

Initially, I'd imagine implementing a buffer (FIFO) of your measured AI data to create a sliding window of your acquired waveform. The buffer would need to be large enough to contain the maximum sized 'peak' you're expecting at your desired sample rate, then use differentiation to infer the rate of change between the 'peak' value in the buffer and the rest of the values. You'd probably need to find the rate of change before the peak value and after it.

 

Placement?

If you find a peak and it meets your rate of change requirements, you should be able to take that value, then based on whether certain bits are set in the data you should be able to place it in an appropriate bin. This will be the implementation that would save you the most gates, but it's probably not the most robust implementation.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 5 of 11
(4,599 Views)

Maybe something like this might work if you could somehow use it to measure the height of every pulse instead of just the max pulse.

Pusle Amplitude.PNG

0 Kudos
Message 6 of 11
(4,590 Views)

Thank you, but the problem is if i want to implement this code in fpga target vi express elements are no longer available.. 

0 Kudos
Message 7 of 11
(4,576 Views)

This might work for you depending on how you have your data coming in. You can get the Y component of the waveform into a 1D array and search it for the height of the pulse. 

Pulse Height BD.PNGPusle Height FP.PNG

0 Kudos
Message 8 of 11
(4,572 Views)

Thank you very much lacVIEW, 

i think vi you have done is exactly what i need, but the problem is that i have to implement this on FPGA, so i can't use all subvi available on normal PC o RT development...Smiley Sad

 

0 Kudos
Message 9 of 11
(4,559 Views)

I am sorry, as I am not well versed in FPGA systems. What is the data type that you are acquiring or as Alex mentioned "Do you have images that show the type of data that you're acquiring?"

0 Kudos
Message 10 of 11
(4,549 Views)