Tuning of a railway power quality conditioner