Through the analysis of the historical operation data of thermal power units,the deep forest algorithm in deep learning is used to determine the input and output parameters of the model reasonably,and the improved bat algorithm is used to optimize the super parameters to build a high-precision data-driven model.In order to realize fault detection,the output parameters of each model are selected,and the Euclidean distance between the predicted output array and the ac-tual output array is calculated by using the similarity function method to achieve accurate fault detection.Taking the heater tube leakage as an example,the results show that with the help of the digital twin model and fault detection system estab-lished in this paper,the heater pipeline leakage fault in the steam turbine system can be detected accurately,which proves the effectiveness of this method.