Introduction

The attempts for finding new applications of Ni–Ti alloys are still continuing even after investigation of this material for over half a century. In the present work, we have focused on the characterization of a type of Ni–Ti shape memory alloy (SMA) which is aimed to be used as an artificial sphincter for human implantation. Such a sphincter assists in the opening and closing of veins, bowels, etc., as shown in Fig. 1a [1]. A Ni–Ti artificial sphincter will have several advantages over the existing ones which use conventional materials and a complicated control system, which include good corrosion resistance, good implantation tolerance, simple structure and easier controllability [2]. The design is based on the all-round shape memory effect (ARSME) of Ni–Ti which was first reported by Nishida and Honma [3]. The ARSME is actually a special and remarkable case of the well-known two-way shape memory effect (TWSME) describing the behaviour of an alloy which remembers one shape in its parent phase and the shape will dramatically change to the opposite side when temperature decreases below the phase transformation temperature, as shown in Fig. 1b. The ARSME effect can always be repeated in following heating and cooling processes after proper treatment of the alloy. Similar to conventional TWSME, the mechanism of ARSME effect is mainly controlled by the existence of Ni4Ti3 precipitates in the Ni–Ti alloy [4].

Fig. 1
figure 1

An illustration of a [1] application of Ni–Ti as artificial sphincter; b all-round shape memory effect in comparison with the conventional two-way effect

Ni4Ti3 is an intermediate phase in the Ni–Ti alloy which appears as precipitates with a lenticular shape and central plane parallel to the crystallographic {111}B2 planes in the B2 matrix [5]. There are in total eight possible Ni4Ti3 variants, but since two-by-two of these variants share the same habit plane, only four different orientation variants are typically considered [6]. Due to the orientation relationship with the matrix, usually maximum three variants are recognized in one single transmission electron microscopy (TEM) image. These precipitates control the phase transformation due to existence of a strain field [79] as well as a Ni-depletion area in the surrounding matrix [9, 10]. Quantitative information on these Ni4Ti3 precipitates such as size and density is important in determining the fabrication process and shape recovery properties. Low temperature ageing treatment (473–623 K) introduces small (<15 nm) and densely dispersed coherent Ni4Ti3 precipitates, which can improve the stability of the alloy during thermo-mechanical cycling by resisting the movement of dislocations. The formation of nuclei rather than growth of precipitates at low temperature ageing treatments enhances the shape recovery properties [1113]. When precipitates grow bigger than 15 nm with increasing ageing time and temperature, the density of precipitates decreases, leading to a decrease in critical stress for slip, and as such the maximum shape recovery strain was reported [12]. Incoherent precipitates start to appear when they grow larger than 300 nm in length, and transformation strain is reduced, which will not be concerned in the present paper.

The effect of Ni4Ti3 precipitates on the ARSME is mainly due to the particular growth and orientation of the precipitates during the training process. The sample experiences various types of loading in different regions during bending [14, 15], i.e. a tensile stress on the upper side and a compression stress on the lower side. The difference in stress direction directly causes a difference in preferential orientation of the Ni4Ti3 precipitates, and these differences will contribute the ARSME effect by controlling the phase transformation. Therefore, a good characterization tool can lead to a better understanding of anisotropic precipitation mechanisms in this alloy which can improve functional properties of the material.

In this respect, TEM is capable of reaching the needed magnifications and resolution, as well as obtaining information in the real and reciprocal space for observation of the precipitates. Unfortunately, the current day TEM data are often limited to averaged information over large numbers of (nano)grains as obtained by wide-beam diffraction techniques or to detailed atomic scale data on a few grains or selected defects as obtained by high-resolution imaging techniques. There is thus often a gap in information between the very small atomic scale and the potentially rather large unit containing the nanofeatures or crystallographic defects. As a result, there is a risk of missing the important scale of configurations of nanofeatures appearing in many of today’s advanced materials. Moreover, although the obtained data on individual grains or defects can be extremely detailed these days, the lack of good statistical information often leads to severe oversimplification when the observed nano/microstructure needs to be correlated with the functional and mechanical properties acting at higher length scales.

This current problem for TEM can be overcome using recently introduced automated crystal orientation and phase mapping (ACOM–TEM) [16] methods revealing the grain-by-grain configurations of nanofeatures in large regions. Such methods are comparable to, e.g. micro-scale orientation imaging microscopy (OIM) as obtained using electron backscatter diffraction (EBSD) in a scanning electron microscope (SEM). The application of such techniques in the TEM, however, provides a leap in resolution down to the nm scale, opening a whole new field of innovative research. Moreover, along with the automated OIM comes a variety of nanostatistical methods, which yield quantitative information never obtained before at this length scale and working speed.

A current ACOM–TEM system combines an electronic hardware component connected to the coils of the TEM, which scans the nanofocused electron beam over the sample in diffraction mode, yielding a high throughput with nm resolution. A software tool matches the observed diffraction patterns (DPs) for each scan point or pixel with a pre-calculated set of (kinematical) diffraction templates for known phases by simple cross-correlation techniques and produces phase and orientation maps of the nanograins in the entire sample, up to several microns in lateral size and including basic grain statistics and reliability information. In order to optimize the pattern matching, the system also includes a digital component through which each diffraction pattern can be obtained by precession electron diffraction (PED), reducing dynamical diffraction effects. In this work, ACOM–TEM was used as the main method for the investigation of Ni4Ti3 precipitates in the Ni–Ti alloy and different parameters of this technique were optimized. Despite the fact that already a large amount of research has been done on Ni4Ti3 precipitates, quantitative information such as size, distribution, and orientation of ensembles of nanoscale Ni4Ti3 precipitates at larger scale is still missing in the literature. Since this is the first attempt to apply this technique on precipitates in Ni–Ti alloys, the main goal in the present work is the optimization of experimental and computational ACOM–TEM parameters to obtain more reliable data to identify and quantify the different phases in Ni–Ti alloys, with the emphasis on the Ni4Ti3 precipitates. In the end, also some concrete results will be presented with respect to the actual sample under investigation.

Experimental Procedure

The samples were prepared from electrolytic nickel (purity ≥ 99.9%) and titanium sponge (purity ≥ 99.7%) through arc melting followed by rapid solidification via suction casting. The as-casted alloy stripe has a size of 70 × 8 × 0.5 mm3 and a nominal composition of Ni51at%–Ti. A solid solution treatment was applied to homogenizing the composition at 850 °C for 3 h under Ar (purity 99.9%) protective atmosphere and followed by water quenching. After solid solution, the alloys were divided into two groups. Those in the first group were placed in an arch-shaped die for stress-assisted ageing treatment at 400 °C for 100 h. The second group went through the same ageing time and temperature but without stress assistance.

Differential Scanning Calorimetry (DSC, Q200, TA) was applied to analyse the phase transformation behaviour and TEM was used to characterize the microstructure of the alloy. ACOM–TEM was used to further quantify the microstructure of the alloy. In the present work, a Tecnai G2 microscope equipped with a field emission gun (FEG) with a minimum spot size of 1.6 nm for the 20 μm condenser aperture and selecting the microprobe mode has been used. From the data acquired by ACOM–TEM, orientation as well as phase maps can be obtained together with quantitative information of precipitates such as size, distribution, volume fraction, etc.

Results and Discussion

Optimization Method and Extraction of Quantitative Data

As mentioned above, the application of ACOM–TEM is based on obtaining and identifying a series of diffraction spot patterns collected from a region of interest, so the whole process includes two parts: DP acquisition and indexation of collected DPs. Thus, the reliability of the final results is based on that of the separate steps and their combination. In most cases, the default settings of the ACOM–TEM technique are sufficient to obtain proper orientation and phase maps. However, the present Ni–Ti alloy proved to be a more demanding case, for several reasons.

In the present Ni51Ti49 sample, the area of interest contains both Ni–Ti B2 matrix and Ni4Ti3 precipitates. The reciprocal space of the B2 matrix is that of the common body-centred cubic (bcc, a = 0.301 nm) structure but without systematic extinctions due to the ordering of the two kinds of atoms. The reciprocal space of Ni4Ti3 precipitates which has rhombohedral structure (a = 0.670 nm, α = 113.9°) shares several basic reflections with that of the Ni–Ti B2 matrix, but rows of superspots appear in between the basic reflections along the 〈321〉B2 directions and dividing the length of this vector into seven equal parts [17]. In other words, in kinematical conditions, these superspots are the only sign to distinguish between the B2 matrix and precipitates, and for nanoscale precipitates these superspots have very weak intensity.

