Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword or section
Like this
0 of .
Results for:
No results containing your search query
P. 1
DSP Labmanual

DSP Labmanual

Ratings: (0)|Views: 940|Likes:
Published by Amit Sangale

More info:

Published by: Amit Sangale on Jan 31, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC or read online from Scribd
See more
See less


Sr. No. Title of Assignment1.Write a C program to generate samples of sine, square, exponential & randomsignals at specified sampling frequency and signal parameters.2.Find the output of a given system for given input sequence using linear convolution.3.Find the output of a given system described by given difference equation & initialconditions for given input sequence.4.Find circular convolution of a given two sequences5.Write a program to accept pole zero location to generate pole zero plot, all possibleROC’s.6.Write a program to plot the magnitude & phase response of a given system.7.Find N pt DFT/IDFT of given complex sequence x (n)/x (k).8.Compute circular convolution using DFT/IDFT.9.Implement 8 pt Radix-2 DIT FFT algorithm10.Find DFT using Goertzel algorithm.11.Find the Fourier Transform of various windows functions; plot the magnitude & phase functions.12.Design a DT IIR Butterworth filter for given specifications using bilinear transformation.13Study of ADSP 21xx Series DSP Processor 
Assignment No.1
Title of Assignment:
Write a C program to generate samples of sine, cos, square, exponential &Random signals as specified sampling frequency & signal parameters.
Relevant Theory / Literature Survey
Signal: A signal is the entity that carries information. Signal can be electric or non-electric. Electric signal carry information with electric current. Non-electric signals are
sound waves that carry information with air pressure. Standard signals are1.Sine wave2.Cos wave3.Exponential4.Random5.Square Sampling of Analog signal:Sampling Theorem states that a continuous time signal can be completely representedin it’s samples and recovered back if Fs >=2W whereFs: Sampling frequencyW: maximum frequency present in the signal.There are many ways to sample analog signal. we are concerned only about periodicand uniform sampling.X(n) = Xa ( nT ) -
<n <
Where X(n) is the discrete time signal obtained by taking samples of the analog signalXa(t) at every T seconds. The time interval T between successive samples is called thesampling period or sampling interval & it’s reciprocal 1/T = Fs is called as samplingfrequency (Hz).Periodic sampling establishes a relationship between the time variable t & n of continuous time & discrete time signals respectively. These variables are linearly relatedthrough the sampling period T or equivalently through the sampling rate Fs=1/T ast=nT=n/Fs. -------1As consequence of above equation there exists a relationship between the frequencyvariable F for analog signal & the frequency f for discrete time signal. To establish thisrelationship consider an analog sinusoidal signal of the formXa(t)=Acos(2
) ---------2Which when sampled periodically at rete Fs=1/T samples per sec, soXa(nT)=x(n)= Acos(2
) ------3Comparing equation 3 & 1 we note that the frequency variable F & f are linearlyrelated asf=F/Fs -------4Example:
Consider the analog signalXa(t)=3cos 100
ta)Determine the minimum sampling rate required to avoid aliasing. b)Suppose that the signal is sampled at rate Fs = 200 Hz what is the discrete timesignal obtained after sampling.c)Suppose that the signal is sampled at rate Fs = 75 Hz what is the discrete timesignal obtained after sampling.d)What is the frequency 0 < F < Fs/2 of a sinusoidal that yields samples identical tothose obtained in part c
a.the frequency of the signal is F = 50 Hz hence the minimum sampling raterequired to avoid aliasing is Fs = 100 Hz. b.If the signal is sampled at rate Fs = 200 Hz what is the discrete time signalisX(n) = 3 cos 100
n/200 = 3 cos
n/2c. If the signal is sampled at rate Fs = 75 Hz what is the discrete time signalisX(n) = 3 cos 100
n/75 = 3 cos 4
n/3= 3 cos (2
/3) = 3 cos 2
n/3d.for the sampling rate of Fs = 75 Hz we have F = f*Fs= 75 the frequency of sinusoidal in part c is f=1/3 hence F= 25 Hzclearly the sinusoidal signaly
(t) = 3cos 2
f * t3cos 50
t sampled at fs = 75 Hz yields identical samples hence F = 50Hz is an aliasof F= 25 Hz for the sampling rate Fs = 75 Hz.
Design Analysis / Implementation Logic:
Algorithm:1. Display the menu on screen & prompt the user to enter which wave to be displayed.2. To display sine wave use the amplitude, frequency, sampling frequency & the shiftgiven by the user & using formula Amp*sin(2
ft) draw the sampled sin wave.3. To display shifted wave use Amp*sin(2
) where
is shift value.4. Similarly for cos wave repeat step 2 only formula will be Amp*cos(2
ft) & draw thecos wave.

Activity (3)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->