LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does Pulse Params Vi determine pulse width

I need to know how the PulseParams vi calculate pulse width, rise/fall time? Is it based on the standard 10/90 method or something else? How does it determine what is a "valid" pulse? What is the "Delay" parameter and how do you use it?
0 Kudos
Message 1 of 5
(4,038 Views)
Hello Lancer,

The following is taken from LabVIEW Help under Pulse Parameters:

X is the input sequence. X must meet the following conditions:
� The number of samples in X must be greater than or equal to 3.
� X should have a rising edge, a plateau, and a falling edge.
� The expected peak noise amplitude must be less than 50% of the expected amplitude.
If the number of samples in X is less than 3, the VI sets all the pulse parameters to NaN and returns an error. If X does not contain a rising edge, plateau, and falling edge, the VI analyzes the data, assigns values to as many pulse parameters as it can identify, and sets parameters it cannot identify to NaN. The VI does not report this condition as an error.

Note X can be a positive- or negative-going pulse. A histogram is used to determine top and base. If the difference between top and base is negative, the pulse is considered negative-going with a negative amplitude.
If the data in X is noisy beyond the expected 50% amplitude, the VI does not have enough information to differentiate between glitches and pulse data and may assign incorrect values to the pulse parameters. Because it cannot be detected, the VI does not report this condition as an error.

Note If the data is noisy, you can apply a median filter to the data before passing it to the Pulse Parameters VI. Refer to Noisy Pulse Analyzed with a Median Filter for more information about analysis with a median filter.

Note When the X data is a constant value c, the VI sets the pulse parameters to the following values.
amplitude = overshoot = undershoot = delay = duration = 0.
top = base = c.
risetime = falltime = slew rate = NaN.




slew rate is the ratio between (90% amplitude - 10% amplitude) and the risetime.

overshoot is the difference between the maximum value in the pulse and the topline.

risetime is the time required to rise from 10% amplitude to 90% amplitude on the rising edge of the pulse.

top is the line that best represents the values when the pulse is active, high, or on. For a negative-going pulse, top is less than base and results in a negative amplitude. For a positive-going pulse, top is larger than base and results in a positive amplitude.

amplitude is the difference between top and base.

base is the line that best represents the values when the pulse is inactive, low, or off and is the level closest to zero. For a negative-going pulse, base is larger than top and results in a negative amplitude. For a positive-going pulse, base is less than top and results in a positive amplitude.

undershoot is the difference between the baseline and the minimum value in the pulse.

error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

falltime is the time required to fall from 90% amplitude to 10% amplitude on the falling edge of the pulse.

duration is the difference between the falling edge time and the rising edge time at which 50% amplitude occurs.

delay is the difference between the time origin and the time at which 50% amplitude occurs on the rising edge of the pulse.
Pulse Parameters Details

Note The Cycle Average and RMS, Transition Measurements, Pulse Measurements, and Amplitude and Levels VIs provide more measurements than the Pulse Parameters VI, and you can configure each of those VIs.
The waveform-related parameters are slew rate, overshoot, topline (top), amplitude, baseline (base), and undershoot. If y-axis units are volts, then slew rate has units of volts per sample. The time-related parameters are risetime, falltime, duration (width), and delay and are expressed in units of samples.

Note The VI assumes the input pulse or pulse train has a bimodal, or two-state, distribution. Any input other than a bimodal input can lead to inconsistent results.
The Pulse Parameters VI uses the following steps to calculate the output parameters.
1. Find the maximum and minimum values in the input sequence X.
2. Generate the histogram of the pulse with 1% range resolution.
3. Determine the upper and lower modes to establish the top and base values.
4. Find the overshoot, amplitude, and undershoot from top, base, maximum, and minimum values.
5. Scans X and determines the slew rate, risetime, falltime, duration, and delay.
The Pulse Parameters VI interpolates duration and delay to obtain a more accurate result not only of duration and delay but also of slew rate, risetime, and falltime.
If X contains a train of pulses, the Pulse Parameters VI uses the train to determine overshoot, top, amplitude, base, and undershoot but uses only the first pulse in the train to establish slew rate, risetime, falltime, duration, and delay.

Note Because pulses commonly occur in the negative direction, the Pulse Parameters VI can discriminate between positive and negative pulses and can analyze the X sequence correctly. You do not need to preprocess the sequence before analyzing it.

If none of these suggestions help, or if I�m not correctly understanding your issue, please post the software and versions you are using, the applicable portions of your code, and any other information that may help, and I�ll be happy to look further into it.

Have a nice day!

Robert M
Applications Engineer
National Instruments
Robert Mortensen
Software Engineer
National Instruments
Message 2 of 5
(4,037 Views)
Thanks for your reply. If my application requires me to calculate pulse width by to 10/90 criteria (10% rising edge and 90% falling edge), is it possible to modify pulseparams as follows: Starting at delay, step backward in the input sequence to find index of 10% rising edge. Next start at index = width + delay, step backward to find index of 90% falling edge. pulse width will = (index90 falling edge - index10 rising edge)/samplerate. Do you see any problem with my approach?
0 Kudos
Message 3 of 5
(4,037 Views)
Lancer,

I want to make sure I understand what you need. Your application requires the pulse width by the 10/90 criteria. Are you sure that means the time between when the rising edge hits 10% and the falling edge hits 90%? What do you mean by �step backward?� It seems the duration itself is going to be fairly close to what you are describing, if not exactly the same.

If you are sure this is what you want, and you need it this precise, try the �Pulse Measurements.vi.� Its help page defines the �pulse duration is the time difference in seconds between the first two mid ref level crossings of the specified pulse number. pulse duration is also known as pulse width.� These mid ref level crossings can be user defined, so you could set them as
90% and 10%. This may be what you want.

Hope this helps and have a great day!

Robert M
Applications Engineer
National Instruments
Robert Mortensen
Software Engineer
National Instruments
Message 4 of 5
(4,037 Views)
If I measure the pulse width of a ARINC signal positve half between 10% of rising and 90% on the falling edges I get an answer of 40uS (using manual cursors on a 5112 and standalone scope)
 
When using the pulse width measurement option in the IVI driver/teststand enviroment the same reading is 32uS
 
Why is this? How can you force the correct measurement points?
 
The signal has a positive and negative component. Does the software just ignore one half of the waveform when taking +/- measurements?
 
Many Thanks
Bongo
0 Kudos
Message 5 of 5
(3,901 Views)