Voltage sag is the most common power quality issue and often brings huge economic losses. To achieve voltage sag prevention and compensation, it is necessary to effectively detect voltage sag characteristics. An IEEE-39 node system model is built using Simulink, combined with common aer transformation methods and αβ. The transformation method accurately detects voltage sag accidents and incorporates a derivative algorithm, greatly reducing the detection delay and meeting the real-time and accuracy requirements of actual systems.