Measuring the power quality of railway networks