In the fixed-oint imlementation of a digital filte only the esult of the multilication oeation is quantied The eesentation of a actical multilie with the quantie at its outut is shown below u v Q ^v The statistical model of the multilie with the quantie at its outut is as shown below v u + e ^v The outut v of the ideal multilie is quantied to a value v^, whee ^ v[ n] v[ n] + e [ n] 3 Fo analysis uoses, the following assumtions ae made: ) The eo sequence { e [ n]} is a samle sequence of a stationay white noise ocess, with each samle e being unifomly distibuted ove the ange of the quantiation eo ) The eo sequence { e [ n]} is uncoelated with the sequence {v}, the inut sequence {x}, and all othe quantiation noise souces 4 ecall that the assumtion of { e [ n]} being uncoelated with {v} holds only fo ounding and two s-comlement tuncation eesentation of a digital filte stuctue with oduct ound-off befoe summation x m v l Q Q m kl u y ˆ The noise analysis model also shows the intenal -th banch node associated with the signal vaiable u that needs to be scaled to event oveflow at this node These nodes ae tyically the inuts to the multilies as indicated below u + v l In digital filtes emloying two scomlement aithmetic, these nodes ae oututs of addes foming sums of oducts, as hee the sums will still have the coect values even though some of the oducts and/o atial sums oveflow It is assumed the eo souces ae statistically indeendent of each othe and thus, each eo souce develos a ound-off noise at the outut of the digital filte 5 6
7 Statistical model of a digital filte stuctue with oduct ound-offs befoe summation x m u e l v l m kl y ˆ 8 Notations: f - imulse esonse fom the digital filte inut to the -th banch node g l - imulse esonse fom the inut of the l-th adde to the digital filte outut F ) Z{ f[ n]} - -tansfom of f, called the scaling tansfe function Gl ) Z{ gl[ n]} - -tansfom of g l, called the noise tansfe function 9 If σ o denotes the vaiance of each individual noise souce at the outut of each multilie, the vaiance of e l is simly k l σ o Vaiance of the outut noise caused by e l is then given by σ G G d o k l l ) l ) jc σ G e dω o kl l ) 0 If thee ae L such addes in the digital filte stuctue, the total outut noise owe due to all oduct ound-offs is given by L σ σ γ o kl Gl ) Gl ) d jc l If oduct ound-off is caied out afte the summation of oducts, then σ L σ γ o Gl )Gl ) d l jc eesentation of a digital filte stuctue with oduct ound-offs afte summation x m Q m kl u v l y ˆ Examle- Fo the fist-ode digital filte stuctue shown below on the left, the model fo the oduct ound-off eo analysis is shown below on the ight x + y x e + + y^
3 Fom the noise analysis model it can be seen that the noise tansfe function G ) is the same as the filte tansfe function H), i.e., G ) H ) Thus, the outut noise vaiance due to the oduct ound-off is same as that due to inut quantiation comuted ealie: σ γ o σ 4 The quantity σγ, n σγ / σo is called the noise gain o the nomalied ound-off noise vaiance Examle-We now evaluate the outut noise owe of the diect fom II ealiation of a causal second-ode tansfe function: Y ) H ) X ) + + The diect fom II ealiation is shown below on the left and the model fo eo analysis is shown on the ight x + y + x + y + + e [ n ] + e [ n ] The noise tansfe functions G ) and G ) ae same as the tansfe function H) of the digital filte A diect atial-faction exansion of H) is ) H + + + 5 6 Using the algebaic comutation outlined ealie we get σ γ,n + + ) ) ) + + ) + + + ) ± jθ In tems of the ole locations e, we have cosθ and Substituting these values in the exession fo we get σ γ, n + σ γ,n 4 + cosθ 7 8 3
9 If the oles ae close to the unit cicle, i.e., ε whee ε is a vey small ositive numbe, we can exess σ γ, n as ε σ γ, n sin θ ε ε Thus, as the oles get close to the unit cicle, ε 0, the total outut noise owe inceases aidly 0 In a digital filte imlemented using fixedoint aithmetic, oveflow may occu at cetain intenal nodes such as inuts to multilies and/o the adde oututs Occuence of oveflows may lead to lage amlitude oscillations at the filte outut causing unsatisfactoy oeations Pobability of oveflow can be minimied significantly by oely scaling the intenal signal levels with the aid of scaling multilies In many cases, most of these multilies can be absobed with existing multilies in the stuctue, thus educing the total numbe of multilies needed to imlement the scaled filte To undestand the basic concets involved in scaling, conside the stuctue given below showing exlicitly the -th node vaiable u that needs to be scaled x m u e l v l m kl y ˆ All fixed-oint numbes ae assumed to be eesented as binay factions Inut sequence is assumed to be bounded by unity, i.e., x[ n], fo all values of n Objective of scaling is to ensue that u [ n], fo all and fo all values of n Thee diffeent conditions can be deived to ensue that u satisfies the above bound An Absolute Bound - Now u [ n] f [ k] x[ n k] Fom the above we get u [ n] f[ k] x[ n k] f[ k] k 3 4 4
5 Thus the condition k u f [ k], [ n] is satisfied if fo all The above condition is both necessay and sufficient to guaantee no oveflow If this condition is not satisfied in the unscaled ealiation, the inut signal can be scaled with a multilie K of value K max f [ k] k 6 The scaling ule develoed is based on a wost case bound and does not fully utilie the dynamic ange of all adde outut egistes significant eduction in SN It is difficult to comute the value of K analytically Aoximate value can be comuted by elacing the infinite sum with a finite sum fo a stable filte 7 Moe actical and easy to use scaling ules can be deived in the fequency domain if some infomation about the inut signals is known a ioi Define the L -nom ) of a Fouie tansfom F e ) as F F e Δ ) dω / 8 F, the L -nom, is the oot-meansquaed ms) value of F e ) ove [, ] F, the L -nom, is the mean absolute value of F e ) ove [, ] lim F exists fo a continuous F e ) and is given by F max ω F e ) 9 A moe ealistic bound is deived next assuming that the inut x is a deteministic signal with a DTFT X e ) L -Bound Now fom u [ n] f [ k] x[ n k] we get U k j ω e ) F e ) X e whee U j ω) e and F e ) ae the DTFTs of u and f, esectively ) 30 The invese Fouie tansfom of j ω U e ) F e ) X e ) yields n u [ n] F e ) X e ) e dω Thus, u [ n] F e ) X e ) dω F X e ) d F X ω 5
3 Thus, if X, the dynamic ange constaint u [ n] is satisfied if F Hence, if the mean absolute value of the inut sectum is bounded by unity, then thee will be no adde oveflow if the eak gains fom the filte inut to all adde oututs ae scaled to satisfy F In geneal, this scaling ule is aely used since in actice X does not hold 3 L - Bound Alying the Schwat inequality to n u [ n] F e ) X e ) e dω we get u F e ) dω X e ) dω 33 o equivalently, u[ n] F e ) X e ) Thus, if the inut to the filte has finite enegy bounded by unity, i.e., X, then the adde oveflow can be evented by scaling the filte such that the ms values of all scaling tansfe functions fom the inut to all adde oututs ae bounded by unity, i.e., F,,,, K 34 A Geneal Scaling ule - Obtained using Holde s inequality is given by u[ n] F X q whee, q satisfying + q Note: L -bound is obtained when and q and L -bound is obtained when and q Anothe useful scaling ule, L -bound is obtained when and q Afte scaling, the scaling tansfe functions become F ) and the scaling constants should be chosen such that F,,, K, In many stuctues, all scaling multilies can be absobed into the existing feedfowad multilies without any incease in the total numbe of multilies, and hence, noise souces In some cases, the scaling ocess may intoduce additional multilies in the system If all scaling multilies ae b-bit units, then F,,, K, can be satisfied with an equality sign, oviding a full utiliation of the dynamic ange of each adde outut and thus yielding a maximum SN 35 36 6
37 An attactive otion fom a hadwae oint of view is to make as many unabsobed scaling multilies as ossible in the scaled stuctue take a value that is a owe of In which case, these scaling multilies can be imlemented simly by a shift oeation The nom of the scaling tansfe function fo these multilies then satisfies < F with a slight decease in the SN 38 Conside the unscaled stuctue consisting of second-ode II sections ealied in diect fom II X) K F ) U ) a a F ) * ) U ) *) b b a a b b Y) Its tansfe function is given by whee H ) K i H i ) B ) + b ) H i i i A ) + a i i + b + a i i The banch nodes to be scaled ae maked by *) which ae seen to be the inuts to the multilies in each second-ode section The scaling tansfe functions ae given by K F ) A ) l H ),,, K, l 39 40 The scaled vesion of the cascade stuctue is shown below X) F ) F ) K * ) *) b 0 a b a b a a b 0 b b Y) The scaling ocess has intoduced a new multilie b 0l in each second-ode section If the eos of the tansfe function H) ae on the unit cicle, as is usually the case, then b l ± ν In which case we can choose b0l bl to educe the total numbe of multilies in the final scaled stuctue 4 4 7
43 Fom the scaled stuctue it can be seen that whee K F ) H A ) l ), l ) K Hl ) l H b ) 0 + H l l + a b l l + + a bl l 44 Denote F Δ,, K, H + and choose the scaling constants as, Δ K β0 K; b βb, l 0,, ;,, K, l l 45 Then β K F ) A ) 0 βlhl ) l βl F ), l 0,, K, H ) β0k βlhl ) βl H ) l 0 l 0 Afte scaling we equie F F,,,, βl K βl l 0 l 0 H β l H + β l l 0 l 0 Solving the above we get β,, 0, β,, K + 46 47 Using Dynamic ange scaling using the L -nom ule can be easily caied out using by simulating the digital filte stuctue Denote the imulse esonse fom the inut to the -th banch node as{ f [ n]} Assume that the banch nodes have been odeed in accodance with thei ecedence elations with inceasing 48 Using Comute fist the L-nom F of { f [ n]} and scale the inut by a multilie k F Next, comute the L -nom F of { f [ n]} and scale the multilies feeding into then second adde by dividing with a constant k F Continue the ocess until the outut node has been scaled to yield an -nom of unity L 8
49 Using Examle-Conside the cascade ealiation of x 0.0667+ ) H ) 0.59384 + + H ) 0.676858 + 0.397468 /k 0.0667/k y x y /k3 si) si 0.59384 0.0667/k 0.676858 si) 0.397468 /k3 /k3 y3 50 Using k ; k ; k3 ; x /k; si 0; si [0 0]; vanew 0; k while k > 0.000 y 9.59384*si + x; x 0.0667/k) *y + si); si y; y 0.676858*si) - 0.397468*si) + x; si) si); si) y; vaold vanew; vanew vanew + absy)*absy); k vanew - vaold; x 0; end 5 Using The ogam simulating the cascaded stuctue is given by Pogam 96 in text The ogam is fist un with all scaling constants set to unity, i.e., k k k3 In the statement comuting the aoximate L value of the -nom, the outut vaiable is chosen as y The ogam comutes the squae of the L - nom at node y as.070007575 5 Using k sqt.070007575); k ; k3 ; x /k; si 0; si [0 0]; vanew 0; k while k > 0.000 y 9.59384*si + x; x 0.0667/k) *y + si); si y; y 0.676858*si) - 0.397468*si) + x; si) si); si) y; vaold vanew; vanew vanew + absy)*absy); k vanew - vaold; x 0; end 53 Using Fo the next un of the ogam, we set k.070007575 with othe scaling constants still set to unity A second un of the ogam shows the L - nom of the imulse esonse at node y as.0 veifying the success of scaling the inut In the second ste, in the statement comuting the aoximate value of the L - nom, the outut vaiable is chosen as y 54 Using k sqt.070007575); k ; k3 ; x /k; si 0; si [0 0]; vanew 0; k while k > 0.000 y 9.59384*si + x; x 0.0667/k) *y + si); si y; y 0.676858*si) - 0.397468*si) + x; si) si); si) y; vaold vanew; vanew vanew + absy)*absy); k vanew - vaold; x 0; end 9
55 Using The ogam yields the squae of the L - nom of the imulse esonse at node y as 0.06798076398, which is used to set k 0.06798076398 with k3 still set to unity 56 Using k sqt.070007575); k sqt0.6798076398); k3 ; x /k; si 0; si [0 0]; vanew 0; k while k > 0.000 y 9.59384*si + x; x 0.0667/k) *y + si); si y; y 0.676858*si) - 0.397468*si) + x; si) si); si) y; vaold vanew; vanew vanew + absy3)*absy3); k vanew - vaold; x 0; end 57 Using The ocess is eeated fo node y3, esulting in k3.96975400608943 The final value of the L -nom of the imulse esonse at node y3 is 0.99999683 58 Using k sqt.070007575); k sqt0.6798076398); k3 sqt.9675400608943); x /k; si 0; si [0 0]; vanew 0; k while k > 0.000 y 9.59384*si + x; x 0.0667/k) *y + si); si y; y 0.676858*si) - 0.397468*si) + x; si) si); si) y; vaold vanew; vanew vanew + absy3)*absy3); k vanew - vaold; x 0; end 59 Poduct ound-off Noise Calculation Using Pogam 96 can be easily modified to calculate the oduct ound-off noise vaiance at the outut of the scaled stuctue To this end, we set the digital filte inut to eo and aly an imulse at the inut of the fist adde This is equivalent to setting x in the ogam The nomalied outut noise vaiance due to a single noise souce is.0770966304567 60 Poduct ound-off Noise Calculation Using Next, we aly an imulse at the inut of the second adde with the digital filte inut set to eo This is achieved by elacing x in the calculation of y with x The ogam yields the nomalied outut noise vaiance due to a single eo souce at the second adde as.6090407707 0
6 Poduct ound-off Noise Calculation Using The total nomalied outut noise vaiance, assuming all oducts to be quantied befoe addition, is.070966304567 + 4.6090407707 + 3 0.8855383796 On the the hand, fo quantiation afte addition of oducts, the total nomalied outut noise vaiance is.070966304567 +.6090407707 + 3.338677474 6 Poduct ound-off Noise Calculation Using Examle- We intechange the locations of the two sections in the cascade x /k y si) 0.676858 si) 0.397468 /k /k /k y 0.0667/k3 si 0.59384 0.0667/k3 y3 Poduct ound-off Noise Calculation Using In this case, the total nomalied outut noise vaiance, assuming all oducts to be quantied befoe addition, is 3.5465+ 4 0.7693895 + 9.774 On the the hand, fo quantiation afte addition of oducts, the total nomalied outut noise vaiance is.5465+ 0.7693895 + 3.3596 63