JP2000003213A - Numerical controller and fuzzy inference device applicable to the controller - Google Patents

Numerical controller and fuzzy inference device applicable to the controller

Info

Publication number
JP2000003213A
JP2000003213A JP14632999A JP14632999A JP2000003213A JP 2000003213 A JP2000003213 A JP 2000003213A JP 14632999 A JP14632999 A JP 14632999A JP 14632999 A JP14632999 A JP 14632999A JP 2000003213 A JP2000003213 A JP 2000003213A
Authority
JP
Japan
Prior art keywords
rule
tool
rules
function
work
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.)
Granted
Application number
JP14632999A
Other languages
Japanese (ja)
Other versions
JP3189829B2 (en
Inventor
Tomomitsu Niwa
友光 丹羽
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP14632999A priority Critical patent/JP3189829B2/en
Publication of JP2000003213A publication Critical patent/JP2000003213A/en
Application granted granted Critical
Publication of JP3189829B2 publication Critical patent/JP3189829B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To easily change the know-how of a machining condition, etc., without changing a system and then to easily perform the complicated control that considers various factors by inputting an element that decides a feeding speed necessary for a rule of a function form which changes the feeding speed to calculate the necessary output value and calculating the final feeding speed based on a prescribed mathematical expression. SOLUTION: A feeding speed control part 24 includes a knowledge storage part 25 and an inference part 26. The part 25 stores a rule which changes a feeding speed in a function form, and the part 26 inputs an element to decide a machining condition necessary for the said rule of a function form. Then the part 26 calculates the necessary output value based on the inputted element and the rule of a function form and then calculates the final feeding speed based on a mathematical expression that is previously defined. Then the function to be stored in the part 25 is automatically generated based on the form of a work to be machined or to be measured, and a relevant object is controlled based on the feeding speed that is calculated at the part 26.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は数値制御装置及び
この数値制御装置に適用可能なファジー推論装置に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a numerical controller and a fuzzy inference apparatus applicable to the numerical controller.

【0002】[0002]

【従来の技術】数値制御装置は紙テープ等から指令され
た加工プログラムに基づいて数値制御処理を実行し、該
処理結果により工作機械を駆動してワークに指令通りの
加工を施すものである。
2. Description of the Related Art A numerical controller executes a numerical control process based on a processing program instructed from a paper tape or the like, and drives a machine tool based on a result of the process to perform a process on a work as instructed.

【0003】図34はかかる従来の数値制御装置のブロ
ック図である。テープリーダ11から読み込まれた加工
プログラムはメモリ12に格納される。この加工プログ
ラムを実行する際には、メモリ12から1ブロックずつ
加工プログラムが読み出され、まず、処理装置(CP
U)や制御プログラムメモリ等を内蔵する制御装置17
で処理される。ついで、制御装置17は該加工プログラ
ムに応じた数値制御処理を実行し、工作機械1のサーボ
モータを駆動してテーブルまたは刃物台を移動指令通り
に移動せしめ、或いは強電制御装置13を介して工作機
械1のクーラントのオン/オフ、スピンドル正転/逆転
/停止等の制御を行なう。なお、16は原点復帰、ジョ
グ等を指令するスイッチ、釦等を有する操作盤、14は
手動操作により制御装置17に対して各種データを入力
するマニュアル・データ・インプット操置(以下MDI
という)、15は機械の現在位置等を表示する表示ユニ
ットであり、各要素11〜17によりコンピュータ数値
制御装置(以下CNCという)が構成されている。そし
て、このCNCにおける制御装置17は前述の如く処理
装置(CPU)、制御プログラムメモリ等を有してコン
ピュータ構成になっており、処理装置(CPU)が制御
プログラム並びに加工プログラムに基づいて所定の数値
制御処理を行ない工作機械1を制御するようになってい
る。
FIG. 34 is a block diagram of such a conventional numerical controller. The processing program read from the tape reader 11 is stored in the memory 12. When executing this machining program, the machining program is read out from the memory 12 block by block, and firstly, the processing device (CP
U) and a control device 17 incorporating a control program memory and the like
Is processed. Next, the control device 17 executes a numerical control process according to the machining program, drives the servo motor of the machine tool 1 to move the table or the tool post according to the movement command, or executes the machining via the high-power control device 13. Controls such as turning on / off the coolant of the machine 1 and normal rotation / reverse rotation / stop of the spindle. Reference numeral 16 denotes an operation panel having switches, buttons and the like for instructing return to origin, jog, and the like, and 14 denotes a manual data input operation (hereinafter referred to as MDI) for inputting various data to the control device 17 by manual operation.
, 15 is a display unit for displaying the current position of the machine and the like, and each of the elements 11 to 17 constitutes a computer numerical controller (hereinafter referred to as CNC). The control device 17 in the CNC has a computer configuration having a processing device (CPU), a control program memory and the like as described above, and the processing device (CPU) has a predetermined numerical value based on the control program and the machining program. The control process is performed to control the machine tool 1.

【0004】一般に工作機械による加工は工具と被削材
(以下ワークという)間の相対運動によって不要部を切
屑として排除する除去加工である。この除去加工におい
ては、単位時間当りに切屑を排除する量によって加工効
率が決まる。加工効率を上げるためには、この単位時間
当りの切屑排除量をできるだけ多くすればよいわけであ
るが、実際には機械や工具にかけられる負荷の限界や加
工面の必要とする精度等で一定の制約を受ける。この単
位時間当りの切屑排出量を決定するのが加工条件であ
る。旋削加工においてはワークの単位時間当りの回転
数、工具のワークに対しての相対的な送り速度、工具の
ワークに対しての切込み深さがこれに当たり、ミーリン
グ加工においては工具の単位時間当りの回転数、工具の
ワークに対しての相対的な送り速度、工具のワークに対
しての切込み深さがこれに当たる。すなわち、旋削加
工、ミーリング加工のいずれにおいても工具のワークに
対しての相対的な送り速度を好適に制御することは除去
加工において極めて重要な加工要素となる。これを不必
要に下げれば加工効率を損ない、加工時間の増加とな
り、またこれを許容値以上に上げると加工精度に悪影響
を与えたり、工具、機械等に過負荷となるためである。
[0004] In general, machining by a machine tool is a removal process for removing unnecessary portions as chips by relative movement between a tool and a work material (hereinafter referred to as a work). In this removal processing, the processing efficiency is determined by the amount of chips removed per unit time. In order to increase the processing efficiency, it is necessary to increase the amount of chip removal per unit time as much as possible.However, in practice, a certain amount is required due to the limit of the load applied to the machine or tool, the required accuracy of the processing surface, etc. Be restricted. The processing conditions determine the chip discharge amount per unit time. In turning, the number of revolutions of the work per unit time, the relative feed speed of the tool to the work, and the cutting depth of the tool to the work correspond to this. In milling, the tool per unit time The rotation speed, the relative feed speed of the tool to the work, and the cutting depth of the tool to the work correspond to this. That is, in any of the turning and the milling, suitably controlling the relative feed speed of the tool to the workpiece is a very important processing element in the removal. If this is unnecessarily reduced, the processing efficiency is impaired, and the processing time is increased. If it is increased beyond the allowable value, the processing accuracy is adversely affected, and tools, machines and the like are overloaded.

【0005】図25は、従来の送り速度制御部の要部ブ
ロック図である。図34のメモリ12から1ブロックづ
つ読み出され、制御装置17で解析された加工プログラ
ムは、図25のCNC指令データ20、すなわち各軸の
移動指令及び送り速度指令としてパルス分配処理部21
に送られる。パルス分配処理部21では各軸の単位時間
当りの移動パルスを各軸の移動指令と送り速度指令とか
ら算出し、各軸のサーボ制御部22へ送る。この移動パ
ルスによってサーボ制御部22は工作機械1のサーボモ
ータ23を駆動する。
FIG. 25 is a block diagram of a main part of a conventional feed speed control unit. The machining program read out one block at a time from the memory 12 in FIG. 34 and analyzed by the control device 17 is a CNC command data 20 in FIG. 25, that is, a pulse distribution processing unit 21 as a movement command and a feed speed command for each axis.
Sent to The pulse distribution processing unit 21 calculates the movement pulse per unit time of each axis from the movement command of each axis and the feed speed command, and sends it to the servo control unit 22 of each axis. The servo control unit 22 drives the servo motor 23 of the machine tool 1 by the movement pulse.

【0006】[0006]

【発明が解決しようとする課題】また、図26はコーナ
部におけるプログラム経路の説明図であり、図26
(a)はプログラムされた通路と実際の工具通路とを示
したものである。理想としてはプログラムされた通路と
実際の工具通路とが一致することが当然望ましいが、実
際にはサーボ系の追従遅れ等の原因で必ずコーナ部Pで
両者が異なってしまう。このため、コーナ部Pで加工ワ
ーク30に対して図26(b)のように工具31がワー
ク30の外側を曲がる場合にはワークにくい込む方向に
曲がることになり、これを避けるためには工具31の送
り速度を落としたり、コーナ部で一旦停止させる等の対
策を行っている。また、図26(C)のように工具31
がワーク30の内側を曲がる場合には、ワーク30にく
い込みはしないが、削り残しを多く生じたり、工具31
に対して急に負荷が多くかかる等の問題がある。このた
め、図27(a),(b)のコーナオーバライド機能説
明図に示すように、コーナ部Pの前後で指令された距離
Le,Ls内において指令された送り速度を指令された
比率で落とす(オーバライドをかける)処理を行うこと
のできるCNCも存在した。しかし、コーナ部Pから距
離Le,Ls内とその他の部分とで2段階に速度が変化
するだけであり、また従来の加工プログラム指令は、一
ブロック内において送り速度を変化させる指令(始点と
終点との送り速度を中間点の送り速度より遅くする等の
指令)ができないものであったので、コーナ部Pから距
離Le,Ls内の部分で最も速度を落とさなければなら
ない部分の速度に合わせて送り速度を設定しなくてはな
らず、また送り速度が急に変化し過ぎるという第1の問
題があった。
FIG. 26 is an explanatory diagram of a program path in a corner portion.
(A) shows the programmed path and the actual tool path. Ideally, it is naturally desirable that the programmed path and the actual tool path coincide with each other. However, in practice, the two always differ at the corner P due to a delay in following the servo system. Therefore, when the tool 31 bends outside of the work 30 with respect to the work 30 at the corner P as shown in FIG. Measures such as lowering the feed speed of No. 31 and temporarily stopping at the corners are taken. Also, as shown in FIG.
Is bent inside the work 30, the work 30 is not entangled, but a large amount of uncut material is left or the tool 31
However, there is a problem that the load is suddenly increased. For this reason, as shown in the corner override function explanatory diagrams of FIGS. 27A and 27B, the commanded feed speed is reduced at the commanded ratio within the distances Le and Ls commanded before and after the corner P. Some CNCs could perform (override) processing. However, the speed only changes in two steps within the distances Le and Ls from the corner P and the other portions. In addition, the conventional machining program command is a command for changing the feed speed within one block (start and end points). Command such as lowering the feed speed than the intermediate point feed speed) cannot be performed, so that the speed within the distances Le and Ls from the corner P must be reduced to the speed at which the speed must be reduced most. The first problem is that the feed rate must be set, and the feed rate changes too rapidly.

