43
UMEÅ UNIVERSITY March 31, 2017 Institution of computing science Master’s Thesis Mobilaris AB Master’s thesis in Computing Science, 30.0 credits Improved positioning for underground mining Name Pascal Hansson E-mail [email protected] Extern supervisor Hans Wahlquist Examiner Henrik Björklund

Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

UMEÅ UNIVERSITY March 31, 2017Institution of computing scienceMaster’s Thesis

Mobilaris ABMaster’s thesis in Computing

Science, 30.0 credits

Improved positioning for underground miningName Pascal HanssonE-mail [email protected]

Extern supervisorHans WahlquistExaminer

Henrik Björklund

Page 2: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing
Page 3: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Abstract

A lot of different techniques can be used to determine the position of objects inunderground mines. What they have in common is that they’re very expensiveor require a specific infrastructure.

In this master’s thesis the goal was to produce an algorithm to increasethe positioning on vehicles in a cheap and easy way by only using gyroscopeand dead reckoning. To illustrate the movement of the vehicle in the un-derground mines the Mobilaris Mining Intelligence system (MMI) was used.The algorithm is designed to be used alongside the current algorithm that lo-cates objects by using their RSSI value from the Cisco Access points in theunderground mine. With this information it’s possible to relocate a vehicle ifthe algorithm ”chose” the wrong way.

Testing shows that this is a good way to increase the positioning of vehiclesin underground mines.

Page 4: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing
Page 5: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Acknowledgements

First I would like to thank Mobilaris and specially Hans Wahlquist for makingthis master’s thesis possible. I’ve had a great time developing, testing andalso felt welcomed to the company with friendly colleagues. Then I wouldalso like to thank Sebastian Linder and the other guys at Kristinebergsgruvanand New Boliden for letting me test in the actual underground mine.

At last I would also like to thank the institution of computing science atUmeå University for making very good classes that prepared me for thismaster’s thesis.

Page 6: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing
Page 7: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Contents

1 Introduction 1

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Underground mines . . . . . . . . . . . . . . . . . . . . 1

1.1.2 Mobilaris . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.3 Wifi Network . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.4 Current positioning methods . . . . . . . . . . . . . . . 3

1.1.5 Previous work . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 Project description . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Hardware 5

2.1 Tested sensors and other hardware . . . . . . . . . . . . . . . 5

2.1.1 Inductive proximity sensor . . . . . . . . . . . . . . . . 5

2.1.2 Hall effect sensor . . . . . . . . . . . . . . . . . . . . . 5

2.1.3 Gyroscope . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.4 Raspberry Pi 3 . . . . . . . . . . . . . . . . . . . . . . 6

2.1.5 ELM327 ODB2 Reader . . . . . . . . . . . . . . . . . . 6

2.2 Usages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2.1 Dead reckoning . . . . . . . . . . . . . . . . . . . . . . 6

2.2.2 Relative turn measurement . . . . . . . . . . . . . . . . 7

3 Implementation 8

Page 8: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

3.1 Raspberry Pi 3 - Hybrid Positioning Device . . . . . . . . . . 8

3.2 Mobilaris Mining Intelligence - Serverside . . . . . . . . . . . . 10

3.2.1 The state machine . . . . . . . . . . . . . . . . . . . . 10

3.2.2 REST API . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.2.3 Dead reckoning and gyro algorithm . . . . . . . . . . . 12

3.2.4 WIFI correction . . . . . . . . . . . . . . . . . . . . . . 13

3.2.5 Turn detection in the node graph . . . . . . . . . . . . 13

3.3 Known limitations . . . . . . . . . . . . . . . . . . . . . . . . 14

4 Result 15

4.1 Test result from the road in Luleå . . . . . . . . . . . . . . . . 15

4.1.1 Test run 1 . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.1.2 Test run 2 . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.1.3 Test run 3 . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.2 Test result from test in Kristineberg . . . . . . . . . . . . . . . 19

4.2.1 Test run 1 . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.2.2 Test run 2 . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2.3 Test run 3 . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.2.4 Test run 4 . . . . . . . . . . . . . . . . . . . . . . . . . 24

