Impulse-Noise Cancellation using the Common Mode Signal Oana Graur Electrical Engineering and Computer Science Jacobs University Campus Ring 7 28759 Bremen Germany Type: Guided Research Thesis Date: June 2, 2009 Supervisor: Prof. Dr.-Ing. W. Henkel A BSTRACT Impulse noise has long been known for causing transmission errors. The current thesis presents a method of mitigating impulse noise using a Normalized LMS canceler which takes as reference input the common mode signal and subtracts the adapted version from the differential mode signal. A simple detection method for the impulse noise was devised. The effect of the step size on the stability and convergence of the algorithm was investigated. Multiple Matlab simulations were conducted for the training phase of the canceler, using sets of impulses generated by various sources. In the end, the simplifications this model involves were explored and suggestions for improvement were given. Contents 1 Introduction 3 2 Impulse noise 4 3 Adaptive Filtering 5 4 Impulse noise detection 7 5 Structure of the canceler 7 6 Simulation Results 8 6.1 NLMS Cancellation . . . . . . . . . . . . . . . . . . . . . . . . . 9 6.2 Training phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7 NEXT and FEXT 15 8 Conclusions 18 2 1 Introduction Transmission quality is often degraded by bursts of high amplitude referred to as impulse noise [1]. Noise can appear in a transmission system due to several reasons such as electromagnetic coupling of radio signals, inductive coupling of magnetic fields, and capacitive coupling of electric fields. Normally, transmission over copper cables is carried out using differential-mode (DM) signals. These signals propagate through a pair of wires. One wire carries the signal as we perceive it and the other one carries the opposite phase signal. Unlike single-ended signals, which are dependent on an external reference level, the differential signals are only referenced to the pair, which brings a few advantages. Since the receiver measures the difference between the two wires, the net result is twice as large and leads to improved signal to noise (SNR) ratio. xDM (t) = x1 (t) − x2 (t) (1) A common mode (CM) signal appears on both lines of a 2-wire cable, in-phase and with equal amplitudes. Technically, the CM signal is the arithmetic mean of the signals x1 (t) and x2 (t) and can be measured at the receiver from the center tap of a balun [3]. x1 (t) + x2 (t) xCM (t) = (2) 2 A 50 Ω termination resistor was included in the upper branch and a 1 MΩ in the lower CM branch. The reason to use a high-ohmic input impedance for the CM line was that the characteristic impedance for common-ground is undefined and an arbitrary value can have a detrimental effect on the common mode signal when the baluns are not perfectly symmetric. 3 Figure 1: CM and DM signals 2 Impulse noise Considerable investigations have been carried out in analyzing the performance of a communications channel under the influence of Gaussian noise. Unfortunately, those results were not always consistent with error rates of practical communication channels. More indepth investigations revealed that in the majority of the cases, the impulse noise was essentially non-Gaussian. The reason why the Gaussian distribution does not accurately estimate impulse noise is because impulse noise exhibits large amplitudes known as outliers that occur too frequently to fit to a Gaussian model. Impulse noise has a high peak to rms ratio and most of the energy contained below 200 kHz. It has also been discussed that impulse noise is comprised of bursts of impulses rather than of individual pulses spaced at various intervals. Some of the causes responsible for generating impulse noise are power line arcing, ac wiring, lightning strikes, electrical engines, welding and switching of home appliances [2]. For Internet users, high amounts of impulse noise can cause the service to slow down and result in errors in downloaded data. With IPTV, even low levels of impulse noise can result in video pixelation or breaks in the audio content. Measurements of impulse noise have been taken, both in DM and CM with a sampling rate higher than the Nyquist rate. Figure 2 presents an impulse measured both in DM and in CM. Please note the different amplitudes of the waveforms. Before attempting cancellation, the impulses were received and saved into nonoverlapping blocks of length N for convenience. 4 Differential Mode Signal 0.01 0.005 0 −0.005 −0.01 0 1000 2000 3000 4000 5000 6000 7000 8000 6000 7000 8000 Common Mode Signal 0.2 0.1 0 −0.1 −0.2 −0.3 0 1000 2000 3000 4000 5000 Figure 2: Impulse measured in DM and CM 3 Adaptive Filtering The concept of adaptive filtering has found a lot of applications over the past three decades, ranging from channel equalization and echo cancellation to mitigation of narrowband interference in wideband signals [6]. The Least Mean Squares Algorithm is typically used due to its low computational complexity and ease of implementation [7]. LMS does not require measurements of the correlation functions, nor does it require matrix inversions. LMS is a linear adaptive filtering algorithm that consists of two basic processes: a filtering process which involves computing the output of a transversal filter and generating an estimation of the error by comparing this output to a desired signal. The second process involves automatic adjustment of the coefficients of the filter in accordance with the estimation of the error. Since the LMS algorithm involves the feedback of the error in its operation, the issue of stability is of critical importance. For this reason, we define J(n) to be the mean-squared error produced at time n. A convergent algorithm satisfies the following condition J(n) → J(∞) n→∞ 5 (3) The output of a filter of size M is given by y(n) = hT (n)xM (n) (4) xM (n) = [x(n) x(n − 1) . . . x(n − M + 1)]T (5) h(n) = [h1 (n) h2 (n) . . . hM (n)]T (6) where xM (n) holds the M current samples within the filter taps at time n, h(n) holds the current weighting coefficients of the filter and hT denotes the Hermitian transpose of h(n). The LMS algorithm assumes zero mean of the input signals. The LMS update algorithm is described by the following equations h(n + 1) = h(n) + µe∗ (n)xCM (n) , (7) e(n) = xDM − hH (n) · xCM (n) , (8) where n is the time index, the boldface characters represent vectors, h(n) holds the current adaptive weights, e(n) is the current error, xDM (n) and xCM (n) are the current blocks of inputs of size M × 1 within the tapped delay line of the filter. M is the length of the FIR filter and µ is the step size factor. This algorithm is sensitive to values of the input vector x(n) and choosing a step size for which the algorithm would be stable and converge can prove to be problematic. For this reason, an adaptation of the algorithm has been proposed in [6], which normalizes the power of the input. The Normalized LMS (NLMS) is described by the following set of equations h(n + 1) = h(n) + µe∗ (n)xCM (n) xH CM xCM e(n) = xDM − hH (n) ∗ xCM (n) (9) (10) The step size µ directly affects how quickly the filter will converge. A small value of µ will lead to a small change in coefficients and a slow convergence. A larger value of the step size will decrease the time required for convergence. In case this value is too large, the coefficients will change too fast and the filter will not be stable anymore. It has been shown [6] that a tradeoff between convergence time and stability is given by the following optimal learning rate µopt = E[|y(n) − ŷ(n)|2 ] , E[|e(n)|2 ] (11) where y(n) is our DM signal and ŷ(n) is the CM signal already filtered. However, this formula cannot be used in practice as it requires a-priori knowledge about the 6 signal. Instead, experimentation is used. It can be shown that the value of the error will eventually converge to a minimum, given an optimum choice of the step size. This error, however will not be zero since the system includes outside noise and interference. It can be noticed from the formulas above that the LMS algorithm requires 2M + 1 multiplications and 2M additions per iteration. In other words, the computational complexity of the LMS is O(M ). 4 Impulse noise detection Although many other detection methods for impulse noise have been successfully described in the literature [9], the current thesis presents a simple method which uses linear interpolation. The CM input vector is split into nonoverlapping blocks of size L and out of each block, one maximum value is chosen. That is, after k distinct blocks, k − 1 local maxima can be linearly interpolated and from the corresponding (k − 1)L samples, the ones above a certain threshold can be flagged as being corrupted by impulse noise. This is necessary because, within an impulse, there are samples with amplitude values below the threshold for which the filter would not adapt otherwise. Once flagged, the CM signal goes through the adaptive FIR filter which updates the coefficients at every new flagged sample that goes in. Under ideal assumptions, the resulting output would contain the DM signal undistorted by the impulse noise except for a minimum residual error. The disadvantage of this interpolation method is that it introduces delay due to the need of a buffer of size L. The choice of the threshold and of the window size L have a critical effect on the output and have to be treated accordingly. The second subplot of Fig. 5 shows a CM impulse after interpolation. 5 Structure of the canceler The typical Least Mean Squares canceler is illustrated in Fig. 3. An adaptive canceler requires two inputs: a primary input that consists of the signal that needs to be corrected and a reference input which is correlated with the undesired signal, in our case, the impulse noise. The reference signal is processed by an adaptive FIR filter whose coefficients are adjusted at every new incoming input sample in order to minimize the error. In this case the DM signal represents the signal to be corrected and the CM represents the reference signal. The FIR filter is presented in Fig. 4. 7 Figure 3: Least Mean Squares Canceler The idea of using the CM signal as a reference signal to detect and cancel noise and RFI interference has previously been investigated in [4] [5]. Due to the electromagnetic coupling, the CM signal and the DM signal are strongly correlated within a transmission system. The CM signal consists of three components: independent noise, noise correlated with the noise in DM and a component correlated with the desired signal from DM [3]. For this simulation, the canceler was designed to adapt the weights while a detected impulse passed through the delay taps of the FIR. Once the impulse was outside of the transversal taps, the filter retained the last set of coefficients and filtered the rest of the data using them. Figure 4: FIR filter 6 Simulation Results For the first part of the simulation, sets of measurements were provided containing only the impulses and some background noise with no additional desirable signals. A more complex model that includes the transfer functions, NEXT, FEXT, and the 8 coupling from DM to CM is described in Section 7. The peak amplitude of the impulses measured was 5 mV in DM and 0.5 V in CM. Simulations with different step factors have been run. Also, measurements were provided containing impulse samples generated by a welding machine with CM amplitudes ranging between 10V and 40V. 6.1 NLMS Cancellation Applying the above algorithm to an impulse yields the result shown in Fig. 5. The first subplot depicts the DM impulse before attempting cancellation, the second subplot shows the CM envelope of the impulse after interpolation and the third one superimposes the input – in red – and the output – in blue – of the NLMS canceler. 0.01 Voltage [V] Differential Mode 0.005 0 −0.005 −0.01 0 1000 2000 3000 4000 5000 Sample [n] 6000 7000 8000 Voltage [V] 0.5 Common Mode Signal Envelope 0 −0.5 0 1000 2000 3000 4000 5000 Sample [n] 6000 7000 8000 Voltage [V] 0.01 Differential Mode LMS Output 0.005 0 −0.005 −0.01 0 1000 2000 3000 4000 5000 Sample [n] 6000 7000 8000 Figure 5: Impulse noise in DM, impulse noise in CM and envelope, filtered output Figure 6 presents two other examples of canceled impulse noise. For testing purposes, the canceler was trained using multiple sets of impulses and then data was 9 Voltage [V] 0.01 0.005 0 −0.005 −0.01 0 1000 2000 3000 4000 5000 Sample [n] 6000 7000 8000 0 1000 2000 3000 4000 5000 Sample [n] 6000 7000 8000 Voltage [V] 0.01 0.005 0 −0.005 −0.01 Figure 6: Canceled impulses, step size = 0.05 blindly filtered in order to study the behaviour of the output. In practice, the training phase can be initialized using a higher step size and then eventually, the step size can be decreased. Training can be continued with a smaller step size to ensure adaptivity in case the impulse coupling changes. The following subsection provides an overview of multiple Matlab simulations which took into account different parameters. 6.2 Training phase The first simulation implied the training of the filter using 780 input impulses. Different step factors were used for the study of convergence. Figures 7, 8, 9 show intermediate steps for the training phase for different step sizes. The output errors for the step sizes used are presented in Fig. 11. As expected, a small step size yields a slow decay and a bigger value of µ yields a very fast decaying curve. Since the data used for this simulation contained background noise, the error curves were expected not to be very smooth as well. On this graph, the declining tendency is more obvious for the curves which correspond to smaller coefficients, since the curves corresponding to larger coefficients converge to a minimum value in a very short amount of time. 10 Input/output of system for impulse number 1 Volts [V] 0.01 Differential Mode Signal System Output 0.005 0 −0.005 −0.01 0 1000 0 1000 0 1000 0 1000 2000 3000 4000 5000 6000 7000 Samples[n] Input/output of system for impulse number 150 8000 2000 3000 8000 2000 3000 8000 2000 3000 Volts [V] 0.01 0.005 0 −0.005 −0.01 4000 5000 6000 7000 Samples[n] Input/output of system for impulse number 400 Volts [V] 0.01 0.005 0 −0.005 −0.01 4000 5000 6000 7000 Samples[n] Input/output of system for impulse number 780 Volts [V] 0.01 0.005 0 −0.005 −0.01 4000 5000 Samples[n] 6000 Figure 7: Canceler training, step size = 0.005 11 7000 8000 Input/output of system for impulse number 1 Volts [V] 0.01 Differential Mode Signal System Output 0 −0.01 0 1000 0 1000 0 1000 0 1000 2000 3000 4000 5000 6000 7000 Samples[n] Input/output of system for impulse number 150 8000 2000 3000 8000 2000 3000 8000 2000 3000 Volts [V] 0.01 0 −0.01 4000 5000 6000 7000 Samples[n] Input/output of system for impulse number 400 Volts [V] 0.01 0 −0.01 4000 5000 6000 7000 Samples[n] Input/output of system for impulse number 780 Volts [V] 0.01 0 −0.01 4000 5000 Samples[n] 6000 Figure 8: Canceler training, step size = 0.01 12 7000 8000 Input/output of system for impulse number 1 Volts [V] 0.01 Differential Mode Signal System Output 0.005 0 −0.005 −0.01 0 1000 0 1000 0 1000 0 1000 2000 3000 4000 5000 6000 Samples[n] Input/output of system for impulse number 150 7000 8000 2000 3000 7000 8000 2000 3000 7000 8000 2000 3000 7000 8000 Volts [V] 0.01 0.005 0 −0.005 −0.01 4000 5000 6000 Samples[n] Input/output of system for impulse number 400 Volts [V] 0.01 0.005 0 −0.005 −0.01 4000 5000 6000 Samples[n] Input/output of system for impulse number 780 Volts [V] 0.01 0.005 0 −0.005 −0.01 4000 5000 Samples[n] 6000 Figure 9: Canceler training, step size = 0.1 13 Input/output of system for impulse number 2 Voltage [V] 2 Differential Mode Signal System Output 1 0 −1 −2 0 1000 0 1000 0 2000 2000 3000 4000 5000 6000 Sample [n] Input/output of system for impulse number 64 7000 8000 2000 3000 7000 8000 4000 6000 14000 16000 Voltage [V] 2 1 0 −1 −2 4000 5000 6000 Sample [n] Input/output of system for impulse number 112 Voltage [V] 2 1 0 −1 −2 8000 10000 Sample [n] 12000 Figure 10: Canceler training, impulses produced by a welding machine, step size = 0.5 14 −5 6 x 10 0.00005 0.0001 0.0005 0.001 0.005 0.01 Squared error 5 4 3 2 1 0 0 1 2 3 4 Samples [n] 5 6 7 6 x 10 Figure 11: Squared error curves for different step sizes 7 NEXT and FEXT In communications, crosstalk refers to coupling – capacitive, inductive or conductive – from one cable pair to another within the bundle. Although interference within each pair is caused by signals within all the other pairs from the same transmission system, this can be modelled as being produced by only one major interferer. One way of minimizing the coupling is to twist pairs and shield them. Although in theory twisted pairs are perfectly balanced and noise couples onto each conductor in a twisted pair equally, in practice this is never the case. Far End Crosstalk (FEXT) refers to interference between two pairs in one cable as measured at the end of the cable furthest from the transmitter. Near end crosstalk (NEXT) is the interference between two pairs in one cable as measured at the end of the cable nearest to the transmitter. Figure 12 presents a simplification of a transmission system containing one major interferer. At the receiver side, in DM, the signal is present as a sum of the desired signal after passing through the wire, one FEXT component from the adjacent pair and one NEXT component. The same idea is also true for the CM signal. The cancellation algorithm described above does not take into account the signal coupling into CM. If the desired signal couples highly into CM, the canceler will adapt for it as well and the desirable component will be eliminated from the DM along with the interference. Figure 13 gives a plot of the measured transfer functions both into CM and DM mode. It can be easily seen that the transfer function for the CM is approximately –40dB for the whole range of frequencies up to 40 Mhz. Figures 14 and 15 prove the idea that both FEXT and NEXT couple higher 15 Figure 12: Transmission system including NEXT and FEXT into DM. 0 TR DM TR CM -10 -20 response / dB -30 -40 -50 -60 -70 -80 0 5e+006 1e+007 1.5e+007 2e+007 2.5e+007 frequency / Hz 3e+007 3.5e+007 Figure 13: DM and CM transfer functions 16 4e+007 -20 NEXT DM NEXT CM -30 response / dB -40 -50 -60 -70 -80 -90 0 5e+006 1e+007 1.5e+007 2e+007 2.5e+007 frequency / Hz 3e+007 3.5e+007 4e+007 Figure 14: NEXT coupling into DM and CM -30 FEXT DM FEXT CM -40 response / dB -50 -60 -70 -80 -90 -100 0 5e+006 1e+007 1.5e+007 2e+007 2.5e+007 frequency / Hz 3e+007 3.5e+007 Figure 15: FEXT coupling into DM and CM 17 4e+007 8 Conclusions Based on the idea that interference coupling is higher in common mode, a Normalized Least Mean Squares canceler was used to eliminate the impulse noise from the differential mode signal. Matlab simulations were run using different sets of measurements for the training phase of the canceler and the effects of near and far-end crosstalk were discussed. For the first simulations with impulses with small amplitudes, a drop in impulse amplitudes down to the level of background noise was observed after training with 780 impulses and a small step size. For the impulses generated by a welding machine which had DM peak amplitudes of around 3V, the results were not as satisfying since there were not enough impulses available to train on and the step size chosen had to be high in order to see a change in the output. In this case only 112 impulses were used and the impulse noise peak amplitude dropped from 3V to 1.5V. In order to improve this results, the canceler has to train over a longer set of impulses. For a more accurate mathematical representation, a more suitable cancellation algorithm which does not assume a Gaussian distribution of impulse amplitudes can be chosen. For a practical implementation when additional desirable signals are present, the interpolation method used for impulse detection is not suitable anymore. Also, if the NEXT and FEXT coupling into CM is high, the canceler will subtract that interference from DM even though it is not present there. All these aspects have to be taken into account and the coupling functions have to be known beforehand to guarantee the efficient cancellation of impulse noise using the CM signal. 18 References [1] S. Kassam, ”Signal Detection in Non-Gaussian Noise”, Springer-Verlag, 1988. New York: [2] R.P.C. Wolters, ”Characteristics of Upstream Channel Noise in CATVnetworks”, IEEE Trans. Broadcast, Vol. 42, No. 4, pp. 328-332, Dec. 1996. [3] T. Magesacher, P. Ödling, P. O. Börjesson and T. Nordström, ”Exploiting the Common Mode Signal”, European Signal Processing Conference 2004, Vienna, Austria, September 2004. [4] T. Magesacher, P. Ödling, T. Nordström, T. Lundberg, M. Isaksson, and P. O. Börjesson, ”An Adaptive Mixed-Signal Narrowband Interference Canceler for Wireline Transmission Systems”, Proc. IEEE Int. Symp. Circuits and Systems, Sydney, Australia, May 2001, Vol. IV, pp. 450-453. [5] P. Ödling, P. O. Börjesson, T. Magesacher and T. Nordström, ”An Approach to Analog Mitigation of RFI”, IEEE J. Select. Area Commun, Vol. 20, No. 5, pp. 974-986, June, 2002. [6] S. Haykin, Adaptive Filter Theory, Englewood Cliffs, Prentince Hall, 1986. [7] B. Widrow, J. R. Glover, J. M. Mccool, J. Kaunitz, C. S. Williams, R. H. Hean, J. R. Zeidler, E. Dong, and R. C. Goodlin, ”An Adaptive Noise Cancelling: Principles and Applications”, Proc. IEEE, Vol. 63, No. 12, pp. 1692-1716, December, 1975. [8] P. Mertz, ”Model of Impulsive Noise for Data Transmission”, IRE International Convention Record, Pt. 4, pp. 247-249, 1960. [9] T. Chen, C. Tsai, T. Y. Chen, ”An Intelligent Impulse Noise Detection Method by Adaptive Subband-Based Multi-State Median Filtering”, Second International Conference on Innovative Computing, Information and Control, ICICIC ’07., 5-7 September, 2007. 19