CN112329585B - Weighing signal switching and filtering processing method for electronic balance - Google Patents

Weighing signal switching and filtering processing method for electronic balance Download PDF

Info

Publication number
CN112329585B
CN112329585B CN202011185643.XA CN202011185643A CN112329585B CN 112329585 B CN112329585 B CN 112329585B CN 202011185643 A CN202011185643 A CN 202011185643A CN 112329585 B CN112329585 B CN 112329585B
Authority
CN
China
Prior art keywords
value
sampling
data
queue
sliding
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
CN202011185643.XA
Other languages
Chinese (zh)
Other versions
CN112329585A (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.)
Hengping Tianping Huzhou Scientific Instrument Co ltd
Original Assignee
Shanghai Sunny Hengping Scientific Instrument 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 Shanghai Sunny Hengping Scientific Instrument Co Ltd filed Critical Shanghai Sunny Hengping Scientific Instrument Co Ltd
Priority to CN202011185643.XA priority Critical patent/CN112329585B/en
Publication of CN112329585A publication Critical patent/CN112329585A/en
Application granted granted Critical
Publication of CN112329585B publication Critical patent/CN112329585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01GWEIGHING
    • G01G23/00Auxiliary devices for weighing apparatus

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

The invention discloses a weighing signal switching filtering processing method for an electronic balance, which is characterized in that the method comprises the steps of partitioning according to the variable quantity of secondary sampling values before and after weighing when the electronic balance is used for weighing, switching to use different digital filtering technologies according to the data characteristics of different intervals, and adopting mean filtering when the measured value conversion quantity is large; for the small variation value, the sliding mean algorithm of the variable length queue is adopted when the variation value tends to be stable, and the step length of the sampling period is variable; in the stable area, a long sliding mean filtering method is adopted, so that the problems of each area are solved, the noise influence is reduced, and the sensitivity and the stability of the electronic balance are improved. Has good effect in practical application.

Description

Weighing signal switching and filtering processing method for electronic balance
Technical Field
The invention relates to a weighing signal switching and filtering processing method for an electronic balance, and belongs to the technical field of electronic balance measurement.
Background
As a high-precision mass measuring instrument, the electronic balance is widely applied to daily life, factory production and scientific research. The working principle is that the weight of an object is converted into a measurable electric signal through the weighing sensor, and then the measurable electric signal is converted into a digital signal through an analog number, so that the weight of the object is obtained. The method has the characteristics of reliable weighing accuracy, quick and clear display, good stability and the like.
In the measurement of a high-precision balance, due to the influences of interference diversity, system uncertainty and the like, data obtained from the output of a weighing sensor needs to be filtered to meet the high-precision requirement. The conventional common technology generally adopts a sliding mean filtering method with low complexity and small calculated amount for filtering, and the principle is as follows: taking N measured data as a data queue with fixed length, putting the new sampled data at the tail of the queue every time new sampling is carried out, removing one data at the head of the queue, and then averaging. The algorithm has the advantages of good inhibition effect on periodic interference and high smoothness, and has the defects of low sensitivity, the larger the N value is, the better the filtering effect is, but when the N value is larger, the measurement sensitivity is greatly reduced. In particular, when the weighing object is loaded or unloaded, the reaction is slow, and the quick response and the balance cannot be realized. In addition, various interferences in the weighing process of the balance are difficult to be solved completely by using a filtering method.
Disclosure of Invention
The invention aims to provide a weighing signal switching filtering processing method for an electronic balance, which can be combined with the technologies of mean filtering, sliding mean filtering and variable sampling period, improve the inhibition effect on impulse interference and the sensitivity of balance weighing and achieve quick response and balance.
In order to solve the problems, the technical scheme adopted by the invention is as follows:
a weighing signal switching and filtering processing method for an electronic balance comprises the following steps:
step 1, initializing, defining change value thresholds E1, E2, E3, E1> E2> E3, and defining a sampling period; emptying the sliding data queue, wherein the current value C is 0, E1 indicates that the value of the weighing sensor changes greatly, the weighed object changes, E2 indicates that the value of the weighing sensor changes and tends to converge, and E3 indicates that the weighing is stable when the value of the change is smaller than the value;
step 2, data acquisition, multiple sampling mean filtering to obtain a value X, continuously sampling to obtain M data, removing the maximum value and the minimum value, and then taking a mean value, namely
Figure BDA0002751357750000021
Step 3, calculating a variation value e ═ abs (X-C);
step 4, if E is larger than E1, emptying the sliding queue, and if C is equal to X, turning to step 2;
step 5, if e>E2, emptying the sliding queue when entering for the first time, adopting a short sliding mean filtering method, assigning the result to C, and turning to step 2, wherein the short sliding mean means that the sampling data is less, the sliding mean filtering means that N measurement data are used as a data queue with a fixed length, each time new sampling is carried out, the new sampling data are placed at the tail of the queue, meanwhile, one data at the head of the queue is removed, and then the average value is obtained, namely
Figure BDA0002751357750000022
Step 6, if E > is E3, emptying the sliding queue when entering for the first time, assigning the result to C by adopting a long sliding mean filtering method, and turning to step 2, wherein the long sliding mean means that the sampling data is more;
and 7, if E is less than E3, adopting long sliding mean filtering, assigning the result to C, and turning to the step 2.
Further, in step 6, fast sampling is used, and the sampling time is less than a predetermined sampling period.
Further, in step 7, slow sampling is used, and the sampling time is greater than a predetermined sampling period.
The principle of the invention is that the method partitions according to the variation of the acquired value of secondary sampling before and after weighing when the electronic balance weighs, switches and uses different digital filtering technologies according to the data characteristics of different intervals, and adopts mean filtering when the measured value variation is large; for the small change value, the sliding average algorithm of the variable length queue is adopted when the change value tends to be stable, and the step length of the sampling period is variable; in the stable region, a long sliding mean filtering method is adopted, so that the problem of each region is solved.
Compared with the prior art, the invention has the beneficial effects that:
according to the rule that the data of the weighing sensor changes during the weighing of the balance, the multi-stage partition is carried out, different digital filtering methods are adopted for each partition, the inhibition effect on the pulse interference is improved, various noise interferences in the weighing process can be effectively inhibited, the response speed and sensitivity of the weighing data are improved, and the sensitivity and stability of the electronic balance are improved.
Drawings
Fig. 1 is a flow chart of a weighing signal switching filtering processing method for an electronic balance according to the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. The objects, aspects and advantages of the present invention will become more apparent from the following description. It should be understood that the described embodiments are preferred embodiments of the invention, and not all embodiments.
A weighing signal switching and filtering processing method for an electronic balance comprises the following steps:
step 1, initializing, defining change value thresholds E1, E2, E3, E1> E2> E3, and defining a sampling period; the queue length of the short sliding mean is ShortQueueLength which is 3, and the queue length of the long sliding mean is QueueLength which is 9; emptying the sliding data queue; the sliding queue emptying flag clearQueueFlag is 1, and the number DataCount of the effective data of the sliding data queue is 0; the current value weighing data value C is 0;
step 2, data acquisition, multiple sampling mean filtering, continuously obtaining three data X1, X2 and X3 from the weighing sensor, removing the maximum value and the minimum value of the three data, leaving one value, and assigning the value to a variable X;
step 3, calculating a variation value e-abs (X-C);
step 4, if E is larger than E1, emptying the sliding queue, wherein ClearQueueFlag is 1, DataCount is 0, and C is X, and the process goes to step 2;
step 5, if E > E2, the length of the sliding data queue is ShortQueueLength,
(1) if ClearQueueFlag ═ 1, then clear the sliding data queue, ClearQueueFlag ═ 0, DataCount ═ 0,
(2) the variable X value is placed at the tail of the sliding data queue, the data at the head of the queue is removed, DataCount + +, if DataCount > ShortQueueLength the DataCount ═ ShortQueueLength,
(3) calculating C which is the sum/DataCount of the DataCount data, and turning to the step 2;
step 6, if E > -E3, the length of the sliding data queue is QueueLength, the sampling period can be reduced appropriately,
(1) if ClearQueueFlag ═ 1, then clear the sliding data queue, ClearQueueFlag ═ 0, DataCount ═ 0,
(2) putting the variable X value at the tail of the sliding data queue, removing the data at the head of the queue, DataCount + +, if DataCount > QueueLength the n DataCount ═ QueueLength,
(3) calculating C which is the sum/DataCount of the DataCount data, and turning to the step 2;
step 7, if E < E3, the length of the sliding data queue is QueueLength, the sampling period can be increased appropriately,
(1) putting the variable X value at the tail of the sliding data queue, removing the data at the head of the queue, DataCount + +, if DataCount > QueueLength the n DataCount ═ QueueLength,
(2) and C is calculated as the sum/DataCount of the DataCount data, and the step 2 is carried out.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not intended to limit the scope of the present invention, and it is obvious that any person skilled in the art can easily conceive of alternative or modified embodiments based on the above embodiments and these should be covered by the present invention.

Claims (3)

1. A weighing signal switching and filtering processing method for an electronic balance is characterized by comprising the following steps:
step 1, initializing, defining change value thresholds E1, E2, E3, E1> E2> E3, and defining a sampling period; emptying the sliding data queue, wherein the current value C is 0, E1 indicates that the value of the weighing sensor changes greatly, the weighed object changes, E2 indicates that the value of the weighing sensor changes and tends to converge, and E3 indicates that the weighing is stable when the value of the change is smaller than the value;
step 2, data acquisition, multiple sampling mean filtering to obtain a value X, continuously sampling to obtain M data, removing the maximum value and the minimum value, and then taking a mean value, namely
Figure FDA0003729812530000011
Step 3, calculating a variation value e-abs (X-C);
step 4, if E is larger than E1, emptying the sliding queue, and if C is equal to X, turning to step 2;
step 5, if e>E2, emptying the sliding queue when entering for the first time, adopting a short sliding mean filtering method, assigning the result to C, turning to step 2, wherein the number of the sampling data of the short sliding mean is less than that of the sampling data of the following long sliding mean, the sliding mean filtering means that N measurement data are used as a data queue with fixed length, each time a new sampling is carried out, the new sampling data are placed at the tail of the queue, meanwhile, one data at the head of the queue are removed, then averaging is carried out,namely, it is
Figure FDA0003729812530000012
Step 6, if E > is E3, emptying the sliding queue when entering for the first time, adopting a long sliding mean filtering method, assigning the result to C, and turning to step 2;
and 7, if E is less than E3, long sliding mean filtering is adopted, the result is assigned to C, and the step 2 is carried out.
2. The weighing signal switching filter processing method for an electronic balance according to claim 1, characterized in that:
in step 6, fast sampling is used, the sampling time being less than a predetermined sampling period.
3. The weighing signal switching filter processing method for an electronic balance according to claim 1, characterized in that:
in step 7, slow sampling is used, the sampling time being greater than a predetermined sampling period.
CN202011185643.XA 2020-10-29 2020-10-29 Weighing signal switching and filtering processing method for electronic balance Active CN112329585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011185643.XA CN112329585B (en) 2020-10-29 2020-10-29 Weighing signal switching and filtering processing method for electronic balance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011185643.XA CN112329585B (en) 2020-10-29 2020-10-29 Weighing signal switching and filtering processing method for electronic balance

Publications (2)

Publication Number Publication Date
CN112329585A CN112329585A (en) 2021-02-05
CN112329585B true CN112329585B (en) 2022-08-23

Family

ID=74296326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011185643.XA Active CN112329585B (en) 2020-10-29 2020-10-29 Weighing signal switching and filtering processing method for electronic balance

Country Status (1)

Country Link
CN (1) CN112329585B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115684076B (en) * 2022-11-11 2024-01-30 中船重工安谱(湖北)仪器有限公司 Multichannel infrared gas sensor data processing method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271016A (en) * 2008-05-15 2008-09-24 山西万立科技有限公司 Dynamic weighing method and weighing system based on velocity compensation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102788628A (en) * 2011-05-20 2012-11-21 深圳市测力佳控制技术有限公司 Electronic scale of loading machine
CN108168680B (en) * 2017-12-28 2020-04-07 深圳市美新特智能装备有限公司 Dynamic weighing filtering method and system
CN209085743U (en) * 2018-12-10 2019-07-09 浙江杭钻机械制造股份有限公司 For rubbish loading vehicles to canned garbage automatic weighing equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271016A (en) * 2008-05-15 2008-09-24 山西万立科技有限公司 Dynamic weighing method and weighing system based on velocity compensation

Also Published As

Publication number Publication date
CN112329585A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN100348984C (en) Electric energy metrical pulse generation method for ammeter
CN112329585B (en) Weighing signal switching and filtering processing method for electronic balance
CN105954695B (en) Synchronization-based homogeneous sensor mutation parameter identification method and device
CN103344825A (en) Electric energy measuring system based on alternating-current sampling
CN112134544A (en) Filtering method, device, equipment and computer readable storage medium
CN113701859A (en) Weighing counting method, device, system, computer equipment and readable storage medium
CN105842728A (en) Pulse baseline estimation method in digital nuclear spectrum measurement system
CN113225047A (en) TVLP-MF-based dynamic checkweigher rapid filtering method and system
CN105763170B (en) A kind of electric power signal digital filtering method
CN106021855B (en) A kind of reactor period calculates method
CN108008183B (en) Electric quantity measuring method, system, equipment and computer storage medium
CN201107038Y (en) Attitude Angle Measuring Device
CN110672249A (en) Pressure sensor with multiple pressure measurement units and data processing method thereof
CN115642913A (en) Analog-to-digital converter ADC calibration method, device, equipment and storage medium
CN109239477B (en) The detection method and detection system of touch key-press
CN114966198A (en) Sinusoidal signal-to-noise ratio measuring method
CN112073035A (en) Self-adaptive filtering method for PSD (phase-sensitive Detector) signals
CN111736014B (en) Frequency signal acquisition and data processing method and device
JP5797135B2 (en) Filter device and filtering method
CN108072414B (en) Electronic metering temperature and pressure compensation method for gas meter
CN112082633A (en) Weight measuring method for stabilizing weight value under human body shaking condition
US10024709B2 (en) Method and system to quickly determine a weight
CN220344406U (en) Structure for improving dynamic range of oximeter measured value
JP3085496B2 (en) Sampling type measuring device
CN109547024A (en) The detection method and detection control apparatus of multi 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
TR01 Transfer of patent right

Effective date of registration: 20240307

Address after: Room 2094, South Zone, 2nd Floor, Building 5, No. 999 Youfu Road, Hefu Town, Nanxun District, Huzhou City, Zhejiang Province, 313017 (self declared)

Patentee after: Hengping Tianping (Huzhou) Scientific Instrument Co.,Ltd.

Country or region after: China

Address before: 201103 Room 102, building 9, no.3051 Hechuan Road, Minhang District, Shanghai

Patentee before: SHANGHAI SUNNY HENGPING SCIENTIFIC INSTRUMENT Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right