Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
STEPPER MOTOR RAMP GENERATION
Document Type and Number:
WIPO Patent Application WO/1992/020143
Kind Code:
A1
Abstract:
A method for generating stepper motor ramps and analyzing the motor torque required compared with the motor torque available wherein the generated ramp will accelerate the motor as fast as possible while maintaining a user settable torque safety factor and/or safety margin. The method uses the minimum available stepper motor torque at the current motor speed to ultimately compute the maximum acceleration that can be used, uses the maximum acceleration to generate the next motor step time and hence the next motor velocity, computes the next velocity from the desired acceleration and the previous velocity and takes advantage of the fact that friction will help during deceleration of the motor. In particular, the method comprises the steps of determining the minimum available torque using the current motor velocity and the torque-speed characteristic of the motor, applying to the available torque a safety factor and then a safety margin to determine maximum usable torque wherein the safety factor is derived from motor information and the safety margin is derived from system information, calculating the maximum acceleration using the friction and moment of inertia of the system and the maximum usable motor torque, calculating the time duration of the next step for advancing the motor, repeating the foregoing steps to determine all steps in the ramps, and utilizing the generated motor ramps in advancing the stepper motor. The generated ramp always exploits the full drive capability of the stepper motor, and it provides a relatively constant margin between available torque and required torque during both acceleration and deceleration of the motor.

Inventors:
EVANS STUART GERARD (US)
IRWIN WILLIAM GEORGE (US)
Application Number:
PCT/US1992/003744
Publication Date:
November 12, 1992
Filing Date:
May 06, 1992
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
EASTMAN KODAK CO (US)
International Classes:
H02P8/14; H02P8/04; (IPC1-7): H02P8/00
Foreign References:
US4714867A1987-12-22
Other References:
IEEE INTERNATIONAL CONFERENCE ON SYSTEMS ENGINEERING 11 August 1990, PITTSBURG US pages 593 - 596; R.H. BROWN ET AL: 'TIME-OPTIMAL ACCELERATION CONTROL AND POINT-TO-POINT CONTROL OF STEP MOTORS'
PATENT ABSTRACTS OF JAPAN vol. 11, no. 169 (E-511)(2616) 30 May 1987 & JP,A,62 002 875 ( FUJI ELECTRIC COMP. LTD ) 8 January 1987
PATENT ABSTRACTS OF JAPAN vol. 10, no. 289 (E-442)(2345) 2 October 1986 & JP,A,61 106 094 ( FUJI ELECTRIC COMP. LTD ) 24 May 1986
Download PDF:
Claims:
WHAT IS CLAIMED:
1. A method for generating a stepper motor ramp for controlling the times between electrical pulses supplied to the motor for advancing the motor, said method comprising the steps of: a) determining the minimum available torque for the motor; b) applying to the available torque a safety factor and then a safety margin to obtain the maximum usable torque wherein the safety factor is derived from motor information and the safety margin is derived from information on a system of which the motor is a part; c) calculating the maximum acceleration from the friction and moment of inertia of the system of which the motor is a part and the maximum usable motor torque; d) calculating the time duration of the next step for advancing the motor; e) repeating steps a) through d) to determine all steps in the ramp; and f) utilizing the generated stepper motor ramp in advancing the motor.
2. A method according to claim 1, wherein said step of calculating the time duration of the next step for advancing the motor is performed by using the maximum acceleration to generate the next step time and hence the next velocity including computing the next velocity from the desired acceleration and the previous velocity.
3. A method according to claim 1, wherein said step of utilizing the generated stepper motor ramp includes providing a series of electrical pulses of suitable amplitude and pulse width to advance the stepper motor wherein the times between the pulses are controlled by the ramp.
4. A method for generating a stepper motor ramp for controlling the times between electrical pulses supplied to the motor for advancing the motor, said method comprising the steps of: a) determining the minimum available torque using the current motor velocity and the torquespeed characteristic of the motor; b) calculating the maximum usable torque using the available torque determined in step a) and applying a safety factor and a safety margin to the available torque, the safety factor being derived from motor information and the safety margin being derived from information on a system of which the motor is a part; c) calculating the maximum possible acceleration for the next motor step using the system friction and moment of inertia and the maximum usable torque at the current speed calculated in step b) ; d) calculating the time duration of the next step for advancing the motor; e) repeating steps a) through d) to determine all steps in the ramp; and f) utilizing the generated stepper motor ramp in advancing the motor.
5. A method according to claim 4, wherein said step of calculating the time duration of the next step for advancing the motor is performed by using the maximum acceleration to generate the next step time and hence the next velocity including computing the next velocity from the desired acceleration and the previous velocity.
6. A method according to claim 4, wherein said step of utilizing the generated stepper motor ramp includes providing a series of electrical pulses of suitable amplitude and pulse width to advance the stepper motor wherein the times between the pulses are controlled by the ramp.
7. A method for generating a stepper motor ramp for controlling the times between electrical pulses supplied to the motor for advancing the motor, said method comprising the steps of: a) determining the minimum available torque using the current motor velocity and the torquespeed characteristic of the motor; b) calculating the maximum usable torque using the minimum available torque determined in step a) and applying a safety factor and then a safety margin to the available torque according to the relationship: Tusable ■ available (Safety Factor)Safety Margin where 0 < Safety Factor < 1 and Safety Margin < T available (Safety Factor) and where the safety factor is derived from motor information and the safety margin is derived from information on a system of which the motor is a part; c) calculating the maximum possible system acceleration for the next motor, step from the system friction, system moment of inertia and maximum usable motor torque at the current speed according to the relationship: A ■*_= (Tusable fr)/m where A is the maximum possible system acceleration, Tusable is the maximum usable motor torque, f is the system friction, r is the radius of the moment arm of the system load and n is the system moment of inertia, and where the maximum system friction expected is for up ramps and the minimum system friction expected is used for down ramps; d) calculating the time duration of the next step for advancing the motor using the relationship: V VnVn_1 tn 1/Vn 2 where n is the current step number being calculated, V is motor velocity and tn is the time per step; e) repeating steps a) through d) to determine all the steps in the ramp; and f) utilizing the generated stepper motor ramp in advancing the motor.
8. A method according to claim 7, wherein said step of utilizing the generated stepper motor ramp includes providing a series of electrical pulses of suitable amplitude and pulse width to advance the stepper motor wherein the times between the pulses are controlled by the ramp.
9. A method for controlling a stepper motor comprising: a) supplying to the stepper motor a series of electrical pulses of suitable available and pulse width to advance the stepper motor; and b) controlling the times between said pulses according to a ramp generated by using the minimum available torque at the current speed to ultimately compute the maximum acceleration that can be used, by using the maximum acceleration to generate the next step time and hence the next velocity including computing the next velocity from the desired acceleration and the previous velocity and by taking advantage of system friction during deceleration.
10. In a stepper motor system including a stepper motor for driving a load and a microprocessordriver combination associated with said stepper motor for supplying a series of electrical pulses of suitable amplitude and pulse width to advance the stepper motor: a stepper motor ramp function stored in said microprocessor for controlling the times between said pulses, said ramp maintaining a relatively constant margin between available torque and required torque of said stepper motor during both acceleration and deceleration of said motor while utilizing the full drive capability of said motor during each step of the operation thereof, said ramp including an externally specified safety factor based on stepper motor information and safety margin based on system information.
Description:
STEPPER MOTOR RAMP GENERATION

