0% found this document useful (0 votes)
7 views

05750995

This document discusses the use of MATLAB/Embedded IDE LinkTM CC in designing digital signal processing (DSP) systems, specifically focusing on FIR filter design. It highlights the integration of MATLAB with Code Composer Studio (CCS) to facilitate data exchange and debugging processes, allowing developers to efficiently analyze and process DSP data. The article emphasizes the advantages of using this integrated approach to streamline DSP system design and reduce development time.

Uploaded by

Leroy Sonfack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

05750995

This document discusses the use of MATLAB/Embedded IDE LinkTM CC in designing digital signal processing (DSP) systems, specifically focusing on FIR filter design. It highlights the integration of MATLAB with Code Composer Studio (CCS) to facilitate data exchange and debugging processes, allowing developers to efficiently analyze and process DSP data. The article emphasizes the advantages of using this integrated approach to streamline DSP system design and reduce development time.

Uploaded by

Leroy Sonfack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2011 Fourth International Conference on Intelligent Computation Technology and Automation

The Application of MATLAB/ Embedded IDE LinkTM CC in the Design of DSP


System

Sun Le1,2,Zhang Shu-Mei1,Liu Xin1,2


1.Changchun Institute of Optics,Fine Mechanics and Physics,Chinese Academy of Sciences
2.Gradute School Chinese Academy of Sciences Chang chun,130033,China
[email protected]

Abstract-In the development of new digital signal processing MATLAB from the CCS,also, you can put the data in
algorithms, Designers always use matlab simulation., when the MATLAB into CCS IDE.The relationship between
simulation results achieve the expected target, then chang the MATLAB, Embedded IDE LinkTM CC, CCS, and hardware
algorithms into C/C++ languages and debug on hardware DSP. target DSP shown in Figure 1.
There are some results of deviation because of design,
precision etc. Such a repeated process of revising all, will give MATLAB
developers inconvenience. This article takes designing FIR filter MATLAB Embedded IDE LinkTM CC
as an example to introduce method which use Embedded IDE Function calls and
LinkTM CC tool in Matlab7.6 environment to Debug data manipulation Debug RTDX
TMS320F2812 DSP board.

Keywords-DSP Embedded IDE LinkTM CC Matlab7.6


Code Composer Studio(CCS)

I. INTRODUCTION
Using Embedded IDE LinkTM CC tool provided by C2000/C5000/C6000 DSP
Matlab7.6 [1] environment , Developers can use some math
functions provided by Matlab7.6 to achieve data exchangs Figure 1
and storage between Matlab work space and target
DSP’memory. Using the embedded object oriented III. THREE WAYS OF MATLAB AND CCS IDE DATA
programming technology and Embedded IDE LinkTM CC EXCHANGE
tool in matlab,can do some operations such an reading and
writing arget registers and memories. Operations on CCS A . The connection object with the CCS IDE
and target DSP can be completed in matlab environment. Use this connection object to create a connection to
Designers can use strong visible data processing and CCS IDE and MATLAB. From the Matlab command
analysis functions to process and analyze DSP data. We can window ,run the application CCS, send or retrieve data to
combine CCS IDE and Matlab showing their respective DSP memory or register, Check the status of DSP, start and
advantages to enhance efficiency. stop programs that run on DSP.
II. FUNCTIONS AND FEATURES OF EMBEDDED IDE LINK B. RTDX (real-time data exchange) connection object[4]
TM
CC[2] It provides a real-time communication channel between
MATLAB and DSP hardware. Using this connection object,
Embedded IDE LinkTM CC tools Integrated in you can open, enable, turn off or disable the RTDX channel
MATLAB 7.6 connect TI development environment (CCS DSP. This channel can be used in real-time hardware target
IDE) and DSP hardware together. Allows developers operate DSP to send and retrieve data without having to stop running
on CCS and DSP hardware in MATLAB environment. It the program on the DSP. For example, send the raw data to
provides MATLAB, CCS and objectives of the DSP's the program for processing, and get the results back to
two-way connection. Developers can use MATLAB, a MATLAB workspace for analysis.
powerful visualization, data processing and analysis CCS RTDX connection object is actually a subclass of
functions to analyze and process data from CCS[3] and the connection object, create the CCS RTDX connection
DSP(C2000TM 、 C5000TM 、 C6000TM Series) target. object to create connection object at the same time, they can
This greatly simplifies the analysis of TI DSP software not create separately .
development, debug and validation process . Using
Embedded IDE LinkTM CC tool, you can transfer the data to C. Embedded Objects

