25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

696 Chapter 22 Difference equations and the z transform

Solution k =0 k =1

2x[2] −x[1] +x[0] = 0 2x[3] −x[2] +x[1] = −1

x[2] = 1 x[3] = − 3 2

k =2

2x[4] −x[3] +x[2] = −4

x[4] = − 13 4

Asthepreviousexamplesillustrate,todetermineauniquesolutiontoafirst-orderequation

requires one initial condition; for a second-order equation, two initial values are

required.

Engineeringapplication22.5

Numericalsolutionoftheoutputfromadigitallow-passfilter

Recall from Engineering application 22.2 that a low-pass filter is a filter that is designedtoattenuatehighfrequencysignals.Asimpledifferenceequationforadigital

filter isgiven by:

y[n] −ay[n −1] =x[n]

Ifaispositive thenthe filter isalow-passfilter. We will choosea = 0.5 and so

y[n] = 0.5y[n −1] +x[n]

Letusexaminetheresponseofthisfiltertoaunitstepinputappliedatn = 0,thatis

{ 0 n<0

x[n] = n ∈ Z

1 otherwise

Assume the output of the filter is zero prior to the application of the step input, that

isy[n] = 0 forn −1.Fromthe difference equation,wefind

Similarly,

y[0] = 0.5y[−1] +x[0]

= 0.5(0) +1

= 1

y[1] = 0.5y[0] +x[1]

= 0.5(1) +1

= 1.5

andsoon.Whennumericallysolvingadifferenceequation,itisoftenusefultoform

a table with intermediateresults. Table 22.1 shows suchatable.

Figure 22.16 shows the input and output sequences superimposed on the same

graph. The sequence values have been joined to illustrate their trends. Note that the

input signal reaches its final value immediately whereas the output signal takes several

sample intervals to reach its final value. Engineers often refer to this process as

‘smoothing’theinputsignal.WewillseeinChapter23thatrapidlychangingsignals

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!