• Home
  • Textbooks
  • Fundamentals of Signals and Systems Using the Web and MATLAB
  • Design of Digital Filters and Controllers

Fundamentals of Signals and Systems Using the Web and MATLAB

Bonnie S. Heck, Edward W. Kamen

Chapter 10

Design of Digital Filters and Controllers - all with Video Answers

Educators


Chapter Questions

Problem 1

Determine an appropriate sampling frequency that avoids aliasing for the following signals:
(a) $x(t)=3 \operatorname{sinc}^2(t / 2 \pi),-\infty<t<\infty$
(b) $x(t)=4 \operatorname{sinc}(t / \pi) \cos 2 t,-\infty<t<\infty$
(c) $x(t)=e^{-5 t} u(t)$

Check back soon!

Problem 2

Digitize the following systems by using the bilinear transformation. Assume that $T=$ 0.2 second.
(i) $H(s)=2 /(s+2)$
(ii) $H(s)=4(s+1) /\left(s^2+4 s+4\right)$
(iii) $H(s)=2 s /\left(s^2+1.4 s+1\right)$
(a) For each continuous-time system, simulate the step response, using step.
(b) For each discrete-time system derived in part (a), simulate the step response, using dstep. Compare these responses, $y[n]=y(n T)$, with the corresponding responses $y(t)$ obtained in part (a) by plotting the results.

Check back soon!

Problem 3

The bilinear transformation was introduced in (10.23) as a means of approximating the exact mapping $s=(1 / T) \ln (z)$. An alternative derivation for the bilinear transformation involves the trapezoidal approximation of an integral, as follows:
$$
\int_{n T}^{(n+1) T} f(t) d t \approx \frac{T}{2}[f([n+1] T)+f(n T)]
$$

Here, the right-hand side of the expression represents the area of the trapezoid that best fits under the curve $f(t)$ from $t=n T$ to $t=(n+1) T$. (See Figure P10.3.) Now consider a first-order continuous-time system:
$$
H(s)=\frac{Y(s)}{X(s)}=\frac{a}{s+a}
$$
Figure Can't Copy
To derive the bilinear transformation, perform the following steps: (1) Find the differential equation that relates the input $x(t)$ to the output $y(t)$; (2) integrate both sides of the differential equation from $t=n T$ to $t=(n+1) T$, using the trapezoidal approximation where appropriate;(3) obtain a corresponding difference equation by letting $y[n]=y(n T)$ and $x[n]=x(n T) ;(4)$ compute the digital transfer function $H_d(z)$ of the difference equation; and (5) find a relationship between $s$ and $z$ so that $H(s)=H_d(z)$.

Check back soon!
01:03

Problem 4

Consider the sampled data system shown in Figure P10.4. Compute exact values for $y(1)$, $y(2)$, and $y(3)$ when the following conditions are met:
Figure Can't Copy
(a) $\omega(0)=-1, y(0)=1$, and $x(t)=\delta(t)=$ unit impulse
(b) $\omega(0)=y(0)=0$ and $x(t)=e^{-2 t} u(t)$
(c) $\omega(0)=2, y(0)=-1$, and $x(t)=u(t)$

Raj Bala
Raj Bala
Numerade Educator

Problem 5

Consider the one-pole lowpass filter given by the transfer function
$$
H(s)=\frac{B}{s+B}
$$
(a) Design a discrete-time system that realizes this filter, using the bilinear transformation for $\omega_s=B, \omega_s=2 B$, and $\omega_s=5 B$.
(b) Sketch the frequency response of the continuous-time system for $B=10$, and mark the three different sampling frequencies. Which should give a more accurate discretetime realization?
(c) Use MATLAB to compute the step responses of the three discrete-time systems obtained in part (a) with $B=10$. Plot the responses versus $t=n T$, where $T$ is the sampling period. On the same graph, plot the step response of the original continuous-time system, and compare the accuracy of the three discretizations.

Check back soon!
02:17

Problem 6

Suppose that the sampled sinusoid $x(n T)=\cos \omega_0 n T, n=0, \pm 1, \pm 2, \ldots$, is applied (with $\omega_s=2 B$ ) to the discretization constructed in Problem 10.5. Determine the range of values of $\omega_0$ for which the peak magnitude of the resulting output response is greater than or equal to 0.707 . In other words, determine the "effective" $3-\mathrm{dB}$ bandwidth of the discretization. Compare your results with those obtained in part (b) of Problem 10.5.

James Kiss
James Kiss
Numerade Educator

Problem 7

A two-pole bandpass filter is given by the transfer function
$$
H(s)=\frac{100}{s^2+2 s+101}
$$
(a) Determine the $3-\mathrm{dB}$ points of the filter.
(b) Digitize the filter, using the bilinear transformation for an arbitrary sampling interval $T$.
(c) Plot the frequency response function of the digital filter $H_d(z)$ obtained in part (b). Take $T=0.02$ second.

