7. Digital Filters Flashcards

1
Q

What is an FIR filter?

A

An FIR filter is a linear discrete-time system with an impulse response of finite length.

(p. 185 - 186)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which difference equation describes a causal time-invariat FIR filter? What is parameter bn called?

A

A causal time-invariant FIR filter of order N can be described by a difference equation of the type of equation 7.1. Parameters bn are called filter coefficients or filter weights.

(p. 186)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does an FIR filtering operation come down to?

A

An FIR filtering operation comes down to performing a discrete linear convolution of input signal x[k] and the filter coefficients bk. Observe that equation 7.1 can be directly implemented on a microprocessor as it merely requires multiplications, additions and access to (past) input samples.

(p. 187)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why are digital filtering and windowing considered opposite operations?

A

Whereas digital filtering comes down to a discrete linear convolution in the time domain, and hence, to a multiplication in the frequency domain, windowing requires a multiplication in the time domain, and therefore performs a convolution in the frequency domain.

(p. 187)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the length of the impulse response of an N-th order FIR filter?

What are the impulse response parameters?

A

The length of the impulse response of an N-th order FIR filter is N + 1. Note that the impulse response parameters of an FIR filter are equal to the filter coefficients.

(p. 187)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can an FIR filter be described in the z-domain?

A

A causal time-invariant FIR filter of order N can be described in the z-domain by the transfer function of equation 7.4.

(p. 187)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the stability of FIR filters?

A

As the poles of an FIR filter are all in the origin of the complex plane, FIR filters are always stable, whatever the filter coefficients bn.

(p. 188)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the frequency response of an FIR filter?

A

The frequency response can be obtained from the transfer function by replacing z with e^j2πφ.

(p. 188)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a linear-phase filter?

A

An additional advantage of FIR filters over IIR filters is that they can be designed to offer a linear phase response, and this without loss of generality as far as the magnitude response is concerned. A filter is said to have linear phase if the phase response can be expressed as

      formula 7.7

with γ and δ constant numbers, independent of φ.

(p. 189)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why are linear-phase filters desired in many applications?

A

In case signal x[k] is input into a linear-phase filter all the frequency components of x[k] DTFT ←→ Xd(φ) that are in the passband of the filter are delayed by the same amount of time. If the phase response is nonlinear, however, some frequency components are delayed more than others. This introduces phase distortion and can hence severely alter the waveform of the signal.
(p. 190 - 192)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many types of linear-phase filters are there and why?

A

Linear-phase filters can be obtained by imposing symmetry on the impulse response. This gives rise to four types of linear-phase filters, by varying the type of symmetry of the impulse response (even/odd) and the filter length (even/odd). Keep in mind that not all FIR filters have linear phase. Only if there is symmetry in the impulse response the FIR filter has linear phase.

(p. 193)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which steps are performed when designing an FIR filter with the windowing method?

Make sure that you understand and can reproduce figure 7.5. You are not supposed to be able to replicate the values on the vertical axes.

How does one impose linear phase?

A

The basic idea behind the windowing method is to start from a desired frequency response Hideal(φ) and then find the corresponding set of filter coefficients that implement Hideal(φ). The coefficients of an FIR filter can be directly derived from the impulse response. Hence, it follows that the required filter coefficients can be obtained as the inverse discrete-time Fourier transform (IDTFT) of Hideal(φ).

Observe that there are two problems with hideal[k]. First of all, the filter is infinitely long. This means that an infinite number of calculations are required for each output sample. It is common practice to cut off the ”tails” of the sinc. This can be achieved by setting hideal[k] to zero for values of |k| that are larger than a well chosen threshold L.

A second problem is that the (length-restricted) impulse response hideal[k] is non-causal. Non-causal filters cannot be employed in real-time applications as the calculation of y[k] would require future sample values. The length-restricted sinc-like impulse response needs to be made causal. This can be done by shifting all 2L + 1 filter coefficients by L positions to the right, i.e. by delaying the filter by L sample instances.

Delaying the impulse response by L time lags is equivalent to a multiplication of the frequency response by e^-j2πφL. This leaves the magnitude response unchanged, but adds a linear term to the phase. Because the phase of Hideal(φ) is often arbitrarily set to zero as in figure 7.4, a linear-phase filter is obtained in this way.

(p. 193 - 195)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the Gibbs phenomenon?

How does it affect the frequency characteristics of the filter?

A

The cutting off of the ”tails” of the sinc leads to the well-known Gibbs phenomenon. This means that:

  • a ripple appears in the passband of the filter, i.e. the gain in the passband is no longer constant and equal to 1
  • a ripple appears in the stopband of the filter, i.e. unlike with Hideal(φ), the gain in the stopband is non-zero
  • a transition band with bandwidth BW is created between passband and stopband

