A greyscale erosion algorithm for tomography (GREAT) to rapidly detect battery particle defects

Particle micro-cracking is a major source of performance loss within lithium-ion batteries, however early detection before full particle fracture is highly challenging, requiring time consuming high-resolution imaging with poor statistics. Here, various electrochemical cycling (e.g., voltage cut-off, cycle number, C-rate) has been conducted to study the degradation of Ni-rich NMC811 (LiNi0.8Mn0.1Co0.1O2) cathodes characterized using laboratory X-ray micro-computed tomography. An algorithm has been developed that calculates inter- and intra-particle density variations to produce integrity measurements for each secondary particle, individually. Hundreds of data points have been produced per electrochemical history from a relatively short period of characterization (ca. 1400 particles per day), an order of magnitude throughput improvement compared to conventional nano-scale analysis (ca. 130 particles per day). The particle integrity approximations correlated well with electrochemical capacity losses suggesting that the proposed algorithm permits the rapid detection of sub-particle defects with superior materials statistics not possible with conventional analysis.


INTRODUCTION
The use of lithium-ion (Li-ion) batteries has increased dramatically in recent years, especially in the automotive sector through their use in battery electric vehicles (EV) and as such, the demand for longer lasting and higher performance batteries has increased. To meet this demand, much work is dedicated to developing the materials of each component within the Li-ion cells, with notable emphasis on understanding the degradation of cathode materials 1,2 .
For EV applications, LiNi x Mn y Co z O 2 with a high nickel content (i.e. where x > 0.5) can offer high-rate, high-capacity performance 3 ; moreover, the reduction of the cobalt content can circumvent ethical, toxicity, and cost issues in the supply-chain 4 . As the performance benefits generally scale with the nickel content, chemistries with up to 80% nickel are of particular interest, e.g. LiNi 0.8 Mn 0.1 Co 0.1 O 2 or NMC811. However, despite its superior performance, the NMC family suffers from a wide range of degradation mechanisms, causing capacity losses that typically become more severe as the nickel content increases 5 .
A desirable aspect of nickel-rich NMC materials is that higher specific capacities can be accessed at lower cell potentials which is often true for low cycle numbers. However, structural instabilities prevent high reversible capacities in practice, causing significant capacity fade 6 . For instance, undesirable phase transitions 7-10 , increased transition metal dissolution [11][12][13][14] , gas release 15,16 , the formation of micro-cracks [17][18][19] , and the presence of various defects 20 leading to an increased capacity fade 21 , have all been reported in the operation of nickel-rich chemistries from investigations occurring across multiple length-scales 22,23 . Cracking is a significant issue for NMC811 and is a key point of interest for both academic and industrial research.
In order to access increased capacity, the cathode can be cycled with an increased upper cut-off voltage, however, this causes the material to undergo a significant contraction of the c-lattice (representing the inter-layer spacing between the transition metal ion sheets in the crystal structure) at high voltages, which is thought to be major source of micro-crack generation 24 leading to decreases in capacity retention 25 . Furthermore, during fast charging, significant state of charge (SoC) and accompanying lattice parameter heterogeneities can be observed, leading to elevated crack formation within the active material from mismatched strains 26 .
X-ray computed tomography (CT) has been widely used in Li-ion battery research for many years 27 ; providing a non-destructive imaging platform that allows the cell microstructure to be resolved at high resolutions whilst also yielding a large enough volume to draw statistically significant results. To enable such large data sets to be analysed, new methodologies are required which include the use of computational algorithms. Petrich et al. 28 used such an algorithm to automatically detect cracks within particles by looking for particle pairs within datasets. It has been shown that tracking defects within particles 29 in combination with neural networks 30 can allow broken particles to be identified. The quantification of heterogeneous degradation through an electrode was achieved by Yang et al. in 2019 31 through reporting the damage extent (cracks) of particles at various locations and categorizing them into damage groups. In these studies, relatively large defects/cracks must be present within particles for automatic identification, while smaller micro-cracks within particles are not considered. With all studies, the quantification precision increases with spatial resolution assuming that there is a fractal-like dependency, or similar, upon the feature analysed, i.e., smaller voxel lengths are required to analyse smaller features 32 . Furthermore, the representative accuracy of the quantification can be improved by analysing a greater number of particles, i.e. larger volumes and more particles. A trade-off must be drawn between the voxel size (resolution) and total volume analysed, therefore there is motivation to develop ways of accurately detecting features of interest within large volumes, which would otherwise have required higher resolutions (leading to commensurately smaller analysis volumes).
In this work, we describe and apply a method for 3D particle defect (large heterogeneous voids or cracks) detection within a Liion battery cathode material, NMC811. Through the use of ex-situ X-ray CT, our algorithm was applied to individual particles within printed commercial electrode sheets taken from a comprehensive electrochemical test matrix described elsewhere 20 . In doing so, statistically significant correlations were extracted and particle defects quantified. The trends displayed indicate the particle integrity across the electrode, and provide an insight into the degradation on a particle-by-particle basis. Significantly, this method enables micro-crack detection, before full particle fracture occurs, with the ability to infer cracks below the resolution of the instrument (sub-200 µm in this instance), enabling early degradation to be quantified. This algorithm opens an avenue for particle analysis with high statistical confidence that is not limited to Li-ion batteries but may also be applied to the wider fields of research such as geotechnical engineering 33 and metal 3D printing 34 .

RESULTS
Tracking the radial density profile through each particle gives valuable insights into the degree of inhomogeneity of each particle, alongside the ability to show how the average particles are affected by different extrinsic and intrinsic factors. This can be tracked through the intensity value for each voxel within the particle, with a higher value corresponding to a brighter or more X-ray attenuating region.
The intensity of each voxel is related to the attenuation of the material within that voxel via the Beer-Lambert law (Eq. (1)).
With the incident beam intensity, I 0 , and sample thickness, d, being relatively constant across all scans (since all samples were similar size/thickness/porosity and the beam settings were the same), the mass attenuation coefficient, µ, is the key variable for determining the transmitted beam intensity, I. The transmitted X-ray intensity is used to reconstruct 3D volumes via filtered backprojection (FBP) algorithms producing a tomogram consisting of many voxels (3D pixels) each with a greyscale value that corresponds to the average X-ray attenuation of the material within the volume of that voxel (Eq. (2)).
where the voxel length L v is sufficiently small that the spatial positioning of the constituent atoms is assumed to have negligible effect upon the incident X-ray intensity for that atom within the voxel, I 0 . The mass density of the voxel, ρ v , is taken as the average of all constituent materials within the voxel volume. The mass attenuation coefficient is calculated as it would be for any mixture of materials, using the wight fraction, w i , of the ith atomic constituents and each with their own mass attenuation coefficient, μρ −1 .
A low greyscale value corresponds to a low X-ray attenuation (i.e. high X-ray transmission); consequently, voxels that contain the pore phase of an electrode have a significantly lower greyscale intensity than those containing NMC material. If a voxel contains both NMC and pore, i.e., is under-resolved with regards to spatial resolution, the greyscale intensity will be reduced from the theoretical value of NMC but would not be as low as a voxel that contains exclusively pore space; this mechanism is typically referred to as partial averaging, or the partial volume effect 35 . Damage within particles (e.g., cracking) is therefore also represented by a reduction in the greyscale intensity, a feature which can be leveraged in order to obtain information beyond the spatial resolution of the imaging instrument 20 and forms the basis of the algorithm presented below.
As a preliminary trial and proof of concept, individual particles of interest were manually identified from the reconstructed image, by selecting particles with visual defects (cracks, voids or radial greyscale variations). These particles were cropped to size, and imported into FIJI 36 where two 1D line profiles were computed for the central slice through the particle centre at 90°to one another, i.e. in orthogonal x−y and x−z planes. Following this, the data was smoothed to remove excess noise, with the particle ortho-slices and their respective line profiles shown in Fig. 1a-c. This methodology enables clear detection of voids (Fig. 1c) due to the large intensity decrease at the centre. However, more complex features (micro-cracks or radial gradients) are indistinguishable using this method, likely due to lack of data per particle (i.e. poor materials statistics). Furthermore, the time-consuming nature of hand selecting particles is not feasible for large data-sets, presenting a requirement for automated multi-particle analysis. Due to this manual method's inability to capture the intensity values throughout the full particle (because only two orthogonal planes are examined), and the highly time consuming requirement of finding, cropping, and exporting individual particles (manual isonaltion and segmentation), an improved algorithm was developed in MATLAB that allowed greyscale analysis in all directions (not limited to two planes) for multiple particles at once. The aim of this algorithm is to ensure more information about the intensity is preserved, while still reducing the processing time, allowing morphological features characteristic of degradation to be more easily found and quantified with statistical confidence.
The updated algorithm scans each voxel of a tomogram to find particles, and assigns a unique number to each particle, based on its spatial location (similar to geographical co-ordinates). From this, an aerial loading map can be produced, and the surface of each particle is known. Utilizing the greyscale tomogram (Fig. 2a), the intensity value for each point of the surface of the particle is found, and averaged for the entire surface, to produce a singular intensity value. Following this step, iterative morphological erosion takes place, repeating n times until the core of the particle is reached, producing a greyscale value with respect to particle position. Finally, the surface area between particle and pore, alongside the particles volume is recorded and tracked.
Naturally, a larger number of voxels are required to comprise a structure with a larger surface area; consequently, the number of data points taken at the particle's surface (i.e. iteration 1) is higher than at the particle core (i.e. iteration n), thus random noise increases drastically as the algorithm approaches the nth iteration, i.e. at the particle core. Therefore the values for the greyscale at the particle core are not traditionally considered for analysis, however, all other values can be considered, and when compared to many other particles, e.g. hundreds or thousands of others, greyscale values (g) and local greyscale variations (Δg) due to noise can be removed and functions determined, e.g., g = f(r) and Δg = f(r).
To enable the algorithm to correctly detect the particle surface, two masks are created, via interactive thresholding and smoothing if necessary. The first contains all active materials (Fig. 2b), and the second contains any pores/internal voids within the data set (Fig. 2c). These masks are superimposed over the greyscale data to guide the search process and ensure erosion only takes place at exterior surfaces. Due to the imperfect nature of segmentation, a sensitivity analysis on this features has been completed and is discussed below.
To ensure that segmentation is not influencing the results, a sensitivity analysis on these functions has been completed on the pristine sample. Segmented data sets with 5% over or under segmentation have been computed, compared to the best segmentation effort. Figure 3a displays this information, for particles >6 µm, and Fig. 3b for particles between 3 and 4 µm. It is clear that there are three distinct bands, each is associated with a segmentation method. An over segmentation, labelling pore A. Wade et al.
space as particle, results in the outer surface having a lower intensity than expected, so when normalizing the interior to this surface, the interior appears at a greater relative intensity. The opposite can be said for under segmentation. Over segmentation has a larger deviation from the "ideal" scenario, and therefore when segmenting it is advised to err on the side of an under segmentation. From this we can conclude that the segmentation is critical to achieving accurate results, and care should be taken to 1D line scans through individual particles for an intact particle (a), cracked particle (b), and particle with an internal void (c), and their respective greyscale variations through the radius of the particle. The scale bar is 10 µm for each particle. ensure the most accurate segmentation possible. It should also be noted that a 5% increase in segmentation is a large error, and as such is far outside the expected user error possible when completing this stage in the process. It is also important to note that this method may be applied for automated particle segmentation; the sequential application of this GREAT algorithm with local segmentation can serve for the basis of a fully autonomous segmentation package. Finally, the focus of this work are defects below the surface, which do not heavily rely on surface mapping, and that any SEI present on the cathode will have negligibly effect on the surface intensity due to its low X-ray attenuation.
If we plot all particles >6 µm in diameter, from the pristine electrode, we can see there are three major trends (Fig. 3c). The intensity of some particles fall rapidly towards the centre, the majority stay constant, and some increase. It is likely that some of the aggressively decreasing particles are due to internal voids within the particles, alongside some showing distinct changes in density. Clearly, to plot all particles from every electrode in this fashion would lead to nonsensical volumes of information in single plots. Therefore, an average is taken for each Euclidean distance from the surface, for setting size-bounds. The pertinent question is then, does the selection of these size bounds influence the results? To evaluate this, three bounding regimes were used, Fig. 3 The requirement for careful segmentation and bound size selection. Comparison of segmentation and separation methods from the pristine sample for a particles larger than 6 µm and b particles between 3 and 4 µm. c all particles larger than 6 µm from the pristine sample (each particle represented by a different shade of grey).
A. Wade et al.
as described in Table 1, and the influence from these bounds can be evaluated via analysis of the number of particles in each bound and the standard deviation of the final values.
A balance must be found between small bounds that have a more even split of particles, and having enough particles within each bound for the results to be significant. For the small bounds, there are very limited numbers of particles in the larger bounds, with the reverse happening for the larger bounds, with the hybrid approach providing a middle ground.
The standard deviation of every averaged point within a bound can be found, giving the spread of intensity values for each point, then divided by the original value to give the percentage deviation that is present at each point. The average standard deviation for the entire bound can then be found, and has been done for the pristine sample with the three bounds described above, and displayed in Table 2. Each bounding method produces a similar trend, with the variation being largest for the smallest particles, when they are the most particles present. Using the smallest bounds gives the lowest variation, however, this is likely since the minimal number of particles present in the largest size bounds.
The hybrid approach is used for the remainder of the results to reduce the effect of lone particles and more equally distribute the particles throughout the bounds, but as shown above, the choice of bound should not have a minimal impact on the overall result (full standard deviation for the hybrid bounds is shown in Supplementary Fig. 2).

