Open Access Article
This Open Access Article is licensed under a
Creative Commons Attribution 3.0 Unported Licence

Advancing vanadium redox flow battery analysis: a deep learning approach for high-throughput 3D visualization and bubble quantification

André Colliard-Granero ab, Kangjun Duana, Roswitha Zeiscd, Michael H. Eikerlingabe, Kourosh Malekab and Mohammad J. Eslamibidgoli*ab
aTheory and Computation of Energy Materials (IET-3), Institute of Energy Technologies, Forschungszentrum Jülich GmbH, 52425 Jülich, Germany. E-mail: m.eslamibidgoli@fz-juelich.de
bCentre for Advanced Simulation and Analytics (CASA), Simulation and Data Science Lab for Energy Materials (SDL-EM), Forschungszentrum Jülich GmbH, 52425 Jülich, Germany
cDepartment of Electrical Engineering, Friedrich-Alexander-Universität Erlangen-Nürnberg, 91058 Erlangen, Germany
dKarlsruhe Institute Technology, Helmholtz Institute Ulm, 89081Ulm, Germany
eChair of Theory and Computation of Energy Materials, Faculty of Georesources and Materials Engineering, RWTH Aachen University, 52062 Aachen, Germany

Received 18th April 2025 , Accepted 18th August 2025

First published on 19th August 2025


Abstract

This work harnesses deep learning to expedite analyses of research data for vanadium redox flow batteries. Recent studies have highlighted the significance of analyzing bubbles within vanadium redox flow batteries. The investigation of these bubbles had remained elusive in direct imaging until advancements in cell design facilitated their observation through synchrotron X-ray tomography. Yet, the considerable volume of slices per tomograph and the complexity of the features present challenges for analyzing bubbles. To tackle this issue, we propose a deep learning-based framework that allows experimentalists to conduct high-throughput analyses based on synchrotron X-ray tomographic images of vanadium redox flow batteries. We conducted a benchmarking study on various U-Net configurations using a dataset that includes three complete volumes. These volumes represent different cell configurations and encompass 2294 annotated images. Through a multi-class semantic segmentation approach, we aimed to identify four distinct classes, such as bubbles, electrolytes, membranes, and gaskets. The optimal model achieved a precision of 98%, a recall of 97%, and an F1-score of 97% on the validation set. Following segmentation, the framework facilitates rapid differentiation of electrodes, quantification of bubble volume, individual bubble shape analysis, generation of 2D bubble density maps, and calculation of membrane blockage. All results are readily accessible for interactive, on-site visualization within a 3D environment. The openly available software allows users to engage with the data in a comprehensive and intuitive manner. For access, please visit the following GitHub repository: https://github.com/andyco98/UTILE-Redox.


Introduction

The transition to renewable energy sources is imperative to combat global environmental and climate issues, necessitating a new power grid system reliant on renewable energy.1–3 Energy storage is critical in regulating peak demand and dynamics across the grid.4 However, the intermittency of renewable energy sources poses a challenge when they dominate power generation.5–8 Redox flow batteries (RFBs), notably vanadium redox flow batteries (VRFBs),9,10 offer a promising solution by decoupling energy capacity and power generation, enabling long-duration energy storage and seasonal energy shifting.3,4,11 Despite its potential, VRFB technology faces hurdles to commercialization, including high cost, maintenance, and side reactions during overcharging.10,12

Of particular concern is the hydrogen evolution side reaction (HER) at the negative half-cell, which can degrade electrode performance by consuming charge, reducing energy efficiency, causing electrolyte imbalances, and hindering desired redox reactions.1,10,13,14 Additionally, this side reaction leads to the formation of bubbles, especially in the negative half-cell,1,10,15–17 which further compromises battery efficiency by disrupting active sites, reducing surface area for redox reactions, and impeding reactant transport.18,19 Addressing these challenges demands focus on identifying, quantifying, and systematically preventing HER and bubble formation.20

Over the last decade, a focused but limited number of research has tackled the challenges posed by the HER in VRFBs.15–17,19–25 Innovative diagnostic approaches, including differential electrochemical mass spectrometry, various electrochemical measurements, specialized hydrogen sensors, and buoyancy-based collection devices, have been utilized to monitor and assess the implications of HER. These methods primarily aim to quantify the hydrogen gas produced via HER by employing indirect measurement techniques. Investigations have revealed that the HER activity is influenced not just by the operational conditions,21,25 but also by inherent properties of battery components themselves.16,19,20 Despite these advances, a comprehensive understanding of how hydrogen gas is distributed within the electrode during operation remains elusive. This aspect is crucial, as it could shed light on potential adverse effects on electrode integrity and ion transport, thereby guiding efforts to mitigate HER's impact on VRFB efficiency and durability.

Various methods have been employed to study the behavior of bubble evolution. These include optical imaging, such as high-speed camera technology, which captures the dynamics of bubbles.26,27 Indirect characterization methods, including acoustic measurements and pressure sensors, provide insights into bubble size distribution and gas release patterns.28–30 Additionally, radioactive imaging techniques, like X-ray imaging and neutron imaging, are used to investigate the internal structure of batteries and bubbles.23,31 Although recent advancements in neutron radiography and transparent VRFB imaging, investigators have succeeded in visualizing hydrogen evolution, they primarily offer a two-dimensional view. This limits their ability to keep the exact distribution of bubbles within the electrode itself.21,23

Researchers have applied X-ray imaging for two primary purposes within VRFBs. First, they examined the process of electrolyte injection and its distribution across VRFB electrodes. Additionally, they investigated the presence of gas residues, various electrolyte properties, and the composition of electrode components. This approach has enabled them to uncover detailed information about the internal structures and defects of VRFBs, which is crucial for improving diagnosis methods, advancing research, and enhancing quality control measures.22,31–35 Bevilacqua et al.32 and Köble et al.31 found it possible to resolve and image the hydrogen bubbles from the HER by synchrotron X-ray tomography. They concluded that hydrogen bubbles often accumulate in existing air bubbles. However, although three-dimensional images can provide more comprehensive information, they face difficulties in image annotation and reconstruction. This hinders the full utilization of experimental data and the in-depth exploration of bubble dynamics.

