Grain rotation and lattice deformation during perovskite spray coating and annealing probed in-situ by GI-WAXS

Please note that technical editing may introduce minor changes to the text and/or graphics, which may alter content. The journal’s standard Terms & Conditions and the Ethical guidelines still apply. In no event shall the Royal Society of Chemistry be held responsible for any errors or omissions in this Accepted Manuscript or any consequences arising from the use of any information it contains. Accepted Manuscript


Introduction
Solution-processed mixed lead halide perovskites are promising candidates for opto-electronic devices. [1][2][3][4][5][6][7] In devices such as planar heterojunction solar cells, the perovskite layer can be deposited from a precursor solution of methylammonium iodide (MAI, MA = CH 3 NH 3 ) and PbCl 2 (3:1 mol) in dimethylformamide (DMF). 5,8 Thermal annealing above 80°C enables the conversion of the as-deposited polycrystalline precursor film to a polycrystalline MAPbI 3 perovskite, which is composed of platelet-like grains or crystallites separated by grain boundaries. 9,10 Recent results suggest that perovskite opto-electronic properties can be optimized by favouring the formation of large grains and, thus, minimizing grain boundaries. [11][12][13][14] Although grains can be visualized by transmission electron microscopy (TEM) and scanning electron microscopy (SEM), these measurements cannot be integrated with in-situ solution deposition nor with in-situ annealing under ambient conditions. Complex synchrotron 2D diffraction techniques based on hard X-rays, highly focussed beams, and transmission geometry, such as 3DXRD 15,16 , are also unsuitable. In fact, they can only illuminate a limited number of grains (limited number of diffraction spots on the same image) 17 , are not fast enough to investigate the structural changes that occur during the annealing of MAPbI 3 , and induce excessive beam damage.
Here we show that a statistically relevant characterisation of the slow dynamics of precursor and perovskite crystallites can be achieved with a simple setup. By employing standard synchrotron beamline optics, a beam spot size of ~500 × 100 μm 2 and a 2D detector, we measured thousands of highly resolved diffraction spots from single crystallites by insitu grazing incidence wide-angle scattering (GI-WAXS). This allowed us to follow grain rotation and lattice deformation within a MAPbI 3 precursor and perovskite in real-time as the sample was annealed.

Results and discussion
Measurements were performed at the XMaS beamline (ESRF) with a chamber equipped with a spray coater and an annealing stage. The MAI:PbCl 2 (3:1 mol in DMF) precursor solution was spray coated in-situ on a 1 cm 2 Si/SiO 2 substrate placed on a preheated (60°C) annealing stage for a period of 10 minutes. 5 Annealing was then performed under the same conditions on a preheated (110°C) annealing stage for 94 min. During both the initial deposition process and the subsequent anneal, diffraction images were collected above the critical angle (α i = 0.3°, corresponding to a penetration depth of ~150 nm). Fig. 1 shows 2D GI-WAXS images of the spray coated precursor and perovskite phases with azimuthally integrated line profiles, 10 illustrating the structural evolution that takes place during deposition and annealing. The full sequence of images recorded during deposition and annealing is shown in Video 1 and Video 2 (ESI †) respectively. Here images are represented in reduced scattering vector rectangular coordinates q z and q xy , where q xy = √(q x 2 +q y 2 ) and q x , q y , q z are the scattering vector components. We also employ scattering vector polar coordinates q and χ, where q is the distance and χ is the azimuthal angle (see inset in a). The polycrystalline film evolves during deposition and annealing over a number of stages. 10 Following the deposition of the precursor solution, the evaporation of solvent leads to the formation of a precursor polycrystal; a process accompanied by a simultaneous transition of the precursor to a perovskite together with perovskite crystallization. 10 After extended annealing, such perovskites undergo degradation. Specifically, following the first moments after deposition, two broad peaks are visible over the scattering vector range q = [0.5-1] and [1.5-2.5] Å -1 that originate from the presence of the casting solvent (see Fig. 1e, deposition time t d = 1 min). As the solvent evaporates, the precursor crystals nucleate and crystallise (Fig.  1b). 10 At the beginning of the anneal (Fig. 1c) the precursor peaks are still visible, however at annealing time t a = 94 min ( Fig. 1d) these features are no longer evident and have been replaced by peaks characteristic of the perovskite. As the measurements reported here were performed at 60°C (deposition) and 110°C (anneal), we index the perovskite features according to its previously reported cubic structure. 5,[21][22][23][24] Interestingly, it can be seen that the diffraction rings are composed of a large number of individual diffraction spots, resulting from diffraction by single crystallites. From the sequence of images shown in Videos 1 and 2 (ESI †), it can be seen that while most of these spots are stationary, hundreds of them move azimuthally during the deposition and the annealing process, indicating that the corresponding diffracting crystallites undergo rotation or reorientation. Note that further GI-WAXS measurements performed on films spin coated from the precursor solutions described here, and annealed under different atmosphere and different annealing temperatures were used to explore the dependence of grain rotation on film preparation conditions (see Videos 3-11, ESI †). We observed grain rotation in perovskite films spin coated under conditions that are similar to the ones followed during solar cell fabrication, in which we typically achieve ~12% power conversion efficiency (see Fig. S1 and Tab. S1, ESI †). Our GI-WAXS measurements suggest that the amount of rotating diffraction spots visible on the diffraction patterns increase with increasing amount of humidity or, equivalently, a higher level of precursor film hydration (see Fig. S2, ESI †). Indeed, the density of rotating spots observed in the spray coated films is enhanced compared to spin coated films as spray coated films are often slightly coarser and more porous.
Please do not adjust margins Please do not adjust margins To understand the grain rotation process in more detail, we have implemented a spot tracking routine to follow several of the moving diffraction spots. Here, we extract a series of 'tracks' that quantify the scattering vector of each spot along with its time coordinates. Videos 12 and 13 (ESI †) show 32 and 601 tracks detected during the spray coating and annealing phases respectively. We find that diffraction spots appear, move and then disappear, and thus the number of detected tracks varies as a function of time (the diffraction spots that move continuously are reorienting by rotation around an axis approximately parallel to the incident beam, while the diffraction spots that appear and disappear rapidly are rotating around other axes). As the precursor film dries, the number of tracks increase monotonically, indicating that the number of moving precursor grains increases as the solvent evaporates (see Fig. S3, ESI †). Note that one of the limitations of our method is that we are unable to associate different diffraction spots from different Miller planes belonging to the same crystallite. This would require acquiring multiple diffraction patterns at different ω sample orientations (with the rotation axis perpendicular to the substrate) with a fine ∆ω step size during the in-situ annealing, as in 3DXRD. 18,19 However, while this measurement could be possible with a fast detector, it would not be compatible with our experimental setup and with a grazing incidence geometry, and would be certainly complicated by the fact that the diffraction spots move during annealing. Fig. 2a and b show tracks detected during the anneal and then assigned to either the precursor or perovskite phase according to their location in the diffraction pattern. As shown in Fig. 2c, the number of precursor tracks reaches a maximum at t a ≈ 6 min and then decreases monotonically to zero, whereas the number of perovskite tracks reaches a quasiconstant value within 30 min after the start of the annealing. The fact that we see two populations of tracks that have different dynamics suggest that the motion of such tracks is not activated by the X-ray beam. 16 Our measurements thus indicate that precursor grains are formed within the first 6 min of the experiment and subsequently undergo thermally activated conversion to the perovskite in time-scales between 6 and 70 min. Fig. 2d and 2f show exemplary precursor and perovskite tracks, with their scattering vector polar coordinates plotted in Fig. 2e and 2g, respectively. Here, the azimuthally elongated shape is due to a combination of the spot moving during the acquisition of a single image and possibly the grain itself changing shape. The precursor track ( Fig. 2d and 2e) shows a monotonic negative azimuthal displacement, which indicates a continuous counterclockwise rotation of the precursor grain. The distance displacement is less regular (corresponding to a lattice contraction followed by an expansion) and is weakly correlated with the azimuthal displacement.
In contrast, the perovskite track ( Fig. 2f and 2g) located on the (210) ring undergoes a continuous positive azimuthal displacement that is negatively correlated to its distance displacement. It appears therefore that in this case, a clockwise rotation is accompanied by a tiny lattice expansion.
We find that this movement ceases at 26 minutes after the beginning of the annealing however this track does not disappear from the images.
We now turn our attention to the collective behaviour of the 601 grains that move during the annealing process. Fig. 3a and b shows azimuth (Δχ) and distance (Δq) displacement vs annealing time for all the tracks.
Typical Δχ curves display a trend described by A×(1-e -t/Δt ), where A is the maximum value of the azimuth displacement, t is the time, and Δt is a characteristic time constant. We find that grains rotate both clockwise (Δχ > 0) and counterclockwise (Δχ < 0) with around 58% of precursor and perovskite grains preferentially rotating counterclockwise (see Fig. S4, ESI †). The maximum value of Δχ is greater for the precursor tracks than for the perovskite tracks. As shown in Fig. S5 (ESI †), most of the precursor tracks start moving at t a,start ~7.0 min and then stop and disappear at t a,end ~15 min. Perovskite spots appear ~5 min later, move more slowly (see t a,rise ), and can be detected over the entire annealing process. The mean instantaneous velocity (Δχ/t) is roughly the same for tracks moving clockwise and counterclockwise (Fig. S6, ESI †).

Please do not adjust margins
Please do not adjust margins Finally, the mean value of χ per track is distributed uniformly over the angle range 30° to 70° (Fig. S7, ESI †), indicating that the rotating grains are evenly distributed in the diffraction patterns. In the exemplary tracks shown in Fig. 2e-g it can be seen that the χ and q profiles can be positively or negatively correlated. A statistical analysis presented in Fig. S8 to S10 (ESI †) of the cross correlation coefficient between Δχ and Δq shows that the total number of positively correlated tracks is ~54% and that most of the Δχ and Δq profiles are highly correlated.
We further classify precursor and perovskite tracks by training two self-organizing maps (SOMs) in MATLAB (see Fig.  S11 and S12, ESI †). 20 Fig. 3d shows the results from the SOMs clustering. The Δq vs Δχ tracks are classified by the Cartesian quadrant where they spend most of their time. We also show a schematic of the crystal behaviour in the insets of each cluster or quadrant. The percentage of clustered tracks is shown in the insets of each quadrant and reveals that 38% and 42% of precursor and perovskite grains respectively rotate counterclockwise and expand.
The apparent rotation of perovskite grains during annealing can be understood as resulting from the chemistry of the conversion precursor to the perovskite which has been described by the reaction PbI 2 + 3CH 3 NH 3 I → CH 3 NH 3 PbI 3 + 2CH 3 NH 3 Cl. 9 During this process, the evaporation of solvents (DMF and water) and the sublimation of CH 3 NH 3 Cl from the bulk can occur through gaps in the film and via grain boundaries between the grains of both precursor and perovskite phases. During this process grain nucleation and growth will occur at the expense of surrounding grains. Consequently, the crystallite grains will be subject to a strain causing their rotation and compression or expansion, with both processes evidenced here. To explore this further, we have performed SEM scans on representative perovskite films annealed ex-situ for different periods of time (see Fig. S13-S15, ESI †). We find that unannealed precursor films and films annealed for a short period of time display clear grains and grain boundaries. However, in samples annealed for 90 min, grains are smaller and appear fused together, and grain boundaries are less evident. Even though these measurements are not performed in-situ during the anneal, this suggests that the grain rotation described above is accompanied by grain fragmentation. The overall effect of this process is highlighted in Fig. 4 and Video 14 (ESI †) by a sequence of images collected in-situ on the same film area at different points during annealing by optical microscopy performed in reflection mode. It can be seen that the film undergoes a colour change due to the precursor to perovskite conversion. Notably, it also becomes more compact and shrinks during annealing, as shown by the increasing fraction of blue areas that correspond to the Si/SiO 2 substrate.

Conclusions
We have presented an investigation of the evolution of texture during the thermal annealing of mixed lead halide perovskites using in-situ 2D synchrotron GI-WAXS. For this class of polycrystalline materials, the use of a 10 keV wide-focussed Xray beam allows a large number of grains to be probed simultaneously. To explore this complex phenomenon, we have presented an efficient way to classify the behaviour of many hundreds of tracks using a self-organising map. The statistical picture that emerges indicates that individual precursor and perovskite grains undergo rotation and lattice compression or expansion during annealing; a process likely driven by strain within the film as a result of the chemical conversion process. Characterising and controlling the dynamics of crystal formation is essential in the development of perovskite films having improved flatness and order, as such characteristics are generally associated with improved device efficiency. the techniques demonstrated here can be employed in the study of a large range of other polycrystalline materials having similar crystallisation dynamics.

