In the detection of tones for fax and modem, three different families of tones are considered.
• CNG pure fax tone at 1100 Hz
• ANS family ANS, /ANS, ANSam, and /ANSam with 2100-Hz phase and amplitude modulations
• V.21 FSK modulations
A summary on the fax and modem tones are given in Table 14.2. For complete specifications, refer to the ITU recommendations [ITU-T-V.8 (2000) , ITU-T-V.25 (1996), ITU-T-G.168 (2004)] and RFC2833 [Schulzrinne and Petrack (2000)].
Table 14.2. Summary on Fax and Modem Tones and Parameters
|Phase,||Fax – or|
|Signal name||± tolerances||modulation||Power levels||duration||information|
|CNG tone||1100 ± 38 Hz||No phase, No||Typical||0.5 on, 3 s off||sending side|
|CED or||2100 ±15 Hz||No phase, No||0 to -30 dBm||2.6 to 4.0 s||terminating|
|/ANS tone||2100 ± 25 Hz||Phase||0 to -30 dBm||minimum of||mainly|
|180 ± 25 °,||reversals||and some|
|rejects 0 to||for 450 ±||fax|
|110°, no||25 ms||machines|
|ANSam||2100 ± 1Hz||No phase||0 to -30 dBm||2.6 to 4.0 s||modems|
|AM 15 ±|
|/ANSam||2100 ± 1 Hz||Phase||0 to -30 dBm||With phase||V.34 – capable|
|180 ± 25 ° ,||and||some|
|rejects 0 to||duration of||modems|
|110 ° , AM||2.6 to 4.0s|
|15 ± 0.1 Hz|
|V.21 FSK,||1750 ± 100 Hz||Binary FSK,||greater than||1s ±15%||after|
|DIS, etc.||FSK||channel – 2||-43 dBm||answering|
|a delay of|
|75 ± 20 ms|
CNG Fax Tone Detection
The CNG detection involves passing the samples through a band-pass filter (BPF) centered at 1100 Hz. A typical bandwidth of BPF is between 64 and 100 Hz. An output of BPF is envelope detected and checked for proper power levels, duration, and repetition. Power levels have to be calibrated usually with a |>law sine wave treating an 8159 sine wave amplitude as +3.17-dBm power.
The accepted power level for CNG is wider in range. Based on power level, several signals could pass through a 1100- Hz centered BPF and appear as CNG detection. To avoid false detections, it is required to monitor out-of-band energy. To take care of this requirement, it is required to pass the input through band elimination or a notch filter centered at 1100 Hz. The power levels observed in the notch filter path act as a reference for out-of-band energy. The fax machine generates CNG; hence, there is no extra voice or background acoustic pick-up in the fax call. Thus, a threshold of about 24dB is allowed, which means out-of-band energy is at least 24 dB below the in-band (1100 Hz BPF path) power level for the duration of the tone. This 24 dB depends on the notch filter, notch bandwidth, and role off. The notch filter has to be wider than the BPF bandwidth. The notch filter may use a notch bandwidth of the order of 200 Hz. Broadly this approach with BPF and notch filters avoids the wrong detection of CNG with voice conversation. The logic can be perfected in many ways based on filter characteristics, various states, and timing of the voice and fax call.
Interpretation on Notch Filter Requirements. Assuming test input is at 1020 Hz at a power level of -10 dBm. A BPF at 1100 Hz may provide a response of 12dB down at 1020 Hz with reference to a peak response at 1100 Hz. A 1020-Hz tone will appear in BPF output as -22 – dBm power, because of 12 – dB attenuation on top of -10- dBm input level. The signal at -22 dBm may be detected in the CNG detection process. With a notch filter channel, the notch filter will estimate a power of -10 dBm and the BPF path will estimate a power of -22 dBm, which will cause detection to fail. This sort of BPF and notch filter channel processing ensures proper first-level protection from multiple strong disturbances. A similar interpretation can be extended to speech, tones, and background disturbances.
ANS Family Fax and Modem Detections
ANS family tone detections are given in Fig. 14.6. ANS family tone detection has to take care of basic 2100-Hz tone validation, phase, and amplitude modulations. The principles followed in the CNG detection with two filters are essential for ANS 2100-Hz detection. Several holding and guard band characteristics are defined in the G.168 recommendations [ITU-T-G.168 (2004)] for 2100-Hz tones. These conditions will translate in the BPF, notch filter
Figure 14.6. Modem and fax tone detections.
bandwidth, power decision thresholds, and timing on the BPF output envelope.
Phase Demodulation. Phase demodulation of 180 ± 25° happens once in 450 ± 25 ms on /ANS and /ANSam signals. The BPF filter output for a 180° phase shift and a 110 ° phase shift is shown in Figs. 14.7 and 14.8, respectively. The waveforms are shown with phase modulation. BPF is a narrowband filter. Passing PSK signals through a narrowband gives amplitude change. It also gives very interesting observations. Phase discontinuity makes the filter change the waveform from one phase to another phase. This process takes the BPF output amplitude through deep nulls, and these nulls are required to be detected for the decision. If phase is 110°, nulls amplitude is low. To distinguish between 180 ± 25° and 0 to 110°, it is required to look at the nulls depth.
In the case of CNG, 2100-Hz ANS and ANSam tones, a block-based power envelope is sufficient for comparison and decision making. In the case of /ANS and /ANSam, it is required to estimate the exact envelope on a sample basis to identify phase discontinuity. For this estimation, a simple single-pole infinite impulse response (IIR) filter given in [URL (SPRA073) , URL (SPRA576)] can be used. If BPF filter output is x(n), this sample-based envelope output y(n) is given as
In the equation, lx(n)l is the absolute value of x(n). Notch filter output can be used as a block-based power estimation for threshold comparison.
Figure 14.7. BPF output for 2100-Hz tone with 180-degree phase reversal once in 15 ms (15 ms used in place of 450 ms just to show waveform clearly). (a) Tone at 2100 Hz with phase reversals. (b) Band-pass filter output. (c) Amplitude envelope.
Detection Steps for /ANS
Initial validation of the 2100-tone is based on in-band (BPF path) absolute power in the range of 0 to -30 dBm, and this power is much greater than notch filter channel power, which ensures first-1 evel criteria of 2100-Hz pure tone detection based on power levels and band energy. Overall, 2100-Hz tone power is from 0 to -30 dBm. With varying power, it is difficult to decide on the right threshold to distinguish between 180 ± 25° and 110°. Interestingly, these thresholds can be made adaptive. Tone average power is already known from pure tone. This power need not be calibrated on an absolute scale of dBm. It is for relative comparison. The nulls threshold can be derived as a factor of several dB down from the average power. This will track power and works
Figure 14.8. BPF output for 2100-Hz tone with 110-degree phase reversal once in 15 ms (240 samples, i.e., 15 ms used in place of 450 ms just to show waveform clearly with multiple phase changes). (a) Tone at 2100 Hz with phase reversals. (b) Band-pass filter output. (c) Amplitude envelope.
properly for a wide range of power levels. This type of adaptive threshold eliminates requirements of automatic gain control (AGC).
In general, the null width depends on the filter bandwidth. If BPF is too wide, then the null width is too small in duration. It is required to use a BPF of 64 to 100 Hz to get about a 10-to 15-sample null width at 8000-Hz sampling for 180 °. The null width will keep reducing by a few samples for a 110 ° phase shift. This additional measure discriminates in width in addition to the null depth.
Amplitude Demodulation for ANSam and /ANSam
The steps of ANS and /ANS are applicable for ANSam and /ANSam for validating a pure 2100-Hz tone and for phase modulations of 180° for /ANSam. The envelope of the 2100-tone will include 15-Hz amplitude modulation. The envelope of a pure 2100-Hz tone has to be subsampled to greater than 30 Hz. A typical sampling of 100 Hz may be used as it matches with 10 – ms VoIP packet intervals. AM envelope detection requires passing the envelope through 15-Hz BPF. The bandwidth could be about 2 to 5 Hz centered on 15 Hz. After ensuring proper filter gain calibration, the envelope can be validated with a mean envelope for the depth of the modulation of 20%. There could be a few logic steps and additional threshold windows to see that modulations are within a span of the 15% to 25% range. In this summary note, the basic principle for AM detection is given. Many variants could be based on the overall algorithm’s design and reuse of any other developed modules.
Summary on Fax and Modem Detections
CNG and ANS detection can be simple detections with pure tones extraction with BPF and notch filter output power level comparison and absolute power thresholds. /ANS, ANSam, and /ANSam require several processing steps to get phase and amplitude modulations. The basic steps in processing for tone detections are given in this topic. Using similar steps with an adaptive threshold scheme, a robust tone detector can be designed. V.21 is additionally used for discrimination of a fax/modem call, as V.21 is always present irrespective of the CED tone. In general, most tones are generated from fax machines at -10 to -20 dBm. Some tones are sensitive up to -43dBm as per recommendations. In practical implementation, it may be sufficient to cater to power levels up to -20 to -24 dBm as a default with the configuration to work up to the lowest levels as per the recommendations. A V.21 detection scheme is given in the next section.