The process of analyzing 3D volumes from VRFBs is currently hindered by traditional image processing methods' slow, inefficient, and often subjective nature. In contrast to manual analyses, which can take weeks to fully annotate a single tomograph, simpler segmentation methods fall into two categories: algorithmic approaches (e.g., Otsu thresholding) and basic machine learning techniques (e.g., random forest pixel classifiers). Thresholding is limited to binary separations of the grayscale histogram and fails to support the multiclass differentiation needed in our analysis. While pixel classifiers can distinguish multiple classes, they rely only on intensity and ignore spatial and shape features, which is problematic given the intensity similarities among bubbles, membranes, and gaskets. In contrast, deep learning integrates intensity, spatial, and shape information, enabling high-quality segmentation of an entire tomograph within minutes with minimal computational requirements. Therefore, deep learning (DL) and computer vision technologies emerge as powerful alternatives for automating tasks such as annotation, segmentation, and analysis of imaging data, particularly in energy materials. These techniques have received growing attention in recent years, enabling a wide array of applications, including automated analysis of particle morphology in electron microscopy micrographs36,37 to elucidate time-resolved bubble dynamics through optical videos of transparent polymer electrolyte water electrolysers.27 Tang et al.38 developed a 3D deep learning algorithm capable of multiclass segmenting micro-CT tomographies of membrane electrode assemblies in polymer electrolyte membrane fuel cells. This algorithm facilitated the precise and swift segmentation and differentiation of components within the catalyst, membrane, and gas diffusion layers. Subsequently, it enabled the accurate extraction of the connectivity, porosity, and permeability descriptors of the gas diffusion layer and surface roughness between the catalyst layer and membrane. Li et al.39 utilized synchrotron X-ray tomography to investigate intermetallic phases in recycled aluminum alloys, employing DL for automated phase segmentation and subsequent morphological and structural analysis such as phase diameter distribution and spatial Fe- and Al-phases distribution. In another study, Kopp et al.40 demonstrated the application of DL for segmenting quantitative multiclass microdamage in heterogeneous materials using synchrotron radiation. These examples underscore the specific application of such models, which are limited by the availability and quality of training data.

The situation reinforces the necessity for further adapting DL algorithms in specialized areas such as 3D bubble analysis in VRFBs. The goal is to augment the accuracy and speed of segmentation, feature extraction, and volume analysis, thereby advancing our understanding and capabilities within these complex scientific domains. This paper presents a DL-based workflow to analyze synchrotron X-ray tomography images of hydrogen bubbles and the internal structures of vanadium redox flow batteries (VRFB). The workflow comprises four phases: first, it starts with generating meticulously annotated datasets encompassing various examples. The segmented datasets are utilized to train deep learning models, facilitating the automation of semantic segmentation for various regions of interest (ROIs) in images. Upon successful training and demonstration of accurate predictions on unseen imaging data, we establish a framework for the automated analysis of the segmented bubbles' size, shape, and distribution. Lastly, the outcomes of this analysis are represented through graphs and 3D visualizations of the analyzed volumes and other characteristics.

The availability of this methodical pipeline allows researchers to streamline the time-consuming process of analyzing complex 3D volumes in VRFBs, cutting it to just a few seconds. Additionally, this framework will enable users to swap out the provided models with custom versions specifically designed for their unique datasets, thereby broadening its utility. This adaptability, paired with the sophisticated computer vision techniques introduced here for 3D tomography analysis and morphological and spatial analysis of bubbles, highlights the substantial impact of this research on the field.

Methodology

The experiments were conducted by Roswitha Zeis's group,22 where the design of the cell up came from previous work41,42 as shown in Fig. 1(a). The carbon felt materials utilized in this study were one commercial material, SIGRACELL® GFA 6 EA. It is a Rayon-based, graphitized carbon felt. All experiments used a 25% compression ratio to compress the nominal thickness from 6 mm to 4.5 mm. Before experimentation, the carbon felts underwent pretreatment in a muffle oven for 25 hours at 400 °C in an air atmosphere to introduce active sites on the carbon surface.17 The vanadium(IV) electrolyte was prepared by dissolving 0.1 molar VOSO4 (VOSO4·5H2O, chemically pure, GfE) in 2 molar H2SO4 (Suprapur®, Merck, diluted with purified Milli-Q water). This electrolyte was degassed with nitrogen to remove atmospheric air and then transferred to a syringe before each experiment. For the HER experiments performed in this work, a standard procedure was applied to all examples. A potential of −0.5 V vs. Ag/AgCl (about −0.3 V vs. RHE) was applied for 5 minutes to induce the HER following the procedure indicated by Köble et al.43
image file: d5dd00158g-f1.tif
Fig. 1 (a) Schematic experimental setup for measuring the synchrotron X-ray tomographies. (b) Exemplification of the obtained images from the VRFB cell and the regions of interest.

The X-ray tomography scans were performed at the Biomedical Imaging and Therapy Bending Magnet (BMIT-ID) 05ID-2 beamline at the Canadian Light Source Inc (Saskatoon, Saskatchewan, Canada).44 A Budker superconducting wiggler generated high-intensity monochromatic synchrotron radiation with an energy of 30 keV in the storage ring.

The sample was positioned 58 m from the light source, with a 40 cm separation between the sample and the detector. An indirect detection scheme was employed, wherein the luminescent image produced by the X-rays was captured in a 500 mm thick YAG scintillator coupled with a CMOS camera (Orca Flash V2 sCMOS, Hamamatsu Photonics, Shizuoka, Japan), chosen for its fast decay time and low afterglow. The resulting horizontal field of view was 26.6 mm, while the vertical field was limited to 8 mm due to the synchrotron beam's divergence. The estimated spatial resolution of the synchrotron beam was 40 mm.

Prior to each tomographic set, ten dark-field images (camera background, no beam) and ten flat-field images (background with beam, no sample) were recorded. During the tomographic process, the sample was rotated 200° around its vertical axis, with 2000 images for the three-dimensional tomograms captured within a 180° range to mitigate the effects of acceleration and deceleration during rotation. One image was taken every 0.09°.

Reconstruction of the images was carried out using the ufo-kit script developed at the Karlsruhe Institute of Technology.45 To address ring artifacts in the raw images, low-pass filtering of sinograms in the frequency domain was applied before further reconstruction steps.

