Preventive maintenance optimization to improve quality in electrical power systems