Analysis of Finite Wordlength Effects

Similar documents
DSP Design Lecture 2. Fredrik Edman.


Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR. Digital Filter

ECE4270 Fundamentals of DSP Lecture 20. Fixed-Point Arithmetic in FIR and IIR Filters (part I) Overview of Lecture. Overflow. FIR Digital Filter

Optimum Ordering and Pole-Zero Pairing. Optimum Ordering and Pole-Zero Pairing Consider the scaled cascade structure shown below

FINITE PRECISION EFFECTS 1. FLOATING POINT VERSUS FIXED POINT 3. TYPES OF FINITE PRECISION EFFECTS 4. FACTORS INFLUENCING FINITE PRECISION EFFECTS

Stability Condition in Terms of the Pole Locations

Finite Word Length Effects and Quantisation Noise. Professors A G Constantinides & L R Arnaut

Numbering Systems. Computational Platforms. Scaling and Round-off Noise. Special Purpose. here that is dedicated architecture

DSP Configurations. responded with: thus the system function for this filter would be

Quadrature-Mirror Filter Bank

3 Finite Wordlength Effects

Digital Signal Processing Lecture 8 - Filter Design - IIR

Digital Signal Processing

Mathematical preliminaries and error analysis

Other types of errors due to using a finite no. of bits: Round- off error due to rounding of products

Z-Transform. 清大電機系林嘉文 Original PowerPoint slides prepared by S. K. Mitra 4-1-1

DIGITAL SIGNAL PROCESSING UNIT III INFINITE IMPULSE RESPONSE DIGITAL FILTERS. 3.6 Design of Digital Filter using Digital to Digital

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF INFORMATION TECHNOLOGY. Academic Year

Digital Signal Processing

Multirate Digital Signal Processing

EE 521: Instrumentation and Measurements

Vel Tech High Tech Dr.Ranagarajan Dr.Sakunthala Engineering College Department of ECE

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

Lecture 19 IIR Filters

EE482: Digital Signal Processing Applications

UNIT - III PART A. 2. Mention any two techniques for digitizing the transfer function of an analog filter?

REAL TIME DIGITAL SIGNAL PROCESSING

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

Oversampling Converters

Chapter 7: IIR Filter Design Techniques

Responses of Digital Filters Chapter Intended Learning Outcomes:

Lecture 7 Discrete Systems

Digital Signal Processing Lecture 9 - Design of Digital Filters - FIR

Z - Transform. It offers the techniques for digital filter design and frequency analysis of digital signals.

How to manipulate Frequencies in Discrete-time Domain? Two Main Approaches

Discrete-Time David Johns and Ken Martin University of Toronto

Like bilateral Laplace transforms, ROC must be used to determine a unique inverse z-transform.

UNIT-II Z-TRANSFORM. This expression is also called a one sided z-transform. This non causal sequence produces positive powers of z in X (z).

A system that is both linear and time-invariant is called linear time-invariant (LTI).

Higher-Order Σ Modulators and the Σ Toolbox

PS403 - Digital Signal processing

Discrete-Time Signals and Systems. The z-transform and Its Application. The Direct z-transform. Region of Convergence. Reference: Sections

Digital Filters Ying Sun

E : Lecture 1 Introduction

UNIVERSITY OF OSLO. Faculty of mathematics and natural sciences. Forslag til fasit, versjon-01: Problem 1 Signals and systems.

EE482: Digital Signal Processing Applications

Methods for Synthesizing Very High Q Parametrically Well Behaved Two Pole Filters

Digital Signal Processing

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

ECE 410 DIGITAL SIGNAL PROCESSING D. Munson University of Illinois Chapter 12

( ) John A. Quinn Lecture. ESE 531: Digital Signal Processing. Lecture Outline. Frequency Response of LTI System. Example: Zero on Real Axis

Signals and Systems. Lecture 11 Wednesday 22 nd November 2017 DR TANIA STATHAKI

Lecture 7 - IIR Filters

Digital Filter Structures. Basic IIR Digital Filter Structures. of an LTI digital filter is given by the convolution sum or, by the linear constant

EE123 Digital Signal Processing. M. Lustig, EECS UC Berkeley

The Discrete-Time Fourier

Digital Filter Implementation 1

