Introduction

Digital filters are basic building blocks of signal processing devices that are used to extract useful information from noisy signals1,2. In applications where the energy of useful signal is concentrated around some frequency ω0, the digital filter is expected to have a very accurate flat magnitude response in a narrow band near the frequency ω03. Flat responses are preferable to rippled responses, also due to the fact that the magnitude ripples in the passband will lead to undesired side lobes or echoes in the impulse responses of the filters2,3.

To make the filtering system have a flat frequency response, maximally flat digital filters (MFDFs) and their designs had been extensively studied during the past decades3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27. An indirect design method is to convert the analog Butterworth filter and Bessel filter to get the MFDFs20,21. However, the performance of the MFDFs designed by the indirect method is limited by the performance of the analog filter. Another way to design MFDFs is to force zeroth- to some high-order derivatives of the frequency responses at some frequencies to be exactly equal to those of the ideal responses and to compute the digital filter fully from those derivative constraints4,5,7,9,10,13,14,15, which belongs to the direct method. Using the direct method, finite impulse response (FIR) MFDFs were designed in Refs.4,13,14,15. References4,14 focused on the determination of impulse response coefficients of the FIR MFDFs from the derivative constraints. References13,15 paid more attention to the variable structures of the FIR MFDFs to realize various frequency responses by changing some easily adjustable parameters of the structure.

Compared to FIR filters, infinite impulse response (IIR) filters often have better magnitude responses and lower group delays. But unlike FIR filters, IIR filters have no intrinsic stability and their frequency responses and derivatives of frequency responses are not linear in the filter coefficients. In Refs.5,7,9,10, a set of linear equations was derived from the nonlinear derivative constraints, and IIR MFDFs were designed by solving that set of linear equations. However, the resultant IIR MFDFs might be unstable or have heavy overshoots in their magnitude responses. The shortcoming was overcome in Refs.7,9 by increasing the group delay of the filter. But, that resulted in a loss of the advantage of IIR filters on their low group delay.

In this paper, we consider the design of maximally flat and stable IIR digital filters with low group delays. When the MFDF that is fully determined by the set of derivative constraints is unstable or has a heavy magnitude overshoot, we decrease the flatness degree and use the released freedom of the coefficient space to reduce the pole radius and/or the magnitude overshoot. We expect to get an IIR filter that has the highest flatness degree possible and all poles inside the circle of radius r < 1. We refer to the IIR filter that has a certain flatness degree and satisfy the pole-radius constraint as an IIR maximally flat stable digital filter (MFSDF) if any IIR filters with higher flatness degree do not satisfy the pole-radius constraint. In general, such IIR MFSDFs are not necessarily unique. We thus also minimize the weighted sum of the squared frequency response error of the filter, leading to a nonconvex constrained weighted least-squares (WLS) problem, which is solved by iteratively converting it into a series of convex quadratic programming (QP) subproblems.

The rest of this paper is organized as follows. The IIR MFSDFs along with the flatness and pole-radius constraints are formulated in Section II. The flatness and pole-radius constrained optimization design problem along with the design algorithm for IIR MFSDFs is described in Section III. Design examples and comparisons with existing FIR and IIR MFDFs in the literature are provided in Section IV. Conclusions are drawn in Section V.

Maximally flat stable IIR digital filters

An IIR filter of numerator order M and denominator order N can be described by its transfer function as

$$H(z,{\mathbf{a}},{\mathbf{b}}) = \frac{{B(z,{\varvec{b}})}}{{A(z,{\varvec{a}})}} = \frac{{{b_0}+{b_1}{z^{ - 1}}+ \cdots +{b_M}{z^{ - M}}}}{{1+{a_1}{z^{ - 1}}+ \cdots +{a_N}{z^{ - N}}}},$$
(1)

where a = [a1,a2,…,aN]T and b = [b0,b1,…,bM]T are coefficient vectors of the denominator A(z,a) = 1+a1z−1+…+aNzN and numerator B(z,b) = b0+b1z−1+…+bMzM, respectively.

The ideal (or desired) frequency responses of classical low-pass, high-pass, band-pass and band-stop filters are usually defined as

