# Patent

## Title
Baseline capacitance calibration

## Abstract

An embodiment of the invention provides a method of creating a statistical model of a baseline capacitance CP of a capacitive sensor located on a capacitive-touch screen. A sensed capacitance CS of a capacitive sensor is measured during a particular state of the electronic device that includes the capacitive-touch screen. When physical contact is not made with the capacitive sensor, the sensed capacitance CS is stored as a baseline capacitance CP. The baseline capacitance CP is then used to create the statistical model for that particular state of the electronic device. When physical contact is made with the capacitive sensor, the value of the baseline capacitance CP of the capacitive sensor is subtracted from the value of the sensed capacitance CS and the result, CF=(CS−CP), is sent to a touch detection circuit.

## Background
BACKGROUND
The popularity of capacitive-touch screens has been increasing since the introduction of smart phones and tablet PCs (personal computers). Capacitive-touch screens are becoming larger in size and there is an increasing demand on the responsiveness, resolution and intelligence of these screens.
A capacitive-touch screen is usually composed of an array of capacitance sensors (also called nodes) where each capacitance sensor 100 (see FIG. 1) contains an electrical parasitic capacitance CP (referred to as baseline capacitance thereafter). Making physical contact (e.g. a finger touch) with a capacitance sensor 100 will add a second capacitance CF (referred to as foreground capacitance thereafter) in parallel with CP such that the overall sensed capacitance CS developed for a touched sensor is CF+CP. Ideally, after measurement and calibration, the foreground capacitance CF can be extracted from the sensed capacitance CS (i.e. CF=CS−CP).
Contact with a capacitance sensor 100 can be detected when the calibrated foreground capacitance CF on specific node(s) is greater than a pre-determined threshold. Because the baseline capacitance CP of each individual capacitance sensor 100 on a capacitive-touch screen can be different from each other, the calculated foreground capacitance CF of each individual capacitance sensor 100 may be different, making it more difficult to sense when contact has been made. These differences in baseline capacitance CP may be caused, for example, by variances in the layout of the circuitry used to create a capacitance sensor or they may be caused by manufacturing variances in the process used to make a capacitive-touch screen.
In addition, the calculated foreground capacitance CF of a capacitance sensor is dependent on the operating state of the electronic device that contains a capacitive-touch screen. For example, the baseline capacitance CP can be different when a cellular phone is plugged in for charging versus when making a phone call. The capacitance CF may also change as the device ages or due to environmental effects. Other electronic device that use a capacitive-touch screen include a hand-held personal computer, a tablet personal computer, a portable personal computer, a monitor and a television.
An accurate calibration of baseline capacitance CP is useful for the accurate detection of contact made with a capacitive-touch screen.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a diagram showing a cross-section of a sensor on a capacitive-touch screen along with capacitances on the capacitive-touch screen. (Prior Art)
FIG. 2 is a layout of a capacitive-touch screen indicating the locations of the capacitive sensors. (Prior Art)
FIG. 3 is a graph of change in capacitance in a sensor as result of two fingers making contact with a capacitive-touch screen. (Prior Art)
FIG. 4a is a schematic diagram of a voltage source charging a capacitor. (Prior Art)
FIG. 4b is a schematic diagram of a charged capacitor and an uncharged capacitor. (Prior Art)
FIG. 4c is a schematic diagram of a charge being transferred from one capacitor to another capacitor. (Prior Art)
FIG. 5 is a schematic diagram of a charge transfer circuit. (Prior Art)
FIG. 6 is a block diagram of an off-line baseline capacitance statistics identification circuit according to an embodiment of the invention.
FIG. 7 is a block diagram of an on-line baseline capacitance calibration circuit according to an embodiment of the invention.
FIG. 8 is a graph of baseline capacitance CS as function of time and the state of a cellular phone according to an embodiment of the invention.
FIG. 9 is a flow chart illustrating a method of determining a statistical model of a baseline capacitance CP of a capacitive sensor on a capacitive-touch screen.