Electrochemical cycling
In this study, eight electrodes have been studied, each with a unique electrochemical history, seven of which have been cycled against graphite, and one sample, the pristine, has never been inside a cell. The control sample has been cycled to 4.2 V at a charging rate of 0.5C for 5 cycles and is the baseline for all cycled samples. Subsequent samples have been cycled to either increased upper voltage limits, (4.3 V, 4.4 V or 4.5 V), increased C-rates (2C or 5C), or an increased number of total cycles (100 cycles), with the full electrochemical history described in the methodology section. Cycling at 5C, 4.4 V, 4.5 V or 100 cycles will be classified as 'aggressive'. The variation in cycling parameters enables the condition that causes the largest effect on degradation to be identified. At the end of charging, CV holds were carried out until the C-rate was below C/20, with all discharge conducted at 0.5C (1 d.p.) to 3.0 V (detailed cycling history is shown in Supplementary Fig. 1).
During the formation cycles all cells performed similarly, reaching a capacity between 182-202 mAh g −1 after the first formation charge, and 149-170 mAh g −1 after the second formation charge, as shown in Fig. 4a. The decrease in capacity is as expected as lithium loss due to SEI formation will be present during these two formation cycles to 4.2 V. All cells cycled to a higher voltage than they were formed at display an increase in capacity during their first cycles, as would be expected since the higher voltage enables more lithium ions to be removed and therefore a greater capacity to be reached. All cells experienced large losses in capacity between the first and second cycles. This is to be expected and is due to both kinetic limitations within the electrodes, alongside parasitic irreversible side processes [37]. The losses are large for the highest charging rate (~15% decrease compared to~11% for the control), indicating kinetic limitations could be a major contributing factor. Cells taken to higher voltages see the greatest decreases in capacity, a 28% decrease for the 4.4 V cell and 27% for the 4.5 V. This is expected since the extra lithium removal would likely lead to further SEI formation on the anode, reducing the Li + inventory for subsequent cycles. Another factor causing the large losses is the potential for the initiation of a host of degradation mechanisms, such as surface restructuring, micro-cracking and/or transition metal migration. By investigating further cycling, the effects of any degradation mechanisms on the cell can be observed, without the ability to pinpoint the underlying causes of the losses.
The capacity losses as a percentage of the first and second cycle capacities can be seen in Fig. 4b, c. The control cell (4.2 V, 0.5C), shows a 12.8% decrease in capacity through its test, with 11.1% occurring after the first cycle, with a 1.7% loss thereafter. An increase in the charging rate causes capacity losses of 13.1% and 16.6% for 2C and 5C, respectively, with the losses after the first cycle being once again small, at 2.4% and 1.9%, respectively, indicating little degradation. Moving to the higher voltage studies, where in particular 4.4 and 4.5 V experience not only extremely large first cycle losses, but large capacity fade through the subsequent cycles (last charge at 121.3 and 113.5 mAh g −1 , respectively), experiencing further losses of 9.4% and 6.3% of their total losses in the latter cycles. Finally, the cell cycled 100 times displays similar performance as the control cell for the first 5 cycles, as would be expected, but the higher number of cycles does cause large capacity losses, and by the 100th cycle, the cell has lost 25.9% of its original capacity, with a specific capacity of 99.9 mAh g −1 , with 16.6% of the total loss being experiences after the second cycle.
It is expected that high voltage or cycle number would lead to larger capacity losses 18 , as does the higher charging rate of 5C 38 , as seen in Table 3. Correlating capacity losses to specific degradation mechanisms is challenging, and undoubtedly, a Table 1. Description of each size bound used and the average number of particles found within the bounds. Name Maximum particle size (µm) Step size (µm) number of degradation mechanisms contribute to these losses, such as transition metal migration and Li + inventory loss. Here, using X-ray CT we aim to investigate the capacity fade with respect to particle cracking and other microstructural defects. More specifically, identifying micro-cracks and defects from a large number of particles at a resolution above the typical size of these features. The methodology for the scanning and post processing is extensively discussed in the "Methods" section.
Traditional metrics. Initial calculations of morphological information, such as particle sizes and volumes, along with their distributions was conducted for each sample (imaging parameters can be found in the "Methods" section). The particle size distributions (PSD) for each of the electrodes can be found within Fig. 5a. For all samples, a similar trend is observed; with particles between 6 abd 9 µm being most common. Apart from the increase in particles sized between 3 and 6 µm in the 5C study, potentially caused by the breakdown of larger particles (between 9 and 15 µm), little information can be gained from this analysis.
The distributions are wholly similar, and offer limited explanations as to why certain cells display far larger capacity fades than others.
The surface area to volume ratio (SAV) can theoretically indicate the presence of cracks, since a highly cracked particle will have a larger ratio than a non-cracked particle, due to the fresh surface exposed by the crack. As can be seen in Fig. 5b, the SAV for all samples are very similar, highlighting its inability to discriminate damaged from pristine particles.
The two methods highlighted above display an inability to detect degradation via basic microstructure analysis. Furthermore, both rely of large fractures to be present within particles in order for the methods to properly function; these are therefore unable to detect smaller micro-cracks within a particle. This motivates the current study, to enable early crack detection within a particle's interior, and thus indicating the integrity of the particles.
Intensity through particles. The normalized intensity profiles for selected size bounds are displayed in Fig. 6a-c, with the remaining size bounds in the supplementary information. For each particle studied, a region below the surface is present with a sharp increase in intensity, before the normalized intensity falls. This can be quantified by inspecting the first sub-surface regions, ca. 2 µm below the designated surface. The cause of this layer is most likely to be due to partial averaging effect due to the primary particle roughness 20 . Initially, it was also believed to be due to uncertainty over the true particle surface, with binder surrounding the particles 39 , however, since even the under segmented pristine sample displays this layer, the most likely cause is a roughness leading to decrease intensity values at the surface. This leads our particle surface to yield a lower intensity value than would be true, thus creating a potentially artificial increase for the subsequent voxels. The size of this layer is independent of the size of the particle, consistently being in the size range of 2.0-2.5 µm. Furthermore, this layer decreases in intensity after cycling has occurred, for all particles, indicating some level of smoothing due to cycling being present. Continuing through the radii of the  particles, the intensity values decrease, and can reach values below that of the surface. The following section will discuss the impact of size and cycling conditions on the radial intensity profiles. With decreasing particle size, the normalized intensity is higher than that of large particles, and this may be down to two reasons. Firstly, the sub-surface layer takes up a larger percentage of the particle, with its higher intensities, resulting in not enough radial space post this layer to fall to surface levels. Secondly, smaller particles are more resistant to fracture damage, and therefore experience less mechanical degradation than their larger counterparts, likely due to more uniform internal state of charge, resulting in less stress placed on the primary particle boundaries due to anisotropic volume changes. Although the small particles have higher intensity values, the variation due to cycling conditions are present throughout the size bounds, albeit to a lesser extent. This is most prominent in Fig. 6c, where the particles from the 100 cycle electrode display lower intensities than the rest of the samples.
The cycling conditions that particles are exposed to have a large impact on the normalized intensities, with significant variation present between samples, as seen in Fig. 6a. The pristine sample consistently displays the highest normalized intensity values, as would be expected due to a lack of particle defects. Particles from the control, 4.3 and 4.4 V electrode display similar behaviour throughout the different particle sizes with only the 4.4 V electrode containing regions below the surface intensity. The electrode cycled at 2C consistently has a higher intensity value than the previous group, but displays very similar decay through the radius. The 100 cycle cell, although only present in the smaller bound groups, consistently shows the lowest intensity values, signifying a large number of defects. Cycling to 4.5 V and 5C causes notable decreases in large particles, with both samples reaching normalized intensities of less than unity. However, as the particle size decreases, both these samples have higher intensity values, indicating minimal internal degradation.
To further assess the radial gradients present within the particles, the differential intensity with respect to radius is calculated (Fig. 6d-f), allowing the rate of change of intensity to be tracked, enabling the effect of segmentation inaccuracies to be mitigated. There are two key features on these figures: (1) the point at which each sample crosses the x-axis (spatial location where the intensity is decreasing); and (2) the magnitude and duration spent below the x-axis (how much the increase or decrease is and for what length through the particle). Differential normalized intensity for the remainder of the size bounds is shown in Supplementary Fig. 4.
From these figures, the pristine sample regularly crosses the x-axis with the largest voxel value, indicating that pristine samples stay at a higher intensity for longer. For the largest particles, once again 4.5 V shows the most intensity changes, having both the most negative value and crossing the x-axis first. As the particle size decreases, it can be seen that although the 5C sample displays the lowest intensity values, the 4.5 V sample has very similar rates of change. As particles get smaller, noticeably at 3.5-4.0 µm size bound, there is a large difference between pristine and the cycled cells, with 100 cycles displaying the highest radial variations, followed by 4.5 V.
When using the average values, it is worth noting that towards the ends of the bounds (within the final 0.5-1.0 µm), the values start showing large variations, as seen in the standard deviation and by the wide spread in Supplementary Fig. 2. This is not surprising, since the bound contains particles of different sizes, and the final voxel for a certain sized particle is not the centre for another, therefore the lowered core value is countered by the larger particles' raised noncore value, leading to the high variability. The result is that the averaging method is good for the bulk of the particle, to assess a general trend, but becomes less useful towards the centre of the particle. Furthermore, this analysis is unable to give an exact quantification to the degree of damage, instead gives a picture of the full electrode. Since defects often originate from the centre, further analysis should and is done, discussed below.
To ensure that differently sized particles within bounds do not influence the results, the average value from each particle can be calculated, with the value then averaged for each bound and plotted in Fig. 7a. As such, it can be seen that the pristine samples have a much higher average intensity, with cycling conditions playing a large role on the values. As seen previously, for large particles, the 4.5 V and 100 cycle electrode are heavily damaged, along with the 4.4 V electrode when the particle size is smaller. This confirms the trends observed earlier, and can give a tangible number to quantify the level of degradation present within a particle and/or electrode.
To assess the core of each particle, a new average can be taken, the average normalized intensity of the core for each particle within a size bound. Doing this enables the core of every particle to be calculated, without the effect of slightly larger or smaller particles influencing the result. This result is shown in Fig. 7b, for all particle sizes, and larger or smaller than 5 µm. The values for the under segmented case are also included, to show the robustness of this final method. Pristine samples have the highest values for all size ranges, as is expected, and this is the case for under segmented particles with one exception. The three cells that experience the largest capacity fades also have the lowest core intensities when considering all particles. As seen previously, high voltage or C-rate has a significant effect on the largest particles, with 4.5 V and 5C displaying the lowest values. For the smaller particles, once again the 100 cycled cell has the lowest values, followed the 4.4 V. Smaller particles are once again seen to be more robust against microstructural defect formation, yielding higher values. From the combination of X-ray micro-CT, segmentation and MATLAB codes, the intensity within each particle has been calculated, and analysed in a range of ways. Through combining the results from all the intensity analysis, and electrochemical data, a picture of the integrity of the particles can be built up. Aggressive cycling, leads to particles with lower intensities, less dense cores, and particles that display large radial variations. As particle size decreases, the particles become more resistant to defects, observed in all electrodes.

