Chebyshev I Bandpass IIR Filter with 6 th Order

Similar documents
Infinite Impulse Response Filter Structures in Xilinx FPGAs

LMS is a simple but powerful algorithm and can be implemented to take advantage of the Lattice FPGA architecture.

Design of Efficient Digital Interpolation Filters for Integer Upsampling. Daniel B. Turek

Transition Bandwidth Analysis of Infinite Impulse Response Filters

Em bedded DSP : I ntroduction to Digital Filters

Introduction to Xilinx System Generator Part II. Evan Everett and Michael Wu ELEC Spring 2013

Understanding CIC Compensation Filters

The front end of the receiver performs the frequency translation, channel selection and amplification of the signal.

SECTION 6 DIGITAL FILTERS

Filter Comparison. Match #1: Analog vs. Digital Filters

Department of Electrical and Computer Engineering Ben-Gurion University of the Negev. LAB 1 - Introduction to USRP

2.161 Signal Processing: Continuous and Discrete Fall 2008

Implementation of the LMS Algorithm for Noise Cancellation on Speech Using the ARM LPC2378 Processor.

How to Design 10 khz filter. (Using Butterworth filter design) Application notes. By Vadim Kim

Introduction to IQ-demodulation of RF-data

Non-Data Aided Carrier Offset Compensation for SDR Implementation

IIR Half-band Filter Design with TMS320VC33 DSP

MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN.

Sampling Theorem Notes. Recall: That a time sampled signal is like taking a snap shot or picture of signal periodically.

PIEZO FILTERS INTRODUCTION

The string of digits in the binary number system represents the quantity

Floating Point Fused Add-Subtract and Fused Dot-Product Units

Frequency Response of Filters

QAM Demodulation. Performance Conclusion. o o o o o. (Nyquist shaping, Clock & Carrier Recovery, AGC, Adaptive Equaliser) o o. Wireless Communications

73M2901CE Programming the Imprecise Call Progress Monitor Filter

Consumer Emergency Vehicle Alert System

Analog Filters. A common instrumentation filter application is the attenuation of high frequencies to avoid frequency aliasing in the sampled data.

Implementation of Digital Signal Processing: Some Background on GFSK Modulation

Digital Guitar Effects Pedal

Combining the ADS1202 with an FPGA Digital Filter for Current Measurement in Motor Control Applications

Laboratory #5: RF Filter Design

Counters and Decoders

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

Ultrasound Distance Measurement

NETWORK STRUCTURES FOR IIR SYSTEMS. Solution 12.1

Time series analysis Matlab tutorial. Joachim Gross

Digital Signal Processing Complete Bandpass Filter Design Example

VHDL Test Bench Tutorial

Digital to Analog Converter. Raghu Tumati

Introduction to Digital Filters

NAPIER University School of Engineering. Electronic Systems Module : SE32102 Analogue Filters Design And Simulation. 4 th order Butterworth response

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

Teaching DSP through the Practical Case Study of an FSK Modem

An Introduction to Digital Filters

Module 13 : Measurements on Fiber Optic Systems

Positive Feedback and Oscillators

AN-837 APPLICATION NOTE

First, we show how to use known design specifications to determine filter order and 3dB cut-off

ELECTRONIC FILTER DESIGN HANDBOOK

FPGA. AT6000 FPGAs. Application Note AT6000 FPGAs. 3x3 Convolver with Run-Time Reconfigurable Vector Multiplier in Atmel AT6000 FPGAs.

How To Calculate The Power Gain Of An Opamp

MATRIX TECHNICAL NOTES

CHAPTER 6 Frequency Response, Bode Plots, and Resonance

AVR223: Digital Filters with AVR. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR

Lock - in Amplifier and Applications

SIGNAL PROCESSING & SIMULATION NEWSLETTER

Experiment # (4) AM Demodulator

High Speed and Efficient 4-Tap FIR Filter Design Using Modified ETA and Multipliers

Loop Bandwidth and Clock Data Recovery (CDR) in Oscilloscope Measurements. Application Note

Hideo Okawara s Mixed Signal Lecture Series. DSP-Based Testing Fundamentals 46 Per-pin Signal Generator

Analog and Digital Filters Anthony Garvert November 13, 2015

Guru Ghasidas Vishwavidyalaya, Bilaspur (C.G.) Institute of Technology. Electronics & Communication Engineering. B.

Digital Signal Processing IIR Filter Design via Impulse Invariance

Uniboard based digital receiver