978-0-7695-4353-6/11 $26.00 © 2011 IEEE 749


735
DOI 10.1109/ICICTA.2011.470
Create an object variable in the MATLAB environment When output option is specified, click generate generate the
which can represent a target in C program. Direct access to specified header file, and save. Filterhead.h generated header
the embedded object can be embedded in the target DSP file as follows:
memory and register variables, namely, the target C program # Include "tmwtypes.h" // MTALAB header files
variables be treated as a variable in MATLAB. In MATLAB directory
environment ,we can collect information from DSP program, const int BL = 17;// Filter order
change data types, create the function declaration, change const int32_T B[17] =
the variable value, and send the information back to the DSP {0, -1428065, 0, 23519220, 0,
program, all of these operations are done in MATLAB -126366552, 0, 641321886, 1073390670, 641321886, 0,
environment. -126366552, 0, 23519220, 0, -1428065, 0}// filter
This article focuses on the connection object with the coefficients
CCS IDE and embedded objects.
B. DSP programming[5]
TM
IV. USING EMBEDDED IDE LINK CC DESIGN OF DIGITAL In DSP Programming, call the two Functions, One is the
FILTERS filter coefficient array flip function daoxu(),Another is the
multiply-add operation processing().Define two arrays
Digital filter design is a basic problem in the field of INBUFFER and OUTBUFFER for storing raw data and
digital signal processing. This will be the FIR low-pass filter filtered results. Main program flow chart is shown in Figure 3.
design, for example, describes how to use Embedded IDE
LinkTM CC tool design DSP application alled moderative
. sign main
Suppose FIR impulse response(filter coefficients) is h(n)
(n=0,1…N-1), and Filter input signal is x(n),then The
object filter output y(n) can be expressed by the following Initialization input data
differential equation:

N 1 Peripheral initialization register


y ( n )   h ( k ) x (n  k )
k 0
On the type of filter coefficients can use the FDATool
MATLAB tool design. Initialized buffer

A. Using FDATool tools design filter


1) In the MATLAB command window, enter the fdatool, Reverse, the shift cycle multiply-add
open FDATool (Filter Design & Analysis Tool) graphical
design interface. We choose window function design method
to design FIR filter. window function is Kaiser and filter
type is selected Lowpass (low pass) and the filter order is 16 END
and the sampling frequency Fs is 1000Hz, finally ,the cutoff Figure 3. DSP program flowchart
frequency Fc is 250Hz. Click Design Filter, begin to C. MATLAB programming[6]
generate filter coefficients. Figure 2 is the frequency Using Embedded IDE LinkTM CC with CCS to provide
response of FDAtool designed filter. the connection object that can be carried out under the
MATLAB environment for CCS in the works to compile
and download. At the same time using Embedded IDE
LinkTM CC provides embedded objects can be assigned to
the DSP and modify the appropriate parameters, these
operations can be done in the MATLAB environment,
without the need for complicated changes in the CCS
program. The part of MATLAB program code is as follows:

ccsboardinfo;% show host and the DSP target board


