Design and Implementation of Digital IIR & FIR Filters On DSK6713 Using CC STUDIOV6.1 Platform

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

International Journal for Research in Engineering Application & Management (IJREAM)

ISSN : 2454-9150 Vol-04, Issue-05, Aug 2018

Design and Implementation of Digital IIR & FIR


Filters on DSK6713 using CC STUDIOV6.1 Platform
Raghu K, Asst Prof, REVA University, Bengaluru, India, [email protected]
Mamatha R, Student, REVA University, Bengaluru, India, [email protected]
Maneesha M J, Student, REVA University, Bengaluru, India, [email protected]
Meghana N, Student, REVA University, Bengaluru, India, [email protected]
Monika R, Student, REVA University, Bengaluru, India, [email protected]

Abstract: A digital filter plays a very important role in communication over analog filter. Digital filters are easy to
design, less complex, flexible and portable compared to analog filters. In this paper, the procedure to implement any
real-time projects on DSK6713 is explained. DSK6713 is widely used in the field of industry and educational
institutions. This paper represents the basic introduction of DSK6713 processor and quick procedural steps for code
composer studiov6.1. The CCStudiov6.1 IDE tool is used for coding and implementing code on DSK6713. This paper
explains the detail procedural steps used for design and implementation of IIR and FIR digital band-pass filters.

Keywords — CCStudiov6.1, DSK6713, TMS320C6713, IIR filters, FIR filters, Band pass filter.

etc. Any filter characteristics can be easily determined by


I. INTRODUCTION frequency response, which in turn depends on filter
The digital filters are highly accurate, linear phase response coefficients. If the coefficients of the equation are
(FIR Filter), adaptive filtering possible, easy to simulate properly selected then frequency selective filters can be
and design, ADC and DAC conversions can be done [1]. designed that will pass particular frequency components
The analog filters are less accurate, nonlinear phase, and rest all will be attenuated [2].
difficult to design and simulate, no ADC and DAC The floating-point DSP processor TMS320C6713 is present
conversions, adaptive filtering is a difficult task. A digital onboard a Digital Starter Kit called DSK6713, which
filter can be implemented using a DSP processor. An permits high speed debugging of code with Code Composer
analog filter adds component based thermal noise. Studiov6.1. DSK6713 is a low-cost development platform
Programmable coefficients are possible in digital filter and that allows the students and researchers to evaluate and
not in analog filters. Higher order digital filters can be develop DSP applications for TIC67xx family. For a
feasibly designed compared to analog filters. TMS320C6713 DSP processor, DSK6713 is the hardware
A Finite Impulse Response (FIR) filter is characterized by reference design. To reduce time to market and to make
an impulse response which is finite in time domain. The hardware development easier DSK contains many logic
FIR filter response is computed by the present and the equations, schematics and application notes. DSK6713
previous vales of the input signals. This type of filters is contains onboard USB Interface, SDRAM, ROM, analog
called non-recursive filers. FIR filter transfer function interface circuit (AIC CODEC) for ADC and DAC,
contains only zeros and hence there is a less probability of embedded JTAG emulation support. It also includes
the filter becoming unstable. An Infinite Impulse Response stereo codec AIC23, which is software controlled via TI
(IIR) filter is characterized by an impulse response which is McBSP –Compatible Multiprotocol serial post. Audio
infinite in time domain. The IIR filter response is input/output signal is via McBSP compatible AI [2].
computed by the present and the previous vales of the input DSP industry’s first fully developed IDE tool is Code
and output signals. This type of filters is called recursive Composer Studio, which has DSP specific libraries and
filers. IIR filter transfer function contains both zeros and functions that make the debugging and execution faster.
poles, hence there is a more probability of the filter With a user friendly environment CCS enables the users to
becoming unstable if not designed properly. FIR filter has create a project, write C/ assembly code, build, compile,
many advantages as compared to IIR filters such as: finite debug and run the project. Many other additional features
impulse response, easy optimization, linear phase, better include injection of I/O from the file, graphical user
stability etc. Different fields where FIR filters are interface, debugging with multi-processor, testing and
applicable are Image processing, audio signal processing customization through a C scripting language etc.

