Partial discharge measurements using tailored excitation waveforms