Local Positioning System Using Flickering Infrared LEDs

A minimalistic optical sensing device for the indoor localization is proposed to estimate the relative position between the sensor and active markers using amplitude modulated infrared light. The innovative insect-based sensor can measure azimuth and elevation angles with respect to two small and cheap active infrared light emitting diodes (LEDs) flickering at two different frequencies. In comparison to a previous lensless visual sensor that we proposed for proximal localization (less than 30 cm), we implemented: (i) a minimalistic sensor in terms of small size (10 cm3), light weight (6 g) and low power consumption (0.4 W); (ii) an Arduino-compatible demodulator for fast analog signal processing requiring low computational resources; and (iii) an indoor positioning system for a mobile robotic application. Our results confirmed that the proposed sensor was able to estimate the position at a distance of 2 m with an accuracy as small as 2-cm at a sampling frequency of 100 Hz. Our sensor can be also suitable to be implemented in a position feedback loop for indoor robotic applications in GPS-denied environment.


Introduction
In the absence of global positioning system (GPS), an indoor positioning system must be used to provide a local position of the autonomous robot in a constrained environment with dust, smoke and various lighting conditions (darkness, half-light, and flickering light).
There are numerous existing technical solutions for the indoor localization using: (i) infrastructure such as ultrasonic signals [1], ultra wideband technology [2] and fingerprinting approaches with wireless sensors networks [3]; and (ii) onboard sensors such as monocular cameras, stereo imaging and Light Detection and Ranging (LIDAR). For industrial applications inside warehouses in [4], automated guided vehicles (AGVs) localize themselves by triangulation based on reflector landmarks detected by laser scanners. In [5], visual odometry for localization aims at estimating the pose of a vehicle through examination of the changes that motion induces on the images acquired by onboard cameras. In [6], in conjunction with signals produced from inertial sensors and wheel encoders, a map of the magnetic field was used to precisely localize an indoor robot without any additional infrastructure. Moreover, the inertial sensors such as accelerometers, rate gyros combined magnetometers can be used to estimate the angular position, velocity or acceleration of a mobile robot. However, the effect of noise on the integrated signals strongly affects the position estimation and leads to difficulties in getting the information with a high precision over a large amount of time. In [7], in the context of visible light communication, an indoor positioning system using multiple optical receivers composed of photodiodes (PD) provides coordinates and orientation of the mobile receiver with an achievable position error less than 0.1 m. In [8], a linear positioning system based on infrared (IR) beacon aims at localizing indoors pedestrians using a trigonometrical survey. The IR beacon is attached to the shopping bag. The receiver installed in the ceiling at the height of 2.3 m is a PD array and measures the angle of incidence of the beacon ray. Therefore, the indoor position of the IR beacon is calculated and an identifier signal is sent to a computer for processing via wireless communication.
In [9], using visible light communication, a novel indoor localization system is presented, where LED beacons determine the position of the target sensor, including a camera, an inclinometer, and a magnetometer. The localization is performed using geometric-and consensus-based techniques adapted to a high number of beacons and outliers. The tests presented show that the accuracy of the system is in the low decimeter range.
This paper proposes the development of a very different kind of indoor localization technique. A novel local positioning system is developed based on a bio-inspired optical and minimalistic sensor in terms of mass, size, cost and computational resources using photodiodes and flickering IR LEDs. As presented in [10], the comparison between charge couple device (CCD) image sensors, complementary metal oxide semiconductor (CMOS) image sensors and PDs pointed out the advantages of PDs in terms of speed, sensitivity, energy consumption and system complexity. Moreover, PD is easy to fabricate and has low production costs. As proposed in [11], LEDs offer advantageous properties such as reliability, lower power consumption, long lifetime and can be used as a communication device. For optical communications in free space under fog and smoke conditions, Ijaz et al. showed that near infrared light sources are the most robust wavelengths to link failure [12]. In [13], a lensless sensor was prototyped to estimate the position of active IR LEDs for proximal localization (up to 30 cm). To increase the operating range (≥1.5 m) the paper addresses a brand new design for indoor localization in 2D. Using PD and IR LEDs, our indoor positioning system embeds an innovative optical sensor robust to lighting conditions. Section 2 introduces the computer-aided design of the sensor in 3D. The fabrication of a new tiny optical sensing device with a custom-made signal processing board shielded to an Arduino board is presented in Section 3. Section 4 gives a short description of the bio-inspired optical sensor modeling and the principle underlying the signal processing algorithm. In Section 5, indoor localization is performed for the estimation of position in 2D. The localization of a mobile robot in 2D was also tested with the new sensor device implemented in the feedback control loop for trajectory tracking purpose. Section 6 concludes the paper.

Sensor Design
The optical sensor device, called HyperCube, designed and developed in this study, is equipped with three photodiodes (Figure 1). Each photodiode is mounted on the face of a tetrahedron. As depicted in Figure 1A,B, the optical axis of each photodiode is separated by an inter-receptor angle ∆φ = 60 • , which defines the spatial acuity of the visual system [14].

Fabrication
The prototype of the sensor was obtained by 3D printing as shown on Figure 2A. It is equipped with three photodiodes made by Vishay Semiconductors with the reference BPV22F. Each photodiode has a maximum absorption at the wavelength of 950 nm which corresponds to the maximum emissive power of the infrared LEDs SF4249. As presented in Figure 2B, a custom-made electronic board for the frequency modulation of the flickering IR LEDs can produce two separate signals at 11 kHz and 17 kHz, respectively. The same electronic board composed of two analog demodulation circuits performs the acquisition and demodulation. Shielded on the Arduino board, the latter performs the visual signal processing and provides an estimation of the HyperCube's angular position (i.e., azimuth and elevation angles) with respect to the infrared LEDs.

Modeling
Each photodiode features an angular sensitivity which is defined by the angle of acceptance denoted ∆ρ, i.e., the full width at half maximum of the angular sensitivity. A bell-shaped sensitivity function models the angular sensitivity of each photodiode. It was inspired by the Gaussian angular sensitivity function of flies' photoreceptors as described in [15].

Angular Sensitivity of the Photosensors
As presented in Figure 3, the angular sensitivity of each photodiode in solid line is compared to the cosine-like angular sensitivity in dotted line. One can show that the cosine-like angular sensitivity of the model fits well to the experimental data and finally fits better than a Gaussian function. Moreover, the angle of acceptance ∆ρ is equal to 120 • and ∆φ between Ph l and Ph r is equal to 60 • .

Principle of the Sensor
Two demodulated photodiode output signals are processed by an Arduino microcontroller. The analog demodulation steps were achieved by our custom-made shield board connected to the Arduino (see Figure 4). As shown in Figure 4A,B, the digital processing computes the relative difference over the sum of two adjacent demodulated photosensor output signals in order to assess the angular measurements (azimuth and elevation) [16]. The demodulation steps consist of using classical lock-in detection to demodulate the signal. However, the lock-in amplifier required a modulation signal which is provided here by a Phase-lock-loop circuit due to the fact that there is no physical link between the source (LED) and the receiver (photodiode).   As depicted in Figure 4, the digital processing operated in the microcontroller returns an output signal S ϕ for the azimuth ϕ with S ϕ = S phr −S ph l S phr +S ph l and an output signal S ψ for the elevation ψ with According to the visual sensor model mentioned in [13], S ϕ ∝ −tan (ϕ) and S ψ ∝ −tan (ψ). Therefore, the relative position ( X, Y) of the sensor with respect to the IR LED can be estimated with X = −tan (ϕ) Z and Y ∝ −tan (ψ) Z, where Z is the a priori known fixed height as shown on Figure 5.

Position Estimation in 2D
A calibration, which consists of adjusting the sensor outputs S ϕ and S ψ to the ratios X/Z and Y/Z, is processed using the Vicon system.
The coefficients a ϕi and a ψi are determined using Matlab R . The optimization Criterion (1) is to minimize the mean square error between the reference values and the actual data values provided by the sensor. The Matlab R function fminunc is used to compute the coefficients. The localization was tested indoors for several lighting conditions. The optical sensing device was moving in X and Y at a fixed height as presented in Figure 5. After the calibration, the indoor localization is performed with the sole use of the optical sensor device connected to the demodulation board and the Arduino board. Figure 6A gives a description of the experimental setup. One can see the location of the modulated infrared emitter and the coverage of the system. In this experiment, HyperCube is fixed to a XY table and moved by hand. One can note from the indoor localization results ( Figure 6B) that the position estimation at the fixed height of 150 cm is accurate. The precision obtained features a standard deviation about 1 cm for X and inferior to 2 cm for Y measurements. Experiments over a longer distance are presented in the next section.

