Motor control apparatus for controlling motor
09541916 ยท 2017-01-10
Assignee
Inventors
Cpc classification
G05B19/404
PHYSICS
G05B2219/37297
PHYSICS
International classification
Abstract
A motor control apparatus includes a error calculation unit which calculates a error between a first position detection value of a movable part and a second position detection value of a driven part, a storage unit which stores the errors when the movable part engages with the driven part in a first and second drive direction, as a first initial error and a second initial error, respectively, and a compensation calculation unit which calculates the amount of compensation to correct backlash and an elastic deformation. The compensation calculation unit calculates a command error based on the first initial error and the second initial error and a predetermined constant which is larger than 0 and not greater than 1 and calculates the amount of compensation by subtracting the current error calculated by the error calculation unit from the command error.
Claims
1. A motor control apparatus having a movable part which is driven by a motor and a driven part which is driven by the movable part, comprising a first position detector which detects the position of the movable part, a second position detector which detects the position of the driven part, an error calculation unit which calculates an error between a first position detection value detected by the first position detector and a second position detection value detected by the second position detector, a storage unit which stores the errors calculated by the error calculation unit when the movable part engages with the driven part in a first drive direction and in a second drive direction opposite to the first drive direction, as a first initial error and a second initial error, respectively, and a compensation calculation unit which calculates the amount of compensation to compensate backlash between the movable part and the driven part and an elastic deformation caused by the engagement of the movable part with the driven part, wherein the compensation calculation unit calculates a compensation based on the first initial error and the second initial error stored by the storage unit and a predetermined constant which is larger than 0 and not greater than 1 and calculates the amount of compensation by subtracting the current error calculated by the error calculation unit from the initial error, wherein when the drive direction after reversing the motor is the first drive direction, the compensation is represented by
P1.Math.+P2.Math.(1), wherein when the drive direction after reversing the motor is the second drive direction, the compensation is represented by
P1.Math.(1)+P2.Math., wherein P1 is the first initial error, P2 is the second initial error, and is the constant.
2. A motor control apparatus according to claim 1, wherein the constant is a value between 0.75 and 0.95.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
DETAILED DESCRIPTION
(12) The embodiments of the present invention will be described below with reference to the accompanying drawings. In the drawings, corresponding components are assigned the same reference numerals. For the sake of clarity, the scale of the drawings may have been appropriately modified.
(13)
(14)
(15)
(16) When the engagement member B engages with the projection A1 of the movable part WA, the engagement member B is moved together with the movable member WA. Further movement of the engagement member B in the left direction causes the second elastically deformable member 62 to elastically deform, so that the table 54 is moved in the left direction with a delay with respect to the engagement member B. It should be noted that, as can be seen in
(17) As shown in
(18) Here, as may be understood from the comparison of
(19) With reference to
(20) The motor control apparatus 10 further includes a deviation calculation unit 31 which calculates a deviation P between the first position detection value DP1 detected by the first position detector 11 and the second position detection value DP2 detected by the second position detector 12. Furthermore, the motor control apparatus 10 includes a judgment unit 32 which judges whether the projection A1 or the projection A2 of the movable part WA engages with the driven part WB when the movable part WA is moved from an optional initial position in the first drive direction and in the second drive direction opposite to the first drive direction.
(21) The motor control apparatus 10 further includes a storage unit 33 which stores the deviation P calculated by the deviation calculation unit 31 as an initial deviation in correlation with the first drive direction or the second drive direction when the judgment unit 32 judges that the movable part WA engages with the drive part WB. Note that, the storage unit 33 can store other data such as speed. Moreover, the motor control apparatus 10 includes a compensation calculation unit 34 which calculates the amount of compensation necessary to correct the backlash between the movable part WA and the driven part WB and the elastic deformations of the first elastically deformable member 61 and the second elastically deformable member 62 caused when the movable part WA engages with the drive part WB.
(22)
(23) First, the position command preparation unit 20 prepares the position command CP. At steps S11 and S12 in
(24) Thereafter, as shown in
(25) Then, at step S14, whether the drive direction is the first drive direction or not is checked. In this specification, the right direction and the left direction in
(26) If it is judged that the drive direction is the first drive direction, the control proceeds to step S15. At step S15, the judgment unit 32 checks whether the projection A1 of the movable part WA engages with the driven part WB in the first drive direction. If the projection A1 of the movable part WA engages with the driven part WB, the current deviation P is stored as the first initial deviation P1 together with the drive direction in the storage unit 33 at step S16.
(27) For example, the judgment unit 32 judges that the projection A1 of the movable part WA has engaged with the driven part WB when the table 54 is moved at a constant speed or is accelerated in the first drive direction after a predetermined time has elapsed from the commencement of the operation of the motor M. Consequently, the first initial deviation P1 includes elastic deformations of the first elastically deformable member 61 and the second elastically deformable member 62 in the first drive direction. As a matter of course, it is possible to judge that the projection A1 of the movable part WA has engaged with the driven part WB by other methods.
(28) If it is judged at step S14 that the drive direction is the second drive direction, the control proceeds to step S17. At step S17, the judgment unit 32 checks whether the projection A2 of the movable part WA engages with the driven part WB in the second drive direction. The judgment is performed substantially in the same manner as described above. If the projection A2 of the movable part WA engages with the driven part WB, the current deviation P is stored as the second initial deviation P2, together with the drive direction in the storage unit 33 at step S18. As described above, the second initial deviation P2 includes elastic deformations of the first elastically deformable member 61 and the second elastically deformable member 62 in the second drive direction.
(29) At step S19, whether the movable part WA engages with the other projection of the driven part WB on the opposite side after the speed command has been inverted is checked. If the movable part WA engages with the other projection of the driven part WB on the opposite side, no compensation is necessary, and accordingly, the process ends.
(30) At step S20, whether both the first and second deviations P1 and P2 are stored in the storage unit 33 is checked. If one or both of the first and second initial deviations P1 and P2 are not stored, it is not possible to calculate a command deviation which will be described hereinafter. Therefore, the process ends.
(31) If both the first and second deviations P1 and P2 are stored in the storage unit 33, the control proceeds to step S21 at which whether the drive direction is the first drive direction is checked. If the drive direction is the first drive direction, the control proceeds to step S22. At step S22, the compensation calculation unit 34 calculates a command deviation based on the following formula (1):
command deviationP1.Math.+P2.Math.(1)(1)
(32) In the formula (1) and formula (2) which will be described hereinafter, is a constant larger than 0 but not more than 1. The constant can be experimentally determined by an operator and is preferably stored in the storage unit 33. It should be noted that the calculated command deviation is temporarily stored in the compensation calculation unit 34.
(33) If the drive direction is the second drive direction, the control proceeds to step S23. At step S23, the compensation calculation unit 34 calculates a command deviation based on the following formula (2):
command deviationP1.Math.(1)+P2.Math.(2)
(34) Then, at step S24, the compensation calculation unit 34 calculates the amount of compensation based on the following formula (3):
amount of compensation=G(command deviationcurrent deviation)(3)
(35) In the formula (3), G represents a gain and the current deviation means the latest deviation calculated at step S13. The processes shown in
(36) Again, with reference to
(37) Furthermore, the speed detection value DV detected by the first position detector 11 is subtracted from the speed command value CV by the subtracter 25 and is input to the torque command preparation unit 26. The torque command value prepared by the torque command preparation unit 26 is input to the motor M to drive the motor M.
(38)
(39) In the prior art, the amount of compensation was calculated by subtracting the current deviation from the stored initial deviation. For example, in
(40) In contrast thereto, in the present invention, the command deviation is calculated based on the first initial deviation P1, the second initial deviation P2, and the predetermined constant , using the formulae (1) and (2) explained in steps S22 and 23. In addition, using the formula (3), the current deviation is subtracted from the command deviation to obtain the amount of compensation. As can be seen in
(41) In this case, as the elastic deformations of the first elastically deformable member 61 and the second elastically deformable member 62 are taken into account, it is possible to prevent the amount of compensation from becoming excessive. Therefore, in the present invention, the workpiece cannot be cut excessively, whereby over milling is not formed in the surface of the workpiece. Consequently, it is possible to lower the possibility that the workpiece will be judged to be defective.
(42) Moreover, it is preferable that the constant be a value between 0.75 and 0.95. In this case, it is possible to further lower the possibility that a workpiece will be judged to be defective. When the constant is 0.75 or its approximation, it is possible to greatly reduce the possibility of over millings being formed in the surfaces of the workpieces.
EFFECTS OF THE INVENTION
(43) According to the first and second embodiments of the invention, the amount of compensation is calculated by subtracting the current deviation from the command deviation calculated based on the first initial deviation, the second initial deviation, and the predetermined constant. In this case, since the elastic deformation is taken into consideration, no excessive amount of compensation occurs. Therefore, the workpiece cannot be cut excessively and accordingly, over millings are not formed in the surface of the workpiece. Thus, the possibility that the workpiece will be judged to be defective can be decreased.
(44) According to the third embodiment, the possibility that the workpiece will be judged to be defective can be further decreased.
(45) Although the present invention has been described above with reference to representative embodiments, it may be understood that the aforementioned modifications, further various modifications, deletion or addition can be performed by a person skilled in the relevant art, without departing from the scope of the invention.