You are on page 1of 2

NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

EC Department, NIT K, Srinivas Nagar, Surathkal575025.


EC274 Digital Signal Processing Lab
Even Semester 2014-15
Assignment I
Objective:
i. study basic properties of discrete time signals
ii. Study of effects of sampling and quantisation

(a) Plot the Following signals from n = 20 to n = 20. Use the command stem to plot the signals.
Clearly mark the time origin in each case.
1
(i) ( )n u[n] 2n u[n 5]
3
n
+ )
4
3
n
(iii)
3 sin(3 + )
4
3
(what is the difference from above signal? Why?)
(ii)

3 sin(

(iv)

e0.1n cos(

n
)
8
sin( n
)
6

(v)

n
6

(b) Suppose you sample an analog signal x(t) = 1 t during the interval 0 6 t 6 1sec with a
sampling period of 0.125 to generate x[n]. Plot x[n], x[n], xeven [n] and xodd [n].
(c) Let x[n] = [2, 4, 3, 1, 5, 4, 7] 3 6 n 6 3. Generate and plot the samples of the following
sequences using stem function.
(i)

x1 [n] = 2x[n 3] + 3x[n + 4] x[n]

(ii)

x2 [n] = x[n 4] + x[n + 4]

(iii)

x3 [n] = 2e0.5n x[n]u[n 1]

(d) Consider the discrete time signal x[n] = cos( 2n


).
7
(i) Obtain and plot the downsampled (decimated) signal y[n] = x[2n] along with x[n]
(ii) Obtain and plot the upsampled (interpolated) signal z[n] = x[n/2] for n even and z[n] = 0
otherwise along with x[n]
(e) In DTMF dialling a number is represented by a dual frequency tone. Do a web search and find
the frequencies of each digit. Generate DTMF tones corresponding to the telephone number
08242474040 by sampling the sum of sinusoids at the required frequencies at F s = 8192 Hz.
Concatenate the signals by putting 50 zeros between each signal (to represent silence) and
listen to the signal. (Must sound like tone dialling the same number from a phone)
(f) Record your own voice for half a minute and observe the time domain waveform (Use any sound
recording program, save in .wav f ormat and read it using wavread command in octave for
further processing).
(i) Find the sampling rate used by the recorder(one of the outputs of wavread)
1

(ii) Compare with the quality of the a standard speech recording (available in moodle)
(iii) Find the max/min/average values and energy of the entire signal
(iv) Split the signal into segments of 20ms long and compute the energy of each segment and
plot it.
(v) Quantize the above recorded file to (i) Single bit (ii) 4 Bits (iii) 16 bits and listen to it.
Observe the quantization noise.
(g) A coarse way to approximate a musical note is to generate a set of harmonics (integer multiples
of a base frequency) and perform a weighted sum with an amplitude that is slowly starting and
stopping. Here we try to generate the following approximation to a musical note:
x[n] = sin(n) + sin(2n) + 2 sin(2n)
w[n] = e1 n (1 e2 n )
y[n] = w[n]x[n]
Start with parameters: = 0.2742830, = 0.5, 1 = 1e 4 and 2 = 1e 3. Generate 8000
samples (n = 0......7999) of the signal and save the signal as wav file with sampling frequency
16000Hz. (ie., a note of length 0.5s)

You might also like