Introduction

RTSDs are used for X-ray and \(\gamma\)-ray detection over the last three decades in medical imaging, astrophysics, homeland security and other applications which require high performance detectors at low costs1,2,3,4. RTSDs do not have the requirement of cryogenic cooling systems and have high bandgap, high atomic number, high density which are desirable absorption of high energy photons5. Additionally, high quality RTSDs with uniform and optimized charge transport properties are also desired. Typically, RTSDs with no polarization effect, excellent fabrication quality, high breakdown voltage, high drift velocity of charges and high energy resolution is desired. CZT used over several decades has the desired detection properties.

Pixelated CZT are used in pulse mode at high fluxes6,7 and high performance has been shown at room temperatures. The yield and performance of high quality detector material is limited by presence of randomly distributed high concentrations of defects. CZT is also prone to polarization effects (at high photon fluxes \(10^{6} \mathrm{{mm}}^{-2}\, \mathrm{{s}}^{-1}\)) due to the build up of trapped charge in the crystal7. Recently developed high flux capable CZT8 has been characterized in high-flux scenarios9, and also been with intense light sources like LCLS XFEL10 and ESRF synchrotron11. Detrimental defects are also observed in CZT12, which are attributed to compositional inhomogeneity due to non-unity segregation coefficient of Zn13, high concentration of secondary phases, Te inclusions and wall dislocations, and localized fluctuations of electric field14. These defects acts as trapping centers and promotes non-uniformity in charge transport, thereby affecting the detector’s performance adversely14,15,16,17. Thus, high degree of uniformity is required before further widespread use of CZT18,19 in different applications.

Characterization of CZT and other RTSDs have been attempted for the last several years. Thermal ionization energies of electron and hole traps were measured using thermoelectric emission spectroscopy (TEES) and thermally stimulated conductivity (TSC) measurements20. Using microwave cavity perturbation techniques21, trap lifetime was determined in CdZnTe and HgI\(_{2}\). In CdZnTe, the electron and hole traps were irradiated with 5 MeV focused proton beam to generate electron–hole pairs and fill traps, which were later released by thermal re-emission. By excitation near the vicinity of the appropriate electrodes, electron and hole traps were distinguished22. Analysis of simultaneous multiple peaks on TSC measurements showed deep trap levels in CdZnTe23. TSC measurements further showed 9 defect levels and irradiation-induced variations of these levels on CdZnTe:Al24. Using statistical model of charge collection efficiency based on known electron average trapping time, the average hole trapping time was derived25. By comparing the measured and simulated signals for holes as measured in the cathode, average hole de-trapping time was extracted26,27,28. The change in carrier mobility due to effects of deep trap in CZT have been studied29. Indium doped CZT crystal with 13 trap levels had been observed30. Using pulsed laser microwave cavity perturbation method selectively at the surface and in the bulk region of CZT, imperfections due to mechanical damage or adsorbed chemical species which lead to charge trapping or increase of leakage current have been characterized31. The influence of deposition techniques and type of metal contacts on the recombination and trapping defects at the metal-semiconductor interface has been studied32. The high flux capable CdZnTe and its uniformity has also been characterized14. In literature, the defects and charge transport properties of electrons and holes are measured considering homogeneous behavior of the defects in the RTSD. However, the homogeneity of the material properties and repeatability of the defects and charge transport properties within a detector and across multiple detectors are unknown. Additionally, for high energy resolution and sub-millimeter position detection accuracy, a thorough in-depth sub-pixel level characterization of RTSDs in required. However, this approach requires numerous novel sophisticated experiments, skilled manpower and is traditionally hugely time consuming. On the other hand, deployment of such detector arrays requires precise characterization of individual detectors, and knowledge of the defects in a 3D manner.

Machine learning has been tremendously popular in the last decade with several novel works virtually across every major science and engineering discipline. In the recent past Deep Learning (DL)33 gained popularity, in particular the classes of Convolutional Neural Networks (CNNs)34,35, Recurrent Neural Networks (RNN)36,37 and Generative Adversarial Networks (GAN)38 being the most popular architectures. Recent focus has been on applying machine learning to physics based systems, material science, drug discovery and others. Integrating physics-based modeling and Machine Learning is becoming more popular over the years39,40. Solving problems in physics governed by PDEs using Neural Networks has been done41,42. DeepONets43 have been demonstrated as a powerful tool to learn nonlinear operators in a supervised data-driven manner. Two-dimensional wave equation is modeled as a Recurrent Neural Network44. 2D Poisson Equation has been solved with a Physics Informed Neural Networks45. In most of these PBML approaches, relatively simpler PDEs have been solved. However, the charge transport in a RTSD has multitude of coupled PDEs46 involving charge drift, trapping, detrapping and recombination of electrons and holes.

In this paper, we develop the PBML approach for characterizing the RTSD in 3D, from the 1D physical models as described in our previous works47,48,49,50,51,52,53. We propose to reap the benefits of machine learning in characterizing radiation detectors in 3D at a sub-pixel resolution, which to the best of our knowledge is the first contribution in this area.

Our novel 3D PBML model is derived from the physical charge transport equations for both electrons and holes. Using the PBML approach, we aim to solve for the electron and hole drift coefficients as well as the material defects such as trapping, detrapping and recombination lifetimes for electrons and holes. Multiple trapping centers are also considered in this approach. Compared to classical methods, our PBML model identifies the defects at a high spatial resolution of 100 \(\upmu\)m. The input to the model consists of electron-hole pairs at different positions and the output from the model consists of signals at the electrodes along with the free and trapped electron and hole charges in the voxels over time. The 3D RTSD volume is spatially discretized into voxels by virtually segmenting along x-axis, y-axis and z-axis. The physical charge transport equations are considered in each voxel. Our PBML model does not only consider the charge transport normal to the electrode surfaces in a pixel but also the second order effects due to charge motion in the lateral direction. Compared to a traditional Convolutional Neural Network, Recurrent Neural Network or Fully Connected Networks, which typically contains millions of trainable weights, our model is designed to have the same number of trainable weights as the number of unknowns in the physical equation of a discretized RTSD. Conceptually, prior knowledge as described by the physical laws and the physical process is used in this model. Moreover, the trained model weights are related one-to-one with the detector material properties as dictated by the discretized physical charge transport equations.

This proposed novel PBML model for 3D RTSDs in sub-pixel domain aims to solve the following problems currently plaguing the characterization of radiation detectors with a reasonable detection area for wide scale implementation in medical imaging and security applications:

  • Fine characterization of detector material properties spatially in 3D in a fast and efficient way.

  • Micron level defect identification and characterization in sub-pixelated volume.

  • Application of corrections to these RTSDs at sub-pixel level.

Methods

In this work, a PBML approach is developed for 3D sub-pixel characterization of the RTSD. In order to train and test the PBML model, actual measured data would be needed. Unfortunately, no such dataset is available in the literature for RTSD. In order to generate this dataset, we generate synthetic data using the classical equations in MATLAB using pre-defined material properties which are the ground truth parameters. The dataset consists of electron–hole pairs injected at different voxels of the 3D model and the corresponding signals at the electrodes over time along with the electron and hole charges (free and trapped) in the voxels over time. The magnitude of the injected charges are normalized to 1. Following the charge conservation in the bulk of the RTSD, the magnitude of the free and trapped charges are always less than 1. The signals at the electrodes have the range of \([-\,1, 1]\). This range of signals and charges (free and trapped) are due to the combination of material properties chosen apriori. Since the learning-based model is developed in a voxelized manner, the training data generated using the classical approach is also voxelized. The experimental data using the classical model has been developed for non-uniform electric weighting potential between the cathode and anode pixels, and also based on the location of the anode pixels. During training, the PBML model is trained using only a subset of data from the dataset as the charges drift to neighboring voxels from the injection positions and the weights in those voxels are trained in this process.

Figure 1
figure 1

Variation of loss over epochs.

The model weights are initialized during the start of training process. The model is trained over several epochs by computing the loss function based on the output corresponding to each input injections for the different reduced models. The model is a recurrent network structure over time, and hence Backpropagation through Time (BPTT)54,55 is used to compute the gradients of the loss with respect to the trainable weights in the model. Stochastic gradient descent based method—ADAM56 is used for optimization and the weights are updated in each epoch. The learning rate is initialized at \(5 \times 10^{-4}\) with 2 momentum terms set as \(\beta _{1}=0.9\) and \(\beta _{2}=0.999\). The training loss reduces over epochs. However, after certain epoch \(E_{1}\), the training loss started oscillating. These oscillations increases with epochs. After observing this oscillation for certain epochs \(E_{2}\), the learning rate was reduced to \(1 \times 10^{-5}\) which resulted in better convergence of the loss function.

Figure 2
figure 2

Variation of loss over epochs.

For the experimental study with certain 3D sub-pixels, the variation of loss over epochs is shown in Fig. 2. It is seen that the training loss starts to oscillate from epoch 500 which keeps on increasing. However, when the learning rate is reduced at epoch 2500, it is seen that the training loss stops oscillating and training loss further reduces until it saturates and stops reducing any further. Figure 1 shows the variation of training loss over epochs for the experimental studies with all 3D sub-pixels in a single pixel. At epoch 1000 the learning rate is changed to \(1 \times 10^{-5}\) which results in no significant oscillation of the training loss.

Once the model is trained, the weights of the model converges to the detector ground truth parameters. Our model has been developed using the popular machine learning Tensorflow library57 in Python using eager execution mode. During training, the loss is monitored over epochs and allowed to converge until it stops reducing. In our experiments, there is no improvement in the trained weights of this PBML model when there is no reduction in training loss. We performed experimental studies with \(k=1\) and \(l=n=1000\) in Eq. (7) for a model having 100 voxels. The single anode pixel (out of \(11 \times 11\) pixels) was divided into \(12 \times 12\) sub-pixels, with the cathode as a single electrode and then the data for signals, free and trapped charges has been generated with electron–hole injection at each positions.

Physics based machine learning model of RTSD in 3D

In solid-state detectors, electrons and hole transport properties play a significant role in selecting detectors for any applications. When high energy X-rays or \(\gamma\) photons hit the CdZnTe detector, it undergoes Photoelectric effect, Comption Scattering or Pair Production and deposit energy in the detector creating electron–hole pairs in these processes. The Shockley–Ramo theorem states that the moving charge within a detector induces charge on the electrodes of the detector which are extracted58. The weighting potential when a point charge is at a particular location determines the charge (or current) induced in the electrodes. In our study, we consider a single large electrode (cathode) and a pixelated anode (\(11 \times 11\)) as shown in Fig. 3.

The weighting potential can be calculated numerically using Finite Element Method (FEM) with ANSYS Maxwell software by solving the Poisson equation. The weighting potential of the 121 anode pixels are not identical, and there are some variation in the weighting potential of central pixels, edge pixels and corner pixels. Moreover, the weighting potential under one pixel also shows slight lateral variation59.

Figure 3
figure 3

Pixelated CdZnTe detector. Anode is pixelated and a single cathode.

Figure 4
figure 4

Variation of electric field between cathode and anode pixels with a potential difference of 1000 V for GaAs crystal.

Additionally, the variation of voltage along the volume of the detector in 2D as shown in Fig. 4 for a case of 6 pixelated anodes and a large cathode on the opposite end at a gap of 10 mm. The length of the cathode is 22 mm. The simulation for the electric field and voltage are done for GaAs RTSD which has a relative permeability \(\mu _{r} = 12.9\) using COMSOL Multiphysics software. The voltage is uniform in most of the region between anodes and the cathode. For those electrons and holes under one pixel, the charges will drift perpendicularly to their corresponding electrodes. However, the charges in between the anode pixels will have different drift behavior59. The non-uniformity of the voltage is shown in Fig. 4 near the anodes. The corresponding electric field is non-uniform which is shown in Fig. 5. In most of the region, the electric field is perpendicular to the cathode and anode pixels. However, near the anode, the electric field bends towards the nearest anode. The non-uniform electric field in between the anode pixels is shown in Fig. 5. In the region of uniform electric field, the motion of electrons and holes will drift perpendicular to the electrodes. However, the non-uniform electric field under the gap will bend the trajectory of electrons closer to the nearest anode. The electrons in the gap between the anode pixels will be collected to the closest anode pixel. Thus, the behavior of the electrons will change close to the pixelated anodes.

Figure 5
figure 5

Variation of electric field between the anode pixels and cathode with GaAs crystal. The electric field becomes non-uniform near the anode pixels.

Additional effects of charge trapping, pixel jumping, non-uniform electric field due to different charge concentrations may also be present in the detector. The trapping, detrapping and recombination is governed by Schockley–Read–Hall Theory60,61. The trapping and detrapping lifetimes dictate whether the defects induce short or long term trapping of charges in the detector. Signals collected at the anodes and cathode arise out of the movement of charges. We consider the CdZnTe detector with 2 trapping centers for holes and 1 trapping center for electrons.

The data for training the proposed 3D PBML model has been generated in MATLAB using the charge transport equations46,47, by defining the drift coefficients, trapping, detrapping and lifetimes for electrons and holes as pre-defined parameters \(\mu _{e}\), \(\mu _{h}\), \(\tau _{eT}\), \(\tau _{eD}\), \(\tau _{hT1}\), \(\tau _{hD1}\), \(\tau _{hT2}\), \(\tau _{hD2}\), \(\tau _{e}\), and \(\tau _{h}\) respectively, alongwith electric field in the detector. The classical model has been created by spatially discretizing the detector. For charge input at different voxels in the classical model, the signals are generated at the electrodes. Additionally, the free and trapped electron and hole charges are computed for each time step, with the total time steps defined a priori. The input-output data for training the learning-based model consists of the input electron–hole pair injected in the detector at a known voxel position alongwith the signals, free and trapped electron and hole charges in different spatial voxels of the classical model over different time steps in the simulation.

3D learning model

The configuration of CdZnTe detector in our PBML model consists of a CdZnTe crystal with a single planar cathode on one end and several anode pixels (\(11 \times 11\)) on the other end as shown in Fig. 6 (left). Out of the 121 anode pixels, we just use the cuboidal volume of the crystal under the central anode pixel and the cathode on the other end, and subdivide this volume into voxels as shown in Fig. 6. In the x-direction (OX), we divide into M divisions, in the y-direction (OY), we subdivide into N divisions and in z-direction (OZ), we subdivide into P divisions. Thus, the total voxels are \(M\times N \times P\). Since the single anode pixel is subdivided in x and y-direction into M and N divisions, we consider the number of subpixels as \(M \times N\).

Figure 6
figure 6

CZT detector with 121 pixelated anodes at one end and a single planar cathode on the opposite end (left). A single pixel is further discretized into subpixels (right).

The material properties of the CdZnTe for electrons and holes, such as \(\mu _{e}\), \(\mu _{h}\), \(\tau _{eT}\), \(\tau _{eD}\), \(\tau _{hT1}\), \(\tau _{hD1}\), \(\tau _{hT2}\), \(\tau _{hD2}\), \(\tau _{e}\), and \(\tau _{h}\) are considered at each voxel d as parameters independent of the neighboring voxels. These refer to the drift coefficients for electrons and holes, electron trapping lifetime, electron detrapping lifetime, hole trapping 1 lifetime, hole detrapping 1 lifetime, hole trapping 2 lifetime, hole detrapping 2 lifetime, electron lifetime and hole lifetime respectively. Thus, for a voxel d, the material properties are expressed as \(\mu _{e,d}\), \(\mu _{h,d}\), \(\tau _{eT,d}\), \(\tau _{eD,d}\), \(\tau _{hT1,d}\), \(\tau _{hD1,d}\), \(\tau _{hT2,d}\), \(\tau _{hD2,d}\), \(\tau _{e,d}\), and \(\tau _{h,d}\). We refer to these discretized properties as trainable weights spatially distributed in the CdZnTe detector. Each of the material properties (such as \(\tau _{eT}\)) are thus converted into \(M \times N \times P\) discrete values. For each of these properties or coefficients (referred here as \(\tau\) in general), we compute the number of charge particles (electrons or holes) remaining at that particular level as \(N_{left} = N_{0}e^{-t_{1}/\tau }\), where \(N_0\) and \(N_{left}\) are the number of charged particles at a particular energy level at time \(t=0\) and \(t=t_{1}\) respectively. In our learning model with 100 voxels, we used the \(t_{1} = 10\) ns time steps. For a given \(\tau\), we can compute the fraction of charges transitioning from one energy level to another, which is the probability of transition of charges. We consider all these probabilities as trainable weights in the PBML model. For example in voxel d, \(w_{eD,d}\) is the probability of the electron getting detrapped from the trapped level to the conduction band.

The motion of charges is taken into account by considering non-uniform electric field between the electrodes (cathode and anode) as shown in Figs. 4 and 5. The charge transfer thus occurs not only in z-direction (OZ) which is perpendicular to the electrodes of opposite polarity but also in x and y-direction (OX) and (OY) as well. Figure 7 shows electrons at a particular voxel at time \(t=0\). Due to the non-uniform electric field, the electrons move in 3D direction. However, the motion in z-direction (OZ) is much significant compared to the motion in the (OX) and (OY) directions since the electric field is much stronger in the z-direction. When electron moves in z-direction, we assume the motion of the electrons in the x–y plane to be constrained in the immediate neighboring locations. For a voxel position of (ijk), the electron drifts to immediate neighboring locations of \((i+1,j)\), \((i-1,j)\), \((i,j+1)\), \((i,j-1)\), \((i+1,j+1)\), \((i-1,j-1)\), \((i+1,j-1)\), \((i-1,j+1)\) in the x-y plane. Figure 8 shows the electron drift in 3D during a time step. From the z position of k, the electrons move in the immediate neighboring voxels having z position \(k+1\) and \(k+2\). The holes move in the opposite direction from Anode to Cathode due to its opposite polarity.

Figure 7
figure 7

Electrons at a particular voxel position at time \(t = 0\).

Figure 8
figure 8

Electron drift in the neighboring voxels at time \(t = t_{1}\).

Once the charge, for example holes drift from neighboring voxels to a voxel (ijk) at time t, it is added to the existing holes in that voxel from the previous time \(t = t-1\) to form net hole charges. Equation (1) shows the phenomena of the drift of holes during the time t, forming total hole charge \(q^{t,(i,j,k)}_{h,int}\). A fraction of this net hole charge \(q^{t,(i,j,k)}_{h,int}\) then combines with the intrinsic electron concentration in bulk of the material at voxel (ijk) with weights \(w_{hRec,(i, j, k)}\) as shown in Eq. (2). The resulting free holes after recombination is \(q^{t,(i,j,k)}_{h,int1}\) as shown in Eq. (3). The concentration of holes in the r th trap center increases based on the fraction \(w_{hT,r,(i,j,k)}\) of free holes \(q^{t,(i,j,k)}_{h,int1}\) getting trapped and the fraction \(w_{hD,r,(i,j,k)}\) of holes in that trap center \(\tilde{q}^{ t,(i,j,k)}_{h,r}\) which is detrapped. We consider R trapping centers for holes. \(q^{t,(i,j,k)}_{h,mob}\) in Eq. (5) is the net free / mobile holes considering the phenomena of trapping and detrapping in the R different hole trapping centers of the RTSD. A fraction of this free holes \(q^{t,(i,j,k)}_{h,mob}\) drifts with weight \(w_{h,(i,j,k)}\) to the neighboring voxels as shown in Eq. (6). Similar equations are also valid for electrons which now moves from Anode to Cathode due to opposite polarity.