Practical Considerations in Fixed-Point FIR Filter Implementations

Digital Signal Processing:

Discrete-Time Signals: Time-Domain Representation

EEL3135: Homework #4

Question Bank. UNIT 1 Part-A

# FIR. [ ] = b k. # [ ]x[ n " k] [ ] = h k. x[ n] = Ae j" e j# ˆ n Complex exponential input. [ ]Ae j" e j ˆ. ˆ )Ae j# e j ˆ. y n. y n.

Z Transform (Part - II)

Lecture 18: Stability

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

Roundoff Noise in Digital Feedback Control Systems

EE482: Digital Signal Processing Applications

Optimal Design of Real and Complex Minimum Phase Digital FIR Filters

INF3440/INF4440. Design of digital filters

Discrete-Time Signals: Time-Domain Representation

Introduction to Digital Signal Processing

DISCRETE-TIME SIGNAL PROCESSING

Chapter 1 Error Analysis

ECE503: Digital Signal Processing Lecture 5

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

Digital Signal Processing IIR Filter Design via Bilinear Transform


Very useful for designing and analyzing signal processing systems

Z-Transform. The Z-transform is the Discrete-Time counterpart of the Laplace Transform. Laplace : G(s) = g(t)e st dt. Z : G(z) =

Filter structures ELEC-E5410

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

X (z) = n= 1. Ã! X (z) x [n] X (z) = Z fx [n]g x [n] = Z 1 fx (z)g. r n x [n] ª e jnω

Digital Control & Digital Filters. Lectures 21 & 22

Ch. 7: Z-transform Reading

ON FINITE-PRECISION EFFECTS IN LATTICE WAVE-DIGITAL FILTERS

Analog and Digital Filter Design

Data Converter Fundamentals

Determining Appropriate Precisions for Signals in Fixed-Point IIR Filters

Notes for Chapter 1 of. Scientific Computing with Case Studies

Z-Transform. x (n) Sampler

Second and Higher-Order Delta-Sigma Modulators

FILTER DESIGN FOR SIGNAL PROCESSING USING MATLAB AND MATHEMATICAL

Lecture 04: Discrete Frequency Domain Analysis (z-transform)

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

Time Series Analysis: 4. Linear filters. P. F. Góra

Transcription:

Analysis of Finite Wordlength Effects Ideally, the system parameters along with the signal variables have infinite precision taing any value between and In practice, they can tae only discrete values within a specified range since the registers of the digital machine where they are stored are of finite length The discretization process results in nonlinear difference equations characterizing the discrete-time systems

Analysis of Finite Wordlength Effects These nonlinear equations, in principle, are almost impossible to analyze and deal with exactly However, if the quantization amounts are small compared to the values of signal variables and filter parameters, a simpler approximate theory based on a statistical model can be applied

Analysis of Finite Wordlength Effects Using the statistical model, it is possible to derive the effects of discretization and develop results that can be verified experimentally Sources of errors - () Filter coefficient quantization () A/D conversion (3) Quantization of arithmetic operations (4) Limit cycles 3

Analysis of Finite Wordlength Effects Consider the first-order IIR digital filter y [ n] α y[ n ] + x[ n] where y[n] is the output signal and x[n] is the input signal When implemented on a digital machine, the filter coefficient α can assume only certain discrete values ^α approximating the original design value α 4

Analysis of Finite Wordlength Effects The desired transfer function is H ( z) α z z z α The actual transfer function implemented is ^ H ( z) z z α^ which may be much different from the desired transfer function H(z) 5

Analysis of Finite Wordlength Effects Thus, the actual frequency response may be quite different from the desired frequency response Coefficient quantization problem is similar to the sensitivity problem encountered in analog filter implementation 6

Analysis of Finite Wordlength Effects A/D Conversion Error - generated by the filter input quantization process If the input sequence x[n] has been obtained by sampling an analog signal x a (t), then the actual input to the digital filter is x ^[ n] x[ n] + e[ n] where e[n] is the A/D conversion error 7

Analysis of Finite Wordlength 8 Effects Arithmetic Quantization Error - For the first-order digital filter, the desired output of the multiplier is v[ n] α y[ n ] Due to product quantization, the actual output of the multiplier of the implemented filter is v^ [ n] α y[ n ] + eα [ n] v[ n] + eα[ n] where e α [n] is the product roundoff error

