An example of a conventional motor position controller is shown in FIG. 10 (refer to FIG. 1 in Japanese Patent Laid-open Publication No. 10-254550). In this controller, a difference between a position indicated by a position command and a fed-back position is calculated by a subtractor in a position control unit, and then processed by the position control unit before being output as a speed command. A subtractor in a speed control unit 3 calculates a difference between a fed-back speed, obtained by a speed calculation unit 2 converting the fed-back position output from an encoder E, and the speed indicated by the speed command. This difference is processed by the speed control unit 3, which outputs a torque command to a torque control unit 4. The torque control unit 4 controls an excitation current flowing into a motor M in such a manner to cause the motor M to produce a torque as required by a torque command.
Normally, the position control unit 1 in this controller is constructed as a proportional control (P-control) unit and the speed control unit 3 is built as a proportional-integral control (PI-control) unit. The conventional PI-control unit forming the speed control unit 3 has a configuration shown in FIG. 11. In this PI-control unit a difference between the speed indicated by the speed command and the fed-back speed is calculated by a subtractor SB, and is input through a proportional control system with a gain of 1 to an adder AD. In the integral control system, the difference is multiplied by an integral gain by a multiplier 31 and integrated by a speed integrator 32 before being supplied to the adder AD. The adder AD adds an output of the proportional control system and an output of the integral control system, and sends the result to a multiplier 33, which in turn multiplies the output of the adder AD by a proportional gain and outputs the result as a torque command. By constructing the speed control unit 3 as a PI-control unit, it is possible to minimize not only a transient difference of speed but also a steady state difference.
Generally, control systems have a limited response, which means that a fed-back speed takes long to respond to a speed command. FIG. 12 shows a simulation of a positioning operation in a conventional position controller. In the figure, diagrams represent, from top to bottom, a position command, a position difference (magnified), a speed command, a fed-back speed, a speed integrator output, a torque command, and an in-position state (positioning operation completes). Upon receiving the position command, the motor M begins to rotate. However, after the speed command has been output from the position controller until the fed-back speed is obtained (until the fed-back speed corresponding to the speed command appears), the speed integrator 32 performs a integrating operation. While the motor is rotating at a constant speed, the integrated value decreases. But as the motor M decelerates, the integrating operation is performed again. At the end of the positioning operation, all the remaining integrated value is discharged, and the motor M stops. Thus, in the conventional controller, as shown in FIG. 12, after the position command has become zero, the positioning response is delayed for an amount corresponding to a residual quantity of the remaining integrated value in the speed integrator 32.
To solve this problem, a control method of switching from a proportional control to a proportional-integral control (P-PI switch control) has been proposed. FIG. 13 shows a simulation of a positioning response in the P-PI switch control. Diagrams represent, from top to bottom, a position command, a position difference (magnified), a speed command, a fed-back speed, a speed integrator output, a torque command, and an in-position state (positioning operation completes). In the P-PI switch control, when the motor is rotating, the speed control unit 3 is made to perform a proportional control, immediately before the motor M stops, and is switched to a proportional-integral control. Changing the control mode according to the operation state as described above makes it possible to make the residual quantity, in the speed integrator 32 while the motor is running, zero and to shorten a positioning time while at the same time suppressing a steady state difference when the motor stops. However, if the P-PI switch control method is applied to a control system in which an external force is always applied to a shaft of a motor, such as one that drives a vertical shaft, the positioning time increases, as shown in FIG. 14. FIG. 14 shows a simulation of a positioning response under the P-PI switch control. In this figure, too, diagrams represent, from top to bottom, a position command, a position difference (magnified), a speed command, a fed-back speed, a speed integrator output, a torque command, and an in-position state (positioning operation completes). As can be seen from the speed integrator output of FIG. 14, after the control is changed over to the PI control, the speed integrator 32 compensates for a torque corresponding to the external force. The P-PI control thus has a problem of not being able to shorten the positioning time when an external force is applied to the shaft.
An object of this invention is to provide a motor position controller which can shorten the positioning time even if an external force is applied.