SCUBA-2. Low Pass Filtering

Similar documents
ASN Filter Designer Professional/Lite Getting Started Guide

Signals and Filtering

EECS 452 Midterm Exam Winter 2012

Advanced Digital Signal Processing Part 5: Digital Filters

MULTIRATE IIR LINEAR DIGITAL FILTER DESIGN FOR POWER SYSTEM SUBSTATION

EECS 452 Midterm Closed book part Winter 2013

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 3

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

Design IIR Filter using MATLAB

Digital Filters Using the TMS320C6000

Problem Point Value Your score Topic 1 28 Filter Analysis 2 24 Filter Implementation 3 24 Filter Design 4 24 Potpourri Total 100

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

Advanced AD/DA converters. ΔΣ DACs. Overview. Motivations. System overview. Why ΔΣ DACs

Filters. Phani Chavali

Design IIR Filters Using Cascaded Biquads

EE 470 Signals and Systems

CHAPTER 2 FIR ARCHITECTURE FOR THE FILTER BANK OF SPEECH PROCESSOR

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Digital Signal Processing

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

FIR System Specification

An FPGA Based Architecture for Moving Target Indication (MTI) Processing Using IIR Filters

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Discrete-Time Signal Processing (DTSP) v14

EE25266 ASIC/FPGA Chip Design. Designing a FIR Filter, FPGA in the Loop, Ethernet

Practical applications of digital filters

FIR_NTAP_MUX. N-Channel Multiplexed FIR Filter Rev Key Design Features. Block Diagram. Applications. Pin-out Description. Generic Parameters


Digital Signal Processing of Speech for the Hearing Impaired

DESIGN OF FIR AND IIR FILTERS

Keywords: Adaptive filtering, LMS algorithm, Noise cancellation, VHDL Design, Signal to noise ratio (SNR), Convergence Speed.

Digital Signal Processing. VO Embedded Systems Engineering Armin Wasicek WS 2009/10

IMPLEMENTATION OF DIGITAL FILTER ON FPGA FOR ECG SIGNAL PROCESSING

INFINITE IMPULSE RESPONSE (IIR) FILTERS

FINITE IMPULSE RESPONSE (FIR) FILTERS

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Brief Introduction to Signals & Systems. Phani Chavali

Rapid Design of FIR Filters in the SDR- 500 Software Defined Radio Evaluation System using the ASN Filter Designer

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

EECS 452 Midterm Exam (solns) Fall 2012

4.5 Fractional Delay Operations with Allpass Filters

DSP Filter Design for Flexible Alternating Current Transmission Systems

Digital Filters FIR and IIR Systems

Application Note, V1.0, March 2008 AP XC2000 Family. DSP Examples for C166S V2 Lib. Microcontrollers

Presented at the 108th Convention 2000 February Paris, France

AN2182 Application note

Low Power Approach for Fir Filter Using Modified Booth Multiprecision Multiplier

UNIT-II MYcsvtu Notes agk

o algorithmic method (where the processor calculates new circuit programming data) or

Channelization and Frequency Tuning using FPGA for UMTS Baseband Application

Digital Filtering: Realization

ELEC3104: Digital Signal Processing Session 1, 2013

Implementation of Decimation Filter for Hearing Aid Application

Word length Optimization for Fir Filter Coefficient in Electrocardiogram Filtering

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Improving Signal Quality 3 24 Filter Bank Design 4 24 Potpourri Total 100

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Infinite Impulse Response (IIR) Filter. Ikhwannul Kholis, ST., MT. Universitas 17 Agustus 1945 Jakarta

Design and Implementation of Efficient FIR Filter Structures using Xilinx System Generator

Interpolation Filters for the GNURadio+USRP2 Platform

Design and comparison of butterworth and chebyshev type-1 low pass filter using Matlab

Decoding a Signal in Noise

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

THE NEXT GENERATION AIRBORNE DATA ACQUISITION SYSTEMS. PART 1 - ANTI-ALIASING FILTERS: CHOICES AND SOME LESSONS LEARNED

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Implementation and Comparison of Low Pass FIR Filter on FPGA Using Different Techniques

SIMULATION AND PROGRAM REALIZATION OF RECURSIVE DIGITAL FILTERS

Analog Lowpass Filter Specifications

DSP-BASED FM STEREO GENERATOR FOR DIGITAL STUDIO -TO - TRANSMITTER LINK

EECS 452 Practice Midterm Exam Solutions Fall 2014

CHAPTER. delta-sigma modulators 1.0

Experiment 2 Effects of Filtering

Advantages of Analog Representation. Varies continuously, like the property being measured. Represents continuous values. See Figure 12.

ijdsp Workshop: Exercise 2012 DSP Exercise Objectives

DIGITAL SIGNAL PROCESSING WITH VHDL

Application Note #5 Direct Digital Synthesis Impact on Function Generator Design

An Overview of the Decimation process and its VLSI implementation

Class D audio-power amplifiers: Interactive simulations assess device and filter performance

Noise removal example. Today s topic. Digital Signal Processing. Lecture 3. Application Specific Integrated Circuits for

Analysis The IIR Filter Design Using Particle Swarm Optimization Method

DIGITAL FILTERING OF MULTIPLE ANALOG CHANNELS

Design and Implementation of Digital Butterworth IIR filter using Xilinx System Generator for noise reduction in ECG Signal

Design of IIR Filter Using Model Order Reduction. Techniques

Biosignal filtering and artifact rejection. Biosignal processing I, S Autumn 2017

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

Analog and Telecommunication Electronics

Performance Analysis of FIR Filter Design Using Reconfigurable Mac Unit

LECTURE 3 FILTERING OBJECTIVES CHAPTER 3 3-1

SAMPLING AND RECONSTRUCTING SIGNALS

PCM BIT SYNCHRONIZATION TO AN Eb/No THRESHOLD OF -20 db

Block Diagram. i_in. q_in (optional) clk. 0 < seed < use both ports i_in and q_in

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

Appendix B. Design Implementation Description For The Digital Frequency Demodulator

LECTURER NOTE SMJE3163 DSP

Design and Implementation of Digital Chebyshev Type II Filter using XSG for Noise Reduction in ECG Signal

Part One. Efficient Digital Filters COPYRIGHTED MATERIAL

1. Find the magnitude and phase response of an FIR filter represented by the difference equation y(n)= 0.5 x(n) x(n-1)

Transcription:

Physics and Astronomy Dept. MA UBC 07/07/2008 11:06:00 SCUBA-2 Project SC2-ELE-S582-211 Version 1.3 SCUBA-2 Low Pass Filtering Revision History: Rev. 1.0 MA July 28, 2006 Initial Release Rev. 1.1 MA Sept. 15, 2006 added Document number Rev. 1.2 MA Apr. 30, 2007 added new scaling factor k3, explained sampling rate. Rev. 1.3 MA Jul. 4, 2008 explained fs of 12195 and corrected k3. Created on: 6 February 2006 Last saved on: 04 July 2008 Filter.doc Page 1 of 10

Table of Contents 1. Introduction... 3 1.1 Filter Requirements... 3 1.2 Filter Specifications... 3 2. Digital Filter Design - Background... 4 2.1 IIR Filters... 4 2.1.1 IIR Filter Expressions... 4 2.2 IIR Filter Structures... 5 2.3 Fixed Point Implementations... 5 2.4 The Artifacts of IIR filters... 6 3. Implementation... 8 3.1 Block Overview... 8 3.2 Block Functionality... 8 3.3 Block Data Flow... 8 3.4 Block Location and Block Interface within System... 8 3.4.1 First Stage Feedback Filter Queue... 8 3.4.2 First-Stage Feedback Filter Registers... 8 4. References:... 10 First-Stage Feedback Filter Implementation Page 2 of 10

1. Introduction This document describes the type of audio filter that is desired for MCE operation and reviews some of the challenges involved in the implementation of the filter. 1.1 Filter Requirements Filter response type: Low Pass Filter Sampling rate, f s =12195Hz (1) Cut-off frequency: 100Hz Filter Order: 4 1.2 Filter Specifications Design Method: 4-pole IIR Butterworth Realization type: Direct form II Series biquads Filter coefficients are generated using FDAtool in Matlab. Filter Coefficients: SOS: (Quantized filter to second-order sections) Section 1: Numerator: 1 2 1 Denominator: 1-1.9587428340882587 0.96134553442399129 Gain = 1/k 1 = 0.00065067508393319923 (not implemented) Section 2: Numerator: 1 2 1 Denominator: 1-1.9066292518523014 0.90916270571237567 Gain = 1/k 2= 0.00063336346501859835 (not implemented) Coefficients width: 15b (implemented as signed binary fractional SBF 1.14) Filter Input: input width: 18b scaling factor for the input to the filter chain: 2-11 (i.e. first-stage feedback calculation results are scaled down before being fed to the filter) 1/k 3 = scaling factor between 2 biquads Internal arithmetic: Delay width: 29b (Wn width) Filter Output: Output width: 32b Output gain: 1216= (simulation) (calculated as (k 1 *k 2 )/k 3 =1184 non quantized arithmetic) The gain difference of 1184 and 1216 can be attributed to the coefficient quantization effects. Note (1): corresponding to 50MHz/100*41 where row_len = 100, num_rows=41, clk=50mhz First-Stage Feedback Filter Implementation Page 3 of 10

