LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure number of cycles in Labview

I'am new to LabVIEW 7.0, actually i'am facing problem to acquire a PWM signal for integer number of cycles.Please help me out to find the solution
0 Kudos
Message 1 of 9
(3,696 Views)
The PWM signal is Sine modulated and i want to know how to measure the integer number of cycles of the signal from the oscilloscope. I'm acquiring the signal directly from oscilloscope & using Labview VI's, I need to find the sine Trend of PWM signal & also determine the number on integer cycles.
Please Help me out
Thanks in advance

sayaf
0 Kudos
Message 2 of 9
(3,693 Views)
Are you trying to find the number of cycles of the sine wave? If so, try filtering the PWM signal with a low pass filter. Set the filter cutoff frequency to a value between the highest sine frequncy and the PWM switching frequency. Then measure the filtered sine wave. This simulates what happens in the real load.

Lynn
0 Kudos
Message 3 of 9
(3,671 Views)
Lynn,
Thanks for the reply. First i need to find the trend of the PWM signal which I'm acquiring from the scope then i need to determine the integer number of cycles of the sine modulated PWM signal so that i could perform operation on those integer number of cycles to avoid spectral leakage..

Thanks
sayaf
0 Kudos
Message 4 of 9
(3,660 Views)
Can you post a file with a sample of your data as obtained from the scope. Perhaps someone could offer suggestions.

Does your scope take a large enough sample set to get the number of cycles you need with sufficient resolution? For example suppose the PWM frequency is 20 times the sine frequency and you want 10 cycles of the sine frequency for your analysis. Then you need 200 cycles of the PWM frequency and the scope needs to sample each PWM cycle with sufficient resolution to give accurate indication of the pulse width, probably 50-100 samples per cycle. Thus the scope needs to acquire 10000 - 20000 samples for 10 cycles of the sine. A few scopes can do this but many do not.

Lynn
0 Kudos
Message 5 of 9
(3,646 Views)
Thanks Lynn,
Sorry for delayed response.Its working fine but i'am not getting the ideal sine wave, the sine signal is distorted & also the amplitude of sine got reduced compared to the actual PWM signal. what might be the reason.

sayaf
0 Kudos
Message 6 of 9
(3,619 Views)
Thanks Lynn,
Sorry for delayed response.Its working fine but i'am not getting the ideal sine wave after low pass filtering, the sine signal is distorted & also the amplitude of sine got reduced compared to the actual PWM signal. what might be the reason.

sayaf
0 Kudos
Message 7 of 9
(3,618 Views)
The amplitude of the sine will always be somewhat less than the amplitude of the PWM signal because the PWM duty cycle is not permitted to to to 0% or 100%. For example suppose the PWM signal has an amplitude of 10 volts. If the duty cycle range was 10% to 90%, the maximum sine amplitude would be about 8 volts (10 V * 90% - 10 V * 10%).

The distortion could be due to a number of causes. The inputs sine to PWM conversion is a form of digitizing so the Nyquist criterion applies. The bandwidth and fidelity of the amplifiers and speed of the comparators can introduce errors. The output filtering is also significant.

If you can describe your system in more specific detail, someone may be able to offer sugestions.

Lynn
Message 8 of 9
(3,597 Views)
Thanks Lynn,
My problem got solved, the distortion at the filter output was due to modulating the signal with low freq carrier.

Thanks
sayaf
0 Kudos
Message 9 of 9
(3,580 Views)