Abstract:
A digitally controlled motor drive system using a pulse width modulated motor drive receives a desired motor velocity signal and an actual motor velocity signal and it provides a corresponding velocity error signal. The velocity error signal is adjusted in response to a change in the value of a power voltage supplied to the motor. The velocity error signal may be compensated for back electromotive force and/or for static friction in the motor, if desired. The system is simple, reliable and cost effective.

Description:
The invention relates to a digitally controlled motor drive system and method, and more particularly to such systems utilizing a pulse width modulated motor drive. 
     Prior art analog motor drive systems are known to utilize feedback servo loops for sensing the actual motor velocity and adjusting the current supplied to the motor to obtain a desired velocity. One type of these servo loops generally utilizes a motor drive amplifier including an error signal amplifier and a pulse width modulator (PWM). The error signal amplifier receives an error signal which is determined as a difference signal between the desired and actual motor velocity and applies an amplified error signal to the pulse width modulator. The pulse width modulator generates output pulses of a variable width proportional to the magnitude of the amplified error signal. When the magnitude of the power voltage supplied to the motor changes, it causes a change in the servo loop gain. To assure a corresponding change in the feedback signal magnitude, the error signal amplifier must have a relatively high gain. The foregoing requirements contribute to the complexity of the known motor drive systems. Consequently, these known systems are expensive to manufacture and have reduced reliability. 
     In addition, when substantial changes occur in motor resistance, back electromotive force (EMF) or power supply voltage, components of the known system often have to be replaced to accommodate the changes. 
     The present invention overcomes the above-indicated disadvantages of the known analog motor drive systems as it is summarized below. The motor drive system of the invention utilizes a digitally controlled servo having an open loop portion and a closed loop portion of the motor control. The open loop detects an actual amplitude of the power voltage supplied to the motor. The closed loop detects the actual velocity of the motor. A digital motor drive controller receives a first input signal indicating a desired velocity of the motor. The controller also receives a second and a third input signal from the open loop and closed loop, respectively. The controller generates an error signal which is determined from a difference between a desired and actual motor velocity. The controller adjusts the error signal to compensate for any changes in the power supply voltage from a nominal value thereof. 
     The controller may also adjust the error signal to compensate for back EMF by estimating its value from the actual motor velocity. 
     In addition, the controller may adjust the error signal to compensate for mechanical friction in the motor which value generally changes for different motors. 
     In the preferred embodiment of the invention the controller is implemented by a microprocessor which is programmed to calculate the adjusted error signal from its respective input signal values. The power supply voltage is sampled at a constant frequency, for example at 60 samples per second. The obtained samples are compared with a nominal voltage value and a correction factor is calculated accordingly. The microprocessor applies the adjusted error signal to a digital pulse width modulator which in turn applies controlled width pulses to drive the motor. 
     It is seen from the foregoing description that the system of the invention eliminates the complex motor drive amplifier design of prior art motor drive systems. At the same time it compensates for power supply voltage changes thereby adapting the circuit to these changes. It also compensates for back EMF and mechanical friction in the motor. The system of the invention is thus simplified, reliable and cost effective. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a simplified block diagram illustrating the preferred embodiment of the invention. 
     FIG. 2 is a more detailed block diagram of a preferred embodiment of the invention. 
     FIG. 3 is a flow chart illustrating the operation of the open loop portion of the preferred embodiment. 
    
    
     DETAILED DESCRIPTION 
     The invention will now be described with reference to the block diagram of FIG. 1, followed by the description of the diagram of FIG. 2. To facilitate comparison corresponding elements in the figures will be designated by like reference numerals. 
     In FIG. 1 a D.C. motor 10 receives via line 12 a D.C. supply voltage having a nominal value V NOM  from a power supply voltage source (not shown). That voltage value is applied via line 14 to an input 16 of a controller 18. The voltage on line 14 represents an actual or measured voltage value V M , which may differ from the nominal voltage V NOM , as it will be described below. 
     The controller 18 also receives at an input 20 a desired motor velocity value S D  via line 22. At a further input 24 the controller 18 receives via line 26 an actual or measured motor velocity value S A  which may be determined for example from the number of motor rotations per minute (RPM) utilizing a tachometer as shown at 27 or by other well known means. 
     From the above-described input signals S D , S A , and V M  the controller 18 determines a velocity error voltage value E O  as being proportional to a difference between the desired and actual motor velocity corresponding to a desired torque that is, E O  =(S D  -S A ). In accordance with a particular feature of the invention the actual power supply voltage is measured and a correction factor K F  is calculated as a ratio of a nominal and an actual power supply voltage value K F  =V NOM  /V M . The error voltage E O  is multiplied by the correction factor to obtain an adjusted error signal E&#39; O  =E O  K F . In a basic form of the invention the thusly adjusted error signal E O  &#39; is applied to a motor drive signal generator 30, preferably implemented by a pulse width modulator which in turn applies corresponding drive pulses to the motor. 
     In a more advanced form of the invention an estimated back EMF value is calculated by the controller 18 as being proportional to the received actual motor velocity value. The thusly estimated back EMF value is added to the error signal and the sum of these signals is adjusted by the correction factor prior to being applied to the pulse width modulator 30. 
     In a still more advanced form of the invention an offset signal value compensating for static friction in the motor is added to the above sum by the controller 18, prior to being adjusted by the correction factor. The resulting thusly compensated error signal value is then adjusted by the correction factor, prior to being applied to the pulse width modulator 30. 
     The pulse width modulator 30 generates pulses of a variable width which are applied via line 32 as a drive signal to switch on and off the power voltage on line 12 applied to the windings of the D.C. motor 10 in a known manner. 
     It is seen from the foregoing description that the motor drive circuit of the invention is greatly simplified when comparing to prior art circuits. The digitally controlled motor drive of the invention automatically adapts the circuit operation to changes in the power supply voltage to obtain a desired motor velocity. 
     Now the preferred embodiment of the invention will be described with reference to FIGS. 2 and 3. As it is seen from FIG. 2, the controller 18 of FIG. 1 is preferably implemented by a microprocessor, for example type 68000 manufactured by Motorola Corporation. The pulse width modulator 30 of FIG. 1 preferably comprises a presettable counter 40, a D flip-flop 42, a series resistor 43 and a switching power transistor 44. The counter 40, for example implemented by a commercially available presettable down counter receives a preset signal via line 49 which is also utilized as a set signal for flip-flop 42. The counter 40 receives a clock signal via line 50. A reset signal is applied from counter 40 via line 51 to the clock input of the flip-flop 42. The output signal from the Q-output of the flip-flop 42 is applied via line 52 and a series resistor 43 to the base of a power transistor 44. The emitter of the power transistor 44 is grounded. Its collector is connected via line 32 to one terminal of the motor winding having its second, opposite terminal connected via line 12 to the power voltage supply as previously described. A diode 48 is coupled via line 16 in parallel with the motor winding. 
     In a basic form of the invention the microprocessor 18 is programmed to calculate an adjusted error voltage E O  &#39; as it is described by the following equation: 
     
         E.sub.O &#39;=E.sub.O K.sub.F =K.sub.1 (S.sub.D -S.sub.A)(V.sub.NOM /V.sub.M)(1) 
    
     where 
     K 1  is a constant corresponding to a servo performance factor selected to obtain a desired servo bandwidth as well known in the art; 
     S D  is a desired motor velocity applied to input 20; 
     S A  is an actual motor velocity applied to input 24; 
     V NOM  is a nominal value of the power supply voltage; and 
     V M  is an actual measured value of the power supply voltage. 
     It is seen from equation (1) that the adjusted error voltage E O  &#39; is proportional to the product of the velocity error voltage E O  K 1  (S D  -S A ) and the previously described correction factor K F  =V NOM  /V M . 
     The value E O  &#39; calculated in accordance with equation (1) is applied to the output lines 28 from the microprocessor 18 as an 8-bit parallel digital word. The value of the digital signal on line 28 is proportional to a pulse width provided by the pulse width modulator 30, as it will be described later. The resulting average voltage supplied to the motor 10 on line 32 is proportional to the pulse width multiplied by the value V M . 
     In a more advanced form of the invention the microprocessor is programmed to calculate an adjuster error voltage E O  &#39; as follows: 
     
         E.sub.O &#39;=(E.sub.O +K.sub.2 S.sub.A)K.sub.F =[K.sub.1 (S.sub.D -S.sub.A)+K.sub.2 S.sub.A ](V.sub.NOM /V.sub.M)           (2) 
    
     where K 2  is a well known back EMF constant which varies for different motors. As well known, the back EMF is directly proportional to the actual motor velocity. K 2  S A  thus represents an approximated value compensating for the back EMF value. 
     In a still more advanced form of the invention the microprocessor is programmed to further compensate the error voltage defined by equation (2) for static friction in the motor and/or dead band in the pulse width modulator. This static friction which generally changes from motor to motor is obtained as follows. The power supply voltage on line 12 to the motor is turned off and the motor is stopped. Then the value of E O  &#39; on lines 28 is slowly increased and in the instant when the motor is starting to move the value E O  &#39; is detected. That detected value is proportional to a minimum voltage value which is necessary to overcome the static friction in the motor. 
     In this instance the adjusted error voltage value is calculated by the microprocessor 18 as follows: 
     
         E.sub.O &#39;=[K.sub.1 (S.sub.D -S.sub.A)+K.sub.2 S.sub.A +K.sub.3 S.sub.F ](V.sub.NOM /V.sub.M)                                     (3) 
    
     where K 3  S F  is equal to E O  &#39; at V M  =V NOM . 
     It follows from the foregoing description that the microprocessor calculates the adjusted error voltage E O  &#39; in accordance with one of the equations (1) to (3). The flow chart of FIG. 3 shows the steps utilized to determine the values E O  &#39; in accordance with equation (1) as follows. 
     As indicated by block 60 of FIG. 3, the microprocessor 18 reads the measured voltage value V M  applied on line 14. As shown in block 62, it calculates the correction factor K F  as a ratio of the nominal voltage V NOM  to the measured voltage value V M . Block 64 determines whether a previously calculated velocity error voltage value E O  is greater than a predetermined maximum value E OMAX  which is set for example to limit the maximum voltage supplied to the motor. If E O  is greater than E OMAX  than E O  is limited to E OMAX  is block 66. As shown in block 68 the adjusted error voltage value E O  &#39; is calculated by multiplying the value E O  by K F . Box 70 determines whether E O  &#39; calculated in box 68 is greater than a predetermined maximum value thereof. That maximum value is set for example to prevent an overflow of the counter 40 as it will follow from further description. If E O  &#39; is greater than E&#39; OMAX , then E O  &#39; is limited to the value of E&#39; OMAX  in block 72. The thusly determined value E O  &#39; is provided as an output signal on lines 28 of FIG. 2 from the microprocessor 28, as it is indicated by block 74 in FIG. 3. 
     In case the adjusted error voltage value E O  &#39; is determined from the equation (2), the flow chart of FIG. 2 may be utilized as above described with the exception that the value E O  in blocks 64 and 68 is replaced by a value (E O  +K 2  S A ). This latter value corresponds to the velocity error voltage compensated for the back EMF value, as previously described. 
     Analogously, the flow chart of FIG. 3 may be used also for determining the value E O  &#39; from equation (3). In that case the E O  in blocks 64 and 68 will be replaced by the value (E O  +K 2  S A  +K 3  S F ), which value corresponds to the velocity error voltage compensated for both the back EMF and static friction in the motor, as previously described. 
     It will be understood that the other calculations indicated in equations (1) to (3) include subtraction of input the signals (S D  -S A ), multiplication by various coefficients and addition of thusly obtained partial values. Because of the similarity of flow charts depicting operation in accordance with equations (2) or (3) to the previously described flow chart of FIG. 3, additional flow charts are not shown. 
     The adjusted error voltage E O  &#39; from the microprocessor 18 is applied as an 8-bit parallel number on lines 28 to the down counter 40. The counter is present to the number on line 28 by a preset signal via line 49, which preset signal also sets the flip-flop 42. In the preferred embodiment the frequency of the present signal is selected F PR  =16 KHZ. A clock signal on line 50 is applied to the counter 40. The clock signal has a substantially higher frequency F CLK  than the frequency of the preset signal to obtain a desired high resolution from the pulse width modulator as it will follow from further description. In the preferred embodiment F CLK  =F PR  /256. After presetting the counter 40 to the number on line 28, it counts down at the clock signal frequency F CLK . When the count reaches zero, the flip-flop 42 is reset via line 51. Thus the output signal from the Q output of D flip-flop 42 on line 52 is set high at the time of occurrence of the preset signal on line 49 and remains high until the counter 40 reaches zero and the flip-flop 42 is reset. The thusly obtained pulses on line 52 have a width proportional to the signal E O  &#39; on line 28 and a frequency equal to F PR . The signal on line 52 is a drive signal applied to the motor 10, as it will be described below. 
     The drive signal on line 52 controls via the series resistor 43 the on/off switching time of the power transistor 44. Thus when the drive signal is high, the switching transistor 44 is on and the power voltage is supplied via line 12 to the motor winding. When the signal on line 52 is low, the transistor 44 is off and the power voltage is not applied. To maintain a low inductance of the motor winding in both on and off states, a power diode 48 is connected to the voltage source in parallel with the motor winding to provide a path for inductive current when the transistor 44 is turned off. 
     While the preferred embodiment has been described with reference to a direct current motor, the invention may also be utilized to drive A.C. motors having a different type of motor drive signal generating circuit.