Since the final orientation and phase maps are a combination of both experimental data acquisition and calculation of templates, multiple parameters have to be taken into account in order to optimize the ACOM–TEM technique. At first, the software automatically provides a so-called degree of matching parameter Q i introduced to characterize the overall correlation index for a given diffraction template i. The software uses this parameter to determine the best template calculated with fixed settings to match with a given DP taken under fixed conditions:

$$Q_{i} = \frac{{\mathop \sum \nolimits_{j = 1}^{m} P\left( {x_{j} ,y_{j} } \right)T_{i} \left( {x_{j} ,y_{j} } \right)}}{{\sqrt {\mathop \sum \nolimits_{j = 1}^{m} P^{2} \left( {x_{j} ,y_{j} } \right)} \sqrt {\mathop \sum \nolimits_{j = 1}^{m} T_{i}^{2} \left( {x_{j} ,y_{j} } \right)} }} ,$$
(1)

where P(x,y) is the intensity function which represents the values from the experimentally collected data and T i (x,y) is the template function which describes the intensity function for every template i [18]. The summation is extended over the m nonzero reciprocal space points contained in the template. These two functions and their related parameters will be discussed below in more detail.

In this template matching technique, the template with the highest Q i is selected for a given solution. However, due to the fact that ambiguities are quite frequent, some unreliable measurements of a particular orientation cannot be avoided. Therefore, the degree of confidence should be characterized for each identification, for which a so-called reliability index R is defined as follows:

$$R = 100\left( {1 - \frac{{Q_{2} }}{{Q_{1} }}} \right) ,$$
(2)

where Q 1 and Q 2 represent the two highest values of Q i for distinct solutions of the template. If Q 1 is much higher than Q 2, then R will be large (ultimately till 100), which means only this Q 1 solution fits best and the result is deemed reliable. When Q 1 and Q 2 are quite close in value, R could be very small (close to 1), which indicates that several solutions are all possible for the indexing or at least hard to discriminate and the orientation and phase determination obtained by Q 1 is not very reliable. Since Q i and R are calculated for each pixel in the real-space image, the so-called reliability maps, with R values ranging from 1 till 100, can be produced. Conventionally, brighter colours mean higher R values [18].

The above-defined matching and reliability parameters are a measure on the precision of the match with fixed settings for a single DP (i.e. for each pixel) but does not provide an absolute indication on the final accuracy of the data which can further be optimized by changing the settings, both in the experiment and calculation. In order to discriminate results quantitatively between different settings, the χ 2 method which is widely used to quantify the similarity between two comparable objects is selected as the measurement of image representability. Because the goal of this research is to investigate the Ni4Ti3 precipitates in the Ni–Ti alloy, the recognition of precipitates in the image is the main concern. Length, width and perimeter are three parameters chosen to describe the shape of each precipitate and to compare different precipitates. For each precipitate, it is also possible to measure these three values manually, so a reduced χ 2 function can be defined as follows:

$$\chi^{2} = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \left[ {0.316\frac{{\left( {l_{i} - l_{i0} } \right)^{2} }}{{l_{i0}^{2} }} + 0.052\frac{{\left( {w_{i} - w_{i0} } \right)^{2} }}{{w_{i0}^{2} }} + 0.632\frac{{\left( {p_{i} - p_{i0} } \right)^{2} }}{{p_{i0}^{2} }}} \right] = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \chi_{i}^{2} ,$$
(3)

where n stands for the number of precipitates measured in one image and χ 2 i corresponds with one single precipitate. l, w and p represent length, width and perimeter, respectively. However, since the length and perimeter of the precipitate are measured with higher relative precision than the width, respective weights of 0.316, 0.052 and 0.632 are added based on each length ratio to the sum of l, w and p values. The subscript 0 stands for the manually measured values using conventional bright-field (BF) TEM images and i denotes the parameter measured from the ACOM–TEM results: a smaller χ 2 value thus means a higher similarity between these two measurements. This helps to optimize the parameters to achieve the best orientation and phase maps similar to original TEM results.

Throughout this paper, 8 different precipitates (see below) were selected in a phase map to analyse the influence of the technical parameters. Therefore, n in Eq. (3) equals 8 and χ 2 is the average over 8 different values.

