An automatic calibrator for wattmeters with harmonic analysis capability