(PDF Download) Solution Manual For Introduction To Digital Signal Processing Dick Blandford, John Parr Fulll Chapter
(PDF Download) Solution Manual For Introduction To Digital Signal Processing Dick Blandford, John Parr Fulll Chapter
(PDF Download) Solution Manual For Introduction To Digital Signal Processing Dick Blandford, John Parr Fulll Chapter
com
https://testbankbell.com/product/solution-manual-for-
introduction-to-digital-signal-processing-1st-edition-dick-
blandford-john-parr/
https://testbankbell.com/product/solutions-manual-to-accompany-
modern-digital-signal-processing-1st-edition-9780534400958/
https://testbankbell.com/product/solutions-manual-to-accompany-a-
course-in-digital-signal-processing-9780471149613/
https://testbankbell.com/product/solutions-manual-for-digital-
signal-processing-4th-edition-john-g-proakis-dimitris-k-
manolakis/
Digital Signal Processing using MATLAB 3rd Edition
Schilling Solutions Manual
https://testbankbell.com/product/digital-signal-processing-using-
matlab-3rd-edition-schilling-solutions-manual/
https://testbankbell.com/product/solutions-manual-to-accompany-
digital-signal-processing-a-computer-based-approach-3rd-
edition-9780073048376/
https://testbankbell.com/product/solution-manual-for-
introduction-to-digital-communication-2-e-2nd-edition-rodger-e-
ziemer-roger-w-peterson/
https://testbankbell.com/product/solution-manual-for-database-
processing-15th-edition-kroenke/
https://testbankbell.com/product/solution-manual-for-database-
processing-14th-edition-kroenke/
Solution Manual for Introduction to Digital Signal
Processing Dick Blandford, John Parr
Full chapters at:
https://testbankbell.com/product/solution-
manual-for-introduction-to-digital-signal-
processing-dick-blandford-john-parr/
Chapter 1
Problem Solutions
Concept Problems
1. What is the difference between the transient response and the sinusoidal steady state response
of a digital filter.
Solution
The transient response of a filter is generally taken to be the response to a unit impulse. If the
filter is stable the response goes to zero in finite time. The sinusoidal steady state response is the
response to sinusoids of unit amplitude at some set of frequencies. For a linear system the
response is always sinusoidal and is usually expressed as a gain and a phase response. Any
transient startup of a sinusoidal signal is ignored.
3. In the introduction to this chapter a digital filter was designed that approximated an analog
filter consisting of a resistor and a capacitor. Since it is clear that the digital filter was much
more complex in terms of hardware what kind of advantages might be gained by creating a
digital filter to replace an analog filter. Consider flexibility of the design, the design effort, cost
of the hardware, long term stability, and quality of the filter.
Solution
• Flexibility – While digital filters can be implemented in hardware using all hardware
components, the more typical implementation uses mostly software. Software makes a filter
much more flexible in terms of changes, error correction, scaling, or duplication.
• Design effort – Much of filter design, both analog and digital, comes from existing designs that
are modified to meet needs. If we were starting from scratch, the analog filter which does not
require an A/D or D/A converter is probably easier. In terms of the filter itself analog and digital
filters are roughly the same amount of design effort.
• Cost – Digital filters become much more cost effective as the order increases as compared to
analog filters. In terms of component cost for example, a second or third order analog filter can
be much cheaper than a standalone digital counterpart. But as the order gets higher, analog
-1-
filters become more expensive since parts precision and temperature compensation becomes
important.
• Long term stability – This is decidedly in favor of the digital filter which does not suffer from
aging or temperature drift to the degree that an analog counterpart does.
• Quality of the filter – At higher orders, digital filters are decidedly higher in quality than analog
counterparts. At lower orders the two can be competitive depending on what one is willing to
spend on hardware.
-2-
4. Explain why one would expect an IIR filter to be computationally more efficient for a given
algorithm than an FIR filter.
Solution
An FIR filter has all of its poles at the origin. In terms of frequency space, it's as if the filter has
a fixed gain and we locate zeros are specific locations where we want to drive the gain toward
zero. The IIR filter, on the other hand, has poles located anywhere inside the unit circle. The
designer can use poles and zeros together to adjust the gain up or down as needed. The poles
located inside the unit circle for the IIR filter provide feedback terms in the difference equation.
Thus, the output is fed back and can be used to further alter the gain.
The ability to locate poles anywhere inside the unit circle which provides feedback terms gives
the IIR filter a slight advantage in altering the gain curve over an FIR filter of the same order.
5. FIR filters do not have a feedback path. What are the implications of this for system stability?
Is oscillation possible? Why or why not?
Solution
FIR systems are always stable. A system is stable if its impulse response falls to zero in a finite
amount of time. For an FIR system, once an impulse has passed through the system, the output
must be exactly zero so all FIR systems are inherently stable.
Likewise, oscillation is not possible with an FIR filter. An oscillator has an output when there is
not input. For an FIR filter the output must eventually drop to zero once the input goes to zero.
Oscillation is not possible.
6. IIR filters have a feedback path and FIR filters do not. What would you expect to be the result
of small errors in the formulation of the coefficients for these two systems? Would the impact of
such an error be greater or less for an IIR filter? Explain.
Solution
For and IIR system a small error can be fed back to the input to reverberate through the system.
Some frequencies caused by errors may be amplified. In general, IIR systems are more sensitive
to coefficient quantization errors than are FIR systems which have no feedback.
-3-
Solution
Since the impulse is the derivative of the step the impulse response is the derivative of the step
response for a linear system. In practice, we can measure the step response, fit a curve to the
response so that we have it in closed form, and take the derivative of the fitted curve to get the
impulse response.
9. When a computer is used to evaluate a difference equation, the coefficients are represented as
binary numbers where the number of bits used is limited. This causes the coefficient to have a
small error called the quantization error. The same kind of error occurs in the A/D converter.
What other errors are likely in the evaluation of a difference equation?
Solution
The evaluation of a difference equation is the summing of the products of the coefficients and
input or output terms. When two N-bit numbers are multiplied a 2N-bit product is produced
which must be rounded or truncated to N-bits. This is another source of error that can be
mitigated by using extra bits for products called guard bits.
Overflow is another source of error. Filters can have overflow in a single stage at a particular
frequency and must be properly scaled to avoid this error.
Aliasing is another source of error. Aliasing most often come into play by way of high
frequency noise which comes with the input signal.
Finally, there can be error in the D/A and reconstruction process as the signal is converted from
digital back to analog.
10. Suppose that in the evaluation of a difference equation the coefficients of the input variable
and the delayed versions of the input variable are multiplied by a constant. What is the
consequence of this multiplication in the frequency domain?
Solution
The input variable and its delayed versions appear in the numerator of the transfer function. If
these are multiplied by a constant the effect will be go increase the gain of the filter by that
constant.
11. In problem 1.7 the impulse response of the FIR filters is given by
h(nT) = {b0 ,b1 ,b2 ,b3 ,b4 ,b5 }
Redraw the filter diagram so that the impulse response is given by
h(nT) = {0,0,0,b0 ,b1 ,b2 ,b3 ,b4 ,b5 }
What are the consequences of adding these zeros to the impulse response on the magnitude vs
frequency plot? What are the consequences on the phase vs frequency plot?
-4-
Solution
The magnitude plot will be unchanged but the phase plot will be the same shape but shifted by
three time periods across all frequencies.
12. Suppose the impulse response function for an FIR difference equation is symmetric. For
example the response might be given by
h(nT) = {b0 ,b1 ,b2 ,b3 ,b4 ,b5 ,b4 ,b3 ,b2 ,b1 ,b0 } .
How can the difference equation be written to use this symmetry to reduce the number of
multiplications necessary for its evaluation?
Solution
The difference equation can be written as:
y(n) = b0 x(n) + b1 x(n −1) + ...+ b4 x(n − 4) + b5 x(n − 5) + b4 x(n − 6) + ...+ b0 x(n −10)
Because of the symmetry we can factor out some of the coefficients to write:
y(n) = b0 [x(n) + x(n −10)] + b1[x(1) + x(n − 9)] + ... + b4 [x(n − 4) + x(n − 6)] + b5 x(n − 5)
Thus, instead of doing 11 multiplications we can do the additions first and do only 6
multiplications.
13. When the coefficients of a difference equation are implemented in real time we would like to
represent the coefficients with as many bits as possible since this reduces the quantization error.
Give three reasons why increasing the number of bits has negative consequences on the
implementation of a difference equation.
Solution
• The coefficients are stored in registers or memory and increasing the number of bits forces the
use of longer registers and more memory.
• The data path (busses) inside the DSP processor unit need to be as wide as the coefficients or at
least some integer multiple of the coefficient size. Increasing the number of bits makes the data
path wider and increases the hardware cost and complexity.
• Multiplication time will be longer since multiplication time is usually done on a bit by bit basis.
For cases where multiplication is done in parallel hardware, the cost and complexity of this
hardware is increased.
14. In general a sinusoid can be represented by the equation y = Asin(2ft) where A is the
amplitude and f is the frequency. This equation has two unknowns so that at least two values for
y at two different time samples are needed in order to determine A and f. What other
information do I need in order to uniquely determine values for A and f?
Solution
You need to know that the two samples are both within a single cycle of the sinusoid.
-5-
15. A given low pass filter has a cutoff frequency fc and a sample frequency fs. The sample
period is T = 1/fs. In implementing the filter it is essential that the evaluation of the difference
equation be completed in less than T seconds. What are the consequences with regard to fc if this
is not the case. For example, suppose it takes 1.2T to do the evaluation of the difference
equation.
Solution
This effectively decreases the sample frequency and there will be a corresponding decrease in the
cut off frequency of a low pass filter. In addition, if the sample frequency is slower than the
design called for, aliasing could be a problem.
Figure P1.1
An analog filter.
Solution
The loop equation for the circuit is
vi = vc + v0
But v0 = iR and
vc = (1/ C) idt = (1/ RC) v0 dt
The loop equation can be written as
(1/ RC) v0 dt = vi − vo
Using (1.8) for trapezoidal integration we get
vi (n) − vo (n) = vi (n −1) − vo (n −1) + (T / 2RC)[vo (n) + vo (n −1)]
Which simplifies to
v0 (n) = K1[vi (n) − vi (n −1)]+ K2vo (n −1)
2RC 2RC − T
Where K1 = and K 2 =
2RC + T 2RC + T
1.2 A typical computer program for a digital filter was given as:
Initialize Variables
DO Forever
Call AtoD(Vi) ;Get a sample from the A to D
Vo = K1*Vi + K2*Vo1
Call DtoA(Vo) ;Output Vo to D to A
Vo1 = Vo ;Reset the value of the old variable.
Wait for T seconds to pass
Loop
-5-
End
B)
n vi vi/3 vi(n-1)/3 vo(n-1)/3 vo
0 1 1/3 0 0 1/3
1 1 1/3 1/3 1/9 7/9
2 1 1/3 1/3 7/27 25/27
3 1 1/3 1/3 25/81 79/81
4 1 1/3 1/3 79/243 241/243
… … … … … …
-6-
jnT
vi (n −1)T = e j (n−1)T vo (nT ) = Ae jnT v (n −1)T = Ae j (n−1)T
Let vi (nT ) = e , , and o
This gives
Ae jnT = (1/ 3)e jnT + (1/ 3)e j (n−1)T + (1/ 3)Ae j (n−1)T
Divide both sides by e jnT
A = (1/ 3) + (1/ 3)e− jT + (1/ 3)Ae− jT
Solve this for A to get
(1/ 3)(1+ e − jT )
A=
1− e − jT
jnT jnT
vo (e ) Ae
jnT
= jnT = A
vi (e ) e
sin(T ) sin(T )
(T ) = tan −1 −1
− tan
cos(T ) +1 1− cos(T )
D) Using MATLAB®
fs = 1000;T = 1/fs;
f = 0:fs/2;
w = 2*pi*f;
A = (1/3)*(1+exp(-j*w*T))./(1-(1/3)*exp(-j*w*T));
figure(1);clf;
subplot(2, 1, 1);
plot(f, abs(A));
title('Magnitude of A');
xlabel('frequency in Hz');
ylabel('Gain');
subplot(2, 1, 2);
plot(f, angle(A)*180/pi);
title('Phase of A');
xlabel('frequency in Hz');
ylabel('Angle in degrees');
Magnitude of A
1
Gain
0.5
0
0 50 100 150 200 250 300 350 400 450 500
frequency in Hz
Phase of A
0
-7-
Angle in degrees
-50
-100
0 50 100 150 200 250 300 350 400 450 500
frequency in Hz
-8-
1.4 The algorithm used in this chapter relied on a discrete approximation to the integral using
trapezoids.
A) Find the difference equation to approximate the integral if rectangles are used in place of
trapezoids.
B) Plot the frequency response of a trapezoidal and a rectangular integrator.
Solution
A)
If we approximate the integral with the area under the rectangle this equation becomes
y(nT) = y([n −1]T ) + Tf (nT)
jnT
B) To find the frequency response we let f (nT) = e and we take y(nT) = Ae jnT
Putting these values into the difference equation from part A gives:
Ae jnT = Ae j (n−1)T + Te jnT
Solve this equation for A to get
A(1− e− jT ) = T or
T
A= Rectangular integration sinusoidal gain equation.
1− e − jT
For the trapezoidal integrator (1.8) gives the difference equation:
y(nT ) = y([n −1]T ) + (T / 2)[ f (nT ) + f ([n −1]T )]
jnT
Let f (nT) = e and we take y(nT) = Ae jnT to get
-9-
Use MATLAB® to plot the gain of the rectangular and trapezoidal gain equations.
fs = 1;T = 1/fs;
f = 0:.001:fs/2;
w = 2*pi*f;
Ar = T./(1-exp(-j*w*T));
At = (T/2)*(1+exp(-j*w*T))./(1-exp(-j*w*T));
figure(1);clf;
plot(f, abs(Ar));
title('Magnitude of rectangular and trapezoidal integrators');
xlabel('frequency in Hz');
ylabel('Gain');
hold on;
plot(f, abs(At), 'r');
axis([0 fs/2 0 10]);
6
Gain
Rectangular
4
3
Trapezoidal
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
frequency in Hz
1.5 Describe in detail how you could use a sinusoidal signal generator and an oscilloscope to
determine the gain vs. frequency plot for a digital filter.
Solution
• Set up the function generator for sinusoidal outputs with a 1 volt amplitude.
• Apply the function generator to the digital filter and using a dual trace oscilloscope observe
both the input and the output.
• The gain is the amplitude of the output divided by the amplitude of the input and the phase is
the phase shift with the input as the reference. Measure the gain and phase for frequencies
from near zero to fs/2.
1.6 Show that the difference equation for the second order IIR filter Figure P1.6 is given by
yk = b0 xk + b1 xk −1 + b2 xk −2 − a1 yk −1 − a2 yk −2
where yk is the output variable at time k and uk is the input variable at time k.
Figure P1.6
-9-
An IIR filter.
Solution
We can also get the impulse response from the difference equation:
yk = b0 xk + b1 xk −1 + b2 xk −2 − a1 yk −1 − a2 yk −2
k x(k) x(k-1) x(k-2) y(k) y(k-1) y(k-2)
0 1 0 0 b0 0 0
1 0 1 0 -b0a1+ b1 b0 0
2 0 0 1 b2-b1a1+b0(-a2+a12) -b0a1+ b1 b0
2 3
3 0 0 0 -b2a1+b1(-a2+a1 )+b0(a1a2 + a1a2-a1 ) b2-b1a1+b0(-a2+a12) -b0a1+ b1
Since the difference equation has the same response to an impulse as does the evaluation of the
state diagram the two forms must represent the same system.
1.7 Find the general expression for the impulse response for the FIR filter shown in Figure P1.7.
Show that this response is always finite in length and has a length no greater than n+1 where n is
the subscript of the final coefficient.
Figure P1.7
An FIR filter.
-10-
Solution
h(nT) = {b0, b1, b2, b3, b4, b5, 0, 0, 0, …}
1.8 Answer the questions below for the difference equation given by:
vo (kT) = 0.5vi (kT) − .035vi (k −1)T − 0.825v0 (k −1)T
A) Does this equation represent an IIR or an FIR system? Explain.
B) Write the first 5 terms of the impulse response for this system.
C) Write the expression for the frequency response for this system if the sample frequency is
1,000 Hz.
Solution
A) This is an IIR system since it has feedback.
B)
k vi(k) vi(k-1) vo(k) vo(k-1)
0 1 0 0.5 0
1 0 1 -0.4475 0.5
2 0 0 0.3692 -0.4475
3 0 0 -0.3046 0.3692
4 0 0 0.2513 -0.3046
-12-
1.9 Consider the difference equation given by
y(nT) = x(nT ) + Ky(n −1)T
A) Find the expression for the frequency response for y/x in terms of K. Take T = 1.
B) Use MATLAB® to plot the frequency response for two cases: K = 0.8 and K = 1/0.8 =
1.25. What is the same and what is different about these two responses?
C) Use MATLAB® to plot the impulse response for two cases: K = 0.8 and K = 1/0.8 = 1.25.
Plot at least 10 terms.
D) What can you conclude from the impulse response of these two difference equations that
is not evident from the frequency response?
Solution
A) The difference equation is:
y(nT) = x(nT ) + Ky(n −1)T
jnT jnT j (n−1)T
Let x(nT ) = e , y(nT ) = Ae and y(n −1)T = Ae
This gives
Ae jnT = e jnT + KAe j (n−1)T
Divide both sides by e jnT
A = 1+ KAe− jT
Solve this for A to get
1
A=
1− Ke − jT
jnT jnT
y(e ) Ae
= jnT = A
x(e jnT ) e
1− K cos(T )
B) The magnitude plots have the same shape but when K = 0.8 the magnitude is overall slightly
higher. If both plots were normalized to a gain of unity at 0 Hz they would be the same. The
phase plots are very different. For K = 0.8 the phase curve begins and ends at 0o. It reaches a
maximum of about -50o at about 0.1 Hz. When K = 1.25 the phase curve begins at -180o and
ends at 0o. The total phase changes is about 180o.
-12-
fs = 1;T = 1/fs; 6
Magnitude of A
f = 0:.001:fs/2; 4
w = 2*pi*f;
Gai
n
2
K = 0.8; 00 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45
figure(1);clf;
0
Angle in
degrees
plot(f, abs(A)); -40
ylabel('Gain'); 4
subplot(2, 1, 2);
3
Gai
2
plot(f, angle(A)*180/pi);
n
1
Phase of A
100
0
ylabel('Angle in degrees');
Angle in
degrees
-100
-200
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45
0.5 frequency in Hz
C)
x = [1 zeros(1, 9)]; %impulse in 1
Impluse Response, K = 0.8
y = zeros(1, 10);
y(1) = x(1);
Voltage
0.5
K = 0.8;
for i = 2:length(y)
0
y(i) = x(i) + K*y(i-1); 0 1 2 3 4 5
Time in seconds
6 7 8 9
end 8
Impluse Response, K = 1.25
figure(4);clf; 6
fs = 1;T = 1/fs; 4
Voltage
nT = (0:9)*T;
2
subplot(2, 1, 1);
stem(nT, y); 0 1 2 3 4 5
Time in seconds
6 7 8 9
n
0 1 2 3 4 5 6 7 8
0 1 0.5 0.25 0 0 0 0 0 0
-13-
1 0 1 0.5 0.25 0 0 0 0 0
2 0 0 1 0.5 0.25 0 0 0 0
-14-
3 0 0 0 1 0.5 0.25 0 0 0
4 0 0 0 0 1 0.5 0.25 0 0
5 0 0 0 0 0 1 0.5 0.25 0
1.11 When a step input is applied to a certain difference equation, the output, or step response, is
given by
s(nT) = {0.25, 0.5, 1.0, 1.0, 1.0, …}
A step function in discrete time can be viewed as a sequence of shifted impulses to the step
response must be a sequence of shifted impulse responses. Use this information to derive the
impulse response for this system.
Solution
From the previous problem we see that the next term of the step response is always the previous
term plus the present term of the impulse response. We can write (from the solution of Problem
10)
stp(n) = stp(n-1) + h(n)
From this we get
h(n) = stp(n) – stp(n-1)
If the step response is
s(nT) = {0.25, 0.5, 1.0, 1.0, 1.0, …}
The impulse response is:
h(nT) = {0.25, 0.25, 0.5, 0, 0, 0, …}
-14-
Magnitude plot
1.5
1
Magnitude of
0.5
Gain
0
0 50 100 150 200 250 300 350 400 450 500
frequency in
Hz
Phase plot
0
-50
Phase in
degrees
-100
-150
0 50 100 150 200 250 300 350 400 450
500 frequency in Hz
Figure P1.12
The frequency response curve left and a blow up right for a difference equation.
Solution
fs = 1000;T = 1/fs;
t = 0:T:1;
fsig = 100;
x = sin(2*pi*fsig*t);
y = zeros(1, length(x));
y(1) = .075*x(1);
y(2) = .075*x(2) + .075*x(1) + 1.5*y(1);
for i = 3:length(y)
figure(1);clf;
plot(t, x);
hold on;
plot(t, y, 'r');
-15-
From the figure: A1 / A2 0.54 and (t 2 / t1)360 111
o
-16-
1.13 In the difference equation below K is a real number greater than 0.
y(nT) = x(nT) + x(n −1)T + Ky(n −1)T
A) Find the range of values of K that makes the impulse response grow without bound.
B) Find the range of values of K that makes the impulse response fall to zero.
Solution
y(nT) = x(nT) + x(n −1)T + Ky(n −1)T
Tabulate the impulse response.
n x(n) x(n-1) y(n) y(n-1)
0 1 0 1 0
1 0 1 1+K 1
2 0 0 K(1 + K) 1+K
3 0 0 K2(1 + K) K(1 + K)
3 2
4 0 0 K (1 + K) K (1 + K)
… … … … …
(N-1) (N-2)
N 0 0 K (1 + K) K (1 + K)
Figure P1.14
A delay line
Solution
A) y(n) = x(n − N )
B) x(nT ) = e jnT and y(nT ) = Ae jnT
This gives
Ae jnT = e j (n−N )T
Divide both sides by e jnT
A = e − jNT
C) Magnitude of A
A =1
Phase of A
A = −NT
-16-
Another random document with
no related content on Scribd:
Humperdinck—The Fairy Tale Man—Germany