**Speed Calibration for Mobile Robot**

Zulfikri Paidi, Nurzaid Muhd Zain, Mahfudzah Othman, Siti Hajar Mohd Mokhtar

Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA, Perlis, Malaysia

Corresponding author: fikri@uitm.edu.my

Received Date: \*date

Accepted Date: \*date

ABSTRACT

*Mobile robots are robotic systems that exist with features such as mobile capabilities, autonomy and perception. Autonomous mobile robots such as robot cars have the disadvantage of not being able to control the velocity when moving in a corner area. The purpose of this study was to find the appropriate calibrated velocity value for the robot car to slide in various environmental conditions such as straight lines and corner paths. The study was conducted using Arduino board hardware, remote robot cars, remote controls for remote robot cars, and rotary encoders. Three main experiments were completed to test the calibrated speed values, namely first test on straight line, test on corner lane, and last test on combination of straight path & corner lane. Simulations for road routes are also made using cardboard, sandpaper and carpet. The results of experimental analysis found that as the speed of a robot car increases, the longer it takes to make a single wheel rotation.*

*Keywords: Mobile robot, calibration, Arduino, rotary encoder*

**INTRODUCTION**

Mobile robots are robotic systems that exist with features such as mobile, autonomy and perception capabilities. Mobile refers to the functional characteristics of a robot that can move relative to its environment. This occurs when the position of the robot changes based on conditions such as changes in velocity, displacement, and direction. Measurement of robot movement will be done by measuring changes in momentum. The momentum on the robot is directly generated from the physical weight of the robot and the velocity of the movement it produces. This means that the difference in physical weight of a robot can affect the speed of its movement, and will also indirectly affect the momentum generated. To ensure a controlled state of the robot movement, calibration is required to find the best control value for the moving robot.

There are two scenarios for a mobile robot. The first is an autonomous mobile robot and the second is a remote-controlled mobile robot. Autonomous robots can be operated using sensor and localization methods to avoid collisions. However, autonomous moving robots have one major drawback. This weakness occurs when a moving robot is unable to control its velocity while moving in a corner area. Therefore, a model calibration is required to give a slight idea of ​​the speed for a moving robot to be operated when approaching a corner.

The purpose of this study is to find the appropriate velocity values ​​for a robotic car to slide in various environmental conditions. The results of this study can be used as a guide to the construction of a prototype car without a driver.

**RELATED WORKS**

Based on the journal and thesis that has been published and related to this project were referred in this related works.

**Car Speed Estimation Based on Image Scale Factor**

Costa, Rauen, and Fronza (2020) conducted a study on accidents involving speeding. Through their study, the speed analysis of a speeding vehicle will be examined through video analysis. Estimates, the speed obtained through video analysis will be assimilated with the information obtained at the location as well as those obtained by photogrammetric techniques. In their study, Costa, Rauen, and Fronza have suggested using the longitudinal trajectory method performed in close proximity and distance. This method will use the "pixel scale image factor" to calculate the distance from the vehicle to the camera in different video frames

**A Comparative Paper on Real Time Road, Object & Passenger Detection System for DriverLess Car**

Verma and Tandan (2020) study the use of sensors and radar by collecting information about vehicle condition and car speed while driving. The current information of this vehicle will be used to help the driver make a decision during the driving process. Verma and Tanda suggested in their study for a complete comparison of the previous available approaches related to driverless car systems.

**Self-Driving Cars: A Survey**

Badue, Guidolini, Carneiro, Azevedo, Cardoso, Forechi, Jesus, Berriel, Paixao, Mutz, Veronese, Oliveira-Santos, and De Souza (2020) wrote about self-driving cars. In writing, they state that there are two systems for autonomous self-driving car architecture, namely the perception system and the decision-making system.

**Time-To-Contact Control: Improving Safety and Reliability of Autonomous Vehicles**

Wang and Horn (2020) have conducted a study on hazard warning systems to prevent accidents. This system will provide time-to-contact (TTC) feedback control. In their study, Wang and Horn used detailed mathematical analysis and algorithm implementation. The machine for the vision-based TTC Algorithm used can be implemented on Android smartphones running in real time.

**Simultaneous calibration of odometry and sensor parameters for mobile robots**