Design of FIR Filters

Sophomore Physics Laboratory (PH005/105)

Motorola Digital Signal Processors

Introduction to Receivers

A DA Serial Multiplier Technique based on 32- Tap FIR Filter for Audio Application

G(s) = Y (s)/u(s) In this representation, the output is always the Transfer function times the input. Y (s) = G(s)U(s).

HYBRID FIR-IIR FILTERS By John F. Ehlers

The Calculation of G rms

Acoustic Processor of the MCM Sonar

EC313 - VHDL State Machine Example

Memory Elements. Combinational logic cannot remember

Abstract. Cycle Domain Simulator for Phase-Locked Loops

USB 3.0 CDR Model White Paper Revision 0.5

AND9035/D. BELASIGNA 250 and 300 for Low-Bandwidth Applications APPLICATION NOTE

SWISS ARMY KNIFE INDICATOR John F. Ehlers

Example #1: Controller for Frequency Modulated Spectroscopy

Drivetech, Inc. Innovations in Motor Control, Drives, and Power Electronics

DESIGN AND SIMULATION OF TWO CHANNEL QMF FILTER BANK FOR ALMOST PERFECT RECONSTRUCTION

Reconfigurable Low Area Complexity Filter Bank Architecture for Software Defined Radio

Analog Sound From A Digital Delay

Analog Representations of Sound

DEVELOPMENT OF DEVICES AND METHODS FOR PHASE AND AC LINEARITY MEASUREMENTS IN DIGITIZERS

DDS. 16-bit Direct Digital Synthesizer / Periodic waveform generator Rev Key Design Features. Block Diagram. Generic Parameters.

A Sound Analysis and Synthesis System for Generating an Instrumental Piri Song

The Effective Number of Bits (ENOB) of my R&S Digital Oscilloscope Technical Paper

AC : MEASUREMENT OF OP-AMP PARAMETERS USING VEC- TOR SIGNAL ANALYZERS IN UNDERGRADUATE LINEAR CIRCUITS LABORATORY

Counters. Present State Next State A B A B

Chebyshev Filter at MHz Frequency for Radar System

Simulation of Frequency Response Masking Approach for FIR Filter design

1995 Mixed-Signal Products SLAA013

Design of Four Input Buck-Boost DC-DC Converter for Renewable Energy Application

Introduction to Digital Audio

DSP-I DSP-I DSP-I DSP-I

Maximizing Receiver Dynamic Range for Spectrum Monitoring

Transcription:

Chebyshev I Bandpass IIR Filter with 6 th Order Study Group: IEM2 Hand in Date: 22.07.2003 Group Members: Chao Chen Bing Li Chao Wang Professor: Prof. Dr. Schwarz 1

Contents 1. Introduction...3 2. Analysis...4 2.1 Cascade Structure...4 2.2 Scaling...5 2.3 Matlab Simulation...5 3. Implementation...10 3.1 Order2_IIR.vhd...10 3.2 Order6_IIR.vhd...12 3.3 Mono_gen.vhd...14 3.4 Top Entity...15 3.5 Package...17 3.6 Implementation Result...19 4. Conclusion...23 5. Reference...23 Figures Figure 1 Cascade structure for 6 th order IIR...4 Figure 2 Matlab file coef.m...6 Figure 3 code listing of dec2bin.c...8 Figure 4 Matlab calculated frequency response of structure in figure 1...8 Figure 5 Simulation diagram (step response)...9 Figure 6 SOS transposed form for VHDL modeling in case of ai <1...10 Figure 7 Order2_IIR.vhd...12 Figure 8 Order6_IIR.vhd...14 Figure 9 Structure of VHDL modeling...14 Figure 10 Mono_gen.vhd...15 Figure 11 entity_iir.vhd...17 Figure 12 IIR_PKG.vhd...18 Figure 13 Measured frequency response of IIR filter (1)...19 Figure 14 Measured frequency response of IIR filter (2)...20 Figure 15 Measured frequency response of IIR filter (3)...20 Figure 16 Measured frequency response of IIR filter (4)...21 Figure 17 timing simulaton diagram of step response...21 Equations Equation 1 Sensitivity function...4 2

