A measurement method based on the wavelet transform for power quality analysis