JPH0434386A - Method for correcting change in detection quantity of light of photoelectric sensor - Google Patents

Method for correcting change in detection quantity of light of photoelectric sensor

Info

Publication number
JPH0434386A
JPH0434386A JP2142573A JP14257390A JPH0434386A JP H0434386 A JPH0434386 A JP H0434386A JP 2142573 A JP2142573 A JP 2142573A JP 14257390 A JP14257390 A JP 14257390A JP H0434386 A JPH0434386 A JP H0434386A
Authority
JP
Japan
Prior art keywords
light
value
amount
distribution
average value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2142573A
Other languages
Japanese (ja)
Other versions
JP2973218B2 (en
Inventor
Tetsuya Akagi
哲也 赤木
Shinya Tamino
民野 真也
Seiji Imai
清司 今井
Yasuhiro Tsutsumi
堤 康弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2142573A priority Critical patent/JP2973218B2/en
Publication of JPH0434386A publication Critical patent/JPH0434386A/en
Application granted granted Critical
Publication of JP2973218B2 publication Critical patent/JP2973218B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

PURPOSE:To properly compensate the change in the detection quantity of light caused by the temp. characteristics of a light emitting element or the surface contamination of a lens, in a method for correcting the detection quantity of light of a photoelectric sensor, by determining the correction value of the detection quantity of light with due regard to a change in the distribution of measured values in addition to the mean value of the measured values of the detection quantity of light. CONSTITUTION:When the detection quantity of light of a photodetector is lowered by the surface contamination of the light lenses of a light emitting element 3 and a photodetector 5 in order to correct a change in the detection quantity of light of the photodetector 5, the gain of a variable gain amplifier 11 is made large. That is, the main value of the measured values of the detection quantity of light and the distribution range of said values become input and one of outputs after data processing becomes the gain for the amplification of the signal. When the distribution range of the measured values becomes larger than initial data or the previous one, the measuring number of times of the calculation of the mean value and the distribution range is increased in order to enhance the reliability as data and to prevent the generation of an oscillating phenomenon. Contrarily, when the distribution range of the measured values becomes smaller than the previous one, the measuring number of times of the calculation of the mean value and the distribution range is reduced.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、フォトカプラの如き光電センサの受光量変化
補正方法に関し、特に投光素子の発光効率の変化、レン
ズ面の曇り、汚れ等に起因する受光量変化を補正し、誤
動作を防止する受光量変化補正方法に関するものである
Detailed Description of the Invention (Industrial Field of Application) The present invention relates to a method for correcting changes in the amount of light received by a photoelectric sensor such as a photocoupler, and particularly to a method for correcting changes in light emitting efficiency of a light emitting element, clouding or dirt on a lens surface, etc. The present invention relates to a method for correcting changes in the amount of received light that are caused by changes in the amount of received light and prevents malfunctions.

(従来の技術) 発光ダイオード(LED)等による投光素子とフォトタ
イオード(P D)等による受光素子とを用い、投光素
子よりの光を受光素子が感知することにより無接触式に
物品等の移動、有無を検出するよう構成された光電セン
サはよく知られており、これは各種の広い分野にて用い
られている。
(Prior art) A light emitting element such as a light emitting diode (LED) and a light receiving element such as a photodiode (PD) are used, and the light from the light emitting element is sensed by the light receiving element, thereby allowing goods to be transported in a non-contact manner. Photoelectric sensors configured to detect the movement or presence of objects such as objects are well known and are used in a wide variety of fields.

光電センサの問題点として、温度変化により投光素子の
発光効率が変化することにより、或いは投光素子及び受
光素子のレンズ面に曇りが生じたり、ごみが付着するこ
とにより、更には振動等によって投光素子と受光素子と
の光軸にずれが生じる等により、受光素子が感知する光
量、即ち受光量が変化し、これによって受光回路に入力
される受光信号の大きさが変化することがあり、これは
誤作動を生じる原因になる。
Problems with photoelectric sensors include changes in the luminous efficiency of the light emitting element due to temperature changes, clouding or dust on the lens surfaces of the light emitting element and light receiving element, and even vibrations. Due to misalignment of the optical axes between the light emitting element and the light receiving element, the amount of light detected by the light receiving element, that is, the amount of light received, may change, which may change the magnitude of the light receiving signal input to the light receiving circuit. , this may cause malfunction.

上述の如き問題点に鑑みて、受光素子とは別に、モニタ
フォトダイオードを用いたAPC回路を組込み、これに
よって温度変化等による投光素子の発光効率の変化を補
償することが既に提案されており、また受光素子による
受光量を任意の回数に亘って計測してそれの平均値を求
め、これと前回又は初期データとの比較により受光量補
正値を見出し、これによって投光量もしくは受光側ゲイ
ンをフィードバック補償することが提案されている。
In view of the above-mentioned problems, it has already been proposed to incorporate an APC circuit using a monitor photodiode in addition to the light-receiving element, thereby compensating for changes in the luminous efficiency of the light-emitting element due to temperature changes, etc. In addition, the amount of light received by the light receiving element is measured an arbitrary number of times to find the average value, and by comparing this with the previous or initial data, a correction value for the amount of received light is found, and from this, the amount of light emitted or the gain on the light receiving side is determined. Feedback compensation has been proposed.

(発明が解決しようとする課題) モニタフォトダイオードを用いたAPC回路によるもの
は、投光素子の温度補償には有効であるが、しかしレン
ズ面の曇り、汚れ等に起因する受光量変化には対応でき
ず、これについては全く補償できない。
(Problem to be solved by the invention) An APC circuit using a monitor photodiode is effective in compensating the temperature of the light emitting element, but it is effective against changes in the amount of received light caused by fogging, dirt, etc. on the lens surface. We are unable to respond and cannot provide any compensation for this.

受光量の平均値をもとにフィードバック制御するものに
於ては、投光素子の温度補償に加えてレンズ面の曇り、
汚れ等による受光量変化が補償されるようになるが、し
かしただ単に平均値の比較だけで受光量変化補正制御が
行われると、受光量計測値のばらつきや急激な単発的な
変化に充分に対応できず、必ずしも適切な受光量変化補
正が行われない。
In devices that perform feedback control based on the average value of the amount of light received, in addition to temperature compensation of the light emitting element, fogging of the lens surface,
Changes in the amount of received light due to dirt, etc. will be compensated for, but if the change in received light amount is corrected by simply comparing average values, it will not be sufficient to compensate for variations in the measured value of the amount of received light or sudden, one-off changes. Therefore, appropriate correction for changes in the amount of received light is not necessarily performed.

また、平均値を求める計測回数の如何によっては計測値
のばらつきにより制御系が発振する虜れがあり、安定し
た補正を行うことが困難である場合がある。
Further, depending on the number of measurements to obtain the average value, the control system may oscillate due to variations in the measured values, and it may be difficult to perform stable correction.

本発明は、従来の受光量変化補正に於ける上述の如き問
題点に着目してなされたものであり、投光素子の温度特
性やレンズ面の汚れ等による受光量変化を総括した上で
、受光量変化を信頼性高く適確に補償でき、しかも計測
値のばらつきにより制御系が発振することがなく安定し
た補正が行われ、更には急激な単発的変化があっても、
それの頻度に応じて本来の変化に対する補正への支障を
極力小さくした上で信頼性の高い受光量変化補正を行う
受光量変化補正方法を提供することを目的としている。
The present invention was made by focusing on the above-mentioned problems in the conventional correction of changes in the amount of received light. Changes in the amount of received light can be compensated for accurately and reliably, and the control system will not oscillate due to variations in measured values, making stable corrections possible.Furthermore, even if there are sudden, one-off changes,
It is an object of the present invention to provide a method for correcting changes in the amount of received light, which performs highly reliable correction of changes in the amount of received light while minimizing interference with correction of the original changes according to the frequency of such changes.

(課題を解決するための手段) 」二連の如き目的は、本発明に於ては、光電センサの受
光素子の受光量を計測し、これの所定測定回数による平
均値と分布とを所定測定回数毎に検出し、今回の計測値
の平均値と前回の計測値の平均値とを比較すると共に今
回の計測値の分布と前記計測値の分布とを比較し、この
両比較により受光量変化を補償すべく受光量補正値を決
定することを特徴とする光電センサの受光量変化補正方
法によって達成される。
(Means for Solving the Problems) The purpose of the present invention is to measure the amount of light received by the light-receiving element of the photoelectric sensor, and to measure the average value and distribution based on a predetermined number of measurements. The detection is performed every number of times, and the average value of the current measurement value is compared with the average value of the previous measurement value, and the distribution of the current measurement value and the distribution of the measurement value described above are compared, and the change in the amount of received light is determined by comparing both. This is achieved by a method for correcting changes in the amount of light received by a photoelectric sensor, which is characterized by determining a correction value for the amount of light received to compensate for the change in the amount of light received by a photoelectric sensor.

また本発明による受光量変化補正方法に於ては、前記受
光素子の受光量の計測値が以前の計測値に比して大きく
異なる時には数計791(aを前記平均値の算出及び分
布に参加させないか或いは該計測値か前記平均値の算出
及び分布度数に与える重みを小さくし、以前の計測値に
比して大きく異なる計測値が計測される回数の増大に伴
い該計測値が前記平均値の算出及び分布度数に与える重
みを増大するようになっていてもよい。
Furthermore, in the method for correcting changes in the amount of received light according to the present invention, when the measured value of the amount of light received by the light receiving element is significantly different from the previous measured value, a total of 791 (a) is included in the calculation and distribution of the average value. Or, reduce the weight given to the calculation and distribution frequency of the average value of the measured value, so that as the number of times a measured value that is significantly different from the previous measured value increases, the measured value becomes the average value. The weight given to the calculation and distribution frequency may be increased.

また本発明による光電センサの受光量変化補正方法に於
ては、前記計測値の分布レンジが以前に比して拡大した
時には前記平均値及び分布を検出する計測回数を増大し
、前記分布レンジが以前に比して縮小された時には前記
平均値及び分布を検出する測定回数を減少するようにな
っていてよい。
Further, in the method for correcting changes in the amount of light received by a photoelectric sensor according to the present invention, when the distribution range of the measured values is expanded compared to before, the number of measurements to detect the average value and distribution is increased, and the distribution range is expanded. When the size is reduced compared to before, the number of measurements for detecting the average value and distribution may be reduced.

(作用) 本発明による光電センサの受光量変化補正方法によれば
、受光量の計測値の平均値の変化に加えて計測値の分布
の変化を考慮して受光量補正値が決定されるから、投光
素子の温度特性やレンズ面の汚れ等に起因する受光量変
化が適切に補償され得るようになる。
(Function) According to the method for correcting changes in the amount of light received by a photoelectric sensor according to the present invention, the correction value for the amount of light received is determined by taking into consideration changes in the distribution of the measured values in addition to changes in the average value of the measured values of the amount of light received. Therefore, changes in the amount of received light due to temperature characteristics of the light projecting element, dirt on the lens surface, etc. can be appropriately compensated for.

また、受光量の計測値が以前の計測値に比して大きく異
なる時には、即ち急激な単発的変化が生じた場合には、
これの頻度に応じて前記平均値及び計測値の分布度数が
更新され、急激な単発的変化が生じても本来の変化に対
する補正への支障を極力小さくした上で、このことに対
しても信頼性の高い受光量補正が行われるようになる。
In addition, when the measured value of the amount of light received differs greatly from the previous measured value, that is, when a sudden and one-off change occurs,
The distribution frequency of the average value and measured value is updated according to the frequency of this, and even if a sudden and one-off change occurs, the hindrance to correction for the original change is minimized, and this is also reliable. This allows for highly accurate received light amount correction.

また計測値の分布レンジの変化に応じて平均値を算出す
る計測回数が定められ、これにより計測値のばらつきに
起因して制御系が発振することが回避され、安定した補
正が行われるようになる。
In addition, the number of measurements to calculate the average value is determined according to changes in the distribution range of the measured values, which prevents the control system from oscillating due to variations in the measured values and ensures stable correction. Become.

(実施例) 以下に添付の図を参照して本発明を実施例について詳細
に説明する。
(Example) The present invention will be described in detail below with reference to the accompanying drawings.

第1図は本発明による光電センサの光電量変化補正方法
の実施に用いられる光電センサ及び受光量変化制御装置
の回路ブロック図である。
FIG. 1 is a circuit block diagram of a photoelectric sensor and a received light amount change control device used to implement a photoelectric amount change correction method for a photoelectric sensor according to the present invention.

第1図に於て、符号1は光電センサを示しており、光電
センサ1は投光素子3と受光素子5とにより構成されて
いる。投光素子3はパルス変調方式のLED等により構
成され、投光用回路7により駆動されて発光するように
なっている。受光素子5は、フォトダイオード等により
構成され、投光素子3よりの光を受けて光を電流に変換
し、電流信号を出力するようになっている。
In FIG. 1, reference numeral 1 indicates a photoelectric sensor, and the photoelectric sensor 1 is composed of a light projecting element 3 and a light receiving element 5. The light projecting element 3 is composed of a pulse modulation type LED or the like, and is driven by a light projecting circuit 7 to emit light. The light receiving element 5 is constituted by a photodiode or the like, receives light from the light projecting element 3, converts the light into current, and outputs a current signal.

受光素子5よりの電流信号はI/D変換器9に与えられ
て電圧値に変換される。この電圧信号は、一般に微弱で
あるため、増幅器11により増幅される。増幅器11は
受光量変化補正のためのゲイン調整のためにゲインを可
変設定できる可変ゲイン増幅器として構成されている。
The current signal from the light receiving element 5 is given to the I/D converter 9 and converted into a voltage value. Since this voltage signal is generally weak, it is amplified by the amplifier 11. The amplifier 11 is configured as a variable gain amplifier whose gain can be variably set for gain adjustment for correcting changes in the amount of received light.

受光素子5が感応する光は投光素子3よりのパルス変調
波であるために、可変ゲイン設定器11よりの電圧信号
は、ピークホールドのサンプルホールド回路13に与え
られてこれにて直流成分に変換され、この後にA/D変
換器15によってディジタル信号化されてCPU17に
人力される。
Since the light that the light-receiving element 5 is sensitive to is a pulse-modulated wave from the light-emitting element 3, the voltage signal from the variable gain setter 11 is applied to a peak-hold sample-hold circuit 13, which converts it into a DC component. The signal is then converted into a digital signal by the A/D converter 15 and input to the CPU 17.

また可変ゲイン増幅器11が出力する電圧信号は信号処
理回路19に与えられる。信号処理回路19は一般的な
光電センサに於ける信号処理回路と同様のものであって
よく、比較器による入光か非入光かの判別、ノイズフィ
ルタによるノイズ成分の除去等を行い、動作信号を出力
するものである。この動作信号19はCPU17にも人
力される。
Further, the voltage signal output from the variable gain amplifier 11 is given to a signal processing circuit 19. The signal processing circuit 19 may be similar to a signal processing circuit in a general photoelectric sensor, and performs operations such as determining whether light is incident or not using a comparator and removing noise components using a noise filter. It outputs a signal. This operation signal 19 is also input manually to the CPU 17 .

CPU17は、一般的構造のものであってよく、EEP
ROM21に格納されているオペレーションシステム、
プログラムに従って光電センサ1の受光量変化補正を行
うようになっている。尚、CPU17はA/D変換器1
5とEEPROM21とを内蔵した型式のものであって
もよい。
The CPU 17 may have a general structure, and may have an EEP
The operation system stored in ROM21,
Changes in the amount of light received by the photoelectric sensor 1 are corrected according to the program. In addition, the CPU 17 is the A/D converter 1
5 and an EEPROM 21 may be used.

CPU17は、光電センサ1の受光量変化補正のために
可変ゲイン設定器11にゲイン設定信号を出力し、また
アラーム信号を出力すると共にトリガ信号を人力するよ
うになっている。
The CPU 17 outputs a gain setting signal to the variable gain setter 11 to correct changes in the amount of light received by the photoelectric sensor 1, and also outputs an alarm signal and manually inputs a trigger signal.

受光素子5の受光量の変化を補正するためには、受光量
の計測値を逐次取込む必要があり、また受光量補正用、
換言すれば感度補正用の初期データとなる受光量の測定
値として、基準となり得る状態に於ける受光量の測定値
が必要である。基準となり得る状態は、光電センサが反
射光検出式のものと透過光検出式のもの等の違いによっ
て、第2図に示されている如く入光時の受光量が安定す
るライトオンのものと、第3図に示されている如く、遮
光時の受光量か安定するダークオンとの二通りかあるか
ら、安定して入光する状態をオン状態としてこのオン状
態時の受光量を=1測するようにする。より厳密に言う
ならは、例えばライトオンの場合にはオン時の最大受光
量を、ダークオンのものに於てはオフ時の最小受光量を
取込むようにハードウェア構成或いはソフトウェアにて
処理されれば、オフからオン、或いはオンからオフへ移
行する変化途中の光量変化が誤って感度補正用のデータ
として取入れられることがなくなる。またこの受光量測
定値の取込みタイミングが外部よりのゲートか掛けられ
なければ、難しい場合は、CPU17にトリ力信号を入
れ、これによってゲートを掛けるようにすればよい。
In order to correct changes in the amount of light received by the light receiving element 5, it is necessary to sequentially capture the measured value of the amount of light received, and also for correcting the amount of received light,
In other words, a measured value of the amount of light received in a state that can serve as a reference is required as a measured value of the amount of light received that serves as initial data for sensitivity correction. Depending on whether the photoelectric sensor is of a reflected light detection type or a transmitted light detection type, the conditions that can be used as a reference include the light-on condition in which the amount of received light is stable when light enters, as shown in Figure 2. As shown in Fig. 3, there are two ways of receiving light: the amount of light received when light is blocked, or the stable dark-on state, so the amount of light received in this on state is determined as = 1 measurement, assuming that the state where light is stably received is the on state. I'll do what I do. To be more precise, for example, in the case of light-on, the maximum amount of light received when it is on is taken, and in the case of dark-on, it is processed by the hardware configuration or software to take the minimum amount of light received when it is off. For example, changes in the amount of light during transition from off to on or from on to off will not be erroneously taken in as data for sensitivity correction. Furthermore, if the timing of taking in the measured value of the amount of received light cannot be applied by an external gate, if it is difficult, a tri-input signal may be input to the CPU 17, and the gate can be applied accordingly.

光電センサ1の受光素子5に於ける受光量の経詩的変化
を見るためには、所定回数の計測値の平均値の変化に加
えて計測値のばらつきによる変化の違いを見極めること
が行われる。このために必要なデータの処理の一例を次
に説明する。
In order to see historical changes in the amount of light received by the light receiving element 5 of the photoelectric sensor 1, it is necessary to determine the changes in the average value of the measured values a predetermined number of times as well as the differences in changes due to variations in the measured values. . An example of data processing required for this purpose will be described next.

先ず、比較基準となるための初期データを取入れる必要
があるので、例えば光電センサ1のセツティング直後、
又は何等かのトリガ入力後に、所定回数n回の受光量測
定値を取込む。つまり例えば、光電センサ1がn回に亘
ってオンするまで搬送ラインに物品を流すなどした受光
量計測値を取込む。
First, it is necessary to import initial data to serve as a comparison standard, so for example, immediately after setting the photoelectric sensor 1,
Alternatively, after inputting some trigger, the measured value of the amount of received light is captured a predetermined number of times. That is, for example, the measured value of the amount of light received is acquired when the article is passed through the conveyance line until the photoelectric sensor 1 is turned on n times.

そしてこのn回による受光量計測値の平均値とばらつき
幅、即ち分布レンジをCPU17にて算出し、これを初
期データとしてCPU17の内部メモリに格納しておく
Then, the CPU 17 calculates the average value and the variation width, that is, the distribution range, of the measured values of the amount of light received n times, and stores them in the internal memory of the CPU 17 as initial data.

次に実際の運転に移り、同じく受光量計測値をn回に亘
って逐次取入れ、受光量計測値をn回取終えた時点にて
上述の初期データと同様に、このn回の受光量計測値よ
り、これの平均値と分布レンジとを算出し、これと初期
データとを比較し、後述する要領にて受光量補正値を決
定し、これに基づいて可変ゲイン増幅器11ヘゲイン設
定信号を出力する。そして引続き次のn回に亘って受光
量計測値を順次取込んで、これの平均値と分布レンジと
を算出し、これと−回前に算出された平均値及び分布レ
ンジとを比較して受光量補正値を算出することを繰返す
Next, the actual operation begins, and similarly, the measured values of the amount of received light are taken sequentially n times, and when the measured values of the amount of received light are taken n times, the same as the initial data described above, the received light amount measurements are performed n times. From the value, calculate the average value and distribution range, compare this with the initial data, determine the received light amount correction value as described later, and output the gain setting signal to the variable gain amplifier 11 based on this. do. Then, the received light amount measurement values are sequentially acquired over the next n times, the average value and distribution range of these are calculated, and this is compared with the average value and distribution range calculated - times before. Calculating the received light amount correction value is repeated.

次に、光電センサの受光量変化を補正するための本発明
による受光量変化補正方法の処理アルゴリズムを第一の
実施例について説明する。
Next, a processing algorithm of a method for correcting changes in the amount of light received by the present invention for correcting changes in the amount of light received by the photoelectric sensor will be described with reference to a first embodiment.

受光素子5の受光量の変化を補正するために投光素子3
、受光素子5のレンズ面の汚れにより受光量が低下する
と、第1図に於ける可変ゲイン増幅器3のゲインを大き
くすることが行われる。つまり、受光量の計測値の平均
値及び分布レンジが人力であり、データ処理後の出力の
一つは信号増幅のためのゲインとなる。
The light emitting element 3 is used to correct changes in the amount of light received by the light receiving element 5.
When the amount of light received decreases due to dirt on the lens surface of the light receiving element 5, the gain of the variable gain amplifier 3 shown in FIG. 1 is increased. In other words, the average value and distribution range of the measured value of the amount of received light are determined manually, and one of the outputs after data processing becomes a gain for signal amplification.

また計測値の分布レンジが初期データ或いは以前のもの
より大きくなった場合、データとしての信頼度を上げ、
発振現象の発生を防止するために、平均値及び分布レン
ジ算出の計測回数を増やすことが好ましい状況が現われ
る。逆に、計測値の分布レンジが以前より小さくなった
場合には、平均値及び分布レンジ算出の計測回数を減ら
して受光量補正が行われる応答速度を速くし、効率を上
げた方がよい場合もある。このような場合のデータ処理
後の出力は平均値及び分布レンジ算出のための計測回数
ということになる。
In addition, if the distribution range of measured values is larger than the initial data or previous data, the reliability of the data will be increased,
In order to prevent the occurrence of an oscillation phenomenon, a situation arises in which it is preferable to increase the number of measurements for calculating the average value and distribution range. On the other hand, if the distribution range of measured values is smaller than before, it is better to reduce the number of measurements to calculate the average value and distribution range to speed up the response speed for correcting the amount of received light and increase efficiency. There is also. In such a case, the output after data processing is the average value and the number of measurements for calculating the distribution range.

ここで、人力データとしては、受光量計測値の平均値と
ばらつき等を述べたが、ここのデータの中には、例えば
センサの検出先軸上に、誤って異物が一瞬だけ通過して
光軸が遮られた時の如く、本来、平均値算出等のデータ
としては除くべきものが混入している場合がある。但し
これらのデータも、発生回数(出現回数)が増大してく
ると、処理データとしての信頼度を上げるために、それ
らに関する処理アルゴリズムも別途用意する必要が生じ
る。以降この処理を例外処理と呼ぶ。
Here, we have described the average value and dispersion of the measured value of the amount of received light as human data, but some of the data here also includes, for example, a foreign object that accidentally passes momentarily along the sensor's detection axis and causes light to emit light. As in the case where the axis is interrupted, there are cases where data that should originally be removed is included in the data for average value calculation, etc. However, as the number of occurrences (number of appearances) of these data increases, it becomes necessary to separately prepare processing algorithms for them in order to increase the reliability of the data as processed data. Hereinafter, this processing will be referred to as exception processing.

従って受光量変化を補正するための処理アルゴリズムと
しては、感度補正に関するものと、平均値及び分布レン
ジの算出のための計測回数の調整に関するものと、例外
処理に関するものの三−つがある。以下にこの各処理ア
ルゴリズムについて説明する。
Therefore, there are three processing algorithms for correcting changes in the amount of received light: those related to sensitivity correction, those related to adjustment of the number of measurements for calculating the average value and distribution range, and those related to exception handling. Each processing algorithm will be explained below.

◎感度補正に関する処理 第4図に示されている如(、n回に亘る受光量計測値の
はらつきが正規分布であったとすると、今回の計測値の
データと前回の計測値のデータとの関係は、第5図に示
されている如く、今回の計測値の分布レンジか前回の計
測値の分布レンジ内に納まらない場合と、第6図に示さ
れている如くそれが納まる場合とがある。
◎Processing related to sensitivity correction As shown in Figure 4, if the fluctuations in the measured values of the amount of light received over n times are normally distributed, the data of the current measured value and the data of the previous measured value are The relationship is as shown in Figure 5 when the current measured value does not fall within the distribution range of the previous measured value, and when it does fall within the distribution range as shown in Figure 6. be.

第5図に示されている如(今回の=I測値の分布レンジ
が前回のそれに完全には属していない場合は、今回の計
測値の平均値が前回の計測値の平均値のレベルにまで戻
るように、ゲイン調整が行われればよく、この時の計算
式は、現在のゲインをG、、 、補正後のゲインをG。
As shown in Figure 5 (if the distribution range of the current =I measurement value does not completely belong to the previous measurement value, the average value of the current measurement value will be at the level of the average value of the previous measurement value). It is only necessary to adjust the gain so that the gain returns to .The calculation formula at this time is G for the current gain, G for the gain after correction.

、前回の計測値の平均値をA。−2、今回の計測値の平
均値をA。とすれば、下式により示される。
, A is the average value of the previous measurement values. -2, the average value of the current measurement value is A. Then, it is shown by the following formula.

G、= (A、、−□/A、)Gn−1−(1)第6図
に示されている如く、今回の計測値の分布レンジが前回
の計測値の分布レンジに完全に属している場合には、計
測値の平均値自体が変化していても、それは単に許容ば
らつき内での変動ということが考えられるので、受光量
補正値、即ちゲイン補正量を第5図に示されている如き
場合に比して小さくすることが行われる。例えば、第5
図に示されている如き場合に比してそのゲイン調整量を
ほぼ半分に設定する場合には、ゲイン算出用の計算式は
下式により示される。
G, = (A,,-□/A,)Gn-1-(1) As shown in Figure 6, the distribution range of the current measurement value completely belongs to the distribution range of the previous measurement value. In this case, even if the average value itself of the measured values changes, it can be considered that this is simply a variation within the allowable variation. This is done to make the size smaller than in the case where there is. For example, the fifth
When the gain adjustment amount is set to approximately half that of the case shown in the figure, the calculation formula for calculating the gain is shown by the following formula.

G、 =0.5  (A、−t /A−) G−−t 
  ・”(2>従って、所定回数に於ける受光量計測値
の分布レンジの変化が、第5図に示されている如きパタ
ーンか、或いは第6図に示されている如きパターンかを
判別してゲイン補正量が設定され、これによってフィー
ドバック式に受光量補正が行われる。
G, =0.5 (A, -t /A-) G--t
・”(2> Therefore, it is determined whether the change in the distribution range of the received light amount measurement value at a predetermined number of times is a pattern as shown in FIG. 5 or a pattern as shown in FIG. 6. The gain correction amount is set, and the amount of received light is corrected in a feedback manner.

更に、可変ゲイン設定器11の可変ゲイン設定幅等の限
界から、これ以上の補正が不可能である場合には、CP
U17はアラーム信号を出力するようになっていればよ
く、これにより診断機能を持たせることが可能になる。
Furthermore, if further correction is not possible due to limitations such as the variable gain setting width of the variable gain setter 11, the CP
U17 only needs to output an alarm signal, which allows it to have a diagnostic function.

◎平均値算出及び分布レンジ算出のための計測回数の調
整に関する処理アルゴリズム 例えば、この計測回数が最小20回から最大50回まで
可変設定できるものとし、初期データ取込み時には、こ
れは35回に設定されているものとする。
◎Processing algorithm for adjusting the number of measurements for average value calculation and distribution range calculation For example, suppose that the number of measurements can be variably set from a minimum of 20 times to a maximum of 50 times, and at the time of initial data acquisition, this is set to 35 times. It is assumed that

今回の計測値の分布レンジが前回のものと同一であるな
らば、開側回数の35回は変更せず、分布レンジが零に
近付く程、計測回数が最低の20回に近付くように処理
を行う。逆に分布レンジが大きくなる場合は、例えば計
測値の分布レンジが前回のものの三倍になったとすると
、計測回数が最大の50回になるように設定しておき、
この分布レンジが大きくなるほど計測回数が増大するよ
うに処理を行う。この計測回数の決定のための計算式は
、前回の計測値の分布レンジをRn−1、今回の計測値
の分布レンジをR1,調整後の計測回数をnとすれば下
式により示される。
If the distribution range of the current measurement value is the same as the previous one, the open side number of 35 times will not be changed, and the closer the distribution range is to zero, the closer the measurement number will be to the lowest value of 20 times. conduct. On the other hand, if the distribution range becomes larger, for example, if the distribution range of measured values is three times that of the previous one, set the number of measurements to be the maximum of 50.
Processing is performed so that the larger the distribution range, the greater the number of measurements. The calculation formula for determining the number of measurements is given by the following formula, where the distribution range of the previous measurement value is Rn-1, the distribution range of the current measurement value is R1, and the number of measurements after adjustment is n.

R,<R,−1の場合 n = (R,、/ R,、−1) 15+20   
−(3)R7≧R,1の場合 n = (R,、/Rn−+ ) 7.5 +27.5
. −(4)但し、計測回数nは正の整数だけであるか
ら、上述の計算式に於て、nが有理数である場合には、
少数点以下が四捨五入されればよい。
If R,<R,-1, n = (R,,/R,,-1) 15+20
-(3) When R7≧R,1, n = (R,, /Rn-+) 7.5 +27.5
.. -(4) However, since the number of measurements n is only a positive integer, in the above calculation formula, if n is a rational number,
It is sufficient if the decimal point is rounded off.

また、受光量針#JMの分布ばらつきが所定値を超えて
増大した場合にはアラーム出力が行われてよく、これに
よって使用者に光電センサ1の受光量の大きい変動等を
知らせることができるようになる。
Furthermore, if the distribution variation of the received light amount needle #JM increases beyond a predetermined value, an alarm may be output, so that the user can be notified of large fluctuations in the amount of light received by the photoelectric sensor 1. become.

◎例外処理アルゴリズム ここでは例外処理の一例として、今回の計測値の分布レ
ンジR,,が前回の分布レンジR,,−1の三倍を超え
る計測値を例外処理の対象とする。この例外処理は上述
の如き例外処理の対象となる計測値が出現する回数が少
ない程無視し、これが多くなる程補正用データとしての
重み付けを大きくする。
Exception Processing Algorithm Here, as an example of exception processing, a measurement value whose distribution range R, , of the current measurement value exceeds three times the previous distribution range R, , -1 is subjected to exception processing. This exception handling is ignored as the number of occurrences of the measurement value subject to the above-mentioned exception handling is small, and the larger the number of occurrences of the measurement value, the greater the weighting as correction data.

この場合、詳細には、前記受光素子5の受光量の計測値
か以前の計測値に比して大きく異なる時には該計測値を
前記平均値の算出及び分布に参加させないか、或いは該
計測値が前記平均値の算出及び分布度数に与える重みを
小さくし、以前の計測値に比して大きく異なる計測値が
計測される回数の増大に伴い該計測値が前記平均値の算
出及び分布度数に与える重みを増大する。
In this case, in detail, when the measured value of the amount of light received by the light receiving element 5 is significantly different from the previous measured value, the measured value is not included in the calculation and distribution of the average value, or the measured value is The weight given to the calculation of the average value and the distribution frequency is reduced, and as the number of times a measurement value that is significantly different from the previous measurement value increases, the weight given to the calculation of the average value and the distribution frequency is increased. Increase weight.

次に例外処理の対象となる計測値の出現回数が多くなる
程、そのものの値で計算し、回数が少ない程、小さく加
工して処理し、また例外対象の計測値の出現回数の度合
により、例外対象の計測値の(Yト均値を後に全体の計
測データに加える時の重み付けを変える方法の計算例を
以下に示す。尚、この計算例に於ては、n回の31測中
にに個の例外対象の計測値Eがあったとする。
Next, as the number of occurrences of the measurement value subject to exception processing increases, calculations are performed using that value, and as the number of occurrences decreases, it is processed to be smaller. A calculation example of how to change the weighting when the (Y) average value of the measurement value of the exception is later added to the overall measurement data is shown below.In addition, in this calculation example, Assume that there are measured values E of exceptional objects.

[E > A−、−1+3 Rn−1の場合]Ae= 
[(E+ +E2 +−z* )/k(A、−+ +3
R,−t )l  (k/n)1+ (A、、+3R,
i )     ”’(5)ΣE =A e 争k Φ
(k/ n)       −(f3)、’、An= 
(ΣE+ΣM)/ (k  (k/n)+(n−k)!
         ・・・(7)但し、ΣE:例外対象
以外の計測値の和この時、+R=A e −R=3R,,内の計測値の最小値 [E<A、−13Rn−+の場合] Ae=(An−+  3Rn−t)   [((A7−
1−3Rn−! )−(E□+E2+−Ek)/k) 
 (k/n)]       ・・・(8)ΣE=Ae
−k ・ (k/n)      −(9)、’、An
= (ΣE+ΣM)/ fk (k/n)+(n−k)
)        ・・・(10)この時、+R=3R
,を内の計測値の最大値−R=Ae (5)及び(8)式は、例外対象の計測値Eの前回の計
測値分布レンジからの偏差の平均値に(k/a)を掛け
ることにより、例外対象の計測値の出現回数kが多くな
る程、そのものの値に近付くように計算を行っている。
[In the case of E > A-, -1+3 Rn-1] Ae=
[(E+ +E2 +-z*)/k(A,-+ +3
R, -t )l (k/n)1+ (A,, +3R,
i ) ”'(5) ΣE = A e dispute k Φ
(k/n) −(f3),', An=
(ΣE+ΣM)/(k (k/n)+(n-k)!
...(7) However, ΣE: Sum of measured values other than exceptions In this case, the minimum value of measured values within +R=A e -R=3R, [If E<A, -13Rn-+] Ae=(An-+ 3Rn-t) [((A7-
1-3Rn-! )-(E□+E2+-Ek)/k)
(k/n)] ...(8)ΣE=Ae
-k ・(k/n) -(9),', An
= (ΣE+ΣM)/fk (k/n)+(n-k)
)...(10) At this time, +R=3R
, the maximum value of the measured value within -R=Ae (5) and (8), the average value of the deviation of the measured value E of the exception from the previous measured value distribution range is multiplied by (k/a). As a result, as the number of occurrences k of the measurement value of the exception object increases, the calculation is performed so that the value approaches the value of the measurement value of the exception.

尚、例外対象の計測値Eの出現回数kに対する重み付け
の度合を変えたい場合には、(k / n )をべき乗
する等の処理が行われればよい。
Note that if it is desired to change the degree of weighting on the number of occurrences k of the measurement value E of the exception, processing such as raising (k/n) to a power may be performed.

(6)式及び(9)式は、例外対象の計測値Eの全体の
和を求めたものであるが、これの個数kに(k/n)を
掛けることにより、例外対象の計測値Eのデータの個数
kが多くなる程、実測値に近付き、これが少ない程無視
(軽視)される確率が高まるようにしている。
Equations (6) and (9) calculate the total sum of the measured values E of the exception, but by multiplying the number k by (k/n), the measured value E of the exception The larger the number k of data, the closer it becomes to the actual measured value, and the smaller the number, the higher the probability that it will be ignored (disregarded).

(7)式及び(【0)式は、以上の処理に於て、例外対
象の計測値Eを処理した後の計測値全体の重み付けの平
均値を表わしている。
Equations (7) and (0) represent the weighted average values of all measured values after processing the measured value E of the exception in the above processing.

尚、例外対象の計測値が所定値を超えて多く出現する場
合には、アラーム出力が行われればよく、これにより外
的環境の変化を使用者に知らせることができるようにな
る。
It should be noted that if the measured value of the exception object appears more than a predetermined value, an alarm may be output, thereby making it possible to notify the user of a change in the external environment.

次に上述の如き受光量変化補正の処理をファジィ推論を
用いて行う場合について説明する。
Next, a case will be described in which the process of correcting the change in the amount of received light as described above is performed using fuzzy inference.

ファジィ推論が用いられることにより、処理アルゴリズ
ム体系が、簡易で、理解され易くなり、また状況に適合
した処理を汎用的に組込むことが可能になり、且つ応答
性を向上させることができる。
By using fuzzy inference, the processing algorithm system becomes simple and easy to understand, it becomes possible to universally incorporate processing suitable for the situation, and responsiveness can be improved.

ファジィ推論を用いた受光量変化補正のための処理アル
ゴリズムについても、上述の実施例と同様に、感度補正
と計測回数調整と例外処分に分けて説明する。
The processing algorithm for correcting changes in the amount of received light using fuzzy inference will also be explained separately into sensitivity correction, measurement frequency adjustment, and exception handling, similar to the above-described embodiment.

◎感度補正に関するファジィ推論アルゴリスム感度補正
に関するファジィ推論ルールの一例を(10)〜(15
)式に示す。
◎Fuzzy inference algorithm related to sensitivity correction Examples of fuzzy inference rules related to sensitivity correction are shown in (10) to (15).
) is shown in the formula.

このファジィ推論に於ける入力要件は、受光量の計測値
の平均値A。と今回の受光量の計測値の全てが前回の計
測値のばらつき集合(分布レンジ)内に全て含まれるか
否かの判断データであり、出力はゲイン変化率ΔGであ
る。
The input requirement for this fuzzy inference is the average value A of the measured values of the amount of received light. This is data for determining whether or not all of the measured values of the amount of light received this time are all included within the dispersion set (distribution range) of the previous measured values, and the output is the gain change rate ΔG.

IfA、=NL and  An±R,<A、−、±R,,−。IfA,=NL and An±R,<A,-,±R,,-.

then  ΔG=PL  ・(11)If  A、=
NL and  An ±R,(:A、、l−1±Rn−1t
hen  ΔG=PM  ・(12)If   A、=
ZR t hen  ΔG−ZR・ (13)If   A、
、=PL nd  An ±R,仁A、−t  ±R,−1the
n  ΔG=NM  ・ (14)If   A、、=
PL and  An ±R,,l<A、、−、±R0−1t
hen  ΔG=NL  ・(15)(11)式と([
5)式に示されたファジィ推論ルールに於ては、今回の
受光量の計測値が前回の受光量計測値のばらつき範囲を
超えているので、そのまま平均値が前回の値に戻るよう
にゲイン調整によるフィードバック制御を行い、(12
)式と(14)式にて示されたファジィ推論ルールに於
ては、今回の受光量の計測値か前回の受光量の計測値の
ばらつき範囲内に全であるのでゲイン変化率を小さくし
、少めにフィードバック制御を行う。
then ΔG=PL ・(11) If A,=
NL and An ±R, (:A,, l-1±Rn-1t
hen ΔG=PM ・(12) If A,=
ZR then ΔG−ZR・ (13) If A,
,=PL nd An ±R, Ren A, -t ±R, -1the
n ΔG=NM ・ (14) If A,,=
PL and An ±R,,l<A,,-,±R0-1t
hen ΔG=NL ・(15) (11) and ([
5) In the fuzzy inference rule shown in equation 5, since the current measured value of the received light amount exceeds the variation range of the previous measured value of the received light amount, the gain is set so that the average value returns to the previous value. Feedback control is performed by adjustment, and (12
In the fuzzy inference rules shown in equations ) and (14), the rate of change in gain is made smaller because the measured value of the amount of received light is all within the variation range of the measured value of the amount of received light last time. , performs a little feedback control.

尚、例えば、(11)式のファジィ推論ルールの場合、
[平均値がかなり大きく低下し、しかも今回の計測デー
タが前回の計測データのばらつきの範囲を超していれば
、ゲインをかなり大きくせよ」という命令を意味してい
る。
For example, in the case of the fuzzy inference rule of equation (11),
[If the average value has decreased considerably and the current measurement data exceeds the range of dispersion of the previous measurement data, increase the gain considerably.''

第7図は受光量計測値の平均値A1の人力メンバーシッ
プ関数を、第8図はゲイン変化率ΔGの出力メンバーシ
ップ関数を示している。例えば、8ビツトCPUにて処
理を行う場合、受光量計測値の平均値A、の最小値(N
L)は1で、最大値(P L)は256となり、また平
均値の変化が殆ど無い場合(ZR)の値は前回の平均値
A。−1となる。
FIG. 7 shows the manual membership function of the average value A1 of the measured values of the amount of received light, and FIG. 8 shows the output membership function of the gain change rate ΔG. For example, when processing is performed using an 8-bit CPU, the minimum value (N
L) is 1, the maximum value (PL) is 256, and the value when there is almost no change in the average value (ZR) is the previous average value A. -1.

ゲイン変化率ΔGのメンバーシップ関数は、計測値の平
均値が変化しても、補正後、確実に前回の計測値の平均
値に戻るように現在のゲインに対する変化率の値として
、NL、ZR,PLの値を設定する。
The membership function of the gain change rate ΔG is defined as NL, ZR as the value of the change rate with respect to the current gain so that even if the average value of the measured values changes, it will reliably return to the average value of the previous measured value after correction. , PL.

◎計測回数の調整に関するファジィ推論アルゴリズム 計測値の平均値及び分布レンジを算出する計測回数の調
整に関するファジィ推論ルールの一例を(16)〜(■
8)式に示している。
◎Fuzzy inference algorithm for adjusting the number of measurements An example of a fuzzy inference rule for adjusting the number of measurements to calculate the average value and distribution range of the measured value is shown in (16) to (■
8) It is shown in the formula.

If  R1,/R,、、=NL then  Δn = N L   ・= (16)I
f  R,/R,、、=ZR then  Δn = Z R=(17)If  R,
/R,1,=PL then  Δn =P L   =(18)このファ
ジィ推論ルールに於ける入力要件は前回の計測値の分布
レンジR1−1に対する今回の計測値の分布レンジR,
の比(R,、/R,、、)であり、出力は計測回数の調
整度数としての変化量Δnである。これは現在の計測回
数から、計測回数を何回増やすか、或いは何回減らすか
を表わす。
If R1, /R,,,=NL then Δn = NL ・= (16) I
f R, /R,, = ZR then Δn = Z R = (17) If R,
/R, 1, = PL then Δn = PL = (18) The input requirements for this fuzzy inference rule are the distribution range R of the current measurement value relative to the distribution range R1-1 of the previous measurement value,
The output is the amount of change Δn as the adjustment frequency of the number of measurements. This indicates how many times to increase or decrease the number of measurements from the current number of measurements.

尚、例えば、(16)式に示されたファジィ推論ルール
の場合、「今回の計測データの分布レンジが前回のそれ
より、かなり小さければ、計測回数をかなり少なくせよ
」という命令であり、(17)式は、分布レンジの変化
が殆ど無いので、計測回数は変化させず、(18)式は
、分布レンジの変化がかなり大きいので計測回数をかな
り増やせということを意味する。つまり、分布レンジが
大きくなる程に計測回数を増やすようにファジィ推論ル
ールが設定されている。
For example, in the case of the fuzzy inference rule shown in equation (16), the command is ``If the distribution range of the current measurement data is considerably smaller than that of the previous one, reduce the number of measurements considerably'', and (17 Equation (18) means that the number of measurements should be increased considerably because the change in the distribution range is quite large. In other words, the fuzzy inference rule is set so that the number of measurements increases as the distribution range becomes larger.

第9図は分布レンジ比R,/R,,の入力メンバーシッ
プ関数を示している。分布レンジ比の最小値(NL)は
R7=0より0になり、殆ど変化しない場合(Z R)
は1になる。また最大値(PL)については、例えば前
回の分布レンジRn−1の二倍位に設定する。尚、この
最大値については、アプリケージタンに応じて最適値が
設定されればよい。第10図は計測回数の調整度合Δn
を示す出力メンバーシップ関数を示している。調整度合
Δnに関しては、この場合、NL=−15、ZR冨0、
PL=15に設定している。
FIG. 9 shows the input membership functions of the distribution range ratios R, /R, . The minimum value (NL) of the distribution range ratio becomes 0 from R7=0, and there is almost no change (Z R)
becomes 1. Further, the maximum value (PL) is set to, for example, twice the previous distribution range Rn-1. Note that this maximum value may be set to an optimum value depending on the application rate. Figure 10 shows the adjustment degree Δn of the number of measurements.
shows an output membership function that shows . Regarding the adjustment degree Δn, in this case, NL=-15, ZR value 0,
PL is set to 15.

◎例外処理に関するファジィ推論アルゴリズム例外処理
に於ける感度補正のファジィ推論ルールの一例を(19
)〜(23)式に示している。
◎Fuzzy inference algorithm for exception handling An example of fuzzy inference rules for sensitivity correction in exception handling (19
) to (23).

このファジィ推論に於ける入力要件は、例外と見做され
る計測値、例えば前回の計測値の分布レンジの範囲の二
倍を超える計測値の平均値Aeと、その例外対象の計測
値の出現回数にであり、出力はゲイン変化率ΔG2であ
る。このゲイン変化率ΔG2は、上述の感度補正による
ゲイン調整後に行われるものである。従って、この場合
、上述の感度補正のゲイン変化率ΔGはこの例外対象の
計測値による補正成分を含んでいないものとする。
The input requirements for this fuzzy inference are the average value Ae of measured values that are considered to be exceptions, such as the average value Ae of measured values that exceed twice the distribution range of the previous measured value, and the occurrence of the measured value that is the exception. The output is the gain change rate ΔG2. This gain change rate ΔG2 is determined after the gain adjustment by the sensitivity correction described above. Therefore, in this case, it is assumed that the gain change rate ΔG of the sensitivity correction described above does not include a correction component due to the measured value of this exception.

If  Ae=PL  and  k=PLthen 
 ΔG2=NL    −(19)If  Ae=PL
  and  k=NLthen  ΔG2=ZR・(
20) If  Ae=ZR then  ΔG2=ZR・(21,)If  Ae=
NL  and  k=NLthen  ΔG2=ZR
−(22) If  Ae=NL  and  k=PLthen 
 ΔG2=PL    ・(23)このファジィ推論ル
ールに於ては、例外対象の計測値の平均値Aeが大きい
程、ゲインを小さ(するように補正するが、その時に、
この例外対象の計測値の出現回数kが小さい程、その補
正の大きさを小さくしている。つまり、例外対象の計測
値の出現回数kが小さい程、例外対象の計測値による影
響を小さくするようにしている。尚、例えば、(19)
式に示されたファジィ推論ルールの場合、「例外対象の
計測値の平均値がかなり大きく、その出現回数もかなり
大きいようであるならば、かなり大きくゲインを下げよ
」という命令となる。
If Ae=PL and k=PLthen
ΔG2=NL − (19) If Ae=PL
and k=NLthen ΔG2=ZR・(
20) If Ae=ZR then ΔG2=ZR・(21,) If Ae=
NL and k=NL then ΔG2=ZR
−(22) If Ae=NL and k=PLthen
ΔG2=PL ・(23) In this fuzzy inference rule, the larger the average value Ae of the measured values of the exception, the smaller the gain (corrected to be), but at that time,
The smaller the number k of appearances of the measurement value of this exception, the smaller the magnitude of the correction. In other words, the smaller the number of appearances k of the measurement value of the exception, the smaller the influence of the measurement value of the exception. For example, (19)
In the case of the fuzzy inference rule shown in the formula, the command is ``If the average value of the measured values of the exception is quite large and the number of occurrences thereof is also quite large, reduce the gain by a considerable amount.''

このファジィ推論により、たとえ突発的な異常な計測値
があったとしても確実な光量補正が可能になる。
This fuzzy reasoning makes it possible to reliably correct the amount of light even if there is a sudden abnormal measurement value.

第11図は例外対象の計測値の平均値Aeの入力メンバ
ーシップ関数を、第12図は例外対象の計測値の出現回
数にの人力メンバーシップ関数を、第13図はゲイン補
正率ΔG2の出力メンバーシップ関数を各々示している
。尚、第11図に示された入力メンバーシップ関数と第
14図に示された出力メンバーシップ関数に関しては、
前述の感度補正に関するファジィ推論のアルゴリズム時
に於ける入力メンバーシップ関数と出力メンバーシップ
関数と同じである。例外対象の計測値の出現回数kに於
て、最小値(NL)は全く出現しなかった場合であり、
これは零である。最大値(P L)は、その時の最大計
測回数になり、その中間値位をZRとする。この回数に
関する重み付けを変えたい時はZRO値が操作されれば
よい。
Fig. 11 shows the input membership function of the average value Ae of the measured values of the exception, Fig. 12 shows the manual membership function of the number of occurrences of the measured value of the exception, and Fig. 13 shows the output of the gain correction factor ΔG2. The membership functions are shown respectively. Regarding the input membership function shown in FIG. 11 and the output membership function shown in FIG. 14,
This is the same as the input membership function and output membership function in the fuzzy inference algorithm for sensitivity correction described above. The minimum value (NL) is the case where the measured value of the exception does not appear at all in the number of occurrences k,
This is zero. The maximum value (PL) is the maximum number of measurements at that time, and its intermediate value is ZR. If it is desired to change the weighting regarding this number of times, the ZRO value may be manipulated.

尚、この例外処理に関するファジィ推論アルゴリズムと
感度補正に関するファジィ推論アルゴリズムとを組合せ
、ファジィ推論が、例えば「光量変化がかなりあるが、
例外対象の計測値の可能性も若干含んでいるので、少し
大きく感度を変化させろ」という如きファジィ推論に従
って行われるようにしてもよい。
By combining the fuzzy inference algorithm related to exception handling and the fuzzy inference algorithm related to sensitivity correction, fuzzy inference can be used to calculate, for example, ``There is a considerable change in the amount of light,
This may be done according to fuzzy reasoning such as "Since there is a slight possibility that the measured value is an exception, the sensitivity should be changed slightly larger."

上述の如く、ファジィ推論ルール及びメンバーシップ関
数が設定されることにより、簡単なアルゴリズムで、確
実に安定した光量変化の補正が行われるようになる。
As described above, by setting the fuzzy inference rules and membership functions, it becomes possible to reliably and stably correct light amount changes using a simple algorithm.

(発明の効果) 以上の説明から理解される如く、本発明による光電セン
サの受光量変化補正方法によれば、受光量の計測値の平
均値の変化に加えて計測値の分布の変化を考慮して受光
量補正値が決定されるから、投光素子の温度特性やレン
ズ面の汚れ等に起因する受光量変化か適切に補償され得
るようになる。
(Effects of the Invention) As can be understood from the above explanation, according to the method for correcting changes in the amount of light received by a photoelectric sensor according to the present invention, changes in the distribution of measured values are taken into account in addition to changes in the average value of the measured values of the amount of received light. Since the received light amount correction value is determined in this manner, changes in the received light amount due to temperature characteristics of the light projecting element, dirt on the lens surface, etc. can be appropriately compensated for.

また、受光量の計測値が以前の計測値に比して大きく異
なる時には、即ち急激な単発的変化が生じた場合にはこ
れの頻度に応じて前記平均値及び計測値の分布度数が更
新され、急激な単発的変化が生じても本来の変化に対す
る補正への支障を極力小さくした上で、このことに対し
ても信頼性の高い受光量補正が行われるようになる。ま
た計測値の分布レンジの変化に応じて平均値を算出する
計測回数が定められ、これにより計測値のばらつきに起
因して制御系が発振することが回避され、安定した補正
が行われるようになる。
In addition, when the measured value of the amount of received light differs greatly from the previous measured value, that is, when a sudden, one-off change occurs, the average value and the distribution frequency of the measured value are updated according to the frequency of this change. Even if a rapid, one-off change occurs, the interference with correction for the original change is minimized, and highly reliable correction of the amount of received light can be performed even in response to such a sudden change. In addition, the number of measurements to calculate the average value is determined according to changes in the distribution range of the measured values, which prevents the control system from oscillating due to variations in the measured values and ensures stable correction. Become.

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

第1図は本発明による光電センサの受光量変化補正方法
の実施に用いられる光電センサ及び受光量変化補正制御
装置の一実施例を示すブロック線図、第2図はライトオ
ン型の光電センサの受光量の変化を示すグラフ、第3図
はダークオン型の光電センサの受光量変化を示すグラフ
、第4図は所定回数の受光量の計測値の平均値及びそれ
の分布レンジを示すグラフ、第5図及び第6図は各々今
回の計測値の分布レンジと前回の計測値の分布レンジと
の相違を示すグラフ、第7図は感度補正に関するファジ
ィ推論に於ける入力要件である計測値の平均値の人力メ
ンバーシップ関数を示すグラフ、第8図はそれの出力で
あるゲイン変化率の出力メンバーシップ関数を示すグラ
フ、第9図は計測回数の調整に関するファジィ推論に於
ける入ノJ要件である計11f1 (mの分布レンジの
人力メンバーシップ関数を示すグラフ、第10図はそれ
の出力である測定回数調整度合の出)jメンバーシップ
関数を示すグラフ、第1.1図は例外処理に関するファ
ジィ推論に於ける人力要素である例外対象の計測値の平
均値の人力メンバーシップ関数を示すグラフ、第12図
はそれの例外計測値の出現回数の入力メンバーシップ関
数を示すグラフ、第13図はそれの出力であるゲイン変
化率の出力メンバーシップ関数を示すり゛ラフである。 1・・・光電センサ 3・・・投光素子 5・・・受光素子 11・・・可変ゲイン増幅器 17・・・CPU 19・・・信号処理回路
FIG. 1 is a block diagram showing an embodiment of a photoelectric sensor and a control device for correcting changes in received light amount used to implement the method for correcting changes in received light amount of a photoelectric sensor according to the present invention, and FIG. 2 is a block diagram of a light-on type photoelectric sensor. Figure 3 is a graph showing changes in the amount of light received. Figure 3 is a graph showing changes in the amount of light received by a dark-on type photoelectric sensor. Figure 4 is a graph showing the average value of the measured value of the amount of light received a predetermined number of times and its distribution range. Figures 5 and 6 are graphs showing the difference between the distribution range of the current measurement value and the distribution range of the previous measurement value, respectively, and Figure 7 is the average of the measurement values, which is an input requirement in fuzzy inference regarding sensitivity correction. Figure 8 is a graph showing the output membership function of the gain change rate, which is its output, and Figure 9 is the input J requirement in fuzzy inference regarding adjustment of the number of measurements. A total of 11f1 (a graph showing the human membership function for the distribution range of m, Figure 10 is the output of the measurement frequency adjustment degree), a graph showing the j membership function, Figure 1.1 is related to exception handling. A graph showing the human membership function of the average value of the measured value of the exception object, which is the human factor in fuzzy inference. Figure 12 is a graph showing the input membership function of the number of occurrences of the exceptional measurement value. Figure 13. is a graph showing the output membership function of the gain change rate which is its output. 1... Photoelectric sensor 3... Light emitting element 5... Light receiving element 11... Variable gain amplifier 17... CPU 19... Signal processing circuit

Claims (1)

【特許請求の範囲】 1、光電センサの受光素子の受光量を計測し、これの所
定測定回数による平均値と分布とを所定測定回数毎に検
出し、今回の計測値の平均値と前回の計測値の平均値と
を比較すると共に今回の計測値の分布と前記計測値の分
布とを比較し、この両比較により受光量変化を補償すべ
く受光量補正値を決定することを特徴とする光電センサ
の受光量変化補正方法。 2、前記受光素子の受光量の計測値が以前の計測値に比
して大きく異なる時には該計測値を前記平均値の算出及
び分布に参加させないか或いは該計測値が前記平均値の
算出及び分布度数に与える重みを小さくし、以前の計測
値に比して大きく異なる計測値が計測される回数の増大
に伴い該計測値が前記平均値の算出及び分布度数に与え
る重みを増大することを特徴とする請求項1記載の光電
センサの受光量変化補正方法。 3、前記計測値の分布レンジが以前に比して拡大した時
には前記平均値及び分布を検出する計測回数を増大し、
前記分布レンジが以前に比して縮小された時には前記平
均値及び分布を検出する測定回数を減少することを特徴
とする請求項1或いは請求項2に記載の光電センサの受
光量変化補正方法。
[Claims] 1. Measure the amount of light received by the light-receiving element of the photoelectric sensor, detect the average value and distribution based on a predetermined number of measurements, and compare the average value of the current measurement value and the previous measurement value. The method is characterized in that the average value of the measured values is compared, and the distribution of the current measured value is compared with the distribution of the measured values, and a received light amount correction value is determined based on these comparisons to compensate for changes in the received light amount. A method for correcting changes in the amount of light received by a photoelectric sensor. 2. When the measured value of the amount of light received by the light receiving element is significantly different from the previous measured value, the measured value is not included in the calculation and distribution of the average value, or the measured value is not included in the calculation and distribution of the average value. It is characterized by reducing the weight given to the frequency, and increasing the weight given to the calculation of the average value and the distribution frequency according to the increase in the number of times a measurement value that is significantly different from the previous measurement value is measured. 2. The method for correcting changes in the amount of light received by a photoelectric sensor according to claim 1. 3. When the distribution range of the measured values is expanded compared to before, increasing the number of measurements to detect the average value and distribution;
3. The method of correcting changes in the amount of light received by a photoelectric sensor according to claim 2, wherein when the distribution range is reduced compared to before, the number of measurements for detecting the average value and distribution is reduced.
JP2142573A 1990-05-31 1990-05-31 Compensation method for change in received light amount of photoelectric sensor Expired - Fee Related JP2973218B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2142573A JP2973218B2 (en) 1990-05-31 1990-05-31 Compensation method for change in received light amount of photoelectric sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2142573A JP2973218B2 (en) 1990-05-31 1990-05-31 Compensation method for change in received light amount of photoelectric sensor

Publications (2)

Publication Number Publication Date
JPH0434386A true JPH0434386A (en) 1992-02-05
JP2973218B2 JP2973218B2 (en) 1999-11-08

Family

ID=15318468

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2142573A Expired - Fee Related JP2973218B2 (en) 1990-05-31 1990-05-31 Compensation method for change in received light amount of photoelectric sensor

Country Status (1)

Country Link
JP (1) JP2973218B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002100975A (en) * 2000-09-22 2002-04-05 Mitsubishi Electric Corp Closing safety device for elevator door
JP2006236845A (en) * 2005-02-25 2006-09-07 Keyence Corp Photoelectric switch and setting method of photoelectric switch
WO2009031528A1 (en) * 2007-09-05 2009-03-12 Yamatake Corporation Signal detection device
JP2011250467A (en) * 2011-07-29 2011-12-08 Fujitsu Semiconductor Ltd Surge detection circuit for sensor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002100975A (en) * 2000-09-22 2002-04-05 Mitsubishi Electric Corp Closing safety device for elevator door
JP2006236845A (en) * 2005-02-25 2006-09-07 Keyence Corp Photoelectric switch and setting method of photoelectric switch
WO2009031528A1 (en) * 2007-09-05 2009-03-12 Yamatake Corporation Signal detection device
JP4756614B2 (en) * 2007-09-05 2011-08-24 株式会社山武 Signal detection device
JP2011250467A (en) * 2011-07-29 2011-12-08 Fujitsu Semiconductor Ltd Surge detection circuit for sensor

Also Published As

Publication number Publication date
JP2973218B2 (en) 1999-11-08

Similar Documents

Publication Publication Date Title
US6570149B2 (en) Photodetector having a control block for maintaining a detection signal within a predetermined tolerance range
US7049575B2 (en) System for sensing ambient light having ambient stability probability
CA1102898A (en) Ambient light compensating circuit
US20070280329A1 (en) Optical fiber temperature sensing device
TW201616152A (en) Open loop correction for optical proximity detectors
KR100217714B1 (en) Optical temperature sensor system with laser diode
JPH0434386A (en) Method for correcting change in detection quantity of light of photoelectric sensor
JP5091169B2 (en) Smoke sensor device
JP2648491B2 (en) Distance detection device
US20240053472A1 (en) Proximity sensor
JP2625471B2 (en) Fire alarm device with dirt correction function
JPH0555683A (en) Wavelength stabilized light source equipment
JP2000338730A (en) Image forming device
TWI834138B (en) Optical device, mobile system, and method of determining the presence of and/or distance to an object
JPH0480566B2 (en)
JPH01150809A (en) Distance detecting device
WO2021140969A1 (en) Laser output control method, and laser processing device
TW202244533A (en) Proximity detection with auto calibration
JPH023892A (en) Method and device for contamination correction of fire alarm device
US20230314609A1 (en) Proximity sensing
JP7033980B2 (en) Smoke detector and smoke detection system
JPH04169452A (en) Photoelectric transmission type paper edge position detecting method for sheet and web
JP3187621B2 (en) Active triangulation
JP3135750B2 (en) Loom weft detection device
JPH01169386A (en) Distance measuring apparatus

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080903

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees