Lab 1B LabVIEW Filter Signal

Similar documents
LabVIEW Basics Peter Avitabile,Jeffrey Hodgkins Mechanical Engineering Department University of Massachusetts Lowell

Laboratory Experiment #1 Introduction to Spectral Analysis

PHYC 500: Introduction to LabView. Exercise 9 (v 1.1) Spectral content of waveforms. M.P. Hasselbeck, University of New Mexico

Advanced Lab LAB 6: Signal Acquisition & Spectrum Analysis Using VirtualBench DSA Equipment: Objectives:

LAB II. INTRODUCTION TO LABVIEW

Auntie Spark s Guide to creating a Data Collection VI

ENSC327 Communication Systems Fall 2011 Assignment #1 Due Wednesday, Sept. 28, 4:00 pm

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

Introduction to Simulink

II. LAB. * Open the LabVIEW program (Start > All Programs > National Instruments > LabVIEW 2012 > LabVIEW 2012)

DIGITAL SIGNAL PROCESSING TOOLS VERSION 4.0

LLS - Introduction to Equipment

CHM 152 Lab 1: Plotting with Excel updated: May 2011

MultiSim and Analog Discovery 2 Manual

EE 3302 LAB 1 EQIUPMENT ORIENTATION

EE 2274 RC and Op Amp Circuit Completed Prior to Coming to Lab. Prelab Part I: RC Circuit

University of Pennsylvania Department of Electrical and Systems Engineering Digital Audio Basics

ENGR 210 Lab 12: Sampling and Aliasing

8A. ANALYSIS OF COMPLEX SOUNDS. Amplitude, loudness, and decibels

Experiment 2 Effects of Filtering

Reference Sources. Prelab. Proakis chapter 7.4.1, equations to as attached

Velleman Arbitrary Function Generator: Windows 7 by Mr. David Fritz

LAB #7: Digital Signal Processing

Lab 3: RC Circuits. Construct circuit 2 in EveryCircuit. Set values for the capacitor and resistor to match those in figure 2 and set the frequency to

Experiment 2: Electronic Enhancement of S/N and Boxcar Filtering

Figure AC circuit to be analyzed.

LabVIEW Day 2: Other loops, Other graphs

Electrical & Computer Engineering Technology

Experiment 8: An AC Circuit

EENG-201 Experiment # 4: Function Generator, Oscilloscope

Experiment Guide: RC/RLC Filters and LabVIEW

MASSACHUSETTS INSTITUTE OF TECHNOLOGY /6.071 Introduction to Electronics, Signals and Measurement Spring 2006

Notes on Experiment #1

SpinCore RadioProcessor LabVIEW Extensions

Experiment 1 Introduction to MATLAB and Simulink

ET 304A Laboratory Tutorial-Circuitmaker For Transient and Frequency Analysis

Lab #2 First Order RC Circuits Week of 27 January 2015

Lab 3: Very Brief Introduction to Micro-Cap SPICE

PART I: The questions in Part I refer to the aliasing portion of the procedure as outlined in the lab manual.

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

Lab 15: Lock in amplifier (Version 1.4)

Time-Varying Signals

The oscilloscope and RC filters

UCE-DSO210 DIGITAL OSCILLOSCOPE USER MANUAL. FATIH GENÇ UCORE ELECTRONICS REV1

EE 4440 Comm Theory Lab 5 Line Codes

CREATING (AB) SINGLE- SUBJECT DESIGN GRAPHS IN MICROSOFT EXCEL Lets try to graph this data

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

EE 210 Lab Exercise #3 Introduction to PSPICE

Creo Revolve Tutorial

A graph is an effective way to show a trend in data or relating two variables in an experiment.

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Excel Tool: Plots of Data Sets

Activity P52: LRC Circuit (Voltage Sensor)

ECE65 Introduction to the Function Generator and the Oscilloscope Created by: Eldridge Alcantara (Spring 2007)

Analog Discovery Arbitrary Function Generator for Windows 7 by Mr. David Fritz and Ms. Ellen Robertson

ECG Analysis using the Offline Averaging Mode

Sound Waves and Beats

Memorial University of Newfoundland Faculty of Engineering and Applied Science. Lab Manual

Lab 6: Building a Function Generator

ECEGR Lab #8: Introduction to Simulink

EE 201 Lab! Tektronix 3021B function generator

EE2210 Laboratory Project 1 Fall 2013 Function Generator and Oscilloscope

Acoustics, signals & systems for audiology. Week 4. Signals through Systems

EE354 Spring 2016 Lab 1: Introduction to Lab Equipment

USO RESTRITO. Introduction to the Six Basic Audio Measurements. About this Technote. 1: Device Under Test and Signal Path. DUTs

