JPH0547054B2 - - Google Patents

Info

Publication number
JPH0547054B2
JPH0547054B2 JP62232575A JP23257587A JPH0547054B2 JP H0547054 B2 JPH0547054 B2 JP H0547054B2 JP 62232575 A JP62232575 A JP 62232575A JP 23257587 A JP23257587 A JP 23257587A JP H0547054 B2 JPH0547054 B2 JP H0547054B2
Authority
JP
Japan
Prior art keywords
gain
output
optical sensor
level
amount
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.)
Expired - Lifetime
Application number
JP62232575A
Other languages
Japanese (ja)
Other versions
JPS6475925A (en
Inventor
Takeshi Yajima
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP62232575A priority Critical patent/JPS6475925A/en
Publication of JPS6475925A publication Critical patent/JPS6475925A/en
Publication of JPH0547054B2 publication Critical patent/JPH0547054B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、紙幣鑑定装置等における対象の真
偽、汚損の鑑定や、用紙を一枚ずつ繰り出す給紙
装置等における対象の重なりの検知や、組立ライ
ンの産業ロボツト等における対象の位置、方向検
知、不良識別、などに用いられる光センサの出力
レベルを調整する可変利得調整装置に関するもの
である。
[Detailed Description of the Invention] (Industrial Application Field) The present invention is applicable to the verification of authenticity and defacement of objects in banknote verification devices, etc., and the detection of overlapping objects in paper feeding devices that feed paper sheets one by one. The present invention relates to a variable gain adjustment device for adjusting the output level of an optical sensor used for detecting the position and direction of objects, identifying defects, etc. in industrial robots on assembly lines.

(従来の技術) 従来、この種の自動利得調整装置を用いた紙幣
鑑定装置では、鑑定用センサとして一般に光セン
サが用いられており、光源で発した光を対象であ
る被鑑別紙幣に照射し、その反射光又は透過光を
受光素子により光電変換し、得られた電気信号の
強弱のパターンから特徴抽出し、鑑定を行なつて
いる。
(Prior Art) Conventionally, in a banknote authentication device using this type of automatic gain adjustment device, an optical sensor is generally used as an authentication sensor, and the target banknote to be validated is irradiated with light emitted from a light source. The reflected or transmitted light is photoelectrically converted by a light-receiving element, and features are extracted from the pattern of strength and weakness of the resulting electrical signal for identification.

鑑定に用いられる光センサの構成例を第10図
に示す。同図aは反射型光センサの構成例であ
る。断面略L字型のセンサケース6aには、その
一端(上部)に発光素子1、他端(底部)に紙幣
等の対象5に対面するカバーガラス3が設けら
れ、更にセンサケース6aの中間部にスリツト
4、カバーガラス3に対向して受光素子2が設け
られる。この光センサでは、発光素子1にて発し
た光をスリツト4で光の通過を拘束した後、カバ
ーガラス3を介して、対象5の所定領域を照明
し、その反射光を受光素子2で受光して電気信号
を得る。
FIG. 10 shows an example of the configuration of an optical sensor used for appraisal. Figure a shows an example of the configuration of a reflective optical sensor. The sensor case 6a, which has a substantially L-shaped cross section, is provided with a light emitting element 1 at one end (top), a cover glass 3 facing an object 5 such as a banknote at the other end (bottom), and a middle part of the sensor case 6a. A light receiving element 2 is provided opposite the slit 4 and the cover glass 3. In this optical sensor, after light emitted by a light emitting element 1 is restricted from passing through a slit 4, a predetermined area of a target 5 is illuminated through a cover glass 3, and the reflected light is received by a light receiving element 2. to obtain an electrical signal.

同図bは透過型光センサの構成例である。一方
の長いセンサケース6bには、その一端に発光素
子1、他端にカバーガラス3の他に拡散板7が設
けられる。このセンサケース6bに対し、対象5
を移動可能に挟んだ状態で対向して取付けられる
他方の短いサンサケース6cには、その一端にカ
バーガラス3、他端に受光素子2が設けられる。
この光センサでは、発光素子1にて発した光を拡
散板7で光密度が均一な拡散光とした後、カバー
ガラス7を介して対象5に照射し、対象5を透過
した光を受光素子2で受光して電気信号を得る。
FIG. 1B shows an example of the configuration of a transmission type optical sensor. One long sensor case 6b is provided with a light emitting element 1 at one end and a diffuser plate 7 in addition to the cover glass 3 at the other end. For this sensor case 6b, the object 5
The other short sensor case 6c, which is attached movably and facing each other, is provided with a cover glass 3 at one end and a light receiving element 2 at the other end.
In this optical sensor, light emitted by a light emitting element 1 is converted into diffused light with uniform light density by a diffusion plate 7, and then irradiated onto an object 5 through a cover glass 7, and the light transmitted through the object 5 is transmitted to a light receiving element. 2 to receive the light and obtain an electrical signal.

同図cは反射型光センサの別の構成例で、同図
aのものに対し、対象5がないときでも十分の出
力レベルが得られるように、基準となる反射率を
有する拡散反射板8をカバーガラス3に対面して
センサケース6aの外側に設けられる。
Figure c shows another configuration example of a reflective optical sensor, in which a diffuse reflector plate 8 having a reference reflectivity is used to obtain a sufficient output level even when there is no object 5, compared to the configuration example of the reflective optical sensor shown in figure a. is provided on the outside of the sensor case 6a facing the cover glass 3.

このようにして、受光素子2から直接得られる
光センサの出力レベルは、発光素子2毎の光出力
の違いや受光素子2毎の光電変換効率の違いなど
によつて大きな利得のバラツキがある為に広範囲
の利得調整を要する。この利得調整における誤差
は直接鑑別性能に影響し利得調整如何によつては
リジエクト率の増大や誤鑑定を引き起こしかねな
い為、利得調整を高精度に行なう必要性がある。
In this way, the output level of the optical sensor directly obtained from the light-receiving element 2 has large gain variations due to differences in the light output of each light-emitting element 2 and differences in photoelectric conversion efficiency of each light-receiving element 2. requires extensive gain adjustment. Errors in this gain adjustment directly affect the discrimination performance, and depending on how the gain is adjusted, may cause an increase in the reject rate or erroneous identification, so it is necessary to perform the gain adjustment with high precision.

このため、従来、光センサの出力レベルの利得
調整は可変抵抗器VRを用いて手操作で行なわれ
ていたが、多数のセンサ対を有する紙幣鑑定装置
におけるVR調整は、調整作業時間がかかるうえ
に安定した調整精度を得ることがむずかしかつ
た。
For this reason, conventionally, the gain adjustment of the output level of the optical sensor was performed manually using a variable resistor VR, but VR adjustment in a banknote validation device that has a large number of sensor pairs requires time and adjustment work. It was difficult to obtain stable adjustment accuracy.

この問題を解決した従来の自動利得調整装置の
構成例を第11図に示す。同図aの自動利得調整
装置は、対象5が光センサ上に介在する状態(介
在状態)における光センサの出力レベル(介在レ
ベル)と介在しない状態(無介在状態)における
光センサの出力レベル(無介在レベル)とがある
一定の比率になることを利用して、無介在状態に
おいて所定出力が得られるように利得を調整する
ことによつて対象5の判別時には利得調整された
光センサの出力信号を得ようとするものである。
即ち、この自動利得調整装置は、設定される利得
に基づいて光センサの出力を増幅(又は減衰)す
る可変利得増幅手段11と、無介在レベルを予め
設定された無介在レベル基準量と比較して利得を
設定する比較手段12とから構成される。この場
合の光センサとしては例えば、前述した第10図
cのものが使用される。この装置の動作は、まず
可変利得増幅手段11に所定の利得を設定してお
く。次に、比較手段により、無介在時の光センサ
の出力レベル、例えば可変利得増幅手段11の出
力レベルと無介在レベル基準量との誤差が最小と
なるような利得が可変利得増幅手段11に設定さ
れる。この結果、調整された光センサの出力信号
が可変利得増幅手段11の出力に得られる。
An example of the configuration of a conventional automatic gain adjustment device that solves this problem is shown in FIG. The automatic gain adjustment device shown in FIG. By adjusting the gain so that a predetermined output is obtained in the non-intervention state, the output of the optical sensor whose gain is adjusted when the target 5 is discriminated. It's trying to get a signal.
That is, this automatic gain adjustment device includes a variable gain amplifying means 11 that amplifies (or attenuates) the output of the optical sensor based on a set gain, and compares the non-intervention level with a preset non-intervention level reference amount. and comparing means 12 for setting the gain. As the optical sensor in this case, for example, the one shown in FIG. 10c described above is used. In the operation of this device, first, a predetermined gain is set in the variable gain amplification means 11. Next, the comparison means sets a gain in the variable gain amplification means 11 that minimizes the error between the output level of the optical sensor without intervention, for example, the output level of the variable gain amplification means 11, and the reference amount of the non-intervention level. be done. As a result, an adjusted optical sensor output signal is obtained at the output of the variable gain amplification means 11.

第11図bに示す自動利得調整装置は、直前以
前(過去)の対象5の介在状態における光センサ
の出力に応じて利得調整がなされるものである。
即ち、この装置は、可変利得増幅手段11、比較
手段13及び利得修正手段14から構成される。
比較手段13は過去の介在レベル、例えば、可変
利得増幅器11の出力レベルを介在レベル基準量
と比較し、これらの誤差が小さくなるような修正
量を出力する。利得修正手段14は、比較手段1
3からの修正量に基づいて、直前に得られた利得
を修正して可変利得増幅手段14に設定する。こ
の結果、可変利得増幅手段11の出力には光セン
サの調整出力レベルが得られる。
The automatic gain adjustment device shown in FIG. 11b performs gain adjustment in accordance with the output of the optical sensor in the immediately previous (past) intervening state of the object 5.
That is, this device is comprised of variable gain amplification means 11, comparison means 13, and gain modification means 14.
The comparison means 13 compares the past intervention level, for example, the output level of the variable gain amplifier 11, with the intervention level reference amount, and outputs a correction amount that reduces these errors. The gain correction means 14 is the comparison means 1
Based on the amount of correction from 3, the gain obtained immediately before is corrected and set in the variable gain amplification means 14. As a result, the adjusted output level of the optical sensor is obtained as the output of the variable gain amplification means 11.

この自動利得調整装置が、例えば紙幣鑑定装置
に適用された場合を説明する。
A case will be described in which this automatic gain adjustment device is applied to, for example, a banknote validation device.

紙幣鑑定は鑑定用光センサの紙幣介在状態での
出力を紙幣1毎に計測して行なわれるが、利得調
整は、この介在レベルの計測結果を調整誤差検出
用の観測量として扱う。まず紙幣の所定枚数分に
ついて前記介在レベルを統計し、その統計量に応
じて可変利得増幅手段11の利得を比較手段13
及び利得修正手段14により決定する。仮に得ら
れた統計量が統計量基準値(介在レベル基準量)
よりも10%低かつた場合には10%増しの増幅率に
調整する。
Banknote appraisal is performed by measuring the output of the optical sensor for appraisal in the banknote intervening state for each banknote, but in gain adjustment, the measurement result of this intervening level is treated as an observation amount for adjustment error detection. First, the intervention level is statisticized for a predetermined number of banknotes, and the gain of the variable gain amplification means 11 is determined by the comparing means 13 according to the statistical amount.
and determined by the gain correction means 14. The temporarily obtained statistical value is the statistical standard value (intervention level standard value)
If the amplification rate is 10% lower than that, adjust the amplification factor to a 10% increase.

(発明が解決しようとする問題点) しかしながら、前記構成の自動利得調整装置で
は次のような問題点がある。
(Problems to be Solved by the Invention) However, the automatic gain adjustment device having the above configuration has the following problems.

第11図aで述べた自動利得調整装置では、無
介在状態における光センサの出力レベル(無介在
レベル)を計測し自動利得調整を行なつている
が、 (ア) 光源毎の指向性、配光特性のバラツキ、 (イ) 受光素子毎の指向性のバラツキ、 (ウ) 拡散板(又は拡散反射板)毎の拡散度合のバ
ラツキ、 (エ) 光センサ毎の発光素子や受光素子のわずかな
取付位置のバラツキ、 などの要因によつて光センサ毎に対象の介在状
態と無介在状態との光センサの出力比が異なる
為に無介在状態の出力レベルを正確に合わせて
も対象の介在状態における出力レベルがばらつ
いて調整精度が得られない。このため、この自
動利得調整装置を、紙幣鑑定装置に適用した場
合には、このような調整精度誤差が厳密な鑑定
を困難にし、紙幣鑑定装置の信頼性を低くして
しまう。
The automatic gain adjustment device described in FIG. Variations in optical characteristics; (a) Variations in directivity for each light-receiving element; (c) Variations in the degree of diffusion for each diffuser plate (or diffuse-reflection plate); Due to factors such as variations in mounting position, the output ratio of the optical sensor between the target state and non-intervening state differs for each optical sensor, so even if the output level for the non-intervening state is precisely adjusted, the target intervening state The output level varies and adjustment accuracy cannot be obtained. Therefore, when this automatic gain adjustment device is applied to a banknote validator, such adjustment accuracy errors make strict appraisal difficult and reduce the reliability of the banknote validator.

一方、第11図bで述べた自動利得調整装置
では、対象の介在状態における光センサの出力
レベルを計測し自動利得調整を行なつており前
記(ア)〜(エ)の要因による大きな調整誤差は生じな
いが次の2項目のいずれかの原因により調整動
作の追従性が悪くなつてしまう。
On the other hand, in the automatic gain adjustment device described in FIG. 11b, automatic gain adjustment is performed by measuring the output level of the optical sensor in the state where the object is present, and there is a large adjustment error due to the factors (a) to (d) above. Although this does not occur, the followability of the adjustment operation deteriorates due to one of the following two causes.

(オ) 調整用観測量としての対象の光センサの出力
レベルが対象毎にばらつく為、複数の対象につ
いて統計処理を要し、統計観測期間が長くなつ
てしまう。
(E) Since the output level of the optical sensor of the target as an observation quantity for adjustment varies from target to target, statistical processing is required for multiple targets, which lengthens the statistical observation period.

(カ) 運用上、調整用観測量を得る対象の介在しな
い期間が非常に長い場合がある。
(f) For operational reasons, there are cases where there is a very long period in which there is no target for obtaining adjustment observables.

この結果、この装置を例えば両替機内の紙幣
鑑定装置に適用した場合には、被鑑定紙幣の光
センサの出力レベルは個々の紙幣の厚さ、印刷
の濃さ、印刷の位置ずれ、流通による汚れ具合
等によつて紙幣毎に大きくばらつくので調整用
観測量として用いる為には紙幣何百枚あるいは
何千枚分を統計する必要があり、長い観測統計
期間の為に調整動作の追従性が悪くなつてしま
う。また、観測統計期間は両替機の運用状態に
左右され、両替頻度が少ない場合には非常に長
くなつてしまう。従つて、この自動利得調整装
置では、一般に、電源投入直後の光源の光出力
経時変化や装置内温度によるセンサ出力の経時
変化など、短時間に変化する光センサの出力変
動に対しては調整動作を追従させることができ
ず問題であつた。
As a result, when this device is applied to, for example, a banknote authentication device in a currency exchange machine, the output level of the optical sensor of the banknote to be verified will depend on the thickness of each banknote, the darkness of the print, the misalignment of the print, and the dirt caused by circulation. Since there are large variations from banknote to banknote depending on the condition, etc., it is necessary to conduct statistics on hundreds or thousands of banknotes in order to use it as an observation amount for adjustment, and the tracking of adjustment operations is poor due to the long observation and statistical period. I get used to it. Furthermore, the observation statistics period depends on the operational status of the money exchange machine, and can be extremely long if the frequency of money exchange is low. Therefore, in general, this automatic gain adjustment device does not perform adjustment operations for fluctuations in the optical sensor output that change over a short period of time, such as changes over time in the optical output of the light source immediately after power is turned on, or changes over time in the sensor output due to the temperature inside the device. The problem was that it could not be followed.

本発明は以上述べた調整精度と調整の追従性の
問題点を解決し、安定して高整度の調整出力を得
ることが可能な自動利得調整装置を提供すること
を目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide an automatic gain adjustment device capable of solving the above-mentioned problems of adjustment accuracy and adjustment followability, and stably obtaining a highly consistent adjustment output.

(問題点を解決するための手段) 本発明は前記問題点を解決するために、第1の
発明では、対象からの光を光電変換する光センサ
の出力に設けられる自動利得調整装置において、
(a)設定される利得に基づいて前記光センサの出力
を増幅又は減衰する可変利得増幅手段、(b)前記対
象がないときの光センサの出力レベルと、予め設
定される第1の基準レベルとの誤差が最小となる
ような利得を出力する第1の比較手段、(c)前記対
象があるときの過去の前記光センサの出力レベル
と、予め設定される第2の基準レベルとの誤差量
を出力する第2の比較手段、(d)前記第2の比較手
段からの誤差量に基づいて、当該誤差が最小とな
るように直前に利得修正量を更新する更新手段、
及び(e)前記更新手段からの利得修正量に基づいて
第1の比較手段の利得を修正して前記可変利得増
幅手段に設定する修正手段を具備するものであ
る。
(Means for Solving the Problems) In order to solve the above-mentioned problems, the present invention provides, in a first invention, an automatic gain adjustment device provided at the output of an optical sensor that photoelectrically converts light from an object.
(a) variable gain amplification means that amplifies or attenuates the output of the optical sensor based on a set gain; (b) an output level of the optical sensor when the target is not present and a first reference level that is set in advance; (c) an error between the past output level of the optical sensor when the target exists and a second reference level set in advance; (d) updating means for immediately updating the gain correction amount based on the error amount from the second comparison means so that the error is minimized;
and (e) a modifying means for modifying the gain of the first comparing means based on the gain modification amount from the updating means and setting it in the variable gain amplifying means.

また、第2の発明では、対象からの光を光電変
換する光センサの出力に設けられる自動利得調整
装置において、(a)設定される利得に基づいて前記
光センサの出力を増幅又は減衰する可変利得増幅
手段、(b)前記対象があるときの過去の前記光セン
サの出力レベルと、予め設定される第2の基準レ
ベルとの誤差量を出力する第2の比較手段、(c)前
記第2の比較手段からの誤差量に基づいて当該誤
差が最小となるように直前の第1の基準レベルを
更新する更新手段、及び(d)前記対象がないときの
前記光センサの出力レベルと、前記更新手段から
の第1の基準レベルとの誤差が最小となるような
利得を前記可変利得増幅手段へ設定する第1の比
較手段を具備するものである。
Further, in a second invention, in an automatic gain adjustment device provided at the output of an optical sensor that photoelectrically converts light from a target, (a) a variable that amplifies or attenuates the output of the optical sensor based on a set gain; gain amplification means; (b) second comparison means for outputting an error amount between the past output level of the optical sensor when the object was present and a second reference level set in advance; (c) the second comparison means (d) an output level of the optical sensor when the target is not present; and (d) an output level of the optical sensor when the target is not present. The first comparison means sets the gain to the variable gain amplification means such that the error from the first reference level from the update means is minimized.

更に、第3の発明では、対象からの光を光電変
換する光センサの出力に設けられる自動利得調整
装置において、(a)設定される利得に基づいて前記
光センサの出力を増幅又は減衰する可変利得増幅
手段、(b)前記対象があるときの過去の前記光セン
サの出力レベルと、予め設定される第2の基準レ
ベルとの誤差量を出力する第2の比較手段、(c)前
記第2の比較手段からの誤差量に基づいて当該誤
差が最小となるように直前のレベル修正量を更新
する更新手段、(d)前記更新手段からのレベル修正
量に基づいて、前記対象がないときの前記光セン
サの出力レベルを修正して出力する修正手段、及
び(e)前記修正手段の出力レベルと予め設定される
第1の基準レベルとの誤差が最小となるような利
得を前記可変利得増幅手段に設定する第1の比較
手段を具備するものである。
Furthermore, in a third invention, in an automatic gain adjustment device provided at the output of a photosensor that photoelectrically converts light from a target, (a) a variable device that amplifies or attenuates the output of the photosensor based on a set gain; gain amplification means; (b) second comparison means for outputting an error amount between the past output level of the optical sensor when the object was present and a second reference level set in advance; (c) the second comparison means (d) when the target does not exist based on the level correction amount from the updating means; (e) modifying means for modifying and outputting the output level of the optical sensor; and (e) modifying the variable gain so that the error between the output level of the modifying means and a preset first reference level is minimized. The first comparing means is provided in the amplifying means.

(作 用) 本発明の技術的手段は次のように作用する。第
1の発明では、対象がないときの光センサの出力
レベル(無介在レベル)から第1の比較手段で得
られる利得を、対象があるときの過去の光センサ
の出力レベル(介在レベル)から第2の比較手段
及び更新手段によつて得られる利得修正量に従つ
て修正する。従つて、第1の比較手段による無介
在レベルに基づく利得補正作用によつて、温度変
動等による短時間の光センサの出力変動に対して
迅速に追従すると共に、無介在時の利得に対する
介在時の利得修正量による無介在レベルと介在レ
ベルとの比の補正作用によつて、ホコリ等による
長時間の変動に対し精度よく調整できる。
(Function) The technical means of the present invention functions as follows. In the first invention, the gain obtained by the first comparison means from the output level of the optical sensor when there is no target (unmediated level) is calculated from the past output level of the optical sensor when the target is present (intervening level). The gain is corrected according to the gain correction amount obtained by the second comparing means and the updating means. Therefore, by the gain correction effect based on the non-intervention level by the first comparison means, it is possible to quickly follow short-term optical sensor output fluctuations due to temperature fluctuations, etc. By correcting the ratio between the non-intervention level and the intervention level by the gain correction amount, it is possible to accurately adjust for long-term fluctuations due to dust or the like.

第2の発明では、過去の介在レベルから第2の
比較手段及び更新手段よつて得られる第2の基準
レベル(無介在レベル基準量)に従つて、第1の
比較手段により無介在時の利得を求めている。ま
た、第3の発明では、過去の介在レベルから第2
の比較手段及び更新手段によつて得られるレベル
修正量に基づき、修正手段により、無介在レベル
を修正し、修正された無介在レベルから第1の比
較手段によつて設定すべき利得を得ている。従つ
て、第2及び第3の発明とも、第1の発明と同様
に、無介在レベルと介在レベルとの比を補正する
作用、無介在レベルに基づく利得を補正する作用
を有するので、前記従来技術の問題点を解決でき
るのである。
In the second invention, the first comparison means calculates the gain without intervention according to the second reference level (non-intervention level reference amount) obtained from the past intervention level by the second comparison means and the update means. I'm looking for. In addition, in the third invention, the second level of intervention is determined from the past intervention level.
Based on the level correction amount obtained by the comparison means and the updating means, the correction means corrects the non-intervention level, and obtains the gain to be set by the first comparison means from the corrected non-intervention level. There is. Therefore, like the first invention, both the second and third inventions have the function of correcting the ratio between the non-intervention level and the intervention level, and the function of correcting the gain based on the non-intervention level. Technological problems can be solved.

(実施例) 第1図は本発明の第1の実施例を示す自動利得
調整装置の機能ブロツク図である。同図におい
て、第11図と同一の参照符号は同一性のある構
成要素を示す。本実施例の自動利得調整装置は、
可変利得増幅手段11、比較手段12a,13
a、更新手段15及び修正手段16から構成され
る。比較手段12aは、第11図aの比較手段1
2と同様に無介在レベルと予め設定された無介在
レベル基準量とを比較して、当該基準量との誤差
が最小となるような可変利得増幅手段11の利得
を出力する。但し、本実施例の比較手段12a
は、この利得を仮の利得(利得修正前の利得)と
して出力する。一方、比較手段13aは、第11
図bの比較手段13と同様に、過去の介在レベル
と介在レベル基準量と比較して、当該基準量に対
する誤差量を検出するが、本実施例では誤差量と
して(介在レベル)/(介在レベル基準量)を出
力する。更新手段15は誤差量の逆数である修正
量に基づいて前回の利得修正量を更新する。修正
手段16は比較手段12aからの仮の利得と更新
手段5からの利得修正量とを乗算して利得を出力
する。
(Embodiment) FIG. 1 is a functional block diagram of an automatic gain adjustment device showing a first embodiment of the present invention. In this figure, the same reference numerals as in FIG. 11 indicate the same components. The automatic gain adjustment device of this embodiment is as follows:
Variable gain amplification means 11, comparison means 12a, 13
a, update means 15, and correction means 16. The comparison means 12a is the comparison means 1 of FIG. 11a.
Similarly to 2, the non-intervention level is compared with a preset non-intervention level reference amount, and the gain of the variable gain amplification means 11 that minimizes the error with the reference amount is output. However, the comparison means 12a of this embodiment
outputs this gain as a temporary gain (gain before gain modification). On the other hand, the comparison means 13a
Similar to the comparison means 13 in FIG. b, the past intervention level is compared with the intervention level reference amount to detect the error amount for the reference amount. output the reference amount). The updating means 15 updates the previous gain correction amount based on the correction amount which is the reciprocal of the error amount. The modifying means 16 multiplies the temporary gain from the comparing means 12a by the gain modification amount from the updating means 5 and outputs a gain.

なお、同図において、比較手段12aの無介在
レベルの入力は、可変利得増幅手段11の入力、
比較手段13aの介在レベルの入力は可変利得増
幅手段11の出力に接続されているが、これは無
介在レベルが現在、介在レベルが過去のものであ
ることを便宜的に示すものである(以下、後述す
る第2乃至第6の実施例において同様である)。
従つて、無介在レベルは可変利得増幅手段11の
出力であつてもよいし、介在レベル可変利得増幅
手段11の入力であつてもよい。この場合、介在
レベルは過去のものであるので、記憶手段が必要
となる。また、マイクロプロセツサ等で本実施例
を実現をする場合にはA/D変換器等が必要とな
る。
In addition, in the figure, the input of the non-intervention level of the comparison means 12a is the input of the variable gain amplification means 11,
The input of the intervention level of the comparison means 13a is connected to the output of the variable gain amplification means 11, but this is to conveniently indicate that the non-intervention level is the current one and the intervention level is the past one (hereinafter referred to as , the same applies to the second to sixth embodiments described later).
Therefore, the non-intervening level may be the output of the variable gain amplifying means 11, or the input of the intervening level variable gain amplifying means 11. In this case, since the intervention level is in the past, a storage means is required. Furthermore, if this embodiment is implemented using a microprocessor or the like, an A/D converter or the like is required.

次に第1の実施例の動作を説明する。 Next, the operation of the first embodiment will be explained.

まず、可変利得増幅手段11に初期値の利得が
設定される。次に、比較手段12aにより、例え
ば対象5の無介在状態における可変利得増幅手段
11の出力レベルが無介在レベルとして計測さ
れ、無介在レベル基準量に対する誤差が最小とな
るような利得が修正手段16へ出力される。例え
ば当該出力レベルが基準量として予め定められた
所定範囲の出力レベルに入るような利得が修正手
段16へ出力される。一方、過去(直前回以前)
の1以上の対象5の介在状態における介在レベ
ル、例えば、可変利得増幅手段11の出力レベル
と予め設定された介在レベル基準量とが比較手段
13aで比較され、介在レベル基準量に対する介
在レベルの比が誤差量として更新手段15へ出力
される。更新手段15では比較手段13aからの
比の逆数を取ることにより、得られた修正量と、
直前回に得られた利得修正量とを乗算することに
より、利得修正量を更新して修正手段16へ出力
する。この利得修正量を受け取つた修正手段16
では、これを比較手段12aから受け取つた利得
に乗算することにより利得を修正して可変利得増
幅手段11に設定する。この結果、可変利得増幅
手段11の出力には調整された光センサの出力が
得られる。
First, an initial value gain is set in the variable gain amplification means 11. Next, the comparison means 12a measures the output level of the variable gain amplification means 11 in the non-intervention state of the object 5 as the non-intervention level, and the correction means 16 sets a gain that minimizes the error with respect to the non-intervention level reference amount. Output to. For example, a gain is output to the correction means 16 such that the output level falls within a predetermined range of output levels set in advance as a reference amount. On the other hand, the past (before the previous time)
The intervention level in the intervention state of one or more objects 5, for example, the output level of the variable gain amplification means 11 and a preset intervention level reference amount are compared by the comparison means 13a, and the ratio of the intervention level to the intervention level reference amount is determined. is output to the updating means 15 as an error amount. The updating means 15 takes the reciprocal of the ratio from the comparing means 13a, and the obtained correction amount,
The gain correction amount is updated by multiplying it by the gain correction amount obtained immediately before and is output to the correction means 16. Modifying means 16 that receives this gain modification amount
Then, by multiplying this by the gain received from the comparing means 12a, the gain is corrected and set in the variable gain amplifying means 11. As a result, the adjusted output of the optical sensor is obtained as the output of the variable gain amplification means 11.