(p. 195/197)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What do passband, stopband, transition band, passband ripple, stopband ripple, stopband attenuation, transition bandwidth, passband edge and stopband edge mean?

A

See figure 7.6.

p. 197

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the effect of using a windowing function other than the rectangular window on the passband and stopband ripple and on the transition bandwidth of the filter?
What does table 7.2 tell?
What happens if the filter order is increased?

A

Increasing the filter order apparently concentrates the ripple around the passband and stopband edge, but neither eliminates the ripple nor reduces the peak value of the ripple. Passband ripple, stopband ripple and transition bandwidth can be traded off against each other by applying other, non-rectangular windowing functions. Passband ripple and stopband attenuation levels can only be reduced by applying a smoother windowing function.

(p. 198 - 199/202)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can we form other filters with the windowing method? (highpass, bandpass, bandstop)

A

The windowing method can also be applied to design filters that are not of the lowpass type. Basically, a highpass filter can be implemented as ”1 minus lowpass”, a bandpass filter as a ”lowpass with high cutoff minus lowpass with low cutoff” and a bandstop filter as ”1 minus bandpass”.

(p. 199 - 200)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which steps are performed when designing an FIR filter with the frequency sampling method?

Make sure that you understand and can reproduce figure 7.11. You are not supposed to be able to replicate the values on the vertical axes.

A

The idea is to specify a desired response Hdes(φ), to discretize (sample) this response in the frequency domain, and then to do a back transformation into the time domain with the inverse discrete Fourier transform (IDFT) or, equivalently, with the inverse FFT.

More specifically, the following processing steps are performed:

  • First, the desired frequency response Hdes(φ) is given the correct symmetry so that a real-valued impulse response is obtained.
  • Next, the desired frequency response is discretized through equidistant sampling in the frequency domain.
  • The discretized frequency response HN¯ [n] is back transformed into the time domain using the inverse discrete Fourier transform (IDFT), or a fast implementation thereof such as the real-
    output inverse FFT algorithm.

(p. 201 - 202/204)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which three major problems occur with the frequency sampling design method and how are they dealt with? Explain in words.

A
  1. The approach works fine as long as both the magnitude and the phase response are known. Most often only the magnitude response is given. The most straightforward choice is to set the phase response to zero (or to 180◦) such that Hdes(φ) becomes a real-valued (and positive) function of φ.
  2. The characteristics of Hdes(φ) at frequencies that fall in between the frequency sampling points φ = n/N¯, n ∈ Z are not taken into account. It is therefore mandatory to check the frequency response of the resulting filter h[k] at frequencies φ other than the sampling points to ensure that the real response does not divert too much from the desired response. This can be done by computing the discrete-time Fourier transform (DTFT) of h[k], or by zero-padding h[k] and then computing the discrete Fourier transform (DFT) of the zero-padded sequence.
  3. By using the (inverse) discrete Fourier transform both the time and the frequency domain signal and the inverse transform sequence are discrete and periodic. Hence, hN¯ [k] is an infinitely long, periodic, non-causal impulse response, which is not implementable in practice. To obtain a finite and causal set of N¯ filter coefficients bk, one period is selected from hN¯ [k], i.e. bk = h[k] = hN¯ [k] for 0 ≤ k < N¯. In this way, implicitly all other coefficients of hN¯ [k] are set to zero, i.e. bk = h[k] = 0 for k < 0 and k ≥ N¯. In practice, the N¯ filter coefficients bk are simply obtained by calculating the inverse DFT of HN¯ [n].
    (p. 204)
19
Q

Why does a filter designed with the frequency sampling method show the same deficiencies as the filters designed with the windowing method, i.e. ripple in passband and stopband and a transition band?

A

Remark that the effect of selecting one period out of signal hN^(c)(t) is that the Dirac impulses of HN^(c)(f) are interpolated. This results in a rippled filter response Hd^(c).

(p. 204 - 205)

20
Q

What is the final result of the frequency sampling method?

A

Keep in mind that the frequency response of a filter designed with the frequency sampling method coincides with the desired response at the frequency sampling points f = nfs/N and interpolates and ripples in between.

(p. 205)

21
Q

How can the amount of ripple be reduced when applying the frequency sampling design method?

