A Modified Kalman Filter-Based Mobile Robot Position Measurement using an Accelerometer and Wheels Encoder

• Position Measurement is a key process in the navigation system of a mobile robot. In this research paper, wheel encoders and accelerometer sensors were used with a Kalman filter to estimate the mobile robot position. • This research uses a modified Kalman filter to find the mobile robot position depending on the error between the predicted position produced by sensors measurement and the position produced by a reference path. • The modification of the Kalman filter consists of choosing a variable process covariance matrix to produce a better Kalman gain value that will reduce the estimation error. position measurement is an essential process of mobile robot navigation. In this research, a Kalman Filter is applied to locating a mobile robot furnisher with an encoder and accelerometer. The accelerometer updates its position off-hand. It has an acceptable short period of stability. However, this stability will be decreased over time. The odometry model is utilized to measure the mobile robot's position and heading angle using encoders equipped with the wheels of the mobile robot. Moreover, the odometry model's errors exist because of the wheel rotating speed's integrative nature and non-systematic errors. In this work, the mobile robot position estimation in closed environments was studied. In order to obtain the optimal estimation, a Kalman filter was used to estimate mobile robots' position and velocity, where the Kalman filter has been designed for better assessment of the mobile robot position. The suggested configuration collects accelerometer and odometry reading to assure more delicate position knowledge than stand-alone odometry or accelerometer. The proposed method's position error has an acceptable level that is less than (0.2 m) for both easy and difficult paths. A R T I C L E I N F O Handling editor: Muhsin J. Jweeg


H I G H L I G H T S A B S T R A C T
• Position Measurement is a key process in the navigation system of a mobile robot. In this research paper, wheel encoders and accelerometer sensors were used with a Kalman filter to estimate the mobile robot position. • This research uses a modified Kalman filter to find the mobile robot position depending on the error between the predicted position produced by sensors measurement and the position produced by a reference path. • The modification of the Kalman filter consists of choosing a variable process covariance matrix to produce a better Kalman gain value that will reduce the estimation error.
position measurement is an essential process of mobile robot navigation. In this research, a Kalman Filter is applied to locating a mobile robot furnisher with an encoder and accelerometer. The accelerometer updates its position off-hand. It has an acceptable short period of stability. However, this stability will be decreased over time. The odometry model is utilized to measure the mobile robot's position and heading angle using encoders equipped with the wheels of the mobile robot. Moreover, the odometry model's errors exist because of the wheel rotating speed's integrative nature and non-systematic errors. In this work, the mobile robot position estimation in closed environments was studied. In order to obtain the optimal estimation, a Kalman filter was used to estimate mobile robots' position and velocity, where the Kalman filter has been designed for better assessment of the mobile robot position. The suggested configuration collects accelerometer and odometry reading to assure more delicate position knowledge than stand-alone odometry or accelerometer. The proposed method's position error has an acceptable level that is less than (0.2 m) for both easy and difficult paths.