Figure 2 Filter frequency response(kaiser) %information
2) FDATool designed filter coefficients output to a C boardnum = 0; procnum = 0;% select the target DSP
header files cc = ticcs('boardnum',boardnum,'procnum',procnum);
%using ticcs create ccs embedded object
Select the FDATool design interface: Targets→Export to
visible(cc,1);%CCS IDE window is visible on the %desktop
Code Composer Studio IDE, Select Export mode for the C
fs = 1000;% sampling frequency 1000HZ
header file and output data type is Signed 32-bit integer.

736
750
f1 = 100; f2 = 300; f3 = 400;%three different frequency Raw data of three frequency components is
signals 100HZ/300HZ/400HZ 100HZ/300HZ/400HZ. The design of FIR low-pass filter
x = sin (2*pi*f1*[1:100]/fs)+sin (2*pi*f2*[1:100]/fs) + cutoff frequency is 250HZ, therefore filtered through
sin(2*pi*f3*[1:100]/fs); %signal is MATLAB and DSP leave the signal frequency components
%generated by three different frequency 100HZ only. By creating the out_buffer embedded object,
%signals and DSP filter results are sent to the MATLAB workspace
inp_buffer = createobj (cc,'INBUFFER');% input signal and the drawed, then the results are compared with the
%buffer to create the embedded object MATLAB filter results. Figure 6 and Figure 7 are the
%INBUFFER results of MATLAB and the DSP filter filtering the results.
out_buffer=createobj(cc,'OUTBUFFER');%input signal
%buffer to create the embedded
%object OUTBUFFER
b=createobj(cc,'B');%create an array of filter
%coefficients of the embedded object B
.........
.........
write (inp_buffer, x);%generate the signal data into the
%MATLAB DSP buffer
build (cc);% build the current project Figure 6. MATLAB Filter Results
load (cc, 'filter.out');% load filter.out to the target board
run (cc);% DSP program running
pause (5);% wait 5 seconds
halt (cc);% stop the DSP running
.........
.........
Filtering the original data is generated by MATLAB
three sinusoidal signals of different frequencies
and.Sampling frequency is 1000Hz,and the by creating an
embedded object with inp_buffer, the generated signal data
is stored into the MATLAB DSP buff. Figure 4 and Figure Figure 7. DSP filtering results displayed in the MATLAB environment
5 are respective MATLAB DSP filter input signal and the
input buffer data in MATLAB environment, the reality of
the results.

Figure 8. 100HZ sine signal


Figure 6 and Figure 7 shows, the use of MATLAB with
CCS to debug the target program has great advantages.
Figure 8 to the original 100HZ signal, filtering the results
Figure 4. MATLAB input signal
and the relative ratio of the original signal that will produce
lag, this is due to filter characteristics of the decision.
Therefore, the results from the DSP and MATLAB filter
achieve the desired effect of view.
V. CONCLUSIONS
MATLAB 7.6 Integrated Embedded IDE LinkTM CC
tools to allow developers flexibility in the MATLAB
environment can facilitate the goals of the CCS and the
corresponding DSP operation, more intuitive observation
Figure 5. DSP input signal
DSP each data storage unit, saving the developer
program in the DSP writing, debugging time. Therefore,
MATLAB 7.6 Integrated Embedded IDE LinkTM CC

737
751
DSP system design tools have important application
value in the DSP system design has important
application value.

References
[1] Vinay K. Ingle Jonhn G. Proakis Digital Signal Processing -
Application of MATLAB. Beijing: Science Press, 2003.
[2] Liu Zhijian. MATLAB Application Program Interface User Guide [M].
Beijing: Science Press ,2004.
[3] Liu Yicheng. TMS320C54x DSP application design and development.
Beijing: Beijing Aerospace University Press, 2002.2.
[4] MATLAB Link for Code Composer studio Development Tools User's
Guide.Mathworks,2002.
[5] Sun Liming. TMS320F2812 principle of its C language program
development. Beijing: Tsinghua University Press ,20080.12.
[6] Li Zhen Fang, etc.. DSP-MATLAB debugging program development
and its direct target code generation. Xi'an: Xidian University Press,
2003.10.

738
752

You might also like