0% found this document useful (0 votes)
17 views10 pages

DSP 2

1) This document describes implementing a FIR filter on a DSP chip to filter signals. 2) First, the input and output signals are visualized by passing an audio signal through the DSP chip and recovering the output. Then, a MATLAB script is used to generate a test signal consisting of two sine waves to filter. 3) The FIR filter coefficients are designed using MATLAB's FDA tool. The coefficients are exported and implemented on the DSP chip. 4) Testing shows the DSP filter response matches the theoretical response from MATLAB, validating the filter implementation on the DSP chip.

Uploaded by

haroun kabili
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)
17 views10 pages

DSP 2

1) This document describes implementing a FIR filter on a DSP chip to filter signals. 2) First, the input and output signals are visualized by passing an audio signal through the DSP chip and recovering the output. Then, a MATLAB script is used to generate a test signal consisting of two sine waves to filter. 3) The FIR filter coefficients are designed using MATLAB's FDA tool. The coefficients are exported and implemented on the DSP chip. 4) Testing shows the DSP filter response matches the theoretical response from MATLAB, validating the filter implementation on the DSP chip.

Uploaded by

haroun kabili
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/ 10

République algérienne démocratique et

populaire
POPULAIRE ET DEMOCRATIQUE
ALGERIENNE REPUBLIQUE
Le minister de l’Enseignement superior
et de la Discussion scientifique

SCIENTIFIQUE RECHERCHE LA DE ET
SUPERIEUR L’ENSEIGNEMENT DE MINISTERE

TP 04
IMPLEMENTATION OF AN FIR FILTER ON A DSP
FLOATING POINT (TMS320C6711)
: Réalisé par

 Laggoun Hocin

 Belayali Haroun

 Benachour Chouaib

2022/2023
Introduction:
In signal processing, a digital filter is a system that performs mathematical
operations on a sampled, discrete-time signal to reduce or enhance
certain aspects of that signal. This is in contrast to the other major type of
electronic filter, the analog filter, which is typically an electronic circuit
operating on continuous-time analog signals. In this Lab we are going to
understand CCS, then try to type code that will help us communicate with
DSK. In this experiment we have been used TMS320C6711 DSK. Secondly,
we made a digital filter like FIR, IIR filter. In this Practical work we can deal
and code with MATLAB, that will help us with designing a digital filter.
Implementation
1- Project 1:
in this part we make a way for the visualization of the input and output
signals where it consists of attacking the card with a voice signal through
the ‘MIC IN’ input and recovering the output using an earphone plugged
into the ‘HEADPHONE’ output, After that in another way using a GBF, we
attack the ‘LINE IN’ input with a sinusoidal signal whose peak-to-peak
voltage must not exceed 6 V, the output will be recovered using the
oscilloscope by connecting it to the ‘LINE OUT’ output of the card DSK.
First we've to follow this steps to verify (test) that this filter and ensure its
proper functioning:
 The creation of a project named "instr".pjt " in CCS
 to get there, it is necessary to attach to the main program in C
language "filtre_fir.c", the following files (the usefulness of which is
already mentioned in the PW1), c6713dskinit.c, Vectors_intr.asm,
c6713dsk.cmd, rts6700.lib, dsk6713bsl.lib and csl6713.lib.
 Build the project (Project Rebuild All) which generates the
executable file 'filtre_fir.out’ 4-finally load this executable file on the
DSP (File Load).
 The following images illuminated the added files(include-libraries-
source) fig1.

Figure 1: include library and source files (CCS)


Secondly, creation a MATLAB script to generate a sum of two sinusoidal
signals, the first sinusoid has a frequency of 1 kHz and the second of 2 kHz
(the signal that will be filtered) (see script in the appendix). as Figure 2
shows, we can see this signal (before filtering) using an oscilloscope
(f1=2khz; f2=8khz):
After the next step we always stay in Matlab to use 'FDA tool', We follow
the following steps :
1. Open Matlab
2. Launch FDA Tool by typing the fdatool command
The features that we are going to use a lot are:
 the specification of the characteristics of our filter (icon at the
bottom left)
 The specification of the data format used to encode the coefficients
 Here is the view of the frequency response of our filter in module:
Analysis > Magnitude Response
 Here is the general information about the generate filter: Analysis >
Filter Information
 All the coefficients of the filter: Analysis > Coefficient filter
 Allows the export of the coefficients in the form of a header file.h :
Target > Generate C Header
Step by step:
The output of the card (signal in blue) is a frequency signal of 1.02 kHz,
hence the validity of the expected result. Indeed, the filter a allows the
first signal (of frequency of 1 kHz) to pass and it rejects the second (of 2
kHz). In order to ensure the validity of the response of the filter
implemented on the DSP, we made a comparison between its response
and that obtained theoretically with the ‘fdatool’ tool from MATLAB.
Indeed, we have attacked the card by a sinusoidal signal from a GBF whose
frequency varies around the cut-off frequency (5000 – 1000 Hz) ordre 6,
the results obtained are present in the table and the following figure

F(hz) 50 100 150 200 250 300 350 400 450 500
Ve(mv 1400 140 140 140 140 140 140 140 140 1400
) 0 0 0 0 0 0 0 0
Vs(mv) 600 600 600 600 600 600 600 600 600 600
0.43 0.4 0.4 0.4 0.4 0.43 0.43 0.43 0.4 0.43
Vs/ve
3 3 3 3 3

550 600 650 700 750 800 850 900 950 100
F(hz)
0
Ve(mv 140 140 140 140 140 140 140 140 140 140
) 0 0 0 0 0 0 0 0 0 0
Vs(mv) 600 600 600 600 600 600 600 500 500 400
Vs/ve 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.36 0.36 0.29

F(hz) 1050 1200 1500 1600 1800 2000 2600 3500 3800 4000
Ve(mv
) 1400 1400 1400 1400 1400 1400 1400 1400 1400 1400
Vs(mv) 375 200 60 40 10 5 0 50 120 170
Vs/ve 0.27 0.14 0.04 0.03 0.01 0.00 0.00 0.04 0.09 0.12
Table 3.1 - the variation of the Vs/ Ve ratio as a function of the frequency

Figure 3: response of the cut-off frequency IIR filter 200 Hz (GBF)


of the GBF With, f=frequency, Ve= the input voltage and Vs= the output
voltage.
The response of the filter that generated the coefficients of the impulse
response is as follows, We note that there is a resemblance between the
theoretical and practical response of the implemented filter on the DSP, at
the level of the bandwidth and the transition band. the generation of the
sum of two sinusoidal signals of frequencies 1kHz and 2kHz.

F1=1000;
F2=2000;
fe=8000;
N=2^16;
temps=(0:N-1)/fe;
x1=sin(2*pi*F1*temps);
x2=sin(2*pi*F2*temps);
sound(x1+x2);
plot(x1,x2);

Conclusion:
At the end of this experiment, we have done our practical work
successfully. The work has allowed us to expand our skills in the field of
digital signal processing, as well as we recommend implementing more

Figure 4: the response of the filtered designated by 'fdatool’ in MATLAB


complex algorithms on the DSP, for example, the implementation of RIF
Filters like this work we apply this for a low-pass RIF filter then we see how
to eliminate the noise of a signal To conclude, master or have some basics
on the use of DSP and digital signal processing in all possible applications.
To conclude, mastering or having basics on the use of DSP and digital
signal processing becomes essential given the number of areas concerned
with.

You might also like