Rainfall sensor rainfall identification method
By using data acquisition, rainfall calibration algorithm and sensor calibration algorithm in the rainfall sensor, static deviation is eliminated, and the problem of low accuracy in rainfall sensor recognition is solved, achieving more efficient rainfall recognition and classification.
Patent Information
- Application Number
- CN202411796211.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
AI Technical Summary
Due to installation accuracy problems, environmental problems and measurement system problems, existing rainfall sensors are prone to static deviations in the sensor, affecting the accuracy of rainfall recognition.
Data collection is performed through rainfall sensors, rainfall calibration algorithm is used to count raindrop counts, rainfall recognition is performed through data processing, and static deviation is eliminated through sensor calibration algorithms, and finally feature extraction is performed on the processed data to realize rainfall classification.
Effectively eliminate static deviations, improve the accuracy of rainfall recognition, reduce the repetitive parameter configuration work required for calibration, and improve the accuracy of data response speed and frequency statistics.
Smart Images

Figure CN119717078A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of rain sensors, and in particular to a rain sensor rainfall recognition method. Background Art
[0002] With the rapid development of the automobile industry, people's demand for automobile travel has reached a new peak. Different parts of the automobile body have good development prospects, and more professionals are needed to realize various body applications. Rain sensors are an important active safety and comfort enhancement technology in modern automobiles. They are mainly used to detect moisture on the car windshield and automatically adjust the working state of the wipers accordingly.
[0003] Most existing rain sensors rely on optical principles, mainly including components such as light emitting diodes (LEDs), light receiving diodes (LRDs), ambient light sensors, and electronic control units (ECUs). The sensor emits light through LEDs, which will be totally reflected on the windshield surface in the absence of rain. Once rain falls on the windshield, part of the light will be absorbed or refracted by the rain, resulting in a decrease in the intensity of light reaching the LRD. The ECU determines whether there is rain by monitoring the changes in the light intensity received by the LRD, and adjusts the working state of the wipers accordingly.
[0004] However, due to installation accuracy issues, environmental issues, and problems with the measurement system itself, rainfall sensors are prone to static deviations, namely static calibration, which affects the accuracy of rainfall identification. Therefore, it is necessary to improve the rainfall identification method to eliminate the impact of static deviations. Summary of the invention
[0005] The purpose of the present invention is to provide a rainfall sensor rainfall identification method to solve the problem raised by the above background technology that rainfall sensors on the market currently are prone to static deviation, i.e. static calibration, due to installation accuracy problems, environmental problems and problems with the measurement system itself, which affects the accuracy of rainfall identification.
[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a rainfall sensor rainfall identification method, the steps of the rainfall sensor rainfall identification method are: 1. Data collection through a rain sensor; 2. Raindrop number statistics through a rain calibration algorithm; 3. Rainfall identification through data processing; 4. Elimination of static deviation through a sensor calibration algorithm; 5. Feature extraction of the processed data to achieve rainfall classification.
[0007] Preferably, the step 1 is based on the sensor measurement principle and adopts dual optical path measurement for data acquisition, namely: the driving inputs a and b of the optical signals of LEDA and LEDB.
[0008] Preferably, the dual-path specific optical signal feeds back the optical signal refracted and then reflected by the raindrops to the internal measurement channel for differential operation, amplification operation and integration operation, and introduces output feedback to obtain the sensor 12-bit ADC value, which is expressed as:
[0009] y=∫(A*Δx-K*Y)
[0010] A: operational amplifier gain coefficient;
[0011] K: negative feedback transfer function coefficient;
[0012] From the above expression, we can calculate Y(S)=A*X(S) / (K+S). After simplification and calculation, we can get the transfer function G(S)=A / (K+S).
[0013] Assuming that the current rainfall is a continuously changing step signal, the transient input signal is x(t)=C, (C is a constant), the ADC channel width is 12 bits, and the ADC value changes bidirectionally (the default value is 1024), the output signal Y(S)=AC / K*[1 / S-1 / (K+S)] can be obtained by inverse Laplace transform:
[0014] Output signal: y(t) = AC / K*[1-e^(-Kt)]+1024. Taking its derivative, we know that dy(t) / dt>AC / K.
[0015] Preferably, the rainfall calibration algorithm adopts a frequency statistics method, based on the assumption that raindrops falling on the glass present a step signal on a time scale, namely:
[0016] x(t)=C*K*t (t is the rounded value of time, C is a constant, and K is a random number under the probability of raindrops), which realizes the statistics of the number of raindrops per unit time.
[0017] Preferably, the step 3 adopts a circular queue for memory configuration, stores historical ADC values through a circular queue buffer, and uses a current frequency counter to indicate the number of pulses in the buffer.
[0018] Preferably, the data processing continuously takes 30 ADC values in a new round of sampling, accesses the sensor IC at a fixed frequency, reads several ADC values in sequence, performs error filtering by arithmetic averaging, and directly queues the processed effective values into the queue buffer.
[0019] Preferably, when the buffer is full, the head of the queue directly exits the buffer, and each time the queue is entered or exited, the increase or decrease of the pulse frequency is determined at the head and tail of the queue by a recursive method based on a comparison of three-point data, that is, the number of pulses is accumulated by a recursive method to calculate the raindrop frequency.
[0020] Preferably, the step 4 is based on the output steady-state quantity of the measurement system: y(t)=AC / K+1024. When the system has a static Δx (C is not equal to 0), that is, due to installation problems, the differential value of the reflected signals of the two optical paths is not zero, and the steady-state quantity y(t) will have upper and lower deviations on the initial value of 1024.
[0021] Preferably, the input signal relationship between the measurement system itself and the environment and installation accuracy is: x=k(ab)+c, where k is the environment and system characteristic coefficient, a and b are the drive currents, and c is mainly the deviation caused by installation accuracy.
[0022] Preferably, in step 5, feature extraction is to extract useful features from the processed data, namely the number of pulses, and the rainfall can be judged according to the different pulse frequencies. The rainfall can be divided into four types of rain conditions: heavy rain, moderate rain, light rain and no rain.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] 1. The rainfall recognition method of the rain sensor makes a mathematical algorithm description of the rainfall, that is, algorithm recognition, and describes the continuous unstable raindrop situation with a discrete static stable probability statistics method, so that the rainfall conditions that are difficult to describe directly with a single numerical value under natural conditions can be turned into regular data descriptions. Then, the frequency method can be used to represent the rainfall, and the static deviation of the sensor caused by the sensor installation accuracy problem can be eliminated, that is, static calibration.
[0025] 2. The rainfall sensor rainfall recognition method uses a circular queue buffer to recursively optimize the ADC data to obtain continuous and stable frequency statistics, which has very high efficiency in ensuring fast response to host computer data, frequency statistics accuracy and continuity.
[0026] 3. The rainfall recognition method of the rain sensor uses the inherent system characteristics of the sensor for mathematical derivation, and then verifies twice based on its linear characteristics to directly derive the calibration formula, which greatly reduces the repetitive parameter configuration work required for calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A transient analysis diagram of a rainfall signal of a rainfall sensor rainfall identification method according to the present invention;
[0028] Figure 2 This is a rainfall ADC data curve estimation diagram of a rainfall sensor rainfall identification method of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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.
[0030] See also Figure 1-2 The present invention provides a technical solution: a method for identifying rainfall amount of a rain sensor, wherein the steps of the method for identifying rainfall amount of a rain sensor are as follows:
[0031] 1. Data is collected through the rain sensor. Based on the sensor measurement principle, dual optical path measurement is used for data collection, namely: the driving inputs a and b of the light signals of LEDA and LEDB. In this step, since the sensor relies on optical principles, dual-path specific light signals are used through the shell, transparent colorless gasket, mounting glass, and raindrops to obtain the reflected light signal feedback after the raindrops are refracted, so data collection and processing can be performed. The dual-path specific light signal feeds back the light signal refracted and then reflected by the raindrops to the internal measurement channel for differential operation, amplification operation, and integration operation. At the same time, output feedback is introduced to obtain the sensor 12-bit ADC value, expressed as:
[0032] y=∫(A*Δx-K*Y)
[0033] A: operational amplifier gain coefficient;
[0034] K: negative feedback transfer function coefficient;
[0035] From the above expression, we can calculate Y(S)=A*X(S) / (K+S). After simplification and calculation, we can get the transfer function G(S)=A / (K+S).
[0036] Assuming that the current rainfall is a continuously changing step signal, the transient input signal is x(t)=C, (C is a constant), the ADC channel width is 12 bits, and the ADC value changes bidirectionally (the default value is 1024), the output signal Y(S)=AC / K*[1 / S-1 / (K+S)] can be obtained by inverse Laplace transform:
[0037] Output signal: y(t)=AC / K*[1-e^(-Kt)]+1024. Its derivative shows that dy(t) / dt>AC / K. By analyzing the measurement principle, we can know that when the gain coefficient A remains unchanged, the input signal and the output signal are in a linear relationship. It can be seen that the static deviation of the sensor can be eliminated by using the linear calibration method and setting the zero point of the output signal by linear proportion. By analyzing the derivative of the above output signal, we can know that when the input signal C remains unchanged and the ADC value does not overflow, increasing the gain coefficient can make the output increase and decay rapidly. In this case, the current rainfall can be represented by counting the pulse frequency.
[0038] 2. The number of raindrops is counted by the rainfall calibration algorithm. The rainfall calibration algorithm adopts the frequency statistics method, based on the assumption that the raindrops falling on the glass present a step signal on the time scale, that is:
[0039] x(t) = C*K*t (t is the rounded value of time, C is a constant, and K is a random number under the probability of raindrops), which realizes the statistics of the number of raindrops per unit time. In this step, since it is known that raindrops are refracted on the sensor measurement surface and then reflected to the measurement circuit, the ADC value is basically derived from this. Therefore, if it is raining, the number of raindrops per unit area per unit time can objectively reflect the rain conditions. The number of raindrops per unit area per unit time N*t, that is, within multiple variable time ranges, such as one second, can be expressed as rainfall. The ADC disturbance caused by the continuous falling of these raindrops on the measurement surface is used as a description of the falling of raindrops, thereby realizing the judgment of rainfall.
[0040] 3. Rainfall identification is performed through data processing, and a circular queue is used for memory configuration. The historical ADC values are saved through the circular queue buffer, and the current frequency counter is used to indicate the number of pulses in the buffer. This step uses a circular queue for data storage, which can respond to data faster, and the collected data is not wasted, and can be sampled continuously. In the new round of data processing, 30 ADC values are continuously taken, and the sensor IC is accessed at a fixed frequency. Several ADC values are read in turn, and error filtering is performed through the arithmetic mean method. The processed effective value is directly queued into the queue buffer. This step can simply and effectively process data through arithmetic mean filtering, smooth out random fluctuations in a short period of time, reduce errors, and directly exit the buffer from the head of the queue when the buffer is full. Each time the queue is entered and exited, the increase or decrease of the pulse frequency is judged at the head and tail of the queue according to the recursive method based on the comparison of three-point data, that is, the recursive method accumulates the number of pulses and calculates the frequency of raindrops. This step uses the three-point recursive comparison method or the extreme value method to determine the number of pulses. When the queue data reaches the critical point, each data entry must be matched with a corresponding data exit. This ensures the constancy of the time scale in the data buffer and the continuity and stability of the pulse frequency statistics.
[0041] 4. Eliminate static deviation through sensor calibration algorithm. According to the output steady-state quantity of the measurement system: y(t) = AC / K + 1024, when the system has a static Δx (C is not equal to 0), that is, due to the installation problem, the difference value of the reflected signal of the two optical paths is not zero, and the steady-state quantity y(t) will produce upper and lower deviations on the initial value of 1024. In this step, since any measurement system needs to measure data under a standard condition, not only absolute measurement needs to eliminate deviations, but relative measurement also needs to eliminate static deviations, because deviations will affect the upper and lower measurement ranges of the data, causing data saturation problems and affecting data accuracy. Through the sensor calibration algorithm, static deviations can be eliminated to avoid affecting the accuracy of rainfall identification. It is very necessary to perform sensor calibration algorithms. The approximate input signal relationship under the influence of the measurement system itself and the environment and installation accuracy is: x = k(ab) + c. Among them, k is the environmental and system characteristic coefficient, a and b are the driving currents, and c is mainly the deviation caused by installation accuracy. By analyzing the relationship in this step, it can be known that: when the driving current is consistent, the installation accuracy problem causes the static deviation of the input signal, and it is necessary to reasonably distribute the two LED signals, that is, to offset the static deviation by controlling the ab current of the LED driving circuit, and to amplify the difference between the two phases ab when ab is equal in proportion to calculate the system environmental coefficient k, and then select the appropriate ab two-phase driving current based on the relationship ab=c / k in combination with the sensor system.
[0042] 5. Perform feature extraction on the processed data to realize rainfall classification. Feature extraction is to extract useful features from the processed data, that is, the number of pulses. According to the different pulse frequencies, the rainfall can be judged. The rainfall can be roughly divided into four rain conditions: heavy rain, moderate rain, light rain, and no rain. This step can identify the four rain conditions of heavy rain, moderate rain, light rain, and no rain through the judgment of pulse frequency, which is convenient for use in the application layer.
[0043] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A rainfall sensor rainfall recognition method, characterized in that: The steps of the rain sensor rainfall identification method are as follows:
1. Data collection through the rain sensor; 2. Raindrop number statistics through the rain calibration algorithm; 3. Rainfall identification through data processing; 4. Elimination of static deviation through the sensor calibration algorithm; 5. Extract features from the processed data to achieve rainfall classification.
2. A method for identifying rainfall using a rain sensor according to claim 1, characterized in that: The step 1 is based on the sensor measurement principle and adopts dual optical path measurement to collect data, namely: the driving inputs a and b of the optical signals of LEDA and LEDB.
3. A rainfall sensor rainfall identification method according to claim 2, characterized in that: The dual-path specific optical signal feeds back the optical signal refracted and then reflected by the raindrops to the internal measurement channel for differential operation, amplification operation and integration operation. At the same time, output feedback is introduced to obtain the sensor 12-bit ADC value, which is expressed as: y=∫(A*Δx-K*Y) A: operational amplifier gain coefficient; K: negative feedback transfer function coefficient; From the above expression, we can calculate Y(S)=A*X(S) / (K+S). After simplification and calculation, we can get the transfer function G(S)=A / (K+S). Assuming that the current rainfall is a continuously changing step signal, the transient input signal is x(t)=C, (C is a constant), the ADC channel width is 12 bits, and the ADC value changes bidirectionally (the default value is 1024), the output signal Y(S)=AC / K*[1 / S-1 / (K+S)] can be obtained by inverse Laplace transform: Output signal: y(t)=AC / K*[1-e^(-Kt)]+1024. Taking its derivative, we can know that dy(t) / dt>AC / K.
4. A method for identifying rainfall using a rain sensor according to claim 3, characterized in that: The rainfall calibration algorithm described above adopts the frequency statistics method, based on the assumption that raindrops falling on the glass present a step signal on a time scale, namely: x(t)=C*K*t (t is the rounded value of time, C is a constant, and K is a random number under the probability of raindrops), which realizes the statistics of the number of raindrops per unit time.
5. The method for rain sensor rainfall identification according to claim 1, characterized in that: The step 3 adopts a circular queue for memory configuration, uses a circular queue buffer to store historical ADC values, and uses a current frequency counter to represent the number of pulses in the buffer.
6. A rainfall sensor rainfall identification method according to claim 5, characterized in that: The data processing described above continuously takes 30 ADC values in a new round of sampling, accesses the sensor IC at a fixed frequency, reads several ADC values in sequence, performs error filtering by arithmetic averaging, and directly queues the processed effective values into the queue buffer.
7. A rainfall sensor rainfall identification method according to claim 6, characterized in that: When the buffer is full, the head of the queue directly leaves the buffer. Each time the queue is entered or exited, the increase or decrease of the pulse frequency is determined at the head and tail of the queue by the recursive method based on the comparison of three-point data, that is, the recursive method accumulates the number of pulses and calculates the raindrop frequency.
8. The method for rain sensor rainfall identification according to claim 1, characterized in that: The step 4 is based on the output steady-state quantity of the measurement system: y(t)=AC / K+1024. When the system has a static Δx (C is not equal to 0), that is, due to installation problems, the difference value of the reflected signals of the two optical paths is not zero, and the steady-state quantity y(t) will have upper and lower deviations on the initial value of 1024.
9. A rainfall sensor rainfall identification method according to claim 8, characterized in that: The approximate input signal relationship between the measurement system itself and the environment and installation accuracy is: x=k(ab)+c, where k is the environment and system characteristic coefficient, a and b are the drive currents, and c is mainly the deviation caused by installation accuracy.
10. The method for rain sensor rainfall identification according to claim 1, characterized in that: In step 5, feature extraction is to extract useful features, namely the number of pulses, from the processed data. According to the different pulse frequencies, the rainfall can be judged and the rainfall can be divided into four types of rain conditions: heavy rain, moderate rain, light rain and no rain.