5
\$\begingroup\$

Even a $20 mobile phone with a speakerphone has no problems of feedback. While I understand that companies like Mediatek have use crazy volumes to bring down mobile chipset prices so low, but reading some articles I get the impression that the circuitry/electronics to suppress/remove feedback from such speaker-phone arrangements where speaker and mic are placed in very close proximity, is fairly complex (involve powerful DSP), involved and expensive. Am I missing something very basic here ? Are there some environmental constraints that are used, in case of mobile-phone to simplify the design of such circuitry and there-by, keep the costs low ?

I am approaching this from the study of an el-cheapo baby-monitor with 2-way "talk" feature, where, in the problem of feedback is terrible. I've tried several things s.a. replacing the electret microphone, speaker type of this device, to no avail. This audio codec used on this device is apparently an ALC one but much of the chip's surface is etched, but I do know that the processor is a Winbond ARM7. It had a shiny sticker on top which I managed to scratch-off to reveal the part number.

\$\endgroup\$
  • \$\begingroup\$ I asked this same question before here: dsp.stackexchange.com/questions/338/… \$\endgroup\$ – Kellenjb Jan 3 '12 at 17:09
  • \$\begingroup\$ Feedback suppression is also used in hearing aids, with advanced algorithms that "tag" the sound produced so they can detect that it is feeding back. I wonder what kind of tiny chips they use. \$\endgroup\$ – endolith Mar 6 '14 at 15:48
6
\$\begingroup\$

The audio processing algorithm you are interested in is called "Acoustic Echo Cancellation", or AEC. It is most commonly used in speakerphones to remove the output of the speaker from the mic signal. Most of this benefit is to the person on the other end of the phone call, since he won't be hearing echos of himself.

Some cheap and not so cheap speakerphones don't use AEC. I have a Polycom speakerphone which is "half duplex". Meaning that when one side is talking, the other side is muted. Because of this, there is no chance for echos or feedback to happen. Unfortunately, this also allows for a "filibuster"-- if one side never shuts up then the other side can never interrupt.

There are many types of AEC algorithms, and almost every type is patented. Most of them involve some form of modeling, where a model of the "speaker to mic acoustic signal path" is created. Once created, we can predict how the speaker output will be picked up by the mic, and thus remove that signal from the mic, leaving only the intended sounds in the mic signal.

This model would thus figure out how the sounds reflect off of the walls and other things in the room, etc. The patents for AEC usually center around exactly how this model is initially created and later updated as things change in the room (mic position, position of people and furniture, etc).

In addition to the "room model", there are other noise-reduction algorithms used. While these algorithms are not technically part of AEC, there are no useful implementations of AEC that don't use these. Normally there is some sort of simple noise-gate (or a multi-band noise gate). Other algorithms are also typically used, but are either patented or treated as a "trade secret"-- which is why I can't tell you about them! :(

Most AEC algorithms operate on a limited frequency range, 300 Hz to 3 KHz, which is the same frequency range as most telephones. Increasingly, wide-band AEC is becoming popular with the advent of higher-bandwidth teleconferencing/telepresence systems.

AEC algorithms are very computationally expensive, and the wide-band AEC requires several times more horsepower than the more limited versions. It is not uncommon for a single "run-of-the-mill" DSP to only be able to do 1 or 2 channels of AEC. For a high quality wide-band AEC, a single high-powered DSP might be required for a single channel.

AEC algorithms are also very difficult to implement. In the entire USA, there are perhaps only 10 or 20 people who have the ability to write a good one. One very smart person that I know just wrote a wide-band AEC algorithm and it took him over a year!

For a 2-way baby monitor, I highly recommend using a half-duplex approach!

\$\endgroup\$
  • \$\begingroup\$ Thanks @David. Given your description, it is then fair to conclude that AEC implementations would be licensed/royalty-based DSP software, and there might not be any reasonably good FOSS implementations fit for general-purpose application-processor ? While not 100% sure, but AEC does ring a bell as something that might be implemented as part of some of the low-bandwidth VoIP codecs, including some FOSS ones ? If so, could those be usable ? \$\endgroup\$ – icarus74 Jan 3 '12 at 17:26
  • \$\begingroup\$ And, BTW, for my purpose, I agree that a half-duplex approach sounds 'good enough' (& probably quite simple). I've come-across a nice whitepaper from Polycom on this subject. \$\endgroup\$ – icarus74 Jan 3 '12 at 17:28
  • \$\begingroup\$ @icarus74 There is almost certainly an open-source AEC somewhere. There is also a good chance that it violates some patent somewhere. And it's almost certainly going to sound not-as-good as a "professional" implementation. The AEC that is included with VOIP is probably made for normal phones and not speakerphones, as speakerphones requires something more sophisticated. There are companies that sell pre-programmed DSP's for AEC, or other licensed/royalty based approaches. Buying just a handfull of these DSP's isn't worth it, as they aren't set up for dealing with these low qty. \$\endgroup\$ – user3624 Jan 3 '12 at 18:12
  • \$\begingroup\$ Thanks @David. I get the point. Looks like half-duplex its gonna be. \$\endgroup\$ – icarus74 Jan 5 '12 at 4:08
3
\$\begingroup\$

One approach which is very common in low-cost speakerphones is to adjust the gain downward (possibly to zero) on whichever 'direction' has the lower apparent signal at the input. Some phones will mute the microphone except when the audio level at the mic is higher than could be attributed to speaker feedback, in which case they mute the speaker. Other phones use a more adaptive approach, cutting the quieter path enough to keep the overall echo-loop gain well below one, but not so much that both parties could be talk without being aware that the other was trying to do so.

Perfect echo cancellation is hard, but combining reasonably-effective echo cancellation with adaptive attenuation of the 'quieter' signal path can give results that are, subjectively, almost as good.

\$\endgroup\$
  • \$\begingroup\$ Thanks @supercat. This does seem to be quite similar to the approach (half-duplex) suggested above by David. Your answer does give me some valuable clues on how this could be implemented. For my purpose, only if I can suppress the terrible (/unbearable) howling that the Baby-monitor currently has, it'd be good enough. Some slight echo is tolerable. \$\endgroup\$ – icarus74 Jan 3 '12 at 17:30
2
\$\begingroup\$

This is a very late reply but I hope it helps a few. If you are a designer you could use echo cancellation IC from Microsemi, Cirrus Logic or Forte Media. You could choose your part based on your requirements from manufacturer websites. I could not find a echo cancellation IC that can be bought for less than $2 at 3000MOQ. There are low cost ARM chips which support software echo cancellation up to some level. Also if I am right many media-streamer libraries support echo cancellation.

\$\endgroup\$
1
\$\begingroup\$

This seems to claim to be just what you want

Telephone handset interface with feedback control pdf

Related HTML page

enter image description here

enter image description here

Telephone handset interface with feedback control United States Patent 5867573


And another balanced modulator

enter image description here

And another

enter image description here . ______________________________________________

Two methods used (out of ? ) are

  • Model the room response with a multi-tap filter and optimise for lack of correlation with input signal. Probably well inside the abilities of higher end DSPs and probably lower

  • Frequency shift signal passing from Mic to Spkr by a fixed amount so any "howl" round gets shunted sideways successively in frequency at each pass. Too much frequency shift and Y'All spik funny like. Too little and Y'All howl. This used to be done with a hardware 4 quadrant analog multiplier IC and nowadays would be an easy software task. - for values of easy that involve multiply real time signals together ;-).

Probably very easy once you get your brain around what's required


My method 1 above is fig 5 here

HTML version here

enter image description here

THEY SAY:

  • A sound reinforcement application is shown in figure 5. Here there is no far-end speech to feed the model. The local speech is immediately sent out the loudspeaker and is the only training signal available. The fact that the training signal is correlated with the local speech (seen as noise to the training process) provides a significant problem for the adaptive filter based modeling. This is particularly true if it is trying to maintain a model that is accurate over a broad frequency range.

    To overcome this problem some form of decorrelation is introduced (such as a frequency shift). This helps the broad band modeling process but adds distortion to the signal. As with the teleconferencing application if the model is not accurate further distortion occurs. The decorrelation, along with any added distortion due to an inaccurate model, makes this method less appealing for some venues. The big advantage to this type of a feedback suppressor is that your added gain before feedback margin is usually greater than 10 dB.

Re my method 2 the same paper says (and agrees with me re DSPs etc nowadays) and spikkin funny with too much sift..

  • Frequency Shifting

    Frequency shifting has been used in public address systems to help control feedback since the 1960's. Feedback gets generated at portions of the transfer function where the gain is greater than 0 dB. The loudspeaker to microphone transfer function, when measured in a room, has peaks and valleys in the magnitude response. In frequency shifting all frequencies of a signal are shifted up or down by some number of hertz. The basic idea behind a frequency shifter is that as feedback gets generated in one area of the response it eventually gets attenuated by another area. The frequency shifter continues to move the generated feedback frequency along the transfer function until it reaches a section that effectively attenuates the feedback. The effectiveness of the shifter depends in part on the system transfer function.

    It is worth pointing out that this is not a "musical transformation" as the ratio between the signal's harmonics is not preserved by the frequency shift. A person's voice will begin to sound mechanical as the amount of the shift increases. While "audible distortion" depends on the experience of the listener most agree that the frequency shift needs to be less than 12 Hz.

    How much added gain before feedback can be reasonably expected? The short answer is only a couple of dB. Hansler1 reviews some research results that indicate that actual increase in gain achieved depends on the reverberation time as well as the size of the frequency shift. Using frequency shifts in the 6-12 Hz range, a lecture hall with minimal reverberation benefited by slightly less than 2 dB. An echoic chamber with reverberation time of greater than 1 second could benefit by nearly 6 dB by the same frequency shift.

    Digital signal processing allows frequency-shifting techniques in a large variety of applications. When used in conjunction with other methods such as the adaptive filter modeling previously mentioned, it can provide an even greater benefit. However, the artifacts due to the frequency shifting are prohibitive in areas where a pure signal is desired. Musicians are more sensitive to frequency shifts, so think twice before placing a shifter in their monitor loudspeaker path.

Frequency Shifting


My method 2 is probably fig 27 here MC1494 used a a balanced modulator in Fig 27. Brain says they may use two and invert the signal to one input of one so you get only sum or difference out and not both. Note that text copied below says gain in gain is small. It would be interesting to know what happened if you pseudo randomly scattered the frequency shift.

More anon.

\$\endgroup\$
  • \$\begingroup\$ Thanks @Russell. Any chance you could 'dumb down' your explanation (esply method-2) a little. If there's an article explaining it, would be great. I'd hope that some IC manf would have an app-note for something like this. You wrote "... nowadays would be an easy software task..", as software on DSP or generic uC/uP ? \$\endgroup\$ – icarus74 Jan 3 '12 at 7:01
  • \$\begingroup\$ Thanks again @Russell. My simple mind is going to take a good while to fathom or wrap-around this, since my signal-theory fundamentals as rusty as can be. Voted up, and will accept answer once I understand it some more. \$\endgroup\$ – icarus74 Jan 3 '12 at 8:54
  • \$\begingroup\$ @Russell Most of what you outlined here doesn't work for speakerphones. For those, the acoustic coupling is over too great of a time frame for the methods you mention to work. What you say about "Figure 5" is close, but is more about feedback suppression than echo control. Frequency shifting doesn't work for smartphones. See my answer for more info. \$\endgroup\$ – user3624 Jan 3 '12 at 15:35
  • 3
    \$\begingroup\$ This answer really needs to be trimmed down to the relevant parts. \$\endgroup\$ – Chris Stratton Jan 3 '12 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.