Baseline determination circuit and method, state detection chip, and electronic device

The baseline value is updated through the relationship between the count value and the threshold value, which solves the existing problems of complex baseline tracking processing and high power consumption, and realizes the simplification of the baseline value update and the optimization of circuit resources.

CN114002525BActive Publication Date: 2024-09-10SHANGHAI AWINIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111261360.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2024-09-10
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

The existing baseline tracking processing process is complex, takes up a lot of circuit resources, and results in high power consumption.

Method used

The count value update module and the baseline value update module are used to update the baseline value by tracking the relationship between the count value and the count threshold, simplifying the update process of the baseline value, and reducing circuit resource occupation and power consumption.

Benefits of technology

The baseline value update process is simplified, circuit power consumption is reduced, and the flexibility and accuracy of baseline value update are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114002525B
    Figure CN114002525B
Patent Text Reader

Abstract

The present application discloses a baseline determination circuit and method, a state detection chip, and an electronic device, wherein the baseline determination circuit includes: a count value update module, which is used to update the tracking count value according to the size relationship between the measurement data and the baseline value; the tracking count value is used to characterize the number level of the measurement data on each side of the baseline value; the baseline value update module is used to determine the baseline value according to the relationship between the tracking count value and at least one counting threshold. The present application can simplify the update process of the baseline value, reduce the circuit resources occupied by the operation, and reduce the power consumption of the circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of circuit technology, and in particular to a baseline determination circuit and method, a state detection chip, and an electronic device. Background Art

[0002] Electronic devices such as mobile phones often need to detect the relative state (such as touch state and / or proximity state, etc.) between a user's finger and a specific part of the touch screen. During these relative state detection processes, the physical quantity detected by the sensor may drift slowly with changes in the environment (such as temperature, humidity, etc.), and this drift may cause recognition errors. Therefore, it is necessary to use baseline tracking or baseline calibration (correction) to update the baseline value so that the baseline can adaptively follow the drift of the environment to reduce or eliminate the impact of environmental changes.

[0003] refer to Figure 1 As shown, in the traditional scheme, the raw data RDATA sampled by the sensor is filtered to obtain LPF, and the raw data filtering is processed by baseline tracking to obtain the baseline value BL. The actual change of the sensor detection data is DIFF = BL-LPF, and the actual change is input into the state judgment module, so that the state judgment module can output the relative state between the electronic device and the detection target. The baseline tracking process is relatively complex to implement, and the calculation occupies more circuit resources. Usually, calculations are required in each detection cycle, which consumes a lot of power. Summary of the invention

[0004] In view of this, the present application provides a baseline determination circuit and method, a state detection chip, and an electronic device to solve the problem that the existing baseline tracking process is relatively complex, the calculation occupies more circuit resources, and causes high power consumption.

[0005] The present application provides a baseline determination circuit, comprising:

[0006] A count value updating module, used to update the tracking count value according to the magnitude relationship between the measurement data and the baseline value; the tracking count value is used to characterize the number level of the measurement data on each side of the baseline value;

[0007] The baseline value updating module is used to determine the baseline value according to the relationship between the tracking count value and at least one count threshold.

[0008] Optionally, the count value update module includes a first comparator, a step value selector and a tracking counter; the first input terminal of the first comparator is connected to the measurement data, the second input terminal is connected to the baseline value, and the output terminal is connected to the control terminal of the step value selector; the first input terminal of the step value selector is connected to a negative step value, the second input terminal is connected to a positive step value, and the output terminal is connected to the tracking counter;

[0009] The first comparator is used to compare the measurement data and the baseline value, and output the first comparison result to the step value selector; the step value selector is used to select the negative step value or the positive step value according to the first comparison result and output it to the tracking counter; the tracking counter is used to accumulate the negative step value or the positive step value with the tracking count value at the previous sampling moment to update the tracking count value.

[0010] Optionally, the baseline value updating module includes a comparison unit and a baseline value tracking unit;

[0011] The comparison unit is used to compare the relationship between the tracking count value and each counting threshold value, and output the comparison result to the baseline value tracking unit; the baseline value tracking unit is used to track the baseline value at the previous sampling moment according to the comparison result.

[0012] Optionally, the counting threshold includes a first threshold and a second threshold smaller than the first threshold; the comparison unit includes a second comparator and a third comparator; the baseline value tracking unit includes a tracking selector and an accumulator;

[0013] The first input terminal of the second comparator is connected to the first threshold value, the second input terminal is connected to the output terminal of the count value update module, and the output terminal is connected to the first control terminal of the tracking selector; the first input terminal of the third comparator is connected to the second threshold value, the second input terminal is connected to the output terminal of the count value update module, and the output terminal is connected to the second control terminal of the tracking selector; the first input terminal of the tracking selector is connected to the horizontal tracking parameter, the second input terminal is connected to the positive tracking parameter, the third input terminal is connected to the negative tracking parameter, and the output terminal is connected to the accumulator; wherein the horizontal tracking parameter is used to track the baseline value horizontally, the positive tracking parameter is used to track the baseline value upward, and the negative tracking parameter is used to track the baseline value downward;

[0014] The tracking selector is used to output the positive tracking parameter to the accumulator when the tracking count value is greater than the first threshold value, so that the accumulator superimposes the positive tracking parameter on the baseline value at the previous sampling moment; when the tracking count value is less than or equal to the first threshold value and greater than or equal to the second threshold value, output the horizontal tracking parameter to the accumulator, so that the accumulator superimposes the horizontal tracking parameter on the baseline value at the previous sampling moment; when the tracking count value is less than the second threshold value, output the negative tracking parameter to the accumulator, so that the accumulator superimposes the negative tracking parameter on the baseline value at the previous sampling moment.

[0015] Optionally, the baseline determination circuit further comprises an initialization selector and an average processing unit; the first input end of the initialization selector is connected to the output end of the baseline value update module, and the second input end is connected to the output end of the average processing unit; the input end of the average processing unit is connected to the measurement data;

[0016] The averaging processing unit is used to obtain the average value of the measurement data and output the average value to the initialization selector; the initialization selector is used to select the average value output by the averaging processing unit as the initial baseline value at the baseline initialization time.

[0017] Optionally, the baseline initialization timing includes a power-on timing, a reset timing and / or a touch status detection function start timing.

[0018] Optionally, the baseline determination circuit further includes an adder, a fourth comparator and a freeze selector;

[0019] The first input terminal of the adder is connected to the output terminal of the freeze selector, the second input terminal is connected to the measurement data, and the output terminal is connected to the first input terminal of the fourth comparator; the second input terminal of the fourth comparator is connected to the freeze threshold, and the output terminal is connected to the control terminal of the freeze selector; the first input terminal of the freeze selector is connected to the output terminal of the baseline value update module;

[0020] The freeze selector is used to freeze the baseline value when receiving a freeze signal; the adder is used to calculate the difference between the baseline value output by the freeze selector and the corresponding measurement data; the fourth comparator is used to output a freeze signal when the difference is greater than the freeze threshold.

[0021] Optionally, the baseline determination circuit further includes an abnormality determination unit and an abnormality selector;

[0022] The first input end of the abnormality judgment unit is connected to the output end of the adder, the second input end is connected to the abnormal threshold, the third input end is connected to the first anti-shake number, and the output end is connected to the control end of the abnormality selector; the first input end of the abnormality selector is connected to the output end of the baseline value update module, the second input end is connected to the access end of the measurement data, and the output end is connected to the input end of the freeze selector;

[0023] The abnormality judgment unit is used to output an abnormality signal according to the difference, the abnormality threshold and the first anti-shake number; the abnormality selector is used to select the measurement data as the baseline value of the current sampling moment when receiving the abnormality signal.

[0024] The present application also provides a baseline determination method, comprising:

[0025] Update the tracking count value according to the magnitude relationship between the measurement data and the baseline value; the tracking count value is used to characterize the number level of the measurement data on each side of the baseline value;

[0026] A baseline value is determined based on a relationship between the tracked count value and at least one count threshold.

[0027] Optionally, updating the tracking count value according to the magnitude relationship between the measurement data and the baseline value includes:

[0028] If the measurement data is greater than the baseline value, the tracking count value is increased by a step value; if the measurement data is less than or equal to the baseline value, the tracking count value is reduced by a step value.

[0029] Optionally, the counting threshold includes a first threshold and a second threshold that is smaller than the first threshold; and determining the baseline value according to the relationship between the tracking counting value and at least one counting threshold includes:

[0030] If the tracking count value is greater than the first threshold, the baseline value is updated by tracking the baseline value upward; if the tracking count value is less than or equal to the first threshold and greater than or equal to the second threshold, the baseline value is kept unchanged; if the tracking count value is less than the second threshold, the baseline value is updated by tracking the baseline value downward.

[0031] Optionally, the baseline determination method further includes:

[0032] When initializing the baseline, the average value of the measurement data is selected as the initial baseline value.

[0033] Optionally, the baseline initialization timing includes a power-on timing, a reset timing and / or a touch status detection function start timing.

[0034] Optionally, the baseline determination method further includes:

[0035] The difference between the baseline value at the current sampling moment and the corresponding measurement data is obtained, and the baseline value is frozen when the difference is greater than the freezing threshold.

[0036] Optionally, the baseline determination method further includes:

[0037] An abnormal state is identified according to the difference and the first anti-shake number, and in the abnormal state, the measurement data is used as a baseline value at a current sampling moment.

[0038] The present application also provides a state detection chip, comprising a state detection circuit and any one of the above-mentioned baseline determination circuits; the state detection circuit is used to determine the state of the detection target according to the difference between the baseline value and the corresponding measurement data.

[0039] Optionally, the state detection circuit is further configured to detect the touch state of the detection target according to a relationship between the difference and a touch threshold.

[0040] Optionally, the state detection circuit is further used to release the touch state according to the relationship between the difference and a release threshold; the release threshold is less than or equal to the touch threshold.

[0041] The present application also provides an electronic device, comprising the state detection chip described in any of the above embodiments.

[0042] The above-mentioned baseline determination circuit and method, state detection chip, and electronic device of the present application update the tracking count value according to the size relationship between the measurement data and the baseline value, and determine the baseline value according to the relationship between the tracking count value and at least one counting threshold, which can simplify the update process of the baseline value, thereby simplifying the corresponding circuit structure, reducing the occupied area of ​​the baseline determination circuit and the circuit resources occupied by the operation therein, and reducing the power consumption of the circuit. The present application can also be initialized at the baseline initialization time, and the initial baseline value is determined according to the average value of the measurement data to ensure the accuracy of updating subsequent baseline values ​​based on the initial baseline value; in addition, the baseline determination circuit also has a baseline value freezing function and an abnormal state processing function, which makes the baseline value update process highly flexible and effectively improves the update performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 It is a schematic diagram of the state detection process of the traditional scheme;

[0045] Figure 2 is a schematic diagram of a baseline determination circuit structure of an embodiment of the present application;

[0046] Figure 3a and Figure 3b is a schematic diagram of a baseline determination circuit structure of another embodiment of the present application;

[0047] Figure 4 is a schematic diagram of a baseline determination circuit structure of another embodiment of the present application;

[0048] Figure 5a and Figure 5b is a schematic diagram of a baseline determination circuit structure of another embodiment of the present application;

[0049] Figure 6is a flowchart of a baseline determination method according to an embodiment of the present application;

[0050] Figure 7 This is a schematic diagram of the structure of a state detection chip according to an embodiment of the present application;

