On Lowpass and Highpass IIR Filters With an Adjustable Bandwidth

advertisement
On Lowpass and Highpass IIR Filters With an Adjustable
Bandwidth
Håkan Johansson1
Abstract – This paper deals with adjustable-bandwidth digital
lowpass and highpass IIR filters obtained from a lowpass prototype filter via frequency transformations. Starting with adjustable-bandwidth filter specifications, including requirements on
passband and stopband edges as well as on passband and stopband ripples, it is shown how to select the prototype filter and
how to perform the frequency transformations so as to ensure
that all specifications can be satisfied. Traditionally, only one cutoff frequency has been controlled when using such transformations.
|Η(ejωT)|
1
1–δc
2 LOWPASS FILTERS
The transfer function and frequency response of the filter with an adjustable bandwidth is denoted as H ( z )
and H ( e j ω T ) , respectively 2; the frequency response is
1. Department of Electrical Engineering, SE-581 83 Linköping
University, Sweden. E-mail: hakanj@isy.liu.se
Transition band
Stopband
δs
1 INTRODUCTION
Many applications require the use of digital filters that
have variable frequency responses [1]. This paper deals
with lowpass and highpass IIR filters that have an
adjustable bandwidth. The filters are obtained from a
lowpass prototype filter via frequency transformations
which preserve the passband and stopband ripples but
also deteriorates the phase response. Hence, we only
consider filters having requirements solely on the magnitude response.
Traditionally, adjustable-bandwidth lowpass and
highpass IIR filters obtained through frequency transformations are constructed in such a way that one cutoff frequency of the prototype filter is mapped to a
desired cutoff frequency. However, in many practical
applications it is desired to control two frequency
points, namely the passband and stopband edges. In
this case, one has to look at this problem more deeply
than what has been done earlier. This problem is investigated in detail in this paper. Our point of departure is
adjustable-bandwidth filter specifications including
requirements on passband and stopband edges as well
as on passband and stopband ripples. Given these specifications, it is then shown how to select the lowpass
prototype filter and how to perform the frequency
transformations so as to ensure that all specifications
can be satisfied.
It should be mentioned that the filters considered
recently in [2] can be viewed as a special case of the
filters in this paper. In [2], both the passband and stopband edges can be controlled in the design of powercomplementary lowpass and highpass filter pairs with
an adjustable cross-over frequency. The prototype filter
is in that case a half-band IIR filter. Such prototype filters can indeed be used also in our approach because
any properly designed lowpass prototype filter can be
employed.
Passband
bl ≤ b ≤ bu
bl
b–∆
b
b+∆
bu
π
ωT
Figure 1. Specification for the lowpass filter with an adjustable bandwidth b.
obtained from the transfer function by replacing z with
e j ω T . In this paper, we consider the following set of
specifications:
1 – δ c ≤ H ( e j ω T ) ≤ 1, ω T ∈ [ 0, b – ∆ ]
(1)
H ( e j ω T ) ≤ δ s , ω T ∈ [ b + ∆, π ]
for b l ≤ b ≤ b u and ∆ l ≤ ∆ ≤ ∆ u satisfying
b – ∆ > 0 , b + ∆ < π , and ∆ > 0
(2)
The specification is illustrated in Fig. 1. For each pair
of values, b and ∆ , the filter H ( z ) should thus realize
a lowpass filter having passband and stopband edges at
b – ∆ and b + ∆ , respectively, and passband and stopband ripples of δ c and δ s , respectively.
Here, H ( z ) is obtained by applying a lowpass-tolowpass frequency transformation
a + z –1
k–1
-, a = -----------z – 1 → ------------------(3)
k+1
1 + az – 1
to a lowpass prototype filter H 0 ( z ) with passband and
stopband edges at
ω c( 0 ) T = ω 0 T – ∆ 0, ω s( 0 ) T = ω 0 T + ∆ 0
(4)
where k , ω 0 T , and ∆ 0 are to be chosen in such a way
that all specifications in (1) are satisfied 3. Since this
transformation is determined by only one parameter, k ,
it is generally not possible to make H ( z ) have passband and stopband edges exactly at b – ∆ and b + ∆
simultaneously for all specifications. It is therefore
necessary to do the transformation in such a way that
each H ( z ) meets a somewhat more stringent specification than that in (1). In this paper, we consider the following two cases where the passband and stopband
edges of H ( z ) satisfy
ω c T ≥ b – ∆, ω s T = b + ∆, Case 1
(5)
and
2. The transfer functions, frequency responses, and constants
involved in the frequency transformations are all dependent on the
bandwidth and transition bandwidth. To keep the notation simple this
is in most formulas understood instead of explicitly indicated.
3. Since we deal with frequency transformations that preserve the
passband and stopband ripples, only the passband and stopband
edges need to be handled.
ω c T = b – ∆, ω s T ≤ b + ∆, Case 2
(6)
That is, in Case 1, the passband is widened somewhat
whereas the stopband edge is exactly at b + ∆ ; in Case
2, the stopband is widened somewhat whereas the passband edge is exactly at b – ∆ .
To make sure that (5) or (6) is fulfilled for all values
of b and ∆ we proceed as follows. First, the values of
b and ∆ , say b = b w , and ∆ = ∆ w , that correspond
to the most stringent (worst-case) specification is identified. Next, with a fixed ω 0 T in (4), k and ∆ 0 are
determined in such a way that the corresponding passband and stopband edges satisfy
ω c T = b w – ∆ w, ω s T = b w + ∆ w
(7)
It is possible to meet (7) because we have two free
parameters, k and ∆ 0 , when ω 0 T has been fixed.
The value of ω 0 T can in principle be any real positive number satisfying 0 < ω 0 T ± ∆ 0 < π . However,
from an implementation point of view, certain choices
may be to prefer in that they can lead to simpler implementations. To see how to select k and ∆ 0 , it is convenient to relate the digital filters to corresponding
analog filters via the bilinear transformation. This will
be done in the following section. It also remains to
show that the above selections of k , ω 0 T , and ∆ 0
imply that (5) or (6) will be satisfied for all b and ∆ .
This will be shown in Section 2.5.
2.1 Frequency Transformations
When dealing with frequency transformations, one
may do all derivations etc. in the z-domain. In many
cases, it appears however more convenient to relate the
z-domain transfer functions to corresponding Ψdomain transfer function via the bilinear transformation
1–Ψ
z–1
(8)
Ψ = -----------, z – 1 = -------------1+Ψ
z+1
The relations in (8) are particularly useful when
designing adjustable wave digital filters since these are
derived from Ψ-domain reference filters [3]. It is therefore convenient to make use of not only z-domain
transfer functions H ( z ) but also their corresponding
Ψ-domain transfer functions H r ( Ψ ) . In the frequency
domains, one then has, for Ψ = jΩ and z = e j ω T ,
ωT
(9)
Ω = tan  --------
 2 
Thus, to the digital prototype filter H 0 ( z ) we can
make correspond an analog reference filter H r0 ( Ψ )
with passband and stopband edges at
ω c( 0 ) T
ω s( 0 ) T
Ω c( 0 ) = tan  --------------- , Ω s( 0 ) = tan  ---------------
(10)
 2 
 2 
and with the same passband and stopband ripples.
Likewise, we can relate H ( z ) to H r ( Ψ ) via
ωc T
ωs T
(11)
Ω c = tan  ---------- , Ω s = tan  ----------
 2 
 2 
Further, H r ( Ψ ) can also be obtained from
H r 0 ( Ψ ) via the lowpass-to-lowpass transformation
(12)
Ψ→Ψ⁄k
by which
Ω c = kΩ c( 0 ),
Ω s = kΩ s( 0 )
(13)
where
ωc T
ωs T
tan  ----------
tan  ----------
 2 
 2 
k = ----------------------------- = ----------------------------ω c( 0 ) T
ω s( 0 ) T
tan  ---------------
tan  ---------------
 2 
 2 
(14)
2.2 Selecting k
For each pair of b and ∆ , the constant k is selected so
that either (5) or (6) is met. From (4) and (14) it follows that the equality in (5), i.e., ω s T = b + ∆ , is satisfied when
b+∆
tan  -------------
 2 
k = -------------------------------------, Case 1
(15)
ω0 T + ∆0


tan ----------------------

2
and the equality in (6), i.e., ω c T = b – ∆ , is satisfied
when
b–∆
tan  ------------
 2 
