CN107729980B - Waveform signal self-adaptive counting method - Google Patents

Waveform signal self-adaptive counting method Download PDF

Info

Publication number
CN107729980B
CN107729980B CN201710976861.7A CN201710976861A CN107729980B CN 107729980 B CN107729980 B CN 107729980B CN 201710976861 A CN201710976861 A CN 201710976861A CN 107729980 B CN107729980 B CN 107729980B
Authority
CN
China
Prior art keywords
signal
data
equal
frequency division
judging
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.)
Active
Application number
CN201710976861.7A
Other languages
Chinese (zh)
Other versions
CN107729980A (en
Inventor
柳建新
严发宝
苏艳蕊
赵广东
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.)
Shandong University
Central South University
Original Assignee
Shandong University
Central South University
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 Shandong University, Central South University filed Critical Shandong University
Priority to CN201710976861.7A priority Critical patent/CN107729980B/en
Publication of CN107729980A publication Critical patent/CN107729980A/en
Application granted granted Critical
Publication of CN107729980B publication Critical patent/CN107729980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M1/00Design features of general application
    • G06M1/27Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum
    • G06M1/272Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum using photoelectric means

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Manipulation Of Pulses (AREA)
  • Measuring Frequencies, Analyzing Spectra (AREA)

Abstract

The invention discloses a waveform signal self-adaptive counting method, which comprises the following steps: carrying out frequency division processing on the waveform input signal to obtain a high level or a low level of a new signal, wherein the high level or the low level of the new signal is the whole period of the original signal; counting the high level after frequency division by using a clock signal; calculating a difference value of the counts; judging the absolute value of the difference value and the threshold lambda of the difference value; outputting normal data, and outputting a normal value after performing addition operation on abnormal data; finally, the total count is obtained. According to the invention, the waveform input signal is subjected to frequency division treatment, the high level subjected to frequency division is counted by using the clock signal, the counts are grouped, whether the counts belong to normal data is judged according to the groups, and finally, the desired data is output, so that the waveform signal self-adaptive counting result is obtained, and the signal period calculation accuracy is effectively improved.

Description

Waveform signal self-adaptive counting method
Technical Field
The invention relates to the technical field of special signal testing and detection, in particular to a waveform signal self-adaptive counting method.
Background
The digital electronic counter has important application value in the fields of geological exploration, general tests and other special requirements.
The Chinese intellectual property office website discloses a digital electronic counter (application number: 201110107653.6), which comprises a CPU, a display module, a signal acquisition module, an alarm module, a real-time clock data storage module, a keyboard and a power module, wherein the CPU is respectively connected with the display module, the signal acquisition module, the real-time clock data storage module and the keyboard, the display module is connected with the alarm module, and the power module is respectively connected with the CPU, the display module, the signal acquisition module, the alarm module, the real-time clock data storage module and the keyboard. Compared with the prior art, the invention has the advantages of higher responsivity, dual purposes of alternating current and direct current, low energy consumption, low price, no mechanical collision, no abrasion, long service life and the like. However, the digital counter cannot count correctly for slow rising edges of low-frequency signals, and erroneous judgment is easily caused when the level of the rising edge of the input counted and detected signal is between the high level and the low level of the digital counter, so that high-frequency counting is performed for many times. For example, the 3.3V interface of FPGA can easily determine the rising period of the detected rising edge between 0.8V and 2V as a waveform for many times, and the rising or falling is only one edge of the detected counting signal.
Since the rising edge and the falling edge of the low frequency signal are both slow, when the signal rises or falls to the middle level of the high level or the low level of the signal detection digital processor, the level at this time is determined to be 1 or 0, and the counting error is caused.
In the prior art, a large amount of hardware detection systems are mainly needed for detecting the rising edge and the falling edge of a waveform, otherwise, the waveform frequency detection counting error can be caused. However, the introduction of these hardware will bring about a large increase in power consumption, cost, and design space, and also easily cause a lifetime problem due to level mismatch.
Therefore, it is of great significance to develop a method for counting the signal frequency with simple process, convenient operation and suitable for the transition level between the high level and the low level of the digital device.
Disclosure of Invention
The invention provides a waveform signal self-adaptive counting method, which is a method for counting signal frequency aiming at error information generated by multiple counting caused by transition level between high level and low level of a digital device, and is particularly suitable for conditions of low power consumption, small volume, high signal quality, low frequency, sine wave input and the like, and the specific technical scheme is as follows:
a waveform signal adaptive counting method is characterized in that: the method comprises the following steps:
step one, performing frequency division processing on a waveform input signal to obtain a high level or a low level of a new signal, wherein the high level or the low level of the new signal is the whole period of an original signal;
step two, utilizing the clock signal to count the high level after frequency division, and dividing the count into N groups in sequence, wherein each group comprises m counting results, wherein: n is a natural number more than or equal to 1, and m is 8-15;
step three, sequentially calculating the difference value of two adjacent counts in the ith group as delta Tj, wherein i is a natural number which is greater than or equal to 1 and less than or equal to N, and j is a natural number which is greater than or equal to 1 and less than or equal to m-1;
step four, judging the size of the | delta Tj | and the difference threshold lambda, if the | delta Tj | is less than or equal to the difference threshold lambda, directly outputting the counting results in the ith group in sequence, and otherwise, entering the next step;
step five, if the absolute value delta Tj is larger than the difference threshold lambda, judging the data to be normal data, and directly and sequentially outputting the normal data in the ith group; if the value of delta Tj is less than or equal to the difference threshold lambda, judging that the data are abnormal data, and entering the next step;
step six, outputting a normal value after performing addition operation on the abnormal data, and entering the next step;
step seven, taking i as i + 1; if i is less than or equal to N, returning to the third step; and if i is larger than N, ending.
Preferably, in the above technical solution, the adding operation of the abnormal data in the sixth step specifically includes:
step 6.1, adding the first e counting results in the abnormal data to obtain a sum value QeThen adding the sum QeCalculating the difference P from the most recent normal datae(ii) a Wherein: e is the number of the total abnormal data which is more than or equal to 2 and less than or equal to the total abnormal data;
step 6.2, dividing the difference value PeIs compared with a difference threshold lambda if PeIf | is greater than the difference threshold λ, the sum Q is addedeJudging the data to be normal values, judging normal data and abnormal data again, and returning to the step 6.1; otherwise, entering the next step;
step 6.3, taking e as e +1, judging the sizes of e +1 and m, and if e +1 is larger than m, finishing addition operation; otherwise, the step 6.1 is returned.
Preferably, in the above technical solution, the difference threshold λ is 90-95% of the maximum period count data of the signal to be measured.
Preferably, in the above technical solution, the frequency division processing in the step one is a frequency division by two processing.
By applying the technical scheme of the invention, the effects are as follows:
1. the invention can adopt the original hardware, does not need to increase other hardware detection systems, not only can not increase the power consumption, the cost and the design space, but also can ensure the level matching and prolong the service life.
2. The invention adopts a voltage conditioning module formed by waveform signals through operational amplifiers to input the waveform signals into an FPGA or CPLD chip for counting, and specifically comprises the following steps: the waveform input signal is subjected to frequency division processing, the high level subjected to frequency division is counted by using a clock signal, the counts are grouped, whether the counts belong to normal data or not is judged according to the groups, and finally, desired data is output, so that a waveform signal self-adaptive counting result is obtained, and the signal period calculation accuracy is effectively improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a waveform signal adaptive counting method according to embodiment 1 of the present invention;
FIG. 2 is a waveform signal diagram according to embodiment 1 of the present invention;
fig. 3 is a flowchart of a waveform signal adaptive counting method according to embodiment 1 of the present invention.
Detailed Description
The embodiments of the present invention will be described in detail with reference to the accompanying drawings so that the advantages and features of the invention can be more easily understood by those skilled in the art, and the scope of the invention will be clearly and clearly defined.
Example 1:
a waveform signal adaptive counting method, hardware is shown in fig. 1, and specifically includes: the waveform signal is input into an FPGA (field programmable gate array) or CPLD (complex programmable logic device) chip for counting through a voltage conditioning module formed by an operational amplifier.
The waveform signals are shown in fig. 2: if the rising edge of the waveform is slow and the frequency is low, a high-frequency counting clock for counting high frequency counts to count error waveform counting data generated by undetermined voltage (a region from v1 to v 2) in the middle of the high and low levels of the IO interface; correct count data for a low frequency input signal can be obtained if a low frequency clock frequency count is used, but since the period of the clock signal is longer than the clock period for a high frequency, data will not be available for a high frequency signal.
The present embodiment is analyzed in the following manner, specifically including the following steps, as shown in fig. 3:
step one, performing frequency division on a waveform input signal to obtain a high level or a low level of a new signal, wherein the high level or the low level of the new signal is the whole period of an original signal;
step two, utilizing the clock signal to count the high level after frequency division, and dividing the count into N groups in sequence, wherein each group comprises m counting results, wherein: n is a natural number more than or equal to 1, and m is 8-15;
step three, sequentially calculating the difference value of two adjacent counts in the ith group as delta Tj, wherein i is a natural number which is greater than or equal to 1 and less than or equal to N, and j is a natural number which is greater than or equal to 1 and less than or equal to m-1;
step four, judging the size of the | delta Tj | and the difference threshold lambda, if the | delta Tj | is less than or equal to the difference threshold lambda, directly outputting the counting results in the ith group in sequence, and otherwise, entering the next step;
step five, if the absolute value delta Tj is larger than the difference threshold lambda, judging the data to be normal data, and directly and sequentially outputting the normal data in the ith group; if the value of delta Tj is less than or equal to the difference threshold lambda, judging that the data are abnormal data, and entering the next step;
step six, outputting a normal value after performing addition operation on the abnormal data, and entering the next step; the addition operation in this step specifically includes the following steps:
step 6.1, adding the first e counting results in the abnormal data to obtain a sum value QeThen adding the sum QeCalculating the difference P from the most recent normal datae(ii) a Wherein: e is the number of the total abnormal data which is more than or equal to 2 and less than or equal to the total abnormal data;
step 6.2, dividing the difference value PeIs compared with a difference threshold lambda if|PeIf | is greater than the difference threshold λ, the sum Q is addedeJudging the data to be normal values, judging normal data and abnormal data again, and returning to the step 6.1; otherwise, entering the next step;
step 6.3, taking e as e +1, judging the sizes of e +1 and m, and if e +1 is larger than m, finishing addition operation; otherwise, returning to the step 6.1;
step seven, taking i as i + 1; if i is less than or equal to N, returning to the third step; and if i is larger than N, ending.
By adopting the technical scheme of the embodiment, hardware does not need to be added with a new system, and a software system can be upgraded; the invention adopts a voltage conditioning module formed by waveform signals through operational amplifiers to input the waveform signals into an FPGA or CPLD chip for counting, and specifically comprises the following steps: the waveform input signal is subjected to frequency division processing, the high level subjected to frequency division is counted by using a clock signal, the counts are grouped, whether the counts belong to normal data or not is judged according to the groups, and finally, desired data is output, so that a waveform signal self-adaptive counting result is obtained, and the signal period calculation accuracy is effectively improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (4)

1. A waveform signal adaptive counting method is characterized in that: the method comprises the following steps:
step one, performing frequency division processing on a waveform input signal to obtain a high level or a low level of a new signal, wherein the high level or the low level of the new signal is the whole period of an original signal;
step two, utilizing the clock signal to count the high level after frequency division, and dividing the count into N groups in sequence, wherein each group comprises m counting results, wherein: n is a natural number more than or equal to 1, and m is 8-15;
step three, sequentially calculating the difference value of two adjacent counts in the ith group as delta Tj, wherein i is a natural number which is greater than or equal to 1 and less than or equal to N, and j is a natural number which is greater than or equal to 1 and less than or equal to m-1;
step four, judging the size of the | delta Tj | and the difference threshold lambda, if the | delta Tj | is less than or equal to the difference threshold lambda, directly outputting the counting results in the ith group in sequence, and otherwise, entering the next step;
step five, if the absolute value delta Tj is larger than the difference threshold lambda, judging the data to be normal data, and directly and sequentially outputting the normal data in the ith group; if the value of delta Tj is less than or equal to the difference threshold lambda, judging that the data are abnormal data, and entering the next step;
step six, outputting a normal value after performing addition operation on the abnormal data, and entering the next step;
step seven, taking i as i + 1; if i is less than or equal to N, returning to the third step; and if i is larger than N, ending.
2. The adaptive waveform signal counting method according to claim 1, wherein the adding of the abnormal data in the sixth step is specifically:
step 6.1, adding the first e counting results in the abnormal data to obtain a sum value QeThen adding the sum QeCalculating the difference P from the most recent normal datae(ii) a Wherein: e is the number of the total abnormal data which is more than or equal to 2 and less than or equal to the total abnormal data;
step 6.2, dividing the difference value PeIs compared with a difference threshold lambda if PeIf | is greater than the difference threshold λ, the sum Q is addedeJudging the data to be normal values, judging normal data and abnormal data again, and returning to the step 6.1; otherwise, entering the next step;
step 6.3, taking e as e +1, judging the sizes of e +1 and m, and if e +1 is larger than m, finishing addition operation; otherwise, the step 6.1 is returned.
3. The adaptive waveform signal counting method according to any one of claims 1 to 2, wherein the difference threshold λ is 90 to 95% of the maximum cycle count data of the signal to be measured.
4. The waveform signal adaptive counting method according to claim 1, wherein the frequency division processing in the first step is a frequency division by two processing.
CN201710976861.7A 2017-10-19 2017-10-19 Waveform signal self-adaptive counting method Active CN107729980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710976861.7A CN107729980B (en) 2017-10-19 2017-10-19 Waveform signal self-adaptive counting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710976861.7A CN107729980B (en) 2017-10-19 2017-10-19 Waveform signal self-adaptive counting method

Publications (2)

Publication Number Publication Date
CN107729980A CN107729980A (en) 2018-02-23
CN107729980B true CN107729980B (en) 2020-06-30

Family

ID=61212066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710976861.7A Active CN107729980B (en) 2017-10-19 2017-10-19 Waveform signal self-adaptive counting method

Country Status (1)

Country Link
CN (1) CN107729980B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529139A (en) * 2020-12-22 2021-03-19 河南钧晟电子科技有限公司 Counting method, counter, hill planter, missed planting monitoring method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100576827B1 (en) * 2004-02-20 2006-05-10 삼성전자주식회사 Frequency measuring circuit and semiconductor memory device using the same
CN101582732B (en) * 2009-06-10 2012-07-04 中兴通讯股份有限公司 Clock detection method and device
CN103499739A (en) * 2013-09-25 2014-01-08 浪潮电子信息产业股份有限公司 Frequency measurement method based on FPGA
CN105319384B (en) * 2015-08-28 2018-05-01 贵州航天林泉电机有限公司 A kind of adaptive M based on FPGA/T velocity-measuring systems
CN107228952A (en) * 2017-06-20 2017-10-03 南京航空航天大学 A kind of high reliability rotating speed transducer module

Also Published As

Publication number Publication date
CN107729980A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US10162373B1 (en) Variation immune on-die voltage droop detector
US20120043982A1 (en) Critical path monitor having selectable operating modes and single edge detection
US9460814B2 (en) Memory tester design for soft error rate (SER) failure analysis
CN105095756A (en) Method and device for detecting portable document format document
CN102841834A (en) Information processing apparatus, information processing system, controlling method and program
CN107167833B (en) A kind of γ spectrum ghost peak discriminating method, storage medium and system
CN115510982A (en) Clustering method, device, equipment and computer storage medium
CN109936360A (en) Pulse counting equipment and radiation detecting system
US7800396B2 (en) Semiconductor integrated circuit, control method, and information processing apparatus
CN107729980B (en) Waveform signal self-adaptive counting method
CN108877969B (en) Nuclear power theoretical model establishing and verifying method, system and terminal equipment
CN110988652A (en) Recovered chip detection method and detection circuit thereof
EP2487594B1 (en) Error propagation in a system model
US9759767B2 (en) Pre-test power-optimized bin reassignment following selective voltage binning
CN110061733A (en) Method of counting, method for reconstructing and the chip of pulse signal
CN107765100B (en) Waveform signal pre-judging period analysis method
US9658947B2 (en) Method for ranking fault-test pairs based on waveform statistics in a mutation-based test program evaluation system
CN103811021B (en) A kind of method and apparatus resolving waveform
US7797131B2 (en) On-chip frequency response measurement
US20110072308A1 (en) Electronic device and method for testing serial signals
WO2015124047A1 (en) Method and device for waveform analysis
CN113779926A (en) Circuit detection method and device, electronic equipment and readable storage medium
Holst et al. Gpu-accelerated timing simulation of systolic-array-based ai accelerators
CN108269004B (en) Product life analysis method and terminal equipment
CN207472396U (en) Gas meter, flow meter error of indication calibrating installation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant