PIV Basics: Correlation Ken Kiger (UMD) SEDITRANS summer school on Measurement techniques for turbulent open-channel flows Lisbon, Portugal 2015 With some slides contributed by Christian Poelma and Jerry Westerweel (TU Delft)
Introduction Particle Image Velocimetry (PIV): Imaging of tracer particles, Frame 1: t = t 0 Measurement section Light sheet optics Frame 2: t = t 0 + Δt Twin Nd:YAG laser CCD camera
Introduction N Particle Image Velocimetry (PIV) 992 1004 32 32 divide image pair in interrogation regions small region: ~ uniform motion compute displacement repeat!!!
Tracer particles Assumptions: - homogeneously distributed - follow flow perfectly - uniform displacement within interrogation region Criteria: -easily visible -particles should not influence fluid flow! small, volume fraction < 10-4
Image density low image density N I << 1 particle tracking velocimetry high image density N I >> 1 particle image velocimetry
How to evaluate displacement? Use statistical measure of most probable displacement: cross correlation of image pattern Possible matches Sum of all possibilities Assumption: uniform flow in interrogation area Particle can be matched with a number of candidates Repeat process for other particles, sum up: wrong combinations will lead to noise, but true displacement will dominate If done properly, many will have matches. Some will not. Good PIV maximizes matching images Slide from C. Poelma of TU Delft
Cross-correlation This shifting method can formally be expressed as a cross-correlation: R(s) = I ( 1 x) I ( 2 x + s) dx - I 1 and I 2 are interrogation areas (sub-windows) of the total frames - x is interrogation location - s is the shift between the images Backbone of PIV: -cross-correlation of interrogation areas -find location of displacement peak For digital images, represented as a discrete summation (or equivalent FFT): R(i, j) = $ & %& B x B y k=1 l=1 B x B y k=1 l=1 ( I a (k,l) I a ) I b (k + i,l + j) I b B x ( ) B y ( ) 2 ( I a (k,l) I a ) 2 I b (k + i,l + j) I b k=1 l=1 ' ) () 1 B B B x y 1 Ia = 2 x y B k= 1 l= 1 I a ( k, l)
Cross-correlation peak: mean displacement RC correlation of the mean RF correlation of random fluctuations RD correlation due to displacement
Influence of NI RD (s D ) ~ N I NI = 5 NI = CΔz0 2 DI 2 M0 NI = 10 C Δz0 DI M0 particle concentration light sheet thickness int. area size magnification NI = 25 More particles: better signal-to-noise ratio Unambiguous detection of peak from noise: NI=10 (average), minimum of 4 per area in 95% of areas (number of tracer particles is a Poisson distribution)
Influence of NI NI = 5 NI = 10 NI = 25 PTV: 1 particle used for velocity estimate; error e PIV: error ~ e/sqrt(ni)
Influence of in-plane displacement X,Y-Displacement < quarter of window size ΔX / DI = 0.00 FI = 1.00 0.28 0.64 0.56 0.36 ΔX RD (s D ) ~ N I FI FI (ΔX, ΔY ) = 1 DI 0.85 0.16 ΔY 1 D I
Influence of in-plane displacement Z-Displacement < quarter of light sheet thickness (Δz0) ΔZ / Δz0 = 0.00 FO = 1.00 0.25 0.75 RD (s D ) ~ N I FI FO 0.50 0.50 Δz FO ( Δz ) = 1 Δz0 0.75 0.25
Influence of gradients a M0 Δu Δt Displacement differences < 3-5% of int. area size, DI Displacement differences < Particle image size, dτ a / DI = 0.00 a / dτ = 0.00 R.D. Keane & R.J. Adrian 0.05 0.50 0.10 1.00 0.15 1.50 RD (s D ) ~ NI FI FO FΔ FΔ (a) exp( a2 / dτ2 )
PIV Design Rules image density N I >10 in-plane motion ΔX < ¼ D I out-of-plane motion Δz < ¼ Δz 0 spatial gradients M 0 Δu Δt < d τ Obtained by Keane & Adrian (1993) using synthetic data
Window shifting in-plane motion strongly limits dynamic range of PIV: ΔX < ¼ D I small window size: too much in-plane pair loss
Window shifting in-plane motion strongly limits dynamic range of PIV: ΔX < ¼ D I large window size: too much spatial averaging
Window shifting in-plane motion strongly limits dynamic range of PIV: ΔX < ¼ D I Multi-pass approach: start with large windows, use this result as pre-shift for smaller windows No more in-plane pair loss limitations!
Window shifting example Grid turbulence fixed windows windows at same location matched windows windows at 7px downstream
Window shifting example Vortex ring, decreasing window sizes Raffel, Willert and Kompenhans
PIV Basics: sub-pixel interpolation Ken Kiger (UMD) SEDITRANS summer school on Measurement techniques for turbulent open-channel flows Lisbon, Portugal 2015 With some slides contributed by Christian Poelma and Jerry Westerweel (TU Delft)
Sub-pixel interpolation Maximum in the correlation plane: single-pixel resolution of displacement? But the peak contains a lot more information! Gaussian particle images Gaussian correlation peak (but smeared)
Sub-pixel interpolation ε X = τ r Fractional displacement can be obtained using the distribution of gray values around maximum Example for 3-point Gaussian fit: ln R ln R = 2 ln ln 2ln 1 + 1 ε ( R + R R ) 1 + 1 0
three-point estimators peak centroid parabolic peak fit Gaussian peak fit R+ 1 R 1 ε = R + R + R 1 0 + 1 R 1 R+ 1 ε = 2 2 ( R + R R ) 1 + 1 0 ln R 1 ln R+ 1 ε = 2 2 ( ln R + ln R ln R ) 1 + 1 0 ε balance normalization
Peak locking zig-zag structure, sudden kinks in the flow
Peak locking Histogram of velocities in a turbulent flow centroid Gaussian peak fit centroid estimate Gauss-fit Even with Gaussian peak fit: particle image size too small peak locking (Consider a point particle sampled by discrete pixels)
Sub-pixel accuracy optimal resolution: particle image size: ~2 px Smaller: particle no longer resolved Larger: random noise increase total error bias errors random errors three-point estimators: Peak centroid Parabolic peak fit Gaussian peak fit... d τ / d r Theoretical: 0.01 0.05 px In practice 0.05-0.1 px Main difference: sensitivity to peak locking or pixel lock-in, bias towards integer displacements
Displacement measurement error
Window matching fixed windows matched windows F I ~ 0.75 F I ~ 1 velocity pdf measurement error u 2 C 2 u 2 / C 2 signal noise SNR u 2 4C 2 u 2 1 / 4C 2
Application example: grid-generated turbulence ΔX = 7 px u /U = 2.5% fixed windows matched windows
PIV Basics: validation Ken Kiger (UMD) SEDITRANS summer school on Measurement techniques for turbulent open-channel flows Lisbon, Portugal 2015 With some slides contributed by Christian Poelma and Jerry Westerweel (TU Delft)
Data Validation article lab Spurious or Bad vectors
Spurious vectors Three main causes: - insufficient particle seeding density - in-plane loss-of-pairs, out-of-plane loss-of-pairs - gradients (all above lead to small number of particle image pairs)
Remedies increase N I practical limitations: optical transparency of the fluid two-phase effects image saturation / speckle detection, removal & replacement keep finite N I ( Γ ~ 0.05 ) data loss is small signal loss occurs in isolated points data recovery by interpolation
Detection methods human perception peak height amount of correlated signal peak detectability peak height relative to noise lower limit for SNR residual vector analysis fluctuation of displacement multiplication of correlation planes fluid mechanics continuity fuzzy logic & neural nets
Residual analysis evaluate fluctuation of measured velocity residual ideally: U ref = true velocity Potential reference values: U ref = global mean velocity comparable to 2D-histogram analysis r = U does not take local coherent motion into account probably only works in homogeneous turbulence U ref = local (3 3) mean velocity takes local coherent motion into account very sensitive to outliers in the local neighborhood U ref = local (3 3) median velocity almost identical statistical properties as local mean Strongly suppressed sensitivity to outliers in heighborhood U ref
Example of residual analysis test and sensitivity 4 3 2 5 0 1 6 7 8 0 1 2 3 4 5 6 7 8 2.3 2.2 3.0 3.7 3.1 3.2 2.4 3.5 2.7 2.2 2.3 2.4 2.7 3.0 3.1 3.2 3.5 3.7 Mean 2.9 RMS 0.53 2.3 9.7 3.0 3.7 3.1 3.2 2.4 3.5 2.7 Mean 3.7 2.3 2.4 2.7 3.0 3.1 3.2 3.5 3.7 9.7 RMS 2.29
Median test 1 - Calculate reference velocity: median of 8 neighbors 2 calculate residual: r = u test u ref 3 reject or accept based on threshold value Typical threshold value (prior to 2006): constant or proportional to standard deviation of 8 neighbors problem: residual scales with turbulence or sensitive to contamination
Normalized median test: universal outlier detection Westerweel & Scarano (2005) ExiF 39:1096-1100 Um = Median{Ui i = 1,..., 8} ri = Ui Um rm = Median{ri i = 1,..., 8},, } m U U { i U U 0 m r0 = rm + Alternatives - Iterative approach: label suspect vectors and repeat analysis without them - Find & replace: store 2nd highest, 3rd highest peak and see if these fit in
Interpolation Bilinear interpolation satisfies continuity For 5% bad vectors, 80% of the vectors are isolated Bad vector can be recovered without any problems N.B.: interpolation biases statistics (power spectra, correlation function) Better not to replace bad vectors (use e.g. slotting method)
Overlapping windows Method to increase data yield: Allow overlap between adjacent interrogation areas a Motivation: particle pairs near edges contribute less to correlation result; Shift window so they are in the center: additional, relatively uncorrelated result 50% is very common, but beware of oversampling
A generic PIV program Reduce non-uniformity of illumination; Reflections Median test, Search window Vorticity, interpolation of missing vectors, etc. Data acquisition Image pre-processing PIV cross-correlation Vector validation Post-processing Laser control, Camera settings, etc. Pre-shift; Decreasing window sizes
PIV Software Free PIVware: command line, linux (Westerweel) JPIV: Java version of PIVware (Vennemann) MatPiv: Matlab PIV toolbox (Cambridge, Sveen) URAPIV: Matlab PIV toolbox (Gurka and Liberzon) DigiFlow (Cambridge), PIV Sleuth (UIUC), MPIV, GPIV, CIV, OSIV, Commercial PIVtec PIVview TSI Insight Dantec Flowmap LaVision DaVis Oxford Lasers/ILA VidPIV