k = -------------------------------------, Case 2
(16)
ω0 T – ∆0


tan ----------------------

2
As will be shown in Section 2.5, both of these choices,
together with a proper selection of ∆ 0 , also ensures
that the inequality in (5) [ (6)] is satisfied in Case 1
(Case 2), i.e., that ω c T ≥ b – ∆ ( ω s T ≤ b + ∆ ).
With k as in (15) and (16), a in (3) can, after some
simplifications, be written as
( b + ∆ ) – ( ω0 T + ∆0 )
sin  ----------------------------------------------------


2
a = ------------------------------------------------------------------, Case 1
(17)
( b + ∆ ) + ( ω0 T + ∆0 )


--------------------------------------------------sin


2
and
( b – ∆ ) – ( ω0 T – ∆0 )
sin  ---------------------------------------------------


2
a = -----------------------------------------------------------------, Case 2
(18)
( b – ∆ ) + ( ω0 T – ∆0 )


sin ---------------------------------------------------

2
These are a well-known expressions relating one frequency of the prototype filter to the corresponding frequency of the transformed filter, using the lowpass-tolowpass transformation in (3) [1], [4]. We stress however that we have carefully selected the prototype filter
so as to ensure that each specification in (1) will be satisfied after the transformation. This is different from a
traditional design in which only the passband (stopband) edge is controlled whereas one accepts the
resulting stopband (passband) edge after the transformation, regardless its value.
2.3 Selecting ∆0
For a fixed value of ω 0 T , and with k chosen according to (15), the constant ∆ 0 is determined in such a
way that (7) is satisfied, i.e., that both the passband and
stopband edges of H ( z ) are exactly at b w – ∆ w and
b w + ∆ w , respectively, with b w , and ∆ w being the values of b and ∆ that correspond to the most stringent
specification (see the next subsection). From (14) it
then follows that ∆ 0 is selected so that
bw + ∆w
bw – ∆w
tan  -------------------
tan  -------------------
 2 

2 
(19)
------------------------------------- = ------------------------------------ω0 T – ∆0
ω0 T + ∆0




tan ----------------------tan ----------------------



2
2
Solving for ∆ 0 , one obtains
C–1
(20)
∆ 0 = asin  ------------- sin ( ω 0 T )
C + 1

where
bw + ∆w
tan  -------------------

2 
C = --------------------------------bw – ∆w
tan  -------------------
 2 
(21)
2.4 Finding ∆w and bw
This section considers the problem of finding b = b w
and ∆ = ∆ w which corresponds to the most stringent
specification. To this end, we first recall that the order
of an analog filter increases when Ω c ⁄ Ω s grows,
using classical filter approximations. Hence, for digital
filters designed using the bilinear transformation, the
order increases when tan ( ω c T ⁄ 2 ) ⁄ tan ( ω s T ⁄ 2 )
grows. We therefore consider the function f given by
b–∆
tan  ------------
 2 
f = --------------------------(22)
b+∆
tan  -------------
 2 
The partial derivatives of this function are
∂f
sin ( ∆ ) cos ( b )
------ = -------------------------------------------------------------∂b
b+∆
b–∆
2sin 2  ------------- cos 2  ------------
 2 
 2 
(23)
∂f
– sin ( b ) cos ( ∆ )
------ = -------------------------------------------------------------(24)
∂∆
b+∆
b–∆
2sin 2  ------------- cos 2  ------------
 2 
 2 
Thus, ∂ f ⁄ ∂b > 0 for ∆ < b < π ⁄ 2 , ∂ f ⁄ ∂b < 0 for
π ⁄ 2 < b < π – ∆ , and ∂ f ⁄ ∂b = 0 for b = π ⁄ 2 ; further, ∂ f ⁄ ∂∆ < 0 for all b and ∆ in (2). Since
∂ f ⁄ ∂∆ < 0 , the maximum value of f is found on the
boundary where ∆ take on their minimum values. For
example, with a fixed ∆ , the properties of ∂ f ⁄ ∂b then
gives that the most stringent specification in (1) occurs
for ∆ w = ∆ = ∆ l = ∆ u and

bw = 

