Delft University of Technology Master’s Thesis in Embedded Systems

Channel Analysis for Passive Communication with Ambient Light

L.J. Bloom

Channel Analysis for Passive Communication with Ambient Light

Master’s Thesis in Embedded Systems

Embedded Software Section Faculty of Electrical Engineering, Mathematics and Computer Science Delft University of Technology Mekelweg 4, 2628 CD Delft, The Netherlands

L.J. Bloom [email protected]

7th December 2017 Author L.J. Bloom ([email protected]) Title Channel Analysis for Passive Communication with Ambient Light MSc presentation 14th December 2017

Graduation Committee prof.dr. K.G. Langendoen (chair) Delft University of Technology dr. M.A. Zu˜niga Delft University of Technology dr.ir. Z. Al-Ars Delft University of Technology Abstract

The idea of the internet of things (IoT) states that devices with embed- ded electronics will outnumber the devices operated by humans. All those ”things” will require connectivity to exchange information gathered from processed sensor data. A large part of the data will be sent through the air, such that mobile devices can be deployed without a need to connect any wire. Radio frequencies are widely used for wireless communication and include many systems like WiFi, Bluetooth, FM radio stations and mobile telephony. The capacity of radio channels is limited, thus IoT devices might require different methods for communication. In this work we study the behaviour of a relatively new communication channel, called the passive light channel. The passive light channel uses reflections of light to send information in the visible spectrum. It works a bit similar to readers in stores, but it doesn’t require a laser. It is sufficient to reflect sunlight or light from other sources, providing a sustainable method of transmitting information. Patterns consisting of black and white parts, or in particular, are used to regulate the reflected light. A light sensor is used to detect the reflected light and read the information from the reflected light. The key question in this research is how much information we can convey in such manner. In this work we show our three main contributions. First, we show that the passive light channel works with barcodes and reflections of ambient light. Second, a mathematical model and simulation tools are presented that describe the behaviour of the channel. Finally, the performance of the passive light channel with ambient light is analysed using empirical testbeds and compared with results of optical simulations. iv Preface

Each day it happens that the sun rises in the east and sets in the west, or as an old Dutch proverb states: ”Voor niets gaat de zon op”. Literally it means ”Only the sun rises for nothing”. Just by looking at the sun, people can count the days and mankind has already been doing that for ages. Sundials can tell us something about the time of the day and, for more detailed ones, even the day of the year. This example shows that there is information (about the current or elapsed time) hidden into the sunlight. We know that we can harvest energy from the sunlight using solar panels and it’s not an uncommon thing to do. Nevertheless, sunlight is not yet commonly used for transmitting information. When I talked to Marco Zu˜nigato find a graduation project at the Em- bedded Software Group, he showed me the ongoing projects and his ideas about light. One of the projects grabbed my attention and was presented as a new type of that utilizes sunlight to enable communic- ation. Common barcode scanners in stores work with a laser light, but this one tries to achieve the same without a laser. Although my work primarily focuses on improving and understanding the behaviour of this barcode reader, the larger project is trying to find the answer on a more substantial question: how can we re-use (sun)light to send data, and what data is already hidden into the light? A small piece of the answer has already been given in the case of sundials. This thesis shows another example, by transmitting information using reflected sunlight.

I want to thank a lot of people that helped me in this graduation project, although some of them may be unaware of how they helped me. First of all I need to mention Marco for his supervision, and his vision on the project. Special thanks to Ioannis and Qing that helped me in creating the test setup. Thanks to Hajo, my (former) housemates Kevin, Dennis and Joris for their knowledge and ideas about certain topics. Thanks to my other housemates, my family and all my friends for their support and the comfort they gave me when I was struggling with solving some theoretical or practical problems.

Rens Bloom Delft, The Netherlands 7th December 2017

v vi Contents

Abstract iii

Preface v

1 Introduction 1 1.1 Motivation ...... 1 1.2 Problem statement ...... 2 1.3 Contributions ...... 3 1.4 Outline of this thesis ...... 3

2 Background and related work 5 2.1 Reflection of light ...... 5 2.2 Barcodes ...... 6 2.2.1 Definitions ...... 7 2.2.2 Encoding messages in linear barcodes ...... 8 2.2.3 Decoding signals from barcode scanners ...... 9 2.3 Related Work ...... 10 2.3.1 Barcode readers with a camera ...... 10 2.3.2 Quby smart meters ...... 11 2.3.3 RetroVLC ...... 11 2.3.4 Heliographs ...... 12 2.4 Applications ...... 12 2.4.1 Car/Container scanning ...... 12 2.4.2 Barcode scanners in supermarkets ...... 12

3 The passive light channel 13 3.1 Basics of the passive light channel ...... 13 3.2 The passive diffuse light channel ...... 14 3.3 The passive specular light channel ...... 14 3.4 Modulation by changing reflective properties ...... 16 3.5 Summary and design goals ...... 16

vii 4 System design 17 4.1 Information source ...... 17 4.1.1 Toy train ...... 18 4.1.2 Spinning disk ...... 18 4.1.3 E-ink display ...... 19 4.2 Receiver design ...... 20 4.2.1 Cap ...... 21 4.2.2 Lens ...... 21 4.2.3 Photoreceptor ...... 24 4.2.4 Electrical circuit ...... 24 4.2.5 Software ...... 25

5 Analysing channel response 27 5.1 Approach ...... 27 5.2 Convolutional model ...... 28 5.3 Optical model ...... 28 5.3.1 Surface reflection ...... 29 5.3.2 Lens refraction ...... 29 5.4 Validation of the optical simulations ...... 31 5.4.1 Measurement setup ...... 31 5.4.2 Finding an area with constant optical response . . . . 32 5.4.3 Linearity of the receiver ...... 33 5.4.4 Optical response with lens ...... 34 5.5 Validation of the channel model ...... 35 5.5.1 One-dimensional channel response ...... 35 5.5.2 Received signal ...... 36 5.5.3 Influence of the signal frequency ...... 37 5.5.4 Influence of light intensity ...... 38 5.5.5 Intersymbol interference ...... 39 5.6 System constraints ...... 40 5.7 Channel capacity ...... 41

6 Decoding algorithms 43 6.1 Challenges ...... 43 6.2 Comparison of decoding methods ...... 45 6.2.1 Threshold detectors ...... 45 6.2.2 Analog edge detectors ...... 46 6.2.3 Digital edge detectors ...... 47 6.2.4 Peak detectors ...... 47 6.2.5 Blind deconvolution ...... 47 6.2.6 Summary ...... 48 6.3 Implementation of a detection algorithm ...... 48 6.4 Performance ...... 50

viii 7 Conclusions and future work 51 7.1 Conclusions ...... 51 7.2 Future work ...... 52

Bibliography 55

A Comparison photodiode / phototransistor 57

B Power Consumption of the testbed 59

ix x Chapter 1

Introduction

1.1 Motivation

In the 1960s the Boston and Maine Railroad tested a system called KarTrak to identify freight railcars in trains automatically [15]. It consisted of rather large (about 15 x 45 cm) and colourful (white, black, red and blue, see Figure 1.1 for an example) handmade barcodes attached to railcars, and readers that were the size of a refrigerator. The readers had a 500W light bulb, color filters and two photomultiplier tubes to sense the reflected light. The system was an important predecessor of the small consumer barcodes that are nowadays used all over the world, together with laser scanners. In 1977, more than a decade after its introduction, the KarTrak system on train cars in North America was aban- doned and replaced in the 1980s by a system based on radio-frequency iden- tification (RFID) tags. RFID tags have been used a lot since then and can be found in public transport cards, toll badges and passports. By harvesting energy from an RF antenna, it is even possible to run microcontrollers on a battery-less device as long as an RF Figure 1.1: A KarTrak barcode transmitter is nearby [5]. We think that reflections of light can be used in the same way as RFID uses backscattering of radio signals. In comparison to RFID we don’t need an own transmitter to create reflections, as the world is already illuminated by the sun and a lot of electrical lights. We want to develop a communica- tion channel that is sustainable and exploits a free and abundant resource: ambient light. By reusing ambient light for data transmission, we will not depend on additional energy sources. Messages will be encoded on surfaces

1 Figure 1.2: In the passive light channel we try to send information through reflections of sunlight to reflect and modulate the light. Based on the concepts of KarTrak and modern barcodes we will create those surfaces. Readers for the generated signals will be inexpensive tiny boxes containing a photosensor with low power usage.

1.2 Problem statement

The passive light channel has been proposed before as a digital communca- tion channel in which data is encoded passively into reflections of ambient light [24]. The basic concept of this channel is shown in Figure 1.2. A moving information source, for example a truck, changes the reflections of light using a barcode to send information stored in the barcode. A receiver captures the pattern from the reflections and is able to read the information. The work in this thesis project builds upon the described passive light channel, trying to understand its fundamental properties and limitations. The research goal is stated as follows:

Create a mathematical model that can quantify the maximum capacity of a passive light channel depending on the different design and usage parameters of the system. These parameters include the size of the barcode, the distance to the receiver and the speed of movement. All parameters should have a clear physical meaning and the model should be verified by experiments.

In order to test different parameters of the system and find the maximum channel capacity, we design a small-scale testbed. In the testbed different parameters can be changed and the effects can be analysed. It is made on a small scale, such that it can be used for experiments in a controlled environment.

2 1.3 Contributions

During the graduation project I have developed new insights about the usage of the passive light channel and I have improved the achieved communication capacity. My key contributions are:

• Development of a testbed for a passive light channel (chapter 4)

• Creation and verification of a mathematical model that describes the behaviour of the passive light channel (chapter 5)

• Implementation of a decoding algorithm to create a proof of concept of the passive light channel (chapter 6)

1.4 Outline of this thesis

Before going into the details of the passive light channel, background in- formation is presented in chapter 2. It provides information about light reflections and barcodes, and shows related work as well as potential applic- ations for our work. In chapter 3, the passive light channel is presented and multiple taxonomies of the communication channel are compared. The testbed is described in chapter 4. A model to determine the channel response is provided in chapter 5 together with verification of the model. In chapter 6 algorithms to decode the received signal are discussed and the performance of the implemented decoding algorithm is shown. Finally in chapter 7 the conclusions are presented as well as an overview of possible future work.

3 4 Chapter 2

Background and related work

This chapter contains background information that is helpful to understand the topics discussed in this thesis. At first, some information about re- flections of light is provided in section 2.1. Then section 2.2 shows some information and definitions about barcodes, as they are used to encode mes- sages for passive communication. In section 2.3 some related projects are mentioned. In the end, section 2.4 shows some potential applications for the communication channel described in this thesis.

2.1 Reflection of light

When light reflects on a surface, it can be reflected in two ways: specular and/or diffuse, as illustrated in Figure 2.1. Specular reflection occurs on mirror-like objects and means that the light is reflected in only one direction. The angle θr between the reflected light beam and the surface normal is then equal to the angle θi between the incident light beam and the surface normal.

Figure 2.1: Reflection on a surface can be specular (left) or diffuse (right)

Diffuse reflection means that the energy of the incident light beam is spread out in light beams towards all directions. When a diffusely reflecting surface is observed from an angle θ, only the reflected light ray with angle θ will reach the observer. This light ray will have a small part of the energy of the incident beam.

5 A small laser can be used for clarification the difference between specular and diffuse reflections. If one shines with a laser directly into someones eye, or via specular reflection on a mirror, the high light intensity can hurt. The laser can not be observed when it is not pointed at the eye. If the same laser is pointed at a white paper, the light is reflected diffusely. Then it can be observed from any angle with much lower, non-hurting, intensity. Diffuse reflection was already described in 1760 by the Lambert’s cosine law [12]. An ideal reflecting surface with an area A is described to have the same luminance L when observed from any angle. This means that light intensity of a reflected light ray exactly compensates the observed area size, that changes with the angle between the observer and the surface. The light intensity I(θ) of a reflected light ray at angle θ must then be described by Equation 2.1: I(θ) = L · A cos(θ) (2.1) Reflection on a surface is hardly ever ideally diffuse, although Lamber- tian reflectance is often a good approximation. The reflection is generally a combination of diffuse and specular reflections, as illustrated in Figure 2.2. Several (empirical) models exist that takes properties of materials into ac- count like roughness and shininess, in order to describe reflections accurately as a combination of Lambertian and scattered specular reflections. The Phong reflection model [17] was one of the first models describing diffuse reflections together with specular highlights in 1975 and is computation- ally simple. Newer models are based on BRDF (bidirectional reflectance distribution function) measurements and are far more detailed [4].

Figure 2.2: Practically, reflections are often combinations of diffuse and specular reflections

2.2 Barcodes

We want to encode messages into reflections of light. We thus should control the light intensity of reflections from points on a surface. The desired beha- viour of reflected light can be achieved with a moving surface that contains

6 a barcode. For a certain point in space, the reflections will change accord- ing to the barcode stripes. A white stripe gives high reflection and a black stripe results in lower reflection. Having a (painted) barcode on an already moving surface does not require any additional energy to change temporal reflections, as mentioned in [24]. In this thesis, whenever we refer to the term barcode, it is assumed to be a linear barcode. A linear barcode isa series of consecutive stripes that encode some machine-readable data. The stripes form a one-dimensional pattern and have only 2 different colors, usually black and white. Non- linear barcodes can be multiline barcodes or 2D barcodes like QR-codes, but those are not used in this work. For all barcodes, the encoded data is a set of digits or characters.

2.2.1 Definitions To understand how we use barcodes in this thesis, some definitions are required. This section lists some terms commonly used when barcodes are involved. The definitions are illustrated in Figure 2.3.

Figure 2.3: All presented definitions illustrated in a two-width barcode

1. Bar: A stripe in the barcode that has the foreground color (commonly black) 2. Space: A stripe in the barcode that has the background color (com- monly white) 3. Quiet zone: Area before and after the stripes that has the back- ground color 4. Module: The thinnest width that can occur in the barcode 5. Two-width barcode: A barcode with an encoding scheme that only uses two possible widths for each stripe in the barcode 6. Narrow stripe: A stripe in a barcode that has the module size as its width

7 7. Wide stripe: A stripe in a two-width barcode that has a width larger (commonly 2 or 3 times) than the width of a narrow stripe. 8. Height: The height of all the stripes in the barcode

2.2.2 Encoding messages in linear barcodes A barcode can be seen as a visual representation of a square wave signal with finite length (a message). The scanning direction and scanning speed of a barcode is always unknown as shown in Figure 2.4. A barcode signal must thus be self-clocking and only provide a valid message in one direction [16]. If the barcode is scanned in the other direction, the signal must be reversed before decoding. Therefore the begin and end sequences of a barcode must be defined such that the scanning direction of a barcode can be retrieved.

Figure 2.4: A barcode must be decoded independently of the scanning speed and direction

Manchester encoding is commonly used in telecommunications as a self- clocking signal. The left part of Figure 2.5 shows that a 0-bit is encoded as a low signal followed by a high signal and a 1-bit is encoded as a high signal followed by a low signal. Manchester encoding provides thus at least one transition per bit, but it lacks a fixed number of transitions. Figure 2.5 shows that a sequence 000 can look similar to a sequence 010101 at a higher fre- quency with Manchester encoding. Because of this phenomenon, Manchester encoding is not recommended if the signal frequency is unknown, or if the used maximum frequency is two or more times the minimum frequency. In barcodes, information is encoded into sets of a fixed number of bars and spaces that form code words. The code words can be mapped to a digit or a character according to the encoding scheme. Figure 2.6 shows some of the codewords of the encoding scheme [25] and their mapping characters. Barcode encoding schemes ensure that both wide and narrow

Figure 2.5: With Manchester encoding, 000 can look similar to 010101

8 stripes always occur in a barcode symbol, such that the frequency can be derived correctly from the barcode and clock recovery can always be done from a scanned barcode signal [16].

Figure 2.6: A few code words of the Code 39 encoding scheme and the characters they represent

In Table 2.1 the maximum information density of some common encoding schemes are compared with Manchester encoding. Overhead due to start symbols, end symbols and the quiet zone is not taken into account in the table, as all schemes will require those as overhead. We can see that the in- formation density of barcodes is comparable to Manchester encoding, despite the better and required properties on clock signal recovery. The two-width barcode schemes (maximum stripe width 2) have about 20% lower data density than Manchester encoding. The schemes [7] and [10] that allow for stripes up to four modules wide provide about 24% higher data density.

Encoding Maximum Number of Width of one Data density Scheme stripe width code words code word (bits/module) Manchester 2 2 2 0.5 ITF 2 100 14 0.415 UPC/EAN 4 10 7 0.474 Code 39 2 43 14 0.388 Code 93 4 48 9 0.621 Code 128 4 106 11 0.617

Table 2.1: Information density of barcode schemes and Manchester encoding (all widths are given as a number of modules)

For all the barcode encoding schemes mentioned in Table 2.1 the barcode is guarded with short start and stop codewords. These codewords are used to determine the scan direction of the barcode, because barcodes should be readable from left to right and from right to left. In all those encoding schemes the start and stop codewords are defined such that the first and the last bar in a barcode have the same width.

2.2.3 Decoding signals from barcode scanners In telecommunications a received signal is modeled as a convolution of the transmitted data with the channel’s impulse response as illustrated in Fig-

9 ure 2.7. The impulse response in telecommunications maps to the laser beam profile in barcode scanning, as the received signal is a convolution of the bar- code with the beam profile. The laser beam profile is the one-dimensional description of the channel response that depends on properties of the laser.

Figure 2.7: The received signal is a convolution of the transmitted barcode signal and the channel response

The goal of a decoding algorithm is to retrieve the original barcode signal, that is a square wave, from the received signal. Then, from the retrieved barcode signal the encoded information can be extracted with a decoder of the used barcode encoding scheme. Decoding algorithms are discussed in more detail in chapter 6.

2.3 Related Work

Light is already used as a communication medium, for example in visible light communication (VLC). In VLC an LED light is turned on and off, faster than perceptible to the human eye, to transmit data. Turning on and off a light is what we call active light communication. In this work we study passive light communication that uses any existing light source and changes the intensity of the reflected light. Below we show some examples of existing applications that use some form of passive or semi-passive light for communication.

2.3.1 Barcode readers with a camera Due to the increasing amount of smartphones, cameras are used more and more to scan barcodes. The camera of the phone makes a two-dimensional photo containing one or more barcodes. By processing the image, barcodes are detected and decoded. Cameras often work great, but when fast movement or instability is in- volved, motion blur can cause a barcode to be unreadable. Furthermore, energy consumption of image processing with cameras is high, because com- plete images need to be processed. Any barcode is an example of passively storing a message as a visible pattern. Contrary to cameras, our work does not require complex image processing and it can be used to scan fast moving objects that would lead to too much motion blur with cameras.

10 2.3.2 Quby smart meters The dutch company Quby has made a small device to convert an old- fashioned analog energy meter into a smart energy meter. The device must be placed in front of the old energy meter [22]. The implementation of this device can be seen as the simplest form of the passive light channel, using communication messages of only one bit. The concept of this device is illustrated in Figure 2.8. The device has a small LED that is turned on to have a light emitter when the light in- tensity coming from other sources, like the sun, is insufficient. A simple phototransistor in the device is used as receiver. The information source of this channel is the rotating disk of the analog energy meter, that has a small coloured part that will change the reflection intensity each time when it passes at the front side. We develop a channel in which longer messages can be transmitted at larger distance. It works similar, but our system is more complex and we are not limited to one application only.

Figure 2.8: The implementation of [22] to passively read out an analog energy meter

2.3.3 RetroVLC Using retroreflectors, it is shown that backscattering can be used on an active visible light communication (VLC) channel [13] [28] as in Figure 2.9. The retroreflectors on the solar-powered device ensure that light from an active VLC device reflects back towards that device. LCD shutters are used to modulate the reflections at the slave device up to a frequency of 125 Hz. It is an example of passive light communication, but it requires an active VLC channel with emitter.

Figure 2.9: The implementation of the Retro-VLC backscattering tag [28]

11 2.3.4 Heliographs Heliographs are a form of passive light com- munication that was used for a longtime by armies. Mirrors were used to reflect sun- light from the source towards the receiver (see Figure 2.10) that could be up to 50 kilometers away under clear weather condi- tions. Communication through heliographs was done with morse code, similar to tele- graph messages, and manual operation of the devices. Although they are not any- more in use, digital heliographs do exist [3]. Figure 2.10: A heliograph uses Heliographs are more complex to use than a mirror to reflect sunlight our system, because they require mirrors to be rotated according to the sun’s position.

2.4 Applications

The work presented in this thesis is rather more fundamental than practical towards an application goal. We think that passive light communication can be used in future for communication channels in smart cities, both indoors and outdoors. The only requirement is the availability of a direct line of sight between the source and the receiver. For now, there are a few applications that directly could benefit from the presented work. These applications are mentioned below.

2.4.1 Car/Container scanning The proposed light channel provides a method to easily read barcodes as they pass by the receiver. Container tracking is currently done by registering containers manually at terminals [21], or by scanning a RFID tag [9] if it is available on the container. Placing barcodes on containers is a good alternative for RFID tags on container. Using the system presented in this thesis, the container can be scanned passively when it enters or leaves a terminal.

2.4.2 Barcode scanners in supermarkets Modern barcode scanners in supermarkets contain laser emitters and moving optics to scan barcodes. If the reader as presented in this work would be combined with moving optics as in barcode readers, product barcodes could be scanned without requiring a laser. Such passive barcode scanners could replace laser scanners to become more energy efficient.

12 Chapter 3

The passive light channel

This chapter explains the fundamentals of the passive light channel. The channel is subdivided into three different methods. All categories are dis- cussed and explained shortly. First, the basic concept of the passive light channel is presented and compared to communication channels in general in section 3.1. Then, the three methods are discussed separately. Finally, we summarize the discussions and state our design goals in section 3.5.

3.1 Basics of the passive light channel

The basic idea of the passive light channel was proposed before in [24] and is shown in Figure 3.1. Instead of having a controlled emitter to encode in- formation into light (as for normal VLC), we use any light source that is part of the environment. The receiver is a tiny box containing one photosensor to measure the impinging light intensity. Currently, the information source is typically a barcode with low reflective bars and high reflective spaces. Because we have no control of the environment, the signal can be distorted in many ways. Even the behaviour of the barcode (the information source) is influenced by the environment.

Figure 3.1: A flowchart of a classic VLC channel (top) and the new presented passive light channel (bottom)

13 I subdivide the passive light channel into three categories based on the mo- bility of the information source and the type of reflection. The first category (section 3.2) is discussed extensively in this thesis. It uses movement of the information source and diffuse reflections to modulate the message onto the channel. The second category (section 3.3) uses movement and specular re- flections, giving a more complex situation. The third category (section 3.4) doesn’t use movement at all, but changes the reflective properties on the information source for sending messages.

3.2 The passive diffuse light channel

The information source in this channel is a barcode consisting of bars and spaces that reflect the light mainly in a diffuse manner. A barcode printed on normal paper can already be sufficient as information source. In order to be read, the barcode should be moved through the detection area. The detection area is determined only by limiting the so-called field-of-view of the receiver. By placing a cap around the receiver, the field-of-view is limited to the desired direction and detection area. Light beams not coming from the detection area are blocked, as shown in Figure 3.2.

Figure 3.2: For the passive diffuse light channel, light coming from different locations than the desired detection area must be blocked around the sensor.

Because all the light on the information source is reflected diffusely, the position of the emitter doesn’t matter, as long as the surface of the inform- ation source is illuminated well enough. Only a small part of the reflected light will reach the receiver, thus the receiver should have very high sensit- ivity. The difference in (diffuse) reflection from the bars and spaces in the barcode is assumed to be detectable.

3.3 The passive specular light channel

The information source in this channel is a barcode consisting of bars with high specular reflection (a mirror would be ideal) and spaces with low (spec- ular) reflection. In order to be read, the barcode should be moved through

14 Figure 3.3: The passive specular light channel with a moving truck as in- formation source

Figure 3.4: Placing a cap around the photosensor might cause a field-of-view in which no specular reflections can reach the receiver. the detection area. In Figure 3.3 it is shown that specular reflections outside the detection area (lightgrey arrows) do not reach the receiver. The location of the detection area depends on the position of the light emitter, not only on the position of the receiver. When sunlight is used, the required position of the information source changes during the day, dependent on the sun’s position. If we would place a cap around the receiver as suggested for the passive diffuse light channel, we would get the situation in Figure 3.4. When the sun has moved, no more specular reflections will reach the photosensor and the barcode can’t be read anymore. Therefore we can not use a cap to limit the field-of-view of the photosensor. Because no cap can be used, noise is to be expected from diffuse reflections outside the detection area. The specular light channel thus provides a noisy communication channel that depends on the position of the light source. Moving light sources can make the communication link unreliable. If multiple light sources are available, multiple detection areas exist, one spot for each light source. Interference of messages can occur when multiple information sources are moved through different detection areas. This phe- nomena is illustrated in Figure 3.5 showing multiple detection areas due to having 2 emitters.

15 Figure 3.5: With multiple light emitters and information sources interference of two different messages can occur in the specular light channel

3.4 Modulation by changing reflective properties

A totally different approach of modulating existing light sources is not by using movement, but by changing reflections over time. This technique is used in the uplink communication channel of Retro-VLC [13] that assumes the emitter and the receiver to be on nearly the same position, and uses a retro-reflecting fabric. Retro-reflecting fabrics are for instance used on traffic signs and reflect light back to where it came from. The light emitter and receiver are positioned near each other. The in- formation source has the retro-reflecting surface and uses an LCD-shutter to regulate the amount of reflected light. An implementation of Retro-VLC shows a batteryless tag enabling a channel with 1 kbps data rate [28]. Similar to Retro-VLC, changing surface reflections over time could be used with specular or diffuse reflections too (instead of retro-reflections). In this work we focus on a channel with mobile objects as information sources. We leave passive modulation on an immobile surface open for future work.

3.5 Summary and design goals

The passive light channel can be used with specular or diffuse reflections and with mobile or static objects as information source. We want to design a communication channel in which mobile objects can transmit small inform- ation messages when they pass by the receiver. Because we can not have control over the light emitter, the specular light channel provides an unre- liable communication link. We thus choose to focus on the passive diffuse light channel. We want to maximize the size of transmitted messages by reducing the module of the barcode on the information source and to maximize the range between the barcode and the receiver. At the same time, the photosensor should receive enough energy from the light such that we can decode the signal, independent of the speed of the information source.

16 Chapter 4

System design

This chapter shows the design of the test setup that is used to measure properties of the channel and to show a proof of concept. The setup consists of two main parts as illustrated by Figure 4.1: a moving barcode that is the information source and a light detector that is the receiver of the channel. Both parts are described in detail in this chapter. When doing tests with the setup, both sunlight and DC-powered lights have been used as emitters with near constant light intensity.

Figure 4.1: The receiver is a light detector (gray box in this picture) pointed towards a moving barcode

4.1 Information source

In a proof-of-concept the information source is used to encode information into the channel. The information source should change local reflectivity over time. It may use movement and a barcode, enabling energyless modu- lation of a static message when movement already is involved. For studying the behaviour of the passive diffuse light channel, different properties were required that could not be achieved in a single object. First, the object should reflect the light diffusely. Second, the object should have a barcode and should move at a constant speed. The barcode

17 is a representation of the message that is transmitted. Third, we should be able to move the barcode at speeds that are high enough to determine the maximum movement speed of the barcode object. Finally, we should be able to change the reflection of the object surface without changing anything else in the setup that influences the properties of our communication channel.I have used three different objects as information sources to realise the desired properties. I have used a toy train as a small-scale proof-of-concept and to perform reproducable test measurements. A spinning disk is used as an informa- tion source that achieves a higher speed and the third information source is an e-ink display. I have used the e-ink display to accurately measure the channel behaviour, because parts of the screen can be toggled between black and white, without changing anything else like the position of the inform- ation carrier. The information sources are described separately in different subsections.

4.1.1 Toy train The first information source is a toy train, to have a surface with repro- ducable one-directional movement. A barcode printed on paper is used to encode a static message with diffuse reflections. The paper is pasted on card- board ensuring a flat surface and then mounted onto the train carriages, as shown in Figure 4.2. The train carriages can be moved by hand or with a battery-powered toy train locomotive to maintain a constant speed.

Figure 4.2: The toy train with a barcode on cardboard

4.1.2 Spinning disk As the maximum testing speed with the train is limited by the movement of the toy, the spinning disk is introduced. The spinning disk is used for testing the communication channel for fast-moving information sources and real-time decoding of messages following each other rather quickly. The disk is made of paper containing a printed barcode, that has transformed onto a circle as in Figure 4.3. The disk is driven by a tiny DC-motor, at which it is attached with a 3D-printed mount. The rotational speed can be adjusted using the motor drive circuit.

18 Figure 4.3: The used barcode mapped onto a circle

Figure 4.4: The used e-ink display with a black square

4.1.3 E-ink display

An e-ink display can be used for dynamically changing a barcode on a moving surface. In this project, a small e-ink display (66.89 mm x 29.05 mm, 296 x 128 pixels, shown in Figure 4.4) is used for measuring the positional channel response. Parts of the e-ink paper can be changed electrically to black or white without changing anything else in the environment. This enables to measure the response of different positions within the detection area of the receiver. The reflectivity of e-ink is nevertheless a bit disappointing, with contrast 4 times less than paper [2]. E-ink displays suffer from the memory effect: an image can be distorted by the previous shown image, in particular near the black-white edges of the previous image. The memory effect is the reason that e-readers with e-ink screens make the screen black and then white, before displaying the next page of a book. This is called a full-refresh of the screen. Before measuring the received light intensity from the e-ink display, a full refresh must always be done. The measurements with the e-ink display can be found in section 5.4.

19 4.2 Receiver design

