[go: up one dir, main page]

JPH03144701A - Fuzzy controller and its operating method - Google Patents

Fuzzy controller and its operating method

Info

Publication number
JPH03144701A
JPH03144701A JP1282047A JP28204789A JPH03144701A JP H03144701 A JPH03144701 A JP H03144701A JP 1282047 A JP1282047 A JP 1282047A JP 28204789 A JP28204789 A JP 28204789A JP H03144701 A JPH03144701 A JP H03144701A
Authority
JP
Japan
Prior art keywords
rule
input
code
membership function
sub
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.)
Pending
Application number
JP1282047A
Other languages
Japanese (ja)
Inventor
Koubin Chiyou
張 洪敏
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.)
APUTO INSTR KK
Omron Corp
Original Assignee
APUTO INSTR KK
Omron Corp
Omron Tateisi Electronics Co
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 APUTO INSTR KK, Omron Corp, Omron Tateisi Electronics Co filed Critical APUTO INSTR KK
Priority to JP1282047A priority Critical patent/JPH03144701A/en
Publication of JPH03144701A publication Critical patent/JPH03144701A/en
Pending legal-status Critical Current

Links

Landscapes

  • Feedback Control In General (AREA)

Abstract

PURPOSE:To attain rapid fuzzy inference processing by providing the fuzzy controller with a membership function memory for outputting a truth value corresponding to the input data supplied from an input register and an arithmetic circuit for executing fuzzy operation between plural truth values outputted from membership functions in each rule. CONSTITUTION:The codes of subrules are formed by using codes indicating the input variables of an antecedent part in each rule and codes indicating membership functions, then stored in a rule memory 21 in a fixed order. Then input data stored in an input register 22 are selected by the codes indicating the input variables included in the codes of the subrules. On the other hand, data indicating plural kinds of membership functions in each input variable are previously stored in the membership function memory 23 and one membership function is specified by the code indicating the input variable included in the subrule code and the code indicating the membership function. Thus, rapid inference can be attained.

Description

【発明の詳細な説明】 発明の要約 ルール・メモリからサブルールを一定順序で読出し.そ
のサブルールによって.メンバーシップ関数メモリ内の
メンバーシップ関数を指定するとともに9入力レジスタ
内の入力変数の値を読出す。読出された入力変数をメン
バーシップ関数に作用させて真理値を得る。1つのルー
ルに属するサブルール間で真理値の演算を行なう。ルー
ル・メモリからのサブルールの読出し.メンバーシップ
関数メモ′りからの真理値の出力,および真理値の演算
を,サブルールごとにパイプライン処理で順次実行する
[Detailed description of the invention] Read sub-rules from the invention's summary rule memory in a fixed order. By that sub-rule. Specifies the membership function in the membership function memory and reads the value of the input variable in the 9-input register. A truth value is obtained by applying the read input variable to the membership function. A truth value calculation is performed between subrules belonging to one rule. Reading subrules from rule memory. The output of the truth value from the membership function memo and the operation of the truth value are executed sequentially by pipeline processing for each subrule.

発明の背景 この発明はファジィ・コントローラおよびその動作方法
に関する。
BACKGROUND OF THE INVENTION This invention relates to fuzzy controllers and methods of operation thereof.

ファジィ推論処理,ファジィ制御等4種々の用語で呼ば
れるファジィ理論を利用した処理が脚光を浴び,ファジ
ィ推論のための専用のハードウェア・アーキテクチャも
開発されつつある。このハードウェアはファジィ推論装
置,ファジィ制御装置,ファジィ・コンピュータ、ファ
ジィ・コントローラ等の名称で呼ばれている。
Processing using fuzzy theory, which is referred to by various terms such as fuzzy inference processing and fuzzy control, is in the spotlight, and dedicated hardware architectures for fuzzy inference are also being developed. This hardware is called a fuzzy inference device, a fuzzy control device, a fuzzy computer, a fuzzy controller, etc.

ファジィ推論は,代表的にはIf.thenルールと呼
ばれるモーダス・ボネンスの推論形式にしたがって行な
われる。このルールは1rではじまる前件部とこれをt
henで受ける後件部とからなる。
Fuzzy inference is typically If. This is done according to the Modus-Bonens inference format called the then rule. This rule uses the antecedent part starting with 1r and the antecedent part starting with 1r.
It consists of the consequent part which is received by hen.

般に前件部には複数の入力変数が含まれ,比較的複雑な
場合が多いので,専用のハードウェア・アーキテクチャ
を用いても比較的時間がかかる。
Generally, the antecedent part includes multiple input variables and is often relatively complex, so even if a dedicated hardware architecture is used, it is relatively time consuming.

発明の概要 この発明は迅速なファジィ推論処理が可能なファジィ・
コントローラおよびその動作方法を提供することを目的
とする。
Summary of the Invention This invention provides a fuzzy
The purpose is to provide a controller and its operating method.

この発明によるファジィ・コントローラは,入力変数ご
とに分解されかつコード化されたサブルールを一定の順
序で記憶するルール・メモリ。
The fuzzy controller according to the present invention has a rule memory that stores subrules that are decomposed and coded for each input variable in a fixed order.

入力変数ごとに入力データを一時的に記憶する入力レジ
スタ,複数種類のメンバーシップ関数をあらかじめ記憶
し,上記ルール・メモリから読出されたサブ、ルールに
よって指定されたメンバーシップ関数において,上記入
力レジスタから与えられる入力データに対応する真理値
を出力するメンバーシップ関数メモリ、および上記メン
バーシップ関数から出力される真理値の間で,ルールご
とに,ファジィ演算を行なう演算回路を備えている。
An input register that temporarily stores input data for each input variable, multiple types of membership functions that are stored in advance, and sub-registers that are read from the rule memory, and membership functions specified by the rules from the input registers. It includes a membership function memory that outputs truth values corresponding to given input data, and an arithmetic circuit that performs fuzzy operations for each rule between the truth values output from the membership functions.

この発明による上記ファジィ・コントローラの動作方法
によると,ルールにおける前件部の入力変数を表わすコ
ードとメンバーシップ関数を表わすコードとを用いてサ
ブルールのコードを形威し,このサブルールのフードを
一定順序で上記ルール・メモリに記憶させておく。そし
て、サブルールのコードに含まれる入力変数を表わすコ
ードによって上記入力レジスタに記憶されている入力デ
ータを選択させる。また、上記メンバーシップ関数メモ
リに,入力変数ごとに複数種類のメンバーシップ関数を
表わすデータをあらかじめ記憶させておき、サブルール
のコードに含まれる入力変数を表わすコードとメンバー
シップ関数を表わすコードとによって一つのメンバーシ
ップ関数を指定する。
According to the operating method of the fuzzy controller according to the present invention, the code of the sub-rule is formed using the code representing the input variable of the antecedent part of the rule and the code representing the membership function, and the food of this sub-rule is arranged in a certain order. The above rule is stored in the memory. Then, the input data stored in the input register is selected by the code representing the input variable included in the code of the sub-rule. In addition, data representing multiple types of membership functions for each input variable is stored in the membership function memory in advance, and the code representing the input variable and the code representing the membership function included in the code of the sub-rule are unified. Specify one membership function.

以上のようにして、この発明によると、ルール・メモリ
からのサブルールの読出し、メンバーシップ関数メモリ
からの真理値の読出し、および真理値間のファジィ演算
を、いわゆるパイプライン処理で行なうことができるの
で、ファジィ推論の実行速度が速くなり、高速推論が可
能となる。
As described above, according to the present invention, it is possible to read sub-rules from the rule memory, read truth values from the membership function memory, and perform fuzzy operations between truth values by so-called pipeline processing. , the execution speed of fuzzy inference becomes faster, and high-speed inference becomes possible.