5 Final thoughts 26

5.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.3 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

References 29

A Test scenarios 30

Pascal Hansson March 31, 2017

Page 9: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

B Test run 3 - Luleå 31

Pascal Hansson March 31, 2017

Page 10: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing
Page 11: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Introduction

The world gets more and more digitized and in every industry a lot of focusis on safety for the workers and increasing efficiency. Internet of things is awidely used term meaning that it’s possible from every ”thing” to connect todifferent networks and post data which can be used. This of course requires anetwork of some sort like WIFI or 4G. Underground mines have traditionallybeen a very primitive place where it’s not possible to use cell phones, WIFIor any positioning system like GPS. But now in 2017, it’s an increasing trendthat mines implement WIFI and different solutions to call from under groundmeaning a lot more possibilities to increase safety by positioning humans,vehicles, refuge chambers and other objects.

1.1 Background

Sweden is one of the biggest mining countries in Europe and we also produces90% of all the iron ore in the area. [7] Around 20 000 persons work directlyrelated to the mining industry and without the minerals it would not bepossible to live life that we live. An average car contains 1 g silver, 2 g gold,10 kg lead, 10 kg zinc and 10 kg copper. Even that many people work inthe industry, where nothing can go wrong, Sweden only have had 3 fatalaccidents the last 10 years. A lot of focus and money is placed in the safetywork to minimize accidents.

1.1.1 Underground mines

Extraction of minerals from the ground is done in two ways, either fromopen-pit or from underground mines. At the moment Sweden has 5 open-pit mines and 9 underground mines. Underground mines are very complexenvironments where the network of roads can be over 400 km long and thewhole mine can be over 1 000 m deep.[8]

1

Page 12: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

In this environment, where systems like GPS don’t work, positioning is stillvery essential. In case of emergency, like if a fire breaks out or a tunnelcollapse, it’s possible with knowledge of the location of people to prioritythe rescue or see if anyone is located in the risk area. It can also be usedto optimize the production such as where is the closest drilling-rig? Whatis the fastest way to another sector? Is there a heavy truck on the way upin the ramp that the car on the way down can avoid? It’s also possible tocontrol ventilation for sectors depending on how many people there are inthe area. These are all examples of situations that can be solved throughposition services.

1.1.2 Mobilaris

Mobilaris AB was established in 1999 as a spin-off from Telia developinglocation-based decision support systems for mobile networks, both for com-mercial applications as well as official applications for law enforcement andpublic safety. Mobilaris expanded 2012 into the industrial segment with afocus on underground mines. Mobilaris has attracted great interest amongvarious mining companies in the world and is today a strong supplier ofworld leading mining systems. The office is situated in Luleå with around 30employees. [1]

1.1.3 Wifi Network

All of Bolidens mines got a well built out WIFI-network with access pointscovering over 90% of the underground mines. To control the access pointsand read data from them a Wireless LAN Controller (WLC) from Cisco isused. The WLC saves the Received signal strength indication (RSSI) andthe mac address from every device the connected access points hear.

Pascal Hansson 2 March 31, 2017

Page 13: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

1.1.4 Current positioning methods

Mobilaris uses two different positioning methods based on the RSSI valuesreceived from the WLC.

• Strongest AP Estimation

• Profiling RSSI Estimation

Strongest AP Estimation is currently the most used algorithm. On a giventime interval MMI checks all RSSI values from the WLC and puts the objectsat the same place as the access point in the 3D map. Two drawbacks withthis technology is that it can be up to 200 m between access points and trucksor any other objects can block the signal to an access point.

Profiling RSSI Estimation assumes a fixed loss of RSSI according to thedistance from the access point and if the road turns. This is corrected bythe actual strength an access point hear another access point. With theprofiling data and the objects’ RSSI values to different access points, an areais calculated where the device can exist.

1.1.5 Previous work

A lot of work has been done in the area. The most used technique is calledInertial navigation system (INS). It uses accelerometer and gyroscope tocalculate position, orientation and velocity. Normally and for daily use itworks fairly ok but often needs GPS or any other help to get recalibratedover a longer period due to drifting, calibration error and temperature effects.Also, the output from the gyroscope needs to be integrated twice, so a smallerror output means a big error (4 times times the size of the initial error).

