align RMS to sine-wave (rather than square wave) & align UI line upper boundary
prevent NaN for small phase-diff values