A. Method:
Based on experience, determine the maximum deviation value allowed between two samples (set to A).
Every time a new value is detected, judge:
If the difference between this value and the previous value is <= A, then this value is valid.
If the difference between this value and the previous value is > A, then this value is invalid, abandon this value, and use the previous value to replace this value.
B. Advantages:
It can effectively overcome the pulse interference caused by accidental factors.
C. Disadvantages :
It cannot suppress the periodic interference.
Poor smoothness.
2. Median value filtering method
A. Method:
Continuously sample N times (N is an odd number)
and arrange the N sampling values in order of size.
Take the middle value as the effective value of this time .
B. Advantages:
It can effectively overcome the fluctuation interference caused by accidental factors
. It has a good filtering effect on the measured parameters with slow changes in temperature and liquid level.
C. Disadvantages:
It is not suitable for fast-changing parameters such as flow rate and speed .
3. Arithmetic average filtering method
A. Method:
Continuously take N sampling values for arithmetic average operation.
When the N value is large: the signal smoothness is high, but the sensitivity is low.
When the N value is small: the signal smoothness is low, but the sensitivity is high.
Selection of N value: general flow, N=12; pressure: N=4
B. Advantages:
Suitable for filtering signals with random interference.
Such signals are characterized by an average value, and the signal fluctuates around a certain range of values.
C. Disadvantages:
Not suitable for real-time control with slow measurement speed or fast data calculation speed.
Relatively wasteful of RAM.
4. Recursive average filtering method (also known as sliding average filtering method)
A. Method:
Consider N consecutive sampling values as a queue.
The length of the queue is fixed to N.
Each time a new data is sampled, it is put at the end of the queue, and the original data at the head of the queue is discarded. (First-in-first-out principle)
Perform arithmetic average calculation on the N data in the queue to obtain a new filtering result
. Selection of N values: flow, N=12; pressure: N=4; liquid level, N=4~12; temperature, N=1~4
B. Advantages:
Good suppression of periodic interference, high smoothness.
Suitable for high-frequency oscillation systems.
C. Disadvantages:
Low sensitivity.
Poor suppression of occasional pulse interference.
It is not easy to eliminate the sampling value deviation caused by pulse interference.
Not suitable for occasions with severe pulse interference.
Relatively wasteful of RAM.
5. Median average filtering method (also known as anti-pulse interference average filtering method)
A. Method:
Equivalent to "median filtering method" + "arithmetic average filtering method"
Continuously sample N data, remove a maximum value and a minimum value
Then calculate the arithmetic average of N-2 data
Selection of N value: 3~14
B. Advantages:
Combining the advantages of two filtering methods
For occasional pulse interference, it can eliminate the sampling value deviation caused by pulse interference
C. Disadvantages:
Slow measurement speed, the same as arithmetic average filtering method
Relatively wasteful of RAM
6. Limiting average filtering method
A. Method:
Equivalent to "limiting filtering method" + "recursive average filtering method"
Each new data sampled is first limited,
and then sent to the queue for recursive average filtering
B. Advantages:
Combining the advantages of two filtering methods
For occasional pulse interference, it can eliminate the sampling value deviation caused by pulse interference
C. Disadvantages:
Relatively wasteful of RAM
7. First-order lag filtering method
A. Method:
Take a=0~1.
The result of this filtering = (1-a)*this sampling value + a*last filtering result
B. Advantages:
Good suppression of periodic interference
Applicable to occasions with high fluctuation frequency
C. Disadvantages:
Phase lag, low sensitivity
The degree of lag depends on the value of a
Cannot eliminate interference signals with a filtering frequency higher than 1/2 of the sampling frequency
8. Weighted recursive average filtering method
A. Method:
It is an improvement on the recursive average filtering method, that is, different weights are given to data at different times
Usually, the closer the data is to the current time, the greater the weight is.
The greater the weight coefficient given to the new sample value, the higher the sensitivity, but the lower the signal smoothness.
B. Advantages:
Applicable to objects with larger pure lag time constants
and systems with shorter sampling cycles.
C. Disadvantages:
For signals with smaller pure lag time constants, longer sampling cycles, and slow changes,
it cannot quickly reflect the severity of the current interference to the system, and the filtering effect is poor.
9. De-jitter filtering method
A. Method:
Set a filter counter.
Compare each sample value with the current effective value:
If the sample value = the current effective value, the counter is cleared.
If the sample value <> the current effective value, the counter is +1, and it is determined whether the counter is >= the upper limit N (overflow).
If the counter overflows, the current value is replaced by the current effective value, and the counter is cleared.
B. Advantages:
It has a better filtering effect for slowly changing measured parameters,
and can avoid repeated on/off jumps of the controller near the critical value or numerical jitter on the display.
C. Disadvantages:
It is not suitable for rapidly changing parameters .
If the value sampled at the time when the counter overflows happens to be an interference value, the interference value will be imported into the system as a valid value.
10. Limiting and de-jittering filtering method
A. Method:
Equivalent to "limiting filtering method" + "de-jittering filtering method"
first limiting, then de-jittering
B. Advantages:
Inherits the advantages of "limiting" and "de-jittering"
Improves some defects in "de-jittering filtering method" to avoid importing interference values into the system
C. Disadvantages:
Not suitable for fast-changing parameters
Previous article:MSP430 controls AD9851 to generate frequency sweep wave
Next article:MSP430 controls the LCD screen of mobile phone
Recommended ReadingLatest update time:2024-11-16 13:35
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Please tell me how to use the IS pin of BTS7960
- Share a summary of CNC power supply solutions, very detailed
- DIY flapping-wing aircraft, focusing on the mechanical structure and flight control system principles (including open source materials)
- Hongmeng Development Board Neptune (Part 2) - Development Environment
- Main steps when configuring the EMIFA module using CSL
- RF chips have a market value of hundreds of billions, and domestic alternatives are a reference
- Seeking advice on work
- This is me, confession of a base station
- Hi guys!
- ST MEMS Creative Competition Post 4 - Robotic Arm Control