【0007】図28の穴あけ加工説明図は、ドリル工具
31でワーク30に穴あけ加工を行わせる例である。図
28(a)は、工具31がワーク30に対して切削を開
始する場合であるが、工具31がワーク30に接触する
際には送り速度を落とし、工具31がワーク30に完全
にくい込んだ状態で送り速度を上げた方が好適な加工が
行える。これは、ワーク30を加工する通常の送り速度
で工具31をワーク30に接触させると工具31に対し
て急に負荷をかけることになり、工具31が折損した
り、位置ずれを発生させるためである。このため、一般
には工具31をワーク30のやや手前の点aまで位置決
めし、工具31がワーク30に完全にくい込んだ点bま
で送り速度を落として加工し、点bからは通常のワーク
30を加工する送り速度で加工させる。
[0007] FIG. 28 is an explanatory view of a drilling process in which a drill tool 31 performs a drilling process on a work 30. FIG. 28A shows a case where the tool 31 starts cutting the work 30. When the tool 31 comes into contact with the work 30, the feed speed is reduced, and the tool 31 is completely inserted into the work 30. If the feed rate is increased in this state, more suitable processing can be performed. This is because, when the tool 31 is brought into contact with the work 30 at a normal feed speed for processing the work 30, a load is suddenly applied to the tool 31 and the tool 31 is broken or a position shift occurs. is there. Therefore, in general, the tool 31 is positioned to a point a slightly before the work 30, the feed speed is reduced to a point b at which the tool 31 is completely inserted into the work 30, and the normal work 30 is moved from the point b. Process at the feed rate to be processed.

【0008】また、図28(b)は工具31がワーク3
0に対して貫通する穴を加工する場合の例である。この
場合、通常のワーク30を加工する送り速度で工具31
をワーク30に対して貫通させると、ワーク30の穴底
にバリができたりするため、一般には工具31がワーク
30を貫通する手前の点cまで通常のワーク30を加工
する送り速度で加工し、点cからは送り速度を落として
加工させる。
FIG. 28 (b) shows that the tool 31 is
This is an example of a case where a hole penetrating through 0 is formed. In this case, the tool 31 is fed at a feed rate at which a normal workpiece 30 is machined.
When the tool 31 penetrates through the work 30, burrs may be formed at the bottom of the hole of the work 30. , From the point c, the feed speed is reduced to perform the processing.

【0009】図29のテーパ部分の穴あけ加工説明図に
おいて、図29(a)は、ワーク30が工具31と接触
する面が傾いている場合であり、図29(b)は工具3
1が貫通する穴底の面が傾いている場合である。この場
合は特にワーク30に接触する際及びワーク30を貫通
する際に送り速度を落とさないと穴加工の精度が低下
し、工具を折損する危険性が増大する。このように送り
速度を制御するために、従来の加工プログラム指令は、
一ブロック内において送り速度を変化させる指令(始点
と終点との送り速度を中間点の送り速度より遅くする等
の指令)ができないものであったので、複数のブロック
に分割する必要があり、ブロック内では、そのブロック
で最悪の場合を考慮した送り速度を設定しなくてはなら
ないと言う第2の問題があった。
29 (a) shows the case where the surface of the work 30 in contact with the tool 31 is inclined, and FIG. 29 (b) shows the case where the tool 3 is drilled.
1 is a case where the surface of the bottom of the hole that penetrates is inclined. In this case, if the feed rate is not reduced particularly when the workpiece 30 comes into contact with the workpiece 30 or penetrates the workpiece 30, the accuracy of drilling is reduced, and the risk of breakage of the tool is increased. In order to control the feed rate in this way, the conventional machining program command is:
Since it was not possible to issue a command to change the feed speed within one block (eg, a command to lower the feed speed between the start point and end point than the feed speed at the intermediate point), it was necessary to divide the block into a plurality of blocks. Among them, there is a second problem that the feed speed must be set in consideration of the worst case in the block.

【0010】図30の成型材ワークの加工説明図におい
て、図30(a)は成形材等のワーク30を工具31で
加工する場合であり、図に示すように工具がワークを加
工している部分と、加工しない部分とが存在する。この
ため、加工効率を上げるために本来はa−e間を図30
(a)のように1ブロックで加工するところを、従来の
加工プログラム指令は、一ブロック内において送り速度
を変化させる指令(始点と終点との送り速度を中間点の
送り速度より遅くする等の指令)ができないものであっ
たので、加工ブロックを図30(b)のようにa−b,
b−c,c−d,d−eと4分割して加工する。この場
合、ワークに対して加工を開始する点(b,d点)では
ワーク30に工具31が接触する際、工具31に対する
衝撃を和らげるため、送り速度を減少させ、ワーク30
から工具31が抜ける点(c点)でもワーク30にバリ
などを生じさせないように工具31の送り速度を減少さ
せることが望ましいが、さらにブロックが分割されるの
で、実際には図30(b)のまま加工を行い、b,c,
d点における送り速度を考慮して問題があれば全体の送
り速度を下げて加工せざるをえないという第3の問題が
あった。
FIG. 30 (a) shows a case where a work 30 such as a formed material is machined by a tool 31, and the tool works the work as shown in FIG. There are parts and parts that are not processed. Therefore, in order to increase the processing efficiency, the distance between a and e should be originally shown in FIG.
As shown in FIG. 3A, the conventional machining program command is to change the feed speed within one block (for example, to make the feed speed between the start point and the end point slower than the feed speed at the intermediate point). 30), the machining block was changed to ab and b as shown in FIG.
It is processed by dividing it into four parts, bc, cd, and de. In this case, when the tool 31 comes into contact with the work 30 at the point (b, d) at which processing is started on the work, the feed speed is reduced to reduce the impact on the tool 31 and reduce the work speed.
It is desirable to reduce the feed speed of the tool 31 so as not to cause burrs on the work 30 even at a point (point c) where the tool 31 comes out of the tool. However, since the block is further divided, FIG. Processing as is, b, c,
There is a third problem in that if there is a problem in consideration of the feed speed at point d, the entire feed speed must be reduced for machining.

【0011】図31の途中型の加工説明図はワーク30
の途中部分を工具31で加工する場合であり、a−bの
部分がワークに対して切り込んでいく部分であり工具に
対して次第に負荷がかかる部分である、b−cの部分は
工具に対して常に一定の負荷がかかる部分であり、c−
dの部分は工具の負荷が次第に小さくなる部分である。
従来の加工プログラム指令は、一ブロック内において送
り速度を変化させる指令(始点と終点との送り速度を中
間点の送り速度より遅くする等の指令)ができないもの
であったので、通常b−cの部分の送り速度を考慮して
送り速度を決定するが、この送り速度ではa−bの部分
で工具の負荷が急にかかり過ぎ、工具に悪影響を与える
場合にはやむなく、a−bの部分の送りを考慮して送り
速度を下げて送り速度を指定しなくてはならないという
第4の問題があった。
[0011] FIG.
Is a case where the middle part is machined by the tool 31. The part ab is a part that cuts into the work and the part that gradually applies a load to the tool. Is a part where a constant load is always applied, and c-
The part d is a part where the load of the tool gradually decreases.
Conventional machining program commands cannot change the feed speed in one block (commands such as lowering the feed speed between the start point and the end point than the feed speed at the intermediate point). The feed rate is determined in consideration of the feed rate of the part, but at this feed rate, if the load of the tool is too abruptly applied at the part a-b and adversely affects the tool, the part a-b is unavoidable. There is a fourth problem that it is necessary to specify the feed speed by lowering the feed speed in consideration of the feed speed.

【0012】図32の計測説明図はワーク30を計測用
の工具31で測定する場合であり、ワーク30にセンサ
ー工具31を接触させてワークの位置を計測するもので
ある。この場合、従来の加工プログラム指令は、一ブロ
ック内において送り速度を変化させる指令(始点と終点
との送り速度を中間点の送り速度より遅くする等の指
令)ができないものであったので、ワークの手前のa点
まで比較的速い速度で工具を送り、a点からb点までは
遅い計測速度で工具を送るようにブロックを分けてプロ
グラミングしていた。このように計測点近傍(a−b)
でブロックを分割し、かつこの間(a−b)での送り速
度を相当に下げるため、計測に時間が掛かるという第5
の問題があった。
The measurement explanatory diagram of FIG. 32 shows a case where the work 30 is measured by the measuring tool 31. The position of the work is measured by bringing the sensor tool 31 into contact with the work 30. In this case, the conventional machining program command cannot change the feed speed within one block (command to make the feed speed between the start point and the end point slower than the feed speed at the intermediate point). The program is divided into blocks so that the tool is sent at a relatively high speed to point a before point a, and the tool is sent at a low measurement speed from point a to point b. Thus, near the measurement point (ab)
In order to divide the block and to reduce the feed speed during this period (ab), it takes a long time to perform measurement.
There was a problem.

【0013】図33は進入禁止エリア設定における制御
説明図であり、工具31の進入を禁止するエリア32を
設け、工具31がこのエリア32内に進入しないか常に
監視し、進入しそうになった場合には、その境界上のa
点で工具を停止させる機能を説明するものである。この
場合、従来の加工プログラム指令は、一ブロック内にお
いて送り速度を変化させる指令(始点と終点との送り速
度を中間点の送り速度より遅くする等の指令)ができな
いものであったので、工具31が進入禁止エリア32に
進入するまでは工具の送りは指定されたままの速度であ
り、従って安全のため進入禁止エリアをやや大きめに指
定しておく必要があるという第6の問題があった。
FIG. 33 is an explanatory diagram of control in setting an entry-prohibited area. An area 32 where entry of a tool 31 is prohibited is provided, and it is always monitored whether the tool 31 enters this area 32. Has a
The function of stopping the tool at a point is explained. In this case, the conventional machining program command cannot issue a command to change the feed speed within one block (a command to make the feed speed between the start point and the end point slower than the feed speed at the intermediate point). There is a sixth problem that the tool is fed at the specified speed until the vehicle 31 enters the no-go area 32, so that the no-go area must be specified slightly larger for safety. .

【0014】また、一般に工具の送り速度は、ワークの
材質と工具の材質との相対関係に大きく依存するため、
加工の途中で工具を別の工具に変更しその両者の工具の
材質が異なる場合にはCNCの加工プログラム修正して
送り速度を変更しなくてはならないと言う第7の問題が
あった。
In general, the feed speed of a tool greatly depends on the relative relationship between the material of the work and the material of the tool.
There is a seventh problem in that when a tool is changed to another tool during machining and the materials of the two tools are different, it is necessary to modify the CNC machining program to change the feed rate.

【0015】また、上記の第1〜7の各問題に対して、
関数形式による制御を適用して制御を行おうとする際、
予め設定した知識記憶部の内容を変更したい場合があ
る。ところが、その変更したい内容がどのようなもので
あってもいちいち変更しなければならず面倒であると言
う第8の問題があった。
For each of the first to seventh problems,
When trying to control by applying control in the form of a function,
There are cases where it is desired to change the contents of the knowledge storage unit set in advance. However, there is an eighth problem that any change in the content to be changed must be made one by one, which is troublesome.

【0016】また、上記の第1〜7の各問題に対して、
ファジー制御を適用して制御を行おうとした場合、図8
の例において従来はルールを定義する際、図8のR1〜
R3で示すようにルールを定義し、メンバーシップ関数
A1,A2,A3,B1,B2,B3は別に改めて定義
せざるをえなかった。このため、メンバーシップ関数を
定義する専用のマンマシンインターフェースを用意し、
システム内部でメンバーシップ関数を記憶させておく大
きな記憶エリアを必要とするという第9の問題があっ
た。
Further, for each of the above first to seventh problems,
FIG. 8 shows a case where control is attempted by applying fuzzy control.
Conventionally, when defining a rule in the example of FIG.
Rules were defined as indicated by R3, and the membership functions A1, A2, A3, B1, B2, and B3 had to be defined separately. For this reason, a dedicated man-machine interface that defines the membership function is prepared,
The ninth problem is that a large storage area for storing the membership function inside the system is required.

【0017】また、上記の第1〜7の各問題に対して、
ファジー制御を適用して制御を行おうとした場合、工作
機械の切削に追従してファジー推論を行う必要がある。
このため、非常に高速でファジー推論を行わなくてはな
らず、ファジー推論をソフトウェアで実行させたのでは
時間が間に合わない。このため、専用のファジーチップ
等をCNCに搭載させてハードウェア的に処理する必要
があり、コストアップにつながるという第10の問題が
あった。
Further, for each of the first to seventh problems,
When attempting to perform control by applying fuzzy control, it is necessary to perform fuzzy inference following cutting of a machine tool.
For this reason, the fuzzy inference must be performed at a very high speed, and if the fuzzy inference is executed by software, it takes too much time. For this reason, it is necessary to mount a dedicated fuzzy chip or the like on the CNC and perform hardware processing, and there is a tenth problem that the cost is increased.

【0018】なおまた、一般に、ルールには非常に重要
なルールもあれば、あまり重要でないルールも存在す
る。すなわち、ルールにも重要度の差があるわけであ
る。しかし、従来のファジー推論では設定したルールが
全て等価に扱われてしまうという第11の問題があっ
た。
In general, some rules are very important and some rules are not so important. That is, there is a difference in importance between rules. However, the conventional fuzzy inference has an eleventh problem that all set rules are treated equivalently.

【0019】また本発明は、上記のような第1〜8の問
題点を解消するためになされたもので、送り速度を制御
するため複数のブロックに分割することなく、1ブロッ
ク内において、あらかじめ設定されたルールに基づいて
送り速度の増減を制御可能とし、さらに設定されたルー
ルを自在に変更可能とすることで、作業者の持つ加工ノ
ウハウを盛り込むことが可能で、しかも予め設定した知
識記憶部の内容を容易に変更できる数値制御装置を得る
ことを目的とする。
The present invention has been made in order to solve the above first to eighth problems. In order to control the feed speed, the present invention does not divide a plurality of blocks into one block. It is possible to control the increase and decrease of the feed rate based on the set rules, and furthermore, it is possible to freely change the set rules, so that the processing know-how possessed by the operator can be incorporated, and the knowledge storage set in advance It is an object of the present invention to obtain a numerical control device capable of easily changing the contents of a unit.

【0020】また本発明は、上記のような第10の問題
点を解消するためになされたもので、設定されたルール
が多い場合、判定が必要なルールに関してのみ推論を実
行することで、推論時間を短縮することが可能なファジ
ー推論装置を得ることを目的とする。
Further, the present invention has been made to solve the tenth problem as described above. When there are many rules set, the inference is performed only on the rules that need to be determined, whereby the inference is performed. It is an object of the present invention to obtain a fuzzy inference device capable of reducing time.

【0021】また本発明は、上記のような第9の問題点
を解消するためになされたもので、メンバーシップ関数
を記憶させておく大きな記憶エリアを必要とせず、且つ
ファジー推論をソフトウェア処理で高速に行わせるファ
ジー推論装置を得ることを目的とする。
The present invention has been made to solve the ninth problem described above, and does not require a large storage area for storing membership functions, and performs fuzzy inference by software processing. It is an object of the present invention to obtain a fuzzy inference device that can be performed at high speed.

【0022】更にまた、本発明は、上記のような第11
の問題点を解消するためになされたもので、ルールの重
要度を結論に反映させられるファジー推論装置を得るこ
とを目的とする。
Further, the present invention provides the eleventh aspect as described above.
The purpose of the present invention is to provide a fuzzy inference apparatus that can reflect the importance of a rule in a conclusion.

【0023】[0023]

【課題を解決するための手段】本発明に係わる数値制御
装置は、送り速度を変化させることが出来る数値制御装
置において、送り速度を変化させるための1個以上のル
ールが関数形式で記述されたものを記憶する知識記憶部
と、この知識記憶部に格納された関数形式のルールに必
要な加工条件を決定するための要素を入力するととも
に、この入力した要素と関数形式のルールに基づいて必
要な出力値を求め、この求めた値を予め定義されている
数式に基づいて演算して最終の送り速度を求める推論部
と、上記知識記憶部に記憶される関数を、加工する加工
ワーク形状又は被測定ワーク形状に基づいて自動生成す
る手段とを備え、上記推論部にて求められた送り速度に
基づいて被制御体を制御するものである。
A numerical controller according to the present invention is a numerical controller capable of changing a feed rate, wherein one or more rules for changing the feed rate are described in a functional form. Input the elements to determine the processing conditions required for the function format rules stored in this knowledge storage unit and the function format rules stored in this knowledge storage unit. An inference unit that calculates the final output speed by calculating the calculated output value based on a previously defined mathematical expression, and a function stored in the knowledge storage unit, the shape of the workpiece to be processed or Means for automatically generating the workpiece based on the shape of the workpiece to be measured, and controlling the controlled object based on the feed speed obtained by the inference unit.

【0024】また本発明に係わるファジー推論装置は、
制御条件を変化させるためのルールをプロダクションル
ールの形式で記述したものを複数記憶する知識記憶部
と、この知識記憶部に格納されたルールから望ましい制
御条件を推論するファジー推論部とを備え、上記知識記
憶部に格納されている複数のルールのうち、入力値に対
応するメンバーシップ関数を含むルールのみを抽出し、
この抽出されたルールだけを用いて推論する手段を設け
たものである。
Further, the fuzzy inference apparatus according to the present invention comprises:
A knowledge storage unit that stores a plurality of rules for changing control conditions in the form of a production rule, and a fuzzy inference unit that infers a desired control condition from the rules stored in the knowledge storage unit. From the plurality of rules stored in the knowledge storage unit, only the rule including the membership function corresponding to the input value is extracted,
A means for inferring using only the extracted rules is provided.

【0025】また本発明に係わるファジー推論装置は、
制御条件を変化させるためのルールをプロダクションル
ールの形式で記述した知識記憶部と、この知識記憶部に
格納されたルールから望ましい制御条件を推論するファ
ジー推論部とを備え、ファジー推論の後件部に用いるメ
ンバーシップ関数を全て二等辺三角形とするとともに、
上記ルール中に直接にメンバーシップ関数を定義したも
のである。
Further, the fuzzy inference device according to the present invention
A knowledge storage unit in which a rule for changing the control condition is described in the form of a production rule; and a fuzzy inference unit for inferring a desirable control condition from the rule stored in the knowledge storage unit. The membership functions used for all are isosceles triangles,
This is the definition of the membership function directly in the above rule.

【0026】更にまた本発明に係わるファジー推論装置
は、上記のファジー推論装置において、上記知識記憶部
に、制御条件を変化させるためのプロダクションルール
に直接ルールの重要度βiを定義したものを記憶させる
ようにし、且つファジー推論を行う際に、上記ルールに
定義された重要度βiと、各ルールの結果の面積Siと
重心位置Liとを用いて、推論結果を求めるものであ
る。
Further, in the fuzzy inference device according to the present invention, in the fuzzy inference device described above, the knowledge storage unit stores a rule that directly defines the importance βi of a production rule for changing a control condition. Then, when performing the fuzzy inference, the inference result is obtained using the importance βi defined in the above rules, the area Si and the center of gravity position Li of the result of each rule.

【0027】[0027]

【実施の形態】実施の形態1.次に、本発明の実施の形
態1を図について説明する。図1において、20〜23
は従来装置と同一または相当する部分であり、24は送
り速度制御部である。この送り速度制御部内に知識記憶
部25と推論部26を有する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 Next, a first embodiment of the present invention will be described with reference to the drawings. In FIG.
Is the same or corresponding part as the conventional device, and 24 is a feed speed control unit. The feed speed control unit includes a knowledge storage unit 25 and an inference unit 26.

【0028】次に、動作について説明する。知識記憶部
25には、図2に示すようなコーナ部の送り速度を変化
させるルールが複数個記述されており、手法1は工具が
コーナ部に近づくにつれて工具の送り速度を減速させる
ものである。従来は図27と(a),(b)で示したよ
うに、コーナ部Pから一定距離Leまで工具が近づくあ
る一定の値まで送り速度を下げ、コーナ部Pから一定距
離Lsまで工具が離れたら元の送り速度に戻すという単
にコーナ部からの距離の閾値により送り速度を切り換え
ていただけであるが、本発明の実施の形態においては、
図2に示すように工具がコーナ部に近づいた距離に応じ
て減速率を定義した関数1によって自在に変更可能とな
っている。手法2はコーナ部の傾き角度に応じて工具の
送り速度の減少率を修正するルールを示している。一般
にコーナ部の傾きがきついほど(0度に近いほど)大き
く減速させ、傾きがゆるいほど(180度に近いほど)
減速は小さくてすむので、手法1の関数1において平均
的な減速率を設定しておき、手法2の関数2によってコ
ーナの傾きに応じて修正するのが図2の例で設定された
コーナ送り制御に関するルールの例である。
Next, the operation will be described. A plurality of rules for changing the feed speed of the corner as shown in FIG. 2 are described in the knowledge storage unit 25, and method 1 is to reduce the feed speed of the tool as the tool approaches the corner. . Conventionally, as shown in FIGS. 27 and (a) and (b), the feed speed is reduced to a certain value at which the tool approaches from the corner P to a certain distance Le, and the tool moves away from the corner P to a certain distance Ls. The feed rate is simply switched by the threshold value of the distance from the corner part to return to the original feed rate, but in the embodiment of the present invention,
As shown in FIG. 2, the function 1 that defines the deceleration rate can be freely changed according to the distance of the tool approaching the corner. Method 2 shows a rule for correcting the reduction rate of the feed speed of the tool according to the inclination angle of the corner. Generally, as the inclination of the corner is steeper (closer to 0 degrees), the speed is greatly reduced.
Since deceleration is small, an average deceleration rate is set in function 1 of method 1 and correction is performed according to the inclination of the corner by function 2 of method 2 in the corner feed set in the example of FIG. It is an example of a rule about control.

【0029】図3は、推論部26において知識記憶部2
5に記述されたルールを用いて、実際にコーナ部の送り
速度を制御する際の手順を示したフローチャートであ
る。まず、推論部26は知識記憶部25より手法1を読
み込み(ステップ200〜201)、手法1に必要なデ
ータである工具とコーナ部との距離を求め、これを入力
データとして与える(ステップ202)。この距離に応
じて送り速度の減速率Z1を抽出する(ステップ20
3)。この場合、関数1を用いてコーナ部からの距離に
対応する工具の送り速度減速率を抽出することになる。
同様にして手法2より、コーナ部の傾き角度より送り速
度の減速率Z2を抽出する(ステップ204〜205,
201〜203)。次に、本実施の形態の場合、N=2
であるから、ステップ205がYESとなり、2つのル
ールにより得られた2つの減速率Z1,Z2を合成し
(ステップ206)、工具の送り速度Foを決定する
(ステップ207)。上記の合成は、この場合数式1に
示すように各々の値の積をとる。
FIG. 3 shows the knowledge storage unit 2 in the inference unit 26.
6 is a flowchart showing a procedure for actually controlling the feed speed of a corner using the rule described in FIG. First, the inference unit 26 reads the method 1 from the knowledge storage unit 25 (steps 200 to 201), obtains the distance between the tool and the corner, which is data necessary for the method 1, and gives this as input data (step 202). . The feed rate deceleration rate Z1 is extracted according to this distance (step 20).
3). In this case, the function 1 is used to extract the feed speed reduction rate of the tool corresponding to the distance from the corner.
Similarly, the deceleration rate Z2 of the feed speed is extracted from the inclination angle of the corner portion by the method 2 (steps 204 to 205,
201-203). Next, in the case of this embodiment, N = 2
Therefore, step 205 becomes YES, and the two deceleration rates Z1 and Z2 obtained by the two rules are combined (step 206), and the feed speed Fo of the tool is determined (step 207). The above combination takes the product of the respective values as shown in Equation 1 in this case.

【0030】 Z=Z1*Z2*……*Zn ……(1)Z = Z1 * Z2 *... * Zn (1)

【0031】送り速度の決定は、指定された送り速度F
に対して数式1で求めた結果の送り速度減速率を掛け合
わせて修正された送り速度Foを算出することで行う。 Fo=F*(100ーZ)/100 Zは合成された減速率であり、単位は%である。このよ
うに複数の結果を合成して加工条件(工具の送り速度)
を求めることにより、複数個のルールに基づいた複雑な
制御を実現することが可能である。また、知識記憶部2
5と推論部26とを各々独立させたことにより、より複
雑なルールを定義できるようになる。なお、上記実施の
形態では知識記憶部25に記述されるルールが図2に示
すように自由な形式で記述されているが、関数と関数の
演算式という形式を用いて記述することもできる。例え
ば、図2の例の場合、関数1,関数2を定義し、これら
の関数の結果を演算する数式2を次のように定義する。
The feed rate is determined by the specified feed rate F
Is multiplied by the feed speed deceleration rate obtained by Expression 1 to calculate a corrected feed speed Fo. Fo = F * (100−Z) / 100 Z is the synthesized deceleration rate, and the unit is%. Combining multiple results in this way and processing conditions (tool feed rate)
, It is possible to realize complicated control based on a plurality of rules. Also, the knowledge storage unit 2
By making the 5 and the inference unit 26 independent, a more complicated rule can be defined. In the above-described embodiment, the rules described in the knowledge storage unit 25 are described in a free format as shown in FIG. 2, but the rules may be described using a format of a function and an operation expression of the function. For example, in the case of the example of FIG. 2, functions 1 and 2 are defined, and Expression 2 for calculating the results of these functions is defined as follows.

【0032】F=F1*F2 ……(2)F = F1 * F2 (2)

【0033】数式2は関数1(F1)と関数2(F2)
を演算した結果の積をとり、その値を最終結果とするこ
とを示すものである。
Equation 2 is a function 1 (F1) and a function 2 (F2)
Is calculated, and the result is calculated as the final result.

【0034】推論部26は、図3で示したように各関数
の演算結果を求め、この結果を定義された式によって合
成する。ステップ206における数式2がこの場合定義
された式になるわけである。
The inference unit 26 calculates the operation result of each function as shown in FIG. 3, and synthesizes the result by a defined equation. Equation 2 in step 206 is the defined equation in this case.

【0035】例えば、下記のような演算式(数式3)が
定義された場合、関数1,2,3で算出された結果の平
均をとり、その値に関数4で算出した結果を掛け合わせ
ることで最終の結果を得ることを意味する。このよう
に、自在に定義される関数と、それらの演算方法を定義
する式とでルールを定義することも可能である。 F=(F1+F2+F3)/3*F4 ……(3)
For example, when the following arithmetic expression (Equation 3) is defined, an average of the results calculated by the functions 1, 2, 3 is taken, and the value is multiplied by the result calculated by the function 4. Means to get the final result. Thus, it is also possible to define rules by freely defined functions and expressions that define their operation methods. F = (F1 + F2 + F3) / 3 * F4 (3)

【0036】実施の形態2.次に、本発明の実施の形態
2を図について説明する。図1において、知識記憶部2
5内に格納するルールを送り速度を変化させるためのル
ールを判断すべき条件を記した前件部と、前件部の条件
が満足あるいは満足されなかった場合に実行される内容
を記した後件部とで記述するようにする。すなわち、 if 前件部 then 後件部 の形式のいわゆるプロダクションルールの形式でルール
を記述し、ルール中に記述される値をメンバーシップ関
数の形式で表現するものである。これにより、マクロで
汎用的な知識をルールで記述し、ミクロで個別対応的な
知識はメンバーシップ関数で表現する構造で、知識記憶
部25を構成するものとする。推論部26は、知識記憶
部25に記述されたルールに基づき、与えられたメンバ
ーシップ関数に対してファジー推論を行って結論を導き
出す。
Embodiment 2 Next, a second embodiment of the present invention will be described with reference to the drawings. In FIG. 1, the knowledge storage unit 2
After describing the conditions to determine the rule for changing the feed speed by sending the rules stored in 5 and the contents to be executed when the conditions of the antecedents are not satisfied or satisfied, It is described in the subject section. That is, a rule is described in the form of a so-called production rule in the form of if antecedent part then consequent part, and the value described in the rule is expressed in the form of a membership function. Thus, the knowledge storage unit 25 has a structure in which macro general-purpose knowledge is described by rules, and micro-specific knowledge is expressed by a membership function. The inference unit 26 performs fuzzy inference on the given membership function based on the rules described in the knowledge storage unit 25 to derive a conclusion.

【0037】一般にファジィ制御におけるファジィ推論
は、ファジィ関係のミニマックス合成ルールによる推論
結果の重心をとる場合が多く、ミニマックス合成重心法
とよばれている。これは、図36に示すように (1)前提x0,y0が与えられて、各ルールの適合度
a;を計算する (2)個々のルールごとに推論結果Ci*を求める (3)各ルールによる推論結果を総合してC0を求め、
その重みつき重心として、各ルール全体の推論結果Z0
を計算する の3段階で推論を行う。このほかにも、ファジィ集合C
0の解釈としてCiをaiで頭切りしてCi*を求める代わ
りにai倍に縮小する方式や、C0の非ファジィ化の方法
として、重心の代わりに中央値(median)を計算
したり、最大値を与える台集合の要素を選択する高さ法
(height method)などの種々の手法が提案されている
が、これまでの経験によれば、これらの多数の手法の中
では、ミニマックス合成重心法が非常に良好な結果を与
えることが知られている。図4,図5は、本発明による
知識記憶部25内に設けられたルールの説明図である。
図28(a),図29(a)で示した穴加工ドリルの送
り速度を制御する場合のルールが記述されている。
In general, fuzzy inference in fuzzy control often takes the center of gravity of the inference result by the minimax composition rule of fuzzy relation, and is called a minimax composition centroid method. As shown in FIG. 36, (1) given the assumptions x0 and y0, calculate the fitness a of each rule; (2) obtain the inference result Ci * for each rule (3) each rule C0 is obtained by integrating the inference results by
As the weighted center of gravity, the inference result Z0 of each rule as a whole
The inference is made in three stages. In addition, the fuzzy set C
As a method of interpreting 0, instead of truncating Ci by ai to obtain Ci *, instead of obtaining Ci *, as a method of defuzzifying C0, a median (median) is calculated instead of the center of gravity, Various methods such as a height method for selecting an element of a set of tables giving a value have been proposed. However, according to past experience, among these many methods, the minimax composite centroid has been proposed. The method is known to give very good results. FIGS. 4 and 5 are explanatory diagrams of rules provided in the knowledge storage unit 25 according to the present invention.
A rule for controlling the feed rate of the hole drill shown in FIGS. 28A and 29A is described.

【0038】図4において、R1〜R5はルールを示
し、この実施の形態では5つのルールを合成して結論を
導かせている。POSは、図28(a)の場合、工具3
1とワーク30との距離であり、工具31がワーク30
に接触する以前が+であり、接触後が−となる。0が接
触した点を示す。A1は、図5で示すメンバーシップ関
数であり、この関数は工具がワークに接触するやや手前
から工具の送り速度を減少させ、ワークに接触後しばら
くの間工具がワークに対して完全にくい込むまで送り速
度を下げたままにし、完全にくい込んだ後に送り速度を
元に戻すことを指示するものである。
In FIG. 4, R1 to R5 indicate rules, and in this embodiment, five rules are combined to draw a conclusion. In the case of FIG. 28A, the POS is a tool 3
1 is the distance between the work 30 and the tool 31
Is + before contact with, and-after contact. 0 indicates a contact point. A1 is a membership function shown in FIG. 5, and this function reduces the feed speed of the tool from shortly before the tool comes into contact with the work, and until the tool completely enters the work for a while after the contact with the work. It is an instruction to keep the feed speed lowered, and to return the feed speed to the original speed after the feed is completely stopped.

【0039】図4のANGは、工具がワークと接触する
面の傾きを示すものであり、傾きの程度に応じてB1〜
B5の5種類に分類している。図5にB1〜B5のメン
バーシップ関数を示す。
ANG in FIG. 4 shows the inclination of the surface where the tool comes into contact with the workpiece.
B5. FIG. 5 shows the membership functions of B1 to B5.

【0040】図4のFEEDは、工具の送り速度減少率
であり、どの程度工具の送り速度を減少させるかを示す
もので、C1〜C5の5段階に分類している。図5に、
C1〜C5のメンバーシップ関数を示す。
FEED in FIG. 4 is a tool feed speed reduction rate and indicates how much the tool feed speed is reduced. The FEED is classified into five stages C1 to C5. In FIG.
4 shows membership functions of C1 to C5.

【0041】図4のルールによれば、工具がワークに接
触する直前から、工具がワークに対して完全にくい込む
まで工具が接触するワーク面の傾きに応じて工具の送り
速度を減少させることを意味する。
According to the rule shown in FIG. 4, the feed rate of the tool is reduced according to the inclination of the work surface with which the tool comes into contact immediately before the tool comes into contact with the work from immediately before the tool comes into contact with the work. means.

【0042】推論方法の一例は以下のようにして行な
う。ルール1を例にとれば、工具とワークとの距離を求
め、これを図5−A1のメンバーシップ関数を用いて適
合度を評価する。また、工具がワークと接触する面の傾
きを求め、これを図5−B1のメンバーシップ関数を用
いて適合度を評価する。前件部のルールは、AND条件
であるから、これらの適合度の小さい方を採用し、図5
−C1のメンバーシップ関数を用いて結果を求める。同
様にして、ルール2〜5に関しても結果を求め、これら
の結果を合成して結論を導く。和のとり方の一例として
は、max−min論理積を用い、合成の方法は重心法
を用いた。このようにして導き出された結論を用いて、
工具の送り速度Fを数式4のように修正し、これを工具
の送り速度とする。 F0=F*(100−Z)/100 ……(4) F0は修正した工具の送り速度 Fは指令された送り速度 Zはファジー推論より導き出された工具の減速率であ
る。
One example of the inference method is performed as follows. Taking rule 1 as an example, the distance between the tool and the workpiece is obtained, and the degree of conformity is evaluated using the membership function shown in FIG. 5-A1. Also, the inclination of the surface where the tool contacts the workpiece is obtained, and the degree of conformity is evaluated using the membership function of FIG. 5-B1. Since the rule in the antecedent part is an AND condition, the rule with the smaller degree of conformity is adopted, and FIG.
Find the result using the membership function of C1. Similarly, results are obtained for rules 2 to 5, and the results are combined to obtain a conclusion. As an example of the method of taking the sum, a max-min logical product was used, and the center of gravity method was used as a combining method. Using the conclusions derived in this way,
The feed rate F of the tool is corrected as in Expression 4, and this is set as the feed rate of the tool. F0 = F * (100−Z) / 100 (4) F0 is the corrected feed rate of the tool F is the commanded feed rate Z is the deceleration rate of the tool derived from fuzzy inference.

【0043】図28(b),図29(b)の場合も同様
にして、図4、図5のようなルールを定義して対応する
ことができる。この場合、POSは、図28(a)で工
具31がワーク30を貫通する際の面に関しての距離と
なり、この面の傾きがANGとなる。
Similarly, in the case of FIGS. 28 (b) and 29 (b), rules such as those shown in FIGS. 4 and 5 can be defined. In this case, the POS is the distance with respect to the surface when the tool 31 penetrates the work 30 in FIG. 28A, and the inclination of this surface is ANG.

【0044】図30の場合は、工具の移動方向に応じて
工具の送り速度を修正するように制御し、工具の移動方
向0を工具がワークに対して平行に切削する場合、すな
わち、b−c間を切削する場合とし、移動方向+をワー
クに対してくい込む方向、すなわち、a−b間を切削す
る場合とし、移動方向−をワークに対して逃げる方向、
すなわち、c−d間を切削する場合とする。この工具の
移動方向を入力データとし、図6に示すルールに基づ
き、図7に示すメンバーシップ関数を用いて結論を抽出
する。こうして得られた工具の送り速度減速率から数式
4を用いて修正した工具の送り速度を求める。
In the case of FIG. 30, the control is performed so that the feed speed of the tool is corrected in accordance with the moving direction of the tool, and the tool moves in the moving direction 0 in parallel with the workpiece, that is, b- a case where cutting is performed between c and a direction in which the moving direction + is cut into the work, that is, a case where cutting is performed between a and b, and a moving direction-is a direction in which the work escapes from the work;
That is, it is assumed that cutting is performed between cd. Using the moving direction of the tool as input data, a conclusion is extracted using the membership function shown in FIG. 7 based on the rule shown in FIG. From the tool feed speed deceleration rate thus obtained, the corrected feed speed of the tool is calculated using Expression 4.

【0045】この場合、工具の移動方向が−となる場
合、すなわち、工具がワークに対して逃げる方向に移動
する際には、減速率が−となり、修正された工具の送り
速度は指令された送り速度より増加することになる。
In this case, when the moving direction of the tool is-, that is, when the tool moves in the direction of escaping from the workpiece, the deceleration rate becomes-, and the corrected feed speed of the tool is instructed. It will increase from the feed rate.

【0046】図33に示した例においては、工具31と
進入禁止エリア32との距離を抽出し、この距離を入力
データとし、図8に示すルールに基づき、図9に示すメ
ンバーシップ関数によって減速率を抽出する。抽出され
た減速率を用いて数式4により修正された工具の送り速
度を抽出する。
In the example shown in FIG. 33, the distance between the tool 31 and the no-go area 32 is extracted, this distance is used as input data, and the deceleration is performed by the membership function shown in FIG. 9 based on the rule shown in FIG. Extract the rate. Using the extracted deceleration rate, the feed speed of the tool corrected by Expression 4 is extracted.

【0047】ここで、工具31と進入禁止エリア32と
の距離Lは、図10に示すように工具が進入禁止エリア
32に対してどの位置1〜8にいるのかを判別し、各位
置に応じて図11のフローチャートに示すように距離L
を抽出する。
Here, the distance L between the tool 31 and the no-go area 32 is determined according to each position 1 to 8 with respect to the no-go area 32 as shown in FIG. The distance L as shown in the flowchart of FIG.
Is extracted.

【0048】図11のフローチャートにおいて、工具の
位置をX,Yとし、進入禁止エリアのX軸方向の上限を
XL、下限をXSとし、Y軸方向の上限をYL,下限を
YSとする。ステップ300において工具が図10で示
す1〜8のどのエリアに存在するかを判別するためにX
L,XS,YL,YSを求める。次に、ステップ301
において、XL,XS,YL,YSの値に応じて分類
し、分類結果に応じて工具31と進入禁止エリア32と
の距離Lを抽出する(ステップ302)。
In the flowchart of FIG. 11, the position of the tool is X, Y, the upper limit of the entry prohibited area in the X-axis direction is XL, the lower limit is XS, the upper limit in the Y-axis direction is YL, and the lower limit is YS. In step 300, X is used to determine in which of areas 1 to 8 the tool is shown in FIG.
Find L, XS, YL, YS. Next, step 301
, Classification is performed according to the values of XL, XS, YL, and YS, and a distance L between the tool 31 and the entry-prohibited area 32 is extracted according to the classification result (step 302).

【0049】実施の形態3.次に、本発明の実施の形態
3を図について説明する。図30(a)のように、成形
材に対して加工を行なう場合、ワークの形状に応じて送
り速度を増減させたいわけであるので、ワークの形状か
ら関数自体を自動生成する。自動プログラム内蔵型のC
NCにおいては、あらかじめ素材の形状が入力されてい
るものがあるので、この素材形状をもとに関数を生成す
る。図12はこの自動生成された関数を示すものであ
る。ワークの形状に合わせて、ワークに接触する(a
点)手前で減速し、a点が過ぎた後少ししてから速度を
元に戻し、ワークから出る(b点)手前で再び減速し、
ワークの存在しない部分(b−c間)では許容限度まで
加速し、再びワークに接触する(c点)手前で減速し、
c点を過ぎた後少ししてから速度を元に戻す。
Embodiment 3 Next, a third embodiment of the present invention will be described with reference to the drawings. As shown in FIG. 30 (a), when processing is performed on a molding material, it is desired to increase or decrease the feed rate in accordance with the shape of the work, so that the function itself is automatically generated from the shape of the work. C with built-in automatic program
In some NCs, the shape of a material is input in advance, and a function is generated based on the shape of the material. FIG. 12 shows this automatically generated function. Contact the work according to the shape of the work (a
Point) Deceleration before this point, a little after point a, and then return to the original speed, decelerate again before coming out of the work (point b),
In a portion where the work does not exist (between bc), it accelerates to the allowable limit, and decelerates before coming into contact with the work again (point c).
After a short time after passing the point c, the speed is restored.

【0050】図12の関数の生成方法を図13のフロー
チャートで説明する。ワークへの進入部を判別し(ステ
ップ400)、ワークの進入部の加減速パターンを設定
する(ステップ401〜403)。まず、ワーク端面か
らL1離れた位置からL2離れた位置までZ1%まで減
速させる(ステップ401)。次に、ワークへL3入っ
た位置までZ1%のままにする(ステップ402)。ワ
ークへL4入った位置までで元の送り速度に戻す(ステ
ップ403)。以上のステップにより、ワークに工具が
接触する直前で減速し、ワークに一定距離入った位置で
通常の送り速度となるような加減速パターンが得られ
る。次に、工具がワークから離れる場合であるが、ワー
クからの離脱部を判別し(ステップ404)ワークから
の離脱部の加減速パターンを設定する(ステップ405
〜407)。まず、ワークから離れる位置の手前L5か
らL6の位置まででZ2%まで減速させる(ステップ4
05)。次に、ワークから離れてからL7の位置までZ
2%のままにする(ステップ406)。ワークからL8
離れた位置まででZ3%まで加速する。以上のステップ
により、ワークから工具が離れる際に離れる直前で一担
減速し、一定距離離れた後に指定比率まで加速する加減
速パターンが得られる。
The method of generating the function shown in FIG. 12 will be described with reference to the flowchart shown in FIG. The entry part to the work is determined (step 400), and the acceleration / deceleration pattern of the entry part of the work is set (steps 401 to 403). First, the speed is reduced to Z1% from a position L1 away from the work end surface to a position L2 away from the work end surface (step 401). Next, Z1% is maintained at a position where the work enters L3 (step 402). The original feed speed is returned to the position where the work enters L4 (step 403). According to the above steps, an acceleration / deceleration pattern is obtained in which the speed is reduced immediately before the tool comes into contact with the work, and the normal feed speed is obtained at a position where the work has entered a predetermined distance. Next, in the case where the tool separates from the work, a part that separates from the work is determined (step 404), and an acceleration / deceleration pattern of the part that separates from the work is set (step 405).
407). First, the speed is reduced to Z2% from the position L5 to L6 before the position away from the work (step 4).
05). Next, after moving away from the work, Z
Leave it at 2% (step 406). L8 from work
Accelerate to Z3% at a distance. Through the above steps, an acceleration / deceleration pattern is obtained in which the deceleration is performed immediately before the tool separates from the workpiece, and accelerates to the specified ratio after the tool is separated from the workpiece by a certain distance.

【0051】以上のように生成された関数を用いて、実
際の加工の際に工具の送り速度を修正する。すなわち、
指定された送り速度Fに対して、図12のように生成さ
れた関数を用いて加減速比率を抽出し、修正された送り
速度Foを数式5のように求める。ここでZは図12の
関数より得られる加減速比率である。
Using the function generated as described above, the feed speed of the tool is corrected at the time of actual machining. That is,
The acceleration / deceleration ratio is extracted from the designated feed speed F using the function generated as shown in FIG. 12, and the corrected feed speed Fo is obtained as shown in Expression 5. Here, Z is an acceleration / deceleration ratio obtained from the function of FIG.

【0052】 F0=F*(100+Z)/100 ……(5)F0 = F * (100 + Z) / 100 (5)

【0053】なお、上記実施の形態においては関数の縦
軸に加減速比率を使用する例を示したが、加減速比率の
代わりに実際の送り速度を使用するようにしてもよい。
この場合、数式5は数式6のようになる。 F0=Z ……(6) ここで、Zは関数より得られた修正後の送り速度そのも
のとなる。
In the above embodiment, an example is shown in which the acceleration / deceleration ratio is used on the vertical axis of the function, but an actual feed speed may be used instead of the acceleration / deceleration ratio.
In this case, Equation 5 becomes Equation 6. F0 = Z (6) Here, Z is the corrected feed speed itself obtained from the function.

【0054】また、図32で示した計測動作の場合、計
測精度を上げるため、一度工具31でワーク30を計測
した後、再度計測し直して計測を行なう場合があるが、
この場合にも図14に示すように、一度目の計測結果か
ら2度目の送り速度の加減速パターンを示す関数を自動
生成することにより、より高精度で無駄の無い計測が行
える。図14において、関数1は第1回目の計測の工具
送り速度の減速パターンであり、第1回目の計測という
ことで減速帯域を広くとり、減速率も計測時間を節約す
るため小さくしてある。
In the case of the measurement operation shown in FIG. 32, in order to increase the measurement accuracy, there is a case where the work 30 is once measured with the tool 31 and then measured again to measure again.
In this case as well, as shown in FIG. 14, by automatically generating a function indicating the acceleration / deceleration pattern of the second feed speed from the result of the first measurement, more accurate and lean measurement can be performed. In FIG. 14, a function 1 is a deceleration pattern of the tool feed speed in the first measurement. The deceleration band is widened for the first measurement, and the deceleration rate is also small to save the measurement time.

【0055】一般に計測時の送り速度に比例して計測精
度は低下する。1回目の計測により、計測センサの惰走
量等を考慮してワークの実際の位置を推定する。このワ
ークの推定位置にあらかじめ定められたクリアランス値
を考慮して、図14の関数2のような減速パターンを自
動生成する。関数2においては、減速帯域をせまくして
計測時間の短縮をはかり、減速率を大きくして計測精度
を高めるようにしてある。また、図15、図16はファ
ジーのメンバーシップ関数を自動修正する例であり、1
回目の計測結果をもとに、メンバーシップ関数を変更す
るものである。この場合のファジー制御ルールは、 if POS is Pi then FEED is Fi (i=1〜3) となる。工具の位置(POS)に応じて工具の送り速度
(FEED)を変更させるものである。第1回目におけ
るメンバーシップ関数は図15のP1〜P3、F1〜F
3で示すようにワークに近づいたと判定する幅を広くし
(P1)、工具の2回目の計測におけるメンバーシップ
関数を図16に示すようにワークの予想位置P’に合わ
せて修正する。ワークに近づいたと判定する幅を狭くし
(P1)、工具の送り速度(F1)も遅めに設定する。
ワークから離れている部分(P2,P3)の工具の送り
速度(F2,F3)は速めに設定される。
In general, the measurement accuracy decreases in proportion to the feed speed at the time of measurement. By the first measurement, the actual position of the work is estimated in consideration of the coasting amount of the measurement sensor and the like. A deceleration pattern such as the function 2 in FIG. 14 is automatically generated in consideration of a clearance value predetermined for the estimated position of the work. In the function 2, the measurement time is shortened by narrowing the deceleration band, and the measurement accuracy is increased by increasing the deceleration rate. FIGS. 15 and 16 show examples of automatically correcting a fuzzy membership function.
The membership function is changed based on the result of the second measurement. The fuzzy control rule in this case is if POS is Pithen FEED is Fi (i = 1 to 3). The tool feed speed (FEED) is changed according to the position (POS) of the tool. The membership functions at the first time are P1 to P3 and F1 to F in FIG.
As shown in FIG. 3, the width for determining that the workpiece has approached the work is widened (P1), and the membership function in the second measurement of the tool is corrected according to the expected position P 'of the work as shown in FIG. The width for determining that the workpiece has approached the work is reduced (P1), and the feed speed (F1) of the tool is set to a lower value.
The feed speeds (F2, F3) of the tool in the portions (P2, P3) away from the workpiece are set to be higher.