$$D(\omega ){\text{ = }}\left\{ \begin{gathered} {{\text{e}}^{ - {\text{j(}}\omega \tau +{\theta _0})}},{\text{ }}\omega \in {\varOmega _{{\text{ p}}}}, \hfill \\ {\text{ }}0,{\text{ }}\omega \in {\varOmega _{{\text{ s}}}}, \hfill \\ \end{gathered} \right.$$
(2)

where ω represents the digital frequency, Ωp and Ωs are the passband and stopband of the filter, τ>0 denotes the desired group delay, and θ0 is a phase shift. The phase shift θ0 is usually taken as 0. But πτ+θ0 should be an integer times of π when πΩp, since H(e) = H(−1) is a real number.

In the design of MFDFs, the flat frequency response is realized by forcing the actual frequency response H(ejω,a,b) and its derivatives from the first- to some high-orders with respect to ω to be equal to those of the desired response D(ω) at some specific frequencies, e.g., the zero frequency 0, the Nyquist frequency π, and a middle frequency ωm. Denote by ω0 any of the constraint frequencies. Then, the frequency-response derivative constraints at the frequency ω0 are described by

$${H^{{\text{(}}k{\text{)}}}}{\text{(}}{{\text{e}}^{{\text{j}}{\omega _0}}}{\text{, }}{\mathbf{a}}{\text{, }}{\mathbf{b}}{\text{)}} = {D^{{\text{(}}k{\text{)}}}}{\text{(}}{\omega _0}{\text{), }}k = 0{\text{, }}1{\text{, }} \ldots {\text{ , }}K - 1{\text{,}}$$
(3)

where the superscript (k) represents the k-th order derivative with respective to ω, and the nonnegative integer K is the number of derivative constraints at the frequency ω0. It controls the flatness of H(ejω,a,b) or the closeness between H(ejω,a,b) and D(ω) around the constraint frequency ω0.

Due to the nonlinearity of the frequency response H(ejω,a,b) in its denominator coefficient vector a, the derivative constraints in (3) are originally nonlinear in a. Refs5,9. derived an equivalent set of flatness constraints that are linear in the coefficient vectors a and b. For convenience of presentation, we reformulate the set of linear flatness constraints as follows.

  1. (i)

    For a passband constraint frequency ω0Ωp, the set of derivative constraints in (3) holds if and only if.

    $$\sum\limits_{{m = 0}}^{M} {{b_m}\cos } [{\omega _0}(\tau - m)+{\theta _0}] - \sum\limits_{{n = 1}}^{N} {{a_n}\cos ({\omega _0}n)} {\text{ = 1}},$$
    (4a)
    $$\sum\limits_{{m = 0}}^{M} {{b_m}\sin [{\omega _0}(\tau - m)+{\theta _0}]} +\sum\limits_{{n = 1}}^{N} {{a_n}\sin ({\omega _0}n)} = 0$$
    (4b)
    $$\left\{ \begin{gathered} \sum\limits_{{m = 0}}^{M} {{b_m}{{(\tau - m)}^k}\cos [{\omega _0}(\tau - m)+{\theta _0}]} \hfill \\ - \sum\limits_{{n = 1}}^{N} {{a_n}{{( - n)}^k}\cos ({\omega _0}n)} \hfill \\ \end{gathered} \right\} = 0,{\text{ }}k = 1, \ldots {\text{,}}K - 1$$
    (4c)
    $$\left\{ \begin{gathered} \sum\limits_{{m = 0}}^{M} {{b_m}{{(\tau - m)}^k}\sin [{\omega _0}(\tau - m)+{\theta _0}]} \hfill \\ {\text{+}}\sum\limits_{{n = 1}}^{N} {{a_n}{{( - n)}^k}\sin ({\omega _0}n)} \hfill \\ \end{gathered} \right\} = 0,{\text{ }}k = 1, \ldots {\text{,}}K - 1.$$
    (4d)
  2. (ii)

    For a stopband constraint frequency ω0Ωs, the set of derivative constraints in (3) holds if and only if.

    $$\sum\limits_{{m = 0}}^{M} {{b_m}\cos ({\omega _0}m)} = {\text{0}}$$
    (5a)
    $$\sum\limits_{{m = 0}}^{M} {{b_m}\sin ({\omega _0}m)} = 0,$$
    (5b)
    $$\sum\limits_{{m = 0}}^{M} {{b_m}{m^k}\cos ({\omega _0}m)} = 0,{\text{ }}k = 1,{\text{2,}} \ldots {\text{,}}K - 1,$$
    (5c)
    $$\sum\limits_{{m = 0}}^{M} {{b_m}{m^k}\sin ({\omega _0}m)} = 0,{\text{ }}k = 1,{\text{2,}} \ldots {\text{,}}K - 1.$$
    (5d)

It should be noted that, when ω0 = 0 (and θ0 = 0), the second and fourth equations in (4) and (5) are all identities. When ω0 = π (and τπ+θ0 = lπ for some integer l if ω0Ωp), the second and fourth equations in (4) and (5) are identities, too. Assume the numbers of derivative constraints at frequencies 0, ωm and π are K0, Km and Kπ, respectively. Then, we may get NfK0+2Km+Kπ linear equations in total from the derivative constraints at frequencies 0, ωm and π. We refer to Nf as the flatness degree of the frequency response of the filter.

Denote by FRNf×(M+N+1) and gRNf the coefficient matrix and right-hand side constant vector of the Nf linear equations derived from the derivative constraints at frequency 0, ωm and π. Then, the flatness constraints on the frequency response can be expressed as

$${\varvec{F}}\left[ {\begin{array}{*{20}{c}} {\varvec{b}} \\ {\varvec{a}} \end{array}} \right] = {\varvec{g}}.$$
(6)

When Nf = Nfmax = M+N+1, the above linear matrix equation has a unique solution, i.e., [bT,aT]T = F−1g. The corresponding filter is referred to as an IIR MFDF since its frequency response has a maximum flatness degree. However, it should be noted that such an IIR MFDF might be unstable, especially when the specified group delay is low (i.e., τ>0 is small).

Even if the IIR MFDF is stable (the maximum pole radius is smaller than 1), its magnitude response may have an undesired overshoot when some of the poles are close to the unit circle. To obtain stable IIR filters without magnitude overshoots, we may constrain the filters to have a stability described by aS(r) for some specified maximum pole radius r<1, where

$$S(r) = \left\{ {a|{\text{all zero radii of}}\;A\left( {z,a} \right){\text{are smaller than}}\;r<{\text{1}}} \right\}.$$
(7)

When the IIR MFDF determined by the flatness constraint Eq. (6) is unstable (maximum pole radius is not smaller than 1) or has an undesired magnitude overshoot (due to the maximum pole radius is not small enough), one way to tackle the problem is to increase the specified group delay τ as in Refs7,9. However, this will lose the advantage of the IIR filter on its low group delay. This paper adopts an alternative approach. Instead of increasing the group delay, we decrease the flatness degree Nf and use the released freedom of the coefficient space of the filter to satisfy the stability constraint aS(r) with r<1 and to reduce the magnitude overshoot. We refer to the IIR filter with flatness degree Nf as an IIR MFSDF if it satisfies the stability constraint aS(r) but any IIR filters with higher flatness degree than Nf do not satisfy the stability constraint aS(r).

Design algorithm for maximally flat stable IIR digital filters

Given a set of design specifications {M, N, τ, r, K0max, Kmmax, Kπmax}, where K0max, Kmmax and Kπmax with Nfmax = K0max +2Kmmax +Kπmax = M+N+1 represent the maximum numbers of derivative constraints at frequencies 0, ωc and π. When (K0, Km,Kπ) = (K0max,Kmmax,Kπmax), a unique MFDF can be determined from the linear matrix Eq. (6). If the MFDF satisfies the stability constraint aS(r), it is an MFSDF with flatness degree Nf = Nfmax. Otherwise, we decrease the flatness degree Nf, and correspondingly change the derivative constraint numbers K0, Km and Kπ subject to K0+2Km+Kπ = Nf<Nfmax and (K0,Km,Kπ)≤(K0max,Kmmax,Kπmax), where the symbol “≤” between two vectors represents a component-wise inequality.

For the set of constraint numbers (K0, Km, Kπ) with Nf = K0+2Km+Kπ<Nfmax, the filter satisfying the stability constraint aS(r) (if any) is not necessarily unique. To that end, we further constrain the filter by minimizing a weighted sum of the squared frequency-response approximation error, resulting in an optimization problem as follows.

$$\mathop {\text{m}\text{i}\text{n}}\limits_{{{\text{\{ }}{\varvec{a}},{\varvec{b}}{\text{\} }}}} \sum\limits_{{\omega \in {{\bar {\varOmega }}_{{\text{ p}}}} \cup {{\bar {\varOmega }}_{{\text{ s}}}}}} {W(\omega ){{\left| {E(\omega ,{\varvec{a}},{\varvec{b}})} \right|}^2}} ,$$
(8a)
$${\text{s}}.{\text{t}}.\;{\varvec{F}}\left[ {\begin{array}{*{20}{c}} {\varvec{b}} \\ {\varvec{a}} \end{array}} \right] = {\varvec{g}}{\text{ and }}{\varvec{a}} \in S{\text{(}}r{\text{),}}$$
(8b)

where \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) are some discrete subsets of the Nyquist interval [0,π], E(ω,a,b)≡H(ejω,a,b)−D(ω) with D(ω) = e−jωτ for ω\({\bar {\varOmega }_{{\text{ p}}}}\) and D(ω) = 0 for ω\({\bar {\varOmega }_{{\text{ s}}}}\), and W(ω)≥0 is a weight function. If no feasible solutions of (8) can be found, decrease Nf by 1 and solve problem (8) again for all possible combinations of K0, Km and Kπ that satisfy (K0, Kc, Kπ)≤(K0max, Kmmax, Kπmax) and K0+2Km+Kπ = Nf, until a feasible solution filter of problem (8) is found. The resultant filter is an MFSDF filter.

