JP7468157B2 - Numerical control devices and machine tools - Google Patents

Numerical control devices and machine tools Download PDF

Info

Publication number
JP7468157B2
JP7468157B2 JP2020094984A JP2020094984A JP7468157B2 JP 7468157 B2 JP7468157 B2 JP 7468157B2 JP 2020094984 A JP2020094984 A JP 2020094984A JP 2020094984 A JP2020094984 A JP 2020094984A JP 7468157 B2 JP7468157 B2 JP 7468157B2
Authority
JP
Japan
Prior art keywords
calculation unit
filter
lag filter
speed
motor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020094984A
Other languages
Japanese (ja)
Other versions
JP2021189793A (en
Inventor
太樹 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2020094984A priority Critical patent/JP7468157B2/en
Publication of JP2021189793A publication Critical patent/JP2021189793A/en
Application granted granted Critical
Publication of JP7468157B2 publication Critical patent/JP7468157B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Feedback Control In General (AREA)
  • Numerical Control (AREA)

Description

本発明は、数値制御装置及び工作機械に関する。 The present invention relates to a numerical control device and a machine tool.

特許文献1は、位置指令に対する追従性の改善の為にフィードフォワード制御を行う数値制御装置を開示する。該数値制御装置は、位置指令を一階微分した値、位置指令を二階微分した値、位置指令を三階微分した値、位置指令を一階微分し更にフィルタリングした値の夫々に定数を乗算して得た値に基づき、フィードフォワード制御に用いる指令値を算出する。 Patent Document 1 discloses a numerical control device that performs feedforward control to improve tracking of a position command. The numerical control device calculates a command value to be used in the feedforward control based on values obtained by multiplying a constant with a value obtained by first differentiating a position command, a value obtained by second differentiating a position command, a value obtained by third differentiating a position command, and a value obtained by first differentiating a position command and further filtering the same.

特開2011-113475号公報JP 2011-113475 A

上記数値制御装置のフィードフォワード制御は、モータを駆動する駆動回路の一次遅れを考慮していない。故に、特に周期の短い位置指令を実行した時、該一次遅れが要因で追従性が低下する場合がある。 The feedforward control of the above-mentioned numerical control device does not take into account the first-order delay of the drive circuit that drives the motor. Therefore, when executing position commands with short cycles in particular, the first-order delay can cause a decrease in tracking ability.

本発明の目的は、周期の短い位置指令を実行した場合も追従性が良好な数値制御装置、及び工作機械を提供することである。 The object of the present invention is to provide a numerical control device and a machine tool that have good tracking performance even when short-period position commands are executed.

本発明の第一態様に係る数値制御装置は、モータの位置を制御する為の位置指令が、前記モータの位置のフィードバック信号と一致するように、前記モータの速度を制御する速度指令を比例制御により決定して出力する位置制御部と、前記位置制御部が出力した前記速度指令が、前記モータの速度のフィードバック信号と一致するように、前記モータのトルクを制御するトルク指令を比例積分制御により出力する速度制御部と、前記速度制御部が出力した前記トルク指令に基づき、前記モータのトルクを制御するトルク制御部と、を備えた数値制御装置であって、前記位置制御部は、前記位置指令を二階微分した二階微分値に第二移動平均フィルタを適用する第二平均フィルタ演算部と、前記第二平均フィルタ演算部により前記二階微分値に前記第二移動平均フィルタを適用した算出結果に、一次遅れフィルタである第二遅れフィルタを適用する第二遅れフィルタ演算部と、前記位置指令を三階微分した三階微分値に、第三移動平均フィルタを適用する第三平均フィルタ演算部と、前記第三平均フィルタ演算部により前記三階微分値に前記第三移動平均フィルタを適用した算出結果に、一次遅れフィルタである第三遅れフィルタを適用する第三遅れフィルタ演算部と、前記第二遅れフィルタ演算部、及び前記第三遅れフィルタ演算部の夫々の算出結果に定数を乗算して加算した加算値を、フィードフォワード信号として前記速度指令に加算するフィードフォワード演算部とを備えたことを特徴とする。 A numerical control device according to a first aspect of the present invention is a numerical control device comprising: a position control unit that determines and outputs a speed command for controlling the speed of the motor by proportional control so that a position command for controlling the position of the motor coincides with a feedback signal of the position of the motor; a speed control unit that outputs a torque command for controlling the torque of the motor by proportional-integral control so that the speed command output by the position control unit coincides with the feedback signal of the speed of the motor; and a torque control unit that controls the torque of the motor based on the torque command output by the speed control unit, wherein the position control unit comprises a second average filter calculation unit that applies a second moving average filter to a second-order differential value obtained by second-order differentiation of the position command; The system is characterized by comprising a second lag filter calculation unit that applies a second lag filter, which is a first-order lag filter, to the calculation result obtained by applying the second moving average filter to the second-order differential value by the filter calculation unit; a third average filter calculation unit that applies a third moving average filter to a third-order differential value obtained by third-order differentiation of the position command; a third lag filter calculation unit that applies a third lag filter, which is a first-order lag filter, to the calculation result obtained by applying the third moving average filter to the third-order differential value by the third average filter calculation unit; and a feedforward calculation unit that multiplies the calculation results of the second lag filter calculation unit and the third lag filter calculation unit by a constant, adds them together, and adds the result to the speed command as a feedforward signal.

第一態様によれば、数値制御装置の第二、第三遅れフィルタは、位置制御部の一次遅れの影響を抑制できる。故に、数値制御装置は、周期の短い位置指令を実行した時も、位置指令に対するモータの追従性を良好にできる。 According to the first aspect, the second and third lag filters of the numerical control device can suppress the influence of the first-order lag of the position control unit. Therefore, the numerical control device can improve the motor's ability to follow the position command even when a position command with a short period is executed.

第一態様において、前記位置制御部は、更に、前記位置指令を一階微分した一階微分値に、一次遅れフィルタである第一遅れフィルタを適用する第一遅れフィルタ演算部を備え、前記フィードフォワード演算部は、前記第一遅れフィルタ演算部、前記第二遅れフィルタ演算部、及び前記第三遅れフィルタ演算部の夫々の算出結果に定数を乗算して加算した加算値を、前記フィードフォワード信号として前記速度指令に加算してもよい。この場合、第一~第三遅れフィルタは、位置制御部の一次遅れの影響を更に抑制できる。故に、数値制御装置は、周期の短い位置指令を実行した時も、位置指令に対するモータの追従性を、更に良好にできる。 In the first aspect, the position control unit further includes a first lag filter calculation unit that applies a first lag filter, which is a first-order lag filter, to a first-order differential value obtained by first-order differentiation of the position command, and the feedforward calculation unit may multiply the calculation results of each of the first lag filter calculation unit, the second lag filter calculation unit, and the third lag filter calculation unit by a constant, add the result, and add the result to the speed command as the feedforward signal. In this case, the first to third lag filters can further suppress the influence of the first-order lag of the position control unit. Therefore, the numerical control device can further improve the motor's ability to follow the position command, even when a position command with a short period is executed.

第一態様において、前記第二移動平均フィルタ及び前記第三移動平均フィルタは、前記微分値のノイズを除去する移動平均フィルタであってもよい。位置制御部にて位置指令の微分を繰り返すことにより、離散化誤差が増幅してノイズが増大し、追従性が低下する可能性がある。これに対し、数値制御装置は、離散化誤差の増幅によるノイズの増大を移動平均フィルタにより抑制できるので、位置指令に対するモータの追従性を更に良好にできる。 In the first aspect, the second moving average filter and the third moving average filter may be moving average filters that remove noise from the differential value. Repeated differentiation of the position command in the position control unit may amplify discretization error, increasing noise and potentially reducing tracking ability. In response to this, the numerical control device can suppress the increase in noise caused by the amplification of discretization error using a moving average filter, thereby further improving the tracking ability of the motor to the position command.

第一態様において、前記第二遅れフィルタ、及び前記第三遅れフィルタの夫々の時定数を、前記速度制御部の速度ループの積分時定数に基づいて設定する時定数設定部を更に備えてもよい。数値制御装置は、一次遅れフィルタの時定数を速度ループの積分時定数に基づいて最適化することで、位置指令に対するモータの追従性を更に良好にできる。 In the first aspect, the device may further include a time constant setting unit that sets the time constants of the second lag filter and the third lag filter based on the integral time constant of the speed loop of the speed control unit. The numerical control device can further improve the motor's ability to follow a position command by optimizing the time constant of the first-order lag filter based on the integral time constant of the speed loop.

第一態様において、前前記第二遅れフィルタ、及び前記第三遅れフィルタの夫々の時定数を、前記速度制御部の速度ループの積分時定数、前記移動平均フィルタの適用回数、及び、前記移動平均フィルタの時定数に基づいて設定する時定数設定部を更に備えてもよい。数値制御装置は、一次遅れフィルタの時定数を、速度ループの積分時定数、移動平均フィルタの段数、及び、移動平均フィルタの時定数に基づいて最適化することで、位置指令に対するモータの追従性を更に良好にできる。 In the first aspect, the present invention may further include a time constant setting unit that sets the time constants of the second lag filter and the third lag filter based on the integral time constant of the speed loop of the speed control unit, the number of times the moving average filter is applied, and the time constant of the moving average filter. The numerical control device can further improve the motor's ability to follow a position command by optimizing the time constant of the first-order lag filter based on the integral time constant of the speed loop, the number of stages of the moving average filter, and the time constant of the moving average filter.

第一態様において、前記時定数設定部は、前記積分時定数の変更に応じ、前記第二遅れフィルタ、及び前記第三遅れフィルタの夫々の時定数を設定してもよい。数値制御装置は、積分時定数の変更後も、位置指令に対するモータの追従性を良好にできる。 In the first aspect, the time constant setting unit may set the time constants of the second lag filter and the third lag filter in response to a change in the integral time constant. The numerical control device can improve the motor's ability to follow a position command even after the integral time constant is changed.

本発明の第二態様に係る工作機械は、第一態様に係る数値制御装置と、前記モータと
を備えたことを特徴とする。第二態様によれば、第一態様と同様の効果を奏する。
A machine tool according to a second aspect of the present invention includes the numerical control device according to the first aspect and the motor. According to the second aspect, the same effects as those of the first aspect can be obtained.

工作機械1の斜視図。FIG. 数値制御装置30と工作機械1の電気的構成を示すブロック図。FIG. 2 is a block diagram showing the electrical configuration of the numerical control device 30 and the machine tool 1. 数値制御装置30の機能ブロック図。FIG. 2 is a functional block diagram of a numerical control device 30. 数値制御装置30の機能概要の説明図。FIG. 2 is an explanatory diagram of a functional outline of a numerical control device 30. 主処理の流れ図。1 is a flow chart of the main process. モータ50の速度と位置偏差との関係を示すグラフ。5 is a graph showing the relationship between the speed and position deviation of the motor 50.

本発明の実施形態を説明する。以下説明は、図中に矢印で示す左右、前後、上下を使用する。工作機械1の左右方向、前後方向、上下方向は夫々工作機械1のX軸方向、Y軸方向、Z軸方向である。図1に示す工作機械1は主軸9に装着した工具4を回転し、テーブル13上面に保持した被削材3に切削加工を施す機械である。数値制御装置30(図2参照)は工作機械1の動作を制御する。 An embodiment of the present invention will be described. In the following description, the left/right, front/back, and up/down directions shown by arrows in the figures will be used. The left/right, front/back, and up/down directions of the machine tool 1 are the X-axis, Y-axis, and Z-axis directions of the machine tool 1, respectively. The machine tool 1 shown in Figure 1 is a machine that rotates a tool 4 attached to a spindle 9 and performs cutting on a workpiece 3 held on the upper surface of a table 13. A numerical control device 30 (see Figure 2) controls the operation of the machine tool 1.

<工作機械1の構造>
図1を参照し、工作機械1の構造を説明する。工作機械1は、基台2、コラム5、主軸ヘッド7、主軸9、テーブル装置10、工具交換装置20、制御箱6、操作パネル15(図2参照)等を備える。基台2は金属製の略直方体状の土台である。コラム5は基台2上部後方に立設する。主軸ヘッド7はコラム5前面に沿ってZ軸方向に移動可能に設ける。主軸ヘッド7は内部に主軸9を回転可能に支持する。主軸9は下部に装着穴(図示略)を有する。主軸9は該装着穴に工具4を装着し、主軸モータ52(図2参照)の駆動で回転する。主軸モータ52は主軸ヘッド7に設ける。主軸ヘッド7はコラム5前面に設けたZ軸移動機構(図示略)でZ軸方向に移動する。数値制御装置30はZ軸モータ51(図2参照)の駆動を制御することで、主軸ヘッド7をZ軸方向に移動制御する。
<Structure of machine tool 1>
The structure of the machine tool 1 will be described with reference to FIG. 1. The machine tool 1 includes a base 2, a column 5, a spindle head 7, a spindle 9, a table device 10, a tool changer 20, a control box 6, an operation panel 15 (see FIG. 2), and the like. The base 2 is a metal base in the shape of a substantially rectangular parallelepiped. The column 5 is erected at the rear of the upper part of the base 2. The spindle head 7 is provided so as to be movable in the Z-axis direction along the front surface of the column 5. The spindle head 7 rotatably supports the spindle 9 inside. The spindle 9 has a mounting hole (not shown) at the bottom. The tool 4 is mounted in the mounting hole of the spindle 9, and the spindle 9 is rotated by the drive of a spindle motor 52 (see FIG. 2). The spindle motor 52 is provided on the spindle head 7. The spindle head 7 moves in the Z-axis direction by a Z-axis movement mechanism (not shown) provided in front of the column 5. The numerical control device 30 controls the drive of the Z-axis motor 51 (see FIG. 2) to control the movement of the spindle head 7 in the Z-axis direction.

テーブル装置10は、Y軸移動機構(図示略)、Y軸テーブル12、X軸移動機構(図示略)、テーブル13等を備える。Y軸移動機構は基台2上面前側に設け、Y軸レール、Y軸ボール螺子、Y軸モータ54(図2参照)等を備える。Y軸レールとY軸ボール螺子はY軸方向に延びる。Y軸レールは上面にY軸テーブル12をY軸方向に案内する。Y軸テーブル12は略直方体状に形成し、底部外面にナット(図示略)を備える。該ナットはY軸ボール螺子に螺合する。Y軸モータ54がY軸ボール螺子を回転すると、Y軸テーブル12はナットと共にY軸レールに沿って移動する。故にY軸移動機構はY軸テーブル12をY軸方向に移動可能に支持する。 The table device 10 includes a Y-axis movement mechanism (not shown), a Y-axis table 12, an X-axis movement mechanism (not shown), a table 13, etc. The Y-axis movement mechanism is provided on the front side of the upper surface of the base 2, and includes a Y-axis rail, a Y-axis ball screw, a Y-axis motor 54 (see FIG. 2), etc. The Y-axis rail and the Y-axis ball screw extend in the Y-axis direction. The Y-axis rail guides the Y-axis table 12 in the Y-axis direction on the upper surface. The Y-axis table 12 is formed in a roughly rectangular parallelepiped shape and includes a nut (not shown) on the bottom outer surface. The nut is screwed into the Y-axis ball screw. When the Y-axis motor 54 rotates the Y-axis ball screw, the Y-axis table 12 moves along the Y-axis rail together with the nut. Therefore, the Y-axis movement mechanism supports the Y-axis table 12 so that it can move in the Y-axis direction.

X軸移動機構はY軸テーブル12上面に設け、X軸レール(図示略)、X軸ボール螺子(図示略)、X軸モータ53(図2参照)等を備える。X軸レールとX軸ボール螺子はX軸方向に延びる。テーブル13は平面視矩形板状に形成し、Y軸テーブル12上面に設ける。テーブル13は底部にナット(図示略)を備える。該ナットはX軸ボール螺子に螺合する。X軸モータ53がX軸ボール螺子を回転すると、テーブル13はナットと共にX軸レールに沿って移動する。故にX軸移動機構はテーブル13をX軸方向に移動可能に支持する。故にテーブル13は、Y軸移動機構、Y軸テーブル12、X軸移動機構により、基台2上をX軸方向とY軸方向に移動可能である。 The X-axis movement mechanism is provided on the upper surface of the Y-axis table 12, and includes an X-axis rail (not shown), an X-axis ball screw (not shown), an X-axis motor 53 (see FIG. 2), etc. The X-axis rail and the X-axis ball screw extend in the X-axis direction. The table 13 is formed in a rectangular plate shape in a plan view, and is provided on the upper surface of the Y-axis table 12. The table 13 includes a nut (not shown) at the bottom. The nut is screwed into the X-axis ball screw. When the X-axis motor 53 rotates the X-axis ball screw, the table 13 moves along the X-axis rail together with the nut. Therefore, the X-axis movement mechanism supports the table 13 so that it can move in the X-axis direction. Therefore, the table 13 can move in the X-axis direction and the Y-axis direction on the base 2 by the Y-axis movement mechanism, the Y-axis table 12, and the X-axis movement mechanism.

工具交換装置20は主軸ヘッド7の前側に設け、円盤型の工具マガジン21、マガジンモータ55(図2参照)等を備える。工具マガジン21は外周に複数の工具(図示略)を放射状に保持し、工具交換指令が指示する工具を工具交換位置に位置決めする。工具交換指令はNCプログラムで指令する。工具交換位置は工具マガジン21の最下部位置である。工具交換装置20はマガジンモータ55の駆動により、主軸9に装着する工具4と工具マガジン21に取り付けられた工具とを主軸ヘッド7の上昇、工具マガジン21の回転、主軸ヘッド7の下降の一連の動作により入れ替え交換する。 The tool changer 20 is provided in front of the spindle head 7 and includes a disk-shaped tool magazine 21, a magazine motor 55 (see FIG. 2), etc. The tool magazine 21 holds multiple tools (not shown) radially on its outer periphery and positions the tool specified by a tool change command at the tool change position. The tool change command is issued by an NC program. The tool change position is the lowest position of the tool magazine 21. Driven by the magazine motor 55, the tool changer 20 swaps the tool 4 attached to the spindle 9 with the tool attached to the tool magazine 21 through a series of operations that lift the spindle head 7, rotate the tool magazine 21, and lower the spindle head 7.

制御箱6は数値制御装置30(図2参照)を格納する。数値制御装置30は、工作機械1に設けたZ軸モータ51、主軸モータ52、X軸モータ53、Y軸モータ54、マガジンモータ55(図2参照)を夫々制御し、テーブル13上に保持した被削材3と主軸9に装着した工具4を相対移動することで各種加工を被削材3に施す。各種加工とは、例えばドリル、タップ等を用いた穴空け加工、エンドミル、フライス等を用いた側面加工等である。 The control box 6 houses a numerical control device 30 (see FIG. 2). The numerical control device 30 controls the Z-axis motor 51, spindle motor 52, X-axis motor 53, Y-axis motor 54, and magazine motor 55 (see FIG. 2) provided on the machine tool 1, and performs various types of machining on the workpiece 3 by moving the workpiece 3 held on the table 13 relative to the tool 4 attached to the spindle 9. The various types of machining include, for example, drilling using a drill or tap, side machining using an end mill or milling cutter, etc.

操作パネル15は、例えば工作機械1を覆うカバー(図示略)の外壁に設ける。操作パネル15は操作部16と表示部17(図2参照)を備える。操作部16は各種情報、操作指示等の入力を受け付け、後述する数値制御装置30に出力する。表示部17は後述する数値制御装置30からの指令に基づき、各種画面を表示する。 The operation panel 15 is provided, for example, on the outer wall of a cover (not shown) that covers the machine tool 1. The operation panel 15 includes an operation unit 16 and a display unit 17 (see FIG. 2). The operation unit 16 accepts inputs of various information, operation instructions, etc., and outputs them to the numerical control device 30, which will be described later. The display unit 17 displays various screens based on commands from the numerical control device 30, which will be described later.

<電気的構成>
図2を参照し、数値制御装置30と工作機械1の電気的構成を説明する。数値制御装置30は、CPU31、ROM32、RAM33、記憶装置34、入出力部35、駆動回路51A~55A等を備える。ROM32は各種設定情報を記憶する。RAM33は各種情報を一時的に記憶する。記憶装置34は不揮発性であり、NCプログラム、各種情報を記憶する。NCプログラムは各種制御指令を含む複数行で構成し、工作機械1の軸移動、工具交換等を含む各種動作を行単位で制御する。CPU31は、NCプログラムの指令を一つずつ読み込んで各種動作を実行する。
<Electrical configuration>
The electrical configuration of the numerical control device 30 and the machine tool 1 will be described with reference to Figure 2. The numerical control device 30 comprises a CPU 31, a ROM 32, a RAM 33, a storage device 34, an input/output unit 35, drive circuits 51A-55A, etc. The ROM 32 stores various setting information. The RAM 33 temporarily stores various information. The storage device 34 is non-volatile, and stores an NC program and various information. The NC program is made up of multiple lines including various control commands, and controls various operations of the machine tool 1, including axis movement and tool replacement, on a line-by-line basis. The CPU 31 reads the commands of the NC program one by one and executes various operations.

駆動回路51Aは、工作機械1のZ軸モータ51とエンコーダ51Bに接続する。駆動回路52Aは、工作機械1の主軸モータ52とエンコーダ52Bに接続する。駆動回路53Aは、工作機械1のX軸モータ53とエンコーダ53Bに接続する。駆動回路54Aは、工作機械1のY軸モータ54とエンコーダ54Bに接続する。駆動回路55Aは、工作機械1の工具マガジン21を駆動するマガジンモータ55とエンコーダ55Bに接続する。Z軸モータ51、主軸モータ52、X軸モータ53、Y軸モータ54、マガジンモータ55は何れもサーボモータである。駆動回路51A、52A、53A、54A、55Aを、駆動回路5Aと総称する。Z軸モータ51、主軸モータ52、X軸モータ53、Y軸モータ54、マガジンモータ55を、モータ50と総称する。エンコーダ51B、52B、53B、54B、55Bを、エンコーダ5Bと総称する。エンコーダ5Bは、対応するモータ50の回転位置(以下、モータ50の位置と称す。)を特定する。 Drive circuit 51A is connected to Z-axis motor 51 and encoder 51B of machine tool 1. Drive circuit 52A is connected to spindle motor 52 and encoder 52B of machine tool 1. Drive circuit 53A is connected to X-axis motor 53 and encoder 53B of machine tool 1. Drive circuit 54A is connected to Y-axis motor 54 and encoder 54B of machine tool 1. Drive circuit 55A is connected to magazine motor 55 and encoder 55B that drive tool magazine 21 of machine tool 1. Z-axis motor 51, spindle motor 52, X-axis motor 53, Y-axis motor 54, and magazine motor 55 are all servo motors. Drive circuits 51A, 52A, 53A, 54A, and 55A are collectively referred to as drive circuits 5A. Z-axis motor 51, spindle motor 52, X-axis motor 53, Y-axis motor 54, and magazine motor 55 are collectively referred to as motor 50. Encoders 51B, 52B, 53B, 54B, and 55B are collectively referred to as encoder 5B. Encoder 5B identifies the rotational position of the corresponding motor 50 (hereinafter referred to as the position of motor 50).

駆動回路5AはCPU31から指令を受け、対応するモータ50に駆動電流を夫々出力する。駆動回路5Aはモータ50の位置を示すフィードバック信号をエンコーダ5Bから受け、フィードバック制御を行う。入出力部35は操作パネル15の操作部16と表示部17に夫々接続する。 The drive circuit 5A receives commands from the CPU 31 and outputs drive currents to the corresponding motors 50. The drive circuit 5A receives a feedback signal indicating the position of the motors 50 from the encoder 5B and performs feedback control. The input/output unit 35 is connected to the operation unit 16 and the display unit 17 of the operation panel 15.

<数値制御装置30の機能概要>
図3を参照し、数値制御装置30の機能概要を説明する。図3に示すように、数値制御装置30の駆動回路5Aは、機能ブロックとして位置制御部6A、速度制御部7A、トルク制御部8A、速度指令入力部9Aを有する。
<Functional Overview of Numerical Control Device 30>
The following describes an outline of the functions of the numerical control device 30 with reference to Fig. 3. As shown in Fig. 3, a drive circuit 5A of the numerical control device 30 has, as functional blocks, a position control unit 6A, a speed control unit 7A, a torque control unit 8A, and a speed command input unit 9A.

CPU31(図2参照)は、モータ50の位置を制御する為の位置指令を、NCプログラムから一行分ずつ読み込み、速度指令入力部9Aに出力する。速度指令入力部9Aは、CPU31から取得した位置指令が示す位置迄モータ50を移動する時の速度を示す速度指令を、位置指令の一階微分演算により決定する。速度指令入力部9Aは、決定した速度指令を、後述の位置制御部6Aに出力する。 The CPU 31 (see FIG. 2) reads the position command for controlling the position of the motor 50, one line at a time, from the NC program, and outputs it to the speed command input unit 9A. The speed command input unit 9A determines a speed command indicating the speed at which the motor 50 should be moved to the position indicated by the position command obtained from the CPU 31, by performing a first-order differential operation on the position command. The speed command input unit 9A outputs the determined speed command to the position control unit 6A, which will be described later.

位置制御部6Aは、エンコーダ5Bが出力するモータ50の位置のフィードバック信号と位置指令が一致するようにモータ50の速度を制御する速度指令を、比例制御により補正して決定し、後述の速度制御部7Aに出力する。位置制御部6Aは、加速度演算部61B、加加速度演算部61C、第二平均フィルタ演算部62B、第三平均フィルタ演算部62C、第一遅れフィルタ演算部63A、第二遅れフィルタ演算部63B、第三遅れフィルタ演算部63C、第一定数演算部64A、第二定数演算部64B、第三定数演算部64C、フィードフォワード演算部(FF演算部)65、位置指令変換部66、位置ループゲイン乗算部67、及び減算器69Aを有する。 The position control unit 6A determines a speed command that controls the speed of the motor 50 so that the feedback signal of the position of the motor 50 output by the encoder 5B matches the position command by correcting it using proportional control, and outputs it to the speed control unit 7A described below. The position control unit 6A has an acceleration calculation unit 61B, a jerk calculation unit 61C, a second average filter calculation unit 62B, a third average filter calculation unit 62C, a first lag filter calculation unit 63A, a second lag filter calculation unit 63B, a third lag filter calculation unit 63C, a first constant calculation unit 64A, a second constant calculation unit 64B, a third constant calculation unit 64C, a feedforward calculation unit (FF calculation unit) 65, a position command conversion unit 66, a position loop gain multiplication unit 67, and a subtractor 69A.

第一遅れフィルタ演算部63Aは、速度指令入力部9Aから入力した速度指令に、時定数Tの一次遅れフィルタである第一遅れフィルタEを適用する。即ち、第一遅れフィルタ演算部63Aは、元の位置指令に対して速度指令入力部9Aが一階微分演算を行った演算結果に、第一遅れフィルタEを適用する。位置指令に対して一階微分演算を行うことで生成した速度指令の値を、一階微分値という。第一定数演算部64Aは、第一遅れフィルタ演算部63Aで一階微分値に第一遅れフィルタEを適用した演算結果に、定数Cを乗算する。 The first lag filter calculation unit 63A applies a first lag filter E1 , which is a first-order lag filter with a time constant T1 , to the speed command input from the speed command input unit 9A. That is, the first lag filter calculation unit 63A applies the first lag filter E1 to the calculation result obtained by the speed command input unit 9A performing a first-order differential operation on the original position command. The value of the speed command generated by performing a first-order differential operation on the position command is called a first-order differential value. The first constant calculation unit 64A multiplies the calculation result obtained by applying the first lag filter E1 to the first-order differential value by the first lag filter calculation unit 63A, by a constant C1 .

加速度演算部61Bは、速度指令入力部9Aから入力した速度指令に対して一階微分演算を行う。即ち、加速度演算部61Bは、元の位置指令に対して二階微分演算を行い、加速度指令を生成する。加速度演算部61Bが演算を行うことで生成した加速度指令の値を、二階微分値と称す。第二平均フィルタ演算部62Bは、加速度演算部61Bが生成した二階微分値に第二移動平均フィルタFを適用する。第二遅れフィルタ演算部63Bは、第二平均フィルタ演算部62Bが二階微分値に第二移動平均フィルタFを適用した演算結果に、時定数Tの一次遅れフィルタである第二遅れフィルタEを適用する。第二定数演算部64Bは、第二遅れフィルタ演算部63Bで第二遅れフィルタEを適用した演算結果に、定数Cを乗算する。 The acceleration calculation unit 61B performs a first-order differential operation on the speed command input from the speed command input unit 9A. That is, the acceleration calculation unit 61B performs a second-order differential operation on the original position command to generate an acceleration command. The value of the acceleration command generated by the acceleration calculation unit 61B is called a second-order differential value. The second average filter calculation unit 62B applies a second moving average filter F2 to the second-order differential value generated by the acceleration calculation unit 61B. The second lag filter calculation unit 63B applies a second lag filter E2, which is a first-order lag filter with a time constant T2 , to the calculation result obtained by applying the second moving average filter F2 to the second-order differential value by the second average filter calculation unit 62B. The second constant calculation unit 64B multiplies the calculation result obtained by applying the second lag filter E2 by a constant C2 in the second lag filter calculation unit 63B.

加加速度演算部61Cは、第二平均フィルタ演算部62Bが二階微分値に第二移動平均フィルタFを適用した演算結果に対して一階微分演算を行う。即ち、加加速度演算部61Cは、元の位置指令に対して三階微分演算を行い、加加速度指令を生成する。加加速度演算部61Cが演算を行うことで生成した加加速度指令の値を、三階微分値と称す。第三平均フィルタ演算部62Cは、加加速度演算部61Cが生成した三階微分値に第三移動平均フィルタFを適用する。第三遅れフィルタ演算部63Cは、第三平均フィルタ演算部62Cが三階微分値に第三移動平均フィルタFを適用した演算結果に、時定数Tの一次遅れフィルタである第三遅れフィルタE適用する。第三定数演算部64Cは、第三遅れフィルタ演算部63Cで第三遅れフィルタEを適用した演算結果に、定数Cを乗算する。 The jerk calculation unit 61C performs a first-order differential calculation on the calculation result obtained by applying the second moving average filter F2 to the second-order differential value by the second average filter calculation unit 62B. That is, the jerk calculation unit 61C performs a third-order differential calculation on the original position command to generate a jerk command. The value of the jerk command generated by the calculation performed by the jerk calculation unit 61C is called a third-order differential value. The third average filter calculation unit 62C applies a third moving average filter F3 to the third-order differential value generated by the jerk calculation unit 61C. The third lag filter calculation unit 63C applies a third lag filter E3, which is a first-order lag filter with a time constant T3 , to the calculation result obtained by applying the third moving average filter F3 to the third-order differential value by the third average filter calculation unit 62C . The third constant calculation unit 64C multiplies the calculation result obtained by applying the third lag filter E3 by a constant C3 in the third lag filter calculation unit 63C.

上記において、加速度演算部61B、加加速度演算部61Cを、速度演算部61と総称する。第二平均フィルタ演算部62B、第三平均フィルタ演算部62Cを、移動平均フィルタ演算部62と総称する。第一遅れフィルタ演算部63A、第二遅れフィルタ演算部63B、第三遅れフィルタ演算部63Cを、一次遅れフィルタ演算部63と総称する。第一定数演算部64A、第二定数演算部64B、第三定数演算部64Cを、定数演算部64と総称する。 In the above, the acceleration calculation unit 61B and the jerk calculation unit 61C are collectively referred to as the speed calculation unit 61. The second average filter calculation unit 62B and the third average filter calculation unit 62C are collectively referred to as the moving average filter calculation unit 62. The first lag filter calculation unit 63A, the second lag filter calculation unit 63B, and the third lag filter calculation unit 63C are collectively referred to as the first-order lag filter calculation unit 63. The first constant calculation unit 64A, the second constant calculation unit 64B, and the third constant calculation unit 64C are collectively referred to as the constant calculation unit 64.

フィードフォワード(FF)演算部65は、第一定数演算部64A、第二定数演算部64B、第三定数演算部64Cの夫々の演算結果の加算値を、フィードフォワード信号として、速度指令入力部9Aから入力した速度指令に加算する。位置制御部6Aは、FF演算部65による演算結果を示す信号を、補正後の速度指令として、後述の速度制御部7Aに出力する。即ち、速度演算部61、移動平均フィルタ演算部62、一次遅れフィルタ演算部63、定数演算部64、及びFF演算部65は、比例制御により速度指令を補正して決定し、速度制御部7Aに出力する。 The feedforward (FF) calculation unit 65 adds the sum of the calculation results of the first constant calculation unit 64A, the second constant calculation unit 64B, and the third constant calculation unit 64C as a feedforward signal to the speed command input from the speed command input unit 9A. The position control unit 6A outputs a signal indicating the calculation result by the FF calculation unit 65 to the speed control unit 7A described below as a corrected speed command. That is, the speed calculation unit 61, the moving average filter calculation unit 62, the first-order lag filter calculation unit 63, the constant calculation unit 64, and the FF calculation unit 65 correct and determine the speed command by proportional control, and output it to the speed control unit 7A.

尚、上記では、位置指令を速度指令入力部9Aにより一階微分し、加速度演算部61Bにより二階微分し、加加速度演算部61Cにより三階微分する。故に、位置指令の離散化誤差が増幅し、ノイズが大きくなる時がある。これに対し、位置制御部6Aは、該ノイズがモータ50の位置偏差に悪影響を及ぼすことを抑制する為、移動平均フィルタ演算部62により移動平均フィルタFを適用し、各微分値のノイズを除去する。更に、位置制御部6Aは、微分演算の段数に応じて移動平均フィルタF、F(移動平均フィルタFと総称する。)を適用するよう、二階微分値に第二移動平均フィルタFを適用する第二平均フィルタ演算部62Bと、三階微分値に第三移動平均フィルタFを適用する第三平均フィルタ演算部62Cとを多段に設ける。これにより、微分値のノイズの影響を最小限に抑制する。尚、第二移動平均フィルタFと第三移動平均フィルタFの夫々の時定数は、位置制御部6Aの処理周期の2倍とするのが良い。 In the above, the position command is differentiated by the speed command input unit 9A, differentiated by the acceleration calculation unit 61B, and differentiated by the jerk calculation unit 61C. Therefore, the discretization error of the position command may be amplified, and noise may increase. In response to this, the position control unit 6A applies a moving average filter F by the moving average filter calculation unit 62 to remove noise from each differential value in order to prevent the noise from adversely affecting the position deviation of the motor 50. Furthermore, the position control unit 6A is provided with multiple stages, including a second average filter calculation unit 62B that applies a second moving average filter F2 to the second-order differential value and a third average filter calculation unit 62C that applies a third moving average filter F3 to the third-order differential value, so that moving average filters F2 and F3 (collectively referred to as moving average filters F ) are applied according to the number of stages of differentiation. This minimizes the influence of noise on the differential value. It is preferable that the time constant of each of the second moving average filter F2 and the third moving average filter F3 is twice the processing period of the position control section 6A.

又、上記では、FF演算部65が出力する速度指令に一遅れ要素分の位相ずれが発生する時がある。これに対し、位置制御部6Aは、一次遅れフィルタ演算部63により第一遅れフィルタE~第三遅れフィルタE(一次遅れフィルタEと総称する。)を適用し、モータ50の位置偏差を補償する。更に、数値制御装置30は、モータ50の駆動条件が変化した場合、後述する算出方法によって一次遅れフィルタEの時定数T~T(時定数Tと総称する。)を算出し、一次遅れフィルタEを切り替える。 In the above, a phase shift of one delay element may occur in the speed command output by the FF calculation unit 65. In response to this, the position control unit 6A applies the first delay filter E1 to the third lag filter E3 (collectively referred to as the first delay filter E) by the first-order lag filter calculation unit 63 to compensate for the position deviation of the motor 50. Furthermore, when the driving conditions of the motor 50 change, the numerical control device 30 calculates the time constants T1 to T3 (collectively referred to as the time constant T) of the first-order lag filter E by a calculation method described later, and switches the first-order lag filter E.

位置指令変換部66は、速度指令入力部9Aから入力した位置指令を一階積分し、元の位置指令に変換する。減算器69Aは、位置指令変換部66が変換した位置指令の値から、エンコーダ5Bが出力するモータ50の位置のフィードバック信号を減算し、位置指令が示すモータ50の位置に対する実際位置のモータ50の位置の差分(位置偏差)を算出する。位置ループゲイン乗算部67は、減算器69Aの算出結果に位置ループゲインKpを乗算し、位置偏差に対応するモータ50の速度のフィードバック信号として、後述の速度制御部7Aに出力する。 The position command conversion unit 66 performs first-order integration on the position command input from the speed command input unit 9A and converts it into the original position command. The subtractor 69A subtracts the feedback signal of the position of the motor 50 output by the encoder 5B from the value of the position command converted by the position command conversion unit 66, and calculates the difference (position deviation) between the actual position of the motor 50 and the position of the motor 50 indicated by the position command. The position loop gain multiplication unit 67 multiplies the calculation result of the subtractor 69A by the position loop gain Kp, and outputs it to the speed control unit 7A described below as a feedback signal of the speed of the motor 50 corresponding to the position deviation.

速度制御部7Aは、モータ50のトルクを制御するトルク指令を、比例積分制御により、後述のトルク制御部8Aに出力する。より詳細には、速度制御部7Aは、位置ループゲイン乗算部67が出力したモータ50の速度のフィードバック信号と、FF演算部65が出力した速度指令が一致するように、トルク指令をトルク制御部8Aに出力する。速度制御部7Aは加算器71を含む。加算器71は、位置ループゲイン乗算部67が出力したモータ50の速度のフィードバック信号、及びFF演算部65が出力した速度指令を加算してトルク指令を生成する。速度制御部7Aは、生成したトルク信号を、後述のトルク制御部8Aに出力する。 The speed control unit 7A outputs a torque command to control the torque of the motor 50 to the torque control unit 8A described later by proportional-integral control. More specifically, the speed control unit 7A outputs a torque command to the torque control unit 8A so that the feedback signal of the motor 50 speed output by the position loop gain multiplication unit 67 matches the speed command output by the FF calculation unit 65. The speed control unit 7A includes an adder 71. The adder 71 generates a torque command by adding the feedback signal of the motor 50 speed output by the position loop gain multiplication unit 67 and the speed command output by the FF calculation unit 65. The speed control unit 7A outputs the generated torque signal to the torque control unit 8A described later.

速度制御部7Aによる上記制御のゲインを、速度ループ積分ゲインという。数値制御装置30は、軸反転時の象限突起を抑制する等の目的で、工作機械1の動作中に速度ループ積分ゲインを切り替える時がある。 The gain of the above control by the speed control unit 7A is called the speed loop integral gain. The numerical control device 30 may switch the speed loop integral gain while the machine tool 1 is in operation, for example to suppress quadrant projections during axis reversal.

トルク制御部8Aは、速度制御部7Aが出力したトルク指令に基づいてモータ50を駆動し、モータ50のトルクを制御する。 The torque control unit 8A drives the motor 50 based on the torque command output by the speed control unit 7A and controls the torque of the motor 50.

図4を参照し、位置制御部6Aに対する入力値と出力値との関係について説明する。但し、ゲイン乗算部81は、一階微分値にゲインAを乗算する。ゲイン乗算部82は、二階微分値にゲインBを乗算する。ゲイン乗算部83は、三階微分値にゲインAを乗算する。尚、図3に示す定数演算部64は省略してある。 The relationship between the input value and the output value for the position control unit 6A will be described with reference to FIG. 4. However, the gain multiplication unit 81 multiplies the first-order differential value by a gain A. The gain multiplication unit 82 multiplies the second-order differential value by a gain B. The gain multiplication unit 83 multiplies the third-order differential value by a gain A. Note that the constant calculation unit 64 shown in FIG. 3 is omitted.

NCプログラムのn(nは整数)番目の位置指令に基づき、位置制御部6Aが速度制御部7A(図2参照)に出力する速度指令の出力値Y[n]は、式(1-1)により表せる。但し、X[n]は、n番目の位置指令の入力値を示す
Y[n]=AX[n]+AX[n-1]-BY[n-1] (1-1)
但し、ゲインA、Bは夫々、式(1-2)により表せる。
A=1/(1+2t)、B=(1-2t)/(1+2t) (1-2)
(iは1~3の何れかの整数)は、第i遅れフィルタEの一次遅れ時定数として定義し、式(1-3)の関係を満たす。但し、Tは第i遅れフィルタEの時定数を示す。Tは位置制御部6Aの処理周期を示す。
=T/T (1-3)
The output value Y[n] of a speed command output from the position control unit 6A to the speed control unit 7A (see FIG. 2) based on the nth (n is an integer) position command of the NC program can be expressed by the following formula (1-1): Y[n]=AX[n]+AX[n-1]-BY[n-1] (1-1) where X[n] indicates the input value of the nth position command.
Here, the gains A and B can be expressed by the formula (1-2).
A = 1/(1 + 2t i ), B = (1 - 2t i )/(1 + 2t i ) (1 - 2)
t i (i is an integer from 1 to 3) is defined as the first-order lag time constant of the i-th lag filter E i and satisfies the relationship of equation (1-3), where T i represents the time constant of the i-th lag filter E i , and T s represents the processing cycle of position control unit 6A.
t i =T i /T s (1-3)

<一次遅れフィルタEの時定数の算出方法>
一次遅れフィルタEの時定数Tの算出方法を説明する。数値制御装置30は、低周波領域における位相特性Pと一次遅れ要素Qとの二乗誤差の合計値f(ω)が最も小さくなる時定数Tを求める。位相特性Pは、位置制御部6Aの処理周期の2倍の時定数Tの移動平均フィルタを(i-1)段重ねた後一次遅れフィルタ(時定数T)を適用した時の位相特性である。一次遅れ要素Qは、速度ループ積分時定数TVIの一次遅れ要素である。尚、速度ループ積分時定数TVIは、速度制御部7A(図3参照)の速度ループ積分ゲインの逆数である。低周波領域は、制御対象であるモータ50に対する一般的な位置指令の波形に含まれる主要な周波数帯域を意味する。
<Calculation method of time constant of first-order lag filter Ei >
A method of calculating the time constant T i of the first-order lag filter E i will be described. The numerical control device 30 obtains the time constant T i that minimizes the sum of square errors f ec ) between the phase characteristic P and the first-order lag element Q in the low-frequency region. The phase characteristic P is the phase characteristic when a first-order lag filter (time constant T i ) is applied after stacking (i-1) moving average filters with a time constant T c that is twice the processing cycle of the position control unit 6A. The first-order lag element Q is a first-order lag element of the speed loop integral time constant T VI . The speed loop integral time constant T VI is the reciprocal of the speed loop integral gain of the speed control unit 7A (see FIG. 3). The low-frequency region refers to the main frequency band included in the waveform of a general position command for the motor 50, which is the object of control.

数値制御装置30は、主要な周波数帯域の上限値をパラメータωとして、制御対象に応じて適切に定める。数値制御装置30は、ω=ω以下の領域での位相特性の二乗誤差の合計値f(ω)が最小となる時定数Tを、準ニュートン法等の最適化計算により求める。 The numerical controller 30 appropriately determines the upper limit of the main frequency band as a parameter ωc according to the control target. The numerical controller 30 obtains the time constant T i that minimizes the sum of square errors f ec ) of the phase characteristics in the region below ω=ω c by an optimization calculation such as the quasi-Newton method.

低周波領域での二乗誤差の合計値は、式(2-1)により表せる。

Figure 0007468157000001
即ち、数値制御装置30は、速度ループ積分時定数TVI、移動平均フィルタFの適用回数i、及び、移動平均フィルタFの時定数Tcに基づき、一次遅れフィルタEの時定数Tを算出できる。 The sum of the squared errors in the low frequency region can be expressed by equation (2-1).
Figure 0007468157000001
That is, the numerical control device 30 can calculate the time constant T of the first-order lag filter E based on the velocity loop integral time constant TVI, the number of times i the moving average filter F is applied, and the time constant Tc of the moving average filter F.

i=1の時、式(2-1)は式(2-2)で表せる。

Figure 0007468157000002
e1(ω)を最小化する為の第一遅れフィルタEの時定数Tは、TVIとなる。 When i = 1, equation (2-1) can be expressed as equation (2-2).
Figure 0007468157000002
The time constant T1 of the first lag filter E1 for minimizing f e1c ) is T VI .

i=2の時、式(2-1)は式(2-3)で表せる。

Figure 0007468157000003
When i = 2, equation (2-1) can be expressed as equation (2-3).
Figure 0007468157000003

i=3の時、式(2-1)は式(2-4)のように表せる。

Figure 0007468157000004
数値制御装置30は、fe2(ω)を最小化する為の第二遅れフィルタEの時定数T、及び、fe3(ω)を最小化する為の第三遅れフィルタEの時定数Tを、夫々、最適化計算により算出する。 When i = 3, equation (2-1) can be expressed as equation (2-4).
Figure 0007468157000004
The numerical control device 30 calculates, by optimization calculation, the time constant T2 of the second lag filter E2 for minimizing f e2c ), and the time constant T3 of the third lag filter E3 for minimizing f e3c ).

<主処理>
図5を参照し、主処理を説明する。数値制御装置30の駆動回路5Aは、CPU31がNCプログラムに基づき位置指令を出力する時、主処理を実行する。CPU31は、工作機械1の電源投入後、主処理の実行が初めてか判定する(S11)。CPU31は、主処理を初めて実行する時(S11:YES)、一次遅れフィルタE(第一遅れフィルタE~第三遅れフィルタE)を初期化する(S13)。CPU31は、式(1-1)にてX[n-1]とY[n-1]の夫々が0の時の関係を満たす一次遅れフィルタEに初期化する。CPU31は処理をS17に進める。
<Main processing>
The main process will be described with reference to FIG. 5. The drive circuit 5A of the numerical control device 30 executes the main process when the CPU 31 outputs a position command based on the NC program. The CPU 31 determines whether the main process is executed for the first time after the power supply to the machine tool 1 is turned on (S11). When the CPU 31 executes the main process for the first time (S11: YES), it initializes the first-order lag filters E (first lag filter E 1 to third lag filter E 3 ) (S13). The CPU 31 initializes the first-order lag filters E to those that satisfy the relationship when X[n-1] and Y[n-1] are both 0 in the formula (1-1). The CPU 31 advances the process to S17.

CPU31は、工作機械1の電源投入後、主処理の実行が初めてでない時(S11:NO)、速度ループ積分ゲインを変更したか判定する(S15)。CPU31は、速度ループ積分ゲインを変更していない時(S15:NO)、主処理を終了する。CPU31は、速度ループ積分ゲインを変更した時(S15:YES)、一次遅れフィルタEの時定数Tを設定する為に処理をS17に進める。 When the main process is not being executed for the first time after the machine tool 1 is powered on (S11: NO), the CPU 31 determines whether the speed loop integral gain has been changed (S15). When the speed loop integral gain has not been changed (S15: NO), the CPU 31 ends the main process. When the speed loop integral gain has been changed (S15: YES), the CPU 31 advances the process to S17 to set the time constant T of the first-order lag filter E.

CPU31は、式(2-2)に基づいて第一遅れフィルタEの時定数Tを算出し、式(2-3)に基づいて第二遅れフィルタEの時定数Tを算出し、式(2-4)に基づいて第三遅れフィルタEの時定数Tを算出する(S17)。CPU31は、算出した時定数Tを、対応する一次遅れフィルタ演算部63の一次遅れフィルタEに設定する(S19)。CPU31は、主処理を終了する。 The CPU 31 calculates the time constant T1 of the first lag filter E1 based on the formula (2-2), calculates the time constant T2 of the second lag filter E2 based on the formula (2-3), and calculates the time constant T3 of the third lag filter E3 based on the formula (2-4) (S17). The CPU 31 sets the calculated time constant T in the corresponding first-order lag filter E of the first-order lag filter calculation unit 63 (S19). The CPU 31 ends the main processing.

<評価結果>
図6は、本発明を適用する前(A)と後(B)のモータ50の位置偏差の経時変化を示す。実線はモータ50の位置偏差を示し、点線はモータ50の速度を示す。該波形から、本発明を適用することにより、モータ50の速度変化が大きい時(略350ms、略1000ms、略1600ms)の位置偏差が小さくなることが分かった。従って、本発明を適用することにより、周期の短い位置指令の実行時でも、位置指令に対するモータ50の追従性を良好にできることが確認できた。
<Evaluation Results>
6 shows the change over time in the position deviation of the motor 50 before (A) and after (B) application of the present invention. The solid line shows the position deviation of the motor 50, and the dotted line shows the speed of the motor 50. It was found from the waveforms that application of the present invention reduces the position deviation when the speed change of the motor 50 is large (approximately 350 ms, approximately 1000 ms, approximately 1600 ms). Therefore, it was confirmed that application of the present invention can improve the follow-up ability of the motor 50 to the position command even when a position command with a short period is executed.

<本実施形態の作用、効果>
数値制御装置30の位置制御部6Aは、一次遅れフィルタ演算部63(第一遅れフィルタ演算部63A、第二遅れフィルタ演算部63B、第三遅れフィルタ演算部63C)を有する。一次遅れフィルタE(第一遅れフィルタE、第二遅れフィルタE、第三遅れフィルタE)は、位置制御部6Aの一次遅れの影響を抑制できる。故に、数値制御装置30は、周期の短い位置指令を実行した時も、位置指令に対するモータ50の追従性を良好にできる。又、数値制御装置30は、移動平均フィルタ演算部62毎に一次遅れフィルタ演算部63を設けたことにより、移動平均フィルタFの位相遅れを一次遅れフィルタEにより適切に抑制できる。
<Actions and Effects of the Present Embodiment>
The position control unit 6A of the numerical control device 30 has a first-order lag filter calculation unit 63 (first lag filter calculation unit 63A, second lag filter calculation unit 63B, third lag filter calculation unit 63C). The first-order lag filters E (first lag filter E1 , second lag filter E2 , third lag filter E3 ) can suppress the influence of the first-order lag of the position control unit 6A. Therefore, the numerical control device 30 can improve the follow-up of the motor 50 to the position command even when a position command with a short period is executed. Furthermore, by providing a first-order lag filter calculation unit 63 for each moving average filter calculation unit 62, the numerical control device 30 can appropriately suppress the phase lag of the moving average filter F by the first-order lag filter E.

位置制御部6Aは、第二遅れフィルタ演算部63B、第三遅れフィルタ演算部63Cに加えて第一遅れフィルタ演算部63Aを有する。該時、数値制御装置30は、位置指令の二階微分値、三階微分値の一次遅れだけでなく、一階微分値の一次遅れの影響を更に抑制できる。故に、数値制御装置30は、位置指令に対するモータ50の追従性を更に良好にできる。 The position control unit 6A has a first lag filter calculation unit 63A in addition to a second lag filter calculation unit 63B and a third lag filter calculation unit 63C. At this time, the numerical control device 30 can further suppress the influence of not only the first-order lag of the second-order and third-order differential values of the position command, but also the first-order lag of the first-order differential value. Therefore, the numerical control device 30 can further improve the tracking ability of the motor 50 to the position command.

位置制御部6Aにて位置指令の微分を繰り返すことにより、離散化誤差が増幅してノイズが増大し、追従性が低下する時がある。これに対し、数値制御装置30は、第二平均フィルタ演算部62Bと第三平均フィルタ演算部62Cにより移動平均フィルタFを適用し、微分値のノイズを除去する。故に、数値制御装置30は、離散化誤差の増幅によるノイズの増大を移動平均フィルタFにより抑制できるので、位置指令に対するモータ50の追従性を更に良好にできる。 By repeatedly differentiating the position command in the position control unit 6A, the discretization error is amplified, the noise increases, and tracking performance may decrease. In response to this, the numerical control device 30 applies the moving average filter F by the second average filter calculation unit 62B and the third average filter calculation unit 62C to remove noise from the differential value. Therefore, the numerical control device 30 can suppress the increase in noise caused by the amplification of the discretization error by the moving average filter F, thereby further improving the tracking performance of the motor 50 to the position command.

数値制御装置30は、第一遅れフィルタEの時定数T、第二遅れフィルタEの時定数T、第三遅れフィルタEの時定数Tを、速度制御部7Aの速度ループ積分時定数TVI、移動平均フィルタFの適用回数i、及び移動平均フィルタFの時定数Tに基づいて設定する(S19)。故に、数値制御装置30は、軸反転時の象限突起を抑制する等の目的で工作機械1の動作中に速度ループ積分ゲインを切り替えた時も、位置指令に対するモータ50の追従性を良好にできる。 The numerical controller 30 sets the time constant T1 of the first lag filter E1 , the time constant T2 of the second lag filter E2 , and the time constant T3 of the third lag filter E3 (S19) based on the speed loop integral time constant TVI of the speed control unit 7A , the number of applications i of the moving average filter F, and the time constant Tc of the moving average filter F. Therefore, the numerical controller 30 can improve the tracking ability of the motor 50 to the position command even when the speed loop integral gain is switched during operation of the machine tool 1 for the purpose of suppressing quadrant projections during axis reversal, etc.

<変形例>
本発明は上記実施形態に限らない。加加速度演算部61Cは、速度指令を二階微分演算することで三階微分値を算出してもよい。該時、第三平均フィルタ演算部62Cは、三階微分値に対して移動平均フィルタFを二回適用してもよい。
<Modification>
The present invention is not limited to the above embodiment. The jerk calculation unit 61C may calculate a third-order differential value by performing a second-order differential calculation on the velocity command. In this case, the third average filter calculation unit 62C may apply the moving average filter F3 twice to the third-order differential value.

位置制御部6Aは、第一遅れフィルタ演算部63Aを有さなくてもよい。該時、位置制御部6Aは、一次遅れフィルタ演算部63として、第二遅れフィルタ演算部63Bと第三遅れフィルタ演算部63Cのみ有してもよい。該時、数値制御装置30は、位置指令の一階微分値に第一遅れフィルタEを適用することでモータ50の非線形性が低下する可能性を軽減できる。 The position control unit 6A does not need to have the first lag filter calculation unit 63A. In this case, the position control unit 6A may have only the second lag filter calculation unit 63B and the third lag filter calculation unit 63C as the first-order lag filter calculation unit 63. In this case, the numerical control device 30 can reduce the possibility that the nonlinearity of the motor 50 will decrease by applying the first lag filter E1 to the first-order differential value of the position command.

移動平均フィルタFの時定数は、位置制御部6Aの処理周期よりも大きくてもよい。一次遅れフィルタEの時定数Tは、速度制御部7Aの速度ループ積分時定数TVIに関わらず一定でもよい。該時、数値制御装置30は、工作機械1の動作中に速度ループ積分ゲインを切り替えた時も、一次遅れフィルタEの時定数Tを変更しなくてよい。 The time constant of the moving average filter F may be greater than the processing cycle of the position control unit 6 A. The time constant T of the first-order lag filter E may be constant regardless of the speed loop integral time constant T VI of the speed control unit 7 A. In this case, the numerical control device 30 does not need to change the time constant T of the first-order lag filter E even when the speed loop integral gain is switched during operation of the machine tool 1.

一次遅れフィルタEの時定数Tの算出方法は、上記方法に限定されない。例えば以下の方法で算出してもよい。 The method for calculating the time constant T of the first-order lag filter E is not limited to the above method. For example, it may be calculated using the following method.

tan-1xをマクローリン展開(即ち、x=0でのテイラー展開)した時、式(3-1)のように表せる。
tan-1x=x-x/3+x/5-x/7+・・・・ (3-1)
式(3-1)にて二次以上の項を無視することで線形近似すると、式(3-2)が導き出せる。
tan―1x=x (3-2)
When tan −1 x is expanded by Maclaurin (that is, by Taylor expansion at x=0), it can be expressed as in equation (3-1).
tan -1 x = x - x 3 / 3 + x 5 / 5 - x 7 / 7 + ... (3-1)
By ignoring quadratic and higher terms in equation (3-1) and performing linear approximation, equation (3-2) can be derived.
tan −1 x = x (3-2)

式(3-2)を満たす時、時定数Tの移動平均フィルタを(i-1)段重ねた後一次遅れフィルタ(時定数T)を適用した時の位相特性と、速度ループ積分時定数TVIの一次遅れ要素との位相誤差は、式(3-3)のように表せる。

Figure 0007468157000005
式(3-3)=0とした時のTについて解くと、式(3-4)のように表せる。
Figure 0007468157000006
When formula (3-2) is satisfied, the phase error between the phase characteristic when a first-order lag filter (time constant T i ) is applied after stacking (i-1) stages of moving average filters with time constant T c and the first-order lag element of the speed loop integral time constant T VI can be expressed as formula (3-3).
Figure 0007468157000005
When equation (3-3)=0 is set, solving for T i gives equation (3-4).
Figure 0007468157000006

式(3-4)は、i=1の時、T=TVIであり、i=2の時、T=TVI-T/2であり、i=3の時、T=TVI-Tである。故に、駆動回路5Aは、該式により時定数T、T、Tを算出し、主処理のS19の処理で一次遅れフィルタ演算部63の一次遅れフィルタEに設定してもよい。 In formula (3-4), when i = 1, T1 = TVI , when i = 2, T2 = TVI - Tc /2, when i = 3, and T3 = TVI - Tc . Therefore, the drive circuit 5A may calculate the time constants T1 , T2 , and T3 using this formula, and set them in the first-order lag filter E of the first-order lag filter calculation unit 63 in the process of S19 of the main process.

上記変形例において、数値制御装置30は、一次遅れフィルタEの時定数Tを、速度制御部7Aの速度ループ積分時定数TVIに基づいて設定する(S19)。該時、数値制御装置30は、一次遅れフィルタEの時定数Tを、移動平均フィルタFの適用回数iを用いずに速度ループ積分時定数TVIに基づいて算出できる。 In the above modification, the numerical controller 30 sets the time constant T of the first-order lag filter E based on the speed loop integral time constant TVI of the speed control unit 7A (S19). At this time, the numerical controller 30 can calculate the time constant T of the first-order lag filter E based on the speed loop integral time constant TVI without using the application count i of the moving average filter F.

<その他>
S19の処理は本発明の時定数設定部の一例である。
<Other>
The process of S19 is an example of the time constant setting unit of the present invention.

1 :工作機械
6A :位置制御部
7A :速度制御部
8A :トルク制御部
9A :速度指令入力部
30 :数値制御装置
31 :CPU
62 :移動平均フィルタ演算部
63 :一次遅れフィルタ演算部
64 :定数演算部
65 :フィードフォワード演算部
E :一次遅れフィルタ
F :移動平均フィルタ
1: Machine tool 6A: Position control unit 7A: Speed control unit 8A: Torque control unit 9A: Speed command input unit 30: Numerical control device 31: CPU
62: Moving average filter calculation section 63: First-order lag filter calculation section 64: Constant calculation section 65: Feedforward calculation section E: First-order lag filter F: Moving average filter