This report showed a drift in position of 152.67 m after 60 seconds. Mostof the error comes from orientational drift which can be fixed with a magne-tometer. Woodman was able to get the drift down to 5m with fusing sensordata with a magnetometer. But a magnetometer is very sensitive to mineralsand in particularly iron which makes it not so suitable in an undergroundmine.[10]

A test using INS in underground mines has been done 2015 by John Svenssonfor New Boliden AB. In his thesis he summarizes that more information aboutthe geomagnetic field is needed for only using INS. Another problem withthe geomagnetic field is that it’s not constant through the underground mineand also changes as the mine expands. But he also recommends to add speedmeasurement to achieve better accuracy of the positioning. [9]

Pascal Hansson 3 March 31, 2017

Page 14: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

1.2 Project description

With the WIFI network built out in underground mines and usage of personalWIFI tags for persons and vehicles it’s possible with the two algorithms todetermine a rough position. In a normal case it can be up to 200 m betweenaccess points so the error can be very big. In some cases it’s necessary tohave better positioning, for example turn-by-turn navigation or fingerprintingWIFI strength through the underground mine.

This project will test if it’s possible to get improved positioning in a costefficient way by only using dead reckoning and a gyroscope. Positioningwill be calculated with information about the underground mine from theMobilaris 3D system and the WIFI network. A prototype will be createdand tested in New Boliden’s underground mines and at Mobilaris’ office inLuleå.

The goal of the prototype is to create a cheap, but still with usable accu-racy, prototype to improve positioning in underground mines. This hybridpositioning prototype will be based on:

• WIFI

• Dead reckoning

• Gyroscope

• 3D map of the underground mine

Pascal Hansson 4 March 31, 2017

Page 15: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Hardware

2.1 Tested sensors and other hardware

2.1.1 Inductive proximity sensor

With an inductive sensor it’s possible to measure the position of an metal-lic object without contact. When the sensor coil is supplied with electricityand a metallic or magnetic object approaches, the impedance changes and ittriggers an switch. Some benefits of an inductive sensor in a very dirty envi-ronment such as an underground mine are that it’s independent of humidity,water, condensation and dirt. But on the other hand it gives a signal everytime it’s close to an metallic or magnetic object.[2]

2.1.2 Hall effect sensor

The hall effect sensor has the same advantages as the inductive sensor. It’salso supplied with electricity and it gives voltage as output. The voltagesvaries depending on how strong the magnetic field is. Then it’s possible tomeasure example the rotation speed of a axis. [3]

2.1.3 Gyroscope

The gyroscope Adafruit L3GD20H is an electronic gyroscope measuring an-gular velocity in all three axes (XYZ). With that information it’s possible todetermine the orientation of the gyroscope. This is used in navigation to keepa constant direction even if the gyroscope is tilted or rotated. Gyroscopes(especially cheap ones) normally suffer from orientational drift meaning theycan’t be used straight away.[4]

5

Page 16: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

2.1.4 Raspberry Pi 3

The Raspberry Pi 3 is a cheap ARM based microcomputer. With low powerneeded to run (800 A, 5V) and powerful CPU for its size (1.2 Ghz QuadCore) it’s a really good base to use in embedded projects. Got both HDMI,WIFI and USB which makes it easy to use. It also got 40 GPIO pins tocommunicate with different sensors.[5]

2.1.5 ELM327 ODB2 Reader

In 1996 it was decided that every car must have a ODB2 port. From thatport you are able to access the engine to get sensor data. You can also readerror codes. Most cars use the CAN protocol to transfer this data and someof the sensors data is standardised, for example:

• RPM

• Current speed

• Throttle Position

• Error Codes

• And a lot of other things

2.2 Usages

2.2.1 Dead reckoning

In the first versions of the hybrid positioning device the inductive and thehall effect sensor was used. The inductive sensor was of course not a goodchoice because almost every rotating part of a vehicle is metal. Then thehall effect sensor was used. It worked good in the office on the test set up.But in the real world when the magnetic was placed on the car drive shaftit moved to much so a lot of reading were not detected.