The design of the receiver is very important in setting up a passive diffuse light channel. The emitter and information source are part of the environ- ment and of these two parts we can only control the barcode surface. The surface remains static while it passes the receiver. By the receiver design we can control the size and position of the detection area. When a part of the barcode surface is within the detection area, the receiver can see the reflected light rays from that part of the barcode. chgWe would like to have the detection area as small as possible, such that stripes in the barcode can be more narrow and we can encode more information on a surface. Though, we should capture enough light to be able to decode the message stored in the light. The detector concept is drawn in Figure 4.5, consisting of a few parts. The photoreceptor is the component that converts incident light into an electrical signal. The incident light of the photoreceptor is limited by a cap and focused with a lens placed inside the cap. The electrical signal is amplified and converted to a digital signal by an electrical circuit. If the detection area can be made smaller, the module of the barcode can be smaller too and the data density of the barcode can be increased. The detection area can be limited by blocking light rays that otherwise would be captured by the receiver, or by focusing light rays from the barcode surface together. Blocking light with a cap decreases the total energy of captured light rays while a lens can be used to capture more light rays from the same detection area. In our receiver, we use both methods because the advantage of adding a lens is limited. The design has been based on hardware and software of the OpenVLC boards [23], that is designed as a research platform for visible light commu- nication. I have adapted the design to create a receiver that is suitable for the passive diffuse light channel.

Figure 4.5: A schematic of the receiver, with an aperture in the cap to capture incident light beams.

20 4.2.1 Cap Around the photodiode and lens a cap is placed, with a small hole capturing incident light beams. The main goal of this aperture is to limit the effective field-of-view (FOV) of the photoreceptor and therewith limiting the size of the detection area. Because a cap can only block light, the total intensity of the received light will be decreased by the cap. I have chosen to make the cap with LEGO blocks, such that the distance between the aperture and the photoreceptor can be changed easily, following the 8mm grid size of LEGO. In a few lego blocks I drilled a hole with diameter of 2 or 4 mm, creating an aperture size smaller than one lego block. This aperture should be the only place where light beams can enter the inside of the cap. Therefore, the cap has been shielded with gaffer tape to block light from passing through the slits between lego blocks. A photo of the cap is displayed in Figure 4.6.

Figure 4.6: The cap consisting of LEGO blocks and tape

4.2.2 Lens With a cap as described in subsection 4.2.1 the received light intensity always decreases when limiting the detection area size. We must ensure that the total light intensity is high enough, such that the photoreceptor generates a decodable signal. Therefore, we can not only limit the field-of-view with a cap. We use a lens to focus light coming from the desired detection area onto the photoreceptor, gaining more light intensity from the barcode signal while minimizing the field-of-view. Using geometrical optics theory for a 2-dimensional system, we can com- pute that adding a lens can always give a smaller detection area with the same received light intensity. We will derive formulas for the size of the detection area for a receiver without lens and a receiver with lens. Then we will compare the results. Let dp be the distance between the gap (the aperture) and a photoreceptor with size sp. Let sg be the gap size and dbc be the distance between the gap and the barcode. For a receiver without lens, the field-of-view is limited as

21 Figure 4.7: Field-of-view and detection area A for a photosensor and a gap illustated in Figure 4.7. The detection area A on the barcode can be derived using basic geometry, as in Equation 4.1:

dbc dp + dbc A = sp · + sg · (4.1) dp dp A smaller area M exists that can be ”seen” from any point on the photore- ceptor are sp. Points on the barcode surface that are within A, but not in M can only be detected by a part of the photoreceptor. Therefore, points in M will give maximum signal intensity. This area M is given by Equation 4.2:

dbc M = sg + (|sg − sp|) · (4.2) dp If we add a lens covering the complete gap, divergent incoming light beams are refracted. For a lens with focus distance f ≤ dp, a distance di exists for which a sharp image of the barcode is projected on the photoreceptor plane. This image distance can be found using Newton’s lens formula, provided in Equation 4.3: 1 1 1 = + (4.3) f di dp

Let si be the size of the sharp image given by Equation 4.4:

di si = sp · (4.4) dp We now have the optical system as shown in Figure 4.8. Using the image distance di and size si, the detection area A on a distance dbc is given by Equation 4.5:

|d − d | A = s + (s + s ) · bc i for d > d i g i d bc i i (4.5) dbc − di A = si + (si − sg) · for dbc ≤ di di

22 Figure 4.8: Field-of-view and detection area A for a photosensor with lens

This equation can be rewritten using Equation 4.4 to Equation 4.6:

dbc |dbc − di| A = sp · + sg · (4.6) dp di

Note that if di > dp, the detection area with lens in Equation 4.6 is always smaller than the detection area for the same system without a lens (see Equation 4.1). To meet the requirement di > dp, the lens must be 1 chosen with focus distance f > 2 dp. Two special cases that can be important for designing a receiver. The first case is with the barcode placed at the distance dbc = di. Then the detection area does not depend on the gap size sg, because a sharp image of the barcode is projected on the photoreceptor plane. In this case, the system is designed to minimize the detection area A for a fixed barcode distance dbc. The received light intensity can be increased by enlarging the gap size sg, but then deviations in realised dbc will lead to larger changes in the size of A.

The second case is with the lens chosen to have f = dp. We then find di = ∞ and the right fraction in Equation 4.6 converges to 1. The detection area in this case is simply given by Equation 4.7:

dbc A = sp · + sg for f = dp (4.7) dp

The total light intensity of the incident beams that is captured by the receiver, depends on the gap size sg and the photoreceptor size sp. If we fix the size of the photoreceptor sp and the gap size sg, we can compare Equation 4.1 with Equation 4.7. We see directly that the detection area A is smaller in the system with a lens, while we maintain the same total energy from the captured light rays by fixing sp and sg.

23 4.2.3 Photoreceptor

In visible light communication (VLC) a photodiode is often used as signal receiver. A receiver for the passive diffuse light channel should have very high sensitivity, because of the low amount of reflected light that actually reaches the receiver. Phototransistors are known to have higher gain and better signal-to-noise ratio (SNR), generally at the cost of bandwidth [1]. Scanning an UPC/EAN consumer barcode (module size 0.3 mm) at a speed of 200 km/h would require a bandwidth of 93 kHz, that can still be feasible with cheap phototransistors. We thus prefer to use a phototransistor. The chosen phototransistor is the Sharp PT480 that has a typical FOV of 13 degrees and a typical rise/fall time of 3µs, matching to a bandwidth of 150 kHz. [18]. A comparison of the received signal with the PT480 pho- totransistor and the OPT101 photodiode, that was used in earlier versions of the system, can be found in Appendix A. To increase the sensitivity, I have changed the load resistor to 99kΩ, that should lead to rise/fall times of 300µs or an operating bandwidth of 1.7 kHz. This bandwidth matches a speed of 100 km/h for a barcode with a module of 1 cm. I don’t expect to test the setup with faster changing signals. In subsection 5.5.3 I will show that the actual achieved bandwidth was sometimes lower than the design bandwidth of 1.7 kHz, because of low received energy in low-illuminated environments. One of the design goals is to minimize the detection area. According to the theory in subsection 4.2.2, a smaller size of the photorecepter can help in achieving this goal, at the cost of reducing the received light intensity. Because the datasheet of the phototransistor does not state what the size of the effective area is, it must be measured or limited. I have decided to control the effective area by limiting it to a circle of 1 mm diameter with a plastic shielding directly placed in front of the phototransistor.

4.2.4 Electrical circuit

The electrical circuit consists of the phototransistor, a signal amplifier and an ADC, as shown in Figure 4.9. The PT480 phototransistor is loaded with a resistance 99kΩ, to maximize the signal. If we would design the receiver to have a higher bandwidth, the load resistance should be made smaller and the signal should be amplified more. Currently the amplifier is a non-inverting amplifier made with an LM324AN op-amp and amplitude gain factor of 687. Due to the non-ideal character- istics of the op-amp and the high gain, the output signal usually ranges between 2.4 V and 3.7V. Ideally we would have an output signal ranging from 0 V to 5 V to maximize the signal resolution. We would suggest a redesign of the amplification circuit to enhance the signal resolution.

24 Figure 4.9: The phototransistor amplifier and sampler circuit

The ADC is an MCP3008, connected to a BeagleBone black. To overcome 50 Hz noise on the power line, the setup is powered with batteries: 3xAA alkaline batteries as a 5V power source and a 4.2 V Li-ion battery as stable reference voltage for the ADC. The reference voltage is chosen to be lower than 5V, but higher than the maximum output voltage of the amplifier. The MCP3008 is a 10-bit ADC, thus with an output range of 0-1023. Due to the limited signal range of the phototransistor with amplifier, the actual output values ranged between 600 and 912 during all tests. Because of the high amplification, it is required to add shielding to the circuit to suppress noise. I have shielded the circuit using aluminium foil connected to the ground, with a few necessary gaps for the phototransistor and wires.

4.2.5 Software The software of OpenVLC seemed to be interrupted from time to time by the operating system, because it runs in the Linux kernel of the BeagleBone. This leads to periods of missing samples, thus to errors in the registred sig- nal. For continuous sampling of the received light intensity I have imple- mented sampling software on the programmable real-time unit (PRU) of the BeagleBone Black. The code to communicate with the MCP 3008 ADC has been taken from [14], with some minor changes in sampling frequency and number of taken samples. After a similar PRU implementation in another project [27] the OpenVLC platform has been adapted since then to make use of the PRU too, solving these errors.

25 26 Chapter 5

Analysing channel response

In this chapter a response model of the diffuse light channel is proposed. The response is assumed to be time-independent and modeled using simula- tions. The simulations are based on optics theory and will be compared with measurements done with the test setup. Based on the validated simulation results, we present two system constraints and show the channel capacity.

5.1 Approach

Before presenting the model and its evaluation, we should define a coordinate system in which the results will be presented. The used axis system is shown in Figure 5.1. The varying distance between the receiver and the barcode is measured on the Z-axis. The Y-axis is used for the height on the barcode, and the X-axis is the propagation direction of the barcode.

Figure 5.1: Axis system of the measurement setup

The presented model consists of two parts: an optical model and a gen- eralization of the model to get the channel response we are interested in. With the channel response we can describe the propagation of the barcode signal as will be described in section 5.2. The goal of the optical model is to determine the detection area (indicated with a circle in Figure 5.1) and for each point within the detection area,

27 its influence on the received signal. We call the influence of a point on the received signal the optical response of that point. From the optical response we can derive the one-dimensional channel response that describes the channel behaviour, by performing integration on the optical response over the Y axis.

5.2 Convolutional model

For a barcode as information source, the one-dimensional channel response determines the propagation of the barcode signal through the channel. The received signal R(x) is a convolution of the barcode g(x) and the one- dimensional channel response h(x), regarding to the position on the X-axis as described with Equation 5.1:

R(x) = g(x) ∗ h(x) (5.1) This method to describe the propagation of the signal trough the channel is taken from telecommunications and barcode technology, as explained in subsection 2.2.3. It means that the barcode signal that consists of black and white stripes is distorted by the channel as illustrated in Figure 5.2.

Figure 5.2: The received signal is a convolution of the transmitted barcode signal and the channel response

5.3 Optical model

Earlier, in subsection 4.2.2, simple two-dimensional optics theory was used to describe the effect of adding a lens to the receiver. A three-dimensional model must be made to describe completely the optical behaviour of the system. The model will be evaluated in section 5.4. I have simulated the diffuse light channel using ray-tracing simulations implemented in MATLAB to verify the basic insights. Optical simulators that are available for free do not allow to perform ray-tracing of diffuse reflections, thus I had to implement it myself. I have simulated the receiver both with and without lens, such that the effect of adding a lens could be verified in 3D. In the following subsections is described how I implemented the diffuse reflection at the surface and the refraction of light beams at the lens.

28 Figure 5.3: Each light beam has a polar angle θ and an azimuth angle φ

5.3.1 Surface reflection The surface or information source is assumed to be illuminated with uniform light intensity and to reflect all the light diffusely. The surface is simulated as a regular grid of point light sources. Each light source gives a set of light beams that represent the diffuse reflection of any light beam on the surface. Each beam has a polar angle θ, an azimuth angle φ, a corresponding light intensity i and they are spread out over a half sphere. A visualisation of the angles is shown in Figure 5.3. The polar angles have range [0.5δθ, 0.5π) with all beams separated by an angular difference of δθ and the azimuth angles cover the range range [0, 2π) with an angular difference δφ. The corresponding surface on the virtual half sphere for a light beam (θ, φ) then scales with sin θ and is independent of φ. As explained in section 2.1, light intensity of a diffuse reflection scales with cos θ according to Lambert’s cosine law. The illumination of the surface is uniform. Except for a constant scaling factor, the light intensity i for the diffuse reflected light beams is thus given by Equation 5.2:

i(θ, φ) = cos θ · sin θ (5.2)

5.3.2 Lens refraction Refraction of light when passing through a surface is described by Snell’s law, provided in Equation 5.3. It states a relationship between the incident angle θ1, the outgoing angle θ2 (both measured towards the surface normal) and the refractive indexes n1, n2 of the media before and after the surface: sin θ n 1 = 2 (5.3) sin θ2 n1 The propagation direction projected on the surface will remain the same before and after the refraction. In vector form, we can thus describe the

29 refraction using Snell’s law in the surface in which the light beam propagates before and after the refraction. Lets ˆ1 the normalized incident light beam, Nˆ the normal vector of the surface, and T be the cross product of both as in Equation 5.4, pointing in a direction perpendicular to the surface normal and the incident light beam:

T = Nˆ × sˆ1 (5.4) Then the surface in which all light beams propagate, is described by its normal vector T . In this surface, the refracted light beam s2 can be described ˆ as the sum of the component s2k projected on the surface normal N and the component s2⊥ perpendicular to Nˆ. The length of the components is:

p 2 ||s || = ||s2|| · cos θ2 = ||s2|| · 1 − (sin θ2) 2k (5.5) ||s2⊥|| = ||s2|| · sin θ2 Using the length of the vector T , given by Equation 5.6,

||T || = ||Nˆ|| · ||sˆ1|| · sin θ1 = sin θ1 (5.6)

we can derive a vector form of Snell’s law as provided in Equation 5.7:

r 2 n1 ˆ ˆ n1  s2 = s2⊥ + s2k = · (N × T ) − N · 1 − · T (5.7) n2 n2 The lens used in the test setup is a plastic positive lens with a radius of curvature on the first surface of R1 = 7.6cm and a radius of curvature of R2 = −7.6cm at the second surface. The focus distance is measured to be f = 6.5cm and the lens thickness d = 0.2mm. Then using the lensmaker’s equation provided in Equation 5.8 we find that the refractive index of the used lens is n = 1.587.

1  1 1 (n − 1)d = (n − 1) · − + (5.8) f R1 R2 nR1R2 The vector form of the Snell’s law (Equation 5.7) is used in the ray-tracing simulations for the refraction of light beams at both sides of the lens. Faster computations of the refraction could be done by approximating the lens as a thin lens, but those computations are less accurate.

30 5.4 Validation of the optical simulations

I have executed the validation of the optical system with the testbed in two steps. The first step is to verify if a linear relationship exists between the captured light intensity and the output signal of the testbed. If a linear relationship exists, the output signal can directly be mapped to the received light intensity. In subsection 5.4.2 an area is determined that can be used for this verification and in subsection 5.4.3 the linear relationship is verified. The second step is the actual validation of the simulated optical response and can be found in subsection 5.4.4.

5.4.1 Measurement setup The measurements of the optical response have been performed with the e-ink display, divided in a grid of squares as in Figure 5.4. If we color only one of the squares black, we can measure the signal inferred by that subarea. If the electrical signal linearly maps to the received light intensity, we can measure the received light intensity from any square on the screen. For each of the squares in the grid a sequence has been performed, com- posed of four steps. The first step is a full refresh of the display. The second and third step are setting the screen to complete black and complete white, to take reference values. These reference values for black and white are re- quired because the ambient light intensity can change over time. The last step is to set the target square to black, with the rest of the screen white. During the setup of the measurement sequences, it was shown that it could take up to one second to get a stabilized sample value of the light intensity. Therefore, one sequence takes about 4.6 seconds. The sequences are shown automatically on the e-ink display using a Raspberry Pi controlling the dis- play. Depending on the resolution of the grid, a measurement of the optical response could take up to 79 minutes for a resolution of 32x32 squares. The samples of the receiver output values have been taken at 500 Hz. To process the samples, a moving average filter on 80 elements has been applied, resulting in an effective sample rate of 4 Hz with better SNR and increased resolution.

Figure 5.4: We can divide the e-ink display in a grid of squares and make one square black to measure the response to that subarea

31 5.4.2 Finding an area with constant optical response In order to verify if a linear relationship exists between the captured light intensity and the output signal, we want to determine an area on the e-ink paper that can be used to do this verification. Ideally, we would have an area that provides constant optical response. For a system without lens, such an area exists indeed according to the simulation results presented in Figure 5.5. The peak of the optical response covers a large part of the detection area. I have measured the channel response for a system without lens at 31.4 cm distance from the receiver. The results in Figure 5.6 show a response that matches to a receiver in which the aperture is not perfectly aligned to the photosensor, but has an offset of 1 mm on the Y-axis. We can see that no peak area exists with constant response, but a circular area (with diameter between 1.0 and 1.5 cm) exists in which the response is approxim- ately independent of the position on the X-axis. Within the circular area, the response stays approximately constant as long as the position on the Y-axis does not change.

Figure 5.5: Simulated response of a perfectly aligned system without lens

Figure 5.6: Simulation (left) and measurement (right) response of a system without lens

32 5.4.3 Linearity of the receiver Before quantitatively comparing received light intensities, the relation between the light intensity and the ADC output value should be checked to be linear. If a linear relationship exists, the output signal can directly be mapped to the received light intensity. Parts of the total output range can be checked for linearity by gradually changing the amount of white/black pixels within an area on the screen with constant response. According to the results presented in subsection 5.4.2, there is no area with perfect constant sensitivity with the current receiver, but the response is constant for a fixed position on the Y-axis (fixed height). Therefore, no two- dimensional area can be used to perform the linearity check, but we could use lines parallel to the X-axis. I chose a rectangular area that is filled from left to right with black to perform the linearity check. The transitions for all positions on the Y-axis within the rectangle are then applied simultaneously, to maintain constant influence for all performed changes. By changing the amount white/black pixels in other screen parts within the detection area or by changing the intensity of ambient light, the linearity was checked sequentially for different parts of the output range to cover the output range. The result of the measurements is shown in Figure 5.7. The vertical peaks are full refreshes of the e-ink display combined with a change outside the maximum sensitivity area. Between the peaks, always the same changes within the maximum sensitivity area were performed. The parts between the peaks can tell us if that part of the output range is linear. The dia- gram shows that for output values above 870, there is no linear relationship between the light intensity and the output value. Therefore, with quantit- ative measurements with this setup the output values must be ensured to be below 870. This value holds for the testbed that I have used and should be redetermined if the electrical circuit is changed.

Figure 5.7: The linearity check sequences shows a linear curve on most of the output range (650-870) of the circuit

33 5.4.4 Optical response with lens Knowing that the receiver output is linearly dependent on the light intensity for output values up to 870, the simulated channel response can be verified. I have measured and simulated the channel response for two different distances to the receiver: 37.4cm and 101cm.

Figure 5.8: Simulated (left) and measured (right) channel response with a distance of 37.4 cm

Figure 5.8 shows the simulated and measured channel response with a dis- tance of 37.4 cm between the information source and the receiver. According to the simulation the detection area should have a diameter of 6.8mm. The detection area found in the measurements is between 6.5 mm and 7.0 mm, matching the simulation. The channel response shows a flat peak in the simulation results that can not be found in the measurement result. This can be caused by the lower resolution of the measurements. The channel response with a distance of 101 cm is displayed in Figure 5.9. The measured detection area (diameter between 14 mm and 17 mm) again matches the simulated detection area with 16 mm diameter.

Figure 5.9: Simulated (left) and measured (right) channel response with a distance of 101 cm

34 5.5 Validation of the channel model

I validate the channel model in multiple steps. The first step is with direct measurement of the channel response characteristics in subsection 5.5.1. The second step is by looking at the received signal (subsection 5.5.2). The influences on the received signal of the signal frequency (subsection 5.5.3) and the light intensity (subsection 5.5.4) are highlighted separately. The last step in the performed validation is showing the signal quality and the influence of intersymbol interference in subsection 5.5.5.

5.5.1 One-dimensional channel response The one-dimensional channel response can be derived directly from the op- tical channel response in subsection 5.4.4 by integrating on the Y-axis. If the components of the receiver are perfectly aligned, the optical response has circular symmetry and the channel response is independent of the ori- entation of the barcode. If there is some misalignment in the receiver as in the used setup, the one-dimensional channel response varies depending on the direction of the barcode. With an aperture offset of 1 mm I have simulated the response with rotations of the object of -45°, 0°, 45° and 90°, as in Figure 5.10. The results of this simulation are shown in Figure 5.11.

