A DSP BASED RINGING DETECTION/ATTENUATION AND
ADVANCE WARNING SYSTEM
by Ricardo Romero
Epilepsy in itself is a brain disorder in which groups of nerve cells or neurons in the
brain sometimes signal abnormally. In epilepsy, the normal pattern of neuron electrical
activity becomes disturbed, causing strange sensations, emotions, and behavior, or
sometimes convulsions, muscle spasms, and loss of consciousness. There are various things
that can trigger an epileptic seizure such as flashing lights or sudden changes from dark
to light (Photosensitive Epilepsy). Other people can react to loud noises or monotonous
sounds, or even certain musical notes.
This project will focus on the development of a DSP-based system for a patient that
suffers from recurrent bouts with sound induced epileptic seizures. Specifically, sounds
that are produced by telephone (rotary, cellular) rings and pagers. It should be noted,
however, that this patient has the ability to block the effect of the trigger
by merely being aware that the ring is about to occur.
This project pursues the design of a real-time DSP system that could receive the sounds
heard by the patient mentioned above with a microphone and deliver a processed audio
signal to headphones worn by him, while;
1. Providing an advanced warning of an incoming ring
2. Attenuating the ring in the signal delivered to the headphones at
least to a point where it will not trigger a seizure.
As such, the project pursues the design and implementation of the following systems:
Adaptive ring detector:
This application of the system will track and detect any strong periodic component in an
incoming audio signal and warn the patient of the impending ring with about 1 second ahead
Ring suppression or cancellation:
The system will track, detect and attenuate these strong periodic components in the
incoming audio signal. At this stage, attenuation rates of at least 25dB are being sought.
Subsequently, one of these two implementations will be used in the development of a stand
alone real-time system that will utilize a dedicated DSP processor, such as the TMS320C31
or a TMS320C6201. The choice of which of the implementations will be used will ultimately
be the decision of the patient.
We are currently favoring the implementation of the advance warning system, relying on the
ability of the patient to block the negative effects of the ring, if he has
advance notice of its impending occurrence.
Our initial hypothesis modeled the ringing disturbance in the incoming signal as just a
fixed periodic fundamental tone with its corresponding harmonics that was potentially
superimposed on speech, or other audio components. According to this simple model of the
targeted interference, an adaptive filter or ALP (Adaptive Line Predictor) could be
applied to solve this problem. The ALP would be ale to separate the periodic and speech
components from the incoming signal. The output of this filter would then consist of a
relatively undistorted speech signal.
However, spectral analysis of a couple of types of this particular disturbance (cellular
phone and office phone ringing sounds) brought about the notion that this disturbance is
not just one strong fundamental tone, but rather a combination of more than one strong
fundamental frequencies, all with their associated harmonics.
In addition, spectrogram of these rings shows that the spectral
composition of these signals varies with time. Using a recorded waveform that contained
speech and the ringing of an office telephone, an ALP was used to test the initial
hypothesis. The ALP was able to remove some of the ringing, however, the power of this
interference was still quite high, not to mention that severe degradation to the speech in
the recording that also took place.
Adaptive ring detector:
This method will work around the shortcomings of the ALP in regard to its
inability to deal with more than one strong, switching periodic component. In this method,
the incoming signal spectrum will be broken down into several bands for subsequent
processing by a set of ALP filters. Each filter will process its assigned band to
determine if there is any strong frequency component present in that band.
Figure 1. Spectrum
divided into M-1 bands
By reducing the number of strong frequency components at the input
of each adaptive filter this approach will enhance the performance of the ALP filters in
terms of quickly detecting any strong periodic component that is present in the incoming
Figure 2 shows a block diagram of the real-time adaptive system proposed. It includes
several components, but it is simply a system that receives an input, delays it just
enough to allow the hardware to perform the numerical calculations and then signal if at
any time there is an impending ringing. As mentioned previously, since the focus is now
mainly on detection, the system will give advanced warning of any incoming ringing by way
of a visual indicator, such as a Light Emitting Diode (LED). As soon as any ringing or
strong periodic component is detected in an incoming input audio signal, the LED would
turn on and remain on for as long as that periodic interference is present.
Figure 2. DSP based Ring Detector
(ALED = Adaptive Line Enhancer and Detector)
Figure 3. Band pass filter Banks
The first block of the adaptive system consists of bank of eight IIR
band pass filters, each having a bandwidth of 500Hz and covering a range from DC to
approximately 10Khz. The upper limit of this range was decided upon based on knowledge of
the hearing range for a normal human being. This is range is usually between 16 Hz to
16Khz, the upper limit falls off with increasing age. A bandwidth including up to 10KHz
will satisfy speech intelligibility requirements. Each filter is a 6th order Chebyshev
band pass IIR filter. The choice for this type of filter was made on the basis of the
filters sharp frequency cutoff response. The output of each filter will isolate any
significant strong spectral component that might be associated with the ringing or that
could also be associated with any other type of input (i.e. sirens, beepers) or even
Adaptive Line Enhancer and Detector:
Figure 4. Adaptive line Enhancer and detector
Once the input signal has been partitioned into different spectral
bands, each band is processed by its corresponding Adaptive Line Enhancer and Detector
(ALED). The ALED can be thought of as consisting of two parts; an Adaptive Line Enhancer
(ALE), and a modified spectral peak detector. The ALE filter will extract any strong
periodic component(s) from its given spectral band. The idea here is that a periodic
component is much more concentrated (larger power density) about a certain frequency than
any portion of speech over the frequency spectrum in that assigned band.
The output of the filter is then compared with the input portion of the signal. The
comparison is made on the basis of their RMS power measured over a small interval of time.
Using the ratio of the filter output power over the error power (output_power /
error_power), we can determine if there is a periodic component present by comparing it to
a fixed threshold level. If the filter fails to detect any strong periodic component this
ratio will be small, however in the event that the filter does detect some periodicity in
the spectral band the ratio will be considerably larger. The boundary that separates these
two events is set as a threshold value (Theta). If detection has taken place, a small
pulse will be triggered in that assigned spectral band.
Ring Output Detector:
Figure 5. Final detector
Given the fact that speech is quasi-periodic, there will be sections of
speech that may contain a periodic component of considerable strength. However, we would
like to prevent this speech periodicity from triggering a false alarm in the system. To address this problem, all the triggering pulses
from the individual single-band ALEDs are fed into the Ring output detector, which will
determine if there is ringing present. Since
speech, at the most can only trigger a detect signal in two frequency bands, while a ring
could trigger them in as many as four, all of the detect pulses are added up and the
result is compared to a threshold value (Theta2). This
value can be set to 2.1, and as such if the combined result of all the bands (detection
pulse) add up to more than 2, then we can say that a ring has been detected.
The initial results of this project at this time have been obtained from computer
simulations. It is hoped that by improving some of the critical areas of the system (i.e.
speed of response, optimum Band Pass Filter length, ALE structure) in simulation, then the
hardware implementation will not run into many obstacles.
Figure 6. Advance warning outputs generated by the system, from a typical audio
segment containing both speech and a telephone ringing.