Firefly Eindhoven - Localization - Ultrasound

From Control Systems Technology Group

Jump to: navigation, search

This page discusses the Ultrasound system manufactured and distributed by Marvelmind Robotics [1]. The working principle of the system will briefly be discussed followed by a user manual on the system.

Contents

Working principle

The Ultrasound system by Marvelmind consists of small (~7cmx7cm) beacons (recognized by the 5 ultrasound transmitters on top and sides) and a modem (~3cmx3cm). For the system to work, one should assign at least 2 (2D location estimation) or 3 (3D location estimation) beacons to be stationary. The stationary beacons function as an anchor point in the world and the height of these beacons need to be known as accurately as possible (+- 3 cm) for good results, as the height is used as an input parameter for triangulation. Mobile beacons (i.e. non-stationary beacons, also called hedge beacons) can then be triangulated given the distances to each stationary beacon and the location of these stationary beacons in the world frame. This is done by transmitting an ultrasound signal from the mobile beacon. This signal is then received by the stationary beacons, which then determine the range to the mobile beacon by an algorithm created by Marvelmind. These distances are sent to the modem through radio with a predefined radio profile. The modem then triangulates the mobile beacons based on these distances.

Multiple beacons are served sequentially, meaning that the rate at which the system functions is some base rate divided by the amount of beacons. On their website, Marvelmind advertises a base rate of 40 hertz. However, after experimenting with the beacons, changing settings such that the system should perform optimally and consulting the Marvelmind help desk, the maximum base rate was found to be 25 Hz under optimal conditions. These optimal conditions included the beacons being no more than 2 meter apart, setting this as upper bound in the software and communicating with the highest radio profile, which are all the tuneable parameters to change the rate according to the manual, help desk and YouTube videos. Creating some reasonable spacing between the beacons to cover an appropriate flying area decreases this base rate to 18 hertz. Selecting a radio profile with an acceptable noise level decreases the base rate to 12 hertz for a single beacon. This base rate should be divided by the amount of mobile beacons to approximate the system update rate. Therefore, to localize 3 drones with one beacon on each drone (no rotation, so three mobile beacons in total), a rate of 12/3 = ~3-4 hertz is achieved.

User manual

Installation

This documentation will not focus on installing the dashboard (graphical software tool to view beacon output, change the configuration and settings) and the drivers for the modem. The instructions on how to do this can be found at [2]. The dashboard can be downloaded at [3].

Setting up the system through Dashboard

This Section describes the steps that need to be taken to set up the Ultrasound system. Setting up the Ultrasound system is always done through the GUI called dashboard. This GUI displays the available beacons, their position and all other relevant information and is therefore the fastest (and to my knowledge only) way to set up the system from scratch.

  1. Check the settings on each beacon: To make sure the system can communicate, the following parameters need to be configured in such a way that they are the same for the whole system. To do this, plug in each beacon to the laptop while having Dashboard open. This will allow you to change the parameters of that specific beacon.
    • Turn on the beacons (power switch on, DFU switch off).
    • Write down the number and software version of the beacon (for later use to check which beacon is recognized by modem). These can be found in the lower left corner once the beacon is recognized by the Dashboard.
    • Check the charge of the beacon (Supply voltage, right panel). An almost empty beacon will transition into a mode such that it cannot be used for triangulation, but can still be accessed wireless through the dashboard.
    • In parameters of radio (right panel), make sure the base frequency is set to 433 MHz. Then change the radio profile to one of the three profiles of your choice. The lowest mode provides most accurate position estimations, but the lowest rate. The 500 Kbps profile (highest) has the highest rate but is extremely noisy. The 153 Kbps profile is a good compromise between rate and noise and thus the recommended option.
    • Make sure the channel is set to the same integer (defaults to 0) for all beacons and the modem.
  2. Synchronize the software versions. The beacons and modem are most likely running the same software version, so the easiest solution to software version synchronization is just to downgrade your version of dashboard. You could also upgrade the software of the beacons, but this might have to be done by DFU programming (see Marvelmind manual [4]) if the gap in software versions is too big.
  3. Activate the system: If the above settings are the same for each beacon, plug in the modem and set its same radio parameters the same as all other beacons .To make sure the parameters of the modem are set, first click the modem button in the left corner above the bottom bar. This button should also indicate the device is a modem. Double clicking on the panels of the beacons corresponding to the beacon IDs in the lower left bar should wake up the beacons. If not, go through above steps again. Each beacon should now sporadically produce a ticking sound, meaning they are ranging each other.
  4. Assign beacon roles: Assign stationary and mobile beacons.
    • For stationary beacons: In the dashboard, turn off the hedgehog mode, indicating that it is a stationary beacon. The color of the beacon in the bottom bar should now be green.
    • For mobile beacons: In the dashboard, turn on the hedgehog mode, indicating that it is a mobile beacon. The color of the beacon in the bottom bar should now be blue.
  5. Physically place the stationary beacons: Place the stationary beacons while measuring their (x,y,z) coordinates with respect to the origin of a user defined fixed frame in the physical world (i.e. hypothetical coordinate system defined for conventions). Enter the z-coordinate of the stationary beacon in the right panel.
  6. Transform the map on the Dashboard: Open the modem parameters in the right panel (click modem device in left corner above bottom bar). Set the parameter starting beacon trilateration (first parameter right panel) to the beacon number which you would like to utilize as origin of the map. Then set Submap rotation degrees to make the axis of the dashboard map line up with the axis of the user defined frame. This parameter can be set to 1 degree accurate. If the map is mirrored with respect to the user defined frame, press the mirroring button once (below the - sign, right side of the map). Important: The compass only rotates the view, i.e. no alignment is taking place. The submap parameters can be used to define an offset with respect to the origin beacon.
  7. Set additional preferences: For each beacon, more parameters can be set. Most should be left the way they are, as they are only understood by a Marvelmind engineer and influence the triangulation/range finder algorithm.
    • RXi normal/frozen can be set on or off depending on which of the five ultrasound transmitters should be used by each beacon. For the numbering of each transmitter, consult the manual.
    • Set the limitation distances (right panel) to a maximum physical distance between the beacons to possibly speed up the localization process.
  8. Check distances: With every beacon placed, preferences set and the map configured correctly, check the table of distances in the top left corner. Each cell indicates the distance from the beacon with the number indicated in the current row to the beacon with the number indicated in the current column. Therefore, the diagonal is empty and the table should be (roughly) symmetric. Next, compare the indicated ranges with the distances as calculated from the measured (x,y,z) positions of the beacons. These should correspond.
  9. Freeze the map: If all went well, the system can consistently triangulate the other beacons. The only thing that remains is to freeze the map (button in the right corner of the map). The action taken when the button is pressed, is indicated on the button, i.e. pressing unfreeze map unfreezes the map. This option is only visible when the map is frozen. When freezing the map, the positions of the stationary beacons with respect to the map coordinates get fixed. Only the mobile beacons should now be making sound (clicking) at a higher frequency such that their position can be triangulated.

