The quality of electric power is considered to be an important factor for operation of any electric equipment. The increasing use of power electronic devices contributes to the power quality problems and power quality measurement techniques are gaining attention in recent times. In this paper power quality disturbances have been detected and a power quality index has been developed. Both stationary and non-stationary disturbances have been considered here. Several types of signals are simulated for the measurement of power quality. Real time measurement of power quality of a signal with power quality disturbances is also presented here. © 2014 CRL Publishing Ltd.