measuring power quality of a system