IMPLEMENTATION AND COMPARISON OF COSINE MODULATED FILTER BANKS ON A FIXED POINT DIGITAL SIGNAL PROCESSOR by KbDAR RAVINDRA BHATE, B E . \ THESIS IN ELECTRICAL ENGINEERING Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirements for the Degree of MASTER OF SCIENCE IN ELECTRICAL ENGINEERING Approved Chairperson of the Committee Accepted Dean of the Graduate School May, 2004
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
IMPLEMENTATION AND COMPARISON OF COSINE
MODULATED FILTER BANKS ON A FIXED POINT
DIGITAL SIGNAL PROCESSOR
by
KbDAR RAVINDRA BHATE, BE.
\ THESIS
IN
ELECTRICAL ENGINEERING
Submitted to the Graduate Faculty
of Texas Tech University in Partial Fulfillment of the Requirements for
the Degree of
MASTER OF SCIENCE
IN
ELECTRICAL ENGINEERING
Approved
Chairperson of the Committee
Accepted
Dean of the Graduate School
May, 2004
ACKNOWLEDGEMENTS
A lot of people have been involved in making this thesis come tme. I would like
to take this opportunity to express my deepest gratitude for the following people.
I thank my advisor. Dr. Brian Nutter, for showing a great interest in my project
right from the selection of topic to writing the thesis. Our many insightful technical
conversations and his helpfial comments and constmctive crfticism have greatly improved
this work.
I thank Dr. Tanja Karp for the paper that inspired this thesis. Her guidance and
knowledge in this area helped me when things did not seem to go in the right direction.
I would also like to thank the Department of Electrical and Computer Engineering
for providing unlimited access and outstanding facilities in the computer lab as well as
the necessary financial support.
My parents, Ravindra Bhate and Sunanda Bhate and my elder brother, Mandar
have been source of inspiration throughout my life. They have always supported my
dreams and aspirations. I owe a special thanks to them, for their encouragement and
especially remarkable interest in my career.
11
TABLE OF CONTENTS
ACKNOWLEDGEMENTS ii
ABSTRACT vi
LIST OF TABLES vii
LIST OF FIGURES viii
I. INTRODUCTION 1
1.1 Background and Previous Work 1
1.2 Motivation 2
1.3 Outiine of the Report 3
II. COSINE MODULATED FILTER BANKS 4
2.1 Filter Banks 4
2.2 Cosine Modulated Filter Banks (CMFB) 5
2.3 Filter Bank Realization Using Polyphase Filters and Cosine Modulation . . . 6
2.4 Efficient Realization of Polyphase Filter Banks 7
2.5 Decomposition of the Filter Matrices and the Perfect Reconstmction Property 9
III. FIXED-POINT VERSUS FLOATING-POINT HARDWARE 12
3.1 Introduction 12
3.2 Floating-Point and Fixed-Point Representation 12
3.3 Comparison between the Fixed-Point and Floating-Point Hardware for an Audio Application 14
3.4 Choice of the Hardware 15
111
3.5 The Right Tool for the Right Application 16
IV. IMPLEMENTATION OF THE FILTER BANK ON TMS320C6211 FIXED-POINT DIGITAL SIGNAL PROCESSOR 17
4.1 The Development Process 17
4.2 Matlab/Simulink Models for the Cosine Modulated Filter Banks 18
4.2.1 Implementation of the Analysis and Synthesis Filters 18
4.2.2 Implementation of the Modulation Matrices 20
4.3 TMS320C6211 DSK and Code Composer Studio 22
4.4 Overall Stmcture of the Application 23
4.5 Cosine Modulated Filter Bank Implementation in C 25
4.6 Hardware Configuration 26
4.6.1 Chip Select Library (CSL) 26
4.6.2 Multichannel Buffered Serial Port (McBSP) Configuration 27
4.6.3 CODEC Initialization 32
4.6.4 Enhanced Direct Memory Access (EDMA) Controller Configuration 34
4.7 Intermpt Service Routine (ISR) 37
4.8 Creating and Running the Application 38
4.9 Hardware and Software Limitations 42
V. EFFECT OF DIFFERENT PARAMETERS ON THE PERFECT RECONSTRUCTION PROPERTY OF THE FILTER BANK 43
5.1 Effect of including Modulation Matrices 44
5.2 Effect of Filter Length 46
5.3 Effect of Overall System Delay 48
IV
5.4 Nature of the Error 50
5.5 Effect of Number of Channels and Overflow Error 51
5.6 Input Signal Amplitude and SNR 53
VI. CONCLUSION AND FUTURE WORK 55
6.1 Conclusion 55
6.2 Future Work 55
REFERENCES 56
ABSTRACT
Cosine Modulated Filter Banks have an efficient stmcture with respect to the
number of multiplication and delay elements required. They also provide another
desirable feature, perfect reconstmction (PR). However, their ability to provide PR can be
affected due to various parameters, such as fixed-point constraints, imperfect modulation
matrix, etc. In this thesis, effects of these parameters on the ability of the filter bank to
provide PR are studied. To demonstrate the use of the filter bank in a real- time
application, it is implemented using a TMS320C6211 Fixed-point Digital Signal
Processor (DSP). The implementation uses the TLC320AD535 audio Encoder/Decoder
(CODEC), the Multichannel Buffered Serial Port (McBSP) and the Enhanced Direct
Memory Access (EDMA) controller on the DSK6211 board to continuously process and
reconstmct digitized audio data.
VI
LIST OF TABLES
4.1 CSL Modules and Include Files [13] 27
4.2 EDMA Channel Parameter Entries for Each EDMA Event [16] 36
4.3 Different Sections in the SECTIONS Directive [15] 39
vi i
LIST OF FIGURES
2.1 Example of an M-channel Filter Bank [2] 4
2.2 Filter Bank with Polyphase Filters and Cosine Transform 7
2.3 New Realization of the Analysis and Synthesis Filter Bank [2] 9
3.1 Typical Floating-Point Representation [17] 12
3.2 Typical Fixed-Point Representation [20] 13
4.1 Simulink Model for the Filter Bank without Modulation Matrices 18
4.2 Maximum Delay Matrix (Left) and Inverse Maximum Delay Matrix (Right).. 19
4.3 Zero Delay Matrix (Top) and Inverse Zero Delay Matrix (Bottom) 19
4.4 Initialization Matrix (Top) and Inverse Initialization Matrix (Bottom) 20
4.5 Stmcture for Implementing the Modulation Matrices 21
4.6 Filter Bank with the Modulation Matrices 21
4.7 TMS320C6211 DSK [12] 23
4.8 Stmcture for the Audio Application 25
4.9 Multicharmel Buffered Serial Port block diagram [5] 28
4.10 Serial Port Control Register (SPCR) [5] 29
4.11 Receive Control Register (top) and Transmit Confrol Register (bottom) [5] . . . 32
4.12 Voice Channel CODEC Logic Diagram [14] 32
4.13 Data Format for Secondary Communication between CODEC and McBSP Register Read Operation (top), Register Write Operation (bottom) 33
4.14 Enhanced Direct Memory Access (EDMA) Controller [16] 35
4.15 The Linker Command File (*.cmd) 39
Vlll
4.16 Build Options Window in Code Composer Studio 41
4.17 Command Window with Confidence Test Results 41
5.1 Storing Memory Content of DSP to the File 43
5.2 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 15, N = 32) 45
5.3 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 32) 45
5.4 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 15, N = 64) 46
5.5 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 15, N = 96) 47
5.6 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 64) 47
5.7 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 96) 48
5.8 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 31, N = 32) 49
5.9 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices ( M - 8 , D = 31,N = 32) 49
5.10 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices and White Noise as an Input (M = 8, D = 15, N = 32) 50
IX
5.11 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices and White Noise as an Input (M = 8, D = 15, N = 32) 51
5.12 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices ( M - 1 6 , D = 31,N = 32) 52
5.13 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) and the Filter Bank with Modulation Matrices (M = 16, D = 31, N = 32) 52
5.14 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 32) and reduced input signal amplitude 53
5.15 Plots of the Original Signal (Top), Reconstmcted Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 32) and increased input signal amplitude 54
CHAPTER I
INTRODUCTION
1.1 Background and Previous Work
The theory of modulated filter banks and methods for their application have been
developed and studied extensively. Still, further advancements continue to be reported in
many areas related to them. Modulated filter banks are implemented based on a prototype
filter and a fast transform. Different modulation schemes for modulated filter banks using
the Discrete Fourier Transform, Discrete Cosine Transform, and Wavelet Transforms are
available. Each modulation scheme has its own advantages and disadvantages. However,
this thesis will focus on the filter banks with cosine transform as the modulation scheme.
During the last decade, the literature and research on the subject of cosine
modulated filter banks were focused mostly on the development of the stmcture that
gives inherent perfect reconstmction, low implementation cost and low overall system
delay [1, 2]. In recent years, research work has continuously developed applications for
the filter banks. The thmst of the research related to cosine modulated filter banks has
been changed to implementation on DSPs for different applications and complexities
associated with that. Some authors have already presented an evaluation of the
performance of filter banks when implemented in the fixed-point format [7, 8, and 10].
The results of these evaluations have showoi interesting promise for filter banks when
used in real-time applications. They also suggest that some newer techniques may
provide much better filter bank performance.
1.2 Motivation
Perfect Reconstmction (PR) of the signal is a desirable property in many signal
processing applications. Cosine modulated filter banks (CMFBs) achieve the PR
property, efficiently using the symmetry property of the modulation matrices. The
stmcture presented in [2] claims to be robust to coefficient quantization, rounding and
overflow in terms of the PR property of the filter banks. This is validated in the most
recent research done in [9]. However, modulation matrices were assumed to be perfect,
although cosine fianctions cannot be perfectly represented using conventional numeric
representations. Preserving the PR property of the CMFB including the modulation
matrices is a good research problem.
Usually filter banks are implemented on a fixed-point DSP when used in different
real-time applications. Fixed-point processors have various advantages over their
floating-point covmterparts such as lower cost, higher speed, less power consumption, etc.
However, the dynamic range of the fixed-point values is much less than floating-point
values with equivalent word sizes. Therefore, in order to avoid overflow or unreasonable
quantization errors, fixed-point values must be optimized by scaling.
The objective of the work presented in this thesis is twofold. The first objective is
to implement the filter bank on the fixed-point DSP and test it for real-time application.
The second objective is to consider the effect of change in filter length, number of
channels, overall system delay, input data format, and inclusion of the modulation
matrices on the PR property of the fifter bank.
1.3 Outline of the Report
Chapter II discusses the basic theory of CMFBs. Chapter III provides background
on the fixed and floating-point arithmetic and hardware. It also discusses why particular
hardware was chosen for implementation. Chapter IV discusses DSP implementation of
the CMFB and issues related to it. Chapter V presents the effects of different parameters
on the PR property of the filter bank. Finally, Chapter VI concludes this work with a
summary of results and a discussion of fiiture work.
CHAPTER II
COSINE MODULATED FILTER BANKS
2.1 Filter Banks
A filter bank is a collection of filters that are divided in two groups, the analysis
side filters and the synthesis side filters. Analysis side filters divide the incoming signal
into sub-bands, while the synthesis side filters merge the sub-bands in one signal. When
the signal is divided into sub-bands, it is possible to process each sub-band separately.
The analysis side also includes dovm-sampling while the synthesis side includes up-
sampling. In the simplest form, the dovm-sampler reduces the input sample rate by an
integer factor, M, by retaining only every M* sample. On the other hand, the up-sampler
increases the input sample rate by an integer factor, M, by inserting M-1 zeros between
consecutive samples. Figure 2.1 shows a typical stmcture of an M charmel Filter bank.
Analysis Side Synthesis Side
Down-sampler Up-sampler
X(i) >
ut
1 > H„(4
—> m^
— > HM
' *Hw)(=^
IM
iu
iM
ttM
^
Sign
al P
roce
ssin
g ^
— > •
— y
— — » •
t M
tM
tM
tM
- +
-*
—>
Fo<.z)
r,(z)
^^)
FMI<»
^
»
^
o *• Y(z)
Output
M-Charaid Filter Bank
Figure 2.1 Example of an M-channel Filter Bank [2]
A simple example of an analysis filter bank is a Hi-Fi audio system, ft separates
the sound signal into bass and treble, and outputs are obtained for two different
loudspeakers. Thus the signal is divided into sub-bands and each sub-band is treated
separately. Each speaker is designed to handle its respective frequency band.
2.2 Cosine Modulated Filter Banks (CMFBs)
CMFBs include down-sampler, up-sampler, filters, and a discrete cosine
fransform for the modulation scheme. The impulse responses and z-transforms of the
analysis side filters are denoted by hk(n) and Hk(z) respectively, where k = 0, ..., M-1, n
= 0, ..., Nh - 1, M = Number of sub-bands of the filter bank, and Nh = Length of the
analysis filters.
Similarly, the impulse responses and z-transforms of the synthesis side filters with
length Nf are denoted by fk(n) and Fk(z) respectively, where k = 0, ..., M-1, and n = 0, ...,
Nf-1 .
The impulse responses of the analysis filters hk[n] and synthesis filters fk[n] are
cosine modulated versions of the prototype filters h[n] and f[n], respectively. They are
given by
hk[n] = 2 X h[n] x cos [H/M x (k + 0.5) x (n - D/2) + 0k ], (2.1)
withn = 0, 1, . . . ,Nh- l,and
fk[n] = 2 X f[n] X cos [UM x (k + 0.5) x (n - D/2) - Gk ], (2.2)
with n = 0, 1, ..., Nf- I, where 6k = (-1)'' ^ n/4, D = Delay of the overaU system in
samples, and M = Number of chatmels.
The overall system delay is calculated by using the following expression:
D = (2 X s X M) + d. (2.3)
In equation (2.3), M represents number of charmels while s and d are integer delay
parameters. The parameter s is given in the design of the prototype filter and it is
calculated using the following equation.
s = ( 2 x M ) - l . (2.4)
2.3 Filter Bank Realization Using Polyphase Filters and Cosine Modulation
From [1, 18, 19], the analysis and synthesis prototype filters are expressed by the
polyphase components GL(Z) and KL(Z), respectively, as
2'M-l , .
H{z) = Y.^-'' X G, (z '^) , where (2.5)
gi^(m) = h{2xmxM -\- L).
VM-\ , . F{z) = X ^ - ^ X K^ (z^^), where (2.6)
z.=o
it̂ (ffj) = / ( 2 x m x M + Z,).
The modulation matrices Ci and C2 are given by
[C,],i =2xcos[;r/Mx(A:-HO.5)x(Z-D/2)-h0j,], (2.7)
where 0 < k < M , 0 < L < 2M, and
[ Q i k i =2xcos[ ; r /Mx(A:-HO.5)x(2M-Z-D/2)-0j , ] , (2.8)
where 0 < 1< 2M, 0 < L < 2M.The polyphase stmcture of the filters is useful for the sub-
band processing, which separates an incoming signal into several sub-band components.
The lengths of the polyphase filters GL(Z) and KL(Z) are determined by the prototype
filter lengths Nh and Nf, respectively. Realization of the polyphase CMFB is shown in
Figure 2.2.
Figure 2.2 Filter Bank with Polyphase Filters and Cosine Transform [2]
From Figure 2.2, it can be seen that the input signal is divided into M sub-bands
on the analysis side. These individual components are passed through the polyphase
filters and the output from the filter is modulated. On the synthesis side, the reverse steps
are performed.
2.4 Efficient Realization of Polyphase Filter Banks
The implementation cost is reduced for the stmcture of the polyphase filter banks
presented in Figure 2.2 using following properties.
The size of the modulation matrices represented by equations 2.7 and 2.8 is
reduced from M x 2M to M x M, using the following equations:
Figure 4.16 Build Options Window in Code Composer Studio
C:\WINNT\sYstem32\c !ff!ff!WffrW!ff[l
C : s T I \ C 6 0 e 0 \ D S K 6 X l l s C O N F I E S T > d s k 6 x t ;
T M S 3 2 0 C 6 2 1 1 / 6 7 1 : t DSK C o n f i d e C o p y r i a h t ; <c> 2BB1 b y Te> f i l l r i g h t s r e s e r u e d .
l e s t Run T i m e : 0 7 : 2 6 : 1 9 PM
USER_SU3=0 USEB_SW2=a USER_SWl=a
Connand = ISRftrl Corimand=SDRftli Coini!iand=t1CBSP Conmand 'TIMER ComiTiand=gDMfi C o n n a n d = L E D S . . -fii-e Tl iey F l a s h i n g ? Command =CODEC. . I s T o n e / ' M u s i c P l a y i n g
1 T e c t , Uej-sion 2 - 0 1 , May 2081 Ins t ruments I n c o r p o r a t e d .
B2, 2BB3
. . . R e s u l t = > PASSED?
. . . R e s u l t = > PASSED!
. . . R e s u l t = > PflSSEDt
. . . R e s u l t = > PfiSSED?
. . . R e s u l t = > PfiSSED!
. . . R e s u l t = > PfiSSED!
. . . R e s u l t = > PfiSSED!
r M S 3 2 B C 6 2 1 1 / 6 7 1 1 DSK C o n f i d e n c e T e s t PASSED? _ , . No t e s t f a i l u r e s f o u n d ?
C l o s i n g Log F i l e : d s k G x t s t . l o g
« » T l i S 3 2 B C 6 2 1 i / 6 V l l DSK C o n f i d e n c e T e s t C o m p l e t e !
C:STI ' sCf .0BBNDSK6XllsCONFTESI>
Figure 4.17 Command Window with Confidence Test Resufts
41
To run the program, one needs an audio or CD player and powered speakers
connected to the DSK. The program can be run by choosing the "Run" option in the
"Debug" menu of CCS. The resufts can be heard from the speakers.
4.9 Hardware and Software Limitations
In addition to the fixed point constraints, the hardware induces other constraints
on the program.
The ADC of the CODEC gives 16-bft resolution. But the DAC gives only 15-bft
resolution. This is because the least significant bit of the 16-bit communication word
between the serial port and CODEC is used to request secondary communication between
the two. The secondary communication is used for control information exchange. It
reduces the cost, since control as well data information is passed through the same bus,
but it does mean that a program using the TMS320C6211 DSK is never going to give
perfect reconstruction of the signal when the input and output are taken through the
CODEC.
The maximum sampling rate through the CODDEC is 11 KHz. Thus for
applications requiring higher sampling rate, the TMS320C6211 DSK can not be used
without modification.
The local variables in the program can not be viewed in the watch window of
CCS. This adds a major limitation on debugging the code.
42
CHAPTER V
EFFECT OF DIFFERENT PARAMETERS ON THE PERFECT
RECONSTRUCTION PROPERTY OF THE FILTER BANK
In the following discussion, the programs for the filter banks were developed and
tested on the DSP with different values of parameters such as channel numbers, overall
system delay, etc. These take the input from a file, and the reconstructed signal is stored
in the DSP memory. The reconstructed signal can be stored in a data (*.dat) file from the
DSP memory. The data file can be selected by choosing the "Data-Save" option in the
"File" menu of CCS. The data format in the data file can also be selected. When the file
name and the data options are selected, the window shown in Figure 5.1 pops up. In this
v^ndow, the address of the data and the length of the data are specified.
Istoring Memory into File « - | ^ ^ B |
Address: |0x00004CBC
L e n ^ : |1000
OK j Cancel j Help |
Figure 5.1 Storing Memory Content of DSP to the File
The data stored in the data file is tiien loaded into Matlab. The comparison
between the input signal, reconstructed signal and error between the two is made in
Matlab. ft must be noted that the file input is used only for analysis and to avoid any
43
errors that may get introduced due to the data converters. In a real-time application, input
from file should be avoided. Also, when we change the filter length, channel numbers or
overall system delay, the values of the modulation mafrix coefficients or filter
coefficients are changed. Thus, it is the programmer's responsibility to choose an
appropriate Q format values for the coefficients and the data signals. In this discussion, M
will represent number of channels, D will represent overall system delay, and N will
represent the filter length.
5.1 Effect of including Modulation Matrices
The plots shown in Figure 5.2 do not include the modulation matrices. Figure 5.3
shows the plots including the modulation matrices. It can be seen that when the
modulation matrices are included, very small amount of quantization error is introduced.
The signal to Noise Ratio (SNR) was calculated using the following formula:
SNR = 20 X logjo [mean(abs{signal)) I mean{abs(noise))].
The SNR is 80.62 db when the modulation matrices are included and obviously it
is 00 when the modulation matrices are not includes since the error is zero.
44
->
a
2
- 2
10
s
o
-s
10
It l O *
- . _ 3
X 1 0 *
: - > —
o
i .-̂ '̂
-- -y^^---
1QO
Jir^
10O
2 0 0
^ ^ J ^ ' ~"
2fXl
i 30Q
i 3 0 0
o i c to 2cra
\
^r:4,^r 4 0 0
i-
4 0 0
^ ' ".^^
5 0 0
^ \
soo
3 0 0 4 o a
\
6CK)
"̂ :
700
1 ^"x^ j
6 0 0
Ix
7O0
^:^^ 8 0 0
- - - - i -
„4-rr ffi30
1
9 0 0
L-^"^
1300
siaD BCKD 7 0 0 SOD
f - * -^ '—-_
1CKDO
^ • - ^ • ^ ^
1 0 0 0
a x i 1CX30
Figure 5.2 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 15, N = 32)
10
s -
D
-5
-10
^piw^^wi^^
Figure 5.3 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 32)
45
5.2 Effect of Filter Length
Figures 5.4 and 5.5 show the plots with N = 64 and N = 96, respectively, without
modulation matrices. We continue to get perfect reconstruction, however inclusion of the
modulation matrices induces an error in the reconstructed signal.
Figures 5.6 and 5.7 show the plots for the filter ban including the modulation
matrices. The SNR with inclusion of modulation matrices for N equal to 64 and 96 is
64.47db and 80.12 db.
Figure 5.4 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 15, N - 64)
46
-a'cBU-H
Figvu-e 5.5 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices (M = 8, D = 15, N = 96)
1000
Figure 5.6 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 64)
47
lacioti.
Figiure 5.7 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 96)
5.3 Effect of Overall System Delay
The plots shown in Figures 5.8 and 5.9 are obtained for filter banks with delay of
31 samples between the input and the output, ft can be seen that even though the overall
system delay is changed, we continue to get perfect reconstruction when modulation
matrices are not included. However, when the modulation matrices are included, the error
magnitude has increased. This is due to inexact filter coefficient values. The SNR with
inclusion of modulation matrices is 46.72 db.
48
! ! ! ! !
i /-^""^"^^k \ \X^^^ ^.^_^J^ ] i^--lL^~-^
1 1 i i i
! ' ! ' ' ' !
"̂ ""̂ i p^^^---^̂J-̂^̂
1 i i
Figure 5.8 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for Filter Bank without Modulation Matrices (M = 8, D = 31, N = 32)
Figure 5.9 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 31, N = 32)
49
5.4 Nature of the Error
We have seen that including the modulation matrices induces an error in the
reconstructed signal. It was important to study the nature of the error. Therefore, the filter
bank was tested with white noise. It can be seen from Figure 5.10 that we continue to get
perfect reconstruction when the modulation matrix is not included. However, when the
modulation matrices are included, we induce an error in the reconstructed signal. The
nature of the error depends upon the input. The SNR in this case is 66.56db.
Figure 5.10 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank without Modulation Matrices and White Noise as an Input (M = 8 ,D=15 ,N = 32)
50
wwiWi m 9 0 0 1000
1C» 200 30O
^^f%|^f(||lll^|^^
10O 2 0 0 3 0 0
Figure 5.11 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices and White Noise as an Input (M = 8 , D = I 5 , N = 32)
5.5 Effect of Number of Channels
So far in the discussion, we have considered only 8-chaimel filter banks.
However, results for the filter banks with 16 channels are shown in Figures 5.12, 5.13.
From Figure 5.12 ft can be seen that when modulation matrices are not included, we
continue to get perfect reconstruction. Figure 5.13 shows the results when the modulation
matrices are included. The SNR with inclusion of modulation matrices is 78.93db.
51
—
-^.^
1
^'^
1
--V
4
"
^ v -
1 1
-'y^.
i
1
4--i
1
\
- v = - , ^
y\
i
-_^^
—
Figure 5.12 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) and the Filter Bank without Modulation Matrices (M = 16, D = 31, N = 32)
Figure 5.13 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) and the Filter Bank with Modulation Matrices (M = 16, D = 31, N = 32)
52
5.6 Input Signal Amplitude and SNR
Figure 5.3 shows the plots for the filter bank with M = 8, D = 15, and N = 32
including modulation matrices. The plots in Figures 5.14 and 5.15 are also obtained for
the filter bank witii the same parameter values. The difference between the plots in
Figures 5.3, 5.14, and 5.15 is the input signal amplitude, ft can be seen that the plots in
Figure 5.3 have higher input signal amplitude than the plots in Figure 5.14 and lower
input signal amplitude than the plots in Figure 5.15. The SNR calculated for the plots in
Figure 5.3 is 80.62db. The SNRs calculated for the plots in Figures 5.14 and 5.15 are
76.3db and 80.86db. Thus, ft can be cleariy seen that SNR gets affected depending upon
the input signal amplitude.
Figure 5.14 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 32) and reduced input signal amplitude
53
Figure 5.15 Plots of the Original Signal (Top), Reconstructed Signal (Middle) and Error (Bottom) for the Filter Bank with Modulation Matrices (M = 8, D = 15, N = 32) and increased input signal amplitude
54
CHAPTER VI
CONCLUSION AND FUTURE WORK
6.1 Conclusion
In this thesis work, DSP implementation of the CMFB is presented. The DSP
implementation of the filter bank was successfully tested for real-time audio input.
It was verified that if modulation matrices are excluded, then the filter bank
provides perfect reconstruction irrespective of the filter length, overall system delay and
number of charmels.
It was observed that the modulation matrices induce an error in the reconstructed
signal. The natvire of this error depends upon the input signal.
It was shown that the SNR depends upon the input signal amplitude. Higher the
input signal amplitude better is the SNR.
6.2 Future Work
The cosine transform is used for modulation for various reasons. However since
the cosine ftmction is expressed using Pi and Taylor series, we will never able to
represent the cosine values exactiy in a digftal system. Thus it may be interesting to look
for an alternative ftmction that can be exactly represented, ft will help in avoiding the
possible quantization error.
55
REFERENCES
1. Peter Niels Heller, Tanja Karp, Truong Nguyen, A general formulation of Modulated Filter Banks, IEEE Transactions on Signal Processing 47 (1999), no. 4, 986-1002.
2. Tanja Karp, Alfred Mertnis and Gerald SchuUer, Efficient biorthogonal cosine modulated filter banks, EURASIP, Signal Processing 81(2001), no.5, 997-1016.
3. DSP/BIOS by Degrees: Using DSP/BIOS (CCStudio 2.0) Features in an existing Application, Application report, SPRA783A, Texas Instruments, Dallas, TX, September 2001.
4. Applications using the TMS320C6000 Enhanced DMA, Application report, SPRA 636A, Texas Instruments, Dallas, TX, October 2001.
5. TMS320C6000 DSP Multichannel Buffered Serial Port (McBSP) Reference Guide, SPRU580A, Texas Instruments, Dallas, TX, October 2003.
6. Mullish Cooper, The Spirit of ' C , West Publishing Company, St. Paul, MN, 1993.
7. Yang Yuan, Juuso Alhava, Marku Renfors, Implementation of Perfect Reconstruction Cosine Modulated Filter banks, Telecommunications Laboratory, Tampere University of Technology, Tampere, Finland.
8. Florian Keiler, Udo Zolzer, DSP Implementation of a Low-Delay Filter Bank for audio applications, Department of Signal Processing and Communications, University of German Federal Armed Forces, Hamburg, Germany.
9. Ryan Casey, Efficient Realization of low delay fixed point cosine modulated filter banks with perfect reconstruction. Master's thesis, Texas Tech University, Lubbock, TX, 2001.
10. Magnus Nord, Cosine Modulated Filter banks Implementation and Comparison, Master's Thesis, Linkoping Institute of Technology, Linkoping, Sweden 2003.
11. Moorer James A, "48-Bft Integer Processing beats 32-bit Floating point for professional Audio Applications." Presented at the 107th AES Convention, Preprint Number 5038 (L-3), September 24-27, 1999.