In view of the poor self-adaptability of the S-transform window function for different frequency bands, a new modified S-transform (MST) is proposed. This method optimizes Gaussian window function"s scale factor by introducing four auxiliary parameters. The adaptability makes it possible to maximize the energy concentration of the improved S-transform and obtain better time-frequency resolution. An eigenvalue evaluation system based on amplitude and phase of disturbance signals is established. Random Forest (RF) algorithm is used to include 11 kinds of disturbances including standard signal, voltage dips, voltage transients, high-order harmonics, and transient oscillations. Signals were classified and identified. Compared with the existing decision tree, support vector machine and neural network classification results, the simulation results show that this method has high classification accuracy, strong anti-interference ability, and fewer training samples and low signal-to-noise ratio ( Signal-to-noise Radio (SNR) conditions have obvious advantages. The training sample accounts for 10% of the total number of samples.