Filtering method of adaptive nonlinear filter
Through the filtering method of adaptive nonlinear filter, the filter coefficient is dynamically adjusted, which solves the problem of signal attenuation and noise interference after the mobile phone screen size is expanded, and the rapid response and noise filtering are achieved, which improves the response speed of the proximity sensor. and signal-to-noise ratio.
Patent Information
- Application Number
- CN202411322213.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the expansion of the screen size of the mobile phone, the infrared reflected signal attenuation and the transmission power limit of the mobile phone, it is difficult for the proximity sensor to distinguish the human body's proximity state, and the signal is severely disturbed by noise and cannot respond effectively.
The filtering method of adaptive nonlinear filter is adopted. By judging the change amplitude and number of proximity of the proximity data, dynamically adjusting the filter coefficients to achieve rapid response and noise filtering, ensuring that the proximity sensor effectively reports the proximity state within 2 data.
The response speed and signal-to-noise ratio of the proximity sensor are improved, meeting the needs of smartphones for proximity sensors, taking into account the filtering effect and response speed.
Smart Images

Figure CN119232117A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of filters, and in particular relates to a filtering method of an adaptive nonlinear filter. Background Art
[0002] Smartphones and other mobile devices have quickly become ubiquitous around the world. It is common to see mobile phones and tablet computers in use in restaurants, waiting rooms, or on street corners. Mobile devices are used to play games, take photos, and make phone calls.
[0003] In the field of mobile phones and tablets, high-performance optical proximity sensors are used as standard configuration for human proximity detection. System designers can automatically adjust the brightness of the display screen according to the distance between the display screen and the object being measured, thereby reducing system power consumption. In actual under-screen application scenarios, due to the attenuation of infrared light by the display screen and the screen's requirements for the LED light on time, the proximity light detection sensor needs to be able to distinguish weak infrared reflection signals of objects. As the size of mobile phone screens increases, the gaps that can be used for opening holes on mobile phones are getting smaller and smaller, resulting in increasingly weak signals that can be received by proximity light sensors. Limited by the attenuation of infrared reflection signals by the screen and the limitation of infrared transmission power by mobile phones, the received signal of the proximity sensor is already at the same order of magnitude as the noise, making it impossible to clearly distinguish whether a human body is approaching. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a filtering method of an adaptive nonlinear filter.
[0005] The filtering method of the adaptive nonlinear filter specifically comprises the following steps:
[0006] When new raw proximity data arrives, the system determines the magnitude of the change in that data;
[0007] If the change amplitude is greater than the set threshold parameter approaching the threshold, the filter coefficient is set to 1, and the Nth original approaching data is equal to the Nth average approaching data;
[0008] When the change range of the original approach data is not greater than the set approach threshold, the current scene is in a slow approaching or no approaching state, which can be divided into two situations;
[0009] In a slow approach or no approach state, the system will continuously monitor the relative state of the Nth raw approach data and the current average approach data to determine whether to initiate a quick response.
[0010] Furthermore, when the Nth average proximity data exceeds the proximity threshold, the sensor will immediately report the approaching or moving away state.
[0011] Furthermore, it is determined whether to start a quick response, and the filter coefficient is set to coefficient 1 or coefficient 2 according to the absolute value of the number of approaches and the size of the fast mode threshold. When the filter coefficient is set to 1, it is in a quick response state, and when the filter coefficient is set to 2, it is in a noise filtering state.
[0012] Furthermore, the number of approaches is determined by:
[0013] In the initial state, the number of approaches = 0. When the new raw approach data is greater than the current average approach data, the number of approaches increases by 1.
[0014] When the new raw approach data is less than the current average approach data, the approach times decreases by 1.
[0015] Furthermore, the number of approaches can take negative values.
[0016] Furthermore, if the absolute value of the number of approaches is greater than the set fast mode threshold, the system will set the filter coefficient to coefficient 2, and the filter will be in a faster response state.
[0017] Furthermore, if the absolute value of the approach times is less than or equal to the set fast mode threshold, the system will determine that the current scene is in a distant state, and the approaching data is in a random jitter state with no signal. The system will set the filter coefficient to 1 to achieve the effect of noise filtering.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] The present invention can realize that after a human body approaches, the proximity sensor needs to effectively report the proximity state within 2 data, and the response speed of the proximity sensor can meet the requirements of reducing noise and improving the response speed at the same time;
[0020] The present application can provide a filter that can take into account both filtering effect and response speed, which well matches the requirements of smartphones for proximity sensors. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a traditional technical solution for low-pass filtering of signals;
[0022] Figure 2 It is a system framework structure diagram of the present invention;
[0023] Figure 3 It is a work flow chart of the present invention;
[0024] Figure 4 It is a noise effect diagram of two filters in the present invention without approaching or moving away;
[0025] Figure 5 This is a diagram showing the effect of the present invention when rapid and strong approach occurs;
[0026] Figure 6 A weak proximity effect occurs for the present invention. DETAILED DESCRIPTION
[0027] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] See also Figure 1-Figure 6 , the present application provides a filtering method of an adaptive nonlinear filter, comprising:
[0029] Compared with the traditional low-pass filter, LP_ALPHA (filter coefficient) is no longer a constant, but is set to the most effective value through system intelligent judgment, while meeting the needs of noise filtering and system establishment;
[0030] N_PS_FAST (fast mode threshold) is a natural number, usually ranging from 2 to 5. ALPHA1 (coefficient 1) and ALPHA2 (coefficient 2) are any values between [0, 1], and ALPHA2 (coefficient 2)>ALPHA1 (coefficient 1); the response speed of the filter when coefficient 2 is selected is faster than coefficient 1.
[0031] PROX_S I G_THRES (proximity threshold) is a threshold parameter set according to the actual data of the system.
[0032] The system works in the following way:
[0033] When new raw proximity data PROX_RAW[N] arrives, the system determines the magnitude of the change in the data;
[0034] If the change amplitude is greater than the set threshold parameter PROX_S I G_THRES (approach threshold), it indicates that the system has approached or moved away quickly. At this time, LP_ALPHA, that is, the filter coefficient, is set to 1, PROX_AVG[N] = PROX_RAW[N], PROX_RAW[N] is the Nth raw approach data, and PROX_AVG[N] is the Nth average approach data, thereby achieving a fast response effect;
[0035] Since PROX_AVG[N] exceeds PROX_S I G_THRES, PROX_S I G_THRES is close to the threshold, and the sensor will immediately report the approaching or moving away status.
[0036] When the change range of the raw proximity data PROX_RAW[N] is not greater than the set PROX_S I G_THRES, the current scene is in a slow approaching or no approaching state, which can be divided into two situations;
[0037] When in a slow approach or no approach state, the system will continuously monitor the relative state of the Nth raw approach data PROX_RAW[N] and the current average approach data PROX_AVG[N-1] to determine whether to initiate a quick response.
[0038] In the initial state, the number of approaches = 0. If the new raw approach data is greater than the current average approach data, the number of approaches increases by 1; if the new raw approach data is less than the current average approach data, the number of approaches decreases by 1. The number of approaches can be negative.
[0039] If the absolute value of the number of approaches is greater than the set fast mode threshold N_PS_FAST, the system will set the filter coefficient LP_ALPHA to coefficient 2 (ALPHA2), and the filter will be in a faster response state.
[0040] If the absolute value of the number of approaches is less than or equal to the set fast mode threshold N_PS_FAST, the system will determine that the current scene is in a distant state, and no human body is approaching. The approaching data is in a random jitter state with no signal. The system will set the filter coefficient (LP_ALPHA) to coefficient 1 (ALPHA1) to achieve the effect of noise filtering.
[0041] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A filtering method for an adaptive nonlinear filter, characterized in that: The method specifically comprises the following steps: When new raw proximity data arrives, the system determines the magnitude of the change in that data; If the change amplitude is greater than the set threshold parameter approaching the threshold, the filter coefficient is set to 1, and the Nth original approaching data is equal to the Nth average approaching data; When the change range of the original approach data is not greater than the set approach threshold, the current scene is in a slow approaching or no approaching state, which can be divided into two situations; In a slow approach or no approach state, the system will continuously monitor the relative state of the Nth raw approach data and the current average approach data to determine whether to initiate a quick response.
2. The filtering method of the adaptive nonlinear filter according to claim 1, characterized in that: When the Nth average proximity data exceeds the proximity threshold, the sensor will immediately report the approach or distance status.
3. The filtering method of the adaptive nonlinear filter according to claim 1, characterized in that: Determine whether to start fast response, set the filter coefficient to coefficient 1 or coefficient 2 according to the absolute value of the number of approach times and the size of the fast mode threshold. When the filter coefficient is set to 1, it is in the fast response state, and when the filter coefficient is set to 2, it is in the noise filtering state.
4. The filtering method of the adaptive nonlinear filter according to claim 3, characterized in that: The number of approaches is determined as follows: In the initial state, the number of approaches = 0. When the new raw approach data is greater than the current average approach data, the number of approaches increases by 1. When the new raw approach data is less than the current average approach data, the approach times decreases by 1.
5. The filtering method of the adaptive nonlinear filter according to claim 3, characterized in that: The number of approaches can take negative values.
6. The filtering method of the adaptive nonlinear filter according to claim 3, characterized in that: If the absolute value of the approach times is greater than the set fast mode threshold, the system will set the filter coefficient to coefficient 2, and the filter will be in a faster response state.
7. The filtering method of the adaptive nonlinear filter according to claim 3, characterized in that: If the absolute value of the number of approaches is less than or equal to the set fast mode threshold, the system will determine that the current scene is in a distant state, and the approaching data is in a random jitter state with no signal. The system will set the filter coefficient to 1 to achieve the effect of noise filtering.
Citation Information
Patent Citations
Device and method for carrying out self-adaptive filtering to pilot channel
CN101557243A
Method and device for signal filtering, and method and repeater for same-frequency amplification of base station signals
CN103199912A
Dynamic and variable time constant filter and filtering method
CN105846793A
Automobile tail door kicking recognition system and method
CN111252033A
Kalman filtering method and device for changing Q value and readable storage medium
CN111458395A