Local Positioning System Using Flickering Infrared
LEDs

Thibaut Raharijaona, Rodolphe Mawonou, Thanh Nguyen, Fabien Colonnier, Marc Boyron, Julien Diperi, Stéphane Viollet

► To cite this version:

Thibaut Raharijaona, Rodolphe Mawonou, Thanh Nguyen, Fabien Colonnier, Marc Boyron, et al. Local Positioning System Using Flickering Infrared LEDs. Sensors, 2017, 17 (11), 10.3390/s17112518. [hal-01630782](https://hal.science/hal-01630782)

HAL Id: hal-01630782

https://hal.science/hal-01630782

Submitted on 27 Nov 2019

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

Article

# Local Positioning System Using Flickering Infrared LEDs

Thibaut Raharijaona <fnref n="1" />,*, Rodolphe Mawonou<fnref n="1" />, Thanh Vu Nguyen<fnref n="1" />, Fabien Colonnier <fnref n="1" />,<fnref n="2" />,
Marc Boyron<fnref n="1" />, Julien Diperi<fnref n="1" /> and Stéphane Viollet<fnref n="1" />

Received: 29 September 2017; Accepted: 26 October 2017; Published: 3 November 2017

**Abstract:** 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 cm³), 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.

**Keywords:** indoor positioning; infrared light communication; LED; photodiode (PD); visual motion

## 1. 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

<footnote n="1">¹ Aix Marseille University, CNRS, ISM, Marseille 13009, France; Kodjo.Mawonou@supelec.fr (R.M.); ngthanh.vu94@gmail.com (T.V.N.); tslftac@nus.edu.sg (F.C.); marc.boyron@univ-amu.fr (M.B.); julien.diperi@univ-amu.fr (J.D.); stephane.viollet@univ-amu.fr (S.V.)</footnote>

<footnote n="2">² Temasek Labs, National University of Singapore, Singapore 117411, Singapore</footnote>

<footnote>* Correspondence: thibaut.raharijaona@univ-amu.fr; Tel.: +3-349-182-8365</footnote>
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.

## 2. 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 $\Delta\phi = 60^{\circ}$, which defines the spatial acuity of the visual system [14].

<figure><img src="image_3.png" /><figcaption>**Figure 1.** Computer-Aided Design of the optical sensor called HyperCube. Each side of the sensor consists of one photodiode soldered to a small printed circuit board (*Ph*<sub>l</sub>, *Ph*<sub>r</sub>, *Ph*<sub>m</sub> respectively): (A) top view; and (B) side view.</figcaption></figure>
### 3. 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.

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Description of the HyperCube hardware: (A) each photodiode is connected to an analog amplifier for the conversion of the photodiode current into an output voltage; and (B) the signal provided by the photodiodes is processed by a demodulation board shielded on an Arduino board.</figcaption></figure>

### 4. Modeling

Each photodiode features an angular sensitivity which is defined by the angle of acceptance denoted $\Delta\rho$, 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].

#### 4.1. 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 $\Delta\rho$ is equal to 120° and $\Delta\phi$ between $Ph_l$ and $Ph_r$ is equal to 60°.

<figure><img src="image_5.png" /><figcaption>**Figure 3.** Sensor characterization and comparison between the theoretical (dotted lines) and measured angular sensitivities (continuous lines) of the photodiodes plotted here in polar coordinates.</figcaption></figure>
## 4.2. 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).

<figure><img src="image_6.png" /><figcaption>**Figure 4.** Sketch diagram of the signal processing algorithm. (A). Top view: The sensor measures the azimuth $\varphi$. The left part shows the IR LED modulated at a frequency noted $F_{demod}$ (11 kHz or 17 kHz). In this view, HyperCube is composed of two photosensors $Ph_l$ and $Ph_r$ with their respective cosine-like angular sensitivities (see Figure 3B). (B). Side View: The same signal processing is applied on the signal provided by the photosensor $Ph_m$ of HyperCube and a virtual photosensor where $S_{virt} = \frac{S_{ph_l} + S_{ph_r}}{2}$.</figcaption></figure>

