SIMULATION AND PROGRAM REALIZATION OF RECURSIVE DIGITAL FILTERS

Similar documents
AC : INTERACTIVE LEARNING DISCRETE TIME SIGNALS AND SYSTEMS WITH MATLAB AND TI DSK6713 DSP KIT

DIGITAL SIGNAL PROCESSING LABORATORY

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

REAL-TIME LINEAR QUADRATIC CONTROL USING DIGITAL SIGNAL PROCESSOR

MULTIRATE IIR LINEAR DIGITAL FILTER DESIGN FOR POWER SYSTEM SUBSTATION

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Digital Signal Processing

Implementation of Decimation Filter for Hearing Aid Application

SCUBA-2. Low Pass Filtering

Introduction to Real-Time Digital Signal Processing

Using Modern Design Tools To Evaluate Complex Communication Systems: A Case Study on QAM, FSK and OFDM Transceiver Design

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

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

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

An Overview of the Decimation process and its VLSI implementation

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

Design of FIR Filter on FPGAs using IP cores

Teaching Digital Signal Processing with MatLab and DSP Kits

Digital Signal Processing System Design: LabVIEW-Based Hybrid Programming

EECS 452 Midterm Exam Winter 2012

DSP BASED SYSTEM FOR SYNCHRONOUS GENERATOR EXCITATION CONTROLL

Real Time Implementation of OFDM system on DSP Processor

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

Laboratory Assignment 1 Sampling Phenomena

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

Performance Analysis of FIR Filter Design Using Reconfigurable Mac Unit

AC : FIR FILTERS FOR TECHNOLOGISTS, SCIENTISTS, AND OTHER NON-PH.D.S

INTRODUCTION TO DIGITAL SIGNAL PROCESSING AND FILTER DESIGN

Presentation Outline. Advisors: Dr. In Soo Ahn Dr. Thomas L. Stewart. Team Members: Luke Vercimak Karl Weyeneth. Karl. Luke

Digital Signal Processing of Speech for the Hearing Impaired

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Experiment # 4. Frequency Modulation

GSM Interference Cancellation For Forensic Audio

CHAPTER 4 FIELD PROGRAMMABLE GATE ARRAY IMPLEMENTATION OF FIVE LEVEL CASCADED MULTILEVEL INVERTER

VLSI Implementation of Digital Down Converter (DDC)

Appendix B. Design Implementation Description For The Digital Frequency Demodulator

Word length Optimization for Fir Filter Coefficient in Electrocardiogram Filtering

The Optimization of G.729 Speech codec and Implementation on the TMS320VC5402

Equalizers. Contents: IIR or FIR for audio filtering? Shelving equalizers Peak equalizers

Signal Processing Toolbox

SGN-2156 SYSTEM LEVEL DSP ALGORITHMS. Lectures: Tapio Saramäki, Exercises: Muhammad Ahsan,

GUJARAT TECHNOLOGICAL UNIVERSITY

EE477 Digital Signal Processing Laboratory Exercise #13

LECTURER NOTE SMJE3163 DSP

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

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

EE 470 Signals and Systems

Advanced Digital Signal Processing Part 5: Digital Filters

Rapid Control Prototyping using MATLAB/Simulink and a DSP-based Motor Controller*

University of Saskatchewan Electrical & Computer Engineering CME 462 Digitall Signal Processing Laboratory

Real-time adaptive filtering of dental drill noise using a digital signal processor

Interpolation Filters for the GNURadio+USRP2 Platform

Real Time Implementation of a Tuning Device Using a Digital Signal Processor

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

Aparna Tiwari, Vandana Thakre, Karuna Markam Deptt. Of ECE,M.I.T.S. Gwalior, M.P, India

EECS 452 Midterm Closed book part Winter 2013

McGraw-Hill Irwin DIGITAL SIGNAL PROCESSING. A Computer-Based Approach. Second Edition. Sanjit K. Mitra

RAPID CONTROL PROTOTYPING FOR ELECTRIC DRIVES

Exploring DSP Performance

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

ANALYSIS OF REAL TIME AUDIO EFFECT DESIGN USING TMS320 C6713 DSK

A PID Controller for Real-Time DC Motor Speed Control using the C505C Microcontroller

Lab 4: Static & Switched Audio Equalizer

From Antenna to Bits:

An FPGA-based Re-configurable 24-bit 96kHz Sigma-Delta Audio DAC

AUTOMATIC IMPLEMENTATION OF FIR FILTERS ON FIELD PROGRAMMABLE GATE ARRAYS

Design Digital Non-Recursive FIR Filter by Using Exponential Window

Stratix Filtering Reference Design

EMBEDDED DOPPLER ULTRASOUND SIGNAL PROCESSING USING FIELD PROGRAMMABLE GATE ARRAYS

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

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

DSP Laboratory (EELE 4110) Lab#11 Implement FIR filters on TMS320C6711 DSK.

Experiment 6: Multirate Signal Processing

The University of Wisconsin-Platteville

Multirate DSP, part 1: Upsampling and downsampling

ECEGR Lab #8: Introduction to Simulink

Design & Implementation of an Adaptive Delta Sigma Modulator

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

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

Hardware Implementation of Adaptive Algorithms for Noise Cancellation

DECIMATION FILTER FOR MULTISTANDARD WIRELESS RECEIVER SHEETAL S.SHENDE

DIGITAL SIGNAL PROCESSING (Date of document: 6 th May 2014)

JANUARY 9, DIGITAL SIGNAL PROCESSING Analytical Principles of DSP and Digital Filter Design PRESENTED TO JAGJIT SEHRA

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

A Software Phase-Locked Loop from Theory to Practice: TMS320C6000 DSP Based Implementation and Analysis

Part One. Efficient Digital Filters COPYRIGHTED MATERIAL

Design of Multiplier Less 32 Tap FIR Filter using VHDL

Real-Time System Identification Using TMS320C30. Digital Signal Processor ABSTRACT I. INTRODUCTION

Part B. Simple Digital Filters. 1. Simple FIR Digital Filters

Transactions on Engineering Sciences vol 3, 1993 WIT Press, ISSN

RTTY: an FSK decoder program for Linux. Jesús Arias (EB1DIX)

DSpace Platform for Speed Estimation AC Slip-Ring Motor in Crane Mechatronic System

Design and FPGA Implementation of High-speed Parallel FIR Filters

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

ASN Filter Designer Professional/Lite Getting Started Guide

Audio Sample Rate Conversion in FPGAs

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

Using FPGA. Warin Sootkaneung Department of Electrical Engineering. and

Data Word Length Reduction for Low-Power DSP Software

ADVANCES in VLSI technology result in manufacturing

Transcription:

SIMULATION AND PROGRAM REALIZATION OF RECURSIVE DIGITAL FILTERS Stela Angelova Stefanova, Radostina Stefanova Gercheva Technology School Electronic System associated to the Technical University of Sofia, Mladost 1, 1750 Sofia, Bulgaria, +359 2 8750040, e-mails: sstefanova@elsys-bg.org, radi.gercheva@gmail.com In this paper, a technique for design, simulation, and DSP based program realization of recursive digital filters is proposed. The Matlab Filter Design Toolbox is used to obtain the coefficients, frequency and time domain responses with finite word length and second-order section realization of bandpass recursive digital filter. With the Real Time Workshop the previously simulated Simulink digital filter model has been automatically translated into DSP source code for the Texas Instruments DSP C5000 series. The TI Code Compose Studio is used to create a project that has been compiled by Visual Linker and has been loaded on the TMS320C5416 DSK board. Keywords: IIR digital filter, Simulink, DSP, TI CC Studio 1. INTRODUCTION There are numerous techniques developed for design, simulation, and implementation of digital filter based on MathWoks PC MATLAB Toolboxes [1], [2] and [3]. In resent years Digital Signal Processor (DSP) are getting to be used more and more to realize the digital signal processing system replacing the more conventional hardware elements like discrete digital components or a general purpose microprocessor based systems. In present work, a technique for design, simulation, and DSP based program realization recursive or IIR digital filters is proposed. The main idea of this approach is reduced to the following steps: 1) Obtaining the coefficients of bandpass recursive digital filter, frequency and time domain responses, and transfer function secondorder section realization with finite word length using Matlab Filter Design Toolbox; 2) Simulation and examination the behavior of Simulink digital filter model when appropriate harmonic excitation signals are applied to the digital filter input. 3) Translation the Simulink digital filter model into DSP C source code for the Texas Instruments DSP TMS320C5416 by means of Simulink Real Time Workshop (RTW). 4) Creation the project in the TI Code Compose Studio, compilation by Visual Linker and loading on the TMS320C5416 DSK board. 2. FINITE WORDLENGHT DESIGN OF RECURSIVE DIGITAL FILTERS Filter Design Toolbox is a collection of tools of the PC MATLAB that provides advanced techniques for designing, simulating, and analyzing FIR and IIR digital filters. It offers fixed-point implementation of single-rate and multirate FIR and IIR filters, including second-order sections (SOS) with section scaling and reordering. It 115

integrates the filter design process in MATLAB with system-level simulation in Simulink [4]. PC MATLAB Filter Design Toolbox is used to design a recursive digital filter with 16 bits fixed-point finite wordlength. The applied quantization method is round and saturate is chosen as a method to overcome the overflow effects. The quantized filter parameters are optimized and appropriate scaling values are introduced to normalize the outputs of the filter sections. The digital filter transfer function is realized as a cascade of the second-order sections in the form: L 1 2 b 0k + b1kz + b 2kz H (z) = H0 1 2 (1) к = 1 1 + a1kz + a2kz where H 0 is a constant, b 0k, b 1k, b 2k, a 1k, a 2k, k=1 L, are the coefficients of the nomination and denominator and L is a number of second order sections. The results from Filter Design Toolbox are saved in a <>.fda file, with specific format and the digital filter fixed-point SOS structure is written in a <>.mdl file, which is an executive file for Simulink Toolbox. 3. SIMULATION OF RECURSIVE DIGITAL FILTERS The PC MAtlab Simulink Toolbox is a block-diagram modelling environment for simulating dynamic systems, evaluating performance, and refining control, DSP, and communications system designs. Add-on products extend the Simulink environment with tools for specific modeling and design tasks and for code generation, algorithm implementation, test, and verification [4]. 3.1. Simulation model of the recursive digital filters Using PC MAtlab Simulink Toolbox the recursive digital filter simulation model is developed as shown in Fig. 1. The structure of this simulation model is based on some blocks with the following functions: Filter block, included in <>.mdl file; FromWaveFile block is the way to apply a set of harmonic excitations with different frequencies, generated in wave format, to the filter input and ToWaveFile block, used to save the filter responses in wave files, which can be displayed with specialized software. Fig.1. Block structure of the IIR digital filter simulation model The full structure of the simulation model is built using Filter Design Toolbox as a cascade of SOS that are realized in direct form II transposed, shown in Fig. 2. 3.2. Generation of harmonic input signals Cool Edit Pro is a digital audio editor computer program from Adobe Systems featuring both a multitrack, non-destructive mix/edit environment and a destructiveapproach waveform editing view of digital audio. 116

The program Cool Edit Pro is used to generate the appropriate harmonic excitations that are necessary to simulate the behavior of the recursive digital filters. For the purposes of the examination of the filter simulation model are generated the following harmonic signals: input signal with frequency in passband region of the designed IIR filter; input signal with frequency in transition region; input signal with frequency in stopband region. The complete observation of the filter behavior can be obtained when a sweep of input frequencies is applied to the filter input. This sweep of input harmonic signals is generated in the frequency range from 1 Hz to fs/2 Hz. Fig. 2. Structure of the second-order sections realized in direct form II transposed 4. CODE DEVELOPMENT FROM SIMULINK MODEL Real-Time Workshop generates and executes stand-alone C code for developing and testing algorithms modeled in Simulink. The resulting code can be used for many real-time and non-real-time applications, including simulation acceleration, rapid prototyping, and hardware-in-the-loop testing. [4]. The Real-Time Workshop of the PC MATLAB Simulink Toolbox is used to generate an ANSI C code for filter simulation model, designed for 16 bit fixed-point arithmetic and Texas Instruments DSP TMS320VC5416. 5. PROGRAM REALIZATION OF RECURSIVE DIGITAL FILTERS 5.1. TMS320C5416 DSP Starter Kit The TMS320VC5416 fixed-point [5], digital signal processor is based on an advanced modified Harvard architecture that has one program memory bus and three data memory buses. This DSP provides a 40-Bit arithmetic logic unit with a high degree of parallelism, application-specific hardware logic, on-chip memory, and additional on-chip peripherals. Separate program and data spaces allow simultaneous access to program instructions and data, providing a high degree of parallelism. The program realization of the recursive digital filter is developed on the base of Texas Instruments TMS320C5416 DSK (DSP Starter Kit) [5] that is shown in Fig. 3. 5.2. Code Composer Studio Integrated Development Environment Code Composer Studio (CCStudio) IDE is an integrated development tool that is a key component of the expressdsp Software and Development Tools strategy of Texas Instruments. Code Composer Studio includes the TMS320C54x code generation tools along with the APIs and plug-ins for both DSP/BIOS and RTDX [6]. 117

Fig. 3. TMS320C5416 DSP Starter Kit The project created with CCStudio must include the files, generated with RTW and the following header files: rtmodel.h, rtlibsrc.h, rt_mxclassid.h, rt_logging.h, dspeph_rt.h, dsp_rt.h, dsp_iso_math_rt.h, dsp_iso_math_rt.h, oper_32b.h, basic_op.h. It is necessary to change the length of the variables in the file limits.h to 16-bit, because RTW generates this variables for 8-bit processor. The creation of new project and configuration of a Visual Linker of the CCStudio is illustrated in Fig. 4. 5.3. Algorithm for realization of IIRdigital filter based on RTW and CCStudio The idea for program realization of IIR filters based on DSP is reduced to the following steps: generation of ANSI C code of the IIR filter structure with PC Matlab Real-Time Workshop; defining parameters and format of the code, which is included in TI CCStudio; load the generated <>.c and <>.h files in CCStudio; add the files which control the ADC and DAC for the DSK TMS 320C5416; put the folders containing the code, variables, stack and constants to the different memory regions; configure the Visual Linker; creation of <>.rcp configuration file with Visual Linker; compilation of the project and generation of <>.out file. 6. RESULTS The proposed approach is applied to design, simulate, and realize a bandpass recursive digital filter specified by the following requirements: bandpass cutoff frequencies F p1 = 650 Hz and F p2 = 1500Hz; lower bandstop range from 0 to F st1 = 450 Hz; upper bandstop range from F st2 = 2000 Hz to F s /2 = 3000 Hz; sampling frequency - F s = 6000 Hz ; maximum loss in the bandpass A p = 2dB and minimum loss in the bandstop frequency ranges A s1 A s2 40dB. Using Filter Design Toolbox the 8-th order elliptic recursive digital filter with 16 bits fixed-point arithmetic has been designed and saved in file Elliptic.fda. The digital filter frequency responses are shown in Fig. 5 amplitude response and Fig. 6 loss 118

response. The digital filter responses to the input harmonic signals with frequencies in the passband 850 Hz and in the stopband 2000 Hz are respectively shown in Fig. 6 and Fig. 7. The sweep of input harmonic signals generated in frequency range (20Hz- 3kHz) and the digital filter reaction are shown respectively in Fig. 8 a) and Fig. 8 b). Fig. 4. Creation of new project and configuration of Visual Linker of CCStudio The following files have been generated with Real-Time Workshop: Elliptic.c, Elliptic.h, Elliptic_data.c, Elliptic_private.h, Elliptic_types.h, limits.h, tmwtypes.h, simstruc_types.h,. It is necessary to add additional files: audioio.c, audioiocfg.h, audioiocfg_c.c, dsk5416.h, dsk5416_pcm3002.h, to the created in CCStudio project EllipCCS.pjt, which control the ADC and DAC. The Visual Linker of CCS is used to compile the project for the specified target board TMS320C5416. To organize the memory map is necessary to put the folders containing the code, variables, stack and constants to the specialized memory regions respectively: program memory - code_page_0, data memory - DRAM, data memory- DRAM, data memory -> SRAM. Fig. 5. Amplitude response of the recursive digital filter Fig.6. Loss response of the recursive digital filter 119

Fig. 6. Input signal with frequency 850Hz and recursive digital filter response Fig. 7. Input signal with frequency 2500Hz and recursive digital filter response Fig. 8a). Input sweep signal in the frequency range Fig. 8b). IIR digital filter response of the sweep [ 20Hz - 3000Hz ] input signal 7. CONCLUSIONS In this paper, a technique for design, simulation, and DSP based program realization of recursive digital filters is proposed. Using the Matlab Filter Design Toolbox, Simulink Toolbox, and Real Time Workshop have been obtained the coefficients, frequency and time domain responses with finite word length, SOS transfer function realization, has been simulated the Simulink digital filter model and has been generated DSP source code for the Texas Instruments DSP TMS320C5416. Using Texas Instruments Code Compose Studio the project has been create, compiled by Visual Linker, and has been loaded on the TMS320C5416 DSK board. The effectiveness of the proposed approach has been demonstrated with designing of a bandpass recursive digital filter. 8. REFERENCES [1] Abed, K.H., Venugopal, V., Nerurkar, S.B., High speed digital filter design using minimal signed digit representation, Proceedings IEEE on SoutheastCon, 8-10 April 2005 pp. 105 110. [2] Kovacshazy,T., Samu G., PeceliG., Simulink block library for fast prototyping of reconfigurable DSP systems, IEEE Int. Symposium on Intelligent Signal Processing, 4-6 Sept. 2003, pp.179 184. [3] Abed, K.H., Nerurkar, S.B., Low power and hardware efficient decimation filter, Wireless Communications and Networking, WCNC 2003, 2003 IEEE, Vol. 1, March 2003 pp. 454 459. [4] www.mathworks.com/products/. [5] TMS320VC5416 DSK Technical Reference, Spectrum Digital Incorporated, April 2004. [6] Code Composer Studio User s Guide, Texas Instruments, February 2000. 120