[0051] Figure 8 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] As described in the background technology, traditional baseline tracking solutions mostly use filtering solutions, such as low-pass filtering solutions: BL(n) = (1-α)*BL(n-1) + α*RDATA, BL(n-1) represents the baseline value at the n-1th sampling moment, BL(n) represents the baseline value at the nth sampling moment, α represents the tracking coefficient, RDATA represents the raw data obtained by the sensor sampling, and the symbol * represents multiplication. This type of baseline tracking solution is relatively complex to implement, and the calculation occupies more circuit resources. Usually, calculations must be performed in each detection cycle, and the power consumption is high.

[0053] To address this problem, the baseline determination circuit and method, state detection chip, and electronic device provided in the present application can simplify the baseline value update process, reduce the circuit resources occupied by the calculations, and reduce circuit power consumption.

[0054] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.

[0055] The present application provides a first aspect of a baseline determination circuit, referring to Figure 2 As shown, the baseline determination circuit includes:

[0056] The count value updating module 100 is used to update the tracking count value according to the magnitude relationship between the measurement data and the baseline value; the tracking count value is used to characterize the number level of the measurement data on each side of the baseline value;

[0057] The baseline value updating module 200 is used to determine a baseline value according to the relationship between the tracking count value and at least one count threshold.

[0058] The above-mentioned measurement data includes data measured by a sensor in an electronic device for detecting the state between a detection target such as a finger and the electronic device. When the sensor has high accuracy and the noise in the measured data is small, the measurement data can be the original data measured by the sensor. When the sensor has relatively low accuracy and the measured data may include a certain amount of noise, the measurement data can be the data after filtering the original data obtained by the sensor. This can ensure the validity of the measurement data used. When the count value update module 100 updates the tracking count value at the current sampling moment, it uses the baseline value at the previous sampling moment; Figure 2 As shown, the output end of the baseline value update module 200 is also connected to an input end of the count value update module 100, so that after updating the baseline value, the baseline value update module 200 can provide the baseline value to the count value update module 100, so that the count value update module 100 adopts the baseline value at the next sampling moment.

[0059] The above-mentioned tracking count value is used to characterize which side of the baseline value the measured data is on more often. Specifically, the initial count value of the tracking count value can be set before each counting starts, and the corresponding step value can be accumulated or subtracted based on the initial count value to realize counting; for example, a step value is accumulated when the measured data is greater than the baseline value, and a step value is subtracted when the measured data is less than or equal to the baseline value. For the tracking count value at a certain sampling moment, if it is greater than the initial count value, it indicates that the measured data is greater than the baseline value more often, and if it is less than the initial count value, it indicates that the measured data is less than or equal to the baseline value more often, etc. The above-mentioned counting threshold is set according to its associated update rule, and the update rule can be determined according to the application scenario in which the baseline determination circuit is located, and can include a rule for tracking the baseline value of the previous sampling moment, such as horizontal tracking of the baseline value of the previous sampling moment, upward tracking of the baseline value of the previous sampling moment, and / or downward tracking of the baseline value of the previous sampling moment, etc. Specifically, the counting threshold may include multiple thresholds to distinguish the tracking count value based on the multiple thresholds, so that when the tracking count value is in a certain range, the baseline value at the current sampling moment is updated using the corresponding update rule to ensure the accuracy of the updated baseline value.

[0060] This embodiment uses a count value update module 100 to update the tracking count value according to the size relationship between the measurement data and the baseline value, and uses a baseline value update module 200 to determine the baseline value according to the relationship between the tracking count value and at least one counting threshold value, which can simplify the update process of the baseline value, thereby simplifying the corresponding circuit structure, reducing the occupied area of ​​the baseline determination circuit and the circuit resources occupied by the calculation therein, and reducing the circuit power consumption.

[0061] In one embodiment, reference Figure 3aAs shown, the count value updating module 100 includes a first comparator 101, a step value selector 102 and a tracking counter 103; the first input terminal of the first comparator 101 is connected to the measurement data, the second input terminal is connected to the baseline value, and the output terminal is connected to the control terminal of the step value selector; the first input terminal of the step value selector 102 is connected to a negative step value, the second input terminal is connected to the positive step value, and the output terminal is connected to the tracking counter 103; Figure 3a In the embodiment, the tracking counter 103 is implemented by an accumulator. The first comparator 101 is used to compare the measured data with the baseline value, and output the first comparison result to the step value selector 102; the step value selector 102 is used to select a negative step value or a positive step value according to the first comparison result and output it to the tracking counter; the tracking counter is used to accumulate the negative step value or the positive step value with the tracking count value at the previous sampling moment to update the tracking count value.

[0062] The positive step value and the negative step value are opposite to each other, such as Figure 3a The positive step value is 1, and the negative step value is -1. The first comparator 101 compares the size between the measured data and the baseline value, and the first comparison result may include two: the measured data is greater than the baseline value, and the measured data is less than or equal to the baseline value. Figure 3a In the embodiment, Sign is used to represent the first comparison result, Sign=1 represents that the measured data is greater than the baseline value, and Sign=0 represents that the measured data is less than or equal to the baseline value. In the specific updating process, when the first comparator 101 inputs a control signal (such as 1) representing that the measured data is greater than the baseline value to the step value selector 102, the step value selector 102 inputs a positive step value (such as 1) to the tracking counter 103, so that the tracking counter 103 accumulates the positive step value on the basis of the tracking count value; when the first comparator 101 inputs a control signal (such as 0) representing that the measured data is less than or equal to the baseline value to the step value selector 102, the step value selector 102 inputs a negative step value (such as -1) to the tracking counter 103, so that the tracking counter 103 accumulates the negative step value on the basis of the tracking count value to update the tracking count value at the previous sampling moment.

[0063] In one embodiment, Figure 3aAs shown, the baseline value update module 200 includes a comparison unit 210 and a baseline value tracking unit 220; the comparison unit 210 is used to compare the relationship between the tracking count value and each count threshold, and output the comparison result to the baseline value tracking unit 220; the baseline value tracking unit 220 is used to track the baseline value of the previous sampling moment according to the comparison result. The comparison unit 210 may include at least one comparator, wherein the number of comparators matches the number of count thresholds, and one comparator is used to compare the relationship between the tracking count value and the corresponding count threshold, and output the comparison result to the baseline value tracking unit 220, so that the baseline value tracking unit 220 can more accurately track the baseline value of the previous sampling moment.

