Abstract:Using the gas (DGA) generated when a power transformer fails to diagnose the transformer fault has become an important diagnostic method at home and abroad. This paper chooses to use Convolutional Neural Network (CNN) as the transformer fault diagnosis model to diagnose the power transformer. However, the diagnostic performance of CNN largely depends on its structure, and there is a problem that it is difficult to manually select model hyperparameters. Aiming at this problem, in order to improve the diagnostic accuracy of the model, an improved particle swarm optimization algorithm (IPSO) is designed to automatically optimize the hyperparameters of CNN. By improving the inertia weight W and the learning factors C1 and C2 in the PSO algorithm, the optimization ability of the particles is improved, thereby constructing a diagnostic model with better performance and achieving the purpose of improving the accuracy of the diagnosis. The experimental results show that the IPSO algorithm has better global and local optimization capabilities than PSO, and the CNN built based on the IPSO algorithm has a higher diagnostic accuracy than the CNN built by human experience, and the accuracy rate is increased by 5.84%.