selected answers ch 1-8

49
BME/ECE 463 Computers in Medicine Answers to Selected Textbook Problems W. J. Tompkins (ed.) Biomedical Digital Signal Processing: C Language Examples and Laboratory Experiments for the IBM PC. Englewood Cliffs, NJ: Prentice Hall, 1993. 1

Upload: jawahar-reddy-venga

Post on 27-Nov-2014

236 views

Category:

Documents


21 download

TRANSCRIPT

Page 1: Selected Answers Ch 1-8

BME/ECE 463

Computers in Medicine

Answers to Selected Textbook Problems

W. J. Tompkins (ed.) Biomedical Digital Signal Processing: C LanguageExamples and Laboratory Experiments for the IBM PC. Englewood Cliffs, NJ: Prentice Hall, 1993.

1

Page 2: Selected Answers Ch 1-8

2

Page 3: Selected Answers Ch 1-8

Chapter 1

1.1 Compare operating systems for support in developing real-time programs. Explain the relative advantages and disadvantages of each for this type of application.

Ans.Summarize Figure 1.11. Those closest to diagonal line (like PC/DOS) aremost useful for real time. Single-task, single-user DOS is most suitable.

Unix

PC/DOS

CP/M

Macintosh

OS/2

Decreasing versatility

Incre

asin

g e

xpert

ise

o

o

o

o

o

o

Windows 3.x

Figure 1.11 Disk operating systems–the compromise between DOS versatility and user expertise in real-time applications.

1.2 Explain the differences between interpreted, compiled, and integrated-environment compiled languages. Give examples of each type.

Ans.Interpreted. All (or most) of resources, including editor, are in memory.Character string representing program is preserved in memory and “interpreted” each time program is run. BASIC is a classic example.

3

Page 4: Selected Answers Ch 1-8

Compiled. User’s source program created by an editor is converted to .obj (object or binary) form and linked to .lib (libraries) and other .obj modules to form a runnable binary program called an executable (.exe). FORTRAN, Pascal, and C are examples.

Compiled, integrated environment. All resources necessary to edit, compile, link, and run a program are memory resident and can produce a runnable binary program. Thus iteration time to debug a program is less than that for a non-integrated compiled environment.

1.3 List two advantages of the C language for real-time instrumentation applications. Explain why they are important.

Ans. (1) Instructions are available for low-level operations (e.g., bit shifting) in a

high-level, structured language. (2) Efficient object code is produced by limiting the amount of error

checking and providing user flexibility and control. (3) Transportable across machines, so user does not need to continuously

reinvent the wheel.

4

Page 5: Selected Answers Ch 1-8

Chapter 2

2.1 What is a cardiac equivalent generator? How is it different from the actual cardiac electrical activity? Give two examples.

Ans. Model of cardiac electrical activity. The actual electrical activity occurs at the microscopic level. The mathematical model is a macroscopic summary of this cellular activity. Examples are the dipole (vector) and multiple-dipole models.

2.3 The heart vector of a patient is oriented as shown below at one instant of time. At this time, which of the frontal leads (I, II, and III) are positive-going for:

II

I

III

+ +

+RA LA

LL

II

I

III

+ +

+RA LA

LL

(a) (b)

Ans. (a) None. (b) II, III.

2.4 A certain microprocessor-based ECG machine samples and stores only leads I and II. What other standard leads can it compute from these two?

Ans.III, aVR, aVL, aVF.

2.5 It is well known that all six frontal leads of the ECG can be expressed in terms of any two of them. Express the augmented lead at the right arm (i.e., aVR) in terms of leads I and II.

Ans.

!

aVR = "I + II

2

#

$ %

&

' (

5

Page 6: Selected Answers Ch 1-8

2.6 Express Lead II in terms of aVF and aVL.

Ans.

!

II =2aVL + 4aVF

3

2.7 Is it possible to express lead V6 in terms of two other leads? Is there any way to calculate V6 from a larger set of leads?

Ans.No. Using a precise torso model for the subject under study, it is theoretically possible, but not practical for the general population since a single torso model is generally used for everyone.

2.10 A cardiologist records a patient’s ECG on a machine that is suspected of being defective. She notices that the QRS complex of a normal patient’s ECG has a lower peak-to-peak amplitude than the one recorded on a good machine. Explain what problems in instrument bandwidth might be causing this result.

Ans.Too low a cutoff frequency at the high end (should be 100 Hz) causesattenuation of higher-frequency waves, particularly the QRS complex.

2.11 A cardiologist notices that the T wave of a normal patient’s ECG is distorted so that it looks like a biphasic sine wave instead of a unipolar wave. Explain what problems in instrument bandwidth might be causing this problem.

Ans.Too high a cutoff frequency at the low end causes a differentiation effect. Ahigh-pass filter approximates a derivative.

2.12 What is the electrode material that is best for recording the ECG from an ambulatory patient?

Ans.Silver-silver chloride (Ag Ag-Cl).

6

Page 7: Selected Answers Ch 1-8

2.13 A cardiotachometer uses a bandpass filter to detect the QRS complex of the ECG. What is its center frequency (in Hz)? How was this center frequency determined?

Ans.17 Hz. Empirically determined by NASA by studying normal astronauts.

2.14 An engineer designs a cardiotachometer that senses the occurrence of a QRS complex with a simple amplitude threshold. It malfunctions in two patients. (a) One patient’s ECG has baseline drift and electromyographic noise. What ECG preprocessing step would provide the most effective improvement in the design for this case? (b) Another patient has a T wave that is much larger than the QRS complex. This false triggers the thresholding circuit. What ECG preprocessing step would provide the most effective improvement in the design for this case?

Ans. (a) Bandpass filter. Attenuate both low and high frequencies.

(b) High-pass filter. Attenuate the lower-frequency T wave to accentuate the amplitude of the QRS complex.

2.16 A typical modern microprocessor-based ECG machine samples and stores leads I, II, V1, V2, V3, V4, V5, and V6. From this set of leads, calculate (a) lead III, (b) augmented lead aVF.

Ans. (a)

!

III = II " I

(b)

!

aVF =II + III

2=

II + II " I

2=

2II " I

2

7

Page 8: Selected Answers Ch 1-8

Chapter 3

3.1 What is the purpose of using a low-pass filter prior to sampling an analog signal?

Ans.To prevent alias signals.

3.9 Explain Shannon’s sampling theorem. If only two samples per cycle of the highest frequency in a signal is obtained, what sort of interpolation strategy is needed to reconstruct the signal?

