3.13  System Design with Bilinear Transformation

This section discusses the design of system functions H(z) using the bilinear transformation. While H(s) and Fs were assumed to be known in the previous section, here the focus is on design, even in case H(s) is not provided.

PIC

Figure 3.41: Three categories of bilinear applications and the respective choices of the sampling frequency Fs in the bilinear transformation depends on the application, and can be arbitrary in the case of digital filter design.

The bilinear applications can be grouped in three main categories, as depicted in Figure 3.41:

As highlighted in Figure 3.41, the designer can choose an arbitrary value for the sampling frequency Fs when the bilinear is used to design a digital filter from a pre-warped continuous-time system function H(s). In contrast, in applications that fall within the mimic G(s) category, Fs should be carefully chosen. When the goal is use the bilinear to match a single frequency, a specific value of the sampling frequency can be used to define the matching frequency.

The next three subsections will discuss each of the categories in Figure 3.41.

3.13.1  Bilinear for IIR filter design

The design of IIR filters using the bilinear transformation relies on first designing an analog filter H(s) using a classic approximation method. The most used methods are listed in Table 3.7. In applications in which the phase linearity is important, good options are the Bessel and Butterworth. However, their magnitude response does not represent a magnitude roll-off as steep as the other options. If the phase does not need to be approximately linear, Cauer (or elliptic) filters achieve a sharper roll-off and, consequently, a lower filter order for a given project specification. However, Cauer and Chebyshev Type I present ripple along the passband frequencies, which may be a problem in some applications. When compared to Chebyshev Type I, the Chebyshev Type II approximation has the advantage of having ripple only in the stopband.

Table 3.7: Main approximations adopted in the design of continuous-time filters H(s) with their pros and cons with respect to phase and magnitude (mag.).
Approximation Pros Cons
Bessel Phase linearity smooth (poor) mag. roll-off
Butterworth Flat passband mag. gradual (poor) mag. roll-off
Chebyshev Type I Steeper mag. roll-off ripple in passband
Chebyshev Type II Steeper mag. roll-off ripple only in stopband
Cauer (or elliptic) Sharp (good) mag. roll-off Non-linear phase and ripples

This subsection assumes the goal is to design an IIR filter H(z) by applying the bilinear transformation to the designed H(s). The next paragraphs will emphasize the importance of pre-warping frequencies and finding the order of the analog filter H(s) that complies with the project requirements.

In IIR filter design, there is no concern about the value of the sampling frequency. In this case, before obtaining the H(s) that will be adopted for the bilinear transformation, it is important to pre-warp all frequencies of interest using Eq. (3.75). This way, the non-linear behavior imposed by the bilinear transformation (see, e. g. Figure 3.36 and Figure 3.35) is pre-compensated by the filter designer.

A key message is:

Figure 3.42 summarizes the steps when using the bilinear transformation for IIR design. Note that the value of the sampling rate Fs is chosen in Step 2 and reused in Step 4, which then cancels out the influence of Fs. This will be discussed later, after some examples of IIR design with bilinear.

PIC

Figure 3.42: Steps of IIR filter design using the bilinear transformation when the filter requirements are in discrete-time (frequencies in radians).

The following two examples illustrate pre-warping and finding the minimum order of a filter that complies with the project requirements. These projects use the bilinear function for pedagogical reasons. But instead of using this function, one could directly design IIR filters using higher-lever functions such as butter, cheby2 and others, which automatically invoke a bilinear routine.

Example 3.28. Design a digital lowpass filter using the bilinear transformation. The task is to design a Butterworth lowpass digital filter Hz(z) with passband Ωp = π5 and stopband Ωs = 3π10 frequencies, respectively, both in rad. Note that the specifications are in discrete-time. The maximum and minimum attenuations in pass and stopbands are Ap = 4 dB and As = 10 dB, respectively.