第2図は本発明の第2の実施例を示す自動利得
調整装置の機能ブロツク図である。本実施例と第
1の実施例との相違点は、介在レベルの比較手段
13bと更新手段15aである。即ち、第1の実
施例では、比較手段13aが誤差量として介在レ
ベルと介在レベル基準量の比を更新手段15へ出
力し、この比の逆数と直前の利得修正量との乗算
を更新手段15で行なつて利得修正量を更新して
いた。これに対し、本実施例では、比較手段13
bは介在レベル基準量に対する介在レベルの誤差
量を示す信号を更新手段15aへ出力する。更新
手段15aでは、この信号に基づいて誤差を小さ
くするように所定量を加減算することにより、直
前の利得修正量を更新する。つまり、比較手段1
3aが介在レベルと介在レベル基準量とを比較し
て介在レベルが大きい場合には、更新手段15a
は直前の利得修正量に対し、利得を小さくするよ
うに所定量を加減算し、介在レベルが小さい場合
には、更新手段15aは直前の利得修正量に対
し、利得を大きくするように所定量を加減算する
ことにより、新たな利得修正量を得る。
FIG. 2 is a functional block diagram of an automatic gain adjustment device showing a second embodiment of the present invention. The difference between this embodiment and the first embodiment is the intervention level comparing means 13b and the updating means 15a. That is, in the first embodiment, the comparing means 13a outputs the ratio between the intervention level and the intervention level reference amount as the error amount to the updating means 15, and the updating means 15 multiplies the reciprocal of this ratio by the immediately preceding gain correction amount. The gain correction amount was updated by doing this. On the other hand, in this embodiment, the comparison means 13
b outputs a signal indicating the error amount of the intervention level with respect to the intervention level reference amount to the updating means 15a. The updating means 15a updates the previous gain correction amount by adding or subtracting a predetermined amount based on this signal so as to reduce the error. In other words, comparison means 1
3a compares the intervention level with the intervention level reference amount and if the intervention level is large, the updating means 15a
adds or subtracts a predetermined amount from the previous gain correction amount to make the gain smaller, and when the intervention level is small, the updating means 15a adds or subtracts a predetermined amount from the previous gain correction amount to make the gain larger. By adding and subtracting, a new gain correction amount is obtained.

第3図は本発明の第3の実施例を示す自動利得
調整装置の機能ブロツク図である。同図におい
て、第1図と同一の参照符号は同一性のある構成
要素を示す。本実施例の装置は、可変利得増幅手
段11、比較手段12b,13a、更新手段15
bから構成される。更新手段15bは比較手段1
3aからの誤差量(比)に基づいて誤差が最小と
なるように直前の無介在レベル基準量を更新す
る。比較手段12bは更新された無介在レベル基
準量に対する無介在レベルの誤差が小さくなるよ
うに可変利得増幅手段11の利得を設定する。
FIG. 3 is a functional block diagram of an automatic gain adjustment device showing a third embodiment of the present invention. In this figure, the same reference numerals as in FIG. 1 indicate the same components. The device of this embodiment includes a variable gain amplifying means 11, comparing means 12b and 13a, and an updating means 15.
Consists of b. The updating means 15b is the comparing means 1
Based on the error amount (ratio) from 3a, the previous non-intervention level reference amount is updated so that the error is minimized. The comparison means 12b sets the gain of the variable gain amplification means 11 so that the error of the non-intervention level with respect to the updated non-intervention level reference amount becomes small.

次に、第3の実施例の動作を説明する。まず、
比較手段13aにより、過去の対象の介在状態に
おける介在レベルと予め設定された介在レベル基
準量との比が算出されて更新手段15bへ出力さ
れる。更新手段15bでは、比較手段13aから
の比の逆数と直前の無介在レベル基準量とが乗算
されて更新された無介在レベル基準量が比較手段
12bへ出力される。そして、比較手段12bで
は、更新手段15bからの無介在レベル基準量に
対する無介在レベルの誤差が最小となるような利
得が求められ、この利得が可変利得増幅手段11
へ送られて設定される。この結果、光センサの出
力が設定された利得に基づき可変利得増幅手段1
1によつて増幅(又は減衰)されて調整された出
力が得られる。
Next, the operation of the third embodiment will be explained. first,
The comparing means 13a calculates the ratio between the intervention level in the past intervention state of the target and the preset intervention level reference amount, and outputs it to the updating means 15b. The updating means 15b multiplies the reciprocal of the ratio from the comparing means 13a by the previous non-intervention level reference amount and outputs the updated non-intervention level reference amount to the comparing means 12b. Then, the comparison means 12b calculates a gain that minimizes the error of the non-intervention level with respect to the non-intervention level reference amount from the updating means 15b, and this gain is such that the variable gain amplification means 11
is sent to and configured. As a result, the output of the optical sensor is based on the set gain of the variable gain amplification means 1.
1 to obtain a regulated output.

第4図は本発明の第4の実施例を示す自動利得
調整装置の機能ブロツク図である。第3の実施例
との相違箇所は介在レベルの比較手段13bと無
介在レベル基準量の更新手段15cである。更新
手段15cは、第2の実施例の更新手段15と同
一の比較手段13bからの誤差量を示す信号に基
づいて誤差が最小となるように所定量を加減算し
て無介在レベル基準量を更新する。
FIG. 4 is a functional block diagram of an automatic gain adjustment device showing a fourth embodiment of the present invention. The difference from the third embodiment is the intervention level comparing means 13b and the non-intervention level reference amount updating means 15c. The updating means 15c updates the non-intervention level reference amount by adding or subtracting a predetermined amount based on the signal indicating the error amount from the comparing means 13b, which is the same as the updating means 15 of the second embodiment, so that the error is minimized. do.

第5図は本発明の第5の実施例を示す自動利得
調整装置の機能ブロツク図である。同図におい
て、第1図と同一の参照符号は同一性のある構成
要素を示す。本実施例の装置は、可変利得増幅手
段11、比較手段12c,13a、更新手段15
d、修正手段17から構成される。更新手段15
dは比較手段13aからの誤差量(比)に基づい
て誤差を最小となるように直前の無介在レベル修
正量を更新する。修正手段17は無介在レベルと
更新された無介在レベル修正量との乗算を行なつ
て無介在レベルを修正する。比較手段12cは予
め設定された無介在レベル基準量に対する修正さ
れた無介在レベルの誤差が最小となる利得を可変
利得増幅手段11に設定する。
FIG. 5 is a functional block diagram of an automatic gain adjustment device showing a fifth embodiment of the present invention. In this figure, the same reference numerals as in FIG. 1 indicate the same components. The device of this embodiment includes variable gain amplification means 11, comparison means 12c and 13a, and updating means 15.
d. It is composed of a correction means 17. Update means 15
d updates the previous non-intervention level correction amount based on the error amount (ratio) from the comparing means 13a so as to minimize the error. The correction means 17 multiplies the non-intervention level by the updated non-intervention level correction amount to correct the non-intervention level. The comparison means 12c sets a gain in the variable gain amplification means 11 that minimizes the error of the corrected non-intervention level with respect to a preset non-intervention level reference amount.

次に第5の実施例の動作を説明する。 Next, the operation of the fifth embodiment will be explained.

まず、比較手段13aにて、過去の介在レベル
と予め設定された介在レベル基準量との比が演算
されて更新手段15dへ出力される。更新手段1
5dでは比較手段13aからの比の逆数と直前の
無介在レベル修正量との積が更新された無介在レ
ベル修正量として修正手段17へ出力される。そ
の後、無介在レベルと更新された無介在レベル修
正量との乗算が修正手段17によつて行なわれ、
この結果の修正された無介在レベルが比較手段1
2cへ送られる。そして、比較手段12cでは、
修正手段12cから送られた無介在レベルと予め
設定された無介在レベル基準量との誤差が最小と
なるような利得が可変利得増幅手段11へ送られ
て設定される。この結果、調整された光センサの
出力が可変利得増幅手段11の出力に得られる。
First, the comparing means 13a calculates the ratio between the past intervention level and a preset intervention level reference amount, and outputs the ratio to the updating means 15d. Update means 1
5d, the product of the reciprocal of the ratio from the comparing means 13a and the immediately preceding non-intervention level correction amount is output to the correction means 17 as the updated non-intervention level correction amount. Thereafter, the non-intervention level is multiplied by the updated non-intervention level correction amount by the correction means 17,
The corrected unmediated level of this result is Comparison Means 1
Sent to 2c. And, in the comparison means 12c,
A gain that minimizes the error between the non-intervention level sent from the correction means 12c and a preset non-intervention level reference amount is sent to the variable gain amplification means 11 and set. As a result, the adjusted output of the optical sensor is obtained as the output of the variable gain amplification means 11.

第6図は本発明の第6の実施例を示す自動利得
調整装置の機能ブロツク図である。本実施例と第
5の実施例との相違部分は介在レベル用の比較手
段13bと無介在レベル修正量更新用の更新手段
15eである。即ち、更新手段15eは、第2及
び第4の実施例と同一の比較手段13bからの誤
差量を示す信号に基づいて、直前の無介在レベル
修正量に対し、誤差が最小となるように所定量を
加減算して無介在レベル修正量を更新する。
FIG. 6 is a functional block diagram of an automatic gain adjustment device showing a sixth embodiment of the present invention. The difference between this embodiment and the fifth embodiment is the comparison means 13b for the intervention level and the updating means 15e for updating the correction amount of the non-intervention level. That is, the updating means 15e updates the position so that the error is minimized with respect to the previous non-intervention level correction amount, based on the signal indicating the error amount from the comparison means 13b, which is the same as in the second and fourth embodiments. Update the non-intervention level correction amount by adding or subtracting the quantitative amount.

次に、本発明に係る自動利得調整装置を紙幣鑑
定装置に適用した場合の応用例について説明す
る。
Next, an application example in which the automatic gain adjustment device according to the present invention is applied to a banknote validation device will be described.

第7図は第1の実施例の自動利得調整装置を適
用した場合の紙幣鑑定装置の構成例を示すブロツ
ク図である。同図aの紙幣鑑定装置は、光源1及
び受光素子2を持つ複の光センサ20、複数の増
幅器21、アナログマルチプレクサ22、前述の
可変利得増幅手段11に相当する可変利得増幅器
23、A/D変換器24、ラツチ回路15a,1
5b、インタフエース(I/F)回路26、
ROM27、不揮発性RAM28,RAM29、及
びこれらを制御するマイクロプロセツサ30から
構成され、これらの構成要素は内部バスを介して
接続される。紙幣の鑑定に用いられる反射型又は
透過型の光センサ20の受光素子2により得られ
る電気信号は、対応する増幅器21により増幅さ
れる。マイクロプロセツサ30により与えられた
光センサ20の選択番号nに基づいて、アナログ
マルチプレクサ22は、複数の光センサ20のう
ち、ただ一つの光センサを選択し、その光センサ
に対応する増幅器21の出力信号を出力する。ア
ナログマルチプレクサ22の出力は、可変利得増
幅器23に入力される。一方、マイクロプロセツ
サ30は、可変利得増幅器23に対し利得Gnを
設定する。可変利得増幅器23は光センサの増幅
器21の出力をGn倍し、その結果をA/D変換
器24に出力する。A/D変換器24は、Gn倍
された光センサの増幅器21の出力信号をA/D
変換し、その変換結果はマイクロプロセツサ27
により読み取られる。上位制御装置に対するイン
タフエース(I/F)回路26は、上位制御装置
より各種の指令を受信した場合にはマイクロプロ
セツサ30に知らせ、また、マイクロプロセツサ
30が指令実行後には鑑定結果やがその他指令実
行結果等を上位制御装装置へ通知する。ROM2
7内にはマイクロプロセツサ30の制御手段(プ
ログラム)のほか鑑定用基準データ等が書込まれ
る。不揮発性RAM28は、後述する光センサの
出力調整のためのパラメータKo,Yo,Nが格納
されており、装置の電源がオフしてもデータを保
持する。ここで、英文字に添字nの付いた文字
(Ko,Yoなど)は、本来光センサ20毎に独立し
た複数個のデータであるが、その代表値としてセ
ンサ番号nの光センサに関するデータを表わすと
同時に、他のセンサ番号の光センサに関しても同
様であることを示すものとする。
FIG. 7 is a block diagram showing an example of the configuration of a banknote validation device to which the automatic gain adjustment device of the first embodiment is applied. The banknote validation device shown in FIG. Converter 24, latch circuit 15a, 1
5b, interface (I/F) circuit 26,
It consists of a ROM 27, a nonvolatile RAM 28, a RAM 29, and a microprocessor 30 that controls them, and these components are connected via an internal bus. An electrical signal obtained by the light receiving element 2 of a reflective or transmissive optical sensor 20 used for banknote authentication is amplified by a corresponding amplifier 21. Based on the selection number n of the photosensors 20 given by the microprocessor 30, the analog multiplexer 22 selects only one photosensor among the plurality of photosensors 20, and controls the amplifier 21 corresponding to that photosensor. Output the output signal. The output of analog multiplexer 22 is input to variable gain amplifier 23. On the other hand, the microprocessor 30 sets the gain Gn for the variable gain amplifier 23. The variable gain amplifier 23 multiplies the output of the optical sensor amplifier 21 by Gn and outputs the result to the A/D converter 24. The A/D converter 24 converts the output signal of the optical sensor amplifier 21 multiplied by Gn into an A/D converter.
The conversion result is sent to the microprocessor 27.
Read by An interface (I/F) circuit 26 for the higher-level control device notifies the microprocessor 30 when receiving various commands from the higher-level control device, and also notifies the microprocessor 30 of the judgment result after executing the command. Notifies the higher-level control equipment of other command execution results. ROM2
In addition to the control means (program) for the microprocessor 30, identification reference data and the like are written in the memory 7. The nonvolatile RAM 28 stores parameters K o , Y o , and N for adjusting the output of the optical sensor, which will be described later, and retains the data even when the power of the device is turned off. Here, the letters with the subscript n attached to the English letters (K o , Y o, etc.) are originally multiple pieces of data independent of each optical sensor 20, but the representative value is data regarding the optical sensor with sensor number n. At the same time, it indicates that the same applies to optical sensors with other sensor numbers.

次に紙幣鑑定装置の動作について説明する。 Next, the operation of the banknote validation device will be explained.

はじめに、例えば工場において完成した紙幣鑑
定装置に初めて電源投入したような場合には、後
述する光センサの出力調整の為のパラメータKo
Yo,N,Goは、不揮発性RAM28内に格納され
ていないので、上位制御装置からセンサ調整初期
化指令を発行するなどして、マイクロプロセツサ
30に次のような初期設定を行なわせる。
First, for example, when power is turned on for the first time to a completed banknote validation device in a factory, the parameters K o ,
Since Y o , N, and G o are not stored in the non-volatile RAM 28, the host controller issues a sensor adjustment initialization command to cause the microprocessor 30 to perform the following initial settings. .

即ち、マイクロプロセツサ30は、まず、利得
修正比(利得修正量)Ko、統計量(介在レベル)
Yo、統計枚数Nをそれぞれ Ko=1、0 Yo=0 N=0 とする。次にマイクロプロセツサ30は、利得
Goの初期設定手順を実行する。この手順は後述
する紙幣鑑定時における無介在時の調整処理と同
一の処理を行なうもので、そのフローチヤートを
第8図に示す。この無介在時の調整処理を実行す
ることにより、マイクロプロセツサ30は、第1
の実施例で述べた比較手段12aの役割を果す。
以下、第8図を参照し利得Goの初期設定手順
(無介在時の調整処理)を説明する。
That is, the microprocessor 30 first calculates the gain modification ratio (gain modification amount) K o and the statistic (intervention level).
Let Y o and the statistical number N of sheets be K o =1, 0 Y o =0 N=0, respectively. Next, the microprocessor 30 calculates the gain
Go through the initial setup steps. This procedure is the same as the adjustment process when there is no intervention during banknote appraisal, which will be described later, and a flowchart thereof is shown in FIG. By executing this adjustment process without intervention, the microprocessor 30
It plays the role of the comparison means 12a described in the embodiment.
The initial setting procedure for the gain G o (adjustment process without intervention) will be described below with reference to FIG.

まず、可変利得増幅器23の利得Goをg0とし
て仮設定する(S1)。ここで、設計時にg0を定
めておくわけであるが、gnaxg0gnio(ステツプ
S5の判定範囲)であれば任意に決定できる。次
に、利得Go(=g0)のときのA/D変換器24の
出力を調べる。A/D変換器24の出力Xoが所
定の出力範囲内(XnaxXoXnio)であるとき
には現在設定されている利得Goが調整結果とな
り、調整処理を終了する。この所定の出力範囲が
第1の実施例の無介在レベル基準量に相当する。
一方、A/D変換器24の出力Xoが前記所定の
出力範囲よりも大きな場合(Xo>Xnaxである場
合)には利得Goを減少させ、他方前記所定出力
範囲よりも小さな出力の場合(Xo<Xnioである
場合)には、利得Goを増加させる(S3,S
4)。その後、利得の増減の結果、得られた現在
の利得Goが設計上定められた範囲(gnaxGo
gnioであるか)内におさまつているか否かをチエ
ツクし、もし下限値gnioを下回る増幅率である場
合には、可変利得増幅器23の増幅率(利得)を
最低としているにもかかわらず、A/D変換器2
4の出力が大きいのでセンサ出力過大エラーと判
定し、逆に上限値gnaxを上回る利得である場合に
はセンサ出力過小エラーと判定する(S6,S
7)。これらのどちらの場合にも、エラー判定内
容を上位制御装置へ通知し、調整動作を打ち切
る。もし、現在の利得Goが設計上定められた範
囲(gnaxGognioである)内である場合には、
調整動作を続行し、S2のステツプから繰返す。
なお、設計時には、gnax,gnio、およびXnax
Xnioの値は、可変利得増幅器23の利得設定可能
範囲による制約条件や利得設定値の分解能、A/
D変換器24の分解能、さらにXnax,Xnioについ
ては最終的に必要とされる精度の仕様から適正に
定めておく。
First, the gain G o of the variable gain amplifier 23 is temporarily set as g 0 (S1). Here, g 0 is determined at the time of design, but it can be arbitrarily determined as long as g nax g 0 g nio (determination range in step S5). Next, the output of the A/D converter 24 when the gain G o (=g o ) is examined. When the output X o of the A/D converter 24 is within the predetermined output range (X nax X o X nio ), the currently set gain G o becomes the adjustment result, and the adjustment process ends. This predetermined output range corresponds to the non-intervention level reference amount of the first embodiment.
On the other hand, if the output X o of the A/D converter 24 is larger than the predetermined output range (X o > X nax ), the gain G o is decreased, and on the other hand, the output is smaller than the predetermined output range. (when X o < X nio ), increase the gain G o (S3, S
4). After that, as a result of gain increase/decrease, the current gain G o obtained is within the designed range (g nax G o
If the amplification factor is less than the lower limit value g nio , the amplification factor (gain) of the variable gain amplifier 23 is set to the lowest value. A/D converter 2
Since the output of 4 is large, it is determined that there is an excessive sensor output error, and conversely, if the gain exceeds the upper limit g nax , it is determined that there is an under-sensor output error (S6, S
7). In either of these cases, the content of the error determination is notified to the higher-level control device, and the adjustment operation is terminated. If the current gain G o is within the designed range (g nax G o g nio ), then
Continue the adjustment operation and repeat from step S2.
In addition, at the time of design, g nax , g nio , and X nax ,
The value of
The resolution of the D converter 24, as well as X nax and X nio , are properly determined based on the ultimately required accuracy specifications.

このようにしてS2〜S5のステツプを繰返し
て利得Goの値を修正していくと、センサ出力に
異常がなければ限られた繰返し回数内でA/D変
換出力が所定出力XnaxXoXnio)となるよう
な利得Goが求まる。求まつたGoの値はGoの初期
値としてマイクロプロセツサ30が不揮発性
RAM28へ書込んでGoの初期設定手順を終了す
る。
In this way, by repeating steps S2 to S5 and correcting the value of gain G o , if there is no abnormality in the sensor output, the A/D conversion output will change to the predetermined output X nax X o within a limited number of repetitions. Find the gain G o such that X nio ). The obtained value of G o is set as the initial value of G o by the microprocessor 30.
Write to RAM28 and complete the initial setting procedure of Go .

次に、紙幣鑑定時におけるマイクロプロセツサ
30による自動調整及びこれに付随する処理につ
いて第9図のフローチヤートを参照して説明す
る。
Next, automatic adjustment by the microprocessor 30 during banknote appraisal and associated processing will be described with reference to the flowchart of FIG.

まず、マイクロプロセツサ30は、上位制御装
置からI/F回路26を介して紙幣1枚の鑑定指
令を受け取ると、対象としての紙幣が無介在状態
であるか否かの判定を行なう(S11)。この判
定の結果、無介在状態でなければエラーの処理を
行ない、一方、無介在状態であれば、A/D変換
器24の出力を調べ、所定出力が得られるように
可変利得増幅器23の利得Goを第8図の処理手
順に従つて求め、その結果を不揮発性RAM28
へ格納する(S13)。
First, when the microprocessor 30 receives a command to authenticate one banknote from the host control device via the I/F circuit 26, it determines whether or not the target banknote is in the non-intervening state (S11). . As a result of this determination, if there is no intervention, error processing is performed; on the other hand, if there is no intervention, the output of the A/D converter 24 is checked and the gain of the variable gain amplifier 23 is adjusted so that a predetermined output is obtained. G o is determined according to the processing procedure shown in Fig. 8, and the result is stored in the non-volatile RAM 28.
(S13).

次に、不揮発性RAM13から利得修正比Ko
読み出してS13のステツプで求めた利得Go
掛け、その乗算結果Go′=Go×Kを可変利得増幅
器23に設定することによつて鑑定動作直前での
光センサ20の出力信号の利得調整が完了する。
Next, the gain correction ratio K o is read from the nonvolatile RAM 13 and multiplied by the gain G o obtained in step S13, and the multiplication result G o '=G o ×K is set in the variable gain amplifier 23. The gain adjustment of the output signal of the optical sensor 20 immediately before the appraisal operation is completed.

次に、光センサの出力を調べ、被鑑定紙幣が介
在するのを検知すると、以下の鑑定動作を開始す
る。
Next, the output of the optical sensor is checked, and when the presence of the banknote to be verified is detected, the following verification operation is started.

まず、被鑑定紙幣が介在期間中、各光センサ2
0毎に紙幣随所のA/D変換器24の出力を読み
取りRAM29にパターンデータとして格納する
(S16)。こうして得られた被鑑定紙幣のパター
ンデータから紙幣の特徴データを得た後、ROM
27内の鑑定用基準データと比較して鑑定を行な
う(S17)。この鑑定結果を上位制御装置に通
知する(S18)。
First, each optical sensor 2
The outputs of the A/D converters 24 at various locations on the banknotes are read for each zero and stored in the RAM 29 as pattern data (S16). After obtaining characteristic data of the banknote from the pattern data of the banknote to be appraised thus obtained, the ROM
Appraisal is performed by comparing with standard data for appraisal in 27 (S17). This appraisal result is notified to the host control device (S18).

このようにして、鑑定処理が終了すると、鑑定
結果のパターンデータを調整の為の計測値(介在
レベル)として処理するか否かを判断する(S1
9)。もし、被鑑定紙幣が真券とは認められなか
つたか、あるいは汚損があると認められた場合に
は、何もせずに鑑定指令実行を終了するが、それ
以外の場合、すなわち正常券と認められた場合に
は各光センサ毎のパターンデータの積分値Soを求
める(S20)。求まつたパターンデータの積分
値Soは今迄のパターンデータ積分値Soの総和、即
ち統計量Yoに加算する(S21)。この統計量Yo
への加算毎、即ち正常券の鑑定毎に統計枚数Nの
値がカウントアツプされる(S22)。この結果、
m枚目(例えばm=1000枚)に達した時点ではパ
ターンデータm枚分の統計結果Yoが得られ、あ
らかじめ定められた統計結果基準値(介在レベル
基準量)yoと前記統計結果との比、即ち利得修正
比Ko=yo/Yoを求めて不揮発性RAM28に格納
する(S24)。したがつて利得修正比Koの値は
更新される。そしてパターンデータ積分値の統計
量Yoと統計枚数Nをそれぞれ零に戻して再び統
計が行なえるようにした後、紙幣1枚鑑定指令の
実行を終了する(S25)。なお、S23のステ
ツプにて統計枚数Nがm枚に満たない場合にはそ
のまま終了する。
In this manner, when the appraisal process is completed, it is determined whether or not the pattern data of the appraisal result is to be processed as a measurement value (intervention level) for adjustment (S1
9). If the banknote to be appraised is not recognized as a genuine note or is found to be defaced, the execution of the appraisal command will be completed without doing anything. If so, the integrated value So of the pattern data for each optical sensor is determined (S20). The determined integral value So of the pattern data is added to the sum of the integral values So of the pattern data up to now, that is, the statistical quantity Y o (S21). This statistic Y o
The value of the statistical number N is incremented each time the number N is added to, that is, each time a normal ticket is evaluated (S22). As a result,
When the m-th sheet (for example, m = 1000 sheets) is reached, statistical results Y o for m sheets of pattern data are obtained, and a predetermined statistical result standard value (intervention level standard amount) Y o and the statistical results are combined. , that is, the gain correction ratio K o =y o /Y o is determined and stored in the nonvolatile RAM 28 (S24). Therefore, the value of the gain modification ratio K o is updated. Then, after returning the statistical amount Y o of the pattern data integral value and the statistical number N of bills to zero so that statistics can be performed again, the execution of the single banknote appraisal command is completed (S25). Incidentally, if the statistical number N of sheets is less than m at step S23, the process ends immediately.

以上の応用例では、第7図aに示したように、
可変利得増幅器が光センサ20の出力とA/D変
換器の入力との間に設けられたものであつたが、
第7図bに示す構成では可変利得増幅器が光セン
サ20を含み、その発光素子1の光量(点灯電
流)を与えられたゲインGoに基づいて設定する
ことによつて受光素子2の光電流出力自身を増幅
又は減衰させるよう構成されている。
In the above application example, as shown in Figure 7a,
Although a variable gain amplifier was provided between the output of the optical sensor 20 and the input of the A/D converter,
In the configuration shown in FIG. 7b, the variable gain amplifier includes a photosensor 20, and by setting the light amount (lighting current) of the light emitting element 1 based on a given gain G o , the photocurrent of the light receiving element 2 is set. It is configured to amplify or attenuate the output itself.

このように可変利得増幅手段は受光素子の光量
をコントロールすることによつても実現可能であ
り、また、必ずしもハードウエアで設けずに、
A/D変換器の読取りデータに対し、マイクロプ
ロセツサ30で乗除算処理するソフトウエアによ
つても実現可能なことも明らかである。
In this way, the variable gain amplification means can be realized by controlling the light amount of the light receiving element, and it is also possible to realize the variable gain amplification means without necessarily providing it with hardware.
It is clear that the present invention can also be realized by software that multiplies and divides the data read by the A/D converter using the microprocessor 30.

また、第2乃至第6の実施例について同様にし
て紙幣鑑別装置等に適用できるのは明らかであ
る。
Further, it is obvious that the second to sixth embodiments can be similarly applied to a bill validating device or the like.

以上のように、第1〜第6の実施例によれば、
計測した無介在レベルと介在レベルとの比を補正
する作用と、無介在レベルに基づいたゲイン補正
作用とによつて、従来問題であつた光源点灯後の
光出力の経時変化や装置内の温度によるセンサ出
力の経時変化などのような短時間の出力変動に対
しても追従性よく利得調整がなされるとともに無
介在レベルと介在レベルの比のバラツキによる調
整誤差が生じない。
As described above, according to the first to sixth embodiments,
By correcting the ratio between the measured non-intervening level and the intervening level and the gain correction action based on the non-intervening level, the conventional problems such as changes in light output over time after the light source is turned on and the temperature inside the device can be resolved. Gain adjustment can be performed with good followability even for short-term output fluctuations such as changes over time in the sensor output, and no adjustment errors occur due to variations in the ratio between the non-intervention level and the intervention level.

従つて、判別時の判別基準に予め光センサの出
力変動幅を見込んだマージンを持たせる必要がな
くなり、極めて厳密な判別が行なえるとともに、
保守調整が不要となる効果も期待出来るのであ
る。
Therefore, it is no longer necessary to set a margin in advance to take into account the output fluctuation range of the optical sensor in the discrimination criteria at the time of discrimination, and extremely precise discrimination can be performed.
The effect of eliminating the need for maintenance and adjustment can also be expected.

(発明の効果) 以上詳細に説明したように、本発明によれば、
対象がないときの光センサの出力レベルと対象が
あるときの光センサの出力レベルとの比を補正す
ると共に対象がないときの光センサの出力レベル
に基づき利得を設定しているので、短時間の光セ
ンサの出力変動に対して追従でき、しかも精度よ
く光センサの出力レベルを調整することができ
る。
(Effects of the Invention) As explained in detail above, according to the present invention,
The ratio of the output level of the optical sensor when there is no target and the output level of the optical sensor when there is an object is corrected, and the gain is set based on the output level of the optical sensor when there is no target, so it can be used for a short time. It is possible to follow fluctuations in the output of the optical sensor, and to adjust the output level of the optical sensor with high precision.

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

第1図乃至第6図はそれぞれ本発明の第1乃至
第6の実施例を示す自動利得調整装置の機能ブロ
ツク図、第7図a,bは本発明に係る自動利得調
整装置を適用した紙幣鑑定装置の構成例を示すブ
ロツク図、第8図は無介在時の調整処理を示すフ
ローチヤート、第9図は紙幣鑑定時の自動調整処
理を示すフローチヤート、第10図a,b,cは
光センサの構成例を示す断面図、第11図a,b
は従来の自動利得調整装置の構成例を示す機能ブ
ロツク図である。 1……発光素子、2……受光素子、3……カバ
ーガラス、4……スリツト、5……対象、6a〜
6c……センサケース、7……拡散板、8……拡
散反射板、11……可変利得増幅手段、12a〜
12c,13a〜13b……比較手段、15,1
5a〜15e……更新手段、16,17……修正
手段、20……光センサ、21……増幅器、22
……アナログマルチプレクサ、23……可変利得
増幅器、24……A/D変換器、25a,25b
……ラツチ回路、26……インタフエース(I/
F)回路、27……ROM、28……不揮発性
RAM、29……RAM、30……マイクロプロ
セツサ。
1 to 6 are functional block diagrams of automatic gain adjustment devices showing first to sixth embodiments of the present invention, respectively, and FIGS. 7a and 7b are banknotes to which the automatic gain adjustment device according to the present invention is applied. FIG. 8 is a flowchart showing an adjustment process without intervention; FIG. 9 is a flowchart showing an automatic adjustment process during banknote authentication; FIGS. 10a, b, and c are Cross-sectional view showing an example of the configuration of an optical sensor, FIGS. 11a and 11b
1 is a functional block diagram showing an example of the configuration of a conventional automatic gain adjustment device. 1... Light emitting element, 2... Light receiving element, 3... Cover glass, 4... Slit, 5... Target, 6a~
6c...Sensor case, 7...Diffusion plate, 8...Diffuse reflection plate, 11...Variable gain amplification means, 12a~
12c, 13a-13b... Comparison means, 15, 1
5a to 15e...updating means, 16, 17...correction means, 20...optical sensor, 21...amplifier, 22
... Analog multiplexer, 23 ... Variable gain amplifier, 24 ... A/D converter, 25a, 25b
...Latch circuit, 26...Interface (I/
F) Circuit, 27...ROM, 28...Nonvolatile
RAM, 29...RAM, 30...Microprocessor.

Claims (1)

【特許請求の範囲】 1 対象からの光を光電変換する光センサの出力
に設けられる自動利得調整装置において、 (a) 設定される利得に基づいて前記光センサの出
力を増幅又は減衰する可変利得増幅手段、 (b) 前記対象がないときの光センサの出力レベル
と、予め設定される第1の基準レベルとの誤差
が最小となるような利得を出力する第1の比較
手段、 (c) 前記対象があるときの過去の前記光センサの
出力レベルと、予め設定される第2の基準レベ
ルとの誤差量を出力する第2の比較手段、 (d) 前記第2の比較手段からの誤差量に基づい
て、当該誤差が最小となるように直前の利得修
正量を更新する更新手段、 (e) 前記更新手段からの利得修正量に基づいて第
1の比較手段からの利得を修正して前記可変利
得増幅手段に設定する修正手段、 とを具備することを特徴とする自動利得調整装
置。 2 前記過去の光センサの出力レベルが、過去の
複数の対象について統計処理した統計量である特
許請求の範囲第1項記載の自動利得調整装置。 3 前記第2の比較手段が誤差量として第2の基
準レベルに対する光センサの出力レベルの比であ
り、前記更新手段が当該比の逆数を直前の利得修
正量に乗算して更新する特許請求の範囲第1項又
は第2項記載の自動利得調整装置。 4 前記更新手段が誤差量に基づいて当該誤差が
最小となるように直前の利得修正量に対し所定量
を加減算する特許請求の範囲第1項又は第2項記
載の自動利得調整装置。 5 対象からの光を光電変換する光センサの出力
に設けられる自動利得調整装置において、 (a) 設定される利得に基づいて前記光センサの出
力を増幅又は減衰する可変利得増幅手段、 (b) 前記対象があるときの過去の前記センサの出
力レベルと予め設定される第2の基準レベルと
の誤差量を出力する第2の比較手段、 (c) 前記第2の比較手段からの誤差量に基づいて
当該誤差が最小となるように直前の第1の基準
レベルを更新する更新手段、 (d) 前記対象がないときの前記光センサの出力レ
ベルと、前記更新手段からの第1の基準レベル
との誤差が最小となるように利得を前記可変利
得増幅手段へ設定する第1の比較手段、 とを具備する自動利得調整装置。 6 対象からの光を光電変換する光センサの出力
に設けられる自動利得調整装置において、 (a) 設定される利得に基づいて前記光センサの出
力を増幅又は減衰する可変利得増幅手段、 (b) 前記対象があるときの過去の前記センサの出
力レベルと予め設定される第2の基準レベルと
の誤差量を出力する第2の比較手段、 (c) 前記第2の比較手段からの誤差量に基づいて
当該誤差が最小となるように直前のレベル修正
量を更新する更新手段、 (d) 前記更新手段からのレベル修正量に基づい
て、前記対象がないときの前記光センサの出力
レベルを修正して出力する修正手段、 (e) 前記修正手段の出力レベルと予め設定される
第1の基準レベルとの誤差が最小となるような
利得を前記可変利得増幅手段に設定する第1の
比較手段、 とを具備することを特徴とする自動利得調整装
置。
[Claims] 1. An automatic gain adjustment device provided at the output of an optical sensor that photoelectrically converts light from a target, comprising: (a) a variable gain that amplifies or attenuates the output of the optical sensor based on a set gain; (b) first comparison means that outputs a gain that minimizes the error between the output level of the optical sensor when there is no target and a first reference level set in advance; (c) a second comparing means for outputting an error amount between a past output level of the optical sensor when the object was present and a second reference level set in advance; (d) an error from the second comparing means; (e) updating the gain from the first comparison means based on the gain correction amount from the updating means; An automatic gain adjustment device comprising: correction means for setting the variable gain amplification means. 2. The automatic gain adjustment device according to claim 1, wherein the past output level of the optical sensor is a statistical amount statistically processed for a plurality of past objects. 3. The second comparing means is the ratio of the output level of the optical sensor to the second reference level as the error amount, and the updating means updates the gain by multiplying the reciprocal of the ratio by the immediately preceding gain correction amount. Automatic gain adjustment device according to range 1 or 2. 4. The automatic gain adjustment device according to claim 1 or 2, wherein the updating means adds or subtracts a predetermined amount from the previous gain correction amount based on the amount of error so that the error is minimized. 5. In an automatic gain adjustment device provided at the output of an optical sensor that photoelectrically converts light from a target, (a) variable gain amplification means that amplifies or attenuates the output of the optical sensor based on a set gain; (b) (c) a second comparing means for outputting an error amount between a past output level of the sensor when the object exists and a second reference level set in advance; (c) an error amount from the second comparing means; (d) an output level of the optical sensor when the target is not present and a first reference level from the updating means; an automatic gain adjustment device comprising: first comparison means for setting a gain to the variable gain amplification means so that an error between 6. In an automatic gain adjustment device provided at the output of an optical sensor that photoelectrically converts light from a target, (a) variable gain amplification means that amplifies or attenuates the output of the optical sensor based on a set gain; (b) (c) a second comparing means for outputting an error amount between a past output level of the sensor when the object exists and a second reference level set in advance; (c) an error amount from the second comparing means; (d) updating the output level of the optical sensor when the target is not present based on the level correction amount from the updating means; (e) first comparison means for setting a gain in the variable gain amplification means such that an error between the output level of the correction means and a preset first reference level is minimized; , An automatic gain adjustment device comprising:
JP62232575A 1987-09-18 1987-09-18 Automatic gain control apparatus Granted JPS6475925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62232575A JPS6475925A (en) 1987-09-18 1987-09-18 Automatic gain control apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62232575A JPS6475925A (en) 1987-09-18 1987-09-18 Automatic gain control apparatus

Publications (2)

Publication Number Publication Date
JPS6475925A JPS6475925A (en) 1989-03-22
JPH0547054B2 true JPH0547054B2 (en) 1993-07-15

Family

ID=16941496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62232575A Granted JPS6475925A (en) 1987-09-18 1987-09-18 Automatic gain control apparatus

Country Status (1)

Country Link
JP (1) JPS6475925A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008170185A (en) * 2007-01-09 2008-07-24 Omron Corp Photoelectric sensor and light receiving unit of photoelectric sensor

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2655169B2 (en) * 1988-06-17 1997-09-17 井上 宏明 Banknote identification method
JP2896288B2 (en) * 1993-05-24 1999-05-31 株式会社マイクロパック Banknote identification method
JP5632128B2 (en) * 2008-03-31 2014-11-26 アズビル株式会社 Sensor device
JP5982941B2 (en) * 2012-03-28 2016-08-31 村田機械株式会社 Yarn spot signal detection device and yarn winding machine
KR101518035B1 (en) * 2014-01-27 2015-05-06 호남대학교 산학협력단 banknote identifying machine and method of identifying banknote
JP6544079B2 (en) * 2015-06-29 2019-07-17 株式会社リコー Human body detection apparatus, image forming apparatus and human body detection method
JP7055296B2 (en) * 2018-04-11 2022-04-18 コーデンシ株式会社 Optical sensor and counter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008170185A (en) * 2007-01-09 2008-07-24 Omron Corp Photoelectric sensor and light receiving unit of photoelectric sensor

Also Published As

Publication number Publication date
JPS6475925A (en) 1989-03-22

Similar Documents

Publication Publication Date Title
US4147430A (en) Secondary detection system for security validation
US4769532A (en) Apparatus for adjusting optical sensors with threshold memory
EP0403983B1 (en) Method and apparatus for validating a paper-like piece
JPH0231140A (en) Method and apparatus for inspecting sheet-shaped substance
EP1357522B1 (en) Paper quality discriminating machine
US5855268A (en) Optical sensor system for a bill validator
JPH0547054B2 (en)
IE46075B1 (en) A method of and apparatus for checking a bank note
KR20040067963A (en) A banknote detecting unit for a banknote distinguishing device
KR20090067753A (en) Method for automated compensation
JP3440401B2 (en) Sensor automatic adjustment device
JP2804409B2 (en) Paper sheet reader
JP3642577B2 (en) Bill discrimination device
JPS59176606A (en) Detector for edge of flat plate body
KR0134855B1 (en) Method and device for distinction of bill
JP2006236370A (en) Bill discrimination method
JPH02189698A (en) Paper money discriminating device
JP3332956B2 (en) Banknote recognition device
JP2001209839A (en) Paper money identifying device
JP2570905Y2 (en) Paper sheet identification device
JPS6131509B2 (en)
JP3071440B2 (en) Adjustment confirmation device for paper sheet detection sensor
JP5905820B2 (en) Paper sheet discrimination device, method for adjusting paper sheet discrimination device, and program
KR101072766B1 (en) Method for correcting the result of paper money thickness measurement
JPS62137695A (en) Sheet paper discriminator