In order to study the overall characteristics of the sample, the selected 8 precipitates should represent a diversity of size and orientation. Therefore, the statistical dispersion of the 8 \(\chi_{i}^{2}\) values is an important parameter and a standard deviation σ of \(\chi_{i}^{2}\) is introduced to describe the dispersion of these 8 values as shown in Eq. (4).

$$\sigma = \sqrt {\frac{1}{8}\mathop \sum \limits_{i = 1}^{8} \left( {\chi_{i}^{2} - \chi^{2} } \right)^{2} } .$$
(4)

So the larger the σ is, the less stable the matching between the BF image and the ACOM–TEM result will be when applying the optimized parameters for precipitates with other sizes and shapes.

The sample used for the optimization process came from the second group which went through 400 °C ageing for 100 h without stress assistance. The sample contains the expected Ni–Ti B2 structure as the matrix with dispersed Ni4Ti3 precipitates and there is no preferential orientation for different variants of precipitates.

Diffraction Pattern Acquisition (Intensity Function P(x,y))

The parameters controlling the acquisition of DPs are strongly related to the microscope operation. They include the semi-angle cone of precession (when PED is applied), the acquisition speed and related exposure time, the convergence angle of the electron beam, the probe size and so on. Any changes of these parameters can affect the quality of the acquired DPs with respect to the intended automated mapping.

Precession electron diffraction was first proposed by Vincent and Midgley in 1994 [19]. When DPs are collected using precession, the incoming electron beam is precessing on a cone surface and as such diffraction intensities are summed over a large number of slightly deviating beam orientations which increases the number of reflections that can be used for the template matching and removes strong dynamical effects from the DPs, even for thicker samples up to 100 nm [16]. An example hereof is seen in Fig. 2. The semi-angle of the cone is referred to as the “precession angle” and is the main parameter which affects the quality of the DPs and the subsequent determination of the orientation and phase maps [20]. The reduction of dynamical effects is important since the ACOM–TEM software does not take dynamical effects into account. The increase of the number of recorded reflections is useful since it can reduce ambiguity in the recognition, especially for low-index zones [21, 22].

Fig. 2
figure 2

The acquired diffraction patterns using ASTAR a without precession and b with precession angle of 0.8°

Thus, concerning the indexing efficiency, the first attempt to reduce this ambiguity should start from DP collection so as to produce better DPs with less ambiguity problems. This is achieved with the change of reflection intensity in the collected DPs when precession is applied. Figure 2 shows two DPs of a precipitate collected using ACOM–TEM without precession (Fig. 2a) and with precession angle of 0.8° (Fig. 2b). The DPs were collected along an off-zone axis, which is very common when scanning large regions using the ASTAR application. Numbers on the left side of the spots indicate their intensity, while some weak dots are still visible but not labelled. It can be seen that the number of visible spots increases in the DP acquired with precession and the reflections from high-angle crystallographic planes become clearer. Moreover, the intensity of all reflections also changes when precession is used. The average intensity of eight labelled spots in Fig. 2a is 133.1, while in Fig. 2b, the average intensity of 14 labelled spots is 100.7. Thus, the intensity of the labelled spots is relatively higher when no precession is used, indicating that precession can bring down the average intensity of a diffraction pattern which allows for a better recognition [23].

Table 1 shows results of the influence of precession on the phase mapping. Figure 3 presents phase mapping results taken with different precession angles (0°, 0.2°, 0.4° and 0.8°) and a BF image is also shown as the reference image in Fig. 3e (the latter also numerates the precipitates selected for the calculation of χ 2 in Eq. (3)). The large black spots in Fig. 3e are contaminated regions which are used as reference regions in phase maps. From Table 1, it is found that the best match between the calculated phase map and original TEM image is reached without using precession or with a small precession angle of 0.2° (smallest χ 2 values), but the σ, indicating the goodness of fit for various sizes of precipitates, is best in the case of 0.2° precession angle. For higher angles, both values strongly increase with increasing precession angle. This may at first be a surprise, since, as shown above, the superspots are better seen in higher precession modes and one would thus expect a better match with the Ni4Ti3 structure. The main reason for the loss in recognition of the present nanoscale precipitates in the precession mode is the lower spatial resolution compared with using the ACOM–TEM without precession. Indeed, when a still electron beam illuminates a pixel in the matrix very close to the precipitate–matrix interface, no Ni4Ti3 superspots will be visible. However, when this position is illuminated by a precessing beam also intensity from the neighbouring precipitate will be added to the DP and the superspots will be recognized by the software as precipitate structure, although the centre of the beam was still outside of the precipitate (see Fig. S1 in Supplementary Information). Therefore, the average size of recognized Ni4Ti3 will be larger than that in reality and this difference can be observed from Fig. 3a–d. Similar to the χ 2, the σ value also increases with precession angle, which indicates that a higher precession angle leads to a higher uncertainty for the indexing of precipitates. Consequently, using the precession angle of 0.2°, one can already improve the quality of DPs while keeping sufficient spatial resolution.

Table 1 Average χ 2 value and standard deviation (σ) for different precession angles
Fig. 3
figure 3

The phase mapping of Ni4Ti3 precipitates with different precession angles: a 0, b 0.2, c 0.4 and d 0.8° taken from the region shown in the TEM BF image of e and including the 8 selected precipitates to calculate χ 2, as indicated

The spot size and convergence angle of the electron beam are two other major variables affecting the spatial resolution or pixel size of the ASTAR results. The condenser lenses (C1 and C2) affect the spot size and the C2 condenser aperture size affects the convergence angle of the beam. The resulting spot size of the electron beam defines the minimum value for the spatial resolution of the technique. In principle, a smaller spot size for the scan leads to a higher spatial resolution, but since the intensity of the beam is also reduced, so will the diffraction spots hamper the automatic recognition of the pattern. Therefore, different spot sizes and C2 condenser apertures were used to reach the optimized spatial resolution, defined as the FWHM of the spot recorded on the CCD, and shown in Table 2 (an image of the set of apertures is shown in Fig. S2 of the Supplementary Information). It is seen that a 10 μm C2 aperture provides a relatively lower spatial resolution despite the variation of spot size and precession, which is due to the parallel incident beam caused by a small C2 aperture. Thus, 30 and 20 μm apertures are preferred for data collection in view of higher spatial resolution. The combination of C2 aperture, precession angle and spot size gives a variety of spatial resolution which can be further optimized as function of the actual microstructure of the sample.

Table 2 Spatial resolution (nm) of ASTAR with different spot sizes and C2 apertures with and without precession

Based on the results of Table 2, different ASTAR data are acquired using the optimized parameters to study both χ 2 and σ values in the final maps. The parameters are used in which the spatial resolution is close to 2.5 nm and step size of 2.5 nm was used to cover the entire selected region. The precession of 0.2° was also used to acquire these maps. The comparison of both χ 2 and σ values are presented in Table 3. The results show that the combination of a 30 μm C2 aperture with spot size #9 gives the smallest value for both χ 2 and σ. It should further be noticed that the thickness of the sample plays an important role and affects the intensity of DPs. Therefore, the optimized setting obtained in Table 3 can be changed for thicker samples, i.e. when the sample is thicker, 30–8 would be better because a brighter incident beam could be provided, and when a sample is thinner, 20–9 will be more suitable with weaker beam intensity. According to Table 3, all these three combinations have smaller χ 2 and σ value, which means there will be no major variation of accuracy in the final indexing.

Table 3 Average χ 2 value and standard deviation (σ) for different combinations of C2 aperture and spot size

Figure 4 and Table 4 show the influence of scanning speed on the final ASTAR maps. The optimized parameters (Table 3) were used to acquire these maps. Three scanning speeds were chosen as 25, 34 and 50 fps, which correspond to exposure times of 40, 30 and 20 ms, respectively. Figure 4 shows the effect of scanning speed on the quality of the DPs with line profiles taken along the red arrows in the acquired DPs. With the decrease of the scanning speed, the signal-to-noise ratio of the acquired spots and the number of visible spots increases, which will both lead to better indexing. It is obvious that the quality of DPs improves with the decrease of scanning speed and Table 4 quantitatively shows the influence of scanning speed on the ASTAR maps. As expected, slower scanning speed increases both accuracy (χ 2) and data stability (σ): data stability is already strongly improved when changing speed from 50 to 34 fps, while shape accuracy increases fast when changing speed from 34 to 25 fps. For the study of a Ni–Ti alloy with precipitates, a relatively large region is required for analysis. For a typical 1 μm × 1 μm image, it takes about 106 min to acquire the data with a scanning speed of 25 fps and a step count of 2.5 nm. Thus, a scanning speed slower than 25 fps will induce a dramatic time for acquisition and sample drifting could become a serious problem while the improvement of indexing accuracy is very limited because 25 fps already gives strongly improved χ 2 and σ values.

Fig. 4
figure 4

Acquired DPs using ASTAR with different scanning speeds a and d 50 fps; b and e 34 fps; c and f 25 fps; d, e, and f line profile of the corresponding arrow shown in a, b and c, respectively

Table 4 Average χ 2 value and standard deviation (σ) of the ACOM–TEM maps acquired in different scanning speeds, other parameters kept constant: C2 = 30 μm; spot size #9; precession angle 0.2°

Template Generation and Calculation (Template Function T i (x,y))

Template generation and calculation parameters are directly associated with the ASTAR software and include template generating parameters—excitation error, intensity scale, etc.—and diffraction pattern indexing parameters—distortion correction constant, camera length and noise threshold. Most of these parameters can be modified off-line and they play an important role in the final ACOM–TEM maps.

For most cases, default settings for template generation work well, as seen from the example shown in Fig. 5 in which NiTi2 precipitates are distributed at grain boundaries in an aged Ni–Ti B2 sample. Both structures are well recognized and distinguished by the software, even when using the default settings. Although NiTi2 has a very large lattice parameter (a = 1.132 nm, cubic) with 136 atoms in the unit cell yielding fairly dense DPs, this complexity in the DPs does not cause any difficulty in the indexing step. This is because the DPs generated by Ni–Ti B2 and NiTi2 are quite different and without overlapping spots. Thus, despite the fact that the acquired DPs will never represent the complete generated patterns, the indexing results can be good. In contrast, Ni–Ti alloys containing Ni4Ti3 precipitates in a Ni–Ti B2 matrix have common spots which make it difficult to generate sharp maps. One way to improve the quality of the maps is to optimize the parameters of the template generation.

Fig. 5
figure 5

ACOM–TEM and conventional TEM images of Ni–Ti sample with NiTi2 precipitates at grain boundaries: a orientation mapping, b phase mapping, c conventional TEM bright-field image

When the Bragg condition is not fully satisfied for a given reflection, the spot appears weak in the DP. The allowed excitation error is one of the important parameters in the template generation process and is defined as the allowed deviation from the perfect Bragg condition for a certain reflection to be included in the template. The excitation error value is represented as the distance from the reciprocal lattice point G to a point on the Ewald sphere measured along the vertical direction to the upper surface of the specimen. In the template generation software, this value is set from 0 to 1. Excitation error 1 allows for a maximum number of reciprocal space points (around 20,000 in the case of Ni4Ti3 at 200 kV), and when it is approaching 0 only the (000) spot will be visible since all other spots will slightly deviate from the Ewald sphere and will not be included due to a small excitation error. Table 5 shows the effect of excitation error on the quality of ACOM–TEM phase maps in the Ni–Ti alloy (and using the optimized parameter values from the above DP acquisition part). When decreasing the allowed excitation error value, the spots in higher-order Laue zones (HOLZ) are eliminated, consequently decreasing the quantity of spots involved in the generated templates for the indexing. For the experimentally acquired DPs, the number of visible spots is normally lower when compared with the templates. This difference in number of HOLZ points between real and simulated DPs will influence the indexing results which will thus strongly depend on the excitation error. Figure 6 shows four phase mapping results with different excitation error values obtained from the region indicated by the dashed line in Fig. 6e. It is clear that when the excitation error equals 1, which is also the default value, the recognition of precipitates becomes very difficult. Increasing the excitation error greatly improves the quantity of higher-order spots in the templates and these spots are hardly visible in the acquired DPs. Also, the difference between these calculated DPs is actually quite narrow, so that when matching them with the experimental DPs, very similar Q i values are obtained, which in the end lowers the reliability and adds noisy spots in the maps. When the excitation error becomes too small, the templates generated contain insufficient reflections to properly complete the indexing. According to Table 5, an excitation error of 0.2 fits best with the original shape of the precipitates based on the average χ 2 value and standard deviation σ as defined above.

Table 5 Average χ 2 value and standard deviation (σ) with different excitation errors, acquisition parameters kept constant: C2 = 30 μm; spot size #9; precession angle 0.2°, scanning speed 50 fps
Fig. 6
figure 6

The phase mapping of Ni4Ti3 precipitates with different excitation errors: a 0.1, b 0.2, c 0.5 and d 1 and taken from the same region shown in the TEM BF image of (e)

The intensity scale (IS), which is defined as the intensity ratio between different spots in calculated DPs and is defined between 1 (default) and 100 (all reflections have equal intensity), is another parameter that affects the accuracy of ACOM–TEM final maps. The intensity difference between different spots in a DP is a combination between scattering conditions such as orientation and thickness of the crystal and scattering factors of different elements involved. However, since the thickness of the sample is often not known, dynamical scattering cannot be completely ruled out and absorption is not taken into account, the default IS setting is often insufficient for a good match. Table 6 shows the effect of the IS value on the quality of obtained phase mapping based on the calculated average χ 2 value and standard deviation (σ) (using the above-obtained optimized values for the acquisition parameters). Additionally, Fig. 7 shows four phase mapping results with different IS values obtained from the region indicated by dashed line in Fig. 7e. An IS of 14 provides the optimized results and similar shape of precipitates compared with the original TEM image, as seen in Fig. 7b. The default IS value of 1 reveals the worst result for the phase mapping, with the boundaries of several precipitates being blurred when compared with Fig. 7b–d. When IS is higher than 14, the change in the average value of χ 2 is less obvious than the case when IS is smaller than 14. Smaller IS value means higher ratio between high intensity and low intensity spots, which will enable templates to match weaker intensity spots with higher sensitivity, therefore causing blurred boundaries and large areas of noisy spots, as is indeed the case in Fig. 7a. Thus, the application of an IS value of 14 for Ni4Ti3 precipitates provides the best result for the phase mapping.

Table 6 Average χ 2 value and standard deviation (σ) with different intensity scales (other template generation and acquisition parameters kept constant: excitation error = 0.2; C2 = 30 μm; spot size #9; precession angle 0.2°, scanning speed 50 fps)
Fig. 7
figure 7

The phase mapping of Ni4Ti3 precipitates in Ni–Ti alloy with different intensity scales a 1, b 14, c 20 and d 50 taken from the same region shown in the TEM bright-field image of (e)

The template-generated angular step (step counts) is the third parameter to discuss. Using the template generation software, all the templates are generated with an angular step of the order of 1°. Increasing the step count provides more generated templates so that the degree of overlap between two successive templates increases, and thus can improve the indexing result. However, this improvement also depends on the lattice structure and symmetry of the calculated unit. For example, for a cubic lattice, due to the high symmetry, the templates covering two standard triangles (one basic and one a cross-check) on the stereographic projection map are sufficient to be used for indexing, which requires approximately 3000 templates to be generated [24] with a relevant step count of 80. Thus, due to the lower symmetry of Ni4Ti3 precipitates (rhombohedral crystal structure), larger angles need to be covered with templates at an angular step of 1°, and a higher step count is required.

Table 7 shows the influence of different step counts. The generated templates with step counts of 50 and 100 are insufficient, as seen from the higher χ 2 value. For a step count of 120, the result is much better, but when the step count increases to 200, the χ 2 value becomes higher again, thus consuming a longer time for calculation. The latter is a consequence of a large amount of templates which are involved in the calculation. As a result, the degree of overlap between two successive templates becomes too high, which will cause the appearance of similar Q i values complicating the interpretation of the reliability values.

Table 7 Average χ 2 value and standard deviation (σ) with different step counts (other template generation and acquisition parameters are kept constant: excitation error = 0.2; IS = 14; C2 = 30 μm; spot size #9; precession angle 0.2°, scanning speed 50 fps)

Optimization Results

The above-obtained optimized parameters of experimental and calculated DP of Ni4Ti3 were applied to a feedback test. For the template generation, the optimized parameter values are excitation error 0.2, intensity scale 14 and step count 120; for the data collection, the optimized parameter values are precession angle 0.2°, spot size #9, 30 μm C2 aperture and 50 fps scanning speed. For the B2 matrix phase, the template generation was performed using the default and optimized values. Still, for a complete indexing process in which the data acquisition and template generation results are combined, several other parameters are also involved. However, it was found that those parameters have limited influence on the final results when compared with the parameters discussed above. Thus, all parameters which were not discussed above are kept as default values throughout this article. These parameters include: smoothing radius 5, centre shift 10, softening loop 1, spot radius 5, noise threshold 10, gamma 0.5 and fast matching using 10 test counts.

The result of the feedback test using the above-optimized values for the Ni4Ti3 precipitates and default values for the B2 matrix is shown in Table 8. χ 2 and σ values are small which means the shape of the precipitates is properly displayed. The phase map result for this case and the corresponding reliability map is shown in Fig. 8a and b, respectively. Despite the shapes of the precipitates being properly represented, the overall phase map is not perfect. Large areas of miss-indexed noisy spots appear on the matrix region of the map. In the reliability map, precipitates have higher reliability (brighter regions) compared with other regions of matrix. Concerning the fact that optimization of template generation was only finished for precipitates, this reliability image gives an impression that the indexing of the matrix may play an important role. Thus, a new optimization was also made on template generation for the Ni–Ti B2 phase and the result can be seen in Table 8. The parameters of default setting for Ni–Ti B2 are as follows: excitation error 1, intensity scale 1 and step count 50. Despite that B2 structure has smaller lattice parameter for matrix indexing, excitation error 1 is still too large to be applied. Hence, excitation error will be reduced in the optimized template. As for step count, it was discussed in the optimization of step counts of precipitates already that for cubic structure, the step count should reach 80 to ensure a complete indexing. Optimized template for B2 changed excitation error from 1 to 0.5 and step count from 50 to 80, while the intensity scale keeps unchanged because the matrix is less sensitive to the intensity changes in DPs. The mapping result of optimized B2 template is shown in Table 8 and Fig. 8. Comparing Fig. 8a and c, phase mapping with optimized B2 template displays cleaner matrix with much less miss-indexing regions. The mean intensity values of two reliability maps, Fig. 8b and d, which represent default and optimized reliability maps, respectively, are measured 87.4 and 108.4, respectively. According to the definition of reliability in the software, higher intensity value indicates a higher reliability for the indexing results. Thus, it is clear that new template for the B2 matrix improves the reliability of indexing. In Table 8, the change in B2 template has very limited effect on the indexing result of Ni4Ti3 precipitates. The χ 2 slightly increases meanwhile σ decreases, but both of them are in very small variation range. Hence, it can be concluded that the optimized B2 template improves the indexing accuracy in the matrix without a large influence on the precipitates.

Table 8 Feedback result applying optimized parameters. For P(x,y), spot size #9, C2 = 30 μm, precession angle 0.2°, scanning speed 50 fps
Fig. 8
figure 8

The phase mapping of Ni4Ti3 precipitates in Ni–Ti alloy with different Ni–Ti B2 template generations: a default template, c optimized template, and reliability maps b default template and d optimized template, all taken from the same region shown by dashes in the TEM bright-field image of (e)

Using the above-optimized parameters, the 2D volume ratio of precipitates in the present ARSMA which was stress-free aged at 400 °C for 100 h was found to be 17.6%.

Conclusions

Automated crystal orientation and phase mapping in the TEM were used to obtain quantified orientation and phase maps of nanoscale Ni4Ti3 precipitates in a Ni–Ti all-round shape memory alloy. In order to properly and quantitatively determine the distribution of the precipitates using ACOM–TEM, different acquisition, template generation and indexing parameters were used and optimized to achieve reliable maps. The results show that the precession (even for small angles) is an important additional technique because it increases the reliability of indexing the acquired DPs from precipitates. In a Tecnai G2 instrument, the combination of 30 or 20 μm C2 aperture with spot size #8 or #9 provides high-quality DPs, however, with the optimal combination affected by sample thickness. A relatively slow scanning speed of around 25 fps improves the DP quality. For template generation, default settings need to be changed for both the Ni–Ti B2 matrix and Ni4Ti3 precipitates. The templates of the Ni4Ti3 precipitates should be generated with an excitation error of 0.2, an intensity scale around 14 and a step count of 120. For the templates of the Ni–Ti matrix, the optimized excitation error equals 0.5, the intensity scale 1 and step count 80. The resulting volume fraction of Ni4Ti3 precipitates equals 17.6%.