[0064] Specifically, refer to Figure 3bAs shown, the counting threshold includes a first threshold and a second threshold less than the first threshold; the comparison unit 210 includes a second comparator 211 and a third comparator 212; the baseline value tracking unit 220 includes a tracking selector 221 and an accumulator 222; the first input end of the second comparator 211 is connected to the first threshold, the second input end is connected to the output end of the counting value updating module 100 to access the tracking counting value, and the output end is connected to the first control end of the tracking selector 221; the first input end of the third comparator 212 is connected to the second threshold, the second input end is connected to the output end of the counting value updating module 100 to access the tracking counting value, and the output end is connected to the tracking selector 221. The first input terminal of the tracking selector 221 is connected to the horizontal tracking parameter, the second input terminal is connected to the positive tracking parameter, the third input terminal is connected to the negative tracking parameter, and the output terminal is connected to the accumulator 222 to provide the horizontal tracking parameter, the positive tracking parameter or the negative tracking parameter to the accumulator 222, so that the accumulator 222 accumulates the horizontal tracking parameter, the positive tracking parameter or the negative tracking parameter on the basis of the baseline value at the previous sampling moment, and tracks the baseline value at the previous sampling moment in the corresponding direction; wherein the horizontal tracking parameter is used for horizontal tracking of the baseline value, the positive tracking parameter is used for upward tracking of the baseline value, and the negative tracking parameter is used for downward tracking of the baseline value. The tracking selector 221 is used to output the positive tracking parameter to the accumulator 222 when the tracking count value is greater than the first threshold, so that the accumulator 222 superimposes the positive tracking parameter on the baseline value at the previous sampling moment; when the tracking count value is less than or equal to the first threshold and greater than or equal to the second threshold, output the horizontal tracking parameter to the accumulator, so that the accumulator 222 superimposes the horizontal tracking parameter on the baseline value at the previous sampling moment; when the tracking count value is less than the second threshold, output the negative tracking parameter to the accumulator, so that the accumulator 222 superimposes the negative tracking parameter on the baseline value at the previous sampling moment. The first threshold and the second threshold can be set according to factors such as baseline tracking speed and / or sensitivity. In actual application, the speed and / or sensitivity of baseline tracking can be controlled by modifying the first threshold and the second threshold, thereby improving the corresponding application flexibility.

[0065] The above-mentioned upward tracking baseline value may include superimposing a forward tracking parameter (such as Figure 3b +STEP), downward tracking of the baseline value may include superimposing a negative tracking parameter (such as Figure 3b-STEP). The horizontal tracking parameter can be 0, and the horizontal tracking baseline value can include keeping the baseline value of the previous sampling moment unchanged at the current sampling moment, that is, superimposing 0 on the baseline value of the previous sampling moment. Optionally, the positive tracking parameter and the negative tracking parameter can be opposite values ​​to each other so that the amplitudes of the tracking baseline values ​​in each direction are consistent; wherein the absolute values ​​of the positive tracking parameter and the negative tracking parameter can include several tracking steps (such as one tracking step). The above-mentioned positive tracking parameter, negative tracking parameter, first threshold and second threshold are determined according to the characteristics of the corresponding sampling value following the environmental changes, the required baseline tracking speed and / or tracking accuracy and other factors.

[0066] In one example, reference Figure 3b As shown, the second comparator 211 outputs 1 to the first control terminal of the tracking selector 221 when the tracking count value is greater than the first threshold value, and outputs 0 to the first control terminal of the tracking selector 221 when the tracking count value is less than or equal to the first threshold value. The third comparator 212 outputs 1 to the second control terminal of the tracking selector 221 when the tracking count value is less than the second threshold value, and outputs 0 to the second control terminal of the tracking selector 221 when the tracking count value is greater than or equal to the first threshold value. In this way, the tracking selector 221 can receive three control signals of 01, 00 or 10. When the tracking count value is greater than the first threshold, the tracking selector 221 receives 01, and provides the positive tracking parameter connected to channel 1 (the second input terminal) to the accumulator 222; when the tracking count value is less than or equal to the first threshold, and greater than or equal to the second threshold, the tracking selector 221 receives 00, and provides the horizontal tracking parameter connected to channel 0 (the first input terminal) to the accumulator 222; when the tracking count value is less than the second threshold, the tracking selector 221 receives 10, and provides the negative tracking parameter connected to channel 2 (the third input terminal) to the accumulator 222; in this way, the accumulator 222 can use the various parameters provided by the tracking selector 221 to track the baseline value of the previous sampling moment in the corresponding direction.

[0067] In one example, the tracking counter 103 may also set the tracking count value to the initial count value after the baseline value update module 200 tracks the baseline value upward or downward, so as to recount based on the initial count value in the next counting event; the initial count value may include a value such as 0 or 10 that represents the recount.

[0068] In one embodiment, reference Figure 4As shown, the above-mentioned baseline determination circuit also includes an initialization selector 311 and an average processing unit 312; the first input end of the initialization selector 311 is connected to the output end of the baseline value update module 200, and the second input end is connected to the output end of the average processing unit 312; the input end of the average processing unit 312 is connected to the measurement data; the average processing unit 312 is used to obtain the average value of the measurement data and output the average value to the initialization selector 311; the initialization selector 311 is used to select the average value output by the average processing unit 312 as the initial baseline value at the baseline initialization time, and can select the baseline value updated by the baseline value update module 200 as the baseline value at other times.