b u,
bu ≤ π ⁄ 2
b l,
bl ≥ π ⁄ 2
π ⁄ 2,
bl ≤ π ⁄ 2 ≤ bu
(25)
2.5 Proving that all specifications are satisfied
We know from earlier discussions that the prototype
filter and transformation are chosen in such a way that
the worst-case specification is met exactly. In fact, this
also ensures that all specifications are satisfied. Indeed,
the other cases can be viewed as a two-step transformation; first from the prototype filter to the worst-case filter and then from this worst-case filter to the desired
filter. It thus suffices to show that the transformation
from a prototype filter that equals the worst-case filter
makes the desired filter satisfy its specification. This is
intuitively obvious since we know that, for the Case 1
(Case 2) filter, the stopband edge (passband edge) as
well as the passband and stopband ripple requirements
are met and the specification is milder than for the
worst-case filter; hence there is a design margin that is
used to widen the passband (stopband).
This can also be shown by comparing the passband
(stopband) edges involved in Case 1 (Case 2) and utilizing the properties of the function f in Section 2.4.
This amounts to showing that
b–∆
2 atan ( Ω c ) ≥ b – ∆ ⇔ Ω c ≥ tan  ------------
(26)
 2 
in Case 1, and
b+∆
2 atan ( Ω s ) ≤ b + ∆ ⇔ Ω s ≤ tan  -------------
 2 
(27)
in Case 2. Using (13), (15), and (19) in Case 1, and
(13), (16), and (19) in Case 2, both of the right-most
inequalities in the above equations can be written as
bw – ∆w
b–∆
tan  ------------ tan  ------------------
 2 
 2 
--------------------------- ≤ --------------------------------(28)
bw + ∆w
b+∆

tan  ------------- tan  ------------------ 2 

