Complete Communications Engineering

voice over internet protocol voip reference design banner

Digital Signal Processing for Hearing Aids

ADWC

1 Introduction

Hearing aid technology has developed substantially over the last few centuries. We’ve advanced from the ear trumpets of the 1800s to the digital hearing aids we’re familiar with today. Although useful and efficient hearing aids are now something we take for granted, their design process is anything but simple. Any digital device in close proximity to an individual’s head all day must be safe, comfortable, aesthetically pleasing, and easy to use. In addition to these general design constraints, the technical challenges of hearing aids are numerous. This paper addresses some of these challenges and presents applications which may be useful for hearing aid developers.

Section 2 discusses methods of feedback cancellation. A hearing aid must contain a microphone and speaker in close proximity which can lead to feedback. This feedback is not only unpleasant for the user, but can even be dangerous if not carefully controlled. We describe how to remove feedback with or without knowledge of the feedback transfer function, including how to use an adaptive notch filter in the no knowledge case.

Section 3 discusses hearing aid design for individuals with severe hearing loss in isolated frequency ranges. Frequency shifting is introduced which can allow a person to hear sounds they would usually not be able to, no matter how loud their volume. Frequency shifting relies on distortion algorithms which are important for improving the intelligibility of sound.

Section 4 discusses controlling dangerously loud signals using audio compressors. People with impaired hearing often require signals to be loud in order to hear properly, but amplifying sound too much can cause harm to the ears. Audio compressors not only address this issue, but also include features which make the listening experience more enjoyable such as attack and release windows.

2 Feedback cancellation

There are two main causes of feedback in hearing aids. The first is when sound from the internal speaker leaks outside the ear and reaches the exterior microphone. This can be mitigated by ensuring the hearing aids are properly fitted to the user’s ears. The second is when sound travels through the hearing aid or head itself which is called structure-borne sound. Due to the size and weight limitations of hearing aids and the fact that hearing aid designers can’t modify the user’s head, it’s impossible to eliminate structure-borne feedback completely. Thus, it’s necessary for hearing aids to incorporate some form of feedback cancellation.

The topmost diagram of Figure 1 shows a feedback loop. When the hearing aids receive an input signal x , the signal played out inside the user’s ears is

y = \frac G{I - FG} x

where G is the transfer function of the hearing aids, F is the transfer function of the feedback, and I is the identity function. Equation 1 shows that feedback causes the transfer function of the hearing aids to change from G to G / (I - FG) . To revert the transfer function of the hearing aids back to its original state, either the input signal can be modified or a post-filter can be applied to the output signal. Modifying the input signal is appropriate when the feedback transfer function F is known, and post-filtering is appropriate when it’s not.

Figure 1: Feedback loop (top) [source], feedback cancellation by input signal modification (bottom
left) [source], and feedback cancellation by post-filtering (bottom right) [source]
Figure 1: Feedback loop (top) [source], feedback cancellation by input signal modification (bottom
left) [source], and feedback cancellation by post-filtering (bottom right) [source]

Modifying the input signal is convenient if the feedback transfer function is known. If F is known, the feedback can be predicted and subtracted off from the input signal before it’s passed through to the hearing aid filter G . This idea is shown in the bottom left diagram of Figure 1. A drawback of this method is that measuring the feedback transfer function $F$ is often impractical for most hearing aid products. Typical methods to measure transfer functions require playing a signal inside the ear. If the feedback ever changes, this measurement would need to be performed again which would be both inconvenient and potentially uncomfortable for the user. This is why the post-filtering approach is often preferred.

The post-filtering method is convenient if the feedback transfer function is unknown. The ideal post-filter is H_{post} = (I + FG)^{-1} which would be difficult to calculate even with knowledge about F due to the inversion. For this reason along with the fact that the feedback transfer function can change, an adaptive filter is used for post-filtering. Hearing aid feedback typically has a dominant frequency, so the noticeable effects of feedback can be minimized by attenuating this single dominant frequency. This is accomplished through the use of a notch filter. An adaptive notch filter can track the dominant frequency and heavily attenuate it before playing out the resultant signal inside the ear. Even though feedback can’t be perfectly canceled without knowing the feedback transfer function, adaptive notch filters work very well in practice and can make feedback unnoticeable.

3 Frequency shifting

