4th International Symposium on Particle Image Velocimetry Göttingen, Germany, September 17-19, 2001 PIV’01 Paper 1010 Proposals on the design of 2D multigrid PIV systems: application of dedicated weighting functions and Symmetric Direct Correlation. A. Lecuona, J. Nogueira and P. A. Rodríguez Abstract Multigrid PIV is a path in the search of high-resolution systems. It follows an iterative scheme that uses the information of initial evaluations to adapt the system to obtain better ones. This is performed by reducing the size of the interrogation windows and by redefining the location in the PIV images. In this procedure, two sources of error can significantly affect the final measurement quality. One is related to the large interrogation windows while the other is related to the small ones. For large interrogation windows, the error coming from the spatial frequency response can be changed in form and reduced, allowing this improvement substantially better iterative procedures. For small interrogation windows, the error coming from the truncation of particles at the interrogation window borders can be much reduced. This is possible through the implementation of specific algorithms. The proper combination of both improvements can clearly enhance the performance of Multigrid systems. Due to the complementarity of the situations in which these two sources of error appear, the discussion covers topics of interest for any correlation PIV system. This paper gives details on both sources of error and proposes ways to reduce them. Both studies include tests in synthetic and real PIV images. 1 Introduction PIV has been established as an important experimental tool for research as well as for industry. Basic Particle Image Velocimetry is able to describe 2 components of the velocity along a two-dimensional domain (2D 2C PIV). Nevertheless, in many cases there is still a gap between the information contained in the images and what is extracted from them by current PIV systems. Recently, some of the effort on the development of the technique is focused on the extraction of all the information obtainable from the images, including the development of super-resolution or high-resolution systems. Generally, all these advanced systems have a core algorithms characterized for being iterative. This means that the information from initial evaluations is used to tune or adapt the system and obtain better ones. Focusing on correlation PIV, two main branches for advanced 2D algorithms can be mentioned: LFCPIV and Multigrid PIV. Information about the former can be found in Nogueira, Lecuona and Rodríguez (1999) and Rodríguez, Nogueira and Lecuona (2001 in this meeting proceedings). About Multigrid PIV, information can be found in Soria (1996), Hart (1999), Lecordier et al. (1999), Scarano and Riethmuller (2000) as well as in many others. This paper is focused in launching some proposals that can increase the accuracy of Multigrid PIV. In this technique, the iterative cycle is used for two purposes: 1. To reduce the size of the interrogation windows thus increasing the spatial resolution. This is at the expense of probably a lower signal to noise ratio (s/n) and involving a higher measurement uncertainty. The drawbacks are specially relevant for the windows small enough to approach the limits of PIV. At intermediate steps progression towards smaller interrogation windows tries not only to increase the spatial resolution, but also to increase s/n. This eventually brings an optimum window size. Using large windows, the dispersion of displacements within the window leads to a low s/n. If they are too small, the signal contained could be not sufficient. 2. To redefine the interrogation windows location in the PIV images, using the previously measured displacement field. This is in order to diminish the displacement of particles between correlating windows and thus augment s/n. The iterative attribute of Multigrid systems is fully confirmed when there is a decision point to repeat previous interrogations with a different setup and the same window size. This is so also when the original images are modified compensating the deformations to improve s/n and the interrogation repeated. Otherwise, the system is just progressive. A. Lecuona, J. Nogueira, P. A. Rodríguez. Universidad Carlos III de Madrid, Madrid, Spain Correspondence to: Prof. Antonio Lecuona, Departamento de Ingeniería Mecánica. Universidad Carlos III de Madrid C/ Butarque 15. 28911, Leganés. Madrid, Spain, E-mail: lecuona@ing.uc3m.es 1 PIV’01 Paper 1010 The proposals reported in this paper will cover large as well as small windows phases. Consequently, this paper has two main sections (sections 2 and 3) where the topic of respectively large and small windows will be discussed. 2 Errors associated to iterative PIV with large windows. It is evident that an interrogation window mixes the particle displacements field features that are contained in it. This is a fact that cannot be avoided. Nevertheless, the way in which these small-scale features are mixed can generate a qualitative difference in the final output. 2.1 Small scales mixing in usual correlation PIV. The correlation function does not differentiate the position of individual particles within the interrogation window. Consequently, each particle contributes in an identical way to the correlation peak. The build up of a correlation peak is the result of the aggregation of a certain number of particle peaks of similar displacement. Thus, the height of the resulting peak is related to the number of particles. Other effects that shape the correlation peak are differences in particle diameter and intensity and the presence of a small dispersion in the displacements. These considerations imply that the measurement is a weighted average of a group of particle with similar displacements, and it is usually biased toward the most frequent particle displacement within the window. The so obtained measurement has to be associated to a point in the PIV measurement plane. This point is usually the center of the interrogation window. For certain spatial wavelengths, like the one represented by the sinusoidal displacement field, s(x,y), depicted in figure 1a, this measured displacement, is opposite to that at the center of the window. Other frequencies have the same effect. In a Multigrid system, this effect originates an offset of the next step interrogation window in the opposite direction to what corresponds to its center, thus reducing the s/n in the following step and eventually leading to a spurious vector or outlier. To generalize the idea depicted in figure 1a, figure 1b presents the PIV amplitude response, r, to 1D sinusoidal fields of different spatial wavelengths, λ. The plot also differentiates among different window sizes. This figure is just an idealization because the real value of r in a PIV depends on more parameters than just the frequency, as commented before. However, the zones where r < 0 (that corresponds to the phenomenon depicted in figure 1a) are statistically fully representative. r < 0 corresponds to a π phase change, meaning a reversal in output. This response to different wavelengths leads to draw conclusions based on the Fourier spatial frequency decomposition of the displacement field. The main drawback of such an analysis is the sometimes non-linear character of the PIV peak construction and detection process, just above introduced, which signifies a more complex behavior than the inherent linear character of the Fourier analysis. Nevertheless, during the multipass process of iterative PIV systems the statistical behavior is similar, in most cases, to the conclusions that can be drawn from a Fourier analysis, at least qualitatively. This will be shown in the next subsection. Apart from the paradigm of Fourier decomposition, it has to be to keep in mind that what is presented in figure 1 will happen for any particle displacement distribution having a similar shape. 1.2 1.0 16 pixels window side 0.8 32 pixels window side 0.6 r 64 pixels window side 0.4 0.2 ⇒ 0.0 Displacement field, s(x,y). −0.2 Measured displacement −0.4 ∞ a b 64.00 32.00 21.33 16.00 12.80 λ (pixels) 10.67 9.14 8.00 Fig. 1. a) Example of measurement error in the interrogation window of a conventional PIV system containing a single high spatial frequency in the displacement field. b) Amplitude frequency response r as a function of 1D spatial wavelength λ. The intervals with r < 0 indicate where the effect depicted in figure 1a is present. (Note that the scale of λ is not linear; actually, it corresponds to a linear scale in frequency). 2 PIV’01 Paper 1010 2.2 Effects of negative frequency response in Multigrid PIV. One of the effects of the frequency intervals where r < 0, as commented in the previous section, is a shift of the interrogation window in the opposite direction to what should be performed, thus reducing the s/n and eventually leading to a spurious vector or outlier. This is more relevant when the size of the interrogating window is reduced in the next interrogation step. Another effect is related to the use of compensation of the particle pattern deformation together with the Multigrid process. This seems to be the recent evolution of the Multigrid systems, following the works of Fincham and Delerce (2000), Scarano and Riethmuller (2000). In these cases the intervals with r < 0 establish that if a correction of the particle pattern is attempted with this erroneous information, the deformation increases instead of decreasing. A diverging process may be triggered if successive iterations are implemented. The basic condition for the unstable growth is that the grid sampled displacement field contains the required (r < 0) frequencies. Following figure 1b and taking into account the Nyquist criteria, the grid sampled displacement field will contain unstable frequencies only if the grid node spacing, ∆, is smaller than half the square interrogation window side length F. To illustrate about this behavior, a pair of synthetic images of a field with uniform displacement s = 3.6 pixels, uniform particle diameter d = 2 pixels and average particle separation δ = 1.4 pixels were analyzed. The results are plotted in figure 2. These synthetic images contain absolutely no frequencies related to the instability but the noise due to discretization of gray levels. It can be seen that a Multigrid system with compensation of the particle pattern deformation, iterating with F = 16 pixels and ∆ = 8 pixels, do not show divergence after 45 iterations. The same system with ∆ = 4 pixels shows it clearly. Since unstable frequencies are not contained in the displacement field, the divergence, although explosive, only shows up after a substantial number of iterations. This can be observed in figure 2. Evolution of error with iterations 0.7 Multigrid PIV with compensarion of part. pattern and no weigh. func. (F = 16, ∆ = 4) rms(e ) (pixels) 0.6 0.5 Multigrid PIV with compensarion of part. pattern and no weigh. func. (F = 16, ∆ = 8) 0.4 0.3 0.2 0.1 0.0 1 5 9 13 17 21 25 29 33 37 41 45 Number of iterations Fig. 2. Example of divergence for some systems with compensation of the particle pattern deformation. In order to further check that this instability is due to the intervals with r < 0, some test were performed with real images. The test consisted in checking the frequency domain of the measured displacements after several iterations. The first frequencies that diverged in these situations were the ones predicted, this is, large negative values for r. 2.2 Avoidance of negative frequency response. As stated in the beginning of Section 2, the mixing of small features is unavoidable. However, the way this mixing happens can be modulated. One way to do this is to apply a weighting function on the gray levels of the interrogation window. A weighting function that avoids r < 0 is depicted in figure 3 as expression (1). 3 PIV’01 Paper 1010 8-9 7-8 6-7 5-6 4-5 3-4 2-3 1-2 0-1 0.50 ξ υ 2 ( ξ ,η ) = 9 4 F 2 −4 η ξ + 1 4 F F 2 −4 η + 1 (1) F 0.25 υ2 0.00 -0.25 -0.50 -0.25 0.00 0.25 ξ /F η /F -0.50 0.50 Fig. 3. Weighting function designed to avoid negative frequency responses. ξ and η are coordinates with origin at the center of the interrogation window and F is the length of its side. For more details see Nogueira, Lecuona and Rodríguez (1999). Using this weighting function the correlation coefficient computation would follow expression (2). In this situation, the results equivalent to those depicted in figure 1 are depicted in figure 4. In general, the avoidance of negative frequency response allows obtaining a correctly oriented displacement at the center of the interrogation window in cases like the one depicted in figure 4a. This would allow for correct shifting of interrogation windows in further iterations and would avoid the instability of a system with compensation of the particle pattern deformation. This last point has been checked in synthetic as well as in real images. As an example, the LFCPIV method that uses the proposed weighting can be mentioned. It gives a rms of the error ≈ 0,03 pixels in the case of figure 2 and after 45 iterations. F/2 Clm = ∑υ( ξ ,η ) f ( ξ ,η ) ⋅ υ( ξ ,η )g( ξ + l ,η + m ) ξ ,η =− F / 2 F/2 F/2 ξ ,η =− F / 2 ξ ,η = −F / 2 (2) ∑υ 2( ξ ,η ) f 2( ξ ,η ) ∑υ 2( ξ ,η )g 2( ξ + l ,η + m ) 1.2 1.0 0.8 64 pixels window side weighted with expresion (1) 0.6 r 0.4 0.2 ⇒ 0.0 Displacement field, s(x,y). −0.2 Measured displacement −0.4 ∞ a b 64.00 32.00 21.33 16.00 12.80 λ (pixels) 10.67 9.14 8.00 Fig. 4. a) Example of measurement in an interrogation window containing a single high spatial frequency in the displacement field after the application of the weighting function of expression (1). b) Frequency response as a function of spatial 1D wavelength using the same weighting function. (Note that the scale of λ is not linear; actually, it corresponds to a linear scale in frequency). Unfortunately, the application of a weighting function induces some erroneous slip in the measurement (Nogueira, Lecuona and Rodriguez, 1999). This slip is larger with smaller windows, making inadvisable its use for windows smaller than 32 pixels. 4 PIV’01 Paper 1010 2.3 Summary of considerations and performance check. The following table shows the situation in relation to the negative frequency response error: No weighting + ∆ < F/2 No weighting + ∆ > F/2 Weighted (F > 32) + any ∆ Multigrid PIV with window r < 0 ⇒ reduction of s/n ratio for shift further iterations r < 0 ⇒ reduction of s/n ratio r > 0 Multigrid PIV with r < 0 ⇒ divergent error (if several compensation of the particle iterations are performed with the pattern deformation. same unstable freq.) r < 0 ⇒ reduction of s/n ratio r > 0 and no for further iterations for further iterations instability. To check the importance of the negative frequency response errors when only a few iterations are carried out, some performance checks were run. The synthetic images selected for the test had δ = 4.5 pixels (i.e. 4/(π·δ2) ~ 0.06 ppp (particles per pixel)). The particle images shape were gaussian, being the diameter associated to e-2 times the peak value d = 4 pixels. Where particles overlap, the corresponding intensities were added. 5% of particles had no second image to correlate due to out of plane velocity or any other optical effect. These images were selected to allow direct comparison with other super-resolution systems, like the mentioned LFCPIV in Nogueira, Lecuona and Rodríguez (1999) or Rodríguez, Lecuona and Nogueira (2001) (in this meeting proceedings). Five different multigrid systems have been tested. In two of them, the size of the interrogation windows had the following values: 64 pixels for the first iteration, 32 pixels for the second one and 16 pixels for the last three ones. ∆ was successively 16, 8 and 4 pixels for the three iterations left. The smallest λ tested was 20 pixels, thus the three last iterations were not likely to trigger small wavelength instabilities. The difference between these two systems is the application of the weighting function to one of them in the first two iterations. A third system used the weighting function in all the iterations. Due to the problems of this weighting with small windows, the iterations with F = 16 were substituted by F = 32 in this system. The remaining two systems correspond to references from others work (Jambunathan et al. 1995 and Scarano and Riethmuller 2000). These two systems only uses F = 16 in all the iterations. The results for these options are compared in figure 5. The oscillation around the reference lines of the Multigrid system with no weighting function is caused by the effect depicted in figure 1, when operating on the different window sizes. Only the system corresponding to the work of Scarano and Riethmuller (2000) corresponds to different test images, as the data have been directly taken from their work. It is now clear that when the instability is not allowed to grow (large grid spacing or few iterations), the error from r < 0 still affects the accuracy. The detailed analysis of the proposed multigrid system, with no weighting function measuring the point of wavelength λ = 21.3 pixels of figure 5, on the synthetic images defined in the introduction, is as follows: - In the first iteration (F = 64 pixels), figure 1b shows that r is slightly negative. The result is that this first iteration gives in some places a displacement opposite to the one under measurement. If we analyze the root mean square value (rms) of the error, e, in the measurement, normalized with the rms of the signal s to be measured, the value obtained is: rms(e)/rms(s) = 1.07. This value is consistent with a measured field slightly opposite to the real one. - In the second iteration (F = 32 pixels), figure 1b shows a highly negative value for r. The result in error terms is rms(e)/rms(s) = 1.34. This is coherent with a measurement with opposite sign to the original one. - In the three following iterations (F = 16 pixels) r > 0. The result is a reduction of the error in each step, finishing with rms(e)/rms(s) = 1.19. Following iterations would lead to worse measurements due to accumulation of errors from other sources. 5 PIV’01 Paper 1010 Displacement field: s = 2sin(2πx /λ x ) (pixels) 1.2 Multigrid PIV+compens. (F :64,32,3x16; ∆ :16,8,3x4) 1 rms(e )/rms(s ) Multigrid PIV+compens.+weight in first 2 steps (F :64,32,3x16; ∆ :16,8,3x4) (Multigrid LFCPIV in the first two steps) 0.8 0.6 0.4 0.2 0 Multigrid LFCPIV (F :64,4x32; ∆ :16,8,3x4) 20 25 30 35 40 45 50 55 λ x (pixels); (δ =4.5 pixels). 60 Fig. 5. Performance of the five iterations multigrid systems described in the text, along with the method from Jambunathan et al (1995) (thin continuous line) and Scarano and Riethmuller (2000) (thin discontinuous line). It must be accepted that the parameters defined here for a Multigrid PIV are somewhat arbitrary, but the benefits of the application of the weighting function for steps with windows ≥ 32 pixels are now evident. The test cases have been chosen with care, so that there is no appreciable instability excitation. This implies that most of the benefits remain even when there is no compensation of the particle pattern deformation. This result will be explained more deeply elsewhere. Another useful conclusion of the comparison here presented is that better results can be obtained with weighted 32 pixels windows rather than non-weighted 16 pixels windows. 3 Errors associated to iterative PIV with small windows It should be remarked that the application of windows smaller than 16 pixels on real images is still a subject under development. Many recent applications of advanced multigrid systems do not use smaller windows. An example is Scarano and Riethmuller (2000). In that paper, devoted to multigrid PIV, the processing of real images is performed with windows of 32 and 16 pixels. Nevertheless, there is ongoing research on systems especially designed to deal with smaller windows, Fincham and Spedding (1997) show good measurements with small windows, but the requirement for a large particle diameter arises (optimum diameter around 6 pixels). Nogueira, Lecuona and Rodríguez (2001a) and (2001b in this meeting proceedings) show a promising way to deal with small windows free of this requirement. This is by the use of Symmetric Direct Correlation (SDC) algorithms. Here some more details are given about such a system. 3.1 Selection of the correlation algorithm: The correlation function with large interrogation windows is time consuming. Consequently, most of PIV systems turn to the Fast Fourier Transform (FFT) instead of the Direct Correlation (DC) calculation, in order to save time. The use of FFT ignores completely the image out of the interrogation windows, substituting it by a periodical field. The result is the introduction of a spurious contribution in the calculation of the correlation coefficient corresponding to any not null displacement. This reduces the signal to noise ratio (s/n). Fig. 6 depicts the mechanism of this source of error, which is more relevant the smaller the window is. CORRELATION OF INTERROGATION WINDOWS FROM IMAGES a AND b: SPURIOUS CONTRIBUTION TO CORRELATION IN FFT ONE PIXEL Fig 6. Error introduced by the periodicity of the FFT. 6 PIV’01 Paper 1010 As this section is devoted to small interrogation windows, it is possible to afford the increase of computing time of the DC. Using it, the reduction of s/n associated to the periodicity of the FFT is avoided. Nevertheless getting rid of this source of error does not mean to have a better performing algorithm; other sources of error have to be checked for. Detailed studies like Huang et al (1997) or the ones from the authors, mentioned in the introduction of this section, show that for small particles the performance of DC algorithms is better than usual FFT ones, but not better than some variants of the later, like FFT + discrete offset. One of the main reasons for that is the error coming from the truncation of particles at the window borders. The way to avoid it in FFT, by a discrete offset of the interrogation windows, is not applicable to DC. The reason lays on the lack of symmetry of the algorithm. This lack of symmetry is depicted in Fig. 7. In that figure, it can be seen that the correlation peak, although peaking in the right position, is not symmetric. As this correlation coefficient is calculated at discrete increments, this introduces error in the output of the subpixel peak-fitting algorithm. In DC this source of error is present even if there is no displacement of particles, misleading iterative offset algorithms. Image a Image b DC-PIV 1 0.5 Correlation coef. 1 Gray level Gray level Interrogation window 1 0.5 0 0 -3 -2 -1 0 1 2 3 Spatial pos. (pix.) 0.8 0.6 0.4 0.2 0 -3 -2 -1 0 1 2 3 Spatial pos. (pix.) -1 -0.5 0 0.5 1 Displacement (pix.) Fig 7. Even at zero displacement, DC-PIV losses the correlation peak symmetry if there is truncation of particles at the window borders. To avoid the error a new algorithm is proposed: Symmetrical Direct Correlation (SDC). This algorithm consists in a slight modification of the Direct Correlation. To force symmetry everything done in image a in respect to image b must be done in image b in respect to image a and both outputs have to be averaged. A way to fulfill this is to add the contributions from the following two sources: 1. The correlation of an interrogation window from image a locally correlated along image b. 2. The correlation of an interrogation window from image b locally correlated along image a. Once the symmetry has been obtained, no error appears for cero displacements and a standard procedure with subpixel interrogation window offset can be used. This has proven to give good results in tests over synthetic as well as real images (Nogueira, Lecuona and Rodriguez (2001a) and (2001b)). A table summarizing these alternatives for small interrogation windows follows. In this table, a qualitative description is given that is based in the quantitative results of the mentioned works. s/n reduction because of spurious Error due to truncation of periodicity of the algorithm particles FFT Present Medium (peak locking + rms error) FFT + discrete offset of Present Low (rms error) interrogation window DC Absent Medium (rms error + small peak locking) DC + discrete offset of Absent High (rms error + small peak interrogation window locking) SDC Absent Medium (rms error + small peak locking) SDC + discrete offset Absent Very Low (rms error) of Interrogation window 7 Overall performance Normal Improved Normal Normal Improved Highly Improved PIV’01 Paper 1010 4 Conclusions. Recent studies, here reported, are giving design rules for the development and refinement of multigrid PIV. The results are applicable to large interrogation windows as well as small windows. Some of this design rules can be summarized as follows: If no weighting function is used for the correlation calculation, the growth of unstable modes should be avoided. This can be performed by keeping the ratio between grid node spacing ∆ and window size in a way that unstable frequencies are not set to the same values for consecutive iterations. The use of the weighting function described in expression (1), avoids instability for all wavelengths, but can only be used with large windows (F ≥ 32 pixels). The use of this weighting function for large windows gives a further advantage; this is, better positioning of subsequent windows. For small windows, the use of Direct Symmetrical Correlation (DSC) plus a discrete window offset improves the performance of the system. Acknowledgements This work has been partially funded by the Spanish Research Agency grant DGICYT TAP96-1808-CE, PB95-0150CO2-02 and under the EUROPIV 2 project (A JOINT PROGRAM TO IMPROVE PIV PERFORMANCE FOR INDUSTRY AND RESEARCH) is a collaboration between LML URA CNRS 1441, DASSAULT AVIATION, DASA, ITAP, CIRA, DLR, ISL, NLR, ONERA, DNW and the universities of Delft, Madrid (Carlos III), Oldenburg, Rome, Rouen (CORIA URA CNRS 230), St Etienne (TSI URA CNRS 842), Zaragoza. The project is managed by LML URA CNRS 1441 and is funded by the CEC under the IMT initiative (CONTRACT N°: GRD11999-10835) References Fincham AM; Spedding GR (1997) Low cost, high resolution DPIV for measurements of turbulent fluid flow. Exp Fluids. 23: 449-462. Fincham AM; Delerce G (2000). Advanced optimisation of correlation imaging velocimetry algorithms. Exp. Fluids. 29/7: S13-S22. Hart DP (1999) Super-Resolution PIV by Recursive Local-Correlation. Journal of Visualization. (To be published, available at http://web.mit.edu/dphart/ www/Super-Resolution%20PIV.pdf) Huang H; Dabiri D; Gharib M (1997) On errors of digital particle image velocimetry. Measurement Sci. & Technol. 8: 1427-1440. Jambunathan K; Ju XY; Dobbins BN; Ashforth-Frost S (1995) An improved cross correlation technique for particle image velocimetry. Meas. Sci. Technol. 6: 507-514. Lecordier B; Lecordier JC; Trinité M (1999) Iterative sub-pixel algorithm for the cross-correlation PIV measurements. 3rd Int. Symposium on PIV’99. University of California Santa Barbara. USA. Nogueira J; Lecuona A; Rodríguez PA (1999) Local Field Correction PIV: On the increase of accuracy of digital PIV systems. Exp. Fluids 27/2: 107-116. Nogueira J; Lecuona A; Rodríguez P A (2001a) Identification of a new source of peak-locking, analysis and its removal in conventional and Super-Resolution PIV techniques. Exp. Fluids 30/3: 309-316. Nogueira J; Lecuona A; Rodríguez P A (2001b) New source of peak-locking related to the window size: analysis and its removal. 4th Int. Symposium on PIV’01. Göttingen. Germany. Rodríguez PA; Lecuona A; Nogueira J (2001) Modification of the local Field Correction PIV technique to allow its implementation by means of simple algorithms. 4th Int. Symposium on PIV’01. Göttingen. Germany. Scarano F; Riethmuller ML (2000) Advances in iterative multigrid PIV image processing. Exp. Fluids. 29/7: S51S60. Soria J (1996) An Investigation of the Near Wake of a Circular Cylinder Using a Video-Based Digital CrossCorrelation Particle Image Velocimetry Technique. Experimental Thermal and Fluid Science. 12: 221-233. 8