CN111413473A - Air quality module mixed gas data filtering algorithm based on AQI - Google Patents
Air quality module mixed gas data filtering algorithm based on AQI Download PDFInfo
- Publication number
- CN111413473A CN111413473A CN202010378293.2A CN202010378293A CN111413473A CN 111413473 A CN111413473 A CN 111413473A CN 202010378293 A CN202010378293 A CN 202010378293A CN 111413473 A CN111413473 A CN 111413473A
- Authority
- CN
- China
- Prior art keywords
- data
- aqi
- air quality
- filtering algorithm
- quality module
- 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
Links
- 238000001914 filtration Methods 0.000 title claims abstract description 24
- 238000005070 sampling Methods 0.000 claims abstract description 4
- 238000002156 mixing Methods 0.000 claims description 10
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/0004—Gaseous mixtures, e.g. polluted air
- G01N33/0009—General constructional details of gas analysers, e.g. portable test equipment
- G01N33/0062—General constructional details of gas analysers, e.g. portable test equipment concerning the measuring method or the display, e.g. intermittent measurement or digital display
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- 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/0248—Filters characterised by a particular frequency response or filtering method
- H03H17/026—Averaging filters
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/21—Pc I-O input output
- G05B2219/21137—Analog to digital conversion, ADC, DAC
Landscapes
- Engineering & Computer Science (AREA)
- Chemical & Material Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Combustion & Propulsion (AREA)
- Mathematical Physics (AREA)
- Automation & Control Theory (AREA)
- Food Science & Technology (AREA)
- Medicinal Chemistry (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Sampling And Sample Adjustment (AREA)
Abstract
The invention discloses a mixed gas data filtering algorithm based on an air quality module (AQI), which comprises the following steps of S1: acquiring external N data through an A/D channel of the MCU, storing the data into an array AD, and turning to the step S2; s2: judging whether the data in the array AD is full, if so, switching to the step S1, and if so, switching to the step S3; s3: sorting N data in the array AD; s4: removing M data before and after sorting; s5: and summing the rest n data, and taking the average value of the data to obtain a final sampling value. The air quality module mixed gas data filtering algorithm based on the AQI provided by the invention can effectively remove interference, and the effective and reliable performance of data filtering is ensured, thereby greatly improving the accuracy of data.
Description
Technical Field
The invention relates to the field of atmospheric monitoring, in particular to a gas mixing data filtering algorithm based on an air quality module (AQI).
Background
At present, in the field of atmospheric monitoring, the gas concentration is mainly obtained by a host computer by acquiring AD data of a sensor and then performing filtering and data processing. And in the method, data can continuously jump and fluctuate due to external electromagnetic interference or unreasonable power supply circuit design and circuit filtering processing, so that the accuracy of final concentration is determined by the effectiveness and reliability of data filtering through software. The invention provides a mixed gas data filtering algorithm based on an air quality module (AQI), which can effectively remove interference and greatly improve the accuracy of data.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a mixed gas data filtering algorithm based on an air quality module (AQI).
The technical scheme of the invention is as follows:
a gas mixing data filtering algorithm based on an AQI air quality module comprises the following steps,
s1: acquiring external N data through an A/D channel of the MCU, storing the data into an array AD, and turning to the step S2;
s2: judging whether the data in the array AD is full, if so, switching to the step S1, and if so, switching to the step S3;
s3: sorting N data in the array AD;
s4: removing M data before and after sorting;
s5: and summing the rest n data, and taking the average value of the data to obtain a final sampling value.
Further, in step S1, the a/D channel is a single channel or multiple channels.
Further, in step S1, N is 64 or more.
Further, N is an integer multiple of 8.
Further, in step S3, the N data are bubble-sorted in descending order.
Further, in step S4, M is equal to N/16.
Further, in step S5, the N data are queued at 7 × N/8.
Furthermore, N/8 new data are sampled at each time and put into the head of the queue, and N/8 old data at the tail of the queue are removed, so that the stored N data are the latest updated data all the time.
Compared with the prior art, the invention has the beneficial effects that: the air quality module air mixing data filtering algorithm based on the AQI provided by the invention can effectively remove interference, and the effective and reliable performance of data filtering is ensured, thereby greatly improving the accuracy of data.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail by the following examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Examples
The invention provides a mixed gas data filtering algorithm based on an AQI air quality module, which comprises the following steps,
s1: acquiring external N data through an A/D channel of the MCU, storing the data into an array AD, and turning to the step S2;
s2: judging whether the data in the array AD is full, if so, switching to the step S1, and if so, switching to the step S3;
s3: sorting N data in the array AD;
s4: removing M data before and after sorting;
s5: and summing the rest n data, and taking the average value of the data to obtain a final sampling value.
In step S1, the a/D channel may be a single channel acquisition or a multi-channel acquisition. Preferably, N is greater than or equal to 64, and N is an integer multiple of 8. If the time response time allows, the value of N is as large as possible.
In step S3, the N data are bubble sorted in descending order. Of course, the sorting is not limited to bubble sorting.
In step S4, M is equal to N/16, and N/16 data before and after sorting are removed.
In step S5, the N data are served as a queue in a manner of 7 × N/8. N/8 new data are sampled at each time and put into the head of the queue, and N/8 old data at the tail of the queue are removed, so that the N stored data are the latest updated data all the time. The arrangement mode of the data can be adjusted arbitrarily according to the requirements.
By the algorithm, interference can be effectively removed, and the effectiveness and reliability of data filtering are guaranteed, so that the accuracy of data is greatly improved.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. A mixed gas data filtering algorithm based on an AQI air quality module is characterized by comprising the following steps,
s1: acquiring external N data through an A/D channel of the MCU, storing the data into an array AD, and turning to the step S2;
s2: judging whether the data in the array AD is full, if so, switching to the step S1, and if so, switching to the step S3;
s3: sorting N data in the array AD;
s4: removing M data before and after sorting;
s5: and summing the rest n data, and taking the average value of the data to obtain a final sampling value.
2. The AQI air quality module-based blending data filtering algorithm of claim 1, wherein in step S1, said a/D channel is single-channel or multi-channel.
3. The AQI air quality module-based blending data filtering algorithm of claim 1, wherein in step S1, said N is greater than or equal to 64.
4. The AQI air quality module-based air mixing data filtering algorithm of claim 3, wherein N is an integer multiple of 8.
5. The AQI air quality module-based air mixing data filtering algorithm of claim 1, wherein in step S3, said N data are bubble ordered in descending order.
6. The AQI air quality module-based air mixing data filtering algorithm of claim 4, wherein in step S4, M is equal to N/16.
7. The AQI air quality module-based air mixing data filtering algorithm of claim 1, wherein in step S5, said N data are queued at 7 × N/8.
8. The AQI air quality module-based air mixing data filtering algorithm of claim 7, wherein N/8 new data samples at a time are put at the head of the queue, and N/8 old data at the tail of the queue are removed, so that the N data saved are the latest updated data all the time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010378293.2A CN111413473A (en) | 2020-05-07 | 2020-05-07 | Air quality module mixed gas data filtering algorithm based on AQI |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010378293.2A CN111413473A (en) | 2020-05-07 | 2020-05-07 | Air quality module mixed gas data filtering algorithm based on AQI |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111413473A true CN111413473A (en) | 2020-07-14 |
Family
ID=71492388
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010378293.2A Pending CN111413473A (en) | 2020-05-07 | 2020-05-07 | Air quality module mixed gas data filtering algorithm based on AQI |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111413473A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN205103311U (en) * | 2015-11-10 | 2016-03-23 | 湖北华锐新能电业科技有限公司 | Electric power measurement safety monitoring device |
CN106980491A (en) * | 2017-03-30 | 2017-07-25 | 西京学院 | A kind of improved Mean Filtering Algorithm of A/D samplings |
-
2020
- 2020-05-07 CN CN202010378293.2A patent/CN111413473A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN205103311U (en) * | 2015-11-10 | 2016-03-23 | 湖北华锐新能电业科技有限公司 | Electric power measurement safety monitoring device |
CN106980491A (en) * | 2017-03-30 | 2017-07-25 | 西京学院 | A kind of improved Mean Filtering Algorithm of A/D samplings |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114911209B (en) | Garlic processing wastewater treatment management system based on data analysis | |
WO2004013777B1 (en) | System and method of parallel pattern matching | |
CN111178587B (en) | Spark framework-based short-term power load rapid prediction method | |
CN1874249A (en) | Method for treating relativity of alarm based on parent-child relationship | |
CN111337789A (en) | Method and system for detecting fault electrical element in high-voltage transmission line | |
CN110941553A (en) | Code detection method, device, equipment and readable storage medium | |
CN111413473A (en) | Air quality module mixed gas data filtering algorithm based on AQI | |
CN113934967B (en) | Intelligent storage sample-checking feedback supervision system for coal samples | |
CN115032323A (en) | Method for determining oil chromatography data abnormity, electronic equipment and storage medium | |
Sanlin et al. | Identification and localization of walnut varieties based on YOLOv5 | |
CN104535827A (en) | Defective point removing method and system used in AD sampling | |
CN116704387A (en) | Power line channel inspection system and method based on video structuring | |
CN115865099A (en) | Multi-type data segmentation compression method and system based on Huffman coding | |
CN103152134B (en) | Receiving terminal based on Real-time Transport Protocol resets the method and system of voice packet | |
CN111191864A (en) | Photovoltaic output data restoration method and system | |
CN114429175A (en) | Distribution network early warning method considering distributed processing information | |
CN112769619A (en) | Multi-classification network fault prediction method based on decision tree | |
CN112488191A (en) | Metal corrosion distribution diagram drawing method based on KNN intelligent algorithm | |
CN104464747A (en) | Decoding method for selected call signals of segment handling airborne selective calling system | |
CN112183186A (en) | Insulator defect detection method based on generation countermeasure network | |
CN110853228B (en) | Fault processing method and device of financial terminal | |
CN103559566A (en) | Dispatching method for controlling process machine through defect scan result | |
CN109714820B (en) | Distributed computer array and corresponding method | |
CN111327488B (en) | Distributed computer array | |
CN117130328A (en) | Data collection system for fabric for digital factory |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200714 |
|
RJ01 | Rejection of invention patent application after publication |