EURASIP Journal on Applied Signal Processing 2005:12, 1910–1922 c ○ 2005 Hindawi Publishing Corporation Design of Nonrecursive Digital Filters Using the Ultraspherical Window Function

An efficient method for the design of nonrecursive digital filters using the ultraspherical window function is proposed. Economies in computation are achieved in two ways. First, through an efficient formulation of the window coefficients, the amount of computation required is reduced to a small fraction of that required by standard methods. Second, the filter length and the independent window parameters that would be required to achieve prescribed specifications in lowpass, highpass, bandpass, and bandstop filters as well as in digital differentiators and Hilbert transformers are efficiently determined through empirical formulas. Experimental results demonstrate that in many cases the ultraspherical window yields a lower-order filter relative to designs obtained using windows like the Kaiser, Dolph-Chebyshev, and Saramäki windows. Alternatively, for a fixed filter length, the ultraspherical window yields reduced passband ripple and increased stopband attenuation relative to those produced when using the alternative windows.


INTRODUCTION
Window functions (or windows for short) are time-domain weighting functions that have found widespread usage in signal processing applications such as power spectral estimation, beamforming, and digital filter design. Windows can be categorized as fixed or adjustable [1]. Fixed windows have only one independent parameter, namely, the window length which controls the window's mainlobe width. Adjustable windows have two or more independent parameters, namely, the window length, as in fixed windows, and one or more additional parameters that can control other window characteristics. Each of the adjustable windows has been derived by exploiting certain characteristics of well-known polynomials to satisfy a particular criterion. For instance, the Kaiser and Saramäki windows [2,3] have two parameters and yield close approximations to discrete prolate functions, which have maximum energy concentration in the mainlobe. The Dolph-Chebyshev window [4] has two parameters and produces the minimum mainlobe width for a specified maximum sidelobe amplitude. The Kaiser, Saramäki, and Dolph-Chebyshev windows can control the amplitude of the sidelobes relative to that of the mainlobe. The ultraspherical window [5,6,7,8] has three parameters and through the proper choice of these parameters, the amplitude of the sidelobes relative to that of the mainlobe can be controlled as in the Kaiser, Saramäki, and Dolph-Chebyshev windows, and, in addition, different sidelobe patterns can be achieved. With the judicious selection of the ultraspherical window's additional parameter, a unique family of sidelobe patterns, which includes both the Dolph-Chebyshev and Saramäki patterns as special cases, can be readily obtained by generating the window's coefficients through a closed-form solution [5,7]. Furthermore, a comparison with other windows has shown that a difference exists in performance between the ultraspherical and Kaiser windows, which depends critically on the set of prescribed spectral characteristics [8]. In [6] Deczky used the ultraspherical window to provide a proof-of-concept example for nonrecursive filter design. In [9] Johnson and Johnson used ultraspherical polynomials for the approximation problem in analog filter design.
The window method for nonrecursive digital filter design is based largely on closed-form solutions [10]. As a result, it is straightforward to apply and entails a relatively insignificant amount of computation. Unfortunately, the window method usually yields suboptimal designs whereby the filter order required to satisfy a given set of specifications is not the lowest that can be achieved. On the other hand, multivariable optimization algorithms for nonrecursive digital-filter design, for example, the weighted-Chebyshev method of Parks and McClellan [11,12] and the more recent generalized Remez method of Shpak and Antoniou [13] can yield optimal designs with respect to some error criterion; however, these algorithms generally require a large amount of computation and are, therefore, unsuitable for real-or quasi-realtime applications like portable multimedia devices where onthe-fly designs that adapt to changing environmental conditions such as battery power and quality-of-service issues are required. Simple signal processing algorithms and structures [14] can address these problems by trading between the accuracy of results and the utilization of implementation resources. In [15,16] a window-based algorithmic approach to the design of low-power frequency-selective digital filters is presented whereby reduction of the average power consumption of the filter is achieved in speech processing and high-fidelity hardware by dynamically varying the filter length based on signal statistics. In applications such as these, flexible windows that would satisfy prescribed filter specifications and whose coefficients can be generated quickly are highly desirable.
In this paper, an efficient formulation for generating the coefficients of the ultraspherical window is proposed and its application for the design of nonrecursive digital filters, digital differentiators, and Hilbert transformers that would satisfy prescribed specifications is demonstrated. The paper is structured as follows. Section 2 introduces relevant information concerning the ultraspherical window. Section 3 describes an efficient formulation for generating the coefficients of the ultraspherical window. Section 4 deals with the design of nonrecursive digital filters using the ultraspherical window and provides comparisons with designs based on other windows as well as designs based on the Remez algorithm. Section 5 deals with the design of digital differentiators and Hilbert transformers that would satisfy prescribed specifications. Section 6 provides design examples. Section 7 provides concluding remarks.

THE ULTRASPHERICAL WINDOW
The coefficients of a right-sided ultraspherical window can be calculated explicitly as [5,7] where [17] α p T is the interval between samples, and where N may be odd or even. In (1), µ, x µ , and N are independent parameters and w[( The independent parameter x µ can be expressed as where β ≥ 1 and x [17], which can be found using Algorithm 1 in [8]. The new independent parameter β in (7) is the so-called shape parameter and can be used to set the null-to-null width of a window to 4βπ/N,that is, β times that of the rectangular window [3].
The Dolph-Chebyshev and Saramäki windows are special cases of the ultraspherical window and can be obtained by letting µ = 0 and 1, respectively, in (1). Another special case of interest is when µ = 1/2, which produces windows based on the Legendre polynomial. Figure 1 shows the normalized amplitude spectrum for the ultraspherical window of length N = 51 designed with β = 2 and µ = −0.5, 0, and 1. A detailed description of the ultraspherical window's properties and its relation to other windows can be found in [8].

EFFICIENT FORMULATION FOR WINDOW COEFFICIENTS
A reduction in the computational complexity associated with the window method can be achieved by reducing the amount of computation required to generate the window coefficients. For the ultraspherical window, the primary computational bottleneck in (1) is due to the recursive evaluation of the binomial coefficients using (2). In its current form, (1) requires the evaluation of (L+1)+ L n=0 n m=0 2 = L 2 +4L+3 binomial coefficients where L is given by (6). By exploiting certain redundancies in (1), the number of binomial-coefficient evaluations can be reduced quite significantly and the computational complexity associated with the ultraspherical window can be reduced. To begin with, the first binomial-coefficient where α 0 = µ + p − 1 and p 0 = p − 1. Using the identity [17] v 0 (n) can be represented as which leads to the recurrence relationships (11) In this formulation, the evaluation of one binomial coefficient replaces the evaluation of L + 1 binomial coefficients thereby providing a savings of L binomial-coefficient evaluations.
Finally, we express the third binomial-coefficient expres- where α 2 = p − n. Observing that v 2 (n, 0) = α2 0 = 1 and using the recursive identity in (13), v 2 (n, m) can be represented as This leads to the recurrence relationships v 2 (n, 0) = 1, This formulation is equivalent to the evaluation of L binomial coefficients replacing the evaluation of L n=0 n m=0 1 = (1/2)L 2 + (3/2)L + 1 binomial coefficients, which provides a savings of (1/2)L 2 + (1/2)L + 1 binomial-coefficient evaluations.  Using the above expressions, the coefficients of the rightsided ultraspherical window of length N can be calculated using the formulation where v 0 (n), v 1 (n, m), and v 2 (n, m) are calculated using the recurrence relationships provided by (11), (15), and (18), respectively, and A, B, and p are given by (3), (4), and (5), respectively. 1 This method requires the recursive evaluation of 2L + 1 binomial coefficients, which constitutes a computational complexity of O(N) as compared with the evaluation of L 2 + 4L + 3 binomial coefficients required by (1), which constitutes a computational complexity of O(N 2 ). In this way, an overall savings of L 2 +2L + 2 binomial-coefficient evaluations can be achieved. Figure 2 shows the computation time required to evaluate the coefficients of the ultraspherical window using (1) and (19) versus the window length. 2 The time to compute the coefficients of the Kaiser window is included for comparison. The zeroth-order modified Bessel function of the first kind I 0 (x) was evaluated to an accuracy of = 10 −10 . As can be seen, the new formulation given by (19) provides a substantial computational savings over both the original formulation given by (1) and the formulation for generating the coefficients of the Kaiser window.

NONRECURSIVE DIGITAL FILTER DESIGN
The window method produces filters with a symmetrical impulse response, thereby achieving constant group delay and filter realizations with a reduced number of multiplications [10]. Good comparisons that contrast various filters and their attributes can be found in [10,18]. In the window method, an idealized frequency response is assumed and upon the application of the Fourier series, an infiniteduration impulse response is obtained. For a lowpass filter, we have where ω c and ω s are the cutoff and sampling frequencies, respectively. The infinite-duration impulse response is obtained as where −∞ ≤ n ≤ ∞. The design of highpass, bandpass, and bandstop filters is discussed later. A realizable filter is obtained by multiplying the infiniteduration impulse response by the window function, that is, by letting where w(nT) is a window function of length N = 2M + 1.
If N is odd, M is an integer and |n| = {0, 1, 2, . . . , M} is used for both the window and impulse response. If N is even, M is a fraction and |n| = {0.5, 1.5, 2.5, . . . , M} is used [10]. Odd-length nonrecursive filters are assumed throughout this paper because the frequency response of an evenlength symmetric nonrecursive filter is 0 at the Nyquist frequency, which is inappropriate for highpass and bandstop filters. However, this property of even-length nonrecursive filters can be used for the design of Hilbert transformers as discussed in Section 5.2. A causal filter can be obtained by delaying the impulse response by a period MT, that is, The frequency response of the filter is given by the convolution of the idealized frequency response and the spectral representation of the window, that is, where

Choice of window parameters
A nonrecursive (noncausal) lowpass filter is typically required to satisfy the equations where δ p and δ a are the passband and stopband ripples and ω p and ω a are the passband and stopband edge frequencies, respectively. In nonrecursive filters designed using the window method, the passband ripple turns out to be approximately equal to the stopband ripple, that is, δ p ≈ δ a . Therefore, one can design a filter that has a prescribed passband ripple or a prescribed stopband ripple. If the specifications call for a maximum passband ripple A p and a minimum stopband attenuation A a , both specified in dB, then it can easily be shown that [10] By designing a filter on the basis of then if δ = δ p , a filter will be obtained that has a passband ripple which is equal to A p dB and a minimum stopband attenuation which is greater than A a dB; and if δ = δ a , a filter will be obtained that has a minimum stopband attenuation which is equal to A a dB and a passband ripple which is less than A p dB. The ultraspherical window parameters µ, x µ , and N must be chosen such that the filter specifications are satisfied with the lowest possible filter length N. For a given set of prescribed specifications, the optimum values of µ and x µ could be determined through a trial-and-error approach but such an approach would be laborious and time-consuming. Fortunately, a fairly general method that parallels Kaiser's method [2] can be used to design filters that satisfy arbitrary prescribed filter specifications. Through extensive experimentation, we found out that parameters µ and x µ control the passband and stopband ripples and, consequently, the actual stopband attenuation, namely, Strictly speaking, parameter x µ alters the window's ripple ratio at the expense of the null-to-null width, in effect, providing a tradeoff between the two just like parameter α in the Kaiser window [2] and parameter x 0 in the Dolph-Chebyshev window [4]. Thus x µ has a strong influence on the stopband attenuation. On the other hand, parameter µ controls the window's sidelobe pattern which affects the stopband attenuation but not to the extent that x µ does. This property is observed in Figure 1 where windows with µ = 0 and 1 yield ripple ratios of −45.84 and −39.85 dB, respectively. On the other hand, the filter length N controls the transition bandwidth of the filter, namely, but has little effect on the stopband attenuation. Consequently, the required value of N is dependent on parameter µ while being relatively independent of parameter x µ .
The value of parameter µ that minimizes the filter length for a set of prescribed specifications can be determined by comparing the performance of filters designed using the ultraspherical window with varying values of the adjustable parameters for a fixed filter length and cutoff frequency as in [3]. The transition bandwidth is measured from the resulting filter and used to calculate the performance measure which is a normalized transition bandwidth that is approximately independent of the filter length [2,3,19]. Figure 3 shows plots of the stopband attenuation versus D for filters designed using the ultraspherical window with µ = 0, 0.4, 0.6, and 1. As can be seen, the filter performance depends critically on the choice of parameter µ. In addition, we note that there is no unique fixed value of µ that yields minimum stopband attenuation, that is, the optimal value of µ changes with D. As such, it is possible to select an optimal value of µ that minimizes the filter length for a set of prescribed specifications. The value of µ that minimizes the filter length was found by calculating the value of µ that maximizes the stopband attenuation for a given normalized transition bandwidth D. Through curve fitting, an empirical formula for the optimal µ was derived as  The minimum filter length required to achieve a desired stopband attenuation and transition bandwidth can be determined as the smallest odd integer satisfying the inequality [2] N ≥ Dω s B t + 1.
From (33) it becomes clear that N can be predicted by obtaining an accurate approximation for D. As can be observed in Figure 3, D is influenced by both the stopband attenuation and the parameter µ. Through curve fitting, an empirical formula was deduced for D corresponding to the value of µ given by (32) as The final window parameter x µ provides a trade-off between the stopband attenuation and the transition bandwidth of the filter and can be determined using (7). It is clear that parameter x µ can be predicted by obtaining an approximation for parameter β. Figure 4 shows plots of parameter β versus stopband attenuation for filters designed using the ultraspherical window with µ = 0, 0.4, 0.6, and 1. As can be seen, β varies significantly depending on the choice of the stopband attenuation and parameter µ. Through curve fitting, an empirical formula was derived for parameter β, Equations (32), (33), (34), and (35) provide a closedform Kaiser-like method for achieving prescribed specifications while minimizing the filter length N through the appropriate selection of the window parameters. However, for some applications one may be willing to increase N to achieve different frequency-selectivity characteristics. For instance, increased stopband rolloff, that is, increased suppression of stopband energy furthest from the transition bandwidth (see [20]), can be achieved by increasing parameter µ but this has the effect of decreasing the stopband attenuation. Thus to achieve the same stopband attenuation, N must be increased. To accommodate these scenarios, estimates for D and β were obtained as  [21,Chapter 7]). This window-parameter alteration technique can provide designers with a simple approach for tailoring a filter's frequency selectivity for a particular application while still achieving prescribed specifications.

Design algorithm
Based on the findings of the previous section, a lowpass nonrecursive filter that would satisfy the specifications (i) passband edge: ω p , (ii) stopband edge: ω a , (iii) passband ripple: A p , (iv) stopband ripple: A a , (v) sampling frequency: ω s can be designed using Algorithm 1.

Comparison with other windows
The performance of different windows was compared by designing filters for fixed values of N and ω c [3]. The transition bandwidth was measured for the resulting filters and used to calculate D using (31). Figure 5 shows plots of the stopband attenuation versus D for N = 127, ω c = 0.4π rad/s, and ω s = 2π rad/s for a variety of fixed and adjustable windows. Expressions for these windows can be found either in [10] or [22], while the Nuttall window is described in [23]. For the adjustable windows (Kaiser, Dolph-Chebyshev, Saramäki, ultraspherical, and Gaussian windows), a number of filters were designed by altering the independent window parameter. As can be seen, the ultraspherical window offers better performance than the Kaiser, Dolph-Chebyshev, Saramäki, and Gaussian windows achieving an average increase in the stopband attenuation of 2.48 dB relative to the Kaiser window, 4.29 dB relative to the Dolph-Chebyshev window, and 2.21 dB relative to the Saramäki window. The Gaussian window provides much poorer results than the other adjustable windows. For the sake of comparison, equiripple designs based on the weighted-Chebyshev method of Parks-McClellan [11] were also carried out assuming that δ p = δ a . The weighted-Chebyshev method increases the stopband attenuation by about 2.93 dB on the average but this is to be expected since the Remez algorithm yields designs that are L ∞ optimal. The performance of different windows was also compared by finding the required filter length to achieve a set of prescribed specifications. Figure 6 shows plots of the actual stopband attenuations achieved for a fixed transition Step 1: Input ω p , ω a , A p , A a , and ω s . Find the "design" δ using (28) and then update A a using (29).
Step 3: Calculate the filter length N using (33) in conjunction with (30) and (34). Round N up to the nearest odd integer.
Step 4: Calculate the window parameter x µ using (7) in conjunction with (35) and the method described in [8] for calculating x (µ) N−1 .
Step 5: With µ, x µ , and N known, the coefficients of the ultraspherical window can be generated from (19).
Step 9: Check the design obtained to ensure that the filter satisfies the prescribed specifications. If it does not, increase N by 2 and go to Step 4.

Highpass, bandpass, and bandstop filters
The above design method can be readily extended to the design of highpass, bandpass, and bandstop filters by following the procedure of [10]. For instance, the specifications for bandstop filters assume the form 1 − δ p ≤ H e jωT ≤ 1 + δ p for |ω| ∈ 0, ω p1 , −δ a ≤ H e jωT ≤ δ a for |ω| ∈ ω a1 , ω a2 , The ideal frequency response is taken as with where the design is based on the narrower of the two transition bandwidths, that is, sin ω c1 nT − sin ω c2 nT nπ for n = 0.
Using similar modifications [10], Algorithm 1 can be readily extended to the design of highpass and bandpass filters as well as multiband filters [24].

DIGITAL DIFFERENTIATORS AND HILBERT TRANSFORMERS
One advantage of the window method is the ease with which it can be applied to a wide range of filter design problems. In this section, we employ the window method for the design of digital differentiators and Hilbert transformers.

Digital differentiators
In signal processing, the need often arises for the derivative of a signal at some time instant t = t 1 . For example, if y(nT) is required to be the first derivative of x(t) at t = nT, we can write Digital differentiators (DDs) have an ideal frequency response H e jωT = jω for |ω| ≤ ω s 2 .
In radar and sonar, object tracking can be accomplished using velocity and acceleration measurements calculated by applying differentiators to position data [25]. Differentiators are also used in plant control applications such as the PID controller [26], biomedical and geophysics signal processing, and image processing systems. Consequently, the design of differentiators is of considerable importance. Since differentiators amplify high-frequency errors such as instrumentation measurement errors, bandlimited differentiators are quite useful. Practical bandlimited differentiator design can be accomplished in terms of a nonrecursive filter whose frequency response is required to satisfy the equations j ω − δ p ≤ H e jωT ≤ j ω + δ p for |ω| ∈ 0, ω p , − j δ a ≤ H e jωT ≤ j δ a for |ω| ∈ ω a , ω s 2 .
(44) For a bandlimited differentiator, the ideal frequency response is taken as with ω c = (ω p + ω a )/2. Straightforward analysis gives the infinite-duration impulse response as The transition bandwidth in (33) is In DDs, the passband ripple and stopband attenuation are dependant on the cutoff frequency of the differentiator. To account for this, a correction for A a of the form is required where A a is the corrected design attenuation whose value replaces A a in Algorithm 1, A a is the desired design attenuation, and A cor is a correction term given by The values of the coefficients a, b, and c for the Kaiser, Dolph-Chebyshev, and ultraspherical windows are given in Table 3. Examples of differentiators designed using the window method and Remez algorithm can be found in [10].

Hilbert transformers
In some digital signal processing applications, it is necessary to form a special version of the input signal x(nT), designatedx(nT), with a frequency spectrum equal to that of x(nT) for the positive Nyquist interval and zero for the negative Nyquist interval [10]. Signals of this type are referred to as analytic signals and can be generated by a complex filter with frequency response where H(e jωT ) is a Hilbert transformer which has an ideal frequency response given by Filters that perform this operation find application in frequency-division multiplexing systems using singlesideband modulation. Hilbert transformers can be designed in terms of a nonrecursive filter whose frequency response is required to satisfy the equations Straightforward analysis gives the infinite-duration impulse response as The transition bandwidth in (33) is Like differentiators, it was found that Hilbert transformers require a correction for A a of the form where A a is the corrected design attenuation whose value replaces A a in Algorithm 1, A a is the desired design attenuation in dB, and A cor is a correction term given by A cor = 6.414, 5.236, and 6.457 for the Kaiser, Dolph-Chebyshev, and ultraspherical windows, respectively. To achieve the desired specifications more precisely a simple technique described in [1] can be employed. First, the actual stopband attenuation of the filter A ar is measured for the estimated value of β. Then β is reestimated using an adjusted design attenuation A a = A a −(A ar −A a ) where A a is the desired design stopband attenuation. With this modification, the recalculated parameters assume the values α = 7.926, β = 2.725, and β = 2.596, respectively. The stopband attenuations were 80.03, 79.96, and 79.83 dB with transition bandwidths 0.2005, 0.1923, and 0.1983 rad/s, respectively. The filter lengths required to achieve the specifications were N = 159 for the Kaiser window, N = 165 for the Dolph-Chebyshev window, and N = 153 for the ultraspherical window. Figure 7 shows the amplitude responses of the designed filters.
The adjustable parameters for the Kaiser, Dolph-Chebyshev, and ultraspherical windows were calculated as α = 3.395, β = 1.471, and β = 1.391, respectively. The additional parameter calculated for the ultraspherical window was µ = 0.5960. The stopband attenuations achieved were 41.34, 37.36, and 38.40 dB with transition bandwidths 0.1963, 0.2027, and 0.2033 rad/s, respectively. Using the modification discussed in Example 1 to improve stopband attenuation accuracy, the recalculated parameters assume the values α = 3.235, β = 1.554, and β = 1.420, respectively. The stopband attenuations were 39.92, 40.07, and 39.94 dB with transition bandwidths 0.1905, 0.2188, and 0.2125 rad/s, respectively. The filter lengths required to achieve the specifications were N = 73 for the Kaiser window, N = 73 for the Dolph-Chebyshev window, and N = 67 for the ultraspherical window. Figure 8 shows the amplitude responses of the designed filters.
Example 3. Design a Hilbert transformer with ω p1 = 0.2 rad/s and A p = 80 dB using the Kaiser, Dolph-Chebyshev, and ultraspherical windows.
The adjusted design attenuations from (55) for the Kaiser, Dolph-Chebyshev, and ultraspherical windows were calculated as A a = 86.41, 85.24, and 86.46, respectively. The adjustable parameters were calculated as α = 8.564, β = 2.983, and β = 2.789, respectively, while the additional parameter for the ultraspherical window was calculated as µ = 0.6445. The design attenuations achieved were 80.12, 79.59, and 79.39 dB with transition bandwidths 0.3941, 0.3889, and 0.3847 rad/s, respectively. Using the modification discussed in Example 1 to improve design attenuation accuracy, the recalculated parameters assume the values α = 8.550, β = 2.997, and β = 2.809, respectively. The attenuations were 79.96, 80.01, and 79.93 dB with transition bandwidths 0.3935, 0.3912, and 0.3879 rad/s, respectively. The filter lengths required to achieve the specifications were N = 88 for the Kaiser window, N = 90 for the Dolph-Chebyshev window, and N = 86 for the ultraspherical window. Figure 9 shows the amplitude responses of the designed Hilbert transformers.

CONCLUSIONS
An efficient method for designing nonrecursive digital filters based on the ultraspherical window has been proposed. Economies in computation are achieved in two ways. First, through an efficient formulation of the window coefficients, the amount of computation required is reduced to a small fraction of that required by the standard methods. Second, the filter length and the independent window parameters that would be required to achieve prescribed specifications in lowpass, highpass, bandpass, and bandstop filters as well as in digital differentiators and Hilbert transformers are efficiently determined through empirical formulas. Experimental results indicate that the ultraspherical window yields lower order filters relative to designs obtained using a variety of other known windows including the Kaiser, Dolph-Chebyshev, and Saramäki windows. Alternatively, for a fixed filter length the ultraspherical window can provide reduced passband ripple and increased stopband attenuation relative to these windows. The weighted-Chebyshev method yields designs that are L ∞ optimal but these designs require a large amount of computation, which makes them impractical for applications where the design has to be carried out online in real or quasireal time.