Localization of a Mobile Robot in 2D
In this section, we present the results obtained using HyperCube for indoor localizatin in 2D of a mobile robot. A new custom-made electronic board for the frequency modulation of the flickering IR LEDs is built. It can produce two separate signals at 5 kHz and 11 kHz. The mobile robot is equipped with a new custom-made electronic board composed of two analog demodulation circuits in charge of acquisition and demodulation. The experimental setup is presented in Figure 7. The ground height is H = 2 m and the localization coverage area is 2 m × 2 m. Figure 7. Picture of the experimental setup inside the motion capture system. The aim is to localize in 2D the mobile robot using HyperCube. The ground thruth is given by the Vicon cameras. The mecanum wheeled omni-directional robot is equipped with HyperCube, the localization coverage area is 2 m × 2 m. Two IR LEDs flickering at 5 kHz and 11 kHz were fixed on a horizontal bar placed above the robot at a height of 2 m.

Kinematics and Dynamics Modeling of the Mobile Robot
Complete kinematics and dynamics modeling of the omni-directional robot with mecanum wheels are detailed in [17,18]. Figure 8 shows the disposition of the wheels related to the frames Σ 0 , Σ iω , (i = 1, 2, 3, 4). We define: V iω (i = 1, 2, 3, 4) the velocity vector corresponding to the wheels revolutions where V iω = R w × ω i . R w is the radius of the wheel and ω i is the revolution velocity of the wheel. V ir (i = 1, 2, 3, 4) is the tangential velocity vector of the free roller touching the floor and T is the velocity vector in the local frame (X m , Y m , Z m ). The state vector X = [x y ψ] T is composed of the positions x, y and the heading ψ in the global frame (X G , Y G , Z G ). Kinematics equation describing the relationship between V ω and V 0 is given by: wheel velocity vector corresponding to the angular velocity. Oppositely, the mobile robot velocity can be derived from the wheel velocity using a pseudo inverse matrix as in (3): where J 0 As a result, each element of V 0 is given by the following equations: The velocityẊ in the global frame (X G , Y G , Z G ) is expressed in (7): As presented in [18,19], the vehicle dynamics is given by (8): T is the vector of the angular position of each wheel. τ = [τ 1 τ 2 τ 3 τ 4 ] T is the control input vector composed of the torque applied to each wheel with: 2 and D θ is the coefficient of the wheel's viscous friction. I z is the vehicle moment of inertia around the Z axis. I w is the wheel's moment of inertia around the center of revolution.

Design of Position Control
The standard robot motion control have been designed using a sliding mode dynamic controller to track a desired trajectory as detailed in [19]. Let us consider the state vector X = [x 11 , x 12 , x 21 , x 22 , x 31 , x 32 ] T = [ x, x, y, y, ψ, ψ] T and the control input vector (7), the state space representation of the system is given by: The control input vector r = [r 1 r 2 r 3 ] T is defined to compensate for the nonlinear terms in (9) u 1 = cos(x 32 )r 1 + sin(x 32 )r 2 u 2 = − sin(x 32 )r 1 + cos(x 32 )r 2 Using (10) in the state space representation (9), a system of equations is written as following: The Equation (11a,b) stand for the equations of translation and the Equation (11c) describes the movement of rotation. As defined in [19], the positions of reference ξ 1d and ξ 2d in the inertial frame are introduced. The orientation reference in the same frame is also noted ξ 3d . Therefore, the following subsystem of equations is written: The sliding surfaces S i1 and S i2 are defined for each axis X and Y such that: where the coefficients a i1 and a i2 are chosen to ensure the attractiveness of the sliding surfaces. Therefore, we propose the candidate Lyapunov functions V i1 and V i2 for each sliding surface: As explained in [19], the exponential stability of the system is ensured and the control input signal r i can be written as: Using (10) and the expression provided by (16), the control input signals u 1 , u 2 and u 3 are bounded such as: Therefore, the angular speed of each wheel ω i of the mobile robot is bounded such as the following: where M ij , ∀i, j ∈ {1, 2, 3} is the saturation parameter as defined in (13a). Figure 9 presents the block diagram of the system. The position and heading of the mobile robot are controlled in closed loop. It is worth noting that: • The nonlinear control block computes each angular reference speed ω * i for the wheel i. The control law minimizes the error between the reference position X * and the position estimateX. • The angular speed of each wheel is controlled in closed loop using a local proportional integral controller (PI).