DETAILED DESCRIPTION
The drawings and description, in general, disclose a method and apparatus of determining a statistical model of a baseline capacitance CP of a capacitive sensor located on a capacitive-touch screen of an electronic device (e.g. cellular phone). The sensed capacitance CS of the capacitive sensor is measured during a particular state of the electronic device (e.g. while a cellular phone is charging). When physical contact (e.g. a finger touching the screen) is not made with the capacitive sensor, the sensed capacitance CS is stored as a baseline capacitance CP. The baseline capacitance CP is then used to create the statistical model for that particular state of the electronic device.
When physical contact is made with the capacitive sensor, the value of the baseline capacitance CP of the capacitive sensor is subtracted from the value of the sensed capacitance CS and the result CF=(CS−CP) is sent to a touch detection circuit. When no touch is detected, CF is used to update the model. This procedure is repeated for each capacitive sensor on the capacitive-touch screen until a statistical model of each sensed capacitance CS has been determined. The statistical model of each capacitive sensor is then used to more accurately detect when physical contact is made with a capacitive-touch screen.
FIG. 1 is a diagram showing a cross-section of a sensor 112 on a capacitive-touch screen 100. Two layers of indium tin dioxide (ITO) electrodes 102 and 104 are laid over an LCD screen 108. A layer of dielectric material (e.g. plastic or pyrex glass) 106 is located between the two layers of electrodes 102 and 104. The baseline capacitance CP and the foreground capacitance CF are also shown.
Consider a capacitive-touch screen as show in FIG. 2 with M row electrodes RE[0]-RE[M−1] and N column electrodes CE[0]-CE[N−1]. The capacitive-touch screen shown in FIG. 2 has M×N capacitive sensors S0,0-S[M-1],[N-1] (nodes) where each sensor has a baseline capacitance CP at the intersection of each column and row electrode. The intersection of each column and row electrode is denoted with a dashed square in FIG. 2. At the intersection of column and row electrodes, electrodes are not directly connected (i.e. they are not shorted to each other). A finger 110 (other objects other than a finger may be used such as a stylus) close to a sensor shunts a portion of the electrical field to ground, which is equivalent to adding a foreground capacitance CF in parallel with CP. Therefore, the sensed capacitance on the node becomes:

CS=CP+CF  equ. 1)

Each sensor S0,0-S[M-1],[N-1] on the capacitive-touch screen 200 can be viewed as a pixel in an image. After calibrating the baseline capacitance CP out of CS, the remaining foreground capacitance CF on each node effectively constitutes a two dimensional image of touches or contact made with the capacitive-touch screen 200. Touches may be detected as peaks in the image with properties such as finger size, shape, orientation and pressure as reflected in the shapes of the peaks.
FIG. 3 is a graph of change in capacitance on a sensor as result of two fingers making contact with a capacitive-touch screen. FIG. 3 illustrates that the capacitance of a sensor changes where contact is made with the two fingers (i.e. active nodes). In this example, the number of untouched sensors (i.e. inactive nodes) is significantly greater than the number of touched sensors (i.e. active nodes).
FIGS. 4a-4c are schematic diagrams of a charge transfer technique. As shown in FIGS. 4a-4c, charge transfer is realized in two stages: the pre-charge stage and the transfer stage. In the pre-charge stage as shown in FIG. 4a, the capacitor C is charged with a known voltage source Vdrive such that in the steady state the charge Q is equal to Q=(Vdrive*C) as shown in FIG. 4b. In the transfer stage, FIG. 4c, a reference capacitor Cref is connected in parallel with C such that charge on C is transferred onto Cref. The voltage on Cref is Vsense. According to law of conservation of total charge, we have:

Vdrive*C=Vsense(C+Cref)  equ. 2)

which can be rearranged as:

Vsense=C/(C+Cref)*Vdrive  equ. 3)

In this case because Cref>>C, we have:

Vsense=(C/Cref)*Vdrive  equ. 4)

Equation 4 makes it possible to estimate the capacitance of a sensor C as a proportional relationship between the drive voltage Vdrive, the sense voltage Vsense and reference capacitance Cref. In an embodiment of the invention, this relationship is used, along with others, to determine where contact is made on a capacitive-touch screen.
An alternative method for using charge transfer to determine the capacitance of a sensor is shown in FIG. 5. An operational amplifier 502 is utilized and the polarity of Vsense is inverted. This method for using charge transfer to determine the capacitance of a sensor also provides a proportionality relationship between the drive voltage Vdrive, the sense voltage Vsense and capacitance C:

Vsense=gCVdrive wherein g is a constant.  equ. 5)

FIG. 6 is a block diagram of an off-line baseline capacitance statistics identification circuit according to an embodiment of the invention. In this embodiment, the off-line baseline capacitance statistics identification circuit 602 measures the sensed capacitance CS of a capacitive sensor when no physical contact is made with the capacitive sensor. Because no physical contact is made with the capacitive sensor, the sensed capacitance CS is equal to the baseline capacitance CP. The value of the baseline capacitance CP is output to create baseline capacitance CP statistical information.
In this embodiment of the invention, the baseline capacitance CP statistical information is calculated for each capacitive sensor on the capacitive-touch screen. In addition, capacitance CP statistical information is calculated for each capacitive sensor for all possible states that the electronic device may operate in. For example, baseline capacitance CP statistical information of an electronic device (e.g. a cellular phone) may be determined during charging of the device. In another example, baseline capacitance CP statistical information of an electronic device (e.g. a cellular phone) may be determined during a phone call with the phone close to a human face. In a further example, baseline capacitance CP statistical information of an electronic device (e.g. a cellular phone) may be determined during a phone call where the phone is reasonably distant from a human face.
In one embodiment of the invention, the off-line baseline capacitance statistics identification circuit creates a Gaussian mixture model of the baseline capacitance CP for each individual sensor on the capacitive-touch screen. A Gaussian mixture model includes means, deviations and weights of the baseline capacitance associated with each individual sensor. However, other statistical models may be used to characterize the baseline capacitance CP.
In another embodiment of the invention, an on-line baseline capacitance calibration circuit 702 as shown in FIG. 7 removes the baseline capacitance CP from the sensed capacitance CS and updates the baseline capacitance CP for each capacitive sensor. The sensed capacitance CS is compared with the baseline capacitance statistics 706 obtained from the off-line baseline capacitance statistics identification circuit 602. If the current capacitance measurement is classified as baseline capacitance CP (i.e. there is no physical contact with the capacitive sensor), the background/foreground capacitance classifier 704 will not output foreground capacitance CF to a touch-detection circuit. Instead, the current sensed capacitance CS is saved as baseline capacitance CP and the baseline capacitance statistics 706 are updated. When the sensed capacitance CS is classified as foreground capacitance CF (i.e. physical contact is made with the capacitive sensor), the foreground capacitance CF is output to a touch-detection circuit.
FIG. 8 is a graph of baseline capacitance CS as function of time and the state of a cellular phone according to an embodiment of the invention. In this example, a cellular phone is in the state of being charged from 0 second to approximately 120 seconds. The sensed capacitance CS is approximately 100 pico-farads (pF) when no contact 802 is made with the capacitive sensor. As a consequence, the background/foreground capacitance classifier 704 will not output foreground capacitance CF to a touch-detection circuit. Instead, the current sensed capacitance CS is saved as baseline capacitance CP and the baseline capacitance statistics 706 are updated.
When the cellular phone is in the state of being charged and physical contact 804 is made with the capacitive sensor, the sensed capacitance CS is approximately 108 pico-farads (pF) at its peak. Because physical contact is made with the capacitive sensor, the background/foreground capacitance classifier 704 will output the sensed capacitance CS as foreground capacitance CF to a touch-detection circuit. In this case the background model is not updated.
Also in this example, a cellular phone is in the state of being used to make a phone call from 120 seconds to 350 seconds. At one point during this time, the sensed capacitance CS is approximately 110 pico-farads (pF) when no contact 802 is made with the capacitive sensor. As a consequence, the background/foreground capacitance classifier 704 will not output foreground capacitance CF to the touch-detection circuit. Instead, the current sensed capacitance CS is saved as baseline capacitance CP and the baseline capacitance statistics 706 are updated.
When the cellular phone is in the state of being used to make a phone call and physical contact 804 is made with the capacitive sensor, the sensed capacitance CS is approximately 118 pico-farads (pF) at its peak. Because physical contact is made with the capacitive sensor, the background/foreground capacitance classifier 704 will output the sensed capacitance CS as foreground capacitance CF to a touch-detection circuit.
In this example, baseline capacitance CP statistics for an individual capacitive sensor are stored for each state; the charging time state and the phone call time state. As shown in FIG. 8, for each sensor, the background/foreground capacitance classifier 704 collects and updates baseline capacitance CP statistics during touch-free (i.e. no physical contact) time and stops the update when a touch is detected on that sensor. Looking from the perspective of the capacitive-touch screen, baseline capacitance calibration is undergone for those capacitive sensors that are away from the locations where contact is made and stopped for those nodes that are close to where contact is made.
Because CF is only output when contact is made, the touch detection circuit is triggered less frequently and as a result reduces power consumption on the electronic device. In addition, since this embodiment of the invention stops updating the baseline capacitance CS information when contact is made with the capacitive sensor, the capacitance induced by persistent contact will not be classified as baseline capacitance CP.
Baseline capacitance CP statistics are obtained for all of the capacitive sensors on the capacitive-touch screen during these states. The statistics stored, for example, may be a Gaussian mixture model. A Gaussian mixture model includes means, deviations and weights of the baseline capacitance CP for each capacitive sensor during every state the electronic device is used in. Because statistical information may be collected for each capacitive sensor on the capacitive-touch screen during the lifetime of the electronic device, aging, operational and environmental variations in the baseline capacitance CP may accounted for in a real time manner.
FIG. 9 is a flow chart illustrating a method of determining a statistical model of a baseline capacitance CP of a capacitive sensor on a capacitive-touch screen. In this embodiment, the sensed capacitance CS of a capacitive sensor on a capacitive-touch screen is measured 902. Next, the operating state of the electronic device (e.g. a cellular phone) is determined 904. The operating state may be when the electronic device is being charged for example or the state may be when a phone conversation is being held on the electronic device. After the state of the electronic device is determined, the method determines whether physical contact (e.g. touched) is made with a capacitive sensor 906.
When no physical contact is made with the capacitive sensor, the value of the measured sensed capacitance CS is stored as a baseline capacitance CP 908. This baseline capacitance CP is used with other previously stored baseline capacitances CP to create a statistical model of the baseline capacitance CP for a particular capacitive sensor. After the current baseline capacitance CP is stored, the method begins at the start 902 by measuring the sensed capacitance CS of the capacitive sensor or begins measuring the sensed capacitance CS of another capacitive sensor.
When physical contact is made with the capacitive sensor, the value of a baseline capacitance CP is subtracted from the measured sensed capacitance CS giving a foreground capacitance CF where CF=CS−CP as shown in step 910. The foreground capacitance CF is then sent to a touch detection circuit as shown in step 912. After the foreground capacitance CF is sent to the touch detection circuit, the method begins at the start 902 by measuring the sensed capacitance CS of the capacitive sensor or begins measuring the sensed capacitance CS of another capacitive sensor.
The foregoing description has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and other modifications and variations may be possible in light of the above teachings. The embodiments were chosen and described in order to best explain the applicable principles and their practical application to thereby enable others skilled in the art to best utilize various embodiments and various modifications as are suited to the particular use contemplated. It is intended that the appended claims be construed to include other alternative embodiments except insofar as limited by the prior art.

## Claims

1. A non-transitory machine-implemented method of determining a statistical model of a baseline capacitance CP comprising:
measuring a sensed capacitance CS of a capacitive sensor wherein the capacitive sensor is located on a capacitive-touch screen; wherein the capacitive touch screen is located on an electronic device;
determining the state of the electronic device;
storing the value of the sensed capacitance CS as a baseline capacitance CP based on the state of the electronic device when physical contact is not made with the capacitive sensor;
repeating the previous steps;
wherein the statistical model for the baseline capacitance Cp is a Gaussian mixture model.

2. A non-transitory machine-implemented method of determining a statistical model of a baseline capacitance CP comprising:
measuring a sensed capacitance CS of a capacitive sensor wherein the capacitive sensor is located on a capacitive-touch screen; wherein the capacitive touch screen is located on an electronic device;
determining the state of the electronic device;
storing the value of the sensed capacitance CS as a baseline capacitance CP based on the state of the electronic device when physical contact is not made with the capacitive sensor;
repeating the previous steps;
wherein the statistical model of a baseline capacitance CP is calculated during manufacture of the electronic device.

3. The method of claim 2 wherein the statistical model of a baseline capacitance CP is recalculated during operation of the electronic device.

4. A non-transitory machine-implemented method of creating a statistical model of a baseline capacitance CP comprising:
measuring a sensed capacitance CS of a capacitive sensor wherein the capacitive sensor is located on a capacitive-touch screen; wherein the capacitive touch screen is located on an electronic device;
determining the state of the electronic device;
storing the value of the sensed capacitance CS as a baseline capacitance CP based on the state of the electronic device when physical contact is not made with the capacitive sensor;
subtracting the value of the baseline capacitance CP of the capacitive sensor from the value of the sensed capacitance CS and sending the result CF=(CS−CP) to a touch detection circuit when physical contact is made with the capacitive sensor;
repeating the previous steps;
wherein the statistical model for the baseline capacitance CP is a Gaussian mixture model.

5. A non-transitory machine-implemented method of creating a statistical model of a baseline capacitance CP comprising:
measuring a sensed capacitance CS of a capacitive sensor wherein the capacitive sensor is located on a capacitive-touch screen; wherein the capacitive touch screen is located on an electronic device;
determining the state of the electronic device;
storing the value of the sensed capacitance CS as a baseline capacitance CP based on the state of the electronic device when physical contact is not made with the capacitive sensor;
subtracting the value of the baseline capacitance CP of the capacitive sensor from the value of the sensed capacitance CS and sending the result CF=(CS−CP) to a touch detection circuit when physical contact is made with the capacitive sensor;
repeating the previous steps;
wherein the statistical model of a baseline capacitance CP is calculated during manufacture of the electronic device.

6. The method of claim 5 wherein the statistical model of a baseline capacitance CP is recalculated during operation of the electronic device.

7. An apparatus for determining a statistical model of a baseline capacitance CP comprising:
a capacitance classifier circuit, the capacitance classifier circuit having a first input, a second input, a first output and a second output;
a baseline capacitance statistical circuit, the baseline capacitance statistical circuit having an input connected to the first output of the capacitance classifier circuit and an output connected to the second input of the capacitance classifier circuit;
wherein the value of a sensed capacitance CS of a capacitive sensor on a capacitive-touch screen on an electronic device is sensed by the first input of the capacitance classifier circuit;
wherein the state of the electronic device is determined by the capacitance classifier circuit;
wherein when no physical contact is made with the capacitive sensor, the value of the sensed capacitance CS is sent from the first output of the capacitance classifier circuit to the input of the baseline capacitance statistical circuit wherein the sensed capacitance CS is stored in the baseline capacitance statistical circuit to update the baseline capacitance CP determined during the state of the electronic device;
wherein when physical contact is made with the capacitive sensor, the value of the baseline capacitance CP of the capacitive sensor is subtracted from the value of the sensed capacitance CS and the result CF (CS−CP), is sent from the second output of the capacitance classifier circuit to a touch detection circuit;
wherein the statistical model for the baseline capacitance CP is a Gaussian mixture model.

8. An apparatus for determining a statistical model of a baseline capacitance CP comprising:
a capacitance classifier circuit, the capacitance classifier circuit having a first input, a second input, a first output and a second output;
a baseline capacitance statistical circuit, the baseline capacitance statistical circuit having an input connected to the first output of the capacitance classifier circuit and an output connected to the second input of the capacitance classifier circuit;
wherein the value of a sensed capacitance CS of a capacitive sensor on a capacitive-touch screen on an electronic device is sensed by the first input of the capacitance classifier circuit;
wherein the state of the electronic device is determined by the capacitance classifier circuit;
wherein when no physical contact is made with the capacitive sensor, the value of the sensed capacitance CS is sent from the first output of the capacitance classifier circuit to the input of the baseline capacitance statistical circuit wherein the sensed capacitance CS is stored in the baseline capacitance statistical circuit to update the baseline capacitance CP determined during the state of the electronic device;
wherein when physical contact is made with the capacitive sensor, the value of the baseline capacitance CP of the capacitive sensor is subtracted from the value of the sensed capacitance CS and the result CF (CS−CP), is sent from the second output of the capacitance classifier circuit to a touch detection circuit;
wherein the statistical model of a baseline capacitance CP is calculated during manufacture of the electronic device.