A sensitivity optimization method for touch-type capacitive switch and capacitive switch

By updating the capacitive baseline values ​​in real time and using lightweight learning models and Kalman filtering algorithms, the instability of capacitive touch switches under temperature drift and ambient noise is solved, achieving higher sensitivity and long-term stability.

CN119720128BActive Publication Date: 2025-05-13ZHEJIANG YILUYI SENSOR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510230185.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-13
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

Existing capacitive touch switches are susceptible to temperature drift and ambient noise, resulting in unstable and false triggering of baseline values ​​and lack of adaptability to long-term sensor aging.

Method used

By obtaining ambient temperature data in real time, combining the polynomial regression model to dynamically update the capacitance baseline value, and using a lightweight learning model (1D-CNN) to distinguish noise and touch signals, introducing a Kalman filtering algorithm and a dual Kalman filtering architecture to realize dynamic optimization of the capacitor baseline value and online update of model parameters.

Benefits of technology

It significantly improves the accuracy of the temperature compensation model, reduces the false trigger rate, enhances the adaptability of the capacitor switch to sensor aging and environmental changes, and improves its long-term stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720128B_ABST
    Figure CN119720128B_ABST
Patent Text Reader

Abstract

The present invention discloses a sensitivity optimization method for a touch-type capacitive switch and a capacitive switch. The method includes obtaining a capacitance baseline value and ambient temperature data in an untouched state in real time, and updating the capacitance baseline value according to the ambient temperature data; collecting noise samples and real touch signals in different environments, constructing a training data set, and using a lightweight learning model to distinguish noise samples from real touch signals; and determining a touch event based on the updated capacitance baseline value and a determined value. The present invention also relates to a capacitive switch using the above method. Through technical means such as a polynomial regression model, a Kalman filter algorithm, and a dual Kalman filter architecture, the present invention solves the problems of insufficient accuracy of a temperature compensation model of a capacitive touch switch in the prior art, reliance on a fixed threshold for noise classification, difficulty in adapting to a complex environment, and lack of adaptability to long-term sensor aging, and has broad application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of capacitive switches, and in particular to a sensitivity optimization method of a touch-type capacitive switch and a capacitive switch. Background Art

[0002] Capacitive touch switch is an electronic switch that uses the principle of capacitive sensing to detect touch operation. It triggers the switch action by detecting the change in capacitance caused by human touch or approach, and is widely used in consumer electronics, household appliances, industrial control and other fields.

[0003] Traditional capacitive touch switches are susceptible to temperature drift and environmental noise, resulting in unstable baseline values ​​and false triggering. In the prior art, the dynamic tracking and noise suppression methods of baseline values ​​have the following problems:

[0004] The temperature compensation model is not accurate enough;

[0005] Noise classification relies on fixed thresholds and is difficult to adapt to complex environments;

[0006] Lack of resilience to long-term sensor aging. Summary of the invention

[0007] 1. Technical issues to be resolved

[0008] To solve the above problems, the present invention proposes a sensitivity optimization method for a touch capacitive switch and a capacitive switch, aiming to solve the problems in the prior art that the temperature compensation model of the capacitive touch switch is insufficiently accurate, the noise classification relies on a fixed threshold, it is difficult to adapt to complex environments, and there is a lack of adaptability to long-term sensor aging.

[0009] (II) Technical solution

[0010] A sensitivity optimization method of a touch capacitive switch of the present invention comprises:

[0011] Acquire the capacitance baseline value and ambient temperature data in real time in an untouched state, and update the capacitance baseline value according to the ambient temperature data;

[0012] Collect noise samples and real touch signals in different environments, build a training data set, use a lightweight learning model to distinguish the noise samples from the real touch signals, and output a determined value;

[0013] A touch event is determined based on the updated capacitance baseline value and the determination value.

[0014] In the present invention, the capacitance baseline value With ambient temperature The relationship between is expressed by the polynomial regression model as follows: ,in are the polynomial coefficients, is the noise term, and the polynomial order is determined by fitting the calibration data using the least squares method. With coefficient .

[0015] In the present invention, according to the real-time ambient temperature value , calculate the theoretical capacitance baseline value , combined with real-time baseline tracking values Perform weighted fusion: ,in, is the temperature weight factor;

[0016] In the untouched state, the time window Calculate baseline mean With standard deviation ,when The model parameter recalibration is triggered when Indicates the current capacitance baseline value.

[0017] In the present invention, the capacitance baseline value is dynamically optimized based on the Kalman filter algorithm, and the state vector of the Kalman filter is: ,in, Indicates the current capacitance baseline value, Represents the rate of change of the baseline value, the state transition matrix Defined as: ,in, is the sampling time interval, and the process noise covariance matrix is , the observation noise variance is .

[0018] In the present invention, the observation equation of Kalman filtering is: ,in is the observation vector , is the original capacitance value of the sensor, is the observation noise, is the observation matrix, .

[0019] In the present invention, the Kalman update state estimate is: , Kalman update covariance estimate: ,in, is the Kalman gain; , is the identity matrix, Indicates a moment in time, is the observation noise variance.

[0020] In the present invention, the method further includes a dual Kalman filter architecture, using two parallel Kalman filters to estimate the capacitance baseline value and the parameters of the temperature-baseline relationship model respectively, so as to realize online updating of the model.

[0021] In the present invention, the parameter update equation is ,in is the observation model including temperature compensation term, is the Kalman gain for parameter update.

[0022] In the present invention, the noise samples include electromagnetic interference, temperature change, and capacitance signals in a humid environment, and the real touch signals include touch signals under different pressures, contact areas, and speeds.

[0023] Another capacitive switch of the present invention comprises a capacitive switch body adopting the sensitivity optimization method of a touch-type capacitive switch described in any one of the above technical solutions, and a base and a shell for mounting the capacitive switch body.

[0024] (III) Beneficial effects

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] (1) In the present invention, the ambient temperature data is acquired in real time and the capacitance baseline value is dynamically updated in combination with a polynomial regression model, thereby significantly improving the accuracy of the temperature compensation model and greatly improving the stability of the capacitance switch in different temperature environments.

[0027] (2) The present invention adopts a lightweight learning model (1D-CNN) to classify noise samples and real touch signals, which can accurately distinguish noise signals in various complex environments and effectively reduce the false trigger rate; the Kalman filter algorithm and dual Kalman filter architecture are introduced to realize the dynamic optimization of the capacitance baseline value and the online update of the model parameters, thereby enhancing the adaptability of the capacitive switch to sensor aging and environmental changes, thereby improving its long-term stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 A schematic diagram of the process structure of a sensitivity optimization method for a touch-type capacitive switch;

[0030] Figure 2Schematic diagram of the exploded structure of the capacitor switch.

[0031] 10. Capacitor switch body, 20. Base, 30. Housing. DETAILED DESCRIPTION Example

[0032] like Figure 1-Figure 2 The sensitivity optimization method of a touch-type capacitive switch and the capacitive switch shown in the figure mainly establish a polynomial model of temperature-baseline value, combine Kalman filtering to optimize the capacitance baseline value in real time, and extract the time domain / frequency domain features of the signal, distinguish noise from touch signals through the 1D-CNN model, separate baseline estimation and model parameter update, and improve the long-term stability of the capacitive switch. Specifically, the capacitive switch of the present invention includes a capacitive switch body 10, a base 20 and a housing 30 for mounting the capacitive switch body 10, wherein the capacitive switch body 10 is installed in the base 20 by interference fit of a bump. The method mainly includes the following steps:

[0033] S100, acquiring a capacitance baseline value and ambient temperature data in a non-touch state in real time, and updating the capacitance baseline value according to the ambient temperature data;

[0034] Capacitance baseline value With ambient temperature The relationship between is expressed by the polynomial regression model as follows: ,in are the polynomial coefficients, is the noise term, and the polynomial order is determined by fitting the calibration data using the least squares method. With coefficient .

[0035] Specifically, the baseline value and ambient temperature data of the capacitance sensor are collected in real time in the unfilmed state, and a second-order polynomial model of temperature and capacitance baseline value is established, and the expression is: , where the coefficient Determined by fitting calibration data using the least squares method. For example, in a temperature-controlled test chamber, the baseline data, i.e., the capacitance baseline value, is collected with a temperature change of 5°C in steps (ranging from -20°C to 60°C). The goodness of fit of the model after fitting is .

[0036] When running in real time, according to the current temperature Calculate theoretical capacitance baseline value , and combined with real-time baseline tracking values Perform weighted fusion: , where the temperature weight factor is The value range is In the untouched state, the time window Calculate baseline mean With standard deviation ,when The model parameter recalibration is triggered when Indicates the current capacitance baseline value. For example, the baseline mean is calculated in a 10-second time window. With standard deviation , if the current capacitance baseline value Deviation from the mean exceeds , it triggers the recalibration of model parameters to ensure the long-term stability of sensitivity.

