Apparatus and method for sensorless detection of load torque of a stepper motor and for optimizing drive current for efficient operation
10511245 ยท 2019-12-17
Assignee
Inventors
Cpc classification
H02P8/00
ELECTRICITY
International classification
Abstract
A method for controlling the drive current in a stepper motor includes measuring stepper motor current, computing a load angle of the stepper motor, calculating a torque ratio of the stepper motor, generating a reference current as a function of the torque ratio and a maximum current setting for the stepper motor, and setting the drive current of the stepper motor as a function of the reference current.
Claims
1. A method for controlling the drive current in a stepper motor comprising: measuring a stepper motor current; computing a load angle of the stepper motor; calculating a torque ratio of the stepper motor; generating a reference current as a function of the calculated torque ratio and a maximum current setting for the stepper motor; and setting the drive current of the stepper motor as a function of the generated reference current.
2. The method of claim 1 wherein the load angle is computed using motor voltage, current, resistance, and inductance.
3. The method of claim 1, wherein calculating a torque ratio of the stepper motor comprises calculating a low-pass filtered torque ratio of the stepper motor.
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; calculating a torque ratio of the stepper motor; determining a reference current value as a function of the calculated torque ratio and a maximum current setting for the stepper motor; and setting the drive current of the stepper motor as a function of the determined reference current.
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. 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; a current sensing and a measuring circuit 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 circuit coupled to the output of the Park transform circuit 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 reference current generator circuit configured to determine a reference current to set a drive current for the stepper motor as a function of the speed of the stepper motor, an output of the park transform circuit, and an output of the current controller circuit, wherein the reference current is fed back to the current controller circuit.
Description
BRIEF DESCRIPTION OF THE DRAWING FIGURES
(1) The invention will be explained in more detail in the following with reference to embodiments and to the drawing in which are shown:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION
(8) 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.
(9) Referring now to
(10) As in the system depicted in
=(command_steps*)/2
(11) 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 is generated dynamically by a reference current generator module 42. 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 an 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.
(12) 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.sub.q 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.q sin +I.sub.b*cos
(13) 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
(14) The current controller 26 forces the currents I.sub.d and I.sub.q to follow reference currents I.sub.d_ref and I.sub.q_ref by calculating V.sub.d and V.sub.q. A PI controller is a simple and widely used form of controller and is suitable for this purpose.
(15) 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.
(16) The stepper driver 16 imposes driving voltages on stepper coils L.sub.a and L.sub.b based on signals from PWM module 30.
(17) According to the present invention, the load angle is computed based on measured voltages and currents and is used to calculate the reference current value by reference current generator module 42. The voltage equations of the stepper motor in d-q domain are:
Vd=I.sub.dRI.sub.qLw+KNw sin eq. (1)
Vq=I.sub.qR+I.sub.dLNw+Nw cos eq. (1)
(18) Where:
(19) N=Number of teeth in the stepper motor
(20) w=Rotor speed
(21) R=Resistance of the stepper motor coils
(22) L=Inductance of the stepper motor coils
(23) K=Back-emf constant of the stepper motor
(24) =Load angle which is the angle between rotor magnetic field and stator current
(25) For stepper motor control, I.sub.q is forced to zero, so the above equations can be simplified as:
KNw sin =V.sub.dI.sub.dReq. (3)
KNw cos =V.sub.qI.sub.dLNweq. (4)
(26) The load angle can be found from above equations using an inverse tangent, through a look up table, or a CORDIC algorithm, responsive to the inputs I.sub.d, L.sub.q and V.sub.d, as:
=tan.sup.1(Knw sin /KNw cos )eq. (5)
(27) Reference current generator module 42 solves eq. (3), eq. (4), and eq. (5), and determines the value of the reference current. The value of computed from the above equation is used to set the value of the output reference current I.sub.d_ref of reference current generator module 42, which is fed to current controller 26 in place of the fixed reference of the prior art. All of the elements of apparatus 40, with the exception of stepper motor driver 16 and stepper motor 10 are in embodiment implemented in an FPGA 48.
(28) Referring now to
(29) The reference current generator module 42 computes the value of the reference current I.sub.d_ref. Equation (3) is implemented in sine term calculator block 50 and equation (4) is implemented in cosine term calculator block 52 to find, respectively, the sine and cosine terms.
(30) The calculated voltage and current V.sub.d, I.sub.d_ref, and the resistance R of the stepper coils are presented to sine term calculator 50 on lines 54, 56, and 58, respectively. The value R is a constant characteristic of the stepper motor 10 being controlled, and is thus supplied from a register value set during initial setup or design. The terms V.sub.q, I.sub.d_ref, L, N, and w are presented to cosine term calculator 52 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 and I.sub.d_ref being presented as a feedback from the output of reference current generator module 42. The values L and N are constants characteristic of the stepper motor 10 being controlled, and w is the desired speed command 24 in
(31) Absolute value blocks 70 and 72 convert any negative sine and cosine values, respectively, to positive values, and then an inverse tangent is used to find the load angle in arctan block 74. The load angle output from arctan block 74 is divided by the quantity /2 (90) provided at reference numeral 76 in division block 78 to obtain the ratio of load torque with respect to rated motor torque (torque ratio). 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.
(32) The torque ratio output from division block 78 is passed through a low pass filter 80 to remove noise. The filtered torque ratio is multiplied at multiplier 82 by a Maximum current value setting provided at reference numeral 84 to obtain a current reference representing the current required to meet the load torque on line 86. The Maximum current value setting at reference numeral 84 is set by the user and depends on the application. According to one embodiment of the invention, the value is set to the rated current of the motor. As the current controller module 26 in
(33) The reference current generator module 42 automatically calculates the current required to meet the present load torque. It makes sure only a dynamically calculated current, responsive to the present load, is supplied to the motor instead of driving the motor with maximum current under all load conditions.
(34) The proposed apparatus and method of the present invention is in one embodiment implemented in FPGA 48 because of the simplicity of the equations involved. Persons of ordinary skill in the art will recognize that the present invention is not limited to the use of FPGA devices, but is also applicable to micro-controller or DSP solutions.
(35) Referring now to
(36) At reference numeral 94, a stepper angle is generated from the speed w and number of steps input by the user. At reference numeral 96, the stepper motor is run from the PWM module 30. At reference numeral 98 currents I.sub.a and I.sub.b are measured and converted to values. At reference numeral 100, the Park transform is used to convert the values of the measured currents I.sub.a and I.sub.b to values I.sub.d and I.sub.q. At reference numeral 102, 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 104, the load angle is calculated. At reference numeral 106, the torque ratio is calculated, responsive to the voltage values V.sub.d and V.sub.q and value I.sub.d. At reference numeral 108 the torque ratio is passed through low pass filtered to remove noise. At reference numeral 110, the reference current value I.sub.d_ref is calculated by multiplying the filtered torque ratio by the Maximum current value. At reference numeral 112 the calculated reference current value I.sub.d_ref is provided to the motor current controller (reference numeral 26 in
(37) Referring now to
(38) The graph of
(39) The stepper motor does not rotate until the current reference value is greater than current required to overcome the load torque. As a result the computed load angle continues to increase. When the current reference value increases above the value equivalent to the load torque, the stepper motor starts to rotate and the load angle starts to decrease as shown at reference numeral 120 in
(40) When the load torque undergoes a step change from 10% to 50% as shown at reference numeral 122 in
(41) While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art that the above example is just one of many possible cases and 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.