ME 322: Instrumentation Lecture 22

advertisement
ME 322: Instrumentation
Lecture 22
March 9, 2016
Professor Miles Greiner
Fourier transform examples, Lab 8 sample data
Ran out of time before showing how to make folding plot
Announcements/Reminders
• HW 8 Due Friday
– Tutorial tomorrow night at 7 in SEM 321
• Midterm II, March 30, 2016 (three weeks)
– After Spring Break
• How is the Boiling Water Experiment going?
Spectral (Frequency) Analysis
V
VRMS(f)
0
t
T1
f
• Transforms (interprets) a time-domain V(t) signal to the
frequency-domain, VRMS(f)
• What are the Upper and Lower Frequency Limits?
• If a signal is sampled at a rate of fS for a total time of T1 the
highest and lowest frequencies that can be accurately detected
are:
– (f1 = 1/T1) < f < (fN = fS/2)
• To reduce lowest frequency (and increase frequency
resolution), increase total sampling time T1
• To observe higher frequencies, increase the sampling rate fS.
How to find 𝑉𝑟𝑚𝑠 vs fn?
∞
𝑛=0
2 𝑇1
𝑉
0
𝑇1
• For 𝑉 𝑡 =
– 𝑎𝑛 =
– 𝑏𝑛 =
–
𝑉𝑟𝑚𝑠
2 𝑇1
𝑉
0
𝑇1
𝑛
=
𝑎𝑛 𝑐𝑜𝑠 2𝜋𝑓𝑛 𝑡 + 𝑏𝑛 𝑠𝑖𝑛 2𝜋𝑓𝑛 𝑡
𝑡 𝑐𝑜𝑠
𝑛
2𝜋 𝑡
𝑇1
𝑑𝑡 (cosine transform)
𝑡 𝑠𝑖𝑛
𝑛
2𝜋 𝑡
𝑇1
𝑑𝑡 (sine transform)
(𝑎𝑛 2 + 𝑏𝑛 2 ) 2
• How to evaluate these integrals?
– For simple V(t), in closed form
– For discretely-sampled signals, Vn , n = 1, 2, …, N
• Numerically (trapezoid or other methods)
• Appendix A, pp 450-2
LabVIEW
• Using LabVIEW and myDAQ, sample a signal using
• Sampling frequency fS, and
• Sampling time T1
• Range of frequencies (f1 = 1/T1) < (fn =
𝑛
𝑇1
) < (fN = fS/2)
• Total number of samples: M = T1fS
• LabVIEW Spectral Measurement VI
• Finds N discrete values of VRMS(fi)
– Where fn= n/T1, n = 0 to N-1
– fi= 0, 1/T1, 2/T1, 3/T1, 4/T1, …, (N-1)/T1 < fs/2
• How many values VRMS(fi) will there be What is M?
– N < (T1 fs)/2 + 1 = M/2 + 1, so N < M/2 + 1
– Note: VRMS(f0) for f0= 0 is the average over time T1
LabVIEW Spectral Measurements vi
• Modify Basic VI by inserting:
• Spectral Measurement vi
– Express, Signal Analysis, Spectral Measurements
– Result: Linear
• Statistics
– Mathematics, Probability and Statistics, Statics
– Time of Maximum
• Convert to Dynamic Data
– Express, Signal Manipulation, Convert to Dynamic
Data
VI
•
Lab 8: Time Varying Voltage Signals
Digital
Scope
Function
Generator
fM = 100 Hz
VPP = ±1 to ± 10 V
Sine wave
Triangle wave
NI
myDAQ
fS = 100 or 48,000 Hz
Total Sampling time
T1 = 0.04, 1 sec
4 cycles
192,000 samples
• Produce sine and triangle waves with fm = 100 Hz, VPP = ±1-10V, T1 = 0.04 sec
– Sample both at fS = 48,000 Hz and numerically differentiate with two
differentiation time steps
• Evaluate Spectral Content of sine wave at four different sampling frequencies
fS = 5000, 300, 150 and 70 Hz; and T1 = 1 sec
– Note: for some fS < 2 fm
• Sample singles between 10,000 Hz < fM < 100,000 Hz using fS = 48,000 Hz
– Compare fa to folding chart
Estimate Maximum Slope
VPP
VPP
P
P
• Triangle Wave
• Sine wave
𝑉𝑃𝑃
𝑠𝑖𝑛 2𝜋𝑓𝑡 + φ
2
𝑉
2𝜋𝑓 𝑃𝑃 𝑐𝑜𝑠 2𝜋𝑓𝑡 +
2
– 𝑉 𝑡 =
–
𝑑𝑉
𝑑𝑡
=
𝑑𝑉
𝑑𝑡
= 𝜋𝑓𝑉𝑃𝑃
𝑚𝑎𝑥
–
𝑑𝑉
𝑑𝑡
=±
𝑉𝑝𝑝
𝑃
2
= ±2𝑉𝑝𝑝 𝑓
φ
𝑑𝑉
𝑑𝑡
= 2𝑉𝑝𝑝 𝑓
𝑚𝑎𝑥
Fig. 3 Sine Wave and Derivative Based on
Different
Time
Steps
0.8
800
V(t)
0.6
600
dV/dtIdeal,Max
0.4
V [Volts]
0.2
200
dV/dtm=1
0
0
-0.2
-200
-0.4
dV/dtm=10
-0.6
-400
dV/dtIdeal,Min
-0.8
-600
-1
0
0.005
dV/dt [Volts/sec]
400
0.01
0.015
-800
0.02
t [sec]
• dV/dt1 (Dt=0.000,0208 sec) is “nosier” than dV/dt10 (Dt=0.000,208 sec)
• The maximum slope from the finite difference method is slightly larger than
the ideal value.
– This is probably because the actual wave was not a pure sinusoidal.
Fig. 4 Triangle Wave and Derivative Based on
Different Time Steps
1
500
400
V(t)
dV/dtIdeal,Max
0.6
0.4
dV/dtm=1
V [Volts]
0.2
300
200
dV/dtm=10
100
0
0
-0.2
-100
-0.4
-200
-0.6
dV/dt [Volts/sec]
0.8
-300
-0.8
dV/dtIdeal,Min
-1
-400
-1.2
-500
0.02
0
0.005
0.01
t [sec]
0.015
• dV/dtm=1 is again nosier than dV/dtm=10
• dV/dtm=1 responds to the step change in slope more accurately
than dV/dtm=10
• The maximum slope from the finite difference method is larger
than the ideal value.
Fig. 5 Measured Spectral Content of 100 Hz Sine Wave for
Different Sampling Frequencies
0.6
fs = 150 Hz
fs = 70 Hz
0.5
VRMS [Volts]
fs = 300 Hz
fs = 5000 Hz
0.4
0.3
0.2
0.1
0
0
20
40
60
80
100
120
140
160
180
200
frecuency f [Hz]
• The measured peak frequency fP equals the maximum signal
frequency fM = 100 Hz when the sampling frequency fS is greater
than 2fM
• fs = 70 and 150 Hz do not give accurate indications of the peak
frequency.
Table 2 Peak Frequency versus Sampling
Frequency
Sampling Frequency, fs [Hz]
5000
300
150
70
Peak Spectral Frequency, fp [Hz]
100
100
50
30
• For fS > 2fM = 200 Hz the measured peak is
close to fM.
• For fS < 2fM the measured peak frequency is
close to fM–fS.
• The results are in agreement with sampling
theory.
Table 3 Signal and
Indicated Frequency
Data
fm [Hz]
0
9910
19540
23120
30190
40510
47320
50180
61200
71800
72400
79800
89500
95400
99700
fa [Hz]
0
9925
19575
23125
17800
7475
675
2175
13275
23850
23575
16125
6475
475
3725
fm/fN
0.00
0.41
0.81
0.96
1.26
1.69
1.97
2.09
2.55
2.99
3.02
3.33
3.73
3.98
4.15
fa/fN
0.00
0.41
0.82
0.96
0.74
0.31
0.03
0.09
0.55
0.99
0.98
0.67
0.27
0.02
0.16
• This table shows the dimensional and dimensionless signal
frequency fm (measured by scope) and frequency indicated
by spectral analysis, fa.
• For a sampling frequency of fS = 48,000 Hz, the folding
frequency is fN = 24,000 Hz.
Figure 6 Dimensionless Indicated Frequency versus
Signal Frequency
1.00
0.90
0.80
0.70
fa/fN
0.60
0.50
0.40
0.30
0.20
0.10
0.00
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
fm/fN
• The characteristics of this plot are similar to those of the
textbook folding plot
• For each indicated frequency fa, there are many possible
signal frequencies, fm.
Lab 8 Sample Data
• http://wolfweb.unr.edu/homepage/greiner/teaching/MECH322I
nstrumentation/Labs/Lab%2008%20Unsteady%20Voltage/Lab
8Index.htm
• Calculate Derivatives
• Plot using secondary axes
– Design; Change Chart Type; Combo
• Scatter with straight line
• Frequency Domain Plot
– The lowest finite frequency and the frequency
resolution are both f1 = 1/T1
Construct VI
• Starting Point VI
• Spectral Measurement VI
– Signal Processing; Waveform Measurement,
• Result: linear
• Convert to and from dynamic data
– Signal Manipulation
• Input data type: 1D array of scalars-single channel
• “Time” of maximum
– Mathematics; Probability and Statistics: Statistics
Folding Diagram
How to predict indicated or alias frequency
for given fS and fM?
𝑓𝑆
2
Maximum frequency that can
be accurately measured using
sampling frequency fS .
𝑓𝑁 =
Fourier Transform
n=1
n=0
n=2
sine
V
cosine
0
t
T1
• Any function V(t), over interval 0 < t < T1, may be decomposed into
an infinite sum of sine and cosine waves
– 𝑉 𝑡 =
∞
𝑛=0
𝑛
𝑎𝑛 𝑐𝑜𝑠 2𝜋𝑓𝑛 𝑡 + 𝑏𝑛 𝑠𝑖𝑛 2𝜋𝑓𝑛 𝑡 , 𝑓𝑛 = 𝑇
– Discrete frequencies: 𝑓𝑛 =
1
𝑛
,
𝑇1
n = 0, 1, 2, … ∞ (integers) (not continuous)
• Only admits modes for which an integer number of oscillations span the total sampling time T1 = n Tn .
– The coefficient’s an and bn quantify the relative importance (energy content) and phase of
each mode (wave).
• The root-mean-square (RMS) coefficient 𝑉𝑟𝑚𝑠
𝑛
=
(𝑎𝑛 2 + 𝑏𝑛 2 ) 2 for each mode quantifies its total
energy content for a given frequency (from sine and cosine waves)
Examples (ME 322 Labs)
Frequency Domain
Time Domain
Function Generator
100 Hz sine wave
0.14
0.5
0.12
t1 = 1.14 sec, a1 = 0.314 g
0.3
0.1
t2 = 5.88 sec, a2 = 0.152 g
arms [g's]
Damped Vibrating
Cantilever Beam
Dimensinoless Acceleration, g
0.4
0.2
0.08
0.1
0.06
0
-0.1
0.04
-0.2
0.02
-0.3
-0.4
0
-0.5
0
0
2
4
6
8
10
10
20
30
f [Hz]
40
Time t [sec]
Unsteady Speed Air
Downstream from
a Cylinder in Cross
Flow
• Signals may have narrow or wide spectrum of
energetic modes
50
60
Download