SERVO DRIVING UNIT

Abstract: A servo driving unit enables the use of hardware in common within various control modes by changing the program controlling a processor in accordance with the control mode. A processor (108a) in an operational control unit (108) selects various control programs from a program memory (108b) in answer to commands from an interface circuit (108d), and prepares an inverter driving command from an armature current detection value input from an AD converter (108f) and a rotational angle detection value input from a counter (108g). The inverter driving command is output to a timer circuit (114) through an input/output port (108e), and controls an inverter (115) so that it varies a current driving a servo motor (101).

Description: The present invention relates to a servomotor drive unit for servo-controlling a servomotor, and more particularly to a servomotor drive unit employing a microprocessor capable of controlling the servomotor. Such a drive unit is shown in EP 0 070 654 which describes a servomotor drive unit of a fixed configuration and using position and velocity commands. Servomotors are widely used for moving and positioning objects in prescribed locations. For driving the servomotor, a servomotor drive circuit is required for servo-controlling the servomotor with a command from a numerical control apparatus or the like and a feedback signal indicative of a condition of the servomotor. A servomotor control system is illustrated in the block diagram of Fig. 1 of the accompanying drawings. The servomotor control system receives a positional command PCMD from the numerical control apparatus or the like, and feeds back rotational pulses (pulses which are generated each time a servomotor 101 is angularly moved a prescribed angle) PC from a rotary encoder coupled to the shaft of the servomotor 101, and an armature current i flowing through the servomotor 101 for controlling a position, a speed, and a current. More specifically, the servomotor control system has an arithmetic unit 104 for calculating the difference between the positional command PCMD and the rotational pulses PC, and executes a prescribed positional loop calculation with a positional loop arithmetic unit 105 based on the calculated difference to issue a speed command VCMD. Then, the servomotor control system detects an actual speed Va of the servomotor 101 with a speed detection arithmetic unit 103 from a period of the rotational pulses PC. The difference between the speed command VCMD and the actual speed Va is calculated by an arithmetic unit 106, and a prescribed speed loop calculation is executed by a speed loop arithmetic unit 107 based on the calculated difference to produce a current command ICMD. Then, the difference between an actual current of the servomotor 101 and the current command ICMD is calculated by an arithmetic unit 109, and a prescribed current loop calculation is executed by a current loop arithmetic unit 110 based on the calculated difference to produce an inverter drive signal. An inverter 115 which is a power amplifier amplifies the inverter drive signal into a prescribed armature current and supplies the armature current to the servomotor 101. The servomotor 101 is thus servo-controlled, and such servo-control requires positional loop control, speed loop control, and current loop control. The servomotors are used in a variety of applications. Various modes of controlling the servomotors have been developed to meet required functions of devices in which they are incorporated, and are becoming complex. For example, the mode of controlling a controlled object to move toward a target position is different from the mode of controlling the path and speed of an object while it moves toward a target position. Fig. 2 is a block diagram illustrative of a control mode in which a positional control loop and a speed control loop are combined. In the illustrated control mode, a positional command PCMD is differentiated by a differentiator 111b to produce a speed command, the difference between the speed command and an actual speed is calculated by an arithmetic unit 106, the calculated difference is multiplied by a speed gain Kv with a multiplier 11c, and the product is applied to an adder 111e. The difference between the positional command PCMD and rotational pulses PC is calculated by an arithmetic unit 104, the calculated difference is multiplied by a positional gain Kp with a multiplier 111d, and the product is applied to the adder 111e. The adder 111e is also supplied with an acceleration produced by twice differentiating the positional command PCMD with a differentiator 111a. Therefore, the adder 111e adds the positional command, the speed command, and the acceleration command to produce a current command ICMD. The above control mode enables the object to follow a desired path accurately with a small error, and is suitable for application to robotics. Where various control modes are present, however, it is difficult to employ servomotor drive units of the same hardware construction, and servomotor drive units of different hardware constructions matching desired control modes have to be used. Furthermore, servo-control required by a servomotor drive unit may be only current loop control, or current and speed loop control, or current, speed, and positional loop control. This also makes it difficult to share one servomotor drive unit with different control modes. The servomotor drive units have therefore been difficult to mass-produce, and could not be manufactured less costly. Accordingly, it is an object of the present invention to provide a servomotor drive unit having a hardware arrangement sharable by various control modes. Disclosure of the Invention According to the present invention, there is provided a servomotor drive unit including a voltage supply circuit for supplying an armature voltage to a servomotor, a current detector for detecting the armature current in the servomotor, a rotational angle detector for detecting the rotational angle of the servomotor, and an arithmetic controller having a memory for storing a motor control program, an interface circuit for receiving external commands, and a processor connected to the rotational angle detector and responsive to commands supplied from the said interface circuit for executing the motor control program to control the current supplied from said voltage supply circuit, characterised in that the current detector is likewise connected to the processor and the arrangement is such that the servomotor drive unit can follow any of a positional command, a speed command, and a current command received through the said interface circuit, by virtue of a motor control program which is stored in the memory for carrying out by the processor, the program defining a predetermined series of processor steps which is: such as to enable the servomotor drive unit to follow said positional command; such as to enable the servomotor drive unit to follow said speed command if an initial number of the predetermined series of processor steps is omitted; and such as to enable the servomotor drive unit to follow said current command if said initial number, together with more, of the predetermined series of processor steps are omitted; whereby a single motor control program can be modified to provide all of positional command control, speed command control and current command control. Therefore, the servomotor drive unit can effect a variety of servo-control modes with a single hardware arrangement simply by modifying the control program to meet the control modes. The servomotor drive unit of the invention can be shared by different control modes, and hence can be mass-produced at a large cost reduction. The servomotor drive unit is of the same hardware arrangement regardless of different control modes. Accordingly, maintenance parts may be reduced in number, and it is not necessary to stock maintenance parts suited for individual control modes. Any repair or servicing of the servomotor drive unit at the time the same has a trouble or is serviced is simplified. Brief Description of the Drawings Fig. 1 is a block diagram of a general servomotor control system; Fig. 2 is a block diagram of another servomotor control system; Fig. 3 is a diagram explanatory of the principle of the present invention; and Fig. 4 is a block diagram of an embodiment of the present invention. The present invention will be described in greater detail with reference to the accompanying drawings. Fig. 3 is a diagram explanatory of the principle of the present invention. Fig. 3(A) shows a positional command interface, and Fig. 3(B) shows a current command interface. Designated at SVU is a servomotor drive unit composed of an arithmetic controller having a microprocessor 108a, an interface circuit 108d, a counter 108g, an analog-to-digital converter (AD converter) 108f, and an inverter (voltage supply circuit) 115. In Fig. 3(A), the servomotor drive unit SVU effects positional, speed, and current control loop calculations dependent on a positional command PCMD fed through an interface circuit 151 from a main processor 150 in a controller CTU of a numerical control apparatus, for thereby servo-controlling a servomotor 101. In Fig. 3(B), a host processor 154 is responsive to a positional command from a main procssor 153 in a controller CTU for effecting positional and speed control loop calculations combined as shown in Fig. 2, for example, to produce a current command ICMD. The current command ICMD is fed through an interface circuit 155 to the servomotor drive unit SVU which executes a current control loop calculation for servo-controlling the servomotor 101. With the servomotor drive unit SVU constructed only of the arithmetic controller and the voltage supply circuit, any input of the positional command PCMD, the speed command VCMD, and the current command ICMD can be followed simply by modifying a control program for the arithmetic controller. Therefore, the hardware of the servomotor drive unit can be shared. An embodiment of the present invention will be described hereinbelow. Fig. 4 is a diagram showing an embodiment of the present invention, in which a servomotor comprises a synchronous motor. Identical parts in Fig. 4 are denoted by identical reference characters in Fig. 3. A servomotor 101 comprising a synchronous motor is supplied with DC voltages produced by rectifying three-phase alternating currents from a three-phase AC power supply with a rectifier circuit 117. The servomotor 101 is servo-controlled by drive signals supplied from an inverter (voltage supply circuit) 115 controlled by a control signal issued through a timer circuit 114 from an arithmetic controller 108. The arithmetic controller 108 is composed of a processor 108a for effecting arithmetic operations according to a motor control program, a program memory 108b for storing the motor control program, a data memory 108c for storing data, an interface circuit 108d for receiving commands from an external source such as a numerical control apparatus, an input/output port 108e for issuing a pulse-width-modulation command to a timer circuit 114, an analog-to-digital (AD) converter 108f for converting actual phase currents I ˙au, I ˙av, I ˙aw from current detectors 112U, 112V, 112W, described later, into digital values, a counter 108g for being initially loaded with a positional code indicative of a rotational position α of the field pole of the synchronous motor 101 and for counting rotational pulses PC generated from the pulse coder 102 each time the synchronous motor 101 is angularly moved a predetermined angle, and an address/data bus 108h connecting the above components. The current detectors 112U, 112V, 112W detect the actual phase currents I ˙av, I ˙aw, I ˙au of the phases and supply the current signals to the AD converter 108f in the arithmetic controller 108. The timer circuit 114 issues a pulse-width-modulation signal having a width or duration dependent on a pulse-width-modulation command from the arithmetic controller 108 to the inverter 115. The inverter 115 is composed of six power transistors Q₁ - Q₆ and six diodes D₁ - D₆. The power transistors Q₁ - Q₆ are turned on and off by the pulse-width-modulation signal from the timer circuit 114 for giving drive currents to the synchronous motor 101. A rectifier circuit 117 is composed of a diode group 117a and a capacitor 117b for rectifying three-phase alternating currents from the three-phase AC power supply 116 into direct currents to impress a DC voltage on the inverter 115. Operation of the servomotor drive unit shown in Fig. 4 will be described. First, a mode in which the servomotor drive unit is used with a positional command interface will be described. When the synchronous motor 101 is rotated, the counter 108g in the arithmetic controller 108 has been loaded with a positional code from the pulse coder 102 immediately before the synchronous motor 101 starts rotating, and has been counting rotational pulses PC generated as the synchronous motor 101 rotates. Therefore, the counter 108g is indicative of the rotational position of a field pole of the synchronous motor 101 and represents an interval of movement. Since the period of the rotational pulses PC is proportional to the speed of the synchronous motor 101, increments in the count of the counter 108g in a prescribed time interval correspond to the rotational speed of the synchronous motor 101. (1) For moving the synchronous motor 101 to a desired position, the arithmetic controller 108 receives a positional command PCMD from a numerical control apparatus or the like through the interface circuit 108d, which delivers the positional command PCMD through the address/data bus 108h to the processor 108a. (2) The processor 108a reads a count from the counter 108g through the address/data bus 108h, calculates the difference between a count at a previous sampling time and the present count, and calculates an interval of movement PAD from the calculated difference. (The step of calculating an interval of movement) (3) The processor 108a effects the following arithmetic operation using the positional command PCMD and the interval of movement PAD to determine a speed command Vc (VCMD): Vc = Kp (PCMD - PAD) (1) where Kp is a positional loop gain which is a constant. (The step of calculating a command speed) (4) Then, the processor 108a reads a count from the counter 108g through the address/data bus 108h. The processor 108a then calculates the difference between a previous count and the present count, divides the difference by a sampling period T to determine an actual speed Va. The actual speed Va may be calculated by providing a counter which measures the periods of the rotational pulses PC and causing the processor 108a to reach the counter. (The step of calculating an actual speed) (5) The processor 108a effects the following arithmetic operation using the speed command Vc and the actual speed Va to determine an amplitude command (effective current command) Ir: Ir in the equation (17) corresponds to the amplitude of an armature current. As Ir is increased, a greater torque is produced, and the actual speed of the synchronous motor 101 is thereby brought to the command speed. (The step of calculating the speed loop) (6) Then, the processor 108a reads a count ϑ from the counter 108g through the address/data bus 108h. The processor 108a search a conversion table of count values ϑ - sin ϑ, sin (ϑ + 2/3π) stored in the data memory 108c and obtains digital values of sin ϑ, sin (ϑ + 2/3π) corresponding to the rotational angle ϑ. (The step of generating a sine wave) (7) The processor 108a multiplies the amplitude command Ir determined in the speed loop calculating step (5) and the digital values of sin ϑ, sin (ϑ + 2/(3π)) to obtain two-phase current commands I R , I S : Then, the processor 108a derives a current command I T from the two-phase current commands I R , I S according to the following equation: (The step of calculating a current command) If a conversion table of ϑ - sin ϑ, sin (ϑ + 2/3π), sin (ϑ + 4/3π) is employed in the sine wave generating step (6), then the arithmetic operation of the equation (4) is unnecessary. (8) Then, the processor 108a reads, through the bus 108h, digital values converted by the AD converter 108f from the actual phase currents I ˙av, I ˙aw, I ˙au detected by the current detector 112U, 112V, 112W, and determines the differences bewteen the three-phase current commands I R , I S , I T and the actual phase currents Iav, Iaw, Iau to produce inverter drive signals. (The step of calculating drive signals) (9) Thereafter, the processor 108a multiplies the actual speed Va obtained in the speed loop calculating step (4) by a prescribed coefficient to produce a speed compensation output VC O , and subtracts the speed compensation output VC O from the inverter drive signals to produce compensated inverter drive signals. The current loop is thus prevented from a gain reduction which would otherwise be caused by a counterelectromotive force due to the actual speed Va of the sychronous motor 101. (The step of compensating the current loop) (10) The processor 108a then generates pulse-width-modulation commands from the values of the inverter command signals. That is, the processor 108a calculates the pulse-width-modulation commands indicative of pulse widths dependent on the corrected inverter drive signals. (The step of pulse-width-modulation) (11) The processor 108a delivers the pulse-width-modulation commands through the address/data bus 108h and the input/output port 108e to the timer circuit 114. (The step of delivering commands) The timer circuit 114 issues pulse-width-modulation signals having time durations dependent on the pulse-width-modulation commands to the power transistors Q₁ - Q₆ of the inverter 115 for controlling three-phase currents fed to the synchronous motor 101. The processor 108a executes the current loop calculations in the steps (5) - (11) in each sampling period T and also executes the speed loop calculations in the steps (1) - (5) in each period nT (n > 1) according to the control program in the program memory 108b for controlling the inverter 115 to rotate the synchronous motor 101 to at a command speed. Where the servomotor drive unit is used with the positional command interface, a motor control program may be stored in the program memory 108b for enabling the processor 108a to execute the steps (1) - (11). The speed command interface will be described. In the speed command interface, the speed command VCMD is supplied through the interface circuit 108d. Since the supplied speed command VCMD is the speed command Vc determined in the step (3), the processor 108a may execute the steps (4) - (11) on the speed command VCMD. Therefore, a motor control program may be stored in the program memory 108b for enabling the processor 108a to execute the steps (4) - (11). In the current command interface, the current command ICMD is supplied through the interface circuit 108d. Since the supplied current command ICMD is the effective current command Ir determined in the step (5), the processor 108a may execute the steps (6) - (11) on the supplied current command ICMD. Therefore, a motor control program may be stored in the program memory 108b for enabling the processor 108a to execute the steps (6) - (11). The program ((1) - (3)) for calculating the positional control loop may be of another control type, and likewise the programs for calculating the speed and current control loops may be of other control types. Although the synchronous motor has been described in the above embodiment, the motor may be an induction motor or a DC motor. The servomotor drive unit of the present invention can effect a variety of control modes with one hardware arrangement including a microprocessor simply by modifying a motor control program to meet a control mode. The servomotor drive unit is suitable for use with robots and machine tools controlled by numerical control apparatus.

Claims: A servomotor drive unit including a voltage supply circuit (115) for supplying an armature voltage to a servomotor (101), a current detector (112) for detecting the armature current in the servomotor (101), a rotational angle detector (102) for detecting the rotational angle of the servomotor (101), and an arithmetic controller (108) having a memory (108b) for storing a motor control program, an interface circuit (108d) for receiving external commands, and a processor (108a) connected to the rotational angle detector (102) and responsive to commands supplied from the said interface circuit (108d) for executing the motor control program to control the current supplied from said voltage supply circuit (115), characterised in that the current detector (112) is likewise connected to the processor (108a) and the arrangement is such that the servomotor drive unit can follow any of a positional command (PCMD), a speed command (VCMD), and a current command (ICMD) received through the said interface circuit (108d), by virtue of a motor control program which is stored in the memory (108b) for carrying out by the processor (108a), the program defining a predetermined series of processor steps which is: such as to enable the servomotor drive unit to follow said positional command (PCMD); such as to enable the servomotor drive unit to follow said speed command (VCMD) if an initial number of the predetermined series of processor steps is omitted; and such as to enable the servomotor drive unit to follow said current command (ICMD) if said initial number, together with more, of the predetermined series of processor steps are omitted; whereby a single motor control program can be modified to provide all of positional command control, speed command control and current command control. A servomotor drive unit according to claim 1, wherein said predetermined series of processor steps defined by the motor control program is as follows: (1) a first processor step of receiving a positional command PCMD from a numerical control apparatus or the like through the interface circuit (108d); (2) a second processor step of calculating an interval of movement PAD in dependence upon the rotational angle detector (102); (3) a third processor step of calculating a command speed Vc from the expression Vc = Kp (PCMD-PAD) where Kp is a constant positional loop gain; (4) a fourth processor step of calculating an actual speed Va by dividing an interval of movement by a corresponding sampling period T; (5) a fifth processor step of determining an armature current amplitude command Ir from the expression (6) a sixth processor step of generating digital waves from a conversion table in dependence upon the rotational angle ϑ detected in dependence upon the rotational angle detector (102); (7) a seventh processor step of deriving three-phase armature current commands I R , I S , I T employing the current amplitude command I r and said digital sine waves; (8) an eighth processor step of calculating drive signals for the voltage supply circuit (115) in dependence upon the differences between said three-phase armature current commands I R , I S , I T and the actual three-phase armature currents Iav, Iaw, Iau detected by said current detector (112); (9) a ninth processor step of compensating the current loop control by subtracting from said drive signals a speed compensation output VCO obtained by multiplying said actual speed Va by a prescribed coefficient, thereby to avoid a current loop gain reduction which would otherwise be caused by a counterelectromotive force due to the actual speed Va; (10) a tenth processor step of generating pulse-width-modulation commands for the voltage supply circuit (115) from the compensated drive signals; and (11) an eleventh processor step of delivering the pulse-width-modulation commands to the voltage supply circuit (115), and wherein all the eleven processor steps will be executed to enable the servomotor drive unit to follow said positional command (PCMD) received through the said interface circuit (108d); the first three processor steps will be omitted to enable the servomotor drive unit to follow a speed command received through the said interface circuit (108d); and the first five processor steps will be omitted to enable the servomotor drive unit to follow a current command received through the said interface circuit (108d).

Inventors: KURAKAKE, MITSUO, SAKAMOTO, KEIJI
Applicants: FANUC LTD.
Application year: 1984
Main classification: G05D3
IPC codes: G05D3, G05B11, G05B19, H02P25