Design of Sliding Mode Control for a Brushless DC Motor