You are on page 1of 57

Introduction of Particle Image Velocimetry

Ken Kiger

Burgers Program For Fluid Dynamics


Turbulence School
College Park, Maryland, May 24-27
Slides largely generated by
J. Westerweel & C. Poelma of Technical University of Delft
Adapted by K. Kiger
Introduction
Particle Image Velocimetry (PIV):

Imaging of tracer particles, calculate displacement: local fluid velocity


Frame 1: t = t0

Measurement
section

Light sheet
optics
Frame 2: t = t0 + t

Twin Nd:YAG
laser
CCD camera
Introduction
Particle Image Velocimetry (PIV)
992 32

32
• divide image pair in

1004
interrogation regions
• small region:
~ uniform motion
• compute displacement
• repeat !!!
Introduction
Particle Image Velocimetry (PIV):

Instantaneous measurement of 2 components in a plane

conventional methods particle image velocimetry


(HWA, LDV)

• single-point measurement • whole-field method


• traversing of flow domain • non-intrusive (seeding
• time consuming • instantaneous flow field
• only turbulence statistics

z
Introduction
Particle Image Velocimetry (PIV):

Instantaneous measurement of 2 components in a plane

instantaneous vorticity field particle image velocimetry

• whole-field method
• non-intrusive (seeding
• instantaneous flow field
Example: coherent structures
Example: coherent structures
Turbulent pipe flow
Re = 5300
100×85 vectors
“hairpin”
vortex
Example: coherent structures

Van Doorne, et al.


Overview

PIV components:

- tracer particles
- light source
- light sheet optics Hardware (imaging)
- camera

- measurement settings

- interrogation Software (image analysis)


- post-processing
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

NI << 1

particle tracking velocimetry

high image density

NI >> 1

particle image velocimetry


Evaluation at higher density
High NI : no longer possible/desirable to follow individual tracer particles

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
Statistical estimate of particle motion
 Statistical correlations used to find 1-d image @ t=t0
average particle displacement
Bx By

∑ ∑ (I (k,l) − I )(I (k + i,l + j) − I )


a a b b

R(i, j) = k=1 l=1


1
⎡Bx By
2
Bx By
2
⎤2
⎢∑ ∑ ( Ia (k,l) − Ia ) ∑ ∑ ( Ib (k + i,l + j) − Ib ) ⎥

⎣k=1 l=1 k=1 l=1 ⎥⎦ 1-d image @ t=t1
Bx By
1

Ia 
Bx B y
 I
k 1 l 1
a (k , l )

Cross-correlation
1-D cross-correlation example

Ia(x) normalized
Ia Ib(x+x) normalized
Ia(x)*Ib(x+x)

Ib

Bx

∑ (I (k) − I )(I (k + i) − I )
a a b b

R(i) = k=1
1
⎡B x 2
Bx
2
⎤2
⎢∑ ( Ia (k) − Ia ) ∑ ( Ib (k + i) − Ib ) ⎥
⎣k=1 k=1 ⎦
Finding the maximum displacement
-Shift 2nd window with respect to the first

Typically 16x16 or 32x32 pixels

- Calculate “match”
Bx By

∑ ∑ (I (k,l) − I )(I (k + i,l + j) − I )


a a b b

Good indicator: R(i, j) =


k=1 l=1
1
⎡Bx By
2
Bx By
2

2
⎢∑ ∑ ( Ia (k,l) − Ia ) ∑ ∑ ( Ib (k + i,l + j) − Ib ) ⎥
⎢⎣k=1 l=1 k=1 l=1 ⎥

- Repeat to find best estimate 1 Bx By


Ia 
Bx B y
 I
k 1 l 1
a (k , l )
Finding the maximum displacement
-Shift 2nd window with respect to the first

Typically 16x16 or 32x32 pixels

- Calculate “match”
Bx By

∑ ∑ (I (k,l) − I )(I (k + i,l + j) − I )


a a b b

Good indicator: R(i, j) =


k=1 l=1
1
⎡Bx By
2
Bx By
2

2
⎢∑ ∑ ( Ia (k,l) − Ia ) ∑ ∑ ( Ib (k + i,l + j) − Ib ) ⎥
⎢⎣k=1 l=1 k=1 l=1 ⎥

- Repeat to find best estimate 1 Bx By


Ia 
Bx B y
 I
k 1 l 1
a (k , l )

Bad match: sum of product of intensities low


Finding the maximum displacement
-Shift 2nd window with respect to the first

Typically 16x16 or 32x32 pixels

- Calculate “match”
Bx By

∑ ∑ (I (k,l) − I )(I (k + i,l + j) − I )


a a b b

Good indicator: R(i, j) =


k=1 l=1
1
⎡Bx By
2
Bx By
2

2
⎢∑ ∑ ( Ia (k,l) − Ia ) ∑ ∑ ( Ib (k + i,l + j) − Ib ) ⎥
⎢⎣k=1 l=1 k=1 l=1 ⎥

- Repeat to find best estimate 1 Bx By


Ia 
Bx B y
 I
k 1 l 1
a (k , l )

Good match: sum of product of intensities high

 Can be implemented as 2D FFT for digitized data


o Impose periodic conditions on interrogation region…causes bias error if not treated
properly.
Cross-correlation
This “shifting” method can formally be expressed as a cross-correlation:

R(s)   I1  x  I 2  x  s  dx

- I1 and I2 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
Cross-correlation

peak: mean
displacement

RC
RF
correlation
correlation of mean & RD
of the mean
random fluctuations correlation due
to displacement
Influence of NI
C particle concentration
Cz0 2 z0 light sheet thickness
RD (s D ) ~ N I  NI  2
DI
M0 DI int. area size
M0 magnification

NI = 5 NI = 10 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 0.28 0.56 0.85


FI = 1.00 0.64 0.36 0.16
 X  Y 

RD (s D ) ~ N I FI FI (X , Y )  1  1  
DI  DI 
 
Influence of out-of-plane displacement
Z-Displacement
<
quarter of light sheet thickness
(z0)

Z / z0 = 0.00 0.25 0.50 0.75


FO = 1.00 0.75 0.50 0.25
z
RD (s D ) ~ N I FI FO  FO ( z )  1 
z0
Influence of gradients

Displacement differences <


a  M0ut 3-5% of int. area size, DI

Displacement differences <


Particle image size, d

a / DI = 0.00 0.05 0.10 0.15


a / d = 0.00 0.50 1.00 1.50

RD (s D ) ~ N I FI FO F  F ( a)  exp(  a 2 / d2 )
R.D. Keane & R.J. Adrian
PIV “Design rules”

• image density NI >10


• in-plane motion |X| < ¼ DI
• out-of-plane motion |z| < ¼ z0
• spatial gradients M0ut < d

Obtained by Keane & Adrian (1993) using synthetic data


Window shifting

• in-plane motion |X| < ¼ DI

strongly limits dynamic range of PIV

large window size: too much spatial averaging


Window shifting

• in-plane motion |X| < ¼ DI

strongly limits dynamic range of PIV

small window size: too much in-plane pair loss


Window shifting

• in-plane motion |X| < ¼ DI

strongly limits dynamic range of PIV

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 matched windows

windows at same location windows at 7px ‘downstream’


Window shifting: Example
Vortex ring, decreasing window sizes

Raffel,
Willert and
Kompenhans
Sub-pixel accuracy

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 accuracy

 r
 X 

Fractional displacement can be obtained using


the distribution of gray values around maximum
three-point estimators
R1  R1
• peak centroid 
R1  R0  R1

R1  R1

• parabolic peak fit 2 R1  R1  2 R0 

ln R1  ln R1
• Gaussian peak fit 
2 ln R1  ln R1  2 ln R0 

balance

normalization
Peak locking

“zig-zag” structure, sudden “kinks” in the flow


Sub-pixel Interpolation Errors
0.3

• Accuracy depends on:


Polynomial fit
Gaussian fit
Pixel

Interpolation error (pixels)


0.2

Radius
– particle image size 0.1

– noise in data (seeding density, camera


0
R = 0.5
noise)
-0.1

-0.2

– shear rate -0.3


-0.5 -0.25 0 0.25 0.5

• Can exhibit “peak locking” Actual peak location (pixels)

0.3
– Interpolation of peak is biased towards a Polynomial fit
Gaussian fit

Interpolation error (pixels)


0.2
symmetric data distribution (Integer and 1/2 0.1
integer peak locations) 0
R = 1.0
– Polynomials exhibit strong locking when -0.1

particle diameter is small -0.2

– Gaussian is most commonly used -0.3


-0.5 -0.25 0 0.25
Actual peak location (pixels)
0.5

– Splines are very robust, but expensive to 0.3

calculate Polynomial fit


Gaussian fit

Interpolation error (pixels)


0.2

0.1

• See Particle Image Velocimetry, by Raffel,


0
R = 1.5
-0.1

Willert, and Kompenhans, Springer-Verlag, -0.2

1998. -0.3
-0.5 -0.25 0 0.25 0.5
Actual peak location (pixels)
Peak locking

Histogram of velocities in a turbulent flow

centroid Gaussian peak 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: bias errors random errors


particle image size: ~2 px total
error
Smaller: particle no longer resolved
Larger: random noise increase

“three-point” estimators:
d / dr

Peak centroid
Theoretical: 0.01 – 0.05 px
Parabolic peak fit In practice 0.05-0.1 px
Gaussian peak fit
...
Main difference: sensitivity to “peak locking”
or “pixel lock-in”, bias towards integer displacements
displacement measurement error
window matching

fixed windows matched windows

FI ~ 0.75 FI ~ 1

velocity pdf

measurement
error

u’2 signal u’2

C2 noise 4C2u’2

u’2 / C2 SNR 1 / 4C2


application example:
grid-generated turbulence

X = 7 px u’/U = 2.5%
fixed windows matched windows
Data Validation

“article” “lab”

Spurious or “Bad” vectors


Spurious vectors

Three main causes:


- insufficient particle-image pairs
- in-plane loss-of-pairs, out-of-plane loss-of-pairs
- gradients
Effect of tracer density

NNII=80
=11
=20
=45
= 153
Remedies

• increase NI
• practical limitations:
• optical transparency of the fluid
• two-phase effects
• image saturation / speckle

• detection, removal & replacement


• keep finite NI (  ~ 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: Uref = true velocity

r  U  U ref
reference values:
• Uref = global mean velocity
• comparable to 2D-histogram analysis
• does not take local coherent motion into account
• probably only works in homogeneous turbulence
• Uref = local (3×3) mean velocity
• takes local coherent motion into account
• very sensitive to outliers in the local neighborhood
• Uref = local (3×3) median velocity
• almost identical statistical properties as local mean
• Strongly suppressed sensitivity to outliers in heighborhood
Example of residual test
Mean
4 3 2 0 1 2 3 4 5 6 7 8 2.9
2.3 2.2 3.0 3.7 3.1 3.2 2.4 3.5 2.7
5 0 1
RMS
6 7 8 0.53
2.2 2.3 2.4 2.7 3.0 3.1 3.2 3.5 3.7

Mean
3.7
2.3 9.7 3.0 3.7 3.1 3.2 2.4 3.5 2.7

RMS
2.29
2.3 2.4 2.7 3.0 3.1 3.2 3.5 3.7 9.7

Standard mean and r.m.s. are very sensitive to bad data


contamination… need robust measure of fluctuation
Median test

1 - Calculate reference velocity: median of 8 neighbors


1 2 3
uref = median( u1,u2 ,...u8 )
4 0 5 2 – calculate residuals:
ri = ui − uref
6 7 8

3 – Normalize target residual by:u median(r i) + 
* 0 − uref
r0 =
€ median(ri ) + ε

ε =0.1 and r0* > 2


4 – Robust measure found for:

Westerweel & Scarano, 2005


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

Laser control,
Data acquisition Camera settings, etc.

Reduce non-uniformity Image pre-processing


of illumination; Reflections
PIV cross-correlation
Pre-shift; Decreasing
window sizes
Vector validation
Median test,
Search window
Post-processing
Vorticity, interpolation
of missing vectors, etc.
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

Particle Motion: tracer particle

• Equation of motion for spherical particle:


  dv 
dv p 1  du   g  
 3D u  v p   m f  
  du
mp p
  mf  m p 1  g
dt 2  dt dt  dt   
 p 
Inertia Viscous drag Added mass Pressure buoyancy
gradient
– Where
πD3
mp = ρ p , the particle mass
6
πD3
mf = ρ f , fluid mass of same volume as particle
6
D = particle diameter
μ = fluid viscosity
r
u = fluid velocity
r
v p = particle velocity
ρ g = fluid density
ρ p = particle material density

– Neglect: non-linear drag (only really needed for high-speed flows), Basset
history €term (higher order effect)
Simple thought experiment

• Lets see how a particle responds to a step change in


velocity
– Only consider viscous drag u, vp
r
dv p r r ⎧0 for t < 0 U
mp = 3πμD( u − v p ) u=⎨
dt ⎩U for t ≥ 0

dv p 18μ 1
= (U − v ) = (U − v p )
dt ρ p D2
p
τp t
€ €
1 1
v ′p + vp = U
€ τp τp

v p = (v p ) particular + (v p ) homogeneous = U + C1 exp(− t τ p )


v p = U [1− exp(− t τ p )]

Particle Transfer Function
• Useful to examine steady-state particle response to 1-D
oscillating flow of arbitrary sum of frequencies
– Represent u as an infinite sum of harmonic functions
– Neglect gravity (DC response, not transient)
∞ ∞
du( t )
u( t ) = ∫Λ f (ω ) exp(iωt ) dω
dt
= ∫ iωΛ f (ω ) exp(iωt ) dω
0 0
∞ ∞
dv p ( t )
v p (t) = ∫Λ p (ω ) exp(iωt ) dω
dt
= ∫ iωΛ p (ω ) exp(iωt ) dω
0 0
€ €
2m p dv p m f m p ⎡du dv p ⎤ m f m p du
€ = 2( u − v p ) + € ⎢ − ⎥+ 2
3πμD dt m p 3πμD ⎣ dt dt ⎦ m p 3πμD dt


ρ p D2 ∞ ∞
ρ f ρ p D2
∫ 2 18μ Λ p iω exp(iωt)dω = ∫ 2( Λ f − Λ p ) exp(iωt )dω + ∫ ρ p 18μ
iω [ 3Λ f − Λ p ] exp(iωt )dω
0 € 0 0

τp ρ p D2ω ρf
2iStΛ p = 2( Λ f − Λ p ) + iγSt [ 3Λ f − Λ p ] St = = γ=
€ τf 18μ ρp
Particle Transfer Function

• This can be rearranged:

r ⎡ ∗ ⎤
12
vp Λp Λp ⎡A 2 + B 2 ⎤1 2
r =⎢ ∗ ⎥
=⎢ 2 ⎥ 2
u Λ Λ
⎣ f f⎦ ⎣ A + 1 ⎦ A
St  2   
3
⎡Im( Λ /Λ ) ⎤ ⎡A(1− B) ⎤ B
φ =tan ⎢
−1 p f
⎥ = tan−1⎢ 2 ⎥ 2
€ ⎢⎣Re( Λ p /Λ f ) ⎥
⎦ ⎣ A + B ⎦

• Examine

– Liquid in air, gas in water, plastic in water
Liquid particles in Air

– Liquid drops in air require St~0.3 for 95% fidelity (1 m ~ 15 kHz)


– Size relatively unimportant for near-neutrally buoyant particles
– Bubbles are a poor choice: always overrespond unless quite small

You might also like