In order to use classic methods for designing analog filter H(s), the discrete-time frequencies Ωp and Ωs are converted to continuous-time assuming an arbitrary sampling frequency. Here we will assume F s = 0.5 Hz for convenience. Hence, using Eq. (3.75) the frequencies of interest are pre-warped to ωp = tan (Ωp2) 0.325 and ωs = tan (Ωr2) 0.509 rad/s.

To find the minimum order of a Butterworth that obeys the requirements, one can use:

1Ap=4; % maximum attenuation in passband (in dB) 
2As=10; % minimum attenuation in stopband (in dB) 
3wp=0.325; % passband frequency in rad/s 
4ws=0.509; % stopband frequency in rad/s 
5[n,w_cutoff] = buttord(wp,ws,Ap,As,'s') 
6[Bs,As]=butter(n,w_cutoff,'s')

The second-order Butterworth with 3-dB cutoff frequency of 0.294 rad/s obeys the corresponding mask and has the system function Hs(s) = 0.086(s2 + 0.416s + 0.086). In Python,29 the commands are:

1import scipy.signal 
2Ap=4; # maximum attenuation in passband (in dB) 
3As=10; # minimum attenuation in stopband (in dB) 
4wp=0.325; # passband frequency in rad/s 
5ws=0.509; # stopband frequency in rad/s 
6[n,w_cutoff] = scipy.signal.buttord(wp ,ws ,Ap ,As ,analog=True) 
7[Bs, As]= scipy.signal.butter(n, w_cutoff, analog=True)

Note that, while Matlab/Octave identifies a continuous-time system with ’s’, Python uses analog=True.

Having obtained Hs(s), using Eq. (3.64) with F s = 0.5 Hz leads to

H(z) = 0.086 (z1 z+1 ) 2 + 0.416 (z1 z+1 ) + 0.086 = 0.086(z + 1)2 (z 1)2 + 0.416 (z 1) (z + 1) + 0.086 (z + 1)2 0.0575 + 0.1150z1 + 0.0575z2 1 1.2166z1 + 0.4466z2 .

The frequency response of the designed H(z) has magnitudes 10log 10|Hz(ejΩp)|2 = 3.96 and 10log 10|Hz(ejΩr)|2 = 10 dB, which obey the requirements. Note that there is some slack at Ωp while the filter matches exactly30 the requirement at Ωs.   

Example 3.29. Design a digital bandpass filter using the bilinear transformation. The goal is to design a filter with a bandpass from 0.2π to 0.4π rad, and stopbands from 0 to 0.1π and from 0.5π to π rad. The filter must have less than 3 dB of ripple in the passband and at least 30 dB of attenuation in the stopbands. In this example, we will adopt F s = 0.5 Hz (an arbitrary value) and the Chebyshev Type II approximation, which does not have the ripples at the passband that Chebyshev Type I has.

Listing 3.25 indicates how to perform this filter design using Matlab/Octave.

Listing 3.25: MatlabOctaveCodeSnippets/snip_systems_iir_bilinear.m
1%% Passband specifications given in discrete-time: 
2Wp = pi*[0.2 0.4];   % Passband Frequencies (rad) 
3Wr = pi*[0.1 0.5];     % Stopband (rejection) Frequencies (rad) 
4Apass = 3;           % Maximum passband attenuation (ripple) (dB) 
5Astop = 30;          % Minimum stopband attenuation (dB) 
6%% Choose convenient sampling frequency 
7Fs=0.5; % in Hertz 
8%% Map from discrete to continuous-time using pre-warping 
9wp=2*Fs*tan(Wp/2); % in rad/s 
10wr=2*Fs*tan(Wr/2); % in rad/s 
11%% Design analog filter (use 's' to impose continuous-time) 
12[N,w_design] = cheb2ord(wp,wr,Apass,Astop,'s')%find the filter order 
13[Bs,As]=cheby2(N,Astop,w_design,'bandpass','s') %obtain H(s) = Bs/As 
14figure(1), freqs(Bs,As) %plot the frequency response of H(s) 
15%% Convert to discrete-time using bilinear 
16[Bz,Az]=bilinear(Bs,As,Fs) %obtain H(z) from H(s) with given Fs 
17%% Check some results: 
18figure(2), freqz(Bz,Az) %plot DTFT of H(z). Check values at Wp and Wr 
19s=1j*wp; Hs_at_wp=20*log10(abs(polyval(Bs,s)/polyval(As,s)))%cutoff 
20z=exp(1j*Wp); H_at_Wp=20*log10(abs(polyval(Bz,z)/polyval(Az,z))) 
21z=exp(1j*Wr); H_at_Wr=20*log10(abs(polyval(Bz,z)/polyval(Az,z)))
  

In case the sampling frequency F s is changed (line Fs=0.5) in Listing 3.25, one can observe that this does not alter the final filter H(z) given by [Bz, Az].   

Bilinear sampling rate is arbitrary in IIR filter design

Example 3.26 shows the strong impact that Fs may have when the bilinear transformation is applied to a given continuous-time system H(s). However, when using the bilinear in the specific task of designing a digital filter, the chosen value for Fs will cancel out and have no influence on the design. This was mentioned in Figure 3.41 and can be experimentally observed by changing F s in Example 3.28 or in Listing 3.25. This fact is demonstrated here through the design of a simple first-order digital filter H(z) with cutoff frequency Ωc.

The following code uses symbolic math to obtain H(s) after pre-warping and, then using bilinear to obtain H(z).

1%define s, z, natural frequency, damping ratio and sampling interval 
2syms Wc wc b0 a0 s z Fs %all as symbolic variables 
3%1) Filter requirements: 1st-order Butterworth, cutoff freq. Wc rad 
4%2) pre-warping 
5wc = 2*Fs*tan(Wc/2); 
6%3) Design H(s) with pre-warped frequencies. A first-order 
7% Butterworth with cutoff frequency of 1 rad/s is H(s)=1/(s+1). 
8Hs_prototype = 1/(s+1); 
9% Use frequency scaling s=s/wc to move the cutoff from 1 to wc rad/s 
10Hs=subs(Hs_prototype,s,s/wc); % Continuous-time H(s). 
11pretty(Hs) % Use pretty(Hs) to see it 
12%4) Bilinear transformation 
13Hz=subs(Hs,s,(2*Fs)*((z-1)/(z+1))); %bilinear: s <- 2/Ts*(z-1)/(z+1) 
14Hz=simplify(Hz); %simplify the expression 
15disp('H(z) obtained with the bilinear transform:') 
16pretty(Hz) %show it using an alternative view

We want to show that the value of the sampling rate F s can be chosen arbitrarily in this IIR design. There is only one frequency of interest in this case to be pre-warped, which leads to ωc = 2F s tan (Ωc2). Starting with the first-order Butterworth prototype Hp(s) = 1(s + 1) with cutoff frequency equals to 1 rad/s, one uses frequency scaling to move the cutoff frequency to the pre-warped frequency ωc. Hence, after Step 3 of the code (which implements Step 3 of Figure 3.42), one has:

H(s) = Hp ( s ωc ) = 1 s ωc + 1 = 1 s 2F s tan (Ωc2) + 1.

After the bilinear transformation in Step 4, the code outputs:

H(z) = H(s)|s=2F sz1 z+1 = 1 z1 tan (Ωc2)(z+1) + 1.

One can observe that H(z) does not depend on F s because the value of F s was canceled. This also happens for filters of order larger than 1.

Example 3.30. Another example of the arbitrary F s getting canceled out. Assume a second-order digital lowpass filter H(s) = 1(s2 + 2s + 1) (a normalized Butterworth) meets the requirements in continuous-time. We want to use the bilinear transformation to obtain H(z) with a 3-dB cutoff frequency of π4 rad.

We can choose any convenient value for F s and to illustrate that, instead of using a specific numeric value, the development will be made for a generic F s.

Eq. (3.75) is adopted to perform pre-warping, which leads to

ωc = 2F s tan (π4 2 ) 0.8284F s.

Then, Eq. (3.55) is used to perform frequency scaling and move the cutoff frequency ωc = 1 rad/s of the prototype filter to ωc = 0.8284F s. Substituting s by sωc = s(0.8284F s) leads to

H(s) = 1 ( s 0.8284F s ) 2 + 2 ( s 0.8284F s ) + 1

Now, the bilinear can be applied to H(s), which leads to

H(z) = H(s)|s= (2F  sz1 z+1 ) = 0.0976z2 + 0.1953z + 0.0976 z2 0.9428z + 0.3333 .

Note that F s was canceled out because it only appeared in H(s) dividing s, which is later substituted by 2F sz1 z+1.   

In conclusion, the F s value adopted for the bilinear can be different from the one actually used when implementing the digital filter H(z) (for instance, in an embedded system with ADC and DAC chips). We will use F s to denote the value used in the bilinear transformation and reserve Fs to the adopted sampling frequency when implementing H(z), as depicted in Figure 3.43.

PIC

Figure 3.43: Version of Figure 1.45 and Figure 3.34 that considers both the bilinear transformation and the conversion of continuous to discrete-time via ω = ΩFs.

Hence, in this very specific application of bilinear, the sampling frequency F s can be chosen arbitrarily. This may sound confusing31 because, as discussed here, there are other applications of the bilinear transformation in which the value of Fs must be carefully chosen. In IIR design, one just needs to avoid choosing a too small value for F s, which could eventually lead to numerical issues in the design of H(s) due to an extreme pre-warping of frequencies of interest. Hence, for convenience, F s is chosen to be 0.5, 1 or 2 Hz in IIR design.

Figure 3.43 takes in account that two sampling frequencies can be used in a bilinear transformation: F s and Fs. The former is used in the transform itself while the latter is adopted for the actual implementation of H(z) in a filtering hardware such as the one depicted in Figure 3.30.

Example 3.31. Design an IIR filter with the bilinear transformation using frequency scaling of an analog prototype filter. The task is to design on Matlab (Octave has a slightly different syntax) a third-order lowpass Butterworth digital filter H(z) using the bilinear transformation of Hp(s) = 1(s3 + 2s2 + 2s + 1) (that can be obtained with [Bs,As]=butter(3,1,’s’)), which has a cutoff frequency ωc = 1 rad/s. Other project requirements are a sampling frequency of Fs = 500 Hz and H(z) with a cutoff frequency fd = 100 Hz (i. e., ωd = 2πfd 628.3 rad/s).

Pre-warping must be used because ωc = 1 rad/s is the cutoff frequency of the prototype Hp(s) that has to be mapped to fd = 100 Hz when H(z) is implemented.

We will arbitrarily adopt F s = Fs = 500 Hz. The goal is to find the frequency ωa to which ωd = 2πfd is mapped to. Eq. (3.77) leads to

ωa = 2Fs tan ( ωd 2Fs ) = 2 × 500tan ( 2π100 2 × 500 ) 726.52rad/s,

which corresponds to 115.63 Hz.

Now, frequency scaling must be applied to Hp(s) in order to move its cutoff frequency from ωc = 1 to ωa = 726.52 rad/s. Substituting s s 726.52 in Hp(s) leads to

H(s) = 3.8348 × 108 s3 + 1.453 × 103s2 + 1.0557 × 106s + 3.8348 × 108.

Applying the bilinear to H(s) with F s = Fs = 500 Hz leads to H(z) = (0.0985+0.2956z1 +0.2956z2 +0.0985z3)(10.5773z1 +0.4218z2 0.0563z3). Evaluating |H(z)| at z = ejΩ, with Ω = 2πfdFs, one obtains 12. This indicates that, due to the pre-warping, the bilinear positioned the cutoff of H(z) at the desired value of 100 Hz.

The next paragraphs illustrate how a computer can be used to carry out the whole procedure. A first approach is to design an analog filter by first pre-warping the cutoff frequency and then use the bilinear:

