Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
7th World Congress on Industrial Process Tomography, WCIPT7, 2-5 September 2013, Krakow, Poland TIPOD - A User-Friendly Software Base for Chemical Species Tomography Systems N. Terzijaa, A. Tsekenisa, D. McCormicka, H. McCanna,b a School of Electrical and Electronic Engineering, The University of Manchester, P.O. Box 88, Sackville Street Manchester M13 9PL, UK b Now at The School of Engineering, The University of Edinburgh, The King’s Buildings, Edinburgh EH9 3JL, UK Abstract The user-friendly MATLAB-based TIPOD package provides fast, flexible analysis and image reconstruction of large volumes of chemical species tomography data. Initially focused on in-cylinder automotive applications, its scope has been extended and its design modified to permit easier modification and customization. The new version, TIPOD-2013, provides options for: data pre-processing (e.g. filtering, denoising); data referencing; quality-based data selection; image reconstruction (e.g. Landweber with median or wavelet filters, Tikhonov); off-line still-frame display; export to industrystandard video; and flexible simulation for development or validation of optimal sensor arrays. The key features of TIPOD2013 are described, along with examples of its use. Keywords: process tomography; data processing; user-friendly interface; TIPOD 1. Introduction Over the last two decades, technology has begun to emerge that is capable of yielding tomographic images of the distribution of chemical species in flowing and reacting systems. This field of technology is generally referred to as Chemical Species Tomography (CST), and has drawn increased attention from researchers and users alike, e.g. at the EPSRC-sponsored Global Engagement Workshop Chemical Species Tomography of Reacting Flows in 2012 [1]. In particular, the advent of a broad range of laser technologies and associated optoelectronic technologies has opened up the way to obtain ultra-high-speed images of the distribution of chemical species in gaseous systems using tomographic methods that exploit the characteristic absorption spectroscopy of particular target chemical species, e.g. see [2-7]. This particular type of CST, in all its wide range of potential application, is the scope of the present paper. However, such CST systems are uniquely challenging in a number of respects, not least in terms of the very large volumes of data that are generated, e.g. the hardware system described by Wright at. al. [6] operates at 100,000 frames per second (fps), generating approx. 10 MB/s of raw data. In that particular application, viz. continuous in-cylinder CST of hydrocarbon fuel over many thousands of cycles in a multi-cylinder automotive gasoline engine, it is also essential to provide automotive engineers with a user-friendly means of visualising the dynamic data at all levels of analysis, from raw data to reconstructed image. These specific challenges motivated the initial development of the so-called TIPOD package [8]. Recent application of the above CST system to fuel-injected engines [9] and to further system characterisation studies in the laboratory [10] have motivated further developments of the TIPOD functionality. A number of further challenges in CST are apparent, for example, the strong coupling that is inherent between choice of measurement geometry, image reconstruction method and flow models on the one hand, and on the other, between the target measurement parameter, electronic architecture and temporal resolution. From the 2012 Workshop noted above, it transpired that the efforts of researchers worldwide to grapple with all of these issues are severely hampered by the computational issues that arise, and it was agreed to define an updated version of the Manchester TIPOD package that was not constrained by engine applications, and make it freely available to the worldwide community. As part of that updating process, the application of TIPOD for aero engines, utilising the optimisation methods of Twynstra and Daun [11] and discussed by McCormick et. al. [12] has been built into the main TIPOD code. The resulting package is TIPOD-2013, which is described here. 295 Terzija et al. / WCIPT7 2. TIPOD framework TIPOD (Tomography Image Player on Demand) is a user-friendly software package, developed initially for data analysis, data display, tomographic image reconstruction and tomographic image presentation of in-cylinder fuel distribution. Its initial goal was to track fuel dynamics with fine temporal resolution through the whole engine cycle, for a large amount of cycles. The TIPOD software package is developed in the MATLAB environment with a graphical user interface (GUI) which is based on a highly flexible library of functions. As shown in figure 1, TIPOD is composed of the following data processing stages: (i) import beam geometry; (ii) data simulation; (iii) data import; (iv) data preprocessing and filtering; (v) referencing; (vi) data display; (vii) image reconstruction. 2.1. Import beam array This section of the TIPOD software package defines the CST system geometry in terms of: Importing an arbitrary beam array with n number of beams Setting the number of pixels by defining the diameter of the imaging space and the imaging space resolution in mm Calculating sensitivity matrix The input beam array matrix nx4 is defined by the coordinates of the starting and ending points: beam 1: X_start, Y_start, X_end, Y_ end beam 2: X_start, Y_start, X_end, Y_end ... beam n: X_start, Y_start, X_end, Y_end Fig. 1. Schematic of the TIPOD software package. 296 Terzija et al. / WCIPT7 CST input beam geometry can be visualized by plotting the beams in their physical location in the array (see figure 2.a). Another way of visualizing the properties of beam geometry is to plot the position of all the beams in the so-called sinogram (or Radon) space, which is a two-dimensional space described by one linear variable, s, and one angular variable, θ [4]. In the sinogram space, each beam can be represented by a single point (s, θ), where s is the length of its perpendicular distance from the origin when drawn in normal Cartesian coordinates and θ is the angle that it subtends to the vertical Cartesian axis. The sinogram plot is illustrated in figure 2.b and it can provide valuable insight into potential sensitivity coverage by the beam array. The sensitivity map S illustrated in figure 2.c is based on calculation of the exact pixel to beam intersection lengths throughout all the pixels and for all beams. This means that some pixels which are crossed by several beams will have greater magnitude in the sensitivity map compared to those pixels which are only crossed by one beam. (a) (b) (c) Fig. 2. (a) beam array example; (b) sinogram plot; (c) sensitivity map. 2.2. Import data The data represent transmission measurements at two optical wavelengths. The first wavelength is used for e.g. hydrocarbon sensing (in IMAGER case, 1700nm) and the second as a non-specifically absorbed reference (in IMAGER case, 1651 nm ) for each in-cylinder beam path [6]. The raw data are initially stored by the measurement system in the Labview environment in binary format (.BIN) and after that a selected data subset is exported in ASCII format (.txt) using the following data structure: File header Ch1 1700, Ch2 1700, Ch3 1700,...,Ch32 1700, Encoder1 sample 1, 2, 3, 4,...,Encoder1 sample 40 Ch1 1651, Ch1 1651, Ch3 1651,...,Ch32 1651, Encoder2 sample 1, 2, 3, 4,...,Encoder2 sample 40 Ch1 1700, Ch2 1700, Ch3 1700,...,Ch32 1700, Encoder1 sample 1, 2, 3, 4,...,Encoder1 sample 40 Ch1 1651, Ch1 1651, Ch3 1651,...,Ch32 1651, Encoder2 sample 1, 2, 3, 4,...,Encoder2 sample 40 ... Ch1 1700, Ch2 1700, Ch3 1700,...,Ch32 1700, Encoder1 sample 1, 2, 3, 4,...,Encoder1 sample 40 Ch1 1651, Ch1 1651, Ch3 1651,...,Ch32 1651, Encoder2 sample 1, 2, 3, 4,...,Encoder2 sample 40 TIPOD imports those data into the MATLAB environment, converts the data format, and saves the corresponding dataset. After that the following parameters need to be set: Frame acquisition rate in frames per second (FPS) 297 Terzija et al. / WCIPT7 Engine rotational speed in revolutions per minute (RPM) Following provision of the above parameters, TIPOD automatically calculates the number of frames per crank-angle degree (CAD) and appropriately scales the x-axis (CAD) of all subsequent data plots. 2.3. Data alignment Data acquisition in the current generation of the IMAGER system commences while the engine is running and as soon as the user starts the acquisition period via the acquisition software. Although data acquisition is performed in real-time, it is asynchronous to the rotation of the crankshaft encoder. Consequently, the captured data file can start anywhere within a give 4-stroke engine cycle (0-720 CAD). For clarity of data presentation, we have decided that the objective is to have the TDC (0 CAD) at the beginning of the power stroke at the start of subsequent plots. During a 4-stroke engine cycle the piston is at TDC twice, at 360 and 720 (i.e. 0 in the next cycle) CAD. The TIPOD package automatically locates a TDC from extinction of the beams due to interference with the piston and ‘crops’ preceding captured data. The user specifies which one (first or second) of the identified TDC regions is to be treated as the beginning of the power stroke and used as the start of following plots. 2.4. Simulation facility Simulation window is shown in figure 3a, showing the two main functions achieved: Selection of simulation phantom either by choosing the standard Gaussian soft-edged or hard-edged phantoms or by importing the user-defined phantom. In the case of Gaussian phantom the following parameters need to be entered: number of objects, typically from one to three, and for each object the x and y coordinates of the centre, the diameter of the object as well as the concentration. When the phantom is created, TIPOD offers the option to visualize the created phantom. Forward calculation based on Beer-Lambert law, with the two main parameters to be selected: initial transmission (typically in simulations has values either 1 or 100) and absorption coefficient. After creating the phantom and performing the forward calculation, a user can go back to the main TIPOD menu to perform the image reconstruction using either all beams or choosing a subset of beams (see section 2.10). Figure 3.b shows an example of a user defined phantom and the image reconstruction results based on Tikhonov regularisation method. (a) (b) Fig. 3. Simulation window: (a) lay-out, (b) simulation example. 298 Terzija et al. / WCIPT7 2.5. Data pre-processing The data pre-processing stage consists of two main sequential steps: Offset correction – In this step TIPOD provides a user choice of either automatic or manual offset correction. Manual offset correction procedure considers the file manually imported by the user containing the offsets with typically optical laser sources switched off. This recorded file needs to be converted into ASCII format. In the case of automatic offset correction the offsets are taken from data regions were the piston blocks all of the beams. These regions should be specified within the CAD range fields. Scaling – This step offers a choice of semi-automatic or manual scaling of the data to their full-scale values. In manual scaling, the user imports a file containing the maximum, or full-scale deviation values for all beams. Such a file can be generated with the optical sources on and no absorption or scattering medium in the beam paths. This file is likely to be generated with a significant time difference from the main data file, therefore care must be taken to prevent corruption of the maxima by error sources such as optical power drift of the source. In the semi-automatic case the user must specify a CAD region within the first captured cycle where the maximum values will be extracted from. This range is highly dependent on the specifics of the experiment performed; a typical example of such a reference region is the beginning of the compression stroke where the fuel present is minimum. Independent of the method used, the scaling is performed globally within the data file imported during the Import Data phase. 2.6. Data filtering TIPOD provides a choice of several types of data filtering mainly for the purpose of removing noise from the data: Boxcar moving average. A computationally efficient filter to suppress high frequency content. The user can specify the window size in number of samples. The phase-shift introduced by the filter is automatically corrected. Wavelet de-noising [13-14] procedure consists of three steps: (i) signal decomposition, where the user needs to choose a wavelet filter and the decomposition level L to compute the wavelet decomposition of the signal at level L; (ii) detail coefficients thresholding, where the user for each decomposition level from 1 to L, selects a threshold and applies thresholding (“soft “ or “hard” ) to the detail coefficients. The user can choose the standard threshold selection rule provided by MATLAB (iii) wavelet reconstruction, which computes wavelet reconstruction based on the original approximation coefficients of level L and the modified detail coefficients of levels from 1 to L. Figure 4 shows an example of wavelet denoising applied to dual-wavelength ratiometric (DWR) data, showing how the denoising method significantly improves signal quality. 2.7. Dual wavelength ratiometric approach In this step the ratio of measurement and reference wavelength has been taken. The user can specify either to apply this on raw data, pre-processed data or filtered data. As shown in [6], these data are further referenced and used for image reconstruction. 299 Terzija et al. / WCIPT7 Fig. 4. Example of wavelet denoising. 2.8. Referencing A referencing procedure is applied to suppress artefacts in the data that are unrelated to the HC distribution, for instance those arising from pressure-induced deformation of the engine block. Instead of using of an intracycle reference, e.g. scaling each cycle to achieve a ratio value of unity at some arbitrary crank angle, a comparison of fired and motored cycles is used. It has been shown in [6] that a ‘skip-motored’ strategy provides fuel-free reference conditions in close temporal proximity to the fired cycles being imaged. There are two ways to perform referencing: “Manual reference selection”, where the user analyses the measured data in some detail and then selects an appropriate motored cycle, shortly after the fired cycles of interest, to serve as the reference cycle; “Load reference”, where the user has previously selected and saved a motored cycle that can be used later as a reference. Figure 5 shows the importance of selecting a good reference; it shows a comparison of the same fired DWR data referenced with the “best” motored cycle (first motored cycle after transition from fired to motored) and with what we would consider an inappropriate motored cycle, viz. the 12th after transition (nearly after 1s). In the latter case, the early part of the data are systematically > 1.00, and the late part display a level of beam attenuation much greater than that expected from a near-stoichiometric fuel-air mixture. Using the first motored cycle as the reference is always found to give results with robust physical interpretation. Fig. 5. Data referencing. 300 Terzija et al. / WCIPT7 More recently the application of Near-Infra Red Absorption Tomography (NIRAT) on a compression ignition (CI) engine has lead to the development of complex referencing schemes based on statistical analysis of multiple engine cycles. In summary, a sequence of 10 consecutive engine cycles is analysed. The first 9 cycles are motored and the 10th is fired. The motored cycles are averaged and compared to the fired cycle. This yields the fuel behaviour for that sequence. The same process is repeated for 10 sequences, each containing 10 cycles as before. The fuel behaviours from each sequence are then averaged, yielding the average fuel behaviour of interest. Clearly, such analysis methods are highly specific to a given application or experiment. Once optimised, they can be integrated into TIPOD and easily applied to analyse data collected as well as further promoting collaboration. 2.9. Data display When the user file is imported TIPOD firstly detects and displays how many cycles are detected in the input file. After that, the user can visualize the data during any stage of pre-processing using several options for data display: Particular data set to be displayed. Initially the user can display only the raw data, but after applying any of the pre-processing or processing procedure the generated data sets become available for display (e.g. offset corrected data, offset corrected and scaled data, dual wavelength ratiometric data, boxcar filtered data, wavelet de-noised data). Particular cycle within the file Choice of measurement, reference or both wavelengths Display of each beam separately or display of all beams Data to be displayed in specific CAD range or full CAD range by default 2.10. Image reconstruction TIPOD offers the user the option to perform the image reconstruction of either DWR data or only on reference wavelength data set [9]. Prior to image reconstruction a user can also perform a qualification test that is applied to the DWR ratiometric transmission data from each beam. First the data of the compression stroke of the engine are selected from each cycle by specifying the CAD range within the image reconstruction section. After that, the qualification test of the DWR ratiometric data can be performed by the user, based on rejection of beams according to the following criteria: the averaged data retain more than 5% peak-to-peak noise; the averaged data exhibit physically implausible behaviour, viz. ratiometric transmission showing values above 1.005, the averaged data have a significantly increasing trend over the compression stroke as a whole. If some beams satisfy any of those criteria the user can select these beams in the field “Exclude beams” and perform further reconstruction without the excluded beams. This qualification test prevents the resulting image being impaired by the inclusion of poor quality data, e.g. those with unacceptably low signal-to-noise (SNR) due to heavily contaminated lenses. Image reconstruction can be performed only on one cycle at a time using two standard algorithms: Iterative Landweber image reconstruction algorithm Tikhonov image reconstruction algorithm To date, the median-filtered iterative Landweber algorithm has been found to be successful for the sparse and irregular IMAGER data, as discussed in detail in [4]. The method was found to be capable of reconstructing a 301 Terzija et al. / WCIPT7 wide variety of distributions including single and multiple hard-edged and soft-edged (Gaussian) plumes and homogeneous distributions. As shown in figure 1, the user can choose the parameters of the reconstruction algorithm, or can select to use the default values. The standard parameters that need to be chosen are: number of iterations, initial transmission, relaxation parameter, absorption coefficient. It has been shown [4, 15] that the iterative Landweber image reconstruction method is robust for small numbers of measurement data and can be modified in order to take into account additional a priori information about the subject. Typical a priori information widely used are non-negativity constraint (assuming that the concentration of the subject cannot be negative) and the smoothness of the distribution. TIPOD integrates two smoothing filters: median filter [4] and wavelet filter [15]. Both filters offer the option of setting their parameters. In the case of median filter only the size of the median filter needs to be set, which mainly depends on the size of imaging space that needs to be resolved. Wavelet filters are more complex to use, because there is no universal wavelet filter that gives the best solution for all application. Therefore we recommend for a start using the Daubechies wavelet family, and among the parameters to be set, to try with defaults: 3 levels of decomposition, soft thresholding. The details of the wavelet smoothing function are discussed by Terzija et. al.[15]. It has been shown that by using a wavelet smoothing function the localization in images is better than that achieved by using a median filter and the number of iterations needed for image reconstruction is significantly reduced. In addition to Landweber image reconstruction algorithm, TIPOD provides comparison with image reconstruction algorithm using Tikhonov regularization. The user needs to specify the regularization parameter and also can plot the singular values of the sensitivity matrix. TIPOD provides a variety of means to display and export the reconstructed images. Figure 6 shows reconstructed tomographic images of the hydrocarbon fuel distribution (from the engine discussed in [6]) in the period from 42˚ to 39˚ before TDC at intervals of 3˚ of crank angle. In this IMAGER case, 21 beams were found to provide adequate data quality throughout this engine cycle, thus enabling detailed intra-cycle temporal analysis of fuel distribution, with about 40 images during this single compression stroke of the engine. 42 39 36 33 Crank angle (degrees before top dead centre) 30 Fig 6. Tomographic images showing the fuel distribution in the period from 42˚ to 39˚ before TDC at intervals of 3˚ of crank angle (1500rpm/1.5 bar BMEP load, see [6]) obtained using a 21-beam subset. 3. TIPOD for aero-engines As part of the FLITES (Fibre-Laser Imaging of Turbine Exhaust Species) project, a fork of the main TIPOD code has been created for processing laser absorption tomography data from aero-engine applications. This forked code, referred to as TIPOD-AERO, is being developed concurrently to the main TIPOD code reported previously, and will be folded back into the main TIPOD code base later in the FLITES project. TIPOD-AERO is a user-friendly software package, developed for data analysis, data display, tomographic image reconstruction and tomographic image presentation of in-exhaust plume chemical species distribution. It is developed in MATLAB based on the core TIPOD library of functions. Although there is a common code base, there are several developments in TIPOD-AERO to adapt it for aero-engine applications. The major area of development focuses on modifying the existing TIPOD code to account for the large geometries and high beam counts that are typical of large-scale absorption tomography applications and the integration of Tikhonov regularisation for the image reconstruction step. Tikhonov regularisation uses the sensitivity matrix, A, to calculate an m-by-m matrix ATA, where m is the number of pixels in the image. 302 Terzija et al. / WCIPT7 Reported automotive applications have a 32 beam array transecting a circular cylinder of between 80 and 85mm in diameter. At 1.5mm² resolution, m would be around 2500 (50x50). The proposal in the FLITES project is to have a 128 beam array transecting a circular imaging space 6m in diameter with a centrally positioned plume of around 1.4m. Assuming a 20mm² resolution across the imaging space, m in the plume space would be around 4900 (70x70) and in the imaging space would be around 90000 (300x300). For the full imaging space, the ATA matrix would have around 8 billion elements, which at 64 bytes per element would require over 500GB RAM. This problem is computationally too large to model on a standard PC. This problem is further exacerbated by the addition of the regularisation matrix, derived from the introduction of m additional equations, creating a further m-by-m matrix. TIPOD-AERO aims to work around the large number of pixels by introducing a basic concept of spatialweighting to the reconstruction step which assumes everything in the plume space is of interest to the reconstruction, i.e. has a weighting of 1, whereas everything in the imaging space but outside of the plume space is not of interest to the reconstruction, i.e. has a weighting of 0 and hence does not require direct calculation. This will limit the value of m to the number of pixels in the plume space. The forward modeller still accounts for the whole imaging space by computing the PCI for the full beam path apply boundaries at the plume space interface for the reconstruction step. Currently this work is experimental, however it is envisaged the concept of spatial weighting will have wider relevance to limited data tomographic reconstruction. Additional developments in TIPOD-AERO are the removal of features specific to IC and CI engine data processing for example data representation with respect to CAD, and general code refinements and refactoring for improved computation. 4. Conclusions TIPOD is a practical tool for user-driven analysis of large volumes of tomographic data. Especially the revised version of TIPOD-2013 allows a high degree of flexibility and can be easily extended and used by the tomographic system developers and process engineers to develop, validate and analyze the data collected with their chemical species tomography systems. TIPOD offers a robust platform, with user-driven parameter choices where appropriate providing the automotive engineers and researchers highly sophisticated knowledge of engine dynamics. Acknowledgements We are grateful to our colleagues Kyle Daun and Mathew Twynstra from University of Waterloo, Canada for supporting the development of the TIPOD software package. References [1] http://www.mims.manchester.ac.uk/CSTworkshop/index.php [2] Hindle, F. P., Carey, S. J., Ozanyan, K. B., Winterbone, D. E., Clough, E., McCann, H., 2001. Measurement of gaseous hydrocarbon distribution by a near infra-red absorption tomography system, Journal of Electronic Imaging 10, pp. 593-600. [3] Salem, K., Tsotsas, E., Mewes, D., 2005, Tomographic measurements of breakthrough in a packed bed adsorber. Chemical Engineering Science 60, pp. 517-522. [4] Terzija, N., Davidson, J. L., Garcia-Stewart, C.A., Wright, P., Ozanyan, K.B., Pegrum, S., Litt, T.J., McCann, H., 2008. Image optimisation for chemical species tomography with an irregular and sparse beam array, Measurement Science & Technology 19, 094007. [5] Pal, S., Ozanyan, K. B., McCann, H, 2008. A computational study of tomographic measurement of carbon monoxide at minor concentrations. Measurement Science & Technology 19, 094018. [6] Wright, P., Terzija, N., Davidson, J. L., Garcia-Castillo, S., Garcia-Stewart, C., Pegrum, S., Colbourne, S., Turner, P., Crossley, S. D., Litt, T., Murray, S., Ozanyan, K. B., McCann, H., 2010, High-speed Chemical Species Tomography in a multi-cylinder automotive engine, Chemical Engineering Journal 158, pp.2-10. [7] Ma, L., Li, X.S., Sanders, S.T., Caswell, A.W., Roy, S., Plemmons, D.H., Gord, J.R., 2013. 50-kHz-rate 2D imaging of temperature and H2O concentration at the exhaust plane of a J85 engine using hyperspectral tomography. Optics Express 21, pp. 1152-1162. [8] Terzija, N., Eales, D., Davidson, J., Wright, P.P., McCann, H., 2009. “A User-Friendly System for Analysis of Large Volumes of Tomographic Data: TIPOD,” Proc. 3rd International Workshop on Process Tomography. Tokyo, Japan. 303 Terzija et al. / WCIPT7 [9] Cheadle, E. M., Karagiannopoulos, S., Terzija, N., Wright, P., Ozanyan, K. B., McCann, H., 2012. “Fuel spray and vapour imaging in a single-cylinder research engine,” Proc. 6th Int. Symp. on Process Tomography (ISPT-6). Cape Town, South Africa, OR18. [10] Tsekenis, S. A., Terzija, N., Wright, P.P., McCann, H., 2010. “Spatial resolution of hard-field tomography systems with severely limited data, ” Proc. 6th World Congr. Industrial Process Tomography. Beijing, China, pp. 360-370. [11] Twynstra, M.G., Daun, K.J., 2012. Laser-absorption tomography beam arrangement optimization using resolution matrices. Applied Optics 51, pp. 7059-7068. [12] McCormick, D., Twynstra, M.G., Daun, K.J., McCann, H., 2013. “Optimising laser absorption tomography beam arrays for imaging chemical species in gas turbine engine exhaust plumes,” Proc. 7th World Congress on Industrial Process Tomography. Krakow, Poland. [13] Donoho, D.L., Johnstone, I.M., Kerkyacharian, G., Picard D., 1995. Wavelet shrinkage – asymptopia, Journal of the Royal Statistical Society B. 57, pp.301-337. [14] Donoho D.L., 1995. De-noising by soft-thresholding, IEEE Transactions on Information Theory 41, pp.613-627. [15] Terzija N., McCann H., 2011. Wavelet-Based Image Reconstruction for Hard-Field Tomography with Severely Limited Data. IEEE Sensors 11, pp.1885-1893. 304