Measurement of non-linear distortion