Voltage flicker measurement method recommended by IEC for the square of the demodulated signal can produce a series of problems, such as: generating signals and demodulation frequency interference, voltage flicker signal with the peak pulse, white noise, high frequency noise and so on. This paper describes the voltage fluctuation and flicker detection methods, brings forward an improved coherent detection method with a mathematical morphology (MM) filter algorithm involved. Simulation results show that the MM-coherent detection algorithm can eliminate the harmonic, inter-modulation interference and the noise more effectively, achieves better accuracy, and exhibits wide application prospects.