Echo Cancellation for Hands-Free Systems 19Maximum supported echo delay 381 ms // 2643 ms Maximum length of dispersion area 4 ms Minimum attenuation on the returned echo 6 dB Speech dete
Trang 1Echo Cancellation for Hands-Free Systems 17
5 Real-time DSP implementations
This section addresses real-time implementations of long-distance AEC systems on DSP fromTexas Instruments with code optimized for real-time processing We consider AEC on ahands-free system developed on the TMS320C50 and TMS320C6713 DSP platforms
The TMS320C50 operates at 41 MHz, has a on-chip RAM of 10 K word and a 32 kB PROM with
communication kernel Texas Instruments (1993) The analog interface circuit (AIC) has 14 bit
resolution The TMS320C6713 Kehtarnavaz (2004) has a master clock of 225 MHZ, delivering
1800 MIPS and 1350 MFLOPS The analog stereo interface is carried out by the AIC 23 codec,with sampling rates from 8 to 96 kHz, with 16, 20 and 24 bits per sample Fig 13 shows the
block diagram of the development starter kit (DSK) C6713 developed by Spectrum Digital1forTexas Instruments; the DSK has 192 kB of internal RAM and 16 MB of external RAM
Fig 13 The block diagram of the Development Starter Kit C6713 developed by SpectrumDigital for Texas Instruments (adapted from Spectrum Digital Inc., DSP DevelopmentSystems (2003))
5.1 The (improved) short-length centered adaptive filter approach
The first approach of AEC system based on centered adaptive filter reported in Marques
et al (1997) and described in Subsection 4.1 was implemented on the TMS320C50 DSP.The approach described in Subsection 4.2 and reported in Ferreira & Marques (2008)was implemented with TMS320C6713 using the DSKC6713 The code, written in C++programming language, is located on the 192 kB internal RAM, along with the data Thecode was compiled with level-3 optimization Kehtarnavaz (2004), for faster execution:
• using allocation of variables to registers;
• elimination of unused code, unused assignments and local common expressions;
• simplification of expressions and statements;
• software pipelining;
• loop optimizations and loop unrolling;
• removal of functions that are never called; simplification of functions with return valuesthat are never used
1
349Echo Cancellation for Hands-Free Systems
Trang 218 Will-be-set-by-IN-TECHThe filters are managed as circular buffers and inline functions are used whenever possible.The sampling rate is 8 kHz, and the number of bits per sample is 16 (the minimum allowed
by the AIC23 codec), suited for speech signals This way, we have 125 μs between two
consecutive samples, and this is the maximum processing time to meet real-time requirements(28125 instructions, under a 225 MHz clock) The time delay estimator has the largest amount
of total processing time, being not possible to completely update the time delay estimation,within 125μs Between two consecutive samples, we update only a small portion of the filter
coefficients
5.2 An optimal step approach
The optimal step approach of Özbay & Kavsao ˘glu (2010) also uses the Texas InstrumentsTMS320C6713 with DSKC6713, because it is an up to date architecture The authorsestablished an experimental setup including the DSKC6713 board, a laptop computer, anamplifier, a loudspeaker, and two microphones They have considered two scenarios ofapplication:
• in the first scenario, two microphones were placed close to the loudspeaker;
• in the second scenario one microphone was placed close to the loudspeaker and speechtrial was implemented in the far-end microphone
The experimental results show the adequacy of the proposed solution
6 Experimental results
This section presents some experimental results obtained with the AEC systems described inSubsections 4.1 and 4.2, respectively
6.1 The short-length centered adaptive filter approach
Using a single TM5320C50 DSP with no external memory, the system detects and cancels anecho with a delay of more than 380 ms Considering a configuration with 64 Kwords of datamemory, the maximum supported delay is larger than 2.5 seconds
Table 3 shows the computational requirements for a TMS320C50 DSP Considering anunidirectional configuration and an active region of 4 miliseconds, the maximum supportedecho delay is very significant (greater than 2.5 seconds)
Module function Processor clock-cycles Percentage
Time-delay estimator 82+18*corrl 3.28+0.72*corrl
Centered adaptive filter 114+6*M 4.56+0.24*M
Table 3 Computational requirements for a TMS320C50 DSP with the AEC approach
described in Subsection 4.1 M is the supported echo region length (order of FIR filter) The
number of computations per sampling period has been reduced by dividing the computation
of the cross-correlation function into blocks, each with length corrl.
Table 4 describes the main features of the developed AEC system The maximum length ofthe echo path is proportional to the available amount of memory We have two values forthis parameter, corresponding to the internal memory of the DSP and the external memoryavailable on the DSK (64 kB), respectively
Trang 3Echo Cancellation for Hands-Free Systems 19
Maximum supported echo delay 381 ms // 2643 ms
Maximum length of dispersion area 4 ms
Minimum attenuation on the returned echo 6 dB
Speech detector level 6 dB below emission level
Hold time after speech detection 75 ms
Table 4 Main features of the AEC approach with TMS320C50 DSP described in
Subsection 4.1 The maximum supported echo delay depends on the amount of
internal//external memory
Fig 14 shows the ERLE (in dB) obtained by the AEC system with simulated, electric, and realecho paths, as a function of time As expected, we get the best results on the simulated echopath, due to the adequacy of the adaptive filter to this path The electric echo path is easier
to cancel than the acoustic echo path, in which due to its non-linearities, the experimentalresults show less attenuation than for the other two paths Even on the acoustic echo pathwhich is the most difficult, we rapidly get 10 dB of attenuation, in less than 30 ms (which isroughly the delay time that a human user perceives the echo); this attenuation stops about -20
dB which is a very interesting value In summary, ERLE is greater than 41 dB in just 80 ms in
a simulated echo path; with real electrical and acoustic echo paths, 24.5 dB and 19.2 dB havebeen measured, respectively
Fig 14 Echo canceller ERLE in simulated, electric and acoustic paths On the acoustic path,which is the most difficult we get about 10 dB of attenuation in less than 30 ms
Table 5 compares this system with the CCITT G.165 recommendation, for a real situation, onthe following tests:
• CR - Convergence Rate;
• FERLAC - Final Echo Return Loss After Convergence;
• IRLC - Infinite Return Loss Convergence;
• LR - Leak Rate
351Echo Cancellation for Hands-Free Systems
Trang 4Fig 15 Real speech signal (top) and real/estimated delay obtained by the TDE module TheTDE block has a good performance on the presence of real speech Adapted from Marques
et al (1997)
In Fig 16 the usefulness of the speech detector to prevent the filter coefficient drift isemphasized In the presence of double talk, with the speech detector disabled the coefficientdrift happens
Trang 5Echo Cancellation for Hands-Free Systems 21
Fig 16 The speech detector prevents filter coefficient drift in the case of double talk With thespeech detector disabled, coefficient drift happens Adapted from Marques et al (1997)
Max length of dispersion area 4 ms
Max memory (data + code) <192 kB
Returned echo minimum loss 6 dB
Speech detector 6 dB below threshold
Table 6 Main features of the AEC approach with TMS320C6713 DSP described in
Subsection 4.2
6.2 The improved short-length centered adaptive filter approach
The tests were carried out in DSP Code Composer Studio (CCS) environment, with codewritten in C++, using real signals Table 6 summarizes the developed system features Thetotal amount of memory needed for the echo canceler data and code is low (and proportional
to the maximum expected delay) making it suited for an embedded system The total amount
of memory required can be reduced, using a fixed-point DSP The adaptive centered filters
353Echo Cancellation for Hands-Free Systems
Trang 622 Will-be-set-by-IN-TECHhave 32 or 64 coefficients, while FIR-based time delay estimator uses up to M=4000 coefficients(delays up to 0.5 seconds), giving a reasonable range of delays, suited for several applications.Fig 17 shows the (typical) centered adaptive filter coefficients (with 32 active coefficients), for
a speech signal Only a small subset of coefficients is far from zero according to the echo pathcharacteristics, as expected; this is a typical test situation Fig 18 displays the echo and error
Fig 17 Centered adaptive filter coefficients Only a small subset of coefficients is far fromzero
signals for a speech signal, while Fig 19 displays the achieved attenuation, of about 20 dB, forthe speech signal on its voiced parts It is interesting to note that how attenuation increases onthe voiced parts of the speech signal, according to the AEC fundamental concepts presented
in Subsections 2.1 and 2.2
Fig 18 Echo (top) and error (bottom) signal Whenever there is echo with higher energy theadaptive filter error signal follows it On its portions with higher energy, the error signalshows a decaying behavior that corresponds to the convergence of the adaptive filter
Fig 19 Attenuation obtained for the speech signal of Fig 18 We have increased attenuation
on the voiced parts of the speech signal
Table 7 compares our system with the CCITT G.165 recommendation levels, for a realconversation We conclude that this system approaches the recommendation levels for
Trang 7Echo Cancellation for Hands-Free Systems 23
Test Description CCITT G.165 Requirement System Performance
Fig 20 Attenuation for the echo paths real (acoustic), electric and simulated (real-time onCCS)
is much larger than the other two, as expected On the other hand, the attenuation for theelectric echo path is around 30 dB, which is a considerable value Finally, for the acousticpath we get about 10 dB of attenuation, which is also an acceptable practical value Thisresult was expected due to the strong non-linearities in the acoustic echo path, caused by theloudspeakers and microphone
7 Conclusions
In this chapter, we have addressed the problem of acoustic echo cancellation Echo being
a delayed and attenuated version of the original signal produced by some device, such as
a loudspeaker, causes disturbing effects on a conversation This problem arises in manytelecommunication applications such those as hands-free systems, leading to need of itscancellation in real-time The echo cancellation techniques have better performance than theoldest and simpler echo suppression techniques
We have reviewed some concepts of digital, statistical, and adaptive filtering Some solutionsfor real-time acoustic echo cancellation based on adaptive filtering techniques, on digitalsignal processors were described in detail
We have addressed some implementation issues of adaptive filtering techniques in real-time.After the description of the acoustic echo cancellation solutions in some detail, we havefocused on their real-time implementations on well known digital signal processor platforms,
355Echo Cancellation for Hands-Free Systems
Trang 824 Will-be-set-by-IN-TECHdiscussing its main characteristics as well as their experimental results according to standardmeasures.
7.1 Open challenges: future work
Altough adaptive filtering techniques have been proved efficient for the echo cancellationproblem, there are some open challenges that lead to directions of future work One of themost important directions of current and future research, due to its importance and difficulty
is to model the non-linear echo path Since we use linear filters to model the echo path, it
is not possible to guarantee a complete echo cancellation when the echo path is non-linear
In these situations, better results can be obtained with non-linear filters or with linear filterscomplemented by non-linear functions The challenge is thus positioned at choosing adequatenon-linear filters and non-linear functions that accurately model the echo path, being able toachieve even better and faster cancellation results
8 Acknowledgments
This work has been partly supported by the Portuguese Fundação para a Ciência e Tecnologia
(FCT) Project FCT PTDC/EEA-TEL/71996/2006
9 References
Antweller, C & Symanzik, H (1995) Simulation of time variant room impulse responses,
IEEE International Conference on Acoustics, Speech, and Signal Processing - ICASSP’95,
Vol 5, Detroit, USA, pp 3031–3034
Benesty, J., Gaensler, T., Morgan, D., Sondhi, M & Gay, S (2001) Advances in Network and
Acoustic Echo Cancellation, Springer-Verlag.
Birkett, A & Goubran, R (1995) Acoustic echo cancellation using NLMS-neural network
structures, IEEE International Conference on Acoustics, Speech, and Signal Processing ICASSP’95, Detroit, USA.
-Breining, C (1999) Acoustic echo control an application of very-high-order adaptive filters,
Digital Signal Processing 16(6): 42–69.
Ferreira, A & Marques, P (2008) An efficient long distance echo canceler, International
Conference on Signals and Electronic Systems, ICSES’08, Krakow, pp 331–334.
Gay, S & J.Benesty (2000) Acoustic signal processing for telecommunications, Kluwer Academic
Publishers
Gilloire, A & Hänsler, E (1994) Acoustic echo control, Annals of Telecommunications
49: 359–359 10.1007/BF02999422
URL: http://dx.doi.org/10.1007/BF02999422
Greenberg, J (1998) Modified LMS algorithms for speech processing with an adaptive noise
canceller, IEEE Transactions on Signal Processing 6(4): 338–351.
Hänsler, E (1994) The hands-free telephone problem: an annotated bibliography update,
Annals of Telecommunications 49: 360–367 10.1007/BF02999423.
URL: http://dx.doi.org/10.1007/BF02999423
Haykin, S (2002) Adaptive Filter Theory, 4th edn, Prentice-Hall.
Instruments, T (1986) Digital voice echo canceler with a TMS32020, I: 415–454
Instruments, T (1993) TMS 320C5X users guide
Jacovitti, G & Scarano, G (1993) Discrete time techniques for time delay estimation, IEEE
Transactions on Signal Processing 41(2): 525–533.
Trang 9Echo Cancellation for Hands-Free Systems 25Jeannès, R., Scalart, P., Faucon, G & Beaugeant, C (2001) Combined noise and echo reduction
in hands-free systems: A survey, IEEE Transactions on Speech And Audio Processing
9(8): 808–820
J.Ni & Li, F (2010) Adaptive combination of subband adaptive filters for acoustic echo
cancellation, IEEE Transactions on Consumer Electronics 56(3): 1549 – 1555.
Johnson, C (1995) Yet still more on the interaction of adaptive filtering, identification, and
control, IEEE Signal Processing Magazine pp 22 – 37.
Kehtarnavaz, N (2004) Real-Time Digital Signal Processing, Newnes.
Krishna, E., Raghuram, M., Madhav, K & Reddy, K (2010) Acoustic echo cancellation using
a computationally efficient transform domain lms adaptive filter, 10th International Conference on Information Sciences Signal Processing and their Applications (ISSPA),
Kuala Lumpur, Malaysia, pp 409–412
Kukrera, O & Hocanin, A (2006) Frequency-response-shaped LMS adaptive filter, Digital
Signal Processing 16(6): 855–869.
Kuo, S & Lee, B (2001) Real-Time Digital Signal Processing, John Wiley & Sons.
Kuo, S & Pan, Z (1994) Acoustic echo cancellation microphone system for large-scale
videoconferencing, IEEE International Conference on Acoustics, Speech, and Signal Processing - ICASSP’94, Vol 1, Adelaide, Australia, pp 7–12.
Liu, Z (1994) A combined filtering structure for echo cancellation in hand-free mobile phone
applications, International Conference on Signal Processing Applications & Technology,
Vol 1, Dallas, USA, pp 319–322
Marques, P (1997) Long distance echo cancellation using centered short length transversal filters,
Master’s thesis, Instituto Superior Técnico, Lisbon, Portugal
Marques, P & Sousa, F (1996) TMS320C50 echo canceller based on low resolution time delay
estimation, The First European DSP Education and Research Conference, Paris.
Marques, P., Sousa, F & Leitao, J (1997) A DSP based long distance echo canceller using short
length centered adaptive filters, IEEE International Conference on Acoustics, Speech, and Signal Processing - ICASSP’97, Munich.
Messerschmidt, D., Hedberg, D., Cole, C., Haoui, A & Winship, P (1986) Digital voice echo
canceller with a TMS320C30, Digital Signal Processing Applications 1: 415–454.
Oh, D., Shin, D., Kim, S & Lee, D (1994) Implementation of multi-channel echo canceler for
mobile communication with TMS320C50, International Conference on Signal Processing Applications & Technology, Vol 1, Dallas, USA, pp 259–263.
Oppenheim, A & Schafer, R (1999) Discrete-Time Signal Processing, 2nd edn, Prentice Hall
International, Inc
Orfanidis, S (ed.) (2007) Optimum Signal Processing, 2nd edn, McGraw-Hill.
Özbay, Y & Kavsao ˘glu, A (2010) An optimum algorithm for adaptive filtering on acoustic
echo cancellation using tms320c6713 dsp, Digit Signal Process 20: 133–148.
URL: http://portal.acm.org/citation.cfm?id=1663653.1663859
Sayed, A (2003) Fundamentals of Adaptive Filtering, Wiley-IEEE Press.
Sondhi, M (2006) The history of echo cancellation, IEEE Signal Processing Magazine 23(5): 95
Trang 1026 Will-be-set-by-IN-TECHWidrow, B., Glover, J., McCool, J., Kaunitz, J., Williams, C., Hearn, R., Zeidler, J., Dong,
E & Goodlin, R (1975) Adaptive noise cancelling: Principles and applications,
Proceedings of the IEEE 63(12): 1692 – 1716.
Widrow, B & Stearns, S (1985) Adaptive Signal Processing, Prentice Hall.
Witowsky, W (1999) Understanding echo cancellation in voice over IP networks, International
Conference on Signal Processing Applications and Technology (ICSPAT), Orlando.
Trang 1115 Adaptive Heterodyne Filters
1 Introduction
The heterodyne process has been an important part of electronic communications systems for over 100 years The most common use of the heterodyne process is in modulation and demodulation where a local oscillator produces the heterodyne signal which is then mixed with (multiplied by) the signal of interest to move it from one frequency band to another For example, the superheterodyne receiver invented by U.S Army Major Edwin Armstrong
in 1918 uses a local oscillator to move the incoming radio signal to an intermediate band where it can be easily demodulated with fixed filters rather than needing a variable filter or series of fixed filters for each frequency being demodulated (Butler, 1989, Duman 2005) Today you will find heterodyne as a critical part of any modern radio or TV receiver, cell phone, satellite communication system, etc
In this chapter we will introduce the concept of making a tunable or adaptive filter using the heterodyne process The concept is very similar to that of the superheterodyne receiver, but applied to tunable filters Most tunable filters require a complicated mechanism for adjusting the coefficients of the filter in order to tune the filter Using the heterodyne approach, we move the signal to a fixed filter and then move the signal back to its original frequency band minus the noise that has been removed by the fixed filter Thus complicated fixed filters that would be virtually impossible to tune using variation of the filter parameters can be easily made tuneable and adaptive
1.1 Applications of adaptive heterodyne filters
Modern broad-band wireless systems are designed to be co-located with older narrow-band communications so as to be able to share valuable spectrum (Etkin et al., 2005, Peha, 1998, 2000) This is accomplished by using a pseudorandom number sequence to control the spreading of the spectrum of the modern wireless transmitter so that it appears to be background noise that is easily filtered out by the narrow-band receiver The five most common techniques for achieving spread-spectrum communications are (1) Frequency Hopping Spread Spectrum (FHSS, e.g.: IEEE 802.11-1997) in which the signal is transmitted
at a random series of frequencies across the spectrum, (2) Direct Sequence Spread Spectrum (DSSS, e.g.: IEEE 802.11b and 802.11g) in which the transmitter multiplies the signal by a random sequence to make it appear like background noise, (3) Time Hopping Spread
Trang 12Adaptive Filtering
360
Spectrum (THSS, e.g.: IEEE 802.15) in which the carrier is turned on and off by the random
code sequence, (4) Chirp Spread Spectrum (CSS, e.g.: IEEE 802.15.4a-2007) which uses
wideband linear frequency modulated chirp pulses to encode the information, and (5) Ultra
Wide Band (UWB, e.g.: IEEE 802.15.3a – Note: No standard assigned, MB-OFDM and
DS-UWB will compete in market) based on transmitting short duration pulses
When working properly, the narrow-band transmissions licensed to the frequency spectrum
do not affect the broadband systems They either interfere with a small portion of the
broad-band transmission (which may be re-sent or reconstructed) or the narrow-broad-band signals are
themselves spread by the receiver demodulation process (Pickholtz et al., 1982) However,
in practice the narrow-band transmissions can cause serious problems in the
spread-spectrum receiver (Coulson, 2004, McCune, 2000) To alleviate these problems, it is often
necessary to include narrow-band interference attenuation or suppression circuitry in the
design of the spread-spectrum receiver Adaptive heterodyne filters are an attractive
approach for attenuation of narrow-band interference in such broadband systems Other
approaches include smart antennas and adaptive analog and digital filters, but adaptive
heterodyne filters are often a good choice for attenuation of narrow band interference in
broadband receivers (Soderstrand, 2010a)
1.2 Preliminary concepts
Figure 1 shows the most common digital heterodyne circuit The incoming signal x(n) is
multiplied by the heterodyne signal cos(ω0n) The parameter ω0 is the heterodyne frequency
which, along with all frequencies contained in x(n), must be less than 2 in order to avoid
aliasing
Fig 1 Basic digital heterodyne operation
Most textbooks analyze this basic heterodyne operation in the time domain making use of
trigonometric identities to show that the effect of the heterodyne operation is to generate
two images of the input signal x(n), one translated up in frequency by ω0 and the other
translated down in frequency by ω0 However, for our purposes it is better to view things in
the frequency domain (z-domain)
The time domain multiplication of x(n) by rotates the z-domain representation of the
signal X(z) left by ω0 to X(z ) The signal that was at DC, now appears at -ω0 Similarly,
the time domain multiplication of x(n) by rotates the z-domain representation of the
signal X(z) right by ω0 to X(z ) The signal that was at DC, now appears at -ω0 This
important relationship is expressed in the following equation (Dorf & Wan, 2000, Roberts,
2007):
y(n) cos(ω 0 n)
x(n)
Trang 13Adaptive Heterodyne Filters 361
If we express cos(ω0n) in terms of the complex exponential, we get the following:
From equation (2) we can clearly see the separation of the input signal into two signals, one
translated in frequency by rotation to the left ω0 and the other translated in frequency by
rotation to the right ω0 in the z-plane In a modulation system, we would filter out the lower
frequency and send the higher frequency to the antenna for transmission In a demodulator,
we would filter out the higher frequency and send the lower frequency to the IF stage for
detection
1.3 A simple tunable heterodyne band-pass filter
The basic heterodyne operation of Figure 1 can be used to implement a simple tunable
narrow-band band-pass filter using the circuit of Figure 2
Fig 2 Simple tunable heterodyne band-pass filter (H(z) must be a narrow-band low-pass
Equation (5) is obtained by the straight-forward application of equation (1) for the
multiplication of equation (4) by the cosine heterodyne function Equation (5) consists of
four separate terms If H(z) is a narrow-band low-pass filter, then the first two terms of
equation (5) represent a narrow-band band-pass filter centered at the heterodyne frequency
ω0
This narrow-band band-pass filter has only half the energy, however, because the other half
of the energy appears in the high-frequency last terms in equation (5)
Trang 14Adaptive Filtering
362
However, if H(z) is of sufficiently narrow bandwidth, these high-frequency terms will be attenuated by H(z) and equation (6) will substantially represent the output of the simple tunable heterodyne filter of Figure 2
Figure 3 shows the impulse response of the circuit of Figure 1 as simulated in MatLab for four different values of the heterodyne frequency Figure 3 was implemented by the following MatLab script (COSHET):
% COSHET (Lab book p 129 12/11/2010)
% Function to implement cosine heterodye filter
% Set the following inputs before calling COSHET:
% inp = 0 (provide input file inpf)
Figure 4 shows a MatLab simulation of the ability of the circuit of Figure 2 to attenuate frequencies outside the band-pass filter and pass frequencies inside the bandwidth of the band-pass filter The following MatLab script (GENINP) generates an input signal consisting of nine cosine waves spaced by π/10 in the z-plane:
Trang 15Adaptive Heterodyne Filters 363
% GENINP (Lab book p 129 12/11/2010)
% Generates nine sinusoidal inputs spaced by pi/10
% INPUTS: npoints = number of points
Fig 3a Tunable band-pass filter with = /5 Fig 3b Tunable band-pass filter with = 2 /5
Fig 3c Tunable band-pass filter with = 4 /5 Fig 3d Tunable band-pass filter with = 4 /5