[0037] Furthermore, the Kalman filter algorithm is used to dynamically optimize the capacitance baseline value, so that the touch capacitive switch can maintain a high sensitivity for a long time and reduce interference factors. The state vector of the Kalman filter is defined as ,in Indicates the current capacitance baseline value, Represents the rate of change of the baseline value. State transition matrix Defined as: ,in, is the sampling time interval and , the process noise covariance matrix is , the observation noise variance is , the observation equation is ,in is the observation matrix, , is the observation vector , is the original capacitance value of the sensor, is the observation noise. Kalman update state estimation: , Kalman update covariance estimate: ,in, is the Kalman gain; , is the identity matrix, Indicates a moment in time, is the observation noise variance.

[0038] Specifically, to adapt to sensor aging and environmental changes, a dual Kalman filter architecture is introduced: the first filter estimates the baseline value, and the second filter updates the parameters of the temperature-baseline model (temperature coupling coefficient) and (nonlinear compensation coefficient). The parameter update equation is ,in is the observation model including temperature compensation term, is the Kalman gain for parameter update. Process noise covariance Dynamic adjustment based on the rate of temperature change, e.g. , to enhance the adaptability to rapid temperature changes. Noise samples include electromagnetic interference (such as motor start and stop), temperature mutation (±10℃ / min) and capacitance signals in humid environment (humidity>80%). Real touch signals include touch data of different pressures (0.5N-5N), contact areas (5mm²-50mm²) and speeds (0.1m / s-1m / s). After building the training data set, PyTorch is used to train the 1D-CNN model. The input is a time domain signal with a 200ms window (sampling rate 1kHz). The convolution layer extracts local features, and the fully connected layer outputs classification probability. After the model is quantized, it is deployed to the STM32H7 MCU. The inference delay is <10ms and the classification accuracy is >95%.

[0039] In the hardware configuration, the capacitive sensor uses an ITO electrode mutual capacitance structure with a scanning frequency of 200kHz. The temperature sensor uses TMP117 (accuracy ±0.1℃), which is sampled synchronously with the capacitive sensor with a time deviation of <1ms. The main control unit captures the original capacitance value through a 16-bit ADC at a sampling rate of 1kHz, and determines the touch event after processing by the above algorithm. Experiments show that the minimum detectable signal after optimization is 0.1 fF, the temperature step response time is shortened to 0.5 seconds, and the false trigger rate is reduced to 0.2 times / hour, which is suitable for automotive electronics (-40℃~85℃) and industrial control scenarios.

[0040] S200, collecting noise samples and real touch signals in different environments, constructing a training data set, using a lightweight learning model to distinguish the noise samples from the real touch signals, and outputting a determined value;

[0041] During the implementation process, noise samples and real touch signals in different environments are first collected through hardware configuration. Specifically, noise samples cover capacitance signals under electromagnetic interference (such as motor start and stop, mobile phone radiation), temperature mutation (±10℃ / min), and humid environment (humidity>80%), and real touch signals include touch data with different pressures (0.5N-5N), contact areas (5mm²-50mm²) and speeds (0.1m / s-1m / s). During signal acquisition, the capacitive sensor operates at a scanning frequency of 200kHz, and a high-precision temperature sensor (such as TMP117) is used to record the ambient temperature synchronously to ensure that the data timestamp alignment error is less than 1ms. Each sample data contains a time domain capacitance signal (sampling rate 1kHz) with a 200ms window, which is converted into a digital signal through a 16-bit ADC, and the original data is stored as a time series. The labels of the noise samples and the real touch signals are marked as 0 and 1 respectively. The labeling process combines manual verification and automated triggering mechanisms to ensure data accuracy.

[0042] When constructing the training data set, the original signal is preprocessed: first, it is standardized, the mean is subtracted and divided by the variance to eliminate the baseline offset; secondly, the high-frequency noise and power frequency interference are filtered out through a bandpass filter (1kHz-10kHz). Time domain feature extraction includes signal mean, variance, peak, zero crossing rate and rising edge slope; frequency domain features are extracted by fast Fourier transform (FFT) to extract the energy proportion of the main frequency components. The feature vectors are finally concatenated into an input matrix with dimensions of batch size, number of features, batch size, number of features. For example, each sample contains 10 time domain features and 5 frequency domain features. Data enhancement uses random noise and time domain stretching to improve the generalization ability of the model. The training set and test set are divided into 8:2 ratios, and 5-fold cross validation is performed.

[0043] The lightweight learning model uses the 1D-CNN architecture, and the input is the original time domain signal (length 200) or feature vector. The model structure includes two convolutional layers (convolution kernel size 5, number of channels 16 and 32), a maximum pooling layer (pooling size 2), a fully connected layer (64 nodes) and a Softmax output layer. The loss function uses cross entropy, the optimizer is Adam (learning rate 0.001), the training cycle is 100 rounds, and the batch size is 32. After the model training is completed, it is converted to 8-bit fixed-point format through TensorFlow Lite and deployed to an embedded MCU (such as STM32H7). During inference, the real-time signal is input into the model after the same preprocessing, and the output is a probability value , the judgment rule is: if , it is determined as a valid touch signal, otherwise it is regarded as noise.

[0044] S300 , determining a touch event based on the updated capacitance baseline value and the determination value.

[0045] Capacitance baseline value after Kalman filter optimization , calculate the effective touch signal ,when Exceeding the dynamic threshold (threshold = ,in The touch event is triggered when the model output is a valid touch. The dynamic threshold is adaptively adjusted according to the environmental noise level. When the noise is large, the threshold is automatically increased to suppress false triggering. Through the above steps, the system can achieve a sensitivity of 0.1 fF in a complex environment and a false trigger rate of less than 0.2 times / hour.

[0046] The above-described embodiments are merely descriptions of preferred implementations of the present invention, and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various modifications and improvements made by ordinary persons in the art to the technical solution of the present invention should fall within the protection scope of the present invention, and the technical contents for which protection is sought in the present invention have been fully recorded in the claims.

Claims

1. A method for optimizing the sensitivity of a touch capacitive switch, characterized in that: The sensitivity optimization method of the touch capacitive switch includes: Acquire the capacitance baseline value and ambient temperature data in real time in an untouched state, and update the capacitance baseline value according to the ambient temperature data; Collect noise samples and real touch signals in different environments, build a training data set, use a lightweight learning model to distinguish the noise samples from the real touch signals, and output a determined value; Determine a touch event based on the updated capacitance baseline value and the determination value; Capacitance baseline value With ambient temperature The relationship between is expressed by the polynomial regression model as follows: ,in are the polynomial coefficients, is the noise term, and the polynomial order is determined by fitting the calibration data using the least squares method. With coefficient ; According to the real-time ambient temperature , calculate the theoretical capacitance baseline value , combined with real-time baseline tracking values Perform weighted fusion: ,in, is the temperature weight factor; In the untouched state, the time window Calculate baseline mean With standard deviation ,when The model parameter recalibration is triggered when Indicates the current capacitance baseline value; Based on the Kalman filter algorithm, the capacitance baseline value is dynamically optimized, and the state vector of the Kalman filter is: ,in, Indicates the current capacitance baseline value, Represents the rate of change of the baseline value, the state transition matrix Defined as: ,in, is the sampling time interval, and the process noise covariance matrix is , the observation noise variance is .

2. The sensitivity optimization method of a touch capacitive switch according to claim 1, characterized in that: The observation equation of Kalman filter is: ,in is the observation vector , is the original capacitance value of the sensor, is the observation noise, is the observation matrix, .

3. The sensitivity optimization method of a touch capacitive switch according to claim 2, characterized in that: Kalman update state estimate: , Kalman update covariance estimate: ,in, is the Kalman gain; , is the identity matrix, Indicates a moment in time. is the observation noise variance.

4. The sensitivity optimization method of a touch capacitive switch according to claim 3, characterized in that: The method further includes a dual Kalman filter architecture, using two parallel Kalman filters to estimate the capacitance baseline value and the parameters of the temperature-baseline relationship model respectively, so as to realize online updating of the model.

5. The sensitivity optimization method of a touch capacitive switch according to claim 4, characterized in that: The parameter update equation is ,in is the observation model including temperature compensation term, is the Kalman gain for parameter update.

6. The sensitivity optimization method of a touch capacitive switch according to claim 5, characterized in that: The noise samples include electromagnetic interference, temperature change, and capacitance signals in a humid environment, and the real touch signals include touch signals under different pressures, contact areas, and speeds.

7. A capacitive switch, characterized in that: The invention comprises a capacitive switch body adopting the sensitivity optimization method of a touch-type capacitive switch according to any one of claims 1 to 6, and a base and a shell for installing the capacitive switch body.

Citation Information

Patent Citations

  • Method for detecting state of capacitive touch key

    CN104935320A

  • Anti-interference data processing method of infrared touch transceiver

    CN117687533A