Direct Digital Synthesis (DDS) Mode (NI 5411/5431)
DDS is a technique for generating, under digital control, an analog frequency source from a single reference clock frequency. The primary advantages of DDS are very fine frequency resolution along with rapid and phase-continuous frequency switching. Using DDS mode is roughly analogous to setting a desktop function generator to produce a single waveform and then tweaking the frequency knob at precisely known time intervals.
You should use DDS mode when you need to repeatedly generate a single waveform and arbitrarily change its frequency without introducing phase discontinuities. The waveform may be a "standard" function, such as a sine, square, or triangle wave. It may also be an arbitrary user-defined waveform. DDS is ideal for maximizing frequency control over a single waveform. However, if you need precise hardware timing to switch between multiple waveforms, you should use Arb Mode instead.
The main features of DDS mode are:
1. On-board memory for a single waveform with a length of exactly 16384 16-bit samples. (Analog output has a resolution of 12 bits, taking the 12 most significant bits of each 16-bit sample.)
2. Very fine waveform frequency resolution: 9.31 mHz.
3. Two instructions per stage: waveform frequency, and the time for which that frequency should be generated. Up to 512 stages may be stored in DDS mode. (Click here for more information on stages and stage lists).
DDS mode can generate sine waves with frequencies up to 16 MHz on the NI 5411 and 8 MHz on the NI 5431. The SYNC output may also be used to produce TTL clock signals at these frequencies. DDS mode can produce square, sawtooth, or triangle outputs at frequencies up to 1 MHz.
An on-board FIFO stores up to 512 stages in DDS mode. Each stage consists of two instructions: a frequency and time. When output begins, the board begins to generate the waveform at the frequency given in the first stage. It continues to do so for the length of time specified in the first stage, and then changes the frequency to that indicated in the second stage. Exactly how the output changes from one stage to the next depends on which of four triggering modes is being used. The figure below shows several stages of a sine wave produced in DDS mode. Each stage is defined by a frequency (f) and duration (DT). Also, note that there are no phase discontinuities when the frequency changes.
NOTE: It is important to remember that the duration of each stage is specified as a time (in seconds). The duration is not specified as a number of waveform cycles or iterations. If you need to generate a specific number of cycles, you will need to calculate how long this will take based on the frequency for that stage.
DDS mode can be used to sweep over a range of frequencies. One application for a frequency sweep could be generating a Bode plot to record the frequency response of an external system. You can approximate a continuous sweep by using a large number of stages and making small frequency changes from one stage to the next. The minimum time for any stage is two microseconds, allowing the board to change frequencies at rates up to 500 kHz.
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