1. Introduction Digital filters are among the most significant components in digital signal processing applications. The function of a filter is to eliminate undesirable parts of the signal (random noise), or to extract signals in a particular frequency range. In this lab, a parallel IIR chebyshev type I bandpass filter which has 6 th order was developed. Comparing with FIR filter, because of the feedback mechanism, IIR filter is much efficient than FIR filter. Namely, with less order IIR can have even sharper transition bands than FIR filter. But the trade off is that, IIR doesn t have constant group delay, it may distort the output signals by change the time difference of different frequency components. The two biggest characteristics of our case are that, first the cascade parallel structure was used to realize high order filters, and each substructure represents 2 nd order filter. To realize the SOS structure, the matlab program is prepared to calculate the coefficients of each substructure; second, since fixed-point implementation was chosen*, therefore at each addition step overflow was checked carefully. The scaling using chebyshev norm was used to make output adder overflow free. This guarantees that the output y at each stage would be less than 1. Since the Q format is used, only fractional number can be represented in this form. Because the scaling of output adders does not guaranty overflow free of internal adders, one guard bit is added which is proved to be enough during the lab to avoid the internal adders overflow. The input and output signal vector width is 12 bit which is enough for precision and 11 bit vector width is used for coefficients. At first the internal signals vector width with 17 bit was used. The result of IIR filter was good, then 13 bit, even 10 bit was tried which work still good. * Because Fixed-point implementation has some benefits comparing to floating-point implementation. F.e. cost effective, better precision and less hardware complicated. 3

2. Analysis 2.1 Cascade Structure High order IIR filters should be represented and implemented with a cascade of second order sections (SOS). According to the sensitivity function (Which describes the influence of coefficient changes on pole location, equation 1), the nominator decreases the sensitivity with a reduced number of poles (small N). This is the main reason to implement cascaded SOSs which reduces the denominator to one factor. p a i i = N j= 1, j i p N k i ( p i p j ) Equation 1 Sensitivity function The cascade structure for 6 order IIR is shown in the following figure. G 03( z ) G 02 ( z ) G 01( z ) Y Interface Not necessary S ( 1G1 z) S 2G2 ( z) S 3G3( z) Figure 1 Cascade structure for 6 th order IIR Transposed form II was used, because it provides an advantage that input excitation is performed by attenuated x input, and supports overflow free of internal adders. 4

2.2 Scaling Scaling procedure based on estimation of scaling factors i = I i S 1 / which provide maximum amplitudes in nodes y i but prevent the output adders from overflow: 1. Calculate norm I 1 of G 01( z ) and scale the transfer function: S ( ) ( 1G1 z = G1s z). 2. Calculate norm I 2 of S 1G1( z) G2 ( z) and scale the transfer function: S ( 2G2 2s z z) = G ( ). 3. Calculate norm I 3 of S 1G1 ( z) S 2G2 ( z) G3 ( z) and scale the transfer function: S ( 3G3 3s z z) = G ( ). 4. The transfer function of the secaled cascade of SOS will become: S 1G1 ( z) S 2G2 ( z) S3G3 ( z) 2.3 Matlab Simulation The following figure shows the Matlab calculations with equations. Passband edge frequency with -3dB Scaling factor result 5

b i = 0 no dc gain, no low pass After scaling all coefficients are less than 1 b0=b2, b1=2b0 lowpass Scaled coefficients results of binary representation Figure 2 Matlab file coef.m The scaled coefficients are shown between line 33 to line 35 in decimal format. The binary s representations are shown between line 37 to line 39 which are created by the c file dec2bin.c (Figure 3). 11 bit coefficient 6

7

Figure 3 code listing of dec2bin.c The following figure shows the Matlab calculated results. Figure 4 Matlab calculated frequency response of structure in figure 1 After scaling the maximum output of each SOS is equal or less than 1. 8

The following figure shows the step response. [b,a] = cheby1(3, 3, [0.4 0.6]); SYS = TF(b,a,1); step(sys);grid; Figure 5 Simulation diagram (step response) 9

3. Implementation 3.1 Order2_IIR.vhd One 2 nd order transpose form II IIR filter structure with bit descriptions is shown in the following figure. Only one sign bit is needed, due to scaling no overflow exist. Then converted into 17 bit [22:6]. After multiplication there are two sign bits, one sign bit is used as guard bit. Because the coefficients are less than 1, one sign bit is enough. Figure 6 SOS transposed form for VHDL modeling in case of ai <1 This bandpass IIR filter is of 6 th order, and is implemented using cascaded SOS structure. There are two basic ways to realize it. One way is that only one SOS is developed, because each SOS is nearly the same except the different coefficients. 6 order filter is realized by just instantiating the SOS for three times. This way simplifies the development, since only one SOS is coded. The other way is that all three SOSs are coded. This way treats each coefficient carefully. For example from line 33 of the figure 2 we can see that b1 equals 0, so b1 is not needed to be multiplied by x, that means one multiplier is saved. Using this way some additional work must be done in order to save hardware. In this lab report the first way was implemented. In order to save hardware less internal signal vector width can be used. During the lab the 13 bit and even 10 bit were tried, the IIR filter works fine. If another passband edge frequencies are chosen, the a i coefficients maybe greater than one. In this case one sign bit and one guard bit must be used to realize the value greater than 1. The following figure shows the VHDL source code. 10

Each SOS can use generic map to initialize the coefficients. The internal signals have one guard bit to avoid the addition overflow. One sign bit can be used as guard bit. Saturation is not needed because of scaling 11

The format of Sum0 is sg.msb...lsb (16:0) Because of scaling no overflow will occur, bit 16 and 15 are the same. Only one sign bit is needed for the feedback signal. Figure 7 Order2_IIR.vhd Because the scaling of output adders does not guaranty overflow free internal adders, one guard bit of the internal signal is needed. During the lab we saw that one bit guard bit is enough. In this implementation the output is delayed by one clock cycle, that is, one delay element is added after the feedback. The enable signal should be also delayed by one clock cycle. It is still a parallel structure where the SOSs are separated by pipelining register in order to cut off the chain of multipliers and adders (comp. fig 1). The latency increases but the throughput remains the same as without pipelining. 3.2 Order6_IIR.vhd This file instances three times the order2_iir in order to get the 6 order IIR. 12

Initialize the coefficients by generic map 13

Never be used, can be open Figure 8 Order6_IIR.vhd Order6_IIR connects the 3 SOS IIR filters to realize the 6 order IIR filter. The last output register y is not necessary because the interface component's input consists of a register which is loaded in parallel and shifted out in serial. 3.3 Mono_gen.vhd Because the ready signal which the interface provides lasts two clock cycles, the Mono_gen.vhd file is used to reduce the ready signal duration to 1 clock cycle. The following figure shows the structure of implementation. Figure 9 Structure of VHDL modeling The VHDL source code is shown in the following figure. 14

Figure 10 Mono_gen.vhd 3.4 Top Entity This file connects all components together. The VHDL source code is show in the following figure. 15

16

Figure 11 entity_iir.vhd Component CODEC_FPGA is the same as the Lab FIR, so the detail will not be mentioned in this report. 3.5 Package 17

Figure 12 IIR_PKG.vhd 18

3.6 Implementation Result Figure 13 and figure 14 show the implementation result using spectrum analyser. The passband edge frequency we chose is (0.4, 0.6), that is 0.4 * fn = 0.4 * 48 khz / 2 = 9.6 khz 0.6 * fn = 0.6 * 48 khz / 2 = 14.4 khz. That is nearly the same as the measured value. The difference is due to the not precise measurement. After scaling the maximum magnitude should be 1, namely 0 db, but the figure 15 shows the maximum magnitude is about -32dB. This is because of the Codec attenuation. The magnitude of Codec between frequency 0 and 22 khz is nearly -32 db. The passband ripple is 3 db getting from figure 15 and figure 16 which is fulfilled the specification. Figure 13 Measured frequency response of IIR filter (1) 19

Figure 14 Measured frequency response of IIR filter (2) Figure 15 Measured frequency response of IIR filter (3) 20

Figure 16 Measured frequency response of IIR filter (4) Figure 17 timing simulaton diagram of step response 21

The figure 17 shows the simulation diagram of step response (comparing with figure 5). 22

4. Conclusion In this lab, a parallel IIR chebyshev type I bandpass filter which has 6 th order was developed. The cascade parallel structure was used to realize the 6 th order filters, and each substructure represents 2 order filter. The matlab program was used to calculate the coefficients of each substructure. During the implementation only one SOS is developed, because each SOS is nearly the same except the different coefficients. 6 th order filter is realized by just instancing the SOS for three times. This way simplifies the development, since only one SOS is coded. The fixed-point implementation is chosen.the scaling using chebyshev norm was used to make output adder overflow free. One guard bit is added which is proved to be enough during the lab to avoid the internal adders overflow. The internal signals vector width with 17 bit was used at first. The result of IIR filter was good, then 13 bit, even 10 bit was tried which worked still good. 5. Reference Prof. Dr. B. Schwarz Script of DSP with FPGAs Script of Digital Systems 2003 23