実施例の説明 ファジィ・コントローラの全体構成とファジィ推論のi
要 第1図はファジィ・コントローラの全体的な構成を示し
ている。ファジィ・コントローラは制御部11.ファジ
ィ推論部12およびAD/DA変換部13から構成され
、これらの各部11.12.13は適当なインターフェ
イスを介してディジタル◆バス14によって相互に接続
されている。
Explanation of Example Overall configuration of fuzzy controller and i of fuzzy inference
FIG. 1 shows the overall structure of the fuzzy controller. The fuzzy controller is the control unit 11. It is composed of a fuzzy inference section 12 and an AD/DA conversion section 13, and these sections 11, 12, and 13 are interconnected by a digital ◆ bus 14 via a suitable interface.

制御部11はファジィ・コントローラの全体的な動作を
統括するマイクロプロセッサ、その実行プログラムを格
納したROMおよび各種データを記憶するRAMを含ん
でいる。制御部Ifはまたファジィ推論結果を用いて総
合演算および確定値演算(たとえば重心演算)処理を行
なう。制御部Uには必要ならばキーボード、CRT表示
装置等の入出力装置が接続される。
The control unit 11 includes a microprocessor that controls the overall operation of the fuzzy controller, a ROM that stores its execution program, and a RAM that stores various data. The control unit If also performs comprehensive calculation and definite value calculation (for example, centroid calculation) using the fuzzy inference results. If necessary, input/output devices such as a keyboard and a CRT display device are connected to the control unit U.

ファジィ推論部12は、第13図を参照して後に詳述す
るように、ルール・メモリ21.入力レジスタ22、メ
ンバーシップ関数メモリ2B、KIN回路24、MAX
回路25.タイミング制御回路(図示路)等を含み、所
定のファジィ推論演算を行なう。
The fuzzy inference unit 12 includes a rule memory 21. Input register 22, membership function memory 2B, KIN circuit 24, MAX
Circuit 25. It includes a timing control circuit (as shown), etc., and performs predetermined fuzzy inference calculations.

AD/DA変換部13は、アナログ入力をディジタル信
号に変換するAD変換器とディジタル出力をアナログ出
力信号に変換するDA変換器とを含んでいる。この実施
例では入力変数の数は4個。
The AD/DA converter 13 includes an AD converter that converts an analog input into a digital signal and a DA converter that converts a digital output into an analog output signal. In this example, the number of input variables is four.

出力変数の数は3個である。The number of output variables is three.

後に明らかになるように、この実施例のファジィ・コン
トローラは8個の入力変数(これをxl、x2.x3.
x4.x5.x6.x7およびX8とする)についての
メンバーシップ関数を設定することが可能である。これ
らの8個の入力変数のうちの任意の指定された4個が実
際にA D/D A変換部13に取込可能であり、その
指定された4個の入力変数についての制御ルールが設定
可能である。3個の出力変数をyl、y2およびy3で
表わす。
As will become clear later, the fuzzy controller of this embodiment has eight input variables (xl, x2.x3 .
x4. x5. x6. x7 and x8). Any specified four of these eight input variables can actually be taken into the AD/DA converter 13, and control rules for the specified four input variables are set. It is possible. The three output variables are denoted yl, y2 and y3.

第2図はメンバーシップ関数の一例を示すものである。FIG. 2 shows an example of a membership function.

この実施例では78類のメンバーシップ関数NL、NM
、NS、ZR,PS、PMおよびPLが用いられている
。これらのメンバーシップ関数の意味は次の通りである
In this example, membership functions NL, NM of class 78
, NS, ZR, PS, PM and PL are used. The meanings of these membership functions are as follows.

N L : Negative Large:負の大き
な値N M : Negative McdluII:
負の中位の値N S : Negative Smal
l :負の小さな値Z R: Zero:は°ぼ零 P S: Po5itive Small :正の小さ
な値P M : Po5itive Medium :
正の中位の値P L : Po5itive Larg
e:正の大きな値NL−PLをメンバーシップ関数のラ
ベルという。
NL: Negative Large: Large negative value NM: Negative McdluII:
Negative medium value N S : Negative Small
l : Negative small value Z R : Zero : is °bo zero P S : Po5itive Small : Positive small value P M : Po5itive Medium :
Positive medium value PL: Po5itive Large
e: The large positive value NL-PL is called the label of the membership function.

メンバーシップ関数はm2図に示すように三角形状に限
らず任意の形のものを設定することができる。
The membership function is not limited to a triangular shape as shown in the m2 diagram, but can be set to any shape.

第3図はメンバーシップ関数のシングルトン表現の例を
示している。このようなシングルトンはとくにルールに
おける後件部のファジィ集合を表現するのに適し、その
場合には総合演算、確定値演算がきわめて容易になる。
FIG. 3 shows an example of a singleton representation of a membership function. Such a singleton is particularly suitable for expressing a fuzzy set of consequents in a rule, and in that case, comprehensive operations and definite value operations become extremely easy.

ファジィ制御のためのルールはII’、then  (
もし・・・、ならば・・・)形式で表現される。8個の
入力変数のうちxi、x3.x5およびX7が選択され
ているものとし、これらの入力変数を用いた出力y1に
ついてのルールの一例を次に示す。
The rules for fuzzy control are II', then (
If..., then...) is expressed in the form. Of the eight input variables, xi, x3. Assuming that x5 and X7 are selected, an example of a rule for output y1 using these input variables will be shown below.

