【0001】
【発明の属する技術分野】本発明は、数値制御工作機械やロボットのように、電動機を介して負荷を駆動する際の運動精度を向上させるための制御方法に関する。
【0002】
【従来の技術】
従来、数値制御工作機械やロボットにおいて、電動機の運動方向反転時に静止摩擦やクーロン摩擦などの非線形外乱の影響により運動精度が劣化するという問題がある。例えば、数値制御工作機械の送り駆動系のように、直線運動をする2つのサーボ系を直行するように組み合わせ、2つのサーボ系を同期して運動させることで制御対象に円弧軌跡を描かせる場合、ある軸の運動方向が反転するときに摩擦力などの影響で即座に反転することができず、その箇所において指令軌跡からの誤差が生じる(図1)。
【0003】
通常このような場合には、直線運動をする各サーボ系の運動方向をそれぞれX軸およびY軸とするため、指令軌跡からの誤差は各象限が切替る時に生じるが、座標軸のとり方を変えたとしても、指令軌跡からの誤差が生じる箇所が変化するだけで、ある軸の運動方向が反転するときに指令軌跡からの誤差が生じるという現象そのものは変化しない。
【0004】
これを改善する一方法として、特公平7−104729号公報が提案されている。これは、輪郭加工中、各アクチュエータの位置指令値と検出位置との間の偏差を常時監視して、輪郭の象限切替り時点で該偏差の正または負の符号が逆転したのを検出したとき、予め内部に設定された象限切替り時の異常応答を補償するために用いる時間の関数である補償関数値を発生し、該補償関数値をサーボ系の速度指令値に加算することを特徴とする制御方法である (以下、特公平7−104729号公報を『従来例』という)。
【0005】
【発明が解決しようとする課題】
ところが従来例では、予め設定された補償関数を用いるため、運転条件や摩擦の状態が少しでも変化すると、設定した補償関数では摩擦などの非線形外乱を補償できなくなる。また、補償関数の設定にはいくつものパラメータを調整しなければならず、そのパラメータが摩擦などの非線形外乱を補償する際の性能に大きく影響するため、設定に多くの時間を要する。
【0006】
本発明は、運転条件や摩擦などの非線形外乱の状態が変化しても、多少の変化ならば適切に外乱を補償し、高精度な運動制御をできるようにするためのものである。また、補償関数のパラメータの設定を簡便にするためのものである。
【0007】
【課題を解決するための手段】
本発明では、サーボ系の速度指令値を常に監視し、速度指令値の符号が反転してから予め設定しておいた符号反転後時間までは、速度指令値uを定数倍した値を補償関数値ucとして出力する。
【0008】
【数1】
【0009】
上記の数式において、Kcは速度指令値uを何倍するかという定数であり、本発明を適用するサーボ系ごとに設定する必要がある。しかし、速度指令値uはフィードバック補償部より出力されているため、運転条件や外乱の状態によって変化し、これとともに補償関数値ucも運転条件や外乱の状態によって変化する。よって、運転条件や外乱の状態が多少変化しても外乱を適切に補償することができる。また同様の理由により、Kcの値はそれほど厳密に調整する必要がなく、短時間で調整できる。
【0010】
Kcの値を0とした場合には補償関数値が出力されず、外乱の補償を行わないことになる。また、Kcの値をあまり大きくするとサーボ系の安定性を損なうため、Kcの値の上限は本発明を適用しようとするサーボ系の特性により異なる。
【0011】
符号反転後時間が経過した後は、速度指令値uと補償関数値ucとの加算値である加算後速度指令値u’ が一定値となるような補償関数値ucを出力する。加算後速度指令値u’ が一定となるような補償関数値ucは、サーボ系の各定数(機構の設計値、サーボパラメータ等)およびサーボ系へ与える位置指令値から時間の関数として導出できる。
【0012】
また、符号反転後時間が経過した後の補償関数値ucは、サーボ系の各定数と位置指令値により時間の関数として自動的に与えられるため、補償関数のパラメータは速度指令値uを何倍するかということのみを設定すればよい。
【0013】
【発明の実施の形態】
図2に、補償関数発生部を付加したサーボ系の一例を示す。位置指令値1とパルスカウンタ部12の出力との偏差を偏差カウンタ部2で演算し、フィードバック補償部3に入力する。フィードバック補償部3では、偏差カウンタ部2で演算された偏差を基に、速度指令値uを生成する。また補償関数発生部4では、速度指令値uを基に補償関数値ucを生成し、加算部5で速度指令値uと補償関数値ucを加算して加算後速度指令値u’ を生成する。加算後速度指令値u’ はD/A変換部6で電圧に変換され、サーボアンプ部7に入力される。サーボアンプ部7では、ロータリーエンコーダ8の情報を基に演算されるモータ回転速度とサーボアンプ部7に入力された速度指令値との偏差を基にサーボモータ9を駆動し、制御対象10が駆動される。制御対象の位置は位置検出器11によって測定され、パルスカウンタ部l2に入力される。また、本発明は上位制御装置内部の改良のみによって実施されるため、サーボアンプ部7以降には公知であるどのようなサーボ系を用いてもよい。
【0014】
図3には直線運動をする2つのサーボ系をそれぞれX軸、Y軸と平行に直行して組み合わせ円運動を行ったときのX軸、Y軸それぞれの位置指令値を、図4にはそのときの速度指令値uと補償関数値uc、および加算後速度指令値u’ とを示す。制御対象に円運動をさせる場合、各運動軸に入力する位置指令値はサイン波とコサイン波になる。また、そのときの速度指令値uは図4に示したようになる。
【0015】
図4において、速度指令値の単位はrad/sとなっているが、これはサーボモータを回転させる場合であり、例えばリニアモータを駆動するような場合にはこの限りではない。
【0016】
図4に示した補償関数値ucは、補償関数発生部4において、図5に示すフローチャートに従って生成される。補償関数発生部4ではフィードバック補償部3から出力される速度指令値uを常に監視し、符号反転検知ブロック13において速度指令値uの値が反転したことを検知し、かつ符号反転後時間検知ブロック14において符号反転後時間t0が経過したことを検知されるまでは、補償関数発生ブロック16において速度指令値uをKc倍した補償関数値(数1)を生成し、加算部5に出力する。その後、符号反転後時間検知ブロック14において符号反転後時間t0が経過したことが検知され、かつ速度指令値比較ブロック15において速度指令値uが符号反転後時間t0における加算後速度指令値u’ 以上になったことを検知されるまでは、補償関数発生ブロック16において加算後速度指令値u’が一定となるような補償関数値ucを出力する。またそうでなければ、補償関数発生ブロック16からはゼロが出力される。
【0017】
例えばボールネジを用いてサーボモータの回転運動を直線運動に変換する構造をもつサーボ系の場合、加算後速度指令値u’ が一定となるような補償関数値ucは数2のようになる。数2は、円運動を行う際に各軸の運動方向が反転する付近での速度指令値uの増加率を導出し、符号反転後時間t0における補償関数値ucの値から、補償関数値ucの値が速度指令値uの増加率と同じ割合で減少するようにしたものである。
【0018】
【数2】
【0019】
数2において、uc(t0)は符号反転後時間t0における補償関数値ucの値、Fは円運動における制御対象の移動速度の指令値、rは円運動における負荷の回転半径の指令値であり、lはサーボ系に用いられているボールネジのリードである。
【0020】
数2はボールネジを用いたサーボ系を2つ組み合わせて円運動を行う場合における補償関数であるが、例えばリニアモータを用いたもの、ロボットアームのような構造を持つもの、または回転運動の制御を行うものなど、他の構造を持つサーボ系についても、加算後速度指令値u’ が一定となるような補償関数は容易に導出でき、本発明を適用できる。また、例えば1つのサーボ系のみの直線運動で速度が滑らかに変化する場合など、円運動以外の運動についても同様である。
【0021】
【発明の効果】
図6は、Y軸のサーボ系の上にX軸のサーボ系が載った構造を持つX−Yテーブルである。X−Yテーブルの位置はリニアスケールによって常に監視され、パーソナルコンピュータを利用した数値制御装置に入力される。また、数値制御装置からは速度指令値をD/A変換した速度指令電圧が出力され、各軸のサーボアンプに入力される。
【0022】
図7は、図6に示した装置を用いて、半径50ミリメートルの円運動を行った結果である。テーブルの移動速度は毎分4.8メートルとした。指令運動軌跡と測定された運動軌跡との誤差を1000倍に拡大して表示してあるため、AからDの各対応点における軌跡誤差は、突起となってあらわれている。また、図7における1目盛りは10マイクロメートルである。
【0023】
図8は、図6の数値制御装置に本発明を適用し、図7と同じ条件で実験を行った結果である。図8によれば、図7にみられるような突起はほぼ消滅していることがわかる。また、本発明を適用しない場合の真円度は20.0マイクロメートルだったのに対し、本発明を適用した場合には8.6マイクロメートルとなり、運動精度が大幅に向上した。また、このときのX軸のKcは5、Y軸のKcは4とし、t0はX軸、Y軸とも0.005秒としてある。
【0024】
本発明ではフィードバック補償部より出力された速度指令値uを基に補償関数値ucを生成するため、運転条件や摩擦の状態が多少変化しても、摩擦を適切に補償することができる。また上記と同様の理由により、フィードバック補償部には公知であるどのような方法を用いてもよく、また、位置指令値の微分値を定数倍して速度指令値uに加えるというようなフィードフォワード制御を組み合わせることもできる。
【0025】
発明の実施例では2つのサーボ系を組み合わせたX−Yテーブルに適用した例を示したが、本発明が適用できるサーボ系はそれに限ったものではなく、さらに多くのサーボ系を同期して運動させる場合や、ロボットアーム等にも適用することができる。
【図面の簡単な説明】
【図1】摩擦力の影響によって生じる指令軌跡からの誤差の模式図である。
【図2】補償関数発生部を付加したサーボ系である。
【図3】円運動を行う際にX軸、Y軸に与える位置指令である。
【図4】円運動を行う際の速度指令値と補償関数値の関係である。
【図5】補償関数発生部で補償関数値を生成する際のフローチャートである。
【図6】本発明の検証を行った実験用のサーボ系である。
【図7】補償関数発生部を付加しないサーボ系で円運動を行った場合の円弧軌跡である。
【図8】補償関数発生部を付加したサーボ系で円運動を行った場合の円弧軌跡である。
【符号の説明】
1 位置指令値
2 偏差カウンタ部
3 フィードバック補償部
4 補償関数発生部
5 加算部
6 D/A変換部
7 サーボアンプ
8 ロータリーエンコーダ
9 サーボモータ
10 披駆動体負荷
11 位置検出器
12 パルスカウンタ部
13 符号反転検知ブロック
14 符号反転後時間検知ブロック
15 速度指令値比較ブロック
16 補償関数発生ブロック
u 速度指令値
uc 補償関数値
u’ 加算後速度指令値[0001]
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control method for improving the movement accuracy when driving a load via an electric motor, such as a numerically controlled machine tool or a robot.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in numerically controlled machine tools and robots, there is a problem that the motion accuracy is degraded by the influence of nonlinear disturbances such as static friction and Coulomb friction when the motion direction of the electric motor is reversed. For example, as in the case of a feed drive system of a numerically controlled machine tool, when two servo systems that perform a linear motion are combined so as to be perpendicular to each other, and the two servo systems are synchronously moved to draw an arc locus on the control target. However, when the movement direction of a certain axis is reversed, it cannot be reversed immediately due to the influence of frictional force or the like, and an error from the command trajectory occurs at that point (FIG. 1).
[0003]
Usually, in such a case, since the movement directions of the respective servo systems that perform linear movement are the X axis and the Y axis, an error from the command trajectory occurs when each quadrant is switched. However, the phenomenon that an error occurs from the command trajectory when the direction of movement of a certain axis is reversed does not change.
[0004]
As a method for improving this, Japanese Patent Publication No. Hei 7-104729 has been proposed. This is because during contour processing, the deviation between the position command value of each actuator and the detected position is constantly monitored, and when it is detected that the positive or negative sign of the deviation has been reversed at the time of switching the quadrant of the contour. Generating a compensation function value that is a function of time used for compensating for an abnormal response at the time of quadrant switching set in advance therein, and adding the compensation function value to a speed command value of a servo system. (Hereinafter, Japanese Patent Publication No. Hei 7-104729 is referred to as “conventional example”).
[0005]
[Problems to be solved by the invention]
However, in the conventional example, since a preset compensation function is used, if the operating conditions and the state of friction change even a little, it is no longer possible to compensate for nonlinear disturbance such as friction with the set compensation function. In addition, many parameters must be adjusted to set the compensation function, and the parameters greatly affect the performance when compensating for a nonlinear disturbance such as friction, so that much time is required for setting.
[0006]
SUMMARY OF THE INVENTION The present invention is intended to appropriately compensate for a small change in the state of a non-linear disturbance such as an operating condition or friction even if the state changes, thereby enabling high-precision motion control. Further, this is for simplifying the setting of the parameters of the compensation function.
[0007]
[Means for Solving the Problems]
According to the present invention, the speed command value of the servo system is constantly monitored, and a value obtained by multiplying the speed command value u by a constant multiple from the inversion of the sign of the speed command value to a preset time after the sign inversion is used as a compensation function. and outputs as the value u c.
[0008]
(Equation 1)
[0009]
In the above formula, Kc is a constant for multiplying the speed command value u, and needs to be set for each servo system to which the present invention is applied. However, since the speed command value u is outputted from the feedback compensation unit, varies depending on the state of the operating conditions and disturbances, also changes depending on the state of the operating conditions and the disturbance compensation function value u c therewith. Therefore, even if the operating conditions and the state of the disturbance slightly change, the disturbance can be appropriately compensated. By the same reason, the value of K c is so it is not necessary to strictly adjust, can be adjusted in a short time.
[0010]
When the value of Kc is set to 0, no compensation function value is output, and no disturbance compensation is performed. Moreover, since impair the stability of the servo system when too large a value for K c, the upper limit value of K c varies with the characteristics of the servo system to be applied to the present invention.
[0011]
After sign-reversal time has elapsed, it outputs the compensation function values u c as the speed command value u and the compensation function value u c and the added value is a post-addition speed command value u 'is a constant value. Adding after the speed command value u 'compensation function value u c such that constant, (design value mechanism, servo parameters, etc.) the constants of the servo system can be derived as a function of the position command value to be provided to and servo system time .
[0012]
The sign reversal after compensation function value after a lapse of period u c is because it is automatically given as a function of time the position command value and the constants of the servo system, the parameters of the compensation function what speed command value u It is only necessary to set whether to multiply.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 2 shows an example of a servo system to which a compensation function generator is added. The deviation between the position command value 1 and the output of the pulse counter 12 is calculated by the deviation counter 2 and input to the feedback compensator 3. The feedback compensator 3 generates a speed command value u based on the deviation calculated by the deviation counter 2. Also the compensation function generator 4 generates a compensation function value u c based on the speed command value u, the speed command value u and the compensation function values u c addition to adding after the speed command value u 'by an adder 5 Generate. The added speed command value u ′ is converted into a voltage by the D / A converter 6 and input to the servo amplifier 7. The servo amplifier unit 7 drives the servo motor 9 based on the deviation between the motor rotation speed calculated based on the information of the rotary encoder 8 and the speed command value input to the servo amplifier unit 7, and drives the control target 10. Is done. The position of the control target is measured by the position detector 11 and is input to the pulse counter 12. Further, since the present invention is implemented only by improving the inside of the host controller, any known servo system may be used after the servo amplifier unit 7.
[0014]
FIG. 3 shows the position command values of the X-axis and Y-axis when two servo systems that perform linear motion are combined in a direction perpendicular to the X-axis and Y-axis, respectively, to perform circular motion. At this time, the speed command value u, the compensation function value u c , and the added speed command value u ′ are shown. When a controlled object is caused to make a circular motion, the position command value input to each motion axis is a sine wave and a cosine wave. Further, the speed command value u at that time is as shown in FIG.
[0015]
In FIG. 4, the unit of the speed command value is rad / s, but this is the case where the servo motor is rotated. For example, this is not the case when the linear motor is driven.
[0016]
Compensation function value u c shown in FIG. 4, in the compensation function generator 4 is generated according to the flowchart shown in FIG. The compensation function generator 4 constantly monitors the speed command value u output from the feedback compensator 3, detects that the value of the speed command value u has been inverted in the sign inversion detection block 13, and detects a time after the sign inversion. until after sign inversion time t 0 is detected that has passed in 14, to generate the compensating function value the speed command value u and K c times in the compensation function generator block 16 (number 1), the adding section 5 I do. Thereafter, the post-sign inversion time detection block 14 detects that the post-sign inversion time t 0 has elapsed, and the speed command value comparison block 15 converts the speed command value u into the post-addition speed command value u at the post-sign inversion time t 0 . 'until detects since it above the compensation function generator added after the speed command value in block 16 u' outputs a compensation function value u c that is constant. Otherwise, the compensation function generation block 16 outputs zero.
[0017]
For example, in the case of a servo system having a structure for converting rotational motion to linear motion of the servo motor by using a ball screw, the compensation function values u c as post-addition speed command value u 'is constant is as Equation 2. Number 2 derives an increase rate of the speed command value u in the vicinity of the direction of motion of each axis is reversed when performing circular motion, from the value of the compensation function values u c after sign inversion time t 0, the compensation function values of u c is that so as to reduce at the same rate as the rate of increase in the speed command value u.
[0018]
(Equation 2)
[0019]
In Equation 2, u c (t 0 ) is the value of the compensation function value u c at the time t 0 after the sign inversion, F is the command value of the moving speed of the controlled object in the circular motion, and r is the rotational radius of the load in the circular motion. A command value 1 is a lead of a ball screw used in the servo system.
[0020]
Equation 2 is a compensation function in the case of performing a circular motion by combining two servo systems using a ball screw. For example, a linear motor, a robot having a structure like a robot arm, or a control of a rotary motion is used. For a servo system having another structure, such as a servo system to be performed, a compensation function that makes the added speed command value u ′ constant can be easily derived, and the present invention can be applied. The same applies to motions other than the circular motion, for example, when the speed smoothly changes by linear motion of only one servo system.
[0021]
【The invention's effect】
FIG. 6 is an XY table having a structure in which an X-axis servo system is mounted on a Y-axis servo system. The position of the XY table is constantly monitored by a linear scale, and is input to a numerical controller using a personal computer. Further, a speed command voltage obtained by D / A conversion of the speed command value is output from the numerical controller, and is input to the servo amplifier of each axis.
[0022]
FIG. 7 shows the result of performing a circular motion with a radius of 50 mm using the apparatus shown in FIG. The moving speed of the table was 4.8 meters per minute. Since the error between the commanded motion trajectory and the measured motion trajectory is magnified 1000 times and displayed, the trajectory error at each corresponding point from A to D appears as a protrusion. One scale in FIG. 7 is 10 micrometers.
[0023]
FIG. 8 shows a result of applying the present invention to the numerical controller of FIG. 6 and conducting an experiment under the same conditions as in FIG. According to FIG. 8, it can be seen that the protrusion as seen in FIG. 7 has almost disappeared. In addition, the roundness when the present invention was not applied was 20.0 micrometers, whereas when the present invention was applied, the roundness was 8.6 micrometers, and the motion accuracy was greatly improved. At this time, K c for the X-axis and 5, Y-axis K c is 4, t 0 is the X axis, with Y axis 0.005 seconds.
[0024]
To generate a compensation function value u c based on the speed command value u output from the feedback compensator in the present invention, even slightly changed the state of the operating conditions and friction, it is possible to properly compensate for friction. For the same reason as described above, any known method may be used for the feedback compensating unit. Further, a feedforward method in which the differential value of the position command value is multiplied by a constant and added to the speed command value u. Controls can also be combined.
[0025]
In the embodiment of the present invention, an example is shown in which the present invention is applied to an XY table in which two servo systems are combined. However, the servo system to which the present invention can be applied is not limited to this. The present invention can be applied to a case in which a robot arm or a robot arm is used.
[Brief description of the drawings]
FIG. 1 is a schematic diagram of an error from a command trajectory caused by the influence of a frictional force.
FIG. 2 shows a servo system to which a compensation function generator is added.
FIG. 3 is a position command given to the X axis and the Y axis when performing a circular motion.
FIG. 4 shows a relationship between a speed command value and a compensation function value when performing a circular motion.
FIG. 5 is a flowchart when a compensation function value is generated by a compensation function generator.
FIG. 6 is an experimental servo system for which the present invention has been verified.
FIG. 7 is an arc trajectory when a circular motion is performed by a servo system to which no compensation function generator is added.
FIG. 8 is an arc trajectory when a circular motion is performed by a servo system to which a compensation function generator is added.
[Explanation of symbols]
1 Position command value 2 Deviation counter unit 3 Feedback compensation unit 4 Compensation function generation unit 5 Addition unit 6 D / A conversion unit 7 Servo amplifier 8 Rotary encoder 9 Servo motor 10 Drive load 11 Position detector 12 Pulse counter unit 13 Code inversion detection block 14 the sign inversion after time detection block 15 speed command value comparison block 16 compensates the function generating block u speed command value u c compensation function value u 'added after the speed command value