Analysis of Finite Wordlength Effects Limit Cycles - The nonlinearity of the arithmetic quantization process may manifest in the form of oscillations at the filter output, usually in the absence of input or, sometimes, in the presence of constant input signals or sinusoidal input signals 9

Quantization Process and Errors 0 Two basic types of binary representations of data: () Fixed-point, and () Floating-point formats Various problems can arise in the digital implementation of the arithmetic operations involving the binary data Caused by the finite wordlength limitations of the registers storing the data and the results of arithmetic operations

Quantization Process and Errors For example in fixed-point arithmetic, product of two b-bit numbers is b bits long, which has to be quantized to b bits to fit the prescribed wordlength of the registers In fixed-point arithmetic, addition operation can result in a sum exeeding the register wordlength, causing an overflow In floating-point arithmetic, there is no overflow, but results of both addition and multiplication may have to be quantized

Quantization Process and Errors In both fixed-point and floating-point formats, a negative number can be represented in one of three different forms Analysis of various quantization effects on the performance of a digital filter depends on () Data format (fixed-point or floating-point), () Type of representation of negative numbers, (3) Type of quantization, and (4) Digital filter structure implementing the transfer function

Quantization Process and Errors Since the number of all possible combinations of the type of arithmetic, type of quantization method, and digital filter structure is very large, quantization effects in some selected practical cases are discussed Analysis presented can be extended easily to other cases 3

Quantization Process and Errors In DSP applications, it is a common practice to represent the data either as a fixed-point fraction or as a floating-point binary number with the mantissa as a binary fraction Assume the available wordlength is (b+) bits with the most significant bit (MSB) representing the sign Consider the data to be a (b+)-bit fixedpoint fraction 4

Quantization Process and Errors 5 Representation of a general (b+)-bit fixedpoint fraction is shown below s a a a b Smallest positive number that can be represented in this format will have a least significant bit (LSB) of with remaining bits being all 0 s b

Quantization Process and Errors Decimal equivalent of smallest positive b number is δ Numbers represented with (b+) bits are b thus quantized in steps of, called quantization step An original data x represented as a (β+)-bit fraction is converted into a (b+)-bit fraction Q(x) either by truncation or rounding 6

Quantization Process and Errors The quantization process for truncation or rounding can be modeled as shown below x Q Q(x) 7

Quantization Process and Errors Since representation of a positive binary fraction is the same independent of format being used to represent the negative binary fraction, effect of quantization of a positive fraction remains unchanged The effect of quantization on negative fractions is different for the three different representations 8

Quantization of Fixed-Point Numbers 9 Truncation of a (β+)-bit fixed-point number to (b+) bits is achieved by simply discarding the least significant ( β b) bits as shown below s a a s a a b a b a b To be discarded β

Quantization of Fixed-Point Numbers 0 Range of truncation error εt Q ( x) x (assuming β >> b): Positive number and two s complement negative number δ < εt 0 Sign-magnitude negative number and ones - complement negative number 0 ε t < δ

Quantization of Fixed-Point Numbers Range of rounding error εr Q ( x) (assuming β >> b): For all positive and negative numbers δ < ε δ r x

Quantization of Floating-Point Numbers In floating-point format a decimal number x is represented as x E M where E is the exponent and M is the mantissa Mantissa M is a binary fraction restricted to lie in the range M < Exponent E is either a positive or a negative binary number

Quantization of Floating-Point Numbers The quantization of a floating-point number is carried out only on the mantissa Range of relative error: Q ( x) x Q ( M ) M ε x M Two s complement truncation δ < εt 0, x > 0 0 ε < δ, x < 0 t 3

Quantization of Floating-Point Numbers Sign-magnitude and ones s complement truncation δ < ε 0 Rounding of all numbers δ < εr δ Note: We consider in this course fixedpoint implementation case t 4

Analysis of Coefficient Quantization Effects The transfer function Hˆ ( z) of the digital filter implemented with quantized coefficients is different from the desired transfer function H(z) Main effect of coefficient quantization is to move the poles and zeros to different locations from the original desired locations 5