Pre-Lab. Introduction

Introduction to Simulink Assignment Companion Document

SigCal32 User s Guide Version 3.0

LAB I. INTRODUCTION TO LAB EQUIPMENT

Physics 326 Lab 8 11/5/04 FOURIER ANALYSIS AND SYNTHESIS

Laboratory Experience #5: Digital Spectrum Analyzer Basic use

LTSpice Basic Tutorial

Comparing Across Categories Part of a Series of Tutorials on using Google Sheets to work with data for making charts in Venngage

ELEG 205 Analog Circuits Laboratory Manual Fall 2016

Reading: Johnson Ch , Ch.5.5 (today); Liljencrants & Lindblom; Stevens (Tues) reminder: no class on Thursday.

Fig. 1. NI Elvis System

University of California, San Diego Department of Electrical and Computer Engineering

LAB I. INTRODUCTION TO LAB EQUIPMENT

BME/ISE 3511 Laboratory One - Laboratory Equipment for Measurement. Introduction to biomedical electronic laboratory instrumentation and measurements.

Page 1/10 Digilent Analog Discovery (DAD) Tutorial 6-Aug-15. Figure 2: DAD pin configuration

Lab #1 Lab Introduction

CHM 109 Excel Refresher Exercise adapted from Dr. C. Bender s exercise

FACULTY OF ENGINEERING LAB SHEET

LAB 8: Activity P52: LRC Circuit

EC310 Security Exercise 20

Introduction to the Analog Discovery

QUICK START GUIDE FOR PSCOPE AC DATA COLLECTION AND ANALYSIS SOFTWARE DESCRIPTION

ME scope Application Note 01 The FFT, Leakage, and Windowing

Build Your Own Bose WaveRadio Bass Preamp Active Filter Design

ASN Filter Designer Professional/Lite Getting Started Guide

Using LTSPICE to Analyze Circuits

UCE-DSO212 DIGITAL OSCILLOSCOPE USER MANUAL. UCORE ELECTRONICS

Lab 3: AC Low pass filters (version 1.3)

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

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

BIOMEDICAL SIGNAL PROCESSING (BMSP) TOOLS

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

Spectrum Analysis: The FFT Display

An Introductory Guide to Circuit Simulation using NI Multisim 12

Gentec-EO USA. T-RAD-USB Users Manual. T-Rad-USB Operating Instructions /15/2010 Page 1 of 24

Transcription:

Lab 1B LabVIEW Filter Signal Due Thursday, September 12, 2013 Submit Responses to Questions (Hardcopy) Equipment: LabVIEW Setup: Open LabVIEW Skills learned: Create a low- pass filter using LabVIEW and modify its parameters Measure characteristics of the filtered signal amplitude and spectrum Learn the difference between high- pass filters, low- pass filters, and band- pass filters Observe different types of filters including Butterworth and Chebyshev Further Study: High- pass filters Band- pass filters Fourier Transforms Fast Fourier Transforms 1

Filter a Signal What we are doing: Learning to filter a signal. Filters remove a specific frequency or frequency range from a signal. We will create a filter and use it to filter an artificial signal. Then we will observe the results. This particular filter will be a 3 rd Order Low Pass Butterworth Filter. Why we are doing it: Sometimes the signal we observe contains noise that interferes with our ability to analyze it. High- frequency noise may alias down into frequencies we need to observe, low- frequency noise may cause an inconsistent baseline for the signal, or a specific extraneous frequency may be present (such as 60 Hz noise from United States powerlines). Filters can help to condition the signal prior to analysis. 2

http://www.r- bloggers.com/ecg- signal- processing/ 3

1. Open a new blank VI. Save it as my_filter.vi. 2. Go to the Block Diagram window. From the Express Pallet, click Signal Analysis. Click Filter and put it on the block diagram. 4

3. A window will appear marked Configure Filter [Filter]. Here you can set various parameters for the filter. We will leave it with the default values: - Filtering Type Lowpass - Filter Specifications 100Hz Cutoff Frequency - IIR filter, - Butterworth Topology, - Order=3 (3 rd Order Filter). Click OK. SAVE YOUR WORK!! 5

4. Create an input signal. Here we will create a sine wave to input into the filter. From the Express menu, select Simulate Signal. Place on the Block Diagram, left of the Filter. 6

5. A window will appear, labeled Configure Simulate Signal [Simulate Signal]. Leave it at the default values - Signal type Sine - Frequency 10.1 Hz - Amplitude 1 - Samples per Second 1000 - Number of Samples 100 Click OK 7

6. Wire together the Sine and the Signal (input) of the Filter. SAVE YOUR WORK!! 7. To the right of Filtered Signal on the Filter, there is a small arrow. Right click on that arrow, a menu will appear. Click on Create, then click Graph Indicator. A graph indicator will appear on the block diagram, connected to Filtered Signal. 8

8. Here we can change the label of our new graph to something more meaningful. We will also change it from the properties menu, so that the new name appears the same in both the block diagram, and in the front panel. Right- click on the new Filtered Signal graph in the block diagram, and click Properties. A Graph Properties popup will appear. - In the Label area, check Visible - Type into the box Filtered Signal if it s not already there - If the Caption box doesn t show Filtered Signal, first type that into the box, THEN uncheck Visible. NOTE: Type BEFORE unchecking Visible, because after unchecking, the box won t allow input. - Click OK Note: You can also explore other options for the graph by clicking different tabs inside the Graph Properties box Display Format etc. SAVE YOUR WORK!! 9

9. At this point, we will go to the Front Panel and make sure everything s working properly. Then we will move on. Go to the Front Panel and click the Run button. You should see a Graph, with a Sine Wave. Otherwise, return to previous steps and double- check your work. 10. Now that the filter is working, we will also make an indicator showing the original input signal, for comparison. Go to the Block Diagram window. Using the same approach we applied to create the Graph Indicator for the Filtered Signal, right- click on the small triangle next to Sine on the Simulate Signal VI. Choose Createà Graph Indicator. A Graph will appear, drag it down a little so the wires are visible. 10

SAVE YOUR WORK!! 11. Go to the Front Panel. Move the Sine graph to the left of the Filtered Signal. Click Run. You should see the output shown. SAVE YOUR WORK!! 11

12. Now we would like to modify some of the Filter parameters. Let s make some indicators on the front panel, so that we can access them easily. From the Block Diagram window, extend the Filter VI so the inputs are visible. Do the same for the Simulate Signal VI. Move the Graph Indicators if necessary. 13. For the filter, create a control that sets the Filter Cut- off frequency. Right- click on Lower Cut- Off, select Createà Control. Move the Control around if necessary. 14. Create a control for the signal frequency by repeating 13 for Frequency in the Simulate Signal VI. SAVE YOUR WORK!! 12

15. Go to the Front Panel and move the Controls around to convenient positions. A suggested layout is shown. SAVE YOUR WORK!! 16. Now test the filter. Switch to the Front Panel window. On the Tools Palette, switch to the Operate Value cursor (by clicking on the Arrow icon). Change the Frequency to 100, and the Lower Cut- Off to 10. Click Run. You should see the following output. 13

17. Notice the Amplitude on the two graphs has changed. They can be manually fixed to specific values, by right- clicking on the axis, and setting the Properties as shown. - unclick Autoscale - set Minimum to - 1 - set Maximum to 1 Click OK 14

Now the chart should appear as shown. SAVE YOUR WORK!! 15

Spectral Analysis of a Pure Tone (Sine Wave) So far, we ve created a low- pass filter, and placed graphs so we can see the original signal (the Sine wave) and the signal after it is passed through the filter (Filtered Signal). Since a Filter is used to limit the frequency content of a signal, it might be helpful to also provide a graph showing the frequency content of the signal. A graph that shows the frequencies in a signal is called a Spectrogram, and is often created using a computation called a Fast Fourier Transform (FFT). Look it up! 18. Create a spectrogram for the output signal using the following process: Go to the Express palette and choose Signal Analysisà Spectral. 19. Place the VI on the Block Diagram, and the following window will appear. Leave the values at their default settings, and click OK. 16

20. Connect the Spectral Measurements VI to the Filter output. - Wire the Signals input to the Filtered Signal output of the Filter - Right- click on FFT- RMS and Createà Graph Indicator. SAVE YOUR WORK!! 21. Go to the Front Panel and move the new Graph around as shown. Change the title of the new graph to Filtered Signal Spectrum. Save and click Run to test. Note the peak at frequency = 100. The input frequency is 100, so this is expected. Note that the Frequency is not a spike at 100 Hz. There is a small but significant signal spectrum around it, around 80-120 Hz. This is due to the type of filter used, and the shape of the window. What would we expect the signal to look like? Let s make a spectrogram for the input signal for comparison. 17

22. Create a new spectrogram, but this time, connect it directly to the simulated signal. The Block Diagram should appear as shown. Remember to change the title of the new Waveform graph to Input Signal Spectrum by right- clicking and selecting Properties. Save your work. 23. Adjust the Front Panel as shown. Save and run the VI. 18

