Digital signal processing in ultrasonic based navigation system for mobile robots

A system for estimating the coordinates of automated guided vehicles (AGV) was presented in this article. Ultrasonic waves for distance measurement were applied. Used hardware was characterised, as well as signal processing algorithms. The system was tested on wheeled mobile robot in model 2D environment. The results of working range and errors of position estimation were discussed. 1 Localisation systems for mobile robots An important element of automated transport systems is the localisation system of vehicles (mobile robots) in their work environment. Many different techniques have been developed for automatic position measurement. GPS is fundamental for open-field applications, often supplemented by ground stations [1-4]. In an indoor environment, the following localisation methods are used: • radio signals from the Wi-Fi networks [5-8], • optical markers and automatic vision systems [9-13], • distance measuring transducers (odometry) [4], • onboard accelerometers, gyroscopes, compasses [14-17], • noncontact distance measuring devices using: radar waves, infrared light, lasers (LIDARs) or ultrasonic waves [18-25]. Each of these localisation methods has limitations; ergo, hybrid systems are built using two or more of these techniques simultaneously. 2 Ultrasonic based localisation systems One of the oldest methods of determining the distance between objects in space is the use of ultrasounds – the acoustic waves with frequencies above than 20 kHz. The simplest variant of this method is the measurement of a time lapse – since a “packet” of ultrasonic waves has been emitted, until it reaches a detector (a microphone). This time duration is simply called “time of flight” (TOF). Knowing the velocity of sound waves propagation in the medium separating the objects, the distance between them can be calculated [4,18]. While ultrasonic distance measurements are relatively easy to implement, precise determination of the relative position (direction) of the transmitter and receiver is difficult. The reason for this, is the problem of emitting a coherent and targeted ultrasound beam, and the low “directionality” of the microphone sensitivity. Hence, a number of transmitters and/or microphones distributed in space are used for precise positioning, along with accredited triangulation methods [18,21,23,24]. Advanced methods of modulating the emitted ultrasound packet and algorithms of processing of received waveforms have been developed [19,20,22,25]. They allow to precisely calculate the distance and direction of arrival of the wave. In the paper [22], the authors describe a method of modulation and demodulation of ultrasounds, which results in establishing a measurement error of 1mm (up to 3 m distance) and 3 degrees in direction (up to ±50 degrees) with one transmitter and two closely spaced microphones. Despite the rapid development of other methods of locating objects (mainly vision systems), ultrasounds are still broadly used to detect objects (obstacles) and to navigate robots at distance up to a dozen meters. The advantages of ultrasound systems are: the simple operation principle, and the low hardware requirements for their implementation – hence, the low price of construction and implementation, in comparison to other systems. 3 Design requirements of the proposed localisation system The goal of the author’s work was to develop, build and test an experimental ultrasound-based locating system of mobile robot for indoor use. The basic requirements for the system were formulated as follows: • estimating the coordinates of the mobile robot position on the plane (floor), • operating range of a dozen or so meters, i.e. on the area of one room, corridor, small production hall, • establishing an error of positioning of the order of several centimetres, • installing ultrasound transmitters on walls/ceiling, • installing a microphone on the mobile robot, • setting all ultrasonic transmitters to operate on a single frequency; hence, they must transmit in the time sequence, ITM Web of Conferences 15, 05008 (2017) DOI: 10.1051/itmconf/20171505008

Each of these localisation methods has limitations; ergo, hybrid systems are built using two or more of these techniques simultaneously.

