LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse width calculation for transient signal

Hi All,

I am new in Labview, I need help in calculating the Pulse width of transient signal which can be between 5nanosecond to 500 nanosecond.

I am using High Speed digitizer 2 GSPS sampling speed.

I already tried Pulse measurement and Transient Pulse measurement VI, but it is not giving correct result.

I wan to have  Pulse width for signal above Zero level(neglecting undershoot).

attached you will find signal image.

 

Thanks in advance.

0 Kudos
Message 1 of 15
(5,784 Views)

Hi newbee,

 

I wan to have  Pulse width for signal above Zero level(neglecting undershoot).

Then maybe you could cut your signal when its level changes to negative values…

 

I already tried Pulse measurement and Transient Pulse measurement VI, but it is not giving correct result.

Attach your VI with some useful default data! (Make a measurement until you see the plot in your graph. Stop the VI, "Edit"-menu -> set all values to default. Save the VI. Attach it.)

What have you tried so far and which results did you get? In which way are they "not correct"? What is your expected result?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 15
(5,761 Views)

You are missing the beginning of your pulse, that may explain why the pulse measurement VI didn't work for you. Consider if possible to use pre-trigger to include a portion of signal before your trigger point.

 

If you want to ignore the undershoot you are looking for the width at the half-peak value level, in your case approx 0.46 / 2 = 0.23. You can then try to use the Threshold 1D Array function in your array palette to find the indices of the two crossing points. It will require you to do some array manipulation and to keep trak of indices rather than timestamp values. The function only takes ascending arrays so it may also be sensitive to noise.

 

So in your case you may want to develop your own threshold function, which is not too difficult. Search your array for the location of sample pairs where the values are resp. under/over (rising edge) and over/under (falling edge) your half-peak threshold value and eventually perform appropriate interpolation to find a more accurate position of your crossing points (time).

0 Kudos
Message 3 of 15
(5,754 Views)

A little more about the Transition Measurements VI. Assuming your pulse is complete (so as mentioned includes pre-pulse signal as well) the VI is not doing a bad job even with heavy undershoot as shown in the attached VI.

 

Sinc Pulse Width.jpg

 

But you have to select the histogram method as pointed out on the diagram. In this example the expected threshold value should be 0.50 but is found to be 0.482 even for a signal with more than 20% undershoot.

 

In your case you not only have a small undershoot, you also have a negative offset so it's up to you to define your conditions and eventually as GerdW mentioned coerce your negative values to zero.

0 Kudos
Message 4 of 15
(5,747 Views)

Thanks you for reply.

I aready tried similar technique previoulsy as attached. 

 

0 Kudos
Message 5 of 15
(5,735 Views)

Great, but you should, as shown in my VI, use the histogram method if you want to minimize the effect of the undershoot.

Also the pulse width is not exactly the difference between the rising and falling edges start time but rather the edge mid-point locations. The error may or may not be significant depending on your signal and your accuracy requirements.

0 Kudos
Message 6 of 15
(5,731 Views)

Hi GerdW,

I am using Hardware from thirdparty ( Not from NI), if I provide you VI you have to install IO Lib of those hardware.

Till now what I have tried as below:

1. I gave pure periodic sine signal of 10Mhz, I am getting Pulse width  for whole 1 cycle.

2. When I gave periodic signal of 10 Mhz, using attached technique i got result as expected, i.e Pulse width of half sine cycle.

3. When I gave input of Square single Pulse of 50nS and whole signal length is around 1uS, it gives more value than the 50nS or  in negative, here I used start and end time technique. as attached.

 I will try to give you more information soon.

 

 

0 Kudos
Message 7 of 15
(5,730 Views)

Thank you for reply

Yes, I used histrogram settings as well ,with value 7 it matches my result.

But if signal pattern changes to Square pulse, it gives wrong result.

0 Kudos
Message 8 of 15
(5,729 Views)

Hi newbee,

 

if I provide you VI you have to install IO Lib of those hardware.

Nope.

If you would provide your VI with some default/example data included we could remove your HW specific parts and concentrate on signal analysis using this example data.

Right now all we have are (useless) images!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 15
(5,721 Views)

Hi GerdW,

Please check attached VI and screen shot for signal input.

Images : Signal 1 and Signal 2 is screen shot of signal/Function generation.

respective name I have given for VI front view images,from that you can see I am not getting perfect Pulse width values.

My Objective is to calculate Pulse width, Amplitude and Frequency/repetition rate for each input pulse and saving only those in values in excel sheet or table with timestamp.

Befrore going on stroring part, I need to have right calculated values for input signal.

 

Thank you in advance. 

0 Kudos
Message 10 of 15
(5,706 Views)