Congratulations! You have built a low- pass filter! This filter can also be converted to a high- pass, or a band- pass filter, by right- clicking on the Filter VI and changing the parameters. Testing the Filter Now that you have a Low- Pass Filter, let s see how it works! The purpose of the following section is to examine the performance of the filter, and find the 3 db point. The 3dB point is an important characteristic of a filter it is the frequency where the output power is half of the input power. For convenience it s often referred to as the 3dB point, because on the decibel scale, this half- power point corresponds to - 3dB. # of db = M db = 20 log(v out /V in ) with Vout<Vin ( - M / 20 ) thus V out = (V in ) * 10 Therefore, for an input signal of 1.00 Vpp, the 3 db voltage would be (1.00 V)*(10^(- 3/20) = 0.707 Vpp. This corresponds to +0.354V peak on the graph, assuming the signal is centered on 0 Volts and there is no DC offset voltage shifting it up or down.) Different types of filters have varying trade- offs in the rate of cut- off, design complexity, implementation cost, etc. Note in LabVIEW we can directly plot the db output of the signal! HOWEVER we are going to measure and calculate it the old- fashioned way, so that we learn how to do it. This will help us to understand how it works, so we can develop an intuition for filter design. This intuition is valuable because it helps us to notice if our design produces unexpected results, so we can adjust it. It is good to do a sanity check on the output of your designs and your equations. 19

QUESTION 1. What do you see? Anything expected? Anything unexpected? Hint: This is partly due to the type of filter applied, and the order of the filter. Although the output filtered signal appears to be less optimal than the input, when we begin to combine input signals, and observe noisy signals, we will understand why we d want to apply a filter. QUESTION 2: What is the 3 db Frequency of 3 rd Order Low- Pass Butterworth Filter with a cut- off frequency of 1kHz? Hint: take the VI you just built, and set the Lower Cut- off to 1 khz. Then using the table below, type the Frequency Measurements into the Frequency box, and read the measurements from the Sine and Filtered Signal Amplitudes (NOT the spectrographs!) Also, consider the sampling theorem and set the number of samples per second (fs) in the signal source such that the signals are properly sampled and the cut- off frequency at the filter is at least less than fs/2. You should check what the signal looks like at the highest frequency in the time domain plot by observing 1-2 periods of the signal (change the x- axis, that is time, scale). 2.1 Fill in the following table. Input Frequency Input Amplitude Output (Filtered) Amplitude 1.5 khz 1.0 khz 500 Hz 100 Hz 50 Hz 20

10 Hz 2.2 The observed 3 db cut- off frequency is: 2.3 The Calculated 3 db cut- off frequency is: 2.4 What is the difference? Possible causes for this difference: 2.5 Repeat for a frequency of your choosing. Choose your own frequency, and repeat the process. Input Frequency Input Amplitude Output (Filtered) Amplitude 2.6 The observed 3 db cut- off frequency is: 2.7 The Calculated 3 db cut- off frequency is: 2.8 What is the difference? Possible causes for this difference: QUESTION 3: What is the 3 db Frequency of 3 rd Order Low- Pass Chebyshev Filter with a cut- off frequency of 1kHz? Hint: take the VI you just built, and set the Lower Cut- off to 1 khz. Then type the Frequency Measurements into the Frequency box, and read the measurements from the Sine and Filtered Signal Amplitudes (NOT the spectrographs!) 21

In the BLOCK DIAGRAM, RIGHT- CLICK ON FILTER, AND CLICK PROPERTIES. CHANGE THE TOPOLOGY TO CHEBYSHEV. RE- SAVE YOUR VI AS my_filter_chebyshev.vi. 3.1 Fill in the following table. Input Frequency Input Amplitude Output (Filtered) Amplitude 1.5 khz 1.0 khz 500 Hz 100 Hz 50 Hz 10 Hz 3.2 The observed 3 db cut- off frequency is: 3.3 The Calculated 3 db cut- off frequency is: 3.4 What is the difference? Possible causes for this difference: Spectral Analysis after filtering a Broad Spectrum Signal In the last example, we passed a pure tone (Sine wave) through a filter. A sine wave, in theory, only contains one frequency. Filters can attenuate pure tones, but they are even more useful for broad spectrum signals (which have multiple frequencies. We will now observe the filter s effects on a signal that contains many frequencies a Square wave. In theory, a square wave contains infinite frequencies. We will observe the change in the signal when we remove some of those frequencies. 22

24. In the Block Diagram, right- click on the Simulate Signal VI and select Properties. 25. The Configure Stimulate Signal window will appear. Change the signal type to Square. SAVE YOUR WORK AS my_filter_square.vi!! 23

26. Open the Front Panel and run the filter. QUESTION 5. What do you see? Anything expected? Anything unexpected? Hint: Observe the multimodal input signal, and the changes in the different components in the output signal. 24