Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711

Similar documents
Experiment 2: Sampling and Quantization

Lab 1 Introduction to the Software Development Environment and Signal Sampling

Journal of Theoretical and Applied Information Technology 20 th July Vol. 65 No JATIT & LLS. All rights reserved.

IMPLEMENTATION AND ANALYSIS OF FIR FILTER USING TMS 320C6713 DSK Sandeep Kumar

Experiment # 5. Pulse Code Modulation

PC-based Personal DSP Training Station

ECE438 - Laboratory 4: Sampling and Reconstruction of Continuous-Time Signals

Rapid prototyping of of DSP algorithms. real-time. Mattias Arlbrant. Grupphandledare, ANC

Low-Cost Personal DSP Training Station based on the TI C3x DSK

Figure 1: Feature Vector Sequence Generator block diagram.

Experiment 9 Analog/Digital Conversion

Digitization: Sampling & Quantization

Digital Fundamentals. Introduction to Digital Signal Processing

Department of Electrical & Electronic Engineering Imperial College of Science, Technology and Medicine. Project: Real-Time Speech Enhancement

Embedded Signal Processing with the Micro Signal Architecture

with - < n < +. There are two types of approximations associated with the sampling process. finite precision of the ADC finite sampling frequency.

PROVIDING AN ENVIRONMENT TO TEACH DSP ALGORITHMS. José Vieira, Ana Tomé, João Rodrigues

Introduction To LabVIEW and the DSP Board

Digital Signal. Continuous. Continuous. amplitude. amplitude. Discrete-time Signal. Analog Signal. Discrete. Continuous. time. time.

Experiment # 4 Counters and Logic Analyzer

Spectrum Analyser Basics

DSP in Communications and Signal Processing

1.1 Digital Signal Processing Hands-on Lab Courses

REAL-TIME DIGITAL SIGNAL PROCESSING from MATLAB to C with the TMS320C6x DSK

Lab experience 1: Introduction to LabView

Lab #10: Building Output Ports with the 6811

An Introduction to Hardware-Based DSP Using windsk6

Module 8 : Numerical Relaying I : Fundamentals

NanoGiant Oscilloscope/Function-Generator Program. Getting Started

Multirate Digital Signal Processing

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

Digital Effects Pedal Description Ross Jongeward 10 December 2014

Lab #6: Combinational Circuits Design

Laboratory Assignment 3. Digital Music Synthesis: Beethoven s Fifth Symphony Using MATLAB

Tempo Estimation and Manipulation

Digital Signal Processing

MTL Software. Overview

PEP-II longitudinal feedback and the low groupdelay. Dmitry Teytelman

ECE 4220 Real Time Embedded Systems Final Project Spectrum Analyzer

Interfacing Analog to Digital Data Converters. A/D D/A Converter 1

Lab 2: A/D, D/A, and Sampling Theorem

Appendix D. UW DigiScope User s Manual. Willis J. Tompkins and Annie Foong

DHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai

Experiment: FPGA Design with Verilog (Part 4)

A 400MHz Direct Digital Synthesizer with the AD9912

Chapter 3. Basic Techniques for Speech & Audio Enhancement

A First Laboratory Course on Digital Signal Processing

PCM ENCODING PREPARATION... 2 PCM the PCM ENCODER module... 4

DPD80 Visible Datasheet

Implementation of Graphical Equalizer using LabVIEW for DSP Kit DSK C6713

ME EN 363 ELEMENTARY INSTRUMENTATION Lab: Basic Lab Instruments and Data Acquisition

DPD80 Infrared Datasheet

Laboratory Exercise 4

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

LabView Exercises: Part II

CSE 352 Laboratory Assignment 3

Laboratory 5: DSP - Digital Signal Processing

CPE 310L EMBEDDED SYSTEM DESIGN (CPE)

Virtual instruments and introduction to LabView

Experiment 13 Sampling and reconstruction

Beginners How to Test DSO138mini

Crash Course in Digital Signal Processing

Calibrate, Characterize and Emulate Systems Using RFXpress in AWG Series

Course Web site:

Converters: Analogue to Digital

Implementing a Rudimentary Oscilloscope

Digital Lock-In Amplifiers SR850 DSP lock-in amplifier with graphical display

inter.noise 2000 The 29th International Congress and Exhibition on Noise Control Engineering August 2000, Nice, FRANCE

Diamond Cut Productions / Application Notes AN-2

Voice Controlled Car System

DMC550 Technical Reference

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

Advanced Skills with Oscilloscopes

ECE-320 Lab 5: Modeling and Controlling a Pendulum

Keywords Xilinx ISE, LUT, FIR System, SDR, Spectrum- Sensing, FPGA, Memory- optimization, A-OMS LUT.

B I O E N / Biological Signals & Data Acquisition

2 MHz Lock-In Amplifier

: INTERFACING J-DSP WITH A TI DSK FOR USE IN A SIGNAL PROCESSING CLASS

HARDWARE IN THE LOOP SIMULATION USING REAL-TIME CD++

ASNT_PRBS20B_1 18Gbps PRBS7/15 Generator Featuring Jitter Insertion, Selectable Sync, and Output Amplitude Control

Introduction to the oscilloscope and digital data acquisition

Version 1.10 CRANE SONG LTD East 5th Street Superior, WI USA tel: fax:

Interfacing the TLC5510 Analog-to-Digital Converter to the

FPGA Development for Radar, Radio-Astronomy and Communications

Arbitrary Waveform Generator

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Real-time EEG signal processing based on TI s TMS320C6713 DSK

Due date: Sunday, December 5 (midnight) Reading: HH section (pgs ), mbed tour

DT9834 Series High-Performance Multifunction USB Data Acquisition Modules

Exercise 2: D-Type Flip-Flop

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Chapter 4. Logic Design

Inside Digital Design Accompany Lab Manual

LABORATORY 14: ANALOG TO DIGITAL CONVERSION USING ADC0809

Working with a Tektronix TDS 3012B Oscilloscope EE 310: ELECTRONIC CIRCUIT DESIGN I

Major Differences Between the DT9847 Series Modules

Towards More Efficient DSP Implementations: An Analysis into the Sources of Error in DSP Design

DT9857E. Key Features: Dynamic Signal Analyzer for Sound and Vibration Analysis Expandable to 64 Channels

Digital Signal Processing Lecture One Introduction to Digital Signal Processing Third Stage Prepared by: Marwah Kareem

Session 1 Introduction to Data Acquisition and Real-Time Control

Transcription:

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711 Thursday, 4 November 2010 Objective: To implement a simple filter using a digital signal processing microprocessor using the TI Code Composer development tools. To compare the performance of different filter designs using inputs from a signal generator and viewing outputs on an oscilloscope To filter audio signals. Introduction: A signal processing microprocessor is a special purpose processor with an architecture designed to efficiently implement DSP operations in real time for embedded applications. For this lab and the following labs we will use a development kit board with a TI tms320c6416 and ADCs and DACs for real time signal processing. A block diagram taken from the second reference is shown here. The AIC23 Codec includes the conversions between digital and analog signals. The Code Composer Studio development tools allow you to create programs that can be downloaded to the dsk6416 board. The compiler interprets the C code instructions and creates a sequence of assembly language instructions which will accomplish the desired operations. The.asm file, which is created by the compiler, is then used by the linker to create a corresponding set of binary machine instructions. When these instructions are loaded into the DSK processor, executing them implements the original C code instructions. In this laboratory we will use interrupts to respond to the analog interface ADC and DAC at 8000 samples per second. At each interrupt a data sample is read and added to a queue. The queue, which is implemented using a circular buffer, is used to compute the filtered output for an FIR filter. An IIR filter will have a queue for the input and a separate queue for the output. The frequency selective behavior of the filter is determined by its coefficients. The filter will be implemented using floating point arithmetic, but its output will be converted to a short integer before it is sent to the DAC. Laboratory Procedure:

Step 1: Set up the equipment and create a project with Code Composer. 1. Turn on the signal generator and the oscilloscope so they can warm up. 2. Connect the DSK board to the computer using the USB cable and connect power to the board. 3. Follow the setup instructions for Code Composer and the 6416 DSK board. Use the version of fir.c below which includes test.cof, not ave5.cof. 4. Set up the signal generator to produce a 500 Hz sinusoidal signal with an amplitude of 0.5 V peak to peak. Using a BNC T connector, connect the output of the signal generator to an oscilloscope input and to the DSK board input. Display the signal on the scope and verify the amplitude and frequency. Set this channel up to be the sync trigger for the scope. 5. Connect the analog output from the DSK board to a second scope input. Step 2: Use the DSK board to sample a signal from the signal generator and output it to the oscilloscope. 1. Run the program and view the input and output DSK signals on the scope. Be sure that the sync is set up to trigger on the signal generator signal for both displays. 2. Verify that the DSK output signal looks like the signal generator signal. 3. From the scope display measure the time between the peak of the signal generator signal and the DSK output signal. Record this value. This measure the time it takes to capture a discrete time signal and then output it through a D/A when there is no discrete time processing. Step 3: Explore the effect of the analog anti-aliasing and anti-imaging filters on the frequency range of the system. 1. Decrease the frequency of the signal generator signal until the output is less than half the amplitude of the 500Hz output. Record this value. 2. Change the signal frequency to 3500Hz and then increase the frequency until the output is less than half the amplitude of the 500Hz output. Record this frequency value. 3. Set the frequency of the signal generator to 200 Hz and verify that you can see the output signal. 4. Change the signal generator waveform to a square wave. Sketch the output waveform shape. 5. Increase the signal generator frequency to 500 Hz. Sketch the output waveform shape. 6. Slowly increase the frequency to 1000 Hz. How does the output waveform change? Explain what you see. 7. Slowly increase the frequency to 2000 Hz. How does the output waveform change? Sketch the output waveform. Explain what you see.

8. Repeat steps3.3 to 3.7 using a triangular waveshape. How does this result compare to the square wave results? 9. Set the wave shape back to sinusoidal at 500 Hz. 10. Change the coefficients in test.cof to all be zero except for the fourth value which will be one. Repeat Step 2.3. How does this time interval compare to the interval measured in Step 2.3? Step 4: After Step 3 is complete, explore the effect of the five sample moving average by including ave5.cof file instead of test.cof and rebuilding the project. 1. With a sinusoidal signal input, observe the amplitude of the output signal as you change the frequency. 2. Record the amplitude of the output when the frequency is 500 Hz, 1 KHz, 1.5 KHz, and 2KHz. 3. Find two frequencies below 3.5 KHz where the output is zero and record the frequency values. Step 5: Build and test a new project for a notch filter. 1. The notch filter should have two poles and two zeros. Use the notch filter C code from your prelab work and set the notch filter parameters to create a notch at 1KHz when the sampling rate is 8KHz. The poles should have a magnitude of 0.9. 2. Test and debug your code. Be very careful that the data stored in the queues is the correct data located at the correct index. 3. Find a frequency less than 3.5 KHz which produces an output of 0. How close is it to 1 KHz? 4. Find the frequencies above and below the notch frequency where the amplitude is 50% of the output level at 300 Hz. How wide is the notch? Questions: 1. What changes would be needed in the fir program to output the average of the last 15 inputs instead of the last 5? 2. How long a queue would be needed for the input if the fir filter would add an echo with a delay of 0.5 s? 3. Why do the square wave and triangle wave change shape as the frequency is increased? At what frequency would you expect them both to look like a sinusoidal signal? Why? 4. At what frequencies would you expect to see an output of zero from the filter which averages 5 input values? How does this compare to the results you observed in Step 4.3? 5. How would you modify your C code to implement your notch filter in a Direct Form II transpose form.

Submit the answers to the questions above and the questions in the laboratory procedure as well as the data and sketches requested in the procedure. Submit a listing of C code instructions for Question 5. The two files shown below will be provided in the laboratory. File fir.c // program fir.c #include "DSK6416_AIC23.h" // codec support Uint32 fs=dsk6416_aic23_freq_8khz; //set sampling rate #define DSK6416_AIC23_INPUT_MIC 0x0015 #define DSK6416_AIC23_INPUT_LINE 0x0011 Uint16 inputsource=dsk6416_aic23_input_line; // select line in #include "test.cof" float x[n]; //filter coefficient file //filter delay line interrupt void c_int11() //ISR - AIC23 codec interrupts at 8kHz { short i; float yn = 0.0; } x[0] = (float)(input_left_sample()); //get new input into delay line for (i=0 ; i<n ; i++) //calculate filter output yn += h[i]*x[i]; for (i=(n-1) ; i>0 ; i--) //shuffle delay line contents x[i] = x[i-1]; output_left_sample((short)(yn)); //output to codec return; void main() //main body of program does nothing { comm_intr(); //initialise DSK while(1); //infinite loop } File ave5.cof //ave5.cof Coefficient file for use with programs fir.c and firprn.c //Implements five point moving average filter #define N 5 float h[n] = {0.2, 0.2, 0.2, 0.2, 0.2}; File test.cof //test.cof Coefficient file for use with programs fir.c //outputs sample values with no digital processing #define N 5

float h[n] = {1.0, 0.0, 0.0, 0.0, 0.0}; (c) Copyright 2000-2010 Sally Wood