25.08.2021 Views

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

692 Chapter 22 Difference equations and the z transform

Engineeringapplication22.4

Development of a moving average filter to calculate the height

ofacidinachemicaltank

A common problem in chemical engineering is that the height of liquid in a tank is

difficulttomeasureaccuratelybecauseoftheliquidswillingaround.Onesolutionto

thisproblemistouseamovingaveragefiltertosmoothoutanyvariationsinheight

obtainedfromthetankpositionsensor.Akeydesigndecisionishowmanypastdata

points to use when constructing the moving average filter. In practice this depends,

amongst other things, on how much the liquid moves around. It is important not to

usetoomanypointsorsignificantvariationsinheightmaynotbepickedupintime.

However,iftoofewpointsareusedthentheoutputfromthefiltermaybetoospikyto

beofuse.Considerthecaseofamovingaveragefilterthatmakesuseofthefivemost

recentlymeasuredvaluesoftheleveloftheliquidinthetank.Formulateadifference

equation tocarryout thisaveraging and draw an equivalent block diagram.

Leta[n] represent the average level of the acid in the tank and letl[n] represent

the sampled values of the level measurements received from the transducer. Then,

a[n] = l[n]+l[n−1]+l[n−2]+l[n−3]+l[n−4]

5

Theblockdiagramforthisdifference equationisshowninFigure22.11. Theaction

of taking a moving average of sampled values is equivalent to passing the sampled

valuesthroughalow-passfilterbecauseitfiltersouthigh-frequencyvariationsinthe

sampledvalues.Thisprocessistermeddigitalfilteringordigitalsignalprocessing.

T

l[n – 1]

l[n]

l[n]

T

T

l[n – 2]

S

3

a[n]

T

T

T

T

T

T

l[n – 3]

T

l[n – 4]

1—

5

Figure22.11

Block diagram ofamoving averager.

EXERCISES22.4

1 Design adigital filterbasedontaking a moving

average ofthe last threevalues ofasampledsignal.

2 Acomputerisfedasignalrepresentingthevelocityof

an objectasafunctionoftime.Prior to enteringthe

computer the signal is sampled usingan

analogue-to-digitalconverter. Derive adifference

equationandassociatedblock diagramto obtain the

accelerationofthe objectasafunctionoftime.

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

Saved successfully!

Ooh no, something went wrong!