Transcript Lecture30

Students are encouraged to attend the class.
You may not be able to understand by just reading the lecture notes.
Measurements in Fluid Mechanics
058:180:001 (ME:5180:0001)
Time & Location: 2:30P - 3:20P MWF 218 MLH
Office Hours: 4:00P – 5:00P MWF 223B-5 HL
Instructor: Lichuan Gui
[email protected]
http://lcgui.net
Lecture 30. Central Difference Interrogation
2
Correlation-based Interrogation w/o Window Shift
Gray value distribution in a PIV recording pair
G1 x, y  , G2 x, y 
g1(i,j)
Recording 1
2nd
window shifted by Sws=0
g2(i,j)
Recording 2
Correlation-based Interrogation w/o Window Shift
Evaluation samples of MN pixels at point (xm,ym)
M
N


g1 i, j   G1  xm 
 i , ym   j 
2
2


M
N


g 2 i, j   G2  xm 
 i, ym   j 
2
2


g1(i,j)
Recording 1
2nd
window shifted by Sws=0
g2(i,j)
Recording 2
for i  1,2,  , M and j  1,2,  , N
Correlation-based Interrogation w/o Window Shift
M
Evaluation Function
N
 m, n    g1 i, j   g 2 i  m, j  n 
i 1 j 1
g1(i,j)
(m,n)
Recording 1
2nd
window shifted by Sws=0
g2(i,j)
Recording 2
Correlation-based Interrogation w/o Window Shift
Particle image displacement determined by position of the maximal function value

S  m* , n*

g1(i,j)
(m,n)
Recording 1
2nd
(m*,n*)
window shifted by Sws=0
g2(i,j)
Recording 2
Correlation-based Interrogation w/o Window Shift
Compared to correlation tracking:
Problems:
– higher evaluation speed
– error dependent on displacement
– insensitive to brightness
– evaluation bias
g1(i,j)
(m,n)
Recording 1
2nd
S
window shifted by Sws=0
g2(i,j)
Recording 2
Forward Difference Interrogation (FDI)
Gray value distribution in a PIV recording pair
Interrogation window shift
Sws  {xs , y s }
g1(i,j)
Recording 1
2nd
window shifted by Sws=S
S
g2(i,j)
Recording 2
G1 x, y  , G2 x, y 
Forward Difference Interrogation (FDI)
Evaluation samples of MN pixels at point (xm,ym)
M
N


g1 i, j   G1  xm 
 i , ym   j 
2
2


g1(i,j)
Recording 1
2nd
window shifted by Sws=S
S
f2(i,j)
Recording 2
M
N


f 2 i, j   G2  xm  xs 
 i, ym  y s   j 
2
2


Forward Difference Interrogation (FDI)
M
Evaluation Function
N
 m, n    g1 i, j  f 2 i  m, j  n 
i 1 j 1
g1(i,j)
(m,n)
Recording 1
2nd
window shifted by Sws=S
S
f2(i,j)
Recording 2
Forward Difference Interrogation (FDI)

S  xs  m* , ys  n*
Particle image displacement
g1(i,j)
(m,n)
Recording 1
2nd
window shifted by Sws=S
(m*,n*)
f2(i,j)
Recording 2

Forward Difference Interrogation (FDI)
Compared to correlation w/o shift:
– multi-pass (iterated)
– higher reliability
– lower evaluation error
– periodic error distribution (1 pixel)
g1(i,j)
(m,n)
Recording 1
2nd
window shifted by Sws=S
S‘
g2(i,j)
Recording 2
S = Sws+S‘
Forward Difference Interrogation (FDI)
Typical curvature flow
Forward Difference Interrogation (FDI)
Interrogation point (xm,ym)
(xm,ym)
Forward Difference Interrogation (FDI)
Flow direction at evaluation point
(xm,ym)
Forward Difference Interrogation (FDI)
True velocity to be determined (So)
(xm,ym)
So
Forward Difference Interrogation (FDI)
Interrogation window in the first recording g1(i,j)
(xm,ym)
g1(i,j)
So
Forward Difference Interrogation (FDI)
Matched image pattern in the second recording f2(i,j)
(xm,ym)
g1(i,j)
So
f2(i,j)
Forward Difference Interrogation (FDI)
FDI interrogation result (S)
(xm,ym)
g1(i,j)
So
S
f2(i,j)
Forward Difference Interrogation (FDI)
FDI interrogation bias error ()
(xm,ym)
g1(i,j)
So
So
S
S