316 | IJREAMV04I0541069 DOI : 10.18231/2454-9150.2018.0632 © 2018, IJREAM All Rights Reserved.


International Journal for Research in Engineering Application & Management (IJREAM)
ISSN : 2454-9150 Vol-04, Issue-05, Aug 2018

CC Studio provides many chip support library files for


linking the basic operations of on-chip CODEC, DIP In DSP operations the most extensively used operation is
switches, LED lights and many other components of MAC (Multiply and Accumulate) [4]. This operation is
DSK6713. inbuilt and can be performed as a single instruction using
6713 DSK. The AIC23 codec chip is usually a 2-channel
II. TMS320C6713 DIGITAL STARTER KIT audio input output device.

Fig 1 shows the block diagram of 6713 Digital Starter kit. A. Features of DSP TMS320C6713
This contains 32-bit EMIF for the SDRAM and daughter  is a floating point DSP with high performance
card expansion interface. The AIC23 CODEC is used for characteristic.
transmitting and receiving signals. This audio input/output  In one cycle eight 32-bit instructions are executed.
can be done through a 3.5mm audio jack that connects to  Data Word is of size 32/64 bit
microphone in, line in, line out and headphone output.  Best suited for audio applications and rich
McBSP0 is used for codec control interface and McBSP1 is peripheral set.
used for data transmission [9].  Very long and advanced instruction word
 C/C++ compiler with highest optimization.
 All functional units are independent:
 2 fixed point ALUs
 4 floating and fixed point ALUs
 2 floating- and fixed-point multipliers
 16-bit HPI
 2 McBSPs (Audio serial ports)
 Flexible Phase-Locked-Loop (PLL) Based Clock
Generator Module.
 IEEE-1149.1

Fig 1: Block diagram of DSK6713 III. CODE COMPOSER STUDIOV6.1


The procedural steps for working with Code Composer
Either microphone-in or line-in can be connected to codec
Studiov6.1 are explained in this section. These steps can be
for input signal and either headphone-out or line-out can be
used for both non-real time and real time programming
connected for the purpose of output. The line-out is a fixed
applications [6].
gain and the headphone is an adjustable gain connector. To
provide a user with interactive feedback the DSK provides Step1: In the current workspace, create a new project File -
with 4 DIP switches and 4 LEDs. The board is powered on > New ->New CC S project.
by an external 5V power supply. The voltage regulator Step2: Give the project name as required. As it is a filter
onboard provides 1.26V as DSP core voltage, 3.3V analog design any filter name can be given. Fill the other details as
and 3.3V digital voltages [3]. The DSK can be programmed shown in the Fig 3.
and communicated by CC studio through an embedded Then click -> Finish. A new CCS project will be created
JTAG emulator with a USB host interface. Fig 2 shown is a with the given name in the current workspace.
physical layout of DSK6713. Spectrum Digital designs and
manufactures the board, where as the C6713, which
performs core DSP related operations is from Texas
Instruments [8].

Fig 2: DSK6713 Physical layout Fig 3: Create a new CCS project

317 | IJREAMV04I0541069 DOI : 10.18231/2454-9150.2018.0632 © 2018, IJREAM All Rights Reserved.


International Journal for Research in Engineering Application & Management (IJREAM)
ISSN : 2454-9150 Vol-04, Issue-05, Aug 2018

Step3: Select project properties window. Click on the


project name. - > Project -> Properties.

Fig 6: CCS window