3.9 Ans. Must sample at a rate twice the highest frequency present in a signal. Sinusoidal interpolation. Draw one cycle of a sine wave. Locate two points equally-spaced on the sine wave. The goal is to redraw the curve that represents the sine wave knowing only those two points. One strategy is linear interpolation in which you would simply draw a straight line between the two points. But this would not be a very good approximation to the curve. Linear interpolation between points would only provide a good approximation to the curve of the sine wave if you have many points on the sine wave, say 100 sampled data points per cycle. If you know that two points on a signal represented sample points on a sine wave, the only way you could reconstruct the sine wave would be by fitting the best sine wave approximation to the two points (i.e., sinusoidal interpolation).

3.10 A 100-Hz-bandwidth ECG signal is sampled at a rate of 500 samples per second. (a) Draw the approximate frequency spectrum of the new digital signal obtained after sampling, and label important points on the axes. (b) What is the bandwidth of the new digital signal obtained after sampling this analog signal? Explain.

8

Page 9: Selected Answers Ch 1-8

Ans. (a)

100 500400 600 1000900 1100 f

(b) Infinity. After sampling, the new frequency spectrum would look something like the one above, where fc = 100 Hz and fs = 500 Hz, Since a new set of frequencies is produced for each integral value of the sampling frequency at fs, 2fs, 3fs, etc., this is an infinite number of new frequencies.

3.11 In order to minimize aliasing, what sampling rate should be used to sample a 400-Hz triangular wave? Explain.

Ans. As high as possible because of the harmonics. Much higher than 800 samples per second (sps). Any waveform that is not a pure sine wave can be represented by a sum of a set of sine waves. The less smooth a wave is, the more sine waves that are necessary to represent it. So if it’s composed of straight line segments like a square wave or a triangle wave, it turns out it takes many sine waves, in fact an infinite number, to exactly represent such a signal. The set of sine waves that make up a square wave are a sine wave at the fundamental frequency of the square wave plus a sine wave of every odd harmonic. If you generate a triangle wave using DigiScope and find its power spectrum, you will find that its spectrum also has a fundamental and an infinite set of harmonics. If the highest frequency present in a signal is infinite, then you would need to use an infinite sampling frequency (i.e., 2 times the highest frequency present in the signal).

3.12 A 100-Hz full-wave-rectified sine wave is sampled at 200 samples/s. The samples are used to directly reconstruct the waveform using a digital-to-analog converter. Will the resulting waveform be a good representation of the original signal? Explain.

9

Page 10: Selected Answers Ch 1-8

Ans. No. Aliasing is a potential problem. Rectification causes an infinite set of harmonics. Rectification means that you take the negative points and make them positive. This produces a sharp change in direction when you change from one half-cycle to the next half-cycle. Since this is no longer a smooth sine wave, it will take many frequencies to represent the sharp change in direction. Since there will be many more frequencies present (i.e., the fundamental frequency of 100 Hz and many harmonics, sampling at only 200 Hz, twice the fundamental frequency, will not be able to represent the higher harmonics without aliasing.

3.17 A normal QRS complex is about 100 ms wide. (a) What is the American Heart Association’s (AHA) specified sampling rate for clinical electrocardiography? (b) If you sample an ECG at the AHA standard sampling rate, about how many sampled data points will define a normal QRS complex?

Ans. (a) 500 sps. (b) About 50 samples.

3.19 An ECG with a 1-mV peak-to-peak QRS amplitude and a 100-ms duration is passed through an ideal low-pass filter with a 100-Hz cutoff. The ECG is then sampled at 200 samples/s. Due to a lack of memory, every other data point is thrown away after the sampling process, so that 100 data points per second are stored. The ECG is immediately reconstructed with a digital-to-analog converter followed by a low-pass reconstruction filter. Comparing the reconstruction filter output with the original signal, comment on any differences in appearance due to (a) aliasing, (b) the sampling process itself, (c) the peak-to-peak amplitude, and (d) the clinical acceptability of such a signal.

Ans. (a) Aliasing is a problem since the effective sampling rate is 100 sps. (b) Peaks and valleys will be missed. (c) Peak-to-peak amplitude will be attenuated. (d) Aliasing and peak amplitude errors will compromise the clinical

information in the signal.

10

Page 11: Selected Answers Ch 1-8

!

29

= 512,

!

28

= 256)].

3.20 An IBM PC signal acquisition board with an 8-bit A/D converter is used to sample an ECG. An ECG amplifier provides a peak-to-peak signal of 1 V centered in the 0-to-5-V input range of the converter. How many bits of the A/D converter are used to represent the signal?

Ans.All 8 bits.

3.21 A commercial 12-bit signal acquisition board with a ±10-V input range is used to sample an ECG. An ECG amplifier provides a peak-to-peak signal of ±1 V. How many discrete amplitude steps are used to represent the ECG signal?

Ans. 410. [9 bits are required (

3.27 In an 8-bit successive-approximation A/D converter, what is the initial digital approximation to a signal?

Ans.1000 0000B = 80H (hexadecimal).

3.28 A 4-bit successive-approximation A/D converter gets a final approximation to a signal of 0110. What approximation did it make just prior to this final result?

Ans.0111

3.30 For an 8-bit successive approximation analog-to-digital converter, what will be the next approximation made by the converter (in hexadecimal) if the approximation of (a) 0x90 to the input signal is found to be too low, (b) 0x80 to the input signal is found to be too high?

Ans. (a) 90H = 1001 0000B. Next approximation is

98H = 1001 1000B.(b) 80H = 1000 0000B. Next approximation is

40H = 0100 0000B.

11

Page 12: Selected Answers Ch 1-8

3.34 The internal IBM PC signal acquisition board described in Appendix A is used to sample an ECG. An amplifier amplifies the ECG so that a 1-mV level uses all 12 bits of the converter. What is the smallest ECG amplitude that can be resolved (in µV)?

Ans.

!

1"10#3

4096$ 0.25"10

#6$ 0.25 µV

12

Page 13: Selected Answers Ch 1-8

0.5

0.866

Chapter 4

4.2 If the output sequence of a digital filter is {1, 0, 0, 2, 0, 1} in response to a unit impulse, what is the transfer function of this filter?

Ans.

!

H(z) = 1+ 2z"3

+ z"5

4.3 Draw the pole-zero plot of the filter described by the following transfer function:

Ans.

!

H(z) =1

4+

1

4z"1

+1

4z"2

!

"

!

"–

j

!

120o

2" / 3( )

4.4 Suppose you are given a filter with a zero at 30˚ on the unit circle. You are asked to use this filter as a notch filter to remove 60-Hz noise. How will you do this? Can you use the same filter as a notch filter, rejecting different frequencies?

Ans.

!

30

360=

60

f s

!

f s = 60 "360

30= 720 sps

Change the sampling frequency to control the frequency where the notch occurs.

13

Page 14: Selected Answers Ch 1-8

60 Hz

!

"

!

"

!

30o

4.5 What is the z transform of a step function having an amplitude of five {i.e., 5, 5, 5, 5, …}?

Ans.

!

H(z) = 5"1

1# z#1

$

% &

'

( )

4.6 A function e –at is to be applied to the input of a filter. Derive the z transform of the discrete version of this function.

Ans.

!

e"anT

# 1,e"aT

,e"2aT

,e"3aT

,L{ }Using the binomial theorem,

!

X (z) =1

1" e"aT

z"1

4.7 Application of a unit impulse to the input of a filter whose performance is unknown produces the output sequence {1, –2, 0, 0, …}. What would the output sequence be if a unit step were applied?

Ans.{1, –1, –1, –1, …}

14

Page 15: Selected Answers Ch 1-8

!

H(z) = z"1

+ 6z"4" 2z

"7. What is 4.8 A digital filter has the transfer function: the difference equation for the output, y(nT)?

Ans.

!

y(nT ) = x(nT "T ) + 6x(nT " 4T ) " 2x(nT " 7T )

4.9 A digital filter has the output sequence {1, 2, –3, 0, 0, 0, …} when its input is the unit impulse {1, 0, 0, 0, 0, …}. If its input is a unit step, what is its output sequence?

Ans.{1, 3, 0, 0, 0, …}

4.10 A unit impulse applied to a digital filter results in the output sequence: {3, 2, 3, 0, 0, 0, …}. A unit step function applied to the input of the same filter would produce what output sequence?

Ans.{3, 5, 8, 8, 8, 8, …}

4.11 The z transform of a filter is: H(z) = 2 – 2z –4 . What is its (a) amplitude response, (b) phase response, (c) difference equation?

Ans. (a)

!

H("T ) = 4sin(2"T )

(b)

!

"H(#T ) =$

2% 2#T

(c)

!

y(nT ) = 2x(nT ) " 2x(nT " 4)

The filter’s amplitude and phase responses are

!

ej"T

found by substituting for z:

!

H "T( ) = 2 # 2e# j4"T$

% & ' ( )

We could now directly substitute into this function the trigonometric relationship

!

ej"T = cos "T( ) + j sin "T( )

15

Page 16: Selected Answers Ch 1-8

However, a common trick prior to this substitution that leads to quick simplification of expressions such as this one is to extract a power of e as a multiplier such that the final result has two similar exponential terms with equal exponents of opposite sign

!

H "T( ) = e# j2"T

(2ej2"T # 2e

# j2"T)

$ % &

' ( )

Now substituting trigonometric equivalent for the terms in parentheses yields

!

H "T( ) = 2 cos(2"T ) + j sin(2"T ) # cos(2"T ) + j sin(2"T )[ ]e# j2"T{ }

The

!

cos "T( ) terms cancel leaving

!

H "T( ) = j4sin("T ))e# j2"T$

% & ' ( )

To put this in the form

!

Rej "( ) where R is the real part and

!

" is the phase angle, we need to replace the j in this expression with its equivalent:

!

e

j"

2

#

$ %

&

' (

= cos"

2

#

$ %

&

' ( + j sin

"

2

#

$ %

&

' ( = 0 + j1= j

Replacing j with

!

e

j"

2

#

$ %

&

' (

gives

!

H "T( ) = 4sin("T ))e

j#

2$2"T

%

& '

(

) *

+

,

- - -

.

/

0 0 0

Thus the magnitude response of the filter is

!

R |, or

!

H "T( ) = 4sin("T )

16

Page 17: Selected Answers Ch 1-8

The linear phase response is equal to angle

!

" , or

!

"H #T( ) =$

2% 2#T

4.12 The transfer function of a filter designed for a sampling rate of 800 samples/s is:

!

H(z) = 1" 0.5z"1#

$ % &

' ( 1+ 0.5z

"1# $ % &

' (

A 200-Hz sine wave with a peak amplitude of 4 is applied to the input. What is the peak value of the output signal?

Ans. 5

The filter’s amplitude and phase responses are found by substituting

!

ej"T for z:

!

H "T( ) = 1# 0.5e# j"T$

% & '

( ) 1+ 0.5e

# j"T$ % & '

( )

Since this problem only asks for the amplitude response at a single frequency, you do not need to calculate the general equation for amplitude response. You only need to evaluate this equation at the desired frequency of

200 Hz, which corresponds to

!

"T =#

2. Therefore,

!

H("T )"T=

#

2

= 1$ 0.5e

$ j#

2

%

& '

(

) *

%

&

' ' '

(

)

* * *

1+ 0.5e

$ j#

2

%

& '

(

) *

%

&

' ' '

(

)

* * *

Since,

!

e

" j#

2

$

% &

'

( )

= cos#

2

$

% &

'

( ) " j sin

#

2

$

% &

'

( ) = 0 " j1= " j

Substituting in the above Eq.

!

H("T )"T=

#

2

= 1+ j0.5( ) 1$ j0.5( ) = 1+ 0.25( ) = 1.25

17

Page 18: Selected Answers Ch 1-8

Therefore, a signal of 200 Hz corresponding to this angle of

!

"T =#

2will be

multiplied this factor of 1.25 and the end result will be a peak sine wave value of

!

4 "1.25 = 5.

4.13 A unit impulse applied to a digital filter results in the following output sequence: {1, 2, 3, 4, 0, 0, …}. A unit step function applied to the input of the same filter would produce what output sequence?

Ans.{1, 3, 6, 10, 10, 10, 10, …}

4.14 The transfer function of a filter designed for a sampling rate of 600 samples/s is:

!

H(z) = 1" 2z"1

A sinusoidal signal is applied to the input: 10 sin(628t). What is the peak value of the output signal?

Ans. 17.32

The filter’s amplitude and phase responses are found by substituting for z:

!

ej"T

!

H "T( ) = 1# 2e# j"T$

% & ' ( )

We could now directly substitute into this function the trigonometric relationship

However, this question just asks what the amplitude response is for the . This is a sinusoidal signal

!

ej"T = cos "T( ) + j sin "T( )

signal,

!

10sin 628t( ) = 10sin "t( ) = 10sin 2#ft( )with a peak value of 10 and a frequency,

!

f = 100

need to evaluate the amplitude response for

!

f = 100

!

100

600"360° = 60° =

#

3.

Hz. Therefore, we just Hz, which is

18

Page 19: Selected Answers Ch 1-8

Evaluating for this frequency, we get

!

H "T( )"T=

#

3

= 1$ 2e$ j"T%

& ' ( ) *

= 1$ 2 cos#

3

+

, -

.

/ 0 $ j sin

#

3

+

, -

.

/ 0

%

& '

(

) * =

!

= 1" 21

2" j

3

2

#

$ % %

&

' ( ( = 1"1+ j 3 = j1.732

So the magnitude of the gain at

!

f = 100 Hz

!

"T =#

3

$

% &

'

( ) is

!

H("T"T=

#

3

= j1.732 = 1.732

Therefore, the peak value of the input sine wave at this frequency gets multiplied by this gain, and the peak amplitude of the output sine wave becomes

!

10 "1.732 = 17.32

19

Page 20: Selected Answers Ch 1-8

Chapter 5

5.1 What are the main differences between FIR and IIR filters?

Ans.FIR. Finite impulse response; no feedback (i.e., no recursion); all polestrivial (i.e., all at z = 0); Inherently stable.

IIR. Infinite impulse response; feedback (i.e., recursion); non-trivial poles;potentially unstable.

5.3 Why are finite-length register effects less significant in FIR filters than in IIR filters?

Ans. Roundoff errors in IIR filters can modify the output sequence values since they are computed including feedback terms that are arithmetically determined. Roundoff in an IIR filter can move the poles on to the unit circle, leading to instability. FIR filters are inherently stable.

5.4 Compute and sketch the frequency response of a cascade of two Hanning filters. Does the cascade have linear phase?

Ans.

!

" H (#T ) =1

41+ cos(#T )[ ]

2

!

" # H ($T ) = %2$T & linear

The amplitude and phase responses of a Hanning filter are:

!

H "T( ) =1

21+ cos("T )[ ] and

!

"H(#T ) = $#T

The amplitude and phase response are of the form

!

H(") = Rej" where R is

the real part of the amplitude response or

!

H("T ) and

!

" is the phase response or

!

"H(#T ). When two filters are cascaded, their transfer functions are multiplied. For this case

!

" H (#) = Rej#$Re

j#= R

2e

j2#

20

Page 21: Selected Answers Ch 1-8

Therefore, the cascade of two Hanning filters would result in

!

" H #T( ) =1

41+ cos(#T )[ ]

2and

!

"H(#T ) = $2#T

Thus amplitude responses multiply and phase responses add, and the overall phase response is linear.

Hanning filter:

Cascade of two Hanning filters:

5.5 Derive the phase response for an FIR filter with zeros located at

!

r"1#± $

!

r"± # and . Comment.

Ans.

!

"H(#T ) = $2#T

21

Page 22: Selected Answers Ch 1-8

This problem indicates tha

!

z =1

re

j"

!

z =1

re" j#

t there are four zeros. They are at

!

z = rej" ,

, , and . Variable r is the radius of the pole

!

z = re" j#

location and q is the angle of the zero locations. Since r must be positive, at each angle, there is one zero inside the unit circle and one zero outside the unit circle. The z transform is:

!

H(z) =

z " rej#$

% & '

( ) z " re

" j#$ % & '

( ) z "

1

re

j#$

% &

'

( ) z "

1

re" j#$

% &

'

( )

z4

!

H(z) =

z2 " r e

j#+ e

" j#$ % & '

( ) z + r

2* + ,

- . /

z2 "

1

re

j#+ e

" j#$ % & '

( ) z +

1

r2

*

+ ,

-

. /

z4

!

H(z) =

z2 " 2r cos(#)( )z + r

2$ % &

' ( )

z2 "

2cos(#)

r

*

+ ,

-

. / z +

1

r2

$

% &

'

( )

z4

!

H(z) = 1" 2r cos(#)( )z"1 + r2

z"2$

% & ' ( )

1"2cos(#)

r

*

+ ,

-

. / z"1 +

1

r2

*

+ ,

-

. / z"2

$

% &

'

( )

The filter’s amplitude and phase responses

!

ej"T

are found by substituting for z. Then substitute into

!

H("T ) the trigonometric relationship

!

ej"T = cos "T( ) + j sin "T( )

You can then find an expression for the amplitude response

!

H("T ) and the phase response

!

"H(#T ).

5.6 What are the trade-offs to consider when choosing the order of a least-squares polynomial smoothing filter?

22

Page 23: Selected Answers Ch 1-8

Ans.The more points used in the parabolic approximation, the sharper the cutoff,but the greater the computation time.

5.9 What are the main differences between the two-point difference and three-point central difference algorithms for approximating the derivative?

Ans.The three-point derivative has a built-in smoothing function that attenuateshigh-frequency noise.

5.10 What are the three steps to designing a filter using the window method?

Ans. (1) Establish desired brickwall transfer function. (2) Find IDFT. (3) Truncate series with a window function.

5.16 The transfer function of the Hanning filter is

!

H1(z) =1+ 2z

"1+ z

"2

4

cascaded together to give a new transfer function [that is,

!

H(z) = H1(z) "H1(z) "H1(z)

(a) What is its gain at dc? (b) Three successive stages of this filter are

]. What is the overall gain of this filter at dc? (c) A high-pass filter is designed by subtracting the output of the Hanning filter from an all-pass filter with zero phase delay. How many zeros does the resulting filter have? Where are they located?

Ans. (a)

!

ej"T

!

H("T )dc

= 1

The filter’s amplitude and phase responses are found by substituting for z:

!

H "T( ) =1+ 2e

# j"T + e# j2"T

4

23

Page 24: Selected Answers Ch 1-8

We could now directly substitute into this function the trigonometric relationship

!

ej"T = cos "T( ) + j sin "T( )

Then we could calculate the value of the amplitude response (i.e., gain) for any arbitrary frequency. However, this question just asks what the amplitude response is at dc (i.e., ). Therefore, we just need to evaluate the amplitude response at . Substituting this frequency into the equation above, we get

!

f = 0 or

!

"T = 0

!

"T = 0

!

H "T( )"T=0

=1+ 2e

# j0 + e# j20

4=

1+ 2e0 + e

0

4=

1+ 2 + 1

4=

4

4= 1

So the magnitude of the gain at

!

f = 0 Hz is 1. You can convert this to decibels as follows:

Gain =

!

20log10(1) = 0 dB

(b)

!

" H (#T )dc

= 1

(c)

!

H(z) = 1"1

41+ 2z

"1+ z

"1# $ % &

' ( =

3

4"

1

2z"1 "

1

4z"1

zeros at

!

z = 1,"1

3

24

Page 25: Selected Answers Ch 1-8

5.17 Two filters are cascaded. The first has the transfer function: . The second has the transfer function:

!

H1(z) = 1+ 2z"1" 3z

"2

!

H2(z) = 1" 2z"1. A unit impulse is applied to the input of the cascaded

filters. (a) What is the output sequence? (b) What is the magnitude of the amplitude response of the cascaded filter (1) at dc? (2) at 1/2 the foldover frequency? (3) at the foldover frequency?

Ans. (a) {1, 0, –7, 6, 0, 0, 0, …}

(b) (1) 0

(b) (2) 10

The filter’s amplitude and phase responses are found by substituting for z:

!

ej"T

!

H "T( ) = 1+ 2e# j"T # 3e

# j2"T$ % &

' ( )

1# 2e# j"T$

% & ' ( )

The foldover frequency is one

!

"T =#

2

-half the sampling rate (

!

"T = # ). So one-half

the foldover frequency is .

!

H"

2

#

$ %

&

' ( = 1+ 2e

) j"

2

#

$ %

&

' ( ) 3e

) j "( )*

+

, , ,

-

.

/ / /

1) 2e

) j"

2

#

$ %

&

' (

*

+

, , ,

-

.

/ / /

!

H"

2

#

$ %

&

' ( = 1+ 2 cos

"

2

#

$ %

&

' ( ) j sin

"

2

#

$ %

&

' (

#

$ %

&

' ( ) 3 cos "( ) ) j sin "( )( )

*

+ ,

-

. / 1) 2 cos

"

2

#

$ %

&

' ( ) j sin

"

2

#

$ %

&

' (

#

$ %

&

' (

*

+ ,

-

. /

!

H"

2

#

$ %

&

' ( = 1+ 2 0 ) j1( ) ) 3 )1( ) ) j0( )[ ] 1) 2 0 ) j1( )[ ]

!

H"

2

#

$ %

&

' ( = 4 ) j2[ ] 1+ j2[ ] = 4 ) j2 + j8 + 4 = 8 + j6

25

Page 26: Selected Answers Ch 1-8

5.18

So the magnitude of the amplitude response at one-half the foldover frequency is:

!

H"

2

#

$ %

&

' ( = 8

2+ 6

2= 100 = 10

(b) (3) 12

Two filters are cascaded. The first has the transfer function:

!

H1(z) = 1+ 2z"1

+ z"2

!

H2(z) = 1" z"1

. The second has the transfer function:. (a) A unit impulse is applied to the input of the cascaded

filters. What is the output sequence? (b) What is the magnitude of the amplitude response of this cascaded filter at dc?

Ans. (a) {1, 1, –1, –1, 0, 0, 0, …}

(b)

!

H("T )dc

= 0

26

Page 27: Selected Answers Ch 1-8

Chapter 6

6.12 A filter has the following output sequence in response to a unit impulse: {–2 ,4, –8, 16, …}. Write its z transform in closed form (i.e., as a ratio of polynomials). From the following list, indicate all the terms that describe this filter: recursive, nonrecursive, stable, unstable, FIR, IIR.

Ans.

!

H(z) ="2

1+ 2z"1

recursive, unstable, IIR

The output sequence is: {–2, 4, –8, 16, –32, …}

!

H(z) = "2 + 4z"1"8z

"2+ 16z

"3" 32z

"4+L

!

H(z) = "2 1" 2z"1

+ 4z"2 "8z

"3+ 16z

"4+L

# $ % &

' (

Using the binomial theorem,

!

1

1" v= 1+ v + v

2+ v

3+ v

4+ …

where

!

v = "2z"1

!

H(z) = "21

1" "2z"1#

$ % &

' (

#

$

% % %

&

'

( ( (

="2

1+ 2z"1

#

$ %

&

' (

Find the pole location by setting the denominator equal to zero:

Therefore,

!

z + 2 = 0

!

z = "2

Since this filter has a pole, it is a recursive or IIR filter. It is unstable since the pole is outside the unit circle. It’s clear from the output sequence that it is unstable, since the values of the output terms increase continuously in value.

27

Page 28: Selected Answers Ch 1-8

6.14 The block diagrams for four digital filters are shown below. Write their (a) transfer functions, (b) difference equations.

(1) (2)

(3) (4)

Ans.

(1) (a)

!

H(z) =1" 2z

"1

1" z"1

(b)

(2) (a)

!

H(z) =

1+1

2z"1

1"1

2z"1

(b)

!

y(nT ) = y(nT "T ) + x(nT ) " 2x(nT "T )

!

y(nT ) =1

2y(nT "T ) + x(nT ) +

1

2x(nT "T )

(3) (a)

!

H(z) =z"1

1" z"1" z

"2(b)

!

y(nT ) = y(nT "T ) + y(nT " 2T ) + x(nT "T )

(3) (a) Assign a new variable

!

P z( ) at the output of the summer on the left.

Then

and

!

P(z) = X (z) + Y(z)z"1

!

Y(z) = P(z)z"1

+ Y(z)z"1

28

Page 29: Selected Answers Ch 1-8

Substituting

!

P z( ) gives

!

Y(z) = X (z) + Y(z)z"1#

$ % &

' ( z"1

+ Y(z)z"1

= X (z)z"1

+ Y(z)z"1

+ Y(z)z"2

Rearranging terms

Finally

!

Y(z) =X (z)z

"1

1" z"1" z

"2

!

H(z) =z"1

1" z"1" z

"2

(4) (a)

!

H(z) =1

1" z"1" z

"2(b)

!

y(nT ) = y(nT "T ) + y(nT " 2T ) + x(nT )

6.16 A digital filter has a difference equation: What is its output sequence in response to a unit impulse applied to its input?

Ans.{0, 1, 0, 1, 0, 1, …}

Transforming the difference equation to the z domain gives:

!

y(nT ) = y(nT " 2T ) + x(nT "T ).

!

Y(z) = Y(z)z"2

+ X (z)z"1

Then block diagram can then be drawn from this equation:

Y(z)

X(z)

1

29

Page 30: Selected Answers Ch 1-8

Putting the unit impulse sequence {1, 0, 0, 0, 0, …} into the filter and following the signal to the output gives the output sequence {0, 1, 0, 1, 0, 1, 0, 1, 0, …}.

6.18 The difference equation of a filter is:

!

y(nT ) = x(nT ) + x(nT " 2T ) + y(nT " 2T )

located? . Where are its poles and zeros

Ans. zeros:

!

z = 0 ± j1 poles:

!

z = "1+ j0;z = 1+ j0

6.20 A digital filter has two zeros located at z = 0.5 and z = 1, and two poles located at z = 0.5 and z = 0. Write an expression for (a) its amplitude response as a function of a single trigonometric term, and (b) its phase response.

Ans.

!

H(z) =z " 0.5( ) z "1( )z " 0.5( ) z " 0( )

= 1" z"1

30

Page 31: Selected Answers Ch 1-8

Substitute

!

z = ej"T :

!

H("T ) = 1# e# j"T

Then use half angles to reduce to a single trigonometric form.

!

H("T ) = e

# j"T

2

$

% &

'

( )

e

j"T

2

$

% &

'

( ) # e

# j"T

2

$

% &

'

( )

$

%

& & &

'

(

) ) )

=

!

= e

" j#T

2

$

% &

'

( )

cos#T

2

$

% &

'

( ) + j sin

#T

2

$

% &

'

( ) " cos

#T

2

$

% &

'

( ) " j sin

#T

2

$

% &

'

( )

*

+ ,

-

. /

0 1 2

3 4 5

=

!

H("T ) = e

# j"T

2

$

% &

'

( )

j2sin"T

2

$

% &

'

( )

* + ,

- . /

We want the form

!

Rej" where R is the purely real amplitude response and θ

is the purely imaginary phase response. To make the term in brackets purely real, we need to incorporate the j into the phase term. To do this, we need to use the trigonometric identity:

!

ej" = cos "( ) + j sin "( )

If

!

" =#

2,

!

e

j"

2

#

$ %

&

' (

= cos"

2

#

$ %

&

' ( + j sin

"

2

#

$ %

&

' ( = 0 + j1= j

Therefore, we can replace j with

!

e

j"

2

#

$ %

&

' ( :

!

H("T ) = e

# j"T

2

$

% &

'

( ) e

j*

2

$

% &

'

( )

2sin"T

2

$

% &

'

( )

+ , -

. / 0

= e

j1

2*#"T( )

1

2 3

4

5 6

2sin"T

2

$

% &

'

( )

+ , -

. / 0

31

Page 32: Selected Answers Ch 1-8

!

H("T ) = 2sin"T

2

#

$ %

&

' (

!

"H(#T ) =1

2$ %#T( )

6.22 A digital filter has the block diagram shown below. (a) Write its transfer function. (b) Where are its poles and zeros located?

Ans.

(a)

!

H(z) =

1+1

2z"1

2

3"

1

6z"1

(b) zero:

!

z = "1

2pole:

!

z =1

4

6.24 Application of a unit impulse to the input of a filter produces the output sequence {1, 0, 1, 0, 1, 0, …}. What is the difference equation for this filter?

Ans.

!

y(nT ) = x(nT ) + y(nT " 2T )

32

Page 33: Selected Answers Ch 1-8

6.26 Write the transfer functions of the following digital filters:

(a) (b)

(c)

Ans.

(a)

!

H(z) =z"1

1"1

2z"1" z

"2+

1

2z"3

(b)

!

H(z) = 21+ z

"1

1" z"1

#

$

% %

&

'

( (

(c)

!

H(z) =1

1+ 2z"2

+ z"4

6.28 Write the amplitude response of a filter with the transfer function:

!

H(z) =z"2

1" z"2

33

Page 34: Selected Answers Ch 1-8

Ans.

!

H("T ) =1

2sin "T( )

6.30 A filter operating at a sampling frequency of 1000 samples/s has a pole at z = 1/2 and a zero at z = 3. What is the magnitude of its amplitude response at dc?

Ans.

!

H("T )"T=0

= 4

6.32 A filter has the difference equation: y(nT) = y(nT – 2T) + x(nT) + x(nT – T). What traditional filter type best describes this filter?

Ans.Integrator

6.34 The difference equation for a digital filter is:

!

y(nT ) = x(nT ) " ax(nT "T ) " by(nT "T ). Variables a and b are positive integers. What traditional type of filter is this if a = 1 and (a) b = 0.8, (b) b > 1?

Ans. (a) high-pass (b) unstable

6.36 Write the (a) amplitude response, (b) phase response, and (c) difference equation for a filter with the transfer function:

Ans.

!

H(z) =z "1

2z + 1

!

H(z) =z "1

2z + 1=

1" z"1

2 + z"1

34

Page 35: Selected Answers Ch 1-8

The filter’s amplitude and phase responses are found by substituting for z:

!

ej"T

!

H("T ) =1# e

# j"T

2 + e# j"T

Now substitute

!

e" j#T = cos #T( ) " j sin #T( )

Giving

!

H("T ) =1# cos "T( ) # j sin "T( ){ }2 + cos "T( ) # j sin "T( ){ }

=1# cos "T( ){ } + j sin "T( )2 + cos "T( ){ }# j sin "T( )

Let

!

A = 1" cos #T( )

!

B = sin "T( )

!

C = 2 + cos "T( )Then

!

H "T( ) =A + jB

C # jB

Multiply by the complex conjugate of the denominator

!

H "T( ) =A + jB

C # jB$

C + jB

C + jB=

AC # B2% & ' (

) * + j AB + BC( )

B2 + C2

The amplitude response is

!

H "T( ) =

AC # B2$

% & '

( ) 2

+ AB + BC( )2

B2 + C

2

The phase response is

!

"H #T( ) = tan$1 AB + BC

AC $ B2

%

& '

(

) *

35

Page 36: Selected Answers Ch 1-8

Substitute the equivalents for variables A, B, and C from above, and you will get the final answer.

(c)

!

y(nT ) =1

2x(nT ) " x(nT "T ) " 2y(nT "T )[ ]

6.38 A filter operating at a sampling frequency of 200 samples/s has poles at z = ±j/2 and zeros at z = ±1. What is the magnitude of its amplitude response at 50 Hz?

Ans.

!

H("T )f =50 Hz

=8

3

The sampling frequency is 200 sps and the value of the amplitude response

!

"2

is desired at a frequency of 50 Hz. This corresponds to an angle of on

the unit circle.

!

H(z) =z "1( ) z + 1( )

z + j1

2

#

$ %

&

' ( z " j

1

2

#

$ %

&

' (

=z

2 "1

z2 +

1

4

=1" z

"2

1+1

4z"2

To find the amplitude response, substitute into this equation, giving:

!

z = ej"T

!

H("T ) =1# e

# j2"T

1+1

4e# j2"T

To find the amplitude response at

!

"T

2=#

2, substitute this angle into this

equation:

!

H("T )"T=

#

2

=1$ e

$ j2"T

1+1

4e$ j2"T

"T=#

2

=1$ e

$ j#

1+1

4e$ j#

=1$ cos(# ) $ j sin(# )( )

1+1

4cos(# ) $ j sin(# )( )

=

36

Page 37: Selected Answers Ch 1-8

!

H("T )"T=

#

2

=1$ ($1$ j0)

1+1

4($1$ j0)

=2

34

=8

3

6.40 A filter has the difference equation:

!

y(nT ) = y(nT "T ) " y(nT " 2T ) + x(nT ) + x(nT "T ). What is its transfer function?

Ans.

(a)

!

H(z) =1+ z

"1

1" z"1

+ z"2

(b) unstable

6.42 A filter has a transfer function that is identical to the z transform of a unit step. A unit step is applied at its input. What is its output sequence?

Ans.{1, 2, 3, 4, 5, …}

6.44 A ramp applied to the input of digital filter produces the output sequence: {0, T, T, T, T, …}. What is the transfer function of the filter?

Ans.

!

H(z) = 1" z"1

6.46 A discrete impulse function is applied to the inputs of four different filters. For each of the output sequences that follow, state whether the filter is recursive or nonrecursive. (a) {1, 2, 3, 4, 5, 6, 0, 0, 0,…}, (b) {1, –1, 1, –1, 1, –1,…}, (c) {1, 2, 4, 8, 16,…}, (d) {1, 0.5, 0.25, 0.125,…}.

Ans. (a) is nonecursive; the rest are recursive; (b) and (c) are unstable

37

Page 38: Selected Answers Ch 1-8

6.48 A differentiator is cascaded with an integrator. The differentiator uses the two-point difference algorithm:

!

H1(z) =1" z

"1

T

The integrator uses trapezoidal integration:

!

H2(z) =T

2

1+ z"1

1" z"1

#

$

% %

&

'

( (

A unit impulse is applied to the input. What is the output sequence?

Ans.

(a)

!

1

2,1

2,0,0,0,…

" # $

% & '

(b) low-pass

6.50 A digital filter has two zeros located at z = 0.5 and z = 1, and a single pole located at z = 0.5. Write an expression for (a) its amplitude response as a function of a single trigonometric term, and (b) its phase response.

Ans.

(a)

!

H("T ) = 2sin"T

2

#

$ %

&

' (

(b)

!

"H(#T ) =1

2$ %#T( )

6.52 The difference equation for a filter is:

!

y(nT "T ) = x(nT "T ) + 2x(nT " 4T ) + 4x(nT "10T ). What is its transfer function, H(z)?

Ans.

!

H(z) = 1+ 2z"3

+ 4z"9

38

Page 39: Selected Answers Ch 1-8

6.54 A digital filter has the following output sequence in response to a unit impulse: {1, –2, 4, –8,…}. Where are its poles located?

Ans.

!

z = "2

6.56 The difference equation for a filter is:

!

y(nT ) = 2y(nT "T ) + 2x(nT ) + x(nT "T ). What are the locations of its poles and zeros?

Ans.

zero:

!

z = "1

2pole:

!

z = 2

6.58 A discrete impulse function is applied to the inputs of four different filters. The output sequences of these filters are listed below. Which one of these filters has a pole outside the unit circle?

(a) {1, 2, 3, 4, 5, 6, 0, 0, 0,…} (b) {1, –1, 1, –1, 1, –1,…} (c) {1, 2, 4, 8, 16,…} (d) {1, 0.5, 0.25, 0.125,…}

Ans. (c)

6.60 What is the transfer function H(z) of a filter described by the difference equation:

!

y(nT ) + 0.5y(nT "T ) = x(nT )

Ans.

!

H(z) =1

1+ 0.5z"1

39

Page 40: Selected Answers Ch 1-8

Chapter 7

7.10 Calculate expressions for the amplitude and phase response of a filter with the z transform

!

H(z) = 1" z"6

Ans.

!

H("T ) = 2sin(3"T )

!

"H(#T ) =$

2% 3#T

7.11 The numerator of a transfer function is (

!

1" z"10). Where are its zeros

located?

!

f = 0). Ans.Every 36° starting at dc (

7.12 A filter has 12 zeros located on the unit circle starting at dc and equally

!

1" z"12spaced at 30˚ increments (i.e., ). There are three poles located at z =

+0.9, and z = ±j. The sampling frequency is 360 samples/s. (a) At what frequency is the output at its maximal amplitude? (b) What is the gain at this frequency?

Ans. (a) f = 90 Hz

(b)

!

H("T )f =90 Hz

= 4.46

The transfer function is:

!

H(z) =1" z

"12

1+ z"2#

$ % &

' ( 1" 0.9z

"1# $ % &

' (

This is what it looks like with DigiScope.

40

Page 41: Selected Answers Ch 1-8

Although the maximal gain occurs in two places, when I designed the

!

"T =#

2problem, my intent was to make it be maximal at . So this is the

angle corresponding to

!

f =fs

4where we will find the amplitude response.

To find the gain at this frequency, first substitute

!

z = ej"T into the transfer

function.

!

H("T ) =1# e

# j12"T

1+ e# j2"T$

% & '

( ) 1# 0.9e

# j"T$ % & '

( )

Now evaluate this amplitude response for the gain at

!

"T =#

2.

41

Page 42: Selected Answers Ch 1-8

!

H("T )"T=

#

2

=1$ e

$ j12"T

1+ e$ j2"T%

& ' (

) * 1$ 0.9e

$ j"T% & ' (

) *

=1$ e

$ j12"T

1+ e$ j2"T%

& ' (

) * 1$ 0.9e

$ j"T% & ' (

) * "T=

#

2

=

!

=1" e

" j12#T

1+ e" j2#T$

% & '

( ) 1" 0.9e

" j#T$ % & '

( ) #T=

*

2

=1" e

" j6*

1+ e" j*$

% & '

( ) 1" 0.9e

" j*

2

$

%

& & &

'

(

) ) )

=

!

=1" cos(6# ) " j sin(6# )[ ]

1+ cos(# ) " j sin(# )[ ]{ } 1" cos#

2

$

% &

'

( ) " j0.9sin

#

2

$

% &

'

( )

*

+ ,

-

. /

0 1 2

3 4 5

=

!

=1" 1" j0[ ]

1+ "1" j0[ ]{ } 1" 0 " j0.9[ ]{ }=

0

0

The result is indeterminate, so we need to use L’Hôpital’s rule and find the derivative of the numerator and divide it by the derivative of the denominator.

!

d Num"T( )

d Den"T( )

=1# e# j12"T

1+ e# j2"T$ % & '

( ) 1# 0.9e# j"T$ % & '

( )

=

!

=

" " j12e" j12#T$

% & '

( )

1+ e" j2#T$

% & '

( ) " j0.9e

" j#T$ % & '

( ) + 1" 0.9e

" j#T$ % & '

( ) " j2e

" j2#T$ % & '

( )

=

!

=j12e

" j12#T

" j0.9e" j#T

" j0.9e" j3#T

" j2e" j2#T

+ j1.8e" j3#T

=

42

Page 43: Selected Answers Ch 1-8

!

=12e

" j12#T

" j0.9e" j#T

" j2e" j2#T

+ j0.9e" j3#T

=

Evaluate this expression at

!

"T =#

2.

!

d Num"T( )

d Den"T( )

"T=#

2

=12e$ j12"T

$0.9e$ j"T$ 2e$ j2"T + 0.9e$ j3"T

"T=#

2

=

!

=12 cos(6" ) # j sin(6" )[ ]

#0.9 cos"

2

$

% &

'

( ) # j sin

"

2

$

% &

'

( )

*

+ ,

-

. / # 2 cos(" ) # j sin(" )[ ] + 0.9 cos

3"

2

$

% &

'

( ) # j sin

3"

2

$

% &

'

( )

*

+ ,

-

. /

=

!

=12 1" j0( )

"0.9(0 " j1) " 2("1" j0) + 0.9(0 " j("1))=

12

j0.9 + 2 + j0.9=

12

2 + j1.8

Multiply both numerator and denominator by the complex conjugate of the denominator.

!

=12

2 + j1.8"

2 # j1.8

2 # j1.8=

24 # j21.6

4 + 3.24= 3.31# j2.98

The gain at

!

"T =#

2is:

Gain =

!

3.31( )2

+ 2.98( )2

= 10.96 + 8.88 = 19.84 = 4.45

Gain =

!

20log10 4.45( ) = 13 dB

43

Page 44: Selected Answers Ch 1-8

7.13 A digital filter has the following transfer function. (a) What traditional filter type best describes this filter? (b) What is its gain at dc?

!

H(z) =1" z

"6

1" z"1#

$ % &

' ( 1" z

"1+ z

"2# $ % &

' (

Ans. (a) low-pass

(b)

!

H("T )"T=0

= 6

7.14 For a filter with the following transfer function, what is the (a) amplitude response, (b) phase response, (c) difference equation?

!

H(z) =1" z

"8

1+ z"2

Ans.

(a)

!

H("T ) =sin(4"T )

cos("T )

(b)

!

"H(#T ) =$

2% 3#T

(c)

!

y(nT ) = "y(nT " 2T ) + x(nT ) " x(nT "8T )

7.15 A digital filter has the following transfer function. (a) What traditional filter type best describes this filter? (b) Draw its pole-zero plot. (c) Calculate its amplitude response. (d) What is its difference equation?

!

H(z) =(1" z

"8)2

(1+ z"2 )2

44

Page 45: Selected Answers Ch 1-8

Ans. (a) Bandpass

(b)

(c)

!

H("T ) =sin(4"T )

cos("T )

# $ %

& ' (

2

(d)

!

y(nT ) = "2y(nT " 2T ) " y(nT " 4T ) + x(nT ) " 2x(nT "8T ) + x(nT "16T )

!

"

!

"

!

"

!

"

7.16 What is the gain of a filter with the transfer function

!

H(z) =1" z

"6

1" z"1

Ans.

!

H("T )"T=0

= 6

7.17 What traditional filter type best describes a filter with the transfer function

!

H(z) =1" z

"256

1" z"128

45

Page 46: Selected Answers Ch 1-8

Ans. Comb filter

7.18 What traditional filter type best describes a filter with the transfer function

!

H(z) =1" z

"200

1" z"2

Ans.band-reject

7.19 A digital filter has four zeros located at z = ±1 and z = ±j and four poles located at z = 0, z = 0, and z = ±j. The sampling frequency is 800 samples/s. The maximal output amplitude occurs at what frequency?

Ans.f = 200 Hz

7.20 For a sampling rate of 100 samples/s, a digital filter with the following transfer function has its maximal gain at approximately what frequency (in Hz)?

Ans.f = 16.67 Hz

!

H(z) =1" z

"36

1" z"1

+ z"2

7.21 The z transform of a filter is:

!

H(z) = 1" z"360

The following sine wave is applied at the input: sampling rate is 720 samples/s. (a) What is the peak-to-peak output of the filter? (b) If a unit step input is applied, what will the output amplitude be after 361 samples? (c) Where could poles be placed to convert this to a bandpass filter with integer coefficients?

!

x(t ) = 100sin(2"10t ). The

46

Page 47: Selected Answers Ch 1-8

Ans. (a) Since

!

"T = 2#ft , then f = 10 Hz. There are 360 zeros on the unit circle every 2 Hz, so there is a zero at 10 Hz. Therefore, the output for any amplitude 10-Hz input is zero.

(b) 0

(c) ±60°, ±90°, or ±120°

7.22 What is the phase (i.e., group) delay (in milliseconds) through the following filter which operates at 200 samples/sec?

!

H(z) =1" z

"100

1" z"2

Ans.245 ms (–49T)

7.23 A filter has 8 zeros located on the unit circle starting at dc and equally spaced at 45° increments. There are two poles located at z = ±j. The sampling frequency is 360 samples/s. What is the gain of the filter?

Ans. Gain = 4

47

Page 48: Selected Answers Ch 1-8

Chapter 8

8.1 What are the main advantages of adaptive filters over fixed filters?

Ans.Adaptive filters can continuously “learn” and change characteristics as thenoise characteristics of the signal change.

8.7 What are the costs and benefits of using different step sizes in the 60-Hz sine wave algorithm?

Ans.A smaller step size requires a longer time to adaptively change in responseto changes in the signal. If the step size is too small, the filter may neveradapt. Too large a step size will not permit the filter to track a signal.

8.8 Explain how the 60-Hz sine wave algorithm adapts to the phase of the noise.

Ans.Adjusting the trajectory of the estimated noise signal modifies both theamplitude and phase of estimated signal.

8.9 The adaptive 60-Hz filter calculates a function

!

f (nT + T ) = x(nT + T ) " e(nT + T )[ ] " x(nT ) " e(nT )[ ]

If this function is less than zero, how does the algorithm adjust the future estimate,

!

e(nT + T )

!

e(nT + T )

?

Ans.Reduces by a small amount d.

8.10 The adaptive 60-Hz filter uses the following equation to estimate the noise:

!

e(nT + T ) = 2Ne(nT ) " e(nT "T )

If the future estimate is found to be too high, what adjustment is made to (a) e(nT – T), (b) e(nT + T). (c) Write the equation for N and explain the terms of the equation.

48

Page 49: Selected Answers Ch 1-8

Ans. is NEVER adjusted. (a)

!

e(nT "T )

(b) If the future estimate is found to be too high (i.e.,

!

f (nT + T ) < 0), then

!

e(nT + T ) is DECREASED by a small amount:

!

e(nT + T ) = e(nT + T ) " d

(c)

!

N = cos2"f

f s

#

$ %

&

' ( is the noise frequency;

!

f is the sampling frequency

!

fs

8.11 The adaptive 60-Hz filter calculates the function

!

f (nT + T ) = x(nT + T ) " e(nT + T )[ ] " x(nT ) " e(nT )[ ]

It adjusts the future estimate

!

e(nT + T ) based on whether this function is greater than, less than, or equal to zero. Use a drawing and explain why the function could not be simplified to

Ans.

!

f (nT + T ) = x(nT + T ) " e(nT + T ) .

The original definition of the estimated noise

!

e(nT ) did not include the dc level. This equation eliminates dc.

49