2. Digital Filter Design - Background In this section, some background information is provided to clarify why the particular type of filter is chosen. 2.1 IIR Filters One type of digital filter is the Infinite Impulse Response (IIR) filter, which is not as well supported and is generally used in the lower sample rates (i.e., < 200kHz). The IIR uses feedback in order to compute outputs, and it is known as a recursive filter. Advantages of the IIR Filter: 1. Better magnitude response 2. Fewer coefficients 3. Less storage is required for storing variables 4. A lower delay 5. It is closer to analog models A number of different classical IIR filters are available. Butterworth The Butterworth filter provides the best approximation to the ideal lowpass filter response at analog frequencies. Passband and stopband response is maximally flat. Bessel Analog Bessel lowpass filters have maximally flat group delay at zero frequency and retain nearly constant group delay across the entire passband. Filtered signals therefore maintain their waveshapes in the passband frequency range. Frequency mapped and digital Bessel filters, however, do not have this maximally flat property. Bessel filters generally require a higher filter order than other filters for satisfactory stopband attenuation. 2.1.1 IIR Filter Expressions IIR Filters are recursive: the output is fed back to make a contribution. The expression for the IIR is shown below; note that a delayed version of the y(n) output plays a part in the output: a(i) and b(i) are the coefficients of the IIR filter. Another way to express a IIR Filter is as a transfer function with numerator coefficients bi and denominator coefficients ai : First-Stage Feedback Filter Implementation Page 4 of 10

2.2 IIR Filter Structures Direct Form II The Direct Form I architecture description noted that the forward and reverse FIR filter stages can be swapped, which creates a centre consisting of two columns of delay elements. From this, one column can be formed; hence, this type of structure is known as canonical, meaning it requires the minimum amount of storage. x n + w n + a 0 =1 Z -1 K y n -b 1 -b 2 Z -1 w n-2 w n-1 a 1 =2 a 2 =1 Figure 1: Direct Form II representation of a biquad Biquad The Biquad filter structure is that of a Direct Form-II, but it includes a second-order numerator and denominator coefficient (i.e., it is simply two poles and two zeros). This structure is used in FPGA/DSP implementations, because it is not terribly sensitive to quantization effects. Butterworth Biquad: The butterworth biquad expression is: H(z) = 1 + 2*z -1 + z -2 1 + b 1 *z -1 + b 2 *z -2 The coefficients in the nominator have the charm that simplify the calculations such that no multiplier is needed and the entire nominator can be calculated using shift and accumulators. Multiplications are expensive operations in FPGA/DSP implementations. 2.3 Fixed Point Implementations Several issues must be examined in detail to ensure satisfactory fixed-point operation of the IIR filter: 1) Coefficient/Internal Quantization 2) Wraparound/Saturation 3) Scaling Coefficient/Internal Quantization In order to examine the effect of quantization, it is useful to look at the pole/zero plot. This shows how the zeros (depths in the frequency response plot) and poles (peaks in the frequency response plot) are positioned. In fact, an issue with IIR stability relates to the denominator coefficients and their positions, as poles, on the pole/zero plot: First-Stage Feedback Filter Implementation Page 5 of 10

The poles for the floating-point version of the plot are shown on the left; they are within the unit circle (i.e., the values of the coefficients are less than 1). Once the coefficients are quantized, these poles move, which affects the frequency response. If they move onto the unit circle (i.e., the poles equal 1 ), you potentially have an oscillator; If the poles become greater than 1, the filter becomes unstable. Wraparound/Saturation A fixed-point implementation has a certain bit width, and hence has a range. Calculations may cause the filter to exceed its maximum/minimum ranges. For example, let s consider a 2 s complement value of 01111000 (+120) + 00001001 (+9) = 10000001 =(-127). The large positive number becomes a large negative number; this is known as wraparound, and it can cause large errors. Scaling There are two methods of dealing with overflows: 1. If scaling is used, values can never overflow. DSP processors tend to use different kinds of scaling in order to fit within their fixed structure. 2. Use saturation logic. In our example, the results would be 01111111 (+127). 2.4 The Artifacts of IIR filters The main artifacts of IIR filtering are the quantization noise and the limit cycle oscillations. The truncation or rounding of the IIR accumulator at the output of filter creates quantization noise. This noise is fed into the filter recursive path. The noise is multiplied by the IIR recursive path transfer function. The impact of this noise source is very significant in the low cutoff frequency filters of the second order, since the recursive path gain is proportional to the second power of Fc/Fs ratio. The filter stages with high Q can also suffer from this effect because the gain is proportional to Q. The best way to reduce the quantization noise is improve the arithmetic accuracy. For a multi-stage filter, the noise contributions of the stages can add. The other way to reduce the quantization noise is the noise shaping. Noise shaping is feeding the accumulator truncation error back into the filter. That allows for better SNR at low frequencies for the cost of an increased noise at the high frequencies. The noise shaping with higher order error feedback can significantly improve the SNR, however the added complexity and limited performance makes it less attractive, then the increased precision arithmetic. The limit cycles are the low amplitude oscillations which may occur in IIR filters. The reason for those oscillations is a finite precision of the arithmetic operations. The limit cycle existence depends on the particular filter coefficients and the input data. The filters with high Q, low Fc/Fs ratio and the rounding of the accumulator at the output rather then with truncation have a higher probability of a limit cycle behavior. Usually the amplitude of limit cycle oscillations does not exceed several LSBs. The methods to avoid the limit cycles are the following: - Improve the precision of filter arithmetic First-Stage Feedback Filter Implementation Page 6 of 10

- Implement a center clipping nonlinear function - Dithering (adding a random noise with the amplitude of several LSBs) - Gating: blocking the filter if the energy of the signal is below a certain limit First-Stage Feedback Filter Implementation Page 7 of 10

3. Implementation 3.1 Block Overview The filter is implemented as part of the fsfb_calc block in order to share FPGA resources, particularly multipliers. Review fsfb_calc.doc first. 3.2 Block Functionality 3.3 Block Data Flow 3.4 Block Location and Block Interface within System 3.4.1 First Stage Feedback Filter Queue This 64 x 32b RAM block stores the filtered output calculation results. The width of this queue is the same as the wishbone data. It is important to note that the filter results are not double buffered, since delay is acceptable in reading filter results. When a wishbone read request comes in, the read starts at the beginning of the next frame, in order to be aligned with the frame boundaries. data wraddress Filter QUEUE wren 64 x 32b rdaddress_a wishbone (wbs_frame_data) qa wishbone (wbs_frame_data) Figure 1: First Stage Feedback Filter Queue 3.4.2 First-Stage Feedback Filter Registers The fsfb_filter_regs block instantiates 2 RAM blocks to store the previous 2 samples of wn, where wn is the interim filter calculation results. For details of the filter calculations, refer to the fsfb_calculations.doc where the implementation of the second-order Butterworth low-pass filter that is implemented. The calculations are: w temp = b 1 * w n-1 + b 2 * w n-2 w n = x n w temp /2 m y n = w n + 2 * w n-1 + w n-2 where x is the input to the filter and y is the output of the filter, b1 and b2 are the filter coefficients, m is the number of bits for the filter coefficients. Note that the filter is reset through initialize_window_i signal. Each RAM block has 64 words and the word length is determined in the pack file by FLTR_DLY_WIDTH. First-Stage Feedback Filter Implementation Page 8 of 10

Initialize_window_i wn_i RAM (single-port) RAM (single-port) wn1 data q data q wn2 addr_i addr addr wren_i wren wren Figure 2: Filter Registers Storage First-Stage Feedback Filter Implementation Page 9 of 10

4. References: http://www.xilinx.com/xlnx/xweb/xil_tx_display.jsp?sglobalnavpick=&ssecondarynavpick=&category=&ilang uageid=1&multpartnum=1&stechx_id=mf_iir http://www.web-ee.com/primers/files/comm_filters.pdf http://www-users.cs.york.ac.uk/~fisher/mkfilter/mzt.html http://www.abvolt.com/research/publications2.htm#top "Digital Filters: Basics and Design" Dietrich Schlichtharle Springer Verlag ISBN 3-540-66841-1 fsfb_calc.doc fsfb_calculations.doc First-Stage Feedback Filter Implementation Page 10 of 10