DISCUSSION
Aggressive cycling conditions contribute to creating particles with lower intensity cores, as seen above, which correlates with a decrease in the electrochemical charge capacity of the cell. The intensity change, is a proxy for defects or cracks within the particles, which have been known to plague high-nickel content electrodes. These have previously been observed through nanoscale tomography 20 , where the increased resolution enables micro-cracks to be directly visualized. The widths of cracks, as seen from SEM images 17 can be significantly smaller than 0.2 µm and are therefore often below the resolution of the X-ray instruments, include that which was employed in this study. Traditional metrics (Fig. 5a, b) are unable to detect micro-cracks at this resolution, and therefore the presented methods have been applied. Since a crack has a lower attenuation than the active material phase, its presence can be inferred from the partial volume/averaging effect. The low intensity region within the particles is caused, in-part by the presence of multiple microcracks or defects, lowering the average intensity of the region; these defect and/or cracks are not present in the pristine sample indicating that they arise from electrochemical cycling rather than electrode manufacturing. The lowered intensities observed towards the centre of particle cores, indicates crack growth initiates here, as discussed by Schweidler et al. 40 , Sun et al. 19 . This methodology enables the comparison of multiple electrodes prior to particle fracture, giving an insight into the cause of capacity fade and health of each electrode as a whole.
The largest uncertainty within this study comes from errors arising from segmentation, due to an inability to detect the true Fig. 7 Average and final intensities for all samples. a Average normalized intensities for each particle bound and b core normalized intensity including the undersgmented pristine sample for comparison.
A. Wade et al. particle surface. An under-segmentation, resulting in an artificially higher surface intensity, lowers the sub-surface layer and creates a core with an inaccurately low normalized intensity. Even if this were to happen at an extent of 5%, the difference between the pristine and cycled cells is so large that there is still a significant difference for most electrodes. GREAT is essentially a data reduction algorithm and is not designed to improve automatically through experience, it therefore cannot be classed as machine learning (ML) and no ML has been developed or applied in this article; however, the authors envisage two key opportunities that exist for the integration of ML in future studies: (1) pre-processing of tomograms (for GREAT input data) via improved ML image segmentation would allow lower quality data to be analysed, permitting shorter data acquisition times and higher data analysis throughput, thus improved materials statistics. (2) Post-processing of the GREAT output data via ML to further explore trends in particle defect creation and development could identify new degradation mechanisms that are not visible via manual inspection. This future development will complement the presented algorithm workflow by removing the uncertainty around surface detection and could be integrated into the algorithm code. However, at present, any machine learning segmentations have not reached maturity and are unable to usurp conventional segmentation protocols.
As mentioned, a compelling quality of this method is its ability to capture a large number of particles and use averaging techniques to simplify the data into key metrics, a method of data reduction. In doing so, a certain level of confidence in the spread of the data can be extracted. After calculating the standard deviation of all average points within the hybrid bounds, only three points had a percentage standard deviation above 5.0%, with the majority of averaged values falling between 1.0% and 2.5%, as can be seen in the supplementary information ( Supplementary Fig. 2).
The capacity fade observed can be correlated to the intensity variations observed through the algorithm results, to enable a full picture of electrode health to be constructed. The pristine cell, should be, and is the electrode with the least defects, shown by its consistently high normalized intensity, even if significantly undersegmented. Charging to 4.2 V at 0.5C, five times (the control sample) leads to a decrease in the normalized intensity, both through the surface layer, bulk and in the core, indicating an increase in defects due to this cycling history. Increasing the voltage to 4.3 V results in slightly more damage, particularly in the core. The increase to 2C does not result in dramatic capacity losses, nor does it result in large intensity variations, indicating that the particles are in good health and can perform well.
With an increase up to 5C, the capacity fade is more severe than the control, but the cell performs significantly better than the other aggressive samples. However, there is evidence of significant degradation, especially for larger particles. It would be expected that the increased C-rate would lead to inhomogeneous states of charge within particles, resulting in stress between primary particles and micro-crack generation 26,41,42 . It is also probable that in smaller particles, the SOC inhomogeneity is less significant, and therefore less micro-cracks are present, which is also observed. By looking at the full range of particles, the internal damage is only slightly worse than the control cell, and the capacity fade is again only slightly more severe. This would suggest that despite the large particles experiencing large defects, the smaller particles are able to perform well at a high C-rate, potentially due to smaller SOC heterogeneity, corroborated by the good capacity retention. This would support the ongoing research into single crystal particle morphologies, which are more resistant to cracks 43 , due to their smaller size and lack of internal grain boundaries.
When the voltage is increased to 4.4 and 4.5 V, there will be capacity losses due to the anode side of the cell. The increased de-lithiation of the cathode, compared to the formation, will result in more SEI growth and potential lithium plating, resulting in-part to the large decrease in capacity. However, some capacity loss will undoubtedly be due to degradation of the cathode particles. Cycling at high voltage increases the de-lithiation of the cathode leading to the c-lattice parameter collapse, increasing the stress on each particle, and hence leads to the increased micro-crack generation 44 . The increased defects within the 4.4 V cell are not severe in any size regime, however, when observing all particles, this sample displays the second worst intensity values, indicating a high degree of damage across all particle sizes. For the 4.5 V, the large particles display significant variations and low intensity values, indicating a considerable degree of damage. It is proposed that the capacity fade observed is likely due to a combination of increased SEI formation, alongside significant damage to particles of multiple sizes throughout both electrodes, as detected via this methodology.
Finally, the cell cycled 100 times is a clear indication of the usefulness of this methodology. With modest cycling parameters (voltage and C-rate), the observed degradation will not have come from excess lithium deposition or SEI formation, but via a breakdown in the cathode particles, potentially causing harmful side reactions and loss of active material. The particles from this cell, although the smallest measured, paint a picture of large internal degradation, consistently presenting the lowest intensity values and largest radial variations. Thus, there is a clear link between the performance of the cell, and the health of each particle for this sample.
We have successfully cycled, scanned, and analysed electrodes from eight different electrochemical histories, using X-ray micro-CT to detect the presence of micro-cracks within individual particles. Cycling using different parameters enabled the comparison in both cell performance and degradation between upper voltage limits, cycling rate and the numbers of cycles, revealing that more aggressive conditions lead to an increased capacity fade (as expected) but can also be correlated with increased particle defect and/or cracking via the observation of a reduced internal particle density. Two algorithms have been presented: one-dimensional line scans and a 'GREAT' methodology, to reveal information regarding the density of particles due to their relative intensities. Line profiles are able to reveal information about particle morphology, such as voids, but do not sample a large enough region of the particle to display cracks or density gradients. The GREAT algorithm enables the full profile of a particle to be assessed. Doing so reveals radial trends in particles, and enables micro-crack generation to be observed before full particle fracture. Particle size bounds revealed that the same trend occurs in smaller particles, but it is more difficult to see due to the larger relative size of the surface layer.
This methodology enables particle degradation to be detected before large-scale cracking and full fracture of the particle occurs, and can be detected using lower resolutions that permit faster scans. Cycling for 100 cycles leads to the most severe particle degradation and capacity losses, followed by 4.4 V (for 5 cycles). Cycling at high voltages, 4.4 or 4.5 V causes mechanical damage to particles, but a proportion of the capacity fade must be attributed to losses on the anode side that may be improved via higher anode:cathode balancing ratios. Finally, high C-rate cycling, particularly at 5C, leads again to damage of large particle but smaller particles remain relatively intact and results in the full electrode profile showing limited mechanical degradation, as seen by the relatively good cycling performance compared with high voltage operation.
Overall, all electrodes displayed lowered intensities than the pristine cell, confirming that this methodology has the ability to detect defects and can be used to estimate the integrity of particles within various electrodes and evaluate the degree of damage an electrode has undergone. This methodology can be applied to other, non-spherical particles such as LFP tablets or graphite 45 , with an algorithm detecting the centre of particles, performing surface distance mapping and subsequent distance weighted erosion steps. Further use of this presented algorithm will be to study longer duration cycling, with a half-cell configuration, alongside in situ imaging to correlate the moment of cell failure (e.g. the 'knee-point') with an increase in particle cracking and/or defects. In-stiu 4D imaging will also enable the distinction between pre-existing defects, formed during electrode fabrication, and electrochemical cycling induced failures. As more data is acquired, machine learning methodologies, either in segmentation or classification could be applied to reveal deeper underlying trends in defect formation, growth and detection.

METHODS Materials
The LiNi 0.8 Mn 0.1 Co 0.1 O 2 (NMC811) particles analysed in this work were from printed electrode sheets purchased from a commercial supplier (NEI Corporation, Summerset, USA). To de-lithiate and re-lithiate the NMC811 structure via electrochemical cycling, 10 mm diameter disks were punched from the commercial cathode sheets to assemble into coin cells. Seven coin cells were assembled in total, each with a 10 mm graphite anode (NEI Corporation, Summerset, USA), ca. 100 µL of Li-ion electrolyte consisting of 1 M LiPF 6 in a 3:7 ratio of EC and EMC (Soulbrain, Northville, Michigan, USA), and a Celgard separator (Celgard, LLC, Charlotte, NC, USA). All coin cell assembly was completed inside an argon-filled glovebox (MBRAUN, Garching, Germany). The mass and capacities given in Table 1.

Electrochemical testing
The coin cells were cycled using a Novonix high precision electroche mical cyclers and environmental chamber (NOVONIX Limited, Bedford, Canada) at a temperature of 25.1°C, all cells underwent the same formation step twice: a constant-current (CC) charging rate of C/20 (e.g. ca. 7.75 × 10 -2 mA) followed by a constant voltage (CV) hold at 4.2 V (vs. graphite) until the current declined below 3.875 × 10 -2 mA (i.e. ca. C/40), then a CC discharge to 3 V at C/20 (e.g. ca. 7.75 × 10 -2 mA) and a voltage hold at 3 V for 10 min. The operational cycling parameters varied between cells and is summarized in Table 4. They all followed a CC-CV protocol, at ca. 24.9°C, and were cycled with a discharge current of 1 C to a lower cutoff voltage of 3 V.
An aerial loading of 2.0 mAh cm −1 was calculated using the sample 6 X-ray data. This had a volume of 6.86 × 10 -7 cm 3 , of which 41.3% was NMC, giving 2.8 × 10 -7 cm 3 of NMC. Using a density of 4.8 g/cm 3 the mass of NMC is 1.359 × 10 -6 g. With a capacity of 200 mAh g −1 , the capacity of this sub-volume is 2.718 × 10 -4 mAh. Since the nominal mass loading is 10 mg cm −2 , the area of NMC is therefore 1.359 × 10 -4 cm 2 . This can then give a final areal capacity of 2.00 mAh cm −2 .
X-ray micro-computed tomography X-ray micro-CT was conducted using a Versa 520 X-ray instrument (Zeiss Xradia 520 Versa, Carl Zeiss., CA, USA) employing an accelerating tube voltage of 120 kV p and a stationary tungsten anode on a copper substrate that produces a polychromatic beam with a characteristic emission peak at 58 keV (W-Kα). The number of projections, exposure time and voxel size can be found in Table 5.
After acquisition, the 2D radiographs were reconstructed into 3D tomograms using commercial software employing cone-beam filteredback-projection (FBP) algorithms ('Reconstructor Scout-and-Scan', Carl Zeiss., CA, USA), producing tomograms with isotropic voxel lengths of ca. 200 nm (see Table 2). Visualization and segmentation of the reconstructed tomograms was achieved using Avizo Fire (Avizo, Thermo Fisher Scientific, Waltham, Massachusetts, USA). In an effort to reduce effects due to artefacts at the tomogram edges, a central region of interest (RoI) was selected within each sample tomogram for the post-processing. Subvolumes of dimension ca. 140 µm × 140 µm × 35 µm was used for all cycled samples, and ca. 180 µm × 180 µm × 20 µm for the pristine sample. Segmentation of the active material (NMC811 particles) from all other material (current collector, carbon, binder and void-space) was achieved using the threshold function, accompanied, where necessary, with the use of either a non-local means or Gaussian filter, to reduce the noise of some samples. Finally, three datasets (greyscale and binary and pore-binary) with the same RoI and voxel size were exported as 3DTIFF files for subsequent analysis using the algorithm. The first dataset contained raw greyscale values that corresponded to the X-ray attenuation at that location (i.e. lower values represent lower attenuation) 46 and the second and third datasets contained information regarding the size, shape and spatial location of the particles, with binder and void phases being assigned a value of 0.

Data processing
The output of the algorithm is two files, particle morphology (1) and greyscale erosion data (2). The first has the; surface area and volume, along with the particles unique tracking number. The diameter is calculated via the volume (Volume3d function in Avizo) with the following formula: Thus enabling the particle size distributions to be calculated. The second file contains the particle tracking number and the intensity profile of each particle.
Particles are re-ordered by size, followed by normalizing the intensity values by the surface value for each particle for each voxel. Following this, the differential intensity with radius is calculated for each particle at every voxel. At this stage, the radial intensity variations within every particle can be mapped, however to enable easier comparisons and to limit anomalies averages are taken for each size bound. Within the selected bounds, the average intensity of all particles is taken at every voxel within the particle, leading to the creation of an average particle encompassing all intensities. This average value is then plotted against the radius as line/scatter plots (Figs. 6 and 7).

DATA AVAILABILITY
All data is available upon request from the corresponding author.

CODE AVAILABILITY
The computational code used to generate the results is not available since it is being used and further developed for ongoing research, please contact the corresponding author for opportunities to run this script on new data.