As depicted in Figure 4, the digital processing operated in the microcontroller returns an output signal $S_{\varphi}$ for the azimuth $\varphi$ with $S_{\varphi} = \frac{S_{ph_r} - S_{ph_l}}{S_{ph_r} + S_{ph_l}}$ and an output signal $S_{\psi}$ for the elevation $\psi$ with $S_{\psi} = \frac{S_{ph_m} - S_{ph_{virt}}}{S_{ph_m} + S_{ph_{virt}}}$ where $S_{virt} = \frac{S_{ph_l} + S_{ph_r}}{2}$. According to the visual sensor model mentioned in [13], $S_{\varphi} \propto -\tan(\varphi)$ and $S_{\psi} \propto -\tan(\psi)$. Therefore, the relative position $(\hat{X}, \hat{Y})$ of the sensor with respect to the IR LED can be estimated with $\hat{X} = -\tan(\varphi)\hat{Z}$ and $\hat{Y} \propto -\tan(\psi)\hat{Z}$, where $\hat{Z}$ is the *a priori* known fixed height as shown on Figure 5.
<figure><img src="image_7.png" /><figcaption>Figure 5. The principle of the indoor positioning solution at a fixed height consists of two steps: (i) the calibration procedure aims at finding the parameters which minimize the quadratic error metrics between the reference position given by the Vicon system and the data provided by the sensor; and (ii) given the calibration parameters, the sole use of the sensor device connected to the shielded demodulation board allows to estimate the positions X and Y at a fixed height.</figcaption></figure>

# 5. Experimental Results

## 5.1. Position Estimation in 2D

A calibration, which consists of adjusting the sensor outputs $S_\varphi$ and $S_\psi$ to the ratios X/Z and Y/Z, is processed using the Vicon system.

$$ 
\begin{array}{ll}
\text{minimize} & \frac{1}{n} \sum \sqrt{(X_{ref} - \hat{X})^2 + (Y_{ref} - \hat{Y})^2} \\
\text{subject to} & -\frac{X_{ref}}{\hat{Z}} = a_{\varphi1} \cdot S_{\varphi}^2 + a_{\varphi2} \cdot S_{\varphi} + a_{\varphi3} \cdot S_{\psi}^2 + a_{\varphi4} \cdot S_{\psi} + b_{\varphi} \\
& -\frac{Y_{ref}}{\hat{Z}} = a_{\psi1} \cdot S_{\varphi}^2 + a_{\psi2} \cdot S_{\varphi} + a_{\psi3} \cdot S_{\psi}^2 + a_{\psi4} \cdot S_{\psi} + b_{\psi}
\end{array}
\quad (1) $$

The coefficients $a_{\varphi i}$ and $a_{\psi i}$ are determined using Matlab®. 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® 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.
<figure><img src="image_8.png" /><figcaption>**Figure 6.** 2D localization of HyperCube moved by hand using a XY table with respect to a fixed IR LED flickering at 17 kHz placed ahead of the sensor at a distance of 150 cm. The position estimation is based on the parameters obtained in the calibration procedure: (A) experimental setup; and (B) experimental results. The standard deviation for X estimation is only 1 cm and the standard deviation for Y estimation is 1.65 cm.</figcaption></figure>

## 5.2. Localization of a Mobile Robot in 2D

In this section, we present the results obtained using HyperCube for indoor localization 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 \text{ m} \times 2 \text{ m}$.

<figure><img src="image_9.png" /><figcaption>**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 truth is given by the Vicon cameras. The mecanum wheeled omni-directional robot is equipped with HyperCube, the localization coverage area is $2 \text{ m} \times 2 \text{ 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.</figcaption></figure>

### 5.2.1. 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\omega} = R_w \times \omega_i$. $R_w$ is the radius of the wheel and $\omega_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 $V_0 = [\dot{x}_m \dot{y}_m \dot{\psi}_m]^T$ is the velocity vector in the local frame $(X_m, Y_m, Z_m)$.

<figure><img src="image_10.png" /><figcaption>Figure 8. Disposition of the mecanum wheels and the frames.</figcaption></figure>

The state vector $X = [x \ y \ \psi]^T$ is composed of the positions $x, y$ and the heading $\psi$ in the global frame $(X_G, Y_G, Z_G)$. Kinematics equation describing the relationship between $V_\omega$ and $V_0$ is given by:

$$V_\omega = J_0 \cdot V_0 \qquad (2)$$

$J_0 = \begin{bmatrix} 1 & -1 & -(l+L) \\ 1 & 1 & (l+L) \\ 1 & 1 & -(l+L) \\ 1 & -1 & (l+L) \end{bmatrix} \in \mathbb{R}^{4 \times 3}$ is a transformation matrix and $V_\omega = [V_{1\omega} \ V_{2\omega} \ V_{3\omega} \ V_{4\omega}]^T$ is the 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):

$$V_0 = J_0^+ \cdot V_\omega \qquad (3)$$

where $J_0^+ = (J_0^T \cdot J_0)^{-1} J_0^T$. As a result, each element of $V_0$ is given by the following equations:

$$\dot{x}_m = \frac{R_w}{4} (\omega_1 + \omega_2 + \omega_3 + \omega_4) \qquad (4)$$

$$\dot{y}_m = \frac{R_w}{4} (-\omega_1 + \omega_2 + \omega_3 - \omega_4) \qquad (5)$$

$$\dot{\psi}_m = \frac{R_w}{4(L+l)} (-\omega_1 + \omega_2 - \omega_3 + \omega_4) \qquad (6)$$

The velocity $\dot{X}$ in the global frame $(X_G, Y_G, Z_G)$ is expressed in (7):

$$\begin{bmatrix} \dot{x} \\ \dot{y} \\ \dot{\psi} \end{bmatrix} = \begin{bmatrix} \cos(\psi) & -\sin(\psi) & 0 \\ \sin(\psi) & \cos(\psi) & 0 \\ 0 & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} \dot{x}_m \\ \dot{y}_m \\ \dot{\psi}_m \end{bmatrix} \qquad (7)$$

As presented in [18,19], the vehicle dynamics is given by (8):
$$ \begin{bmatrix} \dot{\theta} \\ \ddot{\theta} \end{bmatrix} = \begin{bmatrix} 0_{4 \times 4} & I_{4 \times 4} \\ 0_{4 \times 4} & -M^{-1} D_{\theta} \end{bmatrix} \begin{bmatrix} \theta \\ \dot{\theta} \end{bmatrix} + \begin{bmatrix} 0_{4 \times 4} \\ M^{-1} \end{bmatrix} \tau \quad (8) $$

$\theta = [\theta_1 \theta_2 \theta_3 \theta_4]^T$ is the vector of the angular position of each wheel. $\tau = [\tau_1 \tau_2 \tau_3 \tau_4]^T$ is the control input vector composed of the torque applied to each wheel with:

$$ M = \begin{bmatrix} A + B + I_w & -B & B & A - B \\ -B & A + B + I_w & A - B & B \\ B & A - B & A + B + I_w & -B \\ A - B & B & -B & A + B + I_w \end{bmatrix}, A = \frac{mR_w^2}{8}, B = \frac{I_z R_w^2}{16(L+l)^2} \text{ and } D_{\theta} \text{ 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.

### 5.2.2. 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 = [\int x, x, \int y, y, \int \psi, \psi]^T$ and the control input vector $u = [u_1 \ u_2 \ u_3]^T = [\dot{x}_m \ \dot{y}_m \ \dot{\psi}_m]^T$. From (7), the state space representation of the system is given by:

$$ \begin{aligned} \dot{x}_{11} &= x_{12} \\ \dot{x}_{12} &= u_1 \cos(x_{32}) - u_2 \sin(x_{32}) \\ \dot{x}_{21} &= x_{22} \\ \dot{x}_{12} &= u_1 \sin(x_{32}) + u_2 \cos(x_{32}) \\ \dot{x}_{31} &= x_{32} \\ \dot{x}_{32} &= u_3 \end{aligned} \quad (9) $$

The control input vector $r = [r_1 \ r_2 \ r_3]^T$ is defined to compensate for the nonlinear terms in (9)

$$ \begin{aligned} u_1 &= \cos(x_{32})r_1 + \sin(x_{32})r_2 \\ u_2 &= -\sin(x_{32})r_1 + \cos(x_{32})r_2 \\ u_3 &= r_3 \end{aligned} \quad (10) $$

Using (10) in the state space representation (9), a system of equations is written as following:

$$ \Sigma_1 = \begin{cases} \dot{x}_{11} = x_{12} \\ \dot{x}_{12} = r_1 \end{cases} \quad (11a) $$

$$ \Sigma_2 = \begin{cases} \dot{x}_{21} = x_{22} \\ \dot{x}_{12} = r_2 \end{cases} \quad (11b) $$

$$ \Sigma_3 = \begin{cases} \dot{x}_{31} = x_{32} \\ \dot{x}_{32} = r_3 \end{cases} \quad (11c) $$

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 $\xi_{1d}$ and $\xi_{2d}$ in the inertial frame
are introduced. The orientation reference in the same frame is also noted $\xi_{3d}$. Therefore, the following subsystem of equations is written:

$$ \sum_{i}^{e} = \begin{cases} \dot{z}_{i1} & = z_{i2} \\ \dot{z}_{i2} & = r_{i} - \dot{\xi}_{id} \quad \forall i \in \{1, 2, 3\} \\ \dot{\phi}_{id} & = \xi_{id} \end{cases} \qquad (12a) $$

with $z_{i1} = x_{i1} - \phi_{id}$, $z_{i2} = x_{i2} - \xi_{id}$, $\forall i \in \{1, 2, 3\}$. The saturation function denoted $\sigma_M : \mathbb{R} \to \mathbb{R}$ is defined as:

$$ \sigma_M(S) = \begin{cases} S & \text{if } |S| < M \\ \text{sign}(S) \times M & \text{otherwise} \end{cases} \qquad (13a) $$

The sliding surfaces $S_{i1}$ and $S_{i2}$ are defined for each axis X and Y such that:

$$ \begin{aligned} S_{i1} &= a_{i1}a_{i2}z_{i1} - a_{i2}z_{i1} \\ S_{i2} &= a_{i1}z_{i2} \end{aligned} \qquad (14) $$

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:

$$ \begin{aligned} V_{i1} &= S_{i1}^2 \\ V_{i2} &= S_{i2}^2 \end{aligned} \qquad (15) $$

As explained in [19], the exponential stability of the system is ensured and the control input signal $r_i$ can be written as:

$$ r_i = \sigma_{i3}(\dot{\xi}_{id} - \sigma_{M_{i2}}(a_{i1}z_{i2} + \sigma_{M_{i1}}(a_{i2}z_{i2} + a_{i1}a_{i2}z_{i1}))) \quad \forall i \in \{1, 2, 3\}. \qquad (16) $$

Using (10) and the expression provided by (16), the control input signals $u_1$, $u_2$ and $u_3$ are bounded such as:

$$ \begin{aligned} |u_1| &= \max(M_{13}, M_{23}, 0.707(M_{13} + M_{23})) \\ |u_2| &= \max(M_{13}, M_{23}, 0.707(M_{13} + M_{23})) \\ |u_3| &= M_{33} \end{aligned} \qquad (17) $$

Therefore, the angular speed of each wheel $\omega_i$ of the mobile robot is bounded such as the following:

$$ \begin{aligned} |\omega_1| &= \frac{1}{R_w}((L + l)M_{33}) \\ |\omega_2| &= \frac{1}{R_w}(2 \cdot \max(M_{13}, M_{23}, 0.707(M_{13} + M_{23})) + (L + l)M_{33}) \\ |\omega_3| &= \frac{1}{R_w}(2 \cdot \max(M_{13}, M_{23}, 0.707(M_{13} + M_{23})) + (L + l)M_{33}) \\ |\omega_4| &= \frac{1}{R_w}((L + l)M_{33}) \end{aligned} \qquad (18) $$

where $M_{ij}$, $\forall i, j \in \{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 $\omega_i^*$ for the wheel i. The control law minimizes the error between the reference position $X^*$ and the position estimate $\hat{X}$.

* 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 vector $\hat{X} = (\hat{x}, \hat{y}, \hat{\phi})$ are provided by HyperCube or the Vicon motion capture system.

<figure><img src="image_11.png" /><figcaption>**Figure 9.** Block diagram of the robot autopilot. The position and heading are controlled in closed-loop. The mobile robot is equipped with HyperCube</figcaption></figure>

### 5.2.3. 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® and QUARC® software programs. The nonlinear control law of the mobile robot presented in Section 5.2.2 is designed with Matlab/Simulink® 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 position $\hat{X} = (\hat{x}, \hat{y}, \hat{\phi})$ for control purpose.

<figure><img src="image_12.png" /><figcaption>**Figure 10.** Sketch diagram of the implementation of the indoor localization system for mobile robots. The Arduino Mega 2560 gets the analog signals provided by the demodulation board (Arduino shield, see Figure 2) and the output voltage of each photodiode $Ph_i$ of HyperCube. The Arduino 380 board is devoted to control the angular velocity of each wheel.</figcaption></figure>
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.

<figure><img src="image_13.png" /><figcaption>**Figure 11.** Top view of the mobile robot: (A) schematic of the embedded hardware; and (B) picture of the mobile robot used for the experiments.</figcaption></figure>

### 5.2.4. 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.

### 5.2.5. 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 $\psi$ is a sinus. The results are given in Figure 12 where Figure 12A–C shows in red the positions $(x, y)$ and the heading $\psi$ 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.

<figure><img src="image_14.png" /><figcaption>**Figure 12.** *Cont.*</figcaption></figure>
<figure><img src="image_15.png" /><figcaption>**Figure 12.** (A–C) plots of the position and orientation of the mobile robot. The accurate measurements provided here only by means of the Vicon system provide to the sliding mode nonlinear controller the measured robot’s positions (x,y) and heading. The path is compared to the desired trajectory.</figcaption></figure>

5.2.6. Trajectory Reconstruction Using HyperCube

While keeping the circular path of diameter 1 m as reference, the desired orientation $\psi$ 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 $\psi$ 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><img src="image_16.png" /><figcaption>**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.</figcaption></figure>
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.

<figure><img src="image_17.png" /><figcaption>**Figure 14.** Plots of the autocorrelation functions of the residuals for each axis X and Y.</figcaption></figure>

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 across the precision of the reconstruction, the mobile robot was then controlled by means of HyperCube.

<figure><img src="image_18.png" /><figcaption>**Figure 15.** Histograms of the localization error in 2D using HyperCube. The standard deviations for the X and Y axis are $\sigma_X = 1.86$ cm and $\sigma_Y = 1.37$ cm for $H = 2$ m. Only one IR LED that flickers at 11 kHz is used.</figcaption></figure>

### 5.2.7. 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 pitch angles which could affect the measurements. In the present application, the orientation $\psi$ is given by the Vicon cameras. If we denote $x_{\text{sensor}}$ and $y_{\text{sensor}}$ the coordinates of the mobile robot
in the local frame, the estimates of position $\hat{x}$ and $\hat{y}$ in the global frame are obtained by applying the rotation matrix as following:

$$ \begin{bmatrix} \hat{x} \\ \hat{y} \\ \hat{\psi} \end{bmatrix} = \begin{bmatrix} \cos(\hat{\psi}) & -\sin(\hat{\psi}) & 0 \\ \sin(\hat{\psi}) & \cos(\hat{\psi}) & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x_{\text{sensor}} \\ y_{\text{sensor}} \\ \psi_{\text{vicon}} \end{bmatrix} \quad (19) $$

where $\psi_{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 $\psi$ 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 $\psi$ 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.

<figure><img src="image_19.png" /><figcaption>Figure 16. Plots of the position and orientation of the mobile robot while the measurements provided by HyperCube are used in closed loop and the heading is given by the Vicon cameras. Only one IR LED that flickers at 11 kHz is used and $H = 2$ m.</figcaption></figure>

## 6. 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³), 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 $\psi$ using several IR LEDs at the same time.

**Supplementary Materials:** The following are available online at http://www.mdpi.com/1424-8220/17/11/2518/s1, Video S1: Robot closed-loop control based on HyperCube.

**Acknowledgments:** This work was supported by CNRS Institutes (Life Science; Information Science; Engineering Science and Technology; and Humanities and Social Science) and Aix-Marseille University.

**Author Contributions:** Thibaut Raharijaona contributed to implementing the algorithm for position estimation and signal processing, to guiding the experiments and to manuscript writing. Rodolphe Mawonou performed all the experiments related to the localization of the mobile robot in 2D. Thanh Vu Nguyen performed all the experiments related to the position estimation in 2D using the shielded demodulation board. Fabien Colonnier was involved in the implementation of the position nonlinear control law. Marc Boyron designed and built the analog demodulation board. Julien Diperi designed and built the sensor. Stéphane Viollet contributed to guiding the experiments and to manuscript writing.

**Conflicts of Interest:** The authors declare no conflict of interest.

## Abbreviations

The following abbreviations are used in this manuscript:

AGV Automated Guided Vehicle

CCD Charge Couple Device

CMOS Complementary Metal Oxide Semiconductor

GPS Global Positioning System

IMU Inertial Measurement Unit

IR Infrared

LED Light Emitting Diode

LIDAR Light Detection And Ranging

PD Photodiode

WIFI Wireless Fidelity

## References

1. Bahl, P.; Padmanabhan, V.N. RADAR: An in-building RF-based user location and tracking system. In Proceedings of the INFOCOM 2000 Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies, Tel Aviv, Israel, 26–30 March 2000; Volume 2, pp. 775–784.

2. Raja, A.K.; Pang, Z. High accuracy indoor localization for robot-based fine-grain inspection of smart buildings. In Proceedings of the 2016 IEEE International Conference on Industrial Technology (ICIT), Taipei, Taiwan, 14–17 March 2016; pp. 2010–2015.

3. Kjærgaard, M.B. A taxonomy for radio location fingerprinting. In Proceedings of the International Symposium on Location-and Context-Awareness, Oberpfaffenhofen, Germany, 20–21 September 2007; Springer: Berlin, Germany, 2007; pp. 139–156.
4. Reinke, C.; Beinschob, P. Strategies for contour-based self-localization in large-scale modern warehouses. In Proceedings of the 2013 IEEE 9th International Conference on Intelligent Computer Communication and Processing (ICCP), Cluj-Napoca, Romania, 5–7 September 2013; pp. 223–227.

5. Scaramuzza, D.; Fraundorfer, F. Visual Odometry [Tutorial]. *IEEE Robot. Autom. Mag.* **2011**, *18*, 80–92.

6. Frassl, M.; Angermann, M.; Lichtenstern, M.; Robertson, P.; Julian, B.J.; Doniec, M. Magnetic maps of indoor environments for precise localization of legged and non-legged locomotion. In Proceedings of the 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, Tokyo, Japan, 3–7 November 2013; pp. 913–920.

7. Yasir, M.; Ho, S.W.; Vellambi, B.N. Indoor Position Tracking Using Multiple Optical Receivers. *J. Lightw. Technol.* **2016**, *34*, 1166–1176.

8. Sakai, N.; Zempo, K.; Mizutani, K.; Wakatsuki, N. Linear Positioning System based on IR Beacon and Angular Detection Photodiode Array. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcalá de Henares, Spain, 4–7 October 2016; pp. 4–7.

9. Simon, G.; Zachár, G.; Vakulya, G. Lookup: Robust and Accurate Indoor Localization Using Visible Light Communication. *IEEE Trans. Instrum. Meas.* **2017**, *66*, 2337–2348.

10. Arnon, S. *Visible Light Communication*; Cambridge University Press: Cambridge, UK, 2015.

11. Komine, T.; Nakagawa, M. Fundamental analysis for visible-light communication system using LED lights. *IEEE Trans. Consum. Electron.* **2004**, *50*, 100–107.

12. Ijaz, F.; Yang, H.K.; Ahmad, A.; Lee, C. Indoor positioning: A review of indoor ultrasonic positioning systems. In Proceedings of the 2013 15th International Conference on Advanced Communication Technology (ICACT), PyeongChang, Korea, 27–30 January 2013; pp. 1146–1150.

13. Raharijaona, T.; Mignon, P.; Juston, R.; Kerhuel, L.; Viollet, S. HyperCube: A Small Lensless Position Sensing Device for the Tracking of Flickering Infrared LEDs. *Sensors* **2015**, *15*, 16484–16502.

14. Land, M.F. Visual acuity in insects. *Annu. Rev. Entomol.* **1997**, *42*, 147–177.

15. Stavenga, D. Angular and spectral sensitivity of fly photoreceptors. II. Dependence on facet lens F-number and rhabdomere type in *Drosophila*. *J. Comp. Physiol. A* **2003**, *189*, 189–202.

16. Kerhuel, L.; Viollet, S.; Franceschini, N. The VODKA Sensor: A Bio-Inspired Hyperacute Optical Position Sensing Device. *IEEE Sens. J.* **2012**, *12*, 315–324.

17. Viboonchaicheep, P.; Shimada, A.; Kosaka, Y. Position rectification control for Mecanum wheeled omni-directional vehicles. In Proceedings of the IECON'03 29th Annual Conference of the IEEE Industrial Electronics Society, Roanoke, VA, USA, 2–6 November 2003; IEEE: Piscataway, NJ, USA, 2003; Volume 1, pp. 854–859.

18. Lin, L.C.; Shih, H.Y. Modeling and adaptive control of an omni-mecanum-wheeled robot. *Intell. Control Autom.* **2013**, *4*, 166–179.

19. Guerrero-Castellanos, J.; Villarreal-Cervantes, M.; Sanchez-Santana, J.; Ramirez-Martinez, S. Seguimiento de trayectorias de un robot movil (3,0) mediante control acotado. *Revista Iberoamericana de Automática e Informática Industrial* **RIAI 2014**, *11*, 426–434.

20. Euston, M.; Coote, P.; Mahony, R.; Kim, J.; Hamel, T. A complementary filter for attitude estimation of a fixed-wing UAV. In Proceedings of the IROS 2008 IEEE/RSJ International Conference on Intelligent Robots and Systems, Nice, France, 22–26 September 2008; IEEE: Piscataway, NJ, USA, 2008; pp. 340–345.

21. Kim, H.S.; Seo, W.; Baek, K.R. Indoor Positioning System Using Magnetic Field Map Navigation and an Encoder System. *Sensors* **2017**, *17*, 651.

<figure><img src="image_20.png" /></figure>

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).