Power Quality energy meter