The final solution was to use data from the engine control unit (ECU). Ve-locity is pulled from the ECU as quickly as possible (around 20 - 40 timesper second). With the samples a mean velocity is calculated every second.Then we know the velocity and the time and can use the known formula:

distance = velocity · time

Pascal Hansson 6 March 31, 2017

Page 17: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

2.2.2 Relative turn measurement

The normal hardware to determine heading is a magnetometer. It uses themagnetic field and the direction of it to determine the heading. In our case,the vehicle itself affects the magnetic field, but it’s also specially sensitive foriron which makes it not so suitable for underground mines...

Gyroscopes are normal used to determine the orientation in the three dimen-sions. In our case we had a drift around 2 degrees per minute. But in ourcase we don’t really need the orientation. In a underground mine you canonly go one way or another. So when we already know the direction we areonly interested in the relative change. Also we assume that the car is alwaysflat on the ground, we are only interested in the movement on the horizontalplane (Z plane). Then the drift isn’t a problem any more. Below we cansee a test run for a idle gyroscope for 3293 s (almost 1 hour). The error isbetween -0.2 and +0.3 degrees.

We can also see that even if we move the gyroscope and shake it, it’s stillstable when put still.

Pascal Hansson 7 March 31, 2017

Page 18: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Implementation

In this thesis, a Java client to put in a car, for reading and sending dataand an algorithm for doing calculations with the data on the server side isdeveloped.

3.1 Raspberry Pi 3 - Hybrid Positioning Device

The Hybrid Positioning Device is a Raspberry Pi 3 running the ”Raspian”OS. Raspian is based on the Linux distribution Debian Jessie. It’s poweredby 12V when the car is turned on. The client is written in Java and autostarts every time the Pi starts. It’s mounted behind the backrest in thebackseat as seen in the picture below.

8

Page 19: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

The Hybrid Positioning Device is built on four different modules. A completeUML diagram of the classes in the client is shown below. The client runswith the following steps:

1. The GyroReader checks the relative change in angle every second andsaves it in the buffer.

2. Odb2Reader reads speed from the car as quickly as possible and savesthe samples in the buffer.

3. Every second, the DataCollector retrieves data from GyroReader andOdb2Reader and sends it to the Hybrid Positioning Device.

4. The Hybrid Positioning Device sends the information to the JSon-Sender.

5. The JsonSender sends the information to the MMI server with HTTPPost.

6. JsonSender gets respons back with position (X, Y, Z), the state of thecar and the RSSI strength.

7. This is sent through back to Hybrid Positioning Device and then toLogWriter which writes it to the log file. LogWriter also writes theinformation which was sent to MMI.

The client is ”dumb” and those steps are always done, regardless of whichstate the car is in (described below). If connection is lost for a while, HybridPositioning Device saves a buffer which is sent as soon as the connection isback again.

Pascal Hansson 9 March 31, 2017

Page 20: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

3.2 Mobilaris Mining Intelligence - Serverside

Mobilaris Mining Intelligence (MMI) is a Java based server with a JavaScriptclient running in a web browser. It uses a 3D map of a underground mineand puts a node graph (Grid) on it with nodes and edges. MMI walks theWLC on a given time interval. In our case it’s every 5 seconds. This is toupdate all the devices’ positions in the map. How the positioning works isdescribed in section 1.1.4.

3.2.1 The state machine

1. F irst AP Detected

2. Second AP Detected

3. Position from distance

4. Position from distance + Gyroscope

The new positioning algorithm is constructed as a state machine. Describedbelow is what every state does:

1. In the first state the strongest AP is stored.

2. When another AP is heard as the strongest, this one is also stored andit’s possible to determine which direction the car has.

3. Now the car is in state 3, it uses the distance sent from the client tomove that distance on the node graph. It’s still not exactly sure wereit is, but the direction and the rough location is known.

4. When a bigger turn is detected and the algorithm finds a matchingturn in front or behind us, the vehicle is moved there. Now it enters

Pascal Hansson 10 March 31, 2017

Page 21: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

state 4 which means we know exactly where we are, and we continuethe dead reckoning from here.

