ME 322: Instrumentation Lecture 22

20
ME 322: Instrumentation Lecture 22 March 11, 2015 Professor Miles Greiner

description

ME 322: Instrumentation Lecture 22. March 12, 2014 Professor Miles Greiner. Announcements/Reminders. HW 8 Due Friday Josh will hold office hours in PE 215 (and 113) tomorrow after lab, until around 6 PM This week in lab: Lab 7 Boiling Water Temperature in Reno - PowerPoint PPT Presentation

Transcript of ME 322: Instrumentation Lecture 22

Page 1: ME 322: Instrumentation Lecture 22

ME 322: InstrumentationLecture 22

March 11, 2015Professor Miles Greiner

Page 2: ME 322: Instrumentation Lecture 22

Announcements/Reminders• HW 8 Due Friday• How is Lab 7 “Boiling Water Temperature in

Reno” going?• Midterm II, April 1, 2015 (three weeks)

– Next week is Spring Break

Page 3: ME 322: Instrumentation Lecture 22

Fourier Transform

• Any function V(t), over interval 0 < t < T1, may be decomposed into an infinite sum of sine and cosine waves– , – Discrete frequencies: , 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 for each mode quantifies its total energy content for a given frequency (from sine and cosine waves)

0 t T1

V

n = 0 n = 1 n = 2

sine

cosine

Page 4: ME 322: Instrumentation Lecture 22

Examples (ME 322r Labs)

• Signals may have narrow or wide spectrum of energetic modes

Function Generator100 Hz sine wave

Unsteady Speed AirDownstream froma Cylinder in Cross

Flow

Time Domain Frequency Domain

-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

0 2 4 6 8 10

Time t [sec]

Dim

ensi

nole

ss A

ccel

erat

ion,

g t1 = 1.14 sec, a1 = 0.314 g

t2 = 5.88 sec, a2 = 0.152 g

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0 10 20 30 40 50 60f [Hz]

a rm

s [g'

s]Damped VibratingCantilever Beam

Page 5: ME 322: Instrumentation Lecture 22

What is the lowest Frequency mode that can be observed during measurement time T1

• For example, if we measure outdoor temperature for one hour, can we observe variations that require a day to repeat?

• The lowest (finite) observable frequency is f1 = 1/T1 • The only other frequencies that can be detected are

– Frequencies: (Periods: T1 = n Tn )

• What is the frequency resolution?– Smallest change in frequency that can be detected

• Increasing the total sampling time T1 reduces the lowest detectable frequency and improves frequency resolution

Page 6: ME 322: Instrumentation Lecture 22

Upper and Lower Frequency Limits

• If a signal is sampled at a rate of fS for a total time of T1 what are the highest and lowest frequencies that can be accurately detected?– (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.

Page 7: ME 322: Instrumentation Lecture 22

Lab 8: Time Varying Voltage Signals

• Produce sine and triangle waves with fm = 100 Hz, VPP = ±1-4 V, 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

Function Generator

Digital Scope

NI myDAQ

fM = 100 HzVPP = ±1 to ± 4 V

Sine waveTriangle wave

fS = 100 or 48,000 HzTotal Sampling time T1 = 0.04, 1 sec4 cycles 192,000 samples

Page 8: ME 322: Instrumentation Lecture 22

Estimate Maximum Slope

• Sine wave • Triangle Wave

P P

VPP VPP

Page 9: ME 322: Instrumentation Lecture 22

Fig. 3 Sine Wave and Derivative Based on Different Time Steps

• 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.

-800

-600

-400

-200

0

200

400

600

800

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

0 0.005 0.01 0.015 0.02

dV/d

t [Vo

lts/s

ec]

V [V

olts

]

t [sec]

dV/dtIdeal,Min

dV/dtIdeal,Max

V(t)

dV/dtm=1

dV/dtm=10

Page 10: ME 322: Instrumentation Lecture 22

Fig. 4 Triangle Wave and Derivative Based on Different Time Steps

• 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.

-500

-400

-300

-200

-100

0

100

200

300

400

500

-1.2

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 0.005 0.01 0.015 0.02

dV/d

t [Vo

lts/s

ec]

V [V

olts

]

t [sec]

dV/dtIdeal,Min

dV/dtIdeal,MaxV(t)

dV/dtm=1 dV/dtm=10

Page 11: ME 322: Instrumentation Lecture 22

0

0.1

0.2

0.3

0.4

0.5

0.6

0 20 40 60 80 100 120 140 160 180 200

frecuency f [Hz]

V RM

S [V

olts

]

fs = 300 Hz fs = 5000 Hz

fs = 150 Hzfs = 70 Hz

Fig. 5 Measured Spectral Content of 100 Hz Sine Wave for Different Sampling Frequencies

• 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.

Page 12: ME 322: Instrumentation Lecture 22

Table 2 Peak Frequency versus Sampling Frequency

• 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.

Sampling Frequency, fs [Hz] 5000 300 150 70Peak Spectral Frequency, fp [Hz] 100 100 50 30

Page 13: ME 322: Instrumentation Lecture 22

Table 3 Signal and Indicated Frequency

Data

• 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.

fm [Hz] fa [Hz] fm/fN fa/fN0 0 0.00 0.00

9910 9925 0.41 0.4119540 19575 0.81 0.8223120 23125 0.96 0.9630190 17800 1.26 0.7440510 7475 1.69 0.3147320 675 1.97 0.0350180 2175 2.09 0.0961200 13275 2.55 0.5571800 23850 2.99 0.9972400 23575 3.02 0.9879800 16125 3.33 0.6789500 6475 3.73 0.2795400 475 3.98 0.0299700 3725 4.15 0.16

Page 14: ME 322: Instrumentation Lecture 22

Figure 6 Dimensionless Indicated Frequency versus Signal Frequency

• 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.

0.00

0.10

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

f a/f

N

fm/fN

Page 15: ME 322: Instrumentation Lecture 22

Figure 2 VI Block Diagram

Statistics This Express VI produces the following measurements: Time of Maximum

Convert to Dynamic Data Double Click the Icon and select “Single Waveform” (it is located at the bottom of the list)

Convert from Dynamic Data Double Click the Icon and select “1D array of scalars – single waveform”

Page 16: ME 322: Instrumentation Lecture 22

Figure 1 VI Front Panel

Page 17: ME 322: Instrumentation Lecture 22

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

Page 18: ME 322: Instrumentation Lecture 22

Lab 8 Sample Data• http://

wolfweb.unr.edu/homepage/greiner/teaching/MECH322Instrumentation/Labs/Lab%2008%20Unsteady%20Voltage/Lab8Index.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

Page 19: ME 322: Instrumentation Lecture 22
Page 20: ME 322: Instrumentation Lecture 22

Folding Diagram

Maximum frequency that canbe accurately measured usingsampling frequency fS .

for given fS and fM?