Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Distortion at Output

I used one of the examples in Labview and also used one of the vi generation. I'm getting distortion for sawtooth and square wave outputs, when I increase my frequecy to more than 1000Hz.
Download All
0 Kudos
Message 1 of 4
(3,043 Views)
What type of HW are you using and how is the output distorted? We need a little more information about the issue you are experiencing.
0 Kudos
Message 2 of 4
(3,043 Views)
I'm using NI 4451 PCI card and I'm getting distortion at the output.

When I'm running function generator, I need to decrease wavelength length to get more frequency at the output. So I insert 5 in waveform length and make update to 10000 and time limit to 5 sec. which gives me 2KHz at output and the output is very distorted.

Then I'm running my modified program, Function generator & diff. waveform, and my sample rate is 20Ksamples/sec and frequency is same 2KHz.

First I compared my waveform outputs. In the function generator.vi, the waveform I'm getting in case of triangular, sawtooth and square waveforms, the outputs are almost sine waves.

In my modified vi, till 10 KHz and sampling rate 50KSamples,the waveforms shapes for triangular, sawtooth
and square waves are alright. But if I increase my frequency till 20KHz, the outputs become totally unacceptable.

Hopefully this would clear my point. Please let me know, if you need any other clarification.
0 Kudos
Message 3 of 4
(3,043 Views)
Ahmed,

We talked a couple of days ago over the phone. In our conversation we discussed your application and the signals that you want to generate with your PCI 4452 DSA board.

You are trying to generate several sharp edge signals, like square waves, triangle waves, sawtooth waves, etc. We tried to generate square waves of different frequencies and what you were seeing was the following:
- When generating a 5 kHz square wave, it looked very good in your oscilloscope.
- When generating a 8 kHz square wave, you began to see a resemblance to a sine wave.
- Finally, when generating square waves with a frequency higher than 13 kHz, your signal would look exactly as a sine wave.

So why does this happen?

First it is necessary to understand a little more about the hardware architecture of your DSA board. The PCI 4451 board uses Delta-Sigma technology for analog output (Digital-to-Analog Converter - DAC)as well as analog input (Analog-to-Digital Converter - ADC). The Delta-Sigma converters provide excellent linearity and automatic filtering of frequencies above the Nyquist limit. The Delta-Sigma DAC oversamples and interpolates between points in the data array to "smooth" the signal and remove any components above the Nyquist frequency.

Your DSA board has a Delta-Sigma DAC with an update rate equal to 51.2 kSamples/s. This means that the Nyquist frequency of your signal is aproximately 25kHz, so the maximum frequency of sine waves that you could generate is aproximately 25kHz.

So far we know that the maximum frequency of a sine wave that can be generated with the PCI-4451 is aproximately 25kHz, and that the Delta-Sigma DAC will interpolate between points to "smooth" the signal being generated and remove any frequnecy components above the Nyqsuit frequency. But why can I generate a 25kHz sine wave, but not a 25kHz square wave?

All complex periodic waveforms are composed of a harmonic series of waveforms. This means that square waves, triangle waves, sawtooth waves, etc are the result of addition of a fundamental sine wave and its harmonics.

A square wave is built by adding a fundamental sine wave and its odd harmonics. Each new wave flattens the top of the original sine wave by pushing up valleys and pulling down peaks , causing steeper sides. The more harmonics added, the better the square wave being generated (see image attached below).

So the more harmonics included withint he 25kHz frequency limit, the better quality of the square wave.

If you generate a 1 kHz square wave, you will see in your oscilloscope a pretty good quality square wave signal because odd harmonics up to 13 harmonics are included within the 25kHz range.
If you generate a 5 kHz suqare wave, 2 harmonics are included within the 25kHz range. For 8 kHz only 1 harmonic is included in this range, and that is why you begin to see a resemblance with a sine wave. Finally, for frequencies above 13 kHz, only the fundamental frequency is present after the Delta-Sigma DAC removes all frequencies above the Nyquist frequency, and that is why you see a sine wave as the output.

Hope this helps. Please feel free to contact me if you need any further assistance.

Claudia Lorente
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 4
(3,043 Views)