Due to the nonlinearity of the approximation error E(ω,a,b) in (8a) and the nonconvexity of the stability constraint aS(r) in (8b), problem (8) is not a convex optimization problem. We solve the problem by iteratively converting it into convex ones. Assume we are currently in the ith iteration and have obtained an iterative point {a(i),b(i)} with a(i)S(r). As in Ref28. , we convert the cost function in (8a) to a convex one by replacing the frequency response error E(ω,a,b) that is nonlinear in a with the following E(i,ω,a,b) that is linear in a and b:

$$\hat {E}(i,\omega ,{\varvec{a}},{\varvec{b}}) = \frac{{B({\text{e}^{{\text{j}}\omega }},{\varvec{b}}) - D(\omega )A({\text{e}^{{\text{j}}\omega }},{\varvec{a}})}}{{A({\text{e}^{{\text{j}}\omega }},{\varvec{a}}{\text{(}}i{\text{)}})}}.$$
(9)

Moreover, the stability constraint a(i)S(r) is replaced by the generalized-positive-realness (GPR)-based sufficient and linear condition29.

$${\text{Re[}}A{\text{(}}r{{\text{e}}^{{\text{j}}\omega }}{\text{,}}{\mathbf{a}}{\text{)/}}A{\text{(}}r{{\text{e}}^{{\text{j}}\omega }}{\text{,}}{\mathbf{a}}{\text{(}}i{\text{))]}} \geqslant \varepsilon {\text{, }}\forall \omega \in \varOmega \subset {\text{[0, }}\uppi {\text{],}}$$
(10)

where ε>0 is a small positive number, e.g., ε = 10−6, Re[] represent the real part of the number in the bracket, and Ω is a sufficiently dense grid of the Nyquist interval [0, π].

With (9) and (10), the optimization problem (8) is converted into the following linearly constrained WLS problem (11).

$$\mathop {\text{m}\text{i}\text{n}}\limits_{{{\text{\{ }}{\varvec{b}},{\varvec{a}}{\text{\} }}}} \sum\limits_{{\omega \in {{\bar {\varOmega }}_{{\text{ p}}}} \cup {{\bar {\varOmega }}_{{\text{ s}}}}}} {\bar {W}(\omega {\text{,}}{\varvec{a}}{\text{(}}i{\text{)}}){{\left| {B({\text{e}^{\text{j}\omega }},{\varvec{b}}) - D(\omega )A({\text{e}^{\text{j}\omega }},{\varvec{a}})} \right|}^2}} ,$$
(11a)
$${\text{s}}.{\text{t}}.:\;{\varvec{F}}{[{{\varvec{b}}^{\text{T}}},{{\varvec{a}}^{\text{T}}}]^{\text{T}}} = {\varvec{g}},$$
(11b)
$${\text{Re\{ }}A{\text{(}}r{{\text{e}}^{{\text{j}}\omega }}{\text{,}}{\mathbf{a}}{\text{)/}}A{\text{(}}r{{\text{e}}^{{\text{j}}\omega }}{\text{,}}{\mathbf{a}}{\text{(}}i{\text{))\} }} \geqslant \varepsilon {\text{, }}\forall \omega \in \varOmega \in {\text{[0, }}\uppi {\text{],}}$$
(11c)

where W¯(ω,a(i)) = |A(ejω,a(i))|−2W(ω).

Due to the linearity of E(i,ω,a,b) in a and b, the cost function in (11a) is a quadratic function of the coefficient vector [bT, aT]T, which can be reformulated as

$$\frac{1}{2}[{{\varvec{b}}^{\text{T}}},{{\varvec{a}}^{\text{T}}}]{\varvec{P}}\left[ {\begin{array}{*{20}{c}} {\varvec{b}} \\ {\varvec{a}} \end{array}} \right]+{{\varvec{q}}^{\text{T}}}\left[ {\begin{array}{*{20}{c}} {\varvec{b}} \\ {\varvec{a}} \end{array}} \right]+{\text{constant}}$$
(12a)

with

$${\varvec{P}} = \sum\limits_{{\omega \in {{\bar {\varOmega }}_{\text{p}}} \cup {{\bar {\varOmega }}_{\text{s}}}}} {2\bar {W}(\omega ,{\varvec{a}}(i))\operatorname{Re} \left[ {\phi (\omega )\phi {{( - \omega )}^{\text{T}}}} \right]} ,$$
(12b)
$${\varvec{q}} = - \sum\limits_{{\omega \in {{\bar {\varOmega }}_{\text{p}}} \cup {{\bar {\varOmega }}_{\text{s}}}}} {2\bar {W}(\omega ,{\varvec{a}}(i))\operatorname{Re} [D(\omega )\phi (\omega )]} ,$$
(12c)
$$\phi (\omega ) = {[1,{{\text{e}}^{ - {\text{j}}\omega }}, \ldots ,{{\text{e}}^{ - {\text{j}}M\omega }}, - D(\omega )[{{\text{e}}^{ - {\text{j}}\omega }}, \ldots ,{{\text{e}}^{ - {\text{j}}N\omega }}]]^{\text{T}}}.$$
(12d)

Then, the constrained WLS problem (11) is equivalent to a quadratic programming that can be well solved by the function “quadprog” in the MATLAB optimization toolbox.

Solution algorithm for problem (8)

Step 0. Specify the filter orders M and N, the desired group delay τ, the maximum pole radius r, the middle frequency ωm, the flatness degrees K0, Km and Kπ, and a set of Boolean numbers {B0, Bm, Bπ} to indicate whether the constraint frequencies 0,ωm and π belong to the passband or the stopband.

Step 1. Compute the coefficient matrix F and the right-hand side constant vector g of Eq. (6) from the derivative constraints (4) and (5) at frequencies 0,ωm, and π.

Step 2. Let Nf = K0+2Km+Kπ. If Nf = M+ N+1, go to Step 6.

Step 3. Properly choose the frequency intervals \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) along with a weight function W(ω). Let a(0) = 0, b(0) = 0, i = 0.

Step 4. Solve for {a(i+1), b(i+1)} the linearly constrained WLS problem (11) using the ‘quadprog’ function.

Step 5. If condition (13) is not satisfied and i<imax, let i = i+1 and then go back to Step 4. Otherwise, let a = a(i+1) and b = b(i+1).

Step 6. If a and b satisfy (8b), then {a, b} is a solution to problem (8). Otherwise, problem (8) is infeasible.

Assume we have an initial estimate, say, a(0) = 0 and b(0) = 0. Then, the solution to problem (8) can be obtained by iteratively solving for {a(i+1), b(i+1)} the constrained WLS problem (11) for i  =  0, 1, 2, … until

$${\left\| {\left[ {\begin{array}{*{20}{c}} {{\varvec{b}}{\text{(}}i+1{\text{)}} - {\varvec{b}}{\text{(}}i{\text{)}}} \\ {{\varvec{a}}{\text{(}}i+1{\text{)}} - {\varvec{a}}{\text{(}}i{\text{)}}} \end{array}} \right]} \right\|_2}<\mu {\left\| {\left[ {\begin{array}{*{20}{c}} {{\varvec{b}}{\text{(}}i{\text{)}}} \\ {{\varvec{a}}{\text{(}}i{\text{)}}} \end{array}} \right]} \right\|_2},$$
(13)

where the tolerance parameter µ>0 is a small positive number, e.g., µ = 10−5, or stop when the iteration index i exceeds a preset maximum number imax, e.g., imax = 100. The solution algorithm for problem (8) is summarized as follows.

It is mentioned that, the above algorithm can also be applied to the case with multiple middle constraint frequencies, e.g., ω1m, ω2m, …, ωnm. In that case, the flatness conditions should include the derivative constraints at the zero frequency, the Nyquist frequency, and all the middle frequencies ω1m, ω2m, …, ωnm. The total flatness degree should be Nf = K0+2(K1m+K2m +…+Knm)+Kπ, where Kim represents the flatness degree at the middle frequency ωim.

Design examples and comparisons with existing methods

In this section, design examples of low-pass, high-pass, band-pass and band-stop IIR MFSDFs with low group delays are provided. Through these examples, the proposed IIR MFSDFs are compared with IIR and FIR MFDFs by the method in Ref.9, the IIR and FIR flat half-band filters (HBFs) in Refs.7,16,17, the FIR fractional delay digital filter (FDDF) in Ref.19, the flat smoothers in Refs.11,12, and the Bessel filter in Ref.21. In the designs, the Nyquist frequency interval is discretized into a dense grid Ω = {kπ/1000, k = 0, 1, …, 1000}. The parameters ε and µ in the design algorithm are taken as ε = 10−6 and µ = 10−5. Without specifying elsewhere, the phase shift θ0 in the desired frequency response D(ω) is taken θ0 = 0. In all designs, the weight function in (8a) was set to W(ω) = 0.001 for ω\({\bar {\varOmega }_{{\text{ p}}}}\) and to W(ω) = 1.0 for ω\({\bar {\varOmega }_{{\text{ s}}}}\).

Example 1

Low-pass filters of order (M,N) = (7,3) with a desired group delay τ = 3.1. The flatness constraints were imposed at frequencies 0 and π with (K0max,Kπmax) = (6,5). The frequency subsets \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) were taken as \({\bar {\varOmega }_{{\text{ p}}}}\) = [0,0.4π] and \({\bar {\varOmega }_{{\text{ s}}}}\) = [0.7π,π], respectively. The flat filters obtained in the designs by the proposed method are depicted in Table 1, where r and rmax are the desired and actual maximum pole radii of the filters, respectively. All filters in the table have the same total order M+N = 10.

Table 1 Maximally flat low-pass filters in Example 1.
Fig. 1
Fig. 1The alternative text for this image may have been generated using AI.
Full size image

Three IIR MFSDFs in Example 1. (a) Magnitude responses; (b) Group delay responses.

When (K0,Kπ) = (K0max,Kπmax) = (6,5) with Nf = K0+Kπ = 11, the algorithm obtained an unstable IIR MFDF with a maximum pole radius rmax = 1.6739. We then decreased the flatness degree by 1, i.e., let Nf = 10, and set r to 1.0. Two designs were conducted under this setting, one with (K0,Kπ) = (6,4) and the other with (K0,Kπ) = (5,5), both with (K0,Kπ)≤(K0max,Kπmax) and K0+Kπ = Nf = 10. The first design returned a feasible filter with rmax = 0.9997 and the second design returned a feasible filter with rmax = 0.7903. They are the IIR MFSDFs with r = 1.0. The magnitude and group delay responses of the two MFSDFs are shown in Fig. 1. It is seen that, the magnitude responses are very flat at the low frequency band near ω = 0, and the high frequency band near ω = π. The group delay responses are very flat at the low frequency band near ω = 0, too. However, the two MFSDFs have heavy magnitude overshoots in their transition bands.