Every time we get new information from the WLC about our position, thisis checked by the algorithm. With position method 4, an area of possiblelocation is created. If the vehicle exists in that area, it’s ok and the algorithmcontinues. But if it’s outside, the algorithm moves the vehicle to the correctedposition and enters state 3 again.

3.2.2 REST API

The communication between the MMI server and the Hybrid Positioning De-vice client is done with Representational state transfer (REST) using HTTP.The data is sent as a JSON Object with the following representation:

{p_mac: "00:00:00:00:00:00"type: 1events: {

distance: 10.0time: 12301203032312angle: -48.8

}}

Type is not used at the moment but built in for further extensions of the API.

The response for a call from the Hybrid Positioning Device is representedlike this:

{current_time: 12301203032312strongest_ap: "00:00:18:23:f3:23"strongest_rssi: 68position: "2323, 322, -950" (X, Y, Z)carstate: 3

}

Pascal Hansson 11 March 31, 2017

Page 22: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

3.2.3 Dead reckoning and gyro algorithm

The new positioning algorithm starts when the first JSON object is sent toMMI. This is represented by state 1. When two different Access points havebeen detected as the strongest, the direction is known and then usage of theactual data starts. This is in positioning state 3 and 4.

Every node in the graph knows to which other nodes it’s connected andthe distance of those edges. It also knows the direction in the 3D plane.Every asset (vehicles, persons and other things) is always snapped to thenode graph so it can only exist on a position which is on a edge. Thedirection is kept track on by storing the last node which was passed. This isan assumption that we can make because tunnels in underground mines areabout the same width as a vehicle, an asset can’t really be anywhere else. The3D representation of the node graph looks like this where the green cubesrepresent node, the red ones represent end node and the lines in betweenrepresent the edges.

When new data is received by the server, the algorithm tries to calculate newpossible positions. The simplest example is if it’s a road without turns orintersections. Then the algorithm traverses the node graph the same distanceas sent and calculate a new position which is sent as an update message tothe Location Manager. The angle which was sent is also stored in a bufferwhich contains the relative change in angle for the last 30 meters.

If the traverse reaches a node that contains > 2 adjacent nodes, it recursivecontinues on the possible edges to find the possible end positions. The rela-tive angles between the old position, the last node and the end positions is

Pascal Hansson 12 March 31, 2017

Page 23: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

calculated. Which one to choose is determined by using the position whichgot an angle most related to the angle stored in the angle buffer.

This behaviour looks the same for both state 3 and 4. But to reach state 4the algorithm needs to detect a bigger turn, matching one of the turns onthe map. Almost every turn in the underground mine is very distinct, whichmakes it easy to match on. For every new data received, the algorithm checkif the angle buffer matches the closest turn forward or backwards. If bothturns matches the angle buffer, the algorithm choose the turn which is closerfrom the old position. The vehicle is moved there, the buffer is cleared andthe algorithm reaches state 4 and the accuracy of the positioning will be veryaccurate.

3.2.4 WIFI correction

To be more robust, the algorithm needs to be corrected if it does somethingwrong. Positioning method 4 creates a possible area by combining the RSSIdata which a tag is heard by Access points (described in section 1.1.4).

Every time new data is received from the WLC, the algorithm uses one ofthese three scenarios to correct the position or not:

• If the calculated position from the algorithm exists in the area, keepthe position and continue.

• If the calculated position from the algorithm is outside the area but ison the same straight road (no turns between the positions), move tothe position that position method 4 suggests but keep the direction.Change to state 3.

• If there’s a turn in between, the algorithm is really lost. Recalculate di-rection and continue from the position from position method 4. Changeto state 3.

3.2.5 Turn detection in the node graph

To have any turns for the algorithm to match on, turns must be calculated.This is done when initializing MMI because the look of the tunnels in theunderground mine is constant. Upon start, every node in the graph is tra-versed. Every node that got > 2 adjacent nodes is a turn. But also all nodesthat got exactly 2 adjacent nodes but the relative angle difference betweenthem is over 40◦are treated as a turn.

Pascal Hansson 13 March 31, 2017

Page 24: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

3.3 Known limitations

• Distance is calculated from speed, but if the vehicle reverses, it’s still apositive speed so the algorithm will be fooled that the vehicle actuallymoves forward when it doesn’t.

• Data from the car computer is only sent when connected to an accesspoint. It still saves data while off line and sends it in a batch whileconnected. But to use it for example turn by turn navigation, an offline version of the 3D-model needs to be implemented.

• If the vehicle does a 180◦ turn, the algorithm will register it as a 90◦

+ a 90◦ turn meaning that it will correct to the closest matching turntwice and continue in the same direction instead of turning around.

Pascal Hansson 14 March 31, 2017

Page 25: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Result

Two different scenarios are tested in this master’s thesis to determine if thealgorithm works in practical.

• Test in Kristinebergsgruvan (Kristineberg underground mine) with thefull Cisco network.

• Test on the roads outside Mobilaris office in Luleå without WIFI net-work.

In the charts with relative angle change, a positive angle is a right rotationand negative angle means rotation to the left.

4.1 Test result from the road in Luleå

The tests on the roads outside the office were done by setting a fixed startingposition for the vehicle on the map. A map of the road was created bySketchUp with distance from hitta.se’s map. The test was done with twodifferent cars (Skoda Superb and BMW Z4) to verify that there’s no differencebetween brands. The focus on this test is to verify that distance sent fromthe car is calculated correctly against the MMI 3D-model. After syncing tothe first turn and then driving to another turn, the vehicle should be exactlyin the corner in the 3D-model. The final test is done by another person thanthe author for making the drive as random as possible.

4.1.1 Test run 1

The first test is done without trying to disturb the algorithm. As seen onthe position graph, it’s a lot of samples due to the low speed.

15

Page 26: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

The route also relates well to the relative angle chart as shown below.

4.1.2 Test run 2

In this run, the speed varied a bit more and the car was driving faster atsome points, as seen in the chart.

The relative angle still looks very good and similar to the position chart.

Pascal Hansson 16 March 31, 2017

Page 27: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

4.1.3 Test run 3

In this test run, the car was driven for 220 with the following instructions:

Drive how you like but try to at some point pass an intersection without turn,do ”zigzag driving” on a straight road to ”trick” the algorithm to handle it asa turn.

The drive was done in the following way. Started with a left turn followed

Pascal Hansson 17 March 31, 2017

Page 28: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

by a left turn. Then some small zigzag driving, passing one intersection,avoiding a obstacle and then two left turn shortly after each other. Thenavoiding another obstacle and then left followed by a left turn. Then verybig turns on the straight road (up to 45◦) followed by two left turns. Theturns are illustrated from the graph below:

Looking on the log for position we can see that the algorithm has chosen theright way all the time. Worth mentioning is that the two turns on x = -190,the obstacle there mentioned was a road work meaning that the road didn’tlook the same as predicted. That explains the two jumps in the graph.

For a separated and more detailed view of the test run, see appendix B.

Pascal Hansson 18 March 31, 2017

Page 29: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

4.2 Test result from test in Kristineberg

In Kristineberg the real map of the underground mine was used. After cal-ibration, the car (Nissan Kingcab) was driven around in the undergroundmine at random to detect how often the algorithm was lost and needed to beredirected by the WIFI. The focus on this test is to verify that the algorithmbuffers data when not connected to an access point, that roaming betweenaccess points works and the uneven road doesn’t disturb the algorithm.

4.2.1 Test run 1

This test run was done in a not well used area of the underground mine justto verify that direction from Access points, roaming and everything worksbefore the longer tests.

Pascal Hansson 19 March 31, 2017

Page 30: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

If we look at the relative angle chart we see that the values are stable around+- 4 degrees/second which is as straight as it’s possible to go. In the end weget a big deflection meaning that we did a left turn. This is also correct andwe correct our position to the closest possible turn.

Direction, read distance, correction and state change seems to be working.

Pascal Hansson 20 March 31, 2017

Page 31: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

4.2.2 Test run 2

This test was done by driving down the ramp from -714 m under ground,through the electrical workstation, down to -925m and then back up again.This is a total distance of 3.4 km.

