Photoluminescence Imaging for the In-Line Quality Control of Thin-Film Solar Cells

: Renewable energy sources such as photovoltaic (PV) technologies are considered to be key drivers towards climate neutrality. Thin-ﬁlm PVs, and particularly copper indium gallium selenide (CIGS) technologies, will play a crucial role in the turnaround in energy policy due to their high efﬁciencies, high product ﬂexibility, light weight, easy installation, lower labour-intensiveness, and lower carbon footprint when compared to silicon solar cells. Nonetheless, challenges regarding the CIGS fabrication process such as moderate reproducibility and process tolerance are still hindering a broad market penetration. Therefore, cost-efﬁcient and easily implementable in-line process control methods are demanded that allow for identiﬁcation and elimination of non-conformal cells at an early production step. As part of this work, a practical approach towards industrial in-line photoluminescence (PL) imaging as a contact-free quality inspection tool is presented. Performance parameters of 10 CIGS samples with 32 individually contacted cells each were correlated with results from PL imaging using green and red excitation light sources. The data analysis was fully automated using Python-based image processing, object detection, and non-linear regression modelling. Using the red excitation light source, the presented PL imaging and data processing approach allows for a quantitative assessment of the cell performance.


Introduction
In the European Union, more than 75% of greenhouse gas emissions are caused by the generation and consumption of energy [1]. Therefore, the European green deal was established with the pronounced goal to no longer emit any net greenhouse gases by 2050. Renewable energy sources such as photovoltaic (PV) technologies will be a main driver towards the targeted climate neutrality. While PV plants employing silicon solar cells have established themselves as an important element in the global energy mix, thin-film processed PV cells have also become progressively important for the renewable energy market, as indicated by an expected continuous annual growth rate of over 19% by 2023 [2]. Amongst others, copper indium gallium selenide (CIGS) solar cells have become an increasingly relevant technology as efficiencies of up to 23.35% were reported in the literature [3]. In general, thin-film solar cells have many advantageous attributes, such as easy installation, high product flexibility, light weight, and lower labour-intensiveness compared to silicon solar cells [4]. However, there are still challenges related to their fabrication, such as high processing costs and moderate reproducibility and throughput, which decelerate the further commercialisation and wide market penetration of CIGS technologies. The actual production process of such thin-film modules is a multistep process comprising, Solar 2022, 2 2 amongst others, co-evaporation techniques, chemical bath processing, sputtering, structuring processes, and glass-to-glass lamination [5,6]. Due to the delicate processing and the associated costs, in-line quality control is of high importance. For silicon solar cells, a broad variety of in-line and off-line inspection tools for characterisation and quality control during manufacturing are commercially available, such as electroluminescence measurements [7,8], photoluminescence (PL) imaging [9], lock-in thermography [10], and carrier density imaging [11]. In the case of thin-film solar cell technologies, their highvolume, large-scale manufacturing as well as the associated in-line inspection tools are still in their infancy. Consequently, off-line post-production performance testing on the finished product is widely employed, which dramatically increases the response time, leading to the loss of products and unnecessary costs. Other approaches, such as on-line X-ray fluorescence [12,13], do not provide the most relevant performance data-i.e., while the layer composition can be analysed directly after deposition, no information about the electro-optical quality of the absorber layer is provided. Therefore, the establishment of a reliable, non-contact, in-line quality inspection tool for the prediction of cell performance parameters, such as the open-circuit voltage (V OC ), the cell efficiency (Eff), the fill factor (FF), and the maximum power point (M PP ), is desired.
In the literature, different approaches highlight the great potential of PL imaging for the in-line characterisation of solar cells, including thin-film CIGS modules [14,15]. In PL spectroscopy, the material to be examined is electronically excited by light absorption, which means that electrons are lifted from the valence band to the conduction band of the material. The minimum energy that is required for excitation is defined by the material's band gap, which is tuneable from 1.04 to 1.68 eV in CIGS modules [16]. The optimum absorber band gap for CIGS modules is around 1.4 eV, and the CIGS cell efficiency decreases with increasing band gap [17]. The energy, E, is related to the wavelength of radiation through the following well-known Equation (1): where h is Planck's constant (h = 6.626 · 10 −34 Js), c corresponds to the speed of light (2.998 × 10 8 ms −1 ), and λ is the wavelength of the light. After excitation, the electrons at some point fall back into lower energy states by emitting light (spontaneous photon emission in the form of fluorescence or phosphorescence). The emitted light can then be detected and provides information about the electronic structure of the material. By measuring the charge carrier lifetime and defect density, spectroscopic (time-resolved) PL systems can give information about a semiconductor's recombination characteristics, which consequently enables the prediction of solar cell parameters and can hence be used as a key performance indicator for the improvement of solar cell efficiency [17]. In PL imaging, the charge carrier density is spatially resolved as it is detected by a two-dimensional image sensor, and the incident PL photons are integrated over a certain time period, which makes areas with different charge carrier densities visually observable as image areas with high and low intensities. According to [16], CIGS solar cells show a strong response in the red and near-infrared range. As part of the Horizon 2020 project OLEDSOLAR, innovative manufacturing challenges of opto-electronic devices are addressed and inspection tools for organic and thinfilm devices are developed to improve the overall product quality and reliability. Within the framework of this project, it has already been demonstrated that PL imaging holds great potential for contactless in-line performance assessment of CIGS solar cells [18,19], with its utmost benefits lying in the easy implementation, straightforward data analysis, the intuitive visual representation of the results, and, in the previously presented configurations, its cost-effectiveness. Although promising, there are still some limitations and unresolved issues that need to be addressed before a true in-line PL imaging system for CIGS solar cells can be implemented on an industrial scale. Compared to the approach presented in [18,19], as part of the present work, the PL results of a comprehensive sample set at Solar 2022, 2 3 two different excitation wavelengths using dual light source configuration were analysed. In addition, the analysis of the cells was automated by employing a Python-based image processing approach. Python is a universal, high-level programming language that offers multiple benefits, such as a legible, concise programming style. Furthermore, it has an open, community-based development model supported by the non-profit Python Software Foundation [20]. As a consequence, Python has evolved to become the third most used programming language with a share of around 48% amongst developers worldwide in 2021 [21]. In scientific research, Python is commonly employed for image processing tasks, such as hyperspectral data analysis [22], microtomography data analysis [23], and medical image processing [24] as well as photovoltaic module cell segmentation in electroluminescence images [25].
The comprehensive approach presented as part of this work paves the way towards a fully automated in-line analysis, including the prediction of cell parameters with a very short response time. Consequently, low-quality cells and batches can be identified and sorted out quickly, thus saving waste products, time, and ultimately costs.

