Mark Allie comp.dsp 20041 Signal to Noise and Numeric Range issues for Direct Form I & II IIR Filters on Modern Analog Devices and TI Digital Signal Processors.

Slides:



Advertisements
Similar presentations
FINITE WORD LENGTH EFFECTS
Advertisements

Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
CENG536 Computer Engineering department Çankaya University.
1 CONSTRUCTING AN ARITHMETIC LOGIC UNIT CHAPTER 4: PART II.
James Tam Numerical Representations On The Computer: Negative And Rational Numbers How are negative and rational numbers represented on the computer?
James Tam Numerical Representations On The Computer: Negative And Rational Numbers How are negative and rational numbers represented on the computer? How.
Assembly Language and Computer Architecture Using C++ and Java
Number Systems Standard positional representation of numbers:
Signed Numbers.
Chapter # 5: Arithmetic Circuits Contemporary Logic Design Randy H
Implementation of Basic Digital Filter Structures R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
1 Binary Arithmetic, Subtraction The rules for binary arithmetic are: = 0, carry = = 1, carry = = 1, carry = = 0, carry =
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
IIR Filters and Equalizers R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
1 ECE369 Chapter 3. 2 ECE369 Multiplication More complicated than addition –Accomplished via shifting and addition More time and more area.
Digital Filter Noise Why does the textbook tell us not to use direct form 2? LIGO-G v1 Matt Evans.
Prepared by: Hind J. Zourob Heba M. Matter Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering.
Random Processes and LSI Systems What happedns when a random signal is processed by an LSI system? This is illustrated below, where x(n) and y(n) are random.
Simple Data Type Representation and conversion of numbers
ELEN 5346/4304 DSP and Filter Design Fall Lecture 12: Number representation and Quantization effects Instructor: Dr. Gleb V. Tcheslavski Contact:
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Increase the Dynamic Range and Precision of Digital Filters.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Computer Arithmetic Nizamettin AYDIN
Fixed-Point Arithmetics: Part II
FINITE word length effect in fixed point processing The Digital Signal Processors have finite width of the data bus. The word-length after mathematical.
Chapter # 5: Arithmetic Circuits
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF.
Floating Point Arithmetic
Number Representation for
Ch.5 Fixed-Point vs. Floating Point. 5.1 Q-format Number Representation on Fixed-Point DSPs 2’s Complement Number –B = b N-1 …b 1 b 0 –Decimal Value D.
Floating Point Arithmetic
Fundamentals of Electric Circuits Chapter 5 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Fixed & Floating Number Format Dr. Hugh Blanton ENTC 4337/5337.
Quiz 1 Review. Analog Synthesis Overview Sound is created by controlling electrical current within synthesizer, and amplifying result. Basic components:
Computer Architecture Lecture 32 Fasih ur Rehman.
Monday, January 14 Homework #1 is posted on the website Homework #1 is posted on the website Due before class, Jan. 16 Due before class, Jan. 16.
Professors: Eng. Diego Barral Eng. Mariano Llamedo Soria Julian Bruno
Professors: Eng. Julian Bruno Eng. Mariano Llamedo Soria
Software Defined Radio PhD Program on Electrical Engineering Sampling Theory and Quantization José Vieira.
Digital to Analog Converter (DAC)
IT1004: Data Representation and Organization Negative number representation.
DEPARTMENTT OF ECE TECHNICAL QUIZ-1 AY Sub Code/Name: EC6502/Principles of digital Signal Processing Topic: Unit 1 & Unit 3 Sem/year: V/III.
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
Signals and Systems Lecture Filter Structure and Quantization Effects.
EE 445S Real-Time Digital Signal Processing Lab Fall 2013 Lab 3 IIR Filters Chao Jia Debarati Kundu Andrew Mark.
FINITE word length effect in fixed point processing
CHAPTER 5: Representing Numerical Data
Unit IV Finite Word Length Effects
Real time DSP Professors: Eng. Diego Barral Mr. Jerónimo Acencio
Integer Division.
Lattice Struture.
EEE4176 Applications of Digital Signal Processing
FINITE word length effect in fixed point processing
Chapter 2 Data Types and Representations
Sampling rate conversion by a rational factor
Data Representation and Arithmetic Algorithms
لجنة الهندسة الكهربائية
Arithmetic Circuits (Part I) Randy H
Quantization in Implementing Systems
How to represent real numbers
Data Representation and Arithmetic Algorithms
DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 4
DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 4
Fixed-point Analysis of Digital Filters
Presentation transcript:

Mark Allie comp.dsp Signal to Noise and Numeric Range issues for Direct Form I & II IIR Filters on Modern Analog Devices and TI Digital Signal Processors Presented at the 2004 comp.dsp conference Mark Allie Consulting LLC.

Mark Allie comp.dsp Main Topics Filter configurations Direct Form I and II and the transposes are investigated. This presentation contains a summary of the issues of signal to noise and numeric range of Direct Form IIR filtering. Design criteria combined with sensible dsp choices are presented.

Mark Allie comp.dsp Direct Form I, II and Transposes Filter Assumptions. Unity gain 2nd order filter sections (biquads) are used. The transfer function of the biquad is given in equations 1 & 2. The recursive coefficients are scaled to yield a 0 = 1. The filters are implemented with all terms being added. 1212

