JP2021125218A - Programmable logic controller and analyzer - Google Patents
Programmable logic controller and analyzer Download PDFInfo
- Publication number
- JP2021125218A JP2021125218A JP2020161926A JP2020161926A JP2021125218A JP 2021125218 A JP2021125218 A JP 2021125218A JP 2020161926 A JP2020161926 A JP 2020161926A JP 2020161926 A JP2020161926 A JP 2020161926A JP 2021125218 A JP2021125218 A JP 2021125218A
- Authority
- JP
- Japan
- Prior art keywords
- time
- data
- series data
- collected
- programmable logic
- 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
Links
- 230000002159 abnormal effect Effects 0.000 claims abstract description 98
- 238000001514 detection method Methods 0.000 claims abstract description 60
- 230000008859 change Effects 0.000 claims description 88
- 230000005856 abnormality Effects 0.000 claims description 69
- 238000003860 storage Methods 0.000 claims description 65
- 238000012544 monitoring process Methods 0.000 claims description 38
- 238000004458 analytical method Methods 0.000 claims description 32
- 238000011156 evaluation Methods 0.000 claims description 19
- 230000002547 anomalous effect Effects 0.000 claims description 9
- 230000007423 decrease Effects 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 6
- 238000000034 method Methods 0.000 description 128
- 230000008569 process Effects 0.000 description 94
- 238000012545 processing Methods 0.000 description 70
- 230000006870 function Effects 0.000 description 55
- 238000012546 transfer Methods 0.000 description 39
- 238000004891 communication Methods 0.000 description 36
- 238000010586 diagram Methods 0.000 description 21
- 230000006835 compression Effects 0.000 description 12
- 238000007906 compression Methods 0.000 description 12
- 238000013480 data collection Methods 0.000 description 11
- 102100026205 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Human genes 0.000 description 10
- 101000691599 Homo sapiens 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Proteins 0.000 description 10
- 238000012937 correction Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 101100408464 Caenorhabditis elegans plc-1 gene Proteins 0.000 description 4
- 230000003247 decreasing effect Effects 0.000 description 4
- 230000001343 mnemonic effect Effects 0.000 description 4
- 230000006837 decompression Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000004397 blinking Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000008602 contraction Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000010587 phase diagram Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010257 thawing Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
Description
本発明はプログラマブルロジックコントローラ、及び分析装置に関する。 The present invention relates to a programmable logic controller and an analyzer.
プログラマブル・ロジック・コントローラ(PLC)はファクトリーオートメーションにおいて製造機器や搬送装置、検査装置などの産業機械を制御するコントローラである(特許文献1、2)。PLCはプログラマーによって作成されるラダープログラムなどのユーザプログラムを実行することで様々な拡張ユニットや被制御機器などを制御する。
A programmable logic controller (PLC) is a controller that controls industrial machines such as manufacturing equipment, transfer equipment, and inspection equipment in factory automation (
ところで、PLCの動作やPLCによって制御される産業機械の動作を監視するために、PLCが保持しているデータを収集して活用することが望まれている。PLCは、基本ユニット(CPUユニット)とそれに接続される拡張ユニットとを有している。基本ユニットは、ラダープログラムなどのユーザプログラムを実行することで拡張ユニットを制御する。拡張ユニットは基本ユニットからの命令にしたがって産業機械を制御し、制御結果を基本ユニットに返す。 By the way, in order to monitor the operation of the PLC and the operation of the industrial machine controlled by the PLC, it is desired to collect and utilize the data held by the PLC. The PLC has a basic unit (CPU unit) and an expansion unit connected to the basic unit (CPU unit). The basic unit controls the expansion unit by executing a user program such as a ladder program. The expansion unit controls the industrial machine according to the command from the basic unit and returns the control result to the basic unit.
また、これらの制御結果等のデータはトラブル解析や品質管理のために使用される。従って、これらのデータを蓄積して分析し、復旧のために早期に解析結果を得ることが要求されている。しかし、PLCに関連する全てのデバイスのデータを記録する場合は膨大なデータを記憶することになり、さらに異常デバイスを特定するためにはこれらの膨大なデータ(全デバイス)を解析する必要があるため時間を要する作業となる。 なお、従来では、特定のデバイスを分析対象として分析して自動的に異常判定を行い、使用する分析手法も予めデータに合った分析手法を用意して判定を行っていた。特定のデバイスを選択したり、分析手法を決定するには経験や知識も必要となる。従って、膨大なデータを好適に記憶することに加えて、十分な専門的な知識や経験を必要とすることなく、各デバイスに関連する膨大なデータの中から効率よく異常デバイスを特定する仕組みが望まれている。 In addition, data such as these control results are used for trouble analysis and quality control. Therefore, it is required to accumulate and analyze these data and obtain the analysis results at an early stage for recovery. However, when recording the data of all devices related to PLC, a huge amount of data is stored, and it is necessary to analyze these huge amounts of data (all devices) in order to identify the abnormal device. Therefore, it is a time-consuming work. In the past, an abnormality was automatically determined by analyzing a specific device as an analysis target, and an analysis method suitable for the data was prepared in advance for the analysis method to be used. Experience and knowledge are also required to select a specific device and determine the analysis method. Therefore, in addition to appropriately storing a huge amount of data, there is a mechanism to efficiently identify an abnormal device from the huge amount of data related to each device without requiring sufficient specialized knowledge and experience. It is desired.
そこで、本発明は上記問題に鑑み、各デバイスに関連するデータの周期性や連続性などの特徴を分析して分類し、効率よく異常デバイスを特定することを目的とする。 Therefore, in view of the above problems, it is an object of the present invention to analyze and classify features such as periodicity and continuity of data related to each device, and to efficiently identify an abnormal device.
本発明は、例えば、プログラマブルロジックコントローラであって、
ユーザプログラムを繰り返し実行する実行エンジンと、
前記ユーザプログラムに従って前記実行エンジンによりアクセスされるデータを記憶する記憶領域である複数のデバイスを有するデバイスメモリと、
前記ユーザプログラムの実行周期ごとに所定の収集設定に従って前記複数のデバイスのうち収集対象のデバイスで保持されているデータを収集する収集手段と、
前記収集手段によって収集された各デバイスの時系列データの特徴に基づいて、各デバイスを複数の類型のいずれかにそれぞれ分類する分類手段と、
各デバイスについて前記収集手段によって収集されたデバイスの時系列データ及び前記分類手段により当該デバイスが分類された類型に従って、当該デバイスを異常デバイスとして特定する際の検知アルゴリズムを決定する決定手段と、
前記収集手段によって収集されたデバイスの時系列データを、前記分類手段によって当該デバイスが分類された類型に従い、当該デバイスに対して前記決定手段によって決定された検知アルゴリズムを用いて分析することで異常デバイスを特定する特定手段と
を備えることを特徴とする。
The present invention is, for example, a programmable logic controller.
An execution engine that repeatedly executes the user program,
A device memory having a plurality of devices, which is a storage area for storing data accessed by the execution engine according to the user program, and
A collection means for collecting data held by the device to be collected among the plurality of devices according to a predetermined collection setting for each execution cycle of the user program.
A classification means for classifying each device into one of a plurality of types based on the characteristics of the time series data of each device collected by the collection means.
For each device, a determination means for determining a detection algorithm for identifying the device as an abnormal device according to the time series data of the device collected by the collection means and the type in which the device is classified by the classification means.
Anomalous devices are analyzed by analyzing the time-series data of the devices collected by the collecting means according to the type in which the devices are classified by the classification means using the detection algorithm determined by the determining means for the devices. It is characterized by having a specific means for specifying the above.
また、本発明は、例えば、ユーザプログラムを繰り返し実行する実行エンジンと、前記ユーザプログラムに従って前記実行エンジンによりアクセスされるデータを記憶する記憶領域である複数のデバイスを有するデバイスメモリと、前記ユーザプログラムのスキャン周期ごとに所定の収集設定に従って前記複数のデバイスのうち収集対象のデバイスで保持されているデータを収集する収集手段とを備えるプログラマブルロジックコントローラと通信可能に接続された分析装置であって、
前記収集手段によって収集された各デバイスの時系列データを前記プログラマブルロジックコントローラから取得する取得手段と、
前記収集手段によって取得された各デバイスの時系列データの特徴に基づいて、各デバイスを複数の類型のいずれかにそれぞれ分類する分類手段と、
各デバイスについて前記収集手段によって収集されたデバイスの時系列データ及び前記分類手段により当該デバイスが分類された類型に従って、当該デバイスを異常デバイスとして特定する際の検知アルゴリズムを決定する決定手段と、
前記収集手段によって収集されたデバイスの時系列データを、前記分類手段によって当該デバイスが分類された類型に従い、当該デバイスに対して前記決定手段によって決定された検知アルゴリズムを用いて分析することで異常デバイスを特定する特定手段と、
前記特定手段による特定結果を出力する出力手段と
を備えることを特徴とする。
Further, the present invention includes, for example, a device memory having an execution engine that repeatedly executes a user program, a device memory having a plurality of devices that are storage areas for storing data accessed by the execution engine according to the user program, and the user program. An analyzer that is communicably connected to a programmable logic controller that includes a collection means that collects data held by the device to be collected among the plurality of devices according to a predetermined collection setting for each scan cycle.
An acquisition means for acquiring time-series data of each device collected by the collection means from the programmable logic controller, and
A classification means for classifying each device into one of a plurality of types based on the characteristics of the time series data of each device acquired by the collection means.
For each device, a determination means for determining a detection algorithm for identifying the device as an abnormal device according to the time series data of the device collected by the collection means and the type in which the device is classified by the classification means.
Anomalous devices are analyzed by analyzing the time-series data of the devices collected by the collecting means according to the type in which the devices are classified by the classification means using the detection algorithm determined by the determining means for the devices. With specific means to identify
It is characterized by including an output means for outputting a specific result by the specific means.
本発明によれば、各デバイスに関連するデータの周期性や連続性などの特徴を分析して分類し、効率よく異常デバイスを特定することができる。 According to the present invention, it is possible to analyze and classify features such as periodicity and continuity of data related to each device, and efficiently identify an abnormal device.
以下、添付図面を参照して実施形態が詳しく説明される。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではなく、また実施形態で説明されている特徴の組み合わせの全てが発明に必須のものとは限らない。実施形態で説明されている複数の特徴のうち二つ以上の特徴が任意に組み合わされてもよい。また、同一又は同様の構成には同一の参照番号が付され、重複した説明は省略される。同一又は類似の要素を示す参照符号の末尾には小文字のアルファベットが付与されることがある。複数の要素に共通する事項が説明される場合、小文字のアルファベットが省略される。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments do not limit the invention according to the claims, and not all combinations of features described in the embodiments are essential to the invention. Two or more of the plurality of features described in the embodiments may be arbitrarily combined. In addition, the same or similar configuration is given the same reference number, and duplicate explanations are omitted. A lowercase alphabet may be added to the end of the reference code indicating the same or similar elements. Lowercase alphabets are omitted when explaining things that are common to multiple elements.
<第1の実施形態>
<システム構成>
以下では、本発明の第1の実施形態について説明する。はじめにプログラマブルロジックコントローラ(PLC、単にプログラマブルコントローラと呼ばれてもよい)を当業者にとってよりよく理解できるようにするために、一般的なPLCの構成とその動作について説明する。
<First Embodiment>
<System configuration>
Hereinafter, the first embodiment of the present invention will be described. First, a general PLC configuration and its operation will be described so that a person skilled in the art can better understand a programmable logic controller (PLC, which may be simply referred to as a programmable controller).
図1は、本発明の実施の形態によるプログラマブル・ロジック・コントローラシステムの一構成例を示す概念図である。図1が示すように、このシステムは、ラダープログラムなどのユーザプログラムの編集を行うためのPC2aと、工場等に設置される各種制御装置を統括的に制御するためのPLC(プログラマブルロジックコントローラ)1とを備えている。PCはパーソナルコンピュータの略称である。ユーザプログラムは、ラダー言語やSFC(シーケンシャルファンクションチャート)などのフローチャート形式のモーションプログラムなどのグラフィカルプログラミング言語を用いて作成されてもよいし、C言語などの高級プログラミング言語を用いて作成されてもよい。以下では、説明の便宜上、ユーザプログラムはラダープログラムとする。PLC1は、CPUが内蔵された基本ユニット3と、1つ乃至複数の拡張ユニット4を備えている。基本ユニット3に対して1つ乃至複数の拡張ユニット4が着脱可能となっている。
FIG. 1 is a conceptual diagram showing a configuration example of a programmable logic controller system according to an embodiment of the present invention. As shown in FIG. 1, this system is a PLC (programmable logic controller) 1 for comprehensively controlling a PC2a for editing a user program such as a ladder program and various control devices installed in a factory or the like. And have. PC is an abbreviation for personal computer. The user program may be created using a graphical programming language such as a ladder language or a flowchart-type motion program such as SFC (sequential function chart), or may be created using a high-level programming language such as C language. .. In the following, for convenience of explanation, the user program will be a ladder program. The
基本ユニット(CPUユニットとも称する)3は、表示部5及び操作部6を備えている。表示部5は、基本ユニット3に取り付けられている各拡張ユニット4の動作状況などを表示することができる。操作部6の操作内容に応じて表示部5は表示内容を切り替える。表示部5は、通常、PLC1内のデバイスの現在値(デバイス値)やPLC1内で生じたエラー情報などを表示する。ここでデバイスとは、基本ユニット3や拡張ユニット4に含まれる種々のデバイス(リレー、タイマー、カウンタなど)を含むものであり、デバイス値(デバイスデータ)を格納するために設けられたメモリ上の領域を指すものでもあり、デバイスメモリと呼ばれてもよい。なお、当該デバイスメモリは不揮発性メモリであり、書き換え可能な不揮発性ROMで構成されてもよく、揮発性RAM等をバッテリーバックアップ等により不揮発性を実現してもよい。ROMはリードオンリーメモリの略称である。RAMはランダムアクセスメモリの略称である。デバイス値とは、入力機器からの入力状態、出力機器への出力状態及びユーザプログラム上で設定される内部リレー(補助リレー)、タイマー、カウンタ、データメモリ等の状態を示す情報である。デバイス値の型にはビット型とワード型等がある。ビットデバイスは1ビットのデバイス値、例えば、0/1、ON/OFF、H/L等を記憶する。ワードデバイスは1ワードのデバイス値を記憶する。以下で詳細に説明されるデータ活用プログラムの収集対象としては、デバイスとして変数が指定されてもよい。変数も情報を保持する保持手段であり、ユーザプログラムに従って実行エンジンによりアクセスされるものである。したがって、以下の説明においてデバイスは変数も指すものである。なお、デバイスを保持するメモリはデバイスメモリと呼ばれてもよい。また、収集されたデータを保持するメモリはデータメモリと呼ばれてもよい。
The basic unit (also referred to as a CPU unit) 3 includes a
拡張ユニット4は、PLC1の機能を拡張するために用意されている。各拡張ユニット4には、その拡張ユニット4の機能に対応するフィールドデバイス(被制御装置)10が接続されることがあり、これにより、各フィールドデバイス10が拡張ユニット4を介して基本ユニット3に接続される。フィールドデバイス10は、センサやカメラなどの入力機器であってもよいし、アクチュエータなどの出力機器であってもよい。また、一つの拡張ユニット4に対して複数のフィールドデバイスが接続されてもよい。
The
例えば、拡張ユニット4bはモータ(フィールドデバイス10)を駆動してワークの位置決めを行う位置決めユニットであってもよいし、カウンタユニットであってもよい。カウンタユニットは手動パルサなどのエンコーダ(フィールドデバイス10)からの信号をカウントする。
For example, the
拡張ユニット4aは、例えば、基本ユニット3や拡張ユニット4bから収集対象データを収集し、フローなどのユーザプログラム(データ活用プログラム)を実行することで収集対象データにデータ処理を施して表示対象データを作成し、ダッシュボードを表示部7又はPC2に表示するための表示データ(ソースデータ)を作成するデータ活用ユニットである。本実施形態では、拡張ユニット4aが各デバイスのデータを収集する例について説明するが、当該収集部については基本ユニット3に設けられてもよく、或いは、他の拡張ユニットに設けられてもよい。また、拡張ユニット4aは、収集したデータを基本ユニット3からの指示や所定のタイミングに従って分析を行う分析装置として機能することも可能である。なお、本実施形態では、拡張ユニット4aが分析装置として動作する例について説明するが、本発明を限定する意図はなく、基本ユニット3が分析装置として機能してもよく、PC2a、2bなどの外部装置が分析装置として機能してもよい。以下で説明されるフロー(フロープログラム)はデータ活用プログラムの一例に過ぎない。基本ユニット3はCPUユニットと呼ばれることもある。なお、PLC1とPC2とを含むシステムはプログラマブルロジックコントローラシステムと呼ばれてもよい。
The
PC2aは主にプログラマーによって操作されるコンピュータである。一方、PC2bは主に現場担当者によって操作されるコンピュータである。PC2aはプログラム作成支援装置(設定装置)と呼ばれてもよい。PC2は、例えば、携帯可能なノートタイプやタブレットタイプのパーソナルコンピュータ又はスマートフォンであって、表示部7及び操作部8を備えている外部コンピュータである。外部コンピュータとは、PLC1の外部にあるコンピュータである。PLC1を制御するためのユーザプログラムの一例であるラダープログラムは、PC2aを用いて作成される。その作成されたラダープログラムは、PC2a内でニモニックコードに変換される。PC2は、USB(Universal Serial Bus)ケーブルなどの通信ケーブル9を介してPLC1の基本ユニット3に接続される。例えば、PC2aは、ニモニックコードに変換されたラダープログラムを基本ユニット3に送る。基本ユニット3はラダープログラムをマシンコードに変換し、基本ユニット3に備えられたメモリ内に記憶する。なお、ここではニモニックコードが基本ユニット3に送信されているが、本発明はこれに限られない。例えば、PC2aは、ニモニックコードを中間コードに変換し、中間コードを基本ユニット3に送信してもよい。
PC2a is a computer mainly operated by a programmer. On the other hand, PC2b is a computer mainly operated by a person in charge at the site. PC2a may be called a program creation support device (setting device). The
なお、図1には示していないが、PC2の操作部8には、PC2に接続されたマウスなどのポインティングデバイスが含まれていてもよい。また、PC2は、USBケーブル以外の他の通信ケーブル9を介して、PLC1の基本ユニット3に対して着脱可能に接続されるような構成であってもよい。また、PC2は、通信ケーブル9を介さず、PLC1の基本ユニット3に対して無線通信によって接続されてもよい。
Although not shown in FIG. 1, the operation unit 8 of the
<プログラム作成支援装置>
図2はPC2aの電気的構成について説明するためのブロック図である。図2が示すように、PC2aは、CPU11a、表示部7a、操作部8a、記憶装置12a及び通信部13aを備えている。表示部7a、操作部8a、記憶装置12a及び通信部13aは、それぞれCPU11aに対して電気的に接続されている。記憶装置12aはRAMやROM、HDD、SSDを含み、さらに着脱可能なメモリカードを含んでもよい。CPUは中央演算処理装置の略称である。HDDはハードディスクドライブの略称である。SSDはソリッドステートドライブの略称である。
<Program creation support device>
FIG. 2 is a block diagram for explaining the electrical configuration of the
PC2aのユーザは記憶装置12aに記憶されているプロジェクト編集プログラム14aをCPU11aに実行させて、操作部8aを通じてプロジェクトデータ15を編集する。CPU11aがプロジェクト編集プログラム14aを実行することで、プロジェクト作成部16とプロジェクト転送部17が実現される。プロジェクト作成部16はユーザ入力にしたがってプロジェクトデータ15を作成する。プロジェクト転送部17はプロジェクトデータ15をPLC1に転送する。プロジェクトデータ15は、一つ以上のユーザプログラム(例:ラダープログラム、制御プログラム、モーションプログラム、データ活用プログラム)と、基本ユニット3や拡張ユニット4の構成情報、基本ユニット3や拡張ユニット4に備えられた特定機能の設定情報などを含む。構成情報は、基本ユニット3に対する複数の拡張ユニット4の接続位置やデバイスの割り当て情報を含む。基本ユニット3に備えられた機能(例:データ収集機能、通信機能、位置決め機能)を示す情報、拡張ユニット4の機能(例:通信機能、位置決め機能、撮影機能)などを示す情報を含んでいてもよい。特定機能の設定情報は、基本ユニット3に備えられた機能(例:データ収集機能、通信機能、位置決め機能)に関する設定情報、例えば、データ収集機能であれば、データ収集条件やデータ収集対象の設定情報を含み、拡張ユニット4の機能(例:通信機能、位置決め機能、データ活用機能、撮影機能)に関する設定情報等を含む。ここで、プロジェクトデータ15の編集には、プロジェクトデータ15の作成及び変更(再編集)が含まれる。ユーザは、必要に応じて記憶装置12aに記憶されているプロジェクトデータ15を読み出し、そのプロジェクトデータ15を、プロジェクト編集プログラム14aを用いて変更することができる。通信部13aは、通信ケーブル9aを介して基本ユニット3と通信する。プロジェクト転送部17は通信部13aを介してプロジェクトデータを基本ユニット3に転送する。通信部13aは、通信ケーブル9bを介して拡張ユニット4aと通信する。
The user of the
<ダッシュボードの表示に使用されるPC>
図3はPC2bの電気的構成について説明するためのブロック図である。図3が示すように、PC2bは、CPU11b、表示部7b、操作部8b、記憶装置12b及び通信部13bを備えている。表示部7b、操作部8b、記憶装置12b及び通信部13bは、それぞれCPU11bに対して電気的に接続されている。記憶装置12bはRAMやROM、HDD、SSDを含み、さらに着脱可能なメモリカードを含んでもよい。
<PC used to display the dashboard>
FIG. 3 is a block diagram for explaining the electrical configuration of the
CPU11bはWebブラウザプログラム14dを実行することでWebブラウザ18を実現する。Webブラウザ18は、通信部13bを介して、拡張ユニット4aによって提供されるデータ活用アプリケーションの設定ページにアクセスしたり、ダッシュボードのページにアクセスしたりする。またCPU11bは、拡張ユニット4aから送信された異常発生時の特定結果(判定結果)を示す画面情報に従って、当該特定結果を表示部7bに表示する。
The
<PLC>
図4はPLC1の電気的構成について説明するためのブロック図である。図4が示すように、基本ユニット3は、CPU31、表示部5、操作部6、記憶装置32、通信部33、及びメモリカード44を備えている。表示部5、操作部6、記憶装置32、及び通信部33は、それぞれCPU31に電気的に接続されている。記憶装置32は、RAMやROM などを含んでもよい。記憶装置32はデバイス部34やプロジェクト記憶部35、第一バッファ37aなどの複数の記憶領域を有している。デバイス部34はビットデバイスやワードデバイスなどを有し、各デバイスはデバイス値を記憶するもので、デバイスメモリに相当する。プロジェクト記憶部35は、PC2aから入力されたプロジェクトデータを記憶する。第一バッファ37aには、スキャン周期ごとにデバイス部34から収集対象のデバイス値(時系列データ)が格納される。第一バッファについての詳細は図5を用いて後述する。メモリカード44には保存条件が成立した場合に、第一バッファ37aに格納された各デバイスからの制御データである時系列データが記憶される。このように時系列データがメモリカード44へ一旦保持されることにより、例えば分類対象や特定対象のデータを後に外部装置等で検証することも可能であり、重要な最新データをログ情報として保持することができる。また、本発明においては基本的にPLC1に関わる全デバイスのデータを収集するため、収集データは膨大であり、処理対象のデータを別メモリへ保持することにより処理負荷を低減する効果も期待でき、更には、収集処理と収集データに関する処理(分類処理や特定処理)とを並行して実行することを容易にすることもできる。ここで、保存条件とは、PLCに異常が発生した場合や、ユーザにより予め保存トリガとなるデバイスを指定しておき当該デバイスに所定の変化があった場合や、ユーザによる分析命令があった場合、定期的に監視する監視周期が経過した場合、基本ユニット3に接続される拡張ユニットから分析命令が発せられた場合などに成立するものである。保存条件は、ユーザにより予め設定され、プロジェクトデータの一部として基本ユニット3の記憶装置32に記憶されていてもよい。保存条件が成立したことをCPU31が検知すると、CPU31が第一バッファ37aに格納されているデバイス値をSDカード等のメモリカード44へ保存するように命令を発するとともに、拡張ユニット4aに対して、分析対象となるデータが保存されたことを通知する。基本ユニット3用の制御プログラムは、プロジェクトデータの一部としてプロジェクト記憶部35に記憶される。基本ユニット3用の制御プログラムはプロジェクト記憶部35とは別に、または、プロジェクト記憶部35に加え、記憶装置32に記憶されてもよい。図4が示すように基本ユニット3と拡張ユニット4とは通信バスの一種である拡張バス90を介して接続されている。なお、図4では拡張バス90に関する通信回路がCPU31に実装されているが、通信部33の一部として実装されてもよい。通信部33はネットワーク通信回路を有してもよい。CPU31は通信部33を介してプロジェクトデータをPC2aから受信する。
<PLC>
FIG. 4 is a block diagram for explaining the electrical configuration of PLC1. As shown in FIG. 4, the
ここで、拡張バス90について、補足説明する。この拡張バス90は、入出力リフレッシュに使用される通信バスである。入出力リフレッシュとは、ラダープログラムを繰り返し実行する際に、各一回の実行前に入出力の値を取り込み、取り込んだ入出力の値に基づいてラダープログラムを実行するもので、一回の実行中は入出力の値が変化しても取り込まないための処理である。入出力リフレッシュにより取り込まれた値は、各入出力に対応するデバイスのデバイス値としてデバイスメモリに記憶される。入出力リフレッシュにより、基本ユニット3と拡張ユニット4との間でデバイス値の送受がなされ、デバイスメモリの対応するデバイスのデバイス値が更新される。入出力リフレッシュは、ラダープログラムが一回実行されるスキャン周期ごとに(つまり、一スキャンごとに)、実行される。なお、一つのスキャン周期は、入出力リフレッシュの実行期間と、ラダープログラムの実行期間と、エンド処理の実行期間とを含む。
Here, the
拡張ユニット4はCPU41とメモリ42を備えている。さらに、拡張ユニット4aには、当該拡張ユニット4aに着脱可能な、各デバイスからの制御データである時系列データを格納するメモリカード(例えば、SDカード)を備えていてもよい。 拡張ユニット4bのCPU41bは、デバイスに格納された基本ユニット3からの指示(デバイス値)にしたがってフィールドデバイス10を制御する。また、CPU41bは、フィールドデバイス10の制御結果をバッファメモリとよばれるデバイスに格納する。デバイスに格納された制御結果は入出力リフレッシュによって基本ユニット3に転送される。また、デバイスに格納されている制御結果は、基本ユニット3からの読み出し命令にしたがって、入出力リフレッシュとは異なるタイミングであっても、基本ユニット3に転送される。メモリ42はRAMやROMなどを含む。とりわけ、RAMにはバッファメモリとして使用される記憶領域が確保されている。メモリ42は、フィールドデバイス10によって取得されたデータ(例:デバイス値や静止画データ、動画データ)を一時的に保持するバッファを有してもよい。
The
データ活用ユニットとして機能する拡張ユニット4aのCPU41aは、通信部43とケーブル9bを介してPC2bと通信する。データ活用ユニットは、データ活用アプリケーションを実行する拡張ユニットである。データ活用アプリケーションは、基本ユニット3備えられたメモリカード44または拡張ユニット4aに備えられたメモリカードに保存された制御データ(時系列データ)を収集したり、データ処理したりするフローと、収集されたデータに関連する処理を行うフローと、それらフローの実行結果を表示するダッシュボードや、それらフローの結果を外部に送信する送信部とを含む。なお、データ活用アプリケーションは、異常デバイス分析時においてメモリカード44への保存命令を発することなく、上述したような保存条件が満たされた場合に保存されるデータを参照し、メモリカード44に保存されているデータを使って分析を行う。
The
なお、制御データを収集する機能は、データ活用アプリケーション以外のユーザプログラムによって実現されてもよい。また、収集されたデータに関連する処理を行う機能には、プログラマブルロジックコントローラの異常時において異常デバイスを特定する特定機能や、正常時の時系列データとの乖離を分析し、いつもと違うデバイス値を検証する分析機能、定期的に上記分析を行う監視機能が含まれる。フローはデータを収集する演算ブロック、データ処理を実行する演算ブロック、及び、表示データを作成する演算ブロックなどを有してもよい。ダッシュボードは、グラフ表示部品や数値表示部品などを有する。これらの表示部品は、HTMLデータ、CSSデータ及びJavaScript(登録商標)コードなどにより実現されてもよい。なお、HTMLデータ、CSSデータ及びJavaScript(登録商標)コードの集合体はWebアプリケーションと呼ばれてもよい。本実施形態で、フローはフローテンプレートにより実現される。フローテンプレートは予めアプリケーションごとに用意されており、ユーザにより指定されたフローテンプレートパラメータが設定される一つ以上の演算ブロックを有している。ダッシュボードもテンプレートにより実現される。ダッシュボードテンプレートは、ユーザにより指定されたダッシュボードテンプレートパラメータが設定される一つ以上の表示部品を有している。ダッシュボードテンプレートパラメータは、例えば、ダッシュボードの名称、デバイス名、数値、ユニット変数名など多種多様な情報である。ユニット変数とは、拡張ユニット4aがフローの実行結果を保持するための変数である。
The function of collecting control data may be realized by a user program other than the data utilization application. In addition, the functions related to the collected data include a specific function to identify the abnormal device when the programmable logic controller is abnormal, and a device value different from usual by analyzing the deviation from the time series data at the normal time. It includes an analysis function to verify the above and a monitoring function to perform the above analysis on a regular basis. The flow may have an arithmetic block for collecting data, an arithmetic block for executing data processing, an arithmetic block for creating display data, and the like. The dashboard has graph display parts, numerical display parts, and the like. These display components may be realized by HTML data, CSS data, Javascript® code, and the like. The collection of HTML data, CSS data, and Javascript (registered trademark) code may be referred to as a Web application. In this embodiment, the flow is realized by the flow template. The flow template is prepared in advance for each application, and has one or more calculation blocks in which the flow template parameters specified by the user are set. The dashboard is also realized by the template. The dashboard template has one or more display components to which the dashboard template parameters specified by the user are set. Dashboard template parameters are a wide variety of information, such as dashboard names, device names, numbers, and unit variable names. The unit variable is a variable for the
<基本ユニットのCPUにより実現される機能>
図5はデータ活用に関してCPU31により実現される機能を示している。実行エンジン51は、実行周期であるスキャン周期ごとにユーザプログラムを繰り返し実行する。実行エンジン51は、CPU31の外部に設けられたASIC又はFPGAなどにより実現されてもよい。ASICは特定用途集積回路の略称である。FPGAはフィールドプログラマブルゲートアレイの略称である。これらの専用回路は、CPUとプログラムとの組み合わせよりも、特定のデータ処理を高速に実行できることが多い。収集部52aは、実行周期であるスキャン周期ごとにデバイス部34から収集対象のデバイス値を収集してデータレコードを作成して第一バッファ37aに格納する。なお、実行エンジンがユーザプログラムとしてラダープログラムを実行する場合は、ラダープログラムのスキャン周期が実行周期に相当し、実行エンジンがユーザプログラムとしてモーションプログラムを実行する場合は、モーションプログラムの制御周期が実行周期に相当する。ラダープログラムのスキャン周期ごとにデバイス値を収集する場合は、スキャン周期のうちエンド処理の期間においてデバイス部34から収集対象のデバイス値を収集してデータレコードを作成して第一バッファ37aに格納してもよい。なお、エンド処理の期間でデータを収集することは必須ではなく、実行エンジン51で実行されるユーザプログラムにデータを収集するための記述(トリガ命令などのプログラムコード)が含まれていてもよい。ただし、エンド処理によってデータを収集するケースでは、ユーザプログラムの変更が不要であるといったメリットがある。収集周期は、ユーザにより設定され、プロジェクトデータの一部として転送され、基本ユニット3の記憶装置32に収集設定36aとして記憶されている。収集設定36aには、収集周期の他に、収集対象となるデバイスなどが含まれる。なお、収集周期は実行周期であるスキャン周期やモーションプログラムの制御周期とは異なる周期であってもよい。この場合、収集設定36aにより指定された収集周期毎に、デバイス部から収集対象のデバイス値を収集してデータレコードを作成して第一バッファ37aに格納してもよい。ここで、基本ユニット3は、データの収集時において、自デバイスによって又は拡張ユニット4aによって各デバイス値の周期性や連続性などの特徴を分析し、分析結果に応じてデバイスを分類してもよい。一方、データの収集時においてはこのような分析を行うことなく、所定数のスキャン周期の時系列データが収集されたタイミングや異常発生時等にデータを分析する必要があるタイミングで自デバイスによって又は拡張ユニット4aによって行ってもよい。
<Functions realized by the CPU of the basic unit>
FIG. 5 shows a function realized by the
第一バッファ37aを設けることで、実行エンジン51は、収集や転送処理によるスキャンタイムの伸びなどの影響を受けにくくなる。収集対象のデバイス値は、収集設定36aにより指定されている。収集設定36aは、PC2a又は拡張ユニット4aによって基本ユニット3に格納されうる。転送部53aは、第一バッファ37aに格納された一つ以上のデータレコードを、基本ユニット3に設けられたメモリカード44に記憶させ、メモリカード44に保存されたデータレコードを拡張ユニット4aに転送する。なお、転送部53aは、拡張バス90における通信トラフィックが空いているときに、転送処理を実行するが、データレコードを拡張ユニット4aに送信するための専用の拡張バスが設けられていてもよい。
By providing the
或いは転送部53aは、第一バッファ37aに格納された一つ以上のデータレコードを拡張バス90を介して、拡張ユニット4aに転送し、転送されたデータはその後拡張ユニット4aに設けられたメモリカードに格納されてもよい。この場合、データレコードを拡張ユニット4aに送信するための専用の拡張バスが設けられるのが好ましい。上述したように、メモリカード44には保存条件が成立した場合にのみデータレコードが保存される。従って、不要なデータを拡張ユニット4aへ転送する必要がないため、通信トラフィックの軽量化を実現することができる。
Alternatively, the
実行エンジン51aが入出力リフレッシュを実行している期間や、ユーザプログラムに記述された読み出し命令にしたがって拡張ユニット4のバッファメモリからデータを読み出している期間を避けて、転送処理が実行されてもよい。なお、拡張バス90の通信トラフィックは監視部54aによって監視されている。データレコードの転送時間を短縮するために、圧縮エンジン55aが複数のデータレコードを圧縮してもよい。なお、圧縮エンジン55aはCPU31により実現される必要は無く、ASIC又はFPGAなどにより実現されてもよい。このように、第一バッファ37aを採用することで、転送処理とユーザプログラムを非同期で実行することが可能となる。
The transfer process may be executed while avoiding the period during which the
<データ活用ユニットの機能>
図6は拡張ユニット4aのCPU41aによって実現される機能を説明する図である。
<Function of data utilization unit>
FIG. 6 is a diagram illustrating a function realized by the
収集部52cは、収集設定39に従って基本ユニット3の第一バッファからデータを収集(取得)する機能である。収集設定39は、ユーザにより設定され、プロジェクトデータの一部として転送され、拡張ユニット4aのメモリ42aに記憶される。収集部52cは、CPU41aがユーザプログラムなどの制御プログラムを実行することで実現されうる。収集部52cは、収集設定39により指定されたデバイス値を基本ユニット3が収集して拡張ユニット4aの第二バッファ37bに転送するよう基本ユニット3を設定する。なお、収集部52cは、収集設定39に含まれている基本ユニット3の収集設定36aを基本ユニット3の記憶装置32に書き込んでもよい。収集部52cとデータ処理部73とは基本的に非同期で動作できることが望ましい。これを実現するためにバッファが設けられてもよい。なお、ここでは、基本ユニット3がデバイス値を収集して一旦バッファに格納し、その後、所定のタイミングで拡張ユニット4aの収集部52cが収集する実施例について説明している。しかし、本発明はこれに限定されず、拡張ユニット4a等の分析ユニットがデバイス値を直接取得し、拡張ユニット4aに設けられたメモリに当該デバイス値を保存してもよい。
The collection unit 52c is a function of collecting (acquiring) data from the first buffer of the
収集部52cは、収集設定39により指定されたデバイス値を拡張ユニット4bが収集して拡張ユニット4aの第三バッファ37cに転送するよう拡張ユニット4bを設定してもよい。第二バッファ37b及び第三バッファ37cを設けることで、データ処理部73の処理負荷が変動しても、データを取りこぼさず収集できるようになる。収集部52cは、収集設定39に含まれている拡張ユニット4bの収集設定36b(図7)を拡張ユニット4bのメモリ42bに書き込んでもよい。なお、これらの設定機能は設定部71によって実現されてもよい。設定部71は、PC2a又はPC2bから収集設定39、処理設定61、表示設定62を受信してメモリ42aに書き込む。処理設定61は、データ処理部73により収集データに対して実行されるデータ処理を定義する情報とフロー(プログラム)を含む。表示設定62は、Webサーバ70を通じてWebブラウザ18にデータ処理結果を提供するダッシュボードのテンプレート(HTMLデータ、CSS、JavaScript(登録商標)のコードなど)を含む。
The collection unit 52c may set the
さらに、拡張ユニット4aのCPU41aは、分類部76、決定部77、特定部78、及び送信部79を機能構成として実現する。分類部76は、収集部52cによって基本ユニット3の第一バッファから収集(取得)された各デバイスの時系列データの特徴を分析し、当該特徴に基づいて時系列データを分類する。分類の手法については、図12を用いて後述する。なお、分類部76は、任意のタイミングで分類処理を実行するものであるが、基本的にはシステムの運用が開始されたタイミングやユーザからの指示を受け付けたタイミングで分類処理を実行する。決定部77は、分類部76によって分類された時系列データに従って、異常デバイスを特定する際のパラメータを決定し、メモリ42aに格納する。パラメータの決定処理については後述する。決定部77は、分類部76によって分類処理が実行されると、パラメータの決定処理を行い、同一のデバイスについて既にパラメータが決定されている場合には当該パラメータを更新する。更新する際には、上書きにより更新してもよいし、平均値をとるなど2つのパラメータから新たなパラメータを決定するようにしてもよい。また、デバイスごとに更新時の処理を決定するようにしてもよい。このように、分類部76及び決定部77は、収集したデータを分析して正常時のデータがどのようなものであるかを学習する学習フェーズにおいて機能する処理部であり、異常デバイスを推定する際のパラメータを決定する。一方、特定部78は、異常デバイスを推定する推定フェーズで機能する処理部である。特定部78は、決定されたパラメータを用いて、収集部52cによって収集された各デバイスの時系列データから異常デバイスを特定する。特定処理の詳細については後述する。ここで、異常デバイスとは、正常時とは異なるデータが保持されているデバイスメモリの記憶領域を示す。特定部78による異常デバイスの推定は、プログラマブルロジックコントローラの運用中に異常が発生した場合や、定期的に、或いはユーザからの監視指示に基づいて開始してもよい。また、ユーザにより予め設定された保存条件が満たされた場合に、開始してもよい。
Further, the
生成部74は、ダッシュボードの表示部品を定義する表示設定62にしたがって、ダッシュボードのテンプレートにデータ処理結果を代入することで、ダッシュボードの表示データを作成する。また、生成部74は、特定部78による異常デバイスの特定結果に基づいて、当該特定結果を表示するための表示データ(画面情報)を作成する。表示データは、例えば、HTMLデータや画像データ、CSS(カスケーディングスタイルシート)、JavaScript(登録商標)のコードなどであってもよい。表示部品としては、例えば、円グラフ部品、棒グラフ部品、折れ線グラフ部品、数値表示部品などが含まれる。Webサーバ70は、Webブラウザ18によりダッシュボードのWebページにアクセスがあると、ダッシュボードの表示データをWebブラウザ18に送信する。Webブラウザ18が表示データを受信してダッシュボードを表示する。また、送信部79は、生成部74によって生成された表示データを外部装置に送信する。送信する際の通信回線、通信手法については特に限定はしない。また、無線接続であっても、有線接続であってもよい。
The
なお、複数のデータ活用アプリケーションが提供されることがある。この場合、データ活用アプリケーションごとに必要とするデータと読み出しタイミングが異なることがあり、データ活用アプリケーションごとにサブバッファがメモリ42aに確保されてもよい。収集部52cは、第二バッファ37bに格納されたデータレコードを読み出し、第一データ活用アプリケーション用のデータを第一サブバッファ38aに格納する。収集部52cは、第二バッファ37bに格納されたデータレコードを読み出し、第二データ活用アプリケーション用のデータを第二サブバッファ38bに格納する。なお、収集部52cは、第三バッファ37cに格納されたデータレコードを読み出し、第一データ活用アプリケーション用のデータを第一サブバッファ38aに格納してもよい。収集部52cは、第三バッファ37cに格納されたデータレコードを読み出し、第二データ活用アプリケーション用のデータを第二サブバッファ38bに格納してもよい。データ処理部73は、第一データ活用アプリケーションにしたがってデータを第一サブバッファ38aから読み出してデータ処理を実行し、処理結果を生成する。データ処理部73は、第二データ活用アプリケーションにしたがってデータを第二サブバッファ38bから読み出してデータ処理を実行し、処理結果を生成する。解凍エンジン75は、基本ユニット3の圧縮エンジン55a及び拡張ユニット4bの圧縮エンジン55bと対を成す機能である。解凍エンジン75は、基本ユニット3により圧縮されて転送されてきたデータを解凍して第二バッファ37bに格納する。解凍エンジン75は、拡張ユニット4bにより圧縮されて転送されてきたデータを解凍して第三バッファ37cに格納する。これにより拡張バス90の通信トラフィックの混雑が緩和されるようになろう。解凍エンジン75はASIC又はFPGAなどにより実現されてもよい。このように基本ユニット3及び拡張ユニット4a、4bとの間のデータの伝送は拡張バス90を介して実行される。
In addition, multiple data utilization applications may be provided. In this case, the data required for each data utilization application and the read timing may differ, and a subbuffer may be secured in the
データ活用アプリケーションごとに必要となるデータが複数である場合がある。その場合、各スキャンで収集されたデータの塊をバッファに維持したままサブバッファに必要な複数のデータを格納することもある。さらに、サブバッファにデータを分配する場合にも、各レコードにタイムスタンプ等が付与されもよい。図16が示すように、第二バッファ37b(第三バッファ37cであってもよい)は、収集されたデータの塊を保持している。一つのレコードはスキャン番号と、タイマーの値(タイムスタンプ)と、収集されたデータを含む。この例で、収集されたデータは、リレーRL1〜RL3、デバイスDev1、Dev2を含む。第一データ活用アプリケーション1601は、収集されたデータのうち、リレーRL1〜RL3を必要とする。したがって、スキャン番号、タイマーの値、リレーRL1〜RL3が第二バッファ37bから読み出されて、第一サブバッファ38aに格納される。第一データ活用アプリケーション1601は、第一サブバッファ38aからスキャン番号、タイマーの値、リレーRL1〜RL3を読み出して表示画面(ソースデータ)を作成する。第二データ活用アプリケーション1602は、収集されたデータのうち、リレーRL3、デバイスDev1、Dev2を必要とする。したがって、スキャン番号、タイマーの値、リレーRL3、デバイスDev1、Dev2が第二バッファ37bから読み出されて、第二サブバッファ38bに格納される。第二データ活用アプリケーション1602は、第二サブバッファ38bからスキャン番号、タイマーの値、リレーRL3、デバイスDev1、Dev2を読み出して表示画面(ソースデータ)を作成する。このようにサブバッファを活用することで、元のデータを変更することなくバッファ内に維持することが可能となる。バッファ内に保持された元のデータは他の目的で利用可能となる。
Data utilization There may be multiple data required for each application. In that case, a plurality of necessary data may be stored in the subbuffer while maintaining the chunk of data collected in each scan in the buffer. Further, when data is distributed to the subbuffer, a time stamp or the like may be added to each record. As shown in FIG. 16, the
<データ活用に関連する拡張ユニット4bの機能>
図7は拡張ユニット4bのCPU41bによって実現される機能を説明する図である。
<Functions of
FIG. 7 is a diagram illustrating a function realized by the
実行エンジン51bは拡張ユニット4bの基本機能(モーションユニットであればモーションフローの実行など)を実行する。収集部52bは、収集設定36により指定されたデータを、収集設定36により指定されたタイミングでデバイス部34bから収集して第四バッファ37dに格納する。転送部53bは、収集設定36により指定されたタイミング、又は、拡張ユニット4aにより転送要求が受信されたタイミングで、第四バッファ37dに格納されているデータレコードを読み出して、拡張バス90を介して、拡張ユニット4aの第三バッファ37cに転送する。なお、監視部54により監視される拡張バス90の通信トラフィックが少ないタイミングに、転送部53bがデータレコードの転送を実行してもよい。圧縮エンジン55bは、収集設定36にしたがってデータレコードを圧縮する。つまり、転送部53bは、圧縮エンジン55bにより情報圧縮されたデータレコードを拡張ユニット4aに転送してもよい。圧縮エンジン55bは、CPU41bにより実現されてもよいが、高速処理の観点やCPU41bの処理負荷の軽減の観点から、ASIC又はFPGAにより実現されてもよい。
The
<データレコードの例>
図8は収集部52aによって第一バッファ37aに書き込まれるデータレコード91を示している。複数のデータレコード91は時系列データの一例である。この例で、収集部52aは一スキャン周期ごとに、Dev0、Dev1、Dev10というデバイス名のデバイス値をデバイス部34aから収集し、収集カウント及びタイマーから取得された時刻情報を付加して一つのデータレコードを作成し、第一バッファ37aに格納する。なお、収集対象は、拡張ユニット4bに割り当てられたバッファメモリ又はデバイスに格納されたデータであってもよい。この例で第一バッファ37aはFIFO(先入先出)タイプのバッファである。収集カウントは、一つのデータレコードを収集するたびに1ずつカウントアップされるカウンタのカウント値である。収集カウントはシーケンシャルに付与される番号であるため、データレコードの抜けや圧縮を検出することに役立つ。
<Example of data record>
FIG. 8 shows a
タイムスタンプなどの時刻情報は、例えば、基本ユニット3で取得されたデータと、拡張ユニット4bで取得されたデータとを対比可能にダッシュボードに表示する際に役立つ。一般に、基本ユニット3における収集タイミングと拡張ユニット4bにおける収集タイミングとは一致しない。そのため、基本ユニット3の動作と拡張ユニット4bの動作とを比較するためには、基本ユニット3のデータと、拡張ユニット4bのデータとを紐付けるための情報が必要となる。一般に、基本ユニット3と、拡張ユニット4a、4bとはユニット間同期などによって時刻情報を同期できる。したがって、基本ユニット3と拡張ユニット4bはそれぞれデータレコードを収集したときの時刻情報をデータレコードに付与することで、データ処理部73は、異なるユニットで取得された複数のデータレコードを時間軸上で整列させることができる。
Time information such as a time stamp is useful, for example, when displaying the data acquired by the
<転送のタイミング>
図9はデータレコードの転送タイミングを説明する図である。図9が示すようにPLC1は、入出力のリフレッシュ、ユーザプログラムの実行及びエンド処理を繰り返し実行する。スキャン周期の伸びを低減するために、転送処理は、入出力のリフレッシュの期間を避けて実行される。同様に、スキャン周期の伸びを低減するために、転送処理は、UREAD及びUWRITの実行期間を避けて実行される。UREADは拡張ユニット4に割り当てられているバッファメモリからデータを読み出す命令であり、ユーザプログラム中に記述される。そのため、基本ユニット3は、ユーザプログラムの実行期間中に、UREADにしたがって拡張ユニット4にアクセスしてバッファメモリからデータを取得する。UWRITは、拡張ユニット4に割り当てられているバッファメモリにデータを書き込む命令であり、ユーザプログラム中に記述される。基本ユニット3は、ユーザプログラムの実行期間中に、UWRITにしたがって拡張ユニット4にアクセスしてバッファメモリにデータを書き込む。
<Transfer timing>
FIG. 9 is a diagram for explaining the transfer timing of the data record. As shown in FIG. 9, the PLC1 repeatedly executes input / output refresh, user program execution, and end processing. In order to reduce the extension of the scan cycle, the transfer process is executed avoiding the input / output refresh period. Similarly, in order to reduce the elongation of the scan cycle, the transfer process is executed avoiding the execution period of UREAD and UWRIT. UREAD is an instruction to read data from the buffer memory allocated to the
図9が示すように、入出力のリフレッシュ、UREAD及びUWRITを除いた残りの転送可能期間において、転送処理は、拡張バス90で実行される。例えば、収集設定36aによって5個のデータレコードずつ転送処理を実行することが設定されていたと仮定する。この場合、転送部53aは、第一バッファ37aに5個のデータレコードの蓄積が完了した後であって、最初の転送可能期間又は拡張ユニット4aによって転送要求を受信したタイミングで、転送処理を実行する。
As shown in FIG. 9, the transfer process is performed on the
<情報の圧縮>
図10はデータレコードの情報圧縮を説明する図である。データレコード群92aは情報圧縮前のデータレコードを示している。なお、前回のスキャン周期から変化があった値は網掛け表示している。ここでは収集対象として四つのリレーデバイスRL1,RL2,RL3,RL4が指定されている。また、収集カウントとしてスキャン番号が採用されている。カウンタは、タイマーなどにより取得される時刻情報(例:あるリレーがONになってからOFFになるまでの時間間隔を示す数値)であってもよい。データレコード群92aにおいてスキャン番号"1"のデータレコードと、スキャン番号"2"のデータレコードとの間ではリレーデバイスの変化点が存在しない。つまり、スキャン番号"2"のデータレコードは圧縮(廃棄または削除)可能である。しかし、スキャン番号"3"のデータレコードのリレーデバイスRL1とスキャン番号"1"のデータレコードのリレーデバイスRL1とが異なっている。このように、スキャン番号"3"は変化点を有しているため、スキャン番号"3"のデータレコードは圧縮されない。スキャン番号"3"のデータレコードと、スキャン番号"4"のデータレコードとの間ではリレーデバイスの変化点が存在しないため、スキャン番号"4"のデータレコードは圧縮可能である。同様に、スキャン番号"5"のデータレコードと、スキャン番号"6"のデータレコードとの間ではリレーデバイスの変化点が存在しないため、スキャン番号"6"のデータレコードは圧縮可能である。このような変化点に着目した情報圧縮を実行することで、圧縮されたデータレコード群92bが実現される。圧縮されたデータレコード群92bを構成する各データレコードは変化点を有している。このように、本実施形態では、1以上のデバイスのグループ(RL1〜RL4)において、前回のスキャン周期において収集した値と、今回のスキャン周期において収集した値とが収集対象のグループの全てのデバイスで変化していなければ、今回のスキャン周期において収集した値を削除して、収集する時系列データを圧縮する。なお、ここでは、一群で管理する実施例について説明したが、本発明を限定する意図はなく、グルーピングせずに、個々のデバイスに関してON/OFFを判定してデータを圧縮してもよい。また、ON/OFFのビット形式ではないデータ(アナログ値)の場合は、デバイス毎に前回とのデバイス値の変化を検知し、変化を検知した場合に残すように制御してもよい。
<Compression of information>
FIG. 10 is a diagram illustrating information compression of a data record. The
<全体フロー>
図11は、本実施形態に係るプログラマブルロジックコントローラにおいてデータ収集から異常デバイスの特定処理までの全体フローを示す。以下で説明する処理は、拡張ユニット4aのCPU41aによって実行される処理として説明する。しかし、本発明を限定する意図はなく、それらの処理の一部が基本ユニット3や他の拡張ユニット4bで実行されてもよいし、或いはプログラマブルロジックコントローラに通信可能に接続された外部装置(分析装置)によって実行されてもよい。
<Overall flow>
FIG. 11 shows an overall flow from data collection to identification processing of an abnormal device in the programmable logic controller according to the present embodiment. The process described below will be described as a process executed by the
S1でCPU41a(設定部71)は基本ユニット3と拡張ユニット4bを設定する。例えば、CPU41aは基本ユニット3のための収集設定36aを基本ユニット3に転送する。基本ユニット3は、収集設定36aを記憶装置32に格納する。CPU41aは基本ユニット3のための収集設定36bを拡張ユニット4bに転送する。拡張ユニット4bは、収集設定36bをメモリ42bに格納する。
In S1, the
S2でCPU41a(収集部52c)は設定された収集設定に従って、収集対象となるデバイスの時系列データを収集する。ここでは、所定量の収集データが格納された場合に次の処理に進むようにしてもよい。つまり、ここでは、学習フェーズへ移行するタイミングを判定し、学習するのに十分なデータ量(所定数のスキャン周期の時系列データ)がバッファやメモリカードなどの記憶部に蓄積されると次の処理へ進む。
In S2, the
S3でCPU41a(分類部76及び決定部77)はS2で収集されたデータを分析して、異常デバイスを特定するための学習モデル(本実施形態では、パラメータ)を作成する。学習フェーズの処理については、図15を用いて後述する。
In S3, the
S4でCPU41a(収集部52c)は設定された収集設定に従って、収集対象となるデバイスの時系列データを収集する。S4以降の処理は、実際にシステムの運用時の処理となる。ここでのデータの収集は、基本的には上記S2と同様のデータ収集が行われる。なお、学習フェーズについてはシステムの運用開始時に行われてもよいし、ユーザからの指示を受け付けたタイミングで開始されてもよい。また、定期的に行うようにしてもよい。つまり、システム運用時においては常にデータ収集が行われ、定期的に学習フェーズが行われ、保存条件が成立したタイミングで推定フェーズが行われる。例えばプログラマブルロジックコントローラの運用中に異常が発生し、基本ユニット3が保存条件の成立を検知した場合に、基本ユニット3の第一バッファ37aに収集された時系列データがメモリカード44に保存させる。S5でCPU41a(特定部78)は、メモリカード44に保存された時系列データを取得してS3で決定されたパラメータを適用することによって、異常デバイスを特定する。即ち、ここでは推定フェーズにおける処理が行われるが、詳細については図16を用いて後述する。また、CPU41aは、特定部78によって特定された特定結果に基づいて、生成部74によって当該特定結果を示す表示データを生成し、基本ユニット3の表示部5に表示するか、或いは、送信部79によって通信部43を介して生成した表示データ又は特定結果を外部装置へ送信する。この場合、外部装置において特定結果がオペレータに対して表示される。S5の運用は、上述したようなプログラマブルロジックコントローラの運用中に異常が発生した場合に、基本ユニット3が保存条件の成立を検知し、異常デバイスを特定する以外にも、デバイス値を常時収集し、当該デバイス値に異常がないかを分析する方法や、ユーザにより予め定められたデバイス値が所定の変化をした場合に、基本ユニットにより収集されているデバイス値を分析する方法、定期的に、或いはユーザからの監視指示に基づいて、デバイス値に異常がないかを分析する方法であってもよい。これらの場合、「異常」とは、分析対象のデバイス値が、正常時のデバイス値と異なっている、すなわち、正常時のデータと乖離していることを表し、必ずしも、プログラマブルロジックコントローラに発生している異常を示すものではない。なお、これらの収集タイミングを考慮したデータ収集から異常デバイスを特定する推定フェーズの処理手順については図16を用いて詳細に後述する。
In S4, the
<収集データの分類>
図12は、収集される時系列データの類型の一例を示す。1201〜1206は各類型のデバイス信号(時系列データ)を示す。デバイス信号には外部信号が含まれてもよい。なお、以下で説明する類型は一例であり、本発明を限定する意図はなくその他の類型にも本発明が適用されてもよい。また、本発明においては分類される類型は、分類効果を向上させるべく、これら複数の類型のうちの少なくとも2つの類型を含むことが望ましい。なお、学習時における時系列データの分類は、ユーザが分類のための周期(動作サイクル)を決定するデバイスを選択することで、当該デバイスの繰り返し性に基づいて実行される。
<Classification of collected data>
FIG. 12 shows an example of the types of time series data collected.
1201は、装置の動作サイクルに同期して動作するデバイスのデバイス信号を示す。1210は装置の動作サイクルを示す。1201の類型は、装置の動作サイクルごとに同様の変化パターン(定常的な変化パターン)が発生する。この類型では、たとえば、正常状態とみなせる期間において取得された時系列データから定常的な変化パターンを特定し、新たに取得された時系列データについて特定した定常的な変化パターンからの乖離に基づいて異常デバイス(いつもと違うデバイス)を特定するといった検知手法が割り当てられる。具体的には、正常状態とみなせる複数周期の時系列データの変化パターンについて、変化点に関する時間のばらつきを測定し、測定されたばらつきに応じてしきい値を設定する。その後に取得された時系列データの変化点が変化点に対応して設定されたしきい値の範囲を超えるか否かに基づいて異常デバイスを検知する検知アルゴリズムが割り当てられる。例えば、装置の動作サイクルごとの複数の波形を重ね合わせ、デバイスがOFFからONに変化した点のばらつきに基づき、当該変化点の基準値としきい値とを設定し、これらのパラメータを用いて異常デバイスを特定することができる。また、1201の各周期において、1回目の信号の立ち上がりタイミングを示す相対時刻や各周期における位相を評価変数とし、当該評価変数のばらつきに基づいて評価変数に対応するパラメータを決定してもよい。たとえば、各周期における位相を評価変数とした場合は、位相の上限しきい値と下限しきい値をそれぞれパラメータとしてもよい。
一方、1202は、スキャン周期には同期せず、当該装置の動作サイクル以外の周期に同期して動作するデバイスのデバイス信号を示す。この類型についても、たとえば、正常状態とみなせる期間において取得された時系列データから定常的な変化パターンを特定し、新たに取得された時系列データについて特定した定常的な変化パターンからの乖離に基づいて異常デバイス(いつもと違うデバイス)を特定するといった検知手法が割り当てられる。具体的には、正常状態とみなせる複数周期の時系列データの変化パターンについて、変化点に関する時間のばらつきを測定し、測定されたばらつきに応じてしきい値を設定する。その後に取得された時系列データの変化点が変化点に対応して設定されたしきい値の範囲を超えるか否かに基づいて異常デバイスを検知する検知アルゴリズムが割り当てられる。また、1202の各周期において、2回目の信号の立ち上がりタイミングを示す相対時刻や各周期における位相を評価変数とし、当該評価変数のばらつきに基づいて評価変数に対応するパラメータを決定してもよい。たとえば、各周期における相対時刻を評価変数とした場合は、相対時刻の上限しきい値と下限しきい値をそれぞれパラメータとしてもよい。 On the other hand, 1202 indicates a device signal of a device that is not synchronized with the scan cycle and operates in synchronization with a cycle other than the operation cycle of the device. Also for this type, for example, a steady change pattern is specified from the time series data acquired during the period that can be regarded as a normal state, and based on the deviation from the specified steady change pattern for the newly acquired time series data. A detection method such as identifying an abnormal device (a device different from usual) is assigned. Specifically, for a change pattern of time-series data having a plurality of cycles that can be regarded as a normal state, the time variation with respect to the change point is measured, and a threshold value is set according to the measured variation. A detection algorithm for detecting an abnormal device is assigned based on whether or not the change point of the time series data acquired thereafter exceeds the threshold range set corresponding to the change point. Further, in each cycle of 1202, the relative time indicating the rising timing of the second signal and the phase in each cycle may be used as evaluation variables, and the parameters corresponding to the evaluation variables may be determined based on the variation of the evaluation variables. For example, when the relative time in each cycle is used as an evaluation variable, the upper limit threshold value and the lower limit threshold value of the relative time may be used as parameters, respectively.
1203は、一定した値をとるデバイスのデバイス信号を示す。この類型では、たとえば、正常状態とみなせる期間において取得された時系列データから、正常時の値を特定し、新たに取得された時系列データについて、特定した正常時の値と異なるものを異常デバイス(いつもと違うデバイス)として特定するといった検知手法が割り当てられる。具体的には、正常状態とみなせる時系列データにおけるデバイスの値を検出基準値として設定し、その後に取得された時系列データの値が、正常時の値に対応して設定された検出基準値と異なるか否かに基づいて異常デバイスを検知する検知アルゴリズムが割り当てられる。つまり、値(一定値)が変化した場合に異常と判断することができる。1204は、不定期に動作するデバイスのデバイス信号を示す。この類型については、異常デバイスを特定する際に用いるデータからは除外される。1205は、アナログ値をとるデバイスのデバイス信号を示す。アナログ値をとるデバイスでは、後述するように、ビットデバイスのデバイス値ではないので、図13AでS21のNo(図13BのS27)へ進み、図13Bで示すように、データの変化方法に応じてそれぞれで推定フェーズにおけるアルゴリズムが異なる。アナログ値を取るデバイスの推定フェーズにおけるアルゴリズムとしては、動的時間伸縮法や自己回帰モデルなど種々の方法を利用することができる。1206は、単調増加、単調減少するデバイスのデバイス信号を示す。この類型では、微分値や積算値を用いて異常デバイスを特定する。また、単調増加または単調減少するタイミングを示す相対時刻や各周期における位相を評価変数として用いてもよい。なお、ここで説明した類型は一例であり、他の類型に分類されるデバイスも想定され、例えば、(階段状のデバイス信号など)複数の状態をとりうるものなどがある。複数の状態をとるものについては、正常時の状態と異なる状態に変化した場合に異常と判断することもできる。 1203 represents a device signal of a device that takes a constant value. In this type, for example, the value at the normal time is specified from the time series data acquired during the period that can be regarded as the normal state, and the newly acquired time series data that is different from the specified normal value is the abnormal device. A detection method such as identifying as (a device different from usual) is assigned. Specifically, the device value in the time-series data that can be regarded as the normal state is set as the detection reference value, and the value of the time-series data acquired thereafter is the detection reference value set corresponding to the value in the normal state. A detection algorithm that detects an abnormal device is assigned based on whether or not it differs from. That is, when the value (constant value) changes, it can be determined as abnormal. 1204 indicates a device signal of a device that operates irregularly. This type is excluded from the data used to identify anomalous devices. 1205 represents a device signal of a device that takes an analog value. As will be described later, the device that takes an analog value is not the device value of the bit device, so the process proceeds to No. S21 (S27 in FIG. 13B) in FIG. 13A, and as shown in FIG. 13B, depending on the data change method. The algorithm in the estimation phase is different for each. As an algorithm in the estimation phase of the device that takes an analog value, various methods such as a dynamic time expansion / contraction method and an autoregressive model can be used. 1206 indicates a device signal of a device that monotonically increases and decreases monotonically. In this type, anomalous devices are identified using derivative values and integrated values. Further, a relative time indicating the timing of monotonically increasing or monotonically decreasing or a phase in each cycle may be used as an evaluation variable. The type described here is an example, and devices classified into other types are also assumed. For example, there are devices that can take a plurality of states (such as a stepped device signal). For those that take multiple states, it can be determined that they are abnormal when they change to a state different from the normal state.
ここで、図14を参照して、デバイスの型について説明する。図14に示すように、各デバイスは0、1のビット型のデバイスと、アナログ値をとる、ワード型のデバイスや浮動小数点数型のデバイスがある。なお、ワードデバイスには、さらに、1ワード符号なし整数(0〜65535)、1ワード符号あり整数(−32768〜32767)、2ワード符号なし整数(0〜4294967295)、及び2ワード符号あり整数(−214783648〜214783647)がある。このような型を考慮すると、例えば、スキャン周期あたりの変化率が所定値以上で、型がビット以外であればアナログ値をとるデバイスであると判断することができる。 Here, the type of the device will be described with reference to FIG. As shown in FIG. 14, each device includes a bit type device of 0 and 1, and a word type device and a floating point number type device that take analog values. In addition, the word device further includes a one-word unsigned integer (0 to 65535), a one-word signed integer (-32768 to 32767), a two-word unsigned integer (0 to 249497295), and a two-word signed integer (0 to 249497295). -2147863648 to 214783647). Considering such a type, for example, if the rate of change per scan cycle is a predetermined value or more and the type is other than a bit, it can be determined that the device takes an analog value.
<分類>
図13A及び図13Bは、収集されたデータを分類する際の処理手順を示すフローチャートである。以下で説明する処理は、拡張ユニット4aのCPU41aによって実現される。しかし、本発明を限定する意図はなく、それらの処理の一部が基本ユニット3や他の拡張ユニット4bで実行されてもよいし、或いはプログラマブルロジックコントローラに通信可能に接続された外部装置(分析装置)によって実行されてもよい。
<Category>
13A and 13B are flowcharts showing a processing procedure when classifying the collected data. The processing described below is realized by the
S21でCPU41aは、分類対象の時系列データがビットデバイスのデバイス値であるか否かを判断する。ビットデバイスのデバイス値であればS22に進み、そうでなければ、図13BのS27に進む。
In S21, the
S22でCPU41aは、分類対象の時系列データの値に変化があるか否かを判断する。変化があればS24へ進み、変化がなく一定値をとるものであればS23に進む。S23でCPU41aは分類対象の時系列データを一定値をとるデバイス(1203)であると分類し、処理を終了する。ここで分類情報として、当該時系列データに紐づく情報、例えば分類された類型を示すフラグ情報が当該時系列データまたは当該時系列データに対応するデバイスを示す識別情報に紐づけて格納される。このように、学習フェーズの分類時において分類した類型のフラグ情報とデバイスの識別情報とを紐づけて格納しておくことにより、推定フェーズにおいては、検証対象の時系列データが何れのデバイスからのデータであるかに従って、当該デバイスの識別情報に紐づく類型に応じて、異常デバイスの検知アルゴリズムである評価変数やパラメータを容易に選択することができる。つまり、推定フェーズにおいては、検証対象の時系列データが何れの類型に対応するかを特定する処理を省略することができる。なお、分類情報としては、分類された類型を示すフラグ情報を例として示したが、フラグ情報に代えて異常デバイス特定のアルゴリズムを示すアルゴリズム情報であってもよい。また、分類情報として格納される識別情報は、時系列データに対応するデバイスが変数である場合は、当該変数を示す識別情報となることはいうまでもない。
In S22, the
S24でCPU41aは、時系列データの値に変化がある場合に、当該変化が各周期において定常的な変化パターンであるかを判断する。定常的な変化パターンであると判断した場合にはS25に進み、定常的な変化パターンではないと判断した場合にはS26に進む。ここで、定常的な変化パターンとは、各周期において同様のパターンで変化するものを示す。このように、定常的な変化パターンは、各周期内において時系列データの値に変化があるパターンであり、各周期間において固定的な同様のパターンであることから、固定の変化パターンとも称する。S25でCPU41aは、所定の周期で動作するデバイスと分類し、処理を終了する。なお、所定の周期で動作するデバイスには、上述したように、装置の動作サイクルに同期して動作するデバイス(1201)と、装置の動作サイクル以外の周期に同期して動作するデバイス(1202)とがあり、CPU41aは、それぞれへの分類を行う。一方、S26でCPU41aは、不定期で動作するデバイス(1204)に分類し、処理を終了する。
In S24, when there is a change in the value of the time series data, the
なお、CPU41aは、特定のデバイスに関する時系列データの値の変化に基づいて、装置の動作サイクルや装置の動作サイクル以外の周期を特定してもよい。たとえば、特定のデバイスのデバイス値は、装置の各動作サイクル内で一つのパルスを有し、各動作サイクルの開始タイミングを規定する変化点を有する時系列データとして収集される。つまり、特定のデバイスの値は、装置の動作サイクルと同期して変化するもので、その変化点は動作サイクルを規定するものである。このような特定のデバイスは、オペレータの選択により設定されてもよい。同様にして、動作サイクル以外の周期を規定するデバイスも、オペレータの選択により設定されてもよい。もちろん、収集した時系列データから当該デバイスの動作サイクルを自動的に特定するようにしてもよいし、特定後においてオペレータにより調整可能にしてもよい。これによりオペレータをより支援することができ、経験の浅いオペレータに対しても使い勝手の良い操作体系を提供することができる。また、動作サイクル以外の周期で動作するデバイスは、動作サイクルを基準とすると不定期で動作するデバイスと定義してもよく、たとえば、動作サイクル以外の周期を規定するデバイスを設定しない場合、CPU41aは、動作サイクル以外の周期で動作するデバイスを不定期で動作するデバイス(1204)に分類する。
The
一方、S21でビットデバイスでないと判断されると、図13Bに示すS27に進み、CPU41aは、分類対象の時系列データにおいて所定値以上の変化があるか否かを判断する。ここでは、変化している信号の極値が所定値以上であるか否かを判断する。変化がある場合はS28に進み、そうでない場合はS212に進む。
On the other hand, if it is determined in S21 that the device is not a bit device, the process proceeds to S27 shown in FIG. 13B, and the
S28でCPU41aは、所定の周期で変化しているか否かを判断し、所定の周期で変化していなければS29に進み、変化していればS210に進む。S210でCPU41aは、変化している値が単調増加又は単調減少しているか否かを判断する。単調増加又は単調減少していればS211に進み、そうでなければS29に進む。
In S28, the
S29でCPU41aは、アナログ値のデバイス(1205)に分類し、処理を終了する。アナログ値のデバイスにおいては種々の類型が存在し、分類対象のデバイスの種別に応じてそれぞれ個別の対応が行われる。一方、S211でCPU41aは、単調増加又は単調減少のデバイス(1206)であると分類し、処理を終了する。また、S212でCPU41aは、その他のデバイスであると分類し、処理を終了する。その他のデバイスであると判断した場合には当該分類対象の時系列データの特徴が抽出できないものであり、正常時の特徴のある動作を特定できないため、異常デバイスを特定する際には用いない。
In S29, the
以上のように、CPU41aは、分類対象の時系列データに基づいて、分類対象のデバイスを自動的に分類するが、これに加え、分類対象のデバイスに対する類型の設定をオペレータから受け付けるようにしてもよい。CPU41aは、オペレータの指定に応じて、分類対象のデバイスに対する類型の設定を受け付ける。そして、CPU41aは、分類された類型を示すフラグ情報を当該分類対象のデバイスを示す識別情報に紐づけて格納する。分類対象のデバイスに対する類型の設定は、CPU41aによる分類前に実行されてもよい。たとえば、複数の分類対象のデバイスのうち特定のデバイスについて、オペレータの指定に基づいて類型の設定が実行された場合、CPU41aは、予め類型が設定されたデバイスに対して、分類対象の時系列データに基づく分類を実行しなくてもよい。一方、CPU41aは、複数の分類対象のデバイスのうちオペレータの指定が行われなかった他のデバイスに対して、分類対象の時系列データに基づく分類を実行してもよい。特に、前回までの学習によってデバイスの類型が決定していて、さらに追加の学習を実施する場合には、オペレータの指定に基づいて前回までの学習によってデバイスの類型に固定してもよく、変更が必要なデバイスについてはオペレータの指定に基づいて前回までの学習によってデバイスの類型と異なる類型を決定してもよい。たとえば、異常デバイスを特定する際に使用されない類型を決定してもよい。
As described above, the
また、分類対象のデバイスに対する類型の設定は、CPU41aによる分類後に実行されてもよい。たとえば、複数の分類対象デバイスについて、CPU41aは、分類対象の時系列データに基づいて、分類対象のデバイスを自動的に分類する。その後、CPU41aは、オペレータの指定により類型の設定がされたデバイスについて、自動的に分類した類型を、オペレータの指定に応じて分類対象のデバイスに対して設定された類型に更新してもよい。これにより、自動分類するために使用する時系列データの期間が短い場合や期間に偏りがある場合であっても、オペレータによる既知の情報と組み合わせることで、分類対象のデバイスについて、効率よく所望の分類に近づけることができる。
Further, the type setting for the device to be classified may be executed after the classification by the
<学習フェーズ>
図15は、収集された時系列データを分析して各デバイスの特徴に基づいて分類し、検知アルゴリズムを決定する際の処理手順を示す。以下で説明する処理は、拡張ユニット4aのCPU41aによって実現される。しかし、本発明を限定する意図はなく、それらの処理の一部が基本ユニット3や他の拡張ユニット4bで実行されてもよいし、或いはプログラマブルロジックコントローラに通信可能に接続された外部装置(分析装置)によって実行されてもよい。
<Learning phase>
FIG. 15 shows a processing procedure for analyzing the collected time series data, classifying it based on the characteristics of each device, and determining the detection algorithm. The processing described below is realized by the
学習フェーズ開始のタイミングとしては、例えば前回の学習処理から所定期間が経過したタイミングや所定量の時系列データが収集されたタイミング、ユーザからの指示を受け付けた場合である。学習フェーズが開始されると、CPU41a(収集部52c)は設定された収集設定に従って、収集対象となるデバイスの時系列データを収集する(S2)。
The timing of starting the learning phase is, for example, the timing when a predetermined period has elapsed from the previous learning process, the timing when a predetermined amount of time series data is collected, and the case where an instruction from the user is received. When the learning phase is started, the
S31でCPU41aは、分類処理を実行する。分類処理は、例えば、所定量の収集データが基本ユニット3のメモリカード44に格納された場合に、基本ユニット3からの指示に応じて拡張ユニット4aで行われる。基本ユニット3は、メモリカード44に所定量の収集データが保存されたことを検知して、拡張ユニットに対して分類開始の指示を送ってもよい。また、学習するのに十分なデータ量(所定数のスキャン周期の時系列データ)がバッファメモリやメモリカードなどの記憶部に蓄積されたことを拡張ユニットが検知して開始してもよい。分類処理の詳細については図13A及び図13Bを用いて既に説明しているため、ここでは割愛する。
In S31, the
続いて、S32でCPU41aは、S31で分類された時系列データに従って、異常デバイスを特定する際のパラメータを決定し、処理を終了する。ここでの処理は分類された類型ごとに行われ、時系列データに対応するデバイスの類型とパラメータとが関連付けて記憶される。また、既に決定されたパラメータが存在する場合には、既に決定されたパラメータに代えて今回決定したパラメータに更新するか、或いは、既に決定されたパラメータと今回決定したパラメータとを用いて新たなパラメータを算出し更新してもよい。算出方法については平均値など様々な手法が適用され得るが、それぞれの時系列データに適した手法が選択される。また、これら決定されたパラメータについては、オペレータによって変更可能としてもよい。これにより、学習期間が短い場合に極端なパラメータが決定されたとしても調整可能とすることができる。
Subsequently, in S32, the
ここで、S32で決定されるパラメータについて説明する。図12の1201、1202の類型(所定の周期に同期して値が定常的なパターンで変化するデバイス)については、CPU41aは、例えば装置の動作サイクル内の波形の変化パターンから、装置の動作サイクルごとの波形の任意の変化点間の時間を算出し、当該変化点間の時間の分布に基づき、変化点間の時間のしきい値を、パラメータとして決定する。さらに、この場合のパラメータには、正常時の時系列データのデバイス値が変化するタイミングを含んでもよい。また、上記パラメータである変化点間の時間のしきい値は、学習時のばらつきから、例えば標準偏差と平均値を計算し、平均値+3×標準偏差を上限のしきい値とし、平均値−3×標準偏差を下限のしきい値として決定してもよい。また、1203の類型(一定の値をとるデバイス)については、CPU41aは、当該一定値をパラメータとする。このように、所定の周期に同期して値が定常的なパターンで変化するデバイスについては、変化点間の時間間隔や、変化点のタイミング、これらに関わるしきい値がパラメータとして用いられる。
Here, the parameters determined in S32 will be described. Regarding the
1205の類型(アナログ値)については、例えば学習時の時系列データの値と、学習時の時系列データとの距離に関するしきい値とをパラメータとしてもよい。距離の算出方法は、例えば、点ごとの差の和を求める方法でもよい。この場合、推定時には、学習時の時系列データと、推定時の時系列データとの距離を計算し、当該距離がしきい値の範囲内かを判定する。また、1206の類型(単調増加、単調減少)については、例えば正常時における単調増加する際の増加値や、単調減少する際の減少値がパラメータとして決定される。 For the 1205 type (analog value), for example, the value of the time-series data at the time of learning and the threshold value regarding the distance between the time-series data at the time of learning may be used as parameters. The distance calculation method may be, for example, a method of obtaining the sum of the differences for each point. In this case, at the time of estimation, the distance between the time-series data at the time of learning and the time-series data at the time of estimation is calculated, and it is determined whether the distance is within the threshold range. Further, for the 1206 types (monotonic increase, monotonous decrease), for example, an increase value when the monotonous increase occurs in a normal state and a decrease value when the monotonous decrease occurs are determined as parameters.
このように、本実施形態によれば、各デバイスの時系列データの周期性に関する特徴に基づいて、各デバイスを予め定められた複数の類型のいずれかにそれぞれ分類し、さらに、分類されたそれぞれの類型に適切な異常(いつもと違う変化)の検知アルゴリズムを適用する。つまり、本実施形態では、学習フェーズにおいて、正常時(学習時)の時系列データからデバイスを予め定められた複数の類型のいずれかに分類する。さらに、それぞれの類型に応じて検知アルゴリズムを決定するとともに、それぞれの検知アルゴリズムに応じた評価変数やパラメータを設定する。一方、推定フェーズにおいては、学習フェーズにおいて検知アルゴリズムが決定された各デバイスについて、決定された推定対象のデバイスの類型に従い、当該類型に応じて決まる検知アルゴリズムをデバイスの時系列データに適用する。このように、学習フェーズにおいて決定されたデバイスの類型や、デバイスの類型に対応し、異常デバイスの検知アルゴリズムを用いてデバイスの時系列データを分析することによって、異常デバイスを特定する。なお、学習時において所定の類型に分類されなかったデバイスについては、評価変数やパタメータも設定されないため、推定時においては収集対象とされないことが望ましい。つまり、このようなデータを収集したとしても異常デバイスであるか否かを特定するための検知アルゴリズムが設定されていないため、処理負荷やメモリ資源の消費を無駄に増大させることとなり、これを予防するためである。 As described above, according to the present embodiment, each device is classified into one of a plurality of predetermined types based on the characteristics of the periodicity of the time series data of each device, and each of the classified devices is further classified. Apply an appropriate anomaly (unusual change) detection algorithm to the type of. That is, in the present embodiment, in the learning phase, the device is classified into one of a plurality of predetermined types from the time series data at the normal time (learning time). Furthermore, the detection algorithm is determined according to each type, and the evaluation variables and parameters corresponding to each detection algorithm are set. On the other hand, in the estimation phase, for each device for which the detection algorithm is determined in the learning phase, the detection algorithm determined according to the type is applied to the time series data of the device according to the type of the determined device to be estimated. In this way, the abnormal device is identified by analyzing the time-series data of the device using the device type and the device type determined in the learning phase and using the abnormality device detection algorithm. For devices that are not classified into a predetermined type at the time of learning, evaluation variables and parameters are not set, so it is desirable that they are not collected at the time of estimation. In other words, even if such data is collected, the detection algorithm for identifying whether or not it is an abnormal device is not set, so the processing load and memory resource consumption will be unnecessarily increased, which is prevented. To do.
<推定フェーズ>
図16は、異常デバイスを特定する際の処理手順を示すフローチャートである。以下で説明する処理は、基本ユニット3のCPU31及び拡張ユニット4aのCPU41aによって実現される。しかし、本発明を限定する意図はなく、それらの処理の一部が基本ユニット3や拡張ユニット4a、4bなどの他のユニットで実行されてもよいし、或いはプログラマブルロジックコントローラに通信可能に接続された外部装置(分析装置)によって実行されてもよい。ここでは、一連の処理として、デバイス値を取得して保存条件が成立するとバッファメモリからメモリカード44に保存して特定処理を実行する処理を一連の処理として説明する。従って、デバイス値を取得してメモリカード44に保存する基本ユニット3の処理と基本ユニット3によってメモリカード44に保存されたデバイス値を取得して特定処理を実行する拡張ユニット4aの処理を一連の処理で示す。つまり、保存条件が成立してデバイス値を保存する処理(下記S41乃至S46)については、基本ユニット3のCPU31(収集部52a)で行い、メモリカード44に保存されたデバイス値を用いて異常を特定する処理(S47及びS48)が拡張ユニット4aのCPU41aで実行される。もちろん、S41乃至S48の処理又はその一部については他のユニットで実行するようにしてもよい。
<Estimation phase>
FIG. 16 is a flowchart showing a processing procedure when identifying an abnormal device. The processing described below is realized by the
ここで、基本ユニット3のバッファメモリ(第一バッファ37a)に保存されているデバイス値をメモリカード44へ記憶させるための保存条件について説明する。例えば、保存条件とは、PLCに異常が発生した場合や、ユーザにより予め保存トリガとなるデバイスを指定しておき、当該デバイスのデバイス値に所定の変化があった場合、ユーザによる分析命令があった場合、定期的に監視する監視周期が経過した場合、基本ユニット3に接続される拡張ユニットから分析命令が発せられた場合などに満たされる条件である。これらの保存条件は、ユーザにより設定され、プロジェクトデータとして転送され記憶されているものや、PLCの動作中にユーザにより入力されるもの、拡張ユニット4から生成される情報に基づくものなどがある。
Here, the storage conditions for storing the device values stored in the buffer memory (
S41でCPU31は、収集条件が成立したか否かを判断する。収集条件とは、例えば予め定められた収集周期が経過したタイミングや各スキャンのエンド処理のタイミングで満足される条件である。
In S41, the
S42で基本ユニット3のCPU31は、図11の上記S4で収集されたデバイス値を取得して、S43で、取得したデバイス値が第一バッファ37aに前回保存されたデバイス値と同じ値であるか否かを判断する。同じ値であれば、次のデバイス値の処理に移るため、処理をS41に戻す。一方、前回格納されたデバイス値と異なる場合にはS44に進む。
In S42, the
S44でCPU31は、取得したデバイス値を第一バッファ37aに保存し、S45に進む。このように、収集部52aは、収集設定36aによって設定された収集周期(例えば、スキャン周期)ごとにデバイス値(及び、時刻情報)を取得して、第一バッファ37aに格納する。なお、第一バッファ37aにはリングバッファが採用されることが望ましい。これは、メモリ資源を考慮して、第一バッファ37aに記憶されている全てのデータがログデータ(収集データ)として収集されるわけではないからである。
In S44, the
S45でCPU31は、第一バッファ37aに格納されたデバイス値を基本ユニット3のメモリカード44に保存する保存条件が成立したか否かを判断する。ここでの保存条件は、例えばプログラマブルロジックコントローラの運用中に異常が発生した異常時に成立するように設定される。なお、上述したように、PLCの異常時以外にも保存条件が成立するように設定し、デバイス値が異常かどうかを特定する処理を実行してもよい。つまり、「デバイス値の異常」とは、必ずしもPLCの異常を示すものではなく、単にいつものデバイス値と違う値を示すものであってもよい。従って、PLCの異常時以外にも、保存条件が成立する例としては、いつもと違うデバイス値が発生したタイミングや、ユーザからの監視指示を受け付けたタイミング、ユーザからの監視指示を受け付けた後、さらに所定の実行周期経過後、又は定期的に異常を判定するための指定されたタイミングなどが想定されうる。これらの詳細な説明については第2及び第3の実施形態で後述する。なお、第1乃至第3の実施形態で説明する機能は、少なくとも1つが設けられるようにすることができる。
In S45, the
保存条件が成立すると、S46で基本ユニット3のCPU31は、異常デバイスを特定すべく推定対象の時系列データを基本ユニット3の第一バッファ37aから取得し、メモリカード44に保存する。推定対象のデータは、デフォルトでは全デバイスのデータとし、オペレータの指定に応じて選択されてもよいし、異常の種類に応じて選択されてもよい。また、これらの時系列データについては、異常発生時の所定期間前から、異常発生時の所定時間経過後までの間の時系列データを含むようにしてもよい。或いは、異常発生後から所定期間内のデータとしてもよい。
When the storage condition is satisfied, the
次に、S47で拡張ユニット4aのCPU41aは、S46でメモリカード44に保存された時系列データについてそれぞれ、学習時に決定された当該時系列データに対応するデバイスの類型に基づいて、それぞれの類型に最適な検知手法と、検知手法に応じた評価変数やパラメータを用いて異常デバイスを特定する。上述したように、本実施形態によれば、学習時にデバイス値の変化の特徴を抽出して各デバイス値を予め定められた類型に分類し、分類されたデバイスそれぞれの類型に適切な異常(いつもと違う変化)の検知手法を適用する。つまり、本実施形態では、学習フェーズにおいて、正常時の時系列データからデバイス値を分類し、それぞれの類型に応じて検知手法を決定するとともに、それぞれの検知手法に応じた評価変数やパラメータを設定する。一方、推定フェーズの上記S47においては、学習フェーズにおいて分類された各デバイスの類型に応じて決まる検知アルゴリズムである評価変数及びパラメータを当該デバイスの時系列データに適用して分析することによって、異常を特定する。なお、時系列データの類型については、上述したように、分類時においては、類型のフラグ情報と、当該時系列データに対応するデバイスの識別情報とが紐づけて格納されている。従って、S47ではCPU41aは、推定対象の時系列データの取得先であるデバイスの識別情報から対応する類型を判別し、当該類型に応じた検知アルゴリズムである評価変数やパラメータを用いて異常デバイスを特定する。判定手法については、それぞれのパラメータに応じて上述した方法により行う。
Next, in S47, the
ここで、図17を参照して、異常デバイスとして特定する際の判定手法について説明する。1701、1702は、1201、1202の類型(所定の周期に同期して値が定常的なパターンで変化するデバイス)における異常デバイスのデータを示す。1711、1712が異常箇所を示す。このように、正常時と比較して、変化するはずの信号が変化しない場合や変化点がずれた場合、パルス幅が異なる場合などが発生したデバイスが存在すると当該デバイスを異常デバイスと特定することができる。CPU41aは、決定された検知アルゴリズムを用いることによって、正常時の変化から異なるデータを判別することができる。また、1703は、1203の類型(一定の値をとるデバイス)における異常デバイスのデータを示す。1713に示すように、一定値をとるはずの信号が変化しているため、異常デバイスと特定することができる。
Here, with reference to FIG. 17, a determination method for identifying the device as an abnormal device will be described. 1701 and 1702 show data of abnormal devices in the
1704は、1201、1202の類型(所定の周期に同期して値が定常的なパターンで変化するデバイス)など、同じ類型に分類された2つのデバイスの時系列データを用いて異常デバイスを特定するアルゴリズムを示す。当該アルゴリズムにおいて、所定周期に同期して変化するデバイスにおいて、2つのデバイスのそれぞれの値の変化点の時間間隔をチェックする。例えば、一方のデバイスでは1周期において2つの変化点(a1、a2)があり、他方のデバイスでは1周期において4つの変化点(b1、b2、b3、b4)があるとする。この場合において、各変化点の時間差がしきい値以内の値であるか否かを判定してもよい。詳細には、変化点a1と変化点b1〜b4それぞれとの時間差と、変化点a2と変化点b1〜b4のそれぞれとの時間差をそれぞれのしきい値と判定することにより異常デバイスかどうかを判断してもよい。この場合のパラメータは、変化点間の時間差それぞれのしきい値と、各変化点のタイミングと、各変化点のタイミングのしきい値となる。なお、この判定手法を利用して異常デバイスを特定する場合、2つのデバイスが異常デバイスとして特定される。
The 1704 identifies an abnormal device using time-series data of two devices classified into the same type, such as the
図16の説明に戻る。次に、S49でCPU41aは、S48の特定結果を出力し、処理を終了する。ここでは、まず生成部74が特定結果を表示するための表示データを生成し、当該表示データを基本ユニット3の表示部5や、外部装置に送信してその表示部に表示させる。ここで、表示データに基づく表示画面については図18を用いて後述する。
Returning to the description of FIG. Next, in S49, the
図18は、特定結果の表示例を示す。 FIG. 18 shows a display example of a specific result.
画面1800は、横軸に時間を示し、縦軸に異常デバイスの発生数を示す。生成部74は、特定結果に従って異常デバイスとして特定したデバイスと、その際の時系列データとから画面1800の表示データを生成する。プログラマブルロジックコントローラに異常が発生すると、設備が停止し、異常デバイスが増える傾向にある。従って、画面1800のような所定期間ごと(例えば、5分間隔など)の時間間隔ごとに異常デバイス発生数の累計を表示することで、オペレータはいつから異常が発生しているかを容易に認識することができる。
The
画面1810は、異常デバイスとして特定された各デバイスの状況を示す表示である。デバイスごとに異常が発生した時刻や異常の内容を表示する。異常の内容としては、異常と判断するに至った情報を表示する。例えば、デバイスAでは、一定値をとるデバイスにおいて、正常時の値が123であったのに対し、値が127に変化したために異常と判断していることが分かる。また、デバイスBでは、所定周期に同期して変化するデバイスにおいて、変化の間隔異常が発生したことを示す。
The
画面1820は、推定対象のデバイスの異常度を示す表示である。生成部74は、特定結果から、推定されたデバイスについてデバイスの異常度をランキング表示する表示データを生成する。つまり、画面1820では、異常の可能性が高い候補デバイスがデバイス名等で識別可能に表示される。なお、表示については、異常度に加えて、その異常内容や、デバイスの分類を表示してもよい。ここで、異常度とは、例えば発生した異常回数や所定のしきい値との差分の大きさにより決定される。つまり、異常度とは異常の大きさを示すものである。画面1820では、異常度の大きい順に表示している例を示しているが、発生時刻順などの条件でソートして表示してもよい。また、デバイスの分類手法に従ってソートしてもよいし、予めユーザによって選択された分類手法に係る異常の内容のみを表示するようにしてもよい。例えば、異常度は所定のしきい値を用いて以下の式により求めてもよい。
異常度=(現在値−平均値)/(しきい値−平均値)
つまり、現在値に従って次のように定義される。現在値が上限しきい値を上回っている場合は異常度が1以上となる。現在値が上限しきい値と等しい場合は異常度が1となる。現在値が平均値と等しい場合には異常度が0となる。現在値が下限しきい値と等しい場合には異常度が−1となる。現在値が下限しきい値を下回っている場合には−1となる。異常度については絶対値をとるようにしてもよい。また、比較対象の所定値と不一致である場合には一律に異常度1としてもよい。
The
Abnormality = (current value-average value) / (threshold value-average value)
That is, it is defined as follows according to the current value. If the current value exceeds the upper limit threshold value, the degree of abnormality is 1 or more. If the current value is equal to the upper limit threshold value, the degree of abnormality is 1. If the current value is equal to the average value, the degree of abnormality is 0. When the current value is equal to the lower limit threshold value, the degree of abnormality becomes -1. If the current value is below the lower threshold, it will be -1. The degree of anomaly may be taken as an absolute value. Further, when the value does not match the predetermined value to be compared, the degree of abnormality may be uniformly set to 1.
画面1830は、正常時と異常時のデバイスの信号を比較可能に表示した例である。画面1830に示すように、異常箇所を強調表示するようにすることが望ましい。図18の例では、異常箇所の信号付近を点線の枠で囲むように表示しているが、当該部分の信号を他の色と異なる色で表示してもよいし、当該部分を点滅表示してもよい。
The
<追加学習>
図21は、追加学習をする際の処理手順を示すフローチャートである。ここで、追加学習とは、図15を用いて説明した学習フェーズにおける学習とは異なるタイミングで、かつ追加的に行う学習処理である。そのタイミングについては、種々のタイミングが想定されるが、後述するように、推定フェーズにおいて所定のデバイスが正常であるにも関わらず異常と特定 された場合や、オペレータから指定されたタイミング、システムの経時変化に対応するための定期的なタイミングなどである。つまり、追加学習とは、S32で決定した異常デバイスを特定するためのパラメータ等の学習モデルを更新する必要のあるタイミングにおいて追加的に実施される学習である。以下で説明する処理は、拡張ユニット4aのCPU41aによって実現される。しかし、本発明を限定する意図はなく、それらの処理の一部が基本ユニット3や他の拡張ユニット4bで実行されてもよいし、或いはプログラマブルロジックコントローラに通信可能に接続された外部装置(分析装置)によって実行されてもよい。
<Additional learning>
FIG. 21 is a flowchart showing a processing procedure when performing additional learning. Here, the additional learning is a learning process that is additionally performed at a timing different from the learning in the learning phase described with reference to FIG. Various timings are assumed, but as will be described later, when a predetermined device is identified as abnormal even though it is normal in the estimation phase, or when the timing specified by the operator and the system It is a regular timing to respond to changes over time. That is, the additional learning is learning that is additionally performed at the timing when it is necessary to update the learning model such as the parameters for identifying the abnormal device determined in S32. The processing described below is realized by the
S201でCPU41a(収集部52c)は設定された収集設定に従って、装置が正常動作している時の収集対象となるデバイスの時系列データを収集する。収集対象のデバイスには、推定フェーズにおいて判定対象となる複数のデバイスが含まれる。また、推定フェーズにおいて判定対象とならないデバイスは収集対象のデバイスから除外されてもよい。たとえば、不定期で動作するデバイス(1204)に分類されたデバイスは、収集対象のデバイスから除外されてもよい。
In S201, the
ここで装置が正常動作している時の収集対象となるデバイスの時系列データとは、推定フェーズにおける判定結果が正常と判断するべきであるにもかかわらず異常と判断してしまうデバイスの時系列データである。たとえば学習フェーズにおいて学習が不十分であると、推定フェーズにおける判定結果が異常となり得る。したがって、CPU41aは、装置が正常動作しているにもかかわらず、収集対象となる時系列データの判定結果が異常となった場合に追加学習を実施してもよい。また、推定フェーズにおける判定結果が異常となり、異常発生時(いつもと違う状態)の時系列データが収集された場合であっても、その時系列データの中に正常動作している期間に対応する時系列データが含まれている場合には、そのような正常動作している期間に対応する時系列データもまた装置が正常動作している時の収集対象となるデバイスの時系列データに相当する。このとき、正常動作している期間に対応する時系列データに対する判定結果が異常となった場合にはその部分を用いて追加学習をするようにしてもよい。
Here, the time series data of the device to be collected when the device is operating normally is the time series of the device that is judged to be abnormal even though the judgment result in the estimation phase should be judged to be normal. It is data. For example, if learning is insufficient in the learning phase, the determination result in the estimation phase may be abnormal. Therefore, the
次に、S202でCPU41aは、追加学習の条件を満たされているかを判定する、つまり、追加学習のタイミングが到来したかを判定する。追加学習開始のタイミングとしては、例えば前回の学習処理から所定期間が経過したタイミングや所定量の時系列データが収集されたタイミング、オペレータからの指示を受け付けたタイミングである。また、追加学習開始のタイミングとしては、推定フェーズにおいて装置が正常動作中であると推定している所定のタイミングでもよく、推定フェーズにおいて装置が異常動作したと推定したタイミングでもよい。たとえば、装置の動作がたまに遅くなるが、その動作の遅さは正常範囲である場合や、装置の電源を再投入したときに、エアーの圧力が変わって動作時間が変わった場合(経時変化)など、1回の学習ではなく、時間を空けて更新(追加学習)することが、精度を上げるために有効な場合がある。
Next, in S202, the
S311でCPU41aは、収集対象に設定された複数のデバイスについて、各デバイスが推定フェーズにおいて判定対象であるか否かを判定する。CPU41aは、デバイスが判定対象であると判定するとそのデバイスについて追加学習を実施するためステップS312に移行し、デバイスが判定対象でないと判定するとそのデバイスについて追加学習を実施せずにステップS341に移行する。たとえば、CPU41aは、不定期で動作するデバイス(1204)に分類されたデバイスは判定対象でないと判定し、追加学習を実施せずにステップS341に移行する。
In S311 the
S312でCPU41aは、分類処理を実行する。分類処理は、例えば、電源を再投入した後、所定量の収集データが基本ユニット3のメモリカード44に格納された場合に、基本ユニット3からの指示に応じて拡張ユニット4aで行われる。格納された上記所定量の収集データは、追加学習の対象期間に収集された各デバイスの時系列データとなる。基本ユニット3は、メモリカード44に所定量の収集データが保存されたことを検知して、拡張ユニットに対して分類開始の指示を送ってもよい。また、電源を再投入した後、学習するのに十分なデータ量(所定数のスキャン周期の時系列データ)がバッファメモリ(第一バッファ37a)やメモリカード44などの記憶部に蓄積されたことを拡張ユニット4aが検知して開始してもよい。
In S312, the
具体的には、S312でCPU41aは、前回までに決定された類型と、そのデバイスについての時系列データの特徴量と、今回収集された分類対象の時系列データとに基づいて、分類対象のデバイスを自動的に分類する。たとえば、CPU41aは、前回までの学習により一定値をとるデバイス(1203)の類型に分類されていて、そのデバイスについて今回収集された正常動作時における時系列データがその一定値とは異なる値を含む場合には、不定期で動作するデバイス(1204)に分類を更新する。ここで、一定値をとるデバイス(1203)の特徴量は、その一定値が相当する。同様に、CPU41aは、前回までの学習により装置の動作サイクルに同期して動作するデバイス(1201)に分類されていて、そのデバイスについて今回収集された正常動作時における時系列データが前回学習時のものと異なるパターンを含む場合には、不定期で動作するデバイス(1204)に分類を更新する。ここで、装置の動作サイクルに同期して動作するデバイス(1201)の特徴量は、装置の動作サイクル内の波形の変化パターン、つまり、時系列データの変化パターンが相当する。なお 、分類が更新されるということは、更新された類型に応じて決まる検知アルゴリズムも更新されることとなる。また、更新された検知アルゴリズムに応じて、後述するS324やS334で対応するパラメータも更新される。
Specifically, in S312, the
なお、CPU41aは、分類対象の時系列データに基づいて、分類対象のデバイスを自動的に分類するが、これに加え、分類対象のデバイスに対する類型の設定を受け付けるようにしてもよい。分類対象のデバイスのうち、多くのデバイスは類型の変更は不要であり、また、変更が必要な類型についても、どのデバイスをどの類型に変更すべきかをオペレータが認識していることもあり得る。したがって、CPU41aは、オペレータの指定に応じて、分類対象のデバイスに対する類型の設定を受け付け、分類された類型を示すフラグ情報を当該分類対象のデバイスを示す識別情報に紐づけて格納する。あるいは、オペレータの指定に応じて、不定期で動作するデバイス(1204)に分類し、推定フェーズにおける判定対象外としてもよい。分類対象のデバイスに対する類型の設定は、CPU41aによる分類前に実行されてもよい。たとえば、複数の分類対象のデバイスのうち特定のデバイスについて、オペレータの指定に基づいて類型の設定が実行された場合は、予め類型が設定されたデバイスに対して、CPU41aによる分類対象の時系列データに基づく分類は実行されない。一方、複数の分類対象のデバイスうち上記特定のデバイスとは異なる他のデバイスに対して、CPU41aは、分類対象の時系列データに基づく分類を実行する。特に、前回までの学習によってデバイスの類型が決定していて、さらに追加の学習を実施する場合には、オペレータの指定に基づいて前回までの学習によってデバイスの類型に固定してもよく、変更が必要なデバイスについてオペレータの指定に基づいて前回までの学習によってデバイスの類型と異なる類型を決定してもよい。たとえば、異常デバイスを特定する際に使用されない類型を決定してもよい。
The
S321でCPU41aは、S312による再分類の中で前回までの学習により決定されたデバイスの類型が維持されたか否かを判定する。CPU41aは、前回までの学習により決定されたデバイスの類型が維持されたと判定すると、パラメータを決定するためにS322に移行する。一方、前回までの学習により決定されたデバイスの類型が維持されていない判定すると、即ちデバイスの類型が再分類されて更新されたと判定すると、S323に移行して、CPU41aは、分類処理の更新結果に基づいて、デバイスが推定フェーズにおいて判定対象か否かを判定する。CPU41aは、デバイスが判定対象であると判定するとそのデバイスについてパラメータを決定するためS324に移行し、デバイスが判定対象でないと判定するとS341に移行する。たとえば、CPU41aは、不定期で動作するデバイス(1204)に分類されたデバイスは判定対象でないと判定し、追加学習を中断してS341に移行する。
In S321, the
S322でCPU41aは、対象のデバイスについて既に決定されたパラメータと、対象のデバイスについて今回収集した正常動作時の時系列データとを用いて新たなパラメータを算出し更新し、S331に移行する。たとえば、前回までの学習により装置の動作サイクルに同期して動作するデバイス(1201)が決定され、そのデバイスの類型が維持された場合、CPU41aは、前回までの学習により決定された時系列データの任意の変化点間の時間のばらつきを示す上限のしきい値及び下限のしきい値と、今回収集した正常動作時の時系列データとに基づいて、新たな上限のしきい値及び下限のしきい値を算出して更新する。このように、今回収集した正常動作時の時系列データの任意の変化点間の時間と、上限のしきい値及び下限のしきい値とに基づいて、新たな上限のしきい値及び下限のしきい値が算出されて更新されることにより、今回収集した正常動作時の時系列データの任意の変化点間の時間のばらつきやしきい値からの乖離度合いに応じて更新後のしきい値の幅が広がったり狭まったりする。
In S322, the
S324でCPU41aは、今回収集した正常動作時の時系列データを用いて更新後の類型に対応するパラメータを算出して更新し、S331に移行する。ここで算出し決定されるパラメータは、図15のS32で決定されるパラメータと同じ算出方法であってもよい。たとえば、算出方法については平均値など様々な手法が適用され得るが、それぞれの時系列データに適した手法が選択される。また、これら決定されたパラメータについては、オペレータによって変更可能としてもよい。これにより、学習期間が短い場合に極端なパラメータが決定されたとしても調整可能とすることができる。
In S324, the
S331でCPU41aは、オペレータから各デバイスについて分類に対する修正入力を受け付けたか否かを判定する。たとえば、CPU41aは、オペレータの指定に応じて、分類対象のデバイスに対する類型の設定を受け付けて、分類された類型を修正することができ、CPU41aは、そのようなオペレータからの修正入力に基づく分類の修正があったか否かを判定する。CPU41aは、オペレータから各デバイスについて分類に対する修正入力を受付けていないと判断するとS333に移行する。
In S331, the
一方、オペレータから分類に対する修正入力を受け付けたと判断するとS332に進み、CPU41aは、オペレータの指定に応じて、設定した分類対象のデバイスに対する類型に対し、修正の適否を判定し、適すると判定すると、オペレータの指定に応じて設定された分類の類型への修正を反映する。つまり、CPU41aは、設定された分類の類型に対し、今回収集された正常動作時における時系列データが適合するか否かを判定する。また、CPU41aは、オペレータの指定に応じて設定された分類の類型が適さないと判定すると、適さない旨を報知するようにしてもよく、適さない旨を報知するとともに分類の再指定を促すようにしてもよい。たとえば、CPU41aは、オペレータの指定に応じて、一定値をとるデバイス(1203)の類型に分類されていて、今回収集された正常動作時における時系列データが一定値とは異なる値を含む場合には、オペレータが設定した類型は適合しないことを報知してもよく、当該デバイスを不定期で動作するデバイス(1204)に再分類してもよい。同様に、CPU41aは、オペレータの指定に応じて、装置の動作サイクルに同期して動作するデバイス(1201)に分類されていて、今回収集された正常動作時における時系列データが異なるパターンを含む場合には、オペレータが設定した類型は適合しないことを報知してもよく、当該デバイスを不定期で動作するデバイス(1204)に再分類してもよい。CPU41aは、S332の処理が終わると、修正後の分類に従うパラメータを決定するため再びS321に処理を戻す。
On the other hand, if it is determined that the correction input for the classification has been received from the operator, the process proceeds to S332, and the
S333で、CPU41aは、オペレータから各デバイスについてのパラメータの修正入力があったか否かを判定する。たとえば、CPU41aは、オペレータの修正入力に応じて、S322又はS324で更新されたパラメータを更に調整することができる。オペレータによるパラメータの修正指示を受け付けていないと判断した場合は、処理をS341に進める。一方、オペレータによるパラメータの修正指示があった場合は、S334でCPU41aは、オペレータの指定に応じて、設定した分類対象のデバイスに対するパラメータに対し、今回収集された正常動作時における時系列データが適合するか否かを判定する。CPU41aは、適すると判定すると、オペレータの指定に応じて設定されたパラメータへの修正を反映する。また、CPU41aは、オペレータの指定に応じて設定されたパラメータの修正が適さないと判定すると、適さない旨を報知するようにしてもよく、適さない旨を報知するとともにパラメータの再指定を促すようにしてもよい。なお、CPU41aは、S32と同様の算出手法でパラメータを算出してもよい。
In S333, the
続いて、S341でCPU41aは、学習対象の全てのデバイスに対して追加学習処理が完了したか否かを判定する。CPU41aは、学習対象のいずれかのデバイスに対して追加学習処理が完了していない場合は、未完了のデバイスについて追加学習処理をするためにS311に処理を戻す。一方、CPU41aは、学習対象の全てのデバイスに対して追加学習処理が完了すると、追加学習処理を終了する。
Subsequently, in S341, the
<変形例>
本発明は上記実施形態に限らず様々な変形が可能である。例えば、上記実施形態ではビットデバイスやワードデバイスの収集データについて分析して分類する例について説明したが、本発明はこのようなデバイス値のみ限定されない。例えば、収集データとしては、上記実施形態で説明した例に限らず、カメラ映像やイベントログなどの情報でもよい。
<Modification example>
The present invention is not limited to the above embodiment and can be modified in various ways. For example, in the above embodiment, an example of analyzing and classifying collected data of a bit device or a word device has been described, but the present invention is not limited to such device values. For example, the collected data is not limited to the example described in the above embodiment, and may be information such as a camera image or an event log.
図19は、収集データの変形例を示す。ここでは、収集データがカメラ映像(動画像)である場合について説明する。1901は、収集されるカメラ映像を示す。工場施設内の所定箇所を撮影した映像である。例えば、CPU41aは、これらのカメラ映像1901を複数の領域に分割し、当該領域内の輝度値を特徴量としてパラメータを決定してもよい。カメラ映像1901は、ベルトコンベア1904で複数の製品1905が等間隔で搬送される様子を示す。このような場合に、1902に示すように、所定領域1903内の輝度値が時間とともに変化することを利用して正常に動作しているか否かを判断することができる。例えば、カメラ映像1901の網掛け部分では、所定の時間間隔で製品が通過するため、当該製品の画像(輝度値)が定期的に割り込むことになる。そのような輝度値の変化を利用して、正常に製品が流れているか、或いは、複数の領域を監視することにより、製品がベルトコンベア上で斜行していないかを確認することができる。また、図19では製品の搬送経路を例に説明したが、例えばロボットが駆動している箇所を撮影し、当該ロボットのアームの動作に合わせて所定の画像領域に定期的にアーム部分の画像が割り込む場合などにもロボットが正常に動作しているかチェックすることができる。なお、カメラ映像についてはアナログ値をとるデバイスとして分類してもよい。
FIG. 19 shows a modified example of the collected data. Here, a case where the collected data is a camera image (moving image) will be described. 1901 shows the camera image to be collected. This is an image of a predetermined location in a factory facility. For example, the
<第2の実施形態>
以下では、本発明の第2の実施形態について説明する。上記第1の実施形態では、基本的にPLCが異常を示す場合、即ち、上記保存条件がプログラマブルロジックコントローラの異常時である場合の処理の流れについて主に説明した。しかし、既に記載しているように、本発明はPLCの異常発生をトリガにして異常デバイスを特定する特定機能に限らず、正常時の時系列データとの差分を分析する処理(分析機能)にも適用することができる。従って、本実施形態では、収集したデバイス値が正常時の時系列データから乖離した値(いつもと違うデバイス値)であるかを分析、検証する処理について説明する。なお、以下では、上記第1の実施形態と異なる部分についてのみ説明を記載する。
<Second embodiment>
The second embodiment of the present invention will be described below. In the first embodiment, the processing flow when the PLC basically shows an abnormality, that is, when the storage condition is an abnormality of the programmable logic controller has been mainly described. However, as already described, the present invention is not limited to the specific function of identifying an abnormal device by triggering the occurrence of an abnormality in PLC, but also in the process (analysis function) of analyzing the difference from the time series data at the normal time. Can also be applied. Therefore, in the present embodiment, a process of analyzing and verifying whether the collected device value is a value deviating from the time series data at the normal time (device value different from usual) will be described. In the following, only the parts different from the first embodiment will be described.
本実施形態においても、デバイス値の変化の特徴を抽出して分類し、分類したそれぞれの特徴に適切な異常(いつもと違う変化)の検知アルゴリズムを適用する。つまり、本実施形態においても、上記第1の実施形態と同様に、学習フェーズにおいて、正常時の時系列データからデバイス値を分類し、それぞれの類型に応じて検知アルゴリズムを決定するとともに、それぞれの検知アルゴリズムに応じた評価変数やパラメータを設定する。本実施形態においても、これらの学習フェーズは推定フェーズが実行される前に予め行われ、分類した類型を示すフラグ情報と、時系列データに対応するデバイスの識別情報が格納される。また、推定フェーズにおいては、推定対象の時系列データの類型に応じて決まる検知アルゴリズムを適用して分析することによって、いつもと違うデバイス値であるかを分析して検証する。 即ち、推定フェーズにおいて再度の分類処理は行われない。この場合、運用時における分類処理の処理不可や意図しない学習データの更新を避けることができる。なお、推定フェーズにおいても分類処理を行うようにしてもよい。この場合、すでに学習している正常時のデータに基づいて、新たに得られた時系列データのうち、正常とみなせるものを抽出し、新たに抽出された時系列データと、すでに学習している時系列データに基づき経時的な変化に対応して学習データを更新するようにしてもよい。たとえば、所定の周期に同期して値が定常的なパターンで変化するデバイスについて、新たに抽出された時系列データと、すでに学習している時系列データのばらつきに基づきパラメータに含まれるしきい値を更新してもよい。 Also in this embodiment, the characteristics of changes in device values are extracted and classified, and an appropriate abnormality (change different from usual) detection algorithm is applied to each of the classified characteristics. That is, also in the present embodiment, as in the first embodiment, in the learning phase, the device values are classified from the time series data at the normal time, the detection algorithm is determined according to each type, and each of them is used. Set evaluation variables and parameters according to the detection algorithm. Also in this embodiment, these learning phases are performed in advance before the estimation phase is executed, and flag information indicating the classified type and device identification information corresponding to the time series data are stored. In the estimation phase, a detection algorithm determined according to the type of time-series data to be estimated is applied and analyzed to analyze and verify whether the device value is different from usual. That is, the classification process is not performed again in the estimation phase. In this case, it is possible to avoid unprocessable classification processing and unintended update of learning data during operation. The classification process may also be performed in the estimation phase. In this case, based on the normally learned data, the newly obtained time series data that can be regarded as normal is extracted, and the newly extracted time series data and the already learned time series data are already learned. The learning data may be updated in response to changes over time based on the time series data. For example, for a device whose value changes in a steady pattern in synchronization with a predetermined period, the threshold value included in the parameter based on the variation between the newly extracted time series data and the time series data that has already been learned. May be updated.
図16を参照して、デバイス値がいつもと違うデバイス値であるか否か、すなわち、正常時のデバイス値と乖離しているか否かを検証する際の処理手順について説明する。以下で説明する処理は、基本ユニット3のCPU31及び拡張ユニット4aのCPU41aによって実現される。なお、上記第1の実施形態と異なる処理(S45)についてのみ説明を記載し、その他処理については説明を省略する。
With reference to FIG. 16, a processing procedure for verifying whether or not the device value is different from the usual device value, that is, whether or not the device value deviates from the normal device value will be described. The processing described below is realized by the
S45でCPU31は、第一バッファ37aに格納されたデバイス値を基本ユニット3のメモリカード44に保存する 保存条件が成立したか否かを判断する。ここで、上記第1の実施形態では当該保存条件がプログラマブルロジックコントローラで異常が発生した場合に成立する旨を説明した。しかし、本実施形態では、ユーザにより予め保存トリガとなるデバイスを指定しておき、当該デバイスに所定の変化があった場合、ユーザによる分析命令があった場合、定期的に監視する監視周期が経過した場合、基本ユニット3に接続される拡張ユニットから分析命令が発せられた場合、収集したデバイス値がいつもと違うデバイス値である場合など、当該保存条件が成立するように制御される。例えば、S43で前回と異なるデバイス値が発生した場合にS45で保存条件が成立したと判断し、特定処理へ進んでもよい。また、前回のデバイス値との差分(乖離程度)や正常時と異なるデバイス値の発生個数に応じて保存条件が成立するように制御してもよい。ユーザからの分析指示については、リアルタイムで特定のデバイスを分析、検証するように指示することが可能であるが、特定のデバイスの過去のデータを検証するように指示するものであってもよい。また、S47では、異常デバイスを特定するのではなく、正常時の時系列データからの乖離する異常状態を分析、検証することになる。
In S45, the
次に、図18を参照して、本実施形態に係る分析結果の表示例について説明する。形式的には上記第1の実施形態の特定結果と同様の表示となるが、本実施形態では異常デバイスを特定するのではなく、正常時の時系列データとの乖離が発生している状態(異常状態)を特定するものであり、それに応じて表示内容が変更される。 Next, a display example of the analysis result according to the present embodiment will be described with reference to FIG. Formally, the display is the same as the specific result of the first embodiment, but in this embodiment, the abnormal device is not specified, and a deviation from the time-series data at the normal time occurs ( (Abnormal state) is specified, and the displayed contents are changed accordingly.
従って、例えば画面1800では、デバイスの異常数ではなく、正常時の時系列データとの乖離が発生した回数を示す。異常度についても、デバイス異常が発生した回数を用いて求めるのではなく、上記本実施形態における異常状態が発生した回数、すなわち、正常時の時系列データとの乖離が発生した回数を用いて求めることが望ましい。
Therefore, for example, on the
<第3の実施形態>
以下では、本発明の第3の実施形態について説明する。上記第1及び第2の実施形態では、それぞれ特定機能、分析機能について説明した。本実施形態では、さらに、定期的にデバイス値を収集して監視する監視機能について説明する。なお、以下では、上記第1及び第2の実施形態と異なる部分についてのみ説明を記載する。
<Third embodiment>
Hereinafter, a third embodiment of the present invention will be described. In the first and second embodiments, the specific function and the analysis function have been described, respectively. In the present embodiment, a monitoring function for periodically collecting and monitoring device values will be described. In the following, only the parts different from the first and second embodiments will be described.
図20は、本実施形態に係る監視を開始するための監視開始信号を出力する処理手順を示すフローチャートを示す。以下で説明する処理は、基本ユニット3のCPU31によって実行される。しかし、本発明を限定する意図はなく、拡張ユニット4aのCPU41aによって実行されてもよい。
FIG. 20 shows a flowchart showing a processing procedure for outputting a monitoring start signal for starting monitoring according to the present embodiment. The process described below is executed by the
S51でCPU31は、監視周期が経過したか否かを判断する。監視周期は、プログラマブルロジックコントローラのオペレータ(管理者)が設定可能な値であり、任意の周期を設定することができる。設定された値については、例えば、記憶装置32の収集設定36aに設定される。監視周期が経過した場合はS53に進み、そうでない場合はS52に進む。
In S51, the
S52でCPU31は、ユーザから監視指示を受け付けたか否かを判断する。当該監視指示については、PC2aや基本ユニット3の操作部6を介したユーザ入力を通じて受け付けることができる。ユーザからの監視指示を受け付けた場合にはS53に進み、そうでない場合は処理をS51に戻す。
In S52, the
S53でCPU31は、監視開始信号を生成し、基本ユニット3へ出力して、処理を終了する。基本ユニット3は、当該監視開始信号を受信すると、図16のS46で保存条件が成立したと判断して、S47以降の処理を実行し、分析処理を実行する。ここで、S46の保存条件は監視開始信号を受信した直後に成立し、所定期間前から現在までにメモリカード44に保存されている時系列データを収集する。また、S46の保存条件は監視開始信号の受信後、所定の実行周期を経過した後に成立し、監視開始信号を受信してから所定期間の間にメモリカード44に保存されている時系列データを収集してもよい。あるいは、S46の保存条件は監視開始信号の受信後、所定の実行周期を経過した後に成立し、監視開始信号の受信前後の所定期間の間にメモリカード44に保存されている時系列データを収集してもよい。
In S53, the
これらの監視対象のデータについてはユーザ設定により選択することができる。なお、上記第2の実施形態と同様に、S48においては、異常デバイスを特定するのではなく、正常時の時系列データからの乖離する異常状態を分析、検証することになる。また、分析結果については、上記第2の実施形態と同様の表示が出力される。 The data to be monitored can be selected by user setting. As in the second embodiment, in S48, the abnormal device is not specified, but the abnormal state deviating from the time series data at the normal time is analyzed and verified. Further, the analysis result is output in the same manner as in the second embodiment.
<まとめ>
以上説明したように本実施形態に係るプログラマブルロジックコントローラは、ユーザプログラムを繰り返し実行する実行エンジンと、ユーザプログラムに従って実行エンジンによりアクセスされるデータを記憶する記憶領域である複数のデバイスを有するデバイスメモリとを備える。また、プログラマブルロジックコントローラは、ユーザプログラムのスキャン周期ごとに所定の収集設定に従って複数のデバイスのうち収集対象のデバイスで保持されているデータを収集し、収集された各デバイスの時系列データの特徴に基づいて、各デバイスを複数の類型のいずれかにそれぞれ分類し、各デバイスについて前記収集手段によって収集されたデバイスの時系列データ及び前記分類手段により当該デバイスが分類された類型に従って、異常デバイスを特定する際の検知アルゴリズムを決定する。また、前記収集手段によって収集されたデバイスの時系列データを、前記分類手段によって当該デバイスが分類された類型に従い、当該デバイスに対して前記決定手段によって決定された検知アルゴリズムを用いて分析することで異常デバイスを特定する。このように、本実施形態に係るプログラマブルロジックコントローラによれば、各デバイスに関連するデータの周期性や連続性などの特徴を分析して分類し、効率よく異常デバイスを特定することができる。
<Summary>
As described above, the programmable logic controller according to the present embodiment includes an execution engine that repeatedly executes the user program and a device memory having a plurality of devices that are storage areas for storing data accessed by the execution engine according to the user program. To be equipped. In addition, the programmable logic controller collects the data held by the device to be collected among a plurality of devices according to a predetermined collection setting for each scan cycle of the user program, and features the time-series data of each collected device. Based on this, each device is classified into one of a plurality of types, and an abnormal device is identified for each device according to the time series data of the device collected by the collecting means and the type in which the device is classified by the classification means. Determine the detection algorithm when doing so. Further, by analyzing the time series data of the device collected by the collecting means according to the type in which the device is classified by the classification means, the device is analyzed by using the detection algorithm determined by the determining means. Identify the anomalous device. As described above, according to the programmable logic controller according to the present embodiment, features such as periodicity and continuity of data related to each device can be analyzed and classified, and an abnormal device can be efficiently identified.
また、本プログラムコントローラは、さらに、ユーザ指示に応じて、決定された検知アルゴリズムを用いて、収集された各デバイスの時系列データを正常時の時系列データとの乖離を分析して異常が発生していないかを検証する。なお、このような分析機能については、所定の周期で定期的に行うようにしてもよい(監視機能)。 In addition, this program controller further analyzes the deviation of the collected time-series data of each device from the normal time-series data by using the determined detection algorithm in response to the user's instruction, and an abnormality occurs. Verify if not. It should be noted that such an analysis function may be performed periodically at a predetermined cycle (monitoring function).
また、本プログラマブルロジックコントローラは、所定数のスキャン周期の時系列データが蓄積されると、時系列データの特徴に基づいて、それぞれの時系列データを分類し、検知アルゴリズムを決定して更新する。このように、本発明によれば、プログラマブルロジックコントローラの動作中において定期的に学習フェーズに対応する機能が実行され、異常時の特定処理における精度を向上させることができる。 Further, when the time-series data of a predetermined number of scan cycles are accumulated, the programmable logic controller classifies each time-series data based on the characteristics of the time-series data, determines the detection algorithm, and updates the time-series data. As described above, according to the present invention, the function corresponding to the learning phase is periodically executed during the operation of the programmable logic controller, and the accuracy in the specific processing at the time of abnormality can be improved.
また、本プログラマブルロジックコントローラは、1以上のデバイスのグループにおいて、前回のスキャン周期において収集した値と、今回のスキャン周期において収集した値とが収集対象の前記グループの全てのデバイスで変化していなければ、今回のスキャン周期において収集した値を削除して、収集する時系列データを圧縮する。これによりメモリ資源を有効に活用することができる。 Further, in this programmable logic controller, in one or more groups of devices, the value collected in the previous scan cycle and the value collected in the current scan cycle must be changed in all the devices in the group to be collected. For example, the values collected in this scan cycle are deleted, and the time-series data to be collected is compressed. As a result, memory resources can be effectively used.
また、本プログラマブルロジックコントローラは、複数のデバイスのうち、少なくとも、一定の値をとるデバイスと、装置の動作サイクルに同期して値が定常的なパターンで変化するデバイスと、装置の動作サイクルは異なる周期に同期して値が定常的なパターンで変化するデバイスと、不定期で値が変化するデバイスと、アナログ値のデバイスと、値が単調増加又は単調減少するデバイスとに分類する。さらに、これらの分類に基づいて、特徴に基づく検知アルゴリズムを決定することにより、異常時において、効率よく異常デバイスを特定することができる。なお、不定期で値が変化するデバイスは特徴を抽出できないため、異常の特定には用いない。 Further, in this programmable logic controller, at least, among a plurality of devices, a device that takes a constant value and a device whose value changes in a steady pattern in synchronization with the operation cycle of the device have different operation cycles of the device. It is classified into a device whose value changes in a steady pattern in synchronization with a cycle, a device whose value changes irregularly, a device having an analog value, and a device whose value monotonically increases or decreases. Furthermore, by determining the detection algorithm based on the characteristics based on these classifications, it is possible to efficiently identify the abnormal device at the time of abnormality. Note that devices whose values change irregularly cannot extract features, so they are not used to identify abnormalities.
また、本プログラマブルロジックコントローラは、異常デバイスを特定する際に、決定された検知アルゴリズムと、該検知アルゴリズムに対応する時系列データの特徴とを比較して、差分が所定のしきい値を超える場合に、異常デバイスとして特定する。また、本プログラマブルロジックコントローラは、2つの時系列データにおけるそれぞれの値の変化点の時間差を、異常を特定する際の検知アルゴリズムとして決定し、2つの時系列データにおける時間差が所定の範囲内にない場合に、2つの時系列データに対応する2つのデバイスを、異常デバイスとして特定するようにしてもよい。このように、本発明によれば、分類した各類型に応じて、検知アルゴリズムを決定し、異常時においては、当該検知アルゴリズムを用いてそれぞれの類型にあった手法で異常デバイスを特定する。 Further, when the programmable logic controller identifies an abnormal device, it compares the determined detection algorithm with the characteristics of the time series data corresponding to the detection algorithm, and when the difference exceeds a predetermined threshold value. In addition, identify it as an abnormal device. Further, this programmable logic controller determines the time difference between the change points of the respective values in the two time series data as a detection algorithm when identifying an abnormality, and the time difference between the two time series data is not within a predetermined range. In some cases, the two devices corresponding to the two time series data may be identified as abnormal devices. As described above, according to the present invention, the detection algorithm is determined according to each of the classified types, and when an abnormality occurs, the abnormal device is identified by a method suitable for each type using the detection algorithm.
また、本プログラマブルロジックコントローラは、特定結果を示す表示データを作成し、当該プログラマブルロジックコントローラの表示装置に表示するか、又は、外部装置に送信する。表示画面としては、種々の表示画面により特定結果を表示することができる(図18)。 In addition, the programmable logic controller creates display data indicating a specific result and displays it on the display device of the programmable logic controller or transmits it to an external device. As the display screen, a specific result can be displayed on various display screens (FIG. 18).
また、上記実施形態では、プログラマブルロジックコントローラに含まれる拡張ユニット4aが時系列データを収集して分類し、分類に従って検知アルゴリズムを決定し、異常時においては異常デバイスを特定する例について説明した。しかし、本発明はこれに限定されず、基本ユニットや他の拡張ユニットによって上述した機能の少なくとも一部が実現されてもよい。さらに、プログラマブルロジックコントローラと通信可能に接続された分析装置(外部装置)が上述した機能を実現してもよい。
Further, in the above embodiment, an example in which the
発明は上記の実施形態に制限されるものではなく、発明の要旨の範囲内で、種々の変形・変更が可能である。 The invention is not limited to the above-described embodiment, and various modifications and changes can be made within the scope of the gist of the invention.
Claims (20)
前記ユーザプログラムに従って前記実行エンジンによりアクセスされるデータを記憶する記憶領域である複数のデバイスを有するデバイスメモリと、
前記ユーザプログラムの実行周期ごとに所定の収集設定に従って前記複数のデバイスのうち収集対象のデバイスで保持されているデータを収集する収集手段と、
前記収集手段によって収集された各デバイスの時系列データの特徴に基づいて、各デバイスを複数の類型のいずれかにそれぞれ分類する分類手段と、
各デバイスについて前記収集手段によって収集されたデバイスの時系列データ及び前記分類手段により当該デバイスが分類された類型に従って、当該デバイスを異常デバイスとして特定する際の検知アルゴリズムを決定する決定手段と、
前記収集手段によって収集されたデバイスの時系列データを、前記分類手段によって当該デバイスが分類された類型に従い、当該デバイスに対して前記決定手段によって決定された検知アルゴリズムを用いて分析することで異常デバイスを特定する特定手段と
を備えることを特徴とするプログラマブルロジックコントローラ。 An execution engine that repeatedly executes the user program,
A device memory having a plurality of devices, which is a storage area for storing data accessed by the execution engine according to the user program, and
A collection means for collecting data held by the device to be collected among the plurality of devices according to a predetermined collection setting for each execution cycle of the user program.
A classification means for classifying each device into one of a plurality of types based on the characteristics of the time series data of each device collected by the collection means.
For each device, a determination means for determining a detection algorithm for identifying the device as an abnormal device according to the time series data of the device collected by the collection means and the type in which the device is classified by the classification means.
Anomalous devices are analyzed by analyzing the time-series data of the devices collected by the collecting means according to the type in which the devices are classified by the classification means using the detection algorithm determined by the determining means for the devices. A programmable logic controller, characterized in that it comprises a specific means of identifying the.
前記決定手段は、前記分類手段によって分類された前記時系列データに従って、異常を特定する際の前記検知アルゴリズムを決定して更新することを特徴とする請求項1又は2に記載のプログラマブルロジックコントローラ。 When the time-series data of a predetermined number of scan cycles are accumulated by the collection means, the classification means classifies each time-series data based on the characteristics of the time-series data.
The programmable logic controller according to claim 1 or 2, wherein the determination means determines and updates the detection algorithm when identifying an abnormality according to the time-series data classified by the classification means.
前記追加学習判定手段により追加学習の条件が満たされたと判定すると、前記分類手段は、現在の各デバイスの前記類型と、前記収集手段よって追加学習の対象期間に収集された各デバイスの時系列データの特徴とに基づいて、各デバイスを複数の類型のいずれかにそれぞれ再分類し、前記決定手段は、各デバイスについて前記収集手段によって追加学習の対象期間に収集されたデバイスの時系列データと、前記分類手段により当該デバイスが再分類された類型又は現在の各デバイスの検知アルゴリズムとに従って、当該デバイスを異常デバイスとして特定する際の検知アルゴリズムを再決定する ことを特徴とする請求項8に記載のプログラマブルロジックコントローラ。 Further equipped with an additional learning determination means for determining whether or not the additional learning conditions are satisfied,
When it is determined that the additional learning condition is satisfied by the additional learning determination means, the classification means determines the type of each current device and the time series data of each device collected by the collection means during the target period of the additional learning. Each device is reclassified into one of a plurality of types based on the characteristics of the device, and the determination means includes time-series data of the devices collected by the collection means for each device during the target period of additional learning. The eighth aspect of claim 8, wherein the detection algorithm for identifying the device as an abnormal device is redetermined according to the type in which the device is reclassified by the classification means or the current detection algorithm of each device. Programmable logic controller.
前記特定手段は、前記2つの時系列データにおける前記時間差が所定の範囲内にない場合に、前記2つの時系列データに対応する2つのデバイスを、異常デバイスとして特定することを特徴とする請求項1乃至10の何れか1項に記載のプログラマブルロジックコントローラ。 The determination means determines the time difference between the change points of the respective values in the two time series data as a detection algorithm for identifying an abnormality.
The specific means is characterized in that when the time difference between the two time series data is not within a predetermined range, the two devices corresponding to the two time series data are specified as abnormal devices. The programmable logic controller according to any one of 1 to 10.
前記基本ユニットは、
前記実行エンジンと、前記デバイスメモリと、前記収集手段とを含み、
前記拡張ユニットは、
前記分類手段と、前記決定手段と、前記特定手段とを含むことを特徴とする請求項1乃至16の何れか1項に記載のプログラマブルロジックコントローラ。 Further equipped with a basic unit and an expansion unit connected to the basic unit,
The basic unit is
The execution engine, the device memory, and the collection means are included.
The expansion unit
The programmable logic controller according to any one of claims 1 to 16, further comprising the classification means, the determination means, and the specific means.
前記設定手段により設定された前記監視周期ごとに、監視を開始する監視開始信号を生成する生成手段と、
前記生成手段により生成された前記監視開始信号に応じて、前記収集手段により収集された各デバイスのうち分析対象となる時系列データ、及び、前記決定手段によって決定された前記検知アルゴリズムを用いて、前記分析対象となる時系列データを分析し、当該分析結果を表示部に出力する分析手段と
を備えることを特徴とする請求項1乃至17の何れか1項に記載のプログラマブルロジックコントローラ。 A setting means for setting the monitoring cycle of the device and
A generation means for generating a monitoring start signal for starting monitoring for each monitoring cycle set by the setting means, and a generation means for generating a monitoring start signal.
In response to the monitoring start signal generated by the generation means, the time-series data to be analyzed among the devices collected by the collection means and the detection algorithm determined by the determination means are used. The programmable logic controller according to any one of claims 1 to 17, further comprising an analysis means for analyzing the time-series data to be analyzed and outputting the analysis result to the display unit.
前記収集手段によって収集された各デバイスの時系列データを前記プログラマブルロジックコントローラから取得する取得手段と、
前記収集手段によって取得された各デバイスの時系列データの特徴に基づいて、各デバイスを複数の類型のいずれかにそれぞれ分類する分類手段と、
各デバイスについて前記収集手段によって収集されたデバイスの時系列データ及び前記分類手段により当該デバイスが分類された類型に従って、当該デバイスを異常デバイスとして特定する際の検知アルゴリズムを決定する決定手段と、
前記収集手段によって収集されたデバイスの時系列データを、前記分類手段によって当該デバイスが分類された類型に従い、当該デバイスに対して前記決定手段によって決定された検知アルゴリズムを用いて分析することで異常デバイスを特定する特定手段と、
前記特定手段による特定結果を出力する出力手段と
を備えることを特徴とする分析装置。 An execution engine that repeatedly executes the user program, a device memory having a plurality of devices that are storage areas for storing data accessed by the execution engine according to the user program, and a predetermined collection setting for each scan cycle of the user program. An analyzer that is communicably connected to a programmable logic controller comprising a collecting means for collecting data held by the device to be collected among the plurality of devices according to the above.
An acquisition means for acquiring time-series data of each device collected by the collection means from the programmable logic controller, and
A classification means for classifying each device into one of a plurality of types based on the characteristics of the time series data of each device acquired by the collection means.
For each device, a determination means for determining a detection algorithm for identifying the device as an abnormal device according to the time series data of the device collected by the collection means and the type in which the device is classified by the classification means.
Anomalous devices are analyzed by analyzing the time-series data of the devices collected by the collecting means according to the type in which the devices are classified by the classification means using the detection algorithm determined by the determining means for the devices. With specific means to identify
An analyzer comprising an output means for outputting a specific result by the specific means.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/126,209 US11982987B2 (en) | 2020-01-31 | 2020-12-18 | Programmable logic controller and analyzer |
CN202110127485.0A CN113204203A (en) | 2020-01-31 | 2021-01-29 | Programmable logic controller and analyzer |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020014970 | 2020-01-31 | ||
JP2020014970 | 2020-01-31 |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021125218A true JP2021125218A (en) | 2021-08-30 |
Family
ID=77459472
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020161926A Pending JP2021125218A (en) | 2020-01-31 | 2020-09-28 | Programmable logic controller and analyzer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021125218A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7550130B2 (ja) | 2021-10-26 | 2024-09-12 | 株式会社オービック | 異常検知装置、異常検知方法、異常検知プログラム及び基幹系情報システム |
-
2020
- 2020-09-28 JP JP2020161926A patent/JP2021125218A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7550130B2 (ja) | 2021-10-26 | 2024-09-12 | 株式会社オービック | 異常検知装置、異常検知方法、異常検知プログラム及び基幹系情報システム |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210240154A1 (en) | Programmable logic controller and analyzer | |
US10503146B2 (en) | Control system, control device, and control method | |
US10915419B2 (en) | Industrial control system, and assistance apparatus, control assist method, and program thereof | |
JP7406451B2 (en) | programmable logic controller | |
US10901398B2 (en) | Controller, control program, control system, and control method | |
JP2005243008A (en) | Diagnostic system, diagnostic method, tool and component | |
JP7450471B2 (en) | Programmable logic controller and PLC system | |
JP7275062B2 (en) | System, method and computer readable storage medium for anomaly detection in time-varying system behavior | |
CN112673326B (en) | Control device and storage medium | |
US12008072B2 (en) | Control system and control method | |
CN112612239A (en) | Programmable logic controller | |
JP2020047016A (en) | Control apparatus and control system | |
JP7413742B2 (en) | Prediction system, information processing device and information processing program | |
JP2021125218A (en) | Programmable logic controller and analyzer | |
JP7102801B2 (en) | Control system, control device and display device | |
US20220317650A1 (en) | Analysis apparatus, control method thereof, and analysis system | |
JP2021189482A (en) | Programmable logic controller | |
JP2020057289A (en) | Information processor, calculation method, and calculation program | |
US11516099B2 (en) | Resource monitoring system, resource monitoring method, and information storage medium | |
JP7450470B2 (en) | Setting device and PLC system | |
JP7524784B2 (en) | Information processing device, control system, and report output method | |
EP4254104A1 (en) | Device and program for collecting data | |
EP4361742A1 (en) | Prediction system, information processing device, and information processing program | |
JP6984786B1 (en) | System construction support program, system construction support method, and system construction support device | |
JP7461811B2 (en) | Programmable Logic Controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20210113 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230615 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240209 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240315 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240508 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240830 |