(ルール1) l(’ xl  is NS、  x3  Is PS
、  x5  is ZRand  x  7  Is
  NS、then  y  1  is  NLこれ
を簡略化して次のように表現する。
(Rule 1) l(' xl is NS, x3 Is PS
, x5 is ZRand x 7 Is
NS, then y 1 is NL This is simplified and expressed as follows.

(ルール1) xi−NS、x3−PS、x5−ZR。(Rule 1) xi-NS, x3-PS, x5-ZR.

x 7 = N S            4y 1
− N Lxl=Ns−x7−NSまでを前件部、yl
−NLを後件部という。以下同じように3個のルールの
例を示す。
x 7 = N S 4y 1
- N Lxl=Ns-x7-NS is the antecedent part, yl
-NL is called the consequent part. Below, examples of three rules will be shown in the same way.

(ルール2) x3−PM、x7−NS、x5廊PM。(Rule 2) x3-PM, x7-NS, x5 Hall PM.

xl=PL            −eyl−NM(
ルール3) xi−NL、x3−NS、x5−PL →y 1 ■PL (ルール4) x5=NL、  x3−ZR,x7−PM。
xl=PL-eyl-NM(
Rule 3) xi-NL, x3-NS, x5-PL →y 1 ■PL (Rule 4) x5=NL, x3-ZR, x7-PM.

xi−NS            −yl−=PL上
記において入力変数の順序が一定していないが、後に詳
述するファジィ推論部12における処理に特に問題は無
い。
xi-NS -yl-=PL Although the order of the input variables is not constant in the above, there is no particular problem in the processing in the fuzzy inference unit 12, which will be described in detail later.

ルール1についてのファジィ推論過程が第4図に示され
ている。
The fuzzy inference process for Rule 1 is shown in FIG.

メンバーシップ関数NSに対する入力X1の適合度(こ
れを真理値という)alが求められる。
The goodness of fit (this is called a truth value) al of the input X1 with respect to the membership function NS is determined.

同じようにメンバーシップ関数PS、ZR,NSにおけ
る入力x3.x5.x7の真理値a3゜a5.a7が求
められる。
Similarly, input x3 in the membership functions PS, ZR, NS. x5. Truth value of x7 a3゜a5. a7 is required.

次にこれらの真理値al、a3.a5およびa7のM 
I N演算(最も小さいものを選択する)が行なわれる
。M I N l寅算結果をaNLとする。
Next, these truth values al, a3. M of a5 and a7
An I N operation (select the smallest) is performed. Let the calculation result of M I N l be aNL.

出力y1についてのルール1における後件部のメンバー
シップ関数NLとMIN演算結果aNLとの間のMIN
演算(トランケーション)が行なわれ、第4図に斜線で
示すメンバーシップ関数SNLが得られる。
MIN between the membership function NL of the consequent part in rule 1 for output y1 and the MIN calculation result aNL
A computation (truncation) is performed to obtain the membership function SNL shown with diagonal lines in FIG.

同じようにルール2についてもファジィ推論が行なわれ
る。
Fuzzy inference is similarly performed for Rule 2 as well.

ルール3とルール4の後件部のメンバーシップ関数はと
もにPLである。そこでこのような場合には、ルール3
の前件部の推論結果a  とルーLI ル4の前件部の推論結果a  とのMAX演算L2 (大きい方を選択する)が行なわれる。このMAX演算
結果をa とし、このaPLとPLとのL MIN演算が行なわれ、結果S、Lが得られる。
The membership functions of the consequent parts of Rule 3 and Rule 4 are both PL. Therefore, in such a case, rule 3
A MAX operation L2 (selecting the larger one) between the inference result a of the antecedent part of rule LI and the inference result a of the antecedent part of rule 4 is performed. The result of this MAX operation is set as a, and the L MIN operation between aPL and PL is performed to obtain results S and L.

このようにして得られた各ルールごとの推論結果S、S
S  のMAX演算が第5図に示すNL   NM’ 
 PL ようにして行なわれて最終的な推論結果が得られる。こ
の最終的な推論結果(これはファジィである)をデファ
ジファイ(たとえば重心演算により)することにより、
確定値Wが得られる。この確定値Wが出力y1として出
力されることになる。
Inference results S, S for each rule obtained in this way
The MAX operation of S is NL NM' shown in Figure 5.
PL The final inference result is obtained. By defuzzifying this final inference result (which is fuzzy) (e.g. by centroid calculation),
A definite value W is obtained. This determined value W will be output as the output y1.

後件部のメンバーシップ関数がシングルトンの場合には
確定値Wは次式により得られる。
When the membership function of the consequent part is a singleton, the definite value W is obtained by the following equation.

PL          −P−L W−Σ k ・a、/Σ at 1・NL  111−NL klはシングルトンの重み係数 1−NL−PL ファジィ推論部12ではMIN演算結果a 1(1−N
L−PL)を得る演算処理(これを狭義のファジィ推論
処理という)が行なわれる。それ以降の演算処理(これ
を総合演算、確定値演算処理という)は制御部11で実
行される。
PL -P-L W-Σ k ・a, /Σ at 1・NL 111-NL kl is the singleton weighting coefficient 1-NL-PL The fuzzy inference unit 12 uses the MIN operation result a 1 (1-N
A calculation process (this is referred to as fuzzy inference process in a narrow sense) is performed to obtain L-PL. The subsequent arithmetic processing (referred to as comprehensive arithmetic and fixed value arithmetic processing) is executed by the control unit 11.

ルール・コードの作成 各ルールは入力変数と同数のサブルールに分解される。Creating rule code Each rule is decomposed into as many subrules as there are input variables.

たとえif上述のルール1は次のように4個のサブルー
ルに分解される。
For example, if Rule 1 above is decomposed into four sub-rules as follows.

xi−NS  −”  yl−NL x3−PS  −yl−NL x5−ZR→yl−NL X7寓NS  −4yl−NL これらのサブルールはそれぞれ8ビツトのコードで表現
される。この8ビツトのコードをルール・コードという
xi-NS -" yl-NL x3-PS -yl-NL x5-ZR→yl-NL・It is called a code.

出力変数y1についての上述した(第8図に示す)4個
のルール(ルール1〜ルール4)をそれぞれサブルール
に分解し、かつルール・コードに変換して一定の順序で
配列した様子が第9図に示されている。第9図に示す「
ルール・コード等」が後に示すファジィ推論部12のル
ール・メモリ21に格納されることになる。
Figure 9 shows how the four rules (rules 1 to 4) described above (shown in Figure 8) regarding the output variable y1 are each broken down into sub-rules, converted into rule codes, and arranged in a certain order. As shown in the figure. “
``rule code, etc.'' will be stored in the rule memory 21 of the fuzzy inference section 12, which will be described later.

このように多数のルールを、一定の順序で配列された8
ビツトのルール・コードの集合で表現するために1次の
方法が採用される。
In this way, a large number of rules are arranged in a certain order.
A first-order method is adopted to represent a set of bit rule codes.

(1)出力変数ごとにブロックを形成する。すなわち、
出力変数y1についてのルール(ルール・コード)の集
合をブロック1.出力変数y2についてのルールの集合
をブロック2.出力変数y3についてのルールの集合を
ブロック3とする。
(1) Form a block for each output variable. That is,
A set of rules (rule code) for the output variable y1 is set in block 1. A set of rules for the output variable y2 is set as block 2. Let block 3 be a set of rules for output variable y3.

ルール・コードの集合の先頭にそのブロックの番号を示
すブロック・フラグ(8ビツト)が置かれる。
A block flag (8 bits) indicating the number of the block is placed at the beginning of the set of rule codes.

(2)後件部のメンバーシップ関数がNL、NM。(2) The membership functions of the consequent part are NL and NM.

NS、ZR,PS、PM、PLの順序となるようにルー
ル(サブルール)を配列する。
Rules (subrules) are arranged in the order of NS, ZR, PS, PM, and PL.

(3)後件部のメンバーシップ関数NL−PLのうちル
ールが存在しないものについては、空(Null)ルー
ルを挿入する。この空ルールは入力変数をX8とし、前
件部のメンバーシップ関数をN8とするものである。メ
ンバーシップ関数N8は常に0の値をとる。
(3) For membership functions NL-PL of the consequent part for which no rules exist, insert null rules. This empty rule has an input variable of X8 and a membership function of the antecedent part of N8. The membership function N8 always takes a value of 0.

たとえば、第8図に示すルール1〜ルール4には、後件
部がNS、ZR,PSおよびPMとなるルールは存在し
ない。そこでこれらのメンバーシップ関数NS、ZR,
PS、PMについてはそれらが後件部に設定される空ル
ールx8−N8(4個の空サブルール)を置く。これに
より。
For example, among rules 1 to 4 shown in FIG. 8, there are no rules whose consequent parts are NS, ZR, PS, and PM. Therefore, these membership functions NS, ZR,
For PS and PM, empty rules x8-N8 (4 empty sub-rules) are set in the consequent part. Due to this.

ルールの配列順序は必ず上記(2)の通りとなる。The arrangement order of the rules is always as shown in (2) above.

(4)各ルールを構成するサブルールの数は必ず一定個
数(この実施例では4個)になるようにする。
(4) The number of sub-rules constituting each rule is always a constant number (four in this embodiment).

上述のルール1,2および4からはそれぞれ4個のサブ
ルールが生成される。しかしながらルール3からは3個
のサブルールしか生じない。そこで1つの空(Null
)サブルールを加えて、サブルールの数を4個とする。
Four subrules are generated from each of the above rules 1, 2, and 4. However, rule 3 only yields three subrules. Then there is one empty (Null)
) subrules are added to bring the number of subrules to 4.

この場合の空サブルールでは入力変数がxlでメンバー
シップ関数がN1とする(xl−Nl)。メンバーシッ
プ関数N1は常に1の値をとるものとする。
In this case, in the empty subrule, the input variable is xl and the membership function is N1 (xl-Nl). It is assumed that the membership function N1 always takes a value of 1.

空ルールについても上述のようにそれぞれ4個の空サブ
ルールx8−N8を作成する。
Regarding the empty rules, four empty sub-rules x8-N8 are each created as described above.

(5)8ビツトのルール・コードのフォーマットを第6
図に示す通りとする。すなわち、D7〜DOのコードの
うち、D7をラベル・フラグ、D6をルール・フラグと
する。また、D5〜D3の3ビツトで入力変数X1〜X
8を表わし、D2〜DOの3ビツトで前件部のラベルN
L−PL(およびNl、N8)を表わす。入力変数X1
〜x8および前件部のラベルNL−PL、Nl、N8に
割当てられたコード(3ビツト)が第7図に示されてい
る。
(5) Change the format of the 8-bit rule code to 6th.
As shown in the figure. That is, among the codes D7 to DO, D7 is a label flag and D6 is a rule flag. In addition, input variables X1 to X are input using 3 bits D5 to D3.
8, and the label N of the antecedent part is represented by 3 bits D2 to DO.
Represents L-PL (and Nl, N8). Input variable X1
.about.x8 and the codes (3 bits) assigned to the labels NL-PL, Nl, and N8 of the antecedent part are shown in FIG.

ラベル・フラグD7は、上記(2)で示した規則により
一定の順序で配列された後件部のメンバーシップ関数が
変化する場所で“1”にセットされる。すなわち、後件
部のラベルを同じくする4個のサブルールのうちの先頭
のサブルールのコードにおいてのみ“1”とされる(た
とえば第9図のサブルールNo、 2. 6. A、 
 E、 12.16゜LA)。
The label flag D7 is set to "1" at a location where the membership function of the consequent part arranged in a certain order according to the rule shown in (2) above changes. That is, it is set to "1" only in the code of the first subrule among the four subrules that have the same consequent label (for example, subrule No. 2. 6. A in FIG. 9).
E, 12.16° LA).

ルール・フラグD6は、一定順序で配列されたルール・
コードのルールが変化する場所でl″にセットされる。
Rule flag D6 indicates rule flags arranged in a fixed order.
Set to l'' where the rules of the code change.

すなわち、1つのルールに属するサブルールのうちの先
頭のサブルールのコードにおいてのみ“1”とされる(
たとえば第9図のサブルールNo、 2.6. A、 
E、 12.1B、  IAおよび1E)。第9図にお
いて、後件部のラベルがPLのルールは2つ(ルール3
とルール4)あるから、サブルールNo、IAのルール
・コードではD7.D6がともに1°であるが、サブル
ールNo、IEのルール・コードにおいてはD6のみが
1″であることに注意されたい。
In other words, it is set to "1" only in the code of the first subrule among the subrules belonging to one rule (
For example, sub-rule No. 2.6 in FIG. A,
E, 12.1B, IA and 1E). In Figure 9, there are two rules whose consequent is labeled PL (Rule 3
Since there is a rule 4), the sub-rule number is D7 in the IA rule code. Note that both D6 are 1°, but only D6 is 1'' in the rule code of sub-rule No. and IE.

フラグD7.D6は空ルールについても同じように適用
される。
Flag D7. D6 applies similarly to empty rules.

しかしながら、コードD5.D4.D3およびD2.D
I、Doは空サブルールにおいては特定のコード、この
実施例ではそれぞれ上述したようにxlまたはx8(0
00または1ll)およびN1またはN8(ともに11
1 )とする。
However, code D5. D4. D3 and D2. D
I, Do are specific codes in the empty subrule, in this example xl or x8 (0
00 or 1ll) and N1 or N8 (both 11
1).

(6)1フロツクを構成するルール◆コートノ集合の前
、後にそれぞれ開始フラグ、終了フラグを置く。この実
施例では開始フラグはooooottt、終了フラグは
11100111である。
(6) Rules for configuring one flock ◆ Place a start flag and an end flag before and after the code set, respectively. In this example, the start flag is ooooottt and the end flag is 11100111.

第9図において、これらの開始フラグ、終了フラグにも
サブルールNo、が割当てられているが。
In FIG. 9, sub-rule numbers are also assigned to these start flags and end flags.

全コードを管理するためのもので本質的な事項ではない
。また、第9図ではブロック・フラグと開始フラグとの
間にサブルール数を示すコードが挿入されている。この
サブルール数と同数のルール・コード(開始フラグ、終
了フラグを含む)のルール・メモリ21からの読出しが
終了したときに1ブロツクについての処理が終了したこ
とになる。
This is for managing all codes and is not an essential matter. Furthermore, in FIG. 9, a code indicating the number of subrules is inserted between the block flag and the start flag. When the reading of the same number of rule codes (including start flags and end flags) from the rule memory 21 as the number of sub-rules is completed, processing for one block is completed.

第1図に戻ってこのファジィ・コントローラはプログラ
ム・モードと動作モードの2つのモードをもっている。
Returning to FIG. 1, this fuzzy controller has two modes: a program mode and an operating mode.

プログラム・モードではメンバーシップ関数の入力、設
定、ルールの入力、設定等が行なわれる。キーボード等
の入力装置から入力されたメンバーシップ関数を表わす
データは制御部11からファジィ推論部12のメンバー
シップ関数メモリ23に設定、記憶される。同じように
入力装置から適当な言語またはコードを用いて入力され
たルールは制御部11内のRAMに一旦記憶され。
In the program mode, membership functions are input and set, rules are input and set, and the like. Data representing a membership function input from an input device such as a keyboard is set and stored in the membership function memory 23 of the fuzzy inference section 12 from the control section 11. Similarly, rules input using an appropriate language or code from an input device are temporarily stored in the RAM in the control unit 11.

CPUによるルール・コード作成処理を通して第9図に
示すようなルール・コードに変換され。
It is converted into a rule code as shown in FIG. 9 through the rule code creation process by the CPU.

ファジィ推論部12内のルール・メモリ21に記憶され
る。
It is stored in the rule memory 21 within the fuzzy inference section 12.

第10a図および第10b図は上記ルール・コード作成
処理の手順を示している。
FIGS. 10a and 10b show the procedure of the rule code creation process.

まず第10a図において、ブロックN081のルール、
すなわち出力変数y1についての処理から開始される(
ステップ101 )。出力変数y1についてルールが入
力、設定されていれば(ステップ102でNo) 、ブ
ロック・フラグ(ブロック1については第9図に示すよ
うに00000001)がセットされる(ステップ10
3)。続いて、入力、設定されたルールから派生するサ
ブルール(空サブルールおよび開始、終了フラグを含む
)の数が算出され、セットされる(ステップ104)。
First, in FIG. 10a, the rule of block N081,
In other words, the process starts with the output variable y1 (
Step 101). If a rule has been input and set for output variable y1 (No in step 102), a block flag (00000001 as shown in FIG. 9 for block 1) is set (step 10).
3). Subsequently, the number of sub-rules (including empty sub-rules and start and end flags) derived from the input and set rules is calculated and set (step 104).

さらに、開始フラグがセットされ(ステップ105 )
 、第tob図に示すルール・コード作成ルーチンに移
る(ステップ106)。このルーチンによってブロック
1のすべてのルール−コードが作成されると、最後に終
了フラグがセットされる(ステップ107)。
Furthermore, a start flag is set (step 105).
, the process moves to the rule code creation routine shown in FIG. 2 (step 106). When all the rule-codes of block 1 have been created by this routine, an end flag is finally set (step 107).

出力変数y1についてのルールが入力、設定されていな
ければ(ステップ102でYES ) 、上述のステッ
プ103〜107の処理はスキップされる。
If a rule for the output variable y1 has not been input or set (YES in step 102), the processes in steps 103 to 107 described above are skipped.

この実施例では出力変数の数は3であるから。In this example, the number of output variables is three.

ステップ102〜107の処理が3回繰返される。すな
わち、出力変数y3についてのルール・コード作成が終
了するまで、ステップtag 、 109を経てステッ
プ102に戻り、処理が繰返される。
The processing of steps 102 to 107 is repeated three times. That is, the process returns to step 102 via steps tag and 109, and the process is repeated until the creation of the rule code for output variable y3 is completed.

第10b図のルール・コード作成ルーチンにおいて、配
列順序第1番目のラベルNLについての処理から始まり
(ステップ111 ) 、まずラベル・フラグD7が“
1“にセットされる(ステップ112 )。1種類のラ
ベルについて複数個のルールが設定されていることがあ
るので(上述したラベルPLについてのルール3.4の
ように)、そのうちの第1番目のルールが取込まれ、ル
ール・フラグD6が“1″にセットされる(ステップ1
14)。
In the rule code creation routine of FIG. 10b, processing starts with the first label NL in the arrangement order (step 111), and first, label flag D7 is set to "
1" (step 112). Since multiple rules may be set for one type of label (as in rule 3.4 for label PL described above), the first rules are imported and the rule flag D6 is set to "1" (step 1).
14).

上述のように後件部のメンバーシップ関数(ラベル)は
一定の順序(NLから始まりPLで終る)で配列される
必要があるので、ルール・コード作成もその順序で行な
われなければならない。
As mentioned above, since the membership functions (labels) of the consequent part need to be arranged in a certain order (starting with NL and ending with PL), the rule code must also be created in that order.

