Sie sind auf Seite 1von 44

MGM COLLEGE OF ENGINEERING AND TECHNOLOGY

KAMOTHE, NAVI-MUMBAI-410209

DEPARTMENT OF COMPUTER ENGINEERING

Laboratory Manual

BE Sem-VII (CBSGS)

Subject: Digital Signal Processing.

Prepared By Approved by

(Mr. V.R. Bhosale) (Prof. Dr. K. Sankar)


Asst. Professor HOD
Date : 27 June -2017 Date : 27 June -2017
Document No : CE/DSP
Version No 1.3
Laboratory Guidelines (Laboratory procedures)
Every week before lab, each student should read over the laboratory experiment and work out
the various calculations, etc. that are outlined in the prelab. The student should refer to Proakis
Manolakis, Digital Signal Processing : Principles, Algorithms and Applications

a) Give
b) Report
c) Most
d) Each student must have a laboratory notebook. The notebook should be a permanent
document that is maintained and witnessed properly, and that contains accurate records of
all lab sessions.

Laboratory Notebook
The laboratory notebook is a record of all work pertaining to the experiment. This record
should be sufficiently complete so that you or anyone else of similar technical background can
duplicate the experiment and data by simply following your laboratory notebook. Record
everything directly into the notebook during the experiment. Do not use scratch paper for
recording data. Do not trust your memory to fill in the details at a later time.

GUIDELINES FOR LABORATORY NOTEBOOK

a) State the objective of the experiment.


b) Draw the block diagrams and flowchart.
c) Mention the formulas used.
d) Create a table and note down results obtained.
e) Show a l l y o u r c a l c u l a t i o n n e a t l y a n d S Y S T E M AT I C A L LY . Do t h i s i s a n
organized manner.
f) Attach graph if any.
g) Be concise. Complete sentences are not necessary as long as the context is clear.
h) If mistakes are made, they should not be erased. Just bracket them and make a short
note explaining the problem.
i) Make entries as the lab progresses; don't assume you can fill it in later. The

2
instructor will ask to see it during the lab.
j) Date every page.
k) All important obtained results must be underlined.
l) Attach simulation and hand calculation to your note book.
m) Draw the figure using pencil before you come to the lab so that you can make
corrections to it in case you need to do so by erasing and redrawing. This will ensure tidy
and neat work.
n) Take a few short notes (2-3 lines), which explains some of the problems you
encountered while doing the experiment. This will help you write better reports.

General Lab Report Format

Following the completion of each laboratory exercise in Digital Signal Processing subject a
report must be written and submitted for grading. The purpose of the report is to completely
document the activities of the design and demonstration in the laboratory. Reports should be
complete in the sense that all information required to reproduce the experiment is contained
within. Writing useful reports is a very essential part of becoming an engineer. In both academic
and industrial environments, reports are the primary means of communication between engineers.

There is no one best format for all technical reports but there are a few simple rules
concerning technical presentations which should be followed. Adapted to this laboratory they may
be summarized in the following recommended report format:

Title page
Introduction
Experimental procedure
Experimental data
Discussion
Conclusions

Detailed descriptions of these items are given below.

Title Page:

The title page should be prepared according to the ABET form included at the beginning of
this lab manual. The title page should contain the following informations

3
Your name
ID
Course number (including section)
Experiment number and title
Date submitted
Instructors Name
Introduction:

It should contain a brief statement in which you state the objectives, or goals of the
experiment. It should also help guide the reader through the report by stating, for example,
that experiments were done with different DSP algorithms or consisted of two parts etc. or
that additional calculations or data sheets can be found in the appendix, or at the end of
the report.

The Procedure

It describes the experimental setup and how the measurements were made. Include here
block diagrams or flow charts. Mention instruments used and describe any special
measurement procedure that was used.

Results/Questions:

This section of the report should be used to answer any questions presented in the lab
handout. Any tables and/or circuit diagrams representing results of the experiment should
be referred to and discussed/explained with detail. All questions should be answered very
clearly in paragraph form. Any unanswered questions from the lab handout will result in
loss of marks on the report.

The best form of presentation of some of the data is graphical. In engineering presentations
a figure is often worth more than a thousand words. There are some simple rules
concerning graphs and figures which should always be followed. If there is more than one
figure in the report, the figures should be numbered. Each figure must have a caption
following the number. For example, Figure 1.1: TTL Inverter In addition, it will greatly
help you to learn how to use headers and figures in MS Word.

The Discussion

4
It is a critical part of the report which testifies to the students understanding of the
experiments and its purpose. In this part of the report you should compare the expected
outcome of the experiment, such as derived from theory or computer simulation, with the
measured value. Before you can make such comparison you may have to do some data
analysis or manipulation.

When comparing experimental data with numbers obtained from theory or simulation,
make very clear which is which. It does not necessarily mean that your experiment was a
failure. The results will be accepted, provided that you can account for the discrepancy.
Your ability to read the scales may be one limitation. The value of some circuit
components may not be well known and a nominal value given by the manufacturer does
not always correspond to reality. Very often, however, the reason for the difference between
the expected and measured values lies in the experimental procedure or in not taking into
account all factors that enter into analysis.

Conclusion:

A brief conclusion summarizing the work done, theory applied, and the results of the
completed work should be included here. Data and analyses are not appropriate for the
conclusion.

Notes

Typed Reports are required. Any drawings done by hand must be done with neatness,
using a straight edge and drawing guides wherever possible. Free hand drawings will
not be accepted.

5
Program Educational Objectives

The objectives of the program are:

PO-1: Graduates of the program will be employed in the computing profession, and will be
engaged in learning, understanding, and applying new ideas and technologies as the field
evolves
PO-2: To teach various Digital Signal Processing Systems development strategies.
PO-3: To teach Digital Signal Processing Systems Analysis, Design and Development using C language
and DSP Processors.
PO-3: To teach different Architectural Styles and Patterns.
PO-4: A graduate must be able to quickly adapt to new Digital Signal Processing Problem, Solve
it by using existing Digital Signal Processing Algorithms.
PO-5: A graduate must have the background and perspective necessary to pursue post-graduate
education.

Course Outcome

At the conclusion of Computer Engineering students will be able to:


CO-1: Describe the Sampling Theorem and how this relates to Aliasing and Folding.
CO-2: Understand the Time Domain Operations like Convolution and Correlation
CO-3: Determine if a system is a Linear Time-Invariant (LTI) System.
CO-4:. Determine the frequency response of FIR and IIR filters.
CO-5: Understand and determine the Concept of Impulse Response and Step Response.
CO-6: Understand the relationship between poles, zeros, and stability.
CO-7: Determine the spectrum of a signal using the DFT, FFT, and spectrogram.
CO-8: Understand the DSP Algorithms.
CO-9: Understand the Real Time Signal Processing.
CO-10: Design, analyze, and implement application of Digital Signal Processing in C Language

6
Term work

Grading Policy Internal Assessment

Two tests must be conducted which should cover at least 80% of syllabus.
The average marks of both the test will be considered for final internal assessment.

Frequently Asked Questions [FAQ]

Q1. Why Computer Engineering students need to take complete course in DSP?
Q2. What level of Subject knowledge is expected from students?
Q3. Can mathematical analysis be avoided?
Q4. Why do the students find this subject Difficult?

It is expected that subject teacher should answer all these questions during lecture time at
the early stage of course.

Course Requirements

No of Experiments : minimum 8 (Recommended 10)


No of Assignments: 6 (one on each module)
No of tests : 2 (each of 20 marks)
No of Quiz : Min 2 (Recommended 4 one on each CO)
Final exam : 1 (80 marks)

7
Course Content

Contents:

Introduction to Digital Signal Processing,

Discrete Time Signals,

Sampling and Reconstruction,

Standard DT Signals,

Concept of Digital Frequency,

Representation of DT signal using Standard DT Signals,

Signal Manipulations (shifting, addition, subtraction, multiplication),

Classification of Signals,

Linear Convolution formula evaluation,

Circular Convolution formula evaluation,

Matrix Representation of Circular Convolution,

Linear by Circular Convolution.

Auto and Cross Correlation formula evaluation,


Contents

Introduction to Discrete Time System,

Classification of DT Systems (Linear/Non Linear, Causal/Non Causal, Time Invariant/Time


Variant Systems, Stable/ Unstable),

BIBO Time Domain Stability Criteria,

LTI System,

8
Concept of Impulse Response and Step Response

Concept of IIR System and FIR System,

Output of IIR and FIR DT system using Time Domain Linear Convolution formula Method

Introduction to DTFT, DFT,

Relation between DFT and DTFT,

Properties of DFT without mathematical proof (Scaling and Linearity, Periodicity, Time Shift
and Frequency Shift, Time Reversal, Convolution Property and Parsevals Energy Theorem).

DFT computation using DFT properties

Transfer function of DT System in frequency domain using DFT.

Linear and Circular Convolution using DFT

Response of FIR Discrete Time System calculation in frequency domain using DFT.

Radix-2 Cooley & Tuckeys DIT-FFT Algorithm,

DIT-FFT Flow graph for N=4 & 8,

DIT-FFT Flow graph for N=6 using split radix FFT

Inverse FFT algorithm.

Spectral Analysis using FFT,

Comparison of Complex and Real, Multiplication and Additions of DFT and FFT.

Carls Correlation Coefficient Algorithm,

Fast Circular Convolution Algorithm,

Fast Linear Convolution Algorithm,

9
Linear FIR filtering using Overlap Add Algorithm and Overlap Save Algorithm,

Need for Special architecture of DSP Processor,

Difference between DSP Processor & Microprocessor,

A general DSP Processor

TMS320C54XX series,

Case study of Real Time DSP Applications to Speech Signal Processing and Biomedical Signal
Processing.

Text/Reference Books

[1] Ashok Ambardar, Digital Signal Processing , Cengage Learning, 2007,


This is good reference book for Continuous Time and Discrete Time Signal. It contains rich set
of solved and exercise problems.

[2] Emmanuel, Ifeachor, Barrie, Jervis, Digital Signal Processing: A Practical Approach, Pearson
Education
This is an excellent text book for DSP subject. It includes comprehensive discussion on signal
processing. This is a useful Book.

[3]. S. Salivahanan, A. Vallavaraj, C. Gnanapriya, Digital Signal Processing TataMcgraw Hill


Publication First edition (2010). ISBN
An excellent text with systematic, simple and easy to understand explanation for every topic on
Signals and Systems, DFT and FFT algorithms.

[4] Avtar Signh, S.Srinivasan,Digital Signal Processing, Thomson Brooks/Cole,


This book gives short explanation for DSP concepts.

[5] B. Venkatramani, M. Bhaskar ,Digital Signal Processor, TataMcGraw Hill, Second Edition,
This is an excellent text for DSP Processor Architecture and Programming. It is the best
reference book for basic concepts of TMS320 Processor. This is an useful Text.

[6] Sanjit Mitra, Digital Signal Processing : A Computer Based Approach , TataMcGraw Hill,
Third Edition

10
This is good for theoretical foundation of subject. It includes good no of programming
assignments.

[7] Dr, Shaila Apte, Digital Signal Processing,, Wiley India, Second Edition,2013
This book covers basic signal processing operations. It gives short and simple explanation on
every module of DSP

[8] Proakis Manolakis, Digital Signal Processing : Principles, Algorithms and Applications
An excellent text with the comprehensive discussion on a wide range of topics. It is a very well
written book with detailed explanation on every module of DSP. This is an useful Text.

[9] Schaums Outlines, Monson H. Hayes, (Digital Signal Processing) McGraw Hill International
edition

This is good reference book for basic to advanced discrete time signal processing with
simple and short explanation on every topic.

It includes 300 solved problems, hundreds of additional practice problems, with answers.

It is the perfect aid for better grades.

Note: Implementation of programs must be either in C or C++ only. Application can be


developed using open source simulation software such as Scilab. A List of compulsory eight
experiments is given. Additional experiments within the scope of the syllabus can be added.

11
List of Experiments

Sr. No. Experiments

Plotting of signal: Write a program to plot the discrete signals Unit Step, Unit Impulse
1.
and exponential signal.
2 Sampling and Reconstruction: To study sampling and reconstruction of signal
3. Nyquist Sampling Rate: To study Nyquirt sampling rate and effect on reconstruction of
signal.
To perform different operations on discrete time signal: Write a program to perform
4.
addition, subtraction, and scaling on discrete signal.
To perform different shifting operations on discrete time signal: Write a program to
5.
perform left shift and write shift of discrete signal.
To perform Discrete Convolution: The aim of this experiment is to study mathematical
6
operation such as Linear convolution.
To perform Discrete Correlation : To study mathematical operation Correlation and
7.
measure degree of similarity between two signals
To perform Discrete Fourier Transform: The aim of this experiment is to study
8.
magnitude spectrum of the DT signal.
9. To perform Fast Fourier Transform: To implement computationally fast algorithms.
To perform circular convolution : The aim of this experiment is to study mathematical
10.
operation such as Circular convolution,
To perform Linear convolution using circular convolution : The aim of this
11.
experiment is to perform Circular convolution using linear convolution,
12. Filtering of long Data Sequence: To perform filtering of Long Data Sequence using
Overlap Add Method.
13. Filtering of long Data Sequence: To perform filtering of Long Data Sequence using
Overlap Save Method.

12
14. Real Time Signal Processing: To perform real time signal processing using TMS320
Processor.
Application of Digital Signal Processing: To implement any Signal Processing operation
15
on one dimensional digital signal.
Application of Digital Signal Processing: To implement any Signal Processing operation
16.
on two dimensional digital signal.

EXPT NO. : 1 Plotting of Discrete Time signal

Aim: To study of different discrete time signal plotting.

Objective: To Develop a program to plot the discrete signals Unit Step, Unit Impulse and
exponential signal.

Problem Definition:

1. Plot Unit Step Signal.


2. Plot Unit Impulse Signal.
3. Plot Exponential Signal.
Theory:

Digital signals are discrete in both time (the independent variable) and amplitude (the dependent
variable). Signals that are discrete in time but continuous in amplitude are referred to as discrete-
time signals. Discrete-time signals are data sequences. A sequence of data is denoted {x[n]} or
simply x [n] when the meaning is clear. The elements of the sequence are called samples. The
index n associated with each sample is an integer. If appropriate, the range of n will be specified.
Quite often, we are interested in identifying the sample where n = 0. This is done by putting an
arrow under that sample. For instance, {x[n]} ={. . . ,0.35,1,1.5,0.6, 2,. . .} The arrow is often
omitted if it is clear from the context which sample is x[0]. Sample values can either be real or
complex. In the rest of this book, the terms discrete-time signals and sequences are used
interchangeably. The time interval between samples is not explicitly shown. It can be assumed to
be normalized to 1 unit of time. So the corresponding normalized sampling frequency is 1 Hz. If the
actual sampling interval is T seconds, then the sampling frequency is given by fs = 1 T .
The unit impulse sequence is defined by
[n] = 1, for n = 0
= 0, otherwise

13
Note that while the continuous-time unit impulse function is a mathematical object that cannot be
physically realized, the unit impulse sequence can easily be generated.

Unit Step Sequence The unit step sequence is one that has amplitude of zero for negative indices
and an amplitude of one for non-negative indices
U(n) = 1, for n 0
= 0, otherwise
Unit Ramp Signal : Complex exponential sequences are essentially complex sinusoids.
x[n] = Aej(on+)
= A cos(0n + ) + jA sin(0n + )

Experimentation and Result Analysis:

1. Input: x(n) = { 1,2,1,2,4,1,5,6)

2. Plot the Signal x(n).

3. Plot Unit Impulse Signal.

4. Plot Unit Step Signal.

5. Plot Ramp Signal.

Conclusion:

Hence studied different discrete time signal and developed a program to plot the discrete signals
Unit Step, Unit Impulse and Unit Ramp signal.

14
EXPT NO. : 2 Sampling and Reconstruction

Aim: To study Sampling and Reconstruction of Signal.

Objective: To Develop a program to sample a Continuous Time Signal and convert it to Discrete
Time Signal.

Problem Definition:
1. Sample the input signal and display few samples
2. Reconstruct the original signal and display the original signal and reconstructed signal.
Theory:
The simplest method to generate Sine wave is to use Trigonometric Sin function. The Sin function
will generate the samples from our specific parameter like sampling frequency, number of
samples, input frequency. In this project, generating the correct sample is important. The library
function "sin()" does all of the work Its most basic form as a function of time

Where
A, the amplitude, is the peak deviation of the function from its
center position.
, the angular frequency, specifies how many oscillations occur
in a unit time interval, in radians per second
, the phase, specifies where in its cycle the oscillation begins at
t = 0.
When the phase is non-zero, the entire waveform appears to be shifted in time by the amount
/ seconds. A negative value represents a delay, and a positive value represents an advance.

Experimentation and Result Analysis:

15
1. Input: x(t) = 08 Cos(2t)

2. Calculate Sampling Rate: ------------------

3. Sample the signal by obtained Sampling rate and obtain discrete


signal.

4. Comment on result.

Conclusion: Hence studied how to sample a Continuous Time Signal and convert it to Discrete
Time Signal.

EXPT NO. : 3 Nyquist Sampling Rate

Aim: To study Nyquist sampling rate and effect on reconstruction of signal.

Objective: To Develop a program to study Nyquist sampling rate and effect on reconstruction of
signal.
Problem Definition:
1. Calculate the Nyquist Sampling rate of given signal x(t).
2. Sample the given signal using Nyquist Sampling rate. Obtain signal(x(n).
3. Reconstruct the original signal x(t) and display the original signal and reconstructed
signal.
4. Vary the sampling frequency and observer the changes in reconstructed signal.
Theory:
A continuous time signal can be represented in its samples and can be recovered back when
sampling frequency fs is greater than or equal to the twice the highest frequency component of
message signal. i. e. fs 2 fMax

Consider a continuous time signal x . The spectrum of x is a band limited to fm Hz i.e. the spectrum
of x is zero for ||>max. Sampling of input signal x can be obtained by multiplying x with an
mpulse train t of period Ts. The output of multiplier is a discrete signal called sampled signal
which is represented with yt in the following diagrams:

16
Here, you can observe that the sampled signal takes the period of impulse. The process of
sampling can be explained by the following mathematical expression:
Sampled signal y(t) = x(t). (t) . . . . . . (1)
The trigonometric Fourier series representation of t is given by

17
18
Experimentation and Result Analysis:

1. Input: x(t) = 08 Cos(2t)

2. Calculate Nyquist Sampling Rate: ------------------

3. Sample the signal by obtained Nyquist Sampling rate and obtain discrete
signal.

4. Take sampling frequency less then Nyquist sampling rate and reconstruct analog signal
from obtained discrete signal.

5. Comment on result.

Conclusion:

If sampling frequency is less than Nyquist sampling rate then aliasing effect is observer in
reconstructed signal.

EXPT NO: 4 : Perform different operations on Discrete Time Signal in Time Domain

Aim: Write a program to perform addition, subtraction, and scaling on discrete signal.

Problem Definition:

1. Define two discrete time signals x(n) and y(n).


2. Perform addition of i.e. z(n) = x(n)+y(n).
3. Perform subtraction i.e. z(n) = x(n)-y(n). ith y[n].
4. Perform scaling on signal x(n).

Theory:

Addition of Signals :
This particular operation involves the addition of amplitude of two or more signals at each instance
of time or any other independent variables which are common between the signals. Addition of
signals is illustrated in the diagram below, where x(n) and y(n) are two time dependent signals,

19
performing the additional operation on them we get,
z(n) = x(n)+y(n) for discrete time signals, x[n] and y[n]

Subtraction of Signals:

Similar to the case of addition, subtraction deals with the subtraction of two or more signals in
order to obtain a new signal. Mathematically it can be represented as

z[n] = x[n] - y[n] for discrete time signals, x[n] and y[n]
Multiplication of Signals:
Multiplication of two signals is nothing but multiplication of their corresponding amplitudes.
The new signal. Mathematically it can be represented as
z[n] = x[n] *- y[n] for discrete time signals, x[n] and y[n]
Amplitude Scaling

Multiplication by constant factor C to x(n) is a amplitude scaled version of x(n) . Mathematically it


can be shown as z(n)=Cx(n).

Experimentation and Result Analysis


Input x[n] = [1, 2, 3, 4 ] , y[n] = [ 4, 11, 20, 30, 20, 11, 4 ]
1. Obtain z(n) = x(n)+y(n).
3. Obtain z(n) = x(n)-y(n). ith y[n].
4. Obtain z(n) = C * x(n). Take constant C less then one and Grater then one.

Conclusion:
Performed addition, subtraction, and scaling operations on discrete signals.

20
EXPT NO: 5 : To perform different time shifting operations on Discrete Time
Signal.

Aim: Write a program to perform left shift and write shift of discrete signal.

Problem Definition:

1. Perform left shift and right shift.


2. Perform Folding, reflection or time reversal.
3. Perform Time Scaling. on signal x(n).

Theory:
Time Shifting of Signals :
Time shifting of signals is probably the most important one, and most widely used amongst
all basic signal operations. Its generally used to fast-forward or delay a signal, as is necessary in
most practical circumstances. Time shifting is mathematically expressed as,

21
y(n) = x(n-no) Where, x(n ) is the original signal, and n 0 represents the shift in time.
For a signal x(n) if the position shift n0 > 0. Then the signal is said to be right shifted or delayed.
In the same manner, if n0< 0, implies the signal is left shifted or delayed.

Time Scaling of Signals:

Time scaling of signals of signals involves the modification of a periodicity of the signal, keeping
its amplitude constant. Its mathematically expressed as, y(n) = x(n) Where, x(n) is the original
signal, and is the scaling factor. If > 1 implies, the signal is compressed and < 1 implies, the
signal is expanded.

Reflection of Signals:

Reflection of signal is a very interesting operation applicable on both continuous and discrete
signals. Here in this case the vertical axis acts as the mirror, and the transformed image obtained is
exactly the mirror image of the parent signal.
It can be defined as y(n) = x(-n) Where, x(n) is the original signal.
But if the reflected signal x(- n) = x(n); then its called an even signal.
Where as when x(- n) = x(n); then its known as an odd signal.

Experimentation and Result Analysis

1. Define discrete time signals x[n] = [1, 2, 3, 4, 3,2,6,2 ]


2. Obtain y(n) = x(n-k); k = 3.
3. Obtain y(n) = x(n+k); k = 2.
4. Obtain y(n) = x(-n).
5. Obtain y(n) = x(n/2).

Conclusion:
Performed time shifting, time scaling and reflection operations on discrete signals.

22
EXPT NO: 6 Discrete Convolution

Aim:
The aim of this experiment is to study mathematical operation such as Linear convolution, Circular
convolution, and Linear convolution using circular convolution

Objective:

1. Develop a function to find Linear Convolution and Circular Convolution


2. Calculate linear convolution, Circular convolution, Linear Convolution using Circular
Convolution and verify the results using mathematical formulation.
3. Conclude on aliasing effect in Circular convolution

Problem Definition:
Find Linear Convolution and Circular Convolution of L point Sequence x[n] and M point sequence
h[n].

1. Find Linear Convolution of L point sequence x[n] and M point sequence h[n] using
Circular convolution.

23
2. Give your conclusion about No of values in Linearly Convolved signal, Aliasing
effect in Circular Convolution.
Theory:
Convolution is an integral concatenation of two signals. It has many applications in numerous areas
of signal processing. The most popular application is the determination of the output signal of a
linear time-invariant system by convolving the input signal with the impulse response of the
system.

Mathematic Formula:
The linear convolution of two continuous time signals x(t) and h(t) is defined by I For discrete time
signals x(n) and h(n), is defined by 1=: V ?<p) = i(h) a m = 2^ j$) JKk - )
Where x(n) is the input signal and h(n) is the impulse response of the system. In linear convolution
length of output sequence is,
Length(y(n)) = length(x(n)) + length(h(n)) - 1
Graphical Interpretation:
Reflection of h(k) resulting in h(-k)
Shifting of h(-k) resulting in h(n-k)
Element wise multiplication of the sequences x(k) and h(n-k)
Summation of the product sequence x(k) h(n-k) resulting in the
Convolution value for y(n)

Circular convolution:

Let X1(n) and X2(n) are finite duration sequences both of length N with DFT's Xi(k) and X2(k).
Convolution of two given sequences X1(n) and X2(n) is given by the equation,

x 3 (n) = IDFT[X 3 (k)]


X 3 (k) = Xi(k) X 2 (k) N-l
x 3 (n) = X x i( m ) x 2 ((n-m))N m=0

Example:

Let's take X1(n) = {1, 1, 2, 1} and x 2 (n)={l,2,3,4}

Arrange X1(n) and X2(n) in circular fashion as shown below.


X1(m) x 2 (m) x1(3)
To get X2(-m), rotate X2(m) by 4 samples in clockwise direction.
x 2 (-m) x 2 (l) 2
x 3 (0) = x 1 (m)x 2 (-m)
= x,(0) x 2 (0) + x,(l) x 2 (3) + x,(2) x 2 (2) + x,(3) x 2 (l)
= 1+4 + 6+2

24
x 3 (0) = 13
Keep X1(m) constant and rotate x2 (-m) once to compute further values.

To get X3(l) rotate x2 (-m) by one sample in anti-clockwise direction


x 2 (l-m)
x 2 (2) 3
x 3 (l) = x 1 (m)x 2 (l-m)

= x,(0) x 2 (l) + x,(l) x 2 (0) + x,(2) x 2 (3) + x,(3) x 2 (2)


=2+1+8+3
x 3 (l) = 14
To get X3(2) rotate X2(l-m) by one sample in anti-clockwise direction x2 (2-m)
x 2 (0)
x 3 (2) = x^m) x 2 (2-m)
= x1(0) x 2 (2) + x1(l) x 2 (l) + x1(2) x 2 (0) + x1(3) x 2 (3)
= 3+2 + 2+4
x 3 (2) = 1 1

To get x 3 (3) rotate x 2 (2-m) by one sample in anti-clockwise direction x 2 (3-m) x 2 (0) 1
x 3 (3) = xi(m) x 2 (3-m)
= x,(0) x 2 (3) + x,(l) x 2 (2) + x1(2) x 2 (1) + x,(3) x 2 (0)
=4+3+4+1
x 3 (3)=12
The convoluted signal is,
x 3 (n)={13, 14, 11,12}

Experimentation and Result Analysis

To find y[n] = x[n] * h[n]


Input x[n] = {1, 2, 3, 4 } Length L= 4
h[n] = { 5, 6, 7 } Length M= 3
Output y[n] = {5, 16, 34, 52, 45, 28} Length N =6

Conclusion:

1. Length of Linear Convolution output signal is N = L + M -1

Where L is the length of first input signal

25
M is the length of second input signal

N is the length of linear convolution output signal.

2. To find Circular Convolution Select N = MAX (L, M), Where L is the length of first input signal
M is the length of second Input signal

EXPT NO: 7 Discrete Correlation

Aim: To study mathematical operation Correlation and measure the degree of


similarity between two signals

Problem Definition:

1. Find auto correlation of input signal and find the significance of value of output signal
at n=0. Let y[n] = x[n] O x[n]
2. Classify the resultant signal (Even / Odd). Calculate the energy of the signal
Q. What is the significance of value of y[0]?

3. Find auto correlation of delayed input signal.


Let p[n]= x[n-1] O x[n-1].
Compare the resultant signal p[n] with y[n]. Give your conclusion.

4. Find cross correlation of input signal and delayed input signal

26
Let q[n] = x[n] 0 x [n-1].
Compare the resultant signal q[n] with p[n] and y[n]
Give your conclusion.

5. Find cross correlation of input signal and Scaled input signal.


Let s[n] = x[n] O a x[n-2].
Compare the resultant signals.
Give your conclusion.

Theory:

Correlation: Correlation determines the degree of similarity between two signals. If the signals are
identical, then the correlation coefficient is 1; if they are totally different, the correlation
coefficient is 0, and if they are identical except that the phase is shifted by exactly 180 (i.e.
mirrored), then the correlation coefficient is -1.
Autocorrelation:
The Autocorrelation of a sequence is correlation of a sequence with itself. The autocorrelation of a
sequence x(n) is defined by,
R xx (k) = x(n) x(n-k) k,n = 0, 1 , 2, 3
Where k is the shift parameter. Or equivalently
Rxx (k) = x(n+k) x(n) k ,n = 0, 1 , 2, 3
Properties of Autocorrelation:

1. Periodicity: R xx (ko) = R X x(0) then R xx (k) is periodic with


period ko
2. Autocorrelation function is symmetric, i.e. R xx (m) = R xx (-m)
3. Mean square value: autocorrelation function at k=0, is equal to
mean square value of the process. Rxx(O) = E{|x(n)| }>0

Cross-Correlation
Cross-correlation: When two independent signals are compared, the procedure is known as cross-
correlation. It is given by,

R xy (k) = X *(n) Y(n-k) k,n = 0, 1 , 2, 3


Where k is the shift parameter. Or equivalently
Ryx(k) = Zy( n+k ) x ( n )
Comparing above two equations, we find that,
R xy (k) = R yx (-k)
Where R yx (-k) is the folded version of R xy (k) about k = 0.
So, we can write Cross correlation of the two sequences is given by, R x y (k) = Ix(n)y[-(k-n)]
R xy (k) = x(k)*y(-k) ...(1)

Equation (1) shows that cross correlation is the essentially the convolution of two sequences in
which one of the sequences has been reversed.

27
Properties of cross correlation:
1 . R xy (k) is always a real valued function which may be a
positive or negative.
2. R xy (-k) = R yx (k)
3. |R iy (k)| 2 <IU0)R y y(0)
4. |R xy (-k)| <[l/2] [R xy (-k) + R xy (-k)]
5. When R xy (k) = 0, x(n) and y(n) are said to be uncorrected or
they said to be statistically independent.
6. R xy (k) may not be necessarily have a maximum at k=0 nor Rxy (k) an even function.

Experimentation and Result Analysis

To find y[n] = x[n] O x[n]

Input x[n] = [1, 2, 3, 4 ] , Output y[n] = [ 4, 11, 20, 30, 20, 11, 4 ]

Conclusion:

Hence studied mathematical operation Correlation and measure the degree of


similarity between two signals

EXPT NO: 8 Discrete Fourier Transform

Aim:
The aim of this experiment is to study the magnitude spectrum of the Discrete Fourier Transform
(DFT) signal.

Objective
Take any four-point sequence x[n].
Find DFT X[k].
Compute number of real and complex multiplications and additions required to find X[k].
Plot Magnitude Spectrum.

Theory:

Discrete Fourier Transform (DFT)


The "N" point Discrete Fourier Transform (DFT) of a finite length sequence "x(n)" defined for 0 n
N 1, is given by:

28
Where

Therefore

The magnitude of the "X(k)" i.e. the absolute value against "k" is called the spectrum of "x(n)". The
"N" point DFT "X(k)" of a length "N" sequence "x(n)", n = 0, 1, , N 1, is simply the frequency
samples of its DTFT "X(ej)" evaluated at "N" uniformly spaced frequency points, = k = 2k/N, k
= 0, 1, , N 1, that is,

Experimentation and Result Analysis

1. Find DFT of 4 point sequence


Input x[n] = {1, 2, 3, 4 } Length L= 4
Output X[k] =
2. To find DFT off zero padded signal
Input x[n] = {1, 2, 3, 4, 0, 0, 0, 0 } Length L=8
Output X[k] =

Conclusion:

1. DFT coefficients are defined in frequency domain


2. DFT gives discrete and periodic spectrum in frequency domain.
3. As the length of Signal is increased by zero padding, frequency spacing decreases,
resolution of the spectrum increases and so the quality of spectrum increases.

29
EXPT NO: 9 Fast Fourier Transform

Aim : To implement Fast Fourier Transform (FFT) Algorithms.

Objective
Calculate twiddle factor for eight point FFT.
Find FFT X[k] of sequence x(n).
Compute number of real and complex multiplications and
additions required to find X[k].

Theory:
The time taken to evaluate a DFT on a digital computer depends principally on the number of
multiplications involved, since these are the slowest operations. With the DFT, this number is
directly related to N2 (matrix multiplication of a vector), where N is the length of the transform.
For most problems, N is chosen to be at least 256 in order to get a reasonable approximation for

30
the spectrum of the sequence under consideration hence computational speed becomes a major
consideration. Fast Fourier Transform (FFT) algorithms and they rely on the fact that the standard
DFT involves a lot of redundant calculations:

it is easy to realise that the same values of W N nl are calculated many times as the computation
proceeds. Firstly, the integer product nk repeats for different combinations of K and N secondly,
WN nl is a periodic function with only distinct values. For example, consider N=8 (the FFT is
simplest by far if N is an integral power of 2)

From the above, it can be seen that:

Also, if nk falls outside the range 0-7, we still get one of the above values:

Let us begin by splitting the single summation over N samples into 2 summations,
each with N/2 samples one for _even and the other for odd k_
For example, for N= 8

31
Experimentation and Result Analysis

1. To find FFT of 4 point sequence


Input x[n] = {1, 2, 3, 4 } Length L= 4

Output X[k] =

2. Total no of complex Multiplications =


Total no of Complex additions =
Total no of Real Multiplications =
Total no of Real Additions =

Conclusion:

1. In FFT flow graph input sequence index and output sequence index is in bit reversed order.
2. Computationally FFT is efficient than DFT.

EXPT NO: 10 Circular Convolution

Aim: To perform mathematical operation Circular Convolution using Discrete Fourier Transform
(DFT) and Inverse Discrete Fourier Transform (IDFT).

Problem Definition: find the Circular Convolution of two finite discrete time sequences x(n) and
h(n).
Theory :

Circular Convolution x[n] and h[n] are two finite sequences of length N with DFTs denoted by X[k]
and H[k], respectively. Let us form the product
W[k] = X[k]H[k]

32
First, extend x[n] and h[n] to periodic sequences with period N, x h [n] and [n], respectively. Then,
the periodic convolution of h [n] and x[n] corresponds to multiplication of the corresponding
periodic sequences of Fourier series coefficients

Example:
Consider two constant sequences of length N, x1[n]= x2[n],

33
Experimentation and Result Analysis

1. Take two discrete time signals x[n] = { 1, 2, 3, 4, 5}, h[n] = { 1, 2, 1, 2 }


2. Perform Circular Convolution y(n) = x(n) h(n).
3. Pad zeros to both sequence and make length N=8. Perform Circular Convolution y(n) =
x(n) h(n).

Conclusion:
For two signals , x(n) and h(n) the circular convolution is equal to the inverse discrete Fourier
transform (DFT) of the product of the vectors' DFTs. Knowing the conditions under which linear
and circular convolution are equivalent allows you to use the DFT to efficiently compute linear
convolutions. The linear convolution of an N-point vector, x, and an L-point vector, y, has
length N + L - 1. For the circular convolution of x and y to be equivalent, you must pad the vectors
with zeros to length at least N + L - 1 before you take the DFT. After you invert the product of the
DFTs, retain only the first N + L - 1 element

EXPT NO: 12 Filtering of Long Data Sequence

Aim: To perform filtering of Long Data Sequence using Overlap Add Method

34
Problem Definition: Take long input sequence x[n] and short length
Sequence h[n]. Find y[n] = x[n] * h[n] using FFT based Overlap Add method .

Experimentation and Result Analysis

x[n] = { 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1 , 1, 0, 1, 2, 3, 4, 5 }

h[n] = { 1, 1, 1 } Length M=3

Overlap Add Method :

For N=8, and M=3 Let L = 6

Then, x1[n] = { 1,2,3,4,5,6, 0, 0}


x2[n] = { 1,1,1,1,1,1, 0 ,0 }
x3[n] = { 0, ,1,2,3,4,5,0,0 }

Output y[n]=
x[n] = { 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1 , 1, 0, 1, 2, 3, 4, 5 }
h[n] = { 1, 1, 1 } Length M=3

Conclusion:

Overlap Add Method given linear convolution of long Data sequence with impulse response of
filter coefficient by decomposing input sequence into smaller length Signals.

EXPT NO: 13 Filtering of Long Data Sequence

35
Aim: To perform filtering of Long Data Sequence using
Overlap Save Method

Problem Definition: Take long input sequence x[n] and short length
Sequence h[n]. Find y[n] = x[n] * h[n] using FFT based Overlap Save method

Experimentation and Result Analysis

x[n] = { 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1 , 1, 0, 1, 2, 3, 4, 5 }

h[n] = { 1, 1, 1 } Length M=3

Case-2 : Overlap Save Method


For N=8, and M=3 Let L = 6

Then, x1[n] ={ 0, 0, 1, 2, 3, 4, 5, 6}
x2[n] ={ 5, 6, 1, 1, 1, 1, 1, 1 }
x3[n] ={ 1, 1, 0, 1, 2, 3, 4, 5 }
x4[n] ={ 4, 5, 0, 0, 0, 0, 0, 0 }

Output y[n]= {

Conclusion:

Overlap Save Method given linear convolution of long Data sequence with impulse response of
filter coefficient by decomposing input sequence into smaller length Signals.

EXPT NO: 14 Real Time Signal Processing

36
Aim: Study of DSP Based System for Real time Voice Synthesis Applications
Development using TMS320 Processor.

Problem Definition:

1. Technique to capture the real time audio signal

2. Filter it by convolving input signal with the impulse response of FIR filter using Fast (FFT
based) Overlap Add algorithm OR Fast (FFT based) Overlap Save Algorithm.

3. Conclusion.

Theory:
Introduction
Theoretical base of digital processing techniques for analogue signals was developed in
early '60, for digital simulation of analogue systems and processes.
It is possible to implement DSP algorithms an any computer hardware, for example a PC,
but the rate at which you want to process information determines the optimum hardware
platform for your application. There are four categories of hardware widely used for real time
DSP implementation. These are: general purpose DSP chips, special purpose DSP chips, bit
slice processors and general purpose microprocessors In early '80 was launched first monolithic
digital signal processing microprocessor. This sort of device evolved rapidly, today being
capable to execute over
100MIPS .
The rapid advancement of programmable DSP's lets us to satisfy the needs of very
demanding applications. The more affordable application for DSP's is voice analysis and
synthesis, speed performances allowing execution in real time.
The design of the digital signal processing system must be flexible enough to allow improvements
in the state of the art. For rapid prototyping of applications, many DSP producers offer
developing systems, going from simple systems as Starter Kits, to more complex like Application
Development Boards. The system described is close to the last one, but some facilities make
him useful in simple DSP teaching applications.
System architecture

37
The system described is built around (actually inside) an IBM-PC compatible computer, used as
host and interface with the user. The block diagram of the system is

Figure1. Architecture of the experimental system


Described in figure1. DSP system id designed for applications in various domains of signal
processing. For this purpose it has a high degree of modularity, to facilitate adaptation. The
central element is the accelerator board (coprocessor board) called DSPxx25, around him being
developed several acquisition modules specialized for various domains: audio frequency,
high frequency and video. The DSPxx25 board is equipped with TMS320C25 fixed point
DSP.With a special adapter a TMS320C50 DSP can be used. The block diagram of the board is
presented in figure2.The structure has several particularities. The memory (data and program)
is shared, by multiplexing, between DSP and the host(PC).This feature allows direct access of the
host to memory, accelerating the loading of programs and data and extraction of results.
Therefore, the transfer speed is close to a memory/memory transfer in PC host, considerably
higher than in similar development systems interfaced serial or parallel with the host. To
reduce interference with PC resources, memory from the host side is divided in 'slices' of
8kbytes each. The high order addresses are delivered from an internal special port (page port).
An other port manipulates the control signals of DSP (reset,hold,interrupt request).
For a higher efficiency the board can use one of the interrupt levels of the host .In the
application described in [7] this facility is not used. The performances of the DSP board are the
following: -
DSP type TMS320C25 or TMS320C50

38
Data format fixed point
-Maximum clock frequency 40MHz
-Wait states maximum 2
-Memory 64KWords program/data
-Extensions local DSP bus DSP serial
-Physical format AT type board
Acquisition board ADDA2 is coupled on the local bus of the DSP coprocessor board (as seen in
fig.1.). The board performs b o t h A /D a n d D /A conversion and has the following
performances:
-Acquisition speed 25KSamples/sec
-Resolution (A/D and D/A) 12 bit
-Selectable amplification between 0.5-3
-Polling or interrupt driven acquisition
-Three digital inputs for synchronization purposes
Operation

The system has two modes of operation:


1. Development mode -designated for the set up of programs. In this mode the
user assembles the application from a library of object files, loads the
application in the DSP board and controls the running of program (free-running or
step by step) from the integrated debugger.
2. Autonomous mode- designated for the final application executing. In this
mode the executable program is loaded by the host computer, and runs without any
further intervention. Even the reset of the host computer not affects the coprocessor
board.

Software support

Software tools developed especially for this system are:


1. Symbolic assembler, generating directly an executable code (ASMC25)
2. Intelligent debugger for set-up of application (DEPC25)

39
3. Processing programs library
4. Conversion tools from the Texas Instruments COFF environment
Few features of them.

ASMC25: It is a symbolic assembler for DSP TMS320C25.This processes source files,


written in assembly language an generates object , executable files. The assembler
allows the use of directives to control program counter, memory allocation and the
formatting of generated listing. Assemblers functions are:
-syntactical analysis of source file lines
-display of errors detected in assembling process, together with the line number in
which the error occurs
-object code generation
-listing file generation (as an option)

DEPC25 offers the following facilities:


-internal DSP status visualization
-modification of every internal status element (program counter, accumulator,
internal registers, status words, stack)
-interaction with the DSP resources (program memory, data memory): visualisation,
altering, constant value filling etc.
-unassembling of desired zones in program memory
-loading o f e x e c u t a b l e fi l e s c r e a t e d w i t h t h e ASMC25 assembler

-controlled execution of programs (with or without breakpoints, step by


step or continuous)

DEPC25 recognizes the following commands:


-memory display in hexadecimal format
-unassembled memory content display
-memory move

40
-memory substitution
-input and output to the desired port
-executable program loading in data or program memory
-global and individual activation/deactivation
-free running execution or execution with breakpoints
-execution resuming after an interrupt or breakpoint
-DSP resetting

Applications library
Contains at this time three types of applications:
-general purpose programs as: FFT, FIR or IIR filters, software interface modules
adapted to ADDA2 module
-other useful applications
-application s p e c i fi c p r o g r a m s

Conversion tools
These are designated to create a bridge between this set of developing programs
and the Texas Instruments similar tools (COFF environment). Therefore, we can
develop an application in the COFF environment, converting then the COFF file in
an object file compatible with DEPC25. A typical sequence of application
development is described in figure 2

41
Figure 2. Sequence of sofware development in system

Conclusion
The development system was used in the real time implementation of speech
s y n t h e s i ze r b a s e d on the linear prediction method. This application is using DSP
technology allows real-time synthesis of voice, w i t h high quality features. Compared with
PC only based systems (without DSP) performances are higher then in a PC486DX4 or Pentium
implementation, where is difficult to obtain real-time running with this method (as
experiments revealed).On other side in PC throughput limitations occurs, extension bus being
considerably slower than the CPU.

42
EXPT NO: 15 and 16 : Application of Digital Signal Processing

Aim: To implement any signal processing operation on one dimensional signal.

Rules:

1. Number of students in one Group: min - 2 max -3

2. Decide one DSP application of your choice. Collect the information related to the application
from the published Granted patents.

3. Download the related published research papers from the standard refereed journals and
conferences.

4. Develop a block diagram of the proposed system and flowchart of proposed system
algorithm, Implement it using Scilab/C, C++ language and obtain the appropriate results.

5. Prepare three to four pages report on the mini project in IEEE paper format. Report should
include Abstract, Introduction, Related Theory, Proposed System Design/Algorithm,
Experimentation & Result Analysis, Conclusion, and References.

43
Steps followed during Course Preparation

1 Course plan consists of macro level plan based on:


Module wise Outcome, No of hrs required, Reference Books, requirements:
Assignment, Quiz/HW, /Seminar, Mode of Content Delivery (Theory Class/Lab
Session/Video Lectures etc)
2. Lecture Plan consists of micro level plan based on:
Lecture wise Topic with minute details, Schedule with Date and Time.

Suggestions for Staff :

1. Keep assignments ready and declare them well in advance. (Should be given immediately after
topic is over in theory class)
2 . Conduct Quiz after the topic is over. (Recommended to take one quiz on each CO)
3. Test paper should be set by using Blooms Taxonomy keywords.
4. After test-1, take mid-semester feedback of your own teaching.
5. Arrange extra lectures Or Tutorial class for slow learning students based
On Test-1 result.
6. Arrange subject activity for fast learning students.
7. Arrange one Guest lecture of industry expert/Academic Expert from Research Institute on
Applications of DSP.
8. At least one online Video Lecture has been arranged.
9. If possible, Create Course login on Module. Upload Course Educational Objectives, Course
Outcomes, Syllabus, Course Plan, EXPT list and Assignments on module.

Please Note that the objective of these suggestions is to improve overall Teaching & Learning
process. You may add innovative tools and techniques and adopt different methodology for
effective content delivery.

44

Das könnte Ihnen auch gefallen