Abstract:
A method of for canceling echos at a first end of a telephone call marks every other byte of a first digital representation of a first analog signal originating at the first end of the call with a signature. A second digital representation of a second analog signal from the second end of the call is received at the first end and split into a stream of odd number bytes and a stream of even number bytes. The streams of bytes are analyzed for the presence of the signature and one of the streams of bytes is converted to a third analog signal if the signature is detected.

Description:
BACKGROUND 
     The present invention relates generally to the field of telephone communications, and more particularly to a method of and system for providing single-ended echo cancellation in telephone calls. 
     DESCRIPTION OF THE PRIOR ART 
     When telephone calls began spanning very long distances, echo signals became an annoying problem. Echo signals arise mainly at the hybrid that interfaces the network to a two-wire subscriber loop. The role of the hybrid is to separate incoming and outgoing analog signals. In practice, hybrids cannot perfectly match at all frequencies the varying circuit impedances along the subscriber loop and the receive and transmit ports. Therefore, a small amount of a received signal is retransmitted back to the sender. This causes telephone users to hear their own speech repeated back to them on a delayed basis. 
     In long distance telephony, this undesirable echo effect has been effectively mitigated by sophisticated echo cancellers that can recognize and adaptively counteract echo signals. More recently, however, echo, problems have re-emerged in the field of mobile telephony. Even on a local call, a digital telephone introduces some absolute delay as it encodes a voice signal. This delay can be comparable to the delays normally observed for long distance calls. 
     Typical local telephone exchanges do not incorporate echo cancellation because it has been previously thought to be necessary only for long distance traffic. A mobile user will often hear an echo signal depending on the quality of the hybrid circuit at the other end of the conversation. 
     A technique is required for providing improved echo cancellation, especially for mobile (i.e., cellular, PCS, etc.) phone users, that does not rely upon the traditional echo cancellers built into the interexchange network. This technique is also required for international calls to countries in which domestic long distance phone systems do not offer reliable or effective echo cancellation. 
     SUMMARY 
     The present invention provides a method of and system for canceling echos at the first end of a telephone call. The present invention marks every other byte of a first digital representation of a first analog signal originating at the first end of the call with a signature. The invention receives a second digital representation of a second analog signal from the second end of the call and splits the second digital representation into a stream of odd number bytes and a stream of even number bytes. The invention analyzes the streams of bytes for the presence of the signature and converts one of the streams of bytes to a third analog signal if the signature is detected. 
     Preferably, the invention marks every other byte of the first digital representation with a signature by replacing every other byte of the first digital representation with a fixed value byte. The fixed value byte preferably has a value equal to the maximum value for a byte of the first digital representation. The signature is detected as a fixed offset in one of the streams of bytes received at the first end. If there is an echo, one of the streams of bytes will include an echo of the fixed value byte signature as an offset. The other stream of bytes will include an echo of the first analog signal. By converting the stream of bytes with the offset to an analog signal, the echo is removed. 
     The present invention converts the first analog signal to the first digital representation by sampling the first analog signal a first sampling rate, which is preferably the conventional 8 KHz sampling rate. The second digital representation is also formed by sampling the second analog signal at the conventional 8 KHz sampling rate. The present invention synchronizes the sampling of the first and second analog signals so that a maximum signature may be detected at the first end. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a system according to the present invention. 
     FIG. 2 is a block diagram of the odd-even analyzer/selector of FIG.  1 . 
     FIG. 3 is a block diagram illustrating the signal processing according to the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to the drawings, and first to FIG. 1, a telephone system according to the present invention is designated generally by the numeral  11 . System  11  includes a telephone  13  located at an echo controlling end and a telephone  15  located at a remote, non-echo controlled, end. In the Figures, telephones  13  and  15  are both analog telephones connected to traditional subscriber loops. However, the system of the present invention has application to systems in which the telephone at the echo controlling end is a digital phone. Telephone  13  is coupled to a hybrid  17 . As is well known to those skilled in the art, hybrid  17  converts from a two-wire transmission line to a four-wire transmission line. Hybrid  17  is coupled to an analog to digital (A/D) converter  19 . A/D converter  19  samples the analog signal received from hybrid  17  at the conventional 8 Khz sampling rate to convert the analog signal from telephone  13  to a digital signal. The digital signal from A/D converter  19  is transported in the digital domain across the network, indicated generally at  21  to a digital to analog (D/A) converter  23  located at the remote, non-echo controlled, end. Digital analog converter  23  converts the digital signal to an analog signal, which is coupled to a hybrid  25 . Hybrid  25  is coupled to telephone  15 , which receives the analog signal from telephone  13 . 
     Telephone  15  transmits voice signals across network  21  back to telephone  13 . The analog voice signals from telephone  15  are coupled to hybrid  25 , which in turn is coupled to an A/D converter  27 . A/D converter  27  converts the analog signals received from hybrid  25  to digital signals, which are transmitted across network  21  in the digital domain to a D/A converter  29  located at the echo controlling end. D/A converter  29  is coupled to hybrid  17 , which in turn is coupled to telephone  13 . 
     Echos are caused by impedance mismatches at hybrid  25 . A portion of the analog signal from telephone  13  received on the inbound leg at hybrid  25  may be coupled back onto the outbound leg. Because of signal processing and transmission delays, any incoming signal that is coupled through hybrid  25  is received back at telephone  13  delayed in time as an echo. This echo is annoying and objectionable. 
     The present invention achieves echo cancellation by performing signal processing in the digital domain. The digital signal received from A/D converter  19  is processed by an alternate sample overwrite unit  31 . The digital signal from A/D converter  19  is a stream of eight bit bytes with values ranging from −255 to +255. Alternate sample overwrite unit  31  replaces every other byte of the digital signal with a fixed value signature byte, which in the preferred embodiment has a value of +255. Alternate sample overwrite unit effectively imposes a 4 KHz high amplitude signal on top of the analog signal received at telephone  13 . The high amplitude 4 KHz signal is offset from zero. Overwriting alternate samples of the digital signal has the effect of cutting in half the effective sampling rate of the analog signal received at telephone  13 . Accordingly, in the preferred embodiment, a 2 KHz low pass filter  33  is coupled between hybrid  17  and A/D converter  19  to prevent aliasing. 
     The overwritten digital signal produced by alternate sample overwrite unit  31  is transported across network  21  to D/A converter  23  where it is converted to the analog domain. The pass band of the subscriber loop to telephone  15  is 300-3,000 Hertz. Accordingly, the 4 KHz signal produced by alternate sample overwrite unit  31  is not perceived at telephone  15 . However, if there is an echo, a portion of the signal from the echo controlled end, including the 4 KHz high amplitude signal, will be coupled across hybrid  25 . Voice signals to telephone  15  will be combined with the echo signal at hybrid  25 . 
     The analog signal, which may include an echo, is converted to the digital domain at A/D converter  27 . According to the present invention, the digital signal from A/D converter  27  is transported across network  21  to an odd-even analyzer/selector unit  33 . Referring now to FIG. 2, odd-even analyzer/selector  33  includes an odd/even sample separator  35 . Odd/even sample separator  35  splits the digital voice signal received from the remote location into a stream of odd number bytes and a stream of even number bytes. The streams of odd and even numbered bytes are coupled to an analyzer comparator  37 . 
     Analyzer/comparator  37  analyzes the streams of odd and even bytes to detect the signature produced by alternate sample overwrite unit  31  (FIG.  1 ). During periods of silence, the signature will be detected as a dc signal. At times other than silence, the signature will be detected as a dc offset in one of the streams of bytes. 
     Odd-even analyzer/selector  33  includes an odd/even selector  39  that is coupled to odd/even sample separator  35  and to analyzer/comparator  37 . If analyzer/comparator  37  detects the signature, then it signals odd/even selector  39  to select the stream of bytes with the signature and discard the other stream of bytes. Odd/even selector  39  outputs alternate samples to D/A converter  29  of FIG.  1 . If no signature is detected, then analyzer/comparator  37  signals odd/even selector  39  to recombine the byte streams. 
     In order to maximize the signature received in the event of an echo, the present invention synchronizes the timing of the conversion performed at A/D converter  19  with the conversion performed by A/D converter  27 . Analyzer comparator  37  produces a control signal, which is received at a controller  41  of FIG.  1 . Controller  41  outputs a signal to alter the conversion timing of A/D converter  19 , as indicated at  43 . If odd-even analyzer/selector  33  detects an echo, the timing of A/D converter  19  is adaptively altered so that a maximum signature is detected at odd-even analyzer/selector  33 . 
     In the event an echo signature is detected, odd-even analyzer/selector  33  selects only every other byte of the digital signal from the remote, non-echo controlled, end for D/A conversion. Therefore, odd-even analyzer/selector  33  effectively cuts the sampling rate in half. Accordingly, when an echo signature is detected, controller  41  signals D/A converter  29  to convert the digital signal back to the analog domain at a conversion rate of 4 KHz. If no echo signature is detected, controller  41  signals D/A converter  29  to convert the digital signal back to the analog domain at a conversion rate of 8 KHz. 
     The signal processing according to the present invention may be summarized with reference to FIG. 3. A first analog signal  51  is received at hybrid  17 . First analog signal  51  from hybrid  17  is converted to a digital representation of the first analog signal, indicated at  53  by A/D converter  19 . Digital representation  53  of first analog signal  51  is overwritten by alternate sample overwrite unit  31  to form a digital representation a first analog signal that is overwritten with the signature, indicated at  55 . Digital representation  55  is converted to the analog domain by D/A converter  23  to retrieve first analog signal  51 . 
     If there is an echo, first analog signal  51  is coupled to a second analog signal  57  at hybrid  25 . To form a second analog signal (plus echo), indicated at  59 . Second analog signal  59  is converted to a digital representation of second analog signal (plus echo), as indicated at  61 . Digital representation  61  is split by odd/even sample separator  35  into a stream of odd numbered bytes  63   a  and a stream of even numbered bytes  63   b . Byte streams  63   a  and  63   b  are analyzed and selected, as indicated at  65  to form a digital representation of the second analog signal without the echo, as indicated at  67 . Digital representation  67  is converted to the analog domain by D/A converter  29  thereby to retrieve second analog signal  57 . 
     From the foregoing, it may be seen that the system of the present invention provides single ended echo cancellation. While the present invention has been described and illustrated with reference to a presently preferred embodiment, those skilled in the art will recognize alternative embodiments, given the benefit of the foregoing disclosure. Accordingly, the spirit and scope of the invention shall be determined with reference to the claims.