Check back soon!

Problem 8

Consider the two-pole highpass filter given by the transfer function
$$
H(s)=\frac{s^2}{s^2+\sqrt{2} s+1}
$$
(a) Determine the $3-\mathrm{dB}$ point of the filter.
(b) Discretize the filter, using the bilinear transformation.
(c) With the sampling interval $T=0.1$, plot the frequency response of the digital filter obtained in part (b).

Check back soon!

Problem 9

Consider the two-pole Chebyshev lowpass filter given by
$$
H(s)=\frac{0.5 \omega_c^2}{s^2+0.645 \omega_c s+0.708 \omega_c^2}
$$
where $\omega_c$ is the $3-\mathrm{dB}$ point.
(a) Discretize the filter, using the bilinear transformation.
(b) Determine the output response $y(n T)$ of the discretized filter to the inputs $x(n T)$ that follow. Take $\omega_c=6 \pi$ and $T=0.01$. Plot the resulting analog signal $y(t)$ generated from an ideal reconstructor [i.e., plot $y(n T)$, using the plot command].
(i) $x(n T)=p_1(n T)$, where $p_1(t)=u(t+1 / 2)-u(t-1 / 2)$
(ii) $x(n T)=p_1(n T)+0.5 w(n T)$, where $w(n T)$ is a noise signal whose values are random numbers between 0 and 1. (Use rand in MATLAB to generate the signal.)
(iii) $x(n T)=p_1(n T)+w(n T)$
(iv) $x(n T)=(1-2|n T|) p_1(n T)$
(v) $x(n T)=(1-2|n T|) p_1(n T)+0.5 w(n T)$

Check back soon!

Problem 10

Design a three-pole lowpass IIR filter to have an analog cutoff frequency of $\omega_c=15$. The sampling interval is $T=0.1$. Perform the design twice, once without prewarping the frequency and once with prewarping the frequency. Plot the frequency curves of the two filters, and compare the actual digital cutoff frequencies. Base your design on a Butterworth analog prototype filter.

Check back soon!
07:24

Problem 11

Consider the closing prices of QQQQ for the 149-business-day period from July 1, 2004, up to February 1,2005 .
(a) Using the filters with transfer functions (10.31) and (10.34) and the trading strategy given in Section 7.5, determine the days when there is a buy and the days when there is a sell.
(b) Using your result in part (a), determine the net gain or loss per share.

Jon Southam
Jon Southam
Numerade Educator

Problem 12

Use analytical methods to design a three-pole lowpass IIR digital filter that has an analog cutoff frequency of $\omega_c=10 \mathrm{rad} / \mathrm{sec}$, and assume a sampling period of $T=0.1$ second. Base your design on a Chebyshev analog prototype filter with a passband ripple of $3 \mathrm{~dB}$.
(a) Specify the desired digital cutoff frequency, $\Omega_c$. Also, give the largest frequency component of an input $x(t)$ that would be allowed, to avoid aliasing.
(b) Verify your analytical design by using MATLAB to design the filter numerically. Plot the frequency response function for the resulting digital filter. Measure the actual digital cutoff frequency.
(c) Use MATLAB to simulate the response to the following sampled signal: $x(n T)=$ $1+\sin \pi n T+\sin 6 \pi n T$. Plot the analog input and outputs, $x(t)$ and $y(t)$, and the digital filter inputs and outputs, $x[n]$ and $y[n]$.

Check back soon!

Problem 13

Use analytical methods to design a three-pole highpass IIR digital filter that has an ana$\log$ cutoff frequency of $\omega_c=10 \mathrm{rad} / \mathrm{sec}$, and assume a sampling period of $T=0.1$ second. Base your design on a Butterworth analog prototype filter.
(a) Specify the desired digital cutoff frequency, $\Omega_c$. Also, give the largest frequency component of $x(t)$ that would be allowed, to avoid aliasing.
(b) Verify your analytical design by using MATLAB to design the filter numerically. Plot the frequency response function for the resulting digital filter. Measure the actual digital cutoff frequency.
(c) Use MATLAB to simulate the response to the following sampled signal: $x(n T)=$ $1+\sin \pi n T+\sin 6 \pi n T$. Plot the analog input and outputs, $x(t)$ and $y(t)$, and the digital filter inputs and outputs, $x[n]$ and $y[n]$.

Check back soon!

Problem 14

Use MATLAB to design a three-pole bandpass IIR digital filter that has an analog passband of $\omega_c=1$ to $\omega_c=5 \mathrm{rad} / \mathrm{sec}$; assume a sampling period of $T=0.1$ second. Base your design on a Butterworth analog prototype filter. Specify the filter in terms of $H_d(z)$.
(a) Plot the frequency response function for the resulting digital filter.
(b) From the frequency response curve plotted in part (a), estimate the amplitude of the response to the following input signals: $x(t)=1, x(t)=\sin \pi t$, and $x(t)=\sin 6 \pi t$.
(c) Simulate the response of the filter to the sampled signal $x(n T)=1+\sin \pi n \mathrm{~T}+$ $\sin 6 \pi n T$. Compare the response with the expected amplitudes derived in part (b).
(d) Simulate the response of the filter to the sampled random signal $x(n T)$ generated from the MATLAB command $\mathrm{x}=$ rand $(1,200)$. Plot the input and corresponding response in continuous time.

