CN111964768B - Filtering method for increasing anti-interference effect of electronic scale - Google Patents
Filtering method for increasing anti-interference effect of electronic scale Download PDFInfo
- Publication number
- CN111964768B CN111964768B CN202010777092.XA CN202010777092A CN111964768B CN 111964768 B CN111964768 B CN 111964768B CN 202010777092 A CN202010777092 A CN 202010777092A CN 111964768 B CN111964768 B CN 111964768B
- Authority
- CN
- China
- Prior art keywords
- data
- buf1
- filtering
- buf2
- entering
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01G—WEIGHING
- G01G23/00—Auxiliary devices for weighing apparatus
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03H—IMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
- H03H17/00—Networks using digital techniques
- H03H17/02—Frequency selective networks
- H03H17/0202—Two or more dimensional filters; Filters for complex signals
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Image Processing (AREA)
Abstract
In the electronic scale, after the original data of which the analog-to-digital conversion is finished is collected, the obtained first data is temporarily recorded in tmp, the obtained second data is summed and put into buf1, the sum of the obtained data is put into buf2 according to the data filtering in buf1, and similarly, the data of the third-stage filtering in buf3 is obtained according to the data filtering in buf 2. The invention has the advantages that: the sum of the two data is used, the positive and negative difference parts of the pulse are offset, and the anti-interference capability is improved.
Description
Technical Field
The invention relates to a filtering method for increasing the anti-interference effect of an electronic scale, which is used for improving the anti-interference capability of the electronic scale.
Background
In the application of the electronic scale, the power supply of the electronic scale is easily interfered by regular pulses (generally positive and negative bidirectional pulses, such as an electric vehicle charger and the like) generated by a switching power supply of a high-power charger in an accessory power grid, and the interference pulse signals are likely to be added to analog signals output by a weighing sensor of the electronic scale, so that converted digital data are not consistent with actual data, and the accuracy of the electronic scale is influenced.
Disclosure of Invention
The invention provides a filtering method and a filtering system for increasing the anti-interference effect of an electronic scale, which aim to solve the problems in the prior art.
The technical scheme of the invention is as follows: a filtering method for increasing the anti-interference effect of an electronic scale is characterized by comprising the following steps:
(1) after acquiring the original data output by analog-digital conversion, temporarily recording the acquired first original data in tmp; summing the obtained second original data with the first original data in tmp, and then putting the summed second original data in buf 1;
(2) the data in buf1 is subjected to a first stage of filtering: the first-stage filtering is difference filtering, and the specific filtering method is as follows: if the data entering buf1 for the first time is larger than the preset first-stage filtering difference value, filling all buf1 with the data value; if the data not entering buf1 for the first time or the value of the data entering buf1 is smaller than the first-stage filtering difference value, the first-stage filtering is considered to be stable, corresponding identification is carried out, and buf1 is filled in a first-in first-out mode; filtering every two data of 4 data in buf1, summing the two obtained data, and putting the summed data into buf 2;
(3) the data in buf2 is subjected to the second stage of filtering: buf2 is 8 in length, can store the sum of 8 Buf1 outputs, and carries out second-stage filtering on data in Buf2 by the following method: if the data entering buf2 for the first time is larger than the second-stage filtering difference value, filling all buffers of buf2 with the value, and if the data entering buf2 for the first time or the value of the data entering buf2 is smaller than the second-stage filtering difference value, identifying that the second-stage filtering is stable, filling buf2 in a first-in first-out mode;
(4) and (3) performing third-stage filtering on the data in buf 2: filtering every four data in buf2 to obtain two data, summing the two data, and putting the summed data into buf 3; the length of buf3 is 16, if the data entering buf3 for the first time is greater than the third-stage filtering difference value, all buffers of buf3 are filled with the value, and if the data entering buf3 for the first time is not the data entering buf3 for the first time or the value of the data entering buf3 is less than the third-stage filtering difference value, it is identified that the third-stage filtering is stable, then buf3 is filled in a first-in first-out manner.
The FLAG in step (2) is FLAG, and is used when called externally to know the level at which the output data is stable.
In the step (2), the procedure of filling buf1 in a first-in first-out manner is as follows: buf1[3] = buf1[2 ]; buf1[2] = buf1[1 ]; buf1[1] = buf1[0]; buf1[0] = sum.
The invention has the advantages that: the sum of the two data is used, the positive and negative difference parts of the pulse are offset, and the anti-interference capability is improved.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
Referring to fig. 1, the filtering method for increasing the anti-interference effect of the electronic scale of the present invention is characterized by comprising the following steps:
(1) after acquiring the original data output by analog-digital conversion, temporarily recording the acquired first original data in tmp; summing the obtained second original data with the first original data in tmp, and then putting the summed second original data in buf 1;
(2) the data in buf1 is subjected to a first stage of filtering: the first-stage filtering is difference filtering, and the specific filtering method is as follows: if the data entering buf1 for the first time is larger than the preset first-stage filtering difference value, filling all buf1 with the data value; if the data entering buf1 for the first time is not the data entering buf1 or the value of the data entering buf1 is smaller than the first-stage filtering difference value, the first-stage filtering is considered to be stable, corresponding identification is carried out (marked FLAG is used when being called externally, and the output data is known to be stable at which level), and buf1 is filled in a first-in first-out mode (namely: buf1[3] = buf1[2 ]; buf1[2] = buf1[1 ]; buf1[1] = buf1[0]; buf1[0] = sum ]); filtering every two data of 4 data in buf1, summing the two obtained data, and putting the summed data into buf 2;
(3) the data in buf2 is subjected to the second stage of filtering: buf2 is 8 in length, can store the sum of 8 Buf1 outputs, and carries out second-stage filtering on data in Buf2 by the following method: if the data entering buf2 for the first time is larger than the second-stage filtering difference value, filling all buffers of buf2 with the value, and if the data entering buf2 for the first time or the value of the data entering buf2 is smaller than the second-stage filtering difference value, identifying that the second-stage filtering is stable, filling buf2 in a first-in first-out mode;
(4) and (3) performing third-stage filtering on the data in buf 2: filtering every four data in buf2 to obtain two data, summing the two data, and putting the summed data into buf 3; the length of buf3 is 16, if the data entering buf3 for the first time is greater than the third-stage filtering difference value, all buffers of buf3 are filled with the value, and if the data entering buf3 for the first time is not the data entering buf3 for the first time or the value of the data entering buf3 is less than the third-stage filtering difference value, it is identified that the third-stage filtering is stable, then buf3 is filled in a first-in first-out manner.
The main invention point of the invention is that every two data of the original data are added, and then the filtering algorithm is participated. The method of three-level nested filtering is used later.
In the electronic scale, after the original data after the analog-to-digital conversion is acquired, the first data is temporarily recorded in tmp, the second data is acquired, the sum is put into buf1, the sum of the data acquired by filtering according to the data in buf1 is put into buf2, and similarly, the data of the third stage of filtering in buf3 is acquired by filtering according to the data in buf 2.
The added value of regular pulse waves appears in the original data, the sum of the two data and the subsequent filtering algorithm is used, the amplification is equivalent to that of the original data of one time, the selected suppression threshold value can be set to be larger for the subsequent filtering algorithm, the magnitude order of subdivision is increased, and the resolution is improved.
Claims (3)
1. A filtering method for increasing anti-interference effect of an electronic scale is characterized in that the filtering method amplifies original data after adding every two data based on the original data, and then three-level nested filtering is used for preventing interference of regular pulses generated by a switching power supply, and the filtering method comprises the following steps:
after acquiring original data output by analog-to-digital conversion, temporarily recording the acquired first original data in tmp; summing the obtained second original data with the first original data in tmp, and then putting the summed second original data in buf 1;
and (2) performing first-stage filtering on the data in buf 1: the first-stage filtering is difference filtering, and the specific filtering method is as follows: if the data entering buf1 for the first time is larger than the preset first-stage filtering difference value, filling all buf1 with the data; if the data not entering buf1 for the first time or the value of the data entering buf1 is smaller than the first-stage filtering difference value, the first-stage filtering is considered to be stable, corresponding identification is carried out, and buf1 is filled in a first-in first-out mode; filtering every two data of 4 data in buf1, summing the two obtained data, and putting the summed data into buf 2;
and (3) performing second-stage filtering on the data in buf 2: buf2 is 8 in length, can store the sum of 8 Buf1 outputs, and carries out second-stage filtering on data in Buf2 by the following method: if the data entering buf2 for the first time is larger than the second-stage filtering difference value, filling all the caches of buf2 with the data, and if the data entering buf2 for the first time or the value of the data entering buf2 is smaller than the second-stage filtering difference value, identifying that the second-stage filtering is stable, filling buf2 in a first-in first-out mode;
and (4) performing third-stage filtering on the data in buf 2: filtering every four data in buf2 to obtain two data, summing the two data, and putting the summed data into buf 3; the length of buf3 is 16, if the data entering buf3 for the first time is greater than the third-stage filtering difference value, all buffers of buf3 are filled with the data, and if the data entering buf3 for the first time is not the data entering buf3 for the first time or the value of the data entering buf3 is smaller than the third-stage filtering difference value, it is identified that the third-stage filtering is stable, the buf3 is filled in a first-in first-out mode.
2. The filtering method for increasing the interference rejection of an electronic scale according to claim 1, wherein said FLAG in step (2) is FLAG, and is used when called externally to know at which level the outputted data is stable.
3. The filtering method for increasing anti-interference effect of electronic scale according to claim 1, wherein in the step (2), the procedure of filling buf1 in a first-in first-out manner is as follows: buf1[3] ═ buf1[2 ]; buf1[2] ═ buf1[1 ]; buf1[1] ═ buf1[0]; buf1[0] ═ sum.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010777092.XA CN111964768B (en) | 2020-08-05 | 2020-08-05 | Filtering method for increasing anti-interference effect of electronic scale |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010777092.XA CN111964768B (en) | 2020-08-05 | 2020-08-05 | Filtering method for increasing anti-interference effect of electronic scale |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111964768A CN111964768A (en) | 2020-11-20 |
CN111964768B true CN111964768B (en) | 2021-09-14 |
Family
ID=73363448
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010777092.XA Active CN111964768B (en) | 2020-08-05 | 2020-08-05 | Filtering method for increasing anti-interference effect of electronic scale |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111964768B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101034901A (en) * | 2007-04-29 | 2007-09-12 | 中国民航大学 | Civil aviation ground-air communication self-adaptive disturbance restraining method based on the constant mode array and its system |
CN202495927U (en) * | 2012-04-01 | 2012-10-17 | 岳阳千盟电子有限公司 | Induction wireless communication system based on digital signal processing platform |
CN106556729A (en) * | 2015-09-27 | 2017-04-05 | 北京嘉岳同乐极电子有限公司 | A kind of current measuring device |
CN106768243A (en) * | 2016-12-15 | 2017-05-31 | 芯海科技(深圳)股份有限公司 | A kind of quick lock in accurate weight method |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3300107B2 (en) * | 1993-04-30 | 2002-07-08 | 大和製衡株式会社 | Low frequency attenuator for digital weighing equipment |
CN1210547C (en) * | 2002-12-20 | 2005-07-13 | 鞍钢集团鞍山矿业公司质量计量中心 | Real time dynamic rail weighing apparatus |
JP2007129408A (en) * | 2005-11-02 | 2007-05-24 | Ishida Co Ltd | Noise eliminating device, weight measuring instrument, noise eliminating method, and designing method for digital filter |
CN100489910C (en) * | 2006-11-03 | 2009-05-20 | 上海市计量测试技术研究院 | Method and device for locking cheated electronic weighing scale |
CN102175296B (en) * | 2011-02-24 | 2012-11-28 | 山东大学 | Fast two-stage filter algorithm applied to high precision digital weighing sensor |
CN102829853B (en) * | 2012-08-22 | 2015-12-09 | 中联重科股份有限公司 | Transmitter, multistage filter and weighing system |
CN104483547B (en) * | 2014-11-27 | 2017-06-30 | 广东电网有限责任公司电力科学研究院 | The filtering method and system of electric power signal |
JP6521224B2 (en) * | 2015-02-26 | 2019-05-29 | 大和製衡株式会社 | Transport weighing device |
CN109459124A (en) * | 2017-09-06 | 2019-03-12 | 梅特勒-托利多(常州)精密仪器有限公司 | Weighing system and method and storage medium |
CN107817038B (en) * | 2017-10-24 | 2020-07-24 | 中南大学 | Rail vehicle wheel load passing type intelligent detection device and method |
CN109063645B (en) * | 2018-08-01 | 2022-04-15 | 歌尔光学科技有限公司 | Filtering method, filtering device and storage medium |
CN210221276U (en) * | 2019-05-30 | 2020-03-31 | 中山市福瑞康电子有限公司 | Electronic scale with high reliability |
-
2020
- 2020-08-05 CN CN202010777092.XA patent/CN111964768B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101034901A (en) * | 2007-04-29 | 2007-09-12 | 中国民航大学 | Civil aviation ground-air communication self-adaptive disturbance restraining method based on the constant mode array and its system |
CN202495927U (en) * | 2012-04-01 | 2012-10-17 | 岳阳千盟电子有限公司 | Induction wireless communication system based on digital signal processing platform |
CN106556729A (en) * | 2015-09-27 | 2017-04-05 | 北京嘉岳同乐极电子有限公司 | A kind of current measuring device |
CN106768243A (en) * | 2016-12-15 | 2017-05-31 | 芯海科技(深圳)股份有限公司 | A kind of quick lock in accurate weight method |
Also Published As
Publication number | Publication date |
---|---|
CN111964768A (en) | 2020-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111238632B (en) | High-precision vibration signal acquisition and processing system | |
JP2013534629A5 (en) | ||
EP0933970A3 (en) | Hearing aid with compensation of acoustic and/or mechanical feedback | |
EP0837561A3 (en) | Sampling frequency converting apparatus | |
CN111964768B (en) | Filtering method for increasing anti-interference effect of electronic scale | |
CN112329585B (en) | Weighing signal switching and filtering processing method for electronic balance | |
CN110568475A (en) | Pseudo-peak correction method based on pulse restoration | |
CN102223470A (en) | CCD camera image signal processing method and system | |
CN113988131A (en) | Data filtering method, system, equipment and storage medium based on analog quantity | |
CN107908133B (en) | A kind of frequency adaptively acquires distribution method | |
CN102081309B (en) | Method for improving alignment scanning success rate | |
JP6550675B2 (en) | Pulse height analyzer | |
CA2666015C (en) | Determining and reconstructing changes in load on lifting gear | |
CN110702972B (en) | Adaptive sampling method and device for analog signals | |
CN210640965U (en) | Image signal sampling processing circuit | |
CN111879981B (en) | Method and device for compensating overload of single-tone signal | |
JP2008146526A (en) | Physical random number generator and physical random number generation circuit | |
US8531223B2 (en) | Signal generator | |
JP2011238268A (en) | Physical random number generation device and circuit | |
CN111739505B (en) | Active noise reduction system and method | |
CN113702862B (en) | DC power supply state panoramic monitoring method and device based on cloud deployment | |
CN118501536B (en) | Current detection method and device and electronic equipment | |
JP4906652B2 (en) | Pulse radar equipment | |
US20220239914A1 (en) | Information processing device, imaging device, information processing method, and program | |
RU226110U1 (en) | NEURAL NETWORK DETECTOR OF THE BEGINNING OF NONLINEAR DISTORTIONS OF THE ELECTRICAL SIGNAL |
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 |