Keywords

1 Introduction

Digital filtering is one of the most fundamental operations in the digital signal processing (DSP) areas, and it plays an important rule in most DSP applications. The conventional fixed digital filters only have fixed characteristics and their charactersitics cannot be changed in the process of DSP applications. However, many DSP applications require that the digital filter being used should have changeable characteristics during the course of DSP applications. Such changeable characteristics include changeable group delay [1,2,3] and changeable bandwiths [4,5,6,7,8,9,10]. Due to the variability of those characteristics, such filters are named as variable filters. As is well known, variable filters are more flexible than the conventional fixed filters.

Although variable filters can be modeled as either a digital circuit with feedback loop (recursive model) or the one without feedback loop (non-recursive model), more attention must be paid to the stability issue of the recursive model. This is due to the fact that the feedback loop of a recursive model may easily become unstable. In [5,6,7,8,9,10], the stability problem has been addressed for the even-order designs, but this paper deals with the stability problem of an odd-order variable filter (OOVF). More specifically, the recursive designs in [5,6,7,8,9,10] use recursive models of even orders, where various transformation schemes are validated for solving the stability problem.

In [11], a stable mathematical model for the recursive OOVF has been proposed and its stability under any variable circumstances has been rigorously proved. This stable mathematical model enables the designer to conduct design simulations on the optimal design of an OOVF without any concern about the stability issue and this model-based simulations will definitely produce a stable recursive OOVF. Based on the theoretically-proved stability of the recursive OOVF, this paper adopts the stable mathematical model to the \(L_2\)-norm design. That is, this paper utilizes the stabilized model to conduct computer simulations for optimally designing a recursive OOVF. The design simulations aim to find an accurate mathematical model that approximates a given filter specification while keeping the resultant OOVF stable. Design simulation results are provided to demonstrate the performance of the designed recursive OOVF as well as the numerically verified stability. Therefore, this paper provides an effective way to design a recursive variable filter for the odd-order case and the stabilized model ensures that the stability condition will never be violated. As a consequence, the OOVF design can be viewed as generalized computer simulations from the even-order design simulations [10].

2 Odd-Order Stable Model

In this paper, we utilize the recursive mathematical model

$$\begin{aligned} \begin{aligned} H(z,\psi )&= \frac{ C(z,\psi )}{ D_0(z,\psi ) \displaystyle { \prod _{k=1}^{N_2/2}} D_k(z,\psi ) } \\&= \frac{ \displaystyle { \sum _{k=0}^{N_1}} c_k(\psi ) z^{-k} }{ [1+ d_{01}(\psi ) z^{-1}] \displaystyle { \prod _{k=1}^{N_2/2}} [1+ d_{k1}(\psi ) z^{-1} + d_{k2}(\psi ) z^{-2} ] } \\ \end{aligned} \end{aligned}$$
(1)

where \( N_2 \) is an even integer, \( D_0(z,\psi ) \) and \( D_k(z,\psi ) \) are the first-order section and second-order sections, respectively,

$$\begin{aligned} \begin{aligned}&C(z,\psi ) = \sum _{k=0}^{N_1} c_k(\psi ) z^{-k} \\&D_0(z,\psi ) = 1+ d_{01}(\psi ) z^{-1} \\&D_k(z,\psi ) = 1+ d_{k1}(\psi ) z^{-1} + d_{k2}(\psi ) z^{-2}. \end{aligned} \end{aligned}$$
(2)

Thus, the mathematical model \( H(z,\psi ) \) in (1) has odd (\( N_2+1 \)) order.

By assuming

$$\begin{aligned} d_{02}(\psi ) = 0 \end{aligned}$$

we get the unified model

$$\begin{aligned} \begin{aligned} H(z,\psi )&= \frac{ \displaystyle { \sum _{k=0}^{N_1}} c_k(\psi ) z^{-k} }{ \displaystyle { \prod _{k=0}^{N_2/2}} [1+ d_{k1}(\psi ) z^{-1}+ d_{k2}(\psi ) z^{-2} ] }. \end{aligned} \end{aligned}$$
(3)

This model represents a recursive odd-order variable filter (OOVF) whose coefficients are defined as the functions of the parameter \( \psi \), where \( \psi \) tunes a given amplitude specification \( A_d(\omega ,\psi ) \). In other words, design simulations are done in order to find \( c_k(\psi ) \), \( d_{k1}(\psi ) \), \( d_{k2}(\psi ) \) such that the specification \( A_d(\omega ,\psi ) \) is accurately approximated. However, the design simulations directly using (3) may produce an unstable OOVF. Thus, a stable mathematical model for the OOVF is proved in [11] for performing the design simulations without any stability concern.

As mentioned in [11], the OOVF is stable if and only if

$$\begin{aligned} {\left\{ \begin{array}{ll} | d_{k2}(\psi )|<1 \\ |d_{k1}(\psi )|<1+d_{k2}(\psi ) \end{array}\right. } \end{aligned}$$
(4)

is satisfied. Before conducting design simulations to get an OOVF, it is wise to represent the original \( d_{k2}(\psi ) \) and \( d_{k1}(\psi ) \) as

$$\begin{aligned} {\left\{ \begin{array}{ll} d_{k2}(\psi ) = \gamma \cdot T[x_{k2}(\psi )] \\ d_{k1}(\psi ) = \gamma \cdot T[x_{k,1}(\psi )] [1+ d_{k2}(\psi )] \end{array}\right. } \end{aligned}$$
(5)

by utilizing the transformation function \( T(\chi ) \), where \( \gamma \) is a scaling factor \( \gamma \in (0,1) \). As long as the function \( T(\chi ) \) is bounded within

$$\begin{aligned} \begin{aligned} T(\chi ) \in [-1,1] \end{aligned} \end{aligned}$$
(6)

it has been rigorously proved in [11] that the recursive OOVF is definitely stable regardless of the values of \( x_{k2}(\psi ) \), \( x_{k1}(\psi ) \). In [8, 10], design simulations have been carried out for designing even-order variable filters on the basis of this principle. This paper extends this principle to the OOVF case and designs a stable OOVF using the stabilized OOVF model in (3).

3 Design Methodology and Design Simulations

This section first describes how to get the functions \( c_k(\psi ) \), \( d_{k1}(\psi ) \), and \( d_{k2}(\psi ) \), and then conducts design simulations to design an OOVF approximating a given bandpass amplitude specification \( A_d(\omega ,\psi ) \). Finally, computer simulation results are used to show the design performance and verify the stability.

3.1 Design Methodology

The functions \( c_k(\psi ) \), \( x_{k2}(\psi ) \), and \( x_{k1}(\psi ) \) are assumed to be the polynomial functions, which can be found by employing the two-step schemes [4,5,6,7,8,9,10]. Here, we briefly summarize the design methodology.

Once the amplitude specification \( A_d(\omega ,\psi _i) \) is given, Table 1 demonstrates the process of the first step. The first step is to discretize \( A_d(\omega ,\psi ) \) by sampling \( \psi \), which yields the samples \( \psi _i \), \( i=1,2,\cdots ,L \). Those samples in turn correspond to the specification samples \( A_d(\omega ,\psi _i) \). Then, a fixed filter is found to separately approximate each \( A_d(\omega ,\psi _i) \). More specifically, approximating \( A_d(\omega ,\psi _i) \) produces the ith fixed filter

$$\begin{aligned} \begin{aligned} H_i(z)&= \frac{ \displaystyle { \sum _{k=0}^{N_1}} c_k z^{-k} }{ \displaystyle { \prod _{k=0}^{N_2/2}} [1+ d_{k1} z^{-1}+ d_{k2} z^{-2} ] } \end{aligned} \end{aligned}$$
(7)

where the same transformation \( T(\chi ) \) for \( d_{k2} \) and \( d_{k1} \) is used, which results in \( x_{k2} \) and \( x_{k1} \). Therefore, designing each fixed filter yields a set of values of \( \{ c_k, x_{k2},x_{k1} \} \). This is explained in Table 1. The cost function to be minimized is the weighted sum of the squared error of the amplitude response.

Table 1. First-step: design of fixed-coefficient filters
Table 2. Second-step: each polynomial fitting to respective values

The second step is to fit the resulting values of each coefficient by using a different polynomial, which is explained in Table 2. For instance, all the values of \( c_0 \) are fitted by using the polynomial \( c_0(\psi ) \). As a result, we can obtain all the polynomial functions \( c_k(\psi ) \), \( x_{k2}(\psi ) \), and \( x_{k1}(\psi ) \). Combining the above two steps completes the OOVF design using the stabilized model.

3.2 Design Simulations

Based on the above design methodology, this section conducts the computer simulations to approximate the bandpass amplitude specification

$$\begin{aligned} \begin{aligned} A_d(\omega ,\psi )&= {\left\{ \begin{array}{ll} 0, \quad |\omega | \in [0,0.26 \pi + \psi ] \\ 1, \quad |\omega | \in [0.32 \pi + \psi , 0.64 \pi - \psi ] \\ 0, \quad |\omega | \in [0.70 \pi - \psi , \pi ]. \end{array}\right. } \end{aligned} \end{aligned}$$
(8)

The design sets the orders \( N_1=6 \), \( N_2=6 \). Evidently, this is the seventh-order OOVF. To tune the bandwiths, \( \psi \) is allowed to take arbitrary value in

$$\begin{aligned} \begin{aligned}&\psi \in [\psi _{\min },\psi _{\max }] \\&\psi _{\min } = -0.10 \pi \\&\psi _{\max } = 0.10 \pi . \end{aligned} \end{aligned}$$
(9)

The entire range in (9) is sampled to get \( L=21 \) sampled values, and the frequency \( \omega \in [0,\pi ] \) is sampled to get 601 points. Figure 1 shows the discretized bandpass specifications.

Fig. 1.
figure 1

Discretized bandpass specifications (\(L=21\))

Fig. 2.
figure 2

Bandpass responses of the designed \(L=21\) fixed filters

Fig. 3.
figure 3

Approximating polynomials for the numerator coefficients \( c_k\)

Fig. 4.
figure 4

Approximating polynomials for \( x_{k2} \) and \( x_{k1} \)

In this paper, we employ the transformation function

$$ T(\chi )= \cos (\chi ). $$

By setting \( \gamma =0.9999 \), we design the first fixed bandpass filter \( H_1(z) \) corresponding to \( \psi _1= \psi _{\min }= -0.10 \pi \), and the initial coefficients are

$$\begin{aligned} \begin{bmatrix} c_0 \\ c_1 \\ c_2 \\ c_3 \\ c_4 \\ c_5 \\ c_6 \\ x_{12} \\ x_{22} \\ x_{32} \\ x_{01} \\ x_{11} \\ x_{21} \\ x_{31} \\ \end{bmatrix} = \left[ \begin{array}{r} -1.00911552434079 \\ -0.01951066953029 \\ -0.04822078914531 \\ 0.00004319184163 \\ -0.31785945124769 \\ 1.09500373878749 \\ -1.87399025764096 \\ 0.42818327304516 \\ 0.89563847121175 \\ 0.73095733842945 \\ 0.57785734633080 \\ 0.04031403161844 \\ 0.67708918759730 \\ 0.56890020520072 \end{array} \right] . \end{aligned}$$
(10)

The MATLAB function fminsearch is employed to search for the sub-optimal coefficients iteratively. Furthermore, the simulation design ignores the amplitude errors in the transition bands.

Figure 2 depicts the actual bandpass amplitude responses of the designed \(L=21\) fixed filters. The average of the normalized root-mean-square (RMS) error and that of the maximum error are respectively

$$\begin{aligned} \overline{e}_2=4.5509 \%, \quad \overline{e}_{\max }=0.1072. \end{aligned}$$

After designing the \(L=21 \) fixed filters, each coefficient is fitted with the third-order polynomial. Figure 3 plots the approximating polynomials for the numerator coefficients, and Fig. 4 plots the approximating polynomials for the denominator coefficients. Moreover, Fig. 5 plots the actual bandpass responses of the designed OOVF, and Fig. 6 plots the stability triangles along with the denominator coefficients. As all the coefficient pairs \( (d_{k1},d_{k2}) \) are within the triangles, the designed seventh-order OOVF is definitely stable. The average of the normalized RMS error and that of the maximum error are

$$\begin{aligned} \overline{e}_2=4.6043 \%, \quad \overline{e}_{\max }=0.1096 \end{aligned}$$

respectively.

Fig. 5.
figure 5

Bandpass responses of the designed OOVF

Fig. 6.
figure 6

Stability triangles for the designed seventh-order OOVF

4 Conclusion

This paper has utilized the stable odd-order mathematical model to design a stable bandpass OOVF with tunable amplitude (gain). After briefly describing the two-step design methodology using Tables 1 and 2, this paper has shown that a recursive OOVF can be designed without worrying about the stability problem, and the resultant recursive OOVF is certainly stable. Design simulations have demonstrated the effectiveness of the stable-model-based design methodology and the numerically verified stability.