Abstract:
A method of determining residue-echo threshold for the trans-hybrid echo path of a loop start (LS) trunk line, comprising the steps of estimating the impulse response of the trans-hybrid echo path, passing a speech-like signal through the LS trunk circuit and collecting the echo signal. The collected echo signal is compared to the convolution of the speech-like signal with the estimated impulse response. The difference between the convolution result and the collected echo signal is the residue echo, which represents the effect of nonlinearity. With different levels of excitation signal, a curve of residue echo power level against input signal level is obtained, and the distortion characteristics are derived from this curve.

Description:
FIELD OF THE INVENTION  
       [0001]     The present invention relates generally to communication systems, and more particularly to a method of measuring distortion and determining residue-echo threshold for a loop start (LS) trunk line between a Private Branch Exchange (PBX) and Central Office (CO).  
       BACKGROUND OF THE INVENTION  
       [0002]     The signal path between two telephones, involving a call other than a local one, requires amplification using a four-wire circuit. The cost and cabling required discourage extending a four-wire circuit to a subscriber&#39;s premise (i.e. Private Branch Exchange (PBX)) from the local exchange or Central Office (CO). For this reason, the four-wire trunk circuits are coupled to two-wire local circuits, using a device called a hybrid. Thus, when a PBX is connected to the CO through a Loop-Start (LS) trunk Line, the hybrid couples the analog signal from the four-wire circuit (where incoming and outgoing signals are separated) to the two-wire circuit where the incoming and outgoing signals are combined.  
         [0003]     Unfortunately, by its nature the hybrid is a leaky device. As signals pass from the four-wire to the two-wire portion of the network, the energy in the four-wire section is reflected back, creating an echo of the signal. The intensity of the echo depends on how well the impedance is matched between both sides of the hybrid. The impedance of the two-wire circuit can vary wildly depending on factors including the line set-up in the CO equipment, the distance between CO and PBX, the electrical characteristics of the wire, etc. Provided that the total round-trip delay occurs within just a few milliseconds, the echo generates a sense that the call is ‘live’ by adding sidetone, thereby making a positive contribution to the quality of the call.  
         [0004]     In cases where the total network delay exceeds 36 ms, however, the positive benefits disappear, and intrusive echo results. The actual amount of signal that is reflected back depends on how well the balance circuit of the hybrid matches the two-wire line. In the vast majority of cases, the match is poor, resulting in a considerable level of signal being reflected back.  
         [0005]     It is known in the art to employ Line Echo Cancelers (LECs) to address hybrid echo cancellation in Voice-Over-IP (VoIP) systems. Most LECs use the well-known Normalized Least Mean Square (NLMS) algorithm to adapt a linear Finite Impulse Response (FIR) filter, so that the FIR filter matches the transfer-function of the echo path and provides a counter-signal to cancel the echo.  
         [0006]     Because of the linear nature of the FIR filter and NLMS algorithm, LECs work well only if the echo path is truly linear. In reality, the LS trunk line circuit may contain some degree of nonlinear effects resulting from operating characteristics of power amplifiers and D/A, A/D converters, especially when a large signal (e.g. a loud speech signal) is present. Additional nonlinear sources include noise on the line, overshoot of line filters and quantization error of CODECs in digital systems. All of these sources create nonlinear components to the echo channel, which cannot be modeled by a linear FIR filter.  
         [0007]     Moreover, adapting on such a nonlinear echo can result in a loss of divergence in a well-converged FIR filter, giving rise to annoying echo bursts before the FIR filter re-converges. The portion of the echo that cannot be canceled by the linear FIR filter is referred to in the art as “residue echo”. If the residue echo is lower than a predefined threshold, a Non-Linear Processor (NLP) can be used to replace the residue echo with comfort noise. However, reducing the residue echo to below this threshold is difficult using an online adaptive procedure, because the nonlinearity is buried in the training signal.  
         [0008]     Clearly, a well-matched four-wire circuit gives little echo and less distortion, making the echo-canceling task easier. However, the selection of a best set of matching impedance settings for a specific LS trunk Line is currently very objective, mainly based on experience using trial and error. Such manual measurement consumes enormous human effort and time.  
       SUMMARY OF THE INVENTION  
       [0009]     According to one aspect of the present invention, offline measurements are performed in an effort to determine the characteristics of the LS circuit. More particularly, it is an object of an aspect of the invention to provide a method of measuring the nonlineariry of an LS trunk circuit using estimated impulse response and therefrom to provide the Residue-Echo threshold.  
         [0010]     In one aspect, a method is provided for measuring an estimate of the impulse response of the LS trunk circuit. Next, a speech-like signal is passed through the LS trunk circuit and the echo signal is collected. The speech-like signal is also convoluted with the estimated impulse response to obtain a convolution result. The difference between the convolution result and the collected echo signal is the residue echo, which can be considered as the effect of nonlinearity. With different levels of excitation signal, a curve of residue echo power level against input signal level is obtained, and the distortion characteristics are derived from this curve. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0011]     An embodiment of the present invention will now be described, by way of example only, with reference to the attached Figures, wherein:  
         [0012]      FIG. 1  is a schematic representation of a test configuration for implementing the method according to the present invention;  
         [0013]      FIG. 2  is a flowchart of the method according to a preferred embodiment of the present invention;  
         [0014]      FIG. 3  is a schematic representation of distortion measurement structure according to the present invention; and  
         [0015]      FIG. 4  is a curve showing distortion measurement for determining residue echo, according to the preferred embodiment.  
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0016]     Turning first to  FIG. 1 , a PBX  100  is shown connected via a two-wire local line  105  to a CO  110 . A hybrid  120  converts the signals between two-wire line  105  and the four-wire lines  125  within the PBX  100 . However, as discussed above, impedance mismatch between the two-wire line  105  and four-wire line  125  gives rise to trans-hybrid echo.  
         [0017]     According to the present invention, a method is provided for measuring distortion and determining residue-echo threshold for the loop start (LS) trunk circuit including hybrid  120  and the attached LS trunk line  105  between PBX  100  and the CO  110 , using a test signal generator  140  (typically a Digital Signal Processor (DSP)) and a receiver and calculator  150 .  
         [0018]     Turning now to  FIG. 2 , the measurement procedure of the preferred embodiment is set forth. First, an estimate of the time-domain trans-hybrid transfer function is obtained (beginning at step  200 ). This involves the controller  150  retrieving the target LS trunk port indexes and seizing the specified port (step  205 ).  
         [0019]     Next, an audio test file is prepared (step  215 ). For example, the audio file may contain a number (e.g. 5) consecutive impulse signals spaced apart from one another (e.g. 200 ms apart).  
         [0020]     The LS trunk port is then connected to the CO  110 , and the receiver and calculator  150  waits for dial tone (step  220 ).  
         [0021]     Upon detection of dial tone, the receiver and calculator  150  dials out a number (e.g. the CO silence termination number) to break the dial tone, and create silence on the line (step  225 ).  
         [0022]     The DSP  140  then plays the audio file to the outgoing line of the LS trunk interface (step  230 ), and at the same time receiver and calculator  150  records the signal coming back from the incoming line of the LS trunk port, superimposed by the outgoing signal. The receiver and calculator  150  then releases the LS trunk port.  
         [0023]     The receiver and calculator  150  then synchronizes the recorded signal with the played out signal by locating the impulses in the recorded signal (step  235 ). A predetermined number of audio samples are truncated after each impulse (e.g. in the preferred embodiment  128  samples are truncated, i.e. 16 ms).  
         [0024]     Next, the consecutive sections of the recorded signal are averaged (e.g. averaging the five groups of samples to obtain a final audio sample). This averaging procedure (step  240 ) decreases the effect of random noise on the line as well as digital truncation error.  
         [0025]     Steps  205  to  240  result in obtaining the time-domain trans-hybrid transfer function, which may be expressed as follows:  
         [0026]     Let h′ k (n) denote the k th  of impulse response and A as the amplitude of the impulse signal, then the final estimated impulse response is:  
                   h   ′     ⁡     (   n   )       =         ∑     k   =   1     5     ⁢       h   k   ′     ⁡     (   n   )           5   ⁢   A         ,           ⁢     n   =   0     ,     …   ⁢           ⁢   127             (   1   )             
 
         [0027]     Next, the residue echo is measured based on the estimated impulse response using the structure illustrated in  FIG. 3 .  
         [0028]     At step  245 , a further test signal is generated in generator  140  and applied to the hybrid  120 . Preferably, a test signal is chosen (e.g. clipped speech) to cause distortion in the LS trunk circuit. The echo signal is then collected and stored (step  250 ).  
         [0029]     The test signal is then convoluted with the estimated impulse response (step  255 ). This convolution result is compared with the stored echo signal. The difference between these two is considered as the residue echo and its level is calculated (step  257 ).  
         [0030]     The ratio between test signal level and residue echo level is then calculated (step  260 ). Different levels of test signal are sent and the corresponding ratios are recorded. For example, the overall array of levels may be L=[0, −1, −2, −3, −4, −5, −6, −7, −8, −9, −10, −11, −13, −15, −17, −19, −21, −23, −25, −27]. Each element, L k , is the relative level to the maximum level L 0 , where L 0  is the amplitude of the test signal that results in maximum CODEC word. In other words, the signal at maximum CODEC level is attenuated by a factor L k .  
         [0031]     Thus, letting r k (n) be the k th  test signal sent out and s k (n) be the corresponding k th  echo signal collected, then the k th  residue echo e k (n) can be written as: 
 
 e   k ( n )= s   k ( n )− conv[r   k ( n ), h ′( t )], 
 
t=0, . . . 127, n=0 . . . length(r k ), k=1 . . . 20  (2) 
 
         [0032]     and the ratio of k th  test signal level and residue echo level J k  is:  
                 J   k     =     10   ⁢           ⁢       log   10     [         ∑     n   =   0       length   ⁡     (     R   k     )         ⁢       r   k   2     ⁡     (   n   )             ∑     n   =   0       length   ⁡     (     R   k     )         ⁢       e   k   2     ⁡     (   n   )           ]         ,           ⁢     k   =     1   ⁢   …   ⁢           ⁢   20               (   3   )             
 
         [0033]     Although the estimated impulse response is not the true impulse response of the LS trunk circuit, it is a practical estimate of what the LEC can achieve after the NLMS linear adaptation. The difference between estimated and the true impulse response is mostly contributed by the line noise and quantization effects.  
         [0034]     Thus, if the true impulse response is denoted as h(n), then: 
 
 h   Δ ( n )= h ′( n )− h ( n ).  (4) 
 
         [0035]     Taking the Fourier Transform of both sides of equation (4): 
 
 H   Δ (ω)= H ′(ω)− H (ω)  (5) 
 
         [0036]     Transforming e k (n) into frequency domain results in:  
                       E   k     ⁡     (   ω   )       =         S   k     ⁡     (   ω   )       -         R   k     ⁡     (   ω   )       ⁢       H   ′     ⁡     (   ω   )                           =         S   k     ⁡     (   ω   )       -         R   k     ⁡     (   ω   )       ⁢     H   ⁡     (   ω   )         -         R   k     ⁡     (   ω   )       ⁢       H   Δ     ⁡     (   ω   )             ,           ⁢     k   =     1   ⁢   …   ⁢           ⁢   20         ⁢                         (   6   )             
 
         [0037]     The echo signal s k (n) contains the effect of nonlinear components and can be decomposed into a linear part and a nonlinear part: 
 
 s   k ( n )= conv[r   k ( n ), h ( t )]+ s′   k ( n ).  (7) 
 
         [0038]     Taking the Fourier transform of both sides of equation (7): 
 
 S   k (ω)= R   k (ω) H (ω)+ S′   k (ω)  (8) 
 
         [0039]     Substituting S k (ω) into equation (6):  
                       E   k     ⁡     (   ω   )       =           R   k     ⁡     (   ω   )       ⁢     H   ⁡     (   ω   )         +       S   k   ′     ⁡     (   ω   )       -         R   k     ⁡     (   ω   )       ⁢     H   ⁡     (   ω   )         -         R   k     ⁡     (   ω   )       ⁢       H   Δ     ⁡     (   ω   )                         =         S   k   ′     ⁡     (   ω   )       -         R   k     ⁡     (   ω   )       ⁢       H   Δ     ⁡     (   ω   )             ,           ⁢       for   ⁢           ⁢   k     =     1   ⁢   …   ⁢           ⁢   20                     (   9   )             
 
         [0040]     Using Parseval&#39;s theorem, equation (3) can be re-written as:  
                       J   k     =     10   ⁢           ⁢       log   10     ⁡     [           R   k     ⁡     (   ω   )       2           E   k     ⁡     (   ω   )       2       ]                       =     10   ⁢           ⁢       log   10     ⁡     [           R   k     ⁡     (   ω   )       2             S   k   ′     ⁡     (   ω   )       2     +       [         R   k     ⁡     (   ω   )       ⁢       H   Δ     ⁡     (   ω   )         ]     2     -     2   ⁢           S   k   ′     ⁡     (   ω   )       ⁡     [         R   k     ⁡     (   ω   )       ⁢       H   Δ     ⁡     (   ω   )         ]       T           ]           ,           ⁢     
     ⁢     k   =     1   ⁢   …   ⁢           ⁢   20               (   10   )             
 
         [0041]     Assuming the nonlinear components are uncorrelated to the line noise and quantization errors, then S′ k (ω)[R k (ω)H Δ (ω)] T ≈0, so equation (10) can be written as:  
                 J   k     ≈       -   10     ⁢           ⁢       log   10     ⁡     [           H   Δ     ⁡     (   ω   )       2     +           S   k   ′     ⁡     (   ω   )       2           R   k     ⁡     (   ω   )       2         ]           ,           ⁢     k   =     1   ⁢   …   ⁢           ⁢   20               (   11   )             
 
         [0042]     If the nonlinear component S′ k (ω) is very small compared to H Δ (ω) or proportional to signal level R k (ω), then J k  will be constant for all L k . If S′ k (ω) grows faster than R k (ω), which is typical when a nonlinear LS trunk circuit is under test, then J k  will become smaller when the signal level L k  is larger.  
         [0043]     After the test is done (step  265 ), a curve of J k  against levels L k  can be plotted, as shown in  FIG. 4 .  
         [0044]     A typical curve of distortion measurement consists of a flat line (indicating constant distortion relative to signal level in the LS trunk circuit) with a dip at the curve&#39;s critical point (derivative zero). The critical point of the curve indicates the onset of non-constant distortion and its corresponding level L k  is the maximum level that can be used for constant distortion. On the other hand, the residue echo threshold with respect to a particular signal level is the corresponding value of J k  on the curve.  
         [0045]     The flat line portion representing the area of constant distortion influences the upper bound of convergence depth of the echo canceler. The echo canceler cannot cancel a signal beyond this relative level. For example, if the flat line is at 32 dB, the echo canceler&#39;s convergence depth will be bounded by approximately 32 dB.  
         [0046]     As shown in  FIG. 1 , the method of the present invention is preferably implemented within a PBX  100 . A test signal generator  140  and receiver and calculator  150  are used to determine whether a particular analogue trunk line can be used in conjunction with certain PBX equipment and provide adequate echo cancellation. The apparatus of the present invention may be used by equipment installers to qualify customer lines for use with voice over IP systems, and to determine what particular settings of the PBX  100  should be used to provide adequate echo cancellation.  
         [0047]     Incorporating the measurement system (i.e. test signal generator  140  and receiver and calculator  150 ) within the PBX  100  allows for automatic adjustment of the PBX to provide optimal echo cancellation, reduces installation time and effort and also compensates for situations where a trunk provider changes the line characteristics.  
         [0048]     It will be appreciated that, although embodiments of the invention have been described and illustrated in detail, various modifications and changes may be made. For example, different numbers of impulse signals may be played out, and other, non-impulse test signals may be used to measure the impulse response (e.g. sine wave with different frequency, etc.). Also, the principles of the present invention may be used in an Acoustic Echo Canceler to measure the nonlinear characteristic of analog front-end and plastic components. In this application, the echo results form the acoustic coupling of the plastic between speaker and microphone and the reflection of sound from the environment. The nonlinear sources are the line noise, quantization effects, front end circuit distortion, and plastic distortion. All such alternatives and modifications are believed to be within the scope of the invention as defined by the claims appended hereto.