Abstract:In photovoltaic fault diagnosis, normal samples are usually abundant, whereas fault samples are scarce, which causes class imbalance. To address this problem, a photovoltaic fault diagnosis method based on a decoupled prototype autoencoder (DPAE) was proposed. First, a weighted random sampling strategy (WRSS) was adopted to alleviate the training bias caused by class imbalance between normal and fault samples. Then, important features were enhanced by a feature attention mechanism (FAM). Subsequently, an autoencoder (AE) was used to learn latent-space representations. A norm-direction decoupling mechanism was constructed for fault detection and fault-type identification. The norm of the latent vector was used to characterize the deviation of a sample from the normal operating state and to perform normal/fault detection. Five learnable class prototypes were initialized using the mean latent vector of each class. The directional relationship between the latent vector and the class prototypes was used for fault-type identification. Supervised contrastive learning and a prototype orthogonality constraint were further introduced to enhance the directional consistency of latent vectors within the same class and the directional separability between different classes. The proposed method was evaluated using a fault dataset from a photovoltaic power plant in Brazil. Experimental results show that, with only 20 training samples for each fault class, the fault detection accuracy reaches 96.31%, and the overall five-class diagnostic accuracy reaches 95.45%. Both results are higher than those of the comparison methods. These results demonstrate that the proposed method is effective under conditions of fault-sample scarcity and class imbalance.