Congratulations, you've successfully set up the system and can start to work with it.

Possible example setup

The hardware components of the system, their number and function in the system and the appropriate position on the field are displayed in the table below.

Number Function Position as seen when facing goal Height [m]
1 Stationary beacon Small goal right upper corner 1.070
2 Stationary beacon Small goal left upper corner 1.070
3 Stationary beacon Large goal left/right upper corner 2.120
4 Stationary beacon Large goal left/right upper corner 2.120
5 Mobile beacon (hedge) Variable Variable

Since the dimensions of the soccer field are precisely known, there is no need to measure the (x,y) coordinates of the beacons and only the height suffices. The height is based on the height of a goal, which can be precisely measured. Note: the height of each beacon should be entered in the configuration of each stationary beacon through dashboard (right panel). The positions are referenced with respect to the RoboCup soccer field in Gemini-Noord. A schematic overview of the field including the beacon positions is shown in the Figure below.

After completing the steps above, the Dashboard shows the following setup:

on which the left and right goal dimensions (height and width) can be recognized. Note that the origin of the frame has been placed at beacon 1 with y pointing upwards and x pointing right. The only action that remains is freezing the map.

Re-using the previous setup

To re-use a previous setup, it suffices to only physically set it up according to its last configuration, turn on the beacons and plug in the modem to a laptop, as the modem stores its settings and the stationary beacon map in its memory. The beacons will then automatically be woken up by the modem and the system will start functioning as before, i.e. triangulating mobile beacon positions. However, make sure all beacons are in appropriate mode (power switch on, DFU switch off, switches are found on the beacon itself) and are all charged.

Dashboard

Re-using or checking the configuration in Dashboard is as easy as launching Dashboard. All settings will be loaded again and it will display the current map, found beacons, ranges and update rate. It is recommended to always check the functioning of the system in Dashboard before running C/Python code to send position information to the drone/ground robot to prevent wrong information from entering the control loop.

C

Build C files can also be used to read out data from the ultrasound. Marvelmind provides C source code to read out the modem on a device without utilizing the Dashboard. As the modem starts measuring as soon as it is plugged in, the C file will only retrieve its values. Currently, the C source code is only used to read out the Ultrasound and write its values to a file for offline post-processing. A possible next step is to integrate the C code in a MATLAB S-function such that it can be used in Simulink to read the Ultrasound measurements real-time.

Python

Marvelmind also provides source code for Python to read out the modem. The provided Python code in combination with a UDP send can be used to get the Ultrasound data into Simulink and close the loop for the ground-robot/drone as an alternative to the other localization systems.

Software

See [5].

Personal tools