1. Field of the Invention
This invention relates to communications systems and more particularly relates to a method and apparatus to efficiently implement dynamic thresholding in tone detectors utilizing data tables and shared decision paths.
2. Description of the Related Art
Communication systems often utilize a loop to connect terminal equipment such as telephone instruments, facsimile machines, private branch exchanges, key telephone systems, voice mail systems, modems, computers, alarm systems, radio controlled systems and telephone answering machines as well as many other devices. These devices are often referred to as Customer Premises Equipment (xe2x80x9cCPExe2x80x9d). To perform various signaling applications such as telephone dialing, data entry, caller ID, and storage system control, Dual-Tone Multiple Frequency (xe2x80x9cDTMFxe2x80x9d) signals are often used. A DTMF signal is defined by two superimposed sinusoidal waveforms with frequencies generally chosen within the voice band.
Detection of multiple-tone, multiple frequency (MTMF) signals, such as Dual-Tone Multiple Frequency (DTMF) signals, in environments where one or more noise signals is present is generally recognized by those of ordinary skill in the art to be a complex issue. Detection of MTMF signals is particularly difficult when the noise signals share the voiceband used for inband MTMF signaling. One source of noise interference which impedes DTMF detection is referred to as xe2x80x9ctalk-offxe2x80x9d. Talk-off occurs whenever a signal tone detector erroneously accepts signal imitations, such as those produced by speech or music, as valid signals. These noise signals can imitate some of the temporal and spectral characteristics of signaling tones. These imitations are likely to trigger, or talk-off, signal tone detectors. An important goal in designing such detectors is making them immune to these signal imitations.
An additional problem with signal tone recognition is that signaling tones must, in some situations, compete with speech, music or other extraneous background noise. The existence of these complex noise signals introduces spectral components into the signal to be recognized that distort and ultimately impair the detection of valid signaling tones. A signal detector is said to have been xe2x80x9ctalked downxe2x80x9d whenever it fails to recognize valid signaling tones that were masked by noise signals such as speech, music or noise.
In one embodiment, the present invention provides an apparatus for determining energy threshold detection values for detecting at least one tone having a known frequency and duration in an input signal. The input signal is input over a period of time that is divided into frame portions including at least an initial frame portion and a last frame portion. An energy value is determined for the at least one tone during each frame portion. A set of control flags are set for the at least two frame portions based on the energy values being below a threshold value in previous frame portions and the presence of noise in previous frame portions. An offset into a data table is determined based on the control word, the offset being used to retrieve a scaling coefficient and an address of an energy value for the at least two frame portions from the data table. A second set of control flags provide information on the number of comparisons to energy values from previous frames that are required to determine the energy threshold detection value for each frame portion.
In another embodiment, the present invention provides a system for detecting at least one tone having a known frequency and duration in an input signal. The input signal is input over a period of time that is divided into substantially equal frame portions. The system generates energy values indicative of the energy of the input signal during each frame portion, and energy values indicative of the energy of the at least one tone during each frame portion. A signal filter receives the energy values and generates noise indicators for each frame portion based on the energy values. A dynamic threshold determiner generates an energy threshold for each frame portion based on scaling coefficients and addresses of the energy values for at least one frame portion. The scaling coefficients and address of the energy values are stored in a data table. Control flags, that are set based on the energy values being below a threshold value in previous frame portions and the presence of noise in previous frame portions, are determined for the at least one frame portion. The dynamic threshold determiner generates an offset into the data table based on the control flags, and retrieves a scaling coefficient and an address of an energy value from the data table based on the offset. A signal processor determines when the input signal includes the at least one tone based on the energy threshold, the noise indicator, and the energy value.
Another embodiment of the present invention detects a plurality of tones having known frequencies and duration in an input signal. The input signal is input over a period of time that is divided into at least four substantially equal frame portions. Energy values are determined for at least two of the tones during each frame portion. A signal filter receives the energy values and generates noise indicators for each frame portion based on the energy values. A dynamic threshold determiner generates an energy threshold for third and fourth frame portions based on scaling coefficients and addresses of the energy values for previous frame portions. The scaling coefficients and addresses of the energy values are stored in a data table. The energy threshold detection value for the initial frame portion is based on an expected energy level and whether noise is present in the input signal. The energy threshold detection values for the second frame portion is based on a scaled value of the energy value from the initial frame portion. A control word, incorporating a set of control flags that are set based on the energy values being below a threshold value in previous frame portions and the presence of noise in previous frame portions, is determined for third and fourth frame portions. The dynamic threshold determiner generates an offset into the data table based on the control word, and retrieves a scaling coefficient and an address of an energy value from the data table based on the offset. The offset is determined by masking selected bits in the control word. A second set of control flags located in the least significant bits of the scaling coefficients are set based on the number of comparisons against previous frame values required to determine the energy threshold detection values for third and fourth frame portions, the second set of control flags being set based on the presence of noise and on the energy values being below a threshold value in previous frame portions. The dynamic threshold determiner further compares the energy threshold detection value for subsequent frame portions to previous energy values based on the second set of control flags to determine if the energy threshold detection value is in-range of previous energy values. A signal processor determines when the input signal includes the at least one tone based on the energy threshold, the noise indicator, and the energy value.
The tone detector may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings.
FIG. 1 is a block diagram of an example of an application of the tone detector;
FIG. 2 is a block diagram of components included in the tone detector;
FIG. 3 is a flowchart diagram for determining a dynamic energy threshold for an initial frame;
FIG. 4 is a flowchart diagram for determining a dynamic energy threshold for a second frame;
FIG. 5 is a flowchart diagram for determining a dynamic energy threshold for a third frame;
FIG. 6 is a flowchart diagram for determining a dynamic energy threshold for a fourth frame;
FIG. 7 is a flowchart diagram for determining an offset into a data table containing scaling coefficients and addresses of energy values for frame portions; and
FIG. 8 is a flowchart diagram for determining energy threshold values based on a set of control flags embedded in the scaling coefficients.