Our methodology for autonomous analysis of bubbles within vanadium redox flow batteries (VRFB) utilizing synchrotron X-ray tomography is shown in Fig. 2. It manually annotates a comprehensive dataset comprising 2294 image/mask pairs. These pairs represent three distinct tomographic volumes with varying configurations: one half dry, half wet, and two fully wet cells. This diversity in data ensures the model's adeptness at accurately analyzing the different potential conditions present within the VRFBs. Annotations were meticulously conducted on all three volumes using Dragonfly, a commercially available software that streamlines annotation by allowing thresholds to expedite data labeling.46 Each slice was manually classified into four categories for detection: electrolyte, bubble, membrane, and gasket, as depicted in Fig. 1(b).


image file: d5dd00158g-f2.tif
Fig. 2 Methodological pipeline for the bubble analysis in VRFB tomographies.

The dataset was divided into subsets for model training and validation. To optimize the training process, images were resized to 512 × 512 pixels, balancing resolution and memory requirements while preserving the images' contextual integrity. Post-prediction segmentation masks were resized to their original dimensions to maintain the correct aspect ratio.

This research focuses on multiclass segmentation using variations of the U-Net architecture, employing the manually annotated masks as ground truth. The standard U-Net architecture, a fully convolutional neural network, executes convolutions and down-sampling to capture essential image patterns within a latent space during the encoding phase. This process condenses the image information into a singular vector, followed by a decoding phase that inversely reconstructs the image resolution through up-sampling and transposed convolutions. U-Net's distinctive feature is the concatenation of encoder feature maps with corresponding decoder up-sampled feature maps, enhancing the delineation of object boundaries by integrating both low- and high-level features. This approach yields a refined segmentation output, demonstrating improved recognition of object edges and contours.47

Our study explored and evaluated four distinct adaptations of the traditional U-Net architecture for image segmentation at: U-Net with a ResNeXt101 backbone, Attention U-Net, U-Net 3+, and Swin U-Net.

• The ResNeXt101 U-Net variant integrates the ResNeXt101 model with the U-Net framework, utilizing the split-transform-merge strategy characteristic of ResNeXt101. This model is particularly noted for its “cardinality” feature, which refers to using parallel paths within a block to enhance performance without significantly increasing the network's depth or width. Integrating ResNeXt101 into U-Net enables more effective capture of complex image features, leveraging the strength of cardinality.48 This powerful feature extractor was expected to be more robust in differentiating the complex and sometimes ambiguous textures present in the VRFB cell, leading to a more accurate classification of bubbles and surrounding electrolyte.

• Attention U-Net enhances the standard U-Net architecture by incorporating an attention mechanism, focusing the model's processing on specific image regions. This is crucial for identifying objects at varying scales and minor yet significant image sections. By using attention gates before each decoder concatenation, the model emphasizes important pixels while diminishing the impact of irrelevant ones, thus achieving higher segmentation accuracy, particularly in noisy environments.49 We hypothesized that this mechanism would allow the model to selectively amplify the feature representations for bubbles, improving segmentation accuracy, especially for smaller bubbles in noisy regions of an image.

• U-Net 3+ combines the original U-Net architecture with deep supervision methods, facilitating direct feature transfer between encoder and decoder at various levels. This method effectively bridges semantic gaps and maximizes the utility of hierarchical features, thereby enabling the detection of a wider range of image details from broad to fine.50 This allows the model to generate more precise segmentation maps that are accurate for both small and large objects, which is crucial for obtaining an accurate overall gas volume distribution.

• Swin U-Net merges the Swin Transformer with the U-Net design, enhancing image segmentation by modeling long-range dependencies and capturing fine details across different scales. Incorporating the Swin Transformer's efficient self-attention mechanism with U-Net's established encoder-decoder structure results in superior segmentation precision. Swin U-Net's advantage lies in its ability to utilize global and local context information, offering a versatile and accurate approach to addressing segmentation tasks.51 We aim for this global context to help the model discern between challenging local regions and improve its understanding of the relationship between distant features, ultimately enhancing overall segmentation accuracy.

Upon completion of the training phase, the performance of each model was systematically evaluated and compared using established evaluation metrics. These metrics quantitatively assess the accuracy of the models by comparing the pixel classifications in the predicted segmentation masks against those in the ground truth masks. An alignment of both masks facilitates the identification of true positives (TP), where pixels are correctly classified into their respective classes. True negatives (TN) represent instances where pixels are accurately identified as background and do not belong to any class of interest. Conversely, false positives (FP) occur when pixels are erroneously classified into an incorrect class. In contrast, false negatives (FN) are identified when the model fails to classify a pixel correctly, assigning it to the wrong class or neglecting it as part of the background.

Fig. 3 illustrates these four classification outcomes, providing a visual reference for understanding the distribution of TP, FP, TN, and FN within a segmentation task. Building on these basic metrics, we derive more sophisticated evaluation parameters such as precision, recall, and the F1 score. Precision quantifies the accuracy of positive predictions, recall measures the model's ability to identify all relevant instances, and the F1 score offers a harmonic mean of precision and recall, balancing the trade-off between these metrics for a comprehensive assessment of model performance. The three metrics are defined as,

image file: d5dd00158g-t1.tif

image file: d5dd00158g-t2.tif

image file: d5dd00158g-t3.tif


image file: d5dd00158g-f3.tif
Fig. 3 Comparison of (a) tomographic slice extracted from a VRFB along with the manually annotated ground truth and predicted mask. The comparison of (b) and (c) denote examples of true-positive (TP), true-negative (TN), false-positive (FP), and false-negative (FN) predictions.

After generating the segmentation maps for a given volume, we constructed a three-dimensional stack of these volumes to facilitate further statistical analyses. Utilizing established mathematical formulations, we extracted essential metrics from the battery cell, including total bubble volume, the bubble volume fraction Rbv defined as the ratio of bubble volume over the total negative electrode volume, and bubble density distribution across different planes. Additionally, we isolated individual bubbles and implemented advanced computer vision algorithms using the OpenCV library52 to analyze the bubbles' shapes and spatial characteristics. These algorithms enhanced our comprehension of the bubbles' morphological features and their spatial arrangement within the cell by extracting the following bubble individual features:

• Volume: calculated by the count of voxels within an individual bubble.

• Orientation: this is determined by computing the vector along the bubble's most significant axis, with polar coordinates derived from this vector and represented in a polar coordinate system.

• Flatness: this metric quantifies the degree to which a bubble's shape is flattened, defined as the ratio of the bubble's intermediate axis length to its shortest axis length,

image file: d5dd00158g-t4.tif
where the axes lengths are ordered in descending magnitude (λ1λ2λ3).

• Elongation: measures how stretched a bubble is, expressed as the ratio of the bubble's longest axis length to its intermediate axis length,

image file: d5dd00158g-t5.tif

• Sphericity: assesses how closely a bubble's shape approximates that of a perfect sphere, calculated using the formula:

image file: d5dd00158g-t6.tif
with V representing the bubble's total volume and A its surface area.

• Wall proximity: indicates the distance in voxels from the bubble to the nearest cell boundary or membrane, facilitating the analysis of bubbles' spatial distribution within the cell.

In challenging examples, the predictive model occasionally introduced artifacts or noise into the segmentation maps. We implemented two corrective functions to mitigate these inaccuracies and preserve the integrity of our statistical analyses. Initially, a filter was applied across the entire 3D volume stack to eliminate detections of bubbles that appeared one-dimensional (1D), based on the fact that real bubbles should span at least two voxels in depth, with 1D detections likely arising from model-induced noise. Subsequently, a second function assessed the morphological characteristics of the bubbles, excluding artifacts characterized by significant non-convexity and irregular shapes, which provoked errors in the determination of bubble metrics.

The derived measurements were systematically visualized to elucidate the system's characteristics. Advanced 3D visualization techniques were developed using the Visualization Toolkit (VTK) library,53 enabling interactive volume exploration with customizable color mappings based on the measured parameters. Furthermore, the software enabled users to create and export short GIFs depicting the rotating volume, thus enhancing the presentation and visualization of the results.

Results and discussion

In analyzing tomographic images for vanadium redox flow batteries, achieving high segmentation accuracy is crucial for conducting a thorough examination. Our approach for segmenting the volumes into four distinct classes, i.e., bubbles, electrolyte, membrane, and gasket, starts with selecting an appropriate neural network architecture. To this end, we evaluated a series of models to identify the best performance. To further enhance the model's effectiveness, we have initialized each model with pre-trained weights derived from training on the ImageNet dataset, thus capitalizing on transferring previously acquired features. During the training phase, the primary goal is minimizing the loss function and quantifying the discrepancy between the manually annotated ground truth and the model's predictions. The learning rate, critical for modulating the model's convergence speed, was optimally adjusted to dictate the step magnitude towards minimizing the loss function and dynamically reduced upon reaching loss reduction plateaus. A decrease in loss indicates improved performance of the task at hand. Post-training, the model's efficacy on unseen data has been evaluated using a validation set to ascertain the network's robustness and generalization capabilities.

We have explored four variants of the U-Net architecture: a U-Net model incorporating a pre-trained ResNeXt101 backbone, Attention U-Net, U-Net 3+, and Swin U-Net, based on a visual transformer. These models have been trained using a dataset comprising a number of 1894 training and 400 validation images across 200 epochs with a batch size of 8 augmenting the dataset on-the-fly with random horizontal and vertical flips to increase the spatial robustness of the model. The chosen optimizer was Adam,54 and the selected loss function was categorical focal loss.55 The learning rate has been dynamically adjusted in real-time, ranging from 10−4 down to 10−6, depending on performance improvements across epochs.

Table 1 compares the performance metrics for each evaluated deep learning architecture. According to the F1 scores, all models show similar effectiveness on the validation dataset. However, the U-Net model with the ResNeXt101 backbone slightly surpasses others by achieving a higher recall. Maintaining high precision is crucial in our multiclass segmentation task, as misclassifying non-existent bubbles as present can introduce errors that potentially compromise subsequent statistical analyses.

Table 1 Comparison of different U-Net models trained on a unique dataset. The performance of the models is assessed by employing precision, recall, and F1-score as metrics
Model Precision [%] Recall [%] F1-score [%]
U-Net with ResNeXt101 backbone 98 97 97
Attention U-Net 98 96 97
U-Net 3+ 97 94 96
Swin U-Net 96 92 94


Beyond quantitative metrics, we have performed a visual evaluation of model efficacy utilizing datasets not encountered during the training phase, presenting a range of configurations to test the models thoroughly. These configurations can essentially be categorized into four distinct scenarios: completely gas-filled (dry), half-filled (half soaked), fully electrolyte-filled (soaked), and post-cell cycling (after hydrogen evolution reaction [HER]). In Fig. 4, the models exhibit acceptable performance in the dry, half wet, and post-HER scenarios, particularly noting that the U-Net model with a ResNeXt101 backbone achieved superior delineation of membranes and bubbles.


image file: d5dd00158g-f4.tif
Fig. 4 Comparative visualization of the original images, manual annotations, and benchmarked models across four distinct VRFB configurations with varying bubble/electrolyte ratios: completely gas-filled (dry), half-filled (half soaked), fully electrolyte-filled (soaked), and post-cell cycling (after hydrogen evolution reaction [HER]). These visualizations depict bubbles in red, membranes in grey, gaskets in white, and the electrolyte in black. This figure illustrates the models' segmentation accuracy in differentiating between these classes under various operational states of the VRFB.

Furthermore, it should be noted that models encounter notable difficulties in configurations lacking or having sparse bubble representations. Under these conditions, models are prone to erroneously classify empty electrode backgrounds as bubbles, resulting in a propensity for overprediction. This visual assessment further validates the exceptional performance of the U-Net architecture merged with the ResNeXt101 backbone, which showcased a significant reduction in false positive detections of bubbles relative to other models. This model's adeptness at accurately distinguishing between true bubbles and background articulates its high level of discernment. It reinforces its applicability to complex segmentation tasks where precise detection and the reduction of false positives are paramount.

Automated tomography segmentation expedites the development of sophisticated software designed to extract advanced features from bubble dynamics within the cell. The parameters extracted play a critical role in deepening the system's understanding and facilitating experimentalists' research efforts. Moreover, these parameters are crucial for parameterization processes within simulation sciences, enabling more accurate and predictive modeling of cell dynamics.

A quantitative evaluation of the filtering process was conducted on an unseen dataset to assess the effect on predicted quantifications. Prior to filtering, the analysis detected 3255 bubbles, corresponding to a total bubble volume of 4.25%. After applying the filter, the bubble count was reduced to 488 while the overall bubble volume slightly decreased to 4.20%, a change of only 1.2%. These results indicate that the filtering process effectively removes noise and false positives without compromising the overall volumetric quantification, thereby ensuring reliable individual bubble analysis.

Fig. 5(a) demonstrates the software's ability to conduct region-specific analysis tailored to the user's requirements. Although analyses can encompass the entire cell, we have engineered specialized computer vision algorithms to discern between the positive and negative half-cells. To achieve this, we have delineated the membrane on both sides, enabling pixel-exact separation of the electrodes. This approach benefits membranes with irregular shapes, which cannot be separated through conventional, arbitrary methods.


image file: d5dd00158g-f5.tif
Fig. 5 (a) Showcase of the precise electrode differentiation by the software. (b) Density maps depicting the bubble spatial distribution along the cell from three different planes XY, XZ, and ZY. Areas with warmer hues represent high bubble density, while colder colors suggest less populated zones.

Identifying the region of interest can start the feature extraction process from the segmented volumes. Classifying voxels into four distinct categories makes it feasible to quantify the total gas volume within the cell and determine the bubble-to-electrolyte ratio to characterize the system.

An insightful outcome derived from the segmentation process is the generation of a 2D bubble density distribution plot across the cell, which is depicted as a density map from the orthogonal planes XY, XZ, and ZY, as illustrated in Fig. 5(b). We aggregate the predictions across each plane by filtering the predictions to retain only bubble voxels, set to ‘1ʼ, and designating the background as ‘0ʼ. These density maps are then created by consolidating the segmented bubble data into a singular image from various perspectives. This aggregation results in regions densely populated with bubbles throughout the volume being assigned higher values, visually represented by warmer hues on the density map. Cooler colors indicate areas with fewer bubbles, while greener hues mark intermediate zones. The density maps from the XY and XZ planes in Fig. 5(b) qualitatively suggest that, in the given example, the bubbles are uniformly distributed across the cell, with an increasing concentration near the central membrane. This visual representation aids in qualitatively assessing bubble distribution and accumulation within the cell from a 2D perspective, avoiding any 3D rendering approach.

Our methodology facilitates the rendering of volumes in three dimensions, enabling the subsequent extraction of specific features of interest. The process involves reconstructing a 3D volume, within which the segmented bubbles are isolated by a function that segregates each bubble surrounded by background voxels and assigns a unique identifier. This segregation permits the detailed analysis of each bubble, including extracting unique morphological attributes through computer vision techniques. These techniques provide insights into the structural properties of individual bubbles, elucidating characteristics commonly analyzed in material science.

These parameters collectively offer a comprehensive characterization of the bubbles' morphology, enhancing their understanding of their behaviour and interaction within the cell environment. As depicted in Fig. 6, the derived measurements are subsequently visualized in corresponding histograms to provide an overview of the system. Furthermore, our methodology supports direct visualization of these measurements by rendering the 3D volume, where each bubble is color-mapped according to its measured values. This interactive 3D visualization capability significantly improves comprehension of property distribution throughout the cell and can be generated automatically. The software also features the ability to create 360° GIFs of the volume of interest, facilitating the later visualization or presentation of findings.


image file: d5dd00158g-f6.tif
Fig. 6 Analysis of individual bubble shape characteristics within segmented volumes. For each assessed morphological property, distribution histograms are plotted to detail the variance of properties across bubbles. Simultaneously, software-generated, color-mapped 3D visualizations represent these individual properties, where warmer colors indicate higher property values and cooler hues signify lower values.

Integrating automated volume segmentation with sophisticated computer vision algorithms has facilitated the creation of specialized functions tailored for specific use cases, enhancing our comprehension of the systems. By combining a function that delineates the detailed contour of the central membrane with precise, pixel-wise segmentation of bubbles, we have pioneered an approach for conducting membrane blockade analysis. As demonstrated in Fig. 7, this methodology allows for quantifying and visualizing bubble voxels in contact with the membrane, laying the groundwork for subsequent correlation analyses.


image file: d5dd00158g-f7.tif
Fig. 7 Visual comparison of the original volume alongside its segmentation and the representation of bubbles blocking the membrane.

As shown in Fig. 7, this function computes the extent of the membrane's surface area obstructed by bubbles and visualizes the implicated bubbles using an interactive 3D visualization tool, enabling detailed examination. The primary objective of this approach is to facilitate future studies that will investigate the correlation between membrane blockage and potential performance degradation in the system. By quantifying the membrane area affected by bubble obstructions, we aim to identify and analyze factors that may contribute to performance losses, thereby offering insights into optimizing system efficiency and reliability.

To further illustrate our tool's capabilities, it is applied to a representative set of synchrotron X-ray tomography datasets of vanadium electrolyte electrodes modified with three different materials: poly(o-toluidine) (POT), Fe–N–C, and Vulcan. This use case is directly based on the study by Köble et al.,43 which performed comprehensive electrochemical characterization of the same electrode samples, including cyclic voltammetry (CV), electrochemical impedance spectroscopy (EIS), and distribution of relaxation times (DRT) analysis. However, their study lacked 3D bubble image analyses of the accompanying tomography datasets. In the tomography scanning experiment, a three-electrode setup was employed featuring carbon felt electrodes with modification as the counter electrode, and an Ag/AgCl reference electrode (3 M NaCl, E = 0.209 V vs. SHE).20,43 The electrolyte was 0.1 M VOSO4 dissolved in 2 M H2SO4. Before inducing hydrogen evolution, electrodes were thoroughly wetted and scanned once by X-ray tomography to identify residual bubbles in the electrode.

Fig. 8 shows the resulting 3D reconstructions of bubble distributions and the results of quantitative bubble analyses. The bubble volume fraction Rbv is defined as the ratio of bubble volume over the total negative electrode volume. In Fig. 8(a), Rbv in the POT-modified electrode before inducing the HER was about 3.03%, indicating that a moderate amount of air was trapped even after complete wetting. Before inducing the HER, Rbv in the Fe–N–C-modified electrode only 0.81% (as shown in Fig. 8(b)), which implies an excellent ability to remove gaseous species and avoid the formation of large bubbles. In Fig. 8(c), the Vulcan electrode had the highest residual bubble volume of 4.59% before starting the HER, indicating that the additional carbon particles hindered the effective removal of gas during the permeation process. From the bubble volume distribution histogram, it can be seen that the Fe–N–C-modified electrode contains mostly small bubbles, while the Vulcan electrode tends to show a wider distribution. Moreover, the bubbles in both the POT-modified electrode and the Vulcan-modified electrode show more obvious shape deformation (lower sphericity and higher elongation), suggesting that the local pore structure may limit bubble release.


image file: d5dd00158g-f8.tif
Fig. 8 Bubble spatial distribution and bubble morphology characteristics of three modified electrodes: (a) POT modification, (b) Fe–N–C modification, and (c) Vulcan modification before and after the HER reaction induction. Each 3D rendering highlights gas bubbles in red, with the remaining electrode/electrolyte phase in contrasting colors. The bubble volume ratio (Rvb) is labelled for each sample. The histograms show the distributions of key bubble metrics such as volume, sphericity, elongation, flatness, proximity to the electrode wall and orientation are superposed for comparison purposes in contrasting colors.

In addition, analyses of the bubble orientation reveals that in electrodes with a more anisotropic pore structure, bubbles tend to align along specific directions. This preferential orientation is especially evident in the POT and Vulcan modified electrodes, where the directional bias likely reflects the influence of the fibre alignment and pore connectivity on bubble nucleation and growth. These findings are consistent with the experimental data (dynamic vapor sorption and flow injection experiments) reported by Köble et al.,43 indicating that the Fe–N–C-modified electrode has good porosity and wetting behaviour under flow conditions.

To induce bubble formation in the HER, a potential of −0.5 V vs. Ag/AgCl (about −0.3 V vs. RHE) was applied for 5 minutes. A second tomography scan was then performed. The results are compared to the tomographic images in Fig. 8. By comparing the bubble ratio before and after HER, the catalytic effect of each modified electrode due the application of negative potential can be rationalized. For the POT-modified electrode, Rbv increased from 3.03% to 4.36%, a modest increase indicating that the HER was partially suppressed. In contrast, Rbv in the Fe–N–C-modified electrode increases markedly from 0.81% to 7.45%, highlighting the strong catalytic activity of the iron-based sites for hydrogen production. This observation is consistent with previous electrochemical characterizations that Fe–N–C-modified electrodes can significantly enhance side reactions at the negative half-cell of VRFBs.43 Rbv in the Vulcan-modified electrode exhibit a significant increase from 4.59% to 6.59%. The considerable amount of additional gas formed in this case, can be attributed to carbon black agglomerates that promote bubble nucleation.

Observations reported here are consistent with electrochemical trends reported previously by Köble et al.43 In their CV measurements, Fe–N–C and Vulcan-modified electrodes exhibited higher HER current densities at the negative half-cell, which supports our tomographic finding of increased bubble formation in these samples. Additionally, EIS and DRT analyses revealed that the POT-modified electrode exhibited increased polarization resistance and mass transport impedance, likely due to gas entrapment, an effect also captured in our 3D reconstructions as persistent near-wall bubbles. Together, the tomographic and electrochemical data highlight the distinct behavior of each electrode material: Fe–N–C shows strong HER activity that leads to significant bubble growth despite its favorable performance in the V(IV)/V(V) reaction; POT suppresses HER but may hinder liquid transport; and Vulcan falls between these two extremes in both catalytic and transport characteristics.

Overall, this use case has demonstrated that the proposed 3D bubble image analytical tool is able to extract meaningful structural information from complex tomographic datasets and effectively link it with known electrochemical behaviour. By capturing key features such as bubble volume fraction, shape deformation, and spatial orientation, the tool enables detailed investigation of gas evolution and retention phenomena in porous electrodes. These insights contribute to a deeper understanding of gas–liquid interactions in electrochemical systems and provide a valuable basis for future efforts aimed at optimizing electrode architectures, operating conditions, and material selection.56 The successful application to existing datasets further illustrates the practicality and generalizability of the tool, paving the way for its broader adoption in the study of gas-involved electrochemical processes.

Conclusions

In conclusion, the work presented in this article establishes a generic framework for an expedited investigation into the effects of trapped bubbles in vanadium redox flow batteries (VRFB), utilizing 3D tomographic images as a rich data source. Through this study, we have successfully developed software designed for segmenting 3D synchrotron X-ray tomographic images into four pertinent categories: bubbles, electrolyte, membrane, and gasket. Moreover, our framework enables the autonomous differentiation between electrodes, quantifies bubble volumes, facilitates individual bubble shape analysis, generates 2D bubble density maps, and computes membrane blockage.

In our application example, we compared electrodes modified with POT, Fe–N–C, and Vulcan treatments and demonstrated that our tool can distinguish differences in bubble dynamics before and after running the hydrogen evolution reaction (HER). This comparison reveals that, for example, the Fe–N–C modification causes a pronounced increase in bubble volume after the HER—indicating a markedly catalytic activity for hydrogen production, whereas the POT-modification shows only a modest increase. Although the extracted morphological descriptors are currently difficult to relate to known electrochemical behaviour, future work could combine them with numerical studies (e.g., multiphase flow or 3D transport simulations) to assess the potential impact of bubble morphology on fluid resistance, local reactant accessibility, and overall cell performance. These insights are valuable in view of understanding bubble dynamics in VRFBs, and they provide valuable insights for electrode optimization.

The presented analytical tool allows experimentalists to replace the time-consuming and error-prone manual analyses of synchrotron tomographic images of VRFBs. It expedites the rapid quantification of bubbles. Furthermore, the tool's advanced automation and visualization capabilities enable swift, visual comparisons across different volumes, enabling comparative degradation analyses between various cells and paving the way towards 4D analyses of bubble dynamics with resolution in space and time. The tool can be readily extended to other electrochemical systems, such as water electrolysers, where bubble formation and transport plays a critical role for performance and durability. We intend to make this tool publicly accessible, ensuring its design supports the seamless incorporation of additional feature extraction functions, new models, and various visualization techniques based on the needs of theoretical and experimental research.

Author contributions

André Colliard-Granero: conceptualization, methodology, software, visualization, writing – original draft, writing – review & editing. Kangjun Duan: conceptualization, writing – original draft, writing – review & editing. Roswitha Zeis: visualization, supervision, writing – original draft, writing – review & editing. Michael H. Eikerling: conceptualization, supervision, writing – original draft, writing – review & editing. Kourosh Malek: conceptualization, supervision, writing – original draft, writing – review & editing. Mohammad J. Eslamibidgoli: conceptualization, supervision, visualization, writing – original draft, writing – review & editing.

Conflicts of interest

There are no conflicts to declare.

Data availability

The code and demonstration of the model predictions can be found in the repository UTILE-Redox at https://github.com/andyco98/UTILE-Redox. The employed annotated dataset and the trained model are accessible at Zenodo: https://doi.org/10.5281/zenodo.13863984.

Acknowledgements

The authors acknowledge the financial support from the Helmholtz Imaging Platform HIP (a platform of the Helmholtz Incubator on Information and Data Science) grant number DB002249, as well as the Federal Ministry of Research, Technology and Space (BMFTR) that supports the German-Canadian Materials Acceleration Centre (GC-MAC) under the grant number 01DM21001A. K. D. would like to acknowledge the support received from the China Scholarship Council under grant number 202106950013. The authors also acknowledge the Gauss Centre for Supercomputing e. V. (https://www.gauss-centre.eu/) for funding this project by providing computing time on the GCS Supercomputer JUWELS57 at Jülich Supercomputing Centre (JSC) of Forschungszentrum Jülich.

Notes and references

  1. K. Lourenssen, J. Williams, F. Ahmadpour, R. Clemmer and S. Tasnim, J. Energy Storage, 2019, 25, 100844 CrossRef.
  2. R. Ye, D. Henkensmeier, S. J. Yoon, Z. Huang, D. K. Kim, Z. Chang, S. Kim and R. Chen, J. Electrochem. Energy Convers. Storage, 2018, 15, 010801 Search PubMed.
  3. Z. Huang and A. Mu, Int. J. Energy Res., 2021, 45, 14170–14193 CrossRef.
  4. A. Lucas and S. Chondrogiannis, Int. J. Electr. Power Energy Syst., 2016, 80, 26–36 CrossRef.
  5. W.-C. Huang, Q. Zhang and F. You, Adv. Appl. Energy, 2023, 9, 100126 CrossRef CAS.
  6. D. Saygin, O. Tör, M. Cebeci, S. Teimourzadeh and P. Godron, Energy Strategy Rev., 2021, 34, 100625 Search PubMed.
  7. K. Oh, S. Won and H. Ju, Electrochim. Acta, 2015, 181, 13–23 Search PubMed.
  8. S. Tetteh, M. R. Yazdani and A. Santasalo-Aarnio, J. Energy Storage, 2021, 41, 102829 Search PubMed.
  9. T. Jirabovornwisut and A. Arpornwichanop, Int. J. Hydrogen Energy, 2019, 44, 24485–24509 CrossRef CAS.
  10. X. Z. Yuan, C. Song, A. Platt, N. Zhao, H. Wang, H. Li, K. Fatih and D. Jang, Int. J. Energy Res., 2019, 43, 6599–6638 Search PubMed.
  11. B. Turker, S. A. Klein, E.-M. Hammer, B. Lenz and L. Komsiyska, Energy Convers. Manag., 2013, 66, 26–32 CrossRef CAS.
  12. M. Skyllas-Kazacos, L. Cao, M. Kazacos, N. Kausar and A. Mousa, ChemSusChem, 2016, 9, 1521–1543 CrossRef CAS PubMed.
  13. L. Eifert, R. Banerjee, Z. Jusys and R. Zeis, J. Electrochem. Soc., 2018, 165, A2577 Search PubMed.
  14. K. Köble, A. Ershov, K. Duan, M. Schilling, A. Rampf, A. Cecilia, T. Faragó, M. Zuber, T. Baumbach and R. Zeis, J. Energy Chem., 2024, 91, 132–144 CrossRef.
  15. M. Schilling, M. Braig, K. Köble and R. Zeis, Electrochim. Acta, 2022, 430, 141058 Search PubMed.
  16. R. Schweiss, A. Pritzl and C. Meiser, J. Electrochem. Soc., 2016, 163, A2089 Search PubMed.
  17. L. Eifert, Z. Jusys, R. Banerjee, R. Behm and R. Zeis, ACS Appl. Energy Mater., 2018, 1, 6714–6718 CrossRef CAS.
  18. I. Derr, M. Bruns, J. Langner, A. Fetyan, J. Melke and C. Roth, J. Power Sources, 2016, 325, 351–359 Search PubMed.
  19. Y.-J. Zhang, Q. Ye and M. Ni, J. Power Sources, 2023, 564, 232837 CrossRef CAS.
  20. L. Eifert, Z. Jusys, R. J. Behm and R. Zeis, Carbon, 2020, 158, 580–587 Search PubMed.
  21. L. Wei, T. Zhao, Q. Xu, X. Zhou and Z. Zhang, Appl. Energy, 2017, 190, 1112–1118 CrossRef CAS.
  22. L. Eifert, N. Bevilacqua, K. Köble, K. Fahy, L. Xiao, M. Li, K. Duan, A. Bazylak, P. C. Sui and R. Zeis, ChemSusChem, 2020, 13, 3154–3165 Search PubMed.
  23. J. T. Clement, Investigation of localized performance and gas evolution in all-vanadium redox flow batteries via in-situ distributed diagnostic techniques, PhD dissertation, The University of Tennessee, 2016.
  24. J. Lee, J. T. Muya, H. Chung and J. Chang, ACS Appl. Mater. Interfaces, 2019, 11, 42066–42077 CrossRef CAS PubMed.
  25. A. Fetyan, G. A. El-Nagar, I. Lauermann, M. Schnucklake, J. Schneider and C. Roth, J. Energy Chem., 2019, 32, 57–62 Search PubMed.
  26. G. Besagni, P. Brazzale, A. Fiocca and F. Inzoli, Flow Meas. Instrum., 2016, 52, 190–207 CrossRef.
  27. A. Colliard-Granero, K. A. Gompou, C. Rodenbücher, K. Malek, M. Eikerling and M. J. Eslamibidgoli, Phys. Chem. Chem. Phys., 2024, 26, 14529 Search PubMed.
  28. M. Maier, Q. Meyer, J. Majasan, R. E. Owen, J. B. Robinson, J. Dodwell, Y. Wu, L. Castanheira, G. Hinds and P. R. Shearing, Front. Energy Res., 2020, 8, 582919 Search PubMed.
  29. A. Pandit, J. Varley, R. Thorpe and J. Davidson, Chem. Eng. Sci., 1992, 47, 1079–1089 Search PubMed.
  30. G. G. Yen and H. Lu, ISA Trans., 2002, 41, 273–282 Search PubMed.
  31. K. Köble, L. Eifert, N. Bevilacqua, K. F. Fahy, A. Bazylak and R. Zeis, J. Power Sources, 2021, 492, 229660 Search PubMed.
  32. N. Bevilacqua, L. Eifert, R. Banerjee, K. Köble, T. Faragó, M. Zuber, A. Bazylak and R. Zeis, J. Power Sources, 2019, 439, 227071 Search PubMed.
  33. P. C. Ghimire, A. Bhattarai, T. M. Lim, N. Wai, M. Skyllas-Kazacos and Q. Yan, Batteries, 2021, 7, 53 Search PubMed.
  34. Y. Wen and R. Jervis, Curr. Opin. Chem. Eng., 2022, 37, 100836 CrossRef.
  35. A. P. Black, A. Sorrentino, F. Fauth, I. Yousef, L. Simonelli, C. Frontera, A. Ponrouch, D. Tonti and M. R. Palacín, Chem. Sci., 2023, 14, 1641–1665 RSC.
  36. A. Colliard-Granero, M. Batool, J. Jankovic, J. Jitsev, M. H. Eikerling, K. Malek and M. J. Eslamibidgoli, Nanoscale, 2022, 14, 10–18 RSC.
  37. A. Colliard-Granero, J. Jitsev, M. H. Eikerling, K. Malek and M. J. Eslamibidgoli, ACS Nanosci. Au, 2023, 3, 398–407 CrossRef CAS PubMed.
  38. K. Tang, Q. Meyer, R. White, R. T. Armstrong, P. Mostaghimi, Y. Da Wang, S. Liu, C. Zhao, K. Regenauer-Lieb and P. K. M. Tung, Comput. Chem. Eng., 2022, 161, 107768 CrossRef CAS.
  39. Z. Li, L. Qin, B. Guo, J. Yuan, Z. Zhang, W. Li and J. Mi, Acta Metall. Sin., 2021, 1–9 Search PubMed.
  40. R. Kopp, J. Joseph, X. Ni, N. Roy and B. L. Wardle, Adv. Mater., 2022, 34, 2107817 CrossRef CAS PubMed.
  41. D. Kartouzian, A. Mohseninia, H. Markötter, J. Scholta and I. Manke, ECS Trans., 2018, 85, 927 CrossRef CAS.
  42. A. Mohseninia, D. Kartouzian, H. Markötter, U. U. Ince, I. Manke and J. Scholta, ECS Trans., 2018, 85, 1013 CrossRef CAS.
  43. K. Köble, M. Schilling, L. Eifert, N. Bevilacqua, K. F. Fahy, P. Atanassov, A. Bazylak and R. Zeis, ACS Appl. Mater. Interfaces, 2023, 15, 46775–46789 CrossRef PubMed.
  44. T. W. Wysokinski, D. Chapman, G. Adams, M. Renier, P. Suortti and W. Thomlinson, Nucl. Instrum. Methods Phys. Res., Sect. A, 2007, 582, 73–76 CrossRef CAS.
  45. M. Vogelgesang, S. Chilingaryan, T. dos_Santos Rolo and A. Kopmann, IEEE 14th International Conference on High Performance Computing and Communication & 2012 IEEE 9th International Conference on Embedded Software and Systems, IEEE, 2012 Search PubMed.
  46. C. T. C. Inc.,, Dragonfly 2022, vol. 2, software available at https://www.theobjects.com/dragonfly Search PubMed.
  47. O. Ronneberger, P. Fischer and T. Brox, in International Conference on Medical image computing and computer-assisted intervention, Springer International Publishing, Cham, 2015, pp. 234–241 Search PubMed.
  48. S. Xie, R. Girshick, P. Dollár, Z. Tu and K. He, Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 1492–1500 Search PubMed.
  49. O. Oktay, J. Schlemper, L. L. Folgoc, M. Lee, M. Heinrich, K. Misawa, K. Mori, S. McDonagh, N. Y. Hammerla and B. Kainz, arXiv, preprint arXiv:1804.03999, 2018,  DOI:10.48550/arXiv.1804.03999.
  50. H. Huang, L. Lin, R. Tong, H. Hu, Q. Zhang, Y. Iwamoto, X. Han, Y.-W. Chen and J. Wu, ICASSP 2020-2020 IEEE international conference on acoustics, speech and signal processing (ICASSP), IEEE, 2020 Search PubMed.
  51. H. Cao, Y. Wang, J. Chen, D. Jiang, X. Zhang, Q. Tian and M. Wang, European conference on computer vision, Springer Nature Switzerland, Springer Nature Switzerland, Cham, 2022, pp. 205–218 Search PubMed.
  52. G. Bradski, Dr Dobb's Journal, Software Tools for the Professional Programmer, 2000, vol. 25, pp. 120–123 Search PubMed.
  53. W. J. Schroeder, L. S. Avila and W. Hoffman, IEEE Comput. Graph. Appl., 2000, 20, 20–27 CrossRef.
  54. D. P. Kingma and J. Ba, arXiv, preprint arXiv:1412.6980, 2014,  DOI:10.48550/arXiv.1412.6980.
  55. T.-Y. Lin, P. Goyal, R. Girshick, K. He and P. Dollár, Proceedings of the IEEE international conference on computer vision, 2017, pp. 2980–2988 Search PubMed.
  56. K. Duan, K. Köble, A. Ershov, M. Schilling, A. Rampf, A. Cecilia, T. Faragó, M. Zuber, T. Baumbach and P. c. Sui, ChemSusChem, 2025, 2500282 Search PubMed.
  57. D. Alvarez, JUWELS cluster and booster: exascale pathfinder with modular supercomputing architecture at juelich supercomputing centre., Journal of Large-Scale Research Facilities, 2021, 7, A183 Search PubMed.

Footnote

Equal contribution.

This journal is © The Royal Society of Chemistry 2025
Click here to see how this site uses Cookies. View our privacy policy here.