Introduction
Recently, artificial intelligence has had a wide range of applications particularly in the functionality of robotic machines. A mobile robot is an automated machine that crosses in a specific medium and identifies its perimeter with the help of multiple sensors. The researches that investigate mobile robots has progressed quickly in a variety of domains, including smart-home assistance, senior care, teaching, medical attendance, military domains, and so on [1]. The position measurement system of an ambulant robot is one of the mobile robot navigation system processes. It is used to find the accurate position of the mobile robot to control its movement in the work environment. The positioning system provides the mobile robot the ability to know its position by using specific types of sensors. The positioning system plays a huge role in achieving autonomous movement, so it is currently an important research field. The position measurement systems are possible to split into two categories. Absolute positioning and Relative positioning. Relative positioning evaluates the mobile robot's position by using its wheels' angular position weighted by encoders connected to the robot's wheels or by using inertial measurement sensors such as acceleration and gyroscope. Absolute positioning evaluates the mobile robot's position by using an exterior distance measuring system such as GPS and compass [2]. From the starting point acquaintance, the relative positioning system calculates the 269 position. It does not rely on external signals and instead uses an inertial measurement unit (IMU) or an encoder. Therefore, the Relative positioning systems have the advantages of being fast, low-cost, and easier to evaluate real-time position than absolute positioning systems. The absolute positioning method employs ultrasonic local positioning systems, an infrared network system, a global positioning system (GPS), as well as other technologies to determine position. In the Indoors area, GPS is ineffective and has a delayed time rate. Ultrasonic local positioning systems and IR (infrared) network systems are both inexpensive, small in size, and simple to use. These techniques, on the other hand, are unable to measure long distances, necessitate extra assembly, and have trouble measuring accuracy because of signal intervention. RFID necessitates the purchase of additional equipment and comes at a high price. [9]. this paper discusses mobile robots' position estimation in an indoor environment, such as closed premises or factories. Wheel encoders installed on the mobile robot's wheels can evaluate the mobile robot's position and heading angle while it is traveling. The terminology for this technique is odometry [2][3][4]. The angle change is measured by the wheel encoders. The rotary angle, the wheel diameter, and the mobile robot's body width are used in the odometry model to find the mobile robot's position and heading angle [5]. Volplane, a misfit in the system data, measurement inexactness, and disturbance in the encoder readings all-cause unbounded errors when using odometry [6][7][8]. The mobile robot's position can be calculated using an accelerometer sensor. If the initial information about the position of the mobile robot is available, then the mobile robot's position can be calculated. The accelerometer is used for position estimation by double integrating its measurements. Depressed-frequency noise and sensor offset, on the other hand, are amplified by the system's integrative nature [10][11][12][13]. That is, the Short-term stability is excellent with the accelerometer position measurement system, but long-term stability is very inferior. Standalone odometry and accelerometer are not suitable for the Relative positioning system because of the accumulation of errors over extended time intervals. In this paper, the odometry and the accelerometer are combined to reduce the dead reckoning accumulation errors. Although accumulation errors exist in both the accelerometer and the odometry, by combining the two systems, these errors can be reduced to a manageable level. A Kalman filter will be implemented and utilized to achieve the best-integrated system possible [22]. This paper's general structure will be as follows: Section 2 will explain related work, while Section 3 will clarify the proposed method. Section 4 will contain the mathematical modeling of the accelerometer sensor and the odometry. Section 5 will explain the implementation of the Kalman filter-based positioning system. Section 7 will contain results, and finally, the conclusion of the presented work will be written in Section 8.

Related Work
Many techniques were introduced in this field; one of these techniques is relative positioning (dead reckoning). In [15], An indoor mobile robot navigation technique using odometry and an electronic compass was presented. The system combines the measurement of the odometry and the compass to estimate the mobile robot position and heading angle by using an extended Kalman filter, two calibration methods were used for the wheel encoder sensor and the compass. A fuzzy system was used to adapt the extended Kalman filter, the presented system provides a good measurement for the robot motion but the drawback of the presented system is the compass sensor is only valid for heading angle estimation and position estimation was dependent on the odometry model and that is not suitable for long-distance measurements even if the wheel encoders was calibrated correctly. An indoor position system using an anemometer ultrasonic sensor and inertial measurement unit (IMU) has been introduced [16]. the IMU provides position and heading angle measurement for the mobile robot for a short distance and the ultrasonic sensor provides the distance measurement between the mobile robot and an object by calculating the flight time for the transmitter and the receiver. A Kalman filter was utilized to fuse the measurement of both sensors to provide a position estimation for the mobile robot. The system proposed to provide a good measurement but the problem with this type of work is the ultrasonic need an object to detect to measure the distance so if the robot was moving in an open area and there is no object in the ultrasonic range so the mobile robot will depend on the IMU measurements for the position estimation and the rages of ultrasonic are consider to be small (4-6) meters. Another way of enhancing relative position errors in navigation uses the Kinect sensor. In [17], the Kinect sensor was used with an encoder to aid in the position estimation, an extended Kalman filter was used to combine the sensor reading. As a landmark is detected the system provides a good position estimation, but this type of system may fail in position estimation when there is no landmark to detect by the Kinect sensor, so it needs more sensors to provide the alternative measurement to update the estimation. GPS has been used to emend position valuation. In [18], the GPS measurements were fused with inertial navigation system (INS) and odometer using Kalman filter and assigning weights filter, the Kalman filter combines the measurement of the INS and the odometer, the assigning weights combine the Kalman filter output with the GPS output. The problem with this work is the assigning weights filter is not suitable because the weight factor is constant and the position estimation needs a variable weight factor. In [12], Inertial navigation techniques for mobile robots were developed. An extended Kalman filter was appointed to assess position and orientation using a series of solid-state gyros, accelerometers, and tilt sensors. However, using accelerometers to calculate position and orientation has many disadvantages, including a 1-8 cm/s rate of drift. Furthermore, the minimum discoverable acceleration may be too large to discover small motion in some cases. Inertial methods can be time-consuming, costly, and difficult to implement. [9] developed a combination of the inertial measurement system and encoder fused the reading using Kalman filter to estimate the position. This method improved the position determination and reduced the error in system measurement. In [19], The mobile robot's position was determined using an RFID network and Particle Swarm Optimization Artificial Neural Network, the estimated position result was acceptable, but the deficiency of this approach is that the Particle Swarm Optimization Artificial Neural Network requires a lot of computing power and the RFID network require complex implementation. In [20], an Extended Kalman Filter (EKF) is utilized to locate the mobile robot prepared with an IMU, GPS, wheel encoder, and electronic compass. Approach 1 used an encoder, compass, and GPS combination. Approach 2 used GPS and IMU. Approach 270 three used the two approaches combined. Although many sensors were used, the result was minor to the system that only uses IMU and GPS.