f2(i,j)
Forward Difference Interrogation (FDI)
FDI interrogation position deviation (xm-x’m,ym-y’m)
(xm,ym)
g1(i,j)
So
So
S
Adjusted position (x’m,y’m)
S

g2(i,j)
Central Difference Interrogation (CDI)
Gray value distribution in a PIV recording pair
G1 x, y  , G2 x, y 
Interrogation window shift
Sws  {xs , ys } , Sws1  { xs / 2, ys / 2} , Sws 2  {xs / 2, ys / 2}
Sws1= -S/2
Recording 1
Sws2= S/2
Recording 2
f1(i,j)
S‘
f2(i,j)
S = Sws+S‘
Central Difference Interrogation (CDI)
Evaluation samples of MN pixels at point (xm,ym)
x M
y
N


f1 i, j   G1  xm  s 
 i, ym  s   j 
2
2
2 2


Sws1= -S/2
Recording 1
Sws2= S/2
Recording 2
f1(i,j)
S‘
f2(i,j)
x M
y
N


f 2 i, j   G2  xm  s 
 i, ym  s   j 
2
2
2 2


Central Difference Interrogation (CDI)
M
Evaluation Function
N
 m, n    f1 i, j  f 2 i  m, j  n 
i 1 j 1
Sws1= -S/2
f1(i,j)
(m,n)
Recording 1
Sws2= S/2
Recording 2
S‘
f2(i,j)
Central Difference Interrogation (CDI)

S  xs  m* , ys  n*
Particle image displacement
Sws1= -S/2
f1(i,j)
(m,n)
Recording 1
Sws2= S/2
Recording 2
(m*,n*)
f2(i,j)

Central Difference Interrogation (CDI)
True velocity to be determined (So)
(xm,ym)
So
Central Difference Interrogation (CDI)
Window shift in the first recording (-So/2)
(xm,ym)
-0.5So
So
Central Difference Interrogation (CDI)
Interrogation window in the first recording f1(i,j)
f1(i,j)
(xm,ym)
-0.5So
So
Central Difference Interrogation (CDI)
Matched image pattern in the second recording f2(i,j)
f1(i,j)
(xm,ym)
So
f2(i,j)
Central Difference Interrogation (CDI)
CDI interrogation result (S)
f1(i,j)
(xm,ym)
S
So
f2(i,j)
Central Difference Interrogation (CDI)
CDI interrogation bias error ()
f1(i,j)
(xm,ym)
S
So
So
S

f2(i,j)
Central Difference Interrogation (CDI)
CDI interrogation position deviation (xm-x’m,ym-y’m)
f1(i,j)
(xm,ym)
Adjusted position (x’m,y’m)
S
So
So
S

f2(i,j)
Central Difference Interrogation (CDI)
– smaller position deviation
– smaller curvature flow bias
– same computation speed
Compare to FDI
f1(i,j)
(xm,ym)
Adjusted position (x’m,y’m)
S
So
So
S