A differential-drive mobile is equipped with sensor and odometer. Simultaneous use of odometry and sensor to estimate the robot owns motion. These projects will calibration the odometry and sensor simultaneously. This project use calibration on the robot that involves six parameters estimation (Censi, Franchi, Marchionni, & Oriolo, 2013)

**Measurement and Correction of Systematic Odometry Errors in Mobile Robots**

These papers propose a method to measuring and reducing odometry error that occurs on differential-drive mobile robot. The researcher has identified the leading errors that make the odometry errors. To avoid the error the researcher has proposed that performing an occasional calibration. Based on the statement, by performing occasional calibration the errors on the odometry accuracy and it will reduce cost on operation of the mobile robot (Borenstein & Feng, Measurement and Correction of Systematic Odometry Errors in Mobile Robot, 1996).

**Correction of Systematic Odometry Errors in Mobile Robots**

This paper proposed method to correcting the systematic odometry error in a differential-drive mobile robot. It correct the error based on the error occurs due to the diameter of wheel and the wheelbase uncertainty (Borenstein & Feng, Correction of Systematic Odometry Errors in Mobile Robots, 1995).

**METHODS**

This study was conducted using Arduino Board hardware, remote robot car, remote controller for the remote robot car, and rotary encoder. In addition, Arduino Software (IDE) has been used for program encoding on the Arduino Uno board.

**Mobile Robot Programming**

A robot car needs travel guidance to allow it to move in an environment. We can provide this guidance through built-in programs. To measure velocity, a rotary encoder will be used to measure the speed limit of the robot car movement.

An algorithm is a sequence of programs that apply a step-by-step solution to solve a problem. Programs written in the Arduino programming language are referred to as sketches. For this project, only one sketch is required. The sketch used is for rotary encoder and LCD display. The sketch will receive the input signal from the rotary encoder, the program will calculate the speed from the input signal and display it on the LCD.

![](168-1-447-1-2-20201006_media/media/image1.emf)

Figure 1: Rotary encoder with LCD flowchart

**Environmental Preparation for Speed ​​Calibration**

The environment that normally exists during a moving car will be created as a simulation for the purpose of this study. Among such environments is to create different types of road surfaces for the movement of robot cars.

The first environmental situation created was by using cardboard. Cardboard is used in experiments as a simulation of a normal road surface. The second environmental situation created was using sandpaper. Sandpaper is used as a simulation of a road with a rough surface full of rocks. This rough surface is also used to measure the rate of decrease in velocity that occurs due to friction. A third environmental situation was created using a carpet. Carpets are used as a simulation of a road full of long grass for the movement of a car. This grassy surface is also used to measure the rate of velocity that may decrease due to friction or rise due to sliding.

**Preparation of Experiments**

We have prepared three environmental preparations for the experiments to be carried out with three different road structures. Prior to that, we have also provided a preliminary experiment to determine the time taken by a complete cycle taken by a rotary encoder, and the maximum value of the speed limit that can be detected by a rotary encoder.

**i) Preliminary 1: Experiment on Rotary Encoder Rotation**

This experiment was performed to see the time taken in one rotation using a rotary encoder. The value obtained will be the benchmark for the next experiment.

**ii) Preliminary 2: Experiment on Rotary Encoder Detector**

This experiment was performed to see the usability of the rotary encoder detector to be used, up to a maximum velocity level.

**iii) Road Structure 1: Experiment with Straight Line Motion**

In this experiment, the mobile robot will move for 100 cm in straight line motion as seen in the figure below. Robot mobile will move in different type of surface. Observation is needed when the experiment conducted. The speed of the mobile robot is taken as a result for every experiment conducted.

![](168-1-447-1-2-20201006_media/media/image2.png)

Figure 2: straight line motion

**Road Structure 2: Experiment with Corner Path Motion**

In this experiment, the mobile robot will move for 50 cm in corner as soon as started as seen in the figure below. Robot mobile will move in different type of surface. Observation is needed when the experiment conducted. The speed of the mobile robot is taken as a result for every experiment conducted. To calculate the rotation for every experiment, the equation below has been used:-

![](168-1-447-1-2-20201006_media/media/image3.png)

Figure 3: Corner path motion

**Road Structure 3: Experiment with Straight Line and Corner Path Motion**

