Direct Digital Synthesis

The New Way To Generate Sine Waves

In the good old days before everything started going digital, sine wave generators were in the domain of analog circuitry. One built them using Hartley, Colpitts, Pierce, and other such oscillator circuit designs. They depended on variable capacitors or varactor diodes for tuning, and required good construction and shielding practices to achieve acceptable frequency stability. But all good things come to an end. The era of digital signal processing has arrived, and along with it all sorts of new digital and mixed signal devices.

The Direct Digital Synthesizer (DDS) is simple in concept: one stores a table of sine curve values (one cycles worth of values) which are consecutively read from the table and converted to a corresponding voltage. When the end of the table is reached, the process is repeated. Over time, the voltage output generates a continuous sine wave. Changing the rate at which the samples are read and converted changes the frequency of the sine wave. What could be easier?

Unfortunately, a variety of demons await the unsuspecting designer. To see why, we must define the process a little more carefully. Each voltage output is called a ’sample’. The number of samples per second is known as the sampling rate. Suppose there are N entries in the table for one cycle of the sine wave. The output frequency of the sine wave, f, will then be the sampling rate, Fs, divided by N.

                                                                 f = Fs/N

The voltage output of the DDS is generated by a digital to analog converter. After a sample is output, the voltage remains constant until the next sample is output. The resulting sine wave has a stair-step quality to its shape. The smoothness of the sine wave depends upon the number of entries in the table, and the number of bits of precision of each entry (or the number of bits the digital to analog converter can handle).

The stair-step nature of the sine wave means it is not a pure, single, frequency sine wave. We might guess that the non-sinusoidal nature indicates there will be harmonics present (integer multiple frequencies of the desired frequency), however, this turns out not to be the case. The frequency spectrum is a bit more complicated. Suppose the sampling rate is 10 MHz, and our sine wave is 1 MHz. This means our table has 10 samples for each cycle. Analysis of the frequency content of our stair-step sine wave shows our desired 1 MHz signal, but it also includes a number of other frequencies almost as prominent as the one we want, namely: 9 MHz, 11 MHz, 19 MHz, 21 MHz, 29 MHz, etc. The pattern here is pretty obvious: every 10 MHz frequency segment includes 2 output frequencies, one that is 1 MHz up from the bottom end, and one that is one MHz down from the top end. To produce a “pure” sine wave, a good quality filter must be used to eliminate all but the desired frequency. Typically, this is a low pass filter, often containing 4 poles or more. A clever designer, however, can use a band pass filter tuned to any one of the the output frequencies. Note that this limits the useful output range of the DDS. For example, with a sample frequency again of 10 MHz, but a desired output of 4 MHz, the actual outputs will be at 4, 6, 14, 16, etc. To obtain a pure 4 MHz, the 6 MHz must be removed. This requires a very good filter.

Rather than increasing the sample rate to increase the output frequency, the DDS devices provide a means to select every other sample from the table (count by 2s), or every third sample, etc. This runs through the table faster converting fewer table values per cycle. If the table only includes 10 samples, this is not too useful, but if it holds 10,000,000 samples for a cycle, this is very useful. At each sample time, the user specified increment, n, is added to an internal ‘phase counter’ to keep track of where to look in the sample table. Modern devices use compressed tables along with clever mathematical techniques that produce effective table sizes of billions of samples for one cycle of a sine wave. The output frequency is now given by:

                                                                 f = n x Fs / N

Other sources of difficulty lie in wait for those seeking ultra pure sine waves. Inaccuracies in the analog to digital converter produce unwanted frequencies called ’spurs’, as does the conversion process when the phase counter is truncated to the number of bits used by the analog to digital converter. These spurs, usually of pretty low level, produce ‘phase jitter’ in the resulting sine wave, which may cause difficulties in some applications. Techniques exist to mitigate some of these effects, but designers of high performance systems must be aware of them and the limitations they may impose.

Modern DDS devices use high frequency clock rates. For example, the Analog Devices AD9851 operates with a sample rate of 180 MHz, and can generate sine waves up to 90 MHz, but in practice 60 MHz is a useful upper limit (the first extra output is then at 120 MHz and can be removed by a low pass filter). Other devices are available with much lower, or much higher sample rates.

These devices are rapidly moving from the sphere of the esoteric to the common place of the electronics hobbyist. I recently obtained a DDS kit based on the AD9851 as pictured below. As can be seen, the parts are mostly surface mount and require appropriate tools and a steady hand to solder them to the board. The IC on the left hand side of the left hand picture is the AD9851. This board will function as a general purpose r.f. signal generator, a frequency source for a direct conversion ham receiver, and a vfo for a ham transmitter. Since its accuracy and stability are determined directly by the oscillator module, it will operate with very little temperature drift and with high immunity to mechanical instability.


DDS devices are clever and ingenious devices. Because of their many superior capabilities, and smooth integration into digital systems, their popularity is sure to increase. For more information, I recommend the following sources:

http://www.analog.com/en/rfif-components/direct-digital-synthesis-dds/ad9851/products/product.html
http://www.amqrp.org/kits/dds60/index.html

3 Responses to “Direct Digital Synthesis”

  • Moncler boots says:

    This web site is wonderful. How did you appear up witht he thought?…

  • tennis says:

    I enjoyed reading your nice blog. I see you offer priceless info. Stumbled into this blog by chance but I’m sure glad I clicked on that link. You definitely answered all the questions I’ve been dying to answer for some time now. Will definitely come back for more of this.

  • Stanton Bumbalough says:

    Correct!Cheap swtor credits

Leave a Reply