Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

CONCEPT OF DIGITAL TO ANALOG CONVERSION LAB # 6

LAB # 6

CONCEPT OF DIGITAL TO ANALOG


CONVERSION

OBJECTIVE
• To learn the concepts of D/A conversion.
• To learn the operation of Sampling.

THEORY

6. DISCRETE-TIME (DT) SIGNALS

In analog processing system the information is represented as an analog quantity. i.e.


Something that varies continuously with time. This "something" can be voltage,
current etc.. .for example, the signal that comes out of a microphone is analog in
nature. The varying voltage from the microphone is processed using an analog signal
processing system known as "amplifier" , and reproduced through a speaker.

Where in Digital Signal Processing system , the information is represented in digital


format. The signals that are to be processed are converted into numerical form before
any processing. This conversion is known as sampling. The information contained in
an analog signal is first converted to digital samples which are equally spaced in time.
The figure below shows an analog signal and its sampled version. Each of these
samples are converted in to a numerical value and stored in the computer's memory.
Processing is then done on these samples. The sampling in a Digital Signal Processing
system is governed by a theorem known as sampling theorem.

CE 308: Communication System 1


CONCEPT OF DIGITAL TO ANALOG CONVERSION LAB # 6

6.1 UNIT SAMPLE SEQUENCE

Unit sample sequence is often called the discrete time impulse or the unit impulse. It

is denoted by (n) and is defined as

(n)= 1 for n= 0

0 for n≠ 0

6.2 UNIT STEP SEQUENCE

Unit Step Sequence denoted by u(n), is defined as

u(n)= 1 for n≥0

0 for n<0

CE 308: Communication System 2


CONCEPT OF DIGITAL TO ANALOG CONVERSION LAB # 6

CLASS ACTIVITY

EXAMPLE 6.1

Generation of Unit Sample Sequence


clf;
n=-1:20; %Generate a vector from -1 to 20
s=[zeros(1,1) 1 zeros(1,20)]; %Generate the unit sample sequence
stem(n,s); %Plot the unit sample sequence
xlabel('time independent n');
ylabel('Amplitude');
title('Unit Sample Sequence');
axis([-10 20 0 1]);

EXAMPLE 6.2

Generation of Unit Step Sequence

clf;
n = -10:20; %generate a vector from -10 to 20
u=[zeros(1,10) 1 ones(1,20)]; %generate the unit step sequence
stem(n,u); %plot the unit step sequence
xlabel('time independent n');
ylabel('Amplitude');
title('Unit Step Sequence');
axis([-10 20 0 1.2]);
CE 308: Communication System 3
CONCEPT OF DIGITAL TO ANALOG CONVERSION LAB # 6

EXAMPLE 6.3

Effect of Unit Step Function

clf;
n = -10:20; %generate a vector from -10 to 20
u=[zeros(1,10) 1 ones(1,20)]; %generate the unit step sequence
y=[3 2 4 9 7 8 10 11 12 5 8 10 12 zeros(1,18)];
r=u.*y;
stem(n,r);
xlabel('time independent n');
ylabel('Amplitude');
title('Unit Step Sequence');
axis([-10 20 0 15]);

EXAMPLE 6.4
Implement the following figure using the concept of train of weighted
impulses. Hint: integrate the impulse function (i.e. implement
∞ 5
s (t ) = ∫ ∑A δ (t − nT
−∞n =−5
n o ) dt such that T0 =1 and An is given in the

figure below:

syms t

T0 = 1;
n = [-5:5]; % range of samples
An = [5 5 3 2 0 2 4 1 6 0 3];
x = An .* (dirac(t-(n*T0)) )
y = int(x,t,-inf,inf) %integrate and you will get the weights
z = eval(y); %can't directly plot symbol.
stem (n,z); %plotting the weights with sample time n
clear all

CE 308: Communication System 4


CONCEPT OF DIGITAL TO ANALOG CONVERSION LAB # 6

HOME TASK

1. Generate a unit Impulse sequence (n), delay by 11 samples.

2. Generate unit step sequence advanced by 7 samples.

CE 308: Communication System 5

You might also like