Journal of Counication and Coputer (4 484-49 doi:.765/548-779/4.6. D DAVID PUBLISHING Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor Li Tan, Jean Jiang, and Liango Wang. College of Engineering and Technology, Purdue University North Central, Westville, Indiana 4639, USA. School of echanical Engineering, Nanjing University of Science and Technology, Nanjing, 94, China Abstract: This paper proposes an iproved adaptive haronic IIR notch filter. The proposed algorith utilizes varying notch bandwidth and convergence factor to achieve robust frequency estiation and tracking. A forula to deterine the stability bound by using the LS (least ean squares algorith is derived. In addition, the developed algorith is also devised to prevent the adaptive algorith fro converging to its local inia of the SE function due to signal fundaental frequency switches in the tracking process. Key words: Adaptive filter, LS algorith, frequency tracking, and notch filter.. Introduction Frequency tracking in presence of haronic distortion and noise has been attracted uch research attention [-6], where various adaptive IIR notch filters are applied. In general, if a signal to be estiated is subjected to nonlinear effects in which possible haronic frequency coponents are generated, a higher-order notch filter, which is constructed by cascading second-order IIR (infinite ipulse response notch filters, can be eployed to estiate the signal frequency including any haronic frequencies. The general IIR notch filter ethod [-6] uses ore filter coefficients and the corresponding adaptive algorith ay converge to local inia of the SE (ean square error function due to signal frequency changes. A low-cost adaptive haronic IIR notch filter with a single adaptive paraeter [7] has recently been proposed to efficiently perfor frequency estiation and tracking in a haronic frequency environent. The proposed LS (least ean square algorith begins with an optial initial paraeter, which is estiated based on a block of input saples, to prevent the algorith fro converging to the local inia. However, when the signal fundaental frequency switches during the tracking process, the global iniu of the SE function will suddenly be changed. In this scenario, the LS algorith ay converge to the local inia with a wrong estiated frequency value or the algorith could start at the point of the SE function with a very low gradient so that the algorith suffers fro a slow convergence rate. Therefore, in this paper, a siple schee is first devised to onitor the global iniu of the SE function and it will reset the adaptive paraeter using its new estiation whenever a possible local iniu is detected. Secondly, we iprove the algorith convergence and frequency tracking by using varying notch bandwidth and convergence factor. The coputer siulations deonstrate validity of the iproved algorith. Finally, we present conclusions. Corresponding author: Li Tan, Ph.D., professor of electrical engineering, research fields: digital signal processing, active noise control and control systes, digital counications. E-ail: lizhetan@pnc.edu.
Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor 485. Adaptive Haronic IIR Notch Filter and Proposed Algorith. Adaptive Haronic IIR Notch Filter The adaptive haronic IIR notch filter proposed in Ref. [7] has the following for: H ( z H ( z H ( z H ( z H ( z ( where, H ( z denotes the th nd-order IIR sub-filter whose transfer function is defined as: z cos( z H ( z ( rz cos( r z The filter output y ( n fro the th sub-filter can be expressed as: y y cos( y ( n y (3 rcos( y( n r y,,, with y x. Fro Eq. (, the transfer function has only one adaptive paraeter and has zeros on the unit circle resulting in infinite-depth notches. The paraeter r controls the notch bandwidth. It requires r for achieving narrowband notches. When r is close to, the 3-dB notch bandwidth can be approxiated as BW ( r [8]. The SE function, Ey [ ] Ee [ ], at the final stage is iniized using the LS algorith, where en ( y. Once the adaptive paraeter is adapted to the angle corresponding to the signal fundaental frequency, each (,3,, will autoatically lock to its haronic frequency. The LS update equations are given below: cos[ ] ( n sin[ ] y ( n rcos[ ] ( n r rsin[ ] y ( n,,, where, (4 ( n y (5 y is the gradient ter with y xn ( ( n and is the convergence factor. Since the SE function is a nonlinear function of the single adaptive paraeter, the algorith ay converge to one of the local inia due to the inappropriately chosen initial value of. To prevent local convergence, the algorith will start with an optial initial value, which is coarsely searched over the frequency range: /(8, /(8,,79 /(8, as follows: (6 arg (in Ee [ ( n, ] / where, the estiated SE function, Ee [ ( n, ], can be deterined by using a block of N signal saples: N Ee [ ( n, ] y ( ni, (7 N i When the signal fundaental frequency switches, the current algorith ay suffers fro a local iniu convergence with a wrong frequency value or a slow convergence rate. Fig. shows the SE function global iniu changes when the fundaental frequency switches fro 875 Hz to,5 Hz. The algorith is assued to start at the location of 875 Hz (previous global iniu corresponding to 875 Hz will converge to the local iniu at the location of 8 Hz (all SE functions are siulated using the sapling rate of 8 Hz, 3, r.96 and input saples. Again, when the fundaental frequency switches fro,5 Hz to, Hz, the algorith will suffer slow convergence, since the gradient of the SE function corresponding to the fundaental frequency of, Hz at the location of,5 Hz is very sall (approxiately flat. This is due to that the pole radius, r is chosen to be close to to aintain a narrower notch bandwidth.. Global iniu onitoring and Resetting To prevent the proble of local iniu convergence, we onitor the global iniu by coparing the frequency deviation
486 Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor.8.6 Algorith starts at 5 Hz and converges to Hz at slow speed.4 SE..8.6 Algorith starts at 875 Hz and converges to 8 Hz Local iniu at 8 Hz SE for 875 Hz.4 SE for Hz SE for 5 Hz. 4 6 8 4 Frequency (Hz Fig. SE functions for the haronic notch filter at the fundaental frequencies, 875 Hz,, Hz and,5 Hz, respectively. f f f (8 with a axiu allowable frequency deviation chosen below: fax.5 (.5 BW (9 where, f.5 fs / Hz is the pre-scanned optial frequency via Eqs. (6 and (7, f s denotes the sapling rate in Hz, and BW is the 3-dB bandwidth of the notch filter, which is approxiated by BW ( r fs / in Hz. If f fax, the adaptive algorith ay possibly converge to its local inia. Then the adaptive paraeter can be reset to its new estiated optial value fro Eqs. (6 and (7 and then the algorith will resue frequency tracking fro the neighborhood of the global iniu..3 Varying Notch Bandwidth and Convergence Factor To illustrate the iproveent of the slow convergence rate as described in Fig., we plot the SE functions corresponding to the fundaental frequency of, Hz for different pole radiuses using the sae sapling rate of 8, Hz, 3, and input saples and their corresponding agnitude frequency responses in Fig.. It is observed that when the pole radius r is uch saller than ( r.8, we will have a larger SE function gradient starting at,5 Hz to speed up the slow convergence. But using the saller r will end up with a degradation of the notch filter frequency response, that is, a larger notch bandwidth. On the other hand, choosing r close to ( r.96 will aintain a narrow notch bandwidth but result in a slow convergence rate, since the algorith begins with a sall SE function gradient value at,5 Hz. Consider the fact that when is located away * fro its optial value, then it is desirable for the adaptive notch filter to have a bigger notch bandwidth (saller r and a larger convergence factor (larger ; when approaches to its optial value, the narrower notch bandwidth ( r close to and sall convergence factor are desirable to achieve a sall isadjustent as well as preserve a good notch filter frequency response (see Fig. b. Furtherore, when the algorith approaches to its global iniu, the
Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor 487 6 (a SE 4 r=.9 r=.8 Larger gradient value Sall gradient value 5 Hz r=.96 4 6 8 4 Frequency (Hz r=.8 (b H(f (db - - -3 r=.9 r=96-4 5 5 5 3 35 4 Frequency (Hz Fig. (a SE functions for r.8, r.9 and r.96 ; (b agnitude frequency responses for r.8, r.9, and r.96. cross-correlation cn ( between the final filter output en ( y and its delayed signal y ( n becoes uncorrelated, that is, cn ( Ey [ ( ny ( n]. Hence, we can adopt the cross-correlation easureent to control the notch bandwidth and convergence factor. The cross-correlation can be estiated below: cn ( cn ( ( y( ny ( n ( where,. The radius of the pole locations, which controls the notch bandwidth, can be updated according to: rn ( r r e cn ( in ( where, rin r rin r with rin.8 (still providing a good notch filter frequency response. The convergence factor is then updated according to where, c ax ( e ( ax is the upper bound for in r r r and is the daping constant, which controls the speed of change for the notch bandwidth and convergence factor. Our iproved algorith is then suarized in Table. To include Eqs. (-( in the iproved algorith, the additional coputational coplexity over the algorith proposed in Ref. [7] for processing each input saple requires six ultiplications, four additions, two absolute operations, and one exponential function operation..4 Stability Bound We focus on deterining a siple upper bound for Table Adaptive haronic IIR notch LS algorith with varying notch bandwidth and convergence factor. Step : Deterine the initial using (6 and (7: Search for arg (in Ee [ ( n, ] / for /(8,,79 /(8 Set the initial condition: ( and f.5 s f / Hz. Step : Apply the LS algorith using (3, (4, (, (, (, and (5 to obtain. Step 3: Convert in radians to the desired estiated fundaental frequency in Hz: f.5 fs /. Step 4: onitor the global iniu: if f f fax, go to step Otherwise continue Step.
488 Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor Eq. ( using the existing approach in Refs. [-4]. For siplicity, we oit the second and higher order ters in the Taylor series expansion of the filter transfer function (theoretical analysis including the second-order ters is lengthy and not pursued in this work. We achieve the following results: j H ( e, H ( ( (3 where, sin( j H ( Hk ( e j j ( r( e re k, k (4 B ( The agnitude and phase of H ( in (4 are defined below: B ( H ( (5 H ( (6 Now, consider the input signal x( n with each haronic aplitude A and phase as: x Acos[( n] v (7 where, vn ( is the white Gaussian noise. Siilar to Refs. [, 3], we can approxiate the haronic IIR notch filter output as: y ( n AB( cos[( n ] v (8 where, v ( n is the filter output noise and note that [ ] (9 To derive the gradient filter transfer function defined as S( z ( z/ X( z in Refs. [, 3], we can achieve the following recursion: S( z H( z S ( z z sin( [ rh ( z] ( H ( z H ( z rcos( z r z Expanding Eq. ( leads to: nsin( n z s( z Hk( z n k, kn r cos( n z r z r nsin( n z H( z rcos( n z r z n ( At the optial points,, the first ter in Eq. ( is approxiately constant, since we can easily verify that these points are essentially the centers of band-pass filters [4]. The second-ter is zero due to j He (. Therefore, for siplicity, we can approxiate the gradient filter frequency response at as: j j j sin( e s ( e H ( e k, k cos( r e r e j sin( Hk( e B( j j k, k ( r( e re Using Eq. (4 leads to: k j j ( j S ( e B( (3 The gradient filter output can be approxiated by: ( n B( Acos[( n ] v (4 where, v ( n is the noise output fro the gradient filter. Substituting Eqs. (8 and (4 in Eq. (5 leads to the following: E[ ( n] E[ ] E[ y ] (5 E[ ( n] E[ ] AB ( cos( E[ ] (6 Ev [ ( nv ] Then the stability bound in ean convergence is achieved as: ( / AB ( cos( (7 The last ter in Eq. (6 is not zero [3], but it can significantly be reduced by using a varying convergence factor in Eq. (, the upper bound can be expressed as: ( (8 AB( Since evaluating Eq. (8 still requires knowledge of all the haronic aplitudes, we siplify Eq. (8 by assuing that each frequency coponent has the sae aplitude to obtain: ( (9 x B(
Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor 489 where, x is the power of the input signal. Furtherore, for each given, we can nuerically search for the upper bound ax which works for the required frequency range, that is, ax in[arg( u( ] (3 / Fig. 3 plots the upper bounds based on Eq. (9 versus using for r.8, r.9 and x r.96, respectively. We can see that a saller upper bound will be required when r is close to and increases. 3. Coputer Siulations In our siulations, the input signal containing up to third haronics is used, that is, x sin( fan/ fs.5cos( fan/ fs (3.5cos( 3 fan/ fs where, f a is the fundaental frequency and f s = 8, Hz. The fundaental frequency changes for every n =, saples. Our developed algorith uses the following paraeters: 3, N,, c(.,.997, rin.8, r.6 4 The upper bound ax.4 is nuerically searched using Eqs. (5, (3, (9, (3 for r.96. The behaviors of the developed algorith are deonstrated in Fig. 4. Figs. 4a-4c depict the cross correlation cn (, pole radius rn ( and adaptive step size. Fig. 4d shows the tracked fundaental frequencies. As expected, when the algorith converges, cn ( approaches to zero (uncorrelated, rn ( will becoe r ax.96 to offer a narrowest notch bandwidth. At the sae tie, un ( approaches to zero so that the isadjustent can be reduced. In addition, when the frequency changes fro 875 Hz to,5 Hz, the algorith starts oving away fro its original global iniu, since the SE function is changed. Once the tracked frequency is oved beyond the axiu allowable frequency deviation fax, the algorith relocates and reset and is reset again after the frequency is switched fro,5 Hz to, Hz. To copare with the algorith recently proposed in Ref. [7], we apply the sae input signal to the adaptive haronic IIR notch filter using the fixed notch bandwidth ( r.96 and convergence factors, 4 where ax.4 (upper bound, fast 4 convergence factor and (slow convergence - - r=.8 uax -3 r=.9 r=.96-4 -5.5.5 3 3.5 4 4.5 5 5.5 6 Fig. 3 Plots of the upper bounds Eq. (9 versus using x.
49 Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor (a c(n.4. Reset Reset 3 4 5 6 (b r(n (c u(n.9.8 3 4 5 6 x -4 3 4 5 6 5 875 Hz 5 Hz Hz 5 3 4 5 6 n (Iterations Fig. 4 (a The cross correlation cn ( between the notch filter output and its delayed output; (b varying notch filter paraeter rn ( ; (c varying convergence factor ; (d tracked fundaental frequencies f ( n. (d f(n (Hz (a f(n (Hz 5 5 5 Hz Hz 875 Hz ( ( (3 8 Hz, wrong frequency value 5 5 5 3 35 4 45 5 55 6 5 ( (3 (b f(n (Hz ( SNR= db SNR=8 db SNR=9 db 5 5 5 5 3 35 4 45 5 55 6 n (Iterations Fig. 5 (a Frequency tracking behavior coparisons for noise free condition; (b frequency tracking behavior coparisons 4 for noise environent. (: new algorith, ax.4, rin.8 and r ax.96 ; (: algorith [7], r.96 and ax.4 r and 4 (fast convergence; (3: algorith [7],.96 4 (slow convergence. factor are used, respectively. As shown in Fig. 5a, when the fundaental frequency switches fro 875 Hz to,5 Hz, the iproved algorith converges to its global iniu with a true frequency of,5 Hz while the algorith in Ref. [7] with both fast and slow convergence factors converges to a local iniu,
Adaptive Haronic IIR Notch Filter with Varying Notch Bandwidth and Convergence Factor 49 respectively, with a wrong tracked frequency value as 8 Hz. Fig. 5b shows siulation results for noisy environent, where both algoriths converge to their global iniu, respectively. When the fundaental frequency switches fro,5 Hz to, Hz, the proposed algorith takes iterates to converge, while the algorith [7] takes 5 iterations using ax.4 4 4 and 3 iterations to converge, respectively. The algorith proposed in Ref. [7] has a slow convergence rate because of the sall gradient value of its SE function. In addition, the iproved algorith is robust to noise as depicted in Fig. 5b. This is due to the fact that when the algorith converges, the convergence factor approaches to zero to offer the saller isadjustent. It is evident fro Fig. 5 that our iproved algorith tracks the signal frequency switches well for both noise free and noise conditions. 4. Conclusions In this paper, we have proposed an iproved adaptive haronic IIR notch filter for frequency tracking in a haronic frequency environent. The proposed algorith utilizes varying notch bandwidth and convergence factor to achieve a higher convergence rate and robust frequency tracking. The developed algorith is able to prevent the adaptive algorith fro its local iniu convergence due to signal fundaental frequency switches in the tracking process. References [] Chicharo, J., and Ng, T. 99. Gradient-Based Adaptive IIR Notch Filtering for Frequency Estiation. IEEE Trans. Acoust., Speech, and Signal Processing 38 (ay: 769-77. [] Zhou, J., and Li, G. 4. Plain Gradient-Based Direct Frequency Estiation Using Second-Order Constrained Adaptive IIR Notch Filter. Electronics Letters 5: 35-5. [3] Xiao, Y., Takeshita, Y., and Shida, K.. Steady-State Analysis of a Plain Gradient Algorith for a Second-Order Adaptive IIR Notch Filter with Constrained Poles and Zeros. IEEE Transactions on Circuits and Systes-II 48 (July: 733-4. [4] Oetraglia,., Shynk, J., and itra, S. 994. Stability Bounds and Steady-State Coefficient Variance for a Second-Order Adaptive IIR Notch Filter. IEEE Transactions on Signal Processing 4. [5] Kusljevic,., Toic, J., and Jovanovic, L.. Frequency Estiation of Three-Phase Power Syste Using Weighted-Least-Square Algorith and Adaptive FIR Filtering. IEEE Trans. on Instru. eas. 59 (February: 3-9. [6] Piskorowski, J.. Digital Q-Varying Notch IIR Filter with Transient Suppression. IEEE Trans. on Instru. eas. 59 (Feb.: 866-7. [7] Tan, L., and Jiang, J. 9. Novel Adaptive IIR Notch Filter for Frequency Estiation and Tracking. IEEE Signal Processing agazine (Noveber: 68-89. [8] Tan, L., and Jiang, J. 3. Digital Signal Processing: Fundaentals and Applications. nd ed., Elsevier/Acadeic Press.