A
  1. Delay the impulse response hN^(c) (t), typically by half a period ∆t = N¯/2fs. This results in a linear phase shift, but does not alter the magnitude response. If hN^(c) (t) is delayed by half a period the larger samples are usually in the middle of the response. This leads to a smoother transition around k = 0 and k = N¯ − 1, and to a better approximation of the desired sinc-like impulse response (see figure 7.4), hence offering a reduced amount of passband and stopband ripple.
  2. Different windowing functions can be applied to trade off passband and stopband ripple against transition bandwidth. If a smooth windowing function is applied, the discontinuities at the beginning and at the end of the impulse response are brought to zero, which reduces the amount of ripple.
  3. An effective way to reduce ripple is to avoid desired responses Hdes(φ) with small transition bands. Specifying a desired frequency response with less abrupt transitions between passband and stopband.
  4. If the frequency response of the resulting filter oscillates too heavily between the grid points n/N¯, one solution is to increase filter length N¯ , i.e. to add more frequency sampling points. The filter response is forced to more closely track Hdes(φ). An increased filter length results in a better approximation of the desired response, and hence, in a smaller transition bandwidth.
    (p. 205 - 209)
22
Q

Explain in a few words on which principles the least-squares filter design method is based.

The cost function can be found in the formulary.

A

It is based on coefficient optimization. The idea is to find a suitable set of filter coefficients b0, . . . , bN that offer a frequency response H(φ) that is as close as possible to a predefined desired response Hdes(φ). To obtain such a set of ’optimal’ filter coefficients a cost function is defined that is minimized using optimization techniques.

Often one is only interested in letting the magnitude response |H(φ)| of the filter match a predefined response and is not concerned about the phase response.
As the phase response is not specified, and can hence take on whatever form that is required to minimize J, typically, a better approximation is obtained for |Hdes(φ)| with 7.24 than with equation 7.22.

(p. 209)

23
Q

Explain in a few words on which principles the equiripple filter design method is based.

The cost function can be found in the formulary.

A

The largest ripple peaks are typically observed near the passband and stopband edges. So-called optimal or equiripple filter design methods try to distribute the ripple uniformly over passband and stopband. Recall that the ripple in fact reflects the error between the real and the desired response. Distributing the error evenly over passband and stopband often leads to a more desirable response.

Equiripple filter design is based on minimax optimization10, i.e. one tries to minimize a cost function of the type

         formula 7.25

first the maximum (frequency-weighted) absolute error is found along the fundamental
interval, and then this maximum error is minimized.

(p. 210)

24
Q

What are the disadvantages of a long FIR filter?

A
  • Long filters are needed to realize a highly selective filter, i.e. a filter with a sharp frequency response, e.g. a filter response with a small transition bandwidth or a lowpass filter with a low cut-off frequency.
  • Because the filter length is large typically, in general, the implementation cost is high unless fast convolution types of techniques are employed (see section 8.2.2).
  • A long filter consumes a lot of memory : an FIR filter of order N requires access to N + 1 filter coefficients and N (past) data samples in memory.
  • Long filters introduce long processing delays, which can be a disadvantage in some (real-time) applications.
    (p. 213)
25
Q

Have a look at the summary of the advantages and disadvantages of FIR filters.

A

(p. 212 - 213)

26
Q

What is an IIR filter?

A

An IIR filter is a linear discrete-time system with an impulse response that is infinitely long.

(p. 214)

27
Q

How is an IIR filter described?

A

A causal time-invariant IIR filter of order max(M, N) can be described by difference equation 7.27. Parameters am and bn are called filter coefficients or filter weights.

(p. 214)

28
Q

What does IIR filtering come down to?

A

IIR filtering comes down to the calculation of two discrete convolution operations, which can be easily implemented on a microprocessor as they only require multiplications, additions and access to (past) input and output samples.

(p. 214)

29
Q

What is the difference with an FIR filter?

A

Unlike with an FIR filter, the impulse response parameters of an IIR filter cannot be straightforwardly derived from the difference equation.

(p. 215)

30
Q

How can an IIR filter be described in the z-domain?

A

A causal time-invariant IIR filter of order max(M, N) can be described in the z-domain by the transfer functions of equations 7.28 and 7.29.

(p. 215)

31
Q

What is the difference with FIR filters when it comes to the order?

A

Whereas it is common practice to use FIR filters of several hundreds or thousands of filter weights, the order of most IIR filters is relatively low, typically below 10.

(p. 215)

32
Q

At the exam you may be asked to convert a transfer function (such as equation 7.30) into a difference equation (such as equation 7.31) and vice versa.

A

A term z^−K in the numerator of the transfer function comes down to a K-fold delay of the input signal x[k]. A term z^−K in the denominator delays the output y[k] by K time lags.

(p. 215)

33
Q

