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

Similar documents
LabVIEW Day 2: Other loops, Other graphs

Lab 1B LabVIEW Filter Signal

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

Digital Control Lab Exp#8: PID CONTROLLER

Lab 15: Lock in amplifier (Version 1.4)

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

Introduction to Simulink

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

ME 365 EXPERIMENT 8 FREQUENCY ANALYSIS

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

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

Laboratory Experiment #1 Introduction to Spectral Analysis

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

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

MATHEMATICAL FUNCTIONS AND GRAPHS

Frequency Domain Representation of Signals

SpinCore RadioProcessor LabVIEW Extensions

LAB II. INTRODUCTION TO LABVIEW

ME scope Application Note 02 Waveform Integration & Differentiation

Introduction to Simulink Assignment Companion Document

EKT 314/4 LABORATORIES SHEET

SigCal32 User s Guide Version 3.0

Objectives. Abstract. This PRO Lesson will examine the Fast Fourier Transformation (FFT) as follows:

LAB #7: Digital Signal Processing

SignalCalc Drop Test Demo Guide

Noise Measurements Using a Teledyne LeCroy Oscilloscope

Experiment P55: Light Intensity vs. Position (Light Sensor, Motion Sensor)

Experiment P49: Transistor Lab 2 Current Gain: The NPN Emitter-Follower Amplifier (Power Amplifier, Voltage Sensor)

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

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

EE 210 Lab Exercise #3 Introduction to PSPICE

LabVIEW 8" Student Edition

MultiSim and Analog Discovery 2 Manual

Spectrum Analyzer TEN MINUTE TUTORIAL

Magnitude and Phase Measurements. Analog Discovery

SigCalRP User s Guide

Experiment 1 Introduction to MATLAB and Simulink

Easy Transfer Function Measurements with LabVIEW 6i (Lab Skill Exercise X-1)

EE 4440 Comm Theory Lab 5 Line Codes

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

Auntie Spark s Guide to creating a Data Collection VI

Sound synthesis with Pure Data

Contents CALIBRATION PROCEDURE NI PXI-5422

Faculty of Information Engineering & Technology. The Communications Department. Course: Advanced Communication Lab [COMM 1005] Lab 6.

L A B 3 : G E N E R A T I N G S I N U S O I D S

Quadrature Amplitude Modulation (QAM) Experiments Using the National Instruments PXI-based Vector Signal Analyzer *

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

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

Introduction to the Analog Discovery

Activity P40: Driven Harmonic Motion - Mass on a Spring (Force Sensor, Motion Sensor, Power Amplifier)

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

NI USRP Lab: DQPSK Transceiver Design

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

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

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

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

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

The Discussion of this exercise covers the following points: Filtering Aperture distortion

Experiment P48: Transistor Lab 1 The NPN Transistor as a Digital Switch (Power Amplifier, Voltage Sensor)

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

Reference Manual SPECTRUM. Signal Processing for Experimental Chemistry Teaching and Research / University of Maryland

ENGR 210 Lab 12: Sampling and Aliasing

DIGITAL SIGNAL PROCESSING TOOLS VERSION 4.0

Contents CALIBRATION PROCEDURE NI 5412

How to Simply Generate a Frequency Hop Modulation

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

Signal Processing for Digitizers

Importing and processing gel images

Measurement of Amplitude Modulation AN 6

Experiment 15: Diode Lab Part 1

EECS 307: Lab Handout 2 (FALL 2012)

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

P a g e 1 ST985. TDR Cable Analyzer Instruction Manual. Analog Arts Inc.

Experiment #2: Introduction to Lab Equipment: Function Generator, Oscilloscope, and Multisim

EE354 Spring 2016 Lab 1: Introduction to Lab Equipment

Lab 13 AC Circuit Measurements

Drawing Bode Plots (The Last Bode Plot You Will Ever Make) Charles Nippert

APPLICATION NOTES. This complete setup is available from BIOPAC as Programmable Stimulation System for E-Prime - STMEPM

DiGi++ Noise Meter. Main functions

LAB 2 SPECTRUM ANALYSIS OF PERIODIC SIGNALS

Fourier Theory & Practice, Part I: Theory (HP Product Note )

EXPERIMENT 4 INTRODUCTION TO AMPLITUDE MODULATION SUBMITTED BY

Lab VIEW Programming for Vibration Analysis

Getting Started with the LabVIEW DSP Module

ECEGR Lab #8: Introduction to Simulink

FFT 1 /n octave analysis wavelet

m+p Analyzer Revision 5.2

Creating Calibrated UWB WiMedia Signals

Experiment 9 The Oscilloscope and Function Generator

Experiment 8: An AC Circuit

Exercise 2-1. PAM Signals EXERCISE OBJECTIVE DISCUSSION OUTLINE. Signal sampling DISCUSSION

Experiment P20: Driven Harmonic Motion - Mass on a Spring (Force Sensor, Motion Sensor, Power Amplifier)

EE 422G - Signals and Systems Laboratory

Lab 3: Very Brief Introduction to Micro-Cap SPICE

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

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

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

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

This tutorial will lead you through step-by-step to make the plot below using Excel.

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

Transcription:

PHYC 500: Introduction to LabView M.P. Hasselbeck, University of New Mexico Exercise 9 (v 1.1) Spectral content of waveforms This exercise provides additional experience with the Waveform palette, along with more cluster and array operations. A VI will be setup to produce a modulated sine wave followed by Fourier analysis. Open a blank VI and go to the Block Diagram. Right click and select Waveform: Analog Wfm: Generation: Sine Wfm. Alternatively, locate it with Quick Drop. Place two of these icons on the Block Diagram. One will generate the fundamental or carrier wave at frequency f0 and the second will be the modulation signal at frequency f1. Note that by definition f0 > f1. Create a Front Panel numerical control on the frequency terminal of the first sine wave generator and call it Fundamental frequency (f0). Do the same on the second and label it Modulation frequency (f1). Create a control on one generator for the terminal sampling info; this will produce a brown cluster icon on the Block Diagram. Wire this to the second Sine Wfm VI so that both are setup the same way. This control cluster sets the waveform sampling rate (Fs) and number of points (#s) in the signal. The defaults are 1 khz and 1000 points, respectively. Next multiply the signal out terminals together using the multiplication function on the Numeric Palette. Create an indicator on the Multiply output terminal; it will be a waveform cluster. Double click on the icon to locate the indicator on the Front Panel. Right click on the edge of the cluster and Replace: Graph: Waveform Graph. It is important to select the entire cluster and not one of its components (eg. t0, dt, or Y). This graph will be the modulated output waveform. In addition to the output waveform, both input signals should be monitored. Select Waveform: Get Waveform Components and place on the Block Diagram. Wire the signal out from the Sine Wave generator at f0 to the input. Click and drag the components icon down to show two output terminals (Y and attributes). Alternatively, right click and Add Element. Right click on the lower terminal, Select Item: dt. This corresponds to the time separation between points. Wire a second Get Wfm Components VI to the signal out terminal of the second Sine Wave generator that produces frequency f1. Only the Y data is needed here. The two waveforms will be plotted on the same Waveform Graph. In this exercise, the needed information is bundled into a cluster. This cluster contains the starting x value, dt, and a 2 D array with data from both waveforms. Select Cluster, Class, & Variant:

Bundle and place it on the Block Diagram. Right click on the top input terminal and create a floating point (DBL) constant of 0. Wire the second input terminal to the dt value from the first waveform. The lower terminal will connect to a 2 D array with both sets of y data. Select Array: Build Array and re size it to have two inputs. Connect the 1 D arrays (indicated by Y) to the two inputs of Build Array and wire the 2 D output (double orange wire) to the bottom terminal of the Bundle function. Consult the example Block Diagram below. Create an indicator at the output of the Bundle operation; double click on the icon to locate it on the Front Panel. Right click on the edge of the cluster and Replace: Graph: Waveform Graph. As before, be careful to click on the cluster boundary and not the internal components. You should now have a working VI. Select a modulation frequency smaller than the fundamental frequency (f1 < f0) and verify operation. An example Front Panel is shown below. The waveforms on the graphs can be easily customized. Drag down the Plot Legend on the multi plot graph to reveal the second channel and right click.

Fourier Analysis The Fourier power spectrum of the modulated signal is given by the squared amplitude of its Fourier transform F(ν) 2. Select Waveform: Analog Wfm: Measurements: FFT Power Spectrum and PSD.vi and place it on the Block Diagram. Connect a wire from the modulated waveform to the time signal input terminal. Create an indicator on the Power Spectrum/PSD output terminal. Double click on the icon to find it on the Front Panel and replace the cluster with a Waveform Graph. Run the VI and examine the FFT graph. Right click on the Plot Legend icon and select the line and symbol plot. You should see two peaks at frequencies f = f0 ± f1. The sampling frequency Fs will set the time step dt of the temporal waveform, which defines the maximum frequency in the Fourier spectrum. Choice of these parameters may make it very difficult to resolve peaks in the power spectrum graph. One option is to zoom in on the graph. Right click on the graph and select Visible Items: Graph Palette. Select the middle tool in the top row to re size the x axis display. The entire display can be restored by clicking on the first tool in the second row. Another option is to edit the displayed data range. Right click on the graph, select Properties: Scales. Disable Autoscale and set an appropriate Maximum for the x axis. This operation can also be performed directly on the right most scale marker on the x axis. Simply select it and change its value. An FFT power spectrum for f0 = 10 Hz, f1 = 2 Hz, and fmax = 20 Hz is shown below. The maximum value of the x scale can also be set programatically inside the VI. For example, the upper limit of the frequency axis can be set to twice the value of f0 or f1, depending on which one is larger. Go to the Block Diagram and select Comparison: Max

and Min. Wire the f0 and f1 controls to the two inputs labeled x and y. Multiply the max(x,y) output by 2. Right click on the Power Spectrum graph icon and create a Property Node: X Scale: Range: Maximum. Right click on the icon and select Change to Write. Wire a connection from its input terminal to the output of the multiplication operation. When the VI is run, you will notice that the Property Node fails to limit the maximum value of the frequency axis. This is caused by dataflow execution in the Block Diagram. The code executes as soon as data becomes available; re arranging the icons will not change the timing. The maximum value on the x axis is set by the Property Node, but that is overwritten by the FFT VI. One solution is to force the order of execution with a Flat Sequence structure. Locate this on the Structures palette and place it in the Block Diagram. Drop the Power Spectrum icon inside the structure, right click on its boundary, and Add Frame After. Place the Property Node in the second frame. This rigidly defines the order of execution. The complete Block Diagram will look similar to this: The Flat Sequence first draws the FFT graph, which is immediately followed by an x axis rescaling. A simpler and more efficient approach to dataflow programming can sometimes be implemented with error handling terminals. Error information can be forced to propagate through a sequence of component VIs by wiring the error cluster serially in the Block Diagram. This is illustrated with modifications to the above VI as shown below:

The error cluster is identified by the thick yellow white wire. The path of the wire forces the f1 sine wave generator to execute first, followed by the f0 generator, the FFT operation, and finally the Property Node write. A Simple Error Handler VI (found in the Dialog & User Interface palette) can be optionally added to alert the user to any problems encountered in these four operations. For the present situation, only a wire between the Power Spectrum VI error output and the Property Node error input is necessary to establish the desired sequence. Locate spectral peaks To increase the capability of the example VI, the frequencies of the two spectral peaks should be automatically identified. Go to the Block Diagram, right click and select Cluster, Class, & Variant: Unbundle by Name. Wire the power spectrum bundle to its input terminal. Right click on the icon and Add Element. Right click on the top output terminal and Select Item: magnitude. Select df for the bottom terminal. Note that a 2 D array of x and y values is not available, which is why a Waveform Graph is used instead of an XY Graph. The terminal labeled magnitude holds a 1 D array of y values ( yi). Select Array: Max & Min and place it on the Block Diagram near the Unbundle operation. Wire the 1 D array from magnitude to the input of Min & Max. We are interested in the index of the largest y value. The frequency corresponding to this peak is found by multiplying its index (an integer) times df. Display the result as an indicator and confirm it matches one of the peaks on the graph.

There is a second peak in the FFT spectrum that will have the same or slightly lower magnitude (this is due to sampling imprecision/noise). There are many possibilities for determining its frequency. A simple method is to replace the magnitude of the detected first peak with zero and repeating the maximum search. This is accomplished with the function Array: Replace Array Subset wired as shown below. LabView has a built in utility that can accomplish multiple spectral peak detection. Right click on the Block Diagram and select Waveform: Analog Wfm: Measurements: Extract Multiple Tone Information VI. Wire the modulated time signal waveform to its input. Right click on the multiple tone information output terminal and create an indicator on Front Panel. Run the VI and check that two frequencies are detected by scrolling through the two component cluster (select index 0 and 1 on the Front Panel).