The present invention relates to a server controller for controlling a plurality of motors including a master motor and a slave motor cooperatively driving a movable member.
The present invention also relates to a method for server control of at least two motors cooperatively driving a movable member.
In drive mechanisms for robots, machine tools, injection molding machines, pressing machines, positioners, etc., it is often the case that a movable member to be actuated is too large in size to be accelerated or decelerated by a single motor for driving the movable member. In such cases, two or more motors are used for cooperatively driving the movable member. When performing the control of the motors, drive shafts of the individual motors need to be subjected to position control.
It is well known to use servo controllers for controlling the position of a motor. For example, a servo controller for controlling a motor driving the motion of a robot arm includes a position controller configured to calculate speed references based on a position error, which is calculated as the difference between position references from a main computer of the robot and measured positions from a position detector. The servo controller further includes a speed controller configured to calculate reference torques for the motor based on the difference between the speed references from the position controller and measured velocities, instance calculated based on the measured positions, and a current controller configured to provide the motor with current based on the torque references from the speed controller. Traditionally, the speed controller is a PID (Proportional Integration Derivation) controller, or a PI (Proportional Integration) controller. The PI or PID controller includes a proportional element configured to calculate a reference torque part based on a proportional constant and the speed error, and an integral torque element configured to calculate a reference torque based on the integral of the speed error. The total reference torque is calculated as the sum of the reference torques part and the integral torque part.
U.S. Pat. No. 5,086,263 discloses a driving apparatus including two motors. The driving apparatus includes a servo controller configured to control both motors based on a common position instruction signal. The servo controller includes two deviation counters configured to generate position error signals for both motors based on the position instruction signal and detection signals from respective rotation detecting devices. The servo controller includes a correcting unit to which the position error signals outputted from respective deviation counters are applied, so as to form correction signals with respect to the respective deviation signals based on an integration of a difference between each of the position error signals and the other corresponding position error signal. The controller further comprises a set of adding devices for adding the position error signal outputted from the respective deviation counters to the correction signals. The apparatus comprises a set of driving devices for driving the respective motors based on control signals outputted from the respective adding devices. The speed control of the motors is made based on a mean value of the position error of the first and second motor. This means that the speed control of both motors is based on the same value. The method aims that both motor shafts will reach the same position, possibly with the same control error. This means that the torques from two motors does not necessary becomes the same, and in a worst-case scenario both torques will counteract in order to try to reach the same position.
U.S. Pat. No. 5,646,495 shows a servo controller for driving an shaft using a main motor and a sub-motor. This server controller has a common position control for both motors. The position control is made based on a position command for the master motor and position feed back from the master motor. A speed difference between the main motor and the sub-motor is calculated, and a value for correction of torques is obtained based on this speed difference. The value for correction of torque is added to respective torque commands of both the main motor and the submotor, thereby making it possible to suppress vibrations occurring in the transmission mechanism. Thus, the server controller has a common speed control for both motors. The speed control is based on an average value for motor speed feedback from the first and the second motor. A problem with this type of server control is that it cannot handle vibrations in the sub-motor if the master motor is not vibrating. In order to reduce this problem the server controller is provided with a damping compensator.
US2001/0028228 shows a server controller capable of driving a single movable member by two motors. The server controller includes two control sections associated with respective motors and a damping controller. Each of the control sections has a position controller configured to output a speed command based on a common position command from a main controller and a position feedback value from an associated position detector, a speed controller configured to output a torque reference based on the speed command and a speed feedback value from an associated speed detector, and a current controller configured to output a voltage command based on the torque reference, and a current feedback value from an associated current detector. The damping controller outputs a current command correction value for compensating interference between the two motors based on the speed feedback values from the speed detectors for the two motors.
A common feature of the above-described controllers is that the same position commands, i.e. position references, are sent to the position controllers. The result is that all motors are driven to exactly the same position. This is no problem if the mechanical coupling between the motors is weak. However, if the mechanical coupling between the two motors is stiff, the torque between the motors will not be distributed equally if there is a mechanical offset or backlash between the motors. With larger misalignment, the result can be that motors are working against each other, one pushing and the other pulling in order to try to get the motors exactly to the reference position. In reality it is not possible to move the motors to exactly the same position, due to mechanical imperfections, backlash in gears, differences between the position detectors, or bad calibration of the detectors, which means that the motors are not in the correct position from the beginning. The consequence is that the two control sections try to get both motors exactly to the reference position, which is impossible, and the movable member becomes inclined instead of straight. Also the motors may counteract each other. Then large amounts of heat will be generated and there is a risk for the motors to become overheated
The object of the present invention is to provide an improved server controller for controlling a plurality of motors including a master motor and a slave motor cooperatively driving a movable member, which reduces the drawbacks mentioned above.
This object is achieved by a servo controller according to claim 1.
Such a server controller is configured to control the master motor and the slave motor based on position references for the master motor. The servo controller comprises a master speed controller configured to calculate a reference torque for the master motor based on speed errors for the master motor, and a slave speed controller configured to calculate reference torques for the slave motor based on speed errors for the slave motor, wherein each of the reference torques includes a proportional torque part and an integral torque part. The invention is characterized in that the servo controller is configured to calculate each of the integral torque parts based on the speed errors of the master motor and the speed errors of the slave motor, such that the torques due to the integral torque parts will be distributed equally between the master and slave motors or according to a predefined ratio.
The server controller according to the invention does not try to move the motors to the same position; instead it distributes the torque between the motors. The motors will be moved so that the average position of the motors will be the same or close to the reference position. The major part of the steady state torque, such as torque due to gravity, friction, and external forces, will be distributed equally, or with a predefined ratio between the motors. This server controller will work independently of the degree of stiffness between the motors.
According to an embodiment of the invention, the servo controller is configured to calculate an integral torque part for the master motor based on the integral of the speed errors for the master motor, to calculate an integral torque part for the slave motor based on the integral of the speed errors for the slave motor, to calculate a mutual integral torque component based on the integral torque part for the master motor and the integral torque part for the slave motor, to determine a new integral torque part for the master motor and a new integral torque part for the slave motor based on the mutual integral torque component, and to update the integral torque part for the master motor and the integral torque part for the slave motor with the new integral torque parts. For example, the mutual integral torque component is calculated based on a mean value of the integral torque parts for the master motor and the slave motor. Advantageously, one of the speed controllers is configured to calculate the mutual integral torque component. This embodiment is easy to implement using normal PID controllers. No extra regulator is needed for calculating the integral torque parts.
According to an embodiment of the invention, the slave speed controller is configured to calculate said mutual integral torque component and to determine the new integral torque part of the slave motor and the new integral torque part of the master motor based on the mutual integral torque component, and to update the integral torque part of the master motor and the slave motor. It is advantageous to use the slave speed controller to calculate the integral torque parts and to update the integral torque parts of the master motor and the slave motor. If more than one slave motor is connected to the master motor, the updates of the integral torque parts are done only from the slaves to the master motor. The second slave motor uses the master value updated by the first slave. This embodiment is easy to implement and requires less code. In an alternative embodiment, the master can be used to calculate the new integral torque parts and to update the integral torque part of the master motor and the slave motors.
According to an embodiment of the invention, the server controller is configured to calculate the integral torque part for the master motor based on a first torque distribution ratio that depends on the relation between the maximum torque of the master motor and the total maximum torques of the motors, and to calculate the integral torque part for the slave motor based on a second torque distribution ratio that depends on the relation between the maximum torque for the slave motor and the total maximum torques of the motors. This embodiment makes it possible to distribute the torques between the motors if an unequal torque distribution is desired. This is advantageous, for example, if the motors are of different sizes.
According to an embodiment of the invention, the master speed controller is configured to calculate the speed errors for the master motor based on the difference between speed references and measured speed values for the master motor, and the slave speed controller is configured to calculate the speed errors for the slave motor based on the difference between speed references and measured speed values for the slave motor. As the speed control is based on speed feedback signals from the master motor as well as from the slave motor, it is possible for each of the speed controllers to suppress its own vibrations. Thus, the servo controller does not need any extra damping equipment.
According to an embodiment of the invention, the master position controller is configured to calculate the speed references for the master motor based on the position errors for the master motor and the position errors for slave motor, and the slave position controller is configured to calculate the speed references for the slave motor based on the position errors for the master motor and the position errors for slave motor. For example, the position controllers are configured to calculate the speed references based on the sum of the position errors for the master motor and slave motor. According to this embodiment, the position error is distributed between the master and slave motor. Thus, a uniform distribution of the torque between the motors is achieved. This embodiment is particularly useful in cases of large position errors.
According to an embodiment of the invention, the master position controller is configured to calculate the speed references for the master motor based on the position errors for the master motor multiplied by a first distribution factor, and the position errors for the slave motor multiplied by a second distribution factor. According to this embodiment, the position error is weighted between the master and slave motor. This embodiment makes it possible to determine the average positions of the shafts driven by the motors, and thereby to distribute the position error between the master and slave in a desired manner.
Another object of the present invention is to provide an improved method for controlling a plurality of motors, which method reduces the drawbacks mentioned above.
Such a method comprises: calculating speed references for the master motor and the slave motor based on position references for the master motor, calculating reference torques for the master motor as a sum of a proportional torque part and an integral torques part, based on the speed errors for the master motor, and calculating reference torques for the slave motor as a sum of a proportional torque part and an integral torque part, based on the speed errors for the slave motor. Each of the integral torque parts is calculated based on the speed errors for the master motor and the speed errors for the slave motor, such that the torques due to the integral torque parts will be distributed equally between the master and slave motors or according to a predefined ratio.
The invention will now be explained more closely by the description of different embodiments of the invention and with reference to the appended figures.
Each control section 1,2 is provided with a position detector R1, R2 detecting the position of the shaft driven by the motor. The first control section 1 is provided with measured positions posm1 from the master motor and the second control section 2 is provided with measured positions posm2 from the slave motor. Each of the control sections 1, 2 includes a position controller 4a, 4b configured to calculate speed references Vref1, Vref2 based on the position errors poserr1, Poserr2. The position errors poserr1 for the master motor are calculated as the differences between the reference positions posref for the master motor and the measured positions posm1 for the master motor. The position errors poserr2 for the slave motor are calculated as the differences between the reference positions posref for the master motor and the measured position posm2 for the slave motor.
Further, each control section 1,2 is provided with a speed controller 6a, 6b configured to calculate a torque reference τref1, τref2 for the motor based on a speed error verr1, verr2. The speed errors verr1, verr2 are calculated as a difference between a measured speed vm1, vm2 for the motors and the speed references vref1, vref2 from the position controllers 4a, 4b. In this embodiment, the measured speeds vm1, vm2 are calculated by deriving d/dt the measured positions posm1, posm1 from the position detectors. Each control section 1,2 also includes a current controller 8a, 8b configured to provide the motors M1, M2 with current in dependence on the torque reference values τref1, τref2 from the speed controller 6a-b.
The speed controllers 6a-b are PI-controllers. According to the definition of a PI-controller, the controller comprises a proportional element and an integrating element. The outputs from the proportional element and the integrating element are added and constitute the reference torques sent to the current controller. Thus, each of the speed controllers 6a, 6b is provided with a proportional element 10a, 10b configured to calculate a proportional torque part τp1, τp2 based on the speed errors verr1, verr2. According to this embodiment of the invention, the speed controllers 6a, 6b are provided with a common integral element 12 configured to calculate an integral torque part τI based on the speed errors verr1, verr2 of the master and slave motor.
The common integrating element 12 is configured to calculate a mutual integral torque component τI for the speed controllers by integrating the mean value of the speed errors verr1 for the master motor and the speed error verr2 from the slave motor. The integral is transformed to torque by multiplying it with Ki.
τI=Ki∫(verr1+verr2)/2
K
i
=K
v
/T
i
Kv=Speed control gain
Ti=Integral time constant
The calculated torque value τ1 is used as the integral torque part for the speed controller of the master motor as well as of the slave motor.
The reference torques τref1, τref2 for the master and slave motors are calculated as the sum of the integral torque part τI and the proportional torque part τp1, τp1 for each motor.
τref1=τp1+τI
τref2=τp2+τI
According to this embodiment, the same integral torque part is used for all motors. With this layout the motors will move so that the average position of the motors will be the same as the reference position posref. The major part of the steady state torque will be distributed equally between the motors. This servo controller will work independently of the degree or stiffness between the motors. The control sections 1, 2 are now dependent on a common integral element 12.
According to another embodiment, the calculated integral torque parts can be multiplied by a distributing ratio so that the integral parts of the torque references, and accordingly the torque, will be distributed between the motors with some predefined ratio K.
τI1=τI*K 0<K<1
τI2=τI*(1−K)
τref1=τp1+τI1
τref2=τp2+τI2
According to this embodiment of the invention, the slave speed controller 20b includes a mutual computing element 24 configured to retrieve the master integral torque value τ1=Ki∫verr1 from the integrating element 22a, to calculate new integral torque values τup1, τup2 for the master and slave speed controllers based on the sum of the master integral torque value τ1 and the slave integral torque value τ2, and to update the integral torque value of the master integrating element 22a with the new master integral torque value τup1 and to update the integral torque value of the slave integrating element 22b with the new slave integral torque value τup2. The integrating elements 22a-b are configured to calculate the new integral torque parts τup1, τup2 based on the new integral torque values τ1, τ2 from the mutual computing element 24. The mutual computing element 24 can be seen as is temporary auxiliary help variable.
The master speed controller 20a is configured to calculate the torque reference τref1 as the sum of the integral torque part τI1 from the integrating element 22a and the torque reference τp1 from the proportional part 10a. The slave speed controller 20b is configured to calculate the torque reference τref2 as the sum of the integral torque part τI2 from the integrating element 22b and the torque reference τp2 from the proportional part 10b. Further, the integrating elements 22a-b are configured to continue to calculate the integral torque parts based on the new updated values τup1, τup2. Both the master and slave integrating elements 22a-b are updated by the slave speed controller. The updating of the integral torque values of the integrating elements 22a-b is made continuously with a certain frequency, for instance 0.5-10 kHZ. Preferably, the updating is made so often that the difference in the updating becomes small, for example, after each calculation of the master integral torque value τ1=Ki∫verr1.
The mutual computing element 24 is configured to calculate a mutual integral torque component, for example a mean value of the integral torque values of the master motor and the slave motor, and to calculate the new integral torque values based on the mutual integral torque component.
Mutual integral torque component=(τ1+τ2)/2
τ1=Ki∫verr1
τ2=Ki∫verr2
The slave speed controller equalizes the integral values. During execution of the normal controller code, the common computing element 24 of the slave reads the integral torque value τ1 of the speed controller of the master motor and the integral torque value τ2 of the speed controller of the slave motor. A new integral torque value τup1 is calculated for the master controller and a new integral torque value τup2 is calculated for the slave controller. An advantage with this embodiment is that it is easy to implement using normal PID-controllers or PI-controllers, by equalizing the integral values between different PID-controllers.
In this embodiment, the same integral torque value is used to update the master speed controller as well as the slave speed controller. This means that the torque is distributed equally between the motors.
τup1=τup2=(τ1+τ2)/2
τI1=τup1
τI2=τup2
If an unequal torque distribution is desired, for example, if the motors have different sizes, the following algorithm can be used:
τup1=(τ1+τ2)*Tmax-master/(Tmax-slave+Tmax-master)
τup2=(τ1+τ2)*Tmax-slave/(Tmax-slave+Tmax-master)
τup1 is the new integral torque part for the master
τup2 is the new integral torque part for slave
Tmax-master=maximum torque of the master motor
Tmax-slave=maximum torque for the slave motor
If the shafts are rotated in opposite directions, the sign of the torques have to be considered.
This embodiment distributes the torque according to the size of the motors.
If it is desired that the master position becomes equal to the position reference, the update of the integrating element of the master is omitted. In this case:
τup1=(τ1+τ2)/2*Tmax-slave/(Tmax-slave+Tmax-master)
τup1=τ1 (is not updated)
This solution easily supports more than one slave motor. All slaves equalize their integral values via the integrating element of the master.
The integrating element 32b of the first slave motor M2 is configured to retrieve the master integral torque values from the integrating element 32a, to calculate new integral torque values for the master and first slave speed controllers based on the sum of the master integral torque value τ1=Ki∫verr1 and the first slave integral torque value τ2=Ki∫verr2, and to update the integral value of the master integral element 32a with the new master integral torque value and to update the integral torque value τup1 of the first slave with the new slave integral torque value.
τup1(n+1)=τup2(n+1)=(τ1+τ2)/2
n=number of update
The integrating element 32c of the second slave motor M3 is configured to retrieve the master integral torque value from the integrating element 32a, to calculate new integral torque values for the master and second slave speed controllers based on the sum of the master integral torque value τ1=Ki∫verr1 and the second slave integral value τ3=Ki∫verr3, and to update the integral value of the master integral element 32a with the new master integral torque value and to update the integral torque value of the second slave with the new slave integral torque value.
τup1(n+2)=τup3(n+2)=(τup1(n+1+τ3)/2
The integral elements 32a-c are configured to use the new updated integral torque values as the integral torque parts τI1, τI2, τI3. The updating of the integral values of the integrating elements is made continuously with a certain frequency.
Tests have shown that the above-described updating algorithm converges very fast. The result is that the average final position of the motors will be the same as the reference position value posref.
poserr=poserr1*X+poserr2*(1−X) 0<x<1
Accordingly, if X=0 the common position error poserr is the position error for the slave and if X=1, the common position error is equal to the position error for the master. If X is any value between 0 and 1, the position error for the master and slave is weighted between the master and slave motor. According to this embodiment, the position errors are equalized. This means that the motors will have the same position error. The common position error is, for example, the mean value of the position error of the master motor and the position error of the slave motor, i.e. x=0.5. Providing both position controllers with the same position error poserr means that the speed controllers will be provided with the same speed reference vref1=vref2. This results in both integrating elements 22a-b attempting to drive the shaft driven by the motors to the same position. This is advantageous since the motors will provide the same torque at a standstill. Further, this embodiment achieves the advantage that the torques will be more equal for both motors, i.e. the torque error will be more equalized between the motors. This embodiment is particularly useful in cases of large position errors.
The present invention is not limited to the embodiments disclosed but may be varied and modified within the scope of the following claims.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP07/64603 | 12/28/2007 | WO | 00 | 12/27/2008 |