In cases of severe hearing loss, a person may have small frequency ranges they are unable to hear or require significant amplification in order to hear. In the former case, no amount of amplification will allow the individual to hear those frequencies. In the latter case, amplification to such extreme levels may cause physical damage to the individual’s ears. One solution to this problem is frequency shifting which involves altering incoming sounds so they are composed entirely of frequencies which lie within the audible range of the listener. It’s important to note human’s perceive the ratio between different frequencies, not the absolute difference between frequencies. Thus, frequency shifting implementations should try to keep the ratios of frequencies after shifting as close as possible to their ratios before shifting.

A common scenario is one in which a hearing aid user cannot hear high frequencies anymore. This can be combated by lowering all sounds by, say, a third of an octave. This should allow the user to hear without difficulty again, but it will require a period of adjustment as they get accustomed to everything having a lower pitch. A potential pitfall of this simplistic approach is it can shift low frequencies below the user’s audible frequency range, and it won’t work for hearing loss in the middle of the audible spectrum. For example, consider a person who cannot hear frequencies between 1000 and 1100 Hz. A constant scaling which shifts 1100 Hz down to 1000 Hz would allow them to hear those frequencies, however it would make frequencies between 1100 Hz and 1210 Hz inaudible. This could make intelligibility even worse than it was before frequency shifting.

To avoid shifting frequencies into inaudible frequency ranges, some amount of distortion is required. Instead of scaling all frequencies by the same ratio, higher frequencies are lowered more than lower frequencies. This makes the sound heard by the listener an imperfect representation of the true signal. However, effective distortion can make the signal more intelligible which is of greater importance than accurately representing the original waveform.

4 Audio compressors

Figure 2: The top figure shows an input signal (blue) which is processed by an audio compressor to produce an output signal (orange). The bottom plot shows the gain (green) of the audio compressor. [source]
Figure 2: The top figure shows an input signal (blue) which is processed by an audio compressor to produce an output signal (orange). The bottom plot shows the gain (green) of the audio compressor. [source]

Each person has their own hearing threshold which is how loud a sound must be before they are able to perceive it. This threshold depends not only on the individual, but also on the frequency of the sound. Humans are best at perceiving sounds between 1 and 2 kHz with much lower or much higher frequencies needing to be louder before they’re perceivable. Each person also has their own pain threshold which is how loud a sound must be before it starts to become uncomfortable. Just as for hearing thresholds, pain thresholds depend on frequency. People with hearing loss, either from age or other causes, typically have higher hearing thresholds but unchanged pain thresholds. This means they have a smaller dynamic range, i.e. the range of sounds they can comfortably listen to is smaller.   

To accommodate a smaller dynamic range in those with impaired hearing, an audio compressor is used. An audio compressor works by passing an input signal unmodified if it has a low volume, and attenuating the signal if it has high volume. The loudness at which this attenuation starts is called the audio compressor’s threshold. Above the threshold, the amount the signal is attenuated is called the compression ratio. Audio compressors usually employ an attack time which is the length of time the compressor takes before reaching maximum attenuation after the signal crosses the threshold. Similarly, an audio compressor usually employs a release time which is the length of time it takes before reaching zero attenuation after the signal goes below the threshold. Typical attack times are around 5 ms while release times are around 25 ms [1, p. 211]. An example audio compressor with all these features labeled is shown in Figure 2.

5 Conclusion and review of applications

In this paper, we’ve described various challenges of hearing aid design and introduced solutions to them. In section 2 we explained why feedback is unavoidable which is why hearing aids must implement some form of feedback cancellation. This can be done through algorithms which measure the feedback transfer function. Alternatively, an adaptive notch filter can be used which has the advantage of not disturbing the hearing aid user. In section 3 we described why traditional methods of amplifying signals don’t work for individuals with severe hearing loss. Frequency shifting is a solution which can help such individuals hear again. It can be implemented using advanced distortion algorithms which improve the intelligibility of sound more than constant frequency scaling. In section 4 we showed why audio compressors are important for controlling uncomfortably or even dangerously loud sounds. They provide an improvement over simple saturation by converting an abrupt cutoff into a gradual one. Audio compressors also come with features such as attack and release algorithms which improve the listening experience of the user.

References:

1Li, F.F., & Cox, T.J. (2019). DSP in Hearing Aids. Digital Signal Processing in Audio and Acoustical Engineering (pp. 201–218). CRC Press. https://doi.org/10.1201/9781315117881