•
The estimated position and heading of the mobile robot collected in the vectorX = (x,ŷ,φ) are provided by HyperCube or the Vicon motion capture system .

Implementation of the Indoor Localization for the Mobile Robot
To evaluate the performances of the indoor localization, the setup detailed in Figure 10 is composed of the following: • The Vicon motion capture system featuring sub-millimetric accuracy. It provides the localization estimation of the mobile robot. The motion capture data are used for comparison purposes.

•
The ground station connected to the Vicon system runs Matlab/Simulink R and QUARC R software programs. The nonlinear control law of the mobile robot presented in Section 5.2.2 is designed with Matlab/Simulink R and compiled. The program is transferred via WIFI radio link to the Gumstix microcontroller embedded on the mobile robot. The control algorithm runs onboard the robot.
The mobile robot aims at tracking a desired trajectory using HyperCube in a feedback control loop. An Arduino 380 board controls in closed-loop the angular velocity of each wheel. An Arduino Mega 2560 board is connected to the custom-made demodulation board of HyperCube which provides analog signals. The analog processing of the photodiode's output signal is depicted in Figure 4. The Gumstix board uses the estimation of the robot positionX = (x,ŷ,φ) for control purpose.  Figure 11A gives a schematic of the hardware embedded on the mobile robot for indoor localization using HyperCube. Figure 11B shows the hardware implementation and HyperCube mounted onboard the mecanum wheeled omni-directional robot. Four reflective markers make the mobile robot visible by the Vicon system.

Application to the 2D Localization
The aim of this section is twofold: (i) using HyperCube in open loop, reconstruct the trajectory (x, y) of the mobile robot in the coverage area presented in Figure 7; and (ii) using HyperCube in closed loop, track a desired trajectory. For that purpose, the following experiments are performed.

Validation of the Nonlinear Control Law for Trajectory Tracking
The Vicon cameras provide to the nonlinear controller detailed in Section 5.2.2 the accurate localization and orientation of the robot in real-time. The mobile robot moves on a circular path of diameter 1 m. In the same time, the desired orientation ψ is a sinus. The results are given in Figure 12 where Figure 12A-C shows in red the positions (x, y) and the heading ψ versus time of the mobile robot compared to the reference in green. Figure 12D plots y versus x. Using accurate estimations of position and heading, the mobile robot follows the desired trajectory with precision without overshoot. This result validates the good performances of the sliding mode nonlinear control law.

Trajectory Reconstruction Using HyperCube
While keeping the circular path of diameter 1 m as reference, the desired orientation ψ is regulated at zero. The mecanum wheeled omni-directional robot maintains its orientation along the path. In this experiment, the trajectory is reconstructed using the measurements provided by HyperCube and only one IR LED that flickers at 11 kHz. However, the estimated positions provided by HyperCube were not used to control in closed-loop the robot. Figure 13 shows the results of the reconstruction. In Figure 13A,B, the position estimations in X and Y are plotted versus time and compared to the ground truth provided by the Vicon system. Figure 13C presents the heading ψ which is maintained at zero. There is no curve for HyperCube since HyperCube is not used to estimate the heading. Figure 13D depicts the XY graph. Satisfactory trajectory reconstruction can be verified by comparing the actual path of the mobile robot to the estimated one given by HyperCube. Figure 13. Plots of the position and orientation of the mobile robot. The accurate measurements provided by the Vicon system feed the sliding mode nonlinear controller. The trajectory is reconstructed using HyperCube and the IR LED that flickers at 11 kHz. The closed-loop control of the robot's positions and heading is only based here on the measurements provided by the Vicon system.
One can see in Figure 14A,B the plots of the autocorrelation functions of the residuals. The noise for each axis has nearly white characteristics. Moreover, given H = 2 m, the precision obtained reaches a standard deviation as small as 1.86 cm for X and 1.37 cm for Y (see Figure 15). Looking accross the precision of the reconstruction, the mobile robot was then controlled by means of HyperCube.
=1.86 cm X =1.37 cm Y Figure 15. Histograms of the localization error in 2D using HyperCube. The standard deviations for the X and Y axis are σ X = 1.86 cm and σ Y = 1.37 cm for H = 2 m. Only one IR LED that flickers at 11 kHz is used.

Robot Closed-Loop Control Based on HyperCube
In this section, the goal was to use the measurements provided by HyperCube to control in closed-loop the linear positions (x, y) of the robot. The current version of the sensor can only estimate the positions but not the rotations. For a robotic application using aerial robots for instance, HyperCube could be associated to a stabilizing gimbal system to reduce the effects of the variations of roll and picth angles which could affect the measurements. In the present application, the orientation ψ is given by the Vicon cameras. If we denote x sensor and y sensor the coordinates of the mobile robot in the local frame, the estimates of positionx andŷ in the global frame are obtained by applying the rotation matrix as following: where ψ vicon is the estimation of the orientation given by the Vicon cameras. Figure 16 shows the results while the sensor is used in closed loop. The orientation ψ is estimated with the motion capture system. Figure 16A,B superimposes the positions x and y measured by HyperCube (blue curve) and by the Vicon system (red curve). Figure 16C presents the regulation of the heading versus time. Since the orientation is given by the Vicon cameras and not by HyperCube, there is no curve related to HyperCube in Figure 16C. Once equipped with HyperCube, the experimental results show that HyperCube can be suitable to make the mobile robot follow faithfully the reference trajectory. Therefore, the performance of the HyperCube sensor have been validated indoors by using only one flickering IR LED. A limitation of this solution is the need of the orientation ψ provided by the Vicon system. However, for this kind of application, onboard sensors such as a low-cost inertial measurement unit (IMU) for instance in [20], magnetometer as proposed in [21] or odometry could be used to get the heading in real time.

Conclusions
In this paper, we proposed a novel positioning system for indoor application which can measure the angular position of a moving optical sensor, HyperCube. The latter was coupled to an Arduino-compatible demodulator through a custom-made shield board. Based on infrared light emission, the proposed solution for indoor localization spotlights the following features: (i) a minimalistic sensor in terms of small size (10 cm 3 ), light weight (6 g) and low power consumption (0.4 W for the sensor and the analog demodulation board); (ii) a fast analog signal processing and a digital processing implemented on an Arduino microcontroller (difference over the sum); and (iii) an online accurate position estimation in 2D.
We have shown that the proposed sensor was able to estimate the position in 2D at a distance of 1.5 m from the LEDs with an accuracy as small as 1-cm at a sampling frequency of 100 Hz using only one IR LED flickering at 17 kHz. We also proposed a robotic application which consisted in localizing a moving mecanum wheeled omnidirectional robot indoors. For a trajectory reconstruction purpose, the precision of the position estimation reached good performances with a standard deviation as small as 1.86 cm for X and 1.37 cm for Y with only one flickering IR LED placed at 2 m above the robot. To show the performance of HyperCube, the sensor was implemented in the position feedback control loop to make the mobile robot able to track a reference trajectory (a circle of 1 m in diameter). It turned out that the mobile robot followed the desired path faithfully, validating that the indoor local positioning system using flickering IR LEDs is a reliable and an efficient solution.
To further improve the performance of the proposed system, the sensor measurements provided by HyperCube will be fused with other sensors such as IMU to improve the position estimation. The height could also be estimated using two IR LEDs at two different frequencies. Moreover, one could investigate the estimation of the heading ψ using several IR LEDs at the same time.