LAB 4 DIGITAL FILTERING

Similar documents
Frequency Response of Filters

Lab #9: AC Steady State Analysis

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electronic Circuits Spring 2007

The Calculation of G rms

Step Response of RC Circuits

CIRCUITS LABORATORY EXPERIMENT 3. AC Circuit Analysis

Inductors in AC Circuits

Experiment 3: Double Sideband Modulation (DSB)

ε: Voltage output of Signal Generator (also called the Source voltage or Applied

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

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

DIODE CIRCUITS LABORATORY. Fig. 8.1a Fig 8.1b

Analog signals are those which are naturally occurring. Any analog signal can be converted to a digital signal.

The Time Constant of an RC Circuit

Experiment 5. Strain Gage Measurements

See Horenstein 4.3 and 4.4

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective

Transition Bandwidth Analysis of Infinite Impulse Response Filters

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

CHAPTER 6 Frequency Response, Bode Plots, and Resonance

LABORATORY 2 THE DIFFERENTIAL AMPLIFIER

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

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

Time series analysis Matlab tutorial. Joachim Gross

Experiment # (4) AM Demodulator

Oscilloscope, Function Generator, and Voltage Division

Lecture 1-6: Noise and Filters

PHYSICS LAB #2 Passive Low-pass and High-pass Filter Circuits and Integrator and Differentiator Circuits

Electrical Resonance

Time Series Analysis: Introduction to Signal Processing Concepts. Liam Kilmartin Discipline of Electrical & Electronic Engineering, NUI, Galway

HYBRID FIR-IIR FILTERS By John F. Ehlers

Lock - in Amplifier and Applications

Lab #4 Thevenin s Theorem

Step response of an RLC series circuit

Laboratory 4: Feedback and Compensation

Jitter Transfer Functions in Minutes

= V peak 2 = 0.707V peak

Lab 3: Introduction to Data Acquisition Cards

What you will do. Build a 3-band equalizer. Connect to a music source (mp3 player) Low pass filter High pass filter Band pass filter

Analog Representations of Sound

EXPERIMENT NUMBER 8 CAPACITOR CURRENT-VOLTAGE RELATIONSHIP

LAB 12: ACTIVE FILTERS

Objectives The purpose of this lab is build and analyze Differential amplifiers based on NPN transistors (or NMOS transistors).

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

Bipolar Transistor Amplifiers

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Introduction to Digital Filters

Understanding Dynamic Range in Acceleration Measurement Systems. February 2013 By: Bruce Lent

Chapter 10. RC Circuits ISU EE. C.Y. Lee

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

Optical Fibres. Introduction. Safety precautions. For your safety. For the safety of the apparatus

Transistor Amplifiers

EDEXCEL NATIONAL CERTIFICATE/DIPLOMA UNIT 5 - ELECTRICAL AND ELECTRONIC PRINCIPLES NQF LEVEL 3 OUTCOME 4 - ALTERNATING CURRENT

RLC Series Resonance

Experiment #11: LRC Circuit (Power Amplifier, Voltage Sensor)

LABORATORY 10 TIME AVERAGES, RMS VALUES AND THE BRIDGE RECTIFIER. Bridge Rectifier

EE 1202 Experiment #4 Capacitors, Inductors, and Transient Circuits

EXPERIMENT NUMBER 5 BASIC OSCILLOSCOPE OPERATIONS

Experiment 8 : Pulse Width Modulation

PLL frequency synthesizer

Using an Oscilloscope

Electronics. Discrete assembly of an operational amplifier as a transistor circuit. LD Physics Leaflets P

TTT4110 Information and Signal Theory Solution to exam

MATERIALS. Multisim screen shots sent to TA.

EE362L, Power Electronics Triac Light Dimmer

Active Vibration Isolation of an Unbalanced Machine Spindle

Vi, fi input. Vphi output VCO. Vosc, fosc. voltage-controlled oscillator

Using Microcontrollers in Digital Signal Processing Applications

SGN-1158 Introduction to Signal Processing Test. Solutions

Lab E1: Introduction to Circuits

LOW COST MOTOR PROTECTION FILTERS FOR PWM DRIVE APPLICATIONS STOPS MOTOR DAMAGE

Frequency Response of FIR Filters

Sophomore Physics Laboratory (PH005/105)

Laboratory #5: RF Filter Design

FREQUENCY RESPONSE OF AN AUDIO AMPLIFIER

Electricity & Electronics 5: Alternating Current and Voltage

RC & RL Transient Response

Analog and Digital Signals, Time and Frequency Representation of Signals

SECTION 6 DIGITAL FILTERS

Lab 1. The Fourier Transform

Spike-Based Sensing and Processing: What are spikes good for? John G. Harris Electrical and Computer Engineering Dept

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

SUMMARY. Additional Digital/Software filters are included in Chart and filter the data after it has been sampled and recorded by the PowerLab.

Frequency response: Resonance, Bandwidth, Q factor

MICROPHONE SPECIFICATIONS EXPLAINED

Chapter 12: The Operational Amplifier

SERIES-PARALLEL DC CIRCUITS

Analog and Digital Filters Anthony Garvert November 13, 2015

Spectrum Level and Band Level

(Refer Slide Time: 01:11-01:27)

A wave lab inside a coaxial cable

Active Noise Cancellation Project

Lab Exercise 1: Acoustic Waves

AM Receiver. Prelab. baseband

Laboratory Manual. ELEN-325 Electronics

AC CIRCUITS - CAPACITORS AND INDUCTORS

Implementation of Digital Signal Processing: Some Background on GFSK Modulation

Unit2: Resistor/Capacitor-Filters

CM0340 SOLNS. Do not turn this page over until instructed to do so by the Senior Invigilator.

Waveforms and the Speed of Sound

Transcription:

LAB 4 DIGITAL FILTERING 1. LAB OBJECTIVE The purpose of this lab is to design and implement digital filters. You will design and implement a first order IIR (Infinite Impulse Response) filter and a second order IIR filter. Both filters are low pass filters. You will learn how to determine the analytical frequency response of each filter. During the lab session, you will measure the frequency response of the filters and compare the results with the analytical solution. You will also learn about another type of filter called the FIR (Finite Impulse Response) filter. An important application of a digital filter is to eliminate noise from sensors, such as strain gauges, tachometers, accelerometers, etc. 2. BACKGROUND 2.1. Introduction to Digital Filtering The two types of filters discussed in this lab are: Infinite Impulse Response (IIR) filter Finite Impulse Response (FIR) filter Detailed information on these filters will be given in lecture. However, a short summary of each filter is given below. 2.2. IIR Filters The recursive equation for a first order IIR filter is y(n) = A*y(n-1) + B*x(n) where, and x(n) is the input sequence. y(n) is the output sequence. A & B are constants to be determined during filter design. The frequency response of the filter depends on the values of the constants A and B. In the lecture, you will learn how to select A and B to achieve the desired frequency response.

2.3. FIR Filters The recursive equation for a first order finite response filter is y(n) = C*x(n) + D*x(n-1) Similarly, the frequency response of the FIR filter depends on C and D which you will learn how to choose in lecture. 2.4. Double Filtering One method for obtaining a second order filter is double filtering. Two cascaded first order filters are equivalent to a second order filter. If the two first order filters are identical, the transfer function of the second order filter is the square of the first order transfer function. The double filtering procedure can be performed in two steps: 1) The input sequence x(n) is filtered with a first order filter, and an output sequence y(n) is obtained. y(n) = A*y(n-1) + B*x(n) 2) y(n) is filtered with the same first order filter to obtain the output z(n). z(n) is the output of a second order filter. z(n) = A*z(n-1) + B*y(n) A detailed procedure for finding the filter coefficients for double filtering will be given in lecture. 3. PRELAB Prelabs will be checked at the beginning of class. 1. Design a first order IIR filter with a cutoff frequency of 20Hz. Determine the filter coefficients A and B for this frequency response. Assume a sampling frequency of 750 Hz. 2. Write a C program that implements this filter. A good way to write this program is to start with the sine_io.c program available on the course website. Only a few lines of code need to be altered to create the filtering program. 3. Design a second order IIR filter with a cutoff frequency of 20 Hz. Determine the filter coefficients A and B for this frequency response. Assume a sampling frequency of 750 Hz. 4. Write a C Program that implements this filter.