Experimental section Materials
Si/SiO 2 substrates were purchased from Ossila Ltd (UK), cleaned by sonication in isopropyl alcohol and deionized water, and dried with compressed nitrogen before use. Methylammonium iodide (MAI) powder was synthetized as per our previous works. 8,21 Lead II chloride (PbCl 2 , 98% purity) was purchased from Sigma Aldrich (268690, Aldrich). Precursor solutions of MAI and PbCl 2 (3:1 molar ratio) were dissolved in sequence into dimethylformamide (DMF) with a concentration of 664 mg ml -1 , heated at 70°C overnight to facilitate dissolution of solid material, cooled to room temperature, and then filtered through a 0.45 mm PTFE filter before use.

Experimental setup
Technical details on the XMaS (ESRF) beamline setup are reported on the beamline website www.xmas.ac.uk. The radiation coming from a bending magnet (critical energy E c = 9.8 keV) was monochromatised using a fixed-exit, watercooled, double crystal Si(111) monochromator, placed at 25 m from the source. A Rh-coated toroidal mirror was used to focus the monochromatic beam horizontally and vertically. The beam flux was ~5×10 10 photons s -1 at the sample position. The original beam spot size without slits was 500 (horizontal) × 400 (vertical) µm 2 at the sample position. We employed a set of slits immediately before the sample to have a better defined footprint in the vertical direction. The final beam spot size with slits was 500 (horizontal) × 100 (vertical) µm 2 . Note that the horizontal beam profile had a Gaussian shape with a FWHM of 500 µm. Note that the vertical beam profile had a top hat shape of width 100 µm as it was vertically clipped by the slits. We thus calculate a beam footprint of 500 (horizontal) × 1910 (vertical) µm 2 . A MAR 165 CDD detector with 2048 × 2048 pixel active area and 80 μm pixel size was placed at 203 mm from the sample, detecting 10 keV monochromatic X-rays. The distance between the sample and the detector was calibrated as in previous reports by tracking the direct beam position at different azimuth (2θ h ) and elevation detector (2θ v ) coordinates. [21][22][23] A custom-made annealing chamber (see Fig.   5) was manufactured via 3D printing. We used an EOS P110 3D printer (EOS GmbH, Germany) for the nylon plastic parts, and an EOS M270 3D-printer for the aluminium parts. Both printers build parts layer by layer, using a bed of powder that was melted with a laser. The P110 heated the build chamber to within 10°C of the plastic's melting temperature, and provided the rest of the energy to fuse the layers with a 30 W CO 2 laser. The M270 uses a 200 W fiber laser to directly sinter the aluminium powder. The chamber contained a heating stage that incorporated a cooling spiral that was connected to a chiller and a cartridge heater that was controlled via an Eurotherm temperature controller. The Si/SiO 2 substrate was kept in place on the heating stage through a small cavity connected to a vacuum pump. The annealing chamber was connected to a metal pedestal fixed on a cryostat mount (Huber 5012 mount). The cryostat mount fitted into the Huber 410 phi circle on the 11-axis Huber diffractometer. The spray coater employed for the preparation of the in-situ samples was made of a 3D metal printed cavity with 2D array of 500 μm holes and was placed 5 cm from the heating stage inside the annealing chamber. For the deposition phase, the heating stage was set to 60°C two hours before the actual deposition to avoid any thermal expansion during the measurements. The perovskite precursor solution was introduced in the spray coater metal cavity. Introducing a sample in the annealing chamber, sealing the chamber, flushing helium and starting the acquisition of diffraction images took ~1 min. The perovskite solution was sprayed on the sample by flushing nitrogen through the metal cavity from a manual valve located at the synchrotron beamline control cabin. After deposition, the sample was kept on the hotplate for ~10 min and stored in ambient conditions. For the annealing phase, the heating stage was set to 110°C three hours before the actual annealing to avoid any thermal expansion during the measurements. The deposited spray coated film had a thickness of ~1100 nm.

Image Processing
Data processing was performed using a GI-XRD MATLAB software. 24 The 390 images collected during the deposition and the annealing phases were remapped into scattering vector coordinates, as detailed in ref. 23 . The scattering vector is defined as q = k f -k i = [q x q y q z ], where k i is the incident wave vector and k f is scattered wave vector. Here, the scattering vector q is referred to the Euclidean norm of q. Images are represented in reduced scattering vector rectangular coordinates: q z and q xy = √(q x 2 +q y 2 ). We also refer to scattering vector polar coordinates: azimuth χ = π/2atan(q z /q xy ) in degrees and distance q = √(q xy 2 +q z 2 ), which corresponds to the wavevector 2π/λ, where λ is the beam wavelength. Intensity in the diffraction patterns shown in Fig.  1 is normalized between 0 and 1. Azimuthally integrated line profiles are generated as shown in ref. 24 between χ = 15.5° and χ = 88.5°, thus excluding the missing image cake below χ = 15.5° due to the pixel to scattering vector coordinates conversion. Line profiles are displayed using a linear scale. The weak PbI 2 peak due to perovskite degradation and near q = 0.9 Å -1 is only visible on a logarithmic scale.

Diffraction spot tracking
A spot-tracking program was written in MATLAB and integrated in the GI-XRD software. An original remapped image was treated with background removal and top hat filtering to enhance the local diffraction spots and facilitate 2D peak detection. An image processing MATLAB algorithm commonly used for tracking moving colloidal particles (J. Crocker's track.pro routine) was modified to work with the moving diffraction spots. 25 A matrix containing the ‫)ݕ,ݔ(‬ coordinates of the detected spots in each image and time (or equivalently image) index was fed into the tracking routine. As an example, in the 60 images of the deposition phase, the number of detected spots was 155420. However only tracks lasting more than 11 images (i.e. ~3 min) and with a maximum displacement higher than 10 pixels were selected. Large diffraction spots with displacement above 4 pixels were not considered. Diffraction spots with excessive overlap to other diffraction spots and stationary spots were also not included. For each track and each image corresponding to the track, we generated a region of interest (ROI) having the diffraction spot coordinates at its centre. The diffraction spot was fitted with a 2D Gaussian, which was then used as a shape-preserving filter to generate a new ROI, where only the diffraction spot is visible. The image was then converted to a black and white ROI and information on the diffraction spot shape extracted, such as area, eccentricity, orientation, etc. Videos of each single track were also generated (see ESI †). Videos were checked by hand and false tracks removed from the dataset. Under these conditions the number of tracks detected in the deposition image set and the annealing set was 32 and 601 respectively. We automatically analysed 980 and 32892 ROIs for the deposition and the annealing set respectively.

Track Clustering
During the deposition phase we did not observe any ring from the perovskite structure. However, during the anneal we observed reflections from both the precursor and perovskite polycrystal. The tracks detected in the annealing phase have thus been classified into precursor and perovskite tracks. Tracks within the perovskite rings that lasted until 80 min were classified as perovskite tracks. The remaining tracks were classified as precursor tracks. As discussed in the text, a further classification was performed of the precursor and perovskite tracks using a self-organizing map (SOM) in MATLAB. 20  dimensional reduction preserved the information on the track behaviour and was used to train the SOMs. The networks were trained using an unsupervised learning algorithm to produce a 2D topology allowing the layer to form a two-dimensional representation of the dataset topology. The SOM trained for the 529 precursor tracks dataset is illustrated in Fig. S11 (ESI †). The network consisted of a layer of 4 × 4 = 16 neurons or clusters and was trained 5 times (1000 epochs) with the default algorithm (trainbu). When a track vector was inputted to the SOM, the SOM returned one of the 16 clusters. Tracks were further manually classified based on the Cartesian quadrant where they were located. Intuitively we could have used a simpler 2 × 2 SOM, however the clustering strategy reported here was more effective. In the case of the 72 perovskite tracks, the trained 2 × 2 SOM performed effectively, and the use of larger SOMs did not result in any improved performance (see Fig. S12, ESI †).