SISTEMA DE LOCALIZACIÓN Y SEGUIMIENTO DE OBJETOS MEDIANTE SENSORES INALÁMBRICOS Autor: Sáez Mingorance, Borja. Director: Contreras Bárcena, David. RESUMEN DEL PROYECTO Se ha desarrollado un sistema de localización y seguimiento que permite el movimiento de una cámara de manera que un objetivo esté siempre encuadrado en un video, todo ello sin intervención humana. Para la consecución de este objetivo se han tenido que desarrollar e integrar distintos sistemas: emisor, receptor y actuador. Palabras clave: Bluetooth, BLE, Outdoor, RSSI, Weibull, Trilateración. 1. Introducción En este proyecto se va a desarrollar un sistema de localización basado en la tecnología BLE con objeto de mejorar del rendimiento deportivo mediante el seguimiento en video de jugadores, ya que permitirá la posterior visualización de las imágenes pudiendo corregir de este modo los errores detectados en ellas. 2. Definición del proyecto La idea principal es que sea un sistema de fácil despliegue, que utilizando un receptor (portado por el objetivo a localizar) que, recibiendo señales de una serie de emisores en posiciones conocidas, sea capaz de obtener la posición del objetivo. Esta posición será enviada a un dispositivo actuador que moverá la cámara para encuadrarlo dentro de la imagen grabada. 3. Descripción del sistema El sistema estará compuesto por tres tipos de dispositivos: - Emisor
Este dispositivo se encargará de transmitir paquetes BLE, utilizados posteriormente para el cálculo de la distancia entre el objetivo y el dispositivo. Se ha utilizado el SensorTag 2 de Texas Instrument como dispositivo emisor. Este dispositivo permite, teóricamente, la modificación del firmware para adaptarlo a las necesidades del proyecto. Para que el sistema funcione correctamente, es necesario configurar la emisión de paquetes para que no se interrumpa hasta el apagado del dispositivo (por defecto entra en modo suspensión a los 2 minutos aproximadamente). También se podría modificar la potencia de transmisión, así como la periodicidad de los paquetes, para buscar la solución óptima al problema de localización. - Receptor: Este será el sistema portado por el objetivo. Está formado por dos componentes software: el primero es el encargado de recibir todos los paquetes Bluetooth, filtrar aquellos que provengan de los emisores conocidos, y extraer la potencia recibida de cada uno de esos paquetes filtrados; el segundo es el encargado de procesar las potencias recibidas, extraer solo un valor de potencia para cada emisor, calcular cada distancia a los emisores, estimar la posición del objetivo, y por último hacérsela llegar al actuador (vía WiFi). Para desarrollar este componente se ha utilizado una Raspberry Pi 3, ya que cuenta con suficiente capacidad de cálculo para ejecutar simultáneamente las dos funciones, así como con interfaces BLE y WiFi, necesarias para este proyecto. - Actuador: Este dispositivo será en encargado de, una vez conocida la posición del objetivo, calcular el ángulo en el que se encuentra con respecto a la cámara, y girar esta para encuadrar al objetivo.
Está compuesto por tres módulos distintos: una placa microcontroladora Arduino Pro Mini 3.3V, que será la encargada del cálculo del ángulo, un módulo WiFi ESP8266, encargado de la comunicación con el sistema receptor, y por último un servomotor Tower Pro 9g, encargado del movimiento de la cámara. Para el cálculo del ángulo es necesario realizar un cambio de coordenadas del punto donde se encuentra el objetivo. El dato proporcionado por el receptor está indicado según el sistema de referencia de los sensores, pero para el cálculo del ángulo es necesario calcular dicha posición con referencia al sistema de referencia de la cámara. Para la obtención del valor de potencia, se muestreará durante un periodo de tiempo determinado. Una vez recogidos los paquetes recibidos en ese periodo, se utilizará la función de densidad de probabilidad de Weibull para obtener un único valor que sea representativa del conjunto. Posteriormente, se utilizará ese valor para calcular la distancia al emisor. Una vez calculada la distancia a todos los emisores, se utilizará el algoritmo de trilateración para buscar el punto que cumple las distancias a cada emisor. Como puede darse el caso de que no todas las distancias coincidan en un punto, se utilizará el valor del error cuadrático medio para buscar el punto óptimo. 4. Resultados Se ha diseñado un experimento para comprobar la precisión de nuestro sistema, se han elegido 26 puntos dentro del area de localización, utilizando los datos tomados durante un primer experimento, y se ha calculado la trayectoria estimada. El error cometido ha sido: Error Sensor 1 Sensor 2 Sensor 3 Sensor 4 Mínimo 0.00804 0.17964 0.15732 0.19973 Máximo 1.57624 1.90455 1.86191 2.02482 Medio 0.62416 0.62463 0.54367 0.59965 5. Conclusiones Se ha conseguido diseñar un sistema que cumple con los objetivos propuestos, salvo uno. No se han podido configurar los emisores para que emitan de manera continua, por lo que se han tenido que usar los datos tomados para comprobar si existía relación entre la distancia y la potencia.
LOCATION AND TRACKING SYSTEM BASED ON WIRELESS SENSORS Author: Sáez Mingorance, Borja. Supervisor: Contreras Bárcena, David. ABSTRACT The project is based on a tracking and location system, which allows the movement of a camera to keep a target framed in an image, without human intervention. In order to do so, multiple systems have been developed and integrated: emitter, receiver and actuator. Keywords: Bluetooth, BLE, Outdoor, RSSI, Weibull, Trilateration. 1. Introduction In this project, a tracking a location system will be developed using BLE as main technology, which goal is to track the user (with a camera) doing sport. This video will help to enhance the user s sporting performance by watching the recorded video. 2. Project definition The system is based in a receiver (carried by the tracking target) that must receive the signals of some emitters (located in known position), and using the RSSI received must be able to obtain the target position. This position must be sent to an actuator subsystem, that must move the camera in order to get the target continually framed in the video. All the system must be easily deployed by only one user. 3. System description The system will be composed of three different subsystems: - Emitter:
This subsystem should emit BLE packets, that will be used to estimate the location of the target. The SensorTag 2 (sold by Texas Instrument) have been chosen as emitter. Theoretically this device allows the modification of his firmware, so is adaptable to this project s necessities. The emitter should send Advertasing packets periodically and from the on until the off of the device (the original firmware makes that the device stop sending these packages after 2 minutes). There are other parameters that can be modified, as the power transmission and the advertising period, parameter which can affect positively to the system design. - Receiver: This subsystem will be carried by the target. It will be divided in two software components: The first one is the responsible of obtain all the BLE packets, filter those ones which came from the known emitters, and finally extract the RSSI from these filtered packets. The second component should take the RSSI from the previous, and with this data calculate the distance from each emitter, based in this distance estimate the target location, and finally send the location to the actuator (via WiFi). This subsystem is programmed into a Raspberry Pi 3, because this mini-computer has enough memory to execute both process simultaneously, and has also BLE an WiFi interfaces, that are needed in this project. - Actuator: This subsystem is the responsible of the camera movement. It has to, after getting the location from the receiver, estimate the angle between the camera and the target, and turn it to frame the target in the image. Three different devices will be used to develop this subsystem: an Arduino Pro Mini 3.3V as microcontroller (it should calculate the angle and communicates the other two devices),
an ESP8266 which will provide a WiFi interface to the subsystem, and finally a Tower Pro 9g, a servomotor that will move the camera. For the angle estimation is necessary a change of the coordinates of the target position. The receiver gets it from the reference system established by the emitters, but this location must be referenced by the camera location in order to get the right turn angle. Para la obtención del valor de potencia, se muestreará durante un periodo de tiempo determinado. Una vez recogidos los paquetes recibidos en ese periodo, se utilizará la función de densidad de probabilidad de Weibull para obtener un único valor que sea representativa del conjunto. Posteriormente, se utilizará ese valor para calcular la distancia al emisor. After obtaining all the distances between the receiver and the emitter, the system will apply the Trilateration algorithm to estimate the point which meet all the distances restrictions. Not always all the distances circles cross in one point, so the algorithm applies the LSE value to get the point. 4. Results An experiment has been designed to measure the system accuracy. Using the data acquired in the first experiment, 26 points have been chose simulating a path of our target, and the system has calculated this path. The error, in meters, is: Error Sensor 1 Sensor 2 Sensor 3 Sensor 4 Mínimo 0.00804 0.17964 0.15732 0.19973 Máximo 1.57624 1.90455 1.86191 2.02482 Medio 0.62416 0.62463 0.54367 0.59965 5. Conclusions Finally, a system has been designed. It meets all the requirements except one. The emitter s firmware hasn t been changed. It wasn t possible to change the emission time of the packets, and the emitter still turning off after two minutes, so the data used is the data used to get the relation between distance and power.