To reduce the overshoot, we reset the maximum pole radius parameter to r = 0.722 and reconducted the two designs with (K0,Kπ) = (6,4) and (K0,Kπ) = (5,5). When (K0,Kπ) = (6,4), no feasible filter was found. But when (K0,Kπ) = (5,5), we obtained a filter with a maximum pole radius of rmax = 0.7208. It is an IIR MFSDF (with r = 0.722). The magnitude and group delay responses of this IIR MFSDF are also shown in Fig. 1. The magnitude response has no overshoot any more.

Fig. 2
Fig. 2The alternative text for this image may have been generated using AI.
Full size image

Comparison of the IIR MFSDF with the IIR and FIR MFDFs, the IIR Butterworth filter and the Bessel filter in Example 1. (a) Magnitude responses; (b) Group delay responses.

An IIR MFDF with the same order (M,N) = (7,3), the same flatness degrees (K0,Kπ) = (K0max,Kπmax), but a larger desired group delay τ  =  5.2 was presented in Ref9. For comparison, we redesigned the IIR MFDF using our algorithm. The magnitude and group delay responses of the resultant IIR MFDF are also plotted in Fig. 2. It is obvious that the IIR MFSDF with r = 0.722 has a much narrower transition band, a lower group delay, but a larger passband group delay variation than the IIR MFDF.

We also designed an order-10 FIR MFDF with group delay τ  =  3.1 and the same flatness degrees (K0,Kπ) = (K0max,Kπmax) using the method in Ref9. The magnitude and group delay responses of this FIR MFDF are also drawn in Fig. 2. While the FIR MFDF has a similar group delay responses in the passband as the IIR MFSDF with r = 0.722, the transition band of the magnitude response of the IIR MFSDF is narrower than that of the FIR MFDF.

In addition, we designed a 5th-order Butterworth filter with a 3-dB frequency ωc = 0.5π. Its magnitude and group delay responses are also drawn in Fig. 2. The Butterworth filter has a similar magnitude response, a lower group delay but a larger passband group delay variation than the IIR MFSDF with r = 0.722.

Finally, we designed a 5th-order Bessel filter using bilinear transformation method in Ref.21. The designed Bessel filter is unstable, and its maximum polar radius rmax = 1.8975 is listed in Table 1. Its magnitude and group delay responses are drawn in Fig. 2. The IIR MFSDF has a wider passband, a sharper transition band and a lower passband group delay than the Bessel filter.

Example 2

High-pass filters of order (M,N) = (8,3) with a desired group delay τ = 3.75 and a maximum pole radius smaller than r = 0.72. The flatness constraints were imposed at frequencies 0 and π with (K0max,Kπmax) = (7,5). The frequency bands \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) were taken as \({\bar {\varOmega }_{{\text{ p}}}}\) = [0.7π,π] and \({\bar {\varOmega }_{{\text{ s}}}}\) = [0,0.3π], respectively. The phase shift of the desired frequency response in the passband was set to θ0 = 0.25π. The flat filters obtained in this example are listed in Table 2, where all filters have the same total order M+N = 11.

The IIR MFDF with (K0,Kπ) = (K0max,Kπmax) = (7,5) and flatness degree Nf = K0+Kπ = 12 by the method in Ref.9 is stable, but has a maximum pole radius rmax = 0.7982 which is larger than r = 0.72. We thus let Nf = 11, and conducted two designs, one with (K0,Kπ) = (6,5), the other with (K0,Kπ) = (7,4), and both with (K0,Kπ) ≤(K0max,Kπmax) and K0+Kπ = Nf = 11. When (K0,Kπ) = (7,4), no feasible filter was found to satisfy the flatness and stability constraints. When (K0,Kπ) = (6,5), a filter with a maximum pole radius of rmax = 0.7127<r = 0.72 was obtained. It is an IIR MFSDF with r = 0.72.

For comparison, we also designed an order-11 FIR MFDF with the same desired group delay τ = 3.75 and same constraint number set (K0,Kπ) = (7,5) as specified in this example by the method in9. In Fig. 3, we show the magnitude and group delay responses of the IIR MFDF, the IIR MFSDF, and the FIR MFDF in Table 2. While the IIR MFDF has an obvious magnitude overshoot in its transition band, the IIR MFSDF and the FIR MFDF have monotonically increasing magnitude responses without overshoots. The magnitude response of the IIR MFSDF has a narrower transition band than the FIR MFDF.

Table 2 Maximally flat high-pass filters in example 2.
Fig. 3
Fig. 3The alternative text for this image may have been generated using AI.
Full size image

Comparison of the IIR MFSDF with the IIR and FIR MFDFs in Example 2. (a) Magnitude responses; (b) Group delay responses.

Example 3

Band-pass filters of order (M,N) = (6,4) with a desired group delay τ = 10.5 and a maximum pole radius smaller than r = 0.917. The flatness constraints were imposed at the zero frequency 0, a middle frequency ωm = 0.2π and the Nyquist frequency π with (K0max,Kmmax,Kπmax) = (2,3,3). The frequency bands \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) were taken as \({\bar {\varOmega }_{{\text{ p}}}}\) = [0.18π,0.22π] and \({\bar {\varOmega }_{{\text{ s}}}}\) = [0,0.06π] Υ[0.37π,π], respectively. The flat filters obtained in this example are listed in Table 3.

Table 3 Maximally flat band-pass IIR filters in Example 3.

The IIR MFDF with (K0,Kc,Kπ) = (2,3,3) and Nf = K0 +2Km+Kπ = 11 by the method in Ref9. is stable. But its maximum pole radius rmax = 0.9219 is larger than r = 0.917 and its magnitude response (shown in Fig. 4) has a slight overshoot in the transition band between the low frequency stopband and the passband. We thus let Nf = 10 and conducted two designs, one with (K0,Kc,Kπ) = (1,3,3), the other with (K0,Kc,Kπ) = (2,3,2), and both with Nf = K0+2Km+Kπ = 10. The design with (K0,Kc,Kπ) = (1,3,3) returned no feasible filter. The design with (K0,Kc,Kπ) = (2,3,2) obtained an MFSDF with a maximum pole radius rmax = 0.9152<r = 0.917. The magnitude response of this MFSDF, which is also drawn in Fig. 4, has no longer overshoot in the transition band.

An IIR MFDF with the same filter order (M,N) = (6,4) and the same flatness degree (K0,Kc,Kπ) = (2,3,3) but a larger desired group delay τ  =  12.8 was designed in Ref9. That IIR MFDF has a maximum pole radius rmax = 0.9334>r = 0.917 and a magnitude overshoot, too, as shown in Fig. 4 for comparison.

Example 4

Band-stop filters of order (M,N) = (9,4) with a desired group delay τ = 3.5 and a maximum pole radius smaller than r = 0.75. The flatness constraints were imposed at the zero frequency 0, a middle frequency ωm = 0.5π and the Nyquist frequency π with (K0max,Kmmax,Kπmax) = (4,3,4). The frequency subsets \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) were taken as \({\bar {\varOmega }_{{\text{ p}}}}\) = [0,0.2π]Υ[0.8π,π] and \({\bar {\varOmega }_{{\text{ s}}}}\) = [0.35π,0.65π]. The obtained flat filters in this example are listed in Table 4.

The IIR MFDF with (K0,Kc,Kπ) = (4,3,4) and Nf = K0 +2Km+Kπ = 14 by the method in Ref.9 is stable. But it has a heavy magnitude overshoot in the transition band and a maximum pole radius rmax = 0.9262 which is larger than r = 0.75. We then let Nf = 13. But the designs with Nf = 13 and (K0,Kc,Kπ)≤(K0max,Kmmax, Kπmax) did not obtain feasible filters with rmax<r = 0.75.

Fig. 4
Fig. 4The alternative text for this image may have been generated using AI.
Full size image

Comparison of the IIR MFSDF with the IIR MFDFs in Example 3. (a) Magnitude responses; (b) Group delay responses.

Fig. 5
Fig. 5The alternative text for this image may have been generated using AI.
Full size image

Comparison of IIR MFSDFs with IIR MFDFs in Example 4. (a) Magnitude responses; (b) Group delay responses.

Table 4 Maximally flat band-stop IIR filters in Example 4.

We thus further decreased the flatness degree by 1 (i.e., let Nf = 12), and then conducted four designs with Nf = 12 and (K0,Kc,Kπ)≤(K0max,Kmmax,Kπmax). The two designs with (K0,Kc, Kπ) = (4,3,2) and (2,3,4) also did not find any feasible filters with rmax<r = 0.75. The other two designs, one with (K0,Kc, Kπ) = (4,2,4) and the other with (K0,Kc,Kπ) = (3,3,3), returned feasible filters. They are MFSDFs with r = 0.75. The one with (K0,Kc,Kπ) = (4,2,4) has a maximum pole radius rmax = 0.7483<r = 0.75 and the other with (K0,Kc,Kπ) = (3,3,3) has a maximum pole radius rmax = 0.7480<r = 0.75. The magnitude and group delay responses of the MFDF with (K0,Kc,Kπ) = (4,3,4) and the two MFSDFs with (K0,Kc,Kπ) = (4,2,4) and (3,3,3) are plotted in Fig. 5. It is seen that, both MFSDFs have no magnitude overshoots in their transition bands.

An IIR MFDF with the same order (M,N) = (9,4), the same flatness degree (K0,Kc,Kπ) = (4,3,4) but a higher desired group delay of τl  =  8.8 in the low frequency passband and τh  =  9.2 in the high frequency passband was designed in9. The MFDF has a maximum pole radius rmax = 0.7112<r = 0.75. Its magnitude and group delay responses are also plotted in Fig. 5. While this MFDF also has no magnitude overshoots in its transition bands, its two passbands and one stopband are narrower, two transition bands are wider, and group delay is larger than those of our MFSDF with (K0,Kc,Kπ) = (3,3,3).

Example 5

