Touch signal processing method, touch chip, electronic equipment and storage medium
By sampling and accumulating the touch signal and identifying peaks and troughs, the problem of insufficient demodulation accuracy of active stylus signals under low sampling rates is solved, achieving efficient signal recovery and stable communication under low sampling rates.
Patent Information
- Application Number
- CN202511006218.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, the signal processing methods for active styluses struggle to accurately identify phase transitions and extract raw data at low sampling rates, leading to decreased demodulation accuracy and performance.
By sampling the signals received by the touch panel, discrete sampled data is obtained. Through accumulation processing, peaks and troughs are identified to determine the location of phase changes in the signal, thereby recovering the original data.
It improves the ability to recognize touch signals at low sampling rates, reduces hardware costs, and improves the stability of signal parsing and communication reliability.
Smart Images

Figure CN120973253A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of signal processing technology for touch display chips, and more particularly to a touch signal processing method, a touch chip, an electronic device, and a storage medium. Background Technology
[0002] Styluses, as high-precision input devices, are widely used in smart terminals such as mobile phones, tablets, and laptops. Compared to finger operation, styluses offer more precise positioning and richer functions, such as pressure sensing, tilt angle recognition, and button control. Active styluses interact with the host device wirelessly, typically using specific protocols (such as USI) for data transmission.
[0003] Active styluses transmit information, including pen tip pressure and button status, by sending modulated signals (such as DBPSK) to the touch panel. This signal is a zero-mean periodic signal, and its phase changes represent data content. The touch chip needs to sample and demodulate this type of signal to recover the original data. Due to hardware limitations, the ADC sampling frequency is usually low, resulting in a small number of sampling points per signal cycle, making it difficult to accurately determine the phase transition points of the signal.
[0004] Current solutions rely on direct demodulation at a fixed sampling rate. However, when adjacent data undergo phase flipping, the low sampling rate can easily lead to misjudgment or loss of key features, thus affecting demodulation accuracy and overall performance. Therefore, there is an urgent need for a touch signal processing method that can accurately identify phase transitions and extract the original data even at low sampling rates. Summary of the Invention
[0005] In view of this, embodiments of the present disclosure provide a touch signal processing method, a touch chip, an electronic device, and a storage medium.
[0006] On one hand, embodiments of this disclosure provide a touch signal processing method, including:
[0007] The original signal received by the touch panel is sampled to obtain multiple discrete sampled data; wherein the original signal is obtained by modulating the original data using phase information;
[0008] The plurality of sampled data are processed sequentially to obtain a plurality of accumulated data corresponding to the sampled data;
[0009] Based on the accumulated data, determine the sampling data position of the period corresponding to the phase change of the original signal;
[0010] Based on the location of the sampled data, the original data corresponding to the original signal is determined.
[0011] In some embodiments, determining the sampling data position corresponding to the period in which the phase change of the original signal occurs based on the accumulated data includes:
[0012] Identify the alternating peaks and troughs in the accumulated data;
[0013] Based on the peaks and troughs, the sampling data positions corresponding to the period in which the original signal undergoes a phase change are determined.
[0014] In some embodiments, the sampling data includes: noise data and valid data; determining the alternating peaks and troughs in the accumulated data includes:
[0015] Identify the alternating peaks and troughs in the valid data.
[0016] In some embodiments, the method further includes:
[0017] When the change in the accumulated data relative to the previous accumulated data is less than or equal to a preset first threshold, the sampled data is determined to be the noise data.
[0018] When the change in the accumulated data relative to the previous accumulated data is greater than the first threshold, the sampled data is determined to be valid data.
[0019] In some embodiments, the method further includes:
[0020] In response to the sampling data being valid data, the sampling of the valid data is counted to obtain a count value corresponding to the position of the valid data; the count value is used to indicate the position of the sampling data.
[0021] In some embodiments, determining the sampling data position corresponding to the period in which the phase change of the original signal occurs based on the peak and the trough includes:
[0022] The difference between the wave peak and the adjacent wave trough, and the absolute value of the difference, are determined sequentially.
[0023] If the change between the absolute value and the previous absolute value is greater than or equal to the second threshold, then the count value of the sampled data corresponding to the absolute value is determined to be the target count value.
[0024] In some embodiments, determining the original data corresponding to the original signal based on the sampling data location includes:
[0025] The first bit is determined based on the ratio of the first target count value to a preset number; wherein, the first bit is the bit corresponding to the period in which the phase of the original signal changes; and the preset number is the number of samples taken for one period of the original signal.
[0026] The original data is determined based on the first bit.
[0027] In some embodiments, determining the original data based on the first bit includes:
[0028] Determine the sign of the difference corresponding to the first target count value;
[0029] If the difference is positive, then the original signal corresponding to the first bit is the first phase, and the original signal corresponding to the second bit is the second phase; wherein, the second bit is the bit preceding the first bit;
[0030] If the difference is negative, then the original signal corresponding to the first bit is the second phase, and the original signal corresponding to the second bit is the first phase;
[0031] The original data is determined based on the phase of the first bit and / or the phase of the second bit.
[0032] In some embodiments, determining the alternating peaks and troughs in the accumulated data includes:
[0033] The sampled data of a preset number are compared sequentially, and the maximum value is determined as the peak and the minimum value is determined as the trough; wherein, the preset number is the number of samples taken for one cycle of the original signal.
[0034] In some embodiments, the method further includes:
[0035] The multiple sampled data are filtered using an n-order low-pass filter to obtain the filtered sampled data, where n is a positive integer.
[0036] On the other hand, this disclosure also provides a touch chip, including:
[0037] A digital signal sampling unit is used to sample the raw signal received by the touch panel to obtain multiple discrete sampled data; wherein the raw signal is obtained by modulating the raw data using phase information;
[0038] An accumulator is used to process the plurality of sampled data sequentially to obtain a plurality of accumulated data corresponding to the sampled data; wherein the first accumulated data is the first sampled data;
[0039] The data processing module is used to determine the sampling data position of the period corresponding to the phase change of the original signal based on the accumulated data; and to determine the original data corresponding to the original signal based on the sampling data position.
[0040] In some embodiments, the touch chip further includes:
[0041] A counter is used to count the samples of the valid data in response to the sampling data obtained by the digital signal sampling unit being valid data, and to obtain a count value corresponding to the position of the valid data; the count value is used to indicate the position of the sampled data.
[0042] In some embodiments, the touch chip further includes:
[0043] A filter is used to filter the plurality of sampled data to obtain the filtered sampled data; wherein the filter is an n-order low-pass filter, and n is a positive integer.
[0044] In another aspect, embodiments of this disclosure also provide an electronic device, including a memory, a processor, and a touch display screen; the memory stores a computer program; when the processor executes the computer program, it implements any of the above-mentioned touch signal processing methods to obtain raw data corresponding to the raw signal;
[0045] The touch display screen is used to: receive the original signal and the touch signal sent after an external touch operation, wherein the touch signal is used to indicate the touch position; and display the screen based on the original data and the touch position corresponding to the touch signal.
[0046] In another aspect, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described touch signal processing methods.
[0047] In this embodiment, the original signal sampling is converted into discrete sampled data, and then accumulated data is obtained by processing the sampled data to extract signal features. The phase change position of the signal is then determined using the accumulated data, thereby restoring the original data. This method, by performing a series of processes on the original signal sampling and determining phase changes based on the processed data, effectively improves the recognition capability of touch signals at low sampling rates. Compared with existing technologies that directly rely on high sampling rates, this reduces hardware costs and improves the stability of signal analysis. Attached Figure Description
[0048] Figure 1A This is a schematic diagram illustrating the touch principle of a stylus according to an embodiment of this disclosure;
[0049] Figure 1B This is a schematic diagram of the DBPSK signal involved in an embodiment of this disclosure;
[0050] Figure 2 A flowchart of a touch signal processing method provided in this embodiment of the disclosure;
[0051] Figure 3 This is a zero-mean-period DBPSK signal according to an embodiment of the present disclosure;
[0052] Figure 4 This is a schematic diagram of the signal obtained after sampling the original signal in the touch signal processing method of this embodiment of the present disclosure;
[0053] Figure 5 This is a schematic diagram of the signal obtained by accumulating the sampled signal in the touch signal processing method of this embodiment of the present disclosure.
[0054] Figure 6 This is a schematic diagram illustrating the process of processing accumulated data to obtain peaks and troughs in the touch signal processing method of this embodiment of the present disclosure;
[0055] Figure 7 This is a schematic diagram of the signal obtained by taking the absolute value after calculating the difference between the peaks and troughs in the touch signal processing method of this embodiment of the present disclosure.
[0056] Figure 8 This is a structural block diagram of a touch chip provided in an embodiment of the present disclosure;
[0057] Figure 9 This is a structural block diagram of another touch chip provided in an embodiment of the present disclosure;
[0058] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0059] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0060] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of this disclosure. However, it will be apparent to those skilled in the art that this disclosure may be practiced without one or more of these details. In other instances, to avoid confusion with this disclosure, certain technical features well-known in the art have not been described; that is, not all features of actual embodiments are described herein, nor are well-known functions and structures described in detail.
[0061] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. When used herein, the singular forms “a,” “an,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprise” and / or “comprising,” when used in this specification, identify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups. When used herein, the term “and / or” includes any and all combinations of the associated listed items.
[0062] To fully understand this disclosure, detailed steps and structures will be presented in the following description to illustrate the technical solutions of this disclosure. Preferred embodiments of this disclosure are described in detail below; however, other embodiments may also be implemented in addition to these detailed descriptions.
[0063] In the following description, technical terms and concepts will be explained upon their first appearance to facilitate understanding of the technical content of this invention. Key technical features and innovative points involved in this application will be described in detail; while parts that are the same as those in the prior art will not be repeated.
[0064] Touch chips are widely used in mobile phones, tablets, laptops, automobiles, and specialized equipment. Some touch chips also support collaborative operation between styluses and fingers. Styluses can perform functions such as clicking, drawing lines, and erasing, and can adjust the line thickness according to the tilt of the pen. Styluses are divided into electromagnetic and active types; this disclosure focuses on technologies related to active styluses. For an active stylus to function properly, the host device, the active stylus, and the touch chip / touch integrated circuit (Touch IC) must all support the same transmission protocol, such as MPP (Multi-Point Protocol), USI (Universal Stylus Interface), or HPP (High Precision Protocol). This application mainly focuses on the USI transmission protocol.
[0065] like Figure 1A As shown, the active pen's workflow is triggered by user operation. First, the user activates the active pen function by touching the screen or pressing a physical button; second, the system receives a signal and activates the active pen module; finally, the active pen module communicates with the device to complete data transmission and command execution. Specifically, it includes the following steps:
[0066] 1. Both the main device and the stylus have Bluetooth enabled and are paired. At this time, the main device enters the stylus operation mode, while the stylus waits for the panel to send a signal.
[0067] 2. The host sends commands to the touch chip through the Serial Peripheral Interface (SPI) / Improved Two-Wire Bus (I2C) interface to notify the touch chip to enter the active pen acquisition mode.
[0068] 3. After receiving the command, the touch chip drives the touch sensor on the control panel to send an uplink signal. The uplink signal uses a Direct Sequence Spread Spectrum (DSSS) modulation format. The pen tip and pen ring are equipped with sensors. When the pen receives the uplink signal from the touch panel, it analyzes the received data. If the analyzed data matches the system's preset standards, the pen executes the next operation.
[0069] 4. When the tip of the stylus is close to or in contact with the touch panel, the stylus drives the sensor on the pen tip or pen ring to send a downlink signal to the panel. This downlink signal contains a response signal, pen tip pressure information, and data on whether the pen's button has been touched. The downlink signal is modulated in DBPSK format. Next, the stylus drives the sensor to send a periodic signal (square wave or sine wave). This periodic signal acts similarly to a finger touching the touch panel, indicating the touch location.
[0070] 5. After receiving the DBPSK signal from the active pen, the touch sensor on the touch panel restores the modulation data and demodulates the response signal, pressure information, and button touches. Simultaneously, the touch sensor continues to receive periodic signals, analyzes the X / Y coordinates of the active pen, and reports the DBPSK modulation data and X / Y coordinate data to the host device. Upon receiving this data, the host device performs related operations such as clicking, drawing lines, and erasing.
[0071] In the above process, the DBPSK data format sent by the active pen to the touch panel is as follows: Figure 1BAs shown, the downlink signal consists of a predetermined number of bits, exemplarily 21 bits, with each bit composed of 1 to 5 cycles of square or sine waves. When two adjacent data change, the phase of the cycle signal shifts by 180 degrees. The analog-to-digital converter (ADC) module of the touch chip periodically acquires the DBPSK signal from the active pen and outputs the acquired data to the digital logic circuit of the touch chip for processing. Due to the limitations of the internal area and power consumption of the touch chip, the ADC frequency is usually low, such as 1 to 5 MHz, while the DBPSK signal frequency is 100 to 500 kHz. If the DBPSK signal frequency is 500 kHz and the ADC sampling frequency is 2 MHz, only 4 points can be acquired in one cycle, making it difficult to accurately analyze the DBPSK data. The analysis difficulty is further increased, especially when the phase of adjacent data changes. Therefore, this disclosure proposes a new algorithm for parsing DBPSK data. The new algorithm proposed in this disclosure can be implemented in pure software, pure hardware, or a combination of both.
[0072] Specifically, to address the difficulties in data parsing caused by the limited sampling frequency of ADCs and the short period and susceptibility to noise interference of DBPSK signals in existing stylus communication, this application proposes a touch signal processing method based on accumulation, peak and trough detection, and phase change inference. This method samples and sequentially accumulates the original signal, identifies alternating peaks and troughs, and determines the location of phase transitions in the original signal based on the difference between adjacent peaks and troughs, thereby recovering the original data. This method effectively improves the parsing accuracy and stability of DBPSK signals, enhancing the reliability and data transmission efficiency of communication between the stylus and the touchscreen.
[0073] Figure 2 This is a flowchart of the touch signal processing method provided in the embodiments of this application. The following will be combined with... Figure 2 The steps shown are explained below. Figure 2 As shown, the method includes the following steps S101 to S105:
[0074] Step S101: Sample the original signal received by the touch panel to obtain multiple discrete sampled data; wherein, the original signal is obtained by modulating the original data using phase information, and the original signal can be a zero-mean periodic signal.
[0075] Here, the raw signal received by the touch panel can be emitted by a stylus or other external device capable of sending control signals to the touch panel, or it can be emitted by other modules installed on the touch panel. Taking a stylus as an example, the raw data is modulated into a DBPSK or BPSK signal, etc., by the digital-to-analog converter (DAC) inside the stylus and then sent to the touch panel. Due to the characteristics of DBPSK or BPSK signals, the raw data is a zero-mean periodic signal, that is, the average value of the positive and negative levels is zero within a complete cycle. Figure 3 This paper illustrates a zero-mean periodic DBPSK signal. Zero-mean periodic signals can avoid the impact of DC offset on subsequent processing. For example, in a complete square wave cycle, the positive and negative half-cycles have the same amplitude but opposite signs, therefore the overall average is zero. Similarly, in a sine wave, the positive and negative half-cycles within each cycle have equal areas, also satisfying the zero-mean condition. Zero-mean periodic signals facilitate the identification of periodic characteristics during subsequent accumulation processing.
[0076] Here, a zero-mean periodic signal refers to a periodic signal whose average positive and negative levels are zero over a complete cycle. For example, in DBPSK or BPSK modulation, the phase of the signal switches between 0 degrees and 180 degrees, so that the signal as a whole maintains zero-mean characteristics.
[0077] The ADC module on the touch panel samples the original signal at a fixed frequency, converting the continuous analog signal into a discrete digital signal. The relationship between the number of sampling points and the changes in the sampled values can be used to plot the continuous analog signal, such as... Figure 4 As shown. Since the sampling frequency of an ADC is typically limited by factors such as power consumption and chip area, the number of sampling points per cycle may be relatively small, for example, 4 or 5 points. Nevertheless, by further processing the multiple sampled data points by the processor, the system can still recover the original data content.
[0078] DBPSK is a commonly used digital modulation scheme that represents binary data (such as 0 or 1) by changing the phase of the signal. In DBPSK, information is encoded by the relative phase difference between two adjacent symbols, rather than the absolute phase. BPSK (Binary Phase Shift Keying), on the other hand, represents binary data (such as 0 or 1) by changing the absolute phase of the carrier signal. In BPSK, binary "0" and "1" are mapped to abrupt changes in carrier phase of 0° and 180°, respectively. The method in the embodiments of this application can be applied to the parsing and processing of at least the two modulated signals described above.
[0079] The data sampled by the ADC may be subject to various noise interferences, such as noise from the display panel, noise from the charging circuit, and power fluctuations. To reduce the impact of noise from the display panel, charging circuit, and power fluctuations, the data sampled by the ADC can be preprocessed. For example, a low-pass filter (FIR) can be used to perform a low-pass filter operation on the data to retain the main signal components and suppress high-frequency noise.
[0080] It should be noted that the sampled signal does not necessarily have to be a zero-mean signal. If it is not a zero-mean signal, preprocessing is required to obtain a zero-mean signal. For example, if the sampled data is 12 bits and the output range is 0 to 4095, preprocessing subtracts 2048 from each acquired data point, transforming the data range from 0 to 4095 to -2048 to 2047, thus forming the original signal with zero-mean periodic transformation.
[0081] Step S102: Process the plurality of sampled data sequentially to obtain a plurality of accumulated data corresponding to the sampled data; wherein, the first accumulated data is the first sampled data, and the accumulated value changes with the sampling point as follows: Figure 5 As shown.
[0082] In this embodiment, each sampled data point can be accumulated sequentially to generate a new data sequence, called accumulated data. The first accumulated data point is equal to the first sampled data point, the second accumulated data point is equal to the sum of the previous two sampled data points, and so on. The accumulation operation can enhance the periodicity of the signal while reducing the influence of random noise.
[0083] For example, when the stylus does not send any valid signal, the data collected by the ADC is mainly background noise, which is small in value and does not show obvious periodic changes. In this case, the data collected and accumulated by the ADC will fluctuate within a small range without showing a significant upward or downward trend. However, when the stylus begins to send the original signal, because the original signal sent by the stylus has obvious periodicity and amplitude changes, the data collected and accumulated by the ADC will rapidly increase or decrease, forming obvious peaks or troughs. The significant changes in the data collected and accumulated by the ADC upon receiving the original signal can be used to determine the starting position of the original signal.
[0084] In practical implementation, a signal processing system can detect changes in multiple accumulated data points by setting a threshold. When any value among the accumulated data points exceeds the set threshold, the signal processing system determines that the original signal has begun transmission. This threshold-based method allows the signal processing system to detect asynchronous signals without relying on precise time synchronization.
[0085] Step S103: Based on the accumulated data, determine the sampling data position of the period corresponding to the phase change of the original signal;
[0086] Specifically, in some embodiments, step S103 above may include:
[0087] Step S131: Determine the alternating peaks and troughs in the multiple accumulated data, such as... Figure 6 As shown.
[0088] Step S132: Determine the sampling data position of the period corresponding to the phase change of the original signal based on the peak and the trough.
[0089] Peaks and troughs refer to local maximum and minimum values that appear in multiple accumulated data sequences. Due to the periodicity of the original signal, multiple accumulated data will exhibit a certain fluctuation pattern under normal circumstances. When a phase change occurs, the multiple accumulated data will show a large jump, thus forming a significant peak or trough. Therefore, detecting the location of peaks and troughs can help determine whether a phase jump event exists in the signal.
[0090] For example, within a complete DBPSK or BPSK signal cycle, if the original signal remains constant, the values of multiple accumulated data will gradually rise or fall, forming a stable trend. However, when the original signal experiences a phase reversal, the values of the multiple accumulated data will suddenly change direction, forming a distinct peak or trough. By comparing the peaks and troughs in adjacent cycles, the system can further confirm the specific location of the phase change.
[0091] For example, peaks and troughs can be identified using a sliding window method or a peak detection algorithm. Specifically, for each sampling point, it can be compared with several points before and after it to determine whether the value of the sampling point is greater than the values of all neighboring points. If the value of the sampling point is greater than the values of all neighboring points, it can be identified as a peak; if the value of the sampling point is less than the values of all neighboring points, it can be identified as a trough. This method of identifying peaks and troughs is suitable for implementing peak and trough identification functions in hardware logic circuits due to its simple operation and high efficiency.
[0092] When there is a significant difference between peaks and troughs, it usually means that the original signal has undergone phase reversal. For example, when multiple accumulated data suddenly change from positive growth to negative decline, it indicates that the original signal has jumped from 0 degrees to 180 degrees of phase. Conversely, when multiple accumulated data suddenly change from negative decline to positive growth, it indicates that the original signal has jumped from 180 degrees to 0 degrees of phase.
[0093] To more accurately pinpoint the location of phase changes, the system can calculate the difference between adjacent peaks and troughs and set a threshold. When the difference exceeds the threshold, the system considers a phase change to have occurred. Furthermore, the system can record the count value at the time of the phase change, serving as crucial data for subsequent decoding.
[0094] For example, suppose that within a DBPSK cycle, several sampling points are accumulated, forming a peak and a trough. If the difference between these two extreme values is large, it indicates that a phase change has occurred within the DBPSK cycle. By recording the start and end positions of the DBPSK cycle, it is possible to further infer which specific sampling point the phase change occurred at.
[0095] Step S104: Determine the original data corresponding to the original signal based on the sampling data location.
[0096] After identifying the phase change locations, the system can infer the content of the original data based on this information. Since DBPSK is a differential modulation method, the information of each bit is represented by the relative phase difference between two adjacent symbols. Therefore, after determining the location of the phase change, the system can sequentially infer the value of each bit.
[0097] For example, when decoding a DBPSK signal, if the first bit does not undergo a phase change, it indicates that the value corresponding to that bit is 0; when the second bit undergoes a phase reversal, it indicates that the value corresponding to that bit is 1. Similarly, when decoding a BPSK signal, a bit with a phase of 0 represents a value of 0 (or 1), and a bit with a phase of 180 degrees represents a value of 1 (or 0). This process of judging and identifying each bit is repeated until all bit information has been extracted and parsed.
[0098] For example, the duration of each bit can be calculated by counting the number of sampling points in each cycle, and the presence of a phase change can be determined based on this data. Furthermore, a condition for determining the end of the signal can be set. When the accumulated value obtained in multiple consecutive cycles is lower than a preset threshold, the system can determine that the transmission process of the original signal has ended and terminate subsequent data processing operations.
[0099] In actual implementation, the steps are interconnected, forming a complete signal processing flow. First, the digital representation of the original signal is obtained through sampling; second, signal features are enhanced by accumulation to improve the signal-to-noise ratio; next, phase transition points are located by identifying peaks and troughs; then, the phase encoding of the original data is determined based on these transition points; finally, the original data content is restored. The entire process has strong anti-interference capabilities and can operate stably under low sampling rate conditions, thereby ensuring the reliability and efficiency of communication between the stylus and the touchscreen.
[0100] In summary, the touch signal processing method provided in this application achieves efficient parsing of DBPSK or BPSK signals through steps such as sampling, accumulation, waveform analysis, and phase change inference. This method not only effectively addresses the limitation of ADC sampling frequency but also accurately recovers the original data even in the presence of noise interference, and improves the communication reliability and data transmission efficiency between the stylus and the touchscreen.
[0101] In some embodiments, the sampling data includes noise data and valid data, and the method further includes steps S201-S202, wherein:
[0102] Step S201: When the change in the accumulated data relative to the previous accumulated data is less than or equal to a preset first threshold, the sampled data is determined to be the noise data;
[0103] After the system performs accumulation processing on the current sampling point, if the difference between the current accumulated data and the previous accumulated data is small, that is, the change is less than or equal to a set first threshold, then the current sampled data can be determined to be noisy data. By adopting this judgment method, the system utilizes the characteristic that noisy data has a small fluctuation amplitude during continuous sampling, thereby enabling the system to identify and filter out meaningless background interference.
[0104] In practical applications, such as the DBPSK signal received by the touch chip, some sampled data may not reflect the actual touch signal due to the presence of environmental noise. By setting a reasonable first threshold, the system can distinguish between sampled data containing environmental noise and sampled data of the actual pen signal, thereby preventing sampled data containing environmental noise from interfering with the subsequent peak and trough recognition process.
[0105] Step S202: When the change in the accumulated data relative to the previous accumulated data is greater than the first threshold, the sampled data is determined to be valid data;
[0106] Conversely, if the change in the current accumulated data compared to the accumulated data of the previous period significantly exceeds the first threshold, the system considers the currently acquired sampled data to reflect a true and valid signal. This phenomenon indicates a significant phase jump or signal amplitude change, suggesting that the currently acquired sampled data may be caused by a DBPSK or BPSK signal sent by the active pen.
[0107] In stylus communication scenarios, when the pen tip approaches or touches the panel, the system sends periodic signals (such as sine waves or square waves). At this time, the data collected by the analog-to-digital converter (ADC) will show significant fluctuations. The data analysis module identifies valid data with significant fluctuation characteristics by comparing the changes between adjacent accumulated data, and uses this valid data for subsequent waveform analysis.
[0108] In step S131 above, determining the alternating peaks and troughs in the accumulated data includes:
[0109] Step S203: Determine the alternating peaks and troughs in the valid data;
[0110] After confirming that the sampled data is valid, the next step is to identify the peaks and troughs of the valid data. A peak refers to the maximum value reached by the sampled value within a certain period, while a trough is the minimum value within the same period. By identifying the peaks and troughs, the periodic structure of the original signal, such as the DBPSK or BPSK signal, can be extracted.
[0111] In the process of touch chips processing raw signals such as DBPSK or BPSK signals, since each bit corresponds to a specific period, identifying continuous peaks and troughs can determine the bit boundaries and the location of phase changes. This method is crucial for subsequent bit inference and demodulation processes.
[0112] According to embodiments of this application, by distinguishing between noise data and valid data, and identifying peaks and troughs in the valid data, the system can more accurately analyze raw signals such as DBPSK or BPSK signals. By employing the method of distinguishing between noise data and valid data and identifying peaks and troughs in the valid data, the system can reduce the false positive rate, thereby improving the stability of data analysis and ultimately enhancing the communication quality between the stylus and the touchscreen.
[0113] In summary, the above steps work together seamlessly to screen and extract features from the original sampled data. First, the changes in the accumulated data are used to determine whether it is noise or valid data, ensuring that subsequent processing is based solely on the true signal. Then, peaks and troughs are identified in the valid data, providing crucial information for subsequent signal demodulation. This entire process improves the accuracy and robustness of the original signal analysis.
[0114] In some embodiments, the above method further includes the following steps:
[0115] Step S301: In response to the sampling data being valid data, the sampling of the valid data is counted to obtain a count value corresponding to the position of the valid data; the count value is used to indicate the position of the sampling data.
[0116] Sampling data refers to the digital representation of the original analog signal acquired by the ADC module. The sampling data reflects the time-domain changes of the original signal sent by the stylus. Due to noise interference between the stylus and the panel, the actual sampled data may contain distortion or abnormal fluctuations; therefore, algorithms are needed to identify valid sampling points.
[0117] Valid data refers to sampling points that, after filtering and accumulation, accurately reflect the periodic characteristics of the original signal. Typically, when the accumulated value of the ADC data exceeds a set threshold, the system determines that the corresponding sampling point belongs to the valid data range. This method of determining the valid data range helps eliminate noise interference and improves the accuracy of subsequent data analysis.
[0118] Counting is the process of systematically counting consecutive valid sampling points. After each valid sampling is completed, the system updates the count value to record the current sampling point's position within the overall sequence. The counting process can be implemented using hardware logic circuits or executed through software algorithms.
[0119] A count value is used to mark the position number of each valid sampling point in a time series. The count value can be used as one of the bases for determining phase changes. For example, when the difference between adjacent peaks and troughs exceeds a set threshold, the system can determine whether a phase transition has occurred in the original signal by comparing the current count value with the previous count value.
[0120] In some embodiments, in step S132 above, the system execution module determines the sampling data position of the period corresponding to the phase change of the original signal based on adjacent peaks and troughs, which may specifically include:
[0121] Step S11: Sequentially determine the difference between the peak and the adjacent trough, and the absolute value of the difference; referring to the original signal in the above embodiment, obtain the relationship between the absolute value of the difference and the sampling point as follows. Figure 7 As shown.
[0122] Step S12: If the change between the absolute value of the difference between the peak and the adjacent trough and the absolute value of the difference between the previous peak and the adjacent trough is greater than or equal to the second threshold, then the count value of the sampled data corresponding to the absolute value of the difference between the peak and the adjacent trough is determined to be the target count value; or the count value of the sampled data corresponding to the absolute value of the difference between the previous peak and the adjacent trough may also be determined to be the target count value.
[0123] A peak refers to a local maximum value in the original signal after accumulation processing, typically corresponding to a positive peak value. A trough refers to a local minimum value after the same processing, typically corresponding to a negative peak value. By calculating the difference between a peak and an adjacent trough, the degree of fluctuation between these two characteristic points can be quantified, thus reflecting the energy distribution of the original signal and any possible phase abrupt changes. Taking the absolute value of the difference between a peak and an adjacent trough is to eliminate the influence of directionality, so as to uniformly measure the amplitude of signal intensity variation between these two characteristic points.
[0124] The absolute value of the difference between the previous peak and the adjacent trough represents the absolute value of the difference between the peak and the adjacent trough calculated in the previous step, and is used for comparison with the absolute value of the difference between the current peak and the adjacent trough. The change refers to the absolute value of the difference between the absolute value of the difference between the current peak and the adjacent trough and the absolute value of the difference between the previous peak and the adjacent trough. When this change is greater than or equal to a preset second threshold, it indicates that the original signal has experienced significant fluctuations in the signal region corresponding to the absolute value of the difference between the peak and the adjacent trough. This phenomenon may be caused by a change in the phase of the original signal. At this time, the position of the sampled data corresponding to the absolute value of the difference between the current peak and the adjacent trough is marked as the target count value, or the position of the sampled data corresponding to the absolute value of the difference between the previous peak and the adjacent trough is marked as the target count value. This method can accurately identify the sampling point where the phase jump occurs, providing a basis for subsequent data demodulation.
[0125] In summary, by converting phase abrupt changes in the original signal into specific sampling data location information, this application can effectively capture phase abrupt changes in the original signal and convert them into specific sampling data location information. This operation improves the resolution accuracy of short-duration, small-quantity original signals, thereby enhancing the stability and reliability of communication between the stylus and the touchscreen, and ultimately improving the overall touch experience and data transmission efficiency.
[0126] In some embodiments, step S105 above: determining the original data corresponding to the original signal based on the sampling data location may specifically include the following steps S21 to S23, wherein:
[0127] Step S21: Determine the first bit based on the ratio of the target count value to the preset number; wherein, the first bit is the bit corresponding to the period in which the phase of the original signal changes; the preset number is the number of samples to be sampled for one period of the original signal.
[0128] The target count value refers to the position count of the current sampling point recorded when a peak or trough in the original signal is detected. The target count value is used to locate the time points where significant changes occur in the signal, thus aiding in the determination of bit boundaries. The preset quantity refers to the total number of samples taken from the original signal within a complete cycle, usually set by the system, for example, 4 points per cycle. By dividing the target count value by the preset quantity, a normalization ratio can be obtained. Based on this normalization ratio, the bit positions corresponding to the aforementioned signal change points can be determined. The method based on the ratio of the target count value to the preset quantity helps to more accurately identify the starting position of each bit, thereby improving the accuracy of data parsing.
[0129] In this embodiment, the first bit is determined by calculating the ratio of the target count value to a preset number. This method of determining the first bit by calculating the ratio of the target count value to the preset number allows for accurate determination of the specific location of phase changes in the original signal. Furthermore, this method improves the reliability of original data decoding and further ensures the stability of stylus information transmission.
[0130] Step S22: Determine the original data based on the first bit.
[0131] By jointly judging the two bits mentioned above, the original data can be recovered more reliably. For example, since DBPSK is a differential coding scheme, DBPSK data depends on the phase difference between adjacent bits; therefore, utilizing the information from the two preceding and following bits can better reconstruct the original data sequence. In practical applications, the DBPSK data recovery process can be implemented using logic gate circuits or software algorithms, and these implementation methods can be flexibly configured according to system resources.
[0132] In this embodiment, the original data is determined by combining the first bit, which can more comprehensively capture the phase change characteristics in the DBPSK signal. This combination method can improve the completeness and accuracy of data parsing and further improve the performance of the stylus in complex electromagnetic environments.
[0133] In some embodiments, in step S23 above, determining the original data based on the first bit includes:
[0134] Step S231: Determine the sign of the difference corresponding to the target count value.
[0135] The aforementioned difference refers to the absolute value difference between adjacent peaks and troughs, used to determine whether a phase reversal has occurred in the original signal. By comparing the accumulated values of consecutive sampling points, it is possible to identify whether there are abrupt fluctuations in the original signal, thereby determining whether a phase change has occurred. When the fluctuation of the accumulated value exceeds a set threshold, the touch chip will record that location as a possible phase change point.
[0136] Step S232: If the difference is positive, the original signal corresponding to the first bit is in the first phase, and the original signal corresponding to the second bit is in the second phase; if the difference is negative, the original signal corresponding to the first bit is in the second phase, and the original signal corresponding to the second bit is in the first phase. Here, the second bit refers to the bit preceding the first bit; that is, the second bit is the bit preceding the phase change, and the first bit has undergone a phase change relative to the second bit.
[0137] This step utilizes the characteristics of DBPSK or BPSK signals. When a phase reversal (180 degrees) occurs between two adjacent bits, it causes a significant positive or negative jump in the accumulated value of the ADC data. For example, if the phase of the current bit changes from 0 to 180 degrees, the accumulated value will continuously increase, forming a positive difference; conversely, if the phase changes from 180 degrees to 0, the accumulated value will continuously decrease, forming a negative difference. The touch chip infers the phase state of the current bit by detecting the sign of the difference, thereby further determining the binary representation of the original data. This method avoids the need for precise sampling of the complete cycle signal, reducing hardware complexity and power consumption.
[0138] In practice, the first phase and the second phase are opposite phase states, typically corresponding to phase shifts of 0 degrees and 180 degrees, respectively. Based on the opposite phase states of the first and second phases, after determining the sign of the difference, the touch chip can infer the phase relationship between the current bit and the previous bit, and the system can then map this phase relationship into the corresponding bit value.
[0139] Step S233: Determine the original data based on the phase of the first bit.
[0140] In this step, the touch chip combines the phase information of each bit determined in the previous two steps into a complete original data sequence. For DBPSK signals, since DBPSK is a differential encoding method, the information of each bit depends not only on the phase of the current bit but also on the phase of the previous bit. Therefore, the touch chip gradually reconstructs the original 21-bit data stream by judging the phase changes of each bit. This touch signal processing method can achieve high-precision DBPSK decoding at low sampling rates and is suitable for scenarios where the internal area and power consumption of the touch chip are limited. For BPSK signals, determining the phase of the current bit can correspondingly determine the value of the current bit, and the above method can also be applied.
[0141] In this embodiment, by determining the sign of the difference and judging the phase change based on the difference, the original data in the original signal can be quickly and accurately parsed. This method effectively improves the reliability of stylus communication, thereby increasing the response speed and accuracy of touch operations, and ultimately enhancing the overall user experience when using the stylus.
[0142] In some embodiments, determining the alternating peaks and troughs in the accumulated data in step S131 above may specifically include:
[0143] The sampled data of the preset number are compared sequentially, and the maximum value is determined as the peak and the minimum value is determined as the trough; wherein, the preset number is the number of samples to be sampled for one cycle of the original signal.
[0144] Here, the preset number refers to the number of sampling points set for one complete cycle of the original signal, used to identify the locations of peaks and troughs. For example, if the frequency of the original signal is 100kHz and the sampling frequency of the ADC module is 2MHz, then 20 sampling points can be collected per cycle, and the preset number is 20. System designers set the preset number based on the relationship between the original signal cycle and the sampling rate to ensure that all key signal features within a complete cycle are covered.
[0145] The sampled data is a set of continuous values output from the ADC module, representing a discrete time representation of the original signal. A peak is a locally largest value within a preset number of sampled data points, representing the highest point of the signal within one period; a trough is a locally smallest value within the same range, representing the lowest point. The alternation of peaks and troughs reflects the periodicity of the original signal. When a phase change occurs, the difference between the peaks and troughs changes significantly. This change in the difference between peaks and troughs serves as an important basis for determining whether a phase change has occurred.
[0146] Peak and trough detection methods are implemented by comparing adjacent sampled data point by point. Specifically, within a preset range, the current sampled point is compared with several points before and after it. If the current sampled point is greater than all adjacent points, it is determined to be a peak; conversely, if the current sampled point is less than all adjacent points, it is determined to be a trough. Peak and trough detection methods help to accurately capture peak and trough values in a signal, thereby improving the reliability of phase change recognition.
[0147] In this way, peak and trough information in the original signal can be effectively extracted, providing a basis for further judgment of the phase change. Since the difference between the peak and trough will change significantly at the phase change, it can serve as a key basis for identifying DBPSK or BPSK signals.
[0148] In some embodiments, the above-described touch signal processing method may further include the following steps after step S101:
[0149] The multiple sampled data are filtered to obtain the filtered sampled data.
[0150] Filtering multiple sampled data points is done to remove noise and interference signals introduced during the acquisition process, thereby improving the accuracy and stability of subsequent processing. Since communication between the stylus and the touch chip relies on the raw signal modulated by DBPSK or BPSK, which has a short duration and small data volume, the raw data acquired by the ADC is easily affected by display noise, charging noise, and internal power supply noise. These noise effects can lead to signal distortion or significant fluctuations.
[0151] Filtering operations are typically implemented using FIR low-pass filters. In a first-order FIR filter, the formula is Y(n) = αX(n) + (1-α)X(n-1), where the ADC value X(n) of the current sampling point represents the analog-to-digital conversion value of the current sampling point, and the ADC value X(n-1) of the previous sampling point represents the analog-to-digital conversion value of the previous sampling point. The filter coefficient α ranges from [0,1]. By adjusting the value of the filter coefficient α, the weight distribution between the current and previous sampling points can be controlled, thus affecting the filtering effect. When the filter coefficient α is close to 1, the current sampling point has a greater impact on the output result, and the filtering system responds faster to the input signal but has weaker noise immunity; when the filter coefficient α is close to 0, the filtering system processes the input signal more smoothly but the response speed is slower.
[0152] In practical applications, multi-order FIR filters can be used in the system. The higher the order of the filter, the stronger its ability to suppress high-frequency noise. However, increasing the order also leads to increased computational complexity and resource consumption. Therefore, in the design of touch chips, it is necessary to rationally select the order of the filter based on the system's power consumption requirements, chip area limitations, and overall performance needs.
[0153] After filtering, the sampled data output by the ADC will be more stable and smoother, which is beneficial for subsequent accumulation operations, peak and trough detection algorithms, and phase change recognition algorithms. Filtering to stabilize and smooth the sampled data output by the ADC before performing subsequent accumulation operations, peak and trough detection algorithms, and phase change recognition algorithms can effectively reduce the false positive rate and improve the demodulation accuracy of DBPSK or BPSK signals.
[0154] In this embodiment of the application, by performing filtering operations on the multiple sampled data, the filtering operation can reduce noise interference and improve signal quality, thereby enabling the system to more accurately identify the phase and its change information in the DBPSK signal or BPSK signal, and ultimately enabling the system to achieve more reliable active pen communication and data parsing.
[0155] On the other hand, embodiments of this disclosure also provide a touch chip, such as Figure 8 As shown, the touch chip 100 includes:
[0156] The digital signal sampling unit 110 is used to sample the original signal received by the touch panel to obtain multiple discrete sampled data; wherein the original signal is obtained by modulating the original data using phase information;
[0157] Accumulator 120 is used to process the plurality of sampled data sequentially to obtain a plurality of accumulated data corresponding to the sampled data; wherein, the first accumulated data is the first sampled data;
[0158] The data processing module 130 is used to determine the sampling data position of the period corresponding to the phase change of the original signal based on the accumulated data; and to determine the original data corresponding to the original signal based on the sampling data position.
[0159] In some embodiments, such as Figure 9 As shown, the touch chip also includes:
[0160] Counter 140 is used to count the sampling of the valid data in response to the sampling data obtained by the digital signal sampling unit being valid data, and to obtain a count value corresponding to the position of the valid data; the count value is used to indicate the position of the sampling data.
[0161] In some embodiments, the touch chip further includes:
[0162] Filter 150 is used to filter the plurality of sampled data to obtain the filtered sampled data; wherein, the filter is an n-order low-pass filter, and n is a positive integer.
[0163] In another aspect, embodiments of this disclosure provide an electronic device, such as... Figure 10 As shown, the electronic device 200 includes a memory 210, a processor 220, and a touch screen 230; the memory 210 stores a computer program; when the processor 220 executes the computer program, it implements the touch signal processing method described above to obtain the original data corresponding to the original signal;
[0164] The touch display screen 230 is used to: receive the original signal and the touch signal sent after an external touch operation, wherein the touch signal is used to indicate the touch position; and display the screen based on the original data and the touch position corresponding to the touch signal.
[0165] In another aspect, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the touch signal processing method described in any of the preceding claims.
[0166] The above-mentioned electronic devices, computer-readable storage media and the touch signal processing methods provided in the embodiments of this disclosure belong to the same inventive concept. Their specific implementation and solution effects can be referred to the detailed description in the above embodiments, and will not be repeated here.
[0167] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0168] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium includes various media capable of storing program code, such as removable storage devices, ROMs, magnetic disks, or optical disks.
[0169] The various embodiments / implementations provided in this disclosure can be combined with each other without creating contradictions.
[0170] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A touch signal processing method, characterized in that, include: The original signal received by the touch panel is sampled to obtain multiple discrete sampled data; wherein the original signal is obtained by modulating the original data using phase information; The plurality of sampled data are processed sequentially to obtain a plurality of accumulated data corresponding to the sampled data; Based on the accumulated data, determine the sampling data position of the period corresponding to the phase change of the original signal; Based on the location of the sampled data, the original data corresponding to the original signal is determined.
2. The touch signal processing method according to claim 1, characterized in that, Determining the sampling data position corresponding to the period in which the phase change of the original signal occurs based on the accumulated data includes: Identify the alternating peaks and troughs in the accumulated data; Based on the peaks and troughs, the sampling data positions corresponding to the period in which the original signal undergoes a phase change are determined.
3. The touch signal processing method according to claim 2, characterized in that, The sampled data includes: noise data and valid data; determining the alternating peaks and troughs in the accumulated data includes: Identify the alternating peaks and troughs in the valid data.
4. The touch signal processing method according to claim 3, characterized in that, The method further includes: When the change in the accumulated data relative to the previous accumulated data is less than or equal to a preset first threshold, the sampled data is determined to be the noise data. When the change in the accumulated data relative to the previous accumulated data is greater than the first threshold, the sampled data is determined to be valid data.
5. The touch signal processing method according to claim 3, characterized in that, The method further includes: In response to the sampling data being valid data, the sampling of the valid data is counted to obtain a count value corresponding to the position of the valid data; the count value is used to indicate the position of the sampling data.
6. The touch signal processing method according to claim 5, characterized in that, Determining the sampling data position corresponding to the period in which the phase change of the original signal occurs based on the peak and the trough includes: The difference between the wave peak and the adjacent wave trough, and the absolute value of the difference, are determined sequentially. If the change between the absolute value and the previous absolute value is greater than or equal to the second threshold, then the count value of the sampled data corresponding to the absolute value is determined to be the target count value.
7. The touch signal processing method according to claim 6, characterized in that, The step of determining the original data corresponding to the original signal based on the sampling data location includes: The first bit is determined based on the ratio of the target count value to the preset number; wherein, the first bit is the bit corresponding to the period in which the phase of the original signal changes; and the preset number is the number of samples taken for one period of the original signal. The original data is determined based on the first bit.
8. The touch signal processing method according to claim 7, characterized in that, Determining the original data based on the first bit includes: Determine the sign of the difference corresponding to the target count value; If the difference is positive, then the original signal corresponding to the first bit is the first phase, and the original signal corresponding to the second bit is the second phase; wherein, the second bit is the bit preceding the first bit; If the difference is negative, then the original signal corresponding to the first bit is the second phase, and the original signal corresponding to the second bit is the first phase; The original data is determined based on the phase of the first bit.
9. The touch signal processing method according to any one of claims 1 to 8, characterized in that, Determining the alternating peaks and troughs in the accumulated data includes: The sampled data of a preset number are compared sequentially, and the maximum value is determined as the peak and the minimum value is determined as the trough; wherein, the preset number is the number of samples taken for one cycle of the original signal.
10. The touch signal processing method according to any one of claims 1 to 8, characterized in that, The method further includes: The multiple sampled data are filtered using an n-order low-pass filter to obtain the filtered sampled data, where n is a positive integer.
11. A touch chip, characterized in that, include: A digital signal sampling unit is used to sample the raw signal received by the touch panel to obtain multiple discrete sampled data; wherein the raw signal is obtained by modulating the raw data using phase information; An accumulator is used to process the plurality of sampled data sequentially to obtain a plurality of accumulated data corresponding to the sampled data; wherein the first accumulated data is the first sampled data; The data processing module is used to determine the sampling data position of the period corresponding to the phase change of the original signal based on the accumulated data; and to determine the original data corresponding to the original signal based on the sampling data position.
12. The touch chip according to claim 11, characterized in that, The touch chip also includes: A counter is used to count the samples of the valid data in response to the sampling data obtained by the digital signal sampling unit being valid data, and to obtain a count value corresponding to the position of the valid data; the count value is used to indicate the position of the sampled data.
13. The touch chip according to claim 11, characterized in that, The touch chip also includes: A filter is used to filter the plurality of sampled data to obtain the filtered sampled data; wherein the filter is an n-order low-pass filter, and n is a positive integer.
14. An electronic device, characterized in that, The device includes a memory, a processor, and a touch display screen; the memory stores a computer program; when the processor executes the computer program, it implements the touch signal processing method according to any one of claims 1 to 10 to obtain raw data corresponding to the raw signal; The touch display screen is used to: receive the original signal and the touch signal sent after an external touch operation, wherein the touch signal is used to indicate the touch position; and display the screen based on the original data and the touch position corresponding to the touch signal.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the touch signal processing method according to any one of claims 1 to 10.
Citation Information
Cited By
Common-mode interference resistant active pen and touch screen interaction system and signal demodulation method
CN121501166A