Presentation on theme: "ME 322: Instrumentation Lecture 21"— Presentation transcript:
1 ME 322: Instrumentation Lecture 21 March 9, 2015Professor Miles GreinerSpectral analysis, Min, max and resolution frequencies, Aliasing,
2 Announcements/Reminders HW 8 Due FridayThen Spring Break!This week in lab:Lab 7 Boiling Water Temperature in RenoPlease fully participate in each lab and complete the Lab Preparation ProblemsFor the final you will repeat one of the last 3 labs, solo, including performing the measurements, and writing Excel, LabVIEW and PowerPoint.
3 A/D ConvertersCan be used to measure a long series of very rapidly changing voltageUseful for measuring time-dependent voltage signals and assessment of their dynamic propertiesRates of Change (derivatives) andFrequency Content (Spectral Analysis)What can go wrong?Last time we showed that small random errors (RF noise, IRE) can strongly affect calculation of derivativesSo: Make derivative time-step long enough so that the real signal changes by a larger amount than the random noise.What is Frequency Content?
4 Spectral AnalysisEvaluates energy content associated with different frequency components within a signalUse to evaluateTonal Content (music)You hear notes, not time-varying pressureDominant or natural frequenciescar vibration, beam or bell ringingSystem response (Vibration Analysis)ResonanceSpectral analysis transforms a signal from the time-domain V(t) to the frequency-domain, VRMS(f)What does this mean?
5 Fourier Transformn = 0n = 1n = 2sinecosineVt T1Any function V(t), over interval 0 < t < T1, may be decomposed into an infinite sum of sine and cosine waves𝑉 𝑡 = 𝑛=0 ∞ 𝑎 𝑛 𝑐𝑜𝑠 2𝜋 𝑓 𝑛 𝑡 + 𝑏 𝑛 𝑠𝑖𝑛 2𝜋 𝑓 𝑛 𝑡 , 𝑓 𝑛 = 𝑛 𝑇 1Only modes with an integer number of oscillations over the total sampling time T1 are used.Discrete (not continuous) frequencies: 𝑓 𝑛 = 𝑛 𝑇 1 , n = 0, 1, 2, … ∞ (integers)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 for each mode frequency 𝑓 𝑛 quantifies its total energy content (both sine and cosine waves)
6 a Cylinder in Cross Flow Examples (ME 322 Labs)Time DomainFrequency DomainFunction Generator100 Hz sine waveDamped VibratingCantilever BeamUnsteady air SpeedDownstream froma Cylinder in Cross FlowReal signal may have a narrow or wide spectrum of energetic modes
7 What is the lowest Frequency mode that can be observed during measurement time T1 ExampleIf 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/T1The only other frequencies that can be detected are𝑓 𝑛 = 𝑛 𝑇 1 =𝑛 𝑓 1 (T1=nTn)What is the frequency resolution?Smallest change in frequency that can be detected𝑓 𝑛+1 − 𝑓 𝑛 =(𝑛+1) 𝑓 1 −𝑛 𝑓 1 = 𝑓 1Increasing the total sampling time T1 reduces the lowest detectable frequency and improves frequency resolution,
8 Sampling Rate TheoryWhat discrete sampling rate fS must be used to accurately observe a sinusoidal signal of frequency fM?Must be greater than fM, but much how larger?
9 Lab 8 Aliasing Spreadsheet Example Measured sine wave, fm = 10 HzV(t) = (1volt)sin[2p(10Hz)(t+tshift)]Total sampling time, T1 = 1 secHow many peaks to you expect to observe in one second?How large does the sampling rate fS need to be to capture this many peaks?
10 How to predict indicated (or Alias) Frequency? 𝑓 𝑁 = 𝑓 𝑆 2Maximum frequency that canbe accurately measured usingsampling frequency fS .3 Frequencies:fm being measured; fs Sampling frequency; fa indicated frequencyfa = fm if fs > 2fmOtherwise using folding chart on page 106Let fN = fs/2 be the maximum frequency that can be accurately observed using sampling frequency fs.
11 Problem 5.26 (p. 127)A 1-kHz sine wave signal is sampled at 1.5 kHz. What would be the lowest expected alias frequency?ID: Is fs > 2fm ?𝑓 𝑁 = 𝑓 𝑆 2𝒇 𝒎 /𝒇 𝑵𝒇 𝒂 /𝒇 𝑵
12 A more practical example Using a sampling frequency of 48,000 Hz, a peak in the spectral plot is observed at 18,000 Hz.What are the lowest 4 values of fm that can cause this?ID: what is known? fs and fa18,000
13 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 T1To observe higher frequencies, increase the sampling rate fS.
14 How to find 𝑉 𝑟𝑚𝑠 vs fn?For 𝑉 𝑡 = 𝑛=0 ∞ 𝑎 𝑛 𝑐𝑜𝑠 2𝜋 𝑓 𝑛 𝑡 + 𝑏 𝑛 𝑠𝑖𝑛 2𝜋 𝑓 𝑛 𝑡𝑎 𝑛 = 2 𝑇 𝑇 1 𝑉 𝑡 𝑐𝑜𝑠 2𝜋 𝑛 𝑇 1 𝑡 𝑑𝑡 (cosine transform)𝑏 𝑛 = 2 𝑇 𝑇 1 𝑉 𝑡 𝑠𝑖𝑛 2𝜋 𝑛 𝑇 1 𝑡 𝑑𝑡 (sine transform)𝑉 𝑟𝑚𝑠 𝑛 = ( 𝑎 𝑛 𝑏 𝑛 2 ) 2How to evaluate these integrals?For simple V(t), in closed formFor complex or discretely-sampled signalsNumerically (trapezoid or other methods)Appendix A, pp 450-2LabVIEW Spectral Measurement VI does thisfor (f1 = 1/T1) < (fn = 𝑛 𝑇 1 ) < (fN = fS/2)
15 Fourier Transfer Example Lab 8 site:Dependence of coefficient b (sine transform) on weigh function frequency and phase shiftDependence of Vrms on weight function frequency, but not phase shift.
16 Lab 8: Time Varying Voltage Signals Digital ScopeFunction GeneratorNI myDAQfM = 100 HzVPP = ±1 to ± 4 VSine waveTriangle wavefS = 100 or 48,000 HzTotal Sampling timeT1 = 0.04 sec4 cycles192,000 samplesProduce sine and triangle waves with fm = 100 Hz, VPP = ±1-4 VSample both at fS = 48,000 Hz and numerically differentiate with two different differentiation time stepsEvaluate Spectral Content of sine wave at four different sampling frequencies fS = 5000, 300, 150 and 70 Hz (note: some < 2 fm )Sample singles between 10,000 Hz < fM < 100,000 Hz using fS = 48,000 Hz (fa compare to folding chart)
18 Fig. 3 Sine Wave and Derivative Based on Different Time Steps dV/dt1 (Dt=0.000,020,8 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 may be because the actual wave was not a pure sinusoidal.
19 Fig. 4 Sawtooth Wave and Derivative Based on Different Time Steps dV/dt1 is again nosier than dV/dt10dV/dt1 responds to the step change in slope more accurately than dV/dt10The maximum slope from the finite difference method is larger than the ideal value.
20 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 2fMfs = 70 and 150 Hz do not give accurate indications of the peak frequency.
21 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 is close to the magnitude of fM–fS.The results are in agreement with sampling theory.
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.
23 Figure 6 Dimensionless Indicated Frequency versus Signal Frequency The characteristics of this plot are similar to those of the textbook folding plotFor each indicated frequency fa, there are many possible signal frequencies, fm.