Home >Documents >Bcet Dsp Lab Manual

Bcet Dsp Lab Manual

Date post:01-Dec-2014
Category:
View:169 times
Download:4 times
Share this document with a friend
Transcript:

BANGALORE COLLEGE OF ENGINEERING AND TECHNOLOGYChandapur, Bangalore-560081. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE This is to certify that DIGITAL SIGNAL PROCESSING LABORATORY record work carried out by bearing USN NO... in v semester for partial fulfillment of the requirements for the award of degree of Bachelor of engineering in Electronics and communication prescribed by Visvesvaraya Technological University, Belgaum,for the academic year 2011-2012.

STAFF INCHARGE Mr. Sathish Kumar B P

HEAD OF THE DEPARTMENT Mrs. Chandrakala. S

INTERNAL EXAMINER

EXTERNAL EXAMINER

1

INDEX: PART-AEXP NO 1. 2. 3. 4. 5. DATE 29-8-2011 29-8-2011 8-9-2011 8-9-2011 19-9-2011 NAME OF THE EXPERIMENTS PAGE NO REMARKS

Verification of sampling theorem Impulse response of a given system Linear convolution of two given sequence Circular convolution of two given sequence Autocorrelation of a given sequence and verification of its properties Crosscorrelation of a given sequence and verification of its properties Solving a given difference equation Computation of n point DFT of a given sequence and to plot magnitude & phase spectrum Linear convolution of two given sequence using DFT & IDFT Circular convolution of two given sequence using DFT & IDFT Design & implementation of FIR filter to meet given specifications Design & implementation of IIR filter to meet given specifications

8-10 11-14 15-17 18-20 21-24 25-26 27-30 31-33 34-35 34-35 36-40 41-45

6.

19-9-2011

7. 8.

3-10-2011 3-10-2011

9. 10.

10-10-2011 10-10-2011

11.

17-10-2011

12.

17-10-2011

2

INDEX: PART-BEXP NO 1. DATE 24-10-2011 NAME OF THE EXPERIMENTS PAGE NO REMARKS

2.

31-10-2011

3.

2-11-2011

4.

9-11-2011

Linear convolution of two given sequence Circular convolution of two given sequence Computation of n point DFT of a given sequence Impulse response of a given system

57-58

59-60

61-62 63-64

3

PART-A DSP EXPERIMENTS USING MATLAB

4

Introduction to MATLAB:MATLAB is an interactive programming environment that facilities dealing with matrix computation, numerical analysis and graphics. MATLAB stands for matrix laboratory and was initially intended to provide interactive access to the LINPACK and EISPACK packages. These packages were written in FORTRAN and consist of some sophisticated code for matrix problems. With MATLAB it became possible to experiment interactively with these packages without having to write lengthy FORTRAN code (or C code nowadays). Other features of MATLAB are its extensive help facilities and the ease with which users can make their own library of functions.

MATLAB basics:

Figure 1 To begin a MATLAB from MSWINDOWS you can double-click the MATLAB icon. If you are new to MATLAB you might take their advice and type >> intro The >> should not be typed, it is MATLABs way of saying that it is ready for you to enter a command, like intro and this area is called MATLAB Prompt (Figure1) Typing >> demo will bring up a window from which various demos can be executed, but it is not the way to learn MATLAB. To quit the MATLAB session type >> quit or >> exit So enter MATLAB again and type Example 1 >> x=2 >> y=3; >> z=x*y 5

After entering the first line, MATLAB immediately responds that x is indeed equal to 2. The second line produces nothing on screen although it does assign the value 3 to the variable y. The semicolumn ; tells MATLAB to execute the command silently. The third line has no ; and MATLAB responds with z=6

Figure 2: Some Simple Commands Example 2: Typing the following three lines will produce a plot. >> x=[0 1 2 3 4 5]; >> y=sin(x); >> plot(x,y);

Figure 3: Plotting the Output 6

We can use MATLABs on-line help whenever you encounter something unfamiliar. >> help sin >> help plot

Managing VariablesIn a long MATLAB session it may be hard to remember the names and classes of all the variables you have defined. You can type whos to see a summary of the names and types of your currently defined variables. To clear all defined variables, type clear or clear all. You can also type, for example, clear x y to clear only x and y. We can observe that the Workspace browser presents a graphical alternative to whos. You can activate it by clicking on the Workspace tab, by typing workspace at the command prompt, or through the View itemon the menu bar.

Figure 4: Workshop Browser

Errors in InputIf you make an error in an input line, MATLAB will beep and print an error message. For example, heres what happens when you try to evaluate 3u2: >> 3u2 ??? 3u^2 | Error: Missing operator, comma, or semicolon. The error is a missing multiplication operator *. The correct input would be 3*u2. Note that MATLAB places a marker (a vertical line segment) at the place where it thinks the error might be; however, the actual error may have occurred earlier or later in the expression. Note: Missing multiplication operators and parentheses are among the most common errors. 7

EXPERIMENT NO 1: Verification of sampling theorem.Aim: To verify Sampling theorem for a signal of given frequency. Theory: Sampling is a process of converting a continuous time signal (analog signal) x(t) into a discrete time signal x[n], which is represented as a sequence of numbers. (A/D converter) Converting back x[n] into analog (resulting in x (t ) ) is the process of reconstruction. (D/A converter) Techniques for reconstruction-(i) ZOH (zero order hold) interpolation results in a staircase waveform, is implemented by MATLAB plotting function stairs(n,x), (ii) FOH (first order hold) where the adjacent samples are joined by straight lines is implemented by MATLAB plotting function plot(n,x),(iii) spline interpolation, etc. For x (t ) to be exactly the same as x(t), sampling theorem in the generation of x(n) from x(t) is used. The sampling frequency fs determines the spacing between samples. Aliasing-A high frequency signal is converted to a lower frequency, results due to under sampling. Though it is undesirable in ADCs, it finds practical applications in stroboscope and sampling oscilloscopes. Algorithm: 1. Input the desired frequency fd (for which sampling theorem is to be verified). 2. Generate an analog signal xt of frequency fd for comparison. 3. Generate oversampled, nyquist & under sampled discrete time signals. 4. Plot the waveforms and hence prove sampling theorem. MATLAB Implementation: Step 1: MATLAB can generate only discrete time signals. For an approximate analog signal xt, choose the spacing between the samples to be very small (0), say 50s = 0.00005. Next choose the time duration, say xt exists for 0.05seconds.(tfinal in program) (for low frequency say

of 90/90
BANGALORE COLLEGE OF ENGINEERING AND TECHNOLOGY Chandapur, Bangalore-560081. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING CERTIFICATE This is to certify that DIGITAL SIGNAL PROCESSING LABORATORY record work carried out by ……………………………………………bearing USN NO……………………………...…… in v semester for partial fulfillment of the requirements for the award of degree of Bachelor of engineering in Electronics and communication prescribed by Visvesvaraya Technological University, Belgaum,for the academic year 2011-2012. STAFF INCHARGE HEAD OF THE DEPARTMENT Mr. Sathish Kumar B P Mrs. Chandrakala. S INTERNAL EXAMINER EXTERNAL EXAMINER 1
Embed Size (px)
Recommended