Make sure you can calculate the poles and the zeros of a transfer function and can comment on the stability of the filter.

A

The poles and the zeros of an IIR filter are the roots of the denominator and the numerator polynomial of equation 7.29, respectively.

A causal IIR filter is stable only as long as all the poles are inside the unit circle.

(p. 216 - 217)

34
Q

What is the difference with FIR filters when it comes to stability?

A

Unlike their FIR counterparts, IIR filters are not guaranteed to be stable.

(p. 217)

35
Q

What is a minimum-phase filter?

A

In some applications causal filters are preferred for which not only all the poles, but also all the zeros are inside the unit circle. They are called minimum-phase filters.

(p. 218)

36
Q

What is an all-pole or autoregressive filter?

A

The subclass of IIR filters with only one term in the numerator of the transfer function have all the zeros in the origin of the complex plane. They are commonly called all-pole filters or autoregressive filters.

(p. 218)

37
Q

What is an autoregressive signal? Give a practical example.

A

Autoregressive signals are signals for which all samples y[k] can be written as a linear combination of M previous samples plus some (often unknown) (zero-mean) white noise n[k]:

     formula 7.44

An example of a (nearly) autoregressive signal is speech.

(p. 218)

38
Q

What is linear prediction? Give a practical application.

A

Trying to estimate (future) signal samples by making linear combinations of previous data is called linear prediction. Linear prediction is the basis of many state-of-the-art speech compression techniques.

(p. 218)

39
Q

How does one obtain the frequency response of a stable IIR filter?

A

The frequency response of a stable IIR filter can be obtained from the transfer function by replacing z with e^j2πφ.

(p. 219)

40
Q

What is the difference with FIR filter when it comes to the phase response?

A

Unlike FIR filters, (stable causal) IIR filters always have a nonlinear phase response.

(p. 220)

41
Q

What is a Butterworth, a Chebyshev-I, Chebyshev-II and an elliptic filter? Explain in words or with a plot.

A
  • the Butterworth response, which offers a maximally flat response, with a magnitude that changes monotonically with frequency, showing no ripple, neither in the passbands, nor in the stopbands. The higher the order of the response, the faster is the transition between passbands and stopbands.
  • the Chebyshev-I response, which shows a magnitude that changes monotonically with frequency in the stopbands, but offers a uniform ripple (equiripple) in the passbands. The higher the filter order, the faster the magnitude response changes/decreases in the stopbands and the transition bands. A Chebyshev-I response is characterized by the filter type (lowpass, highpass, …), the order of the filter, the cut-off frequency/ies, the overall gain and the peak-to-peak passband ripple Ap^(t). Common values of Ap^(t) are between 0.01 dB and 3 dB.
  • the Chebyshev-II or inverse Chebyshev response, showing a magnitude that changes monotonically with frequency in the passbands and offering a uniform ripple in the stopbands. The higher the filter order, the faster is the transition between passbands and stopbands. The stopband ripple is controlled through the stopband attenuation As, defined in figure 7.6. Typical values of As are between 30 dB and 80 dB.
  • the elliptic or Cauer response, offering a magnitude with uniform ripple both in passbands and stopbands. The higher the filter order, the smaller are the transition bands. Elliptic responses are characterized by the filter type (lowpass, highpass, …), the filter order, the cut-off frequency/ies, the overall gain, the (peak-to-peak) passband ripple Ap^(t) and the stopband attenuation As. Elliptic filters are optimal in the sense that they generally offer the lowest-order solution for a given set of specifications.

OR see figure 7.22

(p. 220 - 221)

42
Q

Explain in a few words on which principles the bilinear transformation method is based.
What is frequency warping?

The formula can be found in the formulary.

A

It is related to the elementary discretization rule. The bilinear transformation makes use of a more advanced integration rule, the so-called trapezoid rule. It estimates the area using a trapezoid, this is illustrated in figure 7.23.

IIR filter design based on bilinear transformation consists in first finding an analog filter with the desired frequency response and then replacing all the analog differentiators with discrete differentiators following the trapezoid rule, i.e. using equation 7.58. This comes down to substituting the Laplace variable s in the transfer function Ha(s) of the analog filter for the following expression in z.

The above equation shows that frequencies −∞ < fc < ∞ in the analog domain are mapped onto the fundamental interval −1/2 < φc < 1/2 in a nonlinear way. This nonlinear mapping is referred to as frequency warping. Some implementations of the bilinear transformation design method make use of this mapping.

(p. 222 - 225)

43
Q

Have a look at the summary of the advantages and disadvantages of IIR filters.

A

(p. 226)