ADAPTIVE CONTROLLER FOR A MOTOR VEHICLE ENGINE THROTTLE OPERATOR

Abstract: The stator winding energization frequency of a stepper motor throttle operator is adjusted in relation to a comparison between the actual neutral voltage crossing of back-EMF in the stator windings and a previously determined optimum point of crossing. The energization frequency is increased to increase motor speed when the actual crossing occurs prior to the optimum point, and decreased to decrease motor speed when the actual crossing occurs after the optimum point.

Description: This invention relates to an electrical servo apparatus for a stepper motor for adjusting the engine throttle of a motor vehicle engine, and more particularly to an adaptive controller for maximizing the motor speed and torque during operation of the servo, and to a method of operation thereof. Stepper motors are well suited to positional servo control applications, primarily because they interface easily with digital controllers and can reliably position a mechanical load without the use of a rotor position sensor. The rotor is stable in any of a number of discrete rotary positions, and is driven in a forward or reverse direction in a step-by-step manner by sequentially advancing the stator winding energization at a controllable rate, or frequency. Accordingly, there is substantially no positional drift, and the rotor position can be determined in relation to the history of the stator winding advancement. In most applications, the objective is to reliably move the mechanical load to a desired position in the shortest amount of time. In a stepper motor system, this means that the rotor has to be driven as quickly as possible without losing the synchronism between stator winding energization and rotor position. A critical motor characteristic in this regard is pullout torque -- that is, the maximum load torque which may be applied to the rotor without loss of synchronism. Positional error occurs when the load torque exceeds the pullout torque. Typically, the pullout torque decreases with increasing rotor speed, and therefore effectively limits the speed of response of the servo. Accurate positional control of a motor vehicle engine throttle is particularly difficult because the load is variable over its range of travel. In certain throttle control applications, such as vehicle speed control, the load variation is especially great because the operator of the vehicle can override the servo via the accelerator pedal linkage. The conventional approach is to make a compromise between positional accuracy and speed of response. Thus the invention concerns a method of operation of an electrical servo apparatus for positioning a mechanical load, in which the electrical servo apparatus includes a stepper motor having a plurality of stator windings adapted to be energized in predetermined sequence to develop a rotating stator magnetic field, a permanent magnet rotor drivingly connected to the mechanical load and having a magnetic field which tends to rotate in synchronism with the rotating stator magnetic field, and a computer based controller for sequentially energizing the stator windings at a rate determined in accordance with a motor speed command to rotatably drive the permanent magnet rotor for positioning the mechanical load in accordance with a position command. Such a method is known from DE-A-3 512 473. It is further known from US-A-4 480 218 to monitor the back-EMF in a de-energised phase winding of a stepper motor and to identify the zero-crossings thereof. In this prior art the time at which a zero crossing occurs is used to determine the position of the rotor and to control the energisation of a winding. The primary object of this invention is to provide an improved electrical servo apparatus for stepper motor control for quickly positioning the engine throttle of a motor vehicle engine in accordance with a position command without incurring significant positional error. To this end, the method of the invention comprises the steps of: initializing the motor speed command to a predetermined starting rate at the initiation of motor operation; and thereafter during the energization of each stator winding, detecting when the back-EMF voltage in the stator winding about to be energized crosses a reference voltage, the point in time at which such crossing occurs being related to the degree of misalignment between the magnetic fields of the permanent magnet rotor and stator winding; determining a motor speed correction in relation to the amount by which the detected crossing point deviates from a desired crossing point corresponding to an empirically derived amount of misalignment which permits the stepper motor to withstand a predetermined level of variation in the torque which opposes motor rotation without substantial loss of synchronism between the rotor and stator magnetic fields; and adjusting the motor speed command in relation to said motor speed correction so as to drive the actual crossing point into correspondence with the desired crossing point, whereby the motor speed is adaptively controlled in accordance with the torque it must overcome, and the motor speed is maximized for reliable operation under all load conditions. The present invention also includes electrical servo apparatus for carrying out the above method. In carrying out this and other objects, the electric servo apparatus of this invention adaptively adjusts the stator winding energization frequency with load variations so as to achieve the highest motor speed for reliably positioning the engine throttle at any given level of load torque. The ability of the stepper motor to withstand load torque variation without loss of synchronism is judged by monitoring the voltage induced in the deenergized phase windings (back-EMF) and identifying the zero voltage crossing thereof. The stepper motor exhibits a restoring torque which tends, within limits, to drive the permanent magnet rotor into alignment with the stator winding energization, and the neutral voltage crossing of the back-EMF in the deenergized stator windings is an indicator of the degree of misalignment. Such crossing is referred to herein as the neutral voltage crossing or the zero crossing. When the permanent magnet rotor leads the stator winding, the crossing occurs at a later point in the energization cycle than when the permanent magnet rotor lags the stator winding. Apart from load variations, the amount of rotor lag tends to increase as the motor speed is increased. In the subject throttle control application, the motor speed can be maximized while retaining the ability to respond to a predetermined level of load variation by permitting the permanent magnet rotor to lag the stator winding by an empirically determined amount. The empirically determined amount of lag defines an optimum zero crossing point with which a measured zero crossing point is compared. When the measured zero crossing point occurs later than the optimum point, the motor speed is too fast to maintain synchronization, and the stator winding energization frequency is reduced to reduce the motor speed. When the measured zero crossing occurs earlier than the optimum point, the motor speed can be increased while still maintaining synchronization, and the stator winding energization frequency is increased to increase the motor speed. In this way, the stator winding energization frequency is adaptively adjusted to changing load conditions, and the stepper motor runs at the highest speed for ensuring reliable positioning of the engine throttle. In the illustrated embodiment, the computer based controller periodically samples the induced voltage waveforms to determine if a zero crossing has occurred within a prior interval, and adjusts the energization frequency if required at each such sampling. This approach is referred to herein as a sampling system. Alternately, the computer based controller could continuously measure the induced voltage waveforms to detect zero crossings, and correct the energization frequency if required at each such detection. Such approach is referred to herein as a proportional system. This invention is now described, by way of example, with reference to the accompanying drawings, in which:- Figure l is a block diagram of a stepper motor and a computer based controller for carrying out the control functions of this invention in connection with vehicle speed control; Figures 2 - 5 are circuit diagrams depicting certain of the functional blocks of Figure l in more detail; Figure 6 graphically depicts the stator winding voltages of the stepper motor of Figure l; Figure 7 graphically depicts the energization frequency adjustment as a function of the error between the detected zero crossing and the optimum zero crossing as mechanized in a sampling arrangement; and Figures 8 - l4 set forth flow diagrams representative of computer program instructions executed by the computer based controller of Figure l in carrying out the control functions of this invention. Referring now to the drawings, and more particularly to Figure l, a stepper motor l0 is shown having a permanent magnet rotor l2 and stator windings l4a - l4c which are three-phase WYE-connected. One terminal of each stator winding l4a - l4c is connected to the positive terminal of the vehicle storage battery l6 via line l8 and an ignition switch 20. The other terminal of stator winding l4a is connected to the phase driver 22; the other terminal of stator winding l4b is connected to the phase driver 24; and the other terminal of stator winding l4c is connected to the phase driver 26. The phase drivers 22 - 26 and various other circuit blocks depicted in Figure l are operated at a relatively low voltage (such as 5 volts) as provided by the voltage regulator 28 on the line 30. The connection of such voltage to certain of the circuit blocks is indicated by the circled 5V designation. Phase drivers 22 - 26 each include a power switching device which is turned on and off by a computer based controller 32 to alternately energize and deenergize the respective stator windings l4a - l4c in predetermined sequence for producing a rotating magnetic field in the stator of stepper motor l0. The phase drivers 22 - 26 are essentially the same, the phase driver 22 being shown in greater detail in Figure 3. As set forth therein, the phase driver 22 comprises a power field effect transistor (FET) 34 connected between the stator winding l4a and ground potential via line 36, a freewheeling diode 38 for circulating inductive energy stored in the stator winding l4a at turn-off, and a zero crossing detector circuit 40. The power FET 34 is biased on and off by the computer based controller 32 via line 42, which is connected to the gate of power FET 34 through the AND gate l24. The zero crossing detector circuit 40 includes a comparator 46 which compares an offset of the phase winding voltage with a reference voltage, thereby to provide computer based controller 32 with a zero crossing indication on line 48. The winding voltage is applied to the noninverting input of comparator 46 through a voltage divider comprising the resistors 50 and 52. The reference voltage is defined by a voltage divider comprising the resistors 54 and 56. In view of the above, it will be recognized that the point of "zero crossing" as used herein is defined as the point at which the induced phase winding voltage crosses the neutral voltage at the WYE, or common, point of the stator windings l4a - l4c. In the illustrated embodiment, the WYE (common) point is maintained at the positive voltage of vehicle storage battery l6, and the zero crossing is detected by comparing the induced voltage with the positive battery voltage. It should be recognized, however, that this invention extends equally to an alternative embodiment wherein the WYE point is grounded and the phase drivers 22 - 26 selectively connect the stator windings l4a -l4c to positive battery voltage. In such case, the "zero crossing would be detected by comparing the induced voltage with ground potential. The permanent magnet rotor l2 of stepper motor l0 is mechanically connected through a reduction gearset and clutch assembly 60 to an engine throttle 62. A return spring 64 biases engine throttle 62 (which together define a mechanical load) toward a closed position, and stepper motor l0 must overcome the spring force to open engine throttle 62. The clutch of reduction gearset and clutch assembly 60 is selectively activated by a solenoid coil 66 to make or break the mechanical connection between permanent magnet rotor l2 and engine throttle 62. The energization of solenoid coil 66 is controlled by a clutch control circuit 68 via line 69, the clutch control circuit being described in greater detail below in reference to Figure 2. A reduction gearset and clutch assembly meeting the above description is set forth in detail in our published European patent application no. 0202789, which is incorporated herein by reference. The reference numeral 70 generally designates a plurality of driver input circuits pertinent to vehicle speed control. Each driver input circuit 70 is connected between the downstream side of ignition switch 20 and the computer based controller 32. An ON/OFF switch 72 is connected to the computer based controller 32 through RC network 74 and input line 76. ON/OFF switch 72 is actuated by the driver to enable or disable the vehicle speed control function. The brake (BR) switch 78 is connected to the computer based controller 32 through RC network 80 and input line 82. Brake switch 78 is normally closed, and is opened whenever the service brakes of the vehicle are operated. The set/coast (S/C) switch 84 is connected to the computer based controller 32 through RC network 86 and input line 88. S/C switch 84 is normally open and is closed momentarily or continuously by the driver to set a desired vehicle speed or to coast to a slower vehicle speed. The resume/accel (R/A) switch 90 is connected to the computer based controller 32 through RC network 92 and input line 94. R/A switch 90 is normally open and is closed momentarily or continuously by the driver to resume a previously set speed or to accelerate to a higher vehicle speed. A vehicle speed signal N v on line 96 is applied to input conditioning circuit 98 which supplies a vehicle speed feedback signal to computer based controller 32 via input line l00. As set forth in Figure 5, the input conditioning circuit 98 includes a capacitor l02 which is charged by the 5-volt supply through the resistor l04 and discharged by the vehicle speed signal N v through resistor l06 and diode l08. The capacitor ll0 is for transient suppression. The voltage across capacitor l02 thereby provides an indication of the vehicle speed, and is applied to the inverting input of operational amplifier ll2. An offset voltage defined by voltage divider resistors ll4 and ll6 is applied to the noninverting input of operational amplifier ll2. Accordingly, the output voltage of operational amplifier ll2 on input line l00 provides an offset indication of the vehicle speed N v . A watchdog circuit l20 cooperates with the computer based controller 32 in a conventional manner to detect the occurrence of a controller malfunction. In the event of a malfunction, the watchdog circuit l20 operates to deenergize the stator windings l4a - l4c via line l22 and AND gates l24 - l28, to disengage the clutch of reduction gearset and clutch assembly 60 via line l22 and clutch control circuit 68, and to reset the computer based controller 32 via line l30. As set forth in Figure 4, watchdog circuit l20 comprises an RC oscillator l32 and a reset logic circuit l34. RC oscillator l32 has an operating frequency of approximately 25 Hz, and its output on line l36 is applied as an input to exclusive NOR gate l38. The other input to the NOR gate l38 is supplied by computer based controller 32 on line l40. The output of NOR gate l38 is applied as an input to computer based controller 32 via line l42, and also as an input to exclusive NOR gate l44 through the RC network l46. The periodic voltage transitions on line l42 signal the computer based controller 32 to drive the line l40 to the same voltage level. Until the computer based controller 32 responds, the output of exclusive NOR gate l38 falls to a logic zero voltage potential, allowing the capacitor l48 of RC network l46 to discharge. In normal operation, the computer based controller 32 quickly responds to the voltage transitions on line l42, and the output of exclusive NOR gate l38 is returned to a logic one voltage potential. Since the output of NOR gate l38 is low for only a short period of time, the capacitor l48 remains charged at a relatively high voltage level, and the output of exclusive NOR gate l44 is maintained at a logic one voltage potential. Transistor l50, which is connected to the output of NOR gate l44 through resistor l52, is maintained conductive, holding the reset input (R) of computer based controller 32 substantially at ground potential. If a malfunction prevents computer based controller 32 from properly responding to the voltage transitions on line l42, NOR gate l38 remains at a logic zero voltage potential, and capacitor l48 becomes substantially discharged. As a result, the output of NOR gate l44 falls to a logic zero voltage potential. At such point, line l22 signals the AND gates l24 - l28 to deenergize stator windings l4a - l4c, and the clutch control circuit 68 to disengage the clutch of reduction gearset and clutch assembly 60. In addition, transistor l50 is biased nonconductive, and a resistor l54 raises line l30 to a relatively high voltage potential to effect a reset of the computer based controller 32. The voltage transitions on line l42 continue to occur, and when the computer based controller 32 properly responds thereto, the watchdog circuit l20 operates as described in the previous paragraph. The clutch control circuit 68 depicted in Figure 2 controls the energization of solenoid coil 66 via line 69. The energization current for solenoid coil 66 is supplied from the downstream side of ON/OFF switch 72 through line l60 and the emitter-collector circuit of transistor l62. As such, the stepper motor l0 can only effect adjustment of engine throttle 62 when the ON/OFF switch 72 is closed. Whenever the ON/OFF switch 72 is moved to the OFF position (opened) the solenoid coil 66 is deenergized, and the engine throttle 62 returns to a position dependent upon the accelerator pedal linkage (if any) and the return spring 64. A Zener diode l63 protects the transistor l62 when the solenoid coil 66 is deenergized. Whenever the ON/OFF switch 72 is closed, the energization of solenoid coil 66 is controlled in accordance with a clutch command signal provided by the computer based controller 32 on line l64 and a brake switch signal on line l66. The brake switch signal is obtained from the downstream side of brake switch 78, which is closed when the service brakes are not in use and open when the service brakes are being applied. The clutch command signal on line l64 is applied directly as an input to an AND gate l68; the brake signal on line l66 is applied as an input to AND gate l68 through a diode l70 and a RC network l72. The output of AND gate l68 is applied through resistors l74 and l76 to the base terminal of Darlington transistor l78 for controlling its conduction. The output circuit of Darlington transistor l78 is connected to the base terminal of transistor l62 through a voltage divider comprising resistors l80 and l82. So long as the ON/OFF switch 72 is closed and the service brakes are not applied, the output of AND gate l68, and hence to conduction of Darlington transistor l78 and transistor l62, is controlled in accordance with the clutch command signal on line l64. The solenoid coil 66 is energized to engage the clutch if the clutch command signal is high, and deenergized to disengage the clutch if the clutch command signal is low. However, when the service brakes are applied, the brake switch 78 opens, and after a brief delay effected by the RC network l72, the output of AND gate l68 falls to a logic zero voltage level to deenergize the solenoid coil 66. A similar override of the clutch command signal on line l64 is effected by the watchdog circuit l20 in the event of a controller malfunction. The line l22 is connected to the junction of resistors l74 and l76 through a diode l84, and serves to independently bias the Darlington transistor l78 and transistor l62 nonconductive to deenergize the solenoid coil 66. A feedback signal indicative of the state of clutch control circuit 68 is provided to computer based controller 32 on line l86. The feedback signal is generated by a diode and RC network l88, which provides a filtered indication of the voltage on line 69. In addition to controlling the energization of stator windings l4a - l4c and the solenoid coil 66, the computer based controller 32 operates a driver indicator lamp l90. Essentially, the driver indicator lamp l90 is lit whenever the vehicle speed control function is active. The driver indicator lamp l90 is connected between the (battery supply) line l8 and ground potential via a Darlington transistor l92, and computer based controller 32 controls the conduction of Darlington transistor l92 via line l94. A zener diode l96 protects Darlington transistor l92 from damage due to voltage transients. Graphs A - C of Figure 6 depict idealized voltage waveforms for one complete energization sequence of the stator windings l4a - l4c on a common time base. Graph A depicts the voltage V 14a appearing across stator winding l4a; Graph B depicts the voltage V 14b appearing across stator winding l4b; and Graph C depicts the voltage V 14c appearing across stator winding l4c. Stator winding l4a is energized during the interval t₀ - t₃; and stator winding l4b is energized during the interval t₂ - t₅; and stator winding l4c is energized during the intervals t₀ - t₁ and t₄ - t₇. The winding voltages which occur between the energization intervals are induced by the rotation of permanent magnet rotor l2, and are conventionally referred to herein as induced or back-EMF. The back-EMF appearing across each stator winding l4a - l4c is negative in polarity just after the respective stator winding is deenergized, and then becomes positive in polarity before the stator winding is energized again. The point at which the back-EMF changes from negative to positive polarity is referred to herein as the point of zero crossing. The present invention is founded on the notion that in control applications having variable load torque, there is an optimum point of zero crossing which may be empirically determined for maximizing the motor speed for the existing load torque while retaining the ability to respond to a predetermined level of load torque variation. The stator winding energization frequency -- that is, the energization sequence repetition rate -- is adjusted in closed loop fashion so that the actual point of zero crossing in each stator winding l4a - l4c occurs at or near the optimum point of zero crossing. The predetermined level of load torque variation the stepper motor l0 can respond to depends on the speed of response of the frequency adjustment. In physical terms, the point of zero crossing corresponds to the amount by which the permanent magnet rotor l2 lags the phase sequence of the stator winding energization. In a mechanization of the invention substantially as depicted in Figure l, the energization frequency was controlled so as to cause the zero crossing to occur approximately 75% of the way through a respective energization sequence stop. In this regard, a complete motor step is defined as the interval between the beginning of energization in two successively energized stator windings. The intervals t₀ - t₂, t₂ - t₄, and t₄ - t₆ each define a complete energization sequence step. Accordingly, the zero crossing for stator winding l4a occurs at time t a as shown in Graph A of Figure 6. Similarly, the zero crossing for stator winding l4b occurs at time t b , and the zero crossing for stator winding l4c occurs at time t c -- in each case, 75% of the way through the respective energization sequence step. While it will be recognized that the optimum zero crossing point depends on load conditions, the target zero crossing of 75% is referred to herein as the optimum point of zero crossing. If the actual point of zero crossing occurs prior to the optimum point of zero crossing, the stepper motor l0 could handle the load torque at a higher speed. In such case the computer based controller 32 operates to increase the winding energization frequency to increase the motor speed. If the actual point of zero crossing occurs after the optimum point, the motor speed is too great to reliably handle the load torque without loss of synchronization (slippage), and the stator winding energization frequency is reduced to reduce the motor speed. In this way, the stator winding energization frequency is adaptively adjusted to changing load conditions, and the stepper motor l0 runs at the highest speed for ensuring reliable positioning of the engine throttle 62. In the embodiment of this invention illustrated herein, the computer based controller 32 periodically executes a routine that tests for zero crossings and adjusts the energization frequency if required. In particular, three zero crossing tests are performed in each motor step. The first test, referred to herein as TEST C, occurs at the onset of the motor step -- that is, when a respective stator winding is first energized. If the back-EMF zero crossing of that phase has not yet occurred, the motor speed is much too fast, and the computer based controller 32 effects a relatively large decrease in the motor speed command, referred to hereinafter as the desired motor speed. The second test, referred to herein as TEST A, is only performed during motor starting, and occurs at the midpoint of the motor step. If the back-EMF zero crossing of the upcoming stator winding (that is, the stator winding about to be energized) has already occurred, the motor speed is much too slow, and the computer based controller 32 effects a relatively large increase in the desired motor speed. The third test, referred to herein as TEST B, occurs at the desired point of zero crossing -- that is, 75% of the way through the motor step. If the back-EMF zero crossing of the upcoming stator winding has occurred, the motor speed is a little too slow, and the computer based controller 32 effects a relatively small increase in the desired motor speed. No decrease is effected if the zero crossing has not yet occurred. Referring by way of example to the motor step defined by the interval t₂ - t₄ in Figure 6, the TEST C pertains to the occurrence of zero crossings prior to time t₂, the TEST A pertains to zero crossings prior to time t₃, and the TEST B pertains to zero crossings prior to time t c . In Figure 7, the adjustments to desired motor speed are graphically illustrated as a function of the amount by which the sensed zero crossing deviates from the optimum zero crossing -- in other words, the zero crossing error. Negative error indicates that the sensed zero crossing occurred prior to the optimum zero crossing; positive error indicates that the sensed zero crossing occurred after the optimum zero crossing. As shown in the graph, the increases and decreases in desired motor speed effected by TEST A and TEST B amount to an adjustment of approximately 4.8%. The increase effected by TEST B amounts to an adjustment of approximately l.6%. These values were chosen so as to maximize stability and motor acceleration during starting, and also to facilitate implementation of the speed adjustments with a digital computer. Prior to the starting of the stepper motor l0, the permanent magnet rotor l2 is stationary and no back-EMF is induced in the stator windings l4a - l4c. To enable starting, desired motor speed is preset to a relatively low starting rotational rate. If forward motor rotation is required, the stepper motor l0 must work against the return spring 64, and the starting speed is initialized at a relatively low value such as 50 steps per second. If reverse motor rotation is required, the return spring 64 aids the stepper motor l0, and the starting speed is initialized at a higher value, such as l00 steps per second. During the starting period when the actual motor speed is less than or equal to the starting speed, all three zero crossing tests A, B, and C are enabled so as to adjust the desired motor speed in accordance with the ability of the stepper motor l0 to accelerate the load. However, the TEST A is inhibited when the motor speed increases above the starting speed. This is because at higher motor speeds, the interrupts, and therefore the zero crossing tests, occur at a relatively high frequency. Under such conditions, large increases in the desired motor speed are both unnecessary and undesirable in terms of stability. The large decreases in desired motor speed effected by TEST C are retained in order to retain the ability of the stepper motor l0 to respond to large increases in the load torque without substantial loss of synchronism. The flow diagrams of Figures 8 - l4 represent computer program instructions executed by the computer based controller 32 in carrying out the control functions of this invention. The flow diagram of Figure 8 represents a main or background program loop which reads the circuit inputs, services the watchdog circuit l20, and determines the desired motor position. The remaining flow diagrams pertain to an interrupt service routine and various subroutines called thereby in response to a timer generated interrupt to update the motor status and to adjust the desired motor speed, if necessary. Referring now more particularly to Figure 8, the reference numeral 200 designates an initialization routine executed at the initiation of each period of vehicle operation for setting various operating parameters and registers to an initial value. For example, the actual motor position register, M-POS-ACT, is set equal to zero; the desired motor speed register, M-SPD-DES, is set equal to the forward starting speed of 50 steps/second; and the interrupt timer is initialized to one-quarter step, based on the starting speed of 50 steps/second. The flow diagram blocks 202 - 206 service the watchdog circuit l20. Decision block 202 directs the reexecution of the initialization block 200 if watchdog circuit l20 signals a reset via line l30. If a reset has not occurred, decision block 204 checks the (watchdog circuit output) line l42 to determine if a voltage transition has occurred. If so, an instruction block 206 is executed to service the watchdog circuit l20 by generating a corresponding voltage transition on the line l40. As described above in reference to Figure 4, such servicing of watchdog circuit l20 prevents the generation of a reset signal on line l30. As instruction block 208 serves to read the various inputs described in reference to Figures l - 5, including the vehicle speed signal N v , the driver operated switch information, and the zero cross detector information. An instruction block 2l0 represents a routine which evaluates the various inputs and determines a desired motor position M-POS-DES for bringing the actual vehicle speed into correspondence with the desired vehicle speed. This algorithm may be fairly conventional and is based, at least in part, on the magnitude and direction of vehicle speed error, and previously determined empirical relationships between throttle position and vehicle accelerating torque. Further detail pertaining to the development of the desired motor position is not given herein, as this invention pertains primarily to the remainder of the control algorithm. Following the execution of instruction block 2l0, the flow diagram blocks 202 -2l0 are reexecuted, as indicated by a flow diagram line 2l2. The flow diagram of Figure 9 broadly sets forth the routine executed by computer based controller 32 in response to the timer generated interrupts. As set forth above, the interrupts occur four times per motor step. At each such occurrence, the stepper motor l0 and timer status is updated, as indicated generally at block 2l4. This function is set forth in greater detail in the flow diagram of Figure l0, as indicated. Thereafter, a decision block 2l6 is executed to determine if the UPDATE SPEED FLAG is set. If so, an instruction block 2l8 is executed to clear the UPDATED SPEED FLAG so that in the next execution of the interrupt service routine, decision block 2l6 will be answered in the negative. In addition, the instruction block 220 is executed to call a subroutine, UPDATE MTR SPD, for updating the motor speed if the stepper motor l0 is running, as determined at decision block 222. The UPDATE MTR SPD subroutine is set forth in greater detail in the flow diagram of Figure ll, as indicated. If the decision block 2l6 is answered in the negative, an instruction block 224 is executed to set the UPDATE SPEED FLAG so that in the next execution of the interrupt service routine, decision block 2l6 will be answered in the affirmative. In addition, an instruction block 226 is executed to call a subroutine, MTR CONTROL, for advancing phase winding energization and performing motor control. The MTR CONTROL subroutine is set forth in greater detail in the flow diagrams of Figures l2 - l4, as indicated. After the appropriate subroutine has been executed, the computer based controller 32 returns to execution of the main or background loop described above in reference to the Figure 8. The flow diagram of Figure l0 is executed at each timer interrupt to update the stepper motor l0 and interrupt timer status, as indicated above in reference to Figure 9. The flow diagram comprises a refresh portion 230 and a timer adjustment portion 232. The refresh portion 230 determines if the stepper motor l0 has been stopped, as indicated by the status of a REFRESH flag. If a decision block 234 determines that the REFRESH flag is not set (motor running), the remainder of the refresh portion 230 is skipped. If the REFRESH flag is set (motor stopped), a decision block 236 is executed to determine if the stepper motor l0 is in the "zero throttle" position -- that is, if the stepper motor l0 is not being subjected to load torque. If the stepper motor l0 is not in the "zero throttle" position, the last energized stator windings are intermittently energized at a relatively low duty cycle in order to develop sufficient holding torque to prevent normal load torque from changing the rotor position. This operation is referred to herein as a refresh function. The duty cycling during the refresh function also avoids excessive power consumption and heat generation. The refresh function is skipped if the stepper motor l0 is in its "zero throttle" position. If the REFRESH flag is set and the stepper motor l0 is holding the engine throttle 62 at a position other than its rest position, a decision block 238 is executed to determine if all of the stator windings l4a - l4c have been deenergized. If so, an instruction block 240 is executed to energize the appropriate stator winding l4a - l4c for a predetermined interval t, and to update a motor status indicator accordingly. If the REFRESH flag is set and the stepper motor l0 is in the "zero throttle position", an instruction block 242 is executed to deenergize the stator windings l4a - l4c, and to update the motor status indicator accordingly. In addition, an instruction block 244 is executed to deenergize the solenoid coil 66 to disengage the servo clutch if a vehicle overspeed condition is detected at decision block 246. The timer adjustment portion 323 comprises instruction blocks 248 - 252. The instruction blocks 248 and 252 serve to temporarily interrupt the servicing of further timer interrupts while the instruction block 250 is executed to update the interrupt timer, INT-TIMER. As indicated at instruction block 250, the interval timed by the INT-TIMER is determined according to the difference between a BASE TIME and a time, TIME des , related to the desired motor speed, M-SPD-DES so that the interrupt frequency varies in direct relation to the desired motor speed, M-SPD-DES. As indicated above, the timer interrupts occur four times per motor step. In response to the first and third such interrupts, the computer based controller 32 executes the UPDATE MTR SPD subroutine of Figure ll to update the desired motor speed term, M-SPD-DES. In response to the second and fourth such interrupts, the computer based controller 32 executes the MTR CONTROL subroutine of Figures l2 - l4 to appropriately energize the stator windings l4a - l4c. Referring by way of example to Figure 6, the first through fourth interrupts for the motor step designated by the interval t₂ - t₄ occur at times t I1 - t I4 , respectively. In response to the first interrupt at time t I1 , the UPDATE MTR SPD subroutine is executed to evaluate the TEST C as described above in reference to Figure 6 and below in reference to Figure ll. In response to the second interrupt at time t I2 , the MTR CONTROL subroutine is executed to determine if a back-EMF zero crossing has occurred in stator winding l4c (for upcoming TEST A), and to deenergize stator winding l4a. In response to the third interrupt at time t I3 , the UPDATE MTR SPD subroutine is executed to evaluate the TESTS A and B (depending on motor speed) as described above in reference to Figure 6 and below in reference to Figure ll. In response to the fourth interrupt at time t I4 , the MTR CONTROL subroutine is executed to determine if a back-EMF zero crossing has occurred in stator winding l4c (for upcoming TEST C), and to energize the stator winding l4c. Referring now more particularly to the UPDATE MTR SPD subroutine of Figure ll, a decision block 260 is first executed to determine if just one stator winding is enabled. This may be determined from the motor status indicator referred to above. In the first subroutine execution per motor step, the decision block 260 is answered in the negative, because two stator windings will be on. This may be seen in reference to the Graphs A - C of Figure 6. At such point, an instruction block 262 is executed to compute a proportional adjustment term, ZX TIME, as a function of the desired motor speed, M-SPD-DES. In the illustrated embodiment, the terms ZX TIME has a value of approximately l.6% of the desired motor speed as indicated above in reference to Figure 7. Thereafter, a decision block 264 is executed to determine if a back-EMF zero crossing occurred prior to the energization of the most recently energized stator winding. This is determined by the status of a ZX flag, such flag being set or reset by the MTR CONTROL subroutine described below. If the ZX flag is set, a zero crossing has occurred, and the computer based controller 32 returns to the interrupt service routine of Figure 9 without making a desired motor speed adjustment. If the ZX flag is not set, no zero crossing occurred, and instruction block 266 is executed to effect a relatively large decrease in the desired motor speed according to the expression: M-SPD-DES = M-SPD-DES - (3 * ZX TIME) In the illustrated embodiment wherein the term ZX TIME has a value of approximately l.6% of the desired motor speed, the TEST C thereby effects a desired motor speed decrease of approximately 4.8%. When the UPDATE MTR SPD subroutine is subsequently executed in the given motor step, the decision block 260 is answered in the affirmative as only one phase winding will be enabled. This signals the evaluation of TEST A and/or TEST B. If the motor speed is less than or equal to the forward starting speed (50 steps per second in the illustrated embodiment) as determined at decision block 268, both TEST A and TEST B are evaluated. If the motor speed is greater than the starting speed, the evaluation of TEST A is inhibited, and only TEST B is evaluated. The evaluation of TEST A involves a determination as to whether a back-EMF zero crossing occurred in the stator winding about to be enabled prior to the last timer interrupt. This determination is made by decision block 270, which checks the status of the ZX flag. As indicated above, the ZX flag is set or reset by the MTR CONTROL subroutine in response to a prior timer interrupt. If a zero crossing did occur before the last timer interrupt, the motor speed is much too slow, and an instruction block 272 is executed to effect a relatively large increase in the desired motor speed according to the expression: M-SPD-DES = M-SPD-DES + (3 * ZX TIME) In the illustrated embodiment where the term ZX TIME has a value of approximately l.6% of the desired motor speed, the TEST A thereby effects a desired motor speed increase of approximately 4.8%. If the decision block 270 is answered in the negative, the execution of instruction block 272 is skipped as indicated by flow diagram line 274, and the computer based controller 32 proceeds to evaluate TEST B. As with TEST A, TEST B involves a determination as to whether a back-EMF zero crossing has occurred in the stator winding about to be enabled. However, the TEST B is concerned with whether the zero crossing has occurred in the interval since the last timer interrupt. This formation is not indicated by the status of the ZX flag. Rather, the instruction block 276 and decision block 278 are executed to read the zero crossing inputs supplied to computer based controller 32 by the appropriate phase driver 22 - 26, and to direct the execution of instruction block 280 if a zero crossing occurred. The instruction block 280 operates to increase the desired motor speed by a relatively small amount according to the expression: M-SPD-DES = M-SPD-DES + ZX TIME In the illustrated embodiment wherein the term ZX TIME has a value of approximately l.6% of the desired motor speed, the TEST B thereby effects a desired motor speed increase of approximately l.6%. If a zero crossing did not occur, the execution of instruction block 280 is skipped, as indicated by the flow diagram line 282. The MTR CONTROL subroutine depicted by the flow diagrams of Figures l2 - l4 serves primarily to appropriately energize the stator windings l4a - l4c and the solenoid coil 66, and to check for the occurrence of back-EMF zero crossings. Figure l2 relates primarily to clutch control logic; Figure l3 relates primarily to motor starting logic; and Figure l4 relates primarily to motor control, zero crossing detection and status updating. As indicated above in reference to the interrupt service routine of Figure 9, the MTR CONTROL subroutine is executed twice per motor step, at alternate timer interrupts. The flow diagram of Figure l2 includes logic for engaging and disengaging the control of engine throttle 62. The CRUISE flag is set or reset by the background program of Figure 8 in accordance with status of the ON/OFF, Brake, S/C and R/A switches 72, 78, 84 and 90 respectively to indicate whether vehicle speed control is active. If vehicle speed control is active, a decision block 290 is answered in the affirmative, and an instruction block 292 is executed to light the driver indicator lamp l90. Then, a decision block 294 is executed to determine if the clutch of reduction gearset and clutch assembly 60 has been engaged for at least a hold period, as indicated by the status of the CLUTCH flag. If so, the computer based controller 32 proceeds to the motor starting logic of Figure l3, as indicated by flow diagram line 296. If the clutch has not been engaged for at least a hold period, instruction blocks 298 - 300 are executed to energize the solenoid coil 66 and to decrement a count previously stored in a timer referred to herein as CLUTCH HOLD TIMER. Until the count in CLUTCH HOLD TIMER is decremented to zero, as determined by decision block 302, the computer based controller 32 is returned to the interrupt service routine of Figure 9. When the interval counted by the CLUTCH HOLD TIMER has elapsed, an instruction block 304 is executed to reset the HOLD flag and to set the CLUTCH flag, indicating that the clutch has been engaged for at least the hold period. Thereafter, the computer based controller 32 is returned to the interrupt service routine, and the subroutine does not enable stator winding energization. If vehicle speed control is not active, the decision block 290 is answered in the negative, and instruction block 306 is executed to extinguish the driver indicator lamp l90. If the stepper motor l0 is off (no stator windings enabled), as determined at decision block 308, the engine throttle 62 has been released, and computer based controller 32 is returned to the interrupt service routine. If the stepper motor l0 is on, the instruction block 3l0 and the decision block 3l2 are executed to set the desired motor position, M-POS-DES, to zero, and to determine if the stepper motor has actually returned to the "zero throttle" position. If so, instruction blocks 3l4 -3l6 are executed to disable the stator windings l4a -l4c and the solenoid coil 66, to set a RUN FORWARD flag, to store a predetermined count in a MOTOR HOLD TIMER, and to set a MOTOR HOLD flag. As described below, the MOTOR HOLD TIMER is used to prevent motor operation for a predetermined interval any time the motor direction of rotation is reserved, and the HOLD flag indicates whether the hold mode is in effect. If the stepper motor l0 has not yet attained the "zero throttle" position, the computer based controller 32 proceeds to the motor starting logic of Figure l3, as indicated by flow diagram line 3l8. As indicated above, the flow diagram of Figure l3 relates primarily to motor starting logic. Decision block 320 is first executed to determine if the stepper motor l0 is in the hold mode, as indicated by the status of the HOLD flag. As explained in reference to Figure l2, the MOTOR HOLD TIMER is initialized to a predetermined count whenever the desired direction of motor rotation is reversed. If the hold mode is in effect, decision block 320 is answered in the affirmative, and an instruction block 322 is executed to decrement the MOTOR HOLD TIMER. When the MOTOR HOLD TIMER has been decremented to zero, as determined by a decision block 324, an instruction block 326 is executed to cleat the HOLD flag. Thereafter, the computer based controller 32 is returned to the interrupt service routine of Figure 9. If the stepper motor l0 is not in the hold mode, decision block 320 is answered in the negative, and a decision block 328 is executed to determine if the actual motor position (M-POS-ACT) is equal to the desired motor position (M-POS-DES). If so, decision block 330 is executed to determine if the stepper motor l0 is running. If the stepper motor l0 is not running, instruction block 332 is executed to set the REFRESH flag so that the refresh portion 230 of the interrupt service routine (Figure l0) will be activated in response to the next timer interrupt. As described above, the refresh routine serves to duty cycle the last enabled stator windings for developing holding torque which maintains the position of engine throttle 62. If the stepper motor l0 is running, an instruction block 334 is executed to set the desired motor speed M-SPD-DES equal to the forward starting speed of 50 steps per second for slowing the stepper motor l0 to a stop, to initialize the MOTOR HOLD TIMER, and to set the HOLD flag. Thereafter, the instruction and decision blocks 322 - 326 are executed to time the hold interval as described above. If it is determined at decision block 328 that the actual motor position does not correspond with the desired motor position, an instruction block 336 is executed to clear the REFRESH flag, and the decision block 338 is executed to determine the required direction of motor rotation. If the actual position is less than the desired position, the stepper motor l0 must be operated in the forward direction to open engine throttle 62. If the actual position is greater than the desired position, the stepper motor l0 must be operated in the reverse direction to close engine throttle 62. If motor operation in the forward direction is required, a decision block 340 is executed to determine if the stepper motor l0 is running. If the stepper motor l0 is not running, the instruction blocks 342 - 344 are executed to initialize the desired motor speed M-SPD-DES at the forward starting speed of 50 steps per second, and to set FORWARD RUN flag before proceeding to the flow diagram of Figure l4. If the stepper motor l0 is running and the FORWARD RUN flag is set, as determined at decision block 346, the stepper motor is operating in the correct direction and the computer based controller 32 proceeds to the flow diagram of Figure l4. If the FORWARD RUN flag is not set, the stepper motor l0 is operating in the wrong direction, and an instruction block 348 is executed to clear the FORWARD RUN flag. Then, the instruction and decision blocks 334 and 322 - 326 are executed as indicated by the circled letter B to stop the stepper motor l0 and initiate a motor hold mode. If the motor operation in the reverse direction is required, a decision block 350 is executed to determine if the stepper motor l0 is running. If the stepper motor l0 is not running, instruction blocks 352 - 354 are executed to initialize the desired motor speed M-SPD-DES at the reverse starting speed of l00 steps per second, and to clear the FORWARD RUN flag before proceeding to the flow diagram of Figure l4. If the stepper motor l0 is running and the FORWARD RUN flag is not set, as determined at decision block 356, the stepper motor is operating in the correct direction and computer based controller 32 proceeds to the flow diagram of Figure l4. If the FORWARD RUN flag is set, the stepper motor l0 is operating in the wrong direction, and an instruction block 358 is executed to set the FORWARD RUN flag. Then, the instruction and decision blocks 334 and 322 - 326 are executed as indicated by the circled letter B to stop the stepper motor l0 and initiate a motor hold mode. The flow diagram of Figure l4 includes a zero crossing detection portion 360, a stator winding energization portion 362, and a motor status portion 364. The zero crossing detection portion includes the instruction and decision blocks 366 - 372, and serves to read the zero crossing inputs supplied by phase drivers 22 - 26, to set the ZX flag if a back-EMF zero crossing occurred, and to reset the ZX flag if no zero crossing occurred. The stator winding energization portion 362 includes the instruction blocks 374 - 378, and serves to select the stator windings to be energized based on previously stored look-up table information, and to suitably control the phase drivers 22 - 26. The motor status portion 364 includes the instruction and decision blocks 380 - 388, and serves to update the actual motor position indicator, M-POS-ACT, in accordance with the new winding energization. If the FORWARD RUN flag is set (as determined at decision block 380), and the term M-POS-ACT indicates a position less than an upper limit position MAX (as determined at decision block 382), the instruction block 384 is executed to increment M-POS-ACT. Similarly, if the FORWARD RUN flag is not set, and the term M-POS-ACT indicates a position greater than a lower limit position MIN (as determined at decision block 386), the instruction block 388 is executed to decrement M-POS-ACT. Thereafter, the computer based controller 32 is returned to the interrupt service routine of Figure 9. In the manner described above, the motor speed is adaptively adjusted in accordance with load torque variations so as to maximize the motor speed (and therefore the speed of response of the throttle operator) while retaining the ability to respond to some load torque variation without loss of synchronism. The speed adjustments are made both during starting and running operation so as to accelerate the stepper motor l0 to its steady state running speed as fast as the load torque will permit without loss of synchronism. As indicated above, this invention has been described herein in reference to the illustrated embodiment wherein timed interrupts occur in synchronism with the motor operation, and the zero crossing error is evaluated at discrete intervals defined by the interrupts for effecting a motor speed adjustment if necessary. As also indicated above, the adaptive speed adjustment of this invention may be carried out with a circuit wherein interrupts occur in response to the detection of back-EMF zero crossings. In such a circuit the zero crossing error is determined at each such interrupt, and a speed adjustment is effected in proportion thereto.

Claims: A method of operation of an electrical servo apparatus for positioning a mechanical load (62), the electrical servo apparatus including a stepper motor (l0) having a plurality of stator windings (l4a - l4c) adapted to be energized in predetermined sequence to develop a rotating stator magnetic field, a permanent magnet rotor (l2) drivingly connected to the mechanical load and having a magnetic field which tends to rotate in synchronism with the rotating stator magnetic field, and a computer based controller (32) for sequentially energizing the stator windings at a rate determined in accordance with a motor speed command to rotatably drive the permanent magnet rotor for positioning the mechanical load in accordance with a position command, the method of operation being characterised by the steps of: initializing the motor speed command to a predetermined starting rate at the initiation of motor operation; and thereafter during the energization of each stator winding, detecting when the back-EMF voltage in the stator winding about to be energized crosses a reference voltage, the point in time at which such crossing occurs being related to the degree of misalignment between the magnetic fields of the permanent magnet rotor and stator winding; determining a motor speed correction in relation to the amount by which the detected crossing point deviates from a desired crossing point corresponding to an empirically derived amount of misalignment which permits the stepper motor to withstand a predetermined level of variation in the torque which opposes motor rotation without substantial loss of synchronism between the rotor and stator magnetic fields; and adjusting the motor speed command in relation to said motor speed correction so as to drive the actual crossing point into correspondence with the desired crossing point, whereby the motor speed is adaptively controlled in accordance with the torque it must overcome, and the motor speed is maximized for reliable operation under all load conditions. A method as claimed in Claim l, wherein said predetermined level of variation in the torque which opposes motor rotation is determined in relation to the speed of response of the motor speed command adjustments. A method as claimed in Claim l or Claim 2, wherein the mechanical load comprises the engine throttle (62) of a vehicle engine and a return spring (64) which biases the engine throttle to a closed position, and wherein the step of initializing the motor speed command at the initiation of motor operation includes the steps of: setting the motor speed command at a minimum, relatively low value when the stepper motor (l0) is stopped and the error between the commanded and actual throttle positions requires that the stepper motor effects a throttle adjustment which opposes the bias of the return spring; and setting the motor speed command at a minimum, relatively high value when the stepper motor is stopped and the error between the commanded and actual throttle positions requires that the stepper motor effect a throttle adjustment which aids the bias of the return spring. A method as claimed in Claim l, wherein the mechanical load is the engine throttle (62) of a motor vehicle engine, and the position command represents a throttle position for bringing the actual speed of the motor vehicle into correspondence with a desired speed. A method as claimed in any one of Claims l-4, wherein the stator windings (l4a - l4c) are connected in a WYE configuration, and wherein detecting the crossing of the back-EMF voltage includes the steps of: defining a reference voltage in relation to the voltage at the common point of the stator winding configuration; and comparing the stator winding back-EMF voltage with said reference voltage to detect its coincidence therewith. An electrical servo apparatus for positioning a mechanical load (62), the electrical servo apparatus including a stepper motor (l0) having a plurality of stator windings (l4a - l4c) adapted to be energized in predetermined sequence to develop a stator magnetic field which rotates step-by-step, a permanent magnet rotor (l2) drivingly connected to the mechanical load and having a magnetic field which tends to rotate in synchronism with the rotating stator magnetic field, and a computer based controller (32) for sequentially energizing the stator windings at a rate determined in accordance with a motor speed command to rotatably drive the permanent magnet rotor for positioning the mechanical load in accordance with a position command, the electrical servo apparatus being characterised by back-EMF detection means for detecting when the back-EMF voltages in the various stator windings crosses a reference voltage, the point in time at which such crossing occurs being related to the degree of misalignment between the magnetic fields of the permanent magnet rotor and stator windings; and means including controller means activated a predetermined number of times in each motor step, such means being effective when activated to determine whether a back-EMF neutral voltage crossing has been detected by said back-EMF detection means, and to adjust the motor speed command in accordance with the result of said determination so that following the adjustment, the back-EMF neutral voltage crossing of a stator winding about to be energized will tend to occur at a desired point in the motor step defined by the preceding stator winding energization, said desired point corresponding to an empirically derived amount of misalignment which permits the stepper motor to withstand a predetermined level of variation in the torque which opposes motor rotation without substantial loss of synchronism between the rotor and stator magnetic fields, whereby the motor speed is adaptively controlled in accordance with the torque it must overcome, and the motor speed is maximised for reliable operation under all load conditions. Electrical servo apparatus as claimed in Claim 6, wherein the magnitude of correction is scheduled in relation to the deviation of the detected point of back-EMF neutral voltage crossing from the desired point. Electrical servo apparatus as claimed in Claim 6 or Claim 7, wherein the controller means is activated in response to a scheduled interrupt a predetermined number of times per motor step to define a predetermined number of substantially equal duration motor step intervals, and wherein the onset of one such motor step interval substantially coincides with the desired point of back-EMF neutral voltage crossing of the stator winding (l4a - l4c) about to be energized. Electrical servo apparatus as claimed in Claim 8, wherein the controller means is effective in a motor step interval preceding said one motor step interval to increase the motor speed command if a back-EMF neutral voltage crossing for the stator winding (l4a - l4c) about to be energized has already been detected by said back-EMF detection means. Electrical servo apparatus as claimed in Claim 8, wherein the controller means is effective in a motor step interval following said one motor step interval to decrease the motor speed command if a back-EMF neutral voltage crossing for the stator winding (l4a - l4c) about to be energized has not yet been detected by said back-EMF detection means.

Inventors: HOCKEN, LARRY ROBERT, NEHMER, CARL ALBERT
Applicants: GENERAL MOTORS CORPORATION
Application year: 1987
Main classification: H02P8
IPC codes: H02P8, F02D11, F02D9, F02D41