1. Field of the Invention
The present invention relates to a control device having an excessive-error detection function for detecting an abnormality of a position error.
2. Description of the Related Art
For example, in a numerical control (NC) device that controls the rotation of a servo motor, an angular error (or more generally, position error) between a rotation angle command (or more generally, position command) to the motor and the actual rotation angle (or more generally, position feedback) is compared with a predetermined excessive-error detection level to detect an abnormality resulting from a faulty servo system, an excessive load, interference with a peripheral device, etc. In the prior art, it has been common practice to determine the excessive-error detection level by adding a certain amount of margin to an ideal position error (steady-state error) calculated from the velocity command and the position control loop gain (position gain).
However, when feedforward control is introduced to the position control, the position error under normal operation becomes less than the ideal position error calculated from the velocity command and the position gain. If the excessive-error detection level determined based on this ideal position error is used as a threshold value for abnormality detection, a problem arises in which a delay occurs in the detection of an abnormality, because in the early stage of the abnormality, the error does not reach the detection level.
Accordingly, an object of the present invention is to provide a control device that uses an excessive-error detection level capable of detecting abnormality of a position error appropriately in a configuration where feedforward control is introduced to the position control.
According to the present invention, there is provided a control device comprising: a position controller calculating a first velocity command by multiplying by a position gain a position error detected between a position command and a position feedback from a control target; a feedforward term calculating unit calculating a feedforward term by multiplying a time differential of the position command by a feedforward coefficient; a velocity controller controlling the velocity of the control target based on a second velocity command obtained by adding the feedforward term to the first velocity command; a position error estimation value calculating unit calculating a position error estimation value from the position command, the position gain, and the feedforward coefficient; and a position error abnormality judging unit judging the position error to be abnormal when the position error is greater than the position error estimation value by more than a predetermined value.
The position error estimation value calculating unit takes as the position error estimation value a position error calculated, for example, when the velocity controller and the control target are replaced by an integrator.
In the above control device, since the position error calculated when the velocity controller and the control target are replaced by an integrator, i.e., when there is no delay in the velocity control, is taken as the position error estimation value, and the excessive-error detection level is set based on the thus calculated value, the excessive-error detection level can be set appropriately in the control device in which feedforward control is introduced.
The present invention will be described by taking as an example a control device that controls the rotation of a servo motor.
As shown, for example, in
In the present invention, an error is calculated when the velocity controller 18 and servo motor 12 in
The position command is denoted by u(t), and the position error by Err(t), and their Laplace transforms are denoted by u(s) and Err(s), respectively. Letting F(s) denote the transfer function from the position command to the position error, the following equation is obtained.
Err(s)=F(s)·u(s)
In other words, when the transfer function F(s) is given, the position error Err(t) can be obtained from the Laplace transform u(s) of the position command u(t).
In the system shown in
F(s)=(1−α)·s/(s+PG)
the position error in the system of
When the time differential of the position command is constant at V, that is, when the commanded rotational velocity is a constant velocity V, since the Laplace transform u(s) of the position command is V/s2, the position error estimation value Err, at the limit of s→0, is given as
Err(V, PG, α)=V/PG×(1−α)
When the change of the position command is mild, this equation suffices for most purposes and can be used to calculate the value for detecting position control abnormality, though it contains a certain degree of error.
On the other hand, when the acceleration of the command or the change of the acceleration is large, an error tends to occur, and a correction can be made as shown by the following equation.
Err(V, PG, α)=V/PG×(1−α)+(second order differential of position command)×Ka+(third order differential of position command)×Kj
In the case of sample value control by digital processing, the position error estimation value can be calculated using a recurrence equation.
The transfer function from the position command u(s) to the position error Err(s) is given as
Err(s)/u(s)=(1−α)·s/(s+PG)
which is transformed into
(s+PG)·Err(s)=(1−α)·s·u(s)
By converting this into a discrete time system, i.e., Err(s)·s→(Err(n)−Err(n−1)/T, us(s)·s→(u(n)−u(n−1))/T, Err(s)→Err(n)), the following equation is obtained.
Err(n)={Err(n−1)+(1−α)(u(n)−u(n−1))}/(1+PG·T)
The position error estimation value can be obtained by calculating this recurrence equation.
Using one of the above-described techniques, a position error estimation processing unit 40 calculates the position error estimation value Err from the position command, the feedforward coefficient α used in the feedforward term calculating unit 32, and the position gain PG used in the position controller 16. Since the position error estimation processing unit 40 is repeatedly executing the calculation of the position error estimation value Err, when the set value of the feedforward coefficient α changes, the position error estimation value changes accordingly. An excessive-error detection level calculating unit 42 calculates the excessive-error detection level ErrLevel by adding a prescribed margin ΔE to the absolute value |Err| of the position error estimation value Err. On the other hand, an absolute value calculating unit 44 calculates the absolute value |PosErr| of the position error PosErr output from the subtractor 10, and a subtractor 46 subtracts the excessive-error detection level ErrLevel from it. If the result of the subtraction is negative, an excessive-error detection unit 48 determines that abnormality is detected. The margin ΔE can be set by considering the actually measured values of overshoot, etc., that occur due to the response delays of the velocity controller 18 and servo motor 12. As the commanded acceleration increases, the position error tends to increase; to address this, the amount of position error during linear acceleration/deceleration may be investigated in advance, and the abnormality detection margin may be set by considering it.
Further, in regions where the commanded acceleration changes, the position error tends to increase because of an inability to respond quickly to the change. In this case also, the relationship between the rate of change of the commanded acceleration and the amount of position error may be investigated, and the abnormality detection margin may be set by considering it.
In the embodiment shown in
In the embodiment shown in
Number | Date | Country | Kind |
---|---|---|---|
2007-112227 | Apr 2007 | JP | national |