Electrical control of exhaust gas treating apparatus