1fs=500; %sampling frequency (Hz) 
2[Bs,As]=butter(3,2*pi*115.63,'s'); %analog filter 
3[Bz,Az]=bilinear(Bs,As,fs); %convert analog to digital 
4z=exp(1j*2*pi*100/500); abs(polyval(Bz,z)/polyval(Az,z))%check cutoff

The second and simpler approach (at least from the user’s perspective) is to directly use a routine that incorporates pre-warping and bilinear transformation, such as butter:

1Fs=500;fd=100; fnormalized=fd/(Fs/2); [B2,A2]=butter(3,fnormalized)

(recall that Matlab/Octave deals with digital filters using frequencies in Hertz normalized by the Nyquist frequency as informed in Table 1.5). A comparison would show that [Bz,Az] and [B2,A2] have approximately the same elements.

A third way of dealing with a software routine that directly designs a digital filter is to convert the specification to discrete-time. In this case, Ω = ωdFs 1.2566 rad is the desired cutoff frequency and H(z) can be obtained with:

1Fs=500;Wd=2*pi*100/Fs;[B3,A3]=butter(3,Wd/pi)

Note that in this and in the previous (second) approach, the function butter.m was not informed about Fs. Consequently, when the pre-warping was done inside butter.m, it used an arbitrary value of F s to pre-warp, then obtained H(s), and converted using bilinear with F s, such that the value of F s gets canceled out, as previously explained.   

Bilinear IIR design can start from continuous-time specifications

In previous IIR designs, the filter specification was provided in the discrete-time domain. However, the design of a digital filter may also start from specifications in the analog domain. Figure 3.44 summarizes a project flow that includes both options when designing a filter H(z) using the bilinear transformation.

PIC

Figure 3.44: Steps for designing an IIR filter H(z) using the bilinear transformation, assuming a lowpass filter. The set of requirements can be in discrete (Φ) or continuous-time (ϕ) domain.

Figure 3.44 considers the possibilities of having a set of filter requirements specified either in continuous (ϕ) or discrete-time (Φ). For example, a discrete-time lowpass filter can be specified by Φ = {Ωp,Ωr,Ap,Ar}, where the subscripts p and r distinguish the frequencies and attenuations of the passband and stopband, respectively. Similarly, ϕ = {Fp,Fr,Ap,Ar,Fs} is a possible lowpass filter requirement in continuous-time, as depicted in Figure 3.3(a). Note that ϕ includes the sampling frequency Fs used in the hardware implementation of the digital filter while Φ does not.

In case the IIR design starts with filter requirements provided in discrete-time, Fs is not part of the design process and F s is chosen arbitrarily. The designer executes the steps “3 4 5” depicted in Figure 3.44, as done in Example 3.28.

The next example illustrates a design using bilinear in which the specification ϕ of the filter H(z) to be designed is given in continuous-time, which includes the sampling frequency Fs that will actually be used when implementing the filter.

Example 3.32. Bilinear design of IIR filter from continuous-time specifications. The task is to design an elliptic lowpass digital filter Hz(z) that when implemented on a hardware operating at Fs = 500 Hz obeys the requirements ϕ = {100,150,4,20,500}, where ϕ = {Fp,Fr,Ap,Ar,Fs} with frequencies given in Hz.

According to Block 2 of Figure 3.44, using ω = FsΩ (Eq. (1.36)) and the definition of angular frequency ω = Fsf, the continuous-time specifications ϕ can be converted to the discrete-time specification Φ = {0.4π,0.6π,4,20}, where Φ = {Ωp,Ωr,Ap,Ar} with frequencies given in radians. After this, one can continue to use Fs = 500 Hz or a new value for the sampling frequency can be chosen. For pedagogical purposes, a new value F s = 0.5 Hz is chosen here. Note that an important point is to use Fs = 500 Hz when implementing Hz(z) on “hardware”, not F s, which will be exclusively used for the design of H(z).

From Eq. (3.75) with F s = 0.5, the frequencies of interest are pre-warped to ωp = tan (Ωp2) 0.7265 and ωr = tan (Ωr2) 1.3764 rad/s. Given the pre-warped specifications in continuous-time ϕ  = {0.7265,1.3764,4,20,0.5}, one can obtain the second-order elliptic filter Hs(s) = (0.1s2 + 0.24)(s2 + 0.3542s + 0.3803) that obeys the corresponding mask. This design of the analog filter Hs(s) can be done with classical approximations and respective software, such as using ellipord and ellip in Matlab/Octave (see Listing 3.26).

Eq. (3.64) (with F s = 0.5 Hz) allows to convert Hs(s) into Hz(z) = (0.196 + 0.1614z1 + 0.196z2)(1 0.7145z1 + 0.5915z2), which has 10log 10|Hz(ejΩp)|2 = 4 and 10log 10|Hz(ejΩr)|2 = 29.961 dB. Note that there is significant slack (almost 10 dB) at Ωr while the approximation matches exactly the requirement at Ωp. Listing 3.26 indicates how to perform this filter design using Matlab.

Listing 3.26: MatlabOctaveCodeSnippets/snip_systems_iir_elliptic.m
1%% Specifications given in continuous-time: 
2Fp = 100;        % Passband Frequency (Hz) 
3Fr = 150;        % Stopband Frequency (Hz) 
4Apass = 4;           % Maximum passband attenuation (ripple) (dB) 
5Astop = 20;          % Minimum stopband attenuation (dB) 
6Fs=500; % in Hertz 
7%% Convert to discrete-time using the fundamental relation w = W Fs 
8Wp=2*pi*Fp/Fs; %in rad 
9Wr=2*pi*Fr/Fs; %in rad 
10%% Convert to continuous-time using pre-warping. Can pick another Fs 
11Fs2=0.5; %could continue with Fs=500, but will illustrate a new value 
12wp=2*Fs2*tan(Wp/2); % in rad/s 
13wr=2*Fs2*tan(Wr/2); % in rad/s 
14%% Design analog filter (use 's' to impose continuous-time) 
15[N,w_passband]=ellipord(wp,wr,Apass,Astop,'s') %find the filter order 
16[Bs,As]=ellip(N,Apass,Astop,w_passband,'s') %obtain H(s) = Bs/As 
17%% Convert to discrete-time using bilinear 
18[Bz,Az]=bilinear(Bs,As,Fs2) %obtain H(z) from H(s) with given Fs 
19%% Check some results: 
20%freqz(Bz,Az) %plot the DTFT of H(z). Now check values at Wp and Wr: 
21s=1j*wp; Hs_at_wp=20*log10(abs(polyval(Bs,s)/polyval(As,s))) 
22s=1j*wr; Hs_at_wr=20*log10(abs(polyval(Bs,s)/polyval(As,s))) 
23z=exp(1j*Wp); Hz_at_Wp=20*log10(abs(polyval(Bz,z)/polyval(Az,z))) 
24z=exp(1j*Wr); Hz_at_Wr=20*log10(abs(polyval(Bz,z)/polyval(Az,z))) 
25%% Let the sofware do all the hard work (hiding the "bilinear"): 
26[N,W_passband]=ellipord(Wp/pi,Wr/pi,Apass,Astop); %digital filter 
27[Bz2,Az2]=ellip(N,Apass,Astop,W_passband) %obtains same H(z)
  

Executing Listing 3.26 allows to confirm that, due to pre-warping, the values of Hs_at_wp and Hs_at_wr coincide with Hz_at_Wp and Hz_at_Wr, respectively.    

As discussed in the previous example, even when the filter specification is given in continuous-time, before the bilinear, the analog filter H(s) can be designed with several pre-warped frequencies of interest. For instance, two frequencies were pre-warped in Example 3.32. A different situation occurs when the bilinear must be applied to a given G(s). In this case, there is only one “degree of freedom”: the choice of F s. Hence, it is not possible to use pre-warping to match the behavior of G(s) and H(z) at several frequencies. But it is possible to match their behavior in a single frequency. This is the topic of the next subsection.

3.13.2  Bilinear for matching a single frequency

When G(s) and Fs are given and there is a single frequency of interest to be “matched” in the continuous and discrete-time domains, it is possible to use F s to take pre-warping in account and reach a matching between G(s) and H(z). This “matching” frequency strategy can also be used to design IIR filters when there is a single frequency of interest.

The single “match” frequency ωm is ωm = ωa = ωd rad/s. From Eq. (3.77):

ωm = 2Fs tan ( ωm 2Fs ) ,
(3.80)

which can be writte as

Fs = ωm 2tan ( ωm 2Fs ) .

The trick is to consider that Fs at the left side is a new value F s, which can be chosen to impose the matching:

F s = ωm 2tan ( ωm 2Fs ) ,
(3.81)

while Fs in the tangent is the provided (original) Fs value. Instead of using the angular frequency ωm = 2πfm, one can use the linear frequency fm = ωm(2π) Hz. In summary, the matching can be imposed by32

F s = ωm 2tan ( ωm 2Fs ) = πfm tan (πfm Fs ) .
(3.82)

To avoid the discontinuity of tan (π2), one has to choose πfm Fs < π2, which corresponds to Fs > 2fm, which is consistent with the sampling theorem. As expected, having a pre-defined Fs restricts fm < Fs2 to be less than the Nyquist frequency.

Hence, instead of using Eq. (3.64), it is possible to incorporate pre-warping such that ωm is the match frequency using:

H(z) = G(s)|s= ωm tan ( ωm2Fs ) (z1 z+1 ).
(3.83)

Example 3.33. Simple example of matched G(s) and H(z) at specific frequency fm Hz. Assume fm = 10 Hz and H(z) was obtained from G(s) using Eq. (3.83) with sampling frequency Fs = 30 Hz. Using Eq. (3.82), the value of H(z) at the angle Ωm = 2πfmFs 2.1 rad matches the value of G(s)|s=j20π at fm = 10 Hz.

In case Fs = 60 Hz and fm = 10 Hz, then it is at the angle Ωm = 2πfmFs 1.05 rad that the value of H(z) matches G(s)|s=j20π.

In general, for any value of fm < Fs2, fm is a matching frequency when the bilinear uses Eq. (3.82).    

Figure 3.45 is the equivalent of Figure 3.44 for scenarios of bilinear use in which the goal is to match a single frequency and a continuous-time system function G(s) is provided.

PIC

Figure 3.45: Steps for matching a single frequency ωm using the bilinear transformation when a continuous-time system function G(s) and Fs are provided.

Similar to what was done starting from Eq. (3.80), Eq. (3.75) can also be used to find F s that maps a specific pair Ωd and ωa as follows:

F s = ωa 2tan (Ωd 2 ) .
(3.84)

Adapting Eq. (3.56) to the current notation, the goal of pre-warping a single frequency is to obtain:

Hz(ejωdTs ) Hs(ωa).
(3.85)

over the first Nyquist zone (see Section 3.5.7.0).

Some extra examples of the bilinear transform are discussed in the sequel.

Example 3.34. Pre-warping for matching a single frequency applied to the system of Example 3.27. Matching a single frequency using the bilinear function is easily done in Matlab/Octave. For example, the change in frequency of the pole at ωa = 20 rad/s in Figure 3.40 can be avoided using [Hz_num, Hz_den] = bilinear(Hs_num, Hs_den, Fs, 20/(2*pi)) instead of [Hz_num, Hz_den] = bilinear(Hs_num, Hs_den, Fs). Figure 3.46 illustrates the result of pre-warping. Note that, because in this case Hs(s) is already given, only for a single frequency the bilinear can achieve ωa = ωd, while all others are non-linearly shifted.

PIC

Figure 3.46: Version of Figure 3.40 for which bilinear used pre-warping for obtaining ωa = ωd = 20 rad/s.

In this example, there was a single frequency of interest to be matched. If there are several frequencies of interest, they all need to be pre-warped, before the design of H(s).    

Example 3.35. Design an IIR filter by matching a single frequency. The task here is the same as in Example 3.30: design a second-order digital lowpass filter with a 3-dB cutoff frequency of π4 rad by using the bilinear transformation on the prototype filter H(s) = 1(s2 + 2s + 1). There is a single frequency ωm to be matched, which is the cuttof frequency of H(s). The behavior of H(s) at ωm should match the behavior at Ωm = π4 of H(z). Using Eq. (3.84) to match these frequencies leads to F s = 1(2tan (π8)) 10.8284 1.2071 Hz. Using Eq. (3.64) leads to

H(z) = 1 (2×1.2071(z1) z+1 ) 2 + 2 (2×1.2071(z1) z+1 ) + 1 0.0976 + 0.1953z1 + 0.0976z2 1 0.9428z1 + 0.3333z2 .

Using Matlab, the following commands implements this shortcut:

1Fs = 1/(2*tan(pi/8)); [Bz,Az]=bilinear(1,[1 sqrt(2) 1],Fs)

which does not explicitly use pre-warping in the bilinear function, but incorporates it on the choice of F s.   

Example 3.36. Pre-warped bilinear applied to a first-order system. Table 3.6 summarized several methods to convert a first-order H(s) into H(z). Here we extend this table by creating Table 3.8, which incorporates the pre-warped bilinear transformation.

Table 3.8: Pre-warped bilinear as a method to convert H(s) into H(z).
Method
Mapping
H(z) when
H(s) = a s+a
Bilinear s = 2 Ts (1z1 1+z1 ) a 2 Ts (1z1 1+z1 )+a
Pre-warped bilinear
s = 2 Ts (1z1 1+z1 ) and
tan (aTs 2 ) ( 1z1 1+z1 )+tan (aTs 2 )
ωa = 2 Ts tan (Tsωd 2 )

The bilinear with pre-warping in Table 3.8 is based on first modifying H(s) using Eq. (3.77). In other words, the pole with cutoff frequency ωc = a in H(s) is pre-warped to obtain ωd = a in the end, after the conversion using bilinear. This is done with ωa = (2Ts)tan (Tsa2) and frequency scaling, substituting s by sωa. This leads to

H(s) = 2 Ts tan (aTs 2 ) s + 2 Ts tan (aTs 2 ) .

Applying the bilinear mapping to this H(s) leads to the result in Table 3.6.

An alternative shortcut is to use Eq. (3.83) with ωm = a rad/s as the “matching frequency”. This also leads to the result in Table 3.6    

3.13.3  Bilinear for mimicking G(s)

In the following discussion, G(s) is already provided and the bilinear should be used to transform it, or a scaled version of G(s), into H(z). An example of application is the task of obtaining a discrete-time version H(z) of a given continuous-time controller G(s) that is applied to a plant. In this case, the sampling frequency can be chosen according, e. g., to the sampling theorem (Eq. (1.30)).

Consider a control system (see [ url3pid]) that uses a PID controller given by

G(s) = 100 + 200 s + 10s.

The dominant pole of the plant P(s) to be controlled33 is s = 2, which suggests a settling time of approximately 2 seconds. Therefore, the sampling frequency is chosen as Fs = 20 Hz, which is fast enough when compared to the time constants involved in the dynamics of G(s). Using bilinear transformation, the digital version of this PID controller is

H(z) = 505z2 790z + 305 z2 1 ,

which should be adjusted for the task of automatic control until the system presents good behavior in closed loop.

In the case of mimicking G(s), there is not a small set of frequencies of interest as in IIR filter design. The most effective strategy to improve the bilinear transformation and better mimic G(s) is to increase Fs to reach a good approximation in Eq. (3.70).