The route is shown below:

By watching the chart of relative angle we observe that it looks very muchlike the road in the map. We can see a very big deflection around time 280s. This is the turn around. It’s not handled as a turn around but MMI willnotice that the vehicle is not in the right area and correct the position.

Pascal Hansson 21 March 31, 2017

Page 32: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

By watching the state we see that the algorithm obviously loses track whenthe turn around is made. The three state changes between time 270 s and350 s are all related to this. On the way down it doesn’t lose track once. Assoon as the car is turned around and on the way up again it only loses trackonce in the end.

Pascal Hansson 22 March 31, 2017

Page 33: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

4.2.3 Test run 3

This test starts from -490 m. -490 m is the underground parking where mostof the vehicles used for human transportation underground are parked duringshift changes. The car was driven down the ramp down to -730 m, turnedaround, and then up again. A route with total distance 5.3 km. This is oneof the most frequent used part of the underground road network.

Observing the angle value we can see that it is very clear when the turns inthe ramp is done. It’s also noticeable when the turn around are done startingat time 270 s. After the turn around it loses track as seen in the state graphbelow. But after a while it’s back on track again.

Pascal Hansson 23 March 31, 2017

Page 34: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

4.2.4 Test run 4

This run is done from the middle of the ramp at -716 m down to Olssons tav-ern at -1043 m. This is the underground lunchroom and the rescue chamberused by the personnel under blasting so they don’t need to be above ground.This is also one of the most used roads in Kristineberg.

Pascal Hansson 24 March 31, 2017

Page 35: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

Looking at the relative angle we can observe that the values in the beginningare really stable which is easy noticeable when the turn occurs. This is theturns done in the ramp were the road is very straight. The algorithm onlyloses track once at the electrical workstation, and that area is hard becauseit’s lots of roads and turns.

We can observe that after timestamp 250 s, when we leave the ramp andcontinue on the straight road, that the angle fluctuates more because ofthe road which is not straight any more. It also takes longer time for thealgorithm to sync because of the lack of turns.

Pascal Hansson 25 March 31, 2017

Page 36: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Final thoughts

The focus on this thesis was to increase the accuracy of positioning vehiclesby creating a hybrid positioning prototyped based on cheap hardware. Thequestions asked before are presented below:

• Is dead reckoning with help of calculate rotation precise enough to getthe accuracy down to 5m in a underground mine?

• Is it any difference to calculate rotation on the wheel or on the car driveshaft?

• If not, is it possible to communicate with the engine control unit (ECU)and achieve the same result?

• If not 5m precision was achieved, what is the best precision?

• What is the maximum distance between check points (turns at themoment) to keep the precision under 5 m?

• What are the error sources and how to compensate for them? (Examplethat the vehicle turns around 180◦ or similar?)

5.1 Discussion

As the result shows the precision gets really good in most cases. Now whenwe don’t do any calculation for reverse, the car computer still sends a positivedistance even if we go backwards. This needs to be fixed, for example byusing an accelerometer to detect acceleration. The algorithm also doesn’thandle turn around on straight road. This will be detected as a ”90◦ + 90◦”turn meaning matching to the closes turn and then matching the same turnagain.

The connection to the ECU in the car was a very positive experience. Thenit’s also possible to get much more information from the car which can be

26

Page 37: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

used for planing service and other things. This need to be further researched.As seen in the result, the distance calculated is very precise. The test wasdone on 1.5km straight road and with the error under 1% then we know thatit will work well for Kristineberg underground mine. There exist just a handfull of roads that are longer than 1.5 km without a turn.

5.2 Conclusion

It is a good way to increase positioning in underground mines by only us-ing speed and a gyroscope. The roads in the underground mines are veryprimitive meaning they only fit one vehicle in one direction at a time. Thisreduces the problem a lot. Turns are also frequent so even if the speed startsto drift it doesn’t matter because it always comes a turn soon to synchroniseon.

Lots of time was wasted in the beginning to try to get the hall effect sensor towork. Finding a strong sensor, stronger magnet and trying to fit the magneton the car drive shaft was time consuming. The idea of using an externalsensor for distance is still good if it’s an old vehicle without ODB2 or if it’sbroken. This needs to be further researched.

