[go: up one dir, main page]

JPH02129701A - Digital comparator - Google Patents

Digital comparator

Info

Publication number
JPH02129701A
JPH02129701A JP28456188A JP28456188A JPH02129701A JP H02129701 A JPH02129701 A JP H02129701A JP 28456188 A JP28456188 A JP 28456188A JP 28456188 A JP28456188 A JP 28456188A JP H02129701 A JPH02129701 A JP H02129701A
Authority
JP
Japan
Prior art keywords
data
output
calculation
comparator
outputs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP28456188A
Other languages
Japanese (ja)
Inventor
Akihito Inoki
猪木 昭仁
Yoshinori Hayashi
好典 林
Akira Miki
晃 三木
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP28456188A priority Critical patent/JPH02129701A/en
Publication of JPH02129701A publication Critical patent/JPH02129701A/en
Pending legal-status Critical Current

Links

Landscapes

  • Feedback Control In General (AREA)
  • Manipulation Of Pulses (AREA)

Abstract

PURPOSE:To prevent a fact that an output causes chattering even if there is a small fluctuation in input data by allowing the digital comparator to have a hysteresis characteristic. CONSTITUTION:The digital comparator is provided with an arithmetic means 3, and a comparing means 5 for comparing an output of the arithmetic means 3 and reference data which is set in advance, and a data generating means 6 outputs first arithmetic data or second arithmetic data to the arithmetic means 3 in accordance with an output of the comparing means 5. This constitution has the same meaning as a fact that a hysteresis characteristic is given to the comparing means 5. In such a way, even if there is a small fluctuation in input data, it can be prevented that an output of the comparator causes chattering.

Description

【発明の詳細な説明】 「産業上の利用分野」 この発明はヒステリシス特性を有するディジタルコンパ
レータに関する。
DETAILED DESCRIPTION OF THE INVENTION "Field of Industrial Application" This invention relates to a digital comparator having hysteresis characteristics.

「従来の技術」 従来のディジタルコンパレータは、単に、入力データと
基準データとを比較し、その大小を示すデータを出力す
るだけのらのであった。
"Prior Art" A conventional digital comparator simply compares input data with reference data and outputs data indicating the magnitude of the comparison.

「発明が解決しようとする課題」 しかしながら、このような従来のディジタルコンパレー
タは、入力データが例えばA/D(アナログ/ディジタ
ル)コンバータの出力のように変換誤差があり不安定な
、言い替えれば小変動がしばしば起こるデータであった
場合、 コンパレータ出力がチャタリングを起こす恐れ
があった。
``Problems to be Solved by the Invention'' However, such conventional digital comparators have problems with input data that is unstable due to conversion errors, such as the output of an A/D (analog/digital) converter, in other words, small fluctuations. If this is data that occurs frequently, there is a risk that the comparator output may chattering.

この発明は上述した事情に鑑みてなされたもので、入力
データに小変動があっても、その出力がチャタリングを
起こすことがないディジタルコンパレータを提供するこ
とを目的としている。
The present invention has been made in view of the above-mentioned circumstances, and it is an object of the present invention to provide a digital comparator whose output does not cause chattering even if there are small fluctuations in input data.

「課題を解決するための手段」 第1発明は、外部から供給されるディジタルデータとデ
ータ発生手段から出力される演算データとを演算して出
力する演算手段と、前記演算手段の出力と予め設定され
ている基準データとを比較して両データの大小を検出し
、この検出結果を示すデータを出力する比較手段とを具
備してなり、前記データ発生手段は前記比較手段の出力
に対応して第1の演算データまたは第2の演算データを
前記演算手段へ出力することを特徴とする。
"Means for Solving the Problem" The first invention provides a calculation means for calculating and outputting digital data supplied from the outside and calculation data output from a data generation means, and a calculation means that calculates and outputs the digital data supplied from the outside and the calculation data output from the data generation means, and the output of the calculation means and the preset and comparing means for comparing the data with standard data, detecting the magnitude of both data, and outputting data indicating the detection result, and the data generating means corresponds to the output of the comparing means. It is characterized in that the first calculation data or the second calculation data is output to the calculation means.

また、第2発明は、データ発生手段から出力される演算
データと予め設定されている基準データとを演算して出
力する演算手段と、前記演算手段の出力と外部から供給
されるディジタルデータとを比較して両データの大小を
検出し、この検出結果を示すデータを出力する比較手段
とを具備してなり、前記データ発生手段は前記比較手段
の出力に対応して第1の演算データまたは第2の演算デ
ータを前記演算手段へ出力することを特徴としている。
A second invention also provides a calculation means for calculating and outputting the calculation data output from the data generation means and preset reference data, and a calculation means for calculating and outputting the calculation data output from the data generation means and the digital data supplied from the outside. Comparing means detects the magnitude of both data by comparison and outputs data indicating the detection result, and the data generating means generates the first calculated data or the first calculated data in response to the output of the comparing means. It is characterized in that the calculation data of No. 2 is output to the calculation means.

「作用」 第1発明によれば、比較手段の出力に応じて異なるデー
タが人力データに加算(または減算)され、この加算(
減算)されたデータと基準データとが比較される。この
構成は比較手段にヒステリシス特性を付与したことと同
等の意味を有し、したがって、入力されるデータに小変
動があっても、 コンパレータ出力がチャタリングを起
こすことがない。
"Operation" According to the first invention, different data is added (or subtracted) to the human data according to the output of the comparison means, and this addition (
The subtracted data and reference data are compared. This configuration has the same meaning as adding hysteresis characteristics to the comparison means, and therefore, even if there are small fluctuations in the input data, the comparator output does not chattering.

また、第2発明によれば、基準データに比較手段の出力
に応じて決まるデータが加算(または減算)され、この
加算(減算)されたデータと入力データとが比較される
。この構成により、比較手段にヒステリシス特性が付与
され、したがって、コンバータ出力のチャタリングを防
止することができる。
According to the second invention, data determined according to the output of the comparing means is added (or subtracted) to the reference data, and the added (subtracted) data is compared with the input data. With this configuration, a hysteresis characteristic is imparted to the comparing means, and therefore chattering of the converter output can be prevented.

「実施例」 以下、図面を参照してこの発明の実施例について説明す
る。第1図はこの発明の第1の実施例によるディジタル
コンパレータ1の構成を示すブロック図である。この図
に示すディジタルコンパレータ蔦は、A/Dコンバータ
2の出力データと内部に設定されている定数とを比較し
、前者が後者より大の場合に“l“信号を、小の場合に
“0”信号を各々出力するものである。
"Embodiments" Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a digital comparator 1 according to a first embodiment of the present invention. The digital comparator shown in this figure compares the output data of the A/D converter 2 with a constant set internally, and outputs an "l" signal when the former is larger than the latter, and outputs a "0" signal when the latter is smaller. ``It outputs each signal.

第1図において、TIはA/Dコンバータ2の出力デー
タDaが印加される入力端子、3は入力データDaとヒ
ステリシス量レジスタ4の出力データDhとを加算し、
この加算結果をデータDsとして比較器5へ出力する加
算器である。比較器5は、上述したデータD8と定数発
生器6から出力されている定数データKlとを比較し、
Ds≧Klの場合に11”を、Ds<Klの場合には“
0″を各々出力する。この比較器5の出力データDoは
出力端子T2へ供給されると共に、ヒステリシス量レジ
スタ4へ供給される。ヒステリシス量レジスタ4は、デ
ータDoが“O”の時は出力データDhとして「0」を
出力し、また、データDoが“i”の時はデータDhと
して一定値に2を出力する。
In FIG. 1, TI is an input terminal to which output data Da of the A/D converter 2 is applied, 3 is an input terminal that adds the input data Da and the output data Dh of the hysteresis amount register 4,
This adder outputs the addition result to the comparator 5 as data Ds. The comparator 5 compares the above-mentioned data D8 and the constant data Kl output from the constant generator 6,
11” when Ds≧Kl, and “11” when Ds<Kl.
0" respectively. The output data Do of the comparator 5 is supplied to the output terminal T2 and also to the hysteresis amount register 4. The hysteresis amount register 4 outputs an output when the data Do is "O". "0" is output as the data Dh, and when the data Do is "i", a constant value of 2 is output as the data Dh.

次に、上述した実施例の動作を第2図に示す波形図を参
照して説明する。いま、A/Dコンバータ2の入力端へ
第2図(イ)に示すアナログ電圧が供給されたとすると
、A/Dコンバータ2から同図(ロ)に示すディジタル
データDaが出力される。
Next, the operation of the above embodiment will be explained with reference to the waveform diagram shown in FIG. Assuming that the analog voltage shown in FIG. 2 (A) is supplied to the input terminal of the A/D converter 2, the A/D converter 2 outputs digital data Da shown in FIG. 2 (B).

なお、この図において、符号EはA/Dコンバータ2の
変換エラーに基づくデータを示す。また、破線は定数発
生器6の出力データKlである。この図に示す時刻t1
において、Da>Klになると、Da>Klとなること
から、第2図(ニ)に示すように、比較器5の出力デー
タDoが“l”となり、このデータDo“1“が出力端
子T2へ供給されると共に、ヒステリシス量レジスタ4
へ供給される。
Note that in this figure, symbol E indicates data based on a conversion error of the A/D converter 2. Moreover, the broken line is the output data Kl of the constant generator 6. Time t1 shown in this figure
When Da>Kl, the output data Do of the comparator 5 becomes "l" as shown in FIG. 2 (d), and this data Do "1" is applied to the output terminal T2 and the hysteresis amount register 4.
supplied to

ヒステリシス量レジスタ4ヘデータDO“1′が供給さ
れると、同レジスタ4からデータDhとして「K2」が
出力され、加算器3へ供給される。これにより、以後、
第2図(ハ)に示すように、Ds=Da+に2となる。
When data DO "1'" is supplied to the hysteresis amount register 4, "K2" is outputted from the register 4 as data Dh and supplied to the adder 3. As a result, from now on,
As shown in FIG. 2(c), Ds=Da+ becomes 2.

次に、時刻t、において、Ds<Klになると、比較器
5の出力データDoが“0“となり、このデータDO“
0“が出力端子T2へ供給されると共に、ヒステリンス
単しノスタ4へ供給される。これにより、以後、Dh=
0となり、Ds=Daとなる。
Next, at time t, when Ds<Kl, the output data Do of the comparator 5 becomes "0", and this data DO"
0" is supplied to the output terminal T2 and also supplied to the hysteresis unit Nostar 4. As a result, from now on, Dh=
0, and Ds=Da.

次に、時刻t3においてDs>Klになると、再びデー
タDoが“l“となり、以下、上記の動作が繰り返され
る。
Next, when Ds>Kl at time t3, data Do becomes "l" again, and the above operation is repeated.

このように、上記の実施例によれば、データDaが上昇
してデータKlを越えると、以後、データDsとしてr
Da+に2Jが比較器5へ供給される。
In this way, according to the above embodiment, when the data Da rises and exceeds the data Kl, from then on, r is set as the data Ds.
2J is supplied to the comparator 5 on Da+.

したがって、データDaが下降してデータKlに達して
も、データDsはいまだrK−1+に2(>Kl)」で
あり、したがって比較器5の出力データは“l“を続け
る。そして、データDaがさらに下降し、r−Kl−に
2Jを過ぎると、Ds<Klとなり、比較器5の出力デ
ータDoが“0”に反転する。これにより、データDh
が0となり、以後、Ds=Daとなる。そして、データ
Daが上昇して再びデータKlを越えると、比較器5の
出力データDoが“l”になると共に、Ds=Da十に
2となり、以下、上記と同様の動作が繰り返される。
Therefore, even if the data Da falls and reaches the data Kl, the data Ds is still rK-1+2 (>Kl), and therefore the output data of the comparator 5 continues to be "l". Then, when the data Da further decreases and passes 2J to r-Kl-, Ds<Kl, and the output data Do of the comparator 5 is inverted to "0". As a result, the data Dh
becomes 0, and thereafter Ds=Da. Then, when the data Da rises and exceeds the data Kl again, the output data Do of the comparator 5 becomes "L" and Ds=Da+2, and the same operation as described above is repeated.

しかして、上記の動作から明らかなように、このディジ
タルコンパレータはヒステリシス特性を有しており、し
たがって、入力データDaの小振動に応答して出力デー
タDoがチャタリングすることがない。
As is clear from the above operation, this digital comparator has a hysteresis characteristic, so that the output data Do does not chattering in response to small vibrations in the input data Da.

なお、第1図における加算器3およびヒステリス量しノ
スタ4がなく、比較器5および定数発生器6のみの場合
は、データDoが第2図(へ)のように変化し、符号C
Hで示すチャタリングが発生する。
In addition, when the adder 3 and the hysteresis quantity nostar 4 in FIG. 1 are not present, and only the comparator 5 and the constant generator 6 are used, the data Do changes as shown in FIG. 2 (to), and the sign C
Chattering indicated by H occurs.

次に、第3図はこの発明の第2の実施例によるディジタ
ルコンパレータItの構成を示すブロック図であり、こ
の図において第1図の各部に対応する部分には同一の符
号を付しである。この図に示すディジタルコンパレータ
11が第1図に示すものと異なる点は次の2点である。
Next, FIG. 3 is a block diagram showing the configuration of a digital comparator It according to a second embodiment of the present invention, and in this figure, parts corresponding to those in FIG. 1 are given the same reference numerals. . The digital comparator 11 shown in this figure differs from the one shown in FIG. 1 in the following two points.

■第1図に示すものが入力データDaにデータDhを加
算していたのに対し、このディジタルコンパレータ11
においては、定数発生器6の出力データKl(基準デー
タ)にデータDhを加算している。
■While the one shown in FIG. 1 adds data Dh to input data Da, this digital comparator 11
, data Dh is added to the output data Kl (reference data) of the constant generator 6.

■第1図のヒステリノス攬レジスタ4は、データDoが
“1”の時「K2」、“0”の時「0」となるデータD
hを出力するが、この実施例におけるヒステリンス量し
ノスタ4aは、上記と逆に、データD。
■The hysterinosis register 4 in FIG.
However, in this embodiment, the hysteresis amount nostar 4a outputs data D, contrary to the above.

力じO”の時「K2」、“l”の時「0」となるデータ
Dhを出力する。
It outputs data Dh which becomes "K2" when the force is "O" and "0" when it is "l".

次に、第3図のディジタルコンパレータ11の動作を説
明する。まず、比較器5の出力データDOが“l”にあ
り、データDhが「0」であるとする。
Next, the operation of the digital comparator 11 shown in FIG. 3 will be explained. First, it is assumed that the output data DO of the comparator 5 is "1" and the data Dh is "0".

この状態において、入力データDaが徐々に下降し、デ
ータKlより小になると、比較器5の出力データDoが
“0”に反転し、したがって、データDhが「K2」と
なり、また、加算器3の出力データDsがrK1+に2
jとなる。次に、データDaが徐々に上昇してデータに
1に達しても、この時、Da<Dsであることから、比
較器5の出力に変化はない。次に、データDaがさらに
上昇し、データrKl+に2Jを過ぎると、Da>Ds
となり、比較器5の出力データDoが“l“に反転し、
また、データDhが「0」となる。次に、データDaが
下降し、rKI+に2Jに達してもデータDoに変化は
ない。そして、データDaがrKIjに達すると、デー
タDoが再び反転し、以下、上記と同様の動作が行なわ
れる。しかして、この実施例にょるディジタルコンパレ
ータ11もヒステリシス特性を何している。
In this state, when the input data Da gradually decreases and becomes smaller than the data Kl, the output data Do of the comparator 5 is inverted to "0", and therefore the data Dh becomes "K2", and the adder 3 The output data Ds of is 2 to rK1+.
becomes j. Next, even if the data Da gradually increases and reaches data 1, there is no change in the output of the comparator 5 because Da<Ds at this time. Next, the data Da further increases and when the data rKl+ exceeds 2J, Da>Ds
Then, the output data Do of the comparator 5 is inverted to "l",
Further, data Dh becomes "0". Next, even when the data Da falls and reaches 2J at rKI+, there is no change in the data Do. Then, when the data Da reaches rKIj, the data Do is inverted again, and the same operation as above is performed thereafter. The digital comparator 11 according to this embodiment also has hysteresis characteristics.

なお、上記第1.第2の実施例において、ヒステリシス
データKlの値は入力データDaの安定度(小変動の幅
)に応じた値とすることが望ましい。
In addition, the above 1. In the second embodiment, it is desirable that the value of the hysteresis data Kl be a value that corresponds to the stability (width of small fluctuations) of the input data Da.

また、上記実施例において、入力データDaの安定度を
常時計測し、その計測結果に応じてデータKlの値を修
正するようにしてもよい。このようにすると、人力デー
タDaの安定度が変化しても常に最適なヒステリシスデ
ータに2をヒステリンス爪レジスタ4または4aに設定
することができる。
Further, in the above embodiment, the stability of the input data Da may be constantly measured and the value of the data Kl may be corrected according to the measurement result. In this way, even if the stability of the human input data Da changes, 2 can always be set as the optimum hysteresis data in the hysteresis claw register 4 or 4a.

また、上記実施例においては、加算器3を用いているが
、これに代えて、減算器を用いてもよい。
Further, in the above embodiment, the adder 3 is used, but a subtracter may be used instead.

「発明の効果」 以上説明したように、この発明によるディジタルコンパ
レータはヒステリス特性を有しているので、入力データ
に小変動があっても、出力がチャタリングを起こすこと
がない効果が得られる。
"Effects of the Invention" As explained above, since the digital comparator according to the present invention has hysteresis characteristics, it is possible to obtain an effect that the output does not chattering even if there is a small fluctuation in the input data.

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

第1図はこの発明の第1の実施例の構成を示すブロック
図、第2図は同実施例の動作を説明するための波形図、
第3図はこの発明の第2の実施例の構成を示すブロック
図である。 3・・・・・・加算器、4.48・・・・・・ヒステリ
ス量レジスタ、5・・・・・・比較器、6・・・・・・
定数発生器。
FIG. 1 is a block diagram showing the configuration of a first embodiment of the present invention, and FIG. 2 is a waveform diagram for explaining the operation of the same embodiment.
FIG. 3 is a block diagram showing the configuration of a second embodiment of the invention. 3... Adder, 4.48... Hysteresis amount register, 5... Comparator, 6...
Constant generator.

Claims (2)

【特許請求の範囲】[Claims] (1)外部から供給されるディジタルデータとデータ発
生手段から出力される演算データとを演算して出力する
演算手段と、前記演算手段の出力と予め設定されている
基準データとを比較して両データの大小を検出し、この
検出結果を示すデータを出力する比較手段とを具備して
なり、前記データ発生手段は前記比較手段の出力に対応
して第1の演算データまたは第2の演算データを前記演
算手段へ出力することを特徴とするディジタルコンパレ
ータ。
(1) A calculation means that calculates and outputs digital data supplied from the outside and calculation data output from the data generation means, and a calculation means that compares the output of the calculation means with preset reference data. and a comparison means for detecting the magnitude of the data and outputting data indicating the detection result, and the data generation means generates first calculation data or second calculation data in response to the output of the comparison means. A digital comparator, characterized in that it outputs to the calculation means.
(2)データ発生手段から出力される演算データと予め
設定されている基準データとを演算して出力する演算手
段と、前記演算手段の出力と外部から供給されるディジ
タルデータとを比較して両データの大小を検出し、この
検出結果を示すデータを出力する比較手段とを具備して
なり、前記データ発生手段は前記比較手段の出力に対応
して第1の演算データまたは第2の演算データを前記演
算手段へ出力することを特徴とするディジタルコンパレ
ータ。
(2) A calculation means that calculates and outputs the calculation data output from the data generation means and preset reference data, and a calculation means that compares the output of the calculation means with digital data supplied from the outside. and a comparison means for detecting the magnitude of the data and outputting data indicating the detection result, and the data generation means generates first calculation data or second calculation data in response to the output of the comparison means. A digital comparator, characterized in that it outputs to the calculation means.
JP28456188A 1988-11-10 1988-11-10 Digital comparator Pending JPH02129701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28456188A JPH02129701A (en) 1988-11-10 1988-11-10 Digital comparator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28456188A JPH02129701A (en) 1988-11-10 1988-11-10 Digital comparator

Publications (1)

Publication Number Publication Date
JPH02129701A true JPH02129701A (en) 1990-05-17

Family

ID=17680055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28456188A Pending JPH02129701A (en) 1988-11-10 1988-11-10 Digital comparator

Country Status (1)

Country Link
JP (1) JPH02129701A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190008149A (en) * 2017-07-14 2019-01-23 에이블릭 가부시키가이샤 Switching regulaor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5520514A (en) * 1978-07-28 1980-02-14 Toshiba Corp Electronic thermostat

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5520514A (en) * 1978-07-28 1980-02-14 Toshiba Corp Electronic thermostat

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190008149A (en) * 2017-07-14 2019-01-23 에이블릭 가부시키가이샤 Switching regulaor
JP2019022295A (en) * 2017-07-14 2019-02-07 エイブリック株式会社 Switching regulator

Similar Documents

Publication Publication Date Title
JP2924373B2 (en) A / D conversion circuit
KR980700638A (en) APPARATUS FOR COMPENSATING FOR NON-LINEAR CHARACTERISTICS OF MAGNETORESISTIVE HEADS
JPH10145231A (en) Data correcting method for a/d conversion device and d/a conversion device
JP2002111495A (en) Digital-analog conversion circuit
JPH02129701A (en) Digital comparator
EP0144143A2 (en) Circuit arrangement for adjusting sound volume
JPH0927749A (en) Voltage monitor device
JP3143117B2 (en) Signal processing device
JPS62281523A (en) Modulation circuit
JP2675455B2 (en) Variable delay device
JP3083254B2 (en) A / D converter
JPS60142735A (en) Overflow detecting and correcting circuit
JP3099542B2 (en) Digital input amplitude calculation method for AC input amplitude
JPS61242119A (en) Digital-to-analog converter
JPS60210029A (en) Temperature correction type digital-analog converter
JP3387165B2 (en) Clamp potential correction circuit
JPH04331475A (en) Inverter current detecting method
JPH06180333A (en) Voltage detecting device
JP2766876B2 (en) Glitch pattern detection circuit
JPS6281814A (en) Analog-digital conversion circuit
JPH04285863A (en) Voltage measuring method and apparatus using the same
JPS6281815A (en) Analog-digital conversion circuit
JPH06189160A (en) Digital gamma correcting device
JPH0590963A (en) Analog output circuit
JPS63266928A (en) Digital-analog converter