Technical Field This invention relates to the art of controlling the step-wise operation of stepper motors, and more particularly to a new and improved method for generating stepper motor ramps which exploits the full drive capability of the stepper motor during each step of the ramp.

Background of the Invention

Stepper motors are widely used in application requiring accurate position control and compatibility with digital systems. Electrical pulses of suitable amplitude and pulse width are supplied to the stepper motor to advance the motor by a predetermined distance for each pulse. One advantage of stepper motors is that the motor position can be determined by counting the pulses applied to it. Stepper motors have a torque-speed characteristic wherein torque decreases as speed increases. Stepper motor acceleration and deceleration times have been undesirably long due in part to the nature of the available torque characteristic of the motor. In an attempt to counteract this problem, stepper motors have been accelerated and decelerated in accordance with a predetermined velocity profile, or velocity variation as a function of time. However, these methods do not always exploit the full drive capability of the stepper motor, thereby causing the motor to take more time to move a specified distance.

It would, therefore, be highly desirable to provide a method for generating a stepper motor ramp for controlling the times between electrical pulses

supplied to the motor for advancing the motor which method exploits the full drive capability of the stepper motor and accelerates the motor as fast as possible while maintaining a torque safety factor and/or safety margin.

Objects and Summary of the Invention

It is, therefore, a primary object of this invention to provide a new and improved method for generating a stepper motor ramp for use in controlling the times between electrical pulses supplied for advancing the motor.

It is a further object of this invention to provide such a method which always exploits the full drive capability of the motor. It is a more particular object of this invention to provide such a method which uses the torque actually available at each speed and during each time interval or step in the motor operation.

It is a further object of this invention to provide such a method which results in acceleration and deceleration of the motor as fast as possible while maintaining a user settable torque safety factor and/or safety margin.

It is a more particular object of the present invention to provide such a method which results in the stepper motor moving a specified distance in the fastest time allowed by a specified usable torque.

It is a further object of the present invention to provide such a method whereby the stepper motor is never required to drive more load torque than it is capable of and no unknown marginal torque conditions are allowed to exist.

It is a further object of this invention to provide such a method for generating a stepper motor ramp which takes advantage of system friction during

deceleration.

