An automatic system for testing of low-cost electric energy meters under distorted conditions