Claims (7)

モータの位置を制御する為の位置指令が、前記モータの位置のフィードバック信号と一致するように、前記モータの速度を制御する速度指令を比例制御により決定して出力する位置制御部と、
前記位置制御部が出力した前記速度指令が、前記モータの速度のフィードバック信号と一致するように、前記モータのトルクを制御するトルク指令を比例積分制御により出力する速度制御部と、
前記速度制御部が出力した前記トルク指令に基づき、前記モータのトルクを制御するトルク制御部と、
を備えた数値制御装置であって、
前記位置制御部は、
前記位置指令を二階微分した二階微分値に第二移動平均フィルタを適用する第二平均フィルタ演算部と、
前記第二平均フィルタ演算部により前記二階微分値に前記第二移動平均フィルタを適用した算出結果に、一次遅れフィルタである第二遅れフィルタを適用する第二遅れフィルタ演算部と、
前記位置指令を三階微分した三階微分値に、第三移動平均フィルタを適用する第三平均フィルタ演算部と、
前記第三平均フィルタ演算部により前記三階微分値に前記第三移動平均フィルタを適用した算出結果に、一次遅れフィルタである第三遅れフィルタを適用する第三遅れフィルタ演算部と、
前記第二遅れフィルタ演算部、及び前記第三遅れフィルタ演算部の夫々の算出結果に定数を乗算して加算した加算値を、フィードフォワード信号として前記速度指令に加算するフィードフォワード演算部と
を備えたことを特徴とする数値制御装置。
a position control unit that determines and outputs a speed command for controlling the speed of the motor by proportional control so that a position command for controlling a position of the motor coincides with a feedback signal of the position of the motor;
a speed control unit that outputs a torque command for controlling the torque of the motor by proportional-integral control so that the speed command output by the position control unit coincides with a feedback signal of the motor speed;
a torque control unit that controls the torque of the motor based on the torque command output by the speed control unit;
A numerical control device comprising:
The position control unit is
a second average filter calculation unit that applies a second moving average filter to a second-order differential value obtained by second-order differentiation of the position command;
a second lag filter calculation unit that applies a second lag filter, which is a first-order lag filter, to a calculation result obtained by applying the second moving average filter to the second-order differential value by the second average filter calculation unit;
a third average filter calculation unit that applies a third moving average filter to a third-order differential value obtained by third-order differentiation of the position command;
a third lag filter calculation unit that applies a third lag filter, which is a first-order lag filter, to a calculation result obtained by applying the third moving average filter to the third-order differential value by the third average filter calculation unit;
a feedforward calculation unit that multiplies the calculation results of the second lag filter calculation unit and the third lag filter calculation unit by a constant, adds the result, and adds the result to the speed command as a feedforward signal.
前記位置制御部は、更に、
前記位置指令を一階微分した一階微分値に、一次遅れフィルタである第一遅れフィルタを適用する第一遅れフィルタ演算部を備え、
前記フィードフォワード演算部は、
前記第一遅れフィルタ演算部、前記第二遅れフィルタ演算部、及び前記第三遅れフィルタ演算部の夫々の算出結果に定数を乗算して加算した加算値を、前記フィードフォワード信号として前記速度指令に加算する
ことを特徴とする請求項1に記載の数値制御装置。
The position control unit further includes:
a first lag filter calculation unit that applies a first lag filter, which is a first-order lag filter, to a first-order differential value obtained by first-order differentiation of the position command;
The feedforward calculation unit includes:
2. The numerical control device according to claim 1, wherein a sum obtained by multiplying the calculation results of each of the first lag filter calculation unit, the second lag filter calculation unit, and the third lag filter calculation unit by a constant and adding them together is added to the speed command as the feedforward signal.
前記第二移動平均フィルタ及び前記第三移動平均フィルタは、前記微分値のノイズを除去する移動平均フィルタであることを特徴とする請求項1又は2に記載の数値制御装置。 The numerical control device according to claim 1 or 2, characterized in that the second moving average filter and the third moving average filter are moving average filters that remove noise from the differential value. 前記第二遅れフィルタ、及び前記第三遅れフィルタの夫々の時定数を、前記速度制御部の速度ループの積分時定数に基づいて設定する時定数設定部を更に備えたことを特徴とする請求項3に記載の数値制御装置。 The numerical control device according to claim 3, further comprising a time constant setting unit that sets the time constants of the second lag filter and the third lag filter based on the integral time constant of the speed loop of the speed control unit. 前記第二遅れフィルタ、及び前記第三遅れフィルタの夫々の時定数を、前記速度制御部の速度ループの積分時定数、前記移動平均フィルタの適用回数、及び、前記移動平均フィルタの時定数に基づいて設定する時定数設定部を更に備えたことを特徴とする請求項3に記載の数値制御装置。 The numerical control device according to claim 3, further comprising a time constant setting unit that sets the time constants of the second lag filter and the third lag filter based on the integral time constant of the speed loop of the speed control unit, the number of times the moving average filter is applied, and the time constant of the moving average filter. 前記時定数設定部は、
前記積分時定数の変更に応じ、前記第二遅れフィルタ、及び前記第三遅れフィルタの夫々の時定数を設定することを特徴とする請求項4又は5に記載の数値制御装置。
The time constant setting unit is
6. The numerical control device according to claim 4, wherein the time constants of the second lag filter and the third lag filter are set in response to a change in the integral time constant.
請求項1から6の何れかに記載の数値制御装置と、
前記モータと
を備えたことを特徴とする工作機械。
A numerical control device according to any one of claims 1 to 6,
A machine tool comprising the motor.
JP2020094984A 2020-05-29 2020-05-29 Numerical control devices and machine tools Active JP7468157B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020094984A JP7468157B2 (en) 2020-05-29 2020-05-29 Numerical control devices and machine tools

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020094984A JP7468157B2 (en) 2020-05-29 2020-05-29 Numerical control devices and machine tools

Publications (2)

Publication Number Publication Date
JP2021189793A JP2021189793A (en) 2021-12-13
JP7468157B2 true JP7468157B2 (en) 2024-04-16

Family

ID=78849809

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020094984A Active JP7468157B2 (en) 2020-05-29 2020-05-29 Numerical control devices and machine tools

Country Status (1)

Country Link
JP (1) JP7468157B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003241802A (en) 2001-12-10 2003-08-29 Yaskawa Electric Corp Optimal command producing device
JP2011113475A (en) 2009-11-30 2011-06-09 Brother Industries Ltd Numerical control device and machine tool including the numerical control device
JP2019177469A (en) 2018-03-30 2019-10-17 ブラザー工業株式会社 Machine tool and smoothing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003241802A (en) 2001-12-10 2003-08-29 Yaskawa Electric Corp Optimal command producing device
JP2011113475A (en) 2009-11-30 2011-06-09 Brother Industries Ltd Numerical control device and machine tool including the numerical control device
JP2019177469A (en) 2018-03-30 2019-10-17 ブラザー工業株式会社 Machine tool and smoothing method

Also Published As

Publication number Publication date
JP2021189793A (en) 2021-12-13

Similar Documents

Publication Publication Date Title
JP5506945B2 (en) Numerical control method and numerical control device for machine tool
JP4575508B1 (en) Servo control device for dual position feedback control
JP5512954B2 (en) Position control device for numerical control machine
JP3739749B2 (en) Control device
JP6435872B2 (en) Numerical control device and control method
JP5791815B2 (en) Machine tool feed axis control method and feed axis control apparatus
US7019482B2 (en) Motion controller having sliding mode controller
WO1998040801A1 (en) Position controller
JP5943650B2 (en) Servo control device and servo control method
JP2006158026A (en) Controller
US6469467B1 (en) Servo control apparatus and method of stabilizing same
JP2017138821A (en) Vibration suppression device and vibration suppression method
KR20150006790A (en) Motor control devicde
WO1997008599A1 (en) Method for switching a control mode of a servo control system
JP4867105B2 (en) Numerical controller
JP4226420B2 (en) Position control device
JP7468157B2 (en) Numerical control devices and machine tools
JPH0722873B2 (en) Position control device for feed axis
US7129665B2 (en) Control apparatus for feed driving system
JP2009070396A (en) Servo controller
WO2014013550A1 (en) Numerical control device and numerical control system
JPH11231914A (en) Numerical controller
JP2003112224A (en) POSITIONING CONTROL DEVICE USING Hinfin CONTROLLER
JP2005071034A (en) Servo controller
JPH086644A (en) Numerical controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230224

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240229

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240305

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240318

R150 Certificate of patent or registration of utility model

Ref document number: 7468157

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150