The present invention provides a method for generating stepper motor ramps and analyzing the motor torque required compared with the motor torque available wherein the generated ramps will accelerate the motor as fast as possible while maintaining a user settable torque safety factor and/or safety margin. The method uses the minimum available stepper motor torque at the current motor speed to ultimately compute the maximum acceleration that can be used, uses the maximum acceleration to generate the next motor step time and hence the next motor velocity, computes the next velocity from the desired acceleration and the previous velocity and take advantage of the fact that friction will help during deceleration of the motor. In particular, the method comprises the steps of determining the minimum available torque using the current motor velocity and the torque-speed characteristic of the motor, applying to the available torque a safety factor and then a safety margin to determing maximum usable torque wherein the safety factor is derived from motor information and the safety margin is derived from system information, calculating the maximum acceleration using the friction and moment of inertia of the system and the maximum usable motor torque, calculating the time duration of the next step for advancing the motor, repeating the foregoing steps to determine all steps in the ramps, and utilizing the generated motor ramps in advancing the stepper motor. The ramp generated according to the method of the present invention always exploits the full drive capability of the stepper motor, and it provides a relatively constant margin between available torque and required torque during both acceleration and

deceleration of the motor.

The foregoing and additional advantages and characterizing features of the present invention will become clearly apparent upon a reading of the ensuing detailed description together with the included drawing wherein:

Brief Description Of The Drawings

Fig. 1 is a graph of stall torque vs. speed for an illustrative stepper motor; Fig. 2 is a graph illustrating the stepper motor ramp generated according to the present invention;

Fig. 3 is a graph of torque available/required vs. time and safety factor/safety margin applied and further illustrating the present invention;

Fig. 4 is a graph illustrating a prior art parabolic stepper motor profile;

Fig. 5 is a graph further illustrating the profile of Fig. 5;

Fig. 6 is a schematic block diagram of a stepper motor system to which the present invention is applicable; and

Fig. 7 is a graph including waveforms illustrating the operation of the system of Fig. 6.

Description Of The Preferred Embodiment

When utilizing stepper motors in system applications, attention must be given to the requirement that the motor produce adequate torque to drive the load. The torque required to accelerate a constant inertia and drive a frictional load is given by the relationship:

T - am +.fr where T is the torque load in inch-lbs., a is the

2 angular acceleration n radians/sec , m is the

oment of inertia in inch-lb.-sec, f is the friction in lbs. and r is the radius of moment arm in inches.

From the foregoing the maximum allowable acceleration can be calculated from the maximum usable torque as follows: a - (T - fr)/m where T is the maximum usable torque in inch-lbs. and a is the maximum allowable angular acceleration in

2 radians/sec . In the foregoing relationship, torque is positive for acceleration and negative for deceleration so that when dealing with a frictional load, the absolute value of "a" is higher for a deceleration, although for a deceleration "a" is negative. From the above two relationships it is apparent that the stepper motor acceleration must have an absolute value low enough so that the motor provides enough output torque to overcome the moment of inertia of the system, while maintaining enough torque in reserve to drive or overcome the friction in the system. There must also be a safety factor and/or margin to be maintained between the torque required to drive this combined load, i.e. inertia and friction, and the minimum torque available from the motor at any speed. This safety factor/margin is required to account for any variations among motors and systems. These concerns are also influenced by the length of time required to move the motor a particular distance, i.e. advance the motor a predetermined number of steps. Heretofore, stepper motor ramp generation usually has involved making the motor velocity follow a particular mathematical function, such as a straight line (constant acceleration) or a parabola (very low acceleration at peak speed) . These ramp generation methods do not always exploit the full drive

capability of the stepper motor, causing the motor to take more time to move a specified distance. The drive capability of the motor also can be easily exceeded if care is not taken during system design. In any case, the safety margin between torque required and torque available will vary, and this can lead to marginal torque conditions where the stepper motor may fail intermittently.

In accordance with the present invention, there is provided a procedure for generating stepper motor ramps, and analyzing the torque required compared with the torque available. The generated ramps will accelerate the stepper motor as fast as possible while maintaining a user settable torque safety factor and/or safety margin. Thus, in the method of the present invention there is no attempt to follow a mathematical function. Instead, the maximum torque is utilized during each motor step, taking into account the velocity plus a safety factor and margin. The first step in the method of the present invention is determining the minimum available torque of the stepper motor using the current motor velocity and the torque-speed characteristic of the motor. An example is illustrated in Fig. 1 which is a graph of stepper motor stall torque in inch-lbs. vs. motor speed in steps/sec. As shown by curve 10 in Fig. 1, the torque decreases from about 29.5 inch-lbs to about 7.50 inch-lbs as the speed increases from about 200 steps/sec to about 4800 steps/sec. Data for the graph of Fig. 1 was obtained from a stepper motor/driver combination functioning as a paper metering motor at the output of a photographic printer of the type commercially available from Eastman Kodak Company under the designation of CLAS35 Color Printer. A graph like that of Fig. 1 can be prepared by taking

the actual steppermotor/driver combination which is to be used in a particular system application and connecting the combination to a dynamometer, operating the motor at given speed, applying incremental loads to the motor/driver combination via the dynamometer until the motor stalls, recording the torque value at stalling and repeating the procedure for a series of motor speeds to obtain a stall torque-speed characteristic. Table I is a look-up table obtained form the data of Fig. 1 which facilitates inputing the data into a computer as will be described presently. Alternatively, it would be necessary to develop a mathematical function approximating the curve of Fig. 1 for inputing to a computer.

TABLE I Stall Torque At Various Speeds