Solar Cell Characterisation
All solar cells were characterised by illuminated J-V measurements under simulated AM1.5G conditions at 25 • C using a Newport class ABB solar simulator in combination with autoIVtracer V.3.8.0.0 software and In Sight Explorer vision software.

PL Image Data Acquisition
As schematically illustrated in Figure 1a, an in-line inspection demonstrator with dual-source excitation (green and red) was set up. The green excitation sources (Figure 1b REVIEW 3 presented in [18,19], as part of the present work, the PL results of a comprehensive sample set at two different excitation wavelengths using dual light source configuration were analysed. In addition, the analysis of the cells was automated by employing a Pythonbased image processing approach. Python is a universal, high-level programming language that offers multiple benefits, such as a legible, concise programming style. Furthermore, it has an open, community-based development model supported by the non-profit Python Software Foundation [20]. As a consequence, Python has evolved to become the third most used programming language with a share of around 48% amongst developers worldwide in 2021 [21]. In scientific research, Python is commonly employed for image processing tasks, such as hyperspectral data analysis [22], microtomography data analysis [23], and medical image processing [24] as well as photovoltaic module cell segmentation in electroluminescence images [25]. The comprehensive approach presented as part of this work paves the way towards a fully automated in-line analysis, including the prediction of cell parameters with a very short response time. Consequently, low-quality cells and batches can be identified and sorted out quickly, thus saving waste products, time, and ultimately costs.

Solar Cell Characterisation
All solar cells were characterised by illuminated J-V measurements under simulated AM1.5G conditions at 25 °C using a Newport class ABB solar simulator in combination with autoIVtracer V.3.8.0.0 software and In Sight Explorer vision software.

PL Image Data Acquisition
As schematically illustrated in Figure 1a, an in-line inspection demonstrator with dual-source excitation (green and red) was set up. The green excitation sources ( Figure  1b

Image Processing and Data Analysis
The PL images are available as 8-bit greyscale images with assigned grey values between 0 (black) and 255 (white). For automated data analysis, Python 3.8.3 including image processing libraries was used. The overall analysis process consisted of three main steps, as illustrated in Figure 2: (i) image pre-processing and alignment; (ii) cell detection and calculation of histogram; and (iii) data analysis and graphical representation of results. Compared to the results presented in [19], a homogeneous illumination setup was implemented using a dual light source configuration and optimal alignment of the beams of the two excitation light sources. Nevertheless, image pre-processing was performed following the approach that was already presented, described, and discussed in [18]. However, as part of this work, the image pre-processing was implemented using Python, eliminating the need for manual processing. In this approach, the pre-processing is performed on the two images acquired at 0° and 180° rotation. First, the images are rotated to have the same orientation; afterwards, they are cropped utilising a uint8-mask with a given threshold and the boundingRect() function from Python's cv2 package [26]. After cropping and alignment, the compensation of shadows and reflections is performed by several image subtraction steps in the spatial domain. The two images are low-pass filtered using a 2-dimensional Gaussian convolution kernel with a filter coefficient of σ = 200, removing all high-frequency information (i.e., detailed structures and edges) from the images. Then, those low-pass filtered images are subtracted from each other to gain

Image Processing and Data Analysis
The PL images are available as 8-bit greyscale images with assigned grey values between 0 (black) and 255 (white). For automated data analysis, Python 3.8.3 including image processing libraries was used. The overall analysis process consisted of three main steps, as illustrated in Figure 2: (i) image pre-processing and alignment; (ii) cell detection and calculation of histogram; and (iii) data analysis and graphical representation of results.

Image Processing and Data Analysis
The PL images are available as 8-bit greyscale images with assigned grey values between 0 (black) and 255 (white). For automated data analysis, Python 3.8.3 including image processing libraries was used. The overall analysis process consisted of three main steps, as illustrated in Figure 2: (i) image pre-processing and alignment; (ii) cell detection and calculation of histogram; and (iii) data analysis and graphical representation of results. Compared to the results presented in [19], a homogeneous illumination setup was implemented using a dual light source configuration and optimal alignment of the beams of the two excitation light sources. Nevertheless, image pre-processing was performed following the approach that was already presented, described, and discussed in [18]. However, as part of this work, the image pre-processing was implemented using Python, eliminating the need for manual processing. In this approach, the pre-processing is performed on the two images acquired at 0° and 180° rotation. First, the images are rotated to have the same orientation; afterwards, they are cropped utilising a uint8-mask with a given threshold and the boundingRect() function from Python's cv2 package [26]. After cropping and alignment, the compensation of shadows and reflections is performed by several image subtraction steps in the spatial domain. The two images are low-pass filtered using a 2-dimensional Gaussian convolution kernel with a filter coefficient of σ = 200, removing all high-frequency information (i.e., detailed structures and edges) from the images. Then, those low-pass filtered images are subtracted from each other to gain Compared to the results presented in [19], a homogeneous illumination setup was implemented using a dual light source configuration and optimal alignment of the beams of the two excitation light sources. Nevertheless, image pre-processing was performed following the approach that was already presented, described, and discussed in [18]. However, as part of this work, the image pre-processing was implemented using Python, eliminating the need for manual processing. In this approach, the pre-processing is performed on the two images acquired at 0 • and 180 • rotation. First, the images are rotated to have the same orientation; afterwards, they are cropped utilising a uint8-mask with a given threshold and the boundingRect() function from Python's cv2 package [26]. After cropping and alignment, the compensation of shadows and reflections is performed by several image subtraction steps in the spatial domain. The two images are low-pass filtered using a 2-dimensional Gaussian convolution kernel with a filter coefficient of σ = 200, removing all high-frequency information (i.e., detailed structures and edges) from the images. Then, those low-pass filtered images are subtracted from each other to gain information about shadows and reflections, which is then again subtracted from the original images for compensating the same. In a subsequent step, cell detection on the pre-processed images is performed following the process illustrated in Figure 3. Therefore, Python's cv2 matchTemplate() function is employed using pre-defined templates of the cells to be detected. In the presented approach, a small number of 7 cell templates is used, ranging from well-exposed and clearly visible cells to noisy and blurred images, as exemplarily illustrated in Figure 4. Using the matchTemplate() function, the locations of the found objects are returned. However, some of the cells are detected multiple times as they are matched to more than one template. To eliminate redundancy, a purely image-based approach is employed. The coordinates of the found rectangles are drawn to a binary image, and flood filling of the background (employing Python's cv2 floodFill() function) creates a mask that illustrates each cell as a defined white rectangle. The coordinates of those rectangles are then again determined using Python's cv2 boundingRect() function, providing an unambiguous location for each individual cell. In the subsequent step, the mean [0;255] as well as the standard deviations of the central areas of the individual cells are calculated using Python's NumPy mean() and std() functions over the specified areas [27]. The results are then directly plotted in the output images. information about shadows and reflections, which is then again subtracted from the original images for compensating the same. In a subsequent step, cell detection on the pre-processed images is performed following the process illustrated in Figure 3. Therefore, Python's cv2 matchTemplate() function is employed using pre-defined templates of the cells to be detected. In the presented approach, a small number of 7 cell templates is used, ranging from wellexposed and clearly visible cells to noisy and blurred images, as exemplarily illustrated in Figure 4. Using the matchTemplate() function, the locations of the found objects are returned. However, some of the cells are detected multiple times as they are matched to more than one template. To eliminate redundancy, a purely image-based approach is employed. The coordinates of the found rectangles are drawn to a binary image, and flood filling of the background (employing Python's cv2 floodFill() function) creates a mask that illustrates each cell as a defined white rectangle. The coordinates of those rectangles are then again determined using Python's cv2 boundingRect() function, providing an unambiguous location for each individual cell. In the subsequent step, the mean [0;255] as well as the standard deviations of the central areas of the individual cells are calculated using Python's NumPy mean() and std() functions over the specified areas [27]. The results are then directly plotted in the output images.   information about shadows and reflections, which is then again subtracted from the original images for compensating the same. In a subsequent step, cell detection on the pre-processed images is performed following the process illustrated in Figure 3. Therefore, Python's cv2 matchTemplate() function is employed using pre-defined templates of the cells to be detected. In the presented approach, a small number of 7 cell templates is used, ranging from wellexposed and clearly visible cells to noisy and blurred images, as exemplarily illustrated in Figure 4. Using the matchTemplate() function, the locations of the found objects are returned. However, some of the cells are detected multiple times as they are matched to more than one template. To eliminate redundancy, a purely image-based approach is employed. The coordinates of the found rectangles are drawn to a binary image, and flood filling of the background (employing Python's cv2 floodFill() function) creates a mask that illustrates each cell as a defined white rectangle. The coordinates of those rectangles are then again determined using Python's cv2 boundingRect() function, providing an unambiguous location for each individual cell. In the subsequent step, the mean [0;255] as well as the standard deviations of the central areas of the individual cells are calculated using Python's NumPy mean() and std() functions over the specified areas [27]. The results are then directly plotted in the output images.   Subsequently, the mean grey values of the individual cells under test are exported to a Microsoft Excel sheet for further analysis since in the given case, the performance data of the cells were provided as Excel data. Nonetheless, the graphical representation of the result is conducted using Python's matplotlib scatter() as well as plot() functions, which offer multiple ways for tailored data representation [28]. For the correlation analysis, Python's SciPy optimize package using least-squares curve fitting is employed [29].
The sensitivity or true positive rate (TPR), specificity or true negative rate (TNR), and the precision or positive predictive value (PPV) of the prediction of the cell efficiencies are then determined using the following equations: where TP stands for true positive, TN for true negative, FP for false positive, and FN for false negative. Those values are then illustrated in a confusion matrix.

Results
The sample set contained 10 CIGS samples, each consisting of 32 separate cells. The samples varied in composition (CGI and GGI ratios) as well as thickness.
For the given sample set, the cell detection functioned in a robust manner. Differences in the PL images of the cells being illuminated with green and red lights were visually observable, as exemplarily illustrated for one sample in Figure 5. It is visible to the unaided eye that the samples illuminated with green light appear to be more homogeneous than the cells illuminated with red light, which show higher-intensity variations.
Subsequently, the mean grey values of the individual cells under test are exported to a Microsoft Excel sheet for further analysis since in the given case, the performance data of the cells were provided as Excel data. Nonetheless, the graphical representation of the result is conducted using Python's matplotlib scatter() as well as plot() functions, which offer multiple ways for tailored data representation [28]. For the correlation analysis, Python's SciPy optimize package using least-squares curve fitting is employed [29].
The sensitivity or true positive rate (TPR), specificity or true negative rate (TNR), and the precision or positive predictive value (PPV) of the prediction of the cell efficiencies are then determined using the following equations: where TP stands for true positive, TN for true negative, FP for false positive, and FN for false negative. Those values are then illustrated in a confusion matrix.

Results
The sample set contained 10 CIGS samples, each consisting of 32 separate cells. The samples varied in composition (CGI and GGI ratios) as well as thickness.
For the given sample set, the cell detection functioned in a robust manner. Differences in the PL images of the cells being illuminated with green and red lights were visually observable, as exemplarily illustrated for one sample in Figure 5. It is visible to the unaided eye that the samples illuminated with green light appear to be more homogeneous than the cells illuminated with red light, which show higher-intensity variations. The relationships between the most important cell performance parameters, namely the open-circuit voltage, efficiency, fill factor, and maximum power point, and the grey The relationships between the most important cell performance parameters, namely the open-circuit voltage, efficiency, fill factor, and maximum power point, and the grey values obtained by means of PL imaging are illustrated in Figure 6a-d, respectively. The Solar 2022, 2 7 trend appears to be the same, yet it becomes obvious that illumination using the red light leads to a more defined curve progression. Solar 2022, 2, FOR PEER REVIEW 7 values obtained by means of PL imaging are illustrated in Figure 6a-d, respectively. The trend appears to be the same, yet it becomes obvious that illumination using the red light leads to a more defined curve progression. The PL data using the red excitation light were further non-linearly fitted using a sigmoid function with the following Equation (5): where f(x) corresponds to the PL grey values and the argument x to the corresponding cell performance parameters. The parameters k, c, x0, and f0 were calculated for the individual cell performance parameters by means of least-squares curve fitting. As a measure for the fit, R 2 values were calculated for each model, as illustrated in Figure 7.  The PL data using the red excitation light were further non-linearly fitted using a sigmoid function with the following Equation (5): where f(x) corresponds to the PL grey values and the argument x to the corresponding cell performance parameters. The parameters k, c, x 0 , and f 0 were calculated for the individual cell performance parameters by means of least-squares curve fitting. As a measure for the fit, R 2 values were calculated for each model, as illustrated in Figure 7.  Table 1 shows a confusion matrix for the prediction of the cell efficiency based on PL imaging using a red light source. Therefore, it was specified that cells with an efficiency of at least 12% should be accepted, while for the PL imaging, a mean cell grey value larger than the background illumination of f0 = 31 was set as the acceptance criterion. According to Equation (2) and based on the results presented in Table 1, the sensitivity of the proposed approach is TPR = 0.94. Furthermore, the specificity is equal to TNR = 0.934 (Equation (3)) at a precision of PPV = 0.959 (Equation (4)).   Table 1 shows a confusion matrix for the prediction of the cell efficiency based on PL imaging using a red light source. Therefore, it was specified that cells with an efficiency of at least 12% should be accepted, while for the PL imaging, a mean cell grey value larger than the background illumination of f 0 = 31 was set as the acceptance criterion. According to Equation (2) and based on the results presented in Table 1, the sensitivity of the proposed approach is TPR = 0.94. Furthermore, the specificity is equal to TNR = 0.934 (Equation (3)) at a precision of PPV = 0.959 (Equation (4)).

Discussion
The PL setup consists of two green and two red excitation light sources and an industrial CCD camera for the detection of the PL signal. The emitter and the detector are equipped with optical filters to extract the spectral region of interest. The green excitation light source was selected as it can be easily filtered from the PL signal using optical filters. However, the band gap of the CdS buffer layer is in the range of 2.4 eV [30], corresponding to a wavelength of 516 nm, which leads to superimposition of the PL signal originating from the CIGS layer in the case of the green excitation light. This superimposition becomes visually observable as not only the active cells but also the surrounding areas of the samples show a fluorescent background. In addition, the influence of the CdS fluorescence leads to a high deviation when correlating the performance data with the PL imaging, as illustrated in Figure 6, especially for low-quality cells. On the other hand, this artifact could be exploited to gain information about the quality, thickness, and condition of the CdS layer itself. Those relationships will be studied as part of future work.
In contrast to that, the PL images using red excitation light led to a more defined curve progression. The data were then non-linearly fitted using a sigmoid function and least-squares minimisation, which resulted in R 2 values between 0.77 and 0.79 for the experimental performance data. In contrast to previously presented results [19], this enables real quantitative assessment of the cell performance. In the given case, the samples were stored and transported between the different analysis steps (determination of performance parameters and PL imaging), which might have led to degradation of the individual cells, thus reducing the quality of the correlation. If implemented in an industrial in-line quality control system, the response time would be drastically reduced and hence the accuracy of the analysis is expected to rise further.
In general, PL imaging alone cannot give an indication of the origin of reduced PL signals, which could have material-and processing-related reasons, such as a reduced minority carrier lifetime or shunting due to laser scribing and cell contacting in later processing steps. That being said, PL imaging can be highly beneficial already at an early production step to identify and eliminate low-quality cells without the need for electrical contacts. On the other hand, cell shunting can also occur just before the modules are finalised. Consequently, implementation of PL imaging at more than one processing step as well as a combination with other in-line quality control methods, such as Raman spectroscopy, might be reasonable.
For the automated data analysis, Python was used as it is a universal, high-level programming language offering numerous advantages over other programming languages, such as a legible, concise programming style. In addition, it has an open, community-based development model supported by the non-profit Python Software Foundation [20]. The image processing approach that is presented in this work is quite straightforward, and the cell detection worked robustly even though only a small number of template images were employed. For an in-line quality control system on an industrial level, however, deep learning-based cell detection can be considered a more convenient approach. There are deep learning libraries implemented in Python such as Keras [31], which offers a uniform interface for various Python backends, such as TensorFlow, Microsoft Cognitive Toolkit (formerly CNTK), and Theano. However, due to the restricted size of the sample set, this would have gone beyond the scope of the present work.
As part of the present work, image pre-processing, cell detection, and analysis were conducted in the spatial domain, which offers easy and intuitive implementation. Some of the processing steps, such as low-pass filtering for noise reduction, could also be performed in the frequency domain; however, for most practical application tasks, Fourier-based image processing does not necessarily lead to improved results [32].
The PL images were processed in jpg data format as it is a highly versatile format that requires little memory and hence enables fast and easy processing, which is a key requirement for efficient in-line process monitoring. Speaking of processing speed, the presented PL demonstrator is comparatively slow in the given setup, as a long exposure time of 20 s is required for the acquisition of a high-quality PL image. The use of a larger number of light sources, allowing for an optimised and more homogeneous illumination, would not only result in enhancing the PL signal, and thus reducing the image acquisition time, but also in reducing the influence of shadows, reflections, and background irradiations. Furthermore, a reduced exposure time would significantly increase the compatibility of PL imaging with in-line quality control processes in the industrial mass production of CIGS solar cells.

Conclusions
Using a red excitation light source, PL imaging allows for qualitative as well as quantitative assessment of cell performance already at an early production step as no electrical contacts are required. For image processing, Python offers multiple powerful and easily implementable computing tools. Apart from automatised analysis methods, PL imaging provides intuitive results due to the visual representation. As a consequence, lowquality cells and batches can be identified at an early production step, which significantly reduces the response time during production, thus saving waste products, time, and costs.
For the implementation of PL imaging as an industrial in-line inspection tool for CIGS solar cells, the setup could be improved using a larger number of light sources, which would consequently reduce the exposure time and the noise level. As part of this work, a straightforward object matching approach for cell detection was employed as only a small number of samples was available. Although the presented approach functions in a robust manner, for future industrial application, deep learning could be a powerful tool to improve the quality of cell detection as well as creating predictive models for cell performance parameters.