0% found this document useful (0 votes)
77 views13 pages

Digital Signal Processing (EE-394) : Practical Work Book

Here are the steps to convert an analog signal to digital using ADC and display it on MATLAB Simulink: 1. Connect the analog output of a function generator to one of the analog input channels of the audio card ADC. Set the function generator to output a sinusoidal signal. 2. In MATLAB Simulink, create a new model. Add the Audio Device In block from Simulink/Audio Video and Image Processing block library. Configure it to use the audio card as the input device and select the channel connected to the function generator. 3. Add a Scope block to display the input signal. Connect the output of the Audio Device In block to the Scope block. 4. Run the simulation. The
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views13 pages

Digital Signal Processing (EE-394) : Practical Work Book

Here are the steps to convert an analog signal to digital using ADC and display it on MATLAB Simulink: 1. Connect the analog output of a function generator to one of the analog input channels of the audio card ADC. Set the function generator to output a sinusoidal signal. 2. In MATLAB Simulink, create a new model. Add the Audio Device In block from Simulink/Audio Video and Image Processing block library. Configure it to use the audio card as the input device and select the channel connected to the function generator. 3. Add a Scope block to display the input signal. Connect the output of the Audio Device In block to the Scope block. 4. Run the simulation. The
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Digital Signal Processing Contents

NED University of Engineering and Technology Department of Electrical Engineering

PRACTICAL WORK BOOK


For Academic Session Fall 2018

Digital Signal Processing (EE-394)


For
TE Electrical

Name:

Roll Number: Year:


Section:
Batch:

Department of Electrical Engineering


N.E.D. University of Engineering & Technology, Karachi
Contents
NED University of Engineering and Technology Department of Electrical Engineering

CONTENTS

Lab.
List of Experiments Page No. Remarks
No.

1 Introduction to Digital Signal Processing

2 Analog to Digital Conversion

3
Analog to Digital Conversion

4
Open Ended Lab 1

10

11
Contents
NED University of Engineering and Technology Department of Electrical Engineering
Contents
NED University of Engineering and Technology Department of Electrical Engineering
Contents
NED University of Engineering and Technology Department of Electrical Engineering

Laboratory Session No. 01

Objective:

To get introduced with fundamentals of Digital Signal Processing

Post Lab Exercises:

Question 1:

What do you mean by the term digital. Explain it briefly.

Answer:

The term Digital describes electronic technology that generates, stores, and processes data
in form of two states: positive (High, 1) and non-positive (Low, 0). The data that is
transmitted and stored through digital technology is present in form of strings of 0’s and
1’s. Also the term digital refers to Descrete values.
Question 2:

Write some (at least three) applications of DSP related to electrical (power) engineering.

Answer:

The Applications of Digital Signal Processing related to Electrical Engineering include:


1. Digital Filters.
As the name suggest it blocks the unrequired signals.
2. Digital Measuring Instruments.
These Instruments detects the input as analog signal then convert it to a digital
signal and measures the parameters. For example Voltmeter.
3. Differentiate between signals.
It helps in differentiating the signals on the basis of their harmonics to solve
different problems because from two signals of same nature one can be useful while
the other can cause damage. Such as the difference between inrush current and
short current in case of transformer.
Contents
NED University of Engineering and Technology Department of Electrical Engineering

Laboratory Session No. 02

Objective:
An Introduction to Analog to Digital Conversion (Sampling and Aliasing).
Post Lab Exercises:
Question 1:
What do you mean by the term “Sampling”? Discuss it briefly with the help of figure.
Answer:
Sampling is one of the step involved in conversion of analog signal to a digital signal.
Analog signal has continuous time which is discretized through sampling. After this step a
CTCV ( Continuous Time Continuous Value ) signal is converted to a DTCV ( Discrete
Time Continuous Value ) signal. Sampling has a certain frequency which we set according
to the sampling theorem.

Question 2:
What is Sampling theorem? What do you mean by the term Aliasing?
Answer:
Contents
NED University of Engineering and Technology Department of Electrical Engineering

The Sampling theorem ( Nyquist Criteria ) says that when converting analog signal to
digital signal the sampling frequency must be greater than or equal to the twice of
maximum frequency that the analog signal has. If this criteria is not fulfilled then when
the signal is again converted to analog form it's frequency would be changed from the
original value. This process causing change in frequency is called Aliasing. It follows the
formula :
F alias = F max - nF sampling

Question 3:
Human audible frequency ranges from _20_ to _20000_Hz. Human voice frequency ranges
from_300_ to _3000_ Hz.

Question 4:
Record audio for 10sec and complete the following table. Show and verify the output file
size through mathematical calculations.
(Hint: Check the Microphone ADC bits and use sampling frequency and the audio record
time to evaluate the file size)
Answer:

S No Sampling File Size Quality


Frequency(Hz) (MB) Comment
1 44100 1.764 Excellent
2 22050 0.882 Excellent
3 10000 0.400 Excellent
4 6000 0.240 Good
5 4000 0.160 Good
6 2000 0.080 Poor
7 1000 0.040 Poor