Mark Allie comp.dsp Filter Forms

Mark Allie comp.dsp Matlab Design Example Because all products are summed the Matlab generated recursive coefficients a 1 and a 2 must be negated for use in the filter. For example a Butterworth 2nd order low pass filter with a cutoff frequency of 0.01 * Fs has the coefficients: b 0 = b 1 = b 2 = a 0 = a 1 = use -a1 or a 2 = use -a2 or

Mark Allie comp.dsp Topics of Interest Overflow in ideal and real filters. Noise issues. Noise Compensation issues.

Mark Allie comp.dsp Two Types of Overflow The final result overflows. Intermediate results overflow. Overflow of the result. Unity gain filters can have outputs that are greater than ±1 with a bounded input.

Mark Allie comp.dsp Ideal Frequency Response

Mark Allie comp.dsp Ideal Time Response

Mark Allie comp.dsp Internal Overflow with Fixed Point Math Modulo math is your friend. Modulo math is the default when not in saturation mode. Jackson’s Rule: Any number of additions and/or subtractions may occur. Intermediate results and operands may fall into any modulo. As long as the final result is made to fall into the first modulo by design, it will be representable in two’s complement at the chosen wordlength, and a valid result. Once overflow detection is applied to the result the correct sign will be reflected in the saturated value.

Mark Allie comp.dsp Noise Issues Noise is generated by truncating high resolution results. The noise generated by truncation often resembles the spectrum of the signal being filtered. The generated noise is most harmful when it re- circulates through the recursive coefficients. Force correlated truncation noise to be random (white) by using dither. If the truncation process is deterministic then correction can be applied to the filter. Fixed point truncation is deterministic. Floating point truncation is not deterministic.

Mark Allie comp.dsp Fixed Point Truncation

Mark Allie comp.dsp Floating Point Truncation The data word in a floating point processor is composed of an exponent and a mantissa. The number of bits used to represent a mantissa is not directly reduced. The number of bits used to represent one mantissa is usually indirectly reduced when two numbers are added. This occurs because the exponents of floating point numbers must be equal to add them. There is no indirect truncation when the exponents are already equal. The number of bits lost is dependant on the ratio of the 2 numbers being added.

Mark Allie comp.dsp Floating Point Truncation For example: When adding 1 to 1/256, 7 bits are truncated because of shifting when the exponents are matched. The truncation associated with floating point addition is not deterministic in the case of Direct Form IIR filters. The number of bits truncated can be different for each addition. The number of bits truncated depends on the coefficients and input signal statistics. Truncation errors can not be corrected. They usually must be accepted! If the recursive products can be kept larger than the direct products then the recursive data path will not be truncated very much.

Mark Allie comp.dsp Noise compensation Fixed point compensation is accomplished through an error feedback signal. What is the error signal?e(n) = y(n) – y t (n). Floating point compensation can not be performed. So how bad is this problem?

Mark Allie comp.dsp How is the error term generated?

Mark Allie comp.dsp Direct Form Implementation Analysis Overload considerations. 1.Input scaling. 2.Modulo math. Noise generation considerations. 1.Truncation noise. 2.Terms affected.

Mark Allie comp.dsp

Mark Allie comp.dsp Floating Point Truncation Analysis

Mark Allie comp.dsp Floating Point Truncation Analysis Example

Mark Allie comp.dsp Floating Point Truncation Analysis Example

Mark Allie comp.dsp

Mark Allie comp.dsp

Mark Allie comp.dsp

Mark Allie comp.dsp Tabulated Results Fixed Point DFI DFII DFIT DFIIT Floating Point DFI DFII DFIT DFIIT Input scaling Modulo math ++ Truncation noise Performs well with 32 bit mantissa Error compensation Good Attribute + Qualified Good Attribute - Poor Attribute

Mark Allie comp.dsp Error Compensation Fixed Point Only. Direct Forms with 1 error term. Attempt to correct noise by feeding back the error signal. Evaluate DFI based on Dottorro and Wilson.

Mark Allie comp.dsp Error Compensation

Mark Allie comp.dsp Trivial Noise Shaping with the Error Term

Mark Allie comp.dsp Optimal Noise Shaping with the Error Term

Mark Allie comp.dsp N Word Equivalent to 2 nd Order Error Compensated Filter.

Mark Allie comp.dsp Is This Good News? Yes DFI and DFIIT both work. A processor with 32 bit integer native word size capabilities doesn’t need truncation error compensation. Some modern floating point processors can do this inexpensively and fast. Some modern fixed point processors can do this inexpensively and more slowly.

Mark Allie comp.dsp Floating Point? All DF IIR filters can work. Complicated analysis and addend evaluation. Floating point processors with extended precision results may work well. Analog devices has processors with 32 bit mantissa capabilities. Fixed point processing at 32 bits a sure bet.

Mark Allie comp.dsp References J. Dattorro, “The Implementation of Recursive Digital Filters for High Fidelity Audio,” J. Audio Eng. Soc., vol 36, pp (1988 Nov) R. Wilson, “Filter Topologies,” J. Audio Eng. Soc., vol 41, pp (1993 Sept) S.P. Lipshitz, R.A. Wannamaker and J. Vanderkooy, “Quantization and Dither: A Theoretical Study,” J. Audio Eng. Soc., vol 40, pp (1992 May)