Step10: Go to Project Build project. (after build project,
***Build Finished*** message will come in the console
Fig 4: CCS Project properties window
window.
Step4: Select the Target processor version. Go to Build and
Step11: Run Debug.
C6000 Compiler and Processor option. Enter 6700 in the
Step12: After the program is loaded successfully, click
blank space.
RunTerminate the program
Step5: Setting optimization level=1: Go to Build and
Step13: After terminating the program hear the output from
C6000 Compiler and Optimization and set the value to 1.
MICOUT (Headphone or speakers or line out is connected)
Step6: To select Include Options: Go to Build and C6000
Compiler and Include Options [5]. The window shows two IV. DESIGNING THE FILTER
blank spaces, to which the proper paths need to be added.
The first path is added by the CCS, which points to the core A. IIR filter design specifications:
library functions. The second path points to the board and Sampling frequency = 48 KHz
chip support libraries. Stopband frequency1 = 500 Hz
These include files and chip support library files are as Passband frequency1 = 1 KHz
shown in Fig 5. Passband frequency2 = 3 KHz
Stopband frequency2 = 3.8 KHz

The coefficients of IIR filter are designed from fdatool of


MATLAB which generates the filter coefficients. The
coefficients obtained from fdatool is stored in a file for eg
“bpiirfilter.cof”. Fig 7 shows the fdatool window of
MATLAB used to design IIR filter for given specifications.

Fig 5: CCS Include settings

Step7: Select the predefined symbols. Go to Build - C6000


Compiler - advanced options - Predefined Symbols. Enter
CHIP_6713 to the pre-defined name blank space.
Step8: Linking the paths: Go to Properties – Build - C6000
Linker - File Search Path. Add “libc.a”, “csl6713.lib”, Fig 7: IIR filter magnitude and phase response
“dsk6713bsl.lib” to the top panel.
Step9: Now type the program in the source file and save it.

318 | IJREAMV04I0541069 DOI : 10.18231/2454-9150.2018.0632 © 2018, IJREAM All Rights Reserved.


International Journal for Research in Engineering Application & Management (IJREAM)
ISSN : 2454-9150 Vol-04, Issue-05, Aug 2018

supporting files. Fig 11 shows the real-time implementation


of the work.

Fig 8: IIR filter pole-zero plot


Fig 11: Real time implementation picture
B. FIR filter design specifications:
Sampling frequency = 48 KHz The audio input is given to LINE_IN and filtered output
Stopband frequency1 = 500 Hz is taken from LINE_OUT. Either a sine wave from the
Passband frequency1 = 1 KHz signal generator or an audio input can be given as input
Passband frequency2 = 3 KHz signal and the output can be seen on a CRO for observing
Stopband frequency2 = 3.8 KHz the amplitude levels in passband and stopband regions of
the filter by varying the input signal frequencies or it can be
The coefficients of FIR filter for these above heard through a pair of speakers.
specifications obtained from fdatool is stored in the file for
eg “bpfirfilter.cof”. Fig 9 and 10 shows the fdatool screen VI. APPLICATIONS
for designing of FIR filter along with frequency response
As DSK6713 can also be used for direct programming
and its pole-zero plot.
applications from Simulink platform using embedded C
code compiler, it gives added advantages of effortless
writing of codes on MATLAB and debugging these codes
on DSP.
Digital filters have wide area of applications in
communication field for removing signal harmonics, noise,
interferences etc. DSK6713 is the commonly found DSP kit
in many educational institutions for teaching-learning
process. This kit is also found important in audio echo,
filtering, speaker recognition and many other fields.
CC Studio v6.1 is the modern and updated IDE platform
which can be used in academics and industrial
Fig 9: FIR filter magnitude and phase response
organizations for the development of any real time and non-
real time DSP applications.

VII. EXPERIMENTAL RESULTS


For experimental purpose, an input sine wave signal with
1Vpp and variable frequency range is set. The results or
filter outputs are shown in following figures for the
different cases.
As the FIR band-pass filter is designed for 1KHz to
3Khz passband frequencies, the simulation results show
that the output of the filter is attenuated and rejected for the
Fig 10: FIR filter pole-zero plot
input signal frequency 100Hz as shown in Fig 12. The
output signal of the filter is distortion-less clean signal for
V. IMPLEMENTATION
the input signal frequency 2KHz, which falls in the
The designed filter coefficients are used in C code which passband region of the filter as shown in Fig 13. The
is loaded on the DSK6713 processor along with all stopband region operation is shown in Fig 14.

319 | IJREAMV04I0541069 DOI : 10.18231/2454-9150.2018.0632 © 2018, IJREAM All Rights Reserved.


International Journal for Research in Engineering Application & Management (IJREAM)
ISSN : 2454-9150 Vol-04, Issue-05, Aug 2018

Fig 12: FIR filter output for input signal frequency=100Hz


Fig 16: IIR filter output for input signal frequency= 2KHz

Fig 17: IIR filter output for input signal frequency= 4KHz
Fig 13: FIR filter output for input signal
frequency=2000Hz
Fig 15, 16 and 17 shows the stopband and passband
operations of the IIR bandpass filter. With respect to
distortion and attenuation levels of the output signal, FIR
filter gives good performance when compared to IIR filter.

VIII. CONCLUSION
In this paper, the basic introduction to DSK6713
processor, procedural steps for working with CCSv6.1
and real time implementations of IIR and FIR filters are
discussed and executed. From the experimental results, it is
clear that any digital filter with given specifications can be
Fig 14: FIR filter output for input signal
feasibly designed and implemented with less power
frequency=4000Hz
consumption, less time, more portability and flexibility etc.
From the experimental results, it is clear that IIR filter
offers less attenuation level and FIR filter offers high
attenuation levels in the stopband region. Also because of
pole locations, stability is a major problem in IIR filter and
FIR filters are almost and always stable and provides
distortion-less output signal in its passband region.

ACKNOWLEDGMENT
We sincerely thank REVA University, faculty and
Fig 15: IIR filter output for input signal frequency= 500Hz student friends for supporting in all aspects for this
technical paper. We also thank our parents and the almighty
for all the moral support and encouragement.

REFERENCES
[1] R. Chassaing and D.Reay, “Digital Signal Processing
and Applications with the TMS320C6713 and
TMS320C6416 DSK”, 2nd edition, John Wiley, 2008.

320 | IJREAMV04I0541069 DOI : 10.18231/2454-9150.2018.0632 © 2018, IJREAM All Rights Reserved.


International Journal for Research in Engineering Application & Management (IJREAM)
ISSN : 2454-9150 Vol-04, Issue-05, Aug 2018

[2] B. Farhang-Boroujeny, “A square-root Nyquist (M)


filter design for digital communication systems,”
IEEE Trans. Signal Process., vol. 56, no. 5, pp.
2127–2132, May 2008.
[3] K. Martin, “Approximation of complex IIR bandpass
filters without arithmetic symmetry,” IEEE Trans.
Circuits Syst., vol. 52, no. 4, pp. 794–803, Apr. 2005.
[4] A. Krukowski and I. Kale, “DSP System Design:
Complexity Reduced IIR Filter Implementation for
Practical Applications”, Kluwer, Norwell, MA, 2003.
[5] N. Wong and C. U. Lei, “IIR approximation of FIR
filters via discrete-time vector fitting,” IEEE Trans.
Signal Process., vol. 56, no.3, pp. 1296–1302, Mar.
2008.
[6] TMS320 DSP/BIOS v5, 41 User’s guide, SPRU423H,
Texas Instruments, Aug. 2009.
[7] Donald S.R, “Hands-on Digital Signal Processing
teaching using OMAP-L138 Experimenter”, Fourth
European DSP Education and Research Conference.
[8] http://www.ti.com/tool/TMDSEMU100V2U-14T
[9] Nasser K, Namjin K, “Real-time Digital Signal
Processing based on TMS320C6000”, ISBN-0-7506-
7830-5

321 | IJREAMV04I0541069 DOI : 10.18231/2454-9150.2018.0632 © 2018, IJREAM All Rights Reserved.

You might also like