The speed obtained from the ODB2 is calibrated to the original wheels onthe car. Almost all of the vehicles used in the underground mine got differentwheels with different proportions. It’s possible to calibrate, but this is neededto be done after changing wheels to obtain the correct information.

5.3 Future work

The algorithm works really well and looks good when testing on the roadsin Luleå. This is because the Raspberry Pi is directly connected to the MMIserver on the laptop instead of needing to roam between different AP:s. Sothe author recommends Mobilaris to build an API for downloading the gridto a local computer and do all the calculations there instead on the serverside and instead of sending distance and angle send the calculated position.This will reduce the load of the server and make it possible to scale the usageto more vehicles. With the information local it’s also possible to developturn by turn navigation without being connected to the WIFI.

The author also recommends that Mobilaris add a sensor (for example an ac-celerometer) to determine if the vehicle goes forward of backwards to increasethe accuracy even more.

Pascal Hansson 27 March 31, 2017

Page 38: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

It’s also possible to develop the pattern matching to both match distanceand relative angle change for a more precise positioning.

Pascal Hansson 28 March 31, 2017

Page 39: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

References

[1] Mobilaris. About us, 2016. http://www.mobilaris.se/. [Accessed: 2016-09-16]

[2] Zettlex. How Inductive Sensors Work, 2017.http://www.zettlex.com/articles/inductive-sensors-work/, [Accessed:2017-02-20]

[3] Edward. Ramsed., Hall Effect Sensors: Theory and Application. Burling-ton: Newnes, 2006.

[4] Oxford Univeristy Press. Definition of Gyroscope, 2017.https://en.oxforddictionaries.com/definition/gyroscope. [Accessed:2016-09-16]

[5] Raspberry Pi Foundation. Raspberry Pi 3 Model B, 2017.https://www.raspberrypi.org/products/raspberry-pi-3-model-b/. [Ac-cessed: 2016-02-20]

[6] Runns. Elm327 USB ODB2 Felkodläsare v2.1, 2017.https://www.runns.se/felkodslasare/elm327/elm327-usb-obd2-eobd-felkodslasare. [Accessed: 2016-02-20]

[7] Svemin. Svensk Gruvnäring, 2017. http://www.svemin.se/svensk-gruvnaring/. [Accessed: 2016-02-21]

[8] Sveriges Geologiska undersökning. Från dagbrott till underjordsgruva,2016 http://www.sgu.se/om-sgu/nyheter/2016/mars/fran-dagbrott-till-underjordsgruva/. [Accessed: 2016-02-21]

[9] Svensson, John (2015). Investigation of Inertial Navigation for Localiza-tion in Underground Mines. Master’s Thesis, Uppsala University.

[10] J. Woodman, Oliver (2007). An introduction to inertial navigation. Tech-nical report, University of Cambridge.

29

Page 40: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Test scenarios

Test for ODB2 connection Yes No Comment

Connect to different cars fromdifferent brands X� 2

Tested on Nissan Kingcab,Skoda Superb, BMW Z4 andSubaru Outback

Reading speed from the car X� 2Speed matches iPhone 5SGPS speed application X� 2

Speed matches build inspeedometer in car X� 2

Drive a fixed distance andverify that the car computercalculates the same distance

X� 2

A distance of 1507 m (accord-ing to the GPS) was mea-sured: The car computer cal-culated 1503, 1504 and 1503m on three different tests

Do the distance test with vari-ation in speed, braking andstopping.

X� 2

30

Page 41: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Test run 3 - Luleå

Because of the choice of route, the chart for test run 3 is a bit unclear. Shownbelow is the position chart separated in three different charts for showing ashorter period of time to make it clearer.

31

Page 42: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

Pascal Hansson 32 March 31, 2017

Page 43: Mobilaris AB Master’s thesis in Computing Science, 30.0 ... · UMEÅUNIVERSITY March31,2017 Institutionofcomputingscience Master’sThesis Mobilaris AB Master’s thesis in Computing

Improved positioning for underground mining

Pascal Hansson 33 March 31, 2017