(Sample Rate x Sample Resolution x Time x channel / 8 ) bytes


1. 44100 x 16 x 10 / 8 = 1762000 bytes
2. 22050 x 16 x 10 / 8 = 882000 bytes
3. 10000 x 16 x 10 / 8 = 400000 bytes
4. 6000 x 16 x 10 / 8 = 240000 bytes
5. 4000 x 16 x 10 / 8 = 160000 bytes
6. 2000 x 16 x 10 / 8 = 80000 bytes
7. 1000 x 16 x 10 / 8 = 40000 bytes

Question 5:
Contents
NED University of Engineering and Technology Department of Electrical Engineering

If an ADC has sampling frequency =1000 Hz and receive analog signals of the following
frequencies what will be the frequency of a signal which is converted back to analog by a
DAC converter?
Answer:

S No Frequency (Hz) Frequency of


output Analog
signal (Hz)
1 100 100
2 750 -250
3 1250 250
4 1900 -100
5 2000 0
6 2500 500

F alias = F max - nF sampling


1. 100 Hz (100<1000/2)
2. F alias = 750 - 1000 = -250 Hz
3. F alias = 1250 - 1000 = 250 Hz
4. F alias = 1900 - (2)1000 = -100 Hz
5. F alias = 2000 - (2)1000 = 0 Hz
6. F alias = 2500 - (2)1000 = 500 Hz

Laboratory Session No. 03

Objective:
An Introduction to Analog to Digital Conversion (Quantization and
Coding).
Contents
NED University of Engineering and Technology Department of Electrical Engineering

Post Lab Exercises:


Question 1:
Why Quantization is needed in Digital Signal Processing?

Answer:

In digital signal processing Quantization is needed to make the number of samples


limited. If the signal is continuous valued the precision of that value of sample would be
very high and it can have infinite number is samples that would need more memory but due
to Quantization there would be specific values of specific precision which will need less
memory as compare to continuous valued function.
Question 2:
What is Anti-Aliasing Filter? Discuss it with some example.
Answer:
An Anti-Aliasing filter is the one which stops waves which are out of its range or it does
not allow them to pass while in Aliasing the wave with frequency greater then fmax would
pass but would be displayed as a wave of changed frequency. The Anti-Aliasing filter is a
low pass filter which cutoff the wave which out of its range .For example in analog
systems high pass and low pass filters are formed using capacitors in them the circuit does
not allows the waves of low and high frequency to pass respectively.
Question 3:
Discuss the specifications of Arduino Uno ADC like number of bits, number of
quantization levels, etc. Also, calculate the default Arduino Uno ADC resolution. Link:
https://store.arduino.cc/usa/arduino-uno-rev3

Answer:
Arduino Uno board has 6 ADC channels. The ADC aur Arduino is of 10 bits and has 1024
quantization levels. The Arduino Uno ADC is of 10-bits resolution (analog values of range
0 - 1023) , it can represent voltages of 0 - 5V range.

Question 4:
A 12-bit ADC has input values in the range of 0 – 1 V. Calculate the resolution of ADC.
Answer:
Contents
NED University of Engineering and Technology Department of Electrical Engineering

No. of levels = 2^(no. of bits)


= 2^¹²
= 4096 levels

Resolution = (Xmax - Xmin) / levels-1


= (1 - 0) / (4096-1)
= 0.244m

Laboratory Session No. 04

(Open Ended Lab 01)

Objective:

To convert an analog (voltage) signal into digital signal using ADC (audio card) and
display it on MATLAB Simulink environment.
Contents
NED University of Engineering and Technology Department of Electrical Engineering

Required Components:

1. Audio Card
2. Transformer (220V/12V)
3. Resistors (for VDR)
4. Veroboard
5. Audio jack
6. PC with MATLAB environment

Procedure:

➢ Using Transformer convert 220VAC from mains into 12VAC.


➢ Using VDR convert 12VAC to a voltage compatible to audio card (show all the
calculations of resistances with their power ratings).
➢ Set the sampling frequency of the audio card ADC in MATLAB Simulink
environment with proper justification
➢ Plot the acquired voltage waveform to Simulink scope.
➢ Mention the safe operating range of your equipment.

Calculations:

ADC Specifications

Number of bits = 16 bits

Sampling Frequency = 44100 Hz

Number of channels = 1

Operating Voltage = 45mV

Vin = 13.7 V

We supposed the value of one resistor as

R1 = 100k ohm
Contents
NED University of Engineering and Technology Department of Electrical Engineering

VR1 = 13.7 * 100k / (100k+180)

VR1 = 13.675V

VR1 = Vin - VR1

= 13.7 - 13.675

VR1 = 24.616mV

VR2 = Vin * R2 / (R1+R2)

24.616m = 13.7 * R2 / (R1+R2)

R2 = 180 ohm

I=V/R

= 13.7 / (100k+180)

= 13.6mA

P(total) = IV

=13.6m*13.7

= 0.186 W

PR2 = R2*I^²

= 180*13.6m^2

=33.3mW
Contents
NED University of Engineering and Technology Department of Electrical Engineering

Results:

You might also like