Finger and stylus discrimination scheme based on capacitive touch screen panel and support vector machine classifier

This paper demonstrates a support vector machine (SVM) based capacitive touch screen scheme that can discriminate stylus and finger at the same time. The tip of a stylus provides pulses at the higher frequency than the transmitting (Tx) pulse of a touch screen. Then the digital value acquired from an analog-to-digital converter is transferred to an SVM classifier to make the decision of which touch is applied among no-touch, finger-touch, and stylus-touch. Three types of touches are processed on the SVM algorithm. The proposed method is evaluated by means of an 8 inch capacitive touch panel, connector board, Tx/Rx driver board, and host processor board. While Tx pulses are applied at 5 V and 32 kHz that lead to the 200 Hz reporting rate, stylus pulses are produced at 3 V and 315 kHz. The resultant bit error rate is measured as less than 10−6 for all types of touches.


Introduction
The demands for comfortable and intuitive input methods have been continuously increasing in various devices. Especially, highly durable, sensitive, and multi-touch capable mutual capacitive touch screens have been widely applied to a variety of consumer devices such as smartphones, tablet personal computers, laptop computers, and monitors. [1][2][3][4] As shown in Fig. 1, a conventional mutual capacitive touch screen panel (TSP) consists of transmitting (Tx) electrodes and receiving (Rx) electrodes which form some mutual capacitors at their intersection areas. 5,6) Excitation drivers send Tx pulses sequentially that are transferred to charge amplifiers connected to Rx lines through mutual capacitors. These charge amplifier circuits with the connection to a reference voltage (V REF ) convert magnitudes of the mutual capacitance into analog voltages. When a finger is touched on the screen, the reduced mutual capacitance is detected as the different output voltage of the charge amplifier from the voltage level without any touches. By and large, to increase the precision of the touch determination, the charge amplifier accumulates the output voltages over multiple Tx pulses. In addition, a multiplexer allows one analog-to-digital converter (ADC) to sample Rx signals sequentially. The digital data are transferred to a host processor to determine the touch positions. The host processor also plays a role to control excitation drivers.
There have been two mainstream TSP researches of improving signal-to-noise ratio (SNR) and adding another input tool such as a stylus except for fingers. Because the sensing performance of TSP is very dependent of SNR at the receiver side, display noises, charger noises, and hum noises should be got to grips with. One of SNR improving technologies is a differential sensing method that cancels out common-mode noises. [7][8][9][10][11] Generally, the adjacent capacitances between the TSP and the display panel are approximately the same. Because it can be assumed that the display noise injected between Rx lines are identical, the differential sensing method can be applied to the TSP very effectively in eliminating display noise. While the conventional method should sense the whole value of mutual capacitance for each crossing area, the differential scheme makes use of just the difference between adjacent capacitances, allowing to increase the output dynamic range of a charge amplifier.
A time-interleaved sensing method reduce the noise by applying multiple Tx pulses per one touch position, 12,13) but lowers the scan rate inevitably. On the other hand, a codedivision multiple-sensing (CDMS) method has been introduced to increase SNR as well as scan rate. [14][15][16][17] While multiple Tx pulses are used for sensing one touch position like the time-interleaved sensing method, multiple Tx electrodes are excited with orthogonal patterns simultaneously. Then, the touch information over multiple positions can be obtained at the same time through the decoding process. As a result, the CDMS method achieves a much higher scan rate than the time-interleaved sensing method at the same SNR level.
On the other hand, more elaborate input methods than a finger have been studied and developed for handwriting and drawing applications. These needs have been addressed based on the capacitive TSP scheme equivalent to fingertouch sensing or additional TSP technologies. The simplest scheme is a passive stylus whose conductive tip imitates a finger-touch. 18) However, since the contact area must be comparable to that of a finger, it is difficult to fulfill elaborate works. Furthermore, it is impossible to distinguish a stylus from a finger.
Whereas, active stylus schemes can conduct elaborate works with small-sized tips. [19][20][21] The stylus senses a Tx signal from TSP and re-transmits its inverted and amplified signal to TSP via a tip. Thanks to the process of amplifying the sensed Tx signal, it becomes possible to work with much smaller radius tips than the passive stylus. If larger pulses are applied to the tip, the different output voltage from a fingertouch is obtained at charge amplifiers, which enables the stylus to be differentiated from the finger. However, this requires higher voltage at stylus circuits than Tx pulses to make another voltage level of the stylus detection, which leads to the reduced dynamic range and SNR of the finger detection at the fixed input voltage range of the ADC. As another active stylus method, the stylus generates pulses at a different specific frequency from Tx pulses and TSP is implemented with two separate operation modes of sensing circuitries for finger and stylus-touch events. 22) This method can distinguish the stylus from the finger and maintain SNR as well as dynamic range. But the overall increased complexity in circuits and operations is inevitable because two separate sensing processes are required.
The other active stylus can be used in TSPs with multiplefrequency driving. 23) In addition to being able to find the point of contact by applying a fast Fourier transform (FFT), the finger and the stylus can be distinguished because the stylus and TSP lines are driven at different frequencies. However, in order to implement the FFT functionality, Tx signals must be driven at a very high frequency, which leads to the increased power consumption and hardware complexity.
While previous passive and active ways are grounded in the capacitive TSP, there is a stylus with a different approach that works with an electro-magnetic resonance (EMR) technology. 24) Since EMR responds only to the stylus and the capacitive TSP senses only the finger, two separate touch sensing schemes enable the finger to be distinguished from the stylus. However, this technique needs additional layers that increase hardware complexity as well as manufacturing cost.
This paper presents a capacitive TSP method that can discriminate stylus and finger without adding any layers, increasing operation modes, and reducing dynamic range of the finger-touch detection. Especially, this discrimination is accomplished by the common platform of a support vector machine (SVM) classifier. 25)

Proposed SVM-based capacitive TSP
Three kinds of capacitive TSP systems including finger-only touch, conventional active stylus-touch, and proposed active stylus-touch are depicted in Fig. 2. C M is a mutual capacitor that is created at the crossing area of Tx and Rx lines and arrows represent the directions of electric fields. For the finger-only touch, because some amount of electric field is taken by the finger, the smaller amount of charges is transferred through C M to Rx than that without any finger touches. C F is the parasitic capacitor between Rx line and finger. Whereas, the conventional active stylus senses Tx pulses (V Tx ) and re-transmits their inverted and amplified pulses (V TIP ) to the TSP. These output pulses of reverse polarities to Tx pulses provide opposite charges via the capacitor (C ST ) between the stylus' tip and Rx lines, showing similar effects to finger touches.
While the cross-sectional view of a proposed active stylus scheme is the exactly same as the conventional one, the proposed one gives rise to the higher frequency of V TIP than V Tx . This enables the proposed TSP to discriminate between finger and stylus-touches without the enlarged voltage swing of the stylus output. Unlike the conventional TSP approaches that sense the touch events based on a fixed threshold level, the proposed system thinks of the touch event as a sequence of data samples produced by the ADC for three cases of notouch, finger-touch, and stylus-touch presented in Fig. 3. In a no-touch case, data samples are obtained at one level with some amount of noises. A finger-touch also generates data samples of one different value from the no-touch. However, the stylus-touch causes the fluctuation on the data sequence due to the higher frequency of V TIP than V Tx . These three cases are explained in more detail along with each charge amplifier circuit schematic.
The no-touch case is simplified into Fig. 4(a) that consists of C M , a feedback capacitor (C FB ), a reset switch (RST) and an operational amplifier (OP-AMP). As shown in Fig. 4(b), The finger-touch case is expressed with the reduced capacitance of C M by ΔC M as shown in Fig. 5(a). Since C F is created between Rx line and finger, there are no effects on V OUT . Therefore, the voltage gain ( V OUT FT D -/ΔV Tx ) gets smaller as shown in Eq. (2). V OUT FT D is settled at the smaller level than V OUT NT D of the no-touch state as depicted in Fig. 5 Unlike two previous touch cases, a proposed stylus-touch can be modeled by adding a capacitor (C ST ) between stylus and Rx line as presented in Fig. 6(a). It is assumed that as the radius of a tip is small enough, there is no reduction on the mutual capacitance. V TIP has a higher frequency than V Tx to generate ripples of ΔV ST on V OUT during the sensing period as illustrated in Fig. 6 Especially, V TIP is supported as free running pulses at a higher frequency than Tx pulses only when V Tx is asserted at the high level. When V OUT is sampled by the following ADC and the frequencies of V Tx and V TIP have no relationship of a factor of an integer, the data sequence of the stylus-touch shows the fluctuation unlike the constant data sequences of notouch and finger-touch as shown in Fig. 8. Therefore, the stylus can be detected without any additional voltage levels,  maintaining the dynamic range of the finger-touch detection.
The data sequence of K samples is transferred to the host processor where the received sequence is classified into one of three touch cases by means of the SVM algorithm. SVM is one of the most commonly used machine learning algorithms for classification. SVM focuses on the problem to find the decision boundary for dividing the space with respect to the margin maximization. 26) The margin is defined as the minimum distance between the boundary and any of samples. Therefore, it requires only the small portion of samples that are close to the boundary, that is, the support vectors. The high dimension space has the hyperplane boundaries. Furthermore, SVM can have the nonlinear hyperplane boundaries with various kernel functions such as polynomial and Gaussian. Groups of data can be classified by finding a subset of data points called support vectors so that the distance between two groups of data points is maximized comparing the distance between these support vectors. 27) Because SVM usually achieve higher performance compared to other classification methods, we used a SVM classifier to discriminate three touch states. No-touch and finger-touch lead to features of different constant value from each other and the stylus-touch makes features of fluctuating values. Accordingly, three cases are distinguishable. However, since the SVM is basically a two-class algorithm, the one-versusthe-rest method is employed to discriminate three classes as depicted in Fig. 9. After the data sequence is handled by three SVMs from SVM1 to SVM3, the most possible one among them is selected as a final output at a rating block. For example, if a finger is placed on a screen, SVM1 and SVM3 present that samples are not for no-touch and stylus-touch   cases, and SVM2 shows that they are for a finger-touch case. Finally, the classification result is determined as a fingertouch.
As a consequence, the classification for three cases is accomplished by one common SVM algorithm without any modifications in threshold, sensing circuit, and algorithm.

Experimental results
The overall evaluation system consists of 8 inch capacitive touch panel, connector board, Tx/Rx driver board, and host processor board as presented in block diagram and photography of Figs. 10(a) and 10(b). For the touch panel of this evaluation setup, one Tx line is driven and one Rx line is sensed to verify the proposed touch sensing technology. A connector board provides the contact point of a Rx line and includes a level shifter integrated circuit to drive the Tx line at 5 V. 28) A Tx/Rx driver board that is implemented with a programmable system-on-chip evaluation board (Cypress Semiconductor PSoC 5LP) gives rise to Tx pulses of 3.3 V and senses the voltage sequence of a Rx line by means of a charge amplifier with C FB of 3 pF and 8-bit ADC. The mutual capacitance of a cross area between a Tx line and a Rx line is estimated as 1.8 pF from Eq. (1) with C FB of 3 pF, ΔV Tx of 5 V, and measured V OUT NT D of 3 V. The stylus capacitance of a cross area between a tip and a Rx line can also be estimated as 0.4 pF from Eq. (3) with C FB of 3 pF, ΔV TIP of 3 V, and measured ΔV ST of 0.4 V. Through a universal serial bus (USB), the digitally converted data are transferred to a host processor board that runs the SVM algorithm to differentiate three touch modes. A Raspberry Pi board (Raspberry Pi Foundation Raspberry Pi 3) is used as a host processor board.
The number of samples (K ) for SVM is 16 and support vectors are extracted from 3 × 10 6 training data sequences that are 10 6 sequences for each touch case. N Tx and N Rx that are the numbers of Tx and Rx lines are assumed to be 20 and 16, respectively. 28) The frequency of Tx pulses ( f Tx ) is 32 kHz that leads to 100 Hz reporting rate as described in Eq. (4). 32 kHz is determined by considering the maximum data rate that can be supported by the USB modules in PSoC board and Raspberry Pi board. Because the number of Fig. 9. One-versus-the-rest SVM classification scheme for the proposed touch system.  Unlike previous approaches, 8,11,28) the reporting rate of the proposed one is independent of N Rx because all Rx lines are sampled by one ADC of the high sampling rate ( f ADC ) for a Tx pulse. The sampling rate is obtained as Eq. (5) where the factor of 2 is added with consideration of the 50% duty ratio of the Tx pulse. If the higher duty ratio is in use, the resultant smaller factor than 2 can lead to the reduction on the sampling rate. In this evaluation setup, since this evaluation is conducted for one Rx line, the ADC samples the output voltage of the charge amplifier at 32 kHz that is the same frequency as f Tx To emulate a proposed stylus, a tip and a sensing electrode are made of iron nails with a diameter of 5 mm. A PSoC board amplifies the sensed Tx pulses that are used as an input of a NAND gate with the output of a pulse generator to produce the tip voltage. The voltage level at a tip is controlled by a level shifter evaluation board (Maxim Integrated MAX17079) and the frequency was set at 315 kHz, which  To determine the tip voltage level, bit error rates (BERs) for 10 6 sequences are measured over the voltage range from 1 to 6 V as plotted in Fig. 12. Especially, confusion matrices for tip voltages of 1, 2, and 3 V are illustrated in Figs. 13(a)-13(c). The blue areas show the accuracy of the SVM classifier and the remaining areas are the misclassified cases. The values are presented in%. While the low voltage of 1 V misclassifies some stylus-touches and no-touches, the high voltages of 2 V and 3 V achieve very one and zero misclassified cases, respectively. Zero misclassification means less BER than 10 −6 for all three touches. Therefore, 3 V is determined as a tip voltage in this evaluation. In addition to BERs, the decision boundaries are visualized only with two largest principal components in Fig. 14 because the 16-dimensional original data are impossible to visualize. These two principal components are extracted by two largest variance components to approximate a high dimensional space into a low dimensional one in the principal component analysis. 26) Due to the Gaussian kernel function, the nonlinear boundaries are established.
Three measured output waveforms for no-touch, fingertouch, and stylus-touch events are presented in Figs. 15(a)-15(c). The output voltage changes for no-touch and fingertouch are 3 and 2.6 V. In particular, the stylus-touch shows the ripples within 2.6 and 3 V during sensing periods.
As shown in Fig. 16(a), both finger and stylus are put on the screen to verify that the proposed scheme can discriminate two touches. A tack connected to the ground is used as the finger-touch. Two touches are placed on the same Rx line (Rx1) but on different Tx lines (Tx1, Tx2). Figure 16(b) shows measured BERs when the finger and stylus are simultaneously contacted to the screen over the tip voltage of 1-6 V. The similar result to Fig. 12 is achieved. As a consequence, it is ensured that two touch tools of finger and stylus are successfully discriminated by the proposed SVMbased method. This stylus and finger discrimination enables the user-friendly stylus interface such as palm-rejection. Typically, when the user wants to write something with the stylus, the palm of a hand touches the screen of the device. If the touch screen cannot distinguish the stylus from the palmtouch handled as the finger-touch, it would be very inconvenient to use the stylus. On the other hand, our proposed TSP system can support palm-rejection by detecting the stylus and rejecting the palm-touch information at the same time.  On the other hand, to increase the reporting rate further up to 200 Hz, the length of data sequence K should be reduced to 50%. Thus, the tip voltages of a stylus are evaluated again regarding BERs at K of 8. The measured BERs are plotted in Fig. 17, showing that the 200 Hz reporting rate can be established by a similar tip voltage of 3 V for BER <10 6 -.
However, it should be recognized that at a tip voltage of 2 V, the proposed SVM classifier shows higher BER in K of 8 than in K of 16. K is the number of samples that is equal to the dimension of the input data for our SVM classifier. It is wellknown that as the dimensionality of the data increases, the volume of the space increases exponentially. 26) Therefore, the distance between three touch cases in that K-dimensional space becomes more distant as K increases. Consequently, the BER for 8-dimensional samples is higher than for 16-dimensional ones regarding the same environment.

Conclusion
This paper proposes a finger and stylus discrimination scheme that is based on capacitive touch screen technology and an SVM classification algorithm. Unlike previous approaches, because the sequence of samples on Rx lines are classified by SVM, three cases of no-touch, finger-touch, and stylus-touch are discriminated on the common platform without any additional threshold voltage levels. To generate the differentiable sequence for a stylus, the frequency of a tip voltage is set to be higher than Tx pulses. This work supports stylus-touch along with palm-rejection that is the discrimination of stylus and finger, requires no increase in hardware complexity, and maintains dynamic range, compared to conventional finger-only TSPs.