ibrush: writing chinese characters with flashlight …andong/papers/ibrush.pdf · ibrush: writing...

3
iBrush: Writing Chinese Characters with Flashlight and Wireless Sensor Grid Andong Zhan , Shen Li , Wenchang Zhou , Tao Li , Panlong Yang , Xiaobing Wu and Guihai Chen State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China Institute of Communication Engineering, Nanjing, China Abstract—Light is the widely available and pervasive resource in our daily life. Existing research shows that light can be used in localization in wireless sensor networks. Meanwhile, our former work also indicates that wireless sensor networks can track light sources. In this paper, we demonstrate iBrush 1 , a system which allows users to write Chinese characters with a flashlight and a sensor grid. Index Terms—Tracking, Localization, Light Intensity, Wireless Sensor Networks. I. I By using RF signals [1][2], ultrasounds [3][4] and even UWB [5], wireless sensor networks have succeeded in many applications of localization and tracking. However, systems using RF signals suer accuracy fluctuations and systems using ultrasound or UWB need extra hardware. In addition, the iLamp system [6] shows that light, the widely available and pervasive source, can be used in localization. In our pervious work [7], we propose the iTracking system to show how to track lights from a bulb and a flashlight. In this paper, we demonstrate iBrush, a system that allows users to write Chinese characters with flashlight. We obtain the light-intensity-distance mapping with which we can calculate the distance between the sensor and the center of the disk area illuminated by the flashlight. We also draw lines of dierent widths based on the moving speed of flashlight. In our demonstration, players can use an LED flashlight to shine in dierent positions of a 5 × 5 sensor grid, as shown in Fig. 1, so as to write Chinese characters which can be displayed instantly on remote PC where the sink is plugged. Our demonstration bridges modern science and technology with ancient Chinese art. II. S D Our system is composed of four main parts: (1) intensity- distance mapping, (2) central location calculation, (3) width setup, and (4) real-time updating. When a user uses a flashlight facing a sensor grid, the light disk may cover several sensors. The goal of the first part is to obtain the distance from an irradiated sensor to the center of the disk. The second part is to calculate the location of the disk center by analyzing the distances from multiple anchor sensors to the center. In (3), we use the moving speed of flashlight to control the width 1 Video demonstration is available at http://gps.nju.edu.cn/ibrush/ Fig. 1. a flashlight shine in a 5 × 5 sensor grid A B M N C 1 C 2 C 0 Fig. 2. Draw a line with changing widths of the displayed stroke. Finally, we need to realize the real- time updates so as to minimize latency and improve user’s experience of writing. A. intensity-Distance Mapping To better estimate the distance from an arbitrary point inside a light disk to the center based on its light intensity, we sample several points inside the light disk for 100 ms per sample and 20 s in all, when an LED flashlight irradiates perpendicularly above a surface at a distance of 1 m. As shown in Fig. 3, the radius of the disk is almost 30 cm and the central light intensity is above 60 LUX (measured by TelosB Motes). Additionally, we use cubic spline interpolation to guarantee monotonicity and smoothness of the intensity- distance mapping. Fig. 3 shows that the curve is almost linear when distance ranges from 5 cm to 25 cm, which means the mapping is well suited to calculate distance based on light intensity. Similar to [7], we neglect the impact of the angle θ between the surface normal CN and the beam of flashlight , as depicted

Upload: lengoc

Post on 26-Aug-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: iBrush: Writing Chinese Characters with Flashlight …andong/papers/iBrush.pdf · iBrush: Writing Chinese Characters with Flashlight ... how to track lights from a bulb and a flashlight

iBrush: Writing Chinese Characters with Flashlightand Wireless Sensor Grid

Andong Zhan†, Shen Li†, Wenchang Zhou†, Tao Li†, Panlong Yang‡, Xiaobing Wu† and Guihai Chen††State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China

‡Institute of Communication Engineering, Nanjing, China

Abstract—Light is the widely available and pervasive resourcein our daily life. Existing research shows that light can be used inlocalization in wireless sensor networks. Meanwhile, our formerwork also indicates that wireless sensor networks can track lightsources. In this paper, we demonstrate iBrush1, a system whichallows users to write Chinese characters with a flashlight and asensor grid.

Index Terms—Tracking, Localization, Light Intensity, WirelessSensor Networks.

I. I

By using RF signals [1][2], ultrasounds [3][4] and evenUWB [5], wireless sensor networks have succeeded in manyapplications of localization and tracking. However, systemsusing RF signals suffer accuracy fluctuations and systemsusing ultrasound or UWB need extra hardware. In addition,the iLamp system [6] shows that light, the widely availableand pervasive source, can be used in localization. In ourpervious work [7], we propose the iTracking system to showhow to track lights from a bulb and a flashlight. In thispaper, we demonstrate iBrush, a system that allows usersto write Chinese characters with flashlight. We obtain thelight-intensity-distance mapping with which we can calculatethe distance between the sensor and the center of the diskarea illuminated by the flashlight. We also draw lines ofdifferent widths based on the moving speed of flashlight. In ourdemonstration, players can use an LED flashlight to shine indifferent positions of a 5×5 sensor grid, as shown in Fig. 1, soas to write Chinese characters which can be displayed instantlyon remote PC where the sink is plugged. Our demonstrationbridges modern science and technology with ancient Chineseart.

II. S D

Our system is composed of four main parts: (1) intensity-distance mapping, (2) central location calculation, (3) widthsetup, and (4) real-time updating. When a user uses a flashlightfacing a sensor grid, the light disk may cover several sensors.The goal of the first part is to obtain the distance from anirradiated sensor to the center of the disk. The second part isto calculate the location of the disk center by analyzing thedistances from multiple anchor sensors to the center. In (3),we use the moving speed of flashlight to control the width

1Video demonstration is available at http://gps.nju.edu.cn/ibrush/

Fig. 1. a flashlight shine in a 5 × 5 sensor grid

A

B

M

N

C1

C2C0

Fig. 2. Draw a line with changing widths

of the displayed stroke. Finally, we need to realize the real-time updates so as to minimize latency and improve user’sexperience of writing.

A. intensity-Distance Mapping

To better estimate the distance from an arbitrary point insidea light disk to the center based on its light intensity, wesample several points inside the light disk for 100 ms persample and 20 s in all, when an LED flashlight irradiatesperpendicularly above a surface at a distance of 1 m. Asshown in Fig. 3, the radius of the disk is almost 30 cm andthe central light intensity is above 60 LUX (measured byTelosB Motes). Additionally, we use cubic spline interpolationto guarantee monotonicity and smoothness of the intensity-distance mapping. Fig. 3 shows that the curve is almost linearwhen distance ranges from 5 cm to 25 cm, which means themapping is well suited to calculate distance based on lightintensity.

Similar to [7], we neglect the impact of the angle θ betweenthe surface normal CN and the beam of flashlight , as depicted

Page 2: iBrush: Writing Chinese Characters with Flashlight …andong/papers/iBrush.pdf · iBrush: Writing Chinese Characters with Flashlight ... how to track lights from a bulb and a flashlight

0 5 10 15 20 25 300

20

40

60

Ligh

t Int

ensi

ty (

LUX

)

Distance from the center (cm)

Fig. 3. Distance mapping for the flashlight

d

N

dS C

O

O’

θ

dS cos θ

Fig. 4. Illuminance on unit area dS

������

������

����

���

���

��������

O

D

A B

CI

H

G

FE

E0

E2

E3 E1

SensorCenter

Fig. 5. Location calculation

in Fig. 4. Experiences also show that Our intensity-distancemapping for flashlight tracking can be used in the cases ofnon-perpendicular irradiations.

B. Central Location CalculationWe aim to calculate the central location of a light disk with

high accuracy in a simple way.In [7], we utilize the grid cell with the largest sum of light

intensities of four sensors to localize the center of the disk. Itis enough to write Arabic numerals, but the location we get isnot stable when the center is near the borders of neighboringcells. We need higher accuracy and stability to write Chinesecharacters well. Therefore, we use a novel approach, smallestenclosing disc [8], to rebuild the light disk first, and then findthe central location. Experiments show that it provides higheraccuracy and stability than the former method in [7].

As shown in Fig. 5, we can calculate the distance from everyirradiated sensor to the center based on the intensity-distancemapping mentioned in Section II-A. Assuming that the radiusof the disk is 30 cm, we can get the smallest distance fromevery irradiated sensor to the border of the disk. The areawithin this distance must be covered by the disk. So, we needto find the smallest enclosing disc to cover all these areas. Tosimplify the calculation, we use four nodes to approximatelyreplace a circle, e.g., the circle with center E can be replacedby a point set {E0, E1, E2, E3}. To increase the accuracy, wecan use eight nodes or more to replace a circle. So we can useMINIDISC algorithm [8] to find the smallest enclosing discto cover all these points and then get the central location.

Additionally, according to the lower bound on the numberof intersection points covered by a disk [9], there are at leastk sensors covered by a disk of radius r centered at an arbitrarypoint:

k ≥π(r − l√

2)2

l2, (1)

where l is the side-length of grid cell. Therefore, l = 20 cmand r = 30 cm ensures at least 2 sensors can be covered bythe disk.

C. Draw lines with different widthsTo imitate writing with a Chinese writing brush, users can

draw lines with different widths. In our design, when the flash

������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������

0

5

10

15

20

1

6

11

16

21

2

7

12

17

22

3

8

13

18

23

4

9

14

19

24

0

3

6

0

3

1

4

7

1

4

2

5

8

2

5

0

3

6

0

3

1

4

7

1

4

Fig. 6. Hash mapping from sensor ID to sequence number

Fig. 7. Sketch of a unfilled line

light moves fast, the system displays a thin line; otherwise, itdisplays a thick line.

This drawing process has three steps:

1) Calculate the radius of current circle.2) Use a trapezoid to connect previous circle with current

circle.3) Fill current circle and the trapezoid with black.

Fig. 2 shows an unfilled line. C0, C1, and C2 are the centrallocations of moving light disk in three successive samples.We draw the beginning circle with a center at C0 with adefault radius, and the following circle with a center at C1

Page 3: iBrush: Writing Chinese Characters with Flashlight …andong/papers/iBrush.pdf · iBrush: Writing Chinese Characters with Flashlight ... how to track lights from a bulb and a flashlight

Fig. 8. Chinese characters which mean “welcome to Beijing”

with a radius r1 which increases in direct proportion to |C0C1|.Similarly, the radius ri of Ci increases or decreases in directproportion to |Ci−1Ci|. Then we use a trapezoid to connectneighboring circles. Taking the circle with a center at C0 andthe circle with a center at C1 for example, we use the trapezoidABMN to connect them, where C0C1 ⊥ AB and C0C1 ⊥ MN.At last, we fill all the circles and trapezoids with black color.Fig. 7 shows the sketch of a unfilled line.

D. Real-time Updating

Real-time updating is crucial to give a good user’s experi-ence of writing. To do so, on the one hand, time synchroniza-tion between the sink and irradiated sensors is indispensable;on the other hand, frequent sampling and data transmission areinevitable. In addition, we need to handle interference amongdifferent sensors.

In [7], the sink broadcasts a “start sampling” packet atthe beginning of every round for updating. On receiving thepacket, sensors start to sample so as to estimate whether theyare covered by the flashlight disk. We ensure that at most9 sensors in a 3 × 3 grid will be irradiated and we adopta TDMA-like method to avoid interference by using a hashfunction. This hash function maps every node ID in a 3 × 3grid to a unique sequence number corresponding to TDMAtime slot ranging from 0 to 8, as shown in Fig. 6. We usei and j to indicate sensor’s row number and column numberrespectively. According to our sensor deployment, a node NID

is in row i = bID / 5c and column j = ID mod 5. We define itssequence number as sn = (3× i + j mod 3) mod 9 which meansa node with sequence number sn will send the packet at thesn-th time slot. In Fig. 6, bold numbers stand for nodes’ IDsand italic numbers represent their sequence numbers. In theworst case, the flashlight disk, shown as a shadowed disk inthe figure, may be detected by 9 nodes. However, by using ourtime slot method, interference can be avoided at the beginning.

Based on the strategies in [7], we further improve oursystem in three aspects:

1) In initialization phase, every sensor can get the environ-mental light intensity so as to send data to the sink onlywhen sensed intensity is higher than the environmentalintensity. It makes our system works in dim light as wellas in complete darkness.

2) It is observed that the minimum sampling durationof TelosB Mote required for stable output is about 2ms. We prolong the sampling duration to 5 ms for

reliable sensing. For higher accuracy, we spend 10 msto calculate the average of two samples.

3) We set one round time at the sink to 150 ms which islong enough to finish 1 broadcasting by sink to sensors( 13 ms ), 2 sampling by sensors ( 2×5 ms ) and 9 datareporting by sensors to sink ( 9 × 13 ms )

III. D

We use a 5×5 sensor grid to track flashlight, which is shownin Fig. 1. We require players to use our LED flashlight in frontof the vertical grid board at a distance of 1 m or so. Fig. 8shows the flashlight trace when we write 5 Chinese characterswhich mean “welcome to Beijing”.

IV. C

We demonstrate how to use iBrush to write Chinese char-acter with a flashlight and a sensor grid. In future, we plan toimprove the shape at the end of a stroke so that the characterslook more beautiful. Additionally, we are considering how tocreate colorful paintings with flashlights of different colors.

A

The work is partly supported by China NSF grants(60673154, 60721002, 60825205), Jiangsu High-Tech Re-search Project of China (BG2007039), and China 973 project(2006CB303004).

R

[1] P. Bahl and V. N. Padmanabhan, “Radar: An in-building rf-based userlocation and tracking system,” in Proc. of IEEE INFOCOM, Tel-Aviv,Israel, Mar. 2000.

[2] T. He, C. Huang, B. M. Blum, J. A. Stankovic, and T. Abdelzaher,“Range-free localization schemes for large scale sensor networks,” inProc. of ACM MobiCom, San Diego, California, USA, Sep. 2003.

[3] M. Hazas and A. Ward, “A high performance privacy-oriented locationsystem,” in Proc. of IEEE Percom, Fort Worth, Texas, USA, 2003.

[4] N. B. Priyantha, A. Chakraborty, and H. Balakrishnan, “The cricketlocation-support system,” in Proc. of ACM MOBICOM, Boston, MA, Aug.2000.

[5] S. Gezici, Z. Tian, G. B. Giannakis, H. Kobayashi, A. F. Molisch, H. V.Poor, and Z. Sahinoglu, “Localization via ultra-wideband radios: a look atpositioning aspects for future sensor networks,” IEEE Signal ProcessingMagazine, vol. 22, no. 4, pp. 70–84, jul 2005.

[6] L.-W. Yeh, C.-Y. Lu, Y.-H. Lin, J.-L. Liao, Y.-C. Tseng, C. Chen, and C.-W. Yi, “iLamp: A sensor-enhanced lamp with surface-tracking capabilitybased on light intensity,” in Proc. of IEEE Percom, Texas, USA, 2009.

[7] A. Zhan, S. Li, T. Li, L. Guan, P. Yang, X. Wu, and G. Chen, “iTracking:Accurate light-based location-tracking in wireless sensor networks,” inProc. of IEEE MASS, Macau, China, 2009.

[8] M. Berg, M. Kreveld, M. Overmars, and O. Schwarzkopf, ComputationalGeometry. Springer, 2008.

[9] E. Kratzel, Lattice points. Academic Publishers, 1989.