Abstract:
A service chip for use with a computer. The chip includes a CPU interface, a transceiver interface, an adaptive echo cancellation filter, a monitor, and first and second data synthesizers. The CPU interface receives a transmit sample sequence from a modem sample generator executing on a central processor of the computer, and presents a receive sample sequence to a modem sample receiver executing on the central processor. The transceiver interface presents data to a line interface, which includes digital-to-analog and analog-to-digital converters for converting samples to/from analog signals for transmission on a telephone line. The filter adapts in response to an echo correlation between data transmitted over a transmit channel of the modem and data received on a receive channel of the transceiver interface. The monitor monitors the transmit sample sequence for a data starvation condition. The first synthesizer synthesizes a transmit sample sequence for delivery to the digital-to-analog converter over the transceiver interface when the monitor detects the data starvation condition, the synthesized transmit sample sequence being essentially free of timing information. The second synthesizer synthesizes a received data sequence for delivery on a modem receive channel to the central processing unit through the CPU interface when the monitor detects the data starvation condition, the synthesized received data sequence imperfectly approximating an echo of the transmit data channel, synthesis of the received data sequence being based on the adapted parameters of the echo cancellation filter.

Description:
BACKGROUND 
     The invention relates to modems. 
     A modem (“modulator-demodulator”) is the electronic device that sends digital information, typically from a computer, over an analog communication channel, for instance, a telephone line. In a typical transmit application, a modem accepts digital data from a computer, and generates analog waveforms that can be carried by a telephone line. In a receive role, the modem accepts analog waveforms from the line and produces digital data for use by the computer. The protocol for translating digital data to and from analog waveforms is agreed among modem manufacturers. 
     Modem transmit protocols require continuous control of the analog output: if the transmit circuitry does not keep up with the continuous process of translating digital data to analog waveforms, the resultant departure from the protocol can result in a retraining of the modems, resulting in transmission delays or the line being hung up. 
     As the speed of computer central processing units (CPU&#39;s) has increased, the signal processing functions of modems have been moved from dedicated hardware to the CPU. If that CPU is delayed in servicing a request from the transmit circuitry of the modem, the consequences of the previous paragraph result. 
     SUMMARY 
     In general, in a first aspect, the invention features a technique for use in a computer modem. A modem transmit data channel is monitored for a data starvation condition. When the data starvation condition is detected, a data sequence is synthesized on a receive channel of the modem, the synthesized data sequence being essentially independent of data received on a receive terminal of the modem. 
     In general, in a second aspect, the invention features a technique for use in a computer modem. Parameters of an echo cancellation filter are adapted, responsive to data transmitted over a modem transmit channel and received on a modem receive channel. When the transmit channel is disrupted, a data sequence is synthesized in the receive channel, the data of the synthesized sequence being based on the adapted parameters of the echo cancellation filter. 
     Preferred embodiments of the invention may include one or more of the following features. The synthesized receive data sequence may be synthesized to approximate an echo of data transmitted on the transmit data channel. The synthesized approximate echo may reflect an intentional misadjustment. The misadjustment may be induced by ignoring components of the data sequence received from a far modem, for instance the message data from the far modem, or a far modem echo. The intentional misadjustment may be induced by configuring a filter with a number of taps insufficient to model an impulse response of a round-trip over a transmission channel from the transmit data channel to the receive channel. The intentional misadjustment may be induced by selecting a filter adaptation parameter to preserve a misadaptation of the filter, for instance, the filter&#39;s adaptation mu parameter. The data starvation condition may be detected when a CODEC demands data from an empty transmit data buffer. 
     In general, in a third aspect, the invention features a technique for use in a computer modem. When a data starvation condition is detected on a modem transmit data channel, a waveform sample sequence is synthesized for transmission on a transmission channel of the modem, the synthesized waveform sample sequence being essentially free of timing information. 
     Preferred embodiments of the invention may include one or more of the following features. The synthesized data sequence may be synthesized by averaging the values of several samples from a generated transmit sample sequence. The number of samples averaged may correspond to an oversampling factor of the modem transmit data channel. The samples averaged may be drawn to provide roughly equal representation of all phases of the transmit signal. 
     Particular embodiments of the invention may feature one or more of the following advantages. The numerically-intensive signal processing and logically-intensive protocol management of a modem process can both be performed in the microprocessor of a computer system, reducing system cost. Delays in real time response of the microprocessor are less disruptive of modem communications. Retraining of the receive channel of a local or remote modem can be reduced. Hang ups of the modem can be reduced. A synthesized transmission can force a receive error, which will in turn force a retransmit under controlled conditions. A synthesized signal that allows the remote receiver&#39;s timing recovery process to coast is less likely to cause the remote receiver to diverge its timing synchronization from the transmitter during periods of signal substitution. 
     The above advantages and features are of representative embodiments only, and are presented to assist in understanding the invention. It should be understood that they are not to be considered limitations on the invention as defined by the claims, or equivalents to the claims. No single advantage should be considered necessary for equivalence. Additional features and advantages of the invention will become apparent in the following description, from the drawings, and from the claims. 
    
    
     DESCRIPTION OF THE DRAWING 
     FIG. 1 is a block diagram of a modem implementation in a host computer. 
     FIG. 2 is a block diagram of a signal substitution process for performance in the coprocessor of FIG.  1 . 
     FIG. 3 is a block diagram of an adaptive FIR filter. 
     FIG. 4 is a block diagram of a QAM modulator. 
     FIG. 5 is a block diagram of a substitute transmit signal synthesizer for performance by a block shown in FIG.  2 . 
    
    
     DESCRIPTION 
     Overview 
     Referring to FIG. 1, a modem may be implemented as a process  100  that runs on a host computer  110 , with a hardware coprocessor  200 . Data-generating process  112 , running on computer  110 , generates data  114  to be transmitted by a modem. These transmit data  114  are received by modem transmit process  400 , which does signal processing to convert transmit data  114  into digital samples  122 , for instance, according to the V. 22  protocol. Samples  122  are buffered in coprocessor  200 . CODEC (coder/decoder)  130  demands samples  134  from coprocessor  200 , and converts samples  134  to analog form  136  for transmission to a remote modem (not shown), for instance via public telephone lines  138 . 
     Similarly, receive signal  140  is received on line  138  from the remote modem, and converted by line interface circuit  132  and CODEC  130  into digital samples  142 . After being buffered in a buffer ( 212  of FIG. 2) in coprocessor  200 , received samples  144  are received by modem receive process  150 . Echoes of transmit samples  122  that were induced in receive samples  144  (typically because of impedance mismatch at the near end and far end line interfaces) are removed by echo canceller  160 ,  162 . A typical echo cancellation method observes the effect on echo path  122 ,  134 ,  130 ,  132 ,  138 ,  132 ,  130 ,  142 ,  144  of transmitting a datum during a time that receive channel  138 ,  132 ,  130 ,  142 ,  144  is quiescent. By observing the echo received, echo estimation process  160  can estimate the echo transfer function (a measure of the time delay and magnitude of echo), and use that estimate to remove echoes from samples received on channel  138 ,  132 ,  130 ,  142 ,  144 . After subtracting  162  the estimated echo, echo-free received samples  164  are conveyed to modem receive process  150 , which does signal processing to extract the received data  166 , which in turn is given to the process  112  for which it was intended. 
     As long as modem transmit process  400  stays far enough ahead of CODEC  130  to maintain a real time sequence of samples  134  for transmission, CODEC  130  and line interface circuit  132  generate analog signals in real time, in conformance with the modem protocol. 
     However, if modem transmit process  400  is delayed in handling a demand from coprocessor  200  for more samples  122 , in a conventional implementation, CODEC  130  starves for transmit samples  134 . When starved, CODEC  130  transmits data of its own improvisation ad lib. Because the signal transmitted was not monitored by components upstream of CODEC  130 , the echo of this improvised signal is not estimated by echo estimator  160 . Therefore the resulting echo from this alternate transmit signal is not effectively cancelled by modem echo canceller  160 ,  162 . 
     Where the echo is strong compared with the far modem signal, the estimated echo generated by echo estimation process  160  is approximately of the same average level as the far modem signal plus the echo. Therefore the subtraction  162  of the estimated echo from received signal  144  is a difference of relatively large numbers yielding the far modem signal, which is a smaller signal. When CODEC  130  is sample starved, and (in a conventional implementation) transmitted signal  136  is not correlated to the signal input to the echo canceller  160 ,  162 , then the difference  164  of large signals will yield a large signal. This large signal input to modem receive process  150  may disrupt modem receive process  150 . This disruption may force modem receive process  150  to retrain, which in turn will interrupt the transmit and receive functions for a number of seconds. 
     Referring to FIG. 2, signal substitution process  202  executes on coprocessor  200 . During normal operation, transmit samples T(n)  122  pass unchanged to output t(n)  134 , and received samples r(n)  142  (the sum of received signal x(n) transmitted by the far end modem, plus echo d(n)) pass unchanged to receive output R(n)  144 . The two channels are analyzed by adaptive FIR filter  300 , which roughly mirrors the echo cancellation analysis of echo canceller  160 —adaptive FIR filter  300  analyzes samples T(n)  122  being transmitted and samples r(n)  142  being received, and estimates the echo component d(n) of received samples r(n)  142 . 
     When signal substitution process  202  detects that transmit buffer  210  is empty and CODEC  130  demands more samples, two things occur. On the transmit channel, switch  232  switches so that samples t(n)  134  synthesized by Substitute Transmit Signal Synthesizer  500  are output to CODEC  130  and line interface  132 . On the receive channel, switch  234  switches so that the r(n) samples  142  received on line  138  are ignored, and instead samples R(n) synthesized in coprocessor  200  are fed on line  144  through echo subtractor  162  to modem receive process  150 . The R(n) samples synthesized for line  144  are synthesized with the knowledge acquired by adaptive FIR filter  300 , to approximate the echo component d(n) of r(n)  142 , so that echo canceller  160 ,  162  will essentially cancel the synthesized “echo” being fed it on line  144 . The result is that echo-cancelled signal  164  will remain small in amplitude, without exceeding the bounds tolerance of modem receive process  150 , thereby reducing the likelihood that a retraining will occur. 
     Synthesis of a Substitute Receive Signal R(n) 
     During normal operation, adaptive FIR filter  300  generates a sequence d′(n)  240  estimating the echo component d(n) in r(n). Echo estimate d′(n)  240  is subtracted  242  from r(n)  142 , giving a term e(n)  244 . Term e(n)  244  is fed back to adaptive FIR filter  300  to adapt the filter  300  to changing echo characteristics of transmission path  134 ,  130 ,  132 ,  138 ,  132 ,  130 ,  142 . The operation of adaptive FIR filter  300  will be discussed in further detail below, in connection with FIG.  3 . Adaptive FIR filter  300  parallels but does not exactly mimic modem echo estimation process  160 . 
     During sample starved synthesis, echo estimate d′(n)  240  is substituted for received sample sequence R(n)  144 . Because of the inexact parallel between adaptive FIR filter  300 , modem echo estimation  160 , and the actual echo characteristic of path  134 ,  130 ,  132 ,  138 ,  132 ,  130 ,  142 , the synthesized echo d′(n)  240  will be slightly different than the echo estimate generated by echo estimation process  160 . After echoes are subtracted  162  from synthesized receive samples d′(n)=R(n)  144 , the amplitude of sample sequence  164  will be small but non-zero. A zero sequence could be interpreted as a far modem hang up, and modem process  100  would terminate. 
     Referring to FIG. 3, a modem echo canceller seeks to estimate the echo resulting from a transmitted signal and subtracts it from the received signal, leaving only the far modem signal. A common technique for echo cancellation is an adaptive FIR (Finite Impulse Response) filter. 
     In long distance modem connections, there are typically two peaks in the echo impulse response. One peak, which occurs with a relatively short delay, is due to impedance mismatches between the modem interface circuit ( 132  of FIG. 1) and the local telephone loop circuit  138 . The other peak is caused by impedance mismatches at the far end of the transmission circuit, where the remote modem is connected. The latter peak occurs at a delay equal to the round trip propagation delay of the circuit. For short distance connections, these two peaks merge and are indistinguishable. 
     The near echo is usually by far the dominant echo and is often as strong or stronger than the level of the far modem signal. The far echo typically is weaker, and is almost always substantially weaker than the far modem signal. Because of the typical weakness of the far echo signal, an embodiment may be designed to compensate only for near echo, and may ignore the far echo. 
     Adaptive FIR filter  300  is conventional in the art. Adaptive FIR filter  300  includes a delay line  310 , a set of multipliers  312 , and a memory vector  314  to hold values called “taps.” Delay line  310  is a “bucket brigade:” in each sample processing interval, the contents of the delay line are shifted one cell to the right (the rightmost value is discarded), and a new sample value T(n) is accepted for the leftmost cell. Also in each sample processing interval, taps  314  are updated. Each tap corresponds with a cell in the delay line, and with the age of the data in that cell. 
     The operation equations of the adaptive FIR filter  300  are shown in the lower right portion of FIG.  3 . In step  330 , the delay line is shifted. In step  332 , the new T(n) value is inserted into the delay line. In step  334 , the estimated echo d′(n) is computed as            d   ′          (   n   )       =       ∑     i   =   0       K   -   1                a   i          (   n   )       ×     T        (     n   -   i     )                                  
     where n is the index of the current sample processing interval, a i  are the tap coefficients for filter  300 , T(n) is the transmit sample  122  for sample processing interval n, and K is the number of taps in FIR filter  300 . In step  336 , error estimate e(n) is computed as 
     
       
         e(n)=d′(n)−r(n) 
       
     
     In step  338 , taps a i (n)  314  are updated by computing 
     
       
         a i (n+1)=a i (n)+μ×e(n)×T(n−i) 
       
     
     μ(mu), the FIR adaptation step size constant in equation  338 , is chosen to balance several competing factors. If μ is much too large, the filter will diverge. If μ is too large, the FIR filter will adapt quickly, but will have a relatively large misadjustment error due to the “uncorrelated noise” effect of the data transmitted by the far modem. A small μ will result in slow adaptation, but a small misadjustment error. If the misadjustment error is too small, the signal substitution process  202  may generate a sample sequence that is too close to the echo cancellation estimate of echo canceller  160 ,  162 , possibly resulting in the hang-up discussed previously. When the value of μ is in a correct range, adaptive FIR filter  300  will produce an estimated echo d′(n) with a misadjustment error of about half the nominal level of the far modem signal x(n). 
     μ is chosen so that the RMS (root mean square) value of e(n) (the echo estimate error computed by echo canceller  242 ,  300 ) will be about half the nominal level of x(n), by the following process. After adaptive FIR filter  300  is trained, modem transmit process  400  is disabled, forcing the signal substitution process  202  into signal substitution mode. Signal substitution process  202  then generates signal d′(n)  240 , which is fed via switch  234  to modem echo canceller  160 ,  162 . Signal  164  is monitored. If the RMS of the echo cancelled signal  164  is less than half of its nominal, then μ is increased. If the RMS of echo-cancelled signal  164  is more than half of its nominal, then μ is decreased. Simulations have shown that misadjustment error, and hence the “simulated far modem signal” is proportional to the receive level. That is, with a fixed value of μ, the misadjustment error will stay proportional to the receive level over a range of receive levels. Therefore a μ established for one modem connection will be approximately correct for future connections. μ can be retrained from time to time, or can be fixed in the system firmware. 
     The number of taps for adaptive FIR filter  300  is chosen with the following in mind. It is empirically observed that the near echo is often far larger than the far signal. The overwhelming majority of the near echo occurs within 4 to 5 milliseconds. Because the echo estimation of adaptive FIR filter  300  is desirably only approximate, it is sufficient to only provide filter taps and delay line cells to correspond to the amount of time for the strongest portion of the near echo, typically the first 4 to 5 milliseconds. The far echo can be simply ignored, or treated as a fortuitous source of misadjustment error and difference from echo estimation  160 . Different modem modulation standards typically are implemented with different sampling rates, varying from 7,200 samples per second to 10,287 samples per second. The number of taps provided may either be fixed at a value corresponding to the longest-expected echo at the fastest sampling frequency (at lower sampling rates, the more-delayed tap values will be approximately zero), or may be adapted at the beginning of each modem session to provide enough taps to cover the longest-expected echo. Thus, one embodiment provides about 52 filter taps (5 milliseconds times 10,287 samples per second). 
     During sample-starved sample synthesis operation, adaptation (updating the values of taps as) ceases, because the t(n) output is uncorrelated to the r(n) received, and any adaptation would be spurious. 
     Synthesis of a Substitute Transmit Signal t(n) 
     Referring to FIGS. 4 and 5, during intervals of transmit sample starvation, the t(n) values  502  are synthesized to be minimally disruptive to the far modem receiver, as a signal that conveys no timing information. During the duration of the data-starved condition, none of the individual T(n) samples are transmitted. 
     FIG. 4 shows a simplified block diagram of a QAM (Quadrature Amplitude Modulated) modulator. Constellation mapper  420  uniquely maps groups of data bits  114  into points on a two dimensional phase-amplitude plane. The set of defined points is called the constellation. For example, the V.22 communications protocol defines a constellation with 4 points, where the input bit patterns 00, 01, 10, and 11 are mapped to the coordinates (−1,−1), (−1,1), (1,−1), and (1,1), respectively. The mapped constellation points are upsampled and band-limited by interpolator/shaping filter  424 . The upsampled and band-limited samples are then modulated by modulator  426  into a passband signal. Finally, a digital-to-analog converter  130 ,  132  converts the digital samples to an analog signal which is suitable for transmission over an analog channel. 
     A modem receiver recovers the transmitted bits by reversing the modulation process. One particular aspect of a receiver involves synchronizing the receiver sampling to the exact rate at which the corresponding transmitter is generating constellation points. This is called “timing recovery”. Timing recovery slightly increases or decreases the receiver sampling rate so as to keep the receiver sampling process synchronized with the transmitter. Proper timing recovery enables the receiver to sample the received signal synchronously with the arrival of the constellation points, rather than at some transition point between two constellation points. 
     The synthesized substitute signal is generated from a base signal, which consists of a contiguous block of modem transmit samples. The synthesized substitute signal contains equal timing information at all phases of the signal, so that the remote receiver&#39;s timing recovery process will not prefer any particular phase of the receive signal, but instead simply “coast” during periods of signal substitution. A synthesized signal that allows the remote receiver to coast is less likely to cause the remote receiver to diverge its timing synchronization from the transmitter during periods of t(n) signal substitution. The substitute signal t(n) is synthesized by taking a linear combination of transmitted samples at all phases of the constellation point content. For example, if the transmitted signal contains one constellation point for each M transmitted samples (M samples per constellation point resulting from the upsampling discussed above), then the synthesized transmit signal contains a sum of M sequences, each of the M sequences offset from the base sequence such that the timing information is at a different one of the M possible sampling phases. Such a signal will confer no timing phase preference to a remote receiver&#39;s timing recovery process. The substitute signal  t ( n ), for example, formed by taking combination of transmitted signals at all phases of the constellation point content, or by providing equal timing information at all phases of the substitute signal, or by taking the sum of sequences such that the timing information of the summed sequences is at a different one of the possible sampling phases, or by averaging the values of several samples from a generated transmit sample sequence, or a substitute signal that confers no timing phase preference to a remote receiver, or a signal that conveys no timing information to a far modem receiver, may be among examples of possible substitute waveform sample sequences that are essentially free of timing information. 
     Referring to FIG. 5, a process for synthesizing the substitute transmit signal includes of delay line  510  which has (M−1)*(M−1)+1 delay elements, and M multipliers, each applying a gain of 1/M to its respective delay element. The multipliers are placed at intervals of (M−1) elements in the delay line, so that each multiplier output produces an output which is one of the M possible timing phases. 
     Periodically, a block of (M−1)*(M−1)+1 samples is copied from transmit buffer  210  to delay line  510  of the substitute transmit signal synthesizer. When transmit buffer  210  becomes starved for samples T(n)  122 , samples t(n)  502  are synthesized by substitute transmit signal synthesizer  500 . Between output samples, the contents of the substitute transmit signal synthesizer delay line  510  are shifted right by one sample, with the oldest sample (from element Z −(M−1)(M−1 ) being recycled back into the Z −0  element. The copying from buffer  210  to delay line  510  occurs at a period roughly corresponding, within a factor of ten or so, to (M−1)*(M−1)+1 sample times. 
     Because the present embodiment upsamples to generate either three or twelve samples per constellation point, and since twelve is an integer multiple of three, delay line  510  has twelve taps. The same process used for synthesizing transmit samples for twelve samples-per-constellation-point modes works to synthesize a three samples-per-constellation-point signal, with a redundancy of 4. 
     Referring again to FIGS. 1 and 2, coprocessor  200  may be implemented as a coprocessor for installation in a computer, for instance, the MPACT coprocessor from Chromatic Research, Inc. The MPACT coprocessor is dedicated to performing real-time data tasks such as modem processing and multimedia. 
     It should be understood that the above description of embodiments is merely illustrative, and that many modifications and other embodiments are within the scope of the following claims.