In this experiment, the mobile robot will move for 50 cm in straight line motion before move in corner path as seen in the figure below. Robot mobile will move in different type of surface. Observation is needed when the experiment conducted. The speed of the mobile robot is taken as a result for every experiment conducted. To calculate the rotation for every experiment, the equation below has been used:-

![](168-1-447-1-2-20201006_media/media/image4.png)

Figure 4: Straight line and corner path motion

We will use the Equation 1 and Equation 2 to calculate the rotation for each experiment happens in Figure 2, Figure 3, and Figure 4.

| \[\text{N\ }\left( \text{total\ number\ of\ rotation} \right) = \ \frac{\text{total\ distance\ travel}}{\text{circumference}}\] | Equation 1 |
| ------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|                                                                                                                                 |            |
| \[\text{A\ }\left( \text{time\ taken\ for\ one\ rotation} \right) = \ \frac{N\ (total\ no\ of\ rotation)}{\text{time\ taken}}\] | Equation 2 |
|                                                                                                                                 |            |

**RESULTS AND DISCUSSION**

The results achieved for the preliminary experiments can be concluded as follows:

**i) Preliminary 1 and 2: Experiment on Rotary Encoder Rotation and Rotary Encoder Detector**

Table 1: Rotation time

| Number of Rotation | Time taken (s) |
| ------------------ | -------------- |
| 1                  | 1.5            |

Table 2: Detection test

<table>
<thead>
<tr class="header">
<th>Velocity (mm/ms)</th>
<th><p>Detection</p>
<p>(Y/N)</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>0.00</td>
<td>Y</td>
</tr>
<tr class="even">
<td>1.57</td>
<td>Y</td>
</tr>
<tr class="odd">
<td>4.71</td>
<td>Y</td>
</tr>
<tr class="even">
<td>6.28</td>
<td>Y</td>
</tr>
<tr class="odd">
<td>14.14</td>
<td>Y</td>
</tr>
<tr class="even">
<td>15.00</td>
<td>N</td>
</tr>
<tr class="odd">
<td>15.56</td>
<td>N</td>
</tr>
</tbody>
</table>

The first analysis is the rotary encoder rotation and the detection on the rotary encoder. Based on the experiment in Table 1, it shows that one full rotation of slotted disk take 1.5 second. Based on the experiment in Table 2, rotary encoder only detected small speed than a fast and powerful speed. The encoder only detect speed until 14.14 mm/ms which small and cause the limitation to the research project since it cannot fully utilized it in the experiment. From the experiment, it can be concluded that the higher the speed the higher chances the encoder not to detect the rotation.

The results of experiments related to different road structures can be established as follows:

**Road Structure 1: Experiment with Straight Line Motion**

In the first structure related to the use of straight roads, two tables namely Table 3 and Table 4 have been formed.

Table 3: straight line motion

<table>
<thead>
<tr class="header">
<th>Type of Surface</th>
<th>Speed taken (cm/s)</th>
<th>Time taken (s)</th>
<th><p>Smooth movement</p>
<p>(Y, N)</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Cardboard</td>
<td>125</td>
<td>0.8</td>
<td>Y</td>
</tr>
<tr class="even">
<td>Sandpaper</td>
<td>90.9</td>
<td>1.1</td>
<td>Y</td>
</tr>
<tr class="odd">
<td>Carpet</td>
<td>83.4</td>
<td>1.2</td>
<td>Y</td>
</tr>
</tbody>
</table>

Table 3 compares the journey made by robot cars on the surface of cardboard, sandpaper, and carpet. The speed on each route is recorded along with the travel time period along the 100cm travel distance. By comparison, it is found that the path on the cardboard is the fastest at 125 cm/s with the shortest duration of 0.8 s. While, the carpeted path gives the slowest speed of 83.4 cm/s with time taken for 1.2 s to complete the journey.

Table 4: straight line motion rotation

| Type of Surface | Number of rotation | Time taken (s) | Time taken for one rotation (ms) |
| --------------- | ------------------ | -------------- | -------------------------------- |
| Cardboard       | 314                | 0.8            | 0.3925                           |
| Sandpaper       | 314                | 1.1            | 0.2855                           |
| Carpet          | 314                | 1.2            | 0.2617                           |

Table 4 compares the same road structure, but focuses more on the number of turns made. Based on Table 4, we can see that the time taken in one rotation is preceded by a carpeted surface with a duration of 0.2617 ms compared to sandpaper with a duration of 0.2855 ms and cardboard for 0.3925 ms.

**Road Structure 2: Experiment with Corner Path Motion**

On the second road structure through the corner lane, two tables namely Table 5 and Table 6 were recorded.

Table 5: Corner path motion

<table>
<thead>
<tr class="header">
<th><p>Type of</p>
<p>Surface</p></th>
<th><p>Speed taken</p>
<p>(cm/s)</p></th>
<th>Time taken (s)</th>
<th><p>Smooth movement</p>
<p>(Y, N)</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Cardboard</td>
<td>25</td>
<td>1.0</td>
<td>Y</td>
</tr>
<tr class="even">
<td>Sandpaper</td>
<td>17.9</td>
<td>1.4</td>
<td>Y</td>
</tr>
<tr class="odd">
<td>Carpet</td>
<td>19.2</td>
<td>1.3</td>
<td>Y</td>
</tr>
</tbody>
</table>

Again like Table 3, Table 5 also compares three surfaces as paths yet using different road structures. The results of the comparison in Table 5, found that the cardboard again gave the highest velocity of 25 cm/s with a time taken of 1.0 s. However, in contrast to Table 3, in Table 5 it is found that sandpaper gives the slowest velocity value of 17.9 cm/s with duration of 1.4 s compared to carpets that only take 1.3 s with a velocity of 19.2 cm/s.

Table 6: Corner path motion rotation

| Type of Surface | Number of rotation | Time taken (s) | Time taken for one rotation (ms) |
| --------------- | ------------------ | -------------- | -------------------------------- |
| Cardboard       | 63                 | 1.0            | 0.0630                           |
| Sandpaper       | 63                 | 1.4            | 0.0450                           |
| Carpet          | 63                 | 1.3            | 0.0485                           |

Table 6 displays the results for the amount of time made in one rotation. The results obtained show that the surface of sandpaper gives the shortest time for one round which is 0.0450 ms compared to the carpet which is 0.0485 ms, and cardboard which is 0.0630 ms

**Road Structure 3: Experiment with Straight Line and Corner Path Motion**

The last road structure to be experimented with is to use a straight road before moving towards the corner lane. The results obtained for this experiment are recorded in Table 7 and Table 8.

Table 7: Straight line and corner path motion

| Type of Surface | Smooth movement (Y, N) | Smooth movement During turning (Y, N) | Speed taken (cm/s) | Time taken (s) |
| --------------- | ---------------------- | ------------------------------------- | ------------------ | -------------- |
| Cardboard       | Y                      | Y                                     | 38.5               | 1.3            |
| Sandpaper       | Y                      | Y                                     | 35.7               | 1.4            |
| Carpet          | Y                      | Y                                     | 41.7               | 1.2            |

Unlike Table 3 and Table 5, the results in Table 7 show the carpeted surface giving the highest velocity of 41.7 cm/s over a period of 1.2 s compared to the velocity of cardboard which is only 38.5 cm/s with a time period of 1.3 s, and sandpaper 35.7 cm/s within a period of 1.4 s.

Table 8: Straight line and corner path motion rotation

| Type of Surface | Number of rotation | Time taken (s) | Time taken for one rotation (ms) |
| --------------- | ------------------ | -------------- | -------------------------------- |
| Cardboard       | 157                | 1.3            | 0.1208                           |
| Sandpaper       | 157                | 1.4            | 0.1121                           |
| Carpet          | 157                | 1.2            | 0.1308                           |

Table 8 shows the surface with sandpaper giving the shortest time in one rotation which is 0.1121 ms compared to cardboard with 0.1208 ms and carpet with 0.1308 ms.

Each time taken for one rotation as shown in Tables 4, 6 and Table 8 above uses mathematical formulas as found in Equation 1 and Equation 2 in 3.3. These values ​​will then be converted to line graphs as in Figure 5.

![](168-1-447-1-2-20201006_media/media/image5.emf)

Figure 5: Time taken in one rotation for each straight line, corner path, and straight line & corner path.

Figure 5 shows the relationship of time taken in one round with the type of road structure. On a road structure with a straight line, the maximum speed is taken from the surface of the cardboard which is 125 cm / s but the time required for one rotation for the highest speed is the longest of the other surfaces which is 0.3925 ms. On road structures with corner lanes, the maximum speed is taken from the surface of the cardboard which is 25 cm / s but the time required for one rotation for the highest speed is the longest from the other surface which is 0.0630 ms. While on a road structure with straight strips & corner lanes, the highest speed is taken from the surface of the sandpaper which is 35.7 cm / s but the longest time taken for one rotation is carpet from another surface which is 0.1308 ms.

From these experiments it is shown that robot cars can move at high speeds on straight road structures and corner lanes when passing through sandpaper. This is an indication that compared to the flat and smooth surface; the movement of the robot car is smoother when going through rough roads. However, on straight road structures & corner lanes it is found that robot cars will experience a decrease in rough road velocity. This happens because when approaching a corner lane, it will slow down the speed of the robot car before it can accelerate back after passing it.

The results of the experimental analysis, it is found that as the speed of the moving object increases, the longer it takes for one wheel to rotate.

**CONCLUSION AND RECOMMENDATIONS**

The research project objective is fully achieved. The research project objective are to design and develop speed calibration model for moving object and to analyze and create a model on a speed calibration based on the data collected.

During this project, a speed calibration model for moving object is design and develops. From the data collected on the experiment, a model needed to be created to calculate the speed and develop a model on speed calibration. To create the model, rotary encoder is used to calculate the speed on the mobile robot. However, there are several limitation in the encoder that made the encoder only can encode a small speed than a high power speed. To analyze the experimentation, data that has been collected is tabulate. Based on the tabulated data, one by one of the analysis is made.

Rotary encoder that has been used has disadvantage since it cannot calculate speed from a powerful and high speed motor. However, it can give accurate speed even to a small speed that can be collected. Based on this project and the experiment done, it can be concluded that as the speed increase the encoder cannot detected it. From the project result, it can be concluded that as the speed increase, the longer time taken for one rotation to complete.

Future studies were suggested for this research project to improve since several recommendations can be made. Recommendations are may use to improving the performance and the ability of the research project in the future. First recommendation that can be used to improve the ability and performance of the research project is use another type of encoder and another recommendation is increase test plan.

Taken from the result in the experiment of the research project, rotary encoder is not powerful enough to detect the high speed of dc motor. Therefore, using different type of encoder may increase the detection in the encoder. Increase test plan of the research project is the second recommendation for future study. By increasing the test plan, there are several limitation that arise from the research project can be understand and can be improve. Moreover, increasing test plan may avoid result unreliability.

**REFERENCES**

Costa, L., Rauen, M., & Fronza, A. (2020). Car speed estimation based on image scale factor. Forensic Science International, 310, 110229. doi: 10.1016/j.forsciint.2020.110229.

Verma, A., & Tandan, S. R. (2020). A Comparative Paper on Real time road, object & Passenger detection system for Driver less Car. Mukt Shabd Journal, Volume IX, Issue VI, JUNE/2020. ISSN NO : 2347-3150.

Badue, C., Guidolini, R., Carneiro, R. V., Azevedo, P., Cardoso, V. B., Forechi, A., ... & de Paula Veronese, L. (2020). Self-driving cars: A survey. Expert Systems with Applications, 113816.

Wang, L., & Horn, B. K. (2020). Time-to-contact control: improving safety and reliability of autonomous vehicles. International Journal of Bio-Inspired Computation, 16(2), 68-78.

Censi, A., Franchi, A., Marchionni, L., & Oriolo, G. (2013) Simultaneous Calibration of Odometry and Sensors Parameters for Mobile Robots. IEEE Transactions on Robotics. 29(2). pp. 475-492.

Borestein, J. & Feng, L., (1996). Measurement and Correction of Systematic Odometry Errors in Mobile Robots. IEEE Transactions on Robotics and Automation. 12 (6), pp.869-880.

Borestein, J. & Feng, L., (1995). Correction of Systematic Odometry Errors in Mobile Robot. In : Proceedings of IPOS 1995, pp. 569-574. Pittsburgh, Pennsylavania.

#