Figure 5.10: A rotation of 90° of the barcode object

Figure 5.11: Simulated channel response for different rotations of the in- formation source at 37.4 cm (left) and 101 cm (right) distance

35 Figure 5.12: Measured and simulated channel response at 37.4 cm (left) and 101 cm (right)

I have measured the one-dimensional channel response with a distance of 37.4 cm (once) and 101 cm (four times) to the receiver. The results are compared with the simulations and shown in Figure 5.12. It can be seen that the response peak in the measurements at 37.4 cm is wider than expected from the simulations. This effect can probably be attributed to non-ideal optical characteristics. At 101 cm distance the simulation matches the actual measurements better.

5.5.2 Received signal

I have tested the receiver with a barcode passing at several distances. Fig- ure 5.13 shows the test result of a barcode with a module of 4.23 mm at 37.4 cm distance. It is compared with the signal simulated with the chan- nel response from subsection 5.5.1 and the signal simulated with the optical simulations. Due to the difference between the measured channel response and the optical simulations (see subsection 5.5.1), the simulation result from the channel response matches the received signal better.

Figure 5.13: Received barcode signal at 37.4 cm (module 4.23 mm)

36 When zooming in on the received barcode signal as in the right graph of Figure 5.13 we see that the amplitude difference is only 16 quantization steps of the ADC. The signal from the receiver is thus very sensitive to quantization noise.

5.5.3 Influence of the signal frequency I have used a spinning disk with a barcode for testing the system with different frequencies of the barcode signal up to 250 Hz. Figure 5.14 shows some frames of the captured signal in an environment with low illumination. The maximum frequency of the barcode signal in the displayed frames was 52 Hz and 135 Hz respectively. In the heights of the peaks it is clearly visible that the barcode signal is distorted at 135 Hz. In a sunny environment this kind of distortion is absent as can be seen in Figure 5.15. The higher energy in the captured light (more photons reaching the phototransistor) results in better performance of the receiver. The distortion pattern that can be seen in Figure 5.15 (unequal but repetitive peak heights), was visible at all speeds and is due to the properties of the disk and the position of the sun.

Figure 5.14: Received signal with a signal frequency of 52 Hz (left) and 135 Hz (right) in a low-light environment

Figure 5.15: Received signal with a signal frequency of 70 Hz (left) and 214 Hz (right) with direct sunlight

37 5.5.4 Influence of light intensity The graph in Figure 5.16 shows that the received light intensity near the beginning and the end of the barcode is about 15% to 20% higher than at the middle section of the barcode. The object containing the barcode can cause a shadow on nearby surfaces, lowering the intensity of the light reflected by those surfaces. Because the object moves, the shadows will move too, as illustrated in Figure 5.17. Thus, the information source can create variations in the ambient light intensity reaching itself.

Figure 5.16: The light intensity from a received barcode can be higher near the start and end. The barcode was again at 37.4 cm (module 4.23 mm)

Figure 5.17: The object containing the barcode can make shadows between the object and the receiver when it is illuminated from the back

When objects near the barcode surface are removed, less shadows nearby will be caused by the object. Then the ambient light is expected to approx- imate a constant intensity better. The illumination in such an environment was tested using a photocamera and analysis of the photo. It showed that the left stripes of the barcode in the photo of Figure 5.17 were still 8% more illuminated than the center of the barcode. The first stripes were about 2% more illuminated. We can conclude that it is wrong to assume that the ambient illumination is always constant. If we would describe the illumination of the barcode part in the detection area with a function L(x), the received signal from Equation 5.1 could be extended to something like Equation 5.9:

R(t) = L(t) · g(x(t)) ∗ h(x(t)) (5.9)

38 5.5.5 Intersymbol interference As described in the previous sections, the transmitted signal is distorted by the channel. The channel response of our system and the convolution distor- tion are mostly dependent on the module of the barcode and the distance. The distance determines the width of the channel response and it can occur that more than one stripe of the barcode is within the detection area.

Figure 5.18: Having multiple stripes in the detection area causes interference

If multiple stripes fit within the detection area, it is possible to have a bar surrounded by two spaces within the detection area, or space surrounded by two bars, as shown in Figure 5.18. The surrounding stripes make part of the received signal ant interfere with the centered stripe. This process is called intersymbol interference. When interfering stripes completely cancel out each other, it is clear that a basic threshold detector can not work anymore for recovering the original signal. Distortion of a signal is often shown with an eye pattern. In an eye pattern, the signal is repetitively sampled and the samples are overlayed in the diagram. Details about reading eye patterns can be found in [6]. From the received signal presented in Figure 5.16, we show the eye pat- terns in Figure 5.19. The simulated eye pattern clearly shows the behaviour of intersymbol interference: not all peaks representing a white stripe have the same amplitude. The eye pattern from the measurements is obtained after filtering with a moving average filter over 60 samples to minimize the effect of quantization noise. We can see that the amplitude is not constant, due to the changes on the illumination as described in subsection 5.5.4. Des- pite the changes in illumination a static threshold at 0.6 would still work to decode the barcode from the results of this measurement.

Figure 5.19: Simulated (left) and measured (right) eye pattern

39 5.6 System constraints

A strict lower bound on the module of the barcode is determined by the channel response, because intersymbol interference can result in zero amp- litude difference between narrow black and white stripes. The optical system can be simulated to approximate the half-power width that should be equal to the minimum required module. A quick approximation of the minimum module m can be obtained from Equation 4.6 in subsection 4.2.2 that uses a basic 2-dimensional model. This estimation is given by Equation 5.10, in which sp (phototransistor size), sg (gap size), dp (distance between the phototransistor and the gap), dbc (distance between the barcode and the receiver) and di (image distance, dependent on the lens strength) are as explained in subsection 4.2.2:

1 1  dbc |dbc − di| mmin = · A = · sp · + sg · (5.10) 2 2 dp di The resulting estimated minimum module is compared in Figure 5.20 with the values obtained from the simulations and measurements. We can see that Equation 5.10 overestimates the simulated values and the measured value at 101 cm distance. Because we know that the module should always be larger than the minimum required value, we could use the estimation as rule of thumb when designing a passive light communication channel.

Figure 5.20: Minimum required module for barcodes at a certain distance

A second constraint of the system is a combination of the illumination of the information source and its diffuse reflection coefficients. For all presented models and experiments assumptions are made that the illumination and contrast are sufficient enough to detect differences between black and white stripes. The contrast depends on the diffuse reflection coefficients of the

40 black and white parts on the surface, the ambient illumination of the surface and the chosen module. A module of at least two times the minimum module can be chosen to enlarge the contrast between narrow stripes, at the costs of data throughput.

5.7 Channel capacity

The capacity in the presented channel depends on the length of the informa- tion source and the chosen module m of the barcode. Note that the module must be larger than the lower bound that is estimated in section 5.6. The length of the information source expressed in modules gives the maximum number of stripes that can fit on the information source. The maximum data is shown in Figure 5.21 and can be calculated from the barcode length in modules and the used barcode scheme. The graph shows that for two-width barcodes (ITF) [26] always outperforms Code 39 [25]. The multiwidth barcode schemes Code 93 [7] and Code 128 [10] provide more capacity for barcodes longer than 150 modules. Due to the larger overhead in Code 93 and Code 128, including one or two check digits, ITF has the highest capacity with short barcodes.

Figure 5.21: Maximum data stored in a barcode

If we would use barcodes to encode all vehicle registration plates on cars in the Netherlands, we would need to encode sets of 6 positions that can be filled with 34 possible characters (all digits and letters except for the I and Q). Then at least 31 bits of data is required per barcode or registration plate. Using ITF as encoding scheme, each number plate would fit in a barcode of 93 modules including the quiet zones. The current receiver is able to scan barcodes with a module of 1 centimeter at a distance of 1 meter, requiring barcode lengths of 93 cm to encode all Dutch vehicle registration plates.

41 42 Chapter 6

Decoding algorithms

As described and analysed in chapter 5, the received signal is no perfect representation of the barcode. To retrieve the original barcode from the received signal, an algorithm must be used to decode the waveform into the actual set of barcode stripes. In this chapter the main difficulties in decod- ing our received signal are described in section 6.1, and multiple decoding algorithms are compared by their feasibility in section 6.2. In section 6.3 the implemented decoding algorithm is described and the performance of the algorithm is shown in section 6.4.

6.1 Challenges

Depending on the application and the environment, certain conditions can make it less convenient to decode the received signal. During the project several conditions were identified as a challenge and are listed below:

• Unknown speed of the object: The speed of the information source is unknown and the signal frequency canbe in a very broad range. If the information source would be a car, it could pass by at 5 km/h resulting in a low signal frequency, or at 50 km/h inferring frequencies ten times higher. The decoding algorithm should be able to handle a wide range in the frequency of the barcode signal.

• Speed of the barcode can fluctuate: Movement in everyday life happens hardly ever at constant speed. Changes in friction can influ- ence the speed of an object at a small scale when trying to maintain constant speed. Larger fluctuations could occur when a car that acts as an information source needs to break, or when it is accelerating. Small or gradual changes in speed should not form major problems for decoding the barcode.

• Fluctuating illumination: The design of the system assumes that the information source is illuminated uniformly. As described in sub-

43 section 5.5.4 illumination can easily change because of (diffuse) shad- ows. At daytime clouds can cause gradual changes in the light intensity too. A receiver should be able to correct for the slow changes in il- lumination. More abrupt changes due to lights being turned on/off occur less often, but can cause extensive noise on the signal.

• Small signal amplitude and quantization noise: In our system the received signal has integer values between 610 and 870 that linearly scale to the light intensity of the reflected light. The sensitivity of the receiver is approximately 0.065 lux−1, meaning that in low-illuminated environments the maximum signal amplitude is very limited. With an illumination of 400 lux, matching to a mildly illuminated room, the amplitude difference is 26 at maximum. Because of the low amplitude, the signal has relatively large quantization noise. Despite the quant- ization noise, the barcode signal should still be decodable. A part of the issue of having a small signal amplitude could be solved by enhancing the gain in the electrical circuit. In any case, the dynamic range of the system should be large such that the system works in an environment with a lot of daylight (10000 lux) and in low-illuminated rooms (400 lux). Non-linear gain (logarithmic) or an ADC with higher resolution than the current 10 bits would work better in enhancing the signal amplitude.

• Robust start detection: The start and end of the barcode can be detected by the quiet zone, before and after the stripes. The quiet zone must be larger than any stripe in the barcode, to ensure that it will give larger received light intensity than the spaces in the barcode do. Most laser scanners detect the quiet zone as a large peak, as the laser is reflected maximally. The quiet zone is often defined with a size of at least 10 modules [20]. With a passive scanner, this method of detecting the quiet zone can cause problems when the information source is less illuminated than anything behind the object with the barcode. The quiet zone then can be preceded by a downwards slope in the signal instead of an rising edge, as shown in Figure 5.16. Deficient detection of the quiet zone before the barcode can result in faulty detection of the width of the first bar in the barcode. As described in subsection 2.2.2 nearly all barcode encoding schemes have the same width for the first and last bar. Using the constraints of the encoding scheme, the width of the first bar can be obtained from the width of the last bar.

• Distance of the barcode is unknown: Although this challenge is more or less related to the design of the communication channel, a lot of applications exist in which the distance between the barcode and

44 the receiver is unknown. The channel response is dependent on this distance, thus matched filtering on the channel response is not directly possible.

• 50/100 Hz interference from light sources: In indoor environ- ments most light sources operate directly or indirectly on 50 Hz AC. In most of these light sources the provided light intensity oscillates at this frequency or twice this frequency. I would suggest to implement a high-pass filter for indoor applications, but it can only work if the speed and information density of the information source is high enough to ensure that no frequencies around or lower than 100 Hz occur in the barcode signal. A low-pass filter could be used if the speed is low enough to have only frequencies lower than 50 Hz in the barcode signal, but it will set a low upper bound on the maximum data througput.

6.2 Comparison of decoding methods

In this section multiple decoding algorithms are described and compared. An algorithm should be able to derive the original barcode from the received signal. Therefore each stripe of the barcode must be extracted and marked with two properties: a color (black or white) and a width (narrow or wide). Composing the barcode message from a set of stripes is marked as trivial when the encoding scheme is known, thus I do not discuss that step in this section.

6.2.1 Threshold detectors

Threshold detectors are one of the most basic methods to decode a received signal into a set of black parts (value 0) and white parts (value 1) and are commonly used in decoding electrical signals. A threshold value is determ- ined and the signal values are compared to this threshold as illustrated in Figure 6.1. If the signal is higher than the threshold the value is assumed to 1 and if the signal is lower than the threshold the value is assumed to be 0.

Figure 6.1: A signal with the outcome of a threshold detector

45 Each stripe in the barcode is recognized as a set of consecutive ones or consecutive zeros and is characterized by a color (black or white) and a time duration. For each detected stripe the time duration must be compared to a second threshold to determine whether a stripe is narrow or wide. The second threshold could for example be at 20µs. A stripe that is detected for 15µs would then be classified as narrow, while a stripe that is detected for 30µs then would be classified as wide. In our system the ambient light intensity can vary, causing a signal range that changes over time. Therefore a threshold detector can only be used if the algorithm continuously adapts the threshold depending on the minimum and maximum values of the received signal. Such a dynamic threshold de- tector would require to have some form of peak detector running to detect the envelope of the signal.

6.2.2 Analog edge detectors

Barcode scanners commonly use edge detectors for decoding a barcode sig- nal. Edge detectors try to find the point with the steepest slope for every signal transitions. These points are marked as edges and represent the center of transitions. The first derivative of the received signal, as displayed in Figure 6.2 is used to find these edges in the original signal. When the first derivative is at a maximum or minimum value, an edge is detected. Each edge is characterized by a time and an edge strength that is equal to the value of the first derivative. A negative edge strength matches to a downward slope in the signal, thus a transition from white to black. A positive edge strength matches to a transition from black to white. In barcode scanners the edge detector is often implemented with an analog differentiator to take the first derivative signal. The derivative of the signal should always be amplified with a constant factor matched to the expected frequency and amplitude of the signal. This is because for a fixed signal amplitude, a lower frequency lead to lower values in the derivative of the signal. As we have a very wide range for the expected barcode frequency, we can not rely on the derivative of the signal. In [19] an enhanced edge detector is proposed that is less sensitive to convolution distortion. They use Gaussian filtering to enhance edges that otherwise would not be detected. This filtering technique works for barcode scanners, because the laser beam profile can be estimated with a Gaussian curve. I do not expect that Gaussian filtering can work in the current setup due to the large quantization noise.

46 Figure 6.2: A signal (top) and the first derivative of this signal (bottom), with marked edges (left) and peaks (right)

6.2.3 Digital edge detectors

A digital edge detector could be implemented that finds changes in amp- litude disregarding time or frequency, by comparing the signal amplitude to a previous minimum or maximum value. If the signal has become x higher than the previous minimum value, an edge from black to white is detected. If the signal has become x lower than the previous maximum value, an edge from white to black is detected. The saved minimum and maximum values can be discarded after detecting an edge. Such an edge detector is unable to find the point with steepest slope, but it can be used to find the start of each edge and works with small changes in the signal amplitude.

6.2.4 Peak detectors

In [11] a peak detector is proposed for decoding barcode signals, in com- bination with a so-called midpoint estimator. The peak detection algorithm makes use of the first derivative of the received signal, as shown in Figure 6.2. When the first derivative of the signal crosses zero, a peak is detected on the original signal. As stated in their paper, such a peak detector is sensitive to noise or needs large enough amplitudes for noise removal. Even a small amount of noise can cause large timing errors in the detection of peaks. Such an algorithm is thus unsuitable for our current system that suffers from quantization noise.

6.2.5 Blind deconvolution

Blind deconvolution of barcode signals is proposed in [8]. The channel re- sponse is approximated with an unknown Gaussian kernel, that might be a good approximation for the channel response in our system. The proposed algorithm estimates the width of the Gaussian kernel in respect to the re-

47 ceived signal. It then performs bounded deconvolution concerning a noise factor as uncertainty. More details about this method can be found in [8]. The paper shows that theoretically the barcode still could be retrieved from the signal with a detection area about ten times larger than the module of the barcode. Nevertheless, deconvolution is unable to handle fluctuations in light intensity (signal amplitude) or (scanning) speed of the barcode. Thus in a system like ours without control over the light emitter and speed of the information source, blind deconvolution is not a real option.

6.2.6 Summary An overview of the discussed decoding methods is provided in Table 6.1. In our system the signal amplitude can be small and we have no control over the light emitter and the information source. Then a dynamic threshold detector or an edge start detector is the best option to choose. If the passive light channel would be used in an environment where the information source or light emitter are controlled, one might choose or develop a different and better decoding method.

Decoding method Challenge Unknown speed Fluctuations in speed Fluctuating Illumination Small signal amplitude Threshold detector X X × X Dynamic threshold detector X X X X Analog edge detector X X X × Enhanced edge detector [19] X X X × Digital edge detector X X X X Peak detection with midpoint estimator [11] X X X × Blind deconvolution [8] X × × × Table 6.1: Comparison between decoding methods

6.3 Implementation of a detection algorithm

I have implemented a detection algorithm that can be executed in real- time and decode two-width barcodes only. The algorithm is based on a digital edge detector finding the start of all edges in the signal. An edge is detected when the signal amplitude has changed with at least x quantization steps of the ADC output value. The edge threshold x was heuristicly chosen between 4 and 8, depending on the light conditions. Edges are only detected

48 if the polarity is different from the previous saved edge to prevent that one edge is detected repeatedly. The stripes that are bounded by the detected edges are saved with two properties: a color (black or white) and a time duration representing the width of the stripe. An examplary result of this edge detector is shown in Figure 6.3.

Figure 6.3: The detected edges and decoded signal from a received signal

The saved stripes are further processed when at least 8 stripes are detec- ted. We assume 8 stripes to be the minimum length of a message. For both of the colors, the minimum occurring width (time duration) is found and all stripes with a width less than 1.5 times the minimum width are classified as narrow. Then the average width of the narrow stripes is determined and a reclassification based on the average width is performed. All stripes that have a width less than 1.4 times the average width of narrow stripes are classified as narrow, all others as wide. This way, the decoding algorithm can compensate for some speed fluctuations in the barcode signal. Detected stripes wider than 3.2 times the average width of narrow stripes are assumed to be the quiet zone or being not a part of the actual barcode. If the barcode is followed by a period of detected white that could be the quiet zone, the barcode is assumed to be scanned completely and output is given.

49 In section 6.1 we mentioned that it can be challenging to correctly detect the width of the first stripe, but the first bar always has the same width as the last one. Therefore, the algorithm marks the width of the first bar as unknown and fills it with the width of the last bar as soon as the barcode has been scanned completely. Finally, the output can be processed as any two- width barcode type (code 39, ITF, etc.) to retrieve the actual represented data.

6.4 Performance

I have executed a few measurements to show the performance of the im- plemented decoding algorithm with the current setup. The tests have been done with the disk presented in subsection 4.1.2 at two different distances and with different rotational speeds of the disk. Each test run took 20 seconds at a fixed sampling rate of 50 kHz. The results are shown in Table 6.2, showing the heuristicly determined threshold of the edge detector and the ratio of the correctly decoded mes- sages. When the rotational speed of the disk is low or the disk is illuminated with direct sunlight, the transmitted barcode is nearly always correctly de- coded. At high speed with illumination, the decoding ratio drops drastically due to the distortion mentioned in subsection 5.5.3. It is clear that we can use ambient light for passive communication, but the performance drops in low light conditions when the signal frequency is increased.

Barcode signal Number of Edge Correctly frequency Distance Lighting messages threshold decoded 25 Hz 37 cm Low 24 6 100% 60 Hz 70 cm Low 56 6 98.2% Varying 37 cm Low 116 4 84.5% Varying 70 cm Low 115 4 86.1% 195 Hz 37 cm Low 184 4 57.6% 220 Hz 70 cm Low 209 4 49.3% 212 Hz 37 cm Sunlight 201 8 100% 215 Hz 70 cm Sunlight 204 8 99.5%

Table 6.2: Decoding performance of the system

50 Chapter 7

Conclusions and future work

7.1 Conclusions

This work has presented a communication channel that reuses ambient light. By reusing light that is already present, a static message can be read with a low-power (6 mW) receiver. Details about the power consumption can be found in Appendix B. If the information source that wants to transmit a message is moving, it can send a static message passively with diffuse reflections, because having a barcode on its surface consumes no energy. The behaviour of the communication channel can be described by the channel response that has been simulated using optics theory and a ray- tracing tool. A developed testbed was used to validate the model and some small differences with the modeled response were found. The channel response was used to model the resulting signal that can be received from a moving barcode and to determine the limitations of the system. The model was compared with measurements, showing that the ambient light intensity has a large influence on the received signal and can be altered indirectly by the transmitting object. It was shown that the receiver of the testbed can give a distorted signal when the frequency of the barcode signal was above 100 Hz. The theoretical maximum capacity of the channel can be determined from the minimum module of the barcode, the available size for a barcode and the chosen encoding scheme. The minimum module can be computed with the presented ray-tracing model, or estimated with a more simple formula. The challenges in decoding the received signal were listed and some de- coding methods were compared. A simple edge start decoding algorithm was implemented in the testbed for decoding received signals. The decod- ing algorithm is suitable for all existing two-width linear barcode encoding schemes. The performance of the receiver was tested under a few different con- ditions as a proof that the presented system works. In a well-illuminated

51 environment the correct decoding ratio was still above 99% for information transmitted at a frequency of 215 Hz. In a low illuminated environment a correct decoding ratio of 98% was achieved with a signal frequency of 60 Hz.

7.2 Future work

The presented work covers research about the use of light to transmit and receive information. I think that the achieved system still can be improved a lot and that there are many more methods in which light could be used for gathering data or sending information. Below my current ideas are listed about transmitting information using ambient light only that are directly related to this thesis. The ideas are divided in two groups: engineering and research. The engineering proposals are mostly ideas on how to enhance the presented system, while the others show potential future research. I would love to see someone solving one or more of the proposed ideas.

Engineering:

• Enhance the performance of the receiver: The current receiver shows large unwanted distortions in the signal for frequencies above 100 Hz. The electrical design can be improved to achieve robust scan- ning of barcodes at higher frequencies.

• Reduce the detection area: Consumer product barcodes have a module of 0.3 mm that is about 20 times smaller than the achieved de- tection area at a distance of 40 centimeters. By reducing the gap size, the detection area could be made smaller. Concurrently the electrical circuit should be improved to obtain higher sensitivity. Probably, this can be achieved with additional amplifiers, removing the current offset voltage of 2.4V and enhancing the gain. The ultimate goal would be to have a spot size of 0.5 mm maximum.

• Optimize the hardware design of the receiver for mobile and sustainable deployment: The current receiver consumes about 6 mW of power and requires to have two different batteries. At least one battery is required for a stable supply voltage, but it might be charged at the same time using solar panels. Lower energy consump- tion is recommended to keep the device running with only solar panels. Therefore, the receiver should be optimized for low power consumption and equipped with solar panels.

52 Research:

• Try to set up a passive channel without direct line of sight: The work presented in this thesis can be combined with the work of Retro-VLC [13] [28]. Combination of both works might be as easy as using the receiver presented in this thesis and a backscattering tag of Retro-VLC as information source. It will enable a one-way time- modulating passive light channel as described in section 3.4. If experiments show that the current receiver can indeed be used with tags that use their surface to modulate light, a communication channel without direct line of sight would be the next step to be researched. A non-line-of-sight system would require filtering on the transmission frequency and probably requires high-resolution ADCs.

• Investigate the interference caused by indoor light sources: As explained in chapter 6, light sources operating on AC power can cause noise at 50 Hz and 100 Hz. These frequency components could be filtered out using a high-pass filter if the barcode signal works at higher frequencies. It might be possible to filter the oscillations of the light source in a different manner, e.g. using a smart method to recognize and match the waveform induced by the light source. LED lighting in indoor environments can be used with VLC. LED lights that act as active VLC transmitters are switching their state at much higher frequencies than other light sources. It’s to be expec- ted that the performance of the current passive system will degrade tremendously when it is used near fast toggling LEDs. It should be investigated if our passive communication system can be adapted to work in a room together with active VLC transmitters.

53 54 Bibliography

[1] H. Beneking. Gain and bandwidth of fast near-infrared photodetectors: A comparison of diodes, phototransistors, and photoconductive devices. IEEE Transactions on Electron Devices, 29(9):1420–1431, Sept. 1982. [2] Pierre Boher, Thierry Leroux, and Thibault Bignon. Spectral brdf of color shifting paints and e-papers using multispectral fourier optics instrument. In SID Conference Record of the International Display Research Conference, pages 116–119, 2011. [3] Bettina Boxall. Golden gate bridge is prepared for 75th birthday celebration. Los Angeles Times, May 2012. [4] Brent Burley and Walt Disney Animation Studios. Physically-based shading at disney. In ACM SIGGRAPH, volume 2012, pages 1–7, 2012. [5] Hee-Jin Chae, Mastooreh Salajegheh, Daniel J Yeager, Joshua R Smith, and Kevin Fu. Maximalist cryptography and computation on the wisp uhf rfid tag. In Wirelessly Powered Sensor Networks and Computational RFID, pages 175–187. Springer, 2013. [6] Anritsu Corporation. Understanding Eye Pattern Measurements, Mar. 2010. [7] Morovia Corporation. Code 93 Specification, Dec. 2012. [8] Selim Esedoglu. Blind deconvolution of bar code signals. Inverse Problems, 20(1):121, 2003. [9] International Organization for Standardization. Freight containers – Radio frequency identification (RFID) – Licence plate tag. Standard, International Organization for Standardization, Geneva, CH, Mar. 2009. [10] GS1. GS1 General Specifications, July 2017. [11] E. Joseph and T. Pavlidis. Bar code waveform recognition using peak loc- ations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(6):630–640, Jun 1994. [12] J. H. Lambert. Photometria. Eberhard Klett Verlag, 1760. [13] Jiangtao Li, Angli Liu, Guobin Shen, Liqun Li, Chao Sun, and Feng Zhao. Retro-vlc: Enabling battery-free duplex visible light communication for mobile and iot applications. In Proceedings of the 16th International Workshop on Mobile Computing Systems and Applications, HotMobile ’15, pages 21–26, New York, NY, USA, 2015. ACM. [14] Derek Molloy. Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux. Wiley, 2014. [15] B. Nelson. Punched Cards to Bar Codes: A 200 Year Journey. Helmers Publishing Company, 1997. [16] T. Pavlidis, J. Swartz, and Y. P. Wang. Fundamentals of bar code information theory. Computer, 23(4):74–86, April 1990.

55 [17] Bui Tuong Phong. Illumination for computer generated pictures. Commun. ACM, 18(6):311–317, June 1975. [18] Sharp Corporation. PT480/PT480F Narrow Acceptance Phototransistor. [19] S. J. Shellhammer, D. P. Goren, and T. Pavlidis. Novel signal-processing tech- niques in barcode scanning. IEEE Robotics Automation Magazine, 6(1):57–65, Mar 1999. [20] TEC-IT Datenverarbeitung GmbH. Barcode Quiet Zones. [21] APM Terminals. Gate procedures. http://www.apmterminals.com/ operations/europe/aarhus/procedures/gate-procedures. [22] Menno van der Reek. Energy-efficient electricity-meter monitoring. MSc thesis, TU Delft, Delft, The Netherlands, Jun 2017. [23] Q. Wang, D. Giustiniano, and D. Puccinelli. An open source research plat- form for embedded visible light networking. IEEE Wireless Communications, 22(2):94–100, April 2015. [24] Qing Wang, Marco Zuniga, and Domenico Giustiniano. Passive communica- tion with ambient light. In Proceedings of the 12th International on Conference on Emerging Networking EXperiments and Technologies, CoNEXT ’16, pages 97–104, New York, NY, USA, 2016. ACM. [25] Wikipedia. Code 39 — Wikipedia, the free encyclopedia. [26] Wikipedia. Interleaved 2 of 5 — Wikipedia, the free encyclopedia. [27] Hongjia Wu. Co-design of smart lighting and communication for visible light networks. MSc thesis, TU Delft, Delft, The Netherlands, May 2017. [28] Xieyang Xu, Yang Shen, Junrui Yang, Chenren Xu, Guobin Shen, Guojun Chen, and Yunzhe Ni. Passivevlc: Enabling practical visible light backscatter communication for battery-free iot applications. In Proceedings of the 23rd Annual International Conference on Mobile Computing and Networking, Mo- biCom ’17, pages 180–192, New York, NY, USA, 2017. ACM.

56 Appendix A

Comparison photodiode / phototransistor

In the testbed design I made the choice to replace the OPT101 photodiode with a PT480 phototransistor, because phototransistors are known to have a better signal to noise ratio. I made a comparison in the signal quality of the received barcode signal with both photosensors. The used information source was the disk presented in subsection 4.1.2. The results of the comparison can be found in Figure A.1, showing that the signal with the photodiode indeed suffered from a lot more noise. We can confirm that the PT480 phototransistor was indeed the better choice.

Figure A.1: The received signal with the OPT101 photodiode (left) was more noise than with the PT480 phototransistor (right)

57 58 Appendix B

Power Consumption of the testbed

The power consumption is determined by measuring the voltage and current for all power sources of the receiver. The receiver has two power sources, both batteries, as presented in subsection 4.2.4. A third power source is the USB power of the BeagleBone that the receiver is connected to. The results are displayed in Table B.1, showing that the receiver consumes 6 mW when sampling at 50 kHz. Additional power in the test setup is consumed by the BeagleBone (powered over USB) that stores and processes the ADC values. The BeagleBone consumes by far the largest part of the total power. Note that the whole system is not optimized yet for low power consump- tion. For example, the BeagleBone could be replaced by a microcontroller to become more power-efficient.

Power source Voltage Current Power Li-ion battery 4.1 V 26 µA 106 µW 3xAA batteries 4.8 V 1.23 mA 5.9 mW Receiver Total 6 mW USB (BeagleBone) 4.75 V 295 mA 1.4 W Total 1.406 W

Table B.1: Power consumption of the test receiver

59