Ultrasonic based localisation systems
One of the oldest methods of determining the distance between objects in space is the use of ultrasounds -the acoustic waves with frequencies above than 20 kHz.The simplest variant of this method is the measurement of a time lapse -since a "packet" of ultrasonic waves has been emitted, until it reaches a detector (a microphone).This time duration is simply called "time of flight" (TOF).Knowing the velocity of sound waves propagation in the medium separating the objects, the distance between them can be calculated [4,18].
While ultrasonic distance measurements are relatively easy to implement, precise determination of the relative position (direction) of the transmitter and receiver is difficult.The reason for this, is the problem of emitting a coherent and targeted ultrasound beam, and the low "directionality" of the microphone sensitivity.Hence, a number of transmitters and/or microphones distributed in space are used for precise positioning, along with accredited triangulation methods [18,21,23,24].
Advanced methods of modulating the emitted ultrasound packet and algorithms of processing of received waveforms have been developed [19,20,22,25].They allow to precisely calculate the distance and direction of arrival of the wave.In the paper [22], the authors describe a method of modulation and demodulation of ultrasounds, which results in establishing a measurement error of 1mm (up to 3 m distance) and 3 degrees in direction (up to ±50 degrees) with one transmitter and two closely spaced microphones.
Despite the rapid development of other methods of locating objects (mainly vision systems), ultrasounds are still broadly used to detect objects (obstacles) and to navigate robots at distance up to a dozen meters.The advantages of ultrasound systems are: the simple operation principle, and the low hardware requirements for their implementation -hence, the low price of construction and implementation, in comparison to other systems.

Design requirements of the proposed localisation system
The goal of the author's work was to develop, build and test an experimental ultrasound-based locating system of mobile robot for indoor use.The basic requirements for the system were formulated as follows: • estimating the coordinates of the mobile robot position on the plane (floor), • operating range of a dozen or so meters, i.e. on the area of one room, corridor, small production hall, • establishing an error of positioning of the order of several centimetres, • installing ultrasound transmitters on walls/ceiling, • installing a microphone on the mobile robot, • setting all ultrasonic transmitters to operate on a single frequency; hence, they must transmit in the time sequence,

Structure of mobile robot localisation system
The block diagram of the developed location system for mobile robots is shown in Fig. 1.The system consists of: • four piezoelectric ultrasonic transmitters of type UT-1640K-TT-2-R [26], • microprocessor controller of ultrasonic transmitters including: 8-bit AVR microcontroller (Arduino UNO module), 433 MHz RF receiver and four H-bridge transistor drivers, • wheeled mobile robot, on which following items have been installed (Fig. 2.): • microphone made in MEMS technology of type SPH0641LU4H-1 [27], • 32-bit Kinetis K64F-family microcontroller, • 433 MHz radio transmitter for digital data transmission, • ZigBee radio communication module, • personal computer with ZigBee radio communication module.

Fig. 1. Scheme of experimental ultrasonic-based system for mobile robot localisation
Four ultrasonic transmitters were mounted in the corners of the room of a rectangular floor (dimensions 10 m x 9 m), 2.5 m above the floor (Fig. 3).The axis of the transmitters were directed toward the central point of the flat floor, which was the working area of the mobile robot.In addition, four obstacles, i.e. large tables with a height of 0.8 m, were set on the floor.The microphone was installed on a mobile robot and the axis of mic. was upwardly vertical (Fig. 2.).
The estimation of the robot position on the plane was automatically made in one-second cycles, consisting of the following phases: 1.The microcontroller on the robot sends a data packet through 433 MHz radio link to the ultrasonic transmitters controller for synchronising the times of both microcontrollers.At the current stage of the research, the algorithm for calculating the robot coordinates, based on measured time durations (TOFs), is performed on a desktop computer.The target algorithm will be implemented in the robot's microcontroller.

Signal processing algorithms
Distance measured using ultrasounds is particularly sensitive to disturbances caused by acoustic waves, generated in the vicinity of the microphone, and by interference with the ultrasonic waves reflected from other objects.The temperature of the surrounding air also has a significant impact on the distance measurement error (the velocity of sound in the air varies by nearly 2%/ 10°C).However, the influence of this factor is relatively easy to automatically compensate for.The significant effect on distance measurement accuracy has the way, the acoustic wave is generated, as well as filtering the signal received from the microphone.In typical applications, the ultrasonic transmitter periodically supplies the differential voltage signal in the form of several sinusoidal or rectangular cycles, with a frequency corresponding to the resonant frequency of the transmitter (Fig. 4.).In the turn, the time after which the "packet of waves" has been detected by a microphone is searched in received signal.Unfortunately, due to the inertia of the vibrating elements of the transmitter and the microphone, the recorded response is distorted (Fig. 4.).The amplitude of oscillations gradually increases, and then slowly disappears.Hence, this leads to difficulties with unambiguous detection of the beginning and the end of the packet, received by the microphone.In order to decrease the time of fading of transmitter oscillations after emitting of the ultrasonic wave package, it was proposed to add active vibrations damping, by driving transmitter by the signal shifted in phase at 180 degrees.Fig. 4. shows voltage recorded at the terminals of the piezoelectric transmitter.There are 19 cycles of rectangular signal (basic wave packet), 5 cycles of the opposite phase, followed by fading oscillations of the voltage, generated by the oscillating piezoelectric (after emitting the whole package, the transmitter terminals are short-circuited by the H-bridge, in order to suppress further oscillations of piezoelectric).
The block diagram of the processing path of the microphone output signal is shown in Fig. 5.The pulse density modulation (PDM) output signal is applied to the RC low-pass filter input.The output voltage of the filter U1 is digitised at 160,000 samples per second (4 times the frequency of the ultrasonic wave), and the results are stored in the memory buffer of the robot's microcontroller.The recorded signal is processed in the Butterworth digital pass band filter [28][29][30][31][32].The transfer characteristics of the filter is shown in Fig. 5. Next, absolute values are calculated from the filter output AF and then averaged in the moving average filter (n = 32).The time at which the AMAX peak occurs in the AFMA signal is assumed to be the moment of recording the centre of the waves packet sent by the transmitter, i.e. the TOF (after additional correction for the delay time introduced by the both digital filters).
The choice of a 40 kHz Butterworth filter was driven by its very high selectivity and a lack of ripples in the frequency characteristic, typical for other filters [28,31].A second order filter with the general structure, shown in Fig. 6., was applied.Real numbers a1÷a6 are filter parameters.The disadvantage of the selected filter is its relatively complex numerical implementation, requiring the use of multiplication and addition of floating point numbers.However, in the discussed solution, the filtering of the signal from the microphone took place after recording the samples in the memory buffer, so the efficiency of the numerical filter was a secondary issue.
Chosen signal waveforms are shown in Fig. 7.They were acquired for unfavourable position of the microphone relative to the transmitter (distance 9 m, the angle of incidence of the ultrasound waves to the axis of the microphone was about 60 degrees).The signal received by the microphone (results of sampling the voltage U1 by ADC) is shown in upper chart.On the horizontal axis, consecutive samples were numbered (at rate 160 kSamples/s).Within the sample range of 130 to 230, the received packet of emitted waves by an ultrasonic transmitter is hardly visible.The middle chart shows the waveform of the AF signal, i.e. the output from the pass band filter.The bottom graph shows the result of averaging the signal |AF| in the moving average filter -the AFMA signal.The maximum value of AMAX is around sample no.210.Clearly, filters introduce a time delay, which should be included in calculating the final value of the arrival time of the ultrasonic packet from the transmitter to the robot's microphone.Sample number (160kS/s) Moving average output In addition to the TOF value, the robot's microcontroller calculated the stipulated measure of "power" P of the received ultrasonic signal.This value was defined as the ratio of the value of the AMAX to the average of all AFMA values recorded throughout the whole acquisition window (corresponding to the time of flight for 13 m distance): The factor P (1) contains information about the uncertainty of the result of TOF measurement (not in the strict statistical sense).In the conducted tests, the P value changed from nearly 1 (for pure noise from the robot environment) to about 30, for a microphone 3 m away from the ultrasonic transmitter (transmitter and microphone in one axis).Further tests have shown that the results of TOF measurements with a P-ratio of less than 3 are unreliable (there are severe distance measurement errors).

Calculating the coordinates of the robot
The coordinates of the robot on the plane were calculated based on four measured TOFs.The floor in the test room was flat and the robot's microphone was at a constant height (0.14 m).Ultrasound transmitters were stationary and known coordinates (Fig. 3.).The velocity of the wave propagation in the air for calculations was automatically corrected, according to the temperature of the robot's surroundings.
The TOF measurements, transmitted in one-second cycles to the desktop computer, were further filtered.Results with a P (1) factor less than 3.5 were ignored -as a result of high uncertainty.The remaining TOF results were processed by a median filter of 5 elements.
Calculation of robot coordinates on a plane, based on the distance from four points received by perpendicular projection of transmitter positions to the floor plane, is a non-complicated geometric task and does not require detailed discussion.For real distance measures (that include estimation error), up to 12 points of intersection of circles pairs with centres corresponding to the positions of four ultrasonic transmitters (Fig. 3.) are obtained.Some of the solutions are outside the floor area and should be ignored.Choosing the right solution -i.e. one of the two points of intersection of the circles around the opposing transmitters, requires an additional logical condition.The point is then chosen to be less distant from the solutions of the intersection of adjacent circles.

Testing the mobile robot localisation system
The built localisation system has been tested in the laboratory.The errors in estimating the position of the still robot at selected points of the room floor were calculated.
The distance between the position of the robot's microphone, estimated by the system versus the actual position, is shown in Fig. 8.The positioning error does not exceed 0.15 m and its average value is 0.07 m.The error value increases slightly, as an object is moved away from the central point of the floor and near obstacles (up to 0.2 m next to one of the tables).In the areas corresponding to the white fields in Fig. 8. at least three of the four measured distances from transmitters were unreliable (P<3.5).The reason for the low signal level received from distant transmitters is the large angle between the axis of the robot's microphone facing upwards and the direction at which the ultrasonic waves reach it (even up to 70 degrees).For this angle, value of microphone sensitivity is 10 times lower than the sensitivity along its axis.Likewise, the transmitter's sound pressure level decreases, as it moves away from its axis.Hence, complete amplification of the transmittermicrophone signal path can be several tens of times smaller at the extremities of the robot's working plane, than at its centre.
Improving the robot's localisation range can be achieved by increasing the voltage driving the ultrasound transmitters, but this will reduce the comfort of the occupants in the room (ultrasonic transmitters driven by rectangular voltage signal begin to be audible for humans).It may also affect the lifetime of piezoelectric transmitters.

Conclusions
An experimental system for locating a mobile robot on the plane, using ultrasonic waves, was developed and tested.The average value of the robot position estimation error was 0.07 m, while the maximum value did not exceed 0.2 m on a rectangular floor measuring 10 x 9 m.
On the periphery of the robot's work zone and near the major obstacles to ultrasounds, the localisation system was unable to determine the position of the robot.However, thanks to the filtering algorithms used, the system ignores the uncertain results of the measurements; therefore, does not provide false information.In these areas, the robot control system should use other navigation mechanisms, such as odometry.Further work is planned to increase the range of operation of the location system and to reduce the "dead" zones.The use of three microphones in a 120-degree horizontal spacing, and with an inclination of about 45 degrees from the vertical, should increase the sensitivity of the system.Additionally, it will be possible to determine the angular position of the robot axis relative to the reference coordinates system.

2 .
The transmitters controller generates a sequence of 4 rectangular signals (Fig.4.), one for each of the four ultrasound transmitters.Signals for successive transmitters are generated every 200 ms, driving only one transmitter at a time (during less than 0.7 ms). 3.During the transmission of ultrasounds, the robot's microcontroller records the signal from the microphone.4. The recorded signal from the microphone is processed in the robot's microcontroller, and the time, needed for the sound wave to travel from each transmitter to the microphone, is calculated. 5. Results of time measurements (TOF) and "power" of the received signals are sent by ZigBee radio link to the desktop computer, where they are further processed (filtered) and the current position of the robot is estimated.6.The computer sends calculated position to the microcontroller on the robot.

Fig. 2 .
Fig. 2. Experimental mobile robot with components of ultrasonic-based localisation system.

Fig. 3 .
Fig. 3. Scheme of test-room floor (top view) and arrangement of localisation system elements; four ultrasonic transmitters marked TR0÷TR3 were installed at 2.5 m above the floor.

Fig. 5 .
Fig. 5. Block diagram of digital processing of ultrasonic signal for distance measurement.

Fig. 8 .
Fig. 8.A map of position estimation error on the room floor for experimental ultrasonic-based localisation system.