Two low-pass filters of order M+N = 6, one with (M,N) = (2,4), τ = 1.25 and (K0max, Kπmax) = (6,1), and the other with (M,N) = (4,2), τ = 1.0 and (K0max, Kπmax) = (4,3), both with r = 0.39. The frequency subsets \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) were taken as \({\bar {\varOmega }_{{\text{ p}}}}\) = [0,0.5π] and \({\bar {\varOmega }_{{\text{ s}}}}\) = empty set []. The resultant IIR MFSDFs are listed in Table 5. The magnitude and group delay responses of the MFSDFs are shown in Fig. 6.

Table 5 Maximally flat low-pass IIR filters in Example 5.
Fig. 6
Fig. 6The alternative text for this image may have been generated using AI.
Full size image

Comparison of the IIR MFSDF with the flat IIR smoothers and the FIR FDDF in Example 5. (a) Magnitude responses; (b) Group delay responses.

We compare the resultant MFSDFs with the low-pass flat IIR smoothers that have all poles at the same position z = p and one zero at z = −1 (for minimum attenuation at ω = π) 11,12. Such smoothers are characterized by the single tunable parameter p. As p goes from a positive value smaller than 1 to a negative value larger than −1.0, the passband of such smoothers of order (M,N) = (3,4) firstly gets wider, and then gets narrower. When p≈ −0.18, the smoother has a widest passband. In addition, the smoother with p = e−1/2 was chosen in Ref11. as a typical smoother for performance demonstration of the design method of Refs11,12. For comparison, the magnitude and group delay responses of the smoothers with p = −0.18 and p = e−1/2 are also drawn in Fig. 6. The IIR MFSDF of order (M,N) = (2,4) has a wider passband and a sharper transition band than the IIR smoother with p = −0.18. The IIR MFSDF of order (M,N) = (4,2) has a much wider passband and a obviously better stopband than the IIR smoother with p = e−1/2.

Finally, we designed an order-6 FIR FDDF with group delay τ = 3.5 using the binomial series expansion theory in Ref19. Its magnitude and group delay responses are also drawn in Fig. 6. From the response curves along with their passband details in Fig. 6(a), it is seen that the IIR MFSDF of order (M,N) = (2,4) has a slightly wider passband than the FIR FDDF. The FIR FDDF has a constant group delay but a larger group delay than that of the IIR MFSDFs.

Table 6 Flat low-pass IIR and FIR filters in Example 6.

Example 6

A low-pass filter of order (M,N) = (8,2) with M+N+1 = 11 coefficients, a desired group delay τ = 4.877, and a maximum pole radius smaller than r = 0.76. In this design, besides the zero frequency 0Ωp and the Nyquist frequency πΩs, we also imposed flatness constraints at two middle frequencies ω1m = 0.685πΩs and ω2m = 0.78πΩs. The frequency subsets \({\bar {\varOmega }_{{\text{ p}}}}\) and \({\bar {\varOmega }_{{\text{ s}}}}\) were taken as \({\bar {\varOmega }_{{\text{ p}}}}\) = empty set [] and \({\bar {\varOmega }_{{\text{ s}}}}\) = [0.7π,π]. Table 6 gives an IIR MFSDF with (K0,K1m,K2m, Kπ) = (5,1,1,1), Nf = K0+2(K1m+K2m)+Kπ = 10 and a maximum pole radius of 0.7593<r = 0.76. Its magnitude and group delay responses are shown in Fig. 7.

We compare in Fig. 7 our IIR MFSDF with a maximally flat IIR half-band filter (HBF) designed by the method in7 and a flat linear-phase FIR HBF provided in16. The IIR HBF is of order (M,N) = (16,4) and has a transfer function as H(z) = 0.5z−11+G(z2), where G(z) is an IIR filter of order (8,2) that has 11 nonzero coefficients. The linear-phase flat FIR HBF is of order (M,N) = (18,0). Due to the zero coefficients in its even tap positions, the FIR HBF also has 11 nonzero coefficients. From the response curves along with their passband details in Fig. 7, it is seen that the IIR MFSDF has a slightly wider passband than the IIR HBF, and its passband error is smaller than that of the FIR HBF. In addition, the IIR MFSDF has a sharper transition-band response and a lower group delay than both flat HBFs.

Fig. 7
Fig. 7The alternative text for this image may have been generated using AI.
Full size image

Comparison of the IIR MFSDF with the IIR and FIR flat HBFs in Example 6. (a) Magnitude responses; (b) Group delay responses.

Conclusions and remarks

A design method for maximally flat and stable IIR digital filters with low group delays has been proposed. The filters designed by this method not only have a stability with prescribed maximum pole radius, but also are as flat as possible as the desired piece-wise constant responses at the zero frequency, Nyquist frequency, and possibly some middle frequencies as well. Design examples demonstrate that, the proposed method can obtain maximally flat and stable IIR filters with wider flat passbands and stopbands, narrower transition bands, and lower group delays than exiting stable FIR and IIR flat filters with the same number of nonzero filter coefficients.

The hardware implementation of the proposed IIR MFSDF is not discussed in this paper. The structures for easy realization of the desired frequency response by changing some tunable parameters of the structures may be considered in our future works.