For illustrative purposes, Fig. 9 shows the operation in a voxel (4, 7, 3) at time t. At any time \(t-1\), the charge in that voxel is \(q^{t-1,(4,7,3)}_h\) for holes and \(q^{t-1,(4,7,3)}_e\) for electrons. The electrons from adjacent voxels in 3D drift at time t and are added onto the existing charge. Some of the net electrons gets recombined in the bulk of the crystal with the intrinsic hole concentration in the bulk of the material based on the electron lifetime probability \(w_{e,(4,7,3)}\). The electrons then get trapped with probability \(w_{eT,(4,7,3)}\) to the trap level in the detector and detraps electrons back as excess electron concentration over bulk with a probability of \(w_{eD,(4,7,3)}\). Following the 3D electric field, a fraction of the electron charges may be left behind in the voxel (4,7,3) while the remaining fraction drifts to the neighboring voxels. Exactly same operations are repeated for holes, with the holes drifting from anode to cathode.

Figure 9
figure 9

Operation in Voxel (4, 7, 3) at time t.

$$\begin{aligned}{} & {} q^{t,(i,j,k)}_{h,int} = q^{t-1,(i,j,k)}_{h} + (q^{t,(i+1,j,k)}_{h,o} + q^{t,(i,j+1,k)}_{h,o} + q^{t,(i,j,k+1)}_{h,o} + q^{t,(i+1,j,k+1)}_{h,o} + q^{t,(i,j+1,k+1)}_{h,o} + \cdots ), \end{aligned}$$
(1)
$$\begin{aligned}{} & {} q^{t,(i, j, k)}_{h,Rec} = w_{hRec,(i, j, k)} \times q^{t,(i, j, k)}_{h,int}, \end{aligned}$$
(2)
$$\begin{aligned}{} & {} q^{t,(i, j, k)}_{h,int1} = q^{t,(i, j, k)}_{h,int} - q^{t,(i, j, k)}_{h,Rec}, \end{aligned}$$
(3)
$$\begin{aligned}{} & {} \begin{aligned} \tilde{q}^{ t,(i,j,k)}_{h,r}&= \tilde{q}^{ t,(i,j,k)}_{h,r} + (w_{hT,r,(i,j,k)} \times {q}^{ t,(i,j,k)}_{h,int1}) \\&\quad - (w_{hD,r,(i,j,k)} \times \tilde{q}^{ t,(i,j,k)}_{h,r}) \end{aligned}, \end{aligned}$$
(4)
$$\begin{aligned}{} & {} \begin{aligned} q^{t,(i,j,k)}_{h,mob}&= q^{t,(i,j,k)}_{h,int1} \times (1 - w_{hRec,(i,j,k)} - \Sigma _{r=1}^{R} w_{hT,r,(i,j,k)}) \\&\quad + \Sigma _{r=1}^{R}(\tilde{q}^{ t,(i,j,k)}_{h,r}\times w_{hD,r,(i,j,k)}), \end{aligned} \end{aligned}$$
(5)
$$\begin{aligned}{} & {} q^{t,(i,j,k)}_{h,o} = w_{h,(i,j,k)} \times q^{t,(i,j,k)}_{h,mob}. \end{aligned}$$
(6)

The mathematical operations in each voxel in this 3D PBML model is also described in simplified voxelized 1D models47,48. In our PBML model of charge transport the voxels are connected in a bidirectional manner in 3D to form a complicated PBML model. A simplified representation of the model is shown in Fig. 10. The left of the model has a planar cathode and the right consists of sub-pixelated anodes. The RTSD between the cathode and a anode pixel is subdivided into 3D voxels as shown with blue squares in Fig. 10. The input electron–hole charge pair injections can be in any of these voxels which depends on the position of interaction of high energy photons with the RTSD. The electrons drift towards the anode through the neighboring voxels in the z-direction (of Figs. 7, 8) as shown by blue lines in the figure. On the other hand, the red lines show the drift of holes from one voxel to the neighboring voxels towards the cathode in the negative z-direction (of Figs. 7, 8). The bidirectional connection shown by dotted lines indicate the movement of electrons and holes in the lateral direction (OX and OY) which basically represents lateral (2 nd order) drift of charges in x-y plane.

Figure 10
figure 10

Interconnections among voxels in the 3D model. Each blue squares represents a Voxel shown in Fig. 9.

The model is trained with input–output pairs of data. The input data is the positions of injected electron–hole pair and the output data are the signals obtained at the electrodes along with the electrons and holes (free and trapped) in each of the voxels over time. The weighting potential as defined by the electrode and detector configuration is non-uniform over the sub-pixels. During training the model, the loss function is computed as the sum of the squared errors between the signals at the electrodes and charges in the voxels compared to the ground truth signals along with the \(error^{2}_{voltage}\). The overall loss function for training this PBML model is shown in Eq. (7). The loss function is shown for Z trapping centers for electrons and R trapping centers for holes for a general model with several trapping centers for electrons and holes. However, we perform simulation experiments considering CZT detector with 2 trapping centers for holes and 1 trapping center for electrons20,46. In the loss function, the errors due to the signals and voltage are grouped together, free and trapped electron charges are grouped together, and, free and trapped charges due to holes are grouped together with weighting terms k, l and n respectively. Clearly, as k, l and/or n are varied, the errors due to those terms vary. The higher the value of these parameters, the lower the errors associated with those terms. In these error terms, the subscript gt for a particular parameter X (for instance X is signal or \(q_e\)) refers to the ground truth data for that parameter X generated in MATLAB using the classical equations and the subscript L for the same parameter X refers to the data generated by the PBML model.

$$\begin{aligned} LF{} & {} = k[(signal_{gt}-signal_{L})^2 + error^2_{voltage}] + l[(q_{e,gt}-q_{e,L})^2 + \Sigma _{z=1}^{Z}(q_{et,gt}-q_{et,L})^2] + n[(q_{h,gt}-q_{h,L})^2 \nonumber \\{} & {} \quad + \Sigma _{r=1}^{R}(q_{ht,gt}-q_{ht,L})^2]. \end{aligned}$$
(7)

The trained weights in the PBML model is compared to that of the ground truth weights, which are the weights used in generating the ground truth data using classical method. We define an error metric as shown in Ref.8 which defines how well the trained model weights matches to that of the ground truth weights,

$$\begin{aligned} Err(w_{eT}) = \sqrt{{\frac{1}{N_{fin}-N_{inj} + 1}} \sum _{i=N_{inj}}^{N_{fin}}\Big \{\frac{w_{eT,lr,i} - w_{eT,gt,i}}{w_{eT,gt,i}} \Big \}^2}. \end{aligned}$$
(8)

Results

The experimental results has been shown in 3D for certain group of sub-pixels and for all sub-pixels within a pixel. The following subsections describe in details these results.

Experimental studies for certain 3D sub-pixels

Voxels corresponding to rows and columns 4, 5 in OX–OY plane has been used in this simulation experiment. Thus the voxels in 3D volume (xyz) corresponding to the subpixels of \(2 \times 2\) region in the OX–OY plane are only considered and used in our simulation. Here we consider a virtual boundary outside these voxels and assume that no electrons or holes are injected from outside this virtual boundary at any time t. However, it is considered that electrons or holes from these sub-pixels can drift outside this virtual boundary due to the effect of electric field at any time t. The electron-hole pairs are injected at position 77 and 79 in the OZ direction. Thus, the total of 8 electron–hole pairs are injected at different voxels in this 3D volume.

Figure 11
figure 11

Electron and hole drift coefficients for e–h injection at OZ 77 and 79. 1 and 2 in legend refer to the 4th and 5th positions respectively. (a) Electron Drift Coefficients, (b) Hole Drift Coefficients.

Figure 11a,b shows the variation of electron and hole drift coefficients respectively. The electron drift coefficients are trained from the e–h injection positions all the way to the anode voxel. The hole drift coefficients are trained from the e-h injection positions until OZ positon 69 which is 9 positions towards the cathode in OZ direction of the leftmost hole injection OZ position 77. For the trained PBML model, the \(Err(w_{eDrift})\) is 0.0048 and \(Err(w_{hDrift})\) is 0.0322. For the trained electron drift coefficients, they start to deviate from the ground truth near the anode, as the gradients with respect to the weights in those voxels are low. Similar phenomena is observed at voxel position 78, as the hole drifts very slowly over time, and the gradients are strong only when it is sufficiently accumulated with multiple hole injections over the voxels. The hole drift coefficient have higher Err() than the electron drift coefficients, as it is learned for fewer voxels with a similar difference between the trained drift coefficients and the ground truth values. Fig. 12a,b shows the electron trapping and detrapping coefficients. It is observed that the model learns for all the voxel positions perfectly in this subpixels from OZ 77 to 99. For electron trapping and detrapping coefficients, \(Err(w_{eT})\) is 0.0223 and \(Err(w_{eD})\) is 0.0098. This is primarily due to the fact that although the learned electron trapping and detrapping coefficients are learned close to the ground truth, the relative error is higher for the trapping coefficients with lower ground truth than the detrapping coefficients. For holes, the trapping and detrapping coefficients as shown in Fig. 13 learns for 9 positions from OZ position of 77, the leftmost hole injection position. For the hole trapping 1 and trapping 2 coefficients for OZ positions of 69 to 79, \(Err(w_{hT1})\) is 0.0644 and \(Err(w_{hT2})\) is 0.0317 respectively. Higher \(Err(w_{hT1})\) than \(Err(w_{hT2})\) implies marginally poorer convergence which is visible in Fig. 13a. On the other hand, for the hole detrapping 1 and detrapping 2 coefficients for OZ positions of 69 to 79, \(Err(w_{hD1})\) is 0.0452 and \(Err(w_{hD2})\) is 0.0133 which is quite apparent simply by visually looking at the plots in Fig. 13b.