f2(i,j)
Compare FDI and CDI in a four-roll mill test
Experimental setup and flow velocity distribution
Velocity field
Top view
5
4
3
2
y [mm]
1
0
-1
-2
-3
-4
-5
0.05 mm/s
-5
-4
-3
-2
-1
0
1
x [mm]
2
3
4
5
Compare FDI and CDI in a four-roll mill test
PIV recording frames
Animated PIV recordings
Overlapped PIV recordings
Compare FDI and CDI in a four-roll mill test
FDI and CDI evaluation errors
0.5
0.5
Bias error
Precision error
Total error
0.4
FDI
0.3
0.2
0.1
0
0
(a)
RMS errors [pixel]
RMS errors [pixel]
0.4
Bias error
Precision error
Total error
CDI
0.3
0.2
0.1
100
200
300
400
Radius [pixel]
500
600
0
0
(b)
100
200
300
400
Radius [pixel]
500
600
References
•Westerweel J, Dabiri D, Gharib M (1997) The effect of a discrete window offset on the accuracy of cross-correlation
analysis of digital PIV recordings. Exp Fluids 23:20–28
•Wereley ST Meinhart CD (2001) Second-order accurate particle image velocimetry. Exp Fluids 31:258–268
•Gui L and Wereley ST (2002) A correlation-based continues window shift technique for reducing the peak locking effect in
digital PIV image evaluation. Exp. Fluids 32: 506-517
•Wereley ST and Gui L (2003) A correlation-based central difference image correction (CDIC) method and application in a
four-roll-mill flow PIV measurement. Exp. Fluids 34, 42-51
Matlab program for FDI&CDI
Test with iterated window shift
clear;
A1=imread('lecture30-image01.bmp');
A2=imread('lecture30-image02.bmp');
G1=img2xy(A1);
G2=img2xy(A2);
Mg=64; % interrogation grid width
Ng=64; % interrogation grid height
M1=64; % initial window width
N1=64; % initial window height
M2=32; % final window width
N2=32; % final window height
NN=20; % iteration number
[nx ny]=size(G1);
row=ny/Mg-1;
col=nx/Ng-1;
sr=12;
for i=1:col
for j=1:row
U_FDI(i,j)=0; % initial velocity
V_FDI(i,j)=0;
U_CDI(i,j)=0;
V_CDI(i,j)=0;
end
end
Simulated flow:
𝑢 = 10
𝑥 − 512
512
𝑣 = −10
𝑦 − 512
512
for iteration=1:NN
plot(D_FDI,'r*-')
M=(iteration-1)*(M2-M1)/(NN-1)+M1;
hold on
N=(iteration-1)*(N2-N1)/(NN-1)+N1;
plot(D_CDI,'b*-')
clear g1 g2 C m n;
hold off
for i=1:col
for j=1:row
x=i*Mg;
y=j*Ng;
X(i,j)=x;
Y(i,j)=y;
% FDI --------------------------------------------wsx=U_FDI(i,j);
wsy=V_FDI(i,j);
g1=sample3(G1,M,N,x,y);
g2=sample3(G2,M,N,x+wsx,y+wsy);
[C m n]=correlation(g1,g2);
[cm vx vy]=peaksearch(C,m,n,sr,0,0);
U_FDI(i,j)=vx+wsx;
V_FDI(i,j)=vy+wsy;
% CDI ---------------------------------------------wsx=U_CDI(i,j);
wsy=V_CDI(i,j);
g1=sample3(G1,M,N,x-wsx/2,y-wsy/2);
g2=sample3(G2,M,N,x+wsx/2,y+wsy/2);
[C m n]=correlation(g1,g2);
[cm vx vy]=peaksearch(C,m,n,sr,0,0);
U_CDI(i,j)=vx+wsx;
V_CDI(i,j)=vy+wsy;
end
end
dx=U_FDI+10*(X-512)/512;
dy=V_FDI-10*(Y-512)/512;
D_FDI(iteration)=sqrt(mean(mean(dx.^2+dy.^2))); % RMS error of FDI
dx=U_CDI+10*(X-512)/512;
dy=V_CDI-10*(Y-512)/512;
D_CDI(iteration)=sqrt(mean(mean(dx.^2+dy.^2))); % RMS error of CDI
end
-*- RMS error of FDI
-*- RMS error of CDI
Test image pair:
http://lcgui.net/ui-lecture/lecture30/lecture30-image01.bmp
http://lcgui.net/ui-lecture/lecture30/lecture30-image02.bmp