Abstract:
Improvements in a digital echo canceller utilizing pseudo-logarithmic coding are disclosed which reduce the complexity and cost while improving the performance of the echo canceller. Specifically, there is disclosed an improved analog to pseudo-logarithmic converter, a first and a second embodiment of an improved pseudo-rms to dc converter, an improved φ(x) function generator, and an improved error detector.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     This application discloses an improvement to the subject matter of my co-pending application, U.S. Ser. No. 694,878, filed June 11, 1976, now U.S. Pat. No. 4,064,379 and assigned to the assignee of the present application. 
     BACKGROUND OF THE INVENTION 
     The present invention is in the field of echo cancellers. More specifically, the present invention provides improvements in the performance of an echo canceller with an adaptive transfer filter utilizing pseudo-logarithmic coding, while at the same time reducing the complexity and cost of the canceller. 
     In long-distance telephone communication networks, four-wire links are utilized over a substantial portion of the transmission path: one of the pairs being dedicated to only transmitting the signal to the destination, and the other pair being dedicated only to receiving the signal sent from the destination. A hybrid coil is used to combine the separate signals on the transmit and receive pairs for a single two-wire circuit. 
     It is well known that the hybrid coil does not provide echo-free coupling between the send and receive pairs of the four-wire link; a portion of the signal on the receive pair passes to the send pair and appears as an echo signal. 
     In my prior echo canceller, as disclosed in U.S. Pat. No. 4,064,379, and as shown in FIG. 1 herein, the received signal X(t) is sampled and converted into its absolute value in stage 10, and then further converted into a 7-bit pseudo-logarithmic companding code in a special analog-to-digital converter 12. The entire digitized sample x i  is multiplexed in multiplexer 14, and then stored in a plurality of shift registers forming X-register 16. An average for pseudo-rms value of the x i  samples is computed in stage 18, and the samples are also compared in a comparator 20 with the stored average or pseudo-rms value. An H-register 22 stores N digital words, h 1  through h n  representing the echo path impulse response. When the sample x i  is greater than the average or pseudo-rms value, a control signal φ(x) from comparator 20 causes updating of the existing value of the corresponding digital word h i  stored in H-register 22. The average or pseudo-rms value of incoming signal X(t) is also converted in a digital-to-analog converter 24 to a reference voltage X j  used to bias an analog center clipper 26 and to also bias an analog comparator 28. A band pass filter 30, pre-emphasis circuit 32, and a low pass filter with a de-emphasis circuit 34 reduce the harmonic distortion caused by center clipper 26. The sample x i  and corresponding digital word h i  stored in the X-register 16 and H-register 22, respectively, are fed into a multiplier 36 in order that the pseudo-logarithmic encoded x i  and h i   values may be used directly without further conversion. The multiplication is performed in three different ways: when the exponents are both non-zero, addition of the exponents and mantissas in two adders takes place; when the exponents are both zero, the mantissas are directly multiplied; and when only one exponent is non-zero, both mantissas are directly multiplied and added to the mantissa of the number with a zero exponent, and the product is shifted in a shift register according to the value of the exponent. The result of the multiplication is then added to, or subtracted from, the contents of an accumulator 38. The output r j  of the accumulator 38 is converted in a digital-to-analog converter 40 into an analog voltage which is subtracted in a differential amplifier 42 from the echo signal y(t) which is present in the transmit pair of the four-wire circuit. 
     While my prior echo canceller is superior in performance and lower in cost than conventional digital echo cancellers, if its complexity could be reduced without sacrificing performance, a considerable cost saving could be achieved. 
     SUMMARY OF THE INVENTION 
     It is therefore an object of the present invention to simplify the hardware required in an echo canceller with logarithmic encoding without sacrificing performance. 
     It is more specifically an object of the present invention to redesign the echo canceller with logarithmic encoding so that its complexity, size and cost are reduced without sacrificing performance. 
     These and other objects of the invention are achieved by: 
     (a) substantially reducing the complexity and cost while increasing the performance of the analog-to-pseudo-logarithmic converter designated generally by reference numeral 50 of FIG. 1; 
     (b) substantially reducing the complexity and cost while increasing the performance of the dc pseudo-rms converter designated generally by the reference numeral 60 of FIG. 1; 
     (c) substantially reducing the complexity and cost while increasing the performance of the generator of the φ(x) function generated by digital comparator 20 of FIG. 1; and 
     (d) substantially reducing the complexity and cost while increasing the performance of the error detector designated generally by the reference numeral 70 of FIG. 1. 
     In the improved analog-to-pseudo-logarithmic converter, as shown in FIG. 2, input signal X(t) is sampled and then sent to an absolute value stage. Sample |x i  | is then applied to an analog-to-digital converter for quantizing an encoding, and the sign of sample x i  is sent to the X-register 16. The serial 11 bit output from the analog-to-digital converter is serially converted to a 7-bit pseudo-logarithmic digital code using a conventional shift register, counter and two AND gates. The serial conversion results in a significant reduction in the complexity and cost while improving the performance of the analog-to-pseudo-logarithmic converter 50. 
     In the first embodiment of the improved pseudo-rms to dc converter 60, shown in FIG. 2, sample |x i  | is passed through a low pass filter, peak detector and operational amplifier in series connection to produce a dc signal X j . This results in a significant reduction in the complexity and cost while improving the performance of the pseudo-rms to dc converter. 
     In the second embodiment of the improved pseudo-rms to dc converter, as shown in FIG. 3, signal X(t) is fed to a first &#34;ideal&#34; full-wave rectifier and is also shifted 90° and fed to a second &#34;ideal&#34; full-wave rectifier. The outputs of both full-wave rectifiers are summed and then fed through a low-pass filter. The output of the low-pass filter is fed to a peak detector having a substantially improved &#34;attack&#34; time constant, which results in an improved performance, when the amplitude of signal X(t) suddenly increases. The second embodiment of the improved pseudo-rms to dc converter results in improved performance as well as in a reduction in circuit complexity and cost. The improved φ(x) function generator 20, as shown in FIG. 2, outputs a logic one if and only if the respective sample |x i  | fulfills the following conditions: 
     (a) The amplitude of sample |x i  | is greater than the average value analog voltage X j  ; 
     (b) The amplitude of sample |x i  | is less than the overload amplitude V REF2  ; 
     (c) The amplitude of sample |x i  | is greater than the background noise amplitude V REF1 . 
     The improved error detector 70, as shown in FIG. 5, samples the true echo signal Y(t) and then compares the sample y(i) with the estimated echo signal r j  to produce error signal ε j . Error signal ε j  is then compared in symmetrically biased operational amplifiers used as comparators which, in turn, produce the Δh value and the Sg(Δh) value. All of these improved circuits of the present invention reduce the complexity and cost, while increasing the performance of my prior echo canceller. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of the prior echo canceller with logarithmic encoding which is improved by the present invention. 
     FIG. 2 is a block diagram of the improved analog-to-digital pseudo-logarithmic converter, the first embodiment of the improved pseudo-rms to dc converter, and the improved φ(x) function generator of the present invention. 
     FIG. 3 is a block diagram of the second embodiment of the improved pseudo-rms to dc converter of the present invention. 
     FIGS. 4a, 4b and 4c show the voltage waveforms at specific points of the circuit shown in FIG. 3. 
     FIG. 5 is a block diagram of the improved error detector of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In the present invention, the analog-to-digital pseudo-logarithmic converter 50 of my prior echo canceller, as shown in FIG. 1, is replaced by an improved analog-to-digital pseudo-logarithmic converter, as shown in FIG. 2. An analog signal X(t) is applied to an input 100. Input 100 is connected to a sample and hold circuit, designated generally by reference numeral 102, which is of conventional design and is commercially available from the Harris Corporation, Syosset, N.Y., under the designation No. HA-2425. Sample and hold circuit 102 has a driver 104 which controls an electronic switch 106 for obtaining a sample x i  of analog signal X(t). Driver 104 is controlled by a convert command signal on a line 101 which is the same convert command signal provided to sample and hold stage 10 of my prior echo canceller. 
     Sample x 1  at the output of electronic switch 106 is held at a capacitor 108 and is amplified by an operational amplifier 110. The other lead of capacitor 108 is connected to ground. 
     Signal x i  at the output of operational amplifier 110 is sent to an absolute value stage 112, which is of conventional design and is described at pages 23, 24 of Analog-Digital Conversion Handbook, 2d Ed., 1976, published by Analog Devices, Inc., Norwood Mass. A positive and a negative input of a comparator 114 are connected to absolute value stage 112 to determine the sign of sample x i . Comparator 114 is of conventional design. The output logic signal Sg(x) of comparator 114, which indicates the sign of the respective samples x i , is fed to the X-register 16. 
     The absolute value of sample x i  present at the output of absolute value stage 112 is provided to an input of an analog-to-digital converter 116, which is of conventional design and is commercially available from Analog Devices, Inc., Norwood, Mass. Analog-to-digital converter 116 performs a quantization with linear steps on sample |x i  | and then outputs the encoded quantization value in a serial 10 bit stream. A comparator 118 is connected to analog-to-digital converter 116 to control the internal logic therein. The start input of analog-to-digital converter 116 is connected to receive the convert command signal from line 101. 
     The serial 10 bit stream from the output of analog-to-digital converter 116 is applied to an input of a shift register 120. Shift register 120 is of conventional design and is commercially available from Texas Instruments, Inc., Dallas, Tex., under Part No. SN74164. The clear input of shift register 120 is connected to receive the convert command signal from line 101. Non-inverting outputs Q 0 , Q 1 , and Q 2  are individually connected to X-register 16. 
     The clock signal of analog-to-digital converter 116 is applied to a first input of an AND gate 122 and to a first input of an AND gate 124. AND gates 122, 124 are of conventional design. The inverting Q 2  output of shift register 120 is connected to a second input of AND gate 124. The inverting output Q 3  is applied to a second input of AND gate 122 and to a third input of AND gate 124. The output of AND gate 122 is connected to the clock input of shift register 120. 
     The output of AND gate 124 is applied to the countdown input of a counter 126, which is of conventional design and is commercially available from Texas Instruments, Inc., under the designation SN74193. The binary code 0101 may be selectively loaded at the inputs D 0 , D 1 , D 2 , and D 3 , respectively, of counter 126. The outputs Q 0 , Q 1 , and Q 2  of counter 126 are individually applied to X-register 16. The load input of counter 126 is connected to receive the convert command signal from line 101. 
     Having described the construction, the operation of the improved analog-to-digital pseudo-logarithmic converter of the present invention is now described. A convert command signal is provided on line 101. This convert command signal causes sample and hold circuit 102 to sample signal X(t) which causes sample x i  to be applied to the absolute value stage 112. The convert command signal also causes the analog-to-digital converter 116 to quantize and encode the sample |x i  | provided at the output of absolute value stage 112. The convert command signal also causes the stages of shift register 120 to be cleared as well as causing the 0101 code to be loaded into inputs D 0  to D 3  of counter 126. As is well known, the first bit in the bit stream from analog-to-digital converter 116 is the most significant bit, and the last bit is the least significant bit. As each bit is outputed from analog-to-digital converter 116, a clock pulse is sent to AND gates 122 and 124. Since shift register 120 is cleared by the convert command signal on line 101 at the beginning of the sample cycle, a logic 1 is present at inverting outputs Q 2  and Q 3  ; these result in AND gates 122 and 124 being enabled each time a bit is outputed from analog-to-digital converter 116. The first bit outputed, which is the most significant bit, is provided to stage Q O  of shift register 120. Each successive bit that is outputed in loaded into the first stage of shift register 120, and each bit therein is transferred over one stage, as long as there is a logic 1 at inverting output Q 2 . Moreover, each time a bit is transferred, the clock pulse from analog-to-digital converter 116 causes counter 126 to count down one bit from the initial 0101 initial value loaded at the beginning of the sample cycle. When the first logic 1 reaches stage Q 2  of shift register 120, the output of inverting output Q 2  changes to a 0 bit, which disables AND gate 124 and stops the countdown of counter 126. The binary output from counter 126, which corresponds to the exponent of the pseudo-logarithmic digital code, is then loaded into X-register 16. In the next clock cycle, the first 1 bit is transferred to stage Q 3  of shift register 120 causing AND gate 122 to be disabled which blocks the loading of any additional bits into shift register 120. The bits of the serial bit stream on non-inverting outputs of shift register 120, which correspond to the mantissa, are also loaded into X-register 16. 
     Thus, the serial conversion algorithm used by the improved analog-to-digital pseudo-logarithmic converter of the present invention provides the sign Sg(x), exponent e, and mantissa a, b, c, values of the 7-bit pseudo-logarithmic code being used immediately at the end of the conversion cycle. In comparison, all of the parallel algorithms used in prior art do not provide these values immediately at the end of the conversion cycle, and also require more complex and expensive hardware. 
     It should be noted that the described serial conversion algorithm used by the improved analog-to-digital pseudo-logarithmic converter of the present invention is not limited to the conversion from an 11-bit linear to a 7-bit pseudo-logarithmic code. The same algorithm can be used for the conversion of any linear to non-linear code, such as a 12-bit linear to an 8-bit pseudo-logarithmic code. The only required circuit change is the increase of length of shift register 30 so that it is capable of storing the increased number of bits in the mantissa of the pseudo-logarithmic code being used. 
     A first embodiment of the improved pseudo-rms to dc converter for providing the average value analog voltage X j , as shown in FIG. 2, replaces the pseudo-rms to dc converter stage 60 of my prior digital echo canceller, as shown in FIG. 1. 
     Sample |x i  | at the second output of absolute value stage 112 is provided to an input of a low pass filter, designated generally by the reference numeral 130. Low pass filter 130 is of conventional design and it is an R-C network of the type well known in the art. Specifically, the input of the low pass filter 130 is the input of an operational amplifier 132. Operational amplifier 132 is of conventional design. The output of operational amplifier 132 is applied to one lead of a resistor 134. The other lead of resistor 134 is connected to one lead of a capacitor 136. The other lead of capacitor 136 is connected to ground. Resistor 134 and capacitor 136 together form the R-C circuit that defines the frequency response of low pass filter 130. 
     The limiting frequency ω o  of low pass filter 130 is set to: 
     
         0.6 ω.sub.m &lt; ω.sub.o &lt; 0.2 ωm           (1) 
    
     where, 
     ω m  = 2π f m  ; 
     f m  = minimum frequency of analog X(t), which typically for telephone transmission is approximately 300 Hz. 
     As is well known, the integration time constant of low pass filter 130 is equal to 1/ω o . 
     The output of low pass filter 130 is applied to the input of a peak detector, designated generally by the reference number 138. Peak detector 138 detects all input signals having an amplitude above a set cut-in level, and has a release time constant t r  substantially longer than the integration time constant 1/ω o  of low pass filter 130, e.g., t r  ≧ 4/ω o . 
     The input of peak detector 138 is the anode of a diode 140. The cathode of diode 140 is connected to a biasing voltage source V +  via a bias resistor 142. Thus, bias voltage source V +  together with bias resistor 142 set the cut-in level of diode 140. 
     The cathode of diode 140 is also connected to the first leads of a capacitor 144 and a resistor 146. The second leads of capacitor 144 and resistor 146 are connected to ground. The component values of the capacitor 144 and the resistor 146 set the release time constant t r  of the peak detector 138. 
     The output of the peak detector 138, at the first lead of resistor 146, is applied to the input of an operational amplifier 148. Operational amplifier 148 is of conventional design. The output of operational amplifier 148 is the average value analog voltage X j . The average value analog voltage X j  is applied to a line 150. 
     The relationship of the integration time constant 1/ω o  of the low pass filter 130 and the release time constant of the peak detector 138 can be chosen so that a sinewave signal and a white noise signal with equal rms amplitudes applied to the input of operational amplifier 132 will produce the same value for the average value analog voltage X j  on line 150. Thus, the average value analog voltage X j  can be considered as being proportional to the rms value of the analog signal X(t). 
     The theory behind this proportional relationship between the rms value of the analog signal X(t) and the average value analog voltage X j  begins with the following inequality which applies during a period of a periodic waveform signal: 
     
         v.sub.ave ≦ v.sub.rms ≦ v.sub.peak           (2) 
    
     The sample |x i  | at the second output of the absolute value stage 112 is proportional to the average value of the analog signal X(t). Because of the short integration time constant 1/ω o , the output signal of the low pass filter 130 can respond to the fast peaks in analog signal X(t). Further, these fast peaks, because of the long release time constant t r , can be held over for a longer period of time by peak detector 138. Thus the average value analog voltage X j  on line 150 averages a greater value than the output of the low pass filter 130, and thus equation (2) holds true. It follows that if the statistical properties of band limited signal X(t) are known, the time constants 1/ω o  and t r  can be adjusted so that the average value analog voltage X j  is equal to that of a sinewave having the same rms value. 
     An alternative embodiment of the improved pseudo-rms to dc converter for providing the average value analog voltage X j , as shown in FIG. 3, replaces the pseudo-rms to dc converter stage 60 of my prior digital echo canceller, as shown in FIG. 1. 
     The analog signal X(t) is applied to an input line 160. Input line 160 provides the analog signal X(t) to a first full-wave rectifier stage, designated generally by the reference numeral 164. The circuit design of full-wave rectifier stage 164 is disclosed at pp. 23-24 of the prior cited Analog-Digital Conversion Handbook, 2d ed., 1976. Full-wave rectifier stage 164 provides as an output the full-wave rectified version of the analog signal X(t). 
     Specifically, analog signal X(t) is provided via input line 160 to the non-inverting input of an operational amplifier 166. Operational amplifier 166 is of conventional design. The output of operational amplifier 166 is applied to the cathode of a diode 168 and to the anode of a diode 170. The anode of diode 168 is connected to the non-inverting input of an operational amplifier 172. Operational amplifier 172 is of conventional design. The cathode of diode 170 is connected via a resistor 174 to the inverting input of operational amplifier 172. A resistor 176 is connected between the inverting input of the operational amplifier 166 and the anode of diode 168 so as to provide a feedback path. Similarly, a resistor 178 is connected between the inverting input of the operational amplifier 166 and the cathode of diode 170 so as to provide a feedback path. Moreover, a resistor 180 is connected between the output and the inverting input of the operational amplifier 172 so as to provide a feedback path. 
     One lead of a resistor 182 is connected to the output of the operational amplifier 172. The signal at the other lead of resistor 182 is the full-wave rectified version of the analog signal X(t). This full-wave rectified signal at the second lead of resistor 182, which contains the second harmonic of the analog signal X(t), is illustrated by waveform 182 of FIG. 4(a). 
     The analog signal X(t) is also applied by input line 160 to the input of an inverter 162. Inverter 162 is of conventional design. The output of inverter 162 is applied to a phase shift network, designated generally by the reference numeral 184. Phase shift network 184 is of conventional design. Specifically, the output of inverter 162 is applied to the first lead of a capacitor 186. The other lead of capacitor 186 is connected to a node 190. A resistor 188 is connected between the node 190 and the input line 160. The component values of the capacitor 186 and the resistor 188 are selected so that the lowest frequency f m  of analog signal X(t) is shifted by 90° at node 190. 
     The phase-shifted signal at node 190 is applied to a second full-wave rectifier, designated generally by the reference numeral 192. The circuit design of full-wave rectifier stage 192 is identical to that of full-wave rectifier stage 164 and, therefore, need not be described further. 
     One lead of a resistor 210 is connected to the output of the operational amplifier 206. The signal at the other lead of resistor 210 is the full-wave rectified version of the phase-shifted analog signal X(t) present at node 190. This full-wave rectified signal at the second lead of resistor 210, which is the second harmonic of the phase-shifted version of analog signal X(t) present at node 190, is illustrated by waveform 210 of FIG. 4(b). 
     The full-wave rectified signal at the second lead of resistor 182 is applied to a node 212. Similarly, the full-wave rectified signal at the second lead of resistor 210 is applied to the node 212. Node 212, in turn, is connected to the inverting input of an operational amplifier 214. Operational amplifier 214 is connected to act as a summer of the two full-wave rectified signals present at node 212. A resistor 208 is connected between the output and the inverting input of the operational amplifier 214 so as to provide a feedback path. The non-inverting input of the operational amplifier 214 is connected to ground. 
     The signal present at the output of the operational amplifier 214 is the sum of the two full-wave rectified signals present at node 212. This summed signal at the output of the operational amplifier 214 contains the fourth harmonic of the analog signal X(t), as shown by the waveform of FIG. 4(c). 
     The summed signal at the output of the operational amplifier 214 is provided to the input of a low pass filter, designated generally by the reference numeral 216. Low pass filter 216 is of conventional design and it is a R-C network of the type well known in the art. Specifically, the input of the low pass filter 216 is the first lead of a resistor 218. The second lead of a resistor 218 is connected to the first lead of a capacitor 220. The second lead of capacitor 220 is connected to ground. Resistor 218 and capacitor 220 together form the R-C circuit that defines the frequency response of low pass filter 216. 
     The limiting frequency ω o  of the low pass filter 216 is set to: 
     
         1.2 ω.sub.m &lt; ω.sub.o &lt; 0.4 ω.sub.o 
    
     where, 
     ω m  = 2 πf m  ; 
     f m  = minimum frequency of analog X(t), which typically for telephone transmission is approximately 300 Hz. 
     As is well known, the integration time constant of the low pass filter 216 is equal to 1/ω o . 
     The output of the low pass filter 216, present at the second lead of resistor 218 is applied to the input of a peak detector, designated generally by the reference numeral 222. Peak detector 222 detects all of the peaks of the input four-harmonic signal which exceed a set cut-in level, and has a release time constant t r  substantially larger than the integration time constant 1/ω o  of the low pass filter 216, e.g., t r  ≧ 4/ω o . 
     The input of the peak detector 222 is the non-inverting input of an operational amplifier 224. Operational amplifier 224 is of conventional design. The cathode of a diode 226 is connected to the output of the operational amplifier 224. The anode of diode 226 is connected via a resistor 228 to the inverting input of the operational amplifier 224. Thus, the diode 226 and the resistor 228 form a feedback path. The inverting input of the operational amplifier 224 is connected to ground via a resistor 236. 
     The output of the operational amplifier 224 is connected to the anode of a diode 230. The cathode of diode 230 is connected to the first lead of a resistor 232 and to the first lead of a capacitor 234. The second lead of resistor 232 and the second lead of capacitor 234 are each connected to ground. The component values of the resistor 232 and the capacitor 234 set the release time constant t r  of the peak detector 222. 
     The output at the first lead of capacitor 234 is applied to the non-inverting input of an operational amplifier 238. The output and the inverting input of the operational amplifier 238 are connected together. The inverting input of the operational amplifier 238 is connected via a resistor 240 to the inverting input of the operational amplifier 224. 
     The output of the operational amplifier 238 is provided to the output 242 of the peak detector 222. The signal at the output 242 is the average value analog voltage X j . 
     The main limitation of the first embodiment of the pseudo-rms to dc converter is that the low pass filter 130 must effectively filter out the lowest frequency f m  of the analog signal X(t). This filtration requirement limits the rise time of the average value analog voltage X j . This limitation in the rise time becomes critical when the level of the analog signal X(t) suddenly increases. 
     This rise time limitation has been overcome by the pseudo-rms to dc converter shown in FIG. 3. The rise time of the peak detector 222 is very short for two reasons. First, the output impedance of the operational amplifier 224 is very low. Second, the capacitor 234 is inside the negative feedback loop from the output of the operational amplifier 238 to the inverting input of the operational amplifier 224. Thus, the rise time of the peak detector 222 is effectively limited only by the slew rate of the operational amplifier 224. 
     The second embodiment of the pseudo-rms to dc converter of the present invention can be further improved by using a more sophisticated 90° phase shift network 184 instead of the simple capacitor 186 and resistor 188 combination shown in FIG. 3. Instead, a more sophisticated R-L-C network could be used for improved performance. Further improvement also can be had by changing the R-C low pass filter 216 to one having a resistor, capacitor and inductor. Such an R-L-C low pass filter allows a better filter to response time relationship than that possible with the simpler resistor 218 and capacitor 220 combination shown. 
     Although the second embodiment of the pseudo-rms to dc converter appears to be complex, it should be noted that it is very economical to implement because of recent developments in integrated electronics. Specifically, the very inexpensive MSI device MC 3503 that is commercially available from Motorola Semiconductor Products, Inc., Phoenix, Ariz., contains four op-amps in a single package and is suitable for the present invention. 
     The improved generator of the φ(x) function of the present invention, as shown in FIG. 2, replaces stage 20 of my prior digital echo canceller. 
     As shown in FIG. 2, the second output of the absolute value stage 112 is applied to the plus input of a comparator 250. Comparator 250 is of conventional design. The average value analog signal X j , present at line 150, is applied to the negative input of the comparator 250. The output of the comparator 250 is applied to the first input of an AND gate 256. 
     The plus input of the comparator 250 is also connected to the plus input of a comparator 252. Comparator 252 is of conventional design. The minus input of comparator 252 is connected to V REF1  set to the amplitude of the background noise in the receive-in channel. The output of comparator 252 is applied to the second input of the AND gate 256. 
     The plus input of comparator 250 is also connected to the minus input of a comparator 254. Comparator 254 is of conventional design. The plus input of the comparator 254 is connected to V REF2  set to the maximum amplitude before overload for the receive-in channel. The output of comparator 254 is applied to the third input of the AND gate 256. The output of the AND gate 256, which is the logical signal φ(x), is applied to the X-register 16. 
     The operation of the improved φ(x) generator of the present invention is now described. Everytime a new sample |x i  | appears at the second output of the absolute value stage 112, it is compared during the analog-to-digital conversion of the analog-to-digital converter 116 with the average value analog voltage X j  in comparator 250. Sample |x i  | is simultaneously compared with reference voltage V REF1  in comparator 252 and is also simultaneously compared with reference voltage V REF2  in comparator 254. The output of each of the comparators is combined in the AND gate 256. The output φ(x) of the AND gate 256 is a logical 1 if and only if sample |x i  | fulfills the following three conditions: 
     (a) the amplitude of sample |x i  | is greater than the average value analog voltage X j  ; 
     (b) the amplitude of sample |x i  | is less than the amplitude of V REF2  (this protects the impulse response stored in the H-register from distortion caused by an overload signal in the receive-in side of the channel); 
     (c) the amplitude of sample |x i  | is greater than the amplitude of V REF1  (this protects the impulse response stored in the H-register from distortion caused when no voice signal is present in the voice-in channel). 
     In the φ(x) generator 20 of my prior digital echo canceller, the variable φ(x) was computed for every sample |x i  | every time the sample |x i  | entered the cross-correlation processor. Experiments using my prior echo canceller have shown, however, that during the period of 32 to 64 m.sec., which corresponds to 256 to 512 |x i  | samples stored in X-register 16, the change of the average value analog voltage X j  is so slow that the φ(x) value can be determined at the moment of the sample and stored in X-register 16 along with the other values associated with the sample. As explained above, this single computation of variable φ(x) for each sample |x i  | is done in the improved φ(x) generator of the present invention. An additional development of the improved φ(x) generator is that the variable φ(x) is available from X-register 16 at the same time the corresponding pseudo-logarithmic encoded sample |x i  | is also available. 
     The improved φ(x) generator of the present invention is very inexpensive to implement. Comparators 250, 252 and 254 are inexpensive, standard commercially available units. AND gate 256 is also an inexpensive, standard commercially available unit. The additional bit required in X-register 16 for storage of the φ(x) logical value is also inexpensive to implement. 
     The improved error detector of the present invention, as shown in FIG. 5, replaces stage 70 of my prior digital echo canceller, as shown in FIG. 1. 
     The true echo signal y(t) is applied to an input 260 connected to a sample and hold stage, designated generally by reference numeral 262. Sample and hold stage 262 has a driver 264 connected to a line 101 to receive a sample command from my prior digital echo canceller, and also has an electronic switch 266 which is controlled by driver 264. The output of sample and hold stage 262 is connected to the non-inverting input of an operational amplifier 268. A capacitor 270 is connected between the non-inverting input of the operational amplifier 268 and ground. The computed echo signal estimate r j  from my prior digital echo canceller is fed to the inverting input of the operational amplifier 268. 
     The output of the operational amplifier 268 is the difference signal ε j . The difference signal ε j  is applied to the band-pass filter 30 of my prior digital echo canceller. The difference signal ε j  is also applied to the plus input of a comparator 270 and is also applied to the minus input of a comparator 272. Comparators 270 and 272 are of conventional design. 
     The average value analog voltage X j  is applied to the first input of an adder circuit 274. A voltage reference V REF3  is applied to the second input of the adder circuit 274. The output of the adder circuit 274 is applied to the minus input of the comparator 270. The output of the adder circuit 274 is also applied to the input of an inverter 276. Inverter 276 is of conventional design. The output of the inverter 276 is applied to the plus input of the comparator 272. The output of the comparator 270 is connected to the first input of an OR gate 278. OR gate 278 is of conventional design. The output of the comparator 272 is connected to the second input of the OR gate 278. 
     Each time the difference signal ε j  exceeds the output of the adder circuit 274, the quantized signal Δh is produced at the output of the OR gate 278 and the logical sign signal Sg(Δh) of the quantized signal Δh is produced at the output of the comparator 270. The value of the voltage reference V REF3  is set to limit the sensitivity of the comparators 270, 272. Thus, when the difference signal ε j  is less than the signal at the output of the adder circuit 274, there is no quantized signal Δh produced at the output of OR gate 278 and there is no logical sign signal Sg(Δh) produced at the output of the comparator 270. 
     While the invention has been disclosed with respect to the preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as set forth in the appended claims.