Check back soon!

Problem 15

Design a lowpass FIR filter of length $N=30$ that has a cutoff frequency of $\Omega_c=\pi / 3$. Use the rectangular window.
(a) Plot the impulse response of the filter.
(b) Plot the magnitude of the frequency response curve, and determine the amount of ripple in the passband.
(c) Compute and plot the response of the filter to an input of $x[n]=1+2 \cos (\pi n / 6)+$ $2 \cos (2 \pi n / 3)$. Discuss the filtering effect on the various components of $x[n]$.

Check back soon!

Problem 16

Design a highpass FIR filter of length $N=15$ that has a cutoff frequency of $\Omega_c=\pi / 2$. Use the rectangular window.
(a) Plot the impulse response of the filter.
(b) Plot the magnitude of the frequency response curve, and determine the amount of ripple in the passband.
(c) Repeat the design for length $N=31$, and compare the two filters in terms of ripple and transition region.
(d) Compute and plot the response of each filter to an input of $x[n]=2+2 \cos (\pi n / 3)+$ $2 \cos (2 \pi n / 3)$. Compare the filters in terms of their effect on the various components of $x[n]$.

Check back soon!

Problem 17

Design a lowpass FIR filter of length $N=10$ that has a cutoff frequency of $\Omega_c=\pi / 3$. Perform your design by using (i) a rectangular window, (ii) a Hamming window, and (iii) a Hanning window.
(a) Plot the impulse responses of each filter.
(b) Plot the magnitude of the frequency response for each filter, and compare the filters in terms of the stopband and passband ripples.
(c) Compute and plot the response of each filter to an input of $x[n]=2+2 \cos (\pi n / 4)+$ $2 \cos (\pi n / 2)$. Compare the filters in terms of their effect on the various components of $x[n]$.

Check back soon!

Problem 18

Consider the vehicle system described in Example 9.1 and given by the input/output differential equation
$$
\frac{d^2 y(t)}{d t^2}+\frac{k_f}{M} \frac{d y(t)}{d t}=\frac{1}{M} x(t)
$$
where $y(t)$ is the position of the car at time $t$. Suppose that $M=1$ and $k_f=0.1$.
(a) Discretize the system, using the bilinear transformation for $T=5$ seconds.
(b) Discretize the system, using step-response matching for $T=5$ seconds.
(c) For each digitization obtained in parts (a) and (b), plot the analog output $y(n T)$ of the discrete-time step response. Compare these results with the step response for the original continuous-time system. Plot all results for $t=0$ to $t=50$ seconds.
(d) Repeat parts (a) to (c) for $T=1$ second.

Check back soon!

Problem 19

Each continuous-time system given next represents a desired closed-loop transfer function that will be achieved by the use of a digital feedback controller. Determine a range of appropriate sampling frequencies $\omega_s$ for each system.
(a) $G_{\mathrm{cl}}(s)=10 /(s+10)$
(b) $G_{\mathrm{cl}}(s)=4 /\left(s^2+2.83 s+4\right)$
(c) $G_{\mathrm{cl}}(s)=9(s+1) /\left(s^2+5 s+9\right)$

Check back soon!

Problem 20

Consider the following continuous-time system:
$$
G_p(s)=\frac{2}{s+2}
$$

Digital control is to be applied to this system so that the resulting closed-loop system has a pole at $s=-4$.
(a) Design a continuous-time feedback controller $G_c(s)$ that achieves the desired closedloop pole.
(b) Obtain a digital controller from part (a), where $T=0.25$ second. Using this control, simulate the step response of the closed-loop system, using either Simulink or the command hybrid.
(c) Repeat part (b) with $T=0.1$ second. Compare the resulting response with that obtained in part (b), and determine which is closer to the desired closed-loop response.

Check back soon!

Problem 21

Consider the following continuous-time system:
$$
G_p(s)=\frac{1}{(s+1)(s+2)}
$$

The following lead controller is designed that gives closed-loop poles at $s=-4 \pm 8 j$ :
$$
G_c(s)=\frac{73(s+2)}{s+5}
$$
(a) Digitize the controller, using step-response matching for $T=0.1$ second. Using this control, simulate the step response of the closed-loop system, using either Simulink or the command hybrid.
(b) Repeat part (a) with $T=0.05$ second. Compare the resulting response with that obtained in part (a), and determine which is closer to the desired closed-loop response.

Check back soon!