A perovskite thin film morphology classification and photoelectric conversion efficiency prediction model and method based on FPGA
By constructing a multi-task lightweight neural network model based on FPGA, the computational redundancy problem of perovskite thin film morphology evaluation and photoelectric conversion efficiency prediction is solved. This achieves efficient, low-power real-time prediction of perovskite thin film morphology classification and photoelectric conversion efficiency, which is suitable for deployment on FPGA platform.
Patent Information
- Application Number
- CN202611166998.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the evaluation of perovskite thin film morphology relies on human experience, and there is a lack of synergistic use of image information and process parameters. The separate modeling of morphology classification and photoelectric conversion efficiency prediction leads to computational redundancy, and the neural network model has poor adaptability to FPGA localization and pipeline implementation.
A multi-task lightweight neural network model based on FPGA is constructed, including image branch and process parameter branch. The computational complexity is reduced by depthwise separable convolution, global average pooling and Hardsigmoid function. Fixed-point quantization is adopted to realize the shared fusion feature extraction and prediction of perovskite thin film morphology classification and photoelectric conversion efficiency.
On the FPGA platform, efficient and low-power real-time prediction of perovskite thin film morphology classification and photoelectric conversion efficiency was achieved, reducing computing resource consumption and improving the real-time performance and accuracy of the analysis.
Smart Images

Figure CN123115889A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent detection technology for perovskite solar cells, and more specifically, to an FPGA-based model and method for perovskite thin film morphology classification and photoelectric conversion efficiency prediction. Background Technology
[0002] Perovskite solar cells have become an important research direction for next-generation photovoltaic devices due to their advantages such as high photoelectric conversion efficiency, low fabrication cost, solution-processability, and tunable bandgap. As a key functional layer in solar cells, the surface morphology, crystallinity, void distribution, and grain uniformity of perovskite thin films directly affect carrier transport, interfacial recombination, and device stability. Therefore, rapid and accurate evaluation of perovskite film morphology and further establishing the relationship between film morphology, fabrication process, and device performance are of great significance for optimizing the fabrication process and improving the performance of perovskite solar cells.
[0003] Currently, perovskite thin film morphology analysis typically relies on scanning electron microscope (SEM) images combined with human experience. This method suffers from low efficiency, high subjectivity, and difficulty in large-scale rapid evaluation. With the development of deep learning methods, convolutional neural networks can automatically extract thin film morphology features from SEM images, enabling morphology recognition and performance prediction. Furthermore, conventional deep learning models, when running on computers or GPUs, still face challenges such as high power consumption, difficulty in edge integration, and limited real-time processing capabilities, making it difficult to meet the demands for rapid feedback and online detection during perovskite thin film fabrication.
[0004] The steps disclosed in CN116342949B, a method for classifying coal gangue images based on a lightweight convolutional neural network, include: Step (1): collecting visible light image datasets of coal and gangue, preprocessing the datasets, and dividing the data; Step (2): considering the small number of training datasets, performing data augmentation on the divided datasets; Step (3): proposing a more efficient lightweight convolutional module based on the original Ghost module, and building a lightweight convolutional neural network for coal gangue image classification; Step (4): inputting the augmented training dataset into the designed lightweight convolutional neural network model for training, obtaining the trained lightweight convolutional neural network model, and saving the model weight file; Step (5): loading the saved model parameter file, inputting the augmented test dataset into the model for prediction and classification, and outputting the category and accuracy corresponding to each coal gangue image. This patent utilizes a neural network model to quickly classify images, effectively improving the classification accuracy of convolutional neural network models for coal and gangue. Furthermore, it significantly reduces the complexity of the convolutional neural network model while maintaining relatively stable classification accuracy, making it suitable for deployment in embedded devices with limited memory and computing resources, thus enhancing convenience. However, this patent primarily targets a single image classification task, relying mainly on images for input information. It does not consider the correlation between material surface morphology information and fabrication process parameters, nor does it utilize the same network to simultaneously perform material morphology classification and device performance regression prediction. Moreover, while existing lightweight neural networks can reduce the number of model parameters and computational load to some extent, they still suffer from problems during FPGA deployment, such as complex hardware implementation of nonlinear functions, high overhead for intermediate feature storage and data transmission, and redundant computation caused by separate modeling for classification and regression tasks. Summary of the Invention
[0005] The main technical problem to be solved by this invention is to address the shortcomings of existing technologies, such as reliance on human experience for perovskite thin film morphology evaluation, lack of synergistic utilization of image information and process parameters, computational redundancy caused by separate modeling of morphology classification and photoelectric conversion efficiency prediction, and poor adaptability of neural network models to FPGA fixed-pointing and pipeline implementation. This invention provides an FPGA-based model for perovskite thin film morphology classification and photoelectric conversion efficiency prediction.
[0006] Another technical problem solved by this invention is to provide an FPGA-based method for classifying the morphology of perovskite thin films and predicting their photoelectric conversion efficiency.
[0007] The objective of this invention is achieved through the following technical solution: A perovskite thin film morphology classification and photoelectric conversion efficiency prediction model based on FPGA includes a preprocessing module and a multi-task lightweight neural network structure, wherein the multi-task lightweight neural network structure includes: The image branch, including the initial convolutional layer and multiple depthwise separable convolutional modules, extracts features from the image to obtain the image feature vector; The process parameter branch, including at least two fully connected layers and an activation function layer, maps the process parameters into process feature vectors. The feature fusion module includes a feature stitching unit, a fusion fully connected layer, and a fusion activation function layer. It stitches together image feature vectors and process feature vectors, and performs feature mapping through the fusion fully connected layer and the fusion activation function layer to obtain shared fused features. The morphology classification output module includes a first classification fully connected layer, a classification activation function layer, a second classification fully connected layer, and a category determination unit, which outputs the morphology category of the perovskite thin film. The photoelectric conversion efficiency regression prediction module includes a first regression fully connected layer, a regression activation function layer, and a second regression fully connected layer, which outputs the predicted value of the photoelectric conversion efficiency of perovskite solar cells.
[0008] Furthermore, the preprocessing module includes an image processing module and a parameter processing module.
[0009] Furthermore, the depthwise separable convolution module sequentially includes a depthwise convolutional layer, a first activation function layer, a pointwise convolutional layer, a second activation function layer, and a pooling layer. The depthwise convolutional layer is used to extract local morphological features from image features of different channels, and the pointwise convolutional layer is used to perform channel fusion on image features of different channels to reduce the number of model parameters and computational cost.
[0010] Furthermore, the image branch also includes a global average pooling module and a channel attention module to weight the image features.
[0011] Furthermore, the channel attention module uses the Hardsigmoid function as the gating function to reduce the computational complexity of the nonlinear activation function in the FPGA hardware implementation.
[0012] A method for morphology classification and photoelectric conversion efficiency prediction of perovskite thin films based on FPGA, comprising the following steps: S1. Create a dataset; An initial dataset was established, including images of perovskite solar cell thin films, process parameters, and photoelectric conversion efficiency. S2. Data preprocessing; The initial dataset is preprocessed to obtain a standardized dataset; S3. Perform feature extraction and fusion on the image and process parameters respectively; S31. Initial feature extraction is performed on the images in the dataset through initial convolution, then multi-scale morphological features are extracted through multiple depthwise separable convolutional modules, and finally the image feature vector is obtained after global average pooling and channel attention weighting. S32. Map the process parameters in the dataset to process feature vectors; S33. Concatenate the image feature vector and the process feature vector to obtain the shared fused features; S4. Perform morphological classification and photoelectric conversion efficiency regression prediction; The shared fusion features are linearly mapped and nonlinearly processed to obtain classification intermediate features and regression intermediate features, respectively. The classification score corresponding to each perovskite film morphology category is calculated through the classification intermediate features. The perovskite film category is determined based on the classification score. The predicted value of the photoelectric conversion efficiency of the perovskite solar cell is obtained through the regression intermediate features. S5. Perform parameter quantization; S51. Calculate the joint loss based on the classification loss and regression loss from the morphology classification results and photoelectric conversion efficiency prediction results, expressed as:
[0013] In the formula, L joint Indicating joint loss, L cls L represents the morphology classification loss of perovskite thin films. reg λ represents the regression loss of photoelectric conversion efficiency. cls and λ reg These represent the weight coefficients for classification loss and regression loss, respectively; The model corresponding to the training epoch with the minimum joint loss is the optimal model, expressed as:
[0014] In the formula, t represents the number of training rounds, and T represents the total number of training rounds. This represents the model parameters corresponding to the t-th training epoch. Let t represent the joint loss of the validation set corresponding to the t-th training round. * This represents the training epoch corresponding to the minimum joint loss on the validation set. This indicates the optimal model parameters selected; S52. Select representative samples as calibration samples, input the calibration samples into the optimal model for forward propagation, statistically analyze the numerical ranges of input data, weight data, and activation data at each layer of the model, and determine the corresponding quantization scale and quantization zero point based on the statistical results. The quantization process for floating-point data is expressed as follows:
[0015] In the formula, x represents the floating-point data before quantization, and qx s represents the quantized fixed-point data. x Z represents the quantization scale. x q represents the quantization zero point. min and q max These represent the minimum and maximum values allowed by the target fixed-point data type, respectively. clip(·) indicates clipping, and round(·) indicates rounding. The approximate floating-point value corresponding to the quantized data is represented as follows:
[0016] In the formula, This represents the approximate floating-point value corresponding to the quantized data; S53. Based on the determined quantization parameters, perform fixed-point quantization on the weights, biases, and intermediate activation data in the optimal model, and save the quantized weight parameters, bias parameters, process parameter standardization parameters, and quantization parameters corresponding to the activation data of each layer. S6. Make predictions; Input the image of the perovskite thin film to be tested and the corresponding process parameters, and output the morphology category of the perovskite thin film and the predicted value of the photoelectric conversion efficiency of the perovskite solar cell.
[0017] Furthermore, the perovskite solar cell thin film image is a perovskite thin film surface morphology image, and the process parameters include the precursor component ratio, solvent ratio, and control device performance.
[0018] Furthermore, image data preprocessing includes grayscale processing, which uniformly adjusts the image to a preset size and normalizes the pixel values to a preset range; process parameter preprocessing includes normalization processing.
[0019] Furthermore, the specific steps for morphology classification and photoelectric conversion efficiency regression prediction in S4 include: S41. Morphological classification; First, the shared fusion features are linearly mapped, and then nonlinearly processed to obtain intermediate classification features, represented as:
[0020] In the formula, f represents the shared fusion feature, and W c1 and b c1 Let h represent the weight matrix and bias vector of the first classification fully connected layer, respectively. c ReLU represents the intermediate classification feature obtained after processing by the classification activation function, and ReLU(·) represents the ReLU activation function. Then, the classification score corresponding to each perovskite film morphology category is calculated using intermediate classification features, and is expressed as follows:
[0021] In the formula, W c2 and b c2 Let represent the weight matrix and bias vector of the second classification fully connected layer, respectively, and s represent the classification score vector, where each element of the classification score vector corresponds to a perovskite thin film morphology category. Finally, the perovskite thin film category is determined based on the classification score vector, as follows:
[0022] In the formula, s k This represents the classification score corresponding to the k-th perovskite film morphology category. This indicates the final determined morphology category of the perovskite film; S42. Regression prediction of photoelectric conversion efficiency; The shared fusion features are linearly mapped and then nonlinearly processed to obtain intermediate regression features, which are represented as follows:
[0023] In the formula, W r1 and b r1 Let h represent the weight matrix and bias vector of the first fully connected regression layer, respectively. r This represents the intermediate regression feature obtained after processing by the regression activation function; Then, by regressing intermediate features, the predicted photoelectric conversion efficiency of the perovskite solar cell is obtained, expressed as:
[0024] In the formula, W r2 and b r2 These represent the weights and biases of the second fully connected regression layer, respectively. This represents the predicted photoelectric conversion efficiency of a perovskite solar cell.
[0025] Furthermore, in S5, for data using symmetric quantization, the quantization zero point z x Set to 0.
[0026] Compared with existing technologies, the beneficial effects are: This invention constructs a multi-task lightweight neural network that includes image branches and process parameter branches, and fuses the perovskite thin film morphology image features with the fabrication process features to form a shared fusion feature that can be used for both morphology classification and photoelectric conversion efficiency regression prediction. Through the shared feature extraction and feature fusion structure, perovskite thin film morphology classification and photoelectric conversion efficiency prediction can be achieved simultaneously, avoiding the computational redundancy caused by building separate classification and regression models.
[0027] This invention implements convolution, activation, pooling, fully connected layers, and feature fusion modules in hardware using Verilog. It employs depthwise separable convolution, global average pooling, a Hardsigmoid gating function, and fixed-point quantization to reduce the number of model parameters and computational complexity, making the model more suitable for deployment on FPGA platforms. Fixed-point quantization reduces computational resource consumption, maintaining high classification accuracy and regression prediction performance while reducing inference latency and improving the real-time performance of perovskite thin film morphology analysis and PCE prediction.
[0028] This invention can simultaneously output the morphology category and photoelectric conversion efficiency prediction of perovskite thin films at the edge, providing an efficient and low-power hardware acceleration solution for quality evaluation, fabrication process optimization, and rapid prediction of device performance of perovskite solar cell thin films. Attached Figure Description
[0029] Figure 1 This is a diagram of a multi-task lightweight neural network structure provided in an embodiment of the present invention.
[0030] Figure 2 The flowchart illustrates a method for classifying the morphology of perovskite thin films and predicting photoelectric conversion efficiency based on FPGA, as provided in this embodiment of the invention. Detailed Implementation
[0031] The following examples further explain and clarify the invention, but the specific examples do not limit the invention in any way.
[0032] Example 1 This embodiment provides an FPGA-based model for perovskite thin film morphology classification and photoelectric conversion efficiency prediction. It includes a preprocessing module and a multi-task lightweight neural network structure. The multi-task lightweight neural network is implemented in hardware on the FPGA platform using Verilog. During hardware deployment, fixed-point computation is employed, and module reuse, pipelined processing, and parallel computing are used to improve model inference speed. Model weights, biases, and quantization parameters are stored in on-chip storage resources on the FPGA. The computation control process is scheduled by a state machine or control module. Wherein: The preprocessing module includes: The image processing module includes a grayscale conversion unit, a size adjustment unit, and a pixel normalization unit connected in sequence, which perform grayscale conversion, size unification, and normalization processing on the image; The parameter processing module includes a process parameter input unit and a parameter standardization unit, which standardizes the process parameters. The multi-task lightweight neural network structure includes: The image branch, comprising an initial convolutional layer, multiple depthwise separable convolutional modules, a global average pooling module, and a channel attention module, performs feature extraction and weighted enhancement on the image to obtain an image feature vector. The depthwise separable convolutional modules sequentially include a depthwise convolutional layer, a first activation function layer, a pointwise convolutional layer, a second activation function layer, and a pooling layer. The depthwise convolutional layer performs independent convolution calculations for each input channel, extracting local shape features from image features of different channels separately. The pointwise convolutional layer performs 1×1 convolutions to fuse image features from different channels, reducing the number of model parameters and computational cost. The first and second activation function layers use the ReLU activation function, and the pooling layer performs max pooling. The global average pooling module compresses the two-dimensional feature map into a feature vector. The channel attention module performs weighted enhancement on image features and uses the Hardsigmoid function as a gating function to reduce the computational complexity of nonlinear activation functions in FPGA hardware implementation.
[0033] The process parameter branch, including at least two fully connected layers and an activation function layer, maps the process parameters into process feature vectors. The feature fusion module includes a feature stitching unit, a fusion fully connected layer, and a fusion activation function layer. It stitches together image feature vectors and process feature vectors, and obtains shared fused features through the fully connected layer. The morphology classification output module includes a first classification fully connected layer, a classification activation function layer, a second classification fully connected layer, and a category determination unit, which outputs the morphology category of the perovskite thin film. The photoelectric conversion efficiency regression prediction module includes a first regression fully connected layer, a regression activation function layer, and a second regression fully connected layer, which outputs the predicted value of the photoelectric conversion efficiency of perovskite solar cells.
[0034] Example 2 This embodiment provides a method for classifying the morphology of perovskite thin films and predicting photoelectric conversion efficiency based on FPGA, according to the model in Embodiment 1. The steps include: S1. Create a dataset; Scanning electron microscope (SEM) images of perovskite solar cell thin films, along with corresponding process parameters and device performance parameters, are acquired to establish an initial dataset. The SEM images can be surface morphology images of the perovskite thin film, reflecting grain distribution, porosity, surface density, and morphological uniformity. The process parameters may include the precursor composition ratio, solvent ratio, and control over device performance. The device performance parameters include photoelectric conversion efficiency.
[0035] S2. Data preprocessing; The scanning electron microscope images in the initial dataset are converted to grayscale, and the images are uniformly adjusted to a preset size, with pixel values normalized to a preset range. The process parameters are then standardized; specifically, the mean and standard deviation of the process parameters in the training set can be used to normalize the input process parameters, resulting in a standardized dataset.
[0036] Subsequently, the standardized dataset is divided into training, validation, and test sets for model training, model selection, and performance evaluation.
[0037] S3. Perform feature extraction and fusion on the image and process parameters respectively; S31. Initial feature extraction is performed on the images in the training set through an initial convolutional layer. Then, multi-scale morphological features are extracted through multiple depthwise separable convolutional layers. The image features are then subjected to global average pooling to obtain an image feature vector, and then enhanced image feature vectors are obtained by channel attention weighting. S32. By using a first process fully connected layer, a first process activation function layer, a second process fully connected layer, and a second process activation function layer connected in sequence, the process parameters in the training set are mapped into process feature vectors; S33. Concatenate the image feature vector and the process feature vector, input them into the feature fusion module, and obtain the shared fused features; S4. Perform morphological classification and photoelectric conversion efficiency regression prediction; S41. Input the shared fusion features into the morphology classification output module. First, the shared fusion features are linearly mapped through the first classification fully connected layer, and then nonlinearly processed through the classification activation function layer to obtain the intermediate classification features. The calculation process is shown in formula (1): (1) In the formula, f represents the shared fusion feature, and W c1 and b c1 Let h represent the weight matrix and bias vector of the first classification fully connected layer, respectively. c Represents the intermediate features obtained after processing by the classification activation function, and ReLU(·) represents the ReLU activation function.
[0038] Then, the intermediate classification features are input into the second classification fully connected layer to obtain the classification score corresponding to each perovskite film morphology category. The calculation process of the classification score is shown in formula (2): (2) In the formula, W c2 and b c2 Let represent the weight matrix and bias vector of the second classification fully connected layer, respectively, and s represent the classification score vector, where each element in the classification score vector corresponds to a perovskite thin film morphology category.
[0039] Finally, the perovskite film category is determined based on the classification score vector, and the category corresponding to the maximum classification score is taken as the morphology classification result, as shown in formula (3): (3) In the formula, s k This represents the classification score corresponding to the k-th perovskite film morphology category. This indicates the final determined morphology category of the perovskite film.
[0040] S42. Input the shared fusion features into the photoelectric conversion efficiency regression prediction module. First, the shared fusion features are linearly mapped through the first regression fully connected layer, and then nonlinearly processed through the regression activation function layer to obtain the intermediate regression features. The calculation process is shown in formula (4): (4) In the formula, W r1 and b r1 Let h represent the weight matrix and bias vector of the first fully connected regression layer, respectively. r This represents the intermediate regression feature obtained after processing by the regression activation function.
[0041] Then, the intermediate regression features are input into the second fully connected regression layer to obtain the predicted photoelectric conversion efficiency of the perovskite solar cell. The calculation process is shown in formula (5): (5) In the formula, W r2 and b r2 These represent the weights and biases of the second fully connected regression layer, respectively. This represents the predicted photoelectric conversion efficiency of a perovskite solar cell.
[0042] S5. Perform parameter quantization; S51. Input the perovskite thin film images and corresponding process parameters in the training set into the multi-task lightweight neural network, obtain the morphology classification result and the photoelectric conversion efficiency prediction result through the morphology classification output module and the photoelectric conversion efficiency regression prediction module respectively, and calculate the joint loss based on the classification loss and the regression loss, as shown in formula (6); (6) In the formula, L joint Indicating joint loss, L cls L represents the morphology classification loss of perovskite thin films. reg λ represents the regression loss of photoelectric conversion efficiency. cls and λ reg These represent the weight coefficients of the classification loss and regression loss, respectively. Backpropagation is performed based on the joint loss to update the weights and bias parameters in the model.
[0043] S52. Input the validation set into the model according to the same image preprocessing, process parameter standardization and network forward propagation process as the training set, calculate the joint loss of the validation set corresponding to each training round, and do not perform backpropagation or update the weights and bias parameters of the model during the validation process; determine the model corresponding to the training round with the smallest joint loss of the validation set as the optimal model, and the selection process of the optimal model is shown in formula (7).
[0044] (7) In the formula, t represents the number of training rounds, and T represents the total number of training rounds. This represents the model parameters corresponding to the t-th training epoch. Let t represent the joint loss of the validation set corresponding to the t-th training round. * This represents the training epoch corresponding to the minimum joint loss on the validation set. This indicates the optimal model parameters selected.
[0045] S53. Save the weights, biases, and standardized parameters of the process parameters determined by the training set of the optimal model; select representative samples from the training set as calibration samples, input the calibration samples into the optimal model for forward propagation, statistically analyze the numerical range of the input data, weight data, and activation data of each layer of the model, and determine the corresponding quantization scale and quantization zero point based on the statistical results. The quantization process of floating-point data is shown in formula (8): (8) In the formula, x represents the floating-point data before quantization, and q x s represents the quantized fixed-point data. x Z represents the quantization scale. x q represents the quantization zero point. min and q max These represent the minimum and maximum values allowed by the target fixed-point data type, respectively. clip(·) indicates clipping, and round(·) indicates rounding.
[0046] The approximate floating-point value corresponding to the quantized data is shown in formula (9): (9) In the formula, This represents the approximate floating-point value corresponding to the quantized data. For data using symmetric quantization, the quantization zero point z... x Set to 0.
[0047] S54. Based on the determined quantization parameters, perform fixed-point quantization on the weights, biases, and intermediate activation data in the optimal model, and save the quantized weight parameters, bias parameters, process parameter normalization parameters, and quantization parameters corresponding to each layer of activation data to obtain a fixed-point quantization model for FPGA deployment.
[0048] The multi-task lightweight neural network is implemented in hardware on an FPGA platform using the Verilog language. The computation modules implemented on the FPGA include a convolution computation module, an activation function module, a pooling module, a global average pooling module, a fully connected computation module, a feature fusion module, a shape classification output module, and a photoelectric conversion efficiency regression output module. During hardware deployment, fixed-point number computation is used, and module reuse, pipelined processing, and parallel computing are employed to improve model inference speed. Model weights, biases, and quantization parameters are stored in on-chip memory resources on the FPGA, and the computation control process is scheduled by a state machine or control module.
[0049] S6. Make predictions; The scanning electron microscope image of the perovskite thin film to be tested and the corresponding process parameters are input into the FPGA. After preprocessing and hardware-based multi-task lightweight neural network inference, the perovskite thin film morphology category and the predicted value of the photoelectric conversion efficiency of the perovskite solar cell are output.
[0050] Example 3 To further illustrate the inference performance of the method of the present invention on different computing platforms, the model inference performance on CPU, GPU and FPGA platforms was compared, and the results are shown in Table 1: Table 1
[0051] As shown in Table 1, the FPGA platform effectively reduces model inference time while maintaining high morphology classification accuracy and PCE regression prediction performance. This invention constructs a multi-task lightweight neural network that fuses scanning electron microscope image features and process parameter features of perovskite thin films, and implements hardware deployment on the FPGA, enabling simultaneous perovskite thin film morphology classification and PCE prediction. The method of this invention improves the efficiency of perovskite thin film quality evaluation and device performance prediction.
[0052] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A perovskite thin film morphology classification and photoelectric conversion efficiency prediction model based on FPGA, characterized in that, It includes a preprocessing module and a multi-task lightweight neural network structure, wherein the multi-task lightweight neural network structure includes: The image branch, including the initial convolutional layer and multiple depthwise separable convolutional modules, extracts features from the image to obtain the image feature vector; The process parameter branch, including at least two fully connected layers and an activation function layer, maps the process parameters into process feature vectors. The feature fusion module includes a feature stitching unit, a fusion fully connected layer, and a fusion activation function layer, which stitches together the image feature vector and the process feature vector to obtain shared fused features; The morphology classification output module includes a first classification fully connected layer, a classification activation function layer, a second classification fully connected layer, and a category determination unit, which outputs the morphology category of the perovskite thin film. The photoelectric conversion efficiency regression prediction module includes a first regression fully connected layer, a regression activation function layer, and a second regression fully connected layer, which outputs the predicted value of the photoelectric conversion efficiency of perovskite solar cells.
2. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction model according to claim 1, characterized in that, The preprocessing module includes an image processing module and a parameter processing module.
3. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction model according to claim 1, characterized in that, The depthwise separable convolutional module sequentially includes a depthwise convolutional layer, a first activation function layer, a pointwise convolutional layer, a second activation function layer, and a pooling layer.
4. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction model according to claim 1, characterized in that, The image branch also includes a global average pooling module and a channel attention module.
5. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction model according to claim 4, characterized in that, The channel attention module uses the Hardsigmoid function as the gating function.
6. A method for classifying the morphology of perovskite thin films and predicting their photoelectric conversion efficiency based on FPGA, characterized in that the steps are as follows: include: S1. Create a dataset; An initial dataset was established, including images of perovskite solar cell thin films, process parameters, and photoelectric conversion efficiency. S2. Data preprocessing; The initial dataset is preprocessed to obtain a standardized dataset; S3. Perform feature extraction and fusion on the image and process parameters respectively; S31. Initial feature extraction is performed on the images in the dataset through initial convolution, then multi-scale morphological features are extracted through multiple depthwise separable convolutional modules, and finally the image feature vector is obtained after global average pooling and channel attention weighting. S32. Map the process parameters in the dataset to process feature vectors; S33. Concatenate the image feature vector and the process feature vector to obtain the shared fused features; S4. Perform morphological classification and photoelectric conversion efficiency regression prediction; The shared fusion features are linearly mapped and nonlinearly processed to obtain classification intermediate features and regression intermediate features, respectively. The classification score corresponding to each perovskite film morphology category is calculated through the classification intermediate features. The perovskite film category is determined based on the classification score. The predicted value of the photoelectric conversion efficiency of the perovskite solar cell is obtained through the regression intermediate features. S5. Perform parameter quantization; S51. Calculate the joint loss based on the classification loss and regression loss from the morphology classification results and photoelectric conversion efficiency prediction results, expressed as: In the formula, L joint Indicating joint loss, L cls L represents the morphology classification loss of perovskite thin films. reg λ represents the regression loss of photoelectric conversion efficiency. cls and λ reg These represent the weight coefficients for classification loss and regression loss, respectively; The model corresponding to the training epoch with the minimum joint loss is the optimal model, expressed as: In the formula, t represents the number of training rounds, and T represents the total number of training rounds. This represents the model parameters corresponding to the t-th training epoch. Let t represent the joint loss of the validation set corresponding to the t-th training round. * This represents the training epoch corresponding to the minimum joint loss on the validation set. This indicates the optimal model parameters selected; S52. Select representative samples as calibration samples, input the calibration samples into the optimal model for forward propagation, statistically analyze the numerical ranges of input data, weight data, and activation data at each layer of the model, and determine the corresponding quantization scale and quantization zero point based on the statistical results. The quantization process for floating-point data is expressed as follows: In the formula, x represents the floating-point data before quantization, and q x s represents the quantized fixed-point data. x Z represents the quantization scale. x q represents the quantization zero point. min and q max These represent the minimum and maximum values allowed by the target fixed-point data type, respectively. clip(·) indicates clipping, and round(·) indicates rounding. The approximate floating-point value corresponding to the quantized data is represented as follows: In the formula, This represents the approximate floating-point value corresponding to the quantized data; S53. Based on the determined quantization parameters, perform fixed-point quantization on the weights, biases, and intermediate activation data in the optimal model, and save the quantized weight parameters, bias parameters, process parameter standardization parameters, and quantization parameters corresponding to the activation data of each layer. S6. Make predictions; Input the image of the perovskite thin film to be tested and the corresponding process parameters, and output the morphology category of the perovskite thin film and the predicted value of the photoelectric conversion efficiency of the perovskite solar cell.
7. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction method according to claim 6, characterized in that, The image of the perovskite solar cell thin film is an image of the surface morphology of the perovskite thin film, and the process parameters include the precursor component ratio, solvent ratio, and control device performance.
8. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction method according to claim 6, characterized in that, Image data preprocessing includes grayscale conversion, which adjusts the image to a preset size and normalizes pixel values to a preset range; process parameter preprocessing includes normalization.
9. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction method according to claim 6, characterized in that, The specific steps for morphology classification and photoelectric conversion efficiency regression prediction in S4 include: S41. Morphological classification; First, the shared fusion features are linearly mapped, and then nonlinearly processed to obtain intermediate classification features, represented as: In the formula, f represents the shared fusion feature, and W c1 and b c1 Let h represent the weight matrix and bias vector of the first classification fully connected layer, respectively. c ReLU represents the intermediate classification feature obtained after processing by the classification activation function, and ReLU(·) represents the ReLU activation function. Then, the classification score corresponding to each perovskite film morphology category is calculated using intermediate classification features, and is expressed as follows: In the formula, W c2 and b c2 Let represent the weight matrix and bias vector of the second classification fully connected layer, respectively, and s represent the classification score vector, where each element of the classification score vector corresponds to a perovskite thin film morphology category. Finally, the perovskite thin film category is determined based on the classification score vector, as follows: In the formula, s k This represents the classification score corresponding to the k-th perovskite film morphology category. This indicates the final determined morphology category of the perovskite film; S42. Regression prediction of photoelectric conversion efficiency; The shared fusion features are linearly mapped and then nonlinearly processed to obtain intermediate regression features, which are represented as follows: In the formula, W r1 and b r1 Let h represent the weight matrix and bias vector of the first fully connected regression layer, respectively. r This represents the intermediate regression feature obtained after processing by the regression activation function; Then, by regressing intermediate features, the predicted photoelectric conversion efficiency of the perovskite solar cell is obtained, expressed as: In the formula, W r2 and b r2 These represent the weights and biases of the second fully connected regression layer, respectively. This represents the predicted photoelectric conversion efficiency of a perovskite solar cell.
10. The FPGA-based perovskite thin film morphology classification and photoelectric conversion efficiency prediction method according to claim 6, characterized in that, In S5, for data using symmetric quantization, the quantization zero point z x Set to 0.
Citation Information
Patent Citations
A coal gangue image classification method based on a lightweight convolutional neural network
CN116342949B
