Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
53 views

To Design Different Filters On DSK TMS320C6713

- The document describes an experiment to design different filters on a DSK TMS320C6713 device using Code Composer Studio v6.0. - It includes objectives, equipment/tools, and lab tasks to implement an FIR filter with given coefficients, verify the filter in MATLAB, and create coefficients for low pass, high pass, and band stop filters in MATLAB to copy into CCS. - The first task implements an FIR filter on the DSK device and outputs the filtered signal. The second task verifies the filter design in MATLAB by plotting the input and filtered signals. The third task generates coefficients for various filters in MATLAB and copies them into CCS to verify the results.

Uploaded by

Mohammad Arslaan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

To Design Different Filters On DSK TMS320C6713

- The document describes an experiment to design different filters on a DSK TMS320C6713 device using Code Composer Studio v6.0. - It includes objectives, equipment/tools, and lab tasks to implement an FIR filter with given coefficients, verify the filter in MATLAB, and create coefficients for low pass, high pass, and band stop filters in MATLAB to copy into CCS. - The first task implements an FIR filter on the DSK device and outputs the filtered signal. The second task verifies the filter design in MATLAB by plotting the input and filtered signals. The third task generates coefficients for various filters in MATLAB and copies them into CCS to verify the results.

Uploaded by

Mohammad Arslaan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

EXPERIMENT 13

Filter Designing on DSK TMS320C6713


Objectives:
 To design different filters on DSK TMS320C6713

EXPERIMENT 13
Filter Designing on DSK TMS320C6713
Objectives:
 To design different filters on DSK TMS320C6713
Equipment /Tool:
Desktop/ Notebook Computer, DSK TMS320C6713, Code Composer Studio v6.0
Procedure:
Perform all the tasks and provide your code and result in the space below the questions
Lab Tasks

Q1) Implement the FIR filter with the following coefficients in Code Composer Studio v6.0
DSK TMS320C6713
Answer:

#include"stdafx.h"
#include<stdio.h>
#include<iostream>
#include<math.h>
#include<conio.h>
using namespace std;
void main()

{
int n, f = 5, f1 = 50;

float input[85], coeff_matlab[85], Convolution[172];


float t = 0;
cout << "input SIGNAL IS :" << endl;
for (n = 0; n<85; n++) // for loop TO initializing input vector X[n]
{
input[n] = sin(2 * 3.14*f*t) + sin(2 * 3.14*f1*t);
cout << input[n];
cout << ", ";
t = t + 0.01;
}
// for discrete-time convolution.
cout << endl << endl << "Filtered SIGNAL IS :" << endl;
for (n = 0; n<85; n++)
{
Convolution[n] = input[n] * coeff_matlab[n];
cout << Convolution[n];
cout << ", ";
EXPERIMENT 13
Filter Designing on DSK TMS320C6713
Objectives:
 To design different filters on DSK TMS320C6713
Equipment /Tool:
Desktop/ Notebook Computer, DSK TMS320C6713, Code Composer Studio v6.0
Procedure:
Perform all the tasks and provide your code and result in the space below the questions
Lab Tasks

Q1) Implement the FIR filter with the following coefficients in Code Composer Studio v
DSK TMS320C6713
Answer:

#include"stdafx.h"
#include<stdio.h>
#include<iostream>
#include<math.h>
#include<conio.h>
using namespace std;
void main()

{
int n, f = 5, f1 = 50;

float input[85], coeff_matlab[85], Convolution[172];


float t = 0;
cout << "input SIGNAL IS :" << endl;
for (n = 0; n<85; n++) // for loop TO initializing input vector X[n]
{
input[n] = sin(2 * 3.14*f*t) + sin(2 * 3.14*f1*t);
cout << input[n];
cout << ", ";
t = t + 0.01;
}
// for discrete-time convolution.
cout << endl << endl << "Filtered SIGNAL IS :" << endl;
for (n = 0; n<85; n++)
{
Convolution[n] = input[n] * coeff_matlab[n];
cout << Convolution[n];
cout << ", ";
Equipment /Tool:
Desktop/ Notebook Computer, DSK TMS320C6713, Code Composer Studio v6.0
Procedure:
Perform all the tasks and provide your code and result in the space below the questions
Lab Tasks

Q1) Implement the FIR filter with the following coefficients in Code Composer Studio v6.0 and
DSK TMS320C6713
Answer:

#include"stdafx.h"
#include<stdio.h>
#include<iostream>
#include<math.h>
#include<conio.h>
using namespace std;
void main()

{
int n, f = 5, f1 = 50;

float input[85], coeff_matlab[85], Convolution[172];


float t = 0;
cout << "input SIGNAL IS :" << endl;
for (n = 0; n<85; n++) // for loop TO initializing input vector X[n]
{
input[n] = sin(2 * 3.14*f*t) + sin(2 * 3.14*f1*t);
cout << input[n];
cout << ", ";
t = t + 0.01;
}
// for discrete-time convolution.
cout << endl << endl << "Filtered SIGNAL IS :" << endl;
for (n = 0; n<85; n++)
{
Convolution[n] = input[n] * coeff_matlab[n];
cout << Convolution[n];
cout << ", ";
}

_getch();

}
Q2) Verify the FIR filter designed in Q1 in MATLAB R2018a
Answer:
50Hz highest frequency in given signal so, and are designing filter with fs of 100Hz.
Code:
clc
close all
t=0:1:length(Num);
f1= 5;
f2=50;
Input_signal=sin(2*pi*f1*t)+sin(2*pi*f2*t);
figure(1)% For using different plots
plot(t,Input_signal)% Plotting given signal
title('Input Signal')
legend('Input Signal')
xlabel('Time(sec)')% Labels
ylabel('Amplitude')
figure(2)% For using different plots
plot(Num)% Plotting filter data
title('Imported Filtered Data Signal')
legend('Imported Filtered Signal')
xlabel('Time(sec)')% Labels
ylabel('Amplitude')
output=filter(Num,1,Input_signal);
figure(3)% For using different plots
plot(t,Input_signal,t,output)% Plotting both signals
title('Input Signal Vs Filtered Signal')
legend('Input Signal','Filtered Signal')
xlabel('Time(sec)')% Labels
ylabel('Amplitude')
grid

Output: -
Question 3: Create coefficients for low pass, High pass and Band stop filter in MATLAB and
copy the coefficient of the filter into CCS and verify the result
Answer:
50Hz highest frequency in given signal so, and are designing filter with fs of 100Hz.
Output: -
LPF:
Exported MATLAB Coefficient for LPF:
HPF:

Exported MATLAB Coefficient for HPF:


BPF:

Exported MATLAB Coefficient for BPF:


AAAAAAAAAAAAAAAAAAASKNDKNDFJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ

You might also like