[0069] The averaging processing unit 312 can obtain the measurement data at each sampling time, calculate the average value of each received measurement data, and output the average value to the initialization selector 311, so that the initialization selector 311 can initialize the baseline value. The baseline initialization timing can include a preset timing, and can also include a power-on timing, a reset timing, and / or a touch state detection function start timing of the baseline determination circuit. In an example, Figure 4 As shown, the baseline initialization timing can be represented by the value of Init. If Init=1, it indicates that the current sampling moment is the baseline initialization timing, and the initialization selector 311 selects the average value output by the averaging processing unit 312 as the initial baseline value based on the initial baseline value; if Init=0, it indicates that the current sampling moment is not the baseline initialization timing, and the initialization selector 311 selects the baseline value updated by the baseline value update module 200 as the baseline value of the current sampling moment.

[0070] Optionally, the baseline initialization timing includes the power-on timing, reset timing and / or touch state detection function start timing of the baseline determination circuit. The count value update module 100 recounts after adjusting the baseline value upward or downward to ensure the independence of each baseline value adjustment process, avoid interference in one adjustment process and affect other adjustment processes, and improve the baseline value tracking effect.

[0071] In one embodiment, reference Figure 5aAs shown, the baseline determination circuit may further include an adder 321, a fourth comparator 322 and a freeze selector 323; the first input terminal of the adder 321 is connected to the output terminal of the freeze selector 323, the second input terminal is connected to the measurement data, and the output terminal is connected to the first input terminal of the fourth comparator 322; the second input terminal of the fourth comparator 322 is connected to the freeze threshold, and the output terminal is connected to the control terminal of the freeze selector 323; the first input terminal of the freeze selector 323 is connected to the output terminal of the baseline value update module 200, and the second input terminal is connected to the baseline value, that is, connected to its output terminal; when the baseline determination circuit includes an initialization selector 311, the first input terminal of the freeze selector 323 is connected to the output terminal of the initialization selector 311. The freeze selector 323 is used to freeze the baseline value at the current sampling moment when receiving the freeze signal, otherwise, the baseline value updated by the baseline value update module can be selected as the baseline value at the current sampling moment; the adder 321 is used to calculate the difference between the baseline value output by the freeze selector 323 and the corresponding measurement data; the fourth comparator 322 is used to output a freeze signal when the difference is greater than the freeze threshold. The freezing threshold may be determined based on factors such as the baseline determining circuit's characteristics in following environmental changes, the timeliness of corresponding state detection, and / or detection accuracy.

[0072] like Figure 5a As shown, whether to freeze can be represented by Freeze, Freeze=1 indicates a frozen signal, and Freeze=0 indicates a non-frozen signal. The fourth comparator 322 compares the difference and the freezing threshold, and outputs Freeze=1 when the difference is greater than the freezing threshold. When Freeze=1, the freeze selector 323 freezes the baseline value at the current sampling moment, that is, the baseline value at the previous sampling moment is used as the baseline value at the current sampling moment to prevent excessive tracking from affecting subsequent state judgments; when the difference is less than or equal to the freezing threshold, the fourth comparator 322 outputs Freeze=0, and when Freeze selector 323 is Freeze=0, the baseline value updated at the current sampling moment is used, that is, no other processing is performed on the baseline value to ensure the accuracy of the baseline value update process.

[0073] Further, refer to Figure 5bAs shown, the above-mentioned baseline determination circuit also includes an abnormality judgment unit 332 and an abnormality selector 331; the first input end of the abnormality judgment unit 332 is connected to the output end of the adder, the second input end is connected to the abnormality threshold, the third input end is connected to the first anti-shake number, and the output end is connected to the control end of the abnormality selector 331; the first input end of the abnormality selector 331 is connected to the output end of the baseline value update module 200, the second input end is connected to the access end of the measurement data, and the output end is connected to the input end of the freeze selector 323; when the baseline determination circuit includes an initialization selector 311, the input end of the abnormality selector 331 is connected to the output end of the initialization selector 311. The abnormality judgment unit 332 is used to output an abnormality signal according to the difference, the abnormality threshold and the first anti-shake number; the abnormality selector 331 is used to select the measurement data at the current sampling moment as the baseline value at the current sampling moment when receiving the abnormality signal, otherwise, the baseline value updated by the baseline value update module or the baseline value output by the initialization selector 311 can be selected as the baseline value at the current sampling moment.

[0074] Specifically, the abnormality judgment unit 332 can determine the detection rules of the abnormal state according to the characteristics of the sensor provided in the electronic device, so as to identify the abnormal state according to the difference, the abnormal threshold and the first anti-shake number, and output an abnormal signal when the abnormal state is identified. The abnormal threshold is a state recognition threshold, which is also a threshold for identifying the abnormal state of the baseline. In some cases, the difference is greater than the corresponding abnormal threshold, indicating that the baseline may be in an abnormal state. In other cases, the difference is less than the corresponding abnormal threshold, indicating that the baseline may be in an abnormal state. Here, after the number of times that the baseline may be in an abnormal state is continuously identified to reach the first anti-shake number, it can be determined that the baseline is in an abnormal state, which can ensure the accuracy of the detected abnormal state.

[0075] Optionally, if the measurement data obtained by the sensor decreases when the detection target approaches the electronic device, and the difference is less than the negative abnormal threshold when the detection target does not touch the electronic device, that is, the difference exceeds the absolute value of the abnormal threshold in the opposite direction, indicating that the baseline may be in an abnormal state. If the above difference is less than the negative abnormal threshold for the first anti-shake number of consecutive times, it can indicate that there is a baseline abnormality, and it is necessary to use the corresponding measurement data to reset the baseline, that is, reset the baseline value to the measurement data, and continue to track and adjust to eliminate the impact caused by the baseline abnormality and ensure the effectiveness of the baseline tracking process. The above abnormal threshold and the first anti-shake number can be determined based on factors such as the sensitivity and / or processing speed of the corresponding abnormal recognition.

[0076] Specifically, the abnormality judgment unit 332 may include a fifth comparator, a continuous counter and / or a trigger, etc. The fifth comparator is used to compare the size relationship between the difference and the abnormal threshold, the continuous counter is used to continuously count the events that determine that the baseline may be in an abnormal state based on the difference and the abnormal threshold, and the trigger is used to output a trigger signal (such as a high-level signal such as 1) representing the abnormal signal when the count value of the continuous counter continuously counts reaches the first anti-shake number. In an example, as shown in 4b, the abnormal state can be represented by Abnorm, Abnorm=1 represents an abnormal signal, and Abnorm=0 represents a non-abnormal signal. The abnormality judgment unit 332 outputs Abnorm=1 when the baseline is detected to be in an abnormal state for the first consecutive anti-shake times, otherwise it outputs Abnorm=0. When Abnorm=1, the abnormality selector 331 selects the measurement data at the current sampling moment as the baseline value at the current sampling moment, and when Abnorm=0, the baseline value updated at the current sampling moment is used, that is, no other processing is performed on the baseline value to ensure the accuracy of the baseline value update process.

[0077] The above baseline determination circuit uses the count value update module 100 to update the tracking count value according to the size relationship between the measurement data and the baseline value, and uses the baseline value update module 200 to determine the baseline value according to the relationship between the tracking count value and at least one counting threshold, which can simplify the update process of the baseline value, thereby simplifying the corresponding circuit structure, reducing the occupied area of ​​the baseline determination circuit and the circuit resources occupied by the operation therein, and reducing the power consumption of the circuit. Initialization is also performed at the baseline initialization time, and the initial baseline value is determined according to the average value of the measurement data to ensure the accuracy of updating subsequent baseline values ​​based on the initial baseline value; in addition, the baseline determination circuit also has a baseline value freezing function and an abnormal state processing function, and the corresponding baseline value update process has high flexibility and good update effect.

[0078] In a second aspect, the present application provides a baseline determination method, referring to Figure 6 As shown, the baseline determination method includes:

[0079] S100, updating the tracking count value according to the magnitude relationship between the measurement data and the baseline value; the tracking count value is used to characterize the number level of the measurement data on each side of the baseline value;

[0080] S200: Determine a baseline value according to a relationship between the tracking count value and at least one count threshold.

[0081] The above-mentioned measurement data includes data measured by a sensor in an electronic device for detecting the relative state between a detection target such as a finger and the electronic device. When the sensor has high accuracy and the noise in the measured data is small, the measurement data can be the original data measured by the sensor. When the sensor has relatively low accuracy and the measured data may include certain noise, the measurement data can be the data after filtering the original data obtained by the sensor, so as to ensure the validity of the measurement data used. The above-mentioned tracking count value is used to characterize which side of the baseline value the measurement data is on more often. Specifically, the initial count value of the tracking count value can be set before each counting starts, and the corresponding step value can be accumulated or subtracted on the basis of the initial count value to realize counting; for example, when the measurement data is greater than the baseline value, a step value is accumulated, and when the measurement data is less than or equal to the baseline value, a step value is subtracted. For the tracking count value at a certain sampling time, if it is greater than the initial count value, it indicates that the measurement data is greater than the baseline value more often, and if it is less than the initial count value, it indicates that the measurement data is less than or equal to the baseline value more often, and so on. The above counting threshold is set according to its associated update rule, which can be determined according to the application scenario of the baseline determination circuit, and can include a rule for tracking the baseline value of the previous sampling moment, such as horizontal tracking of the baseline value of the previous sampling moment, upward tracking of the baseline value of the previous sampling moment, and / or downward tracking of the baseline value of the previous sampling moment, etc. Specifically, the above counting threshold can include multiple thresholds, so as to distinguish the tracking count value according to the multiple thresholds, so that when the tracking count value is in a certain range, the corresponding update rule is used to update the baseline value of the current sampling moment, so as to ensure the accuracy of the updated baseline value.

[0082] In one embodiment, updating the tracking count value according to the magnitude relationship between the measurement data and the baseline value includes: if the measurement data is greater than the baseline value, increasing the tracking count value by a step value; if the measurement data is less than or equal to the baseline value, decreasing the tracking count value by a step value. The step value can be set to a commonly used step value such as 1 to simplify the counting rule.

[0083] In one embodiment, the counting threshold includes a first threshold and a second threshold that is smaller than the first threshold; the determining of the baseline value based on the relationship between the tracking count value and at least one counting threshold includes: if the tracking count value is larger than the first threshold, updating the baseline value by tracking the baseline value upward; if the tracking count value is smaller than or equal to the first threshold and larger than or equal to the second threshold, keeping the baseline value unchanged for horizontal tracking; if the tracking count value is smaller than the second threshold, updating the baseline value by tracking the baseline value downward. The method of tracking the baseline value upward includes superimposing a positive tracking parameter on the baseline value at the previous sampling moment, and the method of tracking the baseline value downward includes superimposing a negative tracking parameter on the baseline value at the previous sampling moment; optionally, the positive tracking parameter is a positive number, and the positive tracking parameter and the negative tracking parameter can be opposite values ​​to each other, so that the amplitudes of the baseline values ​​tracked in each direction are consistent.

[0084] In one embodiment, the baseline determination method further includes: selecting an average value of the measurement data as an initial baseline value at the baseline initialization time.

[0085] Optionally, the baseline initialization timing includes a power-on timing, a reset timing and / or a touch status detection function start timing.

[0086] In one embodiment, the baseline determination method further includes: obtaining the difference between the baseline value at the current sampling moment and the corresponding measurement data, and freezing the baseline value when the difference is greater than the freezing threshold to prevent excessive tracking from affecting subsequent state judgment. The freezing threshold can be determined based on factors such as the relevant characteristics of the baseline determination circuit following environmental changes, the timeliness and / or detection accuracy of the corresponding state detection, etc.

[0087] In one embodiment, the above-mentioned baseline determination method further includes: identifying an abnormal state according to the difference value and the first anti-shake number, and using the measurement data as the baseline value at the current sampling moment in the abnormal state. Specifically, this embodiment can identify a suspected abnormal state of the baseline based on the relationship between the difference value and a preset abnormal threshold value, and after the number of consecutive identifications of the suspected abnormal state reaches the first anti-shake number, it is determined that the baseline is in an abnormal state, so that the measurement data is used as the baseline value at the current sampling moment in the abnormal state, so as to ensure the accuracy of the determined baseline value.

