Spectral Analysis & Programming Options
Spectral Analysis & Programming Options
Spectral Analysis
&
Programming Options
Spectral Analysis Lab Agenda
1. Spectral Analysis and Aliasing
2. Experiment 6b LabView Preparation
3. 6b Experimental Idea- Impulse Input
(Optional)
2
Spectral Analysis
Often, you will sample a signal that is not a
simple sine or cosine wave but a combination of
several.
Fouriers theorem states that any waveform in
the time domain (that is, one that you can see
on an oscilloscope) can be represented by the
weighted sum of sines and cosines.
The combined waveform appears in the
frequency domain as amplitude and phase
values at each component frequency.
Open ExampleVI.vi and run the vi. Adjust the 3
frequencies. What does the code do?
Spectral Analysis
Spectral Analysis
Now add a spectral measurements VI to
the block diagram (Express>Signal
Analysis>Spectral Analysis).
Select Magnitude (Peak), Result>Linear
and Windowing>None on the pop up
window.
Input the combined signal wire into the
Spectral Measurements VI and add
graphical indicators to the phase and FFT
outputs. This should result in.
Spectral Analysis
Amplitude and
phase spectra
obtained from the
Spectral express VI
(Express>Signal
Analysis>Spectral)
Spectral Analysis Exercises
Vary the frequencies of the signals and
understand what is happening to the
amplitude and phase spectra.
Spectral Analysis - Aliasing
Open the Aliasing LLB (LabView Library
File), then double click on the Aliasing.VI
in the LLB manager screen.
Follow the instructions under the
Description section of the program,
which provide a number of different
exercises to learn about aliasing in
experiments.
Spectral Analysis - Aliasing
Aliasing Exercise
Vary the signal frequency for a fixed
sampling rate until the signal is greater
than half the sampling rate.
What is happening to the sampled frequency
in the spectrum?
Can you relate this to the way the spectrum is
computed?
Spectral Analysis Lab Agenda
1. Spectral Analysis and Aliasing
2. Experiment 6b LabView Preparation
3. 6b Experimental Idea- Impulse Input
(Optional)
11
Experiment 6 Digital Introduction
In the second Instrumentation Lab (Experiment 6a),
you manually controlled a function generator to
excite a beam and used an oscilloscope to
measure the response of that beam.
Week 5s Instrumentation Lab is essentially a redo
of the first Experiment 6, but will incorporate new
digital measurement techniques to automate most
of the data taking.
12
Experiment 6 Digital Introduction
Specifically, you will be using the myDAQ to
output a voltage signal that will control the function
generator. The myDAQ will also measure the
function generator output as well as the output
from the proximeter. The code you create will
cycle through output voltages until the resonant
frequency is found.
All operations will be controlled via Labview, using
a code that will be created today.
Further details of Experiment 6 Digital can be
found on the course website. 13
Automated Data Acquisition
We will write a code that sweeps frequency and
looks for resonance.
LabView is not a linear programming language.
You can add various functions on your block
diagram and they will be all run simultaneously.
To find the resonant frequency we need to
perform the following operations in a specific
order:
Adjust the frequency on the function generator using
the MyDAQ analog output
Let the beam adjust to the new frequency
Take measurements using the MyDAQ analog inputs
Automated Data Acquisition
Flat Sequence (Programming>
Structures> Flat Sequence)
Frame 1 Frame 2
Excitation frequency
Response amplitude
Wrapping Up
Now, all the pieces of the lab 6b code are put together. Study each
component of the code and make sure you understand exactly what
is going on. Dont hesitate to ask questions if something isnt clear.
You will also have to go to your VI Front Panel and organize the
graphs and indicators.
If you finished early, use the rest of the time to prepare for lab 6b.
Think of some new goals you can accomplish using the automated
code and myDAQs that werent possible using the analog
equipment. Feel free to modify the code you just created as well to
do additional things.
A complete picture of the code is found on the next slide.
Also included, starting on slide 37, is an exercise to excite the beam
via an impulse force and measure the sinusoidal decay.
Your myDAQs will be collected at the end of Week 5s lab session.
Make sure all of the components of the myDAQ are collected in the
box you received it in.
Complete Code
Spectral Analysis Lab Agenda
1. Spectral Analysis and Aliasing
2. Experiment 6b LabView Preparation
3. 6b Experimental Idea- Impulse Input
(Optional)
39
Impulse Input
In this test, instead of measuring the response of
the beam to a sinusoidal excitation, we will
measure the response of the beam to an initial
impulse.
In theory, a pure impulse function will set an
initial velocity to the system. After the initial
impulse, there are no outside forces on the
system besides the damping and spring forces,
and the system will vibrate at its damped natural
frequency.
Experimental Setup
You will have to power the beam proximeters,
and set up the myDAQ to measure the output of
the proximeter.
42
myDAQ Connections
BEFORE turning any of the equipment on, make
sure that you do not supply more than 20V to
the myDAQ through its analog inputs (myDAQ
Overvoltage protection: +/-30V, 20 Vrms)
This will require connecting the response signal
to the oscilloscope and measuring amplitudes
before connecting the myDAQ.
43
myDAQ Connections:
Response To Ch1 on
Attach the output Oscilloscope
BNC connector of
the proximeter to a
BNC-to-clipping- Proximeter
probe connector Output
using a T-connector
Then connect the BNC to
clipping probe
T-connector to (to myDAQ)
Channel 2 on the
oscilloscope 44
Providing the Impulse
We will approximate an impulse force by
simply plucking the end of the beam.
Before you connect the proximeter to the
myDAQ, watch the proximeter signal
response on the oscilloscope to make
sure its voltages stay within the +/- 10V
range.
You will have to practice to make sure
you dont hit the beam too hard (see
video to the right).
myDAQ Connections:
Response
When you know that the response will be within range,
clip the two ends of the probe coming from the
proximeter to wires and attach to the myDAQ AI1
channel. Make sure the red clip goes to the 1+ channel,
and black to the 1-.
You can use the Homework 3 code to measure the
response. In this case, the excitation signal will just be
noise and can be disregarded.
Set the sampling rate to a sufficient time to be able to
measure the entire response signal.
Run your code, pluck the beam, and measure the
response. An example output is seen on the next slide.
46
Impulse Function Response
From this, how can you determine the damped natural frequency? And how can that
be used to measure the damping and spring constants? That is up to you to
determine for next weeks lab.
Wrapping Up II
Once again, all the pieces of the lab 6b code are put together. You
now have all the tools to create various codes that will excited the
beam at various frequencies and determine the system
characteristics (b,m, and k).
Think of some new goals you can accomplish using the automated
code, todays lesson, and the myDAQs that werent possible using
the analog equipment. Feel free to modify the code you just created
as well to do additional things.
Your myDAQs will be collected at the end of Week 5s lab session.
Make sure all of the components of the myDAQ are collected in the
box you received it in.