Acta Polytechnica CTU Proceedings doi:10.14311/APP.2017.9.0008 Acta Polytechnica CTU Proceedings 9:8–12, 2017 © Czech Technical University in Prague, 2017 available online at http://ojs.cvut.cz/ojs/index.php/app PHASE ANALYSIS OF NITI WIRE BASED ON SYNCHROTRON 2D X-RAY DIFFRACTION PATTERN IN MATLAB Martin Dudra, ∗, Daniel Šimekb, Jan Drahokoupila, b a Department of Solid State Engineerign Faculty of Nuclear Sciences and Physical Engineering Czech Technical University in Prague, Trojanova 13 120 00 Prague 2, Czech Republic b Institute of Physics , Na Slovance 2 182 21 Prague, Czech Republic ∗ corresponding author: dudrmart@fjfi.cvut.cz Abstract. This paper deals with simplified phase analysis of 2D diffraction patterns obtained using microfocused X-ray at various places of superelastic NiTi wire under combined load. For this purpose, MATLAB routines and functions were created, which carry out integration of the patterns in various sectors of Debye ring, fitting of the patterns by a mixture of austenite and martensite (having neglected the R-phase) and successive evaluation of the quantitative phase content. The most crucial simplificating assumptions were: the neglection of the R-phase and the assumption of a) fibre texture or b) no texture. Keywords: nitinol spring, combined load, X-Ray diffraction, phase analysis, synchrotron. 1. Introduction A superelastic nitinol wire under combined load was subjected to XRD measurements using microfocused beam at European Synchrotron Radiation Facility (ESRF) in Grenoble. Quantitative phase analysis at different points on the wire was expected to be carried out. As the number of outcoming images was large (12 000), there was need of their automated processing. Moreover the sample was strongly textured and there- fore the integration of Debye rings was preferred to be done "per partes", that means separately in various sectors ("pieces of cake") in order to implement some texture corrections later. Some MATLAB routines were created that fulfilled these specific demands. This paper briefly explains basic principles of the approach in use and presents results obtained from the routines. 2. Material and Methods 2.1. Nitinol Nitinol is a well-known shape memory alloy of a near equiatomic stoichiometric composition Ni-Ti. The shape memory in NiTi is based on so called marten- sitic transformation (MT) between cubic austenite (high-temperature phase) and monoclinic twinning martensite (low-temperature phase). MT can be in- duced by lowering the temperature below transition point or by applying sufficient mechanical stress onto austenite. There is a third phase called R-phase, which under certain conditions stands in between the former two. It is unstable and hardly preparable solely. [1] R-phase is trigonal. [2] 2.2. Quantitative Phase Analysis Quantitative phase analysis (QPA) responds to both questions "what?" and "how much?" when talking about a mixture of phases. The diffraction pattern outcoming from measurement on a polycrystalline sample in transmission geometry recorded on 2D de- tector looks like a set of concentric circles. Each of the circles corresponds to one set of equivalent crystal- lographical planes of the sample. When the pattern is integrated in tangential direction 1D patterns are obtained for the integrated interval. Position of the peak in 1D pattern (i.e. the radius of the correspond- ing circle) is important for qualitative phase analysis (i.e. "what?"), the integrated intensity of the peak determines the amount of phase in a mixture ("how much?"), hence it is used by quantitative phase analy- sis. There are many factors determining the real value of integrated intensity. Let Ihkl be an integrated intensity of crystallographical planes (hkl), then we can write [3] Ihkl = K ·phkl ·Lθ ·Pθ ·Aθ ·Thkl ·Ehkl ·|Fhkl| 2 . (1) K is a scale factor, which is proportional to diffract- ing volume of the phase and therefore it is of great importance in QPA. Other factors are multiplicity of planes phkl, Lorentz factor Lθ, polarization factor Pθ, absorption factor Aθ , texture correction Thkl which will be discussed further on, extinction factor Ehkl and important structure factor squared |Fhkl| 2. The principle of QPA is very simple: to isolate the scale factors K for the phases in mixture from the equation 1. Nevertheless, some of the other factors and corrections need not to be easily determinable. Especially texture correction may be troublesome as texture (also called preferred orientation) description usually requires specific measurement and nontrivial data analysis. In this paper the authors tried to approximate the real texture by two simplificating cases separately: 8 http://dx.doi.org/10.14311/APP.2017.9.0008 http://ojs.cvut.cz/ojs/index.php/app vol. 9/2017 Phase analysis of NiTi wire based on synchrotron 2D XRD pattern mm 0 1 2 3 4 5 6 7 8 9 10 m m 0 0.5 1 Figure 1. Visualization of gridpoints showing diffrac- tion on the sample. One pixel corresponds to one image, axes have equal scale. a) radially symmetric fibre texture and b) no texture at all. 2.3. Experimental The sample was a coiled round wire of 0.2 mm diam- eter from superelastic alloy NiTi#1 [4]. This helical spring was elongated in uniaxial tension, which in- duced a complex stress state consisting of torsion and tension/compression due to bending of the spring. The tensile load was of 1.6 N. Measurements were carried out at ESRF, Grenoble, at beamline 15A [5]. The wavelength of used radiation was λ = 0.0268128 nm. Microfocused X-ray beam of rectangular cross-section 20 µm × 5 µm was used to scan in a rectangular grid of 12 000 points of which approximately 2 200 covered the sample. More pre- cisely speaking it was a grid of 100 × 120 points and of measures 10 mm × 1.1 mm. So the step was 100 µm in the x direction and cca 9.1 µm in the y direction. In Figure 1 the scanned area is to be seen. Each pixel corresponds to one gridpoint (one measurement, one image). Blue pixels represent measurements where only background was captured (low average intensity in the image) and the yellow pixels correspond to images capturing the sample diffraction pattern (av- erage intensity was larger). The wire profile is clearly visible. 2.4. Data processing Before the data processing itself the wavelength and sample-detector distance were determined using two calibration images taken on calibrant CeO2 in different sample-detector distances. Then the integration in polar angle was carried out. Due to strong texture of the sample and as a macrodeformation is expected, the integration was carried out in nine sectors separately, as indicated in Figure 2. As the structure of austenite and martensite is known [6] it is possible to estimate the positions of diffraction lines of these phases. There was designed such an algorithm, that tries to fit an analytical func- tion Pearson VII to place where we expect austenitic or martensitic line. The whole pattern is then su- perposition of these Pearsons which are all fitted at once, hence it is a whole profile fitting approach, more specifically Le Bail fitting - the latter means that the intensities of lines are fitted parameters (see parame- ter A1 below). It is possible to write Pearson VII in Figure 2. Indication of nine sectors in which the integration was carried out. Each sector has angular width of 20°. a following form [7] P VII(x) = A1 1 [1 + (x−A2)2A3] A4 . (2) Parameters A1, A2, A3 and A4 define the height of the function, its position in x, width and shape re- spectively. In the work other form was used, but the above mentioned one is more clear. The parameter A2 was a function of lattice param- eters and macrodeformation (Voigt model of strain distribution was assumed). The parameter A3 was a function of crystallite size and microdeformation (accordingly to Williamson-Hall equation for width of a diffraction line). Parameters A1 (for all lines) and A4 (for each phase - austenite and martensite) were fitted directly. The area under Pearson VII function is possible to express analytically from the parameters A1, A2, A3 and A4. This area represents the integral intensity of a given line. The fitting was performed using nonlinear least squares, by so called Levenberg-Marquardt method. The fitting was carried out in all the sectors at once. Some parameters were related only to a specific sec- tor (e.g. a height A1 of a particular line in a sec- tor), others were fitted on basis of all sectors (e.g. 3 macrodeformation-describing parameters per phase). There were 60 linear parameters in each sector (height A1 of 50 lines of martensite and 7 lines of austenite plus 3 parameters describing background) and cca 10 other nonlinear parameters which was possible to exclude from fitting (these were related to A2, A3 and A4). Altogether it makes cca 550 parameters to be fitted in one image. Once the integral intensity of all lines (of austenite as well as martensite) is assumed to be known from fitted parameters, the left side of equation 1 is known and thus it is possible to start isolating scale factors K of both phases from the equation (if we know all other terms). In order to finish, the texture evaluation (in this case approximation) has to be carried out. The main difference between the fibre-texture approxima- tion and no-texture approximation was especially in the weights, which were given to integral intensities 9 Martin Dudr, Daniel Šimek, Jan Drahokoupil Acta Polytechnica CTU Proceedings mm 0 2 4 6 8 10 m m 0 0.2 0.4 0.6 0.8 1 Aust Mart mm 0 2 4 6 8 10 m m 0 0.2 0.4 0.6 0.8 1 Aust Mart Figure 3. Relative volume fractions of austenite and martensite with respect to the whole diffracting volume. In the left-hand figure the fibre-texture correction was applied, while on the right it was the no-texture approximation. The martensite is being represented by red channel, the austenite by the blue one. sin3/6 [angst-1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 In te n si ty [ ct s] #104 0.5 1 1.5 2 2.5 3 3.5 4 4.5 data fit Figure 4. Demonstration of fit in one sector. of lines from different sectors and in the number of lines which were taken into account. It is important to notice here that the R-phase was not taken into account in fitting. 3. Results and discussion An example showing fit in one sector of image is in Figure 4. Each of the images taken on the sample (yellow pixels in Figure 1) was processed individually and the ratios A/(A + M) and M/(A + M) were determined, where A resp. M stand for the volumes of austenite resp. martensite which contribute to diffraction, i.e. the volume fractions of the phases. The resulting volume fractions of both phases are in the Figure 3. The strong prevalence of martensite is easily to be seen. Four scans across the wire were chosen to demon- strate the results in detail, concretely scans 11, 36, 66 and 96 with no-texture correction. They have cca a quarter of spring coil period spacing in between, as mm 0 1 2 3 4 5 6 7 8 9 10 m m 0 0.2 0.4 0.6 0.8 1.1 11 96 6636 Figure 5. Indication of four scans which are presented in more detail. There were 100 scans in total, each of the indicated scans has its number denoted nearby. indicated in Figure 5. Each scan consists of cca 22 images. For the results themselves see Figure 6. Besides the diffracting volume of austenite and martensite there are two more informations in each graph. Firstly a sum of austenite and martensite, which should fol- low an ellipse-like arch (the wire has more mass in the center than at the borders) and secondly illustra- tive semi-ellipse chosen so that its maximum value is slightly higher than maximum point of the sum of the phases. This is because the absorption correction was applied only partly during image integration, but it is still expected that the resulting intensity will be affected by absorption. The illustrative wire profile (semi-ellipse) serves only to easier comparison of the sum of volumes and the expectations. Scans 36 and 96 mutually seem to be a mirror image of the other (with the mirror being placed vertically in the middle of each figure) - in both we can see a decrease of sum of diffracting volumes close to the middle of the wire but shifted more to the right in scan 36 and to the left in scan 96. Below this effect is explained by presence of R-phase. In Figure 7 there is to be seen a central group of lines in the measured angle interval, where one line of austenite (110) and four lines of martensite are expected. Obviously, there are two other lines which lay in between the austenitic line (110) and martensitic lines (1-11) and (002). The positions of austenitic and 10 vol. 9/2017 Phase analysis of NiTi wire based on synchrotron 2D XRD pattern pattern No. 5 10 15 20 d iff ra ci n g v o lu m e [ a .u .] 0 0.05 0.1 0.15 scan no. 11 pattern No. 5 10 15 20 d iff ra ci n g v o lu m e [ a .u .] 0 0.05 0.1 0.15 scan no. 36 pattern No. 5 10 15 20 d iff ra ci n g v o lu m e [ a .u .] 0 0.05 0.1 0.15 scan no. 66 pattern No. 5 10 15 20 d iff ra ci n g v o lu m e [ a .u .] 0 0.05 0.1 0.15 scan no. 96 Aust Mart sum Aust+Mart wire profile Figure 6. Results of phase analysis for four scans (no-texture approximation). The y axis shows diffracting volumes, x shows the order number of the images in the given scan. Blue color stands for the diffracting volume of austenite, the red one for the diffracting volume of martensite and the green one is a summation of the two. The black line indicates the theoretical wire mass profile. martensitic lines in the group are well defined - the pattern was fitted at once, hence all the well-isolated lines in the pattern fix positions of lines in the group. They are all bound together by the lattice parameters. But then the two excessive lines must belong to other phase. It is concluded that this phase is R-phase. As the algorithm could not move the lines, it could minimize the sum of squares only using height, width and shapes of lines. The height is most significant fac- tor then, and its adjustment subsequently influences the resulting austenite or martensite volume fraction. But this compensation is not perfect, which implies the loss of overall sum of the fractions. R-phase is usually found somewhere in between the austenite and martensite. If the interface is more or less of a planar aspect then from some angle the micro- focused beam could be passing through the R-phase region rather perpendicularly (scans 11 and 66 in Fig- ure 6) and so the irradiated R-phase volume would be low. On the other hand it would be significantly higher if the beam was passing along the R-phase region (scans 36 and 96). In that case the sum of diffracting volumes evaluated from the presented fit would be most deficient (as explained above). When the overall sum of diffracting volumes was subtracted from virtual wire profile, pictures in Fig- sin( 3)/6 [nm -1 ] 0.42 0.44 0.46 0.48 0.5 0.52 in te n si ty a .u . #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 data fit aust+mart fit aust fit mart lines mart lines aust (1-11) (110) (021) (111) (002) Figure 7. Central group of peaks proving the presence of R-phase. Positions of austenitic, resp. martensitic lines are denoted by crosses of the same color as the fit of the given phase (austenite is denoted by blue, martensite by red color). Green line stands for the sum of the former two fits, black dots are measured values. ure 8 were obtained. These pictures depict this difference relative to the virtual wire profile, i.e. (Vvirt −Vcalc)/Vvirt. Because the absorption correc- 11 Martin Dudr, Daniel Šimek, Jan Drahokoupil Acta Polytechnica CTU Proceedings mm 0 2 4 6 8 10 m m 0 0.2 0.4 0.6 0.8 1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 mm 0 2 4 6 8 10 m m 0 0.2 0.4 0.6 0.8 1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Figure 8. Relative difference of calculated diffracting volume from virtual wire profile with respect to wire profile (symbolically (Vvirt − Vcalc)/Vvirt). On the left with fibre-texture correction, on the right with no-texture correction. tion was not carried out thoroughly, some excess of calculated diffracting volume was observed on the bor- ders and a systematic decrease in the central part. Still, some deviation from this behavior is well notice- able. Notice that extreme values (±1) are nearly only on the wire border. Notice also that the virtual wire profile is only illustrative and serves for visualization of "shape" of the sum of diffracting volumes. It is also possible to see that the regions of greatest decline (orange-red regions in Figure 8, where R-phase is expected, especially in the figure on the left) are the same as the regions where the most austenite was observed (compare with Figure 3). From this we conclude that in this case we are unable to distinguish between austenite and R-phase. 4. Conclusion A simplified quantitative analysis of 2D diffraction patterns was carried out from transmission diffraction measurements of NiTi spring at European Synchrotron Radiation Facility (ESRF), Grenoble. Routines were created, which enabled automatic integration of 2D diffraction patterns and successive fitting of 1D pat- terns regarded as a two-phase mixture (whole-profile fitting based on analytical approach and Levenberg- Marquardt method of nonlinear least squares). With simplifying assumptions about texture it was possible to roughly estimate the ratio of the phases (austenite and martensite). Martensite appears to be strongly prevalent in the sample. As the R-phase (which was present) was not taken into account the fit had troubles with convergence in those images where the R-phase occured signifi- cantly. These images show a loss of calculated overall diffracting volume. Regions of higher austenite amount seem to be correlated with regions showing this loss, i.e. with regions where R-phase is expected too. On basis of presented results these two are not distinguishable. Acknowledgements This work was supported by the Grant Agency of the Czech Technical University in Prague, grant No. SGS- 16/245/OHK4/3T/14. References [1] Šittner, Landa, Lukáš, Novák. R-phase transformation phenomena in thermomechanically loaded NiTi polycrystals. Mechanics of Materials 38:475–492, 2006. [2] T. Goryczka, H. Morawiec. Structure studies of the R-phase using X-ray diffraction methods. Journal of Alloys and Compounds 367:137–141, 2004. [3] V.K. Pecharsky, P.Y. Zavalij. Fundamentals of Powder Diffraction and Structural Characterization of Materials, 2nd edition, Springer, USA, e-ISBN: 978-0-387-09579-0, 2009. [4] Fort Wayne Metals - specification of Nitinol#1 alloy http://www.fwmetals.com/services/ resource-library/nitinol-1/ [5] ESRF official web page: ID15A - Materials Chemistry and Materials Engineering. [2016-10-14] , http://www.esrf.eu/UsersAndScience/Experiments/ StructMaterials/ID15A. [6] H. P. Stuwe,Y. Shimomura. Gitterkonstanten der Kubisch Raumzentrierten Phasen FeTi, CoTi, NiTi. Zeitschrift fur Metallkunde 51:180-181, 1960. [7] R. Kužel. Informace v práškovém difraktogramu a jeho zpracování. Materials Structure 10(1a): 18-19, 2003. 12 http://www.fwmetals.com/services/resource-library/nitinol-1/ http://www.fwmetals.com/services/resource-library/nitinol-1/ http://www.esrf.eu/UsersAndScience/Experiments/StructMaterials/ID15A http://www.esrf.eu/UsersAndScience/Experiments/StructMaterials/ID15A Acta Polytechnica CTU Proceedings 9:1–5, 2017 1 Introduction 2 Material and Methods 2.1 Nitinol 2.2 Quantitative Phase Analysis 2.3 Experimental 2.4 Data processing 3 Results and discussion 4 Conclusion Acknowledgements References