[0088] For the specific description of the baseline determination method provided by the above-mentioned embodiments, reference may be made to the corresponding description of the baseline determination circuit in the above-mentioned embodiments. The baseline determination method provided in the present application has all the beneficial effects of the above-mentioned baseline determination circuit, which will not be repeated here.

[0089] The third aspect of the present application provides a state detection chip, including a state detection circuit and a baseline determination circuit provided by any of the above embodiments; the state detection circuit is used to determine the state of the detection target based on the difference between the baseline value and the corresponding measurement data.

[0090] Specifically, the above-mentioned state detection chip can refer to Figure 7 As shown, the state detection circuit 400 includes the structures of the various parts of the baseline determination circuit, and also includes a state detection circuit 400. The state detection circuit 400 can receive the difference output by the adder 321 in the baseline determination circuit, and use the pre-stored detection threshold (such as the touch threshold, etc.) to judge the relationship between the difference and the corresponding detection threshold, so as to determine the state between the detection target such as the finger and the electronic device, and output the state to other structures of the electronic device for use by the electronic device. In one example, the state detection chip 400 may include at least one comparator, wherein the number of comparators may match the number of pre-stored detection thresholds, and a comparator is used to compare the relationship between the above difference and the corresponding detection threshold. For example, if the state detection chip 400 includes a sixth comparator corresponding to the touch threshold, the sixth comparator detects the relationship between the corresponding difference and the touch threshold at each sampling moment, and when the difference is greater than the touch threshold, it can be determined that the state of the detection target at the corresponding sampling moment is a touch state.

[0091] In one embodiment, the state detection circuit is further used to detect the touch state of the detection target according to the relationship between the difference and the touch threshold. The touch threshold can be determined based on factors such as the characteristics of the detection target and / or the characteristics of the corresponding sensor. In one example, the state detection circuit can determine that the detection target is in a touch state when the difference is greater than the touch threshold, so as to improve the detection efficiency of the touch state; in another example, the state detection circuit can also determine that the detection target is in a touch state when the number of times the difference is continuously detected to be greater than the touch threshold reaches a second anti-shake number, so as to improve the stability of the detection result.

[0092] Furthermore, the state detection circuit is also used to release the touch state according to the relationship between the difference and the release threshold; the release threshold is less than or equal to the touch threshold, for example, the release threshold can be a proportional value of 3 / 4 of the touch threshold. In one example, the state detection circuit can release the touch state corresponding to the detection target when the difference is less than the touch threshold to improve the release efficiency; in another example, the state detection circuit can also release the touch state corresponding to the detection target when the number of times the difference is detected to be less than the touch threshold reaches a third anti-shake number to improve the effectiveness of the release operation.

[0093] The above state detection chip uses the baseline determination circuit provided by any of the above embodiments to determine the baseline value at each sampling moment, which has low power consumption and high efficiency, and the detection performance is effectively improved.

[0094] A fourth aspect of the present application provides an electronic device, comprising a status detection chip provided by any of the above embodiments.

[0095] Specifically, refer to Figure 8 As shown, the electronic device may include a state detection chip 600 and a sensor 710. The sensor 710 may be a capacitive sensor or the like for detecting the state between a detection target such as a finger and the electronic device.

[0096] The above-mentioned electronic devices may include smart phones, smart watches, sports bracelets and other types of devices that need to detect the status between the electronic device and the corresponding detection target. They use the status detection chip provided by any of the above-mentioned embodiments to detect the status between the electronic device and the detection target, which has the advantages of low power consumption and high operating efficiency.

[0097] Although the present application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on reading and understanding of this specification and the accompanying drawings. The present application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components, the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (e.g., it is functionally equivalent), even if it is not structurally equivalent to the disclosed structure that performs the functions in the exemplary implementation of this specification shown herein.

[0098] That is, the above description is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, such as the mutual combination of technical features between the embodiments, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

[0099] In addition, for structural elements with the same or similar characteristics, the present application may use the same or different reference numerals for identification. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0100] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or more advantageous than other embodiments. In order to enable any technician in the field to implement and use the present application, the present application provides the above description. In the above description, various details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other embodiments, well-known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.

Claims

1. A baseline determination circuit, characterized in that: include: A count value updating module, used for updating the tracking count value according to the magnitude relationship between the measurement data and the baseline value; The tracking count value is used to characterize the frequency level of the measurement data on each side of the baseline value; A baseline value updating module, configured to determine a baseline value according to a relationship between the tracking count value and at least one count threshold; The count value update module includes a first comparator, a step value selector and a tracking counter; the first input end of the first comparator is connected to the measurement data, the second input end is connected to the baseline value, and the output end is connected to the control end of the step value selector; the first input end of the step value selector is connected to a negative step value, the second input end is connected to a positive step value, and the output end is connected to the tracking counter.

2. The baseline determination circuit according to claim 1, characterized in that The first comparator is used to compare the measurement data with the baseline value, and output a first comparison result to the step value selector; The step value selector is used to select the negative step value or the positive step value according to the first comparison result and output it to the tracking counter; the tracking counter is used to accumulate the negative step value or the positive step value with the tracking count value at the previous sampling moment to update the tracking count value.

3. The baseline determination circuit according to claim 1, characterized in that The baseline value updating module includes a comparison unit and a baseline value tracking unit; The comparison unit is used to compare the relationship between the tracking count value and each counting threshold value, and output the comparison result to the baseline value tracking unit; the baseline value tracking unit is used to track the baseline value at the previous sampling moment according to the comparison result.

