You are on page 1of 5

ECE 515 FL

Digital Signal Processing Laboratory Activity 1: ADC and DAC

Activity No. 1
ADC and DAC
III. PRACTICE PROBLEMS

From the concepts presented in the background, solve the following problems.
1. The ADC shown samples at 8000 samples/second and uses 8-bit, signed 2's complement
encoding. Its reference voltage is 10mV. The input signal is defined as x(t)=1.5sin(2000πt)volts
and the sampling starts at t=0.

x(t) - analog input signal


x[n] - value of nth sample
xqn[n] - quantized value of the nth sample
xenc[n] - 8-bit, signed 2's complement for the nth sample

(a) Complete the table below for the ADC process.

ADC Table:
n x[n], V xq[n], V xenc[n]
1 0 0 0000 0000
2 1.060660172 1.06 0110 1010
3 1.5 1.27 0111 1111
4 1.060660172 1.06 0110 1010
5 0 0 0000 0000
6 -1.060660172 -1.06 1001 0101
7 -1.5 -1.27 1000 0000
8 -1.060660172 -1.06 1001 0101

SLU ECE 1
ECE 515 FL
Digital Signal Processing Laboratory Activity 1: ADC and DAC

(b) The output of the ADC process is applied as input to an DAC process as shown at a rate of 8000
samples/second. The DAC has a resolution of 25mV and also uses 8-bit, signed 2's complement
format.

Sketch the staircase waveform of the output signal of the DAC. Indicate all significant amplitude
values and time values.

DAC Output Waveform:

3.75

2.65
2.65

2 0.125mS 0.375mS
-2.65 -2.65

-3.75

2. Given an analog signal x(t) = 2 + 3sin(500πt) + sin(4000πt) volts.


(a) Determine the voltage range and frequency content of x(t).
Voltage range = ___-5.95____ to ____5.95_____ volts
Frequency content = 0, 250, 2000 Hz

(b) Determine the minimum sampling frequency (Fsmin) to avoid aliasing and the minimum
reference voltage (Vrefmin) that should be used to prevent overflow in the analog-to-digital
conversion of x(t). Assume that 8-bit, signed 2's complement is used.

SLU ECE 2
ECE 515 FL
Digital Signal Processing Laboratory Activity 1: ADC and DAC

Fsmin = ____4000______ Hz Vrefmin = _____46.484375_____ volt

1. Familiarization with SCILAB functions used for the simulation of ADC and DAC
(a) Open the SCILAB file ADC_DAC_functions.sce and familiarize with the user-defined function
functions used in the file. Understand their operation and the syntax for calling them.
(b) Use the SCILAB functions declared in ADC_DAC_functions.sce to solve problem 1 of the
problem set. Compare the results you get from using the SCILAB functions with your answers.
Are the results obtained using the SCILAB functions similar to your answers? __YES___
2. Simulation of the ADC/DAC process to demonstrate aliasing and overflow.
(a) Open the simulation program simulation1.sce.
(b) Go over the program and answer the following:

(b.1) What is the amplitude and frequency of the input signal?


Amplitude = 0.5V ; Frequency = 100Hz
(b.2) What should be the highest frequency content of the input analog signal to avoid
aliasing?
Frequency = 200Hz
(b.3) What should be the range of the input voltage to the ADC to avoid overflow?
-1.28V to +1.27V
(c) Execute the simulation program. Observe the signal reconstructed at the DAC output.
(c.1) Is the reconstructed output an acceptable approximation of the input signal in terms of
(a) waveform, (b) amplitude, and (c) frequency.
(a) YES; (b) YES; (c) YES
(d) Edit the simulation program to make the frequency of the input signal be 7800Hz and then
execute the simulation program.
(d.1) What is the amplitude and frequency of the reconstructed signal?
Amplitude= 0.5V ; Frequency = 200Hz
(d.2) Is the reconstructed output an acceptable approximation of the input signal
in terms of (a) waveform, (b) amplitude, and (c) frequency?
(a) YES; (b) YES; (c) NO

SLU ECE 3
ECE 515 FL
Digital Signal Processing Laboratory Activity 1: ADC and DAC

(e) Edit the simulation program to make the frequency of the input signal be 100Hz and its
amplitude be 5volts and then execute the simulation program.
(e.1) What is the amplitude and frequency of the reconstructed signal?
Amplitude= 3.2V ; Frequency = 100Hz
(e.2) Is the reconstructed output an acceptable approximation of the input signal
in terms of (a) waveform, (b) amplitude, and (c) frequency?
(a) NO; (b) NO; (c) YES

(f) Edit the simulation program to make the frequency of the input signal be 8100Hz and its
amplitude be 5volts and then execute the simulation program.
(f.1) What is the amplitude and frequency of the reconstructed signal?
Amplitude= 3.2V ; Frequency = 100Hz
(f.2) Is the reconstructed output an acceptable approximation of the input signal
in terms of (a) waveform, (b) amplitude, and (c) frequency?
(a) NO; (b) NO; (c) NO

3. Simulation of the ADC of audio signals and storing the ADC results as a wave file
(a) Open the simulation program simulation2.sce.
(b) Edit the PATH in the simulation program and then execute the program?
(b.1) Did it result to the playback of the sampled 500Hz tone?
YES
(b.2) Is the wave file created at the designated subdirectory?
YES
(b.3) Playback the wave file with Goldwave. Does the playback of the wave file sounded
similar to the 500Hz tone during the execution of the simulation program?
YES
(c) Create 4 wave files by simulating an ADC process in which the 500Hz input is sampled at
Fsmin, 2Fsmin, 5Fsmin, 10Fsmin with Fsmin being the minimum sampling frequency as
prescribed by the Nyquist sampling theorem. Name the wave files according to the convention
used in the program. Open the wave files simultaneously using Goldwave. Expand the the
displayed waveforms by pressing SHIFT +  to observe the reconstructed signals.

SLU ECE 4
ECE 515 FL
Digital Signal Processing Laboratory Activity 1: ADC and DAC

(c.1) Which wave file has the best reconstruction of the 500Hz tone?

_10Fsmin_____________________________________________________________________
_
(c.2) Do all the reconstructed signals sound similar? If no, which signals sound signals sound
similar?

______YES_______________________________________________________________
(d) Edit the simulation program to make the frequency of the input signal be 7800Hz with an
amplitude of 2.5volts. Reset the sampling frequency to 8000Hz and then execute the simulation
program. Open the resulting wave file using Goldwave.
(d.1) What is the amplitude and frequency of the reconstructed signal?

____1Volt,5500Hz______________________________________________________________
(d.2) Is the reconstructed output an acceptable approximation of the input signal in terms of
(a) waveform, (b) amplitude, and (c) frequency? if no, explain why?
(a) NO, not a wave form; (b) NO, smaller amplitude; (c) NO, lower frequency

SLU ECE 5

You might also like