Proposed Method
This paper proposes a position measurement method using the accelerometer sensor and wheel encoder combined to measure the robot position. Using the odometry model to estimate the mobile robot's location in X-axis and Y-axis, and heading angle from the wheel encoders measurement, and the position estimated from accelerometer measurement [9]. The proposed method uses the Kalman filter to fuse both systems' measurements to find the final estimated position and heading angle of the mobile robot. Using the Kalman filter reduces the error of both systems since the odometry and the accelerometer are not suitable for the Relative positioning system over long periods independently because of the accumulation errors. The Kalman provides minimization of the accumulation errors for each system. The Kalman filter uses the prediction update algorithm when the accelerometer model will be used to predict the system position and velocity. The odometry model will be used to correct the measurement of the prediction model. This work proposes using a varying value for the measurement covariance matrix (R) instead of using a constant value in order enhance the performance of the Kalman filter. The Kalman filter will provide the optimal estimation for the position from both systems measurements and estimate the system's error. The block diagram in Figure 1 depicts the work of the proposed system.

Theory of mobile robot positioning system
In this section, the detailed measurement model of the accelerometer sensor for the positioning system. The model of the accelerometer sensor will be described. The wheel encoder modeling will be presented for the odometry model.

Accelerometer Measurement Model
The accelerometer will be utilized to estimate the mobile position in the X-axis and Y-axis. The accelerometer provides acceleration measurement. The mobile robot's motion is presumed to be on a horizontal surface, the mobile robot does not face any slipping, and the wheels are tied to the surface. For the mobile robot's position estimation, the mobile robot's acceleration will be calculated using equation (1).
Where , and , are the mobile robot acceleration in X and Y axis respectively, , and , are the acceleration obtained from sensors in X and Y axis respectively, and Are the bias of accelerometer for X and Y axis respectively, and are the scale factor of the accelerometer for the X and Y axis respectively, and k is the system sample time. The mobile robot's velocity in the X and Y axes is computed using Newton's law of motion and a single integration of the acceleration. The velocity at sample time k [   ] is calculated by integrating the acceleration twice [9]. Where ] is the position of the mobile robot at sample time k-1.

Odometry Measurement Model
The odometry state vector is = [ ] describe the position of the mobile robot at the kth time step where and represent the position in x and y Axis and Represent the heading angle. The counts N are generated by the wheel encoder while the wheel rotates 360 degrees. If the measured pulses are M counts, each wheel's rotary angle becomes: Where , , and , , are the right and left wheel's angles in radians, respectively. Ml and Mr are the measured counts on the left and right encoders. N is the counts per revolution for the wheel encoder. Figure 2 shows the mobile robot's motion based on the rotary angles of its wheels. The mobile robot's travel distance can be calculated using the radius of its wheels (R wheel) and the rotary angle of each wheel, as shown in the equation below.
, = ℎ * , The heading angle rate of the mobile robot (〖"∆φ" 〗_k) is determined by the robot's base width (d) and the distance traveled by each wheel [9].

