AME 20213 LECUTRE NOTES Michael Buche Adapted from lectures given by Paul Rumbach in AME 20213 of Spring 2015 Updated June 16, 2015 2 M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 1 — General Information 1.1 The Class AME 20213 (lecture) website: http://www3.nd.edu/~prumbach/AME20213/ AME 21213 (lab) website: http://www3.nd.edu/~jott/Measurements/3/ AME 20213 Textbook: Measurement and Data Analysis for Engineering and Science, Third Edition by Patrick F. Dunn Paul Rumbach’s office hours: 364 Fitzpatrick Hall, Tuesdays and Thursdays, 11:00am - 12:00pm. AME 21213 Experiment 1 presentation given by Michael Wicks: http://www3.nd.edu/~jott/Measurements/Measurements_lab/E1/wicks_ppt.pdf AME 20213 “Lecutre” Notes: (check here for possible updated notes) https://www.nd.edu/~mbuche1/ame20213.html 3 4 1.2 Lecture 1: General Information The “Lecutre” Notes I wrote these notes in LATEX, mostly during class, in the spring of 2015 - the second semester of my sophomore year. I really enjoyed the class and thought this was a great way to make sure I knew the material. I made sure I did not miss a single lecture and tried to compile all relevant lecture information possible. It also became a great way to practice using LATEXand even learn new things, like TikZ - I went back and remade as many figures as I could using it. Other diagrams were made in paint. I sent the notes to the instructor Paul Rumbach at the semester end, and he told me that he was previously using handwritten notes during class, and that the notes would be great for next semester. This means that you might even have the same information and example problems in class. I hope these notes will continue to used for the class in some way, I will update them whenever I can, but I will need your help: let me know of any errors you see, or of anything outdated I can update. I only want the Lecutre Notes to help! Michael Buche mbuche1@nd.edu University of Notre Dame ‘17 Mechanical Engineering M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 2 — Introduction to Engineering Sensors Absolute quantization error - or precision uncertainty ”Ux ” = half of the smallest division. Reporting uncertainty: should be 9.4 ± 0.5, not 9.4204 ± 0.5 because the 0.5 indicates uncertainty of anything smaller. The additional 0.0204 is insignificant. A transducer converts one physical stimulus to a more easily measured phenomenon, while the measurand is what is being measured. 2.1 Manometer Figure 2.1: A manometer is a u-shaped tube that measures difference in fluid height on each side to find the differential pressure (gauge pressure); an example of a pressure transducer, and pressure is the measurand. The equation for gauge or differential pressure ∆P is ∆P = P − Po = ρgh 5 (2.1) 6 Lecture 2: Introduction to Engineering Sensors where P is the unknown pressure of the fluid of interest, Po is the pressure of the ambient fluid (usually air at atmospheric pressure of 1 atm), ρ is the density of the reference fluid (usually mercury), g is the gravitational acceleration (usually 9.81 m/s), and h is the differential height of the reference fluid between the two sides of the manometer. When working inside a vacuum, Po = 0, so the pressure P is the absolute pressure. 2.2 Pitot Static Probe Figure 2.2: A pitot static probe measures air speed using a pressure transducer that measures ∆P . If a manometer is used as the transducer in Fig. (2.2), the equations become: Pt − Ps = ρr gh v2 = 2ρr gh ρa (2.2) where ρr is the density of the manometer reference fluid, and ρa is the density of the air. 2.3 Resistance Temperature Detector The equations for the response of an RTD are as follows: R = Ro [1 + αT (T − To )] T = To + R − Ro αT Ro (2.3) where R is the resistance of the wire at the measurand temperature T , Ro is a reference resistance at the reference temperature To , and αT is the thermal expansion coefficient for the wire in the resistor. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 2: Introduction to Engineering Sensors 7 Temperature ( oC) 100 80 60 40 20 0 0 1 2 3 Voltageout (V) 4 5 Figure 2.3: A resistance temperature detector (RTD) and thermometer with calibration plot. An RTD is commonly used in combination with a Wheatstone Bridge, where the change in resistance can be measured using the change in output voltage Vout with respect to the input voltage Vin . The RTD response T vs. Vout can be calibrated into a simple linear equation ”T = aV + b” using a two-point calibration. The easiest way would be to use 0◦ C and 100◦ C, as to avoid using a thermometer (ice water and boiling water). AME 20213: Measurements and Data Analysis M. R. Buche 2015 8 Lecture 2: Introduction to Engineering Sensors M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 3 — AME Measurands and Transducers 3.1 SI Units Density of water ρw = 1 g/cm2 . 1/2 period of 1 a meter pendulum is 1 second. Water boils at 100 ◦ C and melts at 0 ◦ C, shown in Fig. (3.1). Figure 3.1: Phase diagram of pure water (4.579 mm Hg = 1 atm). 3.2 Hot-wire Anemometer The rate at which heat or power leaves the surface of the wire is given by q̇ in the Joule heating equation: q̇ = iV = i2 R = 9 V2 R (3.1) 10 Lecture 3: AME Measurands and Transducers Figure 3.2: A hot-wire anemometer measures wind speed; it uses a very fine wire electrically heated up to some temperature. Air flow cools the wire, and electrical resistance of the wire depends on its temperature, so a relationship can be obtained between the resistance of the wire and the air speed. and Newton’s Law of Cooling is given by q̇ = hAs (T − T∞ ) (3.2) where h is a constant for the wire material, As is the surface area of the wire, Tw is the temperature of the wire, and T∞ is the ambient temperature of the wind. An equation can be written for h: √ h = C1 + C2 u (3.3) where u is the wind speed, and C1 and C2 are constants. Using Eq. (2.3) to quantify the changing resistance of the wire, T = To + R − Ro aV +b = aR + b = αT Ro i (3.4) where a = (αT Ro )−1 , and b = (αT )−1 (both are constants). Combining Eq. (3.4) with (3.3) and (3.2), an equation for u based on V and constants is obtained: 2 1 iV u= − C1 (C2 )2 As (aV /i + b − T∞ ) 3.3 (3.5) Electronics and Circuits Voltmeter - measures voltage (connected in parallel) ideally has infinite resistance, usually most have resistance of 10 MΩ. Ammeter - measures current (connected in series) ideally has zero resistance, usually most have resistance of approximately 1 Ω. Ohmmeter - measures resistance. Digital Multimeter (DMM) - measures all three of the above. Floating Circuit - usually battery powered (like a cell phone). Ground Referenced Circuit - a wire leads from circuit to ground (third hole in wall outlet is for ground). M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 3: AME Measurands and Transducers 3.3.1 11 Kirchoff ’s Circuit Rules 1. Current Law - the sum of the current flowing into a junction equals the sum of the current flowing out (charge conservation). X iin = X iout (3.6) 2. Voltage Law - the sum of all voltage drops around closed a loop is zero (energy conservation). X 3.3.2 Vloop = 0 (3.7) Ohm’s Law V = IR (3.8) This equation is highly useful thus far, but will be seen again in Capacitors, Inductors, and Impedance. 3.4 Voltage Divider Vin R1 Vout R2 Figure 3.3: If R1 is much smaller than R2 and close to zero: Vout = Vin . Usually R1 represents the resistance of the actual sensor, placed where R1 is. Vin = i(R1 + R2 ) 3.5 Vout = iR2 Vout R2 = Vin R1 + R2 (3.9) Non-Ideal Power Supplies Vactual = VS RL RS + RL (3.10) Droop - when the circuit draws more current than the power supply can output, the voltage goes down. AME 20213: Measurements and Data Analysis M. R. Buche 2015 12 Lecture 3: AME Measurands and Transducers Vactual RS RL + − VS Figure 3.4: Batteries have internal impedance or resistance RS along with the load resistance RL . 3.6 Wheatstone Bridge V1 R 1 R4 Vin + R1 R3 − − Vout + R2 Vout + R2 V2 + − Vin R4 R 3 − V1 V2 Figure 3.5: Two visualizations of the same circuit. One can use sensors (maybe an RTD or strain gauge) as one or more of the resistors. A voltage divider can then be used to measure Vout = V2 − V1 . The bridge is ”balanced” if Vout = 0, which happens when R1 R3 = R2 R4 (3.11) Using Kirchoff’s Circuit Rules, Vout Vin R2 Vin R4 − = Vin = R3 + R4 R1 + R2 R4 R2 − R3 + R4 R1 + R2 and after simplifying, one gets the equation for a wheatstone bridge: R1 R3 Vout = Vin − R1 + R2 R3 + R4 M. R. Buche 2015 (3.12) (3.13) AME 20213: Measurements and Data Analysis Lecture 4 — Investigating Internal Resistance Even batteries have out impedance (internal resistance) RS . For 9 V battery, VA ≈ 9.55 V. 4.1 Internal Resistance Experiment Conducted by Paul Rumbach, in lecture. When RL = 1.307 kΩ, VA = 9.42 V. When RL = 267 Ω, VA = 9.28 V. When RL = 10.2 Ω, VA = 7.24 V, and the resistor started to smoke from too much heat that results from too much current, seen in the Joule heating equation: q̇ = iV = i2 R = V2 R (4.1) and the heat melted the paint, creating smoke. Drawing more current than the battery is designed to supply (droop) causes the voltage VA to drop. RS = Solving for RS for each: RL (VS − VA ) VA (4.2) RS1 = 18 Ω, RS2 = 7.7 Ω, and RS3 = 3.25 Ω. Trial 1 2 3 RL (Ω) 1,307 267 10.2 VA (V) 9.42 9.28 7.24 RS (Ω) 18 7.7 3.25 Table 4.1: Data accumulated from Paul’s experiment. 13 14 M. R. Buche 2015 Lecture 4: Investigating Internal Resistance AME 20213: Measurements and Data Analysis Lecture 5 — Scaling Analysis, Circuits, Cantilever Beams, Capacitors 5.1 Scaling Analysis Some examples of equations that might be scaled or linearized: Power Law, y = kxn (5.1) F = (GmM )r−2 (5.2) Gravity, Kepler’s Law, r T = 4π 2 3 R2 GM (5.3) π∆P 4 D 128µl (5.4) 2τ ρU 2 (5.5) 1 2 at + xo 2 (5.6) Laminar pipe flow, Q= Blasius shear stress, Cs = Trajectory, x= 5.1.1 Logarithmic Scaling The Power Law given in Eq. (5.1) can be simplified by using logarithms on both sides: log y = log kxn = log k + log xn = log k + n log x (5.7) Analyzing: log y is linear with respect to log x. log y = log k + n log x = mz + b 15 (5.8) 16 Lecture 5: Scaling Analysis, Circuits, Cantilever Beams, Capacitors The slope m is n, and the intercept b is log k. 5.1.2 Linearization Trajectory in Eq. (5.6) can be linearized. Power law using logarithmic simplification does not work here because of the xo term. Plot x vs. t2 : z = t2 x= 1 2 1 at + xo = az + xo = mz + b 2 2 (5.9) The slope of x vs. t2 is m = a/2, and the intercept is b = xo . Collapsing data: the equation for a sphere rolling down a slope θ is given by 1 5 g sin θ t2 x= 2 7 (5.10) and plotting x vs. sin(θ)t2 for different θ values will collapse data to a single line. 5.2 5.2.1 Circuits Circuit Example One R1 i1 V2 V1 R2 R3 i2 i3 Figure 5.1: Example problem 3.3 from the text: find the currents i1 , i2 , and i3 . Use Kirchoff’s Circuit Rules to get: M. R. Buche 2015 i1 = i2 + i3 (5.11) V1 − i1 R1 + V2 − i3 R1 = 0 (5.12) V2 − i3 R1 + i2 R2 = 0 (5.13) AME 20213: Measurements and Data Analysis Lecture 5: Scaling Analysis, Circuits, Cantilever Beams, Capacitors 17 or around the outer-most loop: V1 − i1 R1 − i2 R2 = 0 (5.14) Eq. (5.14) is not linearly independent from Eq. (5.12) and (5.13), so they are needed along with Eq. (5.11) anyway to have 3 linearly independent equations to solve for 3 variables. The equations can be solved by hand or by something like Mathematica, or even MATLAB. They can also be solved as a matrix: 1 −1 1 i1 0 R1 0 R1 i2 = V1 + V2 . 0 R2 −R1 i3 −V2 5.2.2 Circuit Example Two What is Req and the current i is in the battery? Given: V = 12 V, R1 = R2 = 20 Ω, R3 = 30 Ω, R4 = 8 Ω. R1 R3 R1 i i R2 V i R2 V R4 R3 V Req R4 Figure 5.2: The circuit can be simplified using equivalent resistances. Finding the equivalent resistance or the circuit Req : Req = R1 + R2 R3 + R4 R2 + R3 (5.15) Using Ohm’s Law, V = iReq , i= V Req (5.16) Plugging in the given parameters, answers are obtained: Req = 40 Ω, 5.2.3 i = 0.3 A. Cantilever Beam Resistance on top - in tension - resistance increases (R1 and R4 ). R0 = R + δR AME 20213: Measurements and Data Analysis (5.17) M. R. Buche 2015 18 Lecture 5: Scaling Analysis, Circuits, Cantilever Beams, Capacitors Figure 5.3: Cantilever beam under load F , resistors placed on top and bottom. Resistance on bottom - in compression - resistance decreases (R2 and R3 ). R0 = R − δR (5.18) The resistors are typically used in a Wheatstone Bridge configuration. Combining Eq. (3.13) with (5.17) and (5.18): Vout R1 + δR1 R3 − δR3 = − Vin R1 + δR1 + R2 − δR2 R3 − δR3 + R4 + δR4 (5.19) For strain gauges, R1 = R2 = R3 = R4 = R, and strain is the same on the top and bottom (but opposite), so δR1 = δR2 = δR3 = δR4 = δR, so simplifying: δR Vout = Vin R (5.20) For a strain gauge of resistivity ρ, length L, and surface area A: =ρ δL δR L = = A L R (5.21) so using this with Eq (5.20): = Vout Vin (5.22) Consider that the resistors are subject to manufacturing defects and temperature changes; ρ changes with temperature, but because all resistors have the same ρ, it will not matter in this case. Poisson’s ratio - materials (resistors) thin as they are stretched: δR δL δA δA = − =− (5.23) R L A A Look closer at the term − δA/A; since the change in area of the resistor due to its elongation was not originally considered, δA/A would be the experimental error. But error and uncertainty are not the same thing: Error - difference between measured value and the true value (δA/A in this case). Uncertainty - an estimation of the error: ”L = 1.3 ± 0.5 cm”, 0.5 is uncertainty; specifies a range over which is most likely to find the true value. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 5: Scaling Analysis, Circuits, Cantilever Beams, Capacitors 5.3 19 Capacitors Capacitance C is measured in units of Farads: C= q V (5.24) where q is the charge built up on the capacitor, and V is the voltage between the plates. Figure 5.4: Parallel plate capacitor, with direction of electric field shown. Dielectric material can be placed between the plates: C= κo A h (5.25) where A is the surface area of the plates, h is the distance between them, and κ is the dielectric constant of the material between the plates (always ≥ 1). Polarizable materials like water have a high dielectric constant (κ of about 80). Capacitive sensors measure a change in capacitance: ∆C −∆h ∆A ∆κ = + + C h A κ (5.26) Example: capacitance sensors are used in cell phone touch-screens. Another example (from the text): a capacitive pressure transducer, with the following responses: 16EH 3 xc ∆P = 3r4 (1 − νp2 ) −∆h ∆xc ∆C = + C h h ! 3r4 (1 − νp2 ) ∆C = ∆P C 16EH 3 h AME 20213: Measurements and Data Analysis (5.27) (5.28) (5.29) M. R. Buche 2015 20 M. R. Buche 2015 Lecture 5: Scaling Analysis, Circuits, Cantilever Beams, Capacitors AME 20213: Measurements and Data Analysis Lecture 6 — Capacitors, Inductors, and Impedance Direct current (DC) - applied voltage is constant in time. Alternating current (AC) - applied voltage varies sinusoidally in time (wall outlets are 60 Hz AC). V (t) = V sin(ωt) (6.1) √ V is the peak amplitude, but something called Vpp is the ”peak to peak amplitude” (just 2V ), and VRM S = V / 2 (wall outlets are 120 V RMS). V (t) = V sin(ωt) = Re (V eiωt ) (6.2) eiθ = cos θ + i sin θ (6.3) Re (eiθ ) = cos θ (6.4) Im (eiθ ) = sin θ (6.5) Complex numbers are easier to work with because: 6.1 eiα = ei(α−β) eiβ (6.6) Ceq = C1 + C2 (6.7) Capacitors Capacitors in parallel: Capacitors in series: 1 1 1 = + Ceq C1 C2 Ceq = C1 C2 C1 + C2 (6.8) Energy stored on capacitor: U= q2 CV 2 = 2C 2 21 (6.9) 22 Lecture 6: Capacitors, Inductors, and Impedance RC circuit: q dq q =0 V −R − = 0, C dt C This is a first order differential equation. Solution: V − ir − q(t) = CV (1 − e−t/τ ), RC dq + q = CV dt τ = RC (6.10) (6.11) The RC time constant is known as τ . i= dq V V = = e−t/τ dt R R (6.12) As time approaches infinity, the current in the RC circuit approaches 0. 6.1.1 Capacitor Impedance Capacitors will always have current with AC (charges and uncharges the capacitor), but they ”block” current with DC (as charge builds up). q(t) = CV (t) = CV eiωt (6.13) I= dq = iωCV ei/t dt I = iωCV (t) V (t) = (6.15) 1 I(t) iωC The ”impedance” of the capacitor, ZC : (6.14) (6.16) 1 iωC (6.17) V = IZC (6.18) ZC = Eq. (6.18) resembles Ohm’s Law. 6.2 Inductors Figure 6.1: Solenoid - wire wrapped around a cylinder, which has inductance. V =L M. R. Buche 2015 di dt (6.19) AME 20213: Measurements and Data Analysis Lecture 6: Capacitors, Inductors, and Impedance 23 L is the inductance of the structure; for the solenoid: L = µη 2 lA (6.20) µ = magnetic permeability. 1. For vacuum - µ = 1.6 ∗ 10−6 N*A−2 2. For iron - µ = 6.3 ∗ 10−3 N*A−2 3. For carbon steel - µ = 1.26 ∗ 10−4 N*A−2 η = number of turns per length. l = total length. A = cross-sectional area. 6.2.1 Inductor Impedance V (t) = V eiωt = L Z LI = V eiωt dt = dI dt 1 1 V eiωt = V (t) iω iω (6.21) (6.22) V (t) = iωLI(t) (6.23) ZL = iωL (6.24) V = IZL (6.25) The impedance of the inductor, ZL : Eq. (6.25) resembles Ohm’s Law. 6.2.2 Inductive sensors Fe rod has a different µ, and this changes L. Example, a traffic light sensor: a car is steel and has large µ, and this changes the inductance of the coiled wire under the pavement. 6.3 Ohm’s Law Equivalent For the impedance of a resistor hooked up to AC Voltage: ZR = R (6.26) Applying Eq. (6.18) and (6.25), one can treat inductors and capacitors as if they were resistors with ”resistances” given by ZL and ZC , use Ohm’s Law, and then can even apply Kirchoff’s Circuit Rules. AME 20213: Measurements and Data Analysis M. R. Buche 2015 24 M. R. Buche 2015 Lecture 6: Capacitors, Inductors, and Impedance AME 20213: Measurements and Data Analysis Lecture 7 — AC Circuits 7.1 AC Circuits V (t) = V sin ωt Peak amplitude - V . Peak to peak amplitude - Vpp = 2V . T = f −1 (7.1) ω = 2πf (7.2) ω in units of rad/s VRM S v u u =t ! T (7.3) 0 V =√ 2 Re (z) = a Im (z) = b (7.4) 1 T Z V (t)dt Wall outlet - AC - f = 60 HZ, VRM S = 120 V. 7.1.1 Complex Numbers z = a + ib Using polar Coordinates: r= p a2 + b θ = arctan a b2 z = r cos θ + ir sin θ = r(cos θ + i sin θ) 7.1.2 z = reiθ = |z|eiθ = a + ib (7.5) (7.6) Impedance and Phase For the capacitor - current leads voltage: ZC = I(t) = V (t) = V eiωt ZC e−iπ/2 ωC e−iπ/2 ωC −1 (7.7) = ωCV ei(ωt+π/2) (7.8) For the inductor - voltage leads current: ZL = ωLeiπ/2 25 (7.9) 26 Lecture 7: AC Circuits I(t) = V i(ωt−π/2) e ωL (7.10) Animation shown in class: walter-fendt.de/ph14e/accircuit.htm 7.2 AC-RC Circuit Example R Vin (t) C Figure 7.1: Vin (t) = V sin ωt; what is the amplitude and phase if V = 1 V, R = 1 kΩ, C = 1 µF, and f = 1 kHz? Use the Ohm’s Law Equivalent, but remember that ω = 2πf . Zeq = ZR + ZC = R − Zeq = |Zeq |e iφ i ωC q 2 |Zeq | = R2 + (1/ωC) V iφ V (t) V eiωt = e = Zeq |Zeq |eiφ |Zeq | V iφ V V |I(t)| = e = =p 2 |Zeq | |Zeq | R + (1/ωC)2 −1 φ = arctan ωRC I(t) = I = 0.988 mA M. R. Buche 2015 φ = −0.158 rad or − 9.04◦ AME 20213: Measurements and Data Analysis Lecture 8 — RC Circuit Frequency Filters An oscilloscope is brought into lecture by Paul Rumbach and output is displayed via the projector. Both the capacitor and the inductor have a voltage that is 90◦ out of phase with the current, the difference is that the current is 90◦ behind the voltage for inductors, but 90◦ ahead of the voltage for capacitors. The oscillation curve for impedance ZR = R is purely real, and its voltage is exactly in phase with the current. 8.1 Low Pass Filter R Vout Vin (t) C Figure 8.1: Circuit configuration for a low pass filter. Looks like the voltage divider equation: ZC 1/ωC 1 Vout = Vin = Vin = Vin ZC + R i/ωC + R 1 + iωRC reiφ = 1 + iωRC Vout 1 − iωRC = = a + ib Vin 1 + (ωRC )2 Vout 1 a = Re = Vin 1 + (ωRC )2 Vout iωRC b = Im = Vin 1 + (ωRC )2 27 (8.1) (8.2) (8.3) (8.4) (8.5) 28 8.1.1 Lecture 8: RC Circuit Frequency Filters Amplitude: Low Pass Filter Vout Vin p 1 = a2 + b2 = p 1 + (ωRC )2 (8.6) Figure 8.2: As ω → 0, Vout /Vin → 1, and as ω → ∞, Vout /Vin → 0. 8.1.2 Phase: Low Pass Filter Vout = (a + ib)Vin = reiφ = rVin et(ωt+φ) (8.7) b φ = arctan = arctan(−ωRC) a (8.8) Figure 8.3: As ω → 0, φ → 0, and as ω → ∞, φ → −π/2. X = ωRC, dimensionless variable X. M. R. Buche 2015 Vout 1 =√ Vin 1 + X2 (8.9) φ = arctan(−X) (8.10) AME 20213: Measurements and Data Analysis Lecture 8: RC Circuit Frequency Filters 29 Paul Rumbach demonstrates a low pass filter in lecture using circuit breadboard and oscilloscope: • BNC cable - Bayonet Neill-Concelman cable.1 • Output displayed on projector: slight phase shift between the two resistors - this is because in reality, resistors are non-ideal and have inherent inductance and capacitance. • Two oscillating sinusoidal curves are shown - Vout (t) and Vin (t). • Their amplitudes are given by |Vout | and |Vin |. • Low frequency ω - very small phase shift, amplitudes are very similar (Vout /Vin ≈ 1). • High frequency ω - large phase shift, amplitudes very different (Vout /Vin << 1). • Remember why? If not, check out Fig. 8.2 and 8.3 again. 8.2 High Pass Filter C Vout Vin (t) R Figure 8.4: Circuit configuration for a low pass filter. Looks like the voltage divider equation again: Vout R R = = Vin ZC + R R − i/ωC (8.11) Vout R2 + iR/ωC (ωRC)2 + iωRC = 2 = = a + ib 2 Vin R + 1/(ωC) (ωRC)2 + 1 (8.12) a= 8.2.1 (ωRC)2 1 + (ωRC)2 ) b= ωRC 1 + (ωRC)2 (8.13) Amplitude: High Pass Filter s 2 2 Vout p X = a2 + b2 = (ωRC) (1 + (ωRC) ) = p ωRC =√ Vin 2 2 2 (1 + (ωRC) ) 1 + X2 1 + (ωRC) 1 Very (8.14) commonly mistake as “British Naval Connector”. AME 20213: Measurements and Data Analysis M. R. Buche 2015 30 Lecture 8: RC Circuit Frequency Filters Figure 8.5: As ω → 0, Vout /Vin → 0, and as ω → ∞, Vout /Vin → 1. 8.2.2 Phase: High Pass Filter φ = arctan b 1 1 = arctan = arctan a ωRC X (8.15) Figure 8.6: As ω → 0, φ → π/2, and as ω → ∞, φ → 0. Paul Rumbach shows high pass filter with oscilloscope: • Two oscillating sinusoidal curves are shown - Vout (t) and Vin (t). • Their amplitudes are given by |Vout | and |Vin |. • High frequency ω - very small phase shift, amplitudes are very similar (Vout /Vin ≈ 1). • Low frequency ω - large phase shift, amplitudes very different (Vout /Vin << 1). • See why? If not, check out Fig. 8.5 and 8.6 again. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 9 — RLC Circuit Frequency Filters V L C Figure 9.1: Charges build up on capacitor, switch is thrown, then the capacitor discharges through inductor. q di +L =0 C dt (9.1) q d2 q + =0 dt2 C (9.2) d2 q q + =0 2 dt LC (9.3) L √ This is a harmonic oscillator, with ωo = 1/ LC, the natural resonance frequency. The solution to Eq. (9.3) is given by: q(t) = V C cos(ωo t) V (t) = V cos(ωo t) 9.1 (9.4) (9.5) AC Driven LC Circuit Zeq −i 1 = iωL + = i ωL − ωC ωC I(t) = 31 V (t) Zeq (9.6) (9.7) 32 Lecture 9: RLC Circuit Frequency Filters ZL L Vin (t) C Vin (t) ZC Vin (t) Zeq Figure 9.2: A simple LC circuit, converted into an equivalent impedance in two steps. Current amplitude I: V (t) V = |I(t)| = Zeq ωL − 1/ωC I= (9.8) V ωC ω 2 LC − 1 (9.9) If (ω 2 LC) = 1, then I→ ∞, but in reality there is always some resistance - it is really an RLC circuit: R L Vin (t) C Figure 9.3: A simple RLC circuit; resistance R represents internal resistance somewhere in the LC circuit. q(t = 0) = V C (9.10) di q + iR + L = 0 C dt (9.11) q d2 q q =0 +R + 2 dt C C This is a damped, harmonic oscillator. Solution below - involved computation in the text: L q(t) = V Ce−t/τ cos(µt) M. R. Buche 2015 (9.13) 2L R (9.14) p LC − (RC)2 2LC (9.15) τ= µ= (9.12) AME 20213: Measurements and Data Analysis Lecture 9: RLC Circuit Frequency Filters 33 q(t) t Figure 9.4: Plot of charge for a damped, harmonic oscillator. It resembles the ”ringing” of a bell over time. 9.2 Band Pass Filter - - Vout - Vin - Bandwidth ωo ω √ Figure 9.5: A An AC driven RLC circuit that isolates certain a frequency ωo = 1/ LC, passing a narrow range of frequencies: the ”bandwidth”. 9.3 Notch Filter 9.4 AC Wheatstone Bridge Vout Vin 9.5 Z1 Z3 = − Z1 + Z2 Z3 + Z4 (9.16) Fourier Analysis Pure sine waves have only been discussed so far, how about some others? (Chapter 9 of the text) An example would be an electrocardiogram (measures someone’s heartbeat), or some of the following waves. AME 20213: Measurements and Data Analysis M. R. Buche 2015 34 Lecture 9: RLC Circuit Frequency Filters R Vout (t) Vin (t) L C Figure 9.6: Circuit configuration for a band pass filter. - - Vout - Vin - ωo ω √ Figure 9.7: A notch filter is an AC driven RLC circuit that isolates a certain frequency ωo = 1/ LC, blocking a narrow range of frequencies. They are still periodic functions, defined by: V (t) = V (t + T ) 9.5.1 (9.17) Fourier’s Theorem Any continuous function f (x) (in our case, V (t) instead) on t ∈ [0, T ] can be represented as a summation of cosines and sines: ∞ X 1 2πn 2πn V (t) = Ao + An cos t + Bn sin t , (9.18) 2 T T n=1 Ao = M. R. Buche 2015 2 T Z T V (t)dt (9.19) 0 AME 20213: Measurements and Data Analysis Lecture 9: RLC Circuit Frequency Filters 35 R Vout (t) L Vin (t) C Figure 9.8: Circuit configuration for a notch pass filter. V1 (t) Z 1 Z4 − Vout (t) + Vin (t) Z 3 Z2 V2 (t) Figure 9.9: AC Wheatstone Bridge configuration, using impedances. An = An = T 2 T Z 2 T Z 2πn t dt T 2πn t dt V (t) sin T V (t) cos 0 T 0 (9.20) (9.21) Amplitudes and phase: An cos(ωn t) + Bn sin(ωn t) = Cn cos(ωn t − φn ) Cn = p A2n + Bn2 φn = arctan V (t) = Bn An (9.22) (9.23) ∞ X 1 2πn 1 Ao + Cn cos t + φ n + Ao 2 T 2 n=1 (9.24) (9.25) As T→ ∞, An ’s and Bn ’s become continuous functions of ω; check out Page 291 of the text for a cool AME 20213: Measurements and Data Analysis M. R. Buche 2015 36 Lecture 9: RLC Circuit Frequency Filters V (t) T t Figure 9.10: A ”square” wave, with period T . V (t) T t Figure 9.11: A ”saw-toothed” wave, with period T . derivation to get the following: Fourier Cosine Transform: ∞ Z A(ω) = V (t) cos(ωt)dt (9.26) V (t) sin(ωt)dt (9.27) −∞ Fourier Sine Transform: Z ∞ B(ω) = −∞ The fundamental or ”characteristic” frequency corresponds to n = 1, and the first peak. The other peaks are ”overtones” or integer multiples. Paul Rumbach shows oscilloscope with a odd wave responses, with the FFT shown simultaneously. After changing the wave to a normal sine wave, the FFT shows only one large peak - the only frequency. This FFT does have small bumps though, because the electronics cannot make a perfect sine wave. // Paul then shows a FFT of audio from the Notre Dame Marching Band pregame show using a graphic equalizer. If you have ever used an equalizer before, it allows you to tune the frequencies (like the bass, treble) using notch and band pass filters; RLC circuits! M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 9: RLC Circuit Frequency Filters 37 An , Bn 1 2 3 ωn 4 5 Figure 9.12: ”Fourier modes” are discrete frequencies at ωn = 2πn/T . AME 20213: Measurements and Data Analysis M. R. Buche 2015 38 M. R. Buche 2015 Lecture 9: RLC Circuit Frequency Filters AME 20213: Measurements and Data Analysis Lecture 10 — Diodes and Amplifiers 10.1 Semiconductor Devices Diode: a non-ohmic device, so the current is non-proportional to the voltage. Shockley equation: (Io and Vth are fitting parameters) I = Io (eV /Vth − 1) 0 i V (10.1) + − + V − + − + − Figure 10.1: Forward bias (left) allows the current to flow through the diode; reverse bias (center) does not allow current to flow through the diode. The graph (right) shows the current in response to voltage. The segment of the curve under the x-axis represents the ”reverse bias leakage current” and the ”diode drop” is the limit at about 0.6 V in forward bias, where there is infinite current. 10.1.1 Light Emitting Diode (LED) Only lights up if connected in forward bias. Ever plug an LED into a wall circuit? The 60 Hz AC voltage causes the LED to flicker on and off between forward and reverse bias, so it does not light up very well. Fluorescent (a tube filled with plasma) light bulbs do the same thing, but incandescent bulbs (white-hot filament) do not. 10.1.2 Photodiode Used to measure light intensity; connected in reverse bias with a resistor, shown in Fig. 10.3. As more intense light hits the photodiode, the magnitude of the reverse bias leakage current iL increases. 39 40 Lecture 10: Diodes and Amplifiers Figure 10.2: The symbol for an LED is shown on the left; the symbol for a photodiode is shown on the right. The output voltage ends up having a linear response given by: Vout = iL R = βREo (10.2) where Eo is the light intensity. Figure 10.3: The circuit configuration for a photodiode used to measure light intensity is shown on the left. The graph on the right shows how the reverse bias leakage current increases as more intense light hits the photodiode. 10.2 Transistors Figure 10.4: ”3-terminal devices” - MOSFET’s: the current ISD only flows if the gate voltage Vg is greater than some threshold voltage Vth . Applying the voltage to the gate allows the current to flow from source to drain - a logical condition - transistor logic! M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 10: Diodes and Amplifiers 10.2.1 41 AND Gate Figure 10.5: Circuit configuration for an AND gate; arrows show direction of current. VA 0 1 0 1 VB 0 0 1 1 Vout 0 0 0 1 Table 10.1: ”Truth table” or a list of logical conditions for AND gate. 10.3 Amplifiers Figure 10.6: Amplifier circuit (where VS >> VG ) and graph showing the current’s response to variable VG . AME 20213: Measurements and Data Analysis M. R. Buche 2015 42 Lecture 10: Diodes and Amplifiers Paul Rumbach shows example of complex amplifier from the text, Figure 5.1. Instead of of drawing all those circuits, use a triangle to model it as a black box: Figure 10.7: The amplifier has a overall gain G that is multiplied by Vin to get Vout . Figure 10.8: Differential amplifiers - adds extra power via an amplifier. The left shows an ”open loop” configuration of an OPAMP, while the right shows a OPAMP feedback circuit (closed loop), what most differential amplifiers use. OPAMP’s usually has open loop gain of 105 to 106 . Vout = G(V+ − V− ). M. R. Buche 2015 (10.3) AME 20213: Measurements and Data Analysis Lecture 11 — Analog and Digital Signals 11.1 Sound Signal Paul shows a segment from the movie ”Spinal Tap” - how does one quantify how good an amplifier is? The gain of course! 11.1.1 Decibels dB = 10 log10 P = V2 R dB = 20 log10 11.1.2 Pout Pin (11.1) (11.2) Vout Vin (11.3) Signal to Noise Ratio Why would one want to use an amplifier? To increase the signal-to-noise ratio (SNR). Figure 11.1: The amplifier increases the signal amplitude (the sinusoidal wave) but not the noise amplitude (the thickness of the lines) - the two inputs of noise (V+ and V− ) cancel out and are not amplified. 43 44 Lecture 11: Analog and Digital Signals 11.1.3 Common Mode Rejection Ratio Common mode rejection ratio (CMRR); a CMRR > 100 is considered to be good: Gsignal CMRR = 20 log10 Gnoise 11.2 (11.4) OPAMPS Golden Rules of OPAMPS: 1. Output tries to make (V− ) = (V+ ). This makes Vin = (V− ) = (V+ ) = Vout . 2. The inputs draws no current, the outputs can give a lot of current. This turns a low current power supply into a high current power supply. 11.2.1 Non-inverting Amplifier Figure 11.2: The voltage on the V− is non-zero. Rule 1: (V+ ) = (V− ) = Vin , Rule 2: i1 = i2 = i, (The following 0 corresponds to ground voltage) (V− ) − 0 = iR2 Vout = i(R1 + R2 ) V− iR2 Vin = = Vout i(R1 + R2 ) Vout G= M. R. Buche 2015 Vout R1 + R2 R1 = =1+ Vin R2 R2 (11.5) (11.6) (11.7) (11.8) AME 20213: Measurements and Data Analysis Lecture 11: Analog and Digital Signals 11.2.2 45 Inverting Amplifier Figure 11.3: The voltage on the V+ is 0 because of the ground. Rule 1: (V+ ) = (V− ) = 0, Rule 2: i1 = i2 = i, Vin − (V− ) = iR1 (11.9) (V− ) − Vout = iR2 (11.10) iR1 Vin = −Vout iR2 (11.11) G= Vout −R2 = Vin R1 (11.12) Figure 11.4: A negative gain ”inverts” the sinusoidal wave by negation, hence the name of the amplifier. The amplified voltage Vout is equal to GVin , or (−R2 /R1 )Vin . AME 20213: Measurements and Data Analysis M. R. Buche 2015 46 11.3 Lecture 11: Analog and Digital Signals Other Common Circuits Figure 11.5: Differential Amplifier - does voltage subtraction. Vout = R1 + R2 (V2 + V1 ) R2 (11.13) Figure 11.6: Summing Amplifier - does voltage addition. Vout = −(V1 + V2 + V3 ) (11.14) Figure 11.7: Integrator - does integration; sometimes called a low pass filter. Vout M. R. Buche 2015 −1 = RC Z t Vin (t0 )dt0 (11.15) 0 AME 20213: Measurements and Data Analysis Lecture 11: Analog and Digital Signals 47 Figure 11.8: Differentiator - does differentiation; sometimes called a high pass filter. Vout = −RC 11.4 d (Vin ) dt (11.16) Digital Signals Analog Computer - numbers are represented as voltages. Digital Computer - numbers are represented as binary code by voltages. Bits Voltage (V) 128 0 0 64 0 0 32 1 3 16 1 3 8 0 0 4 0 0 2 1 3 1 1 3 Table 11.1: The number 51 in binary code, “in 8-bit” - 8 bits is 1 byte. An analog-to-digital converter (AD, or A-to-D) converts an analog signal into a digital signal (binary code) and then is saved to the CPU or displayed somehow. Figure 11.9: (Left) parallel AD converter; 8-bits is 8 wires with 8 voltages; n wires are n-bits. (Right) signal AD converter; a single wire with information sent in “packets” - how the internet works; your router handles millions of packets at a time. AME 20213: Measurements and Data Analysis M. R. Buche 2015 48 M. R. Buche 2015 Lecture 11: Analog and Digital Signals AME 20213: Measurements and Data Analysis Lecture 12 — Pop Can Experiment Kevin Peters demonstrates the measurement of strain in a pop can using strain gauges. Higher resistance strain gauges yield a higher sensitivity in the measurement of the strain. Have the gauge mounted and ready 30 minutes beforehand to eliminate error from temperature change. The can is initially unopened, and the bridge is balanced such that the output voltage is 0. The can is then opened: • The vertically (axially) oriented strain reading changes to -00027, corresponding to = 27 × 10−6 . • The horizontally (hoop) oriented strain reading changes to -01124, corresponding to = 1124 × 10−6 . • This change shows that the initial strain in the sealed can was greater in the “hoop” of the can: this is because there is more surface area in this direction as opposed to the axial direction. Satyaki Bhattacharjee takes over. In our analysis of the can: • We assume the change of the diameter of the can between the opened and unopened states is 0. • We assume that the pressure Pin within the can is equal in all directions. • We assume that in the unopened state, Pin > Pout , so the can is initially in tension. • With a caliper, Paul Rumbach has measured the following: t = 10−4 m, R = 0.066 m. Figure 12.1: The thickness of the can is measured to be t = 10−4 m, while the length is not measured and arbitrarily chosen as L, because it factors out in determining the hoop stress in Eq. (12.9). There is some tensile force Th acting in the hoop (out of the page) as a result of the pressure inside Pin . The area that Th acts on is depicted here, and calculated in Eq. (12.8). 49 50 12.1 Lecture 12: Pop Can Experiment Hoop Analysis Figure 12.2: Free body diagram of the forces on a section of the can. The force Fh is resultant from the pressure differential ∆P = Pin − Pout . The tensile force Th is experienced throughout the hoop of the can; at every cut along the hoop, Th is tangent to the curvature of the can, as shown. Σ F = 0 → Fh = 2Th (12.1) δθ θ R R Figure 12.3: To find the force the pressure differential ∆P = Pin − Pout creates on the hoop of the can, we need to integrate ∆P over the surface area of the hoop, Ah1 . This image represents the integration over one of the dimensions, and the other is simply the length of the can, L. Fh = P × Ah1 Z Fh = (12.2) π RL (Pin − Pout ) δθ (12.3) 0 Z Fh = ∆P RL π sin(θ) δθ (12.4) 0 π Fh = ∆P RL(− cos θ) (12.5) Fh = ∆P RL(2) = 2Th (12.6) Th = ∆P RL (12.7) 0 M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 12: Pop Can Experiment 51 When finding the hoop stress σhoop , we use a different area, Ah2 , the area that T acts on: Ah2 = t × L σhoop = (12.8) Th ∆P RL ∆P R = = Ah2 tL t (12.9) ∆P R σhoop = E Et (12.10) hoop Et R (12.11) Hooke’s Law applied to σhoop : hoop = ∆P = For aluminum, E = 69 × 109 Pa, and we know hoop = 1124 × 10−6 , t = 10−4 m, and R = 0.066 m. We use these parameters with Eq. (12.11) to calculate the gauge pressure: ∆P = 117.51 kPa To find the pressure inside the can, we know the relation Pin = ∆P + Pout (12.12) where Pout = 1 atm = 101.325 kPa, giving: Pin = 218.835 kPa AME 20213: Measurements and Data Analysis M. R. Buche 2015 52 12.2 Lecture 12: Pop Can Experiment Axial Analysis Figure 12.4: The can is “cut” along the plane of the hoop. The pressure differential ∆P acting on the top and bottom of the can creates another tensile force Ta along the length of the can. Σ F = 0 → Fa = Ta (12.13) The area of the top of the can (Aa1 ) is approximated by considering it to be a circle of radius R: Aa1 ≈ πR2 (12.14) Fa = P × A = ∆P πR2 (12.15) The area of the cross section (Aa2 ) is approximated because the thickness t is so small: Aa2 ≈ 2πRt σaxial = (12.16) Fa R∆P πR2 ∆P = = Aa2 2πRt 2t (12.17) σaxial R∆P = E 2Et (12.18) 2axial Et R (12.19) axial = ∆P = Using the problem parameters, E = 69 × 109 Pa, t = 10−4 m, R = 0.066 m, and axial = 27 × 10−6 with Eq. (12.19) to calculate the gauge pressure: ∆P = 5.6454 kPa Now Eq. (12.12) is used to find Pin : Pin = 106.97 kPa M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 12: Pop Can Experiment 12.3 53 Conclusions Before beginning our experiment, we assumed that the pressure would act equally in all directions within the can: Pin and therefore ∆P should be the same in both the hoop and axial analysis, but are not. combining Eq. (12.10) and Eq. (12.18), we can derive the following theoretical expression: axial = 1 hoop 2 (12.20) Comparing this to our original strain measurements from the gauges, we can see that this equation does not hold for the true values hoop = 1124 × 10−6 and hoop = 27 × 10−6 . This means our calculations leading to the strain equations were erroneous, namely in the calculation of the areas in the axial analysis. The top of the pop can has an odd shape with inconsistent cross-sections along the can’s axis, so the radius R is not exactly what we thought in Eq. (12.14). Also, the stiffness is greater in both the top and bottom of the can because it is thicker, so t is also inconsistent. AME 20213: Measurements and Data Analysis M. R. Buche 2015 54 M. R. Buche 2015 Lecture 12: Pop Can Experiment AME 20213: Measurements and Data Analysis Lecture 13 — Intro to Digital Signal Last lecture, Kevin Peters had the strain gauges attached to a blue box: Figure 13.1: Diagram of the blue box. RS represents the resistance given by the strain gauge (changes later with elongation) and Rref is what is changed to initially balance the bridge. Vout is then filtered, converted from analog to digital, and displayed to represent strain. 13.1 More About Amplifiers −Vcc < Vout < +Vcc Remember: an amplifier cannot amplify past Vcc (clipping). 55 Vout =G Vin (13.1) 56 13.2 Lecture 13: Intro to Digital Signal Binary Numbering FLOPS - float point operations per second. 16-bit float point variables: 216 = 65,536 binary places. 32-bit (double): 232 ≈ 4,300,000,000 binary places. 13.3 Digital to Analog Inside your iPhone, the memory (binary) is converted from digital to analog (voltages) and sent to your speaker/headphones. Signal is not a smooth wave, it has discrete voltages. You want to maximize the sampling frequency to maximize data/audio quality, but that takes up more memory space. Example is IPv4 - data broken up into packets, sent, and reassembled - not the most efficient way because real-time things would work better without disassembly. China has all internet requests go through a router - ”the great firewall of china” - blocks requests for youtube, facebook, etc. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 14 — More Digital Signal 14.1 Digital Electronics 8 bits = 1 byte → can represent numbers 0 - 255: 3 decimals of precision (3 places to put the decimal on the number 255). 16 bits = 2 byte → can represent numbers 0 - 65,535: 5 decimals of precision. Float-point numbers: uses 32-bits to represent numbers (single precision). 1 bit for the sign, 8 bits for the exponent, 23 bits for the fraction. ±(fraction) × 10exponent (14.1) Double precision: 1 bit for the sign, 11 bits for the exponent, 52 bits for the fraction. 1012 FLOPS = “terraflop” 1015 FLOPS can be achieved from distributed computing. 14.2 A/D and D/A Example: digital phone service cell phone / VOIP. The phone takes input from the microphone, converted from analog to digital signal via the A/D, is put through the transceiver. The digital signal is discrete samples of the sound waveform; the faster the sampling rate, the better the sound quality. The transceiver compresses the sound data - about 10 ms of sound is compressed into 1 ns of voltage - into a digital pulse train (packets). The packets are sent through a router and the ”world wide web” to the destination and reassembled, converted to analog V (t) for the speaker. This process is not efficient; there is some talk of creating ”fast lanes” for constant-streaming applications like Netflix, to avoid dismantling packets and have direct lanes through the web. 55 56 M. R. Buche 2015 Lecture 14: Intro to Digital Signal AME 20213: Measurements and Data Analysis Lecture 15 — E3 and Engine Analysis 15.1 Experiment 3 Michael Johnson discusses topics of Experiment 3: 15.1.1 Thermocouples Newton’s Law of Cooling for rate of heat transfer is given by Q̇s = hAs (T∞ − T ) (15.1) where T is the temperature of the object of interest, T∞ is the ambient temperature, h is a material constant, and As is the surface area of the object of interest. The metals used in the thermocouple are incompressible, so their specific heat Cν is constant, such that Q̇s = mCν dT dt (15.2) Combining Eq. (15.1) and (15.2), mCν dT = hAs (T − T∞ ) dt (15.3) Solving for T , T (t) = T∞ + (To − T∞ )e(−t/τ ) where the time constant τ is given by: τ= mCν hAs (15.4) (15.5) and τ is constant for incompressible materials (solids, liquids). Fig. (15.1) shows an example of T (t). Rearranging Eq. (15.4), e−t/τ = T (t) − T∞ To − T∞ 57 (15.6) 58 Lecture 15: E3 and Engine Analysis Figure 15.1: Example curve of T (t) for the cooling of an object to ambient temperature T∞ . In order to make this relation linear, the equation becomes: T (t) − T∞ −t y(t) = = ln τ To − T∞ (15.7) where −1/τ is the slope of the line. 15.1.2 Piezoelectric Ultrasonic Transducers Voltage induces deformation in piezoelectric materials, and visa-versa. AC voltage causes piezoelectric material to expand and contract; when put inside a speaker, this creates sound waves. One can model the sound wave response using a mass-spring model: mẍ = −kx (15.8) where m is the mass, ẍ is its acceleration, k is the spring constant, and x is the spring displacement. The resonance frequency ωn of the system is given by: r ωn = k m (15.9) Consider a forced-mass-spring-damper system: mẍ = −kx − γ ẋ + Fo sin ωt (15.10) ẍ + 1/τ ẋ + ωn 2 = Fo /m sin ωt (15.11) and simplifying, M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 15: E3 and Engine Analysis 59 where τ = γ/m and ωn 2 = k/m x(t) = Fo sin ωt p 2 m (ω − ωn 2 )2 + (ω/τ )2 (15.12) but for this experiment, we will use the simplified model: x(t) = A(ω) sin ωt (15.13) ”Full width at half max” - ∆ω: √ ∆ω = 15.1.3 τ 3 (15.14) Baseball Bat Figure 15.2: Strain gauge mounted on baseball bat; after initially displaced and released, the bat’s displacement oscillates, and therefore the strain oscillates accordingly. AME 20213: Measurements and Data Analysis M. R. Buche 2015 60 15.2 Lecture 15: E3 and Engine Analysis Engine Cylinder Analysis Paul takes over and shows a ”4-stroke engine” - the ambient temperature inside the cylinder T∞ is more difficult to find since it varies with time. Consider trying to measure the ambient temperature inside the cylinder T using a thermocouple: T∞ varies sinusoidally with time, according to some constant k: T∞ (t) = k sin ωt (15.15) Using Eq. (15.3), the equation for a thermocouple, with Eq. (15.15): mCν dT = k sin ωt − T hAs dt (15.16) And finally, using Eq. 15.5: dT + T = k sin ωt dt This is a first-order response (involves a first-order differential equation). τ (15.17) Measuring the ambient temperature T∞ with the thermocouple yields both a different amplitude and phase than the true T∞ , shown in Figure 16.2. Figure 15.3: The heat transfer involving the thermocouple is not instantaneous, therefore the thermocouple temperature Tthermocouple will lag behind the oscillating ambient temperature T∞ , yielding a different phase. The lag also causes the smaller amplitude of Tthermocouple , because the thermocouple is unable to reach the peak temperatures of T∞ before it reverses its direction on the oscillating curve. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 16 — Transient Response 16.1 1st Order Response - Thermocouple + V . Qs - . Qin T . Qout T Figure 16.1: Two metals form a junction and induce a voltage based on Q̇s . Q̇s = Q̇in − Q̇out (16.1) Newton’s Law of Cooling, a first order ordinary differential equation (ODE): mCν dT = hAs (T∞ − T ) dt (16.2) Solve using an initial condition T (t = 0) = To . T (t) = T∞ + (To − T∞ )e−t/τ τ= mCν hAs (16.3) (16.4) The coefficient of convective heat transfer h varies with substance. The mass of the tip of thermocouple m is given by: m = ρV = 61 2 3 πr ρ 3 (16.5) 62 Lecture 16: Transient Response and the surface area As , As = 2πr2 (16.6) ρrCν 3h (16.7) such that the Eq, (16.4) becomes: τ= At t = τ , T is at 63% of (To − T∞ ). 16.1.1 Linearization T (t) − T∞ = e−t/τ To − T ∞ −t T (t) − T∞ = y(t) = To − T ∞ τ (16.8) (16.9) The slope of the linear transformation is −1/τ , and this slope is negative for both cooling and heating. τ is the fastest the thermocouple can instantaneously measure T (t), it will lag for sampling ∆t < τ . 16.2 Driven 1st Order Response - Engine Cylinder The temperature inside the engine T ∞ changes with time: T∞ (t) = k sin(ωt) mCν (16.10) dT = hAs (k sin(ωt) − T ) dt (16.11) mCν hAs (16.12) τ= dT + T = k sin(ωt) dt ωτ k k T (t) = To + e−t/τ + p sin(ωt + φ) 2 (ωτ ) + 1 (ωτ )2 + 1 τ (16.13) (16.14) φ = arctan(−ωτ ) (16.15) k T (t) = p sin(ωt + φ) (ωτ )2 + 1 (16.16) For t >> τ , the thermocouple measures: M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 16: Transient Response 63 Figure 16.2: The heat transfer involving the thermocouple is not instantaneous, therefore the thermocouple temperature Tthermocouple will lag behind the oscillating ambient temperature T∞ , yielding a different phase. The lag also causes the smaller amplitude of Tthermocouple , because the thermocouple is unable to reach the peak temperatures of T∞ before it reverses its direction on the oscillating curve. If ωτ << 1, ω << 1/τ , the thermocouple measures T∞ exactly, so there is no phase shift or amplitude difference: T (t) = k sin(ωt) = T∞ (t) Magnitude ratio M between |T∞ (t)| and |T (t)| is given by: T = p 1 M = T∞ (ωτ )2 + 1 (16.17) (16.18) Dynamic error δ is given by: δ =1−M 16.2.1 (16.19) 2nd Order Response - Baseball Bat A damped harmonic oscillator: m dx d2 x +γ + kx = F 2 dt dt (16.20) Natural resonance (ringing) frequency ωn , r k m (16.21) k γ 1− m 4km (16.22) ωn = Damped resonance frequency ωd , r ωd = Damping ratio ζ, ζ=√ AME 20213: Measurements and Data Analysis γ 4km (16.23) M. R. Buche 2015 64 Lecture 16: Transient Response Under Damped Case - ”ringing” like the baseball bat experiment: γ < √ 4kmandζ < 1. x(t) = Ae−γt sin(ωd t + φ) (16.24) Figure 16.3: Under damped example; strain gauge mounted on baseball bat; after initially displaced and released, the bat’s displacement oscillates, and therefore the strain oscillates accordingly. Critically Damped Case: γ = Over Damped Case: γ > √ √ 4kmandζ = 1. x(t) = A[1 − eωn t (1 + ωn t)] 4kmandζ > 1. " x(t) = A 1 − e −γt cosh(ωd t) p γ γ 2 − 4km (16.25) !# sinh(ωd t) (16.26) Figure 16.4: Example plot of both critically and over damped cases. Imagine the mass on the spring is traveling through a highly viscous fluid, and slowly approaches steady state. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 16: Transient Response 16.3 65 Driven 2nd Order System - Piezoelectric Pressure Transducer F varies sinusoidally: F (t) = k sin(ωt) (16.27) d2 x dx +γ + kx = k sin(ωt) 2 dt dt (16.28) A sin(ωt + φ) x(t) = p 2 (ω − ωn 2 )2 + (ω/τ )2 (16.29) m τ= ωn 2γ = 2 m 2ζ (16.30) Full width at half max (FWHM) is ∆ω: √ 3 (16.31) τ x(ω) ∆ω = max ∆ω 1/2 max ωn ω Figure 16.5: FWHM or ∆ω is the width shown between the curve at half the maximum value of x(ω). Magnitude ratio M (ω) for this system: 1 M (ω) = p 1 − (ω/ωn )2 + (2ζω/ωn )2 (16.32) and phase φ, φ(ω) = arctan AME 20213: Measurements and Data Analysis 2ζ(ω/ωn ) 1 − (ω/ωn )2 (16.33) M. R. Buche 2015 66 M. R. Buche 2015 Lecture 16: Transient Response AME 20213: Measurements and Data Analysis Lecture 17 — Examples, Uncertainty 17.1 Internal Combustion Engine Example The engine is running at 3,000 RPM, and a τ = 0.1 s thermocouple is used to measure T (t). What is the magnitude ratio and phase of T relative to T∞ ? ω = 2πf = (2π)(3000) rev 1min = 314 rad/s min 60s Using Eq. (16.18), M=p 1 M = 0.032 (314 × 0.1)2 + 1 This M yields a δ of 97% using Eq. (16.19), which is way off! Using Eq. (16.15), φ = −88.2◦ φ = arctan[(−314)(0.1)] 17.2 Pressure Transducer Example Problem 6 on Page 231 of the text. Pressure transducers on sides of aircraft wings with ωn = 6284 rad/s and ζ = 2.0. To ensure accuracy, we require that M (ω) ≥ 0.707 and |φ| ≤ 20◦ . What is the maximum frequency in Hz within those bounds? Both constraints must be considered. Using Eq. (16.32), ω < 1, 676 rads/ f = 266.7 Hz Using Eq. (16.33), ω < 567 rad/s The maximum frequency f is then 90 Hz. 67 f = 90 Hz 68 17.3 Lecture 17: Examples, Uncertainty Design Stage Uncertainty Chapter 7 in the text, useful for comparing sensors. x is something that is measured: x = x̄ ± ux (17.1) where x̄ is the estimated true mean of the measurement, and ux is the uncertainty in x. Remember error versus uncertainty from Lecture 5. Accuracy - how far off the measurement is from the true value (high accuracy = close to true value). Precision - how spread out the various measurements are (high precision = low spread), usually quantified by standard of deviation. 17.3.1 Different Sources of Error/Uncertainty Resolution - Ures - half of the smallest division of measurement. Repeatability - UR - related to precision and standard of deviation; random error. Linearity - UL - how much the output deviates from a theoretically linear response. Zero Shift or Offset - UZ - difference between 0 and the function value at 0. Hysteresis - UH - output is different depending on the path taken to the current point. Total Uncertainty - UI - add everything “in quadrature”. q UT = Ures 2 + UR 2 + UL 2 + UZ 2 + UH 2 (17.2) UR is from statistics, and Ures , UL , UZ , UH are baseline instrument uncertainties. 17.3.2 Example 1, from Text Pressure transducer with a full scale of operation FSO = 100 psi, resolution of 0.1 psi, repeatability of 0.1 psi, linearity of 0.1 %, and a thermal drift less than 0.1 psi over 6 months at 32◦ to 90◦ . Analyzing: Ures = 0.1, UR = 0.1, UZ = 0.001(100) = 0.1, UD = 0.1, so using Eq. (17.2), p UT = 0.2 psi UT = 0.12 + 0.12 + 0.12 + 0.12 M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 18 — More About Uncertainty 18.1 Example 2 Pressure transducer that outputs a voltage measured by a digital multimeter. Data sheets for both the pressure transducer and multimeter are considered. For the multimeter, UDM M = ”0.5 % reading + 2 digits”. For the pressure transducer, VF SS = 4.6 V (full scale span: range of output voltages), so one uses the 20.00 V range on the DMM. UDM M = (0.0005)4.6 + 0.02 UDM M = 0.043 V UA = 1.5%VF SS = 0.015(4.16) UZ = 0.25%VF SS = 0.0025(4.16) q UT 0 = UDM M 2 + UA 2 + UZ 2 UA = 0.07 V UZ = 0.0115 V UT 0 = 0.082 V But since the data sheet gives a coefficient of sensitivity of kp = 12.1 mV/kPa for the pressure transducer, UT = 18.2 0.082 UT 0 = kp 0.0121 UT = 6.8 kPa Uncertainty Propagation Given x, x̄, and Ux , one wants to compute f (x̄), and this is how one gets Uf based on Ux : Uf = δf Ux δx x=x̄ (18.1) Given many variables (x, y, z), finding f (x̄, ȳ, z̄) and then Uf : s Uf = δf Ux δx 2 + δf Uy δy 69 2 + δf Uz δz 2 (18.2) 70 18.2.1 Lecture 18: More About Uncertainty Example 3: Pitot Static Probe Remember Bernoulli’s Law: s v= 2∆P ρair (18.3) Given: Ps = 101 kPa, Po = 85 kPa, ρair = 1.225 kg/m3 , one can calculate v = 162 m/s. What is Uv given UP o = UP s = 6.8 kPa? (the uncertainty from the last example) r 1 δV 2 √ = δPs ρair 2 Ps − Po r δV 2 −1 √ = δPo ρair 2 Ps − Po s 2 2 δV δV UP s + UP o Uv = δPs δPo s r 2 r 2 2 2 UP s −U √ √ Po Uv = + ρair 2 Ps − Po ρair 2 Ps − Po s Ups 2 + Upo 2 √ Uv = 2ρair Ps − Po Plugging in values: Uv ≈ 49 m/s, so V = 162 ± 49 m/s 18.2.2 Formulas For addition f (x, y) = x + y, or subtraction f (x, y) = x − y, δf δf = =1 δx δy q Uf = (Ux )2 + (Uy )2 (18.4) For multiplication f (x, y) = xy, one adds the relative uncertainties in quadrature: f δf f δf =y= , =x= δx x δy y s 2 2 f Uy f Ux Uf = + y x s 2 2 Uf Uy Ux = + f y x (18.5) Division F (x, y) = x/y yields the same result as multiplication: M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 18: More About Uncertainty −f −x δf 1 f δf = 2 = , = = δx y y δy y x s 2 2 f Uy f Ux Uf = + y x s 2 2 Uy Ux Uf + = f y x AME 20213: Measurements and Data Analysis 71 (18.6) M. R. Buche 2015 72 M. R. Buche 2015 Lecture 18: More About Uncertainty AME 20213: Measurements and Data Analysis Lecture 19 — Tech Memo 3, Uncertainty 19.1 Experiment 3 Plots The finished lab reports for Experiment 3 will be expected to have 5 plots: 1. Figure 1a: T (t) for both cooling and heating of the thermocouple, on one plot. 2. Figure 1b: Curve fit y(t) for both cooling and heating, on one plot. 3. Figure 2: V (ω) for piezoelectric pressure transducer plotted as individual points, with curve fit (see addendum on lab website). 4. Figure 3: V (t) for baseball bat data as individual points with curve fit from Eq. (16.24). 5. Figure 4: FFT gives two plots: V (f ) and φ(f ) (remember to convert f to ω). Figure 4 will be the FFT V (ω); φ(ω) is unnecessary. ? If something looks silly with individual data points (because there is so many), one can use a continuous line if it is still distinguishable from the curve fit line (different colors). 19.2 Experiment 3 Uncertainty 19.2.1 Uncertainty in Tau Uτ How does one find the uncertainty in τ ? Remember that the slope of the linear fit is -1/τ : s 2 Uτ Uslope Uslope = = τ slope slope Uτ = 19.2.2 Uslope slope τ Thermocouple After using a curve fit to find the calibration constant k in V = kT , say k = 10 ± 0.2 mV/◦ C. 73 (19.1) 74 Lecture 19: Tech Memo 3, Uncertainty UV = UDM M = “0.5% + 2digits00 Say the measurement is 0.563 V, UV = (0.005)(0.563 V ) + 0.002 V = 0.005 V Uk = 0.2mV◦ C Using Eq. (18.5), UT = 0.022, T UT = (0.022)(56.3) ≈ 1.2 ◦ C T = 56.3 ± 1.2 ◦ C. 19.3 Repeatability UR Uncertainty due to statistical variance in N different trials. The highest probability will be at the mean. mean = x̄ = N X xi N v uN uX (xi − x̄)2 standard deviation = σ = t N i=1 (19.2) i=1 UR = √ σ N −1 (19.3) (19.4) If something reports ”68% confidence” it corresponds to a 68% chance that the measured value will be within ±UR of the mean. N refers to the number of trials, not necessarily the number of individual points. Ensemble - a collection of N different data sets obtained by repeating the experiment N times. For large N , σ UR ≈ √ N (19.5) Diminishing returns on UR : for UR → 12 UR , one needs N → 4N. 19.4 Confidence Intervals Remember Eq. (19.4), which gives 68% confidence that the measured values will fall in the uncertainty. tν,c% σ UR,c% = √ N −1 M. R. Buche 2015 (19.6) AME 20213: Measurements and Data Analysis Lecture 19: Tech Memo 3, Uncertainty 75 where tν,c% is found in a table (in the back of the text), and ν = N − 1. This can be used to find different confidence intervals like 95% instead of 68%, which increases the uncertainty. AME 20213: Measurements and Data Analysis M. R. Buche 2015 76 M. R. Buche 2015 Lecture 19: Tech Memo 3, Uncertainty AME 20213: Measurements and Data Analysis Lecture 20 — Signal Characteristics Given any signal that oscillates with time, it can be described using a DC component (average value) x̄ and AC component (amplitude) xAC (t): x(t) = x̄ + xAC (t) (20.1) Feeding the x(t) signal into an integrator (low-pass filter) will yield an output voltage x̄. Feeding x(t) into a differentiator (high-pass filter) will yield an output voltage xAC (t). 20.1 Statistical Parameters - Table 8.1 A continuous mean is given by 1 x̄ = T Z T x(t) dt (20.2) 0 while a discrete mean is given by x̄ = N 1 X xi N i=1 (20.3) and this is what an integrator circuit does. For continuous variance (standard deviation squared) 1 σ = T 2 Z T 1 (x(t) − x̄) dt = T 2 0 Z T xAC 2 (t) dt (20.4) 0 and for discrete variance σ2 = N 1 X (x̄ − xi )2 dt N i=1 (20.5) For continuous root mean squared (RMS) s RMS = 1 T Z 77 0 T x(t)2 dt (20.6) 78 Lecture 20: Signal Characteristics and discrete root mean squared (RMS) v u N u1 X RMS = t xi 2 T i=1 (20.7) For continuous ’nth moment µn = 1 T T Z (x(t) − x̄)n dt = 0 Z 1 T T (xAC (t))n dt (20.8) 0 and for discrete ’nth moment µn = 20.1.1 N 1X (xi − x̄)n T i=1 (20.9) Variance Associated with Energy Dissipation Joule heating: q̄ = 1 T Z T I 2 (t)Rdt = 0 1 T Z 0 T V 2 (t) dt R (20.10) Kinetic energy of a fluid: 1 Ēk = T 20.2 Z T 0 1 2 ρU (t) dt 2 (20.11) Fourier Analysis Remember Fourier’s Theorem - any function f(t) can be represented as a sum of sines and cosines with various frequencies. Fourier’s Transform gives frequency components of the signal. Z ∞ 1 V (ω) = V (t)e−iωt dt (20.12) 2π −∞ Recall that e−iωt = cos(ωt) − i sin(ωt) (20.13) so Eq. (20.12) becomes V (ω) = 1 2π Z ∞ V (t)[cos(ωt) − i sin(ωt)] dt (20.14) −∞ For the phase, φ(ω) = arctan M. R. Buche 2015 Im[V (ω)] Re[V (ω)] (20.15) AME 20213: Measurements and Data Analysis Lecture 20: Signal Characteristics 79 R∞ φ(ω) = arctan V (t) sin(ωt) dt R −∞ ∞ V −∞ ! (t) cos(ωt) dt (20.16) For the amplitude, |V (ω)|2 = 1 |V (ω)| = 2π 2 sZ ∞ p (Re[V (ω)])2 + (Im[V (ω)])2 2 Z V (t) cos(ωt) dt + −∞ AME 20213: Measurements and Data Analysis ∞ 2 V (t) sin(ωt) dt (20.17) (20.18) −∞ M. R. Buche 2015 80 M. R. Buche 2015 Lecture 20: Signal Characteristics AME 20213: Measurements and Data Analysis Lecture 21 — FFT and Reverse FFT Homework 4, problem 3b: make sure to use a student’s t value for 95% confidence. 21.1 Fast Fourier Transform This is a discrete version of the Fourier Transform, and it uses a Riemann Sum to approximate the integral (DFT or FFT). It does this by finding the areas of many rectangles under the curve, since the integral essentially finds the area. If enough small rectangles are used, the approximated integral approaches the true value. Re [V (ω)] = 1 2π Z ∞ V (t) cos(ωt) dt ≈ −∞ V (ω) ≈ 1 2π Z T V (t) cos(ωt) dt (21.1) 0 N 1 X y(tj ) cos(ωi tj )∆t 2π j=1 (21.2) DFT turns into a matrix operation, with ”kernel matrix” F or Fi,j : V (ωi ) = Vi = Fi,j yi (21.3) ~t = V ~ω FV (21.4) Fi,j = cos(ωi tj ) F11 F21 ... FN 1 F12 F22 ... ... ∆t 2π ... V (t1 ) ... ... ... ... FN N V (tN ) 81 (21.5) V (ω1 ) ... = ... V (ωN ) 82 21.2 Lecture 21: FFT and Reverse FFT Data Acquisition The sampling period is T , the sampling frequency is fs , the time between two data points is ∆t = 1/fs , the number of samples is N . T = N ∆t = 21.2.1 N fs (21.6) Nyquist Criterion One cannot resolve frequencies that are less than half of the sampling frequency (need 2 points per period). fs (21.7) 2 Aliasing - results when the Nyquist Criterion is not met; signal components with frequencies greater than fmax show up as low frequency components in the DFT of the data; ”undersampling”. fmax = Paul Rumbach shows an example of sine wave data that has a sampling frequency less than the frequency of the sine wave - result is a much lower frequency sine wave. 21.3 DFT in MATLAB Where y and t are measurements from the baseball bat lab. F = fft(y); R = abs(F); phi = atan(imag(F)./real(F)); N = length(t); T = t(N) - t(1); fs = N/T; freq = 1/T : 1/T : fs; plot(freq,R) xlabel(’frequency, [Hz]’) ylabel(’amplitude’) semilogy(freq,R) % % % % % % % % Built in function in MATLAB Magnitude of amplitude Phase [rad] Number of data points Sampling period [s] Sampling frequency [Hz] Iterate frequency from 1/T to fs, steps 1/T Plot frequency versus relative amplitude % Better representation of mirror images Two peaks (resonance frequencies), one at ≈170 Hz, and a ”mirror image” at the end. Everything beyond fs /2 is a mirror image, and can be ignored (bogus!) because all those frequencies do not meet the Nyquist Criterion and are therefore invalid. 21.4 Reverse Fourier Transform Takes an FFT back to the time domain; used a lot in compressing information. F −1 [V (ω)] = V (t) Z (21.8) ∞ V (t) = V (ω)eiωt dω (21.9) −∞ M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 21: FFT and Reverse FFT 21.4.1 83 Digital Filtering Example: MP3 file compression! A digital audio file, which is a waveform V (t), is compressed into V (f ) using DFT. The ultrasonic range (f > 20 kHz) is incoherent to the human ear (the eardrum resonance frequency is much lower), so these frequencies in the ultrasonic ranges are replaced with zeros - this is done with a ”window function” w(f ) which assigns 1 to f < 20 kHz and 0 to f > 20 kHz. V 0 (f ) = w[V (f )] (21.10) The new file V 0 (f ) is saved this way, using less memory than the original. Then a ”codec” is used to perform reverse DFT to get V 0 (t), which has original high frequencies filtered out. This process is also popularly used to compress images. AME 20213: Measurements and Data Analysis M. R. Buche 2015 84 M. R. Buche 2015 Lecture 21: FFT and Reverse FFT AME 20213: Measurements and Data Analysis Lecture 22 — Spectral Density, Music 22.1 Spectral Density Spectral density - V (ω) - units of V (t) per angular frequency. Power spectral density - PSD PSD = |V (ω)|2 (22.1) The ”power” aspect is just because many situations analyzed in this fashion involve power, like joule heating or the kinetic energy of a fluid. 22.2 Periodic Functions Review Lecture 9 - square waves, saw-toothed waves, etc. Remember: periodic functions are defined by f (t) = f (t + T ) (22.2) Recall that FFT gives peaks at the fundamental frequency and each harmonic or overtone (Page 31). Review Fourier’s Theorem - periodic functions can be written as a series of discrete fourier components. 22.2.1 Music Theory Musical notes all have a fundamental frequency f1 and overtones fn = nf1 . Octaves - a note ”one octave” higher than another is double the frequency of it. Note C4 C5 C6 C7 f1 [Hz] 262 525 1046 2093 Table 22.1: Examples of frequencies of C octaves. 85 86 Lecture 22: Spectral Density, Music Notes that make up chords are chosen based on how their frequencies match up with each other! M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 23 — Noise, Transient Statistics 23.1 Fourier Analysis in Broad Applications Standing waves arise in solid mechanics, so Fourier analysis is important for this. Recall the Tacoma Narrows Bridge collapse of 1940, or a vibrating string. Fourier analysis is also important for digital music applications: why certain notes sound good together as chords, frequency filters, visualizers and equalizers, etc. Image processing applications as well: compressing and filtering through things like window functions, finger print analysis, image enhancing, and more. Turbulence (stochastic flow) is a very complex phenomenon in nature, and the Fourier transform reveals underlying mathematical structures in turbulence. Kolmogorav’s Power Law comes from the power spectral density of a pitot static probe in stochastic flow: |U (ω)|2 ∝ ω −5/3 (23.1) This type of analysis can be applied to the stock market: ”Pink Noise” power law: |f (ω)|2 ∝ ω −2 (23.2) Microwave radiation left over from the Big bang still persists today. Measuring this radiation tells us a lot about the universe. The Planck telescope radiation map can be used with a special Fourier Transform called a ”multipole expansion” reveals an underlying structure. 23.2 Noise Noise is an unwanted AC component in any signal. White Noise - evenly distributed over all frequencies (constant PSD). Primary sources: • Johnson Noise - noise due to random thermal motion of the charge carriers in a wire. For frequencies less that 80 GHz, PSD = |V (f )|2 = 4RkT (23.3) 87 88 Lecture 23: Noise, Transient Statistics |V (f)|2 f Figure 23.1: Plot of power spectral density |V (f )|2 of a signal with white noise. where R is the resistance, k is the Boltzmann constant, and T is the temperature in Kelvin. This is why electronics perform best at low temperatures. For a resistor, the power P of the noise is given by P = 4kT ∆f (23.4) kT C (23.5) and for a capacitor PSD is given by |V (f )|2 = • Shot Noise - noise due to the discrete electrons or photons. Pink Noise - has a PSD given by |V (ω)|2 ∝ ω −2 (23.6) which has a ”self-similar nature” where the repeating patterns are made up of the same repeating patterns, and so on - a fractal structure. |V (f)|2 f Figure 23.2: Plot of power spectral density |V (f )|2 of a signal with pink noise. Some say turbulence is a form of pink noise, because it has this self-similar nature, but those who study it know it is actually not pink noise. 23.3 EM Shielding Electromagnetic Interference (EMI) - wires, especially loops, behave as antennae and pick up frequencies from passing electromagnetic waves. If the interference is ”coherent” (one frequency, like the 60 Hz from a wall outlet) a notch filter can be used to filter it out. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 23: Noise, Transient Statistics 89 Faraday Cage - the circuit or electronic being shielding is placed inside a grounded metal box, and all electromagnetic waves that hit it from the outside are grounded and unable to reach the circuits inside. Coaxial Cables - like the Bayonet Neil-Concelman (BNC) connector, which is essentially a signal carrying wire inside a grounded metal jacket: Faraday’s Cage applied to a cable. 23.4 Transient Statistics Running Average - average all previous data points leading up to the present time tn : V̄R (tn ) = n X V (ti ) i=1 (23.7) n Moving Average - sets each data point equal to the average of the adjacent data points: V̄M (tn ) = n+N X V (ti ) N (23.8) 2 V (ti ) − V̄R (tn ) n (23.9) i=n−N Running Standard Deviation σR (tn ) = n X s i=1 where the running average V̄R (tn ) can be seen in the numerator. Moving Standard Deviation σM (tn ) = n+N X s i=n−N 2 V (ti ) − V̄M (tn ) N (23.10) where the moving average V̄M (tn ) can be seen in the numerator.1 1 Originally 2N in the denominator - corrected off a hunch. AME 20213: Measurements and Data Analysis M. R. Buche 2015 90 M. R. Buche 2015 Lecture 23: Noise, Transient Statistics AME 20213: Measurements and Data Analysis Lecture 24 — Probability Probability of an event A occurring: P (A), and probability of A not occurring: P (A0 ). P (A0 ) = 1 − P (A) (24.1) Probability of either A or B occurring (union): P (A ∪ B). Probability of both A and B occurring (intersection): P (A ∩ B). 24.1 Venn Diagrams Probability of event A occurring is given by the area in the circle A, while P (A0 ) is all area not in circle A, P (A ∩ B) is all area intersected by A and B (purple), and P (A ∪ B) is all area in both A and B. P (A ∪ B) = P (A) + P (B) − P (A ∩ B) (24.2) and the intersection is subtracted off to prevent it from being counted twice, since it is in both areas. A B Mutually Exclusive - it is impossible for both A and B to both occur: no intersection. P (A ∩ B) = 0. A (24.3) B 91 92 Lecture 24: Probability Independent Events - the outcome of A has no influence on the outcome of B. Gambler’s Fallacy - assuming that losing a lot means that one is due for a win. 24.1.1 Example: Coins What is the probability of two coin tosses both coming up as heads? It is known that P (A) = P (B) = 1/2, where A is the first and B the second toss, P (A ∩ B) = P (A) × P (B) = 1 = 25% 4 What is the probability that both will be heads H or tails T ? P (H) = P (T ) = 1/4, and the two events are mutually exclusive for each toss, P (H ∩ T ) = 0, P (H ∪ T ) = P (H) + P (T ) − P (H ∩ T ) = 24.2 1 1 1 + − 0 = = 50% 4 4 2 Conditional Probability Probability that A will occur given that event B did occur: P (A|B). P (A ∩ B) = P (B) × P (A|B) P (A|B) = 24.2.1 P (A ∩ B) P (B) (24.4) (24.5) Example: Kings What is the probability of drawing two kings in a row from a deck of 52 cards? Probability of drawing first king, event B, P (B) = 4 1 = 52 13 and probability of drawing second king, event A, given that B has happened, P (A|B) = 3 51 so the probability of drawing two in a row, the intersection: P (A ∩ B) = P (B) × P (A|B) = M. R. Buche 2015 1 3 1 × = ≈ 0.45% 13 51 221 AME 20213: Measurements and Data Analysis Lecture 24: Probability 24.2.2 93 Measuring Probability νA N where νA is the number of times event A occurs and N is the number of total events observed. P (A) = 24.2.3 (24.6) Example: April Showers If it rained 10 times in April, what is the probability of it raining on any given day in April? P (A) = 24.3 10 1 = ≈ 33.33% 30 3 Mean or Expectation Value Average value x̄ or < x >: n̄ =< n >= X nP (n) (24.7) n Normalization: the sum of all probabilities equal one: X P (n) = 1 (24.8) all n 24.3.1 Example: Dice n P (n) 1 1/6 2 1/6 3 1/6 4 1/6 5 1/6 6 1/6 Table 24.1: Example: rolling a six-sided die. What is the mean or expected value to be rolled? < n >= 6 X nP (n) = 1 n=1 = 1 1 1 +2 + ...6 6 6 6 1 + 2 + ...6 = 3.5 6 AME 20213: Measurements and Data Analysis M. R. Buche 2015 94 M. R. Buche 2015 Lecture 24: Probability AME 20213: Measurements and Data Analysis Lecture 25 — Binomial Distribution, Homework 5.1 Dice experiment: the dice was rolled N = 58 times, and the average value measured was < n > = 4.13, so what is the uncertainty in this measurement? 25.1 Binomial Distribution ρ(νA ) = N! PA νA (1 − PA )N −νA (N − νA !)(νA !) (25.1) where N is the total number of trials, νA is the number of times even A occurs, and P (A) is the probability of a single trial yielding A. 25.1.1 Poisson’s Statistics ν A = PA N (25.2) p (25.3) σ= PA N and relative uncertainty, 1 UνA σ 1 =√ = =√ νA νA νA PA N (25.4) So for any counting experiment, the relative uncertainty in the number of counts νA is given by one over the square root of νA . 25.1.2 Example: Axels Axels are put through a stress test, and 15 out of 100 fail the test. What is the probability of failure, and the uncertainty in it? 15 νF = = 0.15 N 100 1 1 =√ = √ ≈ 0.26 νF 15 P (F ) = UνF νF 95 96 Lecture 25: Binomial Distribution, Homework 5.1 UP (F ) = (0.26)(0.15) ≈ 0.04 P (F ) = 0.15 ± 0.04 From this example, the equation can be written: √ UP (A) = νA N (25.5) Large sample sizes are needed for small uncertainties: 10,000 for 1%! 25.1.3 Example: Dice How many rolls does one need to get 1% uncertainty in probability measurement? It is known that P (n) ≈1/6, and νA = 10, 000 for 1% uncertainty, N= 25.2 10, 000 νA = = 60, 000 rolls P (n) 1/6 Homework 5 Help Problem 1 of Homework 5: clear; clc; close all; % UX is the velocity data N = length(UX); fs = 46479; T = (N-1)/fs; %% Plot the velocity as a function of time t = 0 : 1/fs : T; figure(1) plot(t,UX) %% Histogram with 25 bins figure(2) hist(UX,25) %% Log-log plot of power spectral density % f = 1/T : 1/T : fs; f = 0 : 1/T : fs; PSD = abs(fft(UX)).^2; plot(log(f),log(PSD)) %% Throw out data (Nyquist Criterion); plot line slope -5/3 figure(3) x = log(f(1:N/2)); y = log(PSD(1:N/2)); M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 25: Binomial Distribution, Homework 5.1 97 plot(x, y, x, 17-5/3*x) AME 20213: Measurements and Data Analysis M. R. Buche 2015 98 M. R. Buche 2015 Lecture 25: Binomial Distribution, Homework 5.1 AME 20213: Measurements and Data Analysis Lecture 26 — PDF’s, CDF’s Final exam - Thursday, May 7th at 10:30am in DB129. 26.1 Probability Density Function (PDF) p(x)dx = probability of finding x between x + x + dx. Probability of finding x between a and b: b Z p(a < x < b) = p(x)dx (26.1) a Normalization: Z ∞ p(x)dx = 1 (26.2) −∞ Mean: ∞ Z x̄ =< x >= xp(x)dx (26.3) (x − x̄)m p(x)dx (26.4) −∞ M-th moment: Z ∞ µm =< (x − x̄) >= −∞ 26.2 Cumulative Distribution Function (CDF) Probability that the measured x is less than y Z y F (y) = P (−∞ < x < y) = p(x)dx (26.5) −∞ lim F (y) = 1 y→∞ 99 (26.6) 100 Lecture 26: PDF’s, CDF’s Gaussian or Normal distribution p(x) = 26.2.1 1 −(x − x̄)2 √ exp 2σ 2 σ 2π (26.7) Central Limit Theorem For large enough N , the distribution of measured mean x̄ will become Gaussian. One can show normalization, mean, and variance: Z ∞ p(x)dx = 1 (26.8) xp(x)dx = x̄ (26.9) (x − x̄)2 p(x)dx = σ 2 (26.10) −∞ Z ∞ −∞ Z ∞ −∞ 26.2.2 CDF of the Gaussian PDF y 1 y − x̄ √ F (y) = P (−∞ < x < y) p(x)dx = 1 + erf 2 σ 2 −∞ Z (26.11) and usually there are tabulated values of z y − x̄ (26.12) σ There is 68% probability between x̄ − σ and x̄ + σ, or one σ (z = ±1), and 95% within 2σ (z = ±2). The parameter z describes how many σ away from the mean x̄. z= 26.2.3 Example: State Highway Patrol Measuring speed limits: v̄ = 67 mph, σv = 4 mph. Assuming a Gaussian distribution, what is the probability that someone is going below 63 mph? 1 63 − 67 √ P (v < 63) = 1 + erf ≈ P = 15.9% 2 4 2 one also gets that z = −1, same as z = 1, and using a table: erf(z)=0.3413, and the entire area is 1, half is 0.5, so P is found by subtraction: P = 1 − 0.5 − 0.3414 = 15.9% What is the probability of someone going above 72 mph? 1 72 − 67 √ P (v > 72) = 1 − P (v < 72) = 1 − 1 + erf ≈ 10.56% 2 4 2 M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 26: PDF’s, CDF’s 101 one also gets that z = 1.25, and using a table: erf(z)=0.3944, so P = 15.9%. AME 20213: Measurements and Data Analysis M. R. Buche 2015 102 M. R. Buche 2015 Lecture 26: PDF’s, CDF’s AME 20213: Measurements and Data Analysis Lecture 27 — Last Lecture 27.1 Example: SAT Math Scores If the average score was 580 with standard deviation of 60, what percentile would a score of 750 be in? P (x < 750) = F (750) = 1 750 − 580 √ 1 + erf = 0.9977 = 99.77th percentile 2 60 2 What percent scored between 530 and 610? (use calculator and z-table) P (530 < x < 610) = P (x < 610) − P (x < 530) 610 − 580 530 − 580 1 1 √ √ 1 + erf 1 + erf P = − 2 2 60 2 60 2 1 0.5 −0.83 √ P = erf √ − erf = 0.489 = 48.9% 2 2 2 Using z-tables: A(z = 0.83) = 0.2967, A(z = 0.5) = 0.1915, At = 0.2967 + 0.1915 = 0.488 = 48.8% 27.2 Student’s t Distribution This is what is used for small N (N < 50) where Gaussian strategies are invalid. [ν = N − 1] Student’s t distribution is wider and not as tall as Gaussian distribution→ the t factor accounts for this. −(ν+1)/2 Γ( ν+1 t2 2 ) P (x, ν) = √ 1+ (27.1) ν πν Γ(ν/2) Gamma function Γ Γ(n) = n! (27.2) x − x̄ σ (27.3) t= Recall repeatability uncertainty: Eq. (19.6). 103 104 Lecture 27: Last Lecture 27.2.1 Central Limit Theorem As ν = N − 1 approaches ∞, the student’s t value distribution also becomes Gaussian. For ν > 50, t → z, and its looks Gaussian. 27.3 Log-Normal Distribution This describes variables that are bound by zero (cannot be negative) P (x < 0) = 0. Example: the diameter of raindrops, someone’s income, radius of tree trunks, and people’s blood pressure all cannot be negative. PDF: −(lnx − µ)2 1 √ P (x) = exp (27.4) 2σ 2 σx 2π Mean: σ2 x̄ = exp µ + 2 (27.5) σ 2 = exp(2µ + σ)[exp(σ 2 ) − 1] (27.6) Variance: CDF: F (y) = P (lnx < lnx) = 1 lny − µ √ 1 + erf 2 σ 2 (27.7) For something like test scores (cannot be above 100) substitute ”100 − x” for the x in ln x. 27.3.1 Example: Wooden 2 by 4’s The modulus of elasticity of wooden 2×4’s has a log-normal distribution. What is the probability that 1×106 psi< E < 2 × 106 psi? Given: µ = 0.375, σ = 0.25. 1 1 ln2 − 0.375 ln1 − 0.375 √ √ − P (1 < E < 2) = 1 + erf 1 + erf 2 2 0.25 2 0.25 2 At this point, Professor Paul Rumbach has broken the chalk board apparatus. It was determined that the board could not handle the truth. P = 0.831 = 83.1% ? This next information will involve a question will be on the exam. 27.4 Statistical Ethics Outliers - some data points that just do not make sense. 27.4.1 Criteria For Removing Outliers • Value is physically impossible. M. R. Buche 2015 AME 20213: Measurements and Data Analysis Lecture 27: Last Lecture 105 • Equipment is not properly set up. • Grubb’s Test - statistical criteria: s xoutlier − x̄ N − 1 t95 2 > √ σ N − 2 + t95 2 N For large N (N > 50), t95 b ≈ 2, so N >> t2 ≈ 4, r 22 N N √ =2 =2 N N N xoutlier − x̄ >2 σ AME 20213: Measurements and Data Analysis (27.8) (27.9) (27.10) M. R. Buche 2015 106 M. R. Buche 2015 Lecture 27: Last Lecture AME 20213: Measurements and Data Analysis Lecture 28 — Final Exam Review Final exam is not cumulative! Equation sheet will be given! Problems like 3 and 4 of Homework 5 will probably be on the test. Study Homework 4 and 5! 28.1 Digital Data Acquisition 32-bit A/D collects data at 20,000 samples per second for 5 minutes. (a) How many data points are collected? N = fs · T = 20, 000(5 × 60) = 6 × 106 samples (b) What is the data rate in byte/s? r= bytes · fs = (32/8)(20, 000) = 80, 000 byte/s sample (c) How much memory with the data use? D = r · t = 80, 000(5 × 60) = 24 × 106 bytes = 24 MB (d) What is the maximum frequency that can be resolved by Fourier analysis? Use the Nyquist Criteria: fs 20, 000 fmax = = = 10, 000 Hz 2 2 28.2 1st Order Transient Response Magnitude Ratio Vout 1 = M (ω) = p Vin (ωτ )2 + 1 ? Remember to convert f (Hz) to ω (rad/s)! 107 108 Lecture 28: Final Exam Review Phase φ(ω) = arctan(−ωτ ) 28.2.1 Repeatability Uncertainty Given that an experiment is done 8 times, the standard deviation of those 8 measurements is 8.6 m/s. What is the repeatability uncertainty at 95% confidence? N = 8, σ = 8.6, ν = 8 − 1 = 7: table gives t = 2.365. UR = √ 28.3 tσ tσ 2.365(8.6) √ =√ = ≈ 7.7 m/s ν N −1 7 Baseline Instrument Uncertainty A student measures the density of a metal cube. The mass m is measured as 1.049 kg using B10P Ohaus Balance. *Given the data sheet*, what is the instrument uncertainty for the measured value of m? Percent uncertainties are relative (multiply by measurement). q p UI = Um = UR 2 + UL 2 + UH 2 ... = 0.0052 + 0.0001 × 1.0492 + 0.0003 × 1.0492 ≈ 0.005 kg = 5 g Given side length l = 5.13 ± 0.15 cm, what is the density and uncertainty? ρ= s Uρ = 28.4 ∂ρ Um ∂m 2 m 3 = 7.77 g/cm l3 2 s 2 2 ∂ρ Um −3Ul m 3 3 + Ul = + = 0.68 g/cm , so ρ = 7.77 ± 0.68 g/cm ∂l l3 l4 Fourier Analysis Periodic functions are defined by V (t) = V (t + T ) which means they repeat periodically. Fourier Transform V (f ) gives large peak at fo = 1/T (fundamental frequency), and smaller and smaller ones (higher harmonics) at n/T . 28.5 Probability and Statistics ? See Homework 5 Problems 3 and 4. P (A ∩ B) = P (A)P (B|A) M. R. Buche 2015 AME 20213: Measurements and Data Analysis Appendix A: TikZ 109 P (A ∪ B) = P (A) + P (B) − P (A ∩ B) Given x̄, σ, and a normal distribution, what is the probability of a given measurement? (can use z-tables, erf function on calculator, etc.) AME 20213: Measurements and Data Analysis M. R. Buche 2015 110 M. R. Buche 2015 Appendix A: TikZ AME 20213: Measurements and Data Analysis Appendix A — TikZ For the LATEX lovers: check out the TikZ package! Beerless Pong Water Conservation Solar Panels AME 21213 Experiment 4 Experiment 1 PS3 Hotshot Solar Panel Circuits Baseball Bat Voltage Divider Experiment 3 Experiment 2 Piezoelectric Pressure Transducer High-pass Filter Noninverting Amplifier Thermocouple TikZ was also used to create a lot of the diagrams - all from right here in the source code! \begin{tikzpicture} \path[mindmap,concept color=black,text=white] 111 112 Lecture 29: TikZ node[concept] {AME 21213} [clockwise from=0] child[concept color=red!80!black] { node[concept] {Experiment 1} [clockwise from=90] child { node[concept] {Beerless Pong} } child { node[concept] {Water Conservation} } child { node[concept] {PS3 Hotshot} } } %[clockwise from=0] child[concept color=blue!60!black] { node[concept] {Experiment 2} [clockwise from=30] child { node[concept] {Voltage Divider} } child { node[concept] {High-pass Filter} } child { node[concept] {Non-inverting Amplifier} } } %[clockwise from=-90] child[concept color=orange] { node[concept] {Experiment 3} [clockwise from=-90] child { node[concept] {Thermo\-couple} } child { node[concept] {Piezoelectric Pressure Transducer} } child { node[concept] {Baseball Bat} } } child[concept color=green!50!black] { node[concept] {Experiment 4} [clockwise from=-150] child { node[concept] {Solar Panel Circuits} } child { node[concept] {Solar Panels} } }; \end{tikzpicture} M. R. Buche 2015 AME 20213: Measurements and Data Analysis — References A Star Maths and Physics. ”The Triple Point of Water”. PNG image. AStarMathsandPhysics.com. n.p. Web. 20 Jan. 2015. This site was used to provide an image for Figure 4. Benson, Tom. ”Pitot-Static Tube”. JPEG image. Nasa.gov. Jun 12 2014. Web. 16 Jan. 2015. This site was used to provide an image for Figure 2. eFunda, Inc. ”Hydrostatics: Manometer Example”. GIF image. eFunda.com. n.d. Web. 16 Jan. 2015. This site was used to provide an image for Figure 1. 113