4. The baseline determination circuit according to claim 3, characterized in that: The counting threshold comprises a first threshold and a second threshold which is smaller than the first threshold; the comparing unit comprises a second comparator and a third comparator; the baseline value tracking unit comprises a tracking selector and an accumulator; The first input terminal of the second comparator is connected to the first threshold value, the second input terminal is connected to the output terminal of the count value update module, and the output terminal is connected to the first control terminal of the tracking selector; the first input terminal of the third comparator is connected to the second threshold value, the second input terminal is connected to the output terminal of the count value update module, and the output terminal is connected to the second control terminal of the tracking selector; the first input terminal of the tracking selector is connected to the horizontal tracking parameter, the second input terminal is connected to the positive tracking parameter, the third input terminal is connected to the negative tracking parameter, and the output terminal is connected to the accumulator; wherein the horizontal tracking parameter is used to track the baseline value horizontally, the positive tracking parameter is used to track the baseline value upward, and the negative tracking parameter is used to track the baseline value downward; The tracking selector is used to output the positive tracking parameter to the accumulator when the tracking count value is greater than the first threshold value, so that the accumulator superimposes the positive tracking parameter on the baseline value at the previous sampling moment; when the tracking count value is less than or equal to the first threshold value and greater than or equal to the second threshold value, output the horizontal tracking parameter to the accumulator, so that the accumulator superimposes the horizontal tracking parameter on the baseline value at the previous sampling moment; when the tracking count value is less than the second threshold value, output the negative tracking parameter to the accumulator, so that the accumulator superimposes the negative tracking parameter on the baseline value at the previous sampling moment.

5. The baseline determination circuit according to claim 1, characterized in that: It also includes an initialization selector and an average processing unit; the first input end of the initialization selector is connected to the output end of the baseline value update module, and the second input end is connected to the output end of the average processing unit; the input end of the average processing unit is connected to the measurement data; The averaging processing unit is used to obtain the average value of the measurement data and output the average value to the initialization selector; the initialization selector is used to select the average value output by the averaging processing unit as the initial baseline value at the baseline initialization time.

6. The baseline determination circuit according to claim 5, characterized in that The baseline initialization timing includes a power-on timing, a reset timing and / or a touch status detection function start timing.

7. The baseline determination circuit according to claim 1, characterized in that: Also including an adder, a fourth comparator and a freeze selector; The first input terminal of the adder is connected to the output terminal of the freeze selector, the second input terminal is connected to the measurement data, and the output terminal is connected to the first input terminal of the fourth comparator; the second input terminal of the fourth comparator is connected to the freeze threshold, and the output terminal is connected to the control terminal of the freeze selector; the first input terminal of the freeze selector is connected to the output terminal of the baseline value update module; The freeze selector is used to freeze the baseline value upon receiving a freeze signal; The adder is used to calculate the difference between the baseline value output by the freeze selector and the corresponding measurement data; the fourth comparator is used to output a freeze signal when the difference is greater than the freeze threshold.

8. The baseline determination circuit according to claim 7, characterized in that: Also includes an abnormality judgment unit and an abnormality selector; The first input end of the abnormality judgment unit is connected to the output end of the adder, the second input end is connected to the abnormal threshold, the third input end is connected to the first anti-shake number, and the output end is connected to the control end of the abnormality selector; the first input end of the abnormality selector is connected to the output end of the baseline value update module, the second input end is connected to the access end of the measurement data, and the output end is connected to the input end of the freeze selector; The abnormality judgment unit is used to output an abnormality signal according to the difference, the abnormality threshold and the first anti-shake number; the abnormality selector is used to select the measurement data as the baseline value of the current sampling moment when receiving the abnormality signal.

9. A baseline determination method, characterized in that: The baseline determination circuit as claimed in any one of claims 1 to 8, comprising: Update the tracking count value according to the magnitude relationship between the measurement data and the baseline value; the tracking count value is used to characterize the number level of the measurement data on each side of the baseline value; A baseline value is determined based on a relationship between the tracked count value and at least one count threshold.

10. The baseline determination method according to claim 9, characterized in that: The updating of the tracking count value according to the magnitude relationship between the measurement data and the baseline value comprises: If the measurement data is greater than the baseline value, the tracking count value is increased by a step value; if the measurement data is less than or equal to the baseline value, the tracking count value is reduced by a step value.

11. The baseline determination method according to claim 9, characterized in that: The counting threshold comprises a first threshold and a second threshold which is smaller than the first threshold; and determining the baseline value according to the relationship between the tracking counting value and at least one counting threshold comprises: If the tracking count value is greater than the first threshold, the baseline value is updated by tracking the baseline value upward; if the tracking count value is less than or equal to the first threshold and greater than or equal to the second threshold, the baseline value is kept unchanged; if the tracking count value is less than the second threshold, the baseline value is updated by tracking the baseline value downward.

12. The baseline determination method according to claim 9, characterized in that: Also includes: When initializing the baseline, the average value of the measurement data is selected as the initial baseline value.

13. The baseline determination method according to claim 12, characterized in that: The baseline initialization timing includes a power-on timing, a reset timing and / or a touch status detection function start timing.

14. The baseline determination method according to claim 9, characterized in that: Also includes: The difference between the baseline value at the current sampling moment and the corresponding measurement data is obtained, and the baseline value is frozen when the difference is greater than a freezing threshold.

15. The baseline determination method according to claim 14, characterized in that: Also includes: An abnormal state is identified according to the difference and the first anti-shake number, and in the abnormal state, the measurement data is used as a baseline value at a current sampling moment.

16. A state detection chip, characterized in that: It comprises a state detection circuit and a baseline determination circuit as described in any one of claims 1 to 8; the state detection circuit is used to judge the state of the detection target according to the difference between the baseline value and the corresponding measurement data.

17. The state detection chip according to claim 16, characterized in that: The state detection circuit is further configured to detect the touch state of the detection target according to the relationship between the difference and the touch threshold.

18. The state detection chip according to claim 17, characterized in that: The state detection circuit is further configured to release the touch state according to a relationship between the difference and a release threshold; the release threshold is less than or equal to the touch threshold.

19. An electronic device, characterized in that: A state detection chip comprising any one of claims 16 to 18.