0% found this document useful (0 votes)
553 views6 pages

Linear Convolution

This document describes an experiment to verify linear convolution of an input and impulse sequence theoretically and using MATLAB software and a DSP processor. The experiment involves writing MATLAB code to perform linear convolution and display the input, impulse, and output sequences. It also involves writing C code to implement linear convolution and running it on a TMS320C6711 DSP processor using Code Composer Studio. The linear convolution is performed and output is observed using both methods, verifying the results.

Uploaded by

KODIAN SURYA ECE
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)
553 views6 pages

Linear Convolution

This document describes an experiment to verify linear convolution of an input and impulse sequence theoretically and using MATLAB software and a DSP processor. The experiment involves writing MATLAB code to perform linear convolution and display the input, impulse, and output sequences. It also involves writing C code to implement linear convolution and running it on a TMS320C6711 DSP processor using Code Composer Studio. The linear convolution is performed and output is observed using both methods, verifying the results.

Uploaded by

KODIAN SURYA ECE
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/ 6

Exp.No:1 DSP LAB MANUAL IV B.TECH.

I Semester (2019-2020)

PART-1
(Signals)

Linear Convolution
Aim: To verify the linear convolution of input and impulse sequence theoretically and verify the
result on MATLAB software and DSP Processor using Code Composer Studio.

Apparatus:
1. Personal Computer
2. MATLAB Software
3. TMS320C6711 Processor
4. Code Composer Studio
5. Connecting cables

a). MATLAB Program:


tic;
clc;
clear all;
close all;
x=input('enter the input sequence');
h=input('enter the impulse sequene');
y=conv(x,h);
n1=length(x);
n2=length(h);
n=length(y);

disp('press enter for the input sequence');


k=0:1:n1-1;
subplot(311);
stem(k,x,'filled');
title ('input sequence','FontSize',14);
xlabel('samples');
ylabel('amplitude');
gridon;

disp('press enter for the impulse sequence');


k=0:1:n2-1;
subplot(312);
stem(k,h,'filled');
title ('impulse sequence - ','FontSize',14);
xlabel('samples');
ylabel('amplitude');
gridon;

disp('press enter for the impulse sequence');


k=0:1:n-1;
subplot(313);
stem(k,y,'filled');
title ('output sequence -' ,'FontSize',14);

Department of ECE, PACEITS, Ongole. Page 1


Exp.No:1 DSP LAB MANUAL IV B.TECH. I Semester (2019-2020)

disp(y);
xlabel('samples');
ylabel('amplitude');
grid on;
toc;

Procedure on MATLAB software:

1. Open MATLAB Software by double clicking the MATLAB desktop icon.


2. Open new M-file
3. Type the program
4. Save in current directory
5. Compile and Run the program
6. For the output see command window\ Figure window

Linear Convolution output:

Department of ECE, PACEITS, Ongole. Page 2


Exp.No:1 DSP LAB MANUAL IV B.TECH. I Semester (2019-2020)

Linear Convolution Workspace:

b). Linear Convolution C- Program:


#include<stdio.h>
#include<math.h>
int y[20];
int x[15];
main()
{
int m=6;
int n=6;
int i=0,j;
int x[15]={1,2,3,4,5,6,0,0,0,0,0,0};
int h[15]={1,2,3,4,5,6,0,0,0,0,0,0};
for(i=0;i<m+n-1;i++)
{
y[i]=0;
for(j=0;j<=i;j++)
y[i]+=x[j]*h[i-j];
}
printf("linear convolution \n");
for(i=0;i<m+n-1;i++)
printf("%d\n",y[i]);
}

Department of ECE, PACEITS, Ongole. Page 3


Exp.No:1 DSP LAB MANUAL IV B.TECH. I Semester (2019-2020)

Procedure on Code Composer Studio :

1. Open code composer studio, make sure the DSP kit is turned on.
2. Use the Debug→ Connect menu option to open a debug connection to the
DSK board.
3. Start a new project using
Project→ New (File Name .pjt, Eg: linear.pjt)

4. Create a Source file


File →New→ Type the code (Save & give file name, Eg: linear.c).

5. Add Source files to Project


Project→ Add files to Project→ linear.c

6. Add Library file: rts6700.lib (Path: c:CCStudio_v2.1:\c6000\cgtools\lib\


rts6700.lib)
7. Add the linker command file “hello.cmd”.
Project→ Add files to Project→ hello.cmd.

CMD file- Which is common for all non real time programs.

(Path: c: CCStudio_v2.1:\ tutorial\dsk6711\hello1\hello.cmd)

Note: Select Linker Command file (*.cmd) in Type of files

8. To Compile: Project→ Build


Which will create the final .out executable file. (Eg.linear.out).

9. Load the program to DSK: File→ Load program →linear.out.


10. To Execute project: Debug → Run.
11. We can observe the output graphically.

Department of ECE, PACEITS, Ongole. Page 4


Exp.No:1 DSP LAB MANUAL IV B.TECH. I Semester (2019-2020)

Linear Convolution output using TMS320C6711 Processor:

Graph Property dialog box for linear convolution

Department of ECE, PACEITS, Ongole. Page 5


Exp.No:1 DSP LAB MANUAL IV B.TECH. I Semester (2019-2020)

Result :
Hence, the Linear Convolution of input and impulse sequence are verified theoretically and
practically on MATLAB software and TMS320C6711 using Code Composer Studio.

Department of ECE, PACEITS, Ongole. Page 6

You might also like