そこで、今から処理すべきルールのラベルがその順序通
りのものかどうかがチエツクされる(ステップ115)
Therefore, it is checked whether the labels of the rules to be processed now are in that order (step 115).
.

一定の順序にしたがうラベルであれば、ルール中の第1
番目のサブルールが取込まれ(ステップ116)  そ
れが空サブルールであるかどうかがチエツクされる(ス
テップ118 )。空サブルールでなければ、そのサブ
ルールの前件部の入力変数とラベルが第7図に示すコー
ド割当てにしたがってコード化される(ステップfli
t )。空サブルールの場合にはD5〜DOは0(10
111にセットされる(ステップll9)。ステップ1
17〜119の処理は1つのルールにおけるすべてのサ
ブルールについて行なわれる(ステップ120 、12
1 )。
If the labels follow a certain order, the first one in the rule
The second sub-rule is fetched (step 116) and it is checked whether it is an empty sub-rule (step 118). If the subrule is not an empty subrule, the input variables and labels of the antecedent part of the subrule are coded according to the code assignment shown in FIG.
t). In the case of empty subrules, D5 to DO are 0 (10
111 (step ll9). Step 1
The processes 17 to 119 are performed for all subrules in one rule (steps 120, 12
1).

また、上述のステップ114〜121の処理は。Further, the processing in steps 114 to 121 described above is as follows.

1種類の後件部ラベルにおけるすべてのルールについて
繰返して行なわれる(ステップ122゜123)。
This is repeated for all rules in one type of consequent label (steps 122 and 123).

後件部ラベルについてルールが入力、設定されていない
場合には空ラベルであるから、4個の空ルール・コード
111111がセットされる(ステップ124 、 1
25 )。
If no rule is input or set for the consequent label, it is an empty label, so four empty rule codes 111111 are set (steps 124 and 1).
25).

ステップ112〜125の処理は、すべてのラベルにつ
いて、一定の順序にしたがって順次実行される(ステッ
プ128 、1.27 )。そして、最後のラベルPL
についてのルール・コード作成が終了すれば、このルー
チンを抜は出て、第10a図のステップ107に移る。
The processes of steps 112 to 125 are sequentially executed for all labels in a fixed order (steps 128 and 1.27). And the last label PL
When the rule code creation for is completed, this routine is skipped and the process moves to step 107 in FIG. 10a.

ファジィ推論動作 次にファジィ・コントローラにおけるファジィ推論動作
の詳細について説明する。
Fuzzy Inference Operation Next, the details of the fuzzy inference operation in the fuzzy controller will be explained.

上述したようにファジィ推論部12では狭義のファジィ
推論処理が、制御部11では総合演算、確定値演算処理
がそれぞれ実行されるが、これらの両部11.12にお
ける処理は並行的に行なわれる。
As described above, the fuzzy inference section 12 executes fuzzy inference processing in a narrow sense, and the control section 11 executes comprehensive calculation and definite value calculation processing, but the processing in both sections 11 and 12 is performed in parallel.

その様子が第11図に示されている。これは出力変数が
1個の場合の例である。
The situation is shown in FIG. This is an example where there is one output variable.

AD/DA変換部13からAD変換された入力データ(
xi、x3.x5.x7等)が制御部11のCPUの制
御の下に取込まれ、これが推論部12の入力レジスタ2
2に書込まれる。入力レジスタ22の入力データはそれ
についての狭義のファジィ推論処理が終了するまで保持
される。
The AD-converted input data from the AD/DA converter 13 (
xi, x3. x5. x7, etc.) is taken in under the control of the CPU of the control unit 11, and this is input to the input register 2 of the inference unit 12.
Written to 2. The input data in the input register 22 is held until the fuzzy inference processing in a narrow sense regarding it is completed.

この後、ファジィ推論部12では入力レジスタ22に保
持されている入力データを用いて狭義のファジィ推論処
理が行なわれる。これと並行して、制御部11では前サ
イクルにおいてファジィ推論部12で得られた結果(a
  : 1−NL−PL)を用いて総合演算、確定値演
算処理が行なわれ、その最終結果が出力される。一般に
推論部12における推論処理は制御部11における演算
処理よりも時間がかかるので、制御部11は推論部12
における推論処理が終了するまで待つ。
Thereafter, the fuzzy inference unit 12 performs fuzzy inference processing in a narrow sense using the input data held in the input register 22. In parallel, the control unit 11 calculates the result (a) obtained by the fuzzy inference unit 12 in the previous cycle.
: 1-NL-PL) is used to perform comprehensive calculation and definite value calculation processing, and the final result is output. Generally, the inference processing in the inference unit 12 takes more time than the calculation processing in the control unit 11, so the control unit 11
Wait until the inference process in .

これで1サイクル動作が終り、制御部11と推論部12
は次のAD変換データの取込1入力レジスタへの書込み
処理に進む。
This completes one cycle of operation, and the control unit 11 and inference unit 12
Then, the process proceeds to the writing process of the next AD conversion data to the acquisition 1 input register.

第12図は第11図におけるファジィ推論部12の狭義
のファジィ推論処理の流れを示している。第9図に示す
ようなルール・コードに基づいて処理が行なわれるので
、まず開始フラグに基づく信号が出力される。続いてラ
ベルNLについてのファジィ推論処理が行なわれるので
、その開始時にラベル・フラグに基づく信号が出力され
る。ラベルNLについてのファジィ推論処理が終るとそ
の推論結果a が出力されるから、このaNLは制御部
L 11に取込まれる。続いてラベルNMについてのファジ
ィ推論処理が同じように行なわれる。ラベルPLについ
ての処理が終了すると、終了フラグに基づく信号が出力
される。
FIG. 12 shows the flow of fuzzy inference processing in a narrow sense by the fuzzy inference unit 12 in FIG. 11. Since processing is performed based on the rule code as shown in FIG. 9, a signal based on the start flag is first output. Subsequently, fuzzy inference processing is performed on the label NL, and a signal based on the label flag is output at the start of the fuzzy inference processing. When the fuzzy inference processing for the label NL is completed, the inference result a is output, and this aNL is taken into the control unit L11. Subsequently, fuzzy inference processing for label NM is performed in the same manner. When the processing for the label PL is completed, a signal based on the end flag is output.

開始フラグ、終了フラグ、ラベル・フラグ。Start flag, end flag, label flag.

ルール・フラグに基づく信号は制御部11が推論部12
を管理したり、推論結果a 1(t −N’L〜PL)
を取込んだり、推論部12におけるタイミング制御等の
ために用いられる。
The control unit 11 sends a signal based on the rule flag to the inference unit 12.
or manage the inference result a1(t -N'L~PL)
It is used for timing control, etc. in the inference unit 12.

第13図はファジィ推論部12の具体的構成例を示して
いる。第14図は第13図に示す回路の動作タイミング
を示すタイム・チャートである。第13図においてはタ
イミング回路およびタイミング信号。
FIG. 13 shows a specific example of the configuration of the fuzzy inference section 12. FIG. 14 is a time chart showing the operation timing of the circuit shown in FIG. 13. In FIG. 13, a timing circuit and a timing signal.

ならびにルール・メモリ21へのルール・コードの書込
みのための、およびメンバーシップ関数(MSF)メモ
リ23へのメンバーシップ関数を表わすデータを書込む
ための回路(バス、ゲート回路、制御信号等)の図示も
省略されている。第14図においてクロック信号QOの
1周期Tの間に1サブルールについての推論が行なわれ
る。ファジィ推論はいわゆるバイブライン処理により実
行され、そのためのタイミング信号がCA、CB。
and circuits (buses, gate circuits, control signals, etc.) for writing the rule code into the rule memory 21 and for writing data representing the membership function into the membership function (MSF) memory 23. Illustration is also omitted. In FIG. 14, inference regarding one subrule is performed during one period T of the clock signal QO. Fuzzy inference is executed by so-called vibe line processing, and the timing signals for this are CA and CB.

CC,CD、CEとして示されている。Shown as CC, CD, CE.

これらの図を参照して、ルール・メモリ21には第9図
に示すようなルール・コードのすべてが作成された順序
にしたがうアドレスの順序で記憶されている。出力変数
が2つ以上ある場合には、すべての出力変数について設
定されたルールのサブルールがルールeメモリ21に記
憶される。
Referring to these figures, rule memory 21 stores all of the rule codes as shown in FIG. 9 in the order of addresses in accordance with the order in which they were created. If there are two or more output variables, subrules of the rules set for all output variables are stored in the rule e memory 21.

入力レジスタ22には、上述のように、AD/DA変換
部13から取込まれた入力データが記憶どれかつ1サイ
クルの間、保持される。
As described above, the input data taken in from the AD/DA converter 13 is held in the input register 22 for one cycle.

、メンバーシップ関数(MSF)メモリ23には58個
の可能な入力x 1− x 8のそれぞれについ17個
のメンバーシップ関数NL−PLを表わ1データがあら
かじめ記憶されている。また入フx1およびx8につい
ては上述したメンバーシップ関数N1およびN8がそれ
ぞれ設定されて(る。
, membership function (MSF) memory 23 is prestored with one data representing 17 membership functions NL-PL for each of the 58 possible inputs x1-x8. Furthermore, the above-mentioned membership functions N1 and N8 are set for the input functions x1 and x8, respectively.

ルール・メモリ21には、クロック信号QOの1周期T
ごとに1ずつインクレメントされるアドレス信号Q1〜
Qllが与えられる。これにより。
The rule memory 21 stores one period T of the clock signal QO.
Address signal Q1~ which is incremented by 1 every time
Qll is given. Due to this.

ルール・メモリ21に記憶されているルール・コード等
(各種フラグ等を含む)は1周期TごとにN次読出され
ていく。ルール・メモリ21から読出されたコード−デ
ータDo−D7のうち、DOへD5はメンバーシップ関
数メモリ23に与えられ。
The rule code, etc. (including various flags, etc.) stored in the rule memory 21 are read out N times every cycle T. Among the code-data Do-D7 read from the rule memory 21, DO-D5 is given to the membership function memory 23.

他のビットD6およびD7はMIN回路24およびMA
X回路25にそれぞれ与えられる。また1入力変数を表
わすコード・データD3〜D5は入力レジスタ22に与
えられる。開始フラグはウェイト・サイクルとして用い
られ、これによってアドレス・カウンタの同期がとられ
る。
Other bits D6 and D7 are MIN circuit 24 and MA
The signals are respectively applied to the X circuits 25. Further, code data D3 to D5 representing one input variable are given to the input register 22. The start flag is used as a wait cycle to synchronize the address counters.

同期確立後、入力レジスタ22は与えられた入力変数コ
ードD3〜D5によって指定される入力変数に関゛する
入力データ(8ビツト)を出力し、メンバーシップ関数
メモリ23に与える。
After synchronization is established, the input register 22 outputs input data (8 bits) related to the input variables specified by the given input variable codes D3 to D5, and supplies it to the membership function memory 23.

メンバーシップ関数メモリ23に記憶されているメンバ
ーシップ関数のうち、ルール・メモリ21から与えられ
るラベルを表わすコード・データDO〜D2および入力
変数を表わすコード・データD3〜D5によって指定さ
れるものが選択される。この選択されたメンバーシップ
関数において1入力レジスタ22から与えられる入力デ
ータに対応する真理値(第4図のaj:j=1〜7)が
メンバーシップ関数メモリ23から読出される。
Among the membership functions stored in the membership function memory 23, the one specified by the code data DO-D2 representing the label given from the rule memory 21 and the code data D3-D5 representing the input variables is selected. be done. In this selected membership function, truth values (aj:j=1 to 7 in FIG. 4) corresponding to the input data given from the 1-input register 22 are read out from the membership function memory 23.

この真理値はこの実施例では4ビツト・データTAO〜
TA3によって表わされ、MIN回路24に入力する。
In this embodiment, this truth value is 4-bit data TAO~
It is represented by TA3 and is input to the MIN circuit 24.

MIN回路24は、第4図を用いて説明したように、1
つのルールにおけるサブルール間の真理値のMIN演算
を行なうものであり、レジスタ3Iと比較回路32とO
R回路33とから構成されている。
As explained using FIG. 4, the MIN circuit 24 has 1
It performs MIN calculation of truth values between subrules in one rule, and register 3I, comparison circuit 32, and O
It is composed of an R circuit 33.

メモリ23の読出しデータTAO−TA3はレジスタ3
1および比較回路32の入力Aに与えられる。レジスタ
31に保持されているデータは比較回路32の入力Bに
与えられる。比較回路32は2つの入力AとBとを比較
してA<Bの場合に出力を発生し。
The read data TAO-TA3 of the memory 23 is stored in the register 3.
1 and input A of the comparison circuit 32. The data held in register 31 is applied to input B of comparison circuit 32. Comparison circuit 32 compares two inputs A and B and generates an output when A<B.

この出力はOR回路33を経てレジスタ31のクロック
入力端子CLKにトリガとして与えられる。また、ルー
ル−メモリ21から読出されたルール・フラグ・ビット
D6もOR回路33を経てレジスタ31のクロック入力
端子CLKにトリガとして与えられる。したがって、1
つのルールの最初のサブルールの真理値がルール・フラ
グ◆ビットD6によってレジスタ31に取込まれかつ比
較回路32の入力端子Bに与えられる。1周期T後に次
のサブルールの真理値が比較回路32の入力端子、Aに
与えられる。もし、入力端子Aの真理値の方がレジスタ
31に保持されている真理値よりも小さければ。
This output is applied as a trigger to the clock input terminal CLK of the register 31 via the OR circuit 33. Further, the rule flag bit D6 read from the rule memory 21 is also applied as a trigger to the clock input terminal CLK of the register 31 via the OR circuit 33. Therefore, 1
The truth value of the first subrule of the two rules is taken into the register 31 by the rule flag ♦ bit D6 and applied to the input terminal B of the comparison circuit 32. After one period T, the truth value of the next subrule is applied to the input terminal A of the comparison circuit 32. If the truth value of input terminal A is smaller than the truth value held in register 31.

比較回路32の出力によってレジスタ31の内容が入力
端子Aに与えられている真理値によって更新される。以
上の動作が繰返され、1つのルールに属するサブルール
から導き出される真理値のうちの最小のものが抽出され
る。
The contents of the register 31 are updated by the truth value applied to the input terminal A by the output of the comparison circuit 32. The above operations are repeated, and the minimum truth value derived from subrules belonging to one rule is extracted.

なお、ルール・メモリ21から読出されたサブルールが
空ルール(xl=N1)の場合には上述のように真理値
の最大値(すなわち1.0に対応するデータ)がメモリ
23からデータTAO−TA3として出力されるので、
上述のMxN演算には影響を与えない。
Note that if the sub-rule read from the rule memory 21 is an empty rule (xl=N1), the maximum truth value (that is, data corresponding to 1.0) is transferred from the memory 23 to data TAO-TA3. Since it is output as
It does not affect the MxN operation described above.

MAX回路25は、上述したルール3と4のように、後
件部のメンバーシップ関数(ラベル)が同じであるルー
ルが2以上ある場合に、それらのルールにおけるMIN
演算結果の最も大きい値を選択するために用いられる。
When there are two or more rules with the same membership function (label) of the consequent part, as in rules 3 and 4 described above, the MAX circuit 25 calculates the MIN in those rules.
Used to select the largest value of the calculation result.

MAX回路25はレジスタ41と比較回路42とA N
 D’回路43とNOT回路44とから構成される装置 ルール・メモリ21から出力されるラベル・フラグ・ビ
ットD7がNOT回路44を経てレジスタ41のクリア
端子に与えられることによってレジスタ41はクリアさ
れる。レジスタ41の出力は比較回路42の一方の入力
端子Bに与えられる。一方。
The MAX circuit 25 has a register 41, a comparison circuit 42, and an A.N.
The register 41 is cleared by applying the label flag bit D7 outputted from the device rule memory 21 consisting of the D' circuit 43 and the NOT circuit 44 to the clear terminal of the register 41 via the NOT circuit 44. . The output of the register 41 is applied to one input terminal B of the comparison circuit 42. on the other hand.

Fvl 1 N回路24のレジスタ31の出力は比較回
路42の他方の入力端子Aに入力する。比較回路42は
A>Bのときに出力を発生し、その出力はAND回路4
3に入力する。レジスタ4Iがクリアされたのちはその
出力は零であるから比較回路42からは出ノjが発生し
ている。
The output of the register 31 of the Fvl 1 N circuit 24 is input to the other input terminal A of the comparison circuit 42. The comparison circuit 42 generates an output when A>B, and the output is sent to the AND circuit 4.
Enter 3. After register 4I is cleared, its output is zero, so output j is generated from comparator circuit 42.

一方、カウンタ26はクロック信号QOの1周期Tごと
に発生するタイミング信号CBを計数し。
On the other hand, the counter 26 counts the timing signal CB generated every cycle T of the clock signal QO.

その計数値が4以上になったときに2ビツト出力を発生
し、AND回路43に与える。AND回路43の出力は
レジスタ41のクロック入力端子CLKに与えられる。
When the count value becomes 4 or more, a 2-bit output is generated and applied to the AND circuit 43. The output of the AND circuit 43 is applied to the clock input terminal CLK of the register 41.

したがって、4個のサブルールを含む1つのルールにつ
いて真理値の読出しが終了したときには、そのときレジ
スタ31に保持されているMIN演算結果がレジスタ4
1に取込まれることになる。1つの後件部ラベルについ
て1つのルールしか存在しない場合には、このレジスタ
4iに保持されたMIN演算結果がデータTO〜T3と
して、制御部11に取込まれる。このときはMAX演算
は実質的に行なわれない。カウンタ26はルール・フラ
グ・ビットによってクリアされる。
Therefore, when reading the truth value for one rule including four sub-rules is completed, the MIN operation result held in register 31 at that time is stored in register 4.
It will be incorporated into 1. If only one rule exists for one consequent label, the MIN calculation result held in this register 4i is taken into the control unit 11 as data TO to T3. At this time, MAX calculation is not substantially performed. Counter 26 is cleared by the rule flag bit.

m 件部の1種類のラベルについて2つ以上のルールが
ある場合には、レジスタ41に保持された1番目のMI
N演算結果(入力B)と、レジスタ31に保持された2
番目のMIN演算結果(入力A)とが比較回路42で比
較され、A>Bの場合のみ、2番目のMIN演算結果が
レジスタ41に取込まれ、A≦Bの場合にはレジスタ4
Lの内容はそのまま保持される。3番目のルールがある
場合も同様である。いずれにしても、そのラベルについ
てのMAX演算が終了すると、レジスタ41のデータT
O〜T3は制御部11に取込まれる。
If there are two or more rules for one type of label in the m case part, the first MI held in the register 41
N operation result (input B) and 2 held in register 31
The comparison circuit 42 compares the second MIN operation result (input A) with the second MIN operation result (input A), and only when A>B, the second MIN operation result is taken into the register 41, and when A≦B, the register 4
The contents of L are retained as is. The same applies when there is a third rule. In any case, when the MAX operation for that label is completed, the data T in register 41 is
O to T3 are taken into the control section 11.

後件部ラベルについて全くルールの存在しない空ラベル
についても、x8mN8というサブルールにしたがって
4周期4Tの間MI N/MAX演算がみかけ上行なわ
れることになる。この場合には、レジスタ41には0と
いうデータが保持され。
Even for an empty label for which there is no rule for the consequent label, the MIN/MAX calculation is apparently performed for four periods 4T according to the subrule x8mN8. In this case, the register 41 holds data 0.

これが制御部11に取込まれる。このデータは制御部1
1で行なわれる総合演算に影響を与えることはない。
This is taken into the control section 11. This data is the control unit 1
It does not affect the overall calculation performed in 1.

ラベル・フラグD7のビットを計数するラベル・カウン
タ27が設けられている。制御部11はこのカウンタ2
7の計数値の変化時点で推論部12の推論結果a1を取
込む。また、カウンタ27が終了フラグのラベル・フラ
グを計数してその計数値が0100となったときに割込
信号が制御部11に与えられる。これにより制御部11
は1つの出力変数についての推論が終了したことを知り
、推論部12のすべてのカウンタをクリアする。
A label counter 27 is provided that counts the bits of label flag D7. The control unit 11 controls this counter 2
The inference result a1 of the inference unit 12 is taken in at the time when the count value of 7 changes. Further, when the counter 27 counts the label flag of the end flag and the counted value reaches 0100, an interrupt signal is given to the control section 11. As a result, the control section 11
learns that the inference for one output variable has ended and clears all the counters in the inference section 12.

上記実施例ではファジィ推論成算としてMIN/MAX
′IrAWが用いられているが、この発明はこれに限定
されず、他の演算によるファジィ推論にも適用可能なの
はいうまでもない。
In the above embodiment, MIN/MAX is used as a fuzzy inference calculation.
'IrAW is used, but the present invention is not limited thereto, and it goes without saying that it can also be applied to fuzzy inference using other operations.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はファジィ・コントローラの全体的構成の概要を
示すブロック図である。 第2図はメンバーシップ関数の一例を示し、第3図はシ
ングルトンを示すものである。 第4図および第5図はファジィ推論過程を示すもので、
第4図はルールごとの推論を、第5図は総合演算処理を
それぞれ説明するためのものである。 第6図はルール・コード・フォーマットを示し、第7図
は入力変数、ラベルおよび出力変数に割当てられたコー
ドを示すものである。 第8図は1出力変数についてのルールの一例を示し、第
9図は第8図のルールをサブルールに分解してコード化
した状態を示すものである。 第10a図および第10b図はルール・コード作成処理
手順を示すフロー・チャートである。 第it図はファジィ推論部と制御部の並行処理の様子を
示すタイム・チャートである。 第12図は1ブロツク(1出力変数)についてのファジ
ィ推論処理の流れを示すタイム・チャートである。 第13図はファジィ推論部の具体的構成の−fMI 4
示すブロック図、第14図はその動作を示す夕づム・チ
ャートである。 11・・・制御部。 12・・・ファジィ推論部。 13・・・AD/DA変換部。 I4・・・バス。 21・・・ルール・メモリ。 22・・・入力レジスタ。 23・・・メンバーシップ関数(MSF)24・・・M
IN回路。 25・・・MAX回路。 26・・・カウンタ。 31、41・・・レジスタ。 32、42・・・比較回路。 33・・・OR回路。 43・・・AND回路。 メモリ 以 上 第 図 ルール・コード・フォーマブト 第 図 第 8 図 第 図 第 10b 図 第 0g 図
FIG. 1 is a block diagram showing an overview of the overall configuration of the fuzzy controller. FIG. 2 shows an example of a membership function, and FIG. 3 shows a singleton. Figures 4 and 5 show the fuzzy inference process.
FIG. 4 is for explaining the inference for each rule, and FIG. 5 is for explaining the overall arithmetic processing. FIG. 6 shows the rule code format, and FIG. 7 shows the codes assigned to input variables, labels, and output variables. FIG. 8 shows an example of a rule for one output variable, and FIG. 9 shows a state in which the rule in FIG. 8 is broken down into sub-rules and coded. FIGS. 10a and 10b are flow charts showing the rule code creation processing procedure. FIG. 1 is a time chart showing the parallel processing of the fuzzy inference section and the control section. FIG. 12 is a time chart showing the flow of fuzzy inference processing for one block (one output variable). Figure 13 shows the specific configuration of the fuzzy inference section -fMI 4
The block diagram shown in FIG. 14 is a rhythm chart showing its operation. 11...control unit. 12...Fuzzy reasoning section. 13...AD/DA conversion section. I4... bus. 21... Rule memory. 22...Input register. 23... Membership function (MSF) 24...M
IN circuit. 25...MAX circuit. 26...Counter. 31, 41... register. 32, 42... Comparison circuit. 33...OR circuit. 43...AND circuit. Over Memory Figure Rule Code Format Figure 8 Figure 10b Figure 0g

Claims (10)

【特許請求の範囲】[Claims] (1)入力変数ごとに分解されかつコード化されたサブ
ルールを一定の順序で記憶するルール・メモリ、 入力変数ごとに入力データを一時的に記憶する入力レジ
スタ、 複数種類のメンバーシップ関数をあらかじめ記憶し、上
記ルール・メモリから読出されたサブルールによって指
定されたメンバーシップ関数において、上記入力レジス
タから与えられる入力データに対応する真理値を出力す
るメンバーシップ関数メモリ、および 上記メンバーシップ関数から出力される真理値の間で、
ルールごとに、第1のファジィ演算を行なう第1の演算
回路、 を備えたファジィ・コントローラ。
(1) Rule memory that stores subrules decomposed and coded for each input variable in a fixed order, input registers that temporarily store input data for each input variable, and multiple types of membership functions stored in advance. and a membership function memory that outputs a truth value corresponding to the input data given from the input register in the membership function specified by the sub-rule read from the rule memory, and output from the membership function. Between the truth values,
A fuzzy controller comprising: a first arithmetic circuit that performs a first fuzzy operation for each rule.
(2)後件部の一種類のメンバーシップ関数について複
数のルールがある場合に、第1の演算回路の演算結果の
間で第2のファジィ演算を行なう第2の演算回路をさら
に備えている請求項(1)に記載のファジィ・コントロ
ーラ。
(2) The apparatus further includes a second arithmetic circuit that performs a second fuzzy operation between the arithmetic results of the first arithmetic circuit when there are multiple rules for one type of membership function in the consequent part. The fuzzy controller according to claim (1).
(3)第1の演算回路がMIN回路である請求項(1)
に記載のファジィ・コントローラ。
(3) Claim (1) wherein the first arithmetic circuit is a MIN circuit.
The fuzzy controller described in
(4)第2の演算回路がMAX回路である請求項(2)
に記載のファジィ・コントローラ。
(4) Claim (2) wherein the second arithmetic circuit is a MAX circuit.
The fuzzy controller described in
(5)1つのルールから生成されるサブルールの数を計
数し、その計数値によって第2の演算回路を制御するカ
ウンタを備えている請求項(2)に記載のファジィ・コ
ントローラ。
(5) The fuzzy controller according to claim (2), further comprising a counter that counts the number of sub-rules generated from one rule and controls the second arithmetic circuit based on the counted value.
(6)ルールにおける前件部の入力変数を表わすコード
とメンバーシップ関数を表わすコードとを用いてサブル
ールのコードを形成し、このサブルールのコードを一定
順序で上記ルール・メモリに記憶させる請求項(1)に
記載のファジィ・コントローラの動作方法。
(6) A sub-rule code is formed using a code representing an input variable of an antecedent part of a rule and a code representing a membership function, and the sub-rule code is stored in the rule memory in a fixed order ( 1) Operation method of the fuzzy controller described in 1).
(7)サブルールのコードに含まれる入力変数を表わす
コードによって上記入力レジスタに記憶されている入力
データを選択させる請求項(6)に記載の動作方法。
(7) The operating method according to claim (6), wherein the input data stored in the input register is selected by a code representing an input variable included in the code of the sub-rule.
(8)上記メンバーシップ関数メモリに、入力変数ごと
に複数種類のメンバーシップ関数を表わすデータをあら
かじめ記憶させておき、サブルールのコードに含まれる
入力変数を表わすコードとメンバーシップ関数を表わす
コードとによって一つのメンバーシップ関数を指定する
、請求項(6)に記載の動作方法。
(8) Data representing multiple types of membership functions for each input variable is stored in the membership function memory in advance, and the code representing the input variable and the code representing the membership function included in the code of the sub-rule are stored in advance. 7. A method of operation according to claim 6, wherein one membership function is specified.
(9)一定の順序で配列されたルールの変化点を示すル
ール・フラグ・ビットを、上記サブルールのコードに含
ませ、このルール・フラグ・ビットによって上記第1の
演算回路を制御させる、請求項(1)に記載のファジィ
・コントローラの動作方法。
(9) A rule flag bit indicating a change point of the rules arranged in a certain order is included in the code of the sub-rule, and the first arithmetic circuit is controlled by the rule flag bit. A method of operating the fuzzy controller described in (1).
(10)一定の順序で配列されたルールにおける後件部
のメンバーシップ関数の種類の変化点を示すラベル・フ
ラグ・ビットを、上記サブルールのコードに含ませ、こ
のラベル・フラグ・ビットによって上記第2の演算回路
を制御させる、請求項(2)に記載のファジィ・コント
ローラの動作方法。
(10) A label flag bit indicating a change point in the type of membership function of the consequent in a rule arranged in a certain order is included in the code of the above sub-rule, and this label flag bit is used to 3. The fuzzy controller operating method according to claim 2, wherein the fuzzy controller is configured to control a second arithmetic circuit.
JP1282047A 1989-10-31 1989-10-31 Fuzzy controller and its operating method Pending JPH03144701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1282047A JPH03144701A (en) 1989-10-31 1989-10-31 Fuzzy controller and its operating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1282047A JPH03144701A (en) 1989-10-31 1989-10-31 Fuzzy controller and its operating method

Publications (1)

Publication Number Publication Date
JPH03144701A true JPH03144701A (en) 1991-06-20

Family

ID=17647477

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1282047A Pending JPH03144701A (en) 1989-10-31 1989-10-31 Fuzzy controller and its operating method

Country Status (1)

Country Link
JP (1) JPH03144701A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796917A (en) * 1994-05-23 1998-08-18 Consorzio Per La Ricerca Sulla Microelettronica Nel Mezzogiorno Method and apparatus for parallel processing of fuzzy rules

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796917A (en) * 1994-05-23 1998-08-18 Consorzio Per La Ricerca Sulla Microelettronica Nel Mezzogiorno Method and apparatus for parallel processing of fuzzy rules
US6424957B1 (en) 1994-05-23 2002-07-23 Consorzio Per La Ricerca Sulla Microelettronica Nel Mezzogiorno Method and apparatus for parallel processing of fuzzy rules

Similar Documents

Publication Publication Date Title
US5243687A (en) Fuzzy computer system having a fuzzy inference processing circuit for controlling and adapting output signal to the set membership signal
JPH04233634A (en) Fuzzy inference system
JPH0756892A (en) Calculator with vector calculator with mask
EP0538470A1 (en) Method of rearranging and encoding fuzzy inference rules, and method of processing fuzzy inference conforming to the rules
US6424958B1 (en) Coding and storing method for fuzzy logic rules and circuit architecture for processing such rules
JP2022502724A (en) Methods, equipment, and related products for processing data
JPH03144701A (en) Fuzzy controller and its operating method
EP0513829B1 (en) Fuzzy reasoning processor and method, and rule setting apparatus and method
US20200065657A1 (en) Machine learning system and boltzmann machine calculation method
EP0628902A1 (en) Memory organization method for a fuzzy logic controller, and corresponding device
EP0513689B1 (en) A membership function data preparation method and an apparatus thereof
EP0628903B1 (en) Memory organization method for a fuzzy logic controller, and corresponding device
US4984176A (en) VDH biocomputer
JPH03144734A (en) Method for processing fuzzy inference
JP3216152B2 (en) MIN circuit, MAX circuit and connection method thereof
EP0472921B1 (en) Fuzzy inference system
JP2735271B2 (en) Programmable controller
JP3307461B2 (en) Inference equipment
JP3945144B2 (en) Inductive reasoning system
JP2835166B2 (en) Programmable controller
JP3541094B2 (en) Multitask control system and control method
JPS63158640A (en) Performance analysis diagnosing control system
JPH05120020A (en) Method and device for processing fuzzy inference
JPH05233768A (en) Graphic processing method
JPS63291128A (en) production system