Skip to content

5.7 DIGITAL [PROCESSING OF](#page-11-0) ANALOG SIGNALS

← Back to LINEAR SYSTEMS AND SIGNALS Overview

5.7 DIGITAL PROCESSING OF ANALOG SIGNALS

An analog (meaning continuous-time) signal can be processed digitally by sampling the analog signal and processing the samples by a digital (meaning discrete-time) processor. The output of the processor is then converted back to analog signal, as shown in Fig. 5.24a. We saw some simple cases of such processing in Exs. 3.8, 3.9, 5.14, and 5.15. In this section, we shall derive a criterion for designing such a digital processor for a general LTIC system.

Suppose that we wish to realize an equivalent of an analog system with transfer function Ha(s), shown in Fig. 5.24b. Let the digital processor transfer function in Fig. 5.24a that realizes this desired Ha(s) be H[z]. In other words, we wish to make the two systems in Fig. 5.24 equivalent (at least approximately).

By “equivalence” we mean that for a given input x(t), the systems in Fig. 5.24 yield the same output y(t). Therefore, y(nT), the samples of the output in Fig. 5.24b, are identical to y[n], the output of H[z] in Fig. 5.24a.

Figure 5.24 Analog filter realization with a digital filter.

548 CHAPTER 5 DISCRETE-TIME SYSTEM ANALYSIS USING THE Z-TRANSFORM

For the sake of generality, we are assuming a noncausal system. The argument and the results are also valid for causal systems. The output y(t) of the system in Fig. 5.24b is

y(t)=x(τ)ha(tτ)dτ=limΔτ0m=x(mΔτ)ha(tmΔτ)Δτy(t) = \int_{-\infty}^{\infty} x(\tau)h_a(t-\tau) d\tau = \lim_{\Delta \tau \to 0} \sum_{m=-\infty}^{\infty} x(m\Delta \tau)h_a(t-m\Delta \tau) \Delta \tau

For our purpose, it is convenient to use the notation T for τ . Assuming T (the sampling interval) to be small enough, such a change of notation yields

y(t)=Tm=x(mT)ha(tmT)y(t) = T \sum_{m=-\infty}^{\infty} x(mT)h_a(t - mT)

The response at the nth sampling instant is y(nT) obtained by setting t = nT in the equation is

y(nT)=Tm=x(mT)ha[(nm)T]y(nT) = T \sum_{m=-\infty}^{\infty} x(mT)h_a[(n-m)T]

\n(5.42)

In Fig. 5.24a, the input to H[z] is x(nT) = x[n]. If h[n] is the unit impulse response of H[z], then y[n], the output of H[z], is given by

y[n]=m=x[m]h[nm]y[n] = \sum_{m = -\infty}^{\infty} x[m]h[n-m]

\n(5.43)

If the two systems are to be equivalent, y(nT) in Eq. (5.42) must be equal to y[n] in Eq. (5.43). Therefore,

h[n]=Tha(nT)(5.44)h[n] = Th_a(nT) \tag{5.44}

This is the time-domain criterion for equivalence of the two systems.† According to this criterion, h[n], the unit impulse response of H[z] in Fig. 5.24a, should be T times the samples of ha(t), the unit impulse response of the system in Fig. 5.24b. This is known as the impulse invariance criterion of filter design.

Strictly speaking, this realization guarantees the output equivalence only at the sampling instants, that is, y(nT) = y[n], and that also requires the assumption that T → 0. Clearly, this criterion leads to an approximate realization of Ha(s). However, it can be shown that when the frequency response of |Ha(jω)| is bandlimited, the realization is exact [2], provided the sampling rate is high enough to avoid any aliasing (T < 1/2fh).

REALIZATION OF RATIONAL H(s)

If we wish to realize an analog filter with transfer function

Ha(s)=csλH_a(s) = \frac{c}{s - \lambda}

Because T is a constant, some authors ignore the factor T, which yields a simplified criterion h[n] = ha(nT). Ignoring T merely scales the amplitude response of the resulting filter.

The impulse response h(t), given by the inverse Laplace transform of Ha(s), is

ha(t)=ceλtu(t)h_a(t) = ce^{\lambda t}u(t)

The corresponding digital filter unit impulse response h[n], per Eq. (5.44), is

h[n]=Tha(nT)=TcenλTh[n] = Th_a(nT) = Tce^{n\lambda T}

Figure 5.25 shows ha(t) and h[n]. The corresponding H[z], the z-transform of h[n], as found from Table 5.1, is

H[z]=TczzeλTH[z] = \frac{Tcz}{z - e^{\lambda T}}

\n(5.45)

Figure 5.25 Impulse response for analog and digital systems in the impulse invariance method of filter design.

No.Ha(s)ha(t)h[n]H[z]
1KKδ(t)TKδ[n]TK
21
s
u(t)Tu[n]Tz
z−1
31
s2
tnT2T2z
(z−1)2
41
s3
2
t
2
k2T3
2
T3z(z
+1)
2(z−1)3
51
s −λ
eλtTeλnTTz
z−eλT
61
(s −λ)2
teλtnT2eλnTT2zeλT
(z−eλT )2
7As+B
s2+2as+c
Tre−at cos(bt+θ
)
Tre−anT cos(bnT+θ
)
Trz[z cos θ −e−aT cos(bT−θ
)]
z2−(2e−aT cos
bT)z+e−2aT
r =
A2c+B2 −2ABa
,
c−a2
b = √
θ = tan−1
c−a2,
Aa−B

c−a2
A

TABLE 5.3 Select Impulse-Invariance Pairs

The procedure of finding H[z] can be systematized for any Nth-order system. First we express an Nth-order analog transfer function Ha(s) as a sum of partial fractions as‡

Ha(s)=i=1ncisλiH_a(s) = \sum_{i=1}^n \frac{c_i}{s - \lambda_i}

Then the corresponding H[z] is given by

H[z]=Ti=1ncizzeλiTH[z] = T \sum_{i=1}^{n} \frac{c_i z}{z - e^{\lambda_i T}}

This transfer function can be readily realized, as explained in Sec. 5.4. Table 5.3 lists several pairs of Ha(s) and their corresponding H[z]. For instance, to realize a digital integrator, we examine its Ha(s) = 1/s. From Table 5.3, corresponding to Ha(s) = 1/s (pair 2), we find H[z] = Tz/(z − 1). This is exactly the result we obtained in Ex. 3.9 using another approach.

Note that the frequency response Ha(jω) of a practical analog filter cannot be bandlimited. Consequently, all these realizations are approximate.

CHOOSING THE SAMPLING INTERVAL T

The impulse-invariance criterion (5.44) was derived under the assumption that T → 0. Such an assumption is neither practical nor necessary for satisfactory design. Avoiding of aliasing is the most important consideration for the choice of T. In Eq. (5.39), we showed that for a sampling interval T seconds, the highest frequency that can be sampled without aliasing is 1/2T Hz or π/T radians per second. This implies that Ha(jω), the frequency response of the analog filter in Fig. 5.24b should not have spectral components beyond frequency π/T radians per second. In other words, to avoid aliasing, the frequency response of the system Ha(s) must be bandlimited to π/T radians per second. We shall see later in Ch. 7 that frequency response of a realizable LTIC system cannot be bandlimited; that is, the response generally exists for all frequencies up to ∞. Therefore, it is impossible to digitally realize an LTIC system exactly without aliasing. The saving grace is that the frequency response of every realizable LTIC system decays with frequency. This allows for a compromise in digitally realizing an LTIC system with an acceptable level of aliasing. The smaller the value of T, the smaller the aliasing, and the better the approximation. Since it is impossible to make |Ha(jω)| zero, we are satisfied with making it negligible beyond the frequency π/T. As a rule of thumb [3], we choose T such that |Ha(jω)| at the frequency ω = π/T is less than a certain fraction (often taken as 1%) of the peak value of |Ha(jω)|. This ensures that aliasing is negligible. The peak |Ha(jω)| usually occurs at ω = 0 for lowpass filters and at the band center frequency ω*c* for bandpass filters.

Assuming Ha(s) has simple poles. For repeated poles, the form changes accordingly. Entry 6 in Table 5.3 is suitable for repeated poles.

EXAMPLE 5.16 Butterworth Filter Design by the Impulse-Invariance Method

Design a digital filter to realize a first-order lowpass Butterworth filter with the transfer function

Ha(s)=ωcs+ωcωc=105(5.46)H_a(s) = \frac{\omega_c}{s + \omega_c} \qquad \omega_c = 10^5 \tag{5.46}

For this filter, we find the corresponding H[z] according to Eq. (5.45) (or pair 5 in Table 5.3) as

H[z]=ωcTzzeωcTH[z] = \frac{\omega_c T z}{z - e^{-\omega_c T}}

\n(5.47)

Next, we select the value of T by means of the criterion according to which the gain at ω = π/T drops to 1% of the maximum filter gain. However, this choice results in such a good design that aliasing is imperceptible. The resulting amplitude response is so close to the desired response that we can hardly notice the aliasing effect in our plot. For the sake of demonstrating the aliasing effect, we shall deliberately select a 10% criterion (instead of 1%). We have

Ha(jω)=ωcω2+ωc2|H_a(j\omega)| = \left|\frac{\omega_c}{\sqrt{\omega^2 + \omega_c^2}}\right|

In this case |Ha(jω)|max = 1, which occurs at ω = 0. Use of 10% criterion leads to |Ha(π/T)| = 0.1. Observe that

Ha(jω)ωcωωωc|H_a(j\omega)| \approx \frac{\omega_c}{\omega} \qquad \omega \gg \omega_c

Hence,

Ha(π/T)ωcπ/T=0.1π/T=10ωc=106|H_a(\pi/T)| \approx \frac{\omega_c}{\pi/T} = 0.1 \quad \Longrightarrow \quad \pi/T = 10\omega_c = 10^6

Thus, the 10% criterion yields T = 10−6π. The 1% criterion would have given T = 10−7π. Substitution of T = 10−6π in Eq. (5.47) yields

H[z]=0.3142zz0.7304H[z] = \frac{0.3142z}{z - 0.7304}

\n(5.48)

A canonical realization of this filter is shown in Fig. 5.26a.

To find the frequency response of this digital filter, we rewrite H[z] as

H[z]=0.314210.7304z1H[z] = \frac{0.3142}{1 - 0.7304z^{-1}}

Therefore,

H[ejωT]=0.314210.7304ejωT=0.3142(10.7304cosωT)+j0.7304sinωTH[e^{j\omega T}] = \frac{0.3142}{1 - 0.7304e^{-j\omega T}} = \frac{0.3142}{(1 - 0.7304 \cos \omega T) + j0.7304 \sin \omega T}

Figure 5.26 An example of filter design by the impulse-invariance method: (a) filter realization, (b) amplitude response, and (c) phase response.

The corresponding magnitude response is

H[ejωT]=0.3142(10.7304cosωT)2+(0.7304sinωT)2|H[e^{j\omega T}]| = \frac{0.3142}{\sqrt{(1 - 0.7304 \cos \omega T)^2 + (0.7304 \sin \omega T)^2}} =0.31421.5331.4608cosωT= \frac{0.3142}{\sqrt{1.533 - 1.4608 \cos \omega T}}

(5.49)

5.7 Digital Processing of Analog Signals 553

and the phase response is

H[ejωT]=tan1(0.7304sinωT10.7304cosωT)\angle H[e^{j\omega T}] = -\tan^{-1}\left(\frac{0.7304 \sin \omega T}{1 - 0.7304 \cos \omega T}\right)

(5.50)

This frequency response differs from the desired response Ha(jω) because aliasing causes frequencies above π/T to appear as frequencies below π/T. This generally results in increased gain for frequencies below π/T. For instance, the realized filter gain at ω = 0 is H[ej0] = H[1]. This value, as obtained from Eq. (5.48), is 1.1654 instead of the desired value 1. We can partly compensate for this distortion by multiplying H[z] or H[ejω*T* ] by a normalizing constant K = Ha(0)/H[1] = 1/1.1654 = 0.858. This forces the resulting gain of H[ejω*T* ] to be equal to 1 at ω = 0. The normalized Hn[z] = 0.858H[z] = 0.858(0.1πz/(z−0.7304)). The amplitude response in Eq. (5.49) is multiplied by K = 0.858 and plotted in Fig. 5.26b over the frequency range 0 ≤ ω ≤ π/T = 106. The multiplying constant K has no effect on the phase response in Eq. (5.50), which is shown in Fig. 5.26c.

Also, the desired frequency response, according to Eq. (5.46) with ω*c* = 105, is

Ha(jω)=ωcjω+ωc=105jω+105H_a(j\omega) = \frac{\omega_c}{j\omega + \omega_c} = \frac{10^5}{j\omega + 10^5}

Therefore,

Ha(jω)=105ω2+1010andHa(jω)=tan1ω105|H_a(j\omega)| = \frac{10^5}{\sqrt{\omega^2 + 10^{10}}} \quad \text{and} \quad \angle H_a(j\omega) = -\tan^{-1}\frac{\omega}{10^5}

This desired amplitude and phase response are plotted (dotted) in Figs. 5.26b and 5.26c for comparison with realized digital filter response. Observe that the amplitude response behavior of the analog and the digital filter is very close over the range ω ≤ ω*c* = 105. However, for higher frequencies, there is considerable aliasing, especially in the phase spectrum. Had we used the 1% rule, the realized frequency response would have been closer over another decade of the frequency range.

IMPULSE INVARIANCE BY MATLAB

We can readily use the MATLAB impinvar command to confirm our digital filter designed by the impulse-invariance method.

>> omegac = 10^5; Ba = [omegac]; Aa = [1 omegac]; Fs = 10^6/pi;
>> [B,A] = impinvar(Ba,Aa,Fs)
B = 0.3142
A = 1.0000 -0.7304

This confirms our earlier result of Eq. (5.48) that the digital filter transfer function is

H[z]=0.3142zz0.7304H[z] = \frac{0.3142z}{z - 0.7304}

DR ILL 5.22 Filter Design by the Impulse-Invariance Method

Design a digital filter to realize an analog transfer function

Ha(s)=20s+20H_a(s) = \frac{20}{s+20}

ANSWER

H[z] = 20Tz ze−20*T* with T = π 2000