Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Improved average filtering algorithm for A/D (Analog to Digital) sampling

A mean filtering and sampling value technology, applied in the field of software filtering algorithms, can solve the problems of ineffective removal of interference signals, large jumps, and large deviations from the mean value to the true value, etc., to achieve interference removal, simple implementation, and strong anti-interference ability Effect

Inactive Publication Date: 2017-07-25
XIJING UNIV
View PDF3 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this filtering algorithm is simple, due to the existence of interference, some of the N values ​​will have a large jump and deviate far from the center value. Therefore, after taking the average value, the obtained average value has a large deviation from the true value. , can not effectively remove the interference signal

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Improved average filtering algorithm for A/D (Analog to Digital) sampling
  • Improved average filtering algorithm for A/D (Analog to Digital) sampling

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0034] In the sampling software filtering method, first use the function Adc1_Init() to initialize the A / D acquisition channel 1 of STM32F103RBT6. Then call the Get_Adc1() function to store the collected value Adc1_Value into the array AD[M], and the initial value of M is 0. Then judge whether M is smaller than N, the initial value of N is 100, if so, continue to call Get_Adc1() to collect data and store it in the array AD[M]. If not, it means that 100 data has been collected, call the bubble sorting function Bubble_Sort(AD[N]) to sort the 100 data in the AD[N] array, the order is from small to large. Then call the Delete(AD[N / 5]) function to delete 20 data before and after each in the array. Finally, calculate the cumulative sum of the remaining 60 data, and save it in SUM, use SUM / 60 to get the average value, store it in AVG, and get the final true value of the collected data.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to an improved average filtering algorithm for A / D (Analog to Digital) sampling. Data are collected by use of an MCU (Micro-programmed Control Unit), A / D conversion is carried out on the collected data, the data are stored in an array AD [N], wherein n is greater than or equal to 100. When sampling values stored in the array are full, the number of N is subject to bubble sort according to the sequence from small to big, front and rear N / 5 data in the sorted array are removed, the remaining 3*N / 5 are summed, an average value is taken to obtain a final sampling value. The algorithm can effectively eliminate an interference signal, especially the value which has great difference with the sampling value so that the final sampling value is very close to a truth value. Therefore, the software filtering method has the characteristics of easy realization, rapid response and high anti-interference and can effectively suppress noise.

Description

technical field [0001] The invention belongs to the technical field of software filtering algorithms, and in particular relates to an improved average value filtering algorithm of A / D sampling. Background technique [0002] In engineering practice and experiments, it is often necessary to collect data after A / D conversion, but due to factors such as external interference and unreasonable circuit design, the data will continuously jump and be very unstable. In order to improve this situation and effectively remove interference, various filtering algorithms are often used. Among them, the average filtering algorithm is a commonly used one, which collects sampling values ​​N times in a loop, and then takes the average value to obtain the final value. Although this filtering algorithm is simple, due to the existence of interference, some of the N values ​​will have a large jump and deviate far from the center value. Therefore, after taking the average value, the obtained averag...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F7/76
CPCG06F7/76
Inventor 黄健
Owner XIJING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products