JPH0486570A - Detection of peak point for ac signal - Google Patents

Detection of peak point for ac signal

Info

Publication number
JPH0486570A
JPH0486570A JP20202990A JP20202990A JPH0486570A JP H0486570 A JPH0486570 A JP H0486570A JP 20202990 A JP20202990 A JP 20202990A JP 20202990 A JP20202990 A JP 20202990A JP H0486570 A JPH0486570 A JP H0486570A
Authority
JP
Japan
Prior art keywords
signal
comparator
analog value
output signal
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.)
Pending
Application number
JP20202990A
Other languages
Japanese (ja)
Inventor
Toru Watanabe
徹 渡辺
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP20202990A priority Critical patent/JPH0486570A/en
Publication of JPH0486570A publication Critical patent/JPH0486570A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Abstract

PURPOSE:To achieve shorter processing time for detection by having a period during which an AC signal coincides with respective analog values rising (falling) or falling (rising) to detect a maximum (minimum) point of the AC signal. CONSTITUTION:When a specified bit of digital value is preset on a register 2 through an internal bus 1, the value is converted to an analog value (threshold) with a D/A converter 3. A comparator 4 compares an AC signal S with the threshold and an output signal thereof 4 is transferred to the bus 1. First, when the signal S coincides with the threshold rising at the time Ta, the output signal of the comparator 4 rises from 1 to 0 to be transferred to the bus 1 and the operation of an internal timer is started. Thereafter, at the time Tb, as the signal S coincides with the threshold falling, the output signal of the comparator 4 rises from 0 to 1 to be transferred to the bus 1 again and the operation of the internal timer is ended. Then, the period (Tb-T>=a) is halved to detect a maximum point Vmax of the signal S.

Description

【発明の詳細な説明】 (イ)産業上の利用分野 本発明は、交流信号のピーク点の検出方法に関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION (a) Field of Industrial Application The present invention relates to a method for detecting a peak point of an alternating current signal.

(ロ)従来の技術 従来、マイクロコンピュータにおいて、交流信号の最大
点又は最小点を検出する場合、交流信号のサンプリング
ポイントと閾値(変更可能)との大小を比較していた。
(b) Prior Art Conventionally, in a microcomputer, when detecting the maximum or minimum point of an AC signal, a sampling point of the AC signal is compared with a threshold (changeable).

即ち、交流信号の全サンプリングポイントが閾値より小
となった時に該交流信号の最大点を検出し、交流信号の
全サンプリングポイントが閾値より犬となった時に該交
流信号の最小点を検出していた。
That is, the maximum point of the AC signal is detected when all the sampling points of the AC signal are smaller than the threshold, and the minimum point of the AC signal is detected when all the sampling points of the AC signal are smaller than the threshold. Ta.

(ハ)発明が解決しようとする課題 しかしながら、交流信号の各サンプリングポイント毎に
閾値を変更しなければならない為、交流信号の最大点又
は最小点を検出するためのプログラムの処理回数が多く
なって、交流信号の最大点又は最小点を検出するための
処理時間が長くなってしまう問題点があった。
(c) Problems to be Solved by the Invention However, since the threshold value must be changed for each sampling point of the AC signal, the number of processing times of the program to detect the maximum or minimum point of the AC signal increases. However, there is a problem in that the processing time required to detect the maximum or minimum point of the AC signal becomes long.

そこで、本発明は、交流信号の最大点又は最小点を検出
するための処理時間を短くできる交流信号のピーク点の
検出方法を提供することを目的とする。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a method for detecting a peak point of an AC signal, which can shorten the processing time for detecting the maximum point or minimum point of an AC signal.

(ニ)課題を解決するための手段 本発明は、前記問題点を解決する為に成されたものであ
り、第一に、所定ビットのデジタル値がプリセットされ
るレジスタと、該レジスタにプリセットされたデジタル
値をアナログ値に変換するDAコンバータと、該DAコ
ンバータにて変換されたアナログ値と所定の交流信号と
を比較するコンパレータと、を備え、前記交流信号が上
昇しながら前記アナログ値と一致した時、前記コンパレ
ータの8力信号に基づいてタイマー動作を開始させ、そ
の後、前記交流信号が下降しながら前記アナログ値と一
致した時、前記コンパレータの出力信号に基づいてタイ
マー動作を終了させ、タイマー動作を開始させてから終
了させるまでの期間を1/2することによって、前記交
流信号の最大点を検出することを特徴とする。第二に、
所定ビットのデジタル値がプリセットされるレジスタと
、該レジスタにプリセットされたデジタル値をアナログ
値に変換するDAコンバータと、該DAコンバータにて
変換されたアナログ値と所定の交流信号とを比較するコ
ンパレータと、を備え、前記交流信号が下降しながら前
記アナログ値と一致した時、前記コンパレータの出力信
号に基づいてタイマー動作を開始させ、その後 前記交
流信号が上昇しながら前言己アナログ値と一致した時、
前記コンパレータの出力信号に基づいてタイマー動作を
終了させ、タイマー動作を開始させてから終了させるま
での期間を1/2することによって前記交流信号の最小
点を検出することを特徴とする。
(d) Means for Solving the Problems The present invention has been made to solve the above-mentioned problems, and firstly, it provides a register in which a digital value of a predetermined bit is preset, and a register in which a digital value of a predetermined bit is preset. a DA converter that converts a digital value into an analog value; and a comparator that compares the analog value converted by the DA converter with a predetermined AC signal, and the AC signal increases and matches the analog value. Then, when the AC signal falls and matches the analog value, the timer operation is started based on the output signal of the comparator, and the timer operation is started based on the output signal of the comparator. The present invention is characterized in that the maximum point of the AC signal is detected by halving the period from the start to the end of the operation. Secondly,
A register in which a digital value of a predetermined bit is preset, a DA converter that converts the digital value preset in the register into an analog value, and a comparator that compares the analog value converted by the DA converter with a predetermined AC signal. and when the AC signal matches the analog value while falling, a timer operation is started based on the output signal of the comparator, and thereafter, when the AC signal matches the analog value while rising. ,
The present invention is characterized in that the minimum point of the AC signal is detected by terminating the timer operation based on the output signal of the comparator and halving the period from when the timer operation is started to when it is terminated.

(ホ)作用 本発明によれば、交流信号が上昇しながらアナログ値と
一致した時、コンパレータの出力信号に基づいてタイマ
ー動作を開始させ その後、交流信号が下降しながらア
ナログ値と一致した時、コン)<レータの出力信号に基
づいてタイマー動作を終了させ、タイマー動作を開始さ
せてから終了させるまでの期間を1/2することによっ
て、交流信号の最大点を検出できる。同様に、交流信号
が下降しながらアナログ値と一致した時、コンパレータ
の出力信号に基づいてタイマー動作を開始させ、その後
、交流信号が上昇しながらアナログ値と一致した時、コ
ンパレータの出力信号に基づいてタイマー動作を終了さ
せ、タイマー動作を開始させてから終了させるまでの期
間を1/2することによって、交流信号の最小点を検出
できる。
(E) Effect According to the present invention, when the AC signal increases and matches the analog value, a timer operation is started based on the output signal of the comparator, and then, when the AC signal decreases and matches the analog value, The maximum point of the AC signal can be detected by terminating the timer operation based on the output signal of the controller and halving the period from the start to the end of the timer operation. Similarly, when the AC signal is falling and matches the analog value, the timer operation is started based on the output signal of the comparator, and then when the AC signal is rising and matches the analog value, the timer operation is started based on the output signal of the comparator. The minimum point of the AC signal can be detected by terminating the timer operation and halving the period from the start to the end of the timer operation.

(へ)実施例 本発明の詳細を図面に従って具体的に説明する。(f) Example The details of the present invention will be specifically explained with reference to the drawings.

第1図は本発明を実施するためのマイクロコンピュータ
の要部ブロック図、第2図は本発明を説明するための波
形図である。
FIG. 1 is a block diagram of essential parts of a microcomputer for implementing the present invention, and FIG. 2 is a waveform diagram for explaining the present invention.

第1図において、所定ビットのデジタル値が内部バス(
1)を介してレジスタ(2)にプリセットされると、所
定ビットのデジタル値はDAコンバータ(3)によって
アナログ値(以下閾値と称す)に変換され、交流信号S
及び閾値はコンパレータ(4)によって比較され、コン
)<レータ(4)の出力信号は内部バス(1)に転送さ
れる。
In Figure 1, the digital value of a predetermined bit is transferred to an internal bus (
1), the digital value of the predetermined bit is converted into an analog value (hereinafter referred to as threshold value) by the DA converter (3), and the alternating current signal S
and the threshold value are compared by a comparator (4), and the output signal of the comparator (4) is transferred to the internal bus (1).