【0056】実施の形態4.次に、本発明の実施の形態
4を図について説明する。一般に工具の送り速度は、加
工しようとするワークの材質と加工する工具の材質に依
存するところが大きい。よって、標準的な送り速度を定
め、ワークと工具の材質の組合せから送り速度を修正す
ることが考えられる。図17は、このためのルールを示
したものである。ここで、Ti(i=0〜9)は工具の
材質を示し、Wz(z=0〜9)はワークの材質を示
す。ところが、TOOL、WORKとも図17のように
細かく(10段階)分類した場合、ルールの数が非常に
多くなる。図17の場合、図18に示すようにルールの
数は100にも及んでしまう。このため、全てのルール
に関して演算し、結果を抽出しようとした場合、非常に
推論時間がかかることになる。そこで、与えられる工具
やワークの材質硬度に該当するTOOL,WORKのみ
に関してルールを実行することにする。
Embodiment 4 Next, a fourth embodiment of the present invention will be described with reference to the drawings. Generally, the feed rate of a tool largely depends on the material of a workpiece to be machined and the material of a tool to be machined. Therefore, it is conceivable to determine the standard feed speed and correct the feed speed based on the combination of the materials of the work and the tool. FIG. 17 shows rules for this. Here, Ti (i = 0 to 9) indicates the material of the tool, and Wz (z = 0 to 9) indicates the material of the work. However, when both TOOL and WORK are finely classified (10 levels) as shown in FIG. 17, the number of rules becomes very large. In the case of FIG. 17, the number of rules reaches 100 as shown in FIG. For this reason, when it is attempted to perform an operation on all the rules and extract the result, it takes a very long inference time. Therefore, the rule is executed only for TOOL and WORK corresponding to the material hardness of a given tool or work.

【0057】例えば、工具やワークの材質硬度がきちん
と数値で与えられる場合には、この値に図17で示すメ
ンバーシップ関数が該当するもののみ推論することにす
る。T5のメンバーシップ関数が硬度α〜βの値の場
合、与えられた工具の硬度Kが α≦K≦β ならば、T5は該当すると判断する。また、工具やワー
クの材質硬度があいまいで、これらの硬度自体がメンバ
ーシップ関数で与えられる場合、この与えられたメンバ
ーシップ関数がとる硬度の範囲内にあるT0〜T9,W
0〜W9のメンバーシップ関数が該当するものであると
判断する。図17の゛TOOL″および゛WORK″の
メンバーシップ関数の矢印部分がこのメンバーシップ関
数に与えられた事実とすると、この与えられた事実をメ
ンバーシップ関数の領域とするメンバーシップ関数は゛
TOOL″では゛T4″,゛T5″であり、゛WOR
K″では゛W6″,゛W7″となる。
For example, when the hardness of the material of a tool or a work is properly given by a numerical value, only those whose membership function shown in FIG. 17 corresponds to this value are inferred. When the membership function of T5 is a value of hardness α to β, if the hardness K of the given tool is α ≦ K ≦ β, it is determined that T5 is applicable. Further, when the material hardness of the tool or the work is ambiguous and the hardness itself is given by a membership function, T0 to T9, W within the range of the hardness taken by the given membership function.
It is determined that the membership functions 0 to W9 are applicable. Assuming that the arrow portions of the membership functions of "TOOL" and "WORK" in FIG. 17 are the facts given to this membership function, the membership function whose domain is the given fact is given by "TOOL". Are ゛ T4 ”, ゛ T5” and ゛ WOR
In the case of "K", they are $ W6 "and $ W7".

【0058】図19は、このようにして該当するメンバ
ーシップ関数を抽出した結果、TOOLではT4〜T5
が、WORKではW6〜W7が該当したため、ルールの
F64,F65,F74,F75のみを実行し、結論を
導くようにした例である。図20は実行すべきルールを
抽出するアルゴリズムを示すフローチャートである。図
20において、iはルールの番号を示すものとし、jは
各ルールの前件部の番号を示すものとする。ルールの数
はnであり、各ルールの前件部の数はmiとする。i=
1と初期化し(ステップ601)、次にj=1と初期化
する(ステップ602)。i番目のルールの第j番目の
前件部のメンバーシップ関数の領域(α,β)を抽出す
る(ステップ603)。メンバーシップ関数の領域と
は、定義されたメンバーシップ関数の横軸方向のとる値
の範囲である。ステップ603で抽出した領域内にこの
メンバーシップ関数に与える値Dij(事実)が存在す
るかどうかチェックする(ステップ604)。Dijが
特定の値でない場合、例えば、Dijもメンバーシップ
関数であった場合には、Dijと(α,β)とでオーバ
ラップする部分があるかどうかで判別する。
FIG. 19 shows the result of extracting the corresponding membership function as described above.
However, in the WORK, since W6 to W7 correspond, only the rules F64, F65, F74, and F75 are executed to draw a conclusion. FIG. 20 is a flowchart showing an algorithm for extracting a rule to be executed. In FIG. 20, i indicates the number of the rule, and j indicates the number of the antecedent of each rule. The number of rules is n, and the number of antecedents of each rule is mi. i =
1 (step 601), and then j = 1 (step 602). The region (α, β) of the membership function of the j-th antecedent part of the i-th rule is extracted (step 603). The region of the membership function is a range of values of the defined membership function in the horizontal axis direction. It is checked whether the value Dij (fact) given to the membership function exists in the area extracted in step 603 (step 604). If Dij is not a specific value, for example, if Dij is also a membership function, it is determined whether or not there is an overlapping portion between Dij and (α, β).

【0059】ステップ604の判別がYESであれば、
jの値を1だけ増加させる(ステップ605)。jがm
i内の値かどうか、すなわち、i番目のルールで判別し
ていない前件部のメンバーシップ関数があるかどうかチ
ェックする(ステップ606)。ステップ606の判別
がYESであればステップ603に戻る、NOであれば
ステップ607へ行く。ステップ604でYESと判別
された場合、i番目のルールの実行フラグをOFFにす
る(ステップ608)。ステップ606でNOと判別さ
れた場合は、i番目のルールの実行フラグをONにする
(ステップ607)。ルールの実行フラグとは、各ルー
ルを実行すべきかどうかを区分するためのものであり、
ファジー推論を行う際、このフラグがONのルールのみ
実行するものとする。ステップ602から608の処理
においては各ルールの前件部のメンバーシップ関数の領
域内にメンバーシップ関数に与える値Dijが1つでも
存在しないルールがあれば、そのルールは、MAX_M
IN法を用いて推論する限り必ず0となるため、推論の
必要無しとしてルールの実行フラグをOFFにするもの
である。次に、iの値を1だけ増加させる(ステップ6
09)。iがn内の値かどうか、すなわち、全てのルー
ルに関して判別したかどうかをチェックする(ステップ
610)。ステップ610の判別がYES、すなわち、
まだ判別すべきルールが残っている場合はステップ60
2に戻り、NOであれば処理を終了する。
If the determination in step 604 is YES,
The value of j is increased by 1 (step 605). j is m
It is checked whether it is a value within i, that is, whether there is a membership function of the antecedent part that has not been determined by the i-th rule (step 606). If the determination in step 606 is YES, the process returns to step 603; otherwise, the process proceeds to step 607. If YES is determined in the step 604, the execution flag of the i-th rule is turned off (step 608). If NO is determined in step 606, the execution flag of the i-th rule is turned ON (step 607). The rule execution flag is used to distinguish whether each rule should be executed or not.
When performing fuzzy inference, it is assumed that only rules for which this flag is ON are executed. In the processing of steps 602 to 608, if there is a rule in which no value Dij given to the membership function exists in the membership function area of the antecedent part of each rule, the rule is MAX_M
Since the value is always 0 as long as the inference is performed using the IN method, the rule execution flag is set to OFF as no inference is necessary. Next, the value of i is increased by 1 (step 6).
09). It is checked whether i is a value within n, that is, whether all the rules have been determined (step 610). If the determination in step 610 is YES, that is,
If there are still rules to be determined, step 60
Returning to step 2, if NO, the process ends.

【0060】実施の形態5.次に本発明の実施の形態5
を図について説明する。一般に、ファジーのメンバーシ
ップ関数の形状は図37に示すように様々な形状(51
〜56)が考えられる。 このため、図8の例において
従来はルールを定義する際、図8のR1〜R3で示すよ
うにルールを定義し、メンバーシップ関数A1,A2,
A3,B1,B2,B3は別にあらためて定義せざるを
えなかった。このため、メンバーシップ関数を定義する
専用のマンマシンインターフェースを用意し、システム
内部でメンバーシップ関数を記憶させておく大きな記憶
エリアを必要とした。そこで、本発明においては、メン
バーシップ関数を特定の形状パターンとし、メンバーシ
ップ関数の定義をルールの定義と同時に行なえるように
した。図21の57のはその一例であり、メンバーシッ
プ関数を全て二等辺三角形で定義するものとし、Liが
中心位置liが二等辺三角形の底辺の1/2の長さを示
す。このようにした場合、メンバーシップ関数の形状は
形状57の中心(すなわち重心位置)Liと底辺の1/
2の長さliで定義可能であるので、Liとliを入力す
るだけでよい。このため、図8のルールに関してルール
とメンバーシップ関数を図22のように同時に定義する
ことが可能である。
Embodiment 5 FIG. Next, Embodiment 5 of the present invention
Will be described with reference to FIG. Generally, the shape of the fuzzy membership function has various shapes (51) as shown in FIG.
To 56) are conceivable. For this reason, conventionally, when defining rules in the example of FIG. 8, rules are defined as indicated by R1 to R3 in FIG. 8, and membership functions A1, A2,
A3, B1, B2 and B3 had to be defined anew. For this reason, a dedicated man-machine interface for defining the membership function was prepared, and a large storage area for storing the membership function inside the system was required. Therefore, in the present invention, the membership function is set to a specific shape pattern, and the definition of the membership function can be performed simultaneously with the definition of the rule. Reference numeral 57 in FIG. 21 shows an example of such a case, in which the membership functions are all defined by isosceles triangles, and Li indicates the length of the center position li of the base half of the isosceles triangle. In this case, the shape of the membership function is the center of the shape 57 (that is, the position of the center of gravity) Li and 1/1 of the base.
Since the length can be defined by two lengths li, it is only necessary to input Li and li. Therefore, it is possible to simultaneously define the rule and the membership function for the rule in FIG. 8 as shown in FIG.

【0061】図22において、A1,A2,A3,B
1,B2,B3は各メンバーシップ関数の中心であり、
a1,a2,a3,b1,b2,b3は各メンバーシッ
プ関数の底辺の1/2の長さを示すものである。また、
メンバーシップ関数の形状パターンの他の例としては、
図21の58のように不感帯を設ける場合や、59のよ
うに左右非対称の形状にしてもよい。この場合、パラメ
ータを追加して、メンバーシップ関数を(Li,li,m
i)で表わせばよい。
In FIG. 22, A1, A2, A3, B
1, B2 and B3 are the centers of each membership function,
a1, a2, a3, b1, b2, and b3 indicate the length of half the base of each membership function. Also,
Other examples of membership function shape patterns include:
A case where a dead zone is provided as shown in FIG. 21 or a shape which is asymmetrical as shown in FIG. In this case, a parameter is added to change the membership function to (Li, li, m
It can be expressed in i).