Thus, the data obtained during th2 foregoing step is the minimum available stepper motor torque at various motor speeds. The next step in the method of

the present invention is applying to that available torque a safety factor and then a safety margin to calculate the maximum usable torque. The safety factor is derived from motor information and the safety margin is derived from information on the system of which the motor is a part. Different safety factors and safety margins can be applied to specific motor velocities or steps as needed to overcome transient conditions, such as static friction. The equation for calculating maximum usable torque is as follows:

Tusable « T available (Safety Factor) - Safety Margin where 0 < Safety Factor < 1 and Safety Margin < T available (Safety Factor) . The safety factor is derived from information_ pertaining to the stepper motor. In particular characteristics of motors selected for an application including manufacturing tolerances of the motors are considered and compared to the torque-speed characteristic developed in the first step of the method. For example if the manufacturer of a stepper motor selected for a particular application indicates that motor torque is accurate to within a 15% tolerance, then the safety factor used in the foregoing equation would be 0.85, i.e. 1-0.15. Thus, safety factor in the foregoing equation can be expressed as 1-tolerance value.

The safety margin is derived from information on the system of which the steppermotor is a part. Basically, the magnitude of the safety margin is determined by the judgment of the designer, taking into account the friction loads which will be encountered in the system during operation. For example, in the photographic printer application previously mentioned, the designer would determine

experimentally the kinds of friction loads that would be encountered and how those loads would be affected by operating conditions and such factors as temperature, nature of materials, etc. From such experimental determination the designer then would arrive at a safety margin he is comfortable with.

The next step in the method of the present invention is calculating the maximum possible system acceleration for the next motor step using the system friction, system moment of inertia and maximum usable motor torque at the current motor speed. The term "system" means the motor and what it drives. The maximum usable motor torque was calculated during the preceding step. The maximum possible system acceleration, a , is obtained from the equation: an » (Tusable - fr)/m where fr is the product of system friction and the system moment arm and m is the system moment of inertia. When up-ramps are being generated one should use the maximum system friction expected, and when down-ramps are being generated one should use the minimum system friction expected. In this connection, deceleration is aided by friction and acceleration is hindered by friction. An important aspect and advantage of the present invention is that in generating the stepper motor ramps the method takes advantage of the fact that deceleration is aided by the friction.

The next step in the method of the present invention is calculating the time duration of the next step for advancing the motor. This calculation is performed using the following series of equations.

First the acceleration is given by: where t is the time and ΔV - Vn-Vn-1 where n is the

number of the current step being calculated. Next, the time per step tn, is given by: tn « 1/Vn so that the acceleration can be expressed by: a = (Vn-Vn-1)/(1/Vn) a ■•= Vn-Vn-1) (Vn) a = Vn 2 - (Vn-l)(Vn) This provides the following equation which is quadratic in Vn: Vn 2 - Vn-l(Vn)-a - 0 and which has the roots: Vn _=

2 where the + root yields Vn and the negative root yields ΔV. Thus the positive root yields the desired result from: Tn = 1/Vn

Next, the foregoing procedure is repeated to determine all of the desired steps in the ramp. For the next steps the Tn just calculated becomes tn-1, etc. The above equations, look-up table and procedure are easily implemented on a computer with a spread sheet program or as part of the on-line stepper motor algorithm. Although more complex methods of handling the ramp creation can be used, the simplest form is with a spreadsheet. This method may require manual intervention and iteration to pick a step in the ramp to start deceleration to arrive at zero velocity in the required number of steps. This will be illustrated by an example to be described presently. Other methods, such as starting at both ends of the ramp and working towards the peak velocity near the middle of the ramp, are possible.

The method of the present invention is illustrated by the stepper motor profile set forth in

Tables II and III and by graphs in Figs. 2 and 3. The stepper motor profile was developed for the previously mentioned example of a paper metering motor in a photographic printer. The profile was optimized for the minimum high speed advance length of 4.5 inches, and longer advances were obtained by adding cruise steps, i.e. zero acceleration, in the middle of the profile for simplicity since motor torque was limited at this speed. The 168 steps indicated in the first column of Table II correspond to operation of the stepper motor to advance a paper strip a distance of about 5.25 inches. During the first portion of the distance travelled the motor profile ramps up corresponding to acceleration of the stepper motor. The ramp up portion occurs during steps 1-94 wherein the acceleration is positive. During the final portion of the distance travelled the motor profile ramp down corresponding to deceleration of the stepper motor. The ramp down portion occurs during steps 119-168 wherein the acceleration is negative.

The first step in the method of the present invention, determining the minimum available torque of the stepper motor, is illustrated in the last two columns of Table II. For example, the data in the second last column is obtained in a manner similar to that described in connection with the stall torque characteristic of Fig. 1, taking into account the fact that the motor accelerates during the first portion of the trip and decelerates during the remaining portion. The data in the last column is a mirror image of that in the previous column for a purpose which will become apparent.

The quantities in the column headed "Torque Required" are obtained from the next step in the method of the present invention, i.e. applying to the

Motor Profile with 4 In. lbs. S.M. and 10% S.F,

rl

H t

« ***

H ω r I s

rl

H

i=l o

. +

A*<tn--tp) - ~ - Vn-Vp Vn- tπ-tp) « step tn-tp « step/Vn

A*εtep •= (Vn-Vp)Vn Vn2~Vp*Vn~A*step « 0

Vn = (Vp + SGRT<--Vp2 * 4A*step)>/2 Vn « A*(tn-tp)+Vp

Vn - Vp = (Vp - SQRT(--Vp2 + 4A*Btep>>/2

T*5f-sm == A*I+F A ~* <T*βf-sm-F> /I D « -<T*B -sm+F) /I

H σ 4

I - 09 o I o a et

*-*• a a n α.

Table III (continued)

Si r4 cr -o ro a r-4 ui ∑r- r*o ro - * -c •»-. ι - * -c → - r-o ro a a o- ro -c -o ui cr r-o r-o r r-4 -^ -- * s- a O;* ∑r* ro ro is. ■ ~O 3 r •1 •—• —4 —-> —* —4 — —* — —4 —* -i —4 —* ψ-i Si δ S δ δ i S. δ 'Si

r-4 ui -J3 in r-4 -c ∑r* ∑h ro 4 r»: -43 o- rt rt o r-o N i r-4 r-o r-o r-4 a cr >o ro : r4 r-o cr ui -o ro ro ro ∑ C ro ro ro -43 u r*o r-4 a ro - a ro -43 ∑ w in ro -rt a N a ro -43 o- r4 u ro •-. ~ a t*o o o- o- a a a Si rt rt rt ΓJ r-4 r4 ro r-o w ro cr cr cr ui u ui 4 -43 rt rt rt T4 r-4 r4 r-4 w r4 N r4 r*4 r-4 r4 4 r-4 r-4 r-4 « r-4 r r-4 r-4 4

-43 ro « 0- fv in to rt ch N -43 c to r-4 S: ∑h N -43 u to r- * -". i ∑r* ro r4 r4 r- j •_-_ »-. -M - * - a i i i a a a 0 ∑r- ∑ir* Σ3** o*- 0"* -O"* ∑r* ro ro to ro ro r-o w ro t-o ro ro r i-o r-o ro t-o t-o r-4 r-4 r4 N r4 r w r-4 r-4 r

ϊ > 4. M « ϊ ^ ^ J-- * ! ^ ^ ^ ^ J--Ϊ >i ^ >*! ^ ^ « « ^ >« J-.1 J4!

N N f- N N -43 I U UI U U cr cr cr cr r

S; "S Si -S S: Si S: Si *S Si Si Si S: Si Si *ώ! Si S: Si Si Si Si Si -ϋ

<-> CD cr S: UI *- * c N S: cr a --* to <r -4 ro o- *-» r-4 to u -o t*o r*o r-o ro to ro ro cr c r c cr r-o r-o to to to t-o to to ro r-o r-o r-o ro

43 ro cr* ∑r* -- * *-. £4 C r-o to a cr in u -43 -43 N ro ro ro o- cr*

0-* Σ3- Ch 0- CT* S: a a a S* S: a a S*

| » - 1.» |Λ* I « » |.»• « l>__• I a » r r ara , c cr c ς- cr cr cr cr cr

•43*43*43*43--c *43**o*43rorororororororororororo **rcrcr *^**^

Si Si -S Se Si Si Si Si UI U U U ϋl UI U UI U UI UI UI t-0 t-0 t-0 W r*0 rt rt rt rt ^ rt rt rt ^ ^ a^ a43 o »0 *3 *^ *3 *3 *4 * c * c c

N r-4 r-4 c-i r r-4 C - *-> - * -- -+ - - --. -* - * •* -*. ** -* rt -H -

r r4 r4 r*4 r-4 r4 r4 -3 -43 -4 -3 -43 -34 -^ -43 -43 -43 -43 ro ro ro ro ro

!r l> 0 , l i> !r O' tr N N N N NN N N N N a <l 'J3 *345 O

ro ∑r- S: " r-4 r*o cr u -43 N ro 0 S: ^ t r-o ui -43 r- ro ∑r* i -ι r*4 r*o r*o a a a cr cr cr cr ar cr cr ui ui ui ui ui ui ui ui m ui -43 o -43

K ro cr s.' rt r- r-o cr ui s u 0- rt -43 © a r-4 r • rN ro ro ro ro b C C- i ci a U : UI a U i U i UI SI UI Si UI a UI i UI a UI a

> ui N a r-4 ui st r4 u a r-4 ui a w ui a N UI

O -f . . . . . . . . . e in a ar u u ui u -43 -43 -o o r- r- © ro ro ro o- ∑ cr

Tβble III (continued)

u u i © - ^ ro ui 0 tr* N u ro 0*4 ^ a o- cr* a a a r-o u N r4 43 -43 -c © © cr* o- a -rt rt r-4 r-o c u -^ N © a *-» r-4 r-o cr ui N © a

(rjr^ θ''[r^ιr-S!SδS'SSSδ!«δδ « < -<--ι ^ --a--< ^ r ' i

_ r-4 r-4 r-4 cr ui c rt r-o u O- rt t-o u © a r-o ui © « a r- -^ ~ t © r-4 -43 U 43 >0 -*C c * 43 * 43 * * C | © ro © ro O O- i a rt rt rt

04 r-4 r4 r-o C 004 VA r-4 r r-4 r-4 r-4 r-4 w r-4 r4 a r-4 w ro r*o ro ro r*o r-o ro r-o

ι •a \^J i N*«. ι. ^» \ t> t i ' ι V\." V ι\ V iS | * 5 V V Λ* ι *\V* ι *\*•__ • " ?>_\« iS*. V ι\? - » a . -*. V .V*. * »*» •*. . **- -•. « Vs* * «V -s* V iT"*. V i? : V\» * V*

0 r-4 a -c N N ts N ro ro ro © 0 cr ∑ a a a a a ^ r-4 r-o r- : a S: a a a S i a a : ; a a a a 5; S : a a rt « rt rt •« rt rt rt * ^ - i I I I I I I I 1 I I I 1 I I I i I I I I ! ! I I

a a a ∑r* © © r-. -43 u c c r-o - * a σ-* ro >C U cr r-o 4 - * a o- © >c 4 r r-4 rt rt rt rt rt •*-* rt rt -rt rt rt rt a •« a a a a a « a a cr- o^ cr*

« M ,s..T •* ,s* « « ,N « *^χχ ; « ^ ^..v; ^ ^ ^ ^ ?s « Ϊ >? M ^ M }<

Σ> 0" S* 0*4 ar cf ar ar cf cf a af U UI UI U U U U N tr l C- rt rt u i u ui ui u ui u u in u ui ui in u u ui u u m u u u ui in

! i u u a ∑r- to r-o > r-o r-o t-o t-o r-o S N N N N N N N r-4 o*4 r-4 N c-i a a a

© © « ? 4 N tv Γ cr- ch cr- c ∑r* o- cr* r-4 r-4 r-4 r-4 r-4 r-4 is N

C-. p-a ΓN Q-* c o ∑ θ N cr*o rtrtrtartrtrtrt r ι 5r < ! c a ©©© r-4 r-4 r-4 r-4 r-4 r-404040-4 r-o r-o r-o r-o r-o r-o ro r-o ro r-o to ro r-o t to to

1 i I I i I i I I I

0404 r-4 r-4 a a a a a a a a © © © © © © © -43 -43 -43 --o 34 r-4 r-4 r

U Ul U Ul -43 -43 -4343 -43 -43 -43 -43 -43 -43 -0 -43 -Si -43 -43 N N fs fs. ?v CT Ch 0-

a -rt C t-o cr ui o r- © o- rtrtrtrtrtrtrtrtrtrt

© u r r-o r u © cr r-o r-o © - r- o-* -4 a -- * -c *c © o-* u -o -c a

- * ro u o- - * r-o -43 • r4 u ∑∑- r-o © cr -^ o- © -^ is M r a

0 r-4 04 0-4 0-4 r-o t ro t-o c ar a u u -43 i © a -* ar © to ro r-o ι-l -rS -r-t -n t-S i-i -i --. -v. rt -r-i r-S *-i rt τ-i .— 1 rt rt C 04 0*4 04 U U

•rt U U ^ N r-0 © -43 -43 -43 rt * * ar -43 04 N •-= 0- 04 © © -rt r-o r-o cr cr u ui -c ro cr* a -rt r-o cr - © --*• c- u r--- u ui © r-o r-o r-o r-o r-o r-o r-o t t to r-o cr cr cr cr r cr u u u *5 N *r «

« J.* J.* J." J.* j.3 J * . J.. Jj. χ J.. . . J_. J-« J- J^ ^ J^ J.' J-« ^ * r-o r ara uc uc 43« -c» r-c cr»- aa rtτ * >ca rs* 0« ux r-» uic a* crc crt araK -43 B r-oc ak *^ rt « rt « «-« rt « « p j r-4 r-4 r-4 1--. r-o r-o t-o • * ? in -G i a r c a *

I ϊ I 1 ! I I i I i i ! i i i i i i S : " rt 0*4 U *

U -cr Si U tj- tO ul 0-4 t -* © ar © SE 0"- i © U D- t-0 fs -43 ~-~

N © r o- cr a IΩ a cr tr* 0 *c cr* C r-o u u u 0*4 o- -- cr* © 0- ∑r D- © © © I -G U U ar r-0 t-004 rt a 0- © U 040* a - t-0040-40-40*40404 r-4040*40-40-4 C-i 040-40*404 -^ -* •>-> _*-_ .-, N U

0^ ΣT- r _>-. rt ∑ a _> ro© © © ui © r-o © -*. \> fs to a ts ro i -4n3 - -43 * U U ro © c -*-r. t**0 * rt m a

a

© κ I

0404 a a aa a -43-c -4304 r4 -43 t -3 a a r4 r r-4 -43 ar4 -3 . 0-aa a a a rtrt rt r-o ro ro u ui u ro © •*-« .-. ui K a r-o ui

~~ > -* 04 0*4 04 04 0*4 0*4 0*4 0*4 0*4 0*4 0*4 04 0-4 r-4 r-4 C-4 1-0 tO tO tO c a ar a -- * M r-o c m -c ro th a -rt r-4 to cr u -o is. ro tr* a ^ N to cr 0*4 04 04 0-4 04 04 0*4 04 04 0*4 t*o t-o to to to ro ro ro r-o r*o cr cr cf cf ar

available torque a safety factor and then a safety margin to calculate the maximum usable torque. As indicated on Table II, the safety factor is 10% and the safety margin is 4 inch-lbs. of torque. Thus the values of "Torque Required" are calculated from the values of "Torque Available". The first series of values actually are less than what would be obtained from a true calculation as previously described, due to the fact that in this particular application it was considered desirable to initially provide added compensation for static friction. Therefore, the friction value was tripled for the first step, doubled for the second step, and multiplied by 1.4 for the third step in this profile. In addition, the last step in the profile was adjusted experimentally to minimize ringing of the stopped motor. This step damping is a common practice with stepper motors, and illustrates the flexibility of this method to adapt to different application conditions. The next step in the method of the present invention, calculating the maximum possible system acceleration for the next motor step using the system friction, system moment of inertia and maximum usable torque at the current motor speed, is illustrated by the data in the fourth column of Table II headed "Acceleration". In other words, the acceleration values in the fourth column are calculated using the torque required values in the seventh column of Table II and using the mathematical relationship described hereinabove.

Finally, according to the method of the present invention, the time duration of the next step for advancing the motor is calculated. In particular, this is done using the mathematical relationships described hereinabove with the resulting step time

durations being listed in the column of Table II headed "Step Time". The stepper motor velocity also is calculated using the relationships described hereinabove and the results are listed in the column of Table II headed "Velocity".

The second column of Table II, headed "Cum. Time" is the cumulative step time derived from the fifth column simply by totaling the preceding quantities. The sixth column, # Clock Ticks, relates each step time to an equivalent number of microprocessor clock pulses. This is for loading the motor profile into a microprocessor look-up table for controlling a driver-stepper motor combination as will be described presently. The stepper motor ramp generated according to ^ the method of the present invention in connection with Table II is illustrated by the graph of Fig. 2. In particular. Fig. 2 presents stepper motor velocity/acceleration as a function of time with safety factor and safety margin applied according to the present invention. In Fig. 2 time is the cumulative time from the second column of Table II. Curve 20 is a plot of the stepper motor velocity values from Table II and is the stepper motor ramp according to the present invention. During the ramp-up portion 20a the stepper motor is accelerating and during the ramp-down portion 20b the motor is decelerating. In between portions 20a and 20b the motor is running at constant velocity where the torque delivered is equal to the dynamic friction in the system. Curve 30 is a plot of the stepper motor acceleration values from Table II. During portion 30a the acceleration is positive and during portion 30b the acceleration is negative, i.e. deceleration. The transition from acceleration to deceleration includes

an acceleration spike designated 32. As shown in Table II during step 120 a time quantity designated 34 in Fig. 2 is inserted to cause the change from acceleration to deceleration. This time quantity adjustment causes a motor pole torque angle correction which presents oscillations during the transition from acceleration to deceleration.

The present invention is illustrated further by Fig.3 which presents torque required and torque available vs. cumulative time with safety factor and safety margin applied according to the present invention. In particular, curve 40 is the positive torque available from the second last column in Table II and curve 40* is the negative torque available from the last column in Table II. The portions during acceleration of the stepper motor are designated 40a, 40'a and the portions during deceleration are designated 40b, 40b' . Curve 50 is the torque required or torque requested in the seventh column of Table II, the portion during acceleration being designated 50a and the portion during deceleration being designated 50b. Curve 50 in Fig. 3 is the acceleration curve 30 of Fig. 2 multiplied by the system moment of inertia plus the friction in the system according to the relationships previously explained. Of particular importance is the fact that the vertical distance between torque available 40 and torque required 50 in Fig. 3 remains relatively constant over time. This safety margin is an important advantage and distinguishing characteristic of the stepper motor ramp generated according to the present invention. In other words, the full drive capability of the stepper motor is utilized without the required torque ever exceeding the available torque. Furthermore, since the safety margin remains relatively constant during

deceleration, better use is made of system friction and available torque during deceleration, another important advantage and distinguishing feature of the present invention. The stepper motor ramp generated according to the present invention is further illustrated by Table III which is similar to Table II but which is in spread sheet formation and includes the equations previously described for calculating the quantities presented in Table III. As previously mentioned, the spreadsheet approach may require manual intervention and iteration to pick a step in the ramp to start deceleration to arrive at zero velocity in the required number of steps. In the example of Table III, step 94 was chosen for zero acceleration, and negative acceleration and minimum friction started with step 95.

The stepper motor ramp generated according to the present invention is further illustrated by comparison with a prior art parabolic profile. In particular, a stepper * motor parabolic velocity profile was generated according to the procedure disclosed in United States Patent No. 4,714,867 issued December 22, 1987 and entitled "Method And Apparatus For Controlling A Stepper Motor With A Programmable

Parabolic Velocity Profile", the disclosure of which is hereby incorporated by reference. The profile is presented in Table IV using a format similar to that of Table II. Fig. 4 is a graph of velocity/acceleration vs. cumulative time prepared from the information in Table IV, and Fig. 5 is a graph of torque required/torque available vs. cumulative time prepared from the information in Table IV. The parabolic profile represented by curve 60

in Fig. 4 takes approximately the same time to execute, within 0.1% as the profile generated according to the present invention as seen from comparing Figs. 2 and 4. The peak speed of the parabolic profile 60 also is approximately the same as that of the profile of the present invention, with 2.0%. As illustrated by the acceleration curve 64 in Fig. 4, the break 66 in the middle where the acceleration is flat is due to 26 additional steps that were inserted at peak speed. In particular, the parabolic profile of Table IV also was generated to the same specifications as the profile generated according to the present invention for the particular application of the paper metering motor in a photographic printer. For that application, the requirement was for a minimum 144 step profile for a 4.5 inch advantage at 1/32 inch per step. The parabolic profile of Table IV meets that requirement. If all of the additional peak speed cruise steps are deleted, then the profile is 144 steps long. The 168 step profile is for the most common advance length of 5.25 inches in paper metering motors for photographic printers. Twenty-six steps were added to the parabolic profile at peak speed to make it 168 steps in length for proper comparison with the 168 steps profile generated by the method of the present invention.

In Fig. 5 torque available is represented by curves 70 and 70' in a manner similar to that of Fig. 2 , and torque required or requested is represented by curve 72. It is seen that with the parabolic profile both the acceleration curve 64 and the torque required curve 72 are essentially straight lines. This is expected because differentiating a parabola results in a straight line.

Parabolic Metering

Parabolic Metering

IT I

SO

I

o x-

Parabolic Metering

H ? r>

-

parabolic Metering

A

>

H

. •* -_-

Parabolic Metering

ri to

With the parabolic profile illustrated in Figs. 4 and 5 it is noted that the safety margin between the torque available, i.e. stall torque, and the drive torque required by the system is extremely slim around the 15000 μ sec. point. This could lead to the stepper motor stalling under near worst case conditions, furthermore, the parabolic profile is much less tolerant of system variations. On the other hand, with the profile according to the present invention illustrated in Figs. 2 and 3, if the safety margin were set to the same slim safety margin caused by the parabolic profile, then the stepper motor controlled by the profile of the present invention could advance or travel the same distance in much less time. Furthermore, it may be possible to reduce the motor torque requirement thereby making the system design more flexible. Generally, it is preferred to set a reasonable safety margin. The procedure according to the present invention allows that margin and/or factor to be set by the user. This is a fundamental difference between the present invention and prior art approaches such as the parabolic approach.

Furthermore, the parabolic profile wastes the system friction. It is not taken into account when ramping down, as evidenced by the huge safety margin shown in Figs. 4 and 5 between 30,000 μ sec and 60,000 μ sec. In the profile generated by the present invention, as illustrated in Fig. 3, the safety margin/safety factor is relatively constant as previously described. Accordingly, better use is made of the available torque to slow the system down faster.

The stepper motor ramp generation procedure according to the present invention has the advantage that the stepper motor never will be required to drive

more load torque than it is capable of, and no unknown marginal torque conditions will exist. With the ramp generated according to the present invention, the stepper motor will move a specified distance in the fastest time allowed by the user specified usable torque. This is because the motor will always be accelerated and decelerated as fast as possible given this usable torque limitation.

Typically, the stepper motor ramp according to the present invention is generated off line and the ramp table generated is input to a microprocessor associated with the stepper motor system. Fig. 6 shows a stepper motor system to which the present invention is applicable including a stepper motor 80 which drives a load 82 and wherein a typical stepper motor driver 84 is provided for motor 80. A microprocessor 86 is connected in controlling relation to motor 80 in a known manner. Waveforms 90 and 92 in Fig. 7 represent two of the voltage phases applied by driver 84 to motor 80 in a manner known to those skilled in the art. These are the electrical pulses supplied to motor 80 for advancing the motor in a known manner. Waveform 94 is the output of microprocessor 86 provided in response to a stepper motor profile, such as the ramp of the present invention, stored therein.

Accordingly, in applying the ramp generated by the method of the present invention to the system of Fig. 6, the count values or clock ticks in column 6 of Table II are input to microprocessor 86 as indicated by arrow 98 in Fig. 6 and are stored there in an appropriate manner, such as in a look-up table. Then when the table is called up, the stored counts cause generation of a waveform like that designated 94. In particular, the times between the pulses are

determined by the values in column 6 of Table II.

Alternatively, the stepper motor ramp function could be generated on-line in microprocessor 86 in which case the various equations, motor information and system information would be stored in the microprocessor along with a program for performing the various calculations.

It is therefore apparent that the present invention accomplishes its intended objects. While an embodiment of the present invention has been described in detail, that is for the purpose of illustration, not limitation.