Reverse current protection control for a motor

A method is provided. A command to correspond to a target speed of a motor is received. A rotational speed of the motor is measured, and a brake-to-off ratio for a braking interval is calculated based at least in part on the rotation speed, the target speed, a braking parameter. An off state for an inverter that is coupled to motor is induced during an off portion of the braking interval, and a brake signal is applied to the inverter during a braking portion of the braking interval.

TECHNICAL FIELD

The invention relates generally to motor control and, more particularly, to control of a brushless direct current (DC) motor.

BACKGROUND

Brushless DC motors are employed in a wide variety of applications, and one application, for example, for brushless DC motors is as a spindle motor for a hard disk drive (HDD) or optical disk drive (i.e., digital versatile disk or DVD player). For some of these applications (like DVD players), speed control of the motor can be very important, as the motors will frequently change speed. This means that there are transient periods of braking and acceleration.

For braking, in particular, the motor should slow quickly to generally ensure that proper functionality is preserved, and, inFIG. 1, an example of a system100-1employs a braking scheme that can be seen. In this example, the motor110is a three-phase brushless DC motor, where each phase PHA to PHC is respectively coupled to transistor pairs Q1/Q2, Q3/Q4, and Q5/Q6(which as shown are NMOS transistors) of inverter106. The controller104-1applies pulse width modulation (PWM) signals PWM1to PWM6to the inverter106to control the phases PHA to PHC of the motor110(i.e., drive the motor110). During braking, though, the motor110generates a reverse current or negative current through pins U, V, and W of integrated circuit (IC) or motor driver102-1to the supply pin VDD. When this occurs, the controller104-1closes switch S of discharge circuit108so as to activate the current mirror Q7and Q8(which, as shown, are PMOS transistors) by coupling the drain of transistor Q8to the supply pin GND. This allows the reverse current or negative current to be discharged through resistor R2. One problem with this arrangement, however, is that transistors Q7and Q8can occupy a large portion of the area of IC102-1in order to be sufficiently large enough to carry the reverse current, so as an alternative (shown inFIG. 2), the discharge circuit108can be removed and several different types of braking schemes be employed (as shown inFIGS. 3 and 4).

For one scheme (which is shown inFIG. 3), controller104-2can inactivate or “turn off” transistors Q1to Q6, placing the inverter106in a high impedance or HIZ mode. Mechanical friction (i.e., from bearings) can be used to slow the rotational speed of the motor110. Usually, to allow this to occur, the speed command issued to the controller104-2changes from code L1(which corresponds to a target rotational speed ω1) to code L3(which corresponds to a target rotational speed that is not shown) at time T1so as to allow a negative or reverse current to be generated. At this point, the inverter106is placed in a HIZ (off) state or mode, but the losses due to friction are usually so low that the motor110does not reach the desired target speed ω2(which is associated with code L2) within the desired deceleration period (i.e., between times T1and T2). Instead, the motor110reaches a much higher speed ω3at time T2.

For another scheme (which is shown inFIG. 4), a short braking period can be employed. During the period between times T3and T4, the speed command issued to controller104-2is set to code L3(which corresponds to a target rotational speed that is not shown). As a result, the controller104-2places inverter106in a braking mode or state. In this braking state, transistors Q1, Q3, and Q5are inactivated or “turned off,” while transistors Q2, Q4, and Q6are activated or “turned on.” This allows a reverse or negative current to flow back through the pin COMM so as to be dissipated by resistor R1. This use of this short braking period is effective in slowing motor110to the desired or target speed within the desired deceleration period (i.e., between times T3and T4), but the speed is not stable. There is some “ringing” that does occur.

Therefore, there is a need for an improved method and/or apparatus of braking with a brushless DC motor.

SUMMARY

An embodiment of the present invention, accordingly, provides an apparatus. The apparatus comprises an inverter that is configured to be coupled to a motor; and a controller having: a pulse width modulation (PWM) generator that is coupled to the inverter; a reverse current detector that is coupled to the PWM; control logic that is coupled to the PWM generator and that is configured to receive a target speed signal; and reverse current logic that is coupled to the reverse current detector and the control logic, wherein the reverse current logic is configured to receive the target speed signal, a braking parameter, and a rotational speed parameter, and wherein, when a reverse current is detected, the reverse current logic is configured to calculate a brake-to-off ratio based for a brake interval that is based at least in part on the target speed signal, the braking parameter, and the rotational speed parameter.

In accordance with an embodiment of the present invention, the reverse current logic is configured to provide a control signal to the controller so as to apply the brake-to-off ratio to the inverter.

In accordance with an embodiment of the present invention, the reverse current is configured to iteratively calculate a plurality of brake-to-off ratios for a plurality of brake intervals to achieve a target speed indicated by the target speed signal.

In accordance with an embodiment of the present invention, the reverse current logic further comprises a finite state machine.

In accordance with an embodiment of the present invention, the reverse current detector further comprises: a resistor that is coupled to the PWM generator; and a comparator that is coupled to the resistor.

In accordance with an embodiment of the present invention, the rotational parameter is configured to be a rotational speed of the motor.

In accordance with an embodiment of the present invention, a method is provided. The method comprises receiving a command to correspond to a target speed of a motor; measuring a rotational speed of the motor; calculating a brake-to-off ratio for a braking interval based at least in part on the rotation speed, the target speed, a braking parameter; inducing an off state for an inverter that is coupled to motor during an off portion of the braking interval; and applying a brake signal to the inverter during a braking portion of the braking interval.

In accordance with an embodiment of the present invention, the rotational speed further comprises a first rotational speed, and wherein the braking interval further comprises a first braking interval, and wherein the method further comprises: measuring a second rotational speed of the motor after the first braking interval; and if a calculated back electromotive force (back-emf) for the second rotational speed is greater than a calculated back-emf for the target speed, repeating the steps of calculating, inducing, and applying for a second braking interval.

In accordance with an embodiment of the present invention, the braking signal further comprises a plurality of PWM signals that correspond to braking.

In accordance with an embodiment of the present invention, the method further comprises detecting a reverse current.

In accordance with an embodiment of the present invention, the motor is a three-phase brushless direct current (DC) motor.

In accordance with an embodiment of the present invention, an apparatus is provided. The apparatus comprises a motor; a motor driver having: an inverter that is coupled to the motor; and a controller having: a PWM generator that is coupled to the inverter; a reverse current detector that is coupled to the PWM; control logic that is coupled to the PWM generator and that is configured to receive a target speed signal; and reverse current logic that is coupled to the reverse current detector and the control logic, wherein the reverse current logic is configured to receive the target speed signal, a braking parameter, and a rotational speed parameter, and wherein, when a reverse current is detected, the reverse current logic is configured to calculate a brake-to-off ratio based for a brake interval that is based at least in part on the target speed signal, the braking parameter, and the rotational speed parameter.

In accordance with an embodiment of the present invention, the reverse current logic is coupled to the motor so as to receive the rotational speed.

In accordance with an embodiment of the present invention, the motor is a three-phase brushless DC motor.

DETAILED DESCRIPTION

Turning toFIG. 5, an example of a system200in accordance with the present invention can be seen. System200is similar in construction to that of systems100-1and100-2, except that in IC or motor driver202there is a controller204that performs an adaptive braking scheme. In operation, a target speed signal TGT is provided to the control logic206and the reverse current logic212(which can, for example, be a finite state machine or FSM). Based on this target signal TGT, the control logic206can provide PWM signals PWM1to PWM6to inverter106(similar to systems100-1and100-2) to drive the motor110. When a reverse current is detected by the reverse current detector (which generally comprises resistor R2and comparator210), the reverse current logic212controls the control logic206so as to apply adaptively braking the motor110. Alternatively, another current measurement or resistive element (like a transistor) may be used as the part of the reverse current detector.

The adaptive braking scheme (which is shown inFIGS. 5 and 6) is able to slow or decelerate the motor110to a desired rotational speed within a target deceleration time. As shown, the target deceleration time is the period between times T5and T6. Similar to systems100-1and100-2, the target signals TGT changes from code L1to code L3at time T5and from code L3to code L2at time T6. Between times T5and T6, the reverse current detector detects the reverse or negative current (as shown with state302). The reverse current logic212then calculates (in state304) a brake-to-off or brake-to-HIZ ratio for a braking interval I. The braking interval I is generally a predetermined or preset interval having a generally fixed length that can be programmably changed, and the brake-to-off ratio is the relative portions of the braking interval I that controller204places the inverter106in a HIZ (off) mode or state (i.e., transistors Q1to Q6being deactivated) and a braking mode or state (i.e., transistors Q1, Q3, and Q5are inactivated and transistors Q2, Q4, and Q6are activated). Typically, the brake-to-off ratio is calculated from the target speed signal TGT, the braking parameter KE, and the rotational speed parameter SPD (i.e., measured rotational speed from motor110). For example, the brake-to-off ratio may be calculated by:

HIZHIZ+Brake=I-BrakeI=T⁢⁢G⁢⁢T·GainKE·S⁢⁢P⁢⁢D(1)
Once the braking interval has been completed, a determination is made in state306as to whether additional braking should be performed using a comparison of calculated back electromotive forces (back-emfs) of the measured rotational speed (from signal SPD) and target speed (from signal TGT); namely:

(1-KE·S⁢⁢P⁢⁢DT⁢⁢G⁢⁢T·Gain)>0→additional⁢⁢braking(2)(1-KE·S⁢⁢P⁢⁢DT⁢⁢G⁢⁢T·Gain)≤0→PWM(3)
Usually, as shown inFIG. 6, the brake-to-off ratio becomes smaller (i.e., duration for the braking mode decreases while the duration for the HIZ mode increase) over successive braking intervals I. This allows the motor110to be decelerated within a desired deceleration interval without use of a bulky discharge circuit (i.e., discharge circuit108) and without ringing.