Skip to content

YijinLiu-Lab/ParticleNetworkDynamics

Repository files navigation

Dynamics of particle network in composite battery cathodes

DOI

This repository contains the source codes for the study of active particle-network evolution in Ni-rich LiNi0.8Mn0.1Co0.1O2 (NMC) composite battery cathodes, as described in the following paper:

@journal{li2022networkevolution,
  title={Dynamics of particle network in composite battery cathodes},
  author={Li, Jizhou and Sharma, Nikhil and Jiang, Zhisen and Yang, Yang and Monaco, Federico and Xu, Zhengrui and Hou, Dong and Ratner, Daniel and Pianetta, Piero and Cloetens, Peter and Lin, Feng and Zhao, Kejie and Liu, Yijin},
  year={2022},
  journal={Science}
}

Background & Key Contributions

  • Improving composite battery electrodes requires a delicate control of active materials and electrode formulation. The dynamics of active particles have significant impacts but is rarely studied.
  • A network evolution model is formulated to interpret the regulation and equilibration between electrochemical activity and mechanical damage of active particles.
  • Through statistically analyzing thousands of NMC particles, we found that the local network heterogeneity results in asynchronous activities in the early cycles, and later the particle assemblies move toward a synchronous behavior.
  • Our study pinpoints the chemomechanical behavior of individual particles and enables better designs of the conductive network to optimize the utility of all the particles during operation.

Imaging technique

The nano-resolution X-ray phase contrast tomography at the ID16A-NI nanoimaging beamline at the European Synchrotron Radiation Facility was used to image multi-layer of NMC particles. With high spatial resolution, exceptional contrast, and a large field of view, the 3D imaging data covers a large number of active particles that demonstrate a wide variety of damage patterns.

Fig.1. 3D microstructure of the composite battery cathode [10.1038/s41467-020-16233-5].

Theoretical modeling

The source codes are available from the corresponding author on reasonable request.

Imaging Data Analysis

  • This method is based on StarDist, which is designed for the cell detection in optical microscopy, the shape of each NMC particle is modeled as a star-convex polygon.
  • It extends our previous work (based on the Mask R-CNN model) by considering the morphology of NMC particles to improve the identification accuracy.
  • Comparing with the traditional watershed algorithm and our previous method, this method shows significantly improved robustness against the formation of the inner-particle cracks, as well as the distinguishablity of closely located particles.

Fig.2. Comparison of different particle identification methods. (a) The particles are densely predicted by a U-Net architecture and then selected the final instances via non-maximum suppression (NMS). (b) The trained StarDist network predicts the star-convex-polygons constrained particles and the probability map is used to obtain the final detection result. (c) The detection results by conventional watershed algorithm and the method in Jiang et al., 2020. (d) Zoomed-in region indicated by red rectangle in (b) to amplify the difference among various methods. Notice the distinguish ability between two particles as indicated by the orange arrows.

Installation

This package is compatible with Python 3.7-3.9. Keras and TensorFlow are required.

Compile the package by running the following command under the folder part1_particle_identification.

pip install -v .

Note that Microsoft Visual C++ 14.0 or greater is required to build the wheel.

Alternatively, the package can be directly installed by

pip install stardist

Usage

1. Pre-trained model

We provide the pre-trained model for identifying NMC particles in nano-resolution X-ray phase contrast tomography images.

Here is a quick example of how to use the pre-trained model (example image files are provided here):

# load the model
model = StarDist2D(None, name='LIB100_70nm', basedir='models')

# perform the prediction
labels, details = model.predict_instances(img)

Fig.3. Particle identification results by the trained model based on StarDist.

See more details in demo_inference.ipynb.

An ImageJ plugin is also provided to apply the trained model on the image, thanks to StarDist. The details of the usage instruction can be found here.

Fig.4. Particle identification by the ImageJ plugin with the pretrained model for nano-resolution X-ray phase contrast tomography images.

More detection results of NMC particles in composite battery cathodes can be found here.

2. Training on your own dataset

Here is a quick example of how to train the model:

# X_trn, Y_trn and X_val, Y_val are the training and validation datasets, respectively.
model.train(X_trn, Y_trn, validation_data=(X_val,Y_val), augmenter=augmenter,epochs=50, steps_per_epoch=100)

See more details in demo_training.ipynb.

The VGG Image Annotator (VIA) is used for the labeling. See this blog for the detailed instruction with an example.

To save the trained model to be used in ImageJ, the package version should be adjusted, do the following:

pip install "tensorflow<2"
pip install "csbdeep[tf1]"
# also install stardist in this example
pip install "stardist[tf1]"

and the python script:

from stardist.models import StarDist2D
model = StarDist2D(None, name='my_model', basedir='.')
model.export_TF()

For challenging cases, some regions may be still missed in single 2D images (e.g. the xy section) due to various factors such as the low contrast and tomography reconstruction artifacts. However, the missing information is often available in other sections, for example the xz and yz views.

This observation motivates us to construct a new intermediate representation of a particle by fusing labels from different sections. To elucidate this redundancy, the predicted 2D particle labels from xy,yz and xz sections are averaged together followed by a clustering of pixels that converge to the same fixed points. This procedure ensures that all the particles can be accurately identified and quantified, which was manually inspected and refined.

Fig.5. 3D particle identification by view fusion.

The trained models for NMC particle identification from different views can be found here. The trained models over all views should also be reasonably good for each seperated view.

The probability maps obtained from different views are then fused and followed by kmeans clustering for obtaining the 3D labeling. See viewFusion.m for details.

Alternatively, the linking of labels at different slices can be performed by hungarian algorithm. A fast implementation to link labels at different slices reduce the label number and may improve the fusion performance.

[target_indices , ~, ~] = hungarianlinker(source, target, max_linking_distance);

If a reasonably large 3D training dataset is available, the 3D StarDist is recommended.

Given the identified 3D NMC particles, we extract their structural, chemical, and morphological characteristics. More specifically, we divide the particle attributes into four different groups: position, chemical properties, particle structure, and local morphology for furture analysis.

allfeatures = getAllFeatures(Data, Seg, pixelsize);

Fig.6. Name and description of all extracted attribute from the identified NMC particles.

The random forest (RF) is essentially used to regress the particle damage with other attributes. The SHAP (SHapley Additive exPlanations) is utilized to rank the significance of the particle properties to the degree of particle damaging during the process of regression, which effectively reveals the contributions of different microstructural characteristics to the damage profile for every single particle in our electrode.

Installation

SHAP can be installed from either PyPI or conda-forge:

pip install shap
or
conda install -c conda-forge shap

Usage

  • A nice explanation about why model interpretation and how SHAP helps random forests can be found here.
  • The jupyter notebook to reproduce the results of the non-monotonous correlation between particle properties and damage degrees can be found here.

Key scripts:

Random Forest Regression

dataset = pd.read_csv(filename)
X_train, X_test, y_train, y_test = train_test_split(dataX, datay, test_size = 0.05,random_state = random_statev)
regressor = RandomForestRegressor(...)
regressor.fit(X_train.values, y_train.values)
y_pred = regressor.predict(X_test.values)

SHAP Values Calculation

explainer = shap.TreeExplainer(regressor)
shap_values1 = explainer.shap_values(X_train)

Conclusion

  • The formulated network evolution model provides insights into the regulation and equilibration between electrochemical activity and particle damage.
  • Our experimental investigations and machine learning analysis reveal that there is a non-monotonous correlation between particle properties and damage degrees.
  • Collectively, our results reveal an asynchronous-to-synchronous transformation in the cathode electrode, featuring a set of consecutive processes involving particle activation, electrochemical segregation, and electrode synchronization.
  • Although it seems that a global homogenization will be developed eventually after long-term cycling, a poorly designed electrode would reach this state when most of its particles are severely damaged. In contrast, a well-formed electrode would rapidly converge to the electrode synchronization with majority of its particles still in good shape.

Acknowledgement

  • StarDist: Object detection with star-convex shapes
  • SHAP: SHapley Additive exPlanations, a game theoretic approach to explain the output of any machine learning model.

About

Dynamics of particle network in composite battery cathodes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published