APPARATUS AND METHOD TO DETECT STALL CONDITION OF A STEPPER MOTOR
20170346426 · 2017-11-30
Assignee
Inventors
Cpc classification
H02P21/14
ELECTRICITY
International classification
Abstract
A method for detecting a stall condition in a stepper motor includes measuring stepper motor current, computing load angle of the motor, and detecting a stall condition if the load angle is more than 90 degrees.
Claims
1. A method for detecting a stall condition in a stepper motor comprising: measuring stepper motor current; computing a load angle of the motor; and detecting a stall condition if the load angle is more than 90 degrees.
2. The method of claim I wherein the load angle is computed using motor voltage, current, resistance, and inductance.
3. The method of claim 1, further comprising disabling one or both of the pulse width modulator and the stepper motor driver.
4. A method for operating a stepper motor comprising: generating a stepper angle from the speed and number of steps input by the user; running the stepper motor using signals from a pulse width modulator through a stepper motor driver; measuring currents from coils in the stepper motor; converting the measured currents to currents in a d-q domain; calculating voltage values in the d-q domain from the currents in the d-q domain; converting the voltages in the d-q-domain to voltage values in a stationary domain; calculating a load angle of the stepper motor; determining whether the load angle is greater than 90°; if the load angle is not greater than 90°, continuing to run the stepper motor; and if the load angle δ is greater than 90°, reporting a stall condition.
5. The method of claim 4 wherein converting the measured currents to currents in a d-q domain comprises converting the measured currents to currents in a d-q domain using a Park transform. 6. The method of claim 4 wherein converting the voltages in the d-q-domain to voltages in the time domain comprises converting the voltages in the d-q-domain to voltages in the time domain using an inverse Park transform.
7. The method of claim 4 further comprising stopping the stepper motor by disabling one or both of the pulse width modulator and the stepper motor driver.
8. An apparatus for controlling a stepper motor, the apparatus comprising: a stepper motor driven from a stepper motor driver circuit; a stepper angle generator circuit coupled to a user step input and user speed input, the stepper angle generator circuit having an output; current sensing and measuring circuits to measure currents flowing in coils of the stepper motor; a Park transform circuit coupled to the current sensing and measuring circuits and to the output of the stepper angle generator circuit to convert the measured currents to currents in a d-q domain; a current controller coupled to the Output of the current controller to generate voltages in the d-q domain from the currents in the d-q domain and reference currents in the d-q domain and a time domain; an inverse Park transform circuit coupled to the output of the current controller and to the output of the stepper angle generator circuit to transform the voltages in the d-q-domain to voltages in the time domain; a pulse width modulator circuit driven from the inverse Park transform. circuit; and. a stall detector circuit driven from the Park transform circuit and the current controller circuit to compute a load angle of the stepper motor and to generate a stall-detected signal coupled to at least one of the pulse width modulator circuit and the stepper motor driver circuit to stop the stepper motor if the load angle is greater than 90°.
Description
BRIEF DESCRIPTION OF THE DRAWING FIGURES
[0011] The invention will be explained in more detail in the following with reference to embodiments and to the drawing in which are shown:
[0012]
[0013]
[0014]
[0015]
DETAILED DESCRIPTION
[0016] Persons of ordinary skill in the art will realize that the following description of the present invention is illustrative only and not in any way limiting. Other embodiments of the invention will readily suggest themselves to such skilled persons.
[0017] Referring now to
[0018] As in the system depicted in
θ=(command steps *π);/2
[0019] The current controller 26 regulates the transformed currents I.sub.d and I.sub.q by calculating V.sub.d and V.sub.q. The reference current I.sub.q ref is always set to 0 and the reference current I.sub.d.sub._.sub.ref is set based on a maximum load torque value. The voltages V.sub.d and V.sub.q are then transformed into calculated voltages V.sub.a and V.sub.b at reference numeral 28 using inverse Park transform. A pulse-width-modulation (PWM) module 30 is used to generate drive signals that impose voltages calculated V.sub.a and V.sub.b through the stepper motor driver 16. The rotor of the stepper motor moves through command steps at the commanded speed. The “stepper angle” module 20 generates the imposed angle θ based on steps and speed commands set by the user. Each step corresponds to 90 degrees of angle and the rate of change of angle is dependent on the speed.
[0020] The currents I.sub.a and I.sub.b are transformed into a rotating reference frame designated d-q at reference numeral 18 by calculating currents I, and I.sub.d using a Park transform based. on imposed angle θ according to the equations
I.sub.d=I.sub.a cos θ+I.sub.b sin θ
I.sub.q=−I.sub.a sin θ+I.sub.b cosθ
[0021] The voltages V.sub.d and V.sub.q are transformed from the d-q reference frame to voltages in the stationary domain at reference numeral 28 by calculating voltages V.sub.a and V.sub.b using an inverse Park transform based on the imposed angle θ according to the equations:
V.sub.a=V.sub.d cos θ−V.sub.q sin ⊖θ
V.sub.b=V.sub.d sin θ+V.sub.q Cos θ
[0022] The current controller 22 forces the currents I.sub.d and I.sub.q to follow reference currents I.sub.d.sub._.sub.ref and I.sub.q.sub.
[0023] The PWM module 30 compares the input reference signal with a higher frequency modulator signal and generates a pulsed output whose average value is equivalent to the input reference.
[0024] The stepper driver 16 imposes driving voltages on stepper coils L.sub.a and L.sub.b based on signals from PWM module 30.
[0025] According to the present invention, the load angle is computed based on measured voltages and currents and is compared against a threshold value to detect rotor stall in stall detection module 42. The voltage equations of the stepper motor in d-q domain are:
Vd=I.sub.dR−I.sub.qLw+KNw sin δ eq(1)
Vq=I.sub.qR+I.sub.dLNw+Nwcos δ eq(2)
[0026] Where:
[0027] N=Number of teeth in the stepper motor
[0028] w=Rotor speed
[0029] R=Resistance of the stepper motor coils
[0030] L=Inductance of the stepper motor coils
[0031] K=Back-emf constant of the stepper motor
[0032] δ=Load angle which is the angle between rotor magnetic field and stator current
[0033] For stepper motor control, I.sub.q is forced to zero, so the above equations can be simplified as:
KNw sin δ=V.sub.d−I.sub.dR eq(3)
KNw cos δ=V.sub.q−I.sub.dLNw eq(4)
[0034] The load angle δ can be found from above equations using inverse tangent through a look up table or a CORDIC algorithm
δ=tan.sup.−1KNw sin δ/KNw cos δ
eq(5)
[0035] Module 42 solves eq. (3), eq. (4), and eq, (5), and makes a stall-detected decision based on the solutions,
[0036] The value of δ computed from the above equation is used to detect a stalled condition. If the angle δ is more than 90 degrees for positive speed or less than −90 degrees for negative speed, the stall condition signal is asserted. The stall condition signal can be used to disable the PWM 30 shown in solid line 44 or to disable the stepper motor driver 16 as shown by dashed line 46 in
[0037] Referring now to
[0038] The calculated voltage and current V.sub.d, I.sub.d, and the resistance R of the stepper coils are presented to sine term calculator 50 on lines 52, 54, and 56, respectively. The value R is a constant characteristic of the stepper motor 10 being controlled. The terms V.sub.d, I.sub.d, L, N, and w are presented to cosine term calculator 58 on lines 60, 62, 64, 66, and 68, respectively, with L and N being supplied from a register value set during initial setup or design. The values L and N are constants characteristic of the stepper motor 10 being controlled, and w is the desired speed command 24 in
[0039] The terms KNwsin δ and KMvcosδ calculated by sine term calculator 50 and cosine term calculator 58 are presented to arctan calculator 70. As will be appreciated by persons of ordinary skill in the art, arctan calculator 70 can easily be configured from arithmetic circuits that are readily implementable in the FPGA 48.
[0040] The w term representing rotor speed on line 68 can be either a positive or negative number depending on the direction of desired rotation of the stepper motor 10. The sign block 72 determines the sign of w. If the sign is positive, the sign block 72 outputs a value of 1. If the sign is negative, the sign block 72 outputs a value of −1.
[0041] In multiplier 74, the arctan value angle δ calculated from arctan calculator 70 is multiplied by the output of the sign block 72. At decision block 76, it is determined if the angle δ is greater than 90°. If angle δ is greater than 90°, a stall condition is indicated and a stall condition signal is output on line 44.
[0042] Referring now to
[0043] At reference numeral 84, a stepper angle is generated from the speed w and number of steps input by the user. At reference numeral 86, the stepper motor is run from the PWM 30. At reference numeral 88 currents I.sub.a and I.sub.b are measured and converted to values. At reference numeral 90, the Park transform is used to convert the values of the measured currents t.sub.a and to values id and I.sub.q. At reference numeral 92, the voltage values V.sub.d and V.sub.q are generated from the current values I.sub.d and I.sub.q. At reference numeral 94, an inverse Park transform is performed to convert the voltage values V.sub.d and I.sup.q to voltage values V.sub.a and V.sub.b. At reference numeral 96, the load angle δ is calculated. At reference numeral 98, it is determined whether the load angle δ is greater than 90°. If the load angle δ is not greater than 90° the method returns to reference numeral 84. If the load angle 6 is greater than 90°, a stall condition is reported at reference numeral 100 and the method proceeds to reference numeral 102, where the motor is stopped by disabling either the PWM 30 or the stepper motor driver 16. The method then ends at reference numeral 104.
[0044] While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims.