This preview shows pages 1–14. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ELECTRONOTES . Wﬂﬂ.ﬂn§2§ l PHEASANT LANE . Feb/Mar/Apr 1987
ITHA‘CA, NY_  14850 ' FINITE_ 0RD LENGTH EFFECTS m QIGITAL was (607)27358030 an OVERALL 1.5g: The first step in digital filter design is what we can call "network design."
At this step, we use a suitable designprocedure toarrive at a transfer function
H(z). At the same time, this H(z) automatically makes available a number of
possible digital filter networks which correspond to.it. At this point, all the
'possible structures are equivalent, and there are no further complications that
are apparent, assuming all network elements and conditions are ideal.. In a_second step, we need to look at the implicatidns of various practical
limitations « principally the finite word length of the signals and network
coefficients involved. The findings and adjustments in this second step have a
major effect on the third step, which would bring in actual hardware. Among the effects to be considered in this second step of the designare the
following: "' " ' 1.. Finite m Length o_f Coefficients: When we calculate a network coefficient, we usually have its value
to arbitrary precision. When it comes down to realizing the filter
with a finite number of bits, we can't get these exactly, but must
settle for the closest digital level. Thus we get a slightly
different.filter from the one we would get with infinite precision.,
This is similar to the "passive sensitivity” problem with analog
"filters, except in the analog case, the variations from the  _
calculated design_are statistical (the tolerances of resistors and
capacitors). In the digital filter case, we.get a different filter
than nominal, but we know exactly what filter this is, since.the .'
coefficients are set exactly to the (now imperfect) digital levels
available. .These'effectshave a major influence on the choice"
among possible digital filter structures, In particular, cascade.
networks and lattice networks are preferred to direct form networks. 2. 'Roundoff and Quantization Errors of Signals: ' In the same way that we can notset the coefficients to the exact
value needed, we cannotset the signals to exact values, butmust
. 'settle for available digital levels. This process of choosing an
_ available_digital level is called quantization. Quantization can
occur in the original conversion of a signal from analog to digital
form, and also as a result of aroundoff error that occurs following
multiplication. In many cases, we can describe the effects of this
quantization error in terms of an equivalent noise, but this does
not always work well, or at all. In addition, the filter may have_
a subStantial "amplification" effect on the roundoff noise, and
this is usually a problem with recursive (feedback) structures. 3. Limit Cycle: It is clear that coefficient roundoff error can result in filters"
with.vastly.different frequency'response than desired, and often in
filters that are actually unstable; We can look at the roundoff ‘ of signals_as being equivalent to a temporary change of coefficienti'
In general this effect is temporary and random, and is best treated
in terms of noise, and not of.stability, since there is no conspired 'AN~295'(l) effort to keep the effective value of the coefficient both wrong and
"constant. The equivalent effect is more of a "noisy COETflClent", However, the rounding is clearly more important for very small signals, and
in the case of a very simple signal, or of zero signal, the effect of _ rounding can become coherent and no longer quasirandom, In the case of ' zero signal, arrived at when an input which was nonzero becomes zero, a
residual "limit cycle" oscillation can occur, This is usually a fairly
small oscillation which can be understood as the effect of rounding
placing one or more poles on the unit circle, .4. gyerflow aﬂd Overflgw Oscillations: Since there are only a limited number of hits, it is clear that it is
possible for a signal to exceed the maximumvalue, at least in some casas,
This is clearly undesirable, since at best it is a nonmlinearity. At
worse, it may cause a self—sustaining, highlevel overflow oscillation.
Thus, with a known number of bits, a good deal of scaling at various places
in the network is desirable and often necessary. ' 5. Sampling Errors; In addition to the quantization effects of sampling, we may need to watch
out for other_problems, This includes of course such problems as1
aliasing, but also errors in the A/D and D/A converters, the effective
rollmoff of the sample—andhold of the D/A, and phase distortion in the
input guard and output smoothing filters. FINITE Mono LENGTH g5 COEFFICIENTS: In the realization of‘a digital filter, there will be a certain number of bits
available at the input to a multiplier to represent the coefficient, and usually
we_need to work Only with integers. In addition, we often need to use one of these
bits to somehow represent the sign, Coefficients that happen to come out integers
needno Special consideration. However, coefficients thatare irrational fractions
need to be approximated by_suitable rational fractions, Generally the denominator of
.the rational fraction has to be a power of two, since_division is done with a right
shift, The allocation of available bits to the numerator is then.a question of the
range of coefficients that must be considered in any one multiply/accumulate operation,
More will be said about how this “largest coefficient” is determined in a moment, We can start by assuming that we have available in the system N+l total bits,
and that one bit is used for.the sign, leaving N bits, or2_N levels for representing
the magnitude ' Next we determine the largest coefficient to be realized, and we
determine the largest powerof two that is needed to represent this magnitude, and
this we denote by 2m. For example, if the magngtude of the largest coefficient is
23.l2353..., then_this lies between.24=l6 and 2 =32, so m=5.' This permits us to
determine the power oftwo,'2k, by which we must divide following multiplication.
This will be accomplished by a right shift by k bits. ' ‘The power of two by which we must divide, 2k, forces us to consider representing
a maximum magnitude of 2m, exceeding the maximum coefficient.magnitude, Thus we can
write: " ' ‘ ‘ a ' °ri N — k = m _ ' _ ,. 1. i ' (2)
_from which we determine. the unknown Value of~k from theknown_Nand'm. Next we can __,
considerthe integer.multiplier which correSponds to any given coefficient, To_do
' this we multiply the coefficient up by 2k, and then round to the nearest integer..
' Nowa‘theractualCOEfflClent that we end up With is this integer divided by 2k. This is.not the ideal value of the coefficient, but the best we can do with a specified
number of bits. However, we do knowexactly what this coefficient is now, While we ~ AN295 (2) do not end up with our nominal filter, we do end up with a filter_that we know
exactly" The determination of the exact coefficients we end up With is given by: , _ Round[02k] _  INT[c2k + 0.5] 3
C ' “"—k—'“— ‘ k ( l
2 2 where c' is the actual coefficient and c is the nominal one" The notation "Round"
indicates rounding to the nearest integer, This rounding can be done by hand, or i
ifdesired, using the “highest integer” or INT function available on many i
calculators and computers» Once all the coefficients are redetermined, according to equation (3), we can examine the resulting filter for stability and then for a suitable approximation to the desired frequency response» Having thus formalized the methods that are used to determine the coefficients
in terms of integers, we need to address the question of exactly what coefficients
are involved in any case where we need to determine the largest one. This answer
depends not just on the.structure, but in the exact manner in which the
calculations are to be done, In some cases, we must look ahead to the actual
hardware that will be involved in order to determine this, The example below will
illustrate variou5'possibilities" ' _ For our example, consider the digital filter deSign'of an 8thorder Butterworth a
low—pass which has a cutoff frequency at l/5 the sampling frequency Using bilinear
z transform method, we arrive at the transfer function: 8' 7. 6' 5' 4 .3. .'2 '
_ b 2 + b 2 + b 2 + b 2 + b 2 + b.z + b 2. + b 2 + b
“(2) = 8 7 6 5t 4 3 2 l _o (4)
8 '7 ' 6 5 4 3 2 az+ Z‘l" z+az+a +, +3
8 a7 as 42 332 + ‘ z + a
5 zalo 2 where the coefficients are given in Table l as: Table l
L an _____bn
8 l  ' l
7 lt590573 8
6 2,083835. _ l 28
5 «l0532653 _ 56 n
4 _ 00869465 70
3 »0.3l9l885 56
2 0,08209454 . .28 _
.l‘ +000l224753_ _' 8
" 0" 0100086l4464 1 Fig. l shows the corresponding realization Of this filter in direct form, here.
assuming that the coefficients can be realiZed to the full accuracy shown“ We can next consider the realization of the direct form with a limited number
of bits“ If we choose 8 bits total, this leaves 7 bits fer the magnitude. We will
concern.ourselves with the feedback coefficients, and the maximum magnitude ofthese
is the one of 2.083835, which is between 21=2 and 22=4, so here m=2. This means
that N=7 and m=2, giving k=5 (equation 2). Thus we will realize the coefficients
as fractions that have_an integer less than l28 in the numerator, and 25:32 in the
.denominator" The integers are determined by rounding the product of the nominal _
coefficient and 32. Fig“ 2 shows the result of thisapproach, which cerresponds' 
to.Fig. 15 Note that two of the coefficients have been reunded down to zero, so _
there is a loss_of'two poles.. Also,_a divider of l/256 has been added to'the" ”
"output;totkeep'thesignal.level from the feedforward_pathsrdownto reasonable 'vﬁ~“ AN—295 (3) *20083835 10532653 II
N. “0.869465 0i3l91885 0.08209454 0.01224753 r 0300086l4464 Fig. l Nominal Direct Form of a 8th0rder Butterworth Lowpass designed
using BilinearZ method with f5 =_5f3db. _ In order to judge the effect of being limited to eight bits, we can compute back
the coefficients from the integers, and this gives for the feedback coefficients the
results of Table 2. Table 2_ .11. .30. 8 1‘ 2 —51/32 =l 59375"
_ a 67/32 = 2 09375 5 49/32 =i“53125 4 28/32 =0.87500 3‘ «10/32 =~0.31250 2 3/32 = 0.09375.
' li~  .' ‘ r 0/32 = 0 0 r a . _ . .. . 0/32 = 0 These values we Can compare with those of Table l, and we see that there are somea<
important differences. To understand exactly what the consequences of these changes
ane,we can look at the change of the poles positions from nominal, and we can look at
the change of the frequency response from nominal" Fig. 3 shows the nominal pole AN¥2§S“(4) 1/256 0 ' A 'Po1es with
”i "8 bits for I . 3=,nomina15
. coeff1c1ents I ' "' “'7 AN295 (5) mmmulmummumumun IIIIII IIIIIIIuImmmmImummunmm IIIllllllll IIIllllllllllIilllllillllllllllllllil IIIIIII llﬂllII1IllIIIIIIIIIIIIIIIIIIIIHIIIIIII
II IllIIIIIIIIIIIIIIIIllllllllllllllllil llllllltllmmlillllllllllllllllulllllll F 5
IIIIllIlllIllllll!IE!{Ingliﬂilliﬂluglll IIIIIIIIIIIHIIIIIJI llllllllllﬂllllllllll , ————IIIIIIuluulmunm
nmualllummmuumﬂm lm—IW “mmI'll! MGMill 2
"IIIIIIIIII‘HIIIIII‘IIIIIII" Illllllﬂ Illmllllﬂlﬂllﬂﬂ
Ill" Hmmmn ltﬂﬂl‘lllllﬂ IHIIIIIIIIlllllllllllmIIIIIHIHIIIllllllllllllﬂlllllillI'IIIIIIIII lllllllllll‘lllﬂﬂlul mm ummmw  warm“.nnaunmnnn: inn": 9% wanna: MOHW‘O" p. mwnnuunlmﬂmm
IIImlilm:llumlullmIH—I:m
"'"""“"""' """"“"'"""'""""'"" ﬂu'.""""—'m"'"'" ""’""""' 2 mmammmmmmsmmmmmm. mﬁ'ﬁ‘émmnmnmmm ml.IIIIIIIlIlﬂllllﬂmlllllIllllmumMull'I—“Immlﬂmﬂﬂlﬂlllﬂﬂﬂllﬂﬂﬂlﬂmu
mIllllllllmIIIImiﬂﬂmlllIlllﬂlllllllllllﬂllﬂlII “null"HI"IIII‘II‘IIIWHIIIIIIIIIIIIMIMIIMI EmuIIIIIIIIIIlllllllliWﬂﬂllllﬂllllllﬂlllﬂlMllIII IIIIIIIIIIII!
IIIIIIIIIIIIIIII‘IIIlllllllllllllllﬂﬂlllllllllﬂmtllluﬂﬂllIIIIIIIIIIII uumm [Illllllllllllllllllltﬂmli
IIIIIIIIIIIIIIIIIIIWilﬂﬂiﬂlllllﬂlﬂlﬂlﬂuﬂlﬂmI“ IIIIIII IlllllllﬂlllllllﬂlIIIIIIIIIIIIIIIIMHEII It
nunlnunnnuummmmuumu man mnmumumum
IllIIIIIII Illmnummumumn IIIIIII muummmnu l‘l
lull“IIIIIIIIMIIIIIMIHIIIHIHHIII Imuummmmmmm In] mammalian
[I'lllllllllllllllﬂlllllululumlmlll Illllllllmlllinll IIIIIIII Illmmm%mmunmlmmmummu IIIIIIIIIIIIIIIIIIIIIHIIIHIIHIIIIH llllllllﬂllllllllllliﬂlllll'll IIII positions for the idea} fiiter, Whiie Fig. 4 shews the positions of the remaining'"
six poles after reaiization with 8 bits“ Cieariy there has been a substantia1
motion_in the pole positions,.aithough no poles have yet moved outside the unit circle. .\ 7 a ‘Fig; 5 shoWsthe corresponding nominal frequency response as compared to the.
'frequency response of the 8bit version” _It may be rather surprising that the.
 response is.as Tittie aitered as itis seen to be, judging from the.poie motion of
Figs 4%; _Yet there is over1 db of ripp1e_in the passband, and the filter is quite
.different from the idea1;BUtterw0rth. Note however that the 1055 of two poles does
not have much effect on the asymptotic roiioff (none seen actuaiiy). This is in
contrast to what wouidhappen with an analog fiiter. This can be attributed to the * AN295 (6) fact that the finite zeros at z=wl are still in place, and have the major influence
on the response in the rolloff region, .we can note that what actually happens in Fig. 2 is that first, all data on
the delay line shifts downward, leaving the top value open to be updated. Next,
the "data vector" on the delay line is multiplied by the "coefficient vector“ of
the feedback coefficients (a socalled "dot product" or "inner product”). This
would be done using a multiplier/accumulator, or as a single "subroutine call". _
The result of this feedback calculation (lower left summer in Fig, 2) is then scaled
by l/32 (right shifted by 5 places), and this is added to the input, and this sum
becomes the data value at the top of the delay line; Finally the feedforward path
coefficients are used in a second "dot product” call, The result is conveniently
scaled by 1/256, Note that there is no error in approximating the feedforward
coefficients since in this case of bilinearmz design, all the feedforward
coefficients are integers. Also, note that since the feedforward is a separate
multiply/accumulate operation, we need not consider the feedforward coefficients
when we find the maximum coefficient in the feedback paths. Indeed, due to the
large size of these, it would be impractical to do this, since the maximum value of
70 would dictate m=7 and thus k=0, with all feedback coefficients becoming O, l, or 2
in magnitude. Of course, we could scale the feedfbrward coefficients to any smaller
values, keeping all proportional, and this would take care of the problem. However,
it is still necessary to have separate dot product calls for the feedback and for
the feedforward, since we need to calculate the new data sample that goes into the ' a _topof the delay line, Two approaches Can be used to improving the response of the 8thorder filter,
First, we could Simply increase the number of bits that are used to represent the
_coefficients, Secondly, we could look for a better structure for our filter, It
is known, for example, that cascade form is far superior to direct fbrm in
 performance with regard to_coefficient sensitivity. This superiority in the
.specific case of a finite word_length can be attributed to two faCtors, First, there
is an inherently better sensitivity due to the decoupling of the stages in cascade
form, and to the lower order of sections, Secondly, the magnitudes of the
coefficients in cascade form are themselves generally significantly smaller and
in a'more restricted range; ' ' '_Fig, 6 shows the pole positions for the 8th—order filter realized with 12
bits instead ofonly_8. . The feedback coefficients for this case are givenin
Table 3:  Eble 3
L ' an"
8 . . 1 ' .  ._ .
7, ~814/512=—i..5898438 r 6  10877512 = 240839844 :
5' 3785/512 =.1..5332031 , r
.4 445/512, r=  0.. 8891408.“
, 3 '163/512 =0..3i83594.g_
2 42/512 = 0..08203l3
i 6/5l_2 =0..Oll7l88
._0 ' 0/512; 0 _. It isclearthat we have lost one pole here, instead of two as in the 8bit case.
.The freQUency response function here is.quite near nominal, dispite the motion of
the poles. The reSponse is within the plotting accuracy of the nominal curve in .1
_Fig,'5, : Thus we would think that l2 bits wouldbe sufficient for this particular. "g
case, If we were to moVeytoward:a'Chebyshev design, Weleuld find that this would'n .s
eventually become unsatisfactoryr. '2   . 7,, .____ ._  _ ,: . h, “1 4fA¢muCh better solution;.alternative to increasing the number of bits, isfto,12 change to a cascadestructure} :The cascade structure that correSponds to the Fig, l ANZQS (7). goh686994 _ l O.3085818 ' l O.ll6839 _ l ~00034779 1
Fig. 7 ' Nominal Cascade Form of 8th0rder Butterworth LowPass_' direct form is shown inFig» 7. Since these coefficients are smaller than in direct
form, we can expect to divideby largervalues of 2k and correspondingly be more  preCise in establishing the coefficients closer tonominal values" For thefirst
section, m=01and'thus.ke7 for.tm28 bitS'used'here" Note however that in the other_
three sections the coeffiCients are not only less than l, but also less than l/2i
This allows us to take mel, and k=8, even with 8 bits. The resdlting division by 7 256 can still be accomplished by a right shift, even though 256 is outside the range
of the 7 bits we have available'for magnitude. Fig. 8 shows the implementation of 
the cascade from in terms of integerarithmetic" ' There are usually_several ways of doing things in cascade form. Note that we
would expect that all shifts downward would occur first, and that updating would occur
in the ﬁirst stage (in a manner similar to the direct form) and propagate through the
2 filter, In this case, it is.p055ible to do the feedforward pathsof one stage along  with thefeedback paths of the succeedingstage, allas one dot product call” This
would however cause us to reducethe.value.of.2k (tol28 in this case) and some 7. degree of accuracy on the feedbaqk coefficients would beTost, ‘ _ a
'Fig, 9 shows.the pole plot of the cascade form'of Fig{ 8, and it is Very close ( r5toynominal}; As one wOuld expect, the frequency responseis near nominal as well, \h "'Qwith’in the‘plottihgjaccuracy of'Fig. Clearly the‘cascade form‘is' superior, ‘ L'?even to_the 12bit direct form. AN295 (3) i....‘,,.,....._...._.,..,......m u .. 3=~; gain (freqUency dependent of course)“ 5143 8th— ' . SCALING WITHIN'Iﬁ§_FILTER: . 
_' In'a feedback path, the division by 2k must be precisely chosen so asto
reaiize the propergain around the'loop. There is no choice inthis matter.
On the otherhand, at certain Feedforward points, we do.have some choice as to
‘ I 7‘ " ' ' For example, the input scaling
.2,and the output.sca1ing'of‘1/256 there,might.be subject to some
' * ' ' ' ' 8; as another egampie; "What "' /A for.examp1e, We would preferk .oh'something iike
_ . anaiog signal at the input should be adjusted so that the
..avai1ab1e bit size of~ . _ I r . If theSenreqUirements are not met,
jf”we"are at'ieast starting out with additionai'quantization_noise   _ _ ' tomaintain at all times a signal
.Ievei of at'ieast the Site of the D/A conVerter to come; At the same time, we $128 at anypoint, or ' t _ 7 , _ _ whiCh can be,greaterithanone; ‘uThus, f0?
'9ﬁ;exampie;'if we have a 16bit‘mu1tip1ier, we Want to maintain 16 bits of Signal. AN295 (9) If at the same time, we have a l2~bit D/A at the end, then we want to scale down when
we get there, but preferably not before, If, for example, an excessive right shift
(division to scale) reduces the signal to 7 bits, subsequent reduced levels of'scaling
in later stages may restore the signal size to the needed 12 bits, but the number of
significant bits is never restored. These lesser significant bits were right shifted
off the end, and are not recoverable. . Thus scaling within the filter can be a fairlytricky process, and we want to
maintain the maximum signal level expected, either as a result of input level, or of
peaking with frequency within the filter, within a narrow range, This range is '
restricted on the high side by the full wordsize available, and on the low side by
the number of bits of the D/A, Performance loss for failure.to scale properly is
more a question of quantization noise, and usually not of stability or of response
curve approximation to nominal, . 'QUANTIZATION NOISE AMPLIFICATION BY THE FILTER: _ . It is well known that the effect ofquantization, under proper assumptions of
_ large and complex signals, is describable in terms of an equivalent randomlike noise,
For quantization to levels separated by Q, the variance of the noise (or noise power) is given by: _ ' _
2 _ 2 ' ' ' _
ob  Q /12  _ (5) This "quantiZation noise" may be the result bf the initial sampling process that
converts an analog signal to a digital one. It may also just as well be the “roundoff
noise” that results from truncating a multiplication result to the word length of the'
rest of the system. For example, if two l6bit words are multiplied together, we get
a 32bit word. In cutting this back to l6—bits, we are effectively quantizing again,
with a possible error corresponding to the least significant bit. Usually this
roundoff interval is the same as that of the A/D converter, Thus equation (5) may
represent the A/D converter, or any one of'several multiplier within the filter, We
represent these effects as added noise fOllowing the quantization or roundmoff, H Since the filter has in general several quantization and roundOff noise sources,
we need to know how to access the effects of all of them in terms of an equivalent
noise at the output, We must keep in mind that these noise sources are assumed to
be random and independent, and when added, the variances add  In this study, wewill
find it convenient to describe a noise source as N. When we have more than one noise
sourte, we number then N1, N2, and so on, with the implication.that these are all
gstatistically the same as Njor as each other, That is, if we were looking at any
ohe.of them on a scope for example, we would not be able to guess which one it was
~simply on appearance or the general "level" or "amplitude" ofthe noise signal,
However, specifically,_if we add N1and.N2 forexample, we do not get 2N. This is
because the sources are independent and they_"fight” each other as much as they 
cooperate, on average, It iswell known that the variances canbe added however,
Thus the addition of N1 and N2 would give us something like J?N;. Note however that
I the multiplication of N} by a constant does result in a multiplication of N‘by the
. same constant _, We have simply amplified the noiSe, or scaled_it.i ' ~1  ' . 5:“However, even knowing.how to handle noise at the summing points is not enough,
.since the filter itself may result in additional amplification, “This is the usual 7 case_where a recursivefilter structure is in use  We can understand this in terms
"of errors returning around the loop, causing further errors in consequence; _ . .To.beginto understand haw noise is amplified by the filter,'we can begin with '
"arausimplerOUrtap FIR filter Withza'anseiN at its input as shbwn in Fig; 9, ,He  '
Kwish to know the noise level at the output, *we can look at this as being a separate ,“noise source at each of the tap points, as shown in Fig.'10,“'Here'the.noise sources _ are taken to be inﬁependent, althoughthey are certainlycorrelated in timely The
 effect of the time correlation comes out as a.filtering or spectral shaping of the
i noise;.3:Here_Weare interested inthe.way these sources, independent at ahy'given amazes (10) x‘—\ Fig. 10 Noise sources at FIR _ Fig. 9 Noise at input offa
' ' ' filter'tapsu ' simple FIR filter Fig._lg A_recursive filter showing tFig. 11 Simple Recursive Filter _
' noise sources from multipliers time, will'add together; From Fig" 10, it is clear that the function of the tap
weightS'is to simply amplify the noise sources prior to summingthemw Thus we
can look at the power in the summed signal as being the combined power of'these 
smplified sources: ' 3 ... "a
2h(3)2 + N2 Z.h(n)2 (6) ' 2 ‘ 2  2 ' 2 I 2 '.2
N1 h(0)_ + N2.h(l) + N3 h(2) +_N4 _ n=0 'Here we have an_indication that the way we willdetermine the effect of.a filter on the Output noise variance is to sumthe squares of the impulse response" While _this can be shown in'a more convincing mannerg here this simple_intuitive demonStration will Serve, and we Will'extend the idea_beyond FIR to the IIR case; ';f
by summing_the impulse response squares, (in general) to infinityi '  » We can then take each of the round4off noise and quantization noise'SOUrces;; "in turn; and for each determine the amplification of the filter;'For‘this.purpose,‘
.the relevant h(n) is the impulse response from the point in the filter where the '  noiSe is introduced, to the output"  This may be the same as.theimpulse response
of the filter itself, in.many caSes, but it is also often a different one.. Thus
we can write in general: :, __ _H:H "  ,. ,. . ,,.  U” ‘. ' h ‘3 . :0 ., h (m)2 r _ l 'y ~(7)
°‘.‘.‘(t9ta”~" all”S‘0U;CeSK_IL 91111;,ka ' . _ _. . Here the Sum over all Sources kis possible because of superposition and.the fact
that,weare adding variances. With these matters identified and discussed3 we can
then see how we arrive at the total outputnoise variancel‘ First; we identify all _
noise sources; and assigna variance of to those points.. We then determine'the~ Timpulse responses from those points to. he'outp'ut’,"sum‘the'squal‘ESOf those rESpOHSE. ;An295 (ll) values, and apply equation (7). For example, Fig, ll shows a simple recursive structure, and we can consider how this
would amplify any noise source at its input, ignoring for the moment the additional noise
of its own feedback multiplier" The impulse response is clearly: h(m) = am (3)
The sum of the squares of h(m) is easily found as:
zh(m)2=za2m= ‘2 " '(9)
m=0 m=0 l m a  which clearly indicates that as a approaches l in magnitude, the noise amplification gets
very large, This is in agreement with the idea that the more times the noise goes
around the loop, the larger its effect, ' Fig, 12 shows a case where we have added two feedforward paths to the firstorder
recursive structure, andwhere we show, in addition to the input quantization noise N1,
the roundoff noise sources N2, N3, and N4 associated with the three multipliers (a, b1,
and b2 respectively) in the structure. The first task here is to determine the '
impulse response from the input to the output, since thisis the correct impulse
response for two of the_noise sources (N1 and N2) to the output. By inspection we have
h 0 as: _ .h(0)'=b].  ' ; ' (10) Hand using equation (8) we can extend to: _
h(m) =.b]am + beam'I  ' ' ' (ll)
for m greater than 0” Thus we can get: . m . 2b b ' b3 'm . : ' '
20.h(.m)2 = 1312 + [b12+ 21.2 + j—zazl 21am ..  _ . (127)
m:  ' 'm: I The sum of the series on the right of equation (12) is aZ/(laz) so for the filter
input to output we have: _ . I. E h(m)2 : 'igi::_EElEg%_:_Eé:l_ .' . ..: '.1 l ‘(13)
FIFO 13 _ .. _ : Also, we notethatfOr the'fEedforward paths; bi and b2, the impulse response from the sourcesN3 and N4 is simply_ ”  ' _ l ' ,1 _ .u ._ ' ;
th) = 1’ h(m)=0 for m_9reater than.0 ', My _,.. __ ,4 (14) so the sum of the squares of this impulse.response is just l.' Now, with equation (l3) applying to noise sources N1 and N2, and equation (l4) applying:to sources N3 and N4,
we can obtain the total noise variance at the output as:~ " ~”=.~?*  * "j 2 ' '_ 2 (big + 2b1b2a + b22) 1v ” I‘ " lrlr I.) _"I:‘ f
Oout(total) ‘ “o [2'————1—:';§“‘""""‘— + 2 _ (75)_ It is clear that_our ability to calculate the output noise variance from equation_ (7) depends on our ability to obtain the summation: '
. j“m=0*' ‘“ “* "” ”‘ ”“‘” _T ” ’;;:g p 1'; _,J ";;!s KIHCIT;
for each and every noise source of interest, we may be able to obtainthis, essentially Ail295 (12). « by inspection, as we did for equations (10) through (14). Another method would
be to obtain instead the transfer function H(z) from the point of noise insertion
to the output, and.obtain h(m) from the inverse zmtranstrm of H(z) by any of the
several methods we are familiar with. Yet another method is the obtain the sum
of equation (l6) directly using.the Parseval relationship: _m:;h(m)2' 5%3§H(Z)H(l/t)z'1dz  (17) whiCh is evaluated with contour integral (residue) calculations. Still another very pragmatic method of evaluating eqUation (l6) is by simulation of the filter" We have then only to input an impulse into the simulated structure and add'up the
squares of the filter's output until such point as these outputs become sufficiently
small" We repeat this for each and every source in turn” This simulation can
also.be used to check theoretical results such as equation (15), which has been
verified by thismeansr u  '   Fig“ 13 shows a second—order structure
of standard form, corresponding to a pair
of poles at radius r and angle 9 with 
respect to the positive real axis. Its
transfer function is:  ' l . H(z) = ____""______T:T_uf_Z—:2 (18)
l  2rC0$(9)z + r z ' We need to obtain the impulse response
corresponding to equation (18), and this we
can get, for example,_by adapting the
often~found'ztransform pair corresponding
to the impulseinvariant design of a second~ Order anaIOQ 1°W‘pa55 fiIter‘. ' 'Fig. 13 Secondorder filter
. . UT _ 1 showing the roundwoff'noise
H(z) = _______!]/w)e Sln(wT)Z____ (19) sourcesdue to.two multipliers” l 1_ 2edeCOS(wT)Z~4.e—20Tz2 (Not shown w noise source; d due to input quantization)
an : _ .
h(n). = (l/w)e'onTSin(mnT) (20) __ 'Equating the denominators of equations (l8) and(l9) givesus r = e'UT and 9'= an
The 21 in equation (19) suggests that equation (20) needs to be advanced by one
time index to correspbndto equation (l8), and we will need_to divide equation (20)_'
by_(l/m)e'°TSin(wT) tO'get the numerator of'l of equation (l8) "Thus: ' ”  I (Hulk—Gm“ )TSinl (UHI 203T]. : ramsEh “1+1 9]  I (21)
(i/w)e'“Tsin(mT) , . . 751n(6 ‘ .. . Now, using equation (7) and ignoring_here the noise due to the quantization of the
input signal, from N1 and N2 we get: '
2 . co co 2m .
= 2 2 = g: r Sin2 m+l 8] _
crout(total) 2 0'0 "go Mm) 6 “120 Sin£(9) (.22)' ﬂ 2 1+ 2) __h_' ' ls ' 7 . j  . I 
"96—h; (1 (23) Note that.the input quantization noise is included simply be replacing Qz/B with
02/4 in equations (22) and (23). 5 ANa295 (13) LIMIT CYCLE: The effect of rounding can result in a strange behavior of a digital filter
during which a filter with input returned to zero can have an output which not only
is not zero, but which is not decaying. Fig" 14 shows a simple firstworder recursive
filter which illustrates this "Limit Cycle” behavior. Consider the output following
multiplication to be subject to rounding. If we suppose that the input is say +20 then this is multiplied by ~0097 which
results in m 19.4, which is rounded to 19. This in turn is multiplied by 0.97
resulting in +18.43, rounded to +18. Continuing +18 is multiplied by 0.97 giving
—17"46, rounded to 17; W17 times «0197 gives l6n49 rounded to 16; 16 times 0.97
gives 315052 roundedto 916;16 times 0"97 gives +15.52,rounded to 16, and so on.
It is clear that we are now stuck'in the sequence.+16, 16, +16, —l6, and so on" We can interpret the limit cycle as follows. First, we are supposed to have a
pole at —0.97 in the z—plane (Figu 15)" However, the rounding of 15.52 to 16 is
a gain of 1/0 97, so the combined effect of the multiplication plusthe rounding
is a.feedback gain.of 1. This places the pole at —1 (Figu l7), and we have a.
"digital oscillator" producing a square wave at half the sampling frequency (Figv 16). _*f”f;g. 15 Pole of
filterof‘ ‘
'Fig; 14'  F'g. l4 Firstorder
recursive with integer
rounding Fig. 17 Rounding'
.effectively moves
‘ pole to unit _ Fig. 16 Limit Cycle circle at z=l r AN295 (14) w.“
{is ...
View Full
Document
 Spring '06
 HUTCHINS
 Signal Processing

Click to edit the document details