Escolar Documentos
Profissional Documentos
Cultura Documentos
for
Adaptive Echo Cancellation
1 Introduction 2
2 The Project 3
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Project Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Mandatory Tasks 6
3.1 Time Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 The DSP-Project room . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Project Approval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Report 8
4.1 Disposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.4 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.5 Word Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Assistance 12
5.1 UDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2 DSP TMS320C31 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.3 Spectrum Analyzer Data Format . . . . . . . . . . . . . . . . . . . . . . . 12
5.4 Hardware Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.5 Supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1
Chapter 1
Introduction
This Manual is for the Adaptive Echo Cancellation project, in the course Adaptive Signal
Processing at Blekinge Institute of Technology. The Manual states important and mandatory
parts of the project, how they should be carried out, documented, and presented for passing
the project examination. This Manual will also act as a guideline of how to write the project
report.
2
Chapter 2
The Project
2.1 Introduction
An Adaptive Echo Canceller (AEC) aims in cancelling or reducing crosstalk interference in
a system, by employing adaptive filters.
Examples of AEC-applications
2.2 Equipment
The following list of equipment is for implementing an acoustic echo cancellation system,
the setup is illustrated in Fig. 2.1.
6. Loudspeaker
3
2.3. Project Procedure Chapter 2. The Project
D ig ita l S ig n a l P ro c e s s o r
x (n )
S o u rc e L P F
L M S w (n ) h (n )
e (n ) - d (n )
+
S in k L P F
Figure 2.1: Setup for implementing an acoustic echo cancellation system. LPF are anti-alias,
and reconstruction low pass filters.
Simulations
It is not required, but recommended, that the algorithm implementations are first simulated
and verified in Matlab. By doing so, the DSP implementation is likely to be less defiled by
those mathematical- and algorithm-specific errors.
Implementation
First, set up your experiment hardware properly, i.e. allocate cables, connectors and instru-
ments required for carrying out the project.
4
2.4. Tip Chapter 2. The Project
P C
C h A In C h A O u t
A D C D A C
(C h A ) (C h C )
D S P T M S 3 2 0 C 3 1
(D S P T M S 3 2 0 C 3 2 )
C h B In A D C D A C C h B O u t
(C h B ) (C h D )
P C
2.4 Tip
How the source-code implementation is carried out is not of higher interest in this project,
but some important issues are listed below. These issues are in general terms, but of special
interest in DSP-environments with limited debugging capabilities.
SMALL STEPS Implement your algorithm in small steps, verify each new step, if possible.
BACKUPS Before carrying out major changes in your code, or before starting a new day’s
work, make a backup of your source code. Remember to comment the backup revision
number properly, in the end of the project, it is likely to have many revisions of the
source code.
USE LIBRARIES Prefer pre-installed libraries, in as far extent as possible. It is not time
efficient to; "to invent the wheel twice". This might not be possible to conform to,
when implementing highly optimized algorithms. The header file is named ensigdsp.h
for the TMS320C31 and hkrc32.h for the TMS320C32.
C-/ASM-SYNTAX Have one, uniform, naming standard for variables, functions, constants
etcetera.
5
Chapter 3
Mandatory Tasks
• A detailed time-plan for the full duration of the project. All parts, and important steps,
of the project should be denoted. Time estimates for each part or step should also be
included.
3.2 Tasks
The following tasks must be carried out to pass the project:
Background Information Read articles, books, and search for information on the web on
how to solve the problem.
Results The results should be based on measurements, and if possible, in combination with
results from Matlab-simulations. Preferably the results should emphasize the perfor-
mance of the implementation, i.e. comparison of having the algorithm switched on,
and off.
6
3.3. The DSP-Project room Chapter 3. Mandatory Tasks
Report Write a project report and use the proposed disposition in section 4.1.
• You must enter your name, and your e-mail address when registering a booking.
• Before starting working, check cables, connectors and settings of the instruments.
They could have been used and altered, since you experimented last.
• Tidy your working area up when leaving the project room: put trash in the trashcan,
put unused cables and connectors back, log off the computer, and switch instruments
off.
7
Chapter 4
Report
Feel free to choose any type of word processor for report writing. But the suggested dispo-
sition, see section 4.1, must be withheld. This Manual has been written using LATEXReport
style, see section 4.5, and could be seen as an example on how the report disposition should
look like.
4.1 Disposition
Following must be included in the report.
Title Project title, each project member’s: name, e-mail and class, name and e-mail to
supervisor(-s), and date of submission.
Abstract A brief presentation of the problem, the proposed solution, the implementation,
and the most interesting results, should be denoted in the abstract.
Hint 1: The abstract should NOT exceed half a page.
Hint 2: Try to write an abstract, as if it was meant for selling your implementation.
Table of Contents
Introduction Introduction to the field of adaptive filter theory, notch filters, etcetera. With
proper references to literature, web-references (with date), and other published ma-
terial. A typical subsection could be Problem formulation, i.e. formulation of the
problem for which the proposed solution is to compensate for.
Proposed solution In this section a detailed, analytical, presentation of the proposed solu-
tion is given, with algorithms and structures described.
Experiment setup Detailed presentation of the experiment setup. Listing of hardware used,
and hardware specific settings, e.g. Spectrum Analyzer’s window-type, overlap-percent,
sampling frequency etcetera. The presentation of the experiment setup should be self-
contained, i.e. by only using the report as reference, the experiment should be possible
to be set up, without any additional background research.
8
4.2. Figures Chapter 4. Report
Source code General presentation of C, ASM, and Matlab source code, e.g. block-diagrams,
state-diagrams etcetera. Vital source-code blocks of the implementation should be pre-
sented more thoroughly in this section. The inclusion of the full source code should
rather be in appendix.
Results Presentation and comments on the results. Typical interesting results to highlight:
suppression rates, convergence rates, filter-lengths versus suppression rates. As well as
presenting "good/positive" results, it is equally important to show on scenarios where
the algorithm is not suitable.
Note: Plots, graphs, and tables are excellent examples of how to present the results.
Conclusions Conclusions that could be drawn from the project, the implementation, and the
results.
Appendices Code-listings, project timetable, large pictures, tables, lists, etcetera, should be
in appendix not in the sections.
4.2 Figures
All figures should have descriptive, stand-alone, texts. An illustration of how a figure is
expected to be, is presented in Fig. 4.1.
Note 1: No references should be given in figure texts.
Note 2: Any figure presenting physical data, must have PROPER LABELS on x-, y-, and
eventually z-axes, WITH CORRECT SI-UNITS, e.g. [s], [Hz], [m], [V].
Note 3: Spectrum Analyzer plots should be exported and plotted in Matlab, utilities for
converting Spectrum Analyzer ".DAT" files into Matlab ".MAT" files exists.
4.3 Equations
All equations included in the report should be numbered. An equation is often derived in
several steps, if that is the case, show those steps and explain the derivation. Referring to an
equation should look like follows:
The mean x̄ of a signal x(n) is estimated as in equation 4.1 where N is the number of
samples.
N
1 X
x̄ = x(n) (4.1)
N n=1
9
4.4. Bibliography Chapter 4. Report
0.5
Amplitude [V]
0
−0.5
−1
−1.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time [s]
Figure 4.1: Time-data of ANC on sinusoidal noise. The noise source signal (solid), the
cancellation signal (dashed), the suppressed noise signal (dotted).
Vectors and matrices should be written in Bold typeface, like in equation 4.2. A compact
version of the Wiener-Hopf matrices is given in equation 4.3.
Rx w = rdx (4.2)
rx (0) rx∗ (1) · · · rx∗ (p − 1) w(0) rdx (0)
rx (1) rx (0) · · · rx∗ (p − 2) w(1) rdx (1)
= (4.3)
.. ... .. .. ..
. . . .
rx (p − 1) · · · rx (0) w(p − 1) rdx (p − 1)
4.4 Bibliography
All references that are used in the report should be listed at the end of the report, either in
the order as they are referred to, or in alphabetic order. Furthermore, all references must be
described in such an extent, that the source could easily be found. The use of a reference
could look like follows: The wiener filter [2] implemented in the DSP is an optimum digital
filter. Some of the FIR filter structures [4] are useful when programming DSP’s.
and WinEdt for text editing, supporting many LATEXcode functions. WinEdt could be found
as Shareware at http://www.winedt.com.
11
Chapter 5
Assistance
5.1 UDL
Read the User guide for the DSP TMS320C31/C32, [3].
12
5.5. Supervisor Chapter 5. Assistance
5.5 Supervisor
When you got stuck, or you have a phenomena you do not understand, you can ask your
supervisor for help. Make sure that you already tried to identify and solve the problem
before asking your supervisor.
13
List of Figures
2.1 Setup for implementing an acoustic echo cancellation system. LPF are anti-
alias, and reconstruction low pass filters. . . . . . . . . . . . . . . . . . . 4
2.2 Block diagram of the DSP configuration . . . . . . . . . . . . . . . . . . . 5
4.1 Time-data of ANC on sinusoidal noise. The noise source signal (solid), the
cancellation signal (dashed), the suppressed noise signal (dotted). . . . . . 10
14
Bibliography
[1] ENSIGMA. DSPLib DSP Routines for TMS320C3X/4X. Ensigma Ltd. Dallas, Texas,
1994.
[2] Monson H. Hayes. Statistical digital signal processing and modelling. Wiley, 1996.
[3] Henrik Åkesson. DSP TMS320C31/C32 USER’S GUIDE. Applied Signal Processing
Research Group, Blekinge Institute of Technology, Box 520, SE-372 25 Ronneby, Swe-
den, March 2004.
[4] John G. Proakis. Digital signal processing: principles, algorithms and applications.
Prentice-Hall, Inc., third edition edition, 1996.
15