5. Determine the analytical frequency response of the filters by completing the following table. Do not convert the magnitude to decibels. Plot the analytical frequency response using graph paper or a computer-plotting package. Analytical Frequency Response: FREQUENCY (Hz.) MAGNITUDE MAGNITUDE (first order filter) (second order filter) 5.... 10.... 15.... 20.... 25.... 30.... 40.... 50.... 60.... 70.... 80.... 90.... 100.... 125.... 150.... 6. Write a C-program that reads in a 20Hz sine wave with an amplitude of 1V (rms) through ADC0 channel and writes out its derivative at DAC0 channel. Use a sampling frequency of 750 Hz. Again, start with sine_io.c for creating this program.

4. LAB PROCEDURE This laboratory assignment involves measuring the actual frequency response of a first order filter and comparing the results to the analytical frequency response that you determined in the prelab. Create your first order IIR lowpass filter program using the editor. Compile and build the program. 1. Use the function generator to output a 5 Hz sine wave with a magnitude of 1V rms (2.828 volts peak to peak). 2. Connect the function generator and channel 1 of the oscilloscope to the ADC0 channel. 3. Connect channel 2 of the oscilloscope and the multimeter to the DAC0 channel. 4. Write down the amplitude of the filtered signal by reading the multimeter. 5. Repeat the above steps for all the frequencies listed in the table in the prelab. Use the same procedure to experimentally determine the frequency response of the second order filter. For each frequency in the following table, measure the output voltage using the multimeter. Record the result in the table. Observe the input and output signals on the oscilloscope. Experimental frequency response: FREQUENCY (Hz.) MAGNITUDE MAGNITUDE (first order filter) (second order filter) 5.... 10.... 15.... 20.... 25.... 30.... 40.... 50....

60.... 70.... 80.... 90.... 100.... 125.... 150.... 5. POSTLAB AND LAB REPORT 1. Determine the analytical frequency response of the FIR filters given below by completing the table. Do not convert the magnitude to decibels. Assume a sampling frequency of 30000 Hz. Plot the analytical frequency response for each filter using graph paper or a computer plotting package. FILTER A: FILTER B: FREQUENCY (khz.) y(n) = 0.5*x(n) + 0.5*x(n-1) y(n) = 0.9*x(n) + 0.1*x(n-1) FILTER A. FILTER B. MAGNITUDE: MAGNITUDE 0.01.. 1.. 2.. 3.. 4.. 5.. 6.. 7.. 8.. 9.. 10.. 11.. 12.. 14.. 2. What are the cutoff frequencies of the FIR filters A and B in Question 1?

3. Is it possible to design a first order lowpass FIR filter with a cutoff frequency of 250 Hz? Why or why not? Use a sampling frequency of 29940 Hz. 4. Compare the analytical and experimental frequency responses for the IIR filters that you designed. Explain the similarity and/or discrepancy. 5. When you calculated the derivative of a sine wave, did you get a perfect cosine wave (i.e. did you get a perfect phase shift of 90 o )? Were there any problems due to noise? Explain. 6. Show that the circuit below acts as a high-pass filter in which low frequencies are attenuated and high frequencies are passed. VR V o Vi ~ R C VC (Hint: First find the transfer function V o (s)/v i (s) of the circuit. To find the frequency response, substitute s = j in the transfer function and find the magnitude for <<(1/RC) and for >>(1/RC)). Lab Report Requirements Solutions to questions one through six. Hardcopy of the C Programs for the first and second order filters. Analytical and experimental frequency response for the first and second order IIR filters. Plot analytical and experimental frequency responses for each filter on one graph. Use any software plotting package you want.