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