Вы находитесь на странице: 1из 15

Digital to Analog Conversion

Sometimes the output of a DSP system can be used directly, without conversion of a digital signal back to an analog signal. This is often the case in signal analysis systems, and sometimes in control or communication systems. However, in many cases the DSP system must interface with the analog world at both ends (input and output). In those cases, the digital signal must be converted back to an analog form. The digital signal is a sequence of integers in binary format. The first step in converting the signal from digital to analog form is to convert each integer in the sequence to a Voltage (or current). There are many circuits which do this, and a discussion of their internal operation is beyond the scope of this course.

Digital to Analog Conversion


For the sake of this discussion, well call this first step in the digital to analog conversion process a binary to level conversion: conversion of an integer in binary format to a Voltage or current level. If the input to the binary-to-level converter was an analog Voltage signal, and if the binary-to-level converter produces a Voltage level, the output Voltage level may be thought of as an estimate of the input signal Voltage which produced the nth sample in the sequence. V(n) Binary to Level Conversion

Digital to Analog Conversion


The binary-to-level converter is followed by a zero-order hold circuit. This is a sort of reverse sample-and-hold. It takes one sample (as a level, not as an integer), and holds that level for one sample period. The output of the zero-order hold is a sort of staircase approximation to the analog signal well eventually produce.

V(n)

Binary to Level Conversion

Zero-Order Hold

Digital to Analog Conversion


The binary-to-level converter is followed by a zero-order hold circuit. This is a sort of reverse sample-and-hold. It takes one sample (as a level, not as an integer), and holds that level for one sample period. The output of the zero-order hold is a sort of staircase approximation to the analog signal well eventually produce.

V(n)

Binary to Level Conversion

Zero-Order Hold

Digital to Analog Conversion


Heres a 1 kHz sine wave, before sampling.

Digital to Analog Conversion


Heres the same 1 kHz sine wave, with samples taken at fs = 22 kHz.

Digital to Analog Conversion


Heres the sequence of samples. For a high-resolution system, this would be a good approximation to the input to the zero-order hold.

The Matlab stem command was used to plot the sample values in this fashion.

Digital to Analog Conversion


And here are the samples along with the staircase output of the zero-order hold.

Digital to Analog Conversion


The output of the zero-order hold is still, in effect, a discrete time signal. It only changes at integer multiples of the sample period, so it still has the spectral characteristics of a discrete time signal. This means it still has an image at every integer multiple of the sample frequency.
Power Spectral density

-fs

-B

fs

2fs

-fs/2

fs/2

Digital to Analog Conversion


The last step in recovery of the analog signal is to remove the images with an anti-imaging, or recovery, filter. This filter could have the same frequency response as the anti-aliasing filter at the other end of the system.
Power Spectral density

Frequency response of recovery filter

-fs

-B

fs

2fs

-fs/2

fs/2

Digital to Analog Conversion


Heres the time-domain view of the zero-order holds output. If we smooth it, itll be a good approximation to the original sine wave.

Digital to Analog Conversion


We add the recovery filter previously mentioned to strip off the spectral images. This is a lowpass filter, so it smooths the staircase output. Removing the images is the frequency-domain view of the effect of the recovery filter, smoothing the stairsteps is the time domain view of the same action.

V(n)

Binary to Level Conversion

Zero-Order Hold

Recovery Filter

V(t)

Digital to Analog Conversion


Heres are the staircase output from the zero-order hold, along with the smoothed output of the recovery filter. This completes the digital-to-analog conversion.

Digital to Analog Conversion


These three stages, the binary-to-level conversion, zero-order hold, and recovery filter, comprise a digital-to-analog converter, or DAC.

V(n)

Binary to Level Conversion

Zero-Order Hold

Recovery Filter

V(t)

Digital-to-Analog Converter (DAC)

Analog-to-Digital Conversion
At the input end of the system, we have the analog-to-digital converter, or ADC. The ADC may inclode both the quantizer and the sample-andhold, or it may consist of the quantizer only, with an external sampleand-hold.

V(t)

Sample And Hold

N-bit quantizer

Vq(n)

Analog-to-Digital Converter (ADC)