An integrated low cost sensor for the direct torque control of brushless DC motors