Implementation of proposed Kalman filter-based positioning system
, ] Which presents the positioning system state.
] is the input control vector where , , , are the output of the accelerometer sensor in the X-axis and Y-axis obtained from equation (1). F is the state transition matrix that can be found from the accelerometer measurement model.
Were is the sampling time of the system. B is the control-input vector Moreover, B can be calculated as: The process model is fused with the measurement model , which defines the relationship between the system state and the measurement at the kth as follows: = + (19) For this system the output of odometry measurement that will be used to correct the prediction of the Kalman filter so = [ ] (20) and the measurement matrix H, in that case, will equal to: The random variables w k and k v k represent the process and measurement noise, respectively. Kalman filter algorithm is divided into two stages prediction and update. The equations of the prediction stage are illustrated in the following equations [14].
(23) Were ̂− is the predicted state of the system and ̂− is the predicted error covariance matrix. in the update stage, the Kalman gain is calculated. = ̂− (̂− + ) −1 (24) Furthermore, the updated state of the system and the update error covariance matrix is calculated using the following equations: (26) + represent the final estimated position and velocity of the mobile robot in the kth sample time. + is the estimated error covariance matrix.
The Q and R represent the process model covariance matrix and measurement covariance matrix; these matrices represent the Noise in sensors measurement.
The process noise covariance is the error covariance that is measured from the accelerometer sensor. The position Noise is calculated from the acceleration Noise by double integration. The acceleration Noise assumed to be gaussian disturbed with a mean of zero and standard deviation of ( ) so will be equal to: = ( * 2 ) 2 (27) For the velocity, the Noise will be integrated and will be = ( * ) 2 (28) 273 So, the Q matrix will be equal to For the measurement covariance matrix R, its value can be determined from the odometry measurement by taking the average of the error between the reference path and the measurement of the odometry and calculating the mean value, then calculate the variance as follows [22] Were , are the variance of the encoder position respectively and , are the variance of the encoder velocity, respectively. The Kalman filter needs to be initialized. The following are the parameters that must be set up the error covariance matrix(G) and system state vector (x).

Results
To verify the performance of the proposed work, a MATLAB© implementation of the method was executed offline. The test was done using the circular path with a diameter of (5 meters) as reference paths. The accelerometer measurements and encoder measurements were collected using the navigation toolbox in MATLAB© with a 100 Hz sampling frequency. Several assumptions are made since the Kalman filter is used in this simulation.
• All noises (process and measurement noise) are assumed to be Gaussian, and the positioning system is assumed to be a linear system. • The encoder is assumed that no slipping situations or uneven roads occurred. Table 1 shows information about the parameter used in the test. As mentioned Kalman filter needs to be initialized, so the system states vector initial value.
Because the reference path was initialized from zero position and zero velocity. the error covariance matrix was initialized as: (32) Figure 3 show the result of the proposed method for the circular reference path. From the figure, we see that the odometry path fails in estimating the reference path value. On the other hand, the Kalman filter's estimated path was very close to the reference path. The reason behind that is the odometry suffers from accumulated errors. Errors can be minimized with the accelerometer sensor's help which is good for short period measurements. The use of the Kalman filter is to perform an optimal estimation for the mobile robot positioning system. The positioning system using only an accelerometer sensor had an unbounded position error because of double integration, even though the result was not included in this paper. In Figure 4, the error of estimated position in the X-axis and Y-axis. Whereas the error of the estimated X-axis position was Ranges from (0.0573) to (-0.1629) and the error of the estimated Y-axis position was Ranges from (0.1826) to (-4*10 -4 ). the proposed method error is considered acceptable for indoor paths. Table 2 shows the error in each waypoint of the reference path of the mobile robot. The error of odometry was compared to the error of the Kalman filter at each reference path waypoint. We notice that the Kalman filter enhanced the error at each waypoint to an acceptable value. The result of the proposed method was compared to the work of approach 1 in [20]. The mean error value was used as a comparison. The proposed method mean error was (0.1207) compared with (0.27739) for [20].althought a Kalman filter with only an encoder and accelerometer was used its error against an extended Kalman filter with encoder, compass, and GPS the result was was better and error is smaller than the error in [20] work.

Conclusion
This paper proposed a position measurement system of the mobile robot using an encoder sensor and accelerometer sensors. a Kalman filter combines the sensor's measurement to estimate position and velocity for the mobile robot. The accelerometer was utilized to estimate the mobile robot's position, but its accuracy was very low because of the accumulated errors due to the double integration of the acceleration readings. The encoder was utilized to estimate the mobile robot's position and heading angle using the odometry model. The position estimation using encoders suffers from negative bias and unbounded position errors. Negative bias error caused by the systematic and non-systematic errors and the unbounded position errors is a result of the rotating speed's integrative nature. In an attempt to correct the flaws discovered in each system, a Kalman filter was implemented. The Kalman filter predicts the mobile robot's position using the accelerometer reading, then compares it to the measurement provided by the odometry and assigns a gain value to the predicting measurements to update the estimation. The presented method shows a reliable level of position estimation and a remarkable reduction in the error of mobile robot position error. The proposed method in this paper was provided only for mobile robot navigation in general and especially for the indoor environment, and without any outward position data from an absolute position measuring system, the position estimation was done. For both simple and difficult paths, the suggested method's position error is less than (0.2 m), which is an appropriate level. For future improvement to the proposed method, a gyroscope sensor will be used to improve the heading angle estimation, and the position error will be decreased.