Figure 12
figure 12

Electron trapping and detrapping coefficients for e–h injections at OZ positions 77 and 79. 1 and 2 in legend refer to the 4th and 5th position respectively. (a) Electron Trapping Coefficients, (b) Electron Detrapping Coefficients.

Figure 13
figure 13

Hole trapping and detrapping coefficients for e-h injections at OZ 77 and 79. 1 and 2 in legend refer to the 4th and 5th position respectively. (a) Hole Trapping Coefficients, (b) Hole Detrapping Coefficients.

Figure 14a,b shows the electron and hole recombination coefficients. For the holes, in Fig. 14b, it is observed that the recombination coefficients are learned close to the ground truth values from OZ positions of 79 to 69. For hole recombination coefficients, \(Err(w_{hRec})\) is 0.1811 for OZ positions of 69 to 79. However, for the electron recombination coefficients, the coefficients are learned close to the injection positions of OZ of 77 and 79. It is observed that beyond position 83, the error between the learned electron recombination coefficients and ground truth values increases due to convergence of the learned electron recombination coefficients to a different non-optimal value. For the electron recombination coefficients, \(Err(w_{eRec})\) is 0.2119 for OZ positions 77 to 92. It is observed that the learned electron recombination coefficients eventually converge to 0 beyond OZ position of 92. This behavior of the learned electron recombination coefficients at OZ positions farther away from the e–h injection positions can be attributed to decrease in the gradients away from the e–h injection points. The \(Err(w_{eRec})\) calculation thus considers only upto OZ position 92 from the point of injection. The mean Err() value for the several learned material coefficients in this PBML model is 0.0617 for the CdZnTe detector based on the e–h injection in OZ of OZ positions 77 and 79.

Figure 14
figure 14

Electron and hole recombination coefficients for e–h injections at OZ positions 77 and 79. 1 and 2 in legend refer to the 4th and 5th position respectively. (a) Electron Recombination Coefficients, (b) Hole Recombination Coefficients.

Experimental studies for all 3D sub-pixels

The central pixel volume as shown in Fig. 6 (right) has been divided into \(4 \times 4\) sub-pixels. The simulation data has been generated with anode pixel divided into \(12 \times 12\) sub-pixels in OX and OY, as mentioned earlier in this Section. The data (signals, free and trapped charges, electrode weighting potentials) for the \(4 \times 4\) sub-pixels has been converted from \(12 \times 12\) sub-pixels by simply taking the arithmetic mean of the corresponding data (signals, free and trapped charges, electrode weighting potentials) as \(3 \times 3\) sub-pixels in OX and OY in a non-overlapping manner.

Figure 15
figure 15

Electron and hole drift coefficients in 3D Physical Model for e-h injections at OZ positions 77 and 79 for all sub-pixels. (a) Electron Drift Coefficients, (b) Hole Drift Coefficients.

Figure 15a,b shows the variation of electron and hole drift coefficients for e-h injection at OZ positions of 77 and 79 for all the sub-pixels. The electron drift coefficients are learned from OZ position 77 to 99, and the hole drift coefficients are learned from OZ position 69 to 79. For the electron drift coefficients, \(Err(w_{eDrift})\) is 0.0117, while for the hole drift coefficients, \(Err(w_{hDrift})\) is 0.0152. Similar to “Experimental studies for certain 3D sub-pixels” section, we observe mismatch in the learned electron drift coefficient near the anode compared to the ground truth, and a slight difference in the learned coefficients of voxel 78 and other voxels for the hole drift coefficient compared to the ground truth.

Figure 16
figure 16

Electron trapping and detrapping coefficients in 3D physical model for e–h injections at OZ positions 77 and 79 for all sub-pixels. (a) Electron Trapping Coefficients, (b) Electron Detrapping Coefficients.

Figure 16a,b shows the electron trapping and detrapping coefficients for e-h injection at OZ positions of 77 and 79 for all the sub-pixels. The electron coefficients are learned from the leftmost point of e–h injection upto position 99 in OZ direction. For the electron trapping and detrapping coefficients, the errors Err() are of the similar order, \(Err(w_{eT})\) is 0.0696 and \(Err(w_{eD})\) is 0.0560. Similarly, Fig. 17a,b shows the hole trapping 1 and detrapping 1 coefficients. For hole trapping 1 and detrapping 1 coefficients, the errors are of the similar order, \(Err(w_{hT1})\) is 0.0228 and \(Err(w_{hD1})\) is 0.0195 respectively. The hole coefficients are learned from OZ position 69 to position 79 for all the sub-pixels. Hole Trapping 2 and Detrapping 2 coefficients are showed in Fig. 18a,b respectively. For hole trapping 2 and detrapping 2 coefficients, \(Err(w_{hT2})\) is 0.0115 and \(Err(w_{hD2})\) is 0.0047 respectively. It is clear from Fig. 18, that \(Err(w_{hT2})\) convergence to the ground truth is inferior than \(Err(w_{hD2})\). For both the hole trapping 1 and 2 alongwith hole detrapping 1 and 2 coefficients, the trained weights converge to the ground truth values.

Figure 17
figure 17

Hole trapping 1 and detrapping 1 coefficients in 3D physical model for e–h injections at OZ positions 77 and 79 for all sub-pixels. (a) Hole Trapping 1 Coefficients, (b) Hole Detrapping 1 Coefficients.

Figure 18
figure 18

Hole trapping 2 and detrapping 2 Coefficients in 3D Physical Model for e-h injections at OZ positions 77 and 79 for all sub-pixels. (a) Hole Trapping 2 Coefficients, (b) Hole Detrapping 2 Coefficients.

Figure 19a,b shows the electron and hole recombination coefficients respectively. For the electron recombination coefficients, the learned coefficients are close to the ground truth at positions close to the injection OZ, while the errors increased as it went further away from the positions of injection towards the anode. For electron recombination coefficients, \(Err(w_{eRec})\) is 0.0347 for OZ position 77 to 92. For injection positions 77 and 79, the electron recombination coefficients does not converge beyond voxel 92 due to decrease in gradients in those voxels. For hole recombination coefficents as well, similar effect can be observed, where the learned coefficients from OZ positions of 69 to 79, deviate slightly from the ground truth values at OZ positions farther away from the OZ injection positions of 77 and 79. For the hole recombination coefficients, \(Err(w_{hRec})\) is 0.0873. It is apparent from Fig. 19, that the error \(Err(w_{hRec})\) in the hole recombination coefficient with respect to the ground truth is inferior compared to that of the electron recombination coefficients \(Err(w_{eRec})\). For all of these learned material properties using the PBML approach, the mean Err() is 0.0333.

Figure 19
figure 19

Electron and hole recombination coefficients in 3D physical model for e–h injections at OZ positions 77 and 79 for all sub-pixels. (a) Electron Recombination Coefficients, (b) Hole Recombination Coefficients.

Discussion

The PBML approach for characterization of the RTSD in 3D is novel and unique. We developed a 3D learning-based model of the RTSD considering the non-uniform electric field and motion of electrons and holes in this non-uniform electric field. CdZnTe has parallel electrode configuration with a single cathode on one end and pixelated anodes on the opposite end. The RTSD volume with a single anode pixel out of \(11 \times 11\) pixels and a single cathode on the opposite end of the anodes has been considered in this simulation study. The single pixel has been sub-pixelized in 2D, OX and OY directions. Further subdivision has been done in OZ direction. The resulting sub-divided volumes of the crystal are termed as voxels. In each voxel, the non-uniform motion of charge particles, alongwith trapping, detrapping and recombination of charges are modeled as learnable parameters. The model has been trained in a supervised manner using the input-output ground truth data generated using classical equations. The physics based learning model gets trained by using a back-propagation algorithm which updates the trainable model weights in each epochs.

Experimental simulations has been done considering a subset of sub-pixels in the 3D model and also considering all the sub-pixels in the 3D model. For electron–hole pair injections at different OZ positions, the charge transport, trapping and detrapping coefficients converge to the ground truth values with minimum error. The hole recombination coefficients also converge to the ground truth values for the positions where the holes drift. However, from our experimental studies we observe that the electron recombination coefficients gets trained for only 14 positions from the left-most electron–hole injection position. Moreover, for the experiments with a set of sub-pixels, the convergence of the electron recombination coefficients are poorer than that for the experiments considering all the sub-pixels. The Err() value for the experiment done with a subset of sub-pixels is higher than that of the case with all sub-pixels, which is attributed primarily due to non-convergence of the electron recombination coefficients to the ground truth parameters for the former experiment. The lack of convergence of the electron recombination coefficients for positions far away from the position of injection will be investigated in the future work.

The robustness of the 3D learning-based model has been tested by using 3D uniform electric field and electron/hole charge motion in that field. Despite the fact that the model has incorporated non-uniform charge motion, the model correctly learns the uniformity of the charge motion and identifies that there is no second order drift of charges. The physics based learning model also identifies the correct material properties—transport, trapping, detrapping and recombination at a finer scale. Experiments with charge motion in 3D non-uniform electric field will be performed as a future work as well.