まず、交流信号Sの最大点■ゆ、。を検出する場合につ
いて説明する0時刻T、において 交流信号Sが上昇し
ながら閾値と一致すると、コンパレータ(4)の出力信
号が「1」から「0」に立ち下がって内部バス(1)に
転送される為、内部タイマー(図示せず)の動作は開始
される。その後、時刻Tbにおいて、交流信号Sが下降
しながら閾値と一致すると、コンパレータ(4)の出力
信号が「0」から「1」に立ち上がって内部バス(1)
に再び転送される為、内部タイマーの動作は終了される
。そして、内部タイマーの動作が開始されてから終了さ
れるまでの期間(T b−T 、)が1/2され、交流
信号Sの最大点■1,8は検出されることになる。
First, the maximum point of the AC signal S. At time 0 T, when the AC signal S rises and matches the threshold value, the output signal of the comparator (4) falls from "1" to "0" and is transferred to the internal bus (1). Therefore, the operation of an internal timer (not shown) is started. Thereafter, at time Tb, when the AC signal S falls and matches the threshold value, the output signal of the comparator (4) rises from "0" to "1" and the internal bus (1)
Since the data is transferred again to , the operation of the internal timer is terminated. Then, the period (T b - T ) from when the operation of the internal timer starts to when it ends is halved, and the maximum points 1 and 8 of the AC signal S are detected.

次に、交流信号Sの最小点V m I nを検出する場
合について説明する。時刻T、において、交流信号Sが
下降しながら閾値と一致すると、コンパレータ(4)の
出力信号が「0」から「1」に立ち上がって内部バス(
1)に転送される為、内部タイマーの動作は開始される
。その後、時刻Tcにおいて、交流信号Sが上昇しなが
ら閾値と一致すると、コンパレータ(4)の出力信号が
「1」から「0」に立ち下がって内部バス目)に再び転
送される為、内部タイマーの動作は終了される。そして
、内部タイマーの動作が開始されてから終了されるまで
の期間(T e−T b)が1/2さね、交流信号Sの
最小点■、1゜は検出されることになる。
Next, a case will be described in which the minimum point V m I n of the AC signal S is detected. At time T, when the AC signal S falls and matches the threshold value, the output signal of the comparator (4) rises from "0" to "1" and the internal bus (
1), the internal timer starts operating. After that, at time Tc, when the AC signal S increases and matches the threshold value, the output signal of the comparator (4) falls from "1" to "0" and is transferred again to the internal bus (the internal bus), so the internal timer operation is terminated. Then, when the period (T e - T b) from the start to the end of the operation of the internal timer is 1/2, the minimum point 2, 1 degree of the AC signal S is detected.

以上より、交流信号と所定の1閾値とを比較する方法の
為、交流信号の最大点及び最小点を検出するためのプロ
グラムの処理回数が少なくなって、交流信号の最大点及
び最小点を検圧するための処理時間が短縮されることに
なる。
As described above, since the method compares the AC signal with one predetermined threshold value, the number of processing times of the program for detecting the maximum and minimum points of the AC signal is reduced, and the maximum and minimum points of the AC signal can be detected. This means that the processing time for pressing is reduced.

(ト)発明の効果 本発明によれば、交流信号と所定の1閾値とを比較する
方法の為、交流信号の最大点及び最小点を検出するため
のプログラムの処理回数を少なくでき、交流信号の最大
点及び最小点を検出するための処理時間を短縮できる利
点が得られる。
(G) Effects of the Invention According to the present invention, since the method compares an AC signal with one predetermined threshold value, it is possible to reduce the number of processing times of a program for detecting the maximum and minimum points of an AC signal. The advantage is that the processing time for detecting the maximum and minimum points of can be shortened.

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

第1図は本発明を実施するためのマイクロコンピュータ
の要部ブロック図、第2図は本発明を説明するための波
形図である。 (2)  レジスタ (3) (4)  コンパレータ。 DAコンパ 第1図
FIG. 1 is a block diagram of essential parts of a microcomputer for implementing the present invention, and FIG. 2 is a waveform diagram for explaining the present invention. (2) Register (3) (4) Comparator. DA Compa Figure 1

Claims (2)

【特許請求の範囲】[Claims] (1)所定ビットのデジタル値がプリセットされるレジ
スタと、該レジスタにプリセットされたデジタル値をア
ナログ値に変換するDAコンバータと、該DAコンバー
タにて変換されたアナログ値と所定の交流信号とを比較
するコンパレータと、を備え、 前記交流信号が上昇しながら前記アナログ値と一致した
時、前記コンパレータの出力信号に基づいてタイマー動
作を開始させ、その後、前記交流信号が下降しながら前
記アナログ値と一致した時、前記コンパレータの出力信
号に基づいてタイマー動作を終了させ、タイマー動作を
開始させてから終了させるまでの期間を1/2すること
によって、前記交流信号の最大点を検出することを特徴
とする交流信号のピーク点の検出方法。
(1) A register in which a digital value of a predetermined bit is preset, a DA converter that converts the digital value preset in the register into an analog value, and a DA converter that converts the analog value converted by the DA converter and a predetermined AC signal. and a comparator for comparison, and when the AC signal increases and matches the analog value, a timer operation is started based on the output signal of the comparator, and then the AC signal matches the analog value while decreasing. When they match, the timer operation is terminated based on the output signal of the comparator, and the period from the start to the end of the timer operation is halved, thereby detecting the maximum point of the AC signal. A method for detecting the peak point of an AC signal.
(2)所定ビットのデジタル値がプリセットされるレジ
スタと、該レジスタにプリセットされたデジタル値をア
ナログ値に変換するDAコンバータと、該DAコンバー
タにて変換されたアナログ値と所定の交流信号とを比較
するコンパレータと、を備え、 前記交流信号が下降しながら前記アナログ値と一致した
時、前記コンパレータの出力信号に基づいてタイマー動
作を開始させ、その後、前記交流信号が上昇しながら前
記アナログ値と一致した時、前記コンパレータの出力信
号に基づいてタイマー動作を終了させ、タイマー動作を
開始させてから終了させるまでの期間を1/2すること
によって、前記交流信号の最小点を検出することを特徴
とする交流信号のピーク点の検出方法。
(2) A register in which a digital value of a predetermined bit is preset, a DA converter that converts the digital value preset in the register into an analog value, and a DA converter that converts the analog value converted by the DA converter and a predetermined AC signal. and a comparator for comparison, when the AC signal matches the analog value while falling, a timer operation is started based on the output signal of the comparator, and thereafter, the AC signal matches the analog value while rising. When they match, the timer operation is terminated based on the output signal of the comparator, and the minimum point of the AC signal is detected by halving the period from when the timer operation starts to when it ends. A method for detecting the peak point of an AC signal.
JP20202990A 1990-07-30 1990-07-30 Detection of peak point for ac signal Pending JPH0486570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20202990A JPH0486570A (en) 1990-07-30 1990-07-30 Detection of peak point for ac signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20202990A JPH0486570A (en) 1990-07-30 1990-07-30 Detection of peak point for ac signal

Publications (1)

Publication Number Publication Date
JPH0486570A true JPH0486570A (en) 1992-03-19

Family

ID=16450746

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20202990A Pending JPH0486570A (en) 1990-07-30 1990-07-30 Detection of peak point for ac signal

Country Status (1)

Country Link
JP (1) JPH0486570A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012162323A (en) * 2012-03-09 2012-08-30 Ajinomoto Co Inc Mayonnaise-like food contained in bottle
CN103941104A (en) * 2014-04-11 2014-07-23 北京中铭恒盛科技有限公司 Method for recognizing symmetric waveform crests
CN105444827A (en) * 2014-08-31 2016-03-30 上海中核维思仪器仪表有限公司 Method for measuring ultrasonic wave transmission time using bilateral measurement

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012162323A (en) * 2012-03-09 2012-08-30 Ajinomoto Co Inc Mayonnaise-like food contained in bottle
CN103941104A (en) * 2014-04-11 2014-07-23 北京中铭恒盛科技有限公司 Method for recognizing symmetric waveform crests
CN105444827A (en) * 2014-08-31 2016-03-30 上海中核维思仪器仪表有限公司 Method for measuring ultrasonic wave transmission time using bilateral measurement

Similar Documents

Publication Publication Date Title
US5140252A (en) Method of charging secondary batteries
JPH0486570A (en) Detection of peak point for ac signal
US4498331A (en) Knocking detecting apparatus for internal combustion engines
JPH11271366A (en) Voltage drop detector
JPS637900Y2 (en)
JPH11271366A5 (en)
GB2418993A (en) A method for determining parameters of an induction motor
US4780789A (en) Method for generating circuit-breaking signals
KR100494114B1 (en) Timer circuit
JPH0614525Y2 (en) Bit sync detection circuit
JP2949943B2 (en) Electronic temperature controller
JPH0745786Y2 (en) Full level detection circuit
JPS6318834A (en) Eliminating device for periodic noise
JPS62290220A (en) Removing device for reriodical noise
JPH0393458A (en) Ignition controller
JPH0620172Y2 (en) AC power control device for electric heating device
JPH08101254A (en) Semiconductor test equipment
JP2579656Y2 (en) Sound measurement equipment
JPH01149170U (en)
JPH076485B2 (en) Knotting control device for internal combustion engine
JPH0635580Y2 (en) Horizontal frequency detection circuit
JP2000156981A (en) Inverter current-voltage phase difference detection method and circuit
JPS62184367A (en) Detecting method for voltage fluctuation
JPH0715295A (en) Waveform shaping circuit
JPS6324107A (en) Position detecting device