Analysis of Coefficient Quantization Effects The actual frequency response ˆ jω H ( e ) is thus different from the desired frequency jω response H ( e ) In some cases, the poles may move outside the unit circle causing the implemented digital filter to become unstable even though the original transfer function H(z) is stable 6

Analysis of Coefficient Quantization Effects Effect of coefficient quantization can be easily carried out using MATLAB To this end, the M-files adt (for truncation) and adr (for rounding) can be used 7

Coefficient Quantization Effects On a Direct Form IIR Filter Gain responses of a 5-th order elliptic lowpass filter with unquantized and quantized coefficients Fullband Gain Response Passband Details 0 original - solid line, quantized - dashed line original - solid line, quantized - dashed line 0 Gain, db -0-40 -60 Gain, db - -4-6 -8 8-80 0 0. 0.4 0.6 0.8 ω/π -0 0 0. 0. 0.3 0.4 0.5 ω/π

Coefficient Quantization Effects On a Direct Form IIR Filter Pole and zero locations of the filter with quantized coefficients (denoted by x and o ) and those of the filter with unquantized coefficients (denoted by + and * ) Imaginary Part 0.5 0-0.5 9 - - -0.5 0 0.5 Real Part

Coefficient Quantization Effects On a Cascade Form IIR Filter Gain responses of a 5-th order elliptic lowpass filter implemented in a cascade form with unquantized and quantized coefficients Fullband Gain Response Passband Details 30 Gain, db original - solid line, quantized - dashed line 0-0 -40-60 0 0. 0.4 0.6 0.8 ω/π Gain, db original - solid line, quantized - dashed line 0.5 0-0.5 - -.5-0 0. 0. 0.3 0.4 0.5 ω/π

Coefficient Quantization Effects On A Direct Form FIR Filter Gain responses of a 39-th order equiripple lowpass FIR filter with unquantized and quantized coefficients 3 Gain, db 0-0 -40 Fullband Gain Response original - solid line, quantized - dashed line -60 0 0. 0.4 0.6 0.8 ω/π Gain, db original - solid line, quantized - dashed line 0 - - Passband details -3 0 0. 0.4 0.6 ω/π

Estimation of Pole-Zero Displacements Consider an N-th degree polynomial B(z) with simple roots: b z i 0 ( z with b N Roots of B(z) are given by z B( z) N z i i r e N jθ z ) 3

33 Estimation of Pole-Zero Estimation of Pole-Zero Displacements Displacements Effect of coefficient quantization is to change the polynomial coefficient to Thus, the polynomial B(z) after coefficient quantization becomes b i i b i b + + N i i i i z b b z B 0 ) ( ) ˆ( + N N i i i z z z b z B 0 ) ˆ ( ) ( ) (

Estimation of Pole-Zero Displacements ẑ denotes the roots of Bˆ ( z) and are the new locations to which roots z of B(z) have moved For small changes in the coefficient values, ẑ will be close to z and can be expressed as j( θ + θ ) zˆ z + z ( r + r ) e 34

Estimation of Pole-Zero Displacements If b i is assumed to be very small, we can express jθ j θ zˆ ( r + r ) e e ( r + r )( + j θ ) e r e + ( r + jr θ ) e neglecting higher order terms Then z zˆ jθ z ( r + jr jθ θ ) e jθ jθ 35

Estimation of Pole-Zero Displacements 36 Now we can express /B(z) by partialfraction expansion as N ρ ( z) z z ρ B where is the residue of /B(z) at the pole z z, i.e., ( z z ) ρ R + jx B( z) z z

Estimation of Pole-Zero Displacements If ẑ is very close to z, then we can write ρ B( zˆ ) z ˆ z or z ρ B( zˆ ) 37 But Bˆ( zˆ ) 0 B( zˆ ) + N i 0 ( b i )( zˆ ) i

38 Estimation of Pole-Zero Estimation of Pole-Zero Displacements Displacements Therefore assuming that is very close to Rewriting the above equation we get ẑ z 0 0 ) )( ( ) )( ˆ ( N i i i N i i i z b z b z ρ ρ + + 0 ) )( ( ) ( ) ( N i i i j z b jx R e jr r θ θ

39 Estimation of Pole-Zero Estimation of Pole-Zero Displacements Displacements Equating real and imaginary parts of the above we arrive at where B S B Q P + r b X R r ) ( B S B Q P + b R X r θ θ ) ( ] ) cos( cos [cos N N r r r θ θ θ L P ] ) sin( sin 0 sin [ N N r r θ θ θ L Q T b N b b b ] [ 0 L B

Estimation of Pole-Zero Displacements The sensitivity vectors Sb and Sb depend only on B(z) and are independent of B Once these vectors have been calculated, pole-zero displacements for any sets of B can be calculated using the equations given Elements of B are multiplier coefficient changes only for the direct form realizations r θ 40

Estimation of Pole-Zero Displacements Example- Consider the direct form II realization of z z H ( z) z Kz + L B( z) x[n] + + K L z z y[n] 4

Estimation of Pole-Zero Displacements 4 HereB( z) z Kz + L ( z z)( z z) jθ jθ where z re z re, We compute z z ρ j B( z) r sinθ Therefore z z T B [ L K] Q [ sinθ P [cosθ r 0] ]

Estimation of Pole-Zero Displacements 43 Substituting these values we get r X Q B L r θ L K r ( XP B) r tanθ r sinθ It can be seen that the nd-order direct form IIR structure is highly sensitive to coefficient quantizations for transfer functions with poles close to θ 0 or π

Estimation of Pole-Zero Displacements Consider an arbitrary digital filter structure with R multipliers given by α,,, K, R The multiplier coefficients α are multilinear functions of the coefficientsb i of the polynomial B(z) 44

Estimation of Pole-Zero Displacements Thus, when α changes into α + α due to coefficient quantization, the change b i in the polynomial coefficient b i can be expressed as R b b i i α, i,, K, N α 45

46 Estimation of Pole-Zero Estimation of Pole-Zero Displacements Displacements In matrix form we have where T R 3 ] [ α α α α L α C B α R N N N R R b b b b b b b b b α α α α α α α α α 0 0 0 L M O M M L L C

Estimation of Pole-Zero Displacements Here the root displacements are given by r S C α r b θ θ Sb C α r θ where the sensitivity vectors S b and Sb are as given earlier Note: The matrix C depends on the structure but has to be computed only once 47

Estimation of Pole-Zero Displacements Example- Consider the coupled-form structure with a transfer function given by H ( z) z γ z ( α + δ ) z + ( αδ βγ ) x[n] + δ + y[n] z + α β γ z 48

Estimation of Pole-Zero 49 Displacements If α δ r cosθ and β γ r sinθ, then the transfer function becomes γ z H ( z) z r cosθ z + r Comparing the denominator of the above with that of the transfer function of the direct form structure we get K α + δ α L αδ βγ α + β

r θ 50 Estimation of Pole-Zero Displacements Taing the partials of both sides of the last two equations we get L K r cosθ r sinθ α 0 β Finally, substituting the results of the previous example we arrive at r r tanθ 0 r sinθ r cosθ r sinθ α 0 β

or, Estimation of Pole-Zero r θ Displacements cosθ sinθ r sinθ α cosθ β As can be seen from the above, the coupledform structure is less sensitive to multiplier coefficient quantization than the direct form structure r 5

A/D Conversion Noise Analysis 5 A/D converters used for digital processing of analog signals in general employ two scomplement fixed-point representation to represent the digital equivalent of the input analog signal For the processing of bipolar analog signals, the A/D converter generates a bipolar output represented as a fixed-point signed binary fraction

Quantization Noise Model The digital sample generated by the A/D converter is the binary representation of the quantized version of that produced by an ideal sampler with infinite precision If the output word is of length (b+) bits including the sign bit, the total number of discrete levels available for the representation of the digital equivalent is b+ 53

Quantization Noise Model The dynamic range of the output register depends on the binary number representation selected for the A/D converter The model of a practical A/D conversion system is as shown below x a (t) Ideal sampler x[n] x a (nt ) Quantizer xˆ [ n] Q ( x[ n]) Coder xˆ eq [ n] 54

Quantization Noise Model The quantization process employed by the quantizer can be either rounding or truncation Assuming rounding is used, the inputoutput characteristic of a 3-bit A/D converter with the output in two scomplement form is as shown next 55

Quantization Noise Model Input-output characteristic 56

Quantization Noise Model 57 The binary equivalent xˆ eq [ n] of the quantized input analog sample xˆ [ n ] for a two scomplement binary representation, is a binary fraction in the range ˆ [ n] < x eq It is related to the quantized sample xˆ [ n] through xˆ[ n] xˆ eq[ n] RFS where R FS denotes the full-scale range of the A/D converter

Quantization Noise Model 58 Assume the input signal has been scaled to be in the range of ± by dividing its amplitude by R FS /, as is usually the case The decimal equivalent of xˆ eq [ n] is then equal to xˆ [ n] For a (b+)-bit bipolar A/D converter, the total number of quantization levels is b+ The full-scale range is R b+ FS δ where δ is the quantization step size

Quantization Noise Model 59 For the 3-bit bipolar A/D converter, total number of levels is 3 8 The full-scale range is R FS 8δ with a maximum value of Amax 7δ / and a minimum value of Amin 9δ / If the input analog sample x a (nt ) is within the full-scale range 9 δ < x ( ) 7δ a nt it is quantized to one of the 8 discrete levels shown earlier

Quantization Noise Model In general, for a (b+)-bit bipolar A/D converter employing two s-complement representation, the full-scale range is given by ( b + + ) δ < x ( nt ) (b+ ) δ a Denote the difference between the quantized value Q ( x [ n]) xˆ[ n] and the input sample x[n] as the quantization error: e[ n] Q ( x[ n]) x[ n] xˆ[ n] x[ n] 60

Quantization Noise Model It follows from the input-output characteristic of the 3-bit bipolar A/D converter given earlier that e[n] is in the range δ < e[ n] δ assuming that a sample exactly halfway between two levels is rounded up to the nearest higher level and assuming that the analog input is within the A/D converter full-scale range 6

Quantization Noise Model In this case, the quantization error e[n], called the granular noise, is bounded in magnitude according to δ < e[ n] δ A plot of the e[n] of the 3-bit A/D converter as a function of the input sample x[n] is shown below 6

Quantization Noise Model 63 When the input analog sample is outside the full-scale range of the A/D converter, the magnitude of error e[n] increases linearly with an increase in the magnitude of the input In such a situation, the error e[n] is called the saturation noise or the overload noise as the A/D converter output is clipped to b the maximum value if the analog input is positive or to the minimum value if the analog input is negative

Quantization Noise Model 64 A clipping of the A/D converter output causes signal distortion with highly undesirable effects and must be avoided by scaling down the input analog signal x a (nt ) to ensure that it remains within the A/D converter full-scale range We therefore assume that input analog samples are within the A/D converter fullscale range and thus, there is no saturation error

Quantization Noise Model Now, the input-output characteristic of an A/D converter is nonlinear, and the analog input signal is not nown a priori in most cases It is thus reasonable to assume for analysis purposes that the error e[n] is a random signal with a statistical model as shown below x [n] + xˆ [ n] 65 e[n]

Quantization Noise Model 66 For simplified analysis, the following assumptions are made: () The error sequence {e[n]} is a sample sequence of a wide-sense stationary (WSS) white noise process, with each sample e[n] being uniformly distributed over the range of the quantization error () The error sequence is uncorrelated with its corresponding input sequence {x[n]} (3) The input sequence is a sample sequence of a stationary random process

Quantization Noise Model These assumptions hold in most practical situations for input signals whose samples are large and change in amplitude very rapidly in time relative to the quantization step in a somewhat random fashion These assumptions have also been verified experimentally and by computer simulations 67

Quantization Noise Model The statistical model maes the analysis of A/D conversion noise more tractable and results derived have been found to be useful for most applications If ones -complement or sign-magnitude truncation is employed, the quantization error is correlated to the input signal as the sign of each error sample e[n] is exactly opposite to the sign of the corresponding input sample x[n] 68

Quantization Noise Model As a result, practical A/D converters use either rounding or two s-complement truncation Quantization error probability density functions p(e) for rounding and two scomplement truncation are as shown below p(e) /δ p(e) /δ 69 δ/ 0 δ/ Rounding e δ 0 Two s-complement truncation e

Quantization Noise Model 70 Mean and variance of the error sample e[n]: Rounding - m e ( δ / ) ( δ / ) 0 (( δ / ) ( δ / ) ) σ e Two s-complement truncation - m 0 δ δ e (0 δ ) σ δ e δ

Signal-to-Quantization Noise Ratio 7 The effect of the additive quantization noise e[n] on the input signal x[n] is given by the signal-to-quantization noise ratio given by σ x SNRA/ D 0log 0 db σe where σ x is the input signal variance representing the signal power and σ e is the noise variance representing the quantization noise power

Signal-to-Quantization Noise Ratio 7 For rounding, e[n] is uniformly distributed in the range ( δ /, δ / ) For two s-complement truncation, e[n] is uniformly distributed in the range ( δ,0) For a bipolar (b+)-bit A/D converter ( b+ ) δ R Hence σe b RFS ( 48 FS )

Signal-to-Quantization Noise 73 Ratio Therefore 48σ SNR / 0log x A D 0 b ( RFS ) R 6.0b + 6.8 0log FS σ x This expression can be used to determine the minimum wordlength of an A/D converter needed to meet a specified Note: SNR A / D increases by 6 db for each bit added to the wordlength db SNR A / D

Signal-to-Quantization Noise Ratio For a given wordlength, the actual SNR depends on σ x, the rms value of the input signal amplitude and the full-scale range of the A/D converter Example- Determine the SNR in the digital equivalent of an analog sample x[n] with a zero-mean Gaussian distribution using a (b+)-bit A/D converter having R Kσ FS R FS x 74

Signal-to-Quantization Noise Ratio 75 Here SNR A 6.0b + 6.8 0 / D log 0 6.0 b + 6.8 0log0( K Computed values of the SNR for various values of K are as given below: K K K 4 6 8 b 7 46.9 43.39 40.89 b 9 58.95 55.43 5.93 b 70.99 67.47 64.97 b 3 83.04 79.5 77.0 b 5 95.08 9.56 89.05 R FS σ x )

Signal-to-Quantization Noise Ratio The probability of a particular input analog sample with a zero-mean Gaussian distribution staying within the full-scale range Kσ x is given by Φ( ) K e π 0 y / dy 76

Signal-to-Quantization Noise Ratio Thus, for K 4, the probability of an analog sample staying within the full-scale range 8σ x is 0.9544 On average about 456 samples out of 0,000 samples will fall outside the fullscale range and be clipped 77

Signal-to-Quantization Noise Ratio 78 For K 6, the probability of an analog sample staying within the full-scale range σ x is 0.9974 On average about 6 samples out of 0,000 samples will fall outside the fullscale range and be clipped In most applications, a full-scale range of 6σ x is more than adequate to ensure no clipping in conversion

Effect of Input Scaling on SNR Consider the scaled input Ax[n] The variance of the scaled input is A σ x Then SNR A / D 6.0b + 6.8 0log0( K) + 0 log0( A ) For a given b, the SNR can be increased by scaling up the input signal by maing A > 79

Effect of Input Scaling on SNR But increasing A also increases the probability that some of the input analog samples being outside the full-scale range RFS and as result, the expression for SNR A / no longer holds Moreover, the output is clipped, causing severe distortion in the digital representation of the input analog signal D 80

Effect of Input Scaling on SNR A scaling down of the input analog signal by choosing A < decreases the SNR It is therefore necessary to ensure that the input analog sample range matches as close as possible to the full-scale range of the A/D converter to get the maximum possible SNR without any signal distortion 8

Propagation of Input Quantization Noise to Digital Filter Output To determine the propagation of input quantization noise to the digital filter output, we assume that the digital filter is implemented using infinite precision In practice, the quantization of arithmetic operations generates errors inside the digital filter structure, which also propagate to the output and appear as noise 8

Propagation of Input Quantization Noise to Digital Filter Output 83 The internal noise sources are assumed to be independent of the input quantization noise and their effects can be analyzed separately and added to that due to the input noise Model for the analysis of input quantization noise: x[n] xˆ [ n] + H (z) e[n] yˆ [ n] y [ n] + v[ n]

Propagation of Input Quantization Noise to Digital Filter Output Because of the linearity property of the digital filter and the assumption that x[n] and e[n] are uncorrelated, the output yˆ [ n] of the LTI system can thus expressed as y ˆ[ n] y[ n] + v[ n] where y[n] is the output generated by the unquantized input x[n] and v[n] is the output generated by the error sequence e[n] 84

Propagation of Input Quantization Noise to Digital Filter Output Therefore 85 v[ n] h[ n] * e[ n] m v The mean of the output noise v[n] is given by j0 m m H ( e ) v and its variance is given by σ v e σ v π σ e π π m H ( e e[ m] h[ n m] j ω ) dω

Propagation of Input Quantization Noise to Digital Filter Output The output noise power spectrum is given by jω P ( ω) σ H ( e ) vv The normalized output noise variance is given by π σ j ω v, n ) σ π e π v σ H ( e dω e 86

Propagation of Input Quantization Noise to Digital Filter Output 87 Alternately,, H ( z) H ( z ) z dz σ v n π j C where C is a counterclocwise contour in the ROC of H ( z) H ( z ) An equivalent expression for the normalized output noise variance is σ v, n ] h[ n n

Algebraic Computation of 88 Output Noise Variance In general, H(z) is a causal stable real rational function with all poles inside the unit circle in the z-plane It can be expressed in a partial-fraction expansion form H ( z) R i H i ( z) where H i (z) is a low-order causal stable real rational transfer function

Algebraic Computation of Output Noise Variance Substituting the partial-fraction expansion of H(z) in σ v n π j C, H ( z) H ( z ) z dz we arrive at R R σ v, n π j l H C ( z) H l ( z ) z dz 89

90 Algebraic Computation of Algebraic Computation of Output Noise Variance Output Noise Variance Since and are stable transfer functions, it can be shown that Thus, we can write C C ) ( ) ( ) ( ) ( dz z z H z H dz z z H z H l l H l (z) H (z) R j n v dz z z H z H C, ) ( ) ( π σ + π + R R j dz z z H z H ) ( ) ( l l C

Algebraic Computation of 9 Output Noise Variance In most practical cases, H(z) has only simple poles with H (z) being either a storder or a nd-order transfer function Typical terms in the partial-fraction expansion of H(z) are: B C z + D A,, z a z + b z + d Let a typical contour integral be denoted as I i π j C H ( z) H ( z ) z dz l

9 Table of Typical Contour Table of Typical Contour Integrals Integrals 3 4 4 0 ' 0 0 0 ) ( ) ( I I d z b z D z C I I a z B I A d z b z D z C a z B A z H z H + + + + + + l l l l l l l

93 Table of Typical Contour Table of Typical Contour Integrals Integrals where A I l l a a B B I l l l l l l l l l l l l l l b b d d b d b d d d b D C d D C b d D C D C d d D D C C I ) ( ) ( ) ( ) ( ) )( ( 3 + + + + 4 ) ( l l l l a d a b D a C B I + + + 4 ) ( ' a d a b D a C B I l l l l + + +

Algebraic Computation of Output Noise Variance Example- Consider a first-order digital filter with a transfer function H ( z) α z z z α A partial-fraction expansion of H(z) is 94 H ( z) + α z α The two terms in the above expansion are α H ( z), H( z) z α

Algebraic Computation of Output Noise Variance 95 Therefore, the normalized output noise variance is given by α σ v, n + α α If the pole is close to the unit circle, we can write α ε, where ε 0 In which case σ v, n ( ε ) ε

Algebraic Computation of Output Noise Variance Thus, as the pole gets closer to the unit circle, the output noise increases rapidly to very high values approaching infinity For high-q realizations, the wordlengths of the registers storing the signal variables should be of longer length to eep the round-off noise below a prescribed level 96

Computation of Output Noise Variance Using MATLAB 97 In the MATLAB implementation of the algebraic method outlined earlier, the partial-fraction expansion can be carried out using the M-file residue This results in terms of the form A and B /( z a ) where the residues B and the poles a are either real or complex numbers For variance calculation, only the terms I and are then employed I

Computation of Output Noise Variance Using MATLAB 98 An alternative fairly simple method of computation is based on the output noise variance formula σ v, n ] h[ n n For a causal stable digital filter, the impulse response decays rapidly to zero values Hence we can write σ L v, n SL h[ n] n 0

Computation of Output Noise Variance Using MATLAB To determine an approximate value of σ v the sum S L is computed for L,,.., and the computation is stopped when S L S L < κ where κ is a specified small number, which is typically chosen as 0 6,n 99