2 
or, equivalently,
Ω c ( b, ∆ ) Ω c ( b w, ∆ w )
--------------------- ≤ ---------------------------(29)
Ω s ( b , ∆ ) Ω s ( b w, ∆ w )
Equations (28) and (29) apparently hold since b w and
∆ w were selected to correspond to the worst-case specification by which the ratio Ω c ⁄ Ω s is maximized.
2.6 A remark
As mentioned above, H ( z ) can be obtained from
H r ( Ψ ) via the bilinear transformation in (8). Due to
the relation in (12), H ( z ) can alternatively be obtained
directly from H r0 ( Ψ ) via the transformation
1–Ψ⁄k
z–1
z – 1 → --------------------, Ψ = ----------(30)
1+Ψ⁄k
z+1
which can be rewritten according to (3). The special
k = 1
case occurs for
corresponding to
ω s T = ω s( 0 ) T in which case H ( z ) = H 0 ( z ) .
2.7 Design Example
We consider the specifications in (1) with b l = 0.15 π ,
b u = 0.45 π , and ∆ = 0.05 π . As prototype filter
H 0 ( z ) we use a seventh-order Cauer (elliptic) filter
with ω 0 T = π ⁄ 2 ; its passband ripple is –0.1 dB and
the design margin is allocated to the stopband attenuation. The worst-case specification occurs in this case
for b = b w = b u and ∆ w = ∆ which gives us
∆ 0 = 0.0506285 π [see (20)]. Figure 2 shows the
)| [dB]
jωT
|H(e
)| [dB]
jωT
0
-0.05
-0.1
0
-40
1
1–δc
0.1π 0.2π 0.3π 0.4π
bl ≤ b ≤ bu
Stopband
Transition band
Passband
-60
-80
|H(e
|Η(ejωT)|
0
-20
0
π
0.1π 0.2π 0.3π 0.4π 0.5π
ωT
δs
0
0
-0.05
-0.1
0
-20
-40
bl
0.1π 0.2π 0.3π 0.4π
-60
-80
0
0.1π 0.2π 0.3π 0.4π 0.5π
ωT
π
Figure 2. Magnitude responses for the adjustable-bandwidth
Case 1 (top) and Case 2 (bottom) filters in the Example for
b = 0.15π, 0.25π, 0.35π, 0.45π.
magnitude responses for Case 1 and Case 2 designs for
some values of b. It is seen that for Case 1 (Case 2) the
stopband edge (passband edge) is exactly at the specified value whereas the passband edge (stopband edge)
is above (below) the specified value. That is, all the
specifications are satisfied.
3 HIGHPASS FILTERS
We consider the following set of highpass filter specifications:
1 – δ c ≤ H ( e j ω T ) ≤ 1, ω T ∈ [ π – b + ∆, π ]
(31)
H ( e j ω T ) ≤ δ s , ω T ∈ [ 0, π – b – ∆ ]
for b l ≤ b ≤ b u and ∆ l ≤ ∆ ≤ ∆ u satisfying
π – b – ∆ > 0 , π – b + ∆ < π , and ∆ > 0
(32)
The specification is illustrated in Fig. 2. For each pair
of values, b and ∆ , the filter H ( z ) should thus realize
a highpass filter having passband and stopband edges
at π – b + ∆ and π – b – ∆ , respectively, and passband
and stopband ripples of δ c and δ s , respectively.
Here, H ( z ) is obtained from the lowpass prototype
filter H 0 ( z ) via the lowpass-to-highpass transformation
a – z –1
k–1
-, a = -----------z – 1 → ------------------(33)
–
1
k
+1
1 – az
where k , ω 0 T , and ∆ 0 are to be chosen in such a way
that all specifications in (31) are satisfied. As in the
lowpass case, this transformation is determined by only
one parameter, k , which in general makes it impossible
to make H ( z ) have passband and stopband edges
exactly at π – b + ∆ and π – b – ∆ simultaneously for
all specifications. Therefore, we consider the two following sharpened cases in which the passband and
stopband edges satisfy
ω c T ≤ π – b + ∆, ω s T = π – b – ∆ , Case 1 (34)
and
ω c T = π – b + ∆,
π–b–∆
π–b
π–b+∆
bu
π
ωT
Figure 3. Specification for a high-pass filter with an adjustable bandwidth b.
ω s T ≥ π – b – ∆ , Case 2 (35)
To make sure that the above equations will be satisfied, one may proceed in the same way as in the lowpass-filter case described in Section 2 with appropriate
modifications. Hence, making use of the bilinear trans-
formation in (8), the band edges of the lowpass filters
H 0 ( z ) and H r0 ( Ψ ) are again related via (10). Likewise, we can relate the highpass filters H ( z ) and
H r ( Ψ ) via (11). Further, H r ( Ψ ) can also be obtained
from H r0 ( Ψ ) via the lowpass-to-lowpass transformation in (12) followed by the lowpass-to-highpass transformation
P
Ψ → ----, P = 1
(36)
Ψ
which corresponds to the overall lowpass-to-highpass
transformation
1
Ψ → ------(37)
kΨ
The reason for doing the transformation in two steps is
that (36) in the z-domain corresponds to the lowpassto-highpass transformation
z –1 → – z –1
(38)
which in the frequency domain results in a shift of π
radians with respect to ω T . This makes it possible to
directly make use of the results in Section 2 instead of
repeating the same (or similar) derivations. To be precise, we can design the adjustable highpass filter by
simply designing an adjustable lowpass filter as outlined in Section 2. Indeed, using the transformation
in (38), the highpass filter will satisfy (34) and (35) if
the lowpass filter satisfy (5) and (6), respectively. Further details about the highpass filters are given in [5].
4 CONCLUSIONS
This paper considered adjustable-bandwidth lowpass
and highpass IIR filters obtained via frequency transformations. It was shown how to satisfy all specifications in a given set of filter specifications including
requirements on both passband and stopband edges.
Only lowpass and highpass filters were treated but
bandpass and bandstop filters can be handled in a similar way [5].
References
[1]
[2]
[3]
[4]
[5]
G. Stoyanov and M. Kawamata, “Variable digital filters,” J.
Signal Processing, vol. 1, no. 4, pp. 275–289, July 1997.
L. Milic and T. Saramäki, “Complementary IIR filter pairs with
an adjustable crossover frequency,” in Proc. IEEE Nordic Signal Processing Symp., Hurtigruten, Norway, Oct. 4–7, 2002.
A. Fettweis, “Wave digital filters: Theory and practice,” Proc.
IEEE, vol. 74, no. 2, pp. 270-327, Feb. 1986.
A. G. Constantinides, “Spectral transformations for digital filters,” Proc. Inst. Elec. Eng., vol. 117, pp. 1585–1590, 1970.
H. Johansson, “On the design of IIR filters with an adjustable
bandwidth,” in preparation.
Download