【0062】実施の形態6.次に本発明の実施の形態6
を図について説明する。一般に定義されるメンバーシッ
プ関数の形状は図21の57で示す形状が大半である。
そこで、メンバーシップ関数の形状パターンを57のよ
うに二等辺三角形にすると、ルールの後件部から結論を
導く際、図23で示すように、適合度α(0≦α≦1)
の場合後件部のメンバーシップ関数61に関して推論結
果を求めると、重心位置は二等辺三角形であるからLi
であり、面積値Siは台形であるから、 Si=(lj+li)*α となる。ここで、ljは台形の上底の半分の長さであ
り、liは下底の半分の長さであり、αが高さとなる。 li:lj=1:(1−α) であるから、 lj=(1−α)li となる。よって、 Si=(li+(1−α)li)*α =(2−α)*α*li となる。よって、Siの値はα、liより容易に算出さ
れ、結論を高速で導き出すことが可能となる。
Embodiment 6 FIG. Next, Embodiment 6 of the present invention
Will be described with reference to FIG. The shape of the generally defined membership function is mostly the shape indicated by 57 in FIG.
Therefore, when the shape pattern of the membership function is an isosceles triangle such as 57, when drawing a conclusion from the consequent part of the rule, as shown in FIG. 23, the fitness α (0 ≦ α ≦ 1)
When the inference result is obtained for the membership function 61 in the consequent part, the position of the center of gravity is an isosceles triangle.
Since the area value Si is trapezoidal, Si = (lj + li) * α. Here, lj is half the length of the upper base of the trapezoid, l i is half the length of the lower base, and α is the height. Since li: lj = 1: (1−α), lj = (1−α) li. Therefore, Si = (li + (1-α) li) * α = (2-α) * α * li. Therefore, the value of Si can be easily calculated from α and l i, and a conclusion can be drawn at high speed.

【0063】実施の形態7.次に、本発明の実施の形態
7に関して説明する。従来ファジー推論においては、図
36に示すように各ルールの推論結果で総合する際は、
各ルールの結果のメンバーシップ関数の形状を重ね合わ
せ、こうして得られた形状の重心を求める方法をとって
いた。図35は3つのルールの結果を総合してMAX_
MIN法を用いて3つのメンバーシップ関数の形状を合
成したものである。このように各ルールの結論を合成す
ると、形状を合成して新たな形状を抽出しなくてはなら
ず、処理に時間がかかると共に、図35の例ではルール
2の結果が全く最終結論に影響しなくなる。すなわち、
図35においてルール2の後件部のメンバーシップ関数
の中心位置を多少ずらしても何ら最終結論に影響を与え
ない。このようなケースが生じるため、従来の方法では
メンバーシップ関数の調整がむずかしいという問題もあ
った。そこで本発明においては、各ルールの結果の重心
位置Liと面積Siとから最終結論Lを数式7のように推
論することにより求める。ここでnはルールの数であ
る。このようにすることで、各ルールの結果は必ず最終
結論に対して影響を与えることになり、かつ形状の合成
を行わないので、ファジー推論するための処理が高速に
行なえる。第10発明の方式と組み合わせることにより
さらに一層高速処理が可能となる。
Embodiment 7 FIG. Next, a seventh embodiment of the present invention will be described. In conventional fuzzy inference, when summing up the inference results of each rule as shown in FIG.
In this method, the shapes of the membership functions resulting from the respective rules are superimposed, and the center of gravity of the obtained shape is obtained. FIG. 35 shows the results of the three rules, MAX_
The shape of the three membership functions is synthesized using the MIN method. When the conclusions of the rules are combined as described above, it is necessary to combine the shapes to extract a new shape, and it takes a long time to process. In the example of FIG. 35, the result of the rule 2 completely affects the final conclusion. No longer. That is,
In FIG. 35, even if the center position of the membership function of the consequent part of Rule 2 is slightly shifted, the final conclusion is not affected at all. Since such a case occurs, there is also a problem that it is difficult to adjust the membership function in the conventional method. Therefore, in the present invention, the final conclusion L is obtained by inferring Equation 7 from the barycenter position Li and the area Si resulting from each rule. Here, n is the number of rules. By doing so, the result of each rule always has an effect on the final conclusion, and since the shape is not synthesized, the processing for fuzzy inference can be performed at high speed. By combining with the method of the tenth invention, further high-speed processing becomes possible.

【0064】[0064]

【数2】 (Equation 2)

【0065】実施の形態8.次に、本発明の実施の形態
8に関して説明する。従来ファジー推論においては、各
ルールが全て等価に扱われ、ルールの重要性を結論に反
映することはできなかった。しかし、実際には最終結論
を導く際に、ルールの重要度を考慮する必要がある。そ
こで本発明においては、各ルールの重要度を図24に示
すように例えばVALで重要度を定義する。重要なルー
ルはVALに大きな値を与え、あまり重要でないルール
には小さな値を与える。この各ルールの重要度をβiと
し、重心位置Liと面積Siとから最終結論Lを数式8
のように推論することにより求める。ここでnはルール
の数である。このようにすることで、各ルールの重要度
を考慮したファジー推論を行える。また、重要度βiは
負の値も許すものとし、これにより否定のルールを設定
することも可能となる。
Embodiment 8 FIG. Next, an eighth embodiment of the present invention will be described. Conventionally, in fuzzy inference, all rules are treated equally, and the importance of the rules cannot be reflected in the conclusion. In practice, however, it is necessary to consider the importance of the rules when drawing the final conclusion. Therefore, in the present invention, the importance of each rule is defined by, for example, VAL as shown in FIG. Important rules give VAL a large value and less important rules give a small value. Let βi be the importance of each rule, and determine the final conclusion L from the center of gravity position Li and the area Si as
It is determined by inference as follows. Here, n is the number of rules. By doing so, fuzzy inference can be performed in consideration of the importance of each rule. In addition, the importance βi is allowed to have a negative value, which makes it possible to set a negative rule.

【0066】[0066]

【数3】 (Equation 3)

【0067】[0067]

【発明の効果】以上説明したように本発明によれば、送
り速度を変化させるためのルールを関数の形式であらか
じめ定義しておき、関数形式のルールに必要な送り速度
を決定するための要素を入力するとともに、この入力し
た要素と関数形式のルールに基づいて必要な出力値を求
め、この求めた値を予め定義されている数式に基づいて
演算して最終の送り速度を求めるので、加工条件等のノ
ウハウをシステムを変更することなく容易に変更可能と
なり、最終結論を導き出すため、種々の要因を考慮した
複雑な制御が容易に実現できる。また、従来は送り速度
を階段状にしか変化させられなかったが、本発明によれ
ば関数の形で送り速度の変化を指定できるのでスムース
に送り速度を変化させることが可能となった。また本発
明によれば、知識記憶部に格納されている関数を数値制
御側が任意に変更可能であるので、加工状況に応じて最
適の関数を設定することで、さらに最適の制御が可能と
なる。これにより、基本的な知識を知識記憶部に設定し
ておき、関数値をある一定のルールで変更すればよいよ
うな場合にはいちいち関数を作業者が変更することなし
に加工が可能となる。
As described above, according to the present invention, the rule for changing the feed rate is defined in advance in the form of a function, and the element for determining the feed rate required for the rule in the function form is defined. And the required output value is calculated based on the input element and the rules of the function form, and the calculated value is calculated based on a pre-defined formula to obtain the final feed speed. Know-how such as conditions can be easily changed without changing the system, and a complicated control considering various factors can be easily realized in order to draw a final conclusion. Conventionally, the feed speed can be changed only in a stepwise manner. However, according to the present invention, the change of the feed speed can be designated in the form of a function, so that the feed speed can be changed smoothly. According to the present invention, the function stored in the knowledge storage unit can be arbitrarily changed on the numerical control side. Therefore, by setting an optimum function in accordance with a machining situation, further optimum control becomes possible. . Thereby, when basic knowledge is set in the knowledge storage unit and the function value needs to be changed according to a certain rule, the processing can be performed without the operator changing the function each time. .

【0068】また本発明によれば、知識記憶部に格納さ
れているルールを一律に実行することなく、実行する必
要があると判断したルールに関してのみ推論を行なうた
め、ルールの数が多い場合に推論速度を向上させること
が可能である。
Further, according to the present invention, the rules stored in the knowledge storage unit are not uniformly executed, and only the rules determined to be required to be executed are inferred. It is possible to increase the speed of inference.

【0069】また本発明によれば、ファジールール自体
とそのメンバーシップ関数を同時にしかも容易に定義可
能となり、メンバーシップ関数の記憶エリアも小さくて
済み、各ルールの結論を高速に推論可能となる。
According to the present invention, the fuzzy rule itself and its membership function can be simultaneously and easily defined, the storage area of the membership function can be reduced, and the conclusion of each rule can be inferred at high speed.

【0070】更にまた本発明によれば、各ルールの重要
度を考慮して最終結論を導くことが可能となり、この重
要度を調整することでより好適な推論を行うこともでき
るようになる。メンバーシップ関数の調整とも合わせ
て、より理想的なルールを設定可能となる。また、重要
度に負の値を入れると、ルールの結論の面積値が負にな
ることにより、否定のルールを設定したことになる。こ
れにより、今までの方法では定義不可能であった if A is A1 then B is not B1 のようなルールの設定も可能となる。なおまた、“ファ
ジイルール”中にルールの重要度を記載しているので、
ファジイルールのチューニングの際、ファジイ制御の結
果を考慮して容易に重要度を変更できるようになる。
Further, according to the present invention, it is possible to derive a final conclusion in consideration of the importance of each rule, and it is possible to perform more appropriate inference by adjusting the importance. Together with the adjustment of the membership function, more ideal rules can be set. In addition, when a negative value is entered for the importance, the area value at the conclusion of the rule becomes negative, which means that a negative rule has been set. This makes it possible to set a rule such as if A is A1 then Bis not B1, which could not be defined by the conventional method. In addition, since the importance of the rule is described in the "fuzzy rule",
When tuning the fuzzy rule, the importance can be easily changed in consideration of the result of the fuzzy control.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明による数値制御装置の要部ブロック図
である。
FIG. 1 is a main block diagram of a numerical control device according to the present invention.

【図2】 本発明による知識部に設定された送り速度制
御のルールの一例を示す図である。
FIG. 2 is a diagram illustrating an example of a feed speed control rule set in a knowledge unit according to the present invention.

【図3】 本発明による推論部の処理に関するフローチ
ャートである。
FIG. 3 is a flowchart relating to processing of an inference unit according to the present invention.

【図4】 本発明による知識部に設定された送り速度制
御のルールの一例を示す図である。
FIG. 4 is a diagram showing an example of a feed speed control rule set in a knowledge unit according to the present invention.

【図5】 本発明による知識部に設定された送り速度制
御のメンバーシップ関数の一例を示す図である。
FIG. 5 is a diagram illustrating an example of a membership function of feed speed control set in a knowledge unit according to the present invention.

【図6】 本発明による知識部に設定された送り速度制
御のルールの一例を示す図である。
FIG. 6 is a diagram showing an example of a feed speed control rule set in a knowledge unit according to the present invention.

【図7】 本発明による知識部に設定された送り速度制
御のメンバーシップ関数の一例を示す図である。
FIG. 7 is a diagram illustrating an example of a membership function of feed speed control set in a knowledge unit according to the present invention.

【図8】 本発明による知識部に設定された送り速度制
御のルールの一例を示す図である。
FIG. 8 is a diagram showing an example of a feed speed control rule set in a knowledge unit according to the present invention.

【図9】 本発明による知識部に設定された送り速度制
御のメンバーシップ関数の一例を示す図である。
FIG. 9 is a diagram illustrating an example of a membership function of feed rate control set in the knowledge unit according to the present invention.

【図10】 本発明による進入禁止エリアと工具との距
離を抽出する説明図である。
FIG. 10 is an explanatory diagram for extracting a distance between an entry-prohibited area and a tool according to the present invention.

【図11】 本発明による進入禁止エリアと工具との距
離を抽出するフローチャートである。
FIG. 11 is a flowchart for extracting a distance between a tool and a tool according to the present invention.

【図12】 本発明による知識部に格納する関数の一例
を示す図である。
FIG. 12 is a diagram showing an example of a function stored in the knowledge unit according to the present invention.

【図13】 本発明による知識部の関数作成を行なうフ
ローチャートである。
FIG. 13 is a flowchart for creating a function of a knowledge unit according to the present invention.

【図14】 本発明による計測時の知識部の関数作成に
関する説明図である。
FIG. 14 is an explanatory diagram relating to creation of a function of a knowledge unit at the time of measurement according to the present invention.

【図15】 本発明による計測時の知識部の関数作成に
関する説明図である。
FIG. 15 is an explanatory diagram relating to creation of a function of a knowledge unit at the time of measurement according to the present invention.

【図16】 本発明による計測時の知識部の関数作成に
関する説明図である。
FIG. 16 is an explanatory diagram relating to creation of a function of a knowledge unit during measurement according to the present invention.

【図17】 本発明による工具とワークの材質とから送
り速度を修正する知識部の設定データの一例を示す図で
ある。
FIG. 17 is a diagram showing an example of setting data of a knowledge unit for correcting a feed speed based on a tool and a material of a work according to the present invention.

【図18】 本発明による工具とワークの材質とから送
り速度を修正する知識部のルールマトリクスの一例を示
す図である。
FIG. 18 is a diagram illustrating an example of a rule matrix of a knowledge unit for correcting a feed speed based on a tool and a material of a work according to the present invention.

【図19】 本発明による工具とワークの材質とから送
り速度を修正する知識部のルールマトリクスから該当す
るルールだけを実行する一例を示す図である。
FIG. 19 is a diagram showing an example of executing only a corresponding rule from a rule matrix of a knowledge unit for correcting a feed rate from a tool and a material of a work according to the present invention.

【図20】 本発明による実行すべきルール抽出のフロ
ーチャートである。
FIG. 20 is a flowchart of extracting rules to be executed according to the present invention.

【図21】 本発明によるメンバーシップ関数の形を示
す図である。
FIG. 21 is a diagram showing a form of a membership function according to the present invention.

【図22】 本発明によるルールの設定方法を示す図で
ある。
FIG. 22 is a diagram showing a rule setting method according to the present invention.

【図23】 本発明によるメンバーシップ関数の演算法
を示す図である。
FIG. 23 is a diagram showing an operation method of a membership function according to the present invention.

【図24】 本発明によるルールの設定方法を示す図で
ある。
FIG. 24 is a diagram showing a rule setting method according to the present invention.

【図25】 従来の送り速度制御部の要部ブロック図で
ある。
FIG. 25 is a block diagram of a main part of a conventional feed speed control unit.

【図26】 従来のコーナ部におけるプログラム経路の
説明図である。
FIG. 26 is an explanatory diagram of a program path in a conventional corner unit.

【図27】 従来のコーナオーバライド機能の説明図で
ある。
FIG. 27 is an explanatory diagram of a conventional corner override function.

【図28】 従来の穴あけ加工説明図である。FIG. 28 is an explanatory view of a conventional drilling process.

【図29】 従来のテーパ部分の穴あけ加工説明図であ
る。
FIG. 29 is an explanatory view of a conventional drilling process for a tapered portion.

【図30】 従来の成型材ワークの加工説明図である。FIG. 30 is an explanatory view of processing of a conventional molding material work.

【図31】 従来の途中型の加工説明図である。FIG. 31 is an explanatory diagram of processing of a conventional intermediate mold.

【図32】 従来の計測説明図である。FIG. 32 is an explanatory diagram of a conventional measurement.

【図33】 従来の進入禁止エリア設定における制御説
明図である。
FIG. 33 is an explanatory diagram of control in setting a no-entry area in the related art.

【図34】 従来の数値制御装置のブロック図である。FIG. 34 is a block diagram of a conventional numerical control device.

【図35】 従来のMAX_MIN法によるメンバーシ
ップ関数の合成法を示す図である。
FIG. 35 is a diagram showing a conventional membership function synthesis method using the MAX_MIN method.

【図36】 従来のメンバーシップ関数の演算法を示す
図である。
FIG. 36 is a diagram showing a conventional method of calculating a membership function.

【図37】 従来のメンバーシップ関数の形を示す図で
ある。
FIG. 37 is a diagram showing a form of a conventional membership function.

【符号の説明】[Explanation of symbols]

1 工作機械 11 テープリーダ 12 メモリ 13 強電制御装置 14 MDI 15 表示ユニット 16 操作盤 17 制御装置 20 CNC指令データ 21 パルス分配処理部 22 サーボ制御部 23 サーボモータ 24 送り速度処理部 25 知識記憶部 26 推論部 30 ワーク 31 工具 32 進入禁止エリア REFERENCE SIGNS LIST 1 machine tool 11 tape reader 12 memory 13 high power control device 14 MDI 15 display unit 16 operation panel 17 control device 20 CNC command data 21 pulse distribution processing unit 22 servo control unit 23 servo motor 24 feed speed processing unit 25 knowledge storage unit 26 inference Part 30 Work 31 Tool 32 Entry prohibited area

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 送り速度を変化させることが出来る数値
制御装置において、送り速度を変化させるための1個以
上のルールが関数形式で記述されたものを記憶する知識
記憶部と、この知識記憶部に格納された関数形式のルー
ルに必要な加工条件を決定するための要素を入力すると
ともに、この入力した要素と関数形式のルールに基づい
て必要な出力値を求め、この求めた値を予め定義されて
いる数式に基づいて演算して最終の送り速度を求める推
論部と、上記知識記憶部に記憶される関数を、加工する
加工ワーク形状又は被測定ワーク形状に基づいて自動生
成する手段とを備え、上記推論部にて求められた送り速
度に基づいて被制御体を制御することを特徴とする数値
制御装置。
In a numerical control device capable of changing a feed rate, a knowledge storage unit for storing one or more rules for changing the feed speed described in a functional form, and a knowledge storage unit Input the elements for determining the processing conditions required for the function-type rules stored in the, and obtain the required output values based on the input elements and the function-type rules, and define the obtained values in advance. An inference unit that calculates the final feed rate by calculating based on the mathematical formula that has been performed, and a unit that automatically generates a function stored in the knowledge storage unit based on the shape of the workpiece to be processed or the workpiece shape to be measured. A numerical control device for controlling the controlled object based on the feed speed obtained by the inference unit.
【請求項2】 制御条件を変化させるためのルールをプ
ロダクションルールの形式で記述したものを複数記憶す
る知識記憶部と、この知識記憶部に格納されたルールか
ら望ましい制御条件を推論するファジー推論部とを備
え、上記知識記憶部に格納されている複数のルールのう
ち、入力値に対応するメンバーシップ関数を含むルール
のみを抽出し、この抽出されたルールだけを用いて推論
する手段を設けたことを特徴とするファジー推論装置。
2. A knowledge storage unit for storing a plurality of rules for changing control conditions in the form of a production rule, and a fuzzy inference unit for inferring a desired control condition from the rules stored in the knowledge storage unit. Means for extracting only rules including a membership function corresponding to an input value from a plurality of rules stored in the knowledge storage unit, and providing means for performing inference using only the extracted rules. A fuzzy inference apparatus characterized in that:
【請求項3】 制御条件を変化させるためのルールをプ
ロダクションルールの形式で記述した知識記憶部と、こ
の知識記憶部に格納されたルールから望ましい制御条件
を推論するファジー推論部とを備え、ファジー推論の後
件部に用いるメンバーシップ関数を全て二等辺三角形と
するとともに、上記ルール中に直接にメンバーシップ関
数を定義したことを特徴とするファジー推論装置。
3. A fuzzy inference unit comprising: a knowledge storage unit in which a rule for changing a control condition is described in the form of a production rule; and a fuzzy inference unit for inferring a desired control condition from the rule stored in the knowledge storage unit. A fuzzy inference apparatus characterized in that the membership functions used for the consequent part of the inference are all isosceles triangles, and the membership functions are directly defined in the rules.
【請求項4】 上記知識記憶部に、制御条件を変化させ
るためのプロダクションルールに直接ルールの重要度β
iを定義したものを記憶させるようにし、且つファジー
推論を行う際に、上記ルールに定義された重要度βi
と、各ルールの結果の面積Siと重心位置Liとを用い
て、推論結果を次式より求めることを特徴とする請求項
2または請求項3に記載のファジー推論装置。 【数1】
4. In the knowledge storage unit, the production rule for changing the control condition is directly assigned to the importance β of the rule.
i is stored, and when performing fuzzy inference, the importance βi defined in the above rule
The fuzzy inference apparatus according to claim 2 or 3, wherein the inference result is obtained from the following equation using the area Si and the center of gravity position Li of the result of each rule. (Equation 1)
JP14632999A 1999-05-26 1999-05-26 Numerical control unit Expired - Fee Related JP3189829B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14632999A JP3189829B2 (en) 1999-05-26 1999-05-26 Numerical control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14632999A JP3189829B2 (en) 1999-05-26 1999-05-26 Numerical control unit

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP3221587A Division JP3036143B2 (en) 1991-09-02 1991-09-02 Numerical control unit

Publications (2)

Publication Number Publication Date
JP2000003213A true JP2000003213A (en) 2000-01-07
JP3189829B2 JP3189829B2 (en) 2001-07-16

Family

ID=15405230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14632999A Expired - Fee Related JP3189829B2 (en) 1999-05-26 1999-05-26 Numerical control unit

Country Status (1)

Country Link
JP (1) JP3189829B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6806674B2 (en) 2001-06-06 2004-10-19 Fanuc Ltd. Control device for driving and controlling a servomotor
JP2015005108A (en) * 2013-06-20 2015-01-08 ファナック株式会社 Numerical controller for machine tool performing drilling

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6806674B2 (en) 2001-06-06 2004-10-19 Fanuc Ltd. Control device for driving and controlling a servomotor
JP2015005108A (en) * 2013-06-20 2015-01-08 ファナック株式会社 Numerical controller for machine tool performing drilling
US9665087B2 (en) 2013-06-20 2017-05-30 Fanuc Corporation Numerical controller of machine tool for drilling

Also Published As

Publication number Publication date
JP3189829B2 (en) 2001-07-16

Similar Documents

Publication Publication Date Title
KR960004558B1 (en) Tool feed rate control of a numerical control unit
US11681274B2 (en) Postprocessor device that generates a machining program including instruction for changing at least one parameter to be used for controlling at least one axis of a CNC machine tool
US5923561A (en) Process of generating a succession of discrete points defining cutter path, by calculating a space interval of discrete points
JP6148264B2 (en) Machine tools with a function to automatically change cutting conditions
JP5556971B1 (en) Numerical controller
US11644813B2 (en) Numerical controller, CNC machine tool, numerical control method, and computer-readable information storage medium
JP2514191B2 (en) Method for creating NC part program for laser machining
US9921567B2 (en) High speed smooth tool path
JP6122046B2 (en) Numerical control device that can partially correct the machining cycle
JP3189829B2 (en) Numerical control unit
Yan et al. NC program evaluator for higher machining productivity
KR20090006445A (en) Method for regulating a path of an instrument
US10564625B2 (en) High speed tool path
JP3378445B2 (en) Numerical control device for 3D cutting machine
JP3902353B2 (en) Numerical controller
JP4489323B2 (en) Numerical controller
JP4489324B2 (en) Numerical controller
JP2640467B2 (en) Numerical control unit
JP2002182717A (en) Block data processing method for, numerical controller
JPH073943U (en) Controller for NC machine tool
JPH06246586A (en) Numerical control program preparing device
JPH0549411B2 (en)
JPH05324035A (en) Cutting path generating method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees