ADAPTIVE FILTER

Abstract: The invention relates to a method for calculating a least mean square algorithm using an N-tap filter. A modified least mean square algorithm is used for the calculation. In a first calculation step, calculation is effected using a first, wide bit width in the N taps (AD-CFF). In a second step, depending on the result of the first calculation step, a second, smaller number of bits is selected for the further method steps.

Description: 1 Adaptive Filter The invention relates to an adaptive filter. Prior Art Adaptive filtering can advantageously be used to restore digital signals subjected to interference, particularly if the interference is caused by crosstalk or by a transmission channel whose channel characteristics are unknown or affected by a timing error. A simple adaptive filter algorithm is the known LMS algorithm, which requires 2N multipliers for an N stage filter structure. However, each of these multipliers must be sufficiently accurate to ensure the requisite stability. The known LMS algorithm can be realized by software or by a combination of software and hardware filter structures. In the case of a real-time hardware realization, however, there is the disadvantage of the high outlay on circuitry, which is too cost- intensive for some applications. Invention The invention is based on the object of specifying a hardware realization of an adaptive filter which has the requisite stability in conjunction with a reduction in the outlay on hardware. The invention is achieved by means of the features specified in Claim 1. Advantageous developments are represented in the subclaims . According to the invention, an adaptive filter is realized by modification of the LMS algorithm. This saves a large part of the multipliers in such a way that the coefficient adaptation is suppressed and a coefficient register is preferably divided into two sub-areas, in order to reduce the bit width of the filter multipliers. An adaptive filter is described mathematically by: Λf-l y(n) = t h(n)*x(n-i). 1=0 When the adaptive filter according to the invention is used for lower frequency components, it is preferable to take only every second sample, according to: y(n) = ∑ Jj (n) * x(n - 2 * i) where n = cycle index, x (n) and y(n) are the input and output samples, and bi (n) ,i=0, 1, ..N-l are the filter coefficients of the cycle n. The LMS algorithm for the adaptation of the coefficients is calculated according to: bi(n)=bi (n-l)+ μ*e(n-l) *x(n-i-l) , i=0,l,...,N - 1 where e(n) :=d(n)-y(n) where d(n) is the so-called desired output and is the adaptation constant. It is evident that an LMS-adaptive filter requires two multipliers, one for the filtering and one for the coefficient adaptation, for each coefficient digit position, called tap below. The adaptation μ*e (n-l) *x (n-i-1) should be small enough to guarantee the stability of the adaptation procedure, that is to say to obtain a sufficient accuracy of the coefficients bi(n) ,1=0,1.. N-l. The inventive modification of LMS algorithm reads as follows: bi (n) =bi (n-l ) +e (n-l ) *x (n-i -1 ) *2- ( _12) , i=0,l,2, ...,14, where e (n) : =SlGN (d (n) -y (n) ) - 1, ξ < 0 SIGN(ξ):= - 0 ξ = 0 1 ξ > 0 and J=0,l,2,3 is the user option, which can be designated as the adaptation constant. For each tap, only one multiplier for the filtering is used. The adaptation requires a register with a sufficient length of e.g. 18 bits in order to achieve the requisite accuracy for the stability of the adapted LMS algorithm. In order further to reduce the outlay on hardware, only a number of MSBs, the coefficient bits, preferably 8 bits of the register, are taken as filter coefficients and used for the multiplication. In a further refinement of the invention, the 8 bits of the register are fed to an evaluation circuit which, depending on the value of the 8 bits, performs windowing in order to achieve a further reduction to e.g. 5 bits. The evaluation circuit preferably eliminates leading equivalent bits by a shift function and clips a number of LSBs . This reduced value is used for the further calculation. The result of the evaluation circuit, preferably a 2-bit value, is used in a further, downstream shift function in order to recover the correct value . The effect advantageously achieved by the inventive adaptation of the LMS algorithm is that only one multiplier is required for each tap register. It is advantageous that, by virtue of the separate utilization of the tap registers for the adaptation and the filter multiplications, only a small bit width is required for the multipliers, without the accuracy and the requisite stability for the adaptation process being impaired. The use of the window moving technique according to the invention achieves a further reduction in the necessary bit width for the multipliers. As a result, it is no longer necessary to take account of the dynamic range of the coefficient values when selecting the multiplier bit width. Drawings Moreover, an exemplary embodiment of the adaptive filter according to the invention is described with reference to the drawings. In the figures: Figure 1 shows an adaptive filter; Figure 2 shows a block for the coefficient adaptation; Figure 3 shows a detail of the adaptive filter; Figure 4 shows window moving in a tap register. Exemplary Embodiments Figure 1 shows an exemplary embodiment of an adaptive filter containing 15 blocks AD-CFF for the coefficient adaptation of the kind illustrated in detail in Figure 2. Figure 2 shows a block for the coefficient adaptation AD-CFF having an input x, an output b and also an enable signal en, an input k for predetermined adaptation constants, an input e, an input rst for a reset signal, an input em for an operating mode and an I2C input I2C for external driving. The input x is connected to a 0 input of a multiplexer MX21 via a signed 6-bit line and to a 1 input of the multiplexer MX21 via an inverter INV21. The output of the multiplexer MX21 is connected to a 0 input of a multiplexer MX22, the 1 input of which is connected to earth. Control lines of the two multiplexers MX21, MX22 are connected to the input e, the multiplexer MX21 being switched by bit 0 (LSB) and the multiplexer MX22 by bit 1 (MSB) . The output of the multiplexer MX22 passes to an adder A21 via a multiplier M24, whose coefficient is set by the input k, and via a signed extension device SGNX21. The output of the adder A21 passes via the 0 input of a multiplexer MX23 to a register REG21, the output of which passes, on the one hand, back to a second input of the adder A21 and also to the output b via a device TRNCL1 for clipping less signigicant bits, a shift register S21 and a further device TRNCL2 for clipping less signigicant bits. A multiplexer MX24 has applied to its inputs 0, 1, 2 coefficients iO, il, i2 of an initialization mode for internal initialization, and to its control input a coefficient of an initialization mode for external initialization. The output of the multiplexer MX24 passes to the 1 input of the multiplexer MX23 via a multiplier M21, an MSB extension device MSBX21, the 0 input of a multiplexer MX25 and an LSB extension device LSBX21. In the case where the coefficient assumes the value "3", a logic "1" is fed to the control input of the multiplexer MX25. The I2C input is connected to the 1 input of the multiplexer MX25 via a decision circuit ENT21. The output of the register REG21 passes to the 0 input of the decision circuit ENT21. Both a control input of the decision circuit ENT21, and of the multiplexer MX23, and, via an OR gate 021, an enable input en of the register REG21 are connected to the input rst. The input en passes to a second input of the OR gate 021. The output of the device TRNCL1 for clipping less signigicant bits additionally passes to a logic circuit L21 having the inputs α, β, χ, δ. Depending on which bits 7, 6, 5, or 4 are set, the inputs oc, β, χ, δ, are occupied and a corresponding output signal s is fed from 6 the logic circuit L21 to a control input of the shift register S21, which fulfils the function 2 s . The algorithm for the coefficient adaptation can be calculated as follows: bι (n) =bi (n-l ) +e (n-l) *x (n-i-1) *2 ' ~11 , i=0,l,2, ...,14, in which case |SIGN(32-y(n)), y(n) > 0 e W : -| SIGN (_32_ y (n)), y(n)<0 where -1, ξ < 0 SIGN(ξ):-- 0 ξ = 0 , 1 ξ > 0 and k=0,l,2,3 is a user option, which can be designated as the adaptation constant. In order to set up the algorithm, an 18 bit register REG21 is necessary for each tap, in order to store bi (n) bits. Such a register is called a tap register in this case. The 8 MSBs are designated as coefficient bits and used as filter coefficients, while the entire register REG21 serves as adaptation store. The 8 coefficient bits of each tap register REG21 can preferably be read or written by an external processor by means of an I2C bus. However, only 5 of the 18 bits are used for the filter multiplications as are illustrated in Figure 1. These 5 bits are selected by means of a variable window across the 8 bits of the register REG21. The shifting of the movable window, as is illustrated in Figure 4, is calculated by the logic circuit L21 according to the following rule: 0, a ≠ 1, (a = β) Λ (β ≠ χ), 2, (a = β = χ) A(χ ≠ δ), 3, a = β = χ = δ. The coefficients can be reset to their initialization value provided that a signal rst is set. It is preferable to provide 4 modes for initializing the filter coefficients. The first 3 are internal. The predetermined initialization coefficients of these 3 internal modes may preferably read as follows: (bo ( Q ) ,b (0) , . . . ,bu (Q) ) = {0,0,0,0,0,0,0,16,0,0,0,0,0,0,0} (internal mode 0), {16,0,0,0,0,0,0,0,0,0,0,0,0,0,0} (internal mode 1), or {0,0,0,0,0,0,0,0,0,0,0,0,0,0,16} (internal mode 2). The fourth mode is provided for external initialization coefficients which are loaded, by means of an I2C bus, into the 8 coefficient bits of each tap register REG21. Figure 3 shows a detail of the adaptive filter with the illustration of blocks for the coefficient adaptation AD-CFF. The input x is passed, on the one hand, via a delay stage Z -1 to the x input of the first block AD-CFF and then further to the x input of the next block AD-CFF via a respective network comprising a delay stage Z _1 , a multiplexer and a further delay stage. A total of 15 blocks AD-CFF are used in this exemplary embodiment. The input x is initially connected to a multiplier M and is then subsequently connected to further multipliers M in each case after the multiplexer of each network. The multiplexers of the networks are jointly connected to the input em by their control input. Each b output of the 15 blocks AD-CFF is connected to the respective second input of the assigned multipliers M. The output of each multiplier M leads to a respective downstream LSB extension device LSBX, whose outputs each 8 pass to an assigned shift register S which are connected in each case via a delay stage Z "1 to the assigned s input of the blocks AD-CFF. Addition means A combine the outputs of the LSB extension device LSBX. Outputs of in each case 3 or 4 adders A pass via respective devices TRNCL for clipping less signigicant bits to downstream adders A, until all of the lines end in a final adder A. Connected to this final adder A, via a device TRNCL for clipping less signigicant bits, is a limiter LI which limits the signal in the range -16 / 15. The output signal of the limiter LI passes, on the one hand, to the output y of the adaptive filter and also via an adder to whose second input a constant -8 / 8 is applied, which constant is determined by the sign of the output signal of the limiter LI. The output of the adder passes to the e input of the blocks AD-CFF via a range decision circuit BE1, a 0 value detector, and a delay element. Figures 4 shows the window moving in a tap register. Proceeding from the significance of the output signal of the device TRNCL1 for clipping less signigicant bits, the logic circuit L21 defines those bits which are forwarded to the output b by the downstream device TRNCL2 for clipping less signigicant bits. The device TRNCL2 clips the last 3 bits of the signal. If, by way of example, a large value is present, the latter is not shifted by the shift register S21. However, if a small value is present, it is shifted by up to 3 places, with the result that leading zeros are suppressed. The information about this shift operation is made available to the downstream circuit at the output s, in order to re-establish a correct position of the result after the calculation has been carried out.

Claims: Patent Claims 1. Method for calculating a least mean square algorithm using an N-tap filter, characterized in that a modified least mean square algorithm is used for the calculation, in that, in a first calculation step, calculation is effected using a first, wide bit width in the N taps (AD-CFF) , and in that, in a second step, depending on the result of the first calculation step, a second, smaller number of bits is selected for the further method steps . 2. Method according to Claim 1, characterized in that the calculation is carried out according to the equation: y(n) = ∑ J, (n) * x(n - i), J=0 where n is the cycle index, N is the number of taps, x(n) is the input value, y(n) is the output value, where b (n) =b λ (n-l) + e (n-l) *x ( n-i-1 ) *2 " * -11 , i=0,l,2, ...,14, are the filter coefficients, in which case the following holds true JSIGN(32-y(n)), y(n) > 0 6(n) - |SIGN(-32-y(n)), y(n) < 0 where -1, ξ < SIGN( ): 0 ξ = o , 1 ξ > 3. Method according to Claim 1, characterized in that the calculation is carried out according to the equation: 10 y(n) = ∑ b t (n) * x(n - 2 * i) 1 =0 where n is the cycle index, N is the number of taps, x(n) is the input value, y(n) is the output value, where b λ ( n) =b (n-l) + e (n-l) *x (n-i-1) *2 ~ * -11 , i=0,l,2, ...,14, is the filter coefficient, in which case the following holds true fSIGN(32-y(n)), y(n) > 0 e(n). | SIGN (_32_y( n )) ; y (n) < 0 where • 1, ξ < 0 SIGN( ):= 0 ξ = 0 , 1 ξ > 4. Method according to Claims 1 to 3, characterized in that the second, smaller number of bits is evaluated in a logic circuit (L21) in such a way that a value having a length of 5 bits is selected, which value preferably begins with a first "1 0" or "0 1" bit combination, or, if such a combination is not present, the 5 LSBs are selected. 5. Method according to Claim 4, characterized by the further method steps: - the third value is multiplied by the input value (x) , whose bit length is preferably reduced: LSB extension is subsequently carried out, the result is shifted by a shift register as a function of the evaluation of the logic circuit (L21) , - the results of the N taps are limited by means of adders with downstream LSB clipping and taken as the output signal (y) of the filter.

Inventors: ERBAR MAXIMILIAN, LIN JINAN, ERBAR, MAXIMILIAN, LIN, JINAN
Applicants: ERBAR MAXIMILIAN, LIN JINAN, THOMSON BRANDT GMBH, DEUTSCHE THOMSON-BRANDT GMBH, ERBAR, MAXIMILIAN, LIN, JINAN
Application year: 1999
Main classification: H03H21
IPC codes: H03H21