Identification of Dynamics of Movement of the Differential Mobile Robotic Platform Controlled by Fuzzy Controller

Mobile robots with differential chassis are very often used because of simple construction and a smaller number of drive and sensors elements. For practical applications, it is necessary to know the kinematic and dynamic structure of the differential mobile robot. This paper deals with identification of the dynamics of the differential robotic platform, using differential kinematics. Electro-optical rpm sensors obtain required values such as speed of the driven wheels. Identification of dynamic system is used to determine the dynamic characteristics of power subsystem of developed EN 20 robot, whose control subsystem is created by single-chip microcontroller. Response of the dynamic system is monitored along with the peripheral velocity of the right and left drive wheels. Incremental encoders that work on optics principle measure the speeds of both wheels. It was necessary to calibrate the sensors and obtain constants for precise speed determination. The monitored system with the dumped oscillation characteristic is approximated by a system with the inertia of the 2nd order. Dynamic system parameters are found. The system approximation is suitable for given evolution of circumferential speeds of the right and left wheels. This is confirmed by the quantitative determination coefficients R2. The equations for calculating peripheral velocities of driving wheels are applied to the system of the differential equations for the differential chassis. A mathematical model of the mobile robot EN20 was obtained for testing control algorithms, where a robot is equipped with sensory systems and it is designed for interior conditions. Fuzzy controller with 49 interference rules is used to control the mobile robot. The real mobile robot path matches the path determined according to simulation model.


INTRODUCTION
Mathematical modelling has penetrated into various areas of natural, technical, economic and social sciences and has become an important aid in modelling and simulation of complex systems and in the prediction of different processes [1]. One of the systems that can be modelled is a mobile robot when it is necessary to take into account the kinematics and dynamics of the mobile robot, which allows subsequent planning of the realistic movements of the robot [2]. Realistic mathematical models of mobile robots are obtained through the physics laws that govern their behaviour. In the case of mobile robot navigation where obstacles are considered in the environment, an environment model is created, which is necessary for testing the robot's control and navigation algorithms [3]. For the needs of navigation in mobile robotics, it is necessary to know the mathematical model of the mobile robot for the cases of simulation of control algorithms or of the mobile robotic platform. In the most commonly used types of wheel robots with two [4,5] with four [6,7] and more wheels the static and dynamic parameters are monitored, while using the kinematic chassis structures as a basis. Dynamic and kinematic principles are used to create mobile robot models [8,9]. In the control of non-linear systems, control methods with fuzzy logic are used quite often. The theory of fuzzy sets introduced for the first time by Zadeh, has revolutionized many applications [10]. The theory was practically applied by Mamdani and Takagi-Ssugeno, in the field of control. The role of the fuzzy system transforms the knowledge base into mathematical that have resulted in effective use in many applications [11]. Process of control is directly related to robotics. In robotics it is mainly about the design of controllers designed to control the mobile robot that is to reach the target position and it is required to monitor the robot's declination from the trajectory [12]. Fuzzy logic can be used for the dynamic adaptation of the variables of the system [13,14]. In this study, we are trying we are trying to target the potential of recognizing a dynamic system. In our case, the dynamic system is part of the mobile robot, where we focus specifically on speed of the drive wheels. With the evolution of dynamic speed rotation through a dynamic system, identification can determine the behaviour of an actuator subsystem over time. An important role in mobile robotics is to accurately steer a robot to a goal in performing work. For this purpose, in addition to localization algorithms, robustness and reliability of control algorithms are required. PID controllers, as linear system are unusable in nonlinear applications and therefore difficult to apply in the field of mobile robotics when the robot needs to reach the target. For this reason, a combination of PID regulators with fuzzy logic was created. Fuzzy logic is based on grades of membership of an element in a set, where the value of an element in a set is between 0 and 1 compared to the classical edge sets. This method allows the control of nonlinear processes, including moving the mobile robot to the target and in our case, fuzzy logic with a fuzzy controller is used to set the motor speed so that the deviation from the desired path of the mobile robot is as small as possible which depends on inputs of the target distance and the angle of rotation. The accuracy and robustness of the proposed fuzzy motor speed controller are given by the number of interference rules [15]. Speed rotation of mobile robots wheel can be sensed in a variety of ways, including the use of incremental encoders [16,17]. From the measured wheel speeds, it is then possible to derive the peripheral velocity of wheels or, as in our case, the position of the robot by the odometry principle, which is used on the robotic platform EN 20 with a differential platform. The mobile robotic platform is designed to move on solid level surfaces, especially in interior conditions, and is designed to test navigation and control algorithms.

Kinematic Model of Differential Mobile Robot
Differential chassis and type of its drive are characterised by the existence of two independently driven wheels, the mutual distance of which L is called gauge. The movement of the chassis based on the differential drive which is illustrated by Fig. 1, can be characterised as a movement along the arcs around the instant centre of rotation (ICR), with the radius R of this arc. The instantaneous tangential velocity V TP (t) [18] of the differential chassis can be calculated as follows: where: ω P (t) is robot's angular velocity, s −1 ; R is turning radius, m. Peripheral velocities of the left V L (t) and right V P (t) wheel with wheels gauge L can be calculated with the use of the following relations: By solving the system of the two previous equations we calculate the turning radius R and the robot's angular velocity ω P (t) as follows: By substituting the Eq. (3) to the Eq. (1), we get a relation for calculation of the tangential velocity through the peripheral velocity of the right and left wheels: According to wheel peripheral velocity and chassis construction dimensions, it is possible to obtain equations to determine the position of the robot with differential chassis as the system of differential equations in the Cartesian coordinate system: where: x(k),y(k) is current sample of the x th , y th mobile robot coordinate, m; x(k−1), y(k−1) is the previous sample of the x th , y th mobile robot coordinate, m; Θ(k) is current angle of the robot turning, °; Θ(k−1) is the previous angle of the robot turning, °; V P (k), V L (k) is current sample of the right and left wheel peripheral velocity, m/s; T is the sampling period, s.

Kinematic Model of Differential Mobile Robot
For calculating the coordinates of the mobile robot, the motion of a robot, with the differential chassis on the flat plane pad, is used. The calculated current position is referenced precisely to the centre of the rotation axis of the mobile robot (centre of the drive wheel axis). From the distance of both wheels is determined the angle of rotation Θ of the mobile robot with sP right and s L left wheel: where: k u is calibration constant for determining the directional angle of the mobile robot, m/°. We can calculate the path increment value dr by relationship. Advantage of this approach is that the angle Θ is not directly dependent on the previous state. It depends on the measured distance and hence the slipping of the wheels.
Actual coordinates of the position of the robot x(k), y(k) with differential chassis use the value of the path increment as follows: where: x(k−1), y(k−1) previous sample of x and y-axis of the mobile robot, m; Θ(k) current angle of rotation of mobile robot, °.

The Identification of Dynamics of Movement of the Robot
In mobile robots with wheel chassis, devices in most cases include a drive, a gearbox and a driving wheel. This set of devices represents a dynamic system, the behaviour of which must be identified. An experimental method based on the transition characteristic for determination of static and dynamic properties of unknown systems is a commonly used method. If the response of the system is with damped oscillations characteristic, we approximate the examined system with an inertia of the 2 nd order in the Laplace's form, where ξ 0 is a damping coefficient, 1; T 0 is the time constant of the dynamic system response, s.
On the basis of the values a i and the time intervals t i , where N is the number of values read from the transition characteristic, ξ 0 and T 0 are as follows: ( ) The block diagram of differential mobile robotic system Based on kinematic relationships and using the principle of identification of dynamic systems and data from identification of dynamic system, the motion of the mobile robot can be described. The block diagram in Fig.  2 shows the arrangement of functional blocks of a mobile robotic device in a closed loop, which can be considered as a dynamic system. The point of interest as a dynamic system, in this case, is the power subsystem of the mobile robot. The motor speed is set by the controller and the time response of peripheral velocity of the mobile robot wheels is monitored at the jump rpm change.

Experimental Mobile Robot with Differential Chassis
Identification of the robot motion dynamics was performed on the developed mobile robotic platform EN20. The principal scheme of this robot is shown and block diagram of the robot is shown in Fig. 3 [19]. Communication with the drive modules, incremental sensors, power monitor with control module run according to the SPI communication standard in a four-wire connection with a data flow rate of 1 Mbps. The centre of communication between the internal modules and PC is the module IM1.0, which includes the single-chip microcontroller C8051F340 from the Silicon Laboratories. The control module IM1.0 combines the communication standards UART and SPI. UART is a serial line that is exclusively designated for communication with the control computer via the full-duplex protocol XBee. The second type of communication is SPI, where the module is set as "MASTER" in a 4-wire connection with the possibility of connecting eight SPI "SLAVE" modules. Communication with PC is solved through a virtual serial port via USB (chip CP2102). BLY171S 24V-4000 type [20] (BLDC) motors are used to drive the mobile robot EN 20, which are controlled by the MR1.0R and MR1.0L controllers. Measure velocity of drive wheels of the mobile robot provides optical incremental sensors: TP 6.35 1024 BZ TTL [21] with a resolution of 1024 pulses per revolution.

Fuzzy Controller
Of the many available feedback control methods [27], fuzzy is considered an optimal way of controlling nonlinear systems, which is also a mobile robot [26]. It is also possible to use more sophisticated controlling methods when using neural networks. These methods are principally more complex and computationally more demanding [28]. An error of rotation angle has the most significant effect on the overall accuracy of determining the current position. With increasing distance from the starting position, the position determination error for the plane increases linearly. Compensate of error in the motion trajectory is possible with feedback because inputs to control are functions of the actual state of the system and not just the start and end point functions. According to [22,23] definition of a Fuzzy Set A(FS) like a set function on universe E, described by the membership function µ A (x) (MF), where first definition is now known as the Type-1 Fuzzy Set: A fuzzy system is composed of fuzzifier, rules, inference, and defuzzifier. In our case the fuzzy controller is used to control direction of the mobile robot EN20. Block diagram of fuzzy controller with importance of input fuzzy controller values is illustrated in Fig. 4.
The inputs to the controller are the mobile robot's deflection angle from the target position δ whose range of values is ±90° and the robot distance from the target position D whose range is 0 to 2 m: Where x TARGET , y TARGET is axis of target, m; x, y is axis coordinate of the mobile robot of reference point, m; y is yaxis coordinate of the mobile robot of reference point, m. Before calculating the mobile robot's deflection angle from the target position, the target point angle must be determined relative to the mobile robot reference point Θ TARGET and then can be determined the mobile robot's deflection angle δ.
The result of calculating the position of the mobile robot is determined by the time interval. This interval is given by the transmission rate of the communication standard. In the real model it is 330 ms, and this value is also used in simulations.  The outputs of the fuzzy controller are multiples of the maximum speed of the right motor k wP and the left motor k wL , whose range of values is 0 to 1.
where w P , w L are rpm of right and left motor, %; w Pmax , w Lmax are maximum rpm of right and left motor, %; k wP, k wL is multiple of maximum rpm of right and left motor in range 0 -1. The input parameters of the mobile robot positioning algorithm are the target position x TARGET , y TARGET and rpm w Pmax , w Lmax of the right and left motor in percent. The rpm values are set to 60% of maximum rpm of the motor, because the motor current protection is active.
The decrease of the current is reflected in the change of engine speed and thus in the speed of the drive wheels. The same value is used for simulation as well as for experiments. The target position values x TARGET , y TARGET are set in the algoritm to: x TARGET = 10 m, y TARGET = 0 m. The purpose is to achieve a target position by a mobile robot with an accuracy of 10 cm. After defining linguistic values for input and output variables, their membership functions are also defined as follows in Fig. 5.

RESULT AND DISCUSSION
The identification of dynamics of movement of the robot EN20 was determined by sending the rpm values of the left and right drives from the application in the PC, when at the beginning the robot stood still, which is one of the basic conditions for identification. The calibration constants of the right encoder kP = 2317.430279 pulses per meter and the left encoder k L = 2255.876494 pulses per meter were determined. Differences between constants are due to inaccuracy of gearbox and inaccuracy of encoder mounting. Steep change of rpm of the right and left drives represented the test jump signal, and the response of the dynamic system was the evolution of the peripheral speed of the right and left driving wheels. This peripheral velocity was measured by encoders which were independently imbedded in the driving wheels axes. Fig. 6 illustrates the evolution of the right and left driving wheels peripheral velocity at a steep change of drive rpm from 0 to 60% of the maximum rpm. It is evident from the peripheral velocities of the driving wheels that drive of the mobile robot EN20 behaves as a dynamic system with damped oscillations characteristic. This system is approximated by a static system with the inertia of the 2 nd order according to the relation 10. Parameters for this type of dynamical system are T 0 time constant, ξ 0 damping coefficient and K S amplification, which in our case are calculated as the ratio of the steady peripheral velocity of the driving wheel and the drive rpm. Steep change of the drives rpm was limited to 60% of the maximum rpm because at higher rpm the current protection is activated in order to reduce the current supplied to the drives and thus to reduce the drives rpm. On the basis of the values in the measured interval between 2% to 60% of peripheral velocity, we determined the damping coefficients ξ0P, ξ 0L (right, left wheel) and the time constants T 0P , T 0L (right, left wheel) of the peripheral velocities evolution of both driving wheels as an arithmetic mean of all the values, as follows: The K SP and K SL gains cannot be calculated as the average of all values due to the significant influence of the given parameters on the values of steady peripheral velocities of the driving wheels and hence on the mobile robot velocity. Therefore, it was necessary to describe through regression the evolution of the K SP and K SL gains by polynomials. The K SP and K SL gain values at different drive rpm are shown in Fig. 7. The evolution of amplification of the K SP and K SL can be described by the polynomial of the fourth order in the following form: By substituting the mean values of ξ 0P , ξ 0L , T 0P , T 0L in the Eq. (6), by replacing the K SP and K SL gain by the polynomial of the fourth order and with subsequent deducing the dynamic system response during the steep change of rpm of the drives w P and w L we obtain Eqs. (16), for the calculation of the driving wheel peripheral velocity V P and V L .
We verified the correctness of the calculation by simulation, and the actual and calculated peripheral velocities of the left and right driving wheels at the steep change of the drive rpm from 0 to 60%, that are shown in Fig. 8. In a measured dynamic system of a mobile robot (power subsystem) there are some construction details, which negatively affect the evolution of peripheral velocity. In case of mobile robot navigation process and control process it can be reflected as the aberrance of real measure value. Equations for calculation of the driving wheels peripheral velocities were subsequently applied to the set of differential equations for a differential chassis (Eq. (5)), by which we obtained the mathematical model of the mobile robot EN20, on which we tested the control algorithms with fuzzy controller of the 49 rules for the kwP and k wL output variables. Based on these fuzzy sets, it was determined that the base Number of rules can be different [24,25]. Because of the definition of membership function, linguistic values and interference rules, the control surfaces for the multiples of the maximum rpm of right motor k wP and the left motor k wL are shown in Fig. 9.
The proposed fuzzy controller with nine 49 rules was used to control model of the mobile robot as well as the EN20 robot. The result of the process of the simulation of the mobile robot and the real track of the mobile robot and relative error of peripheral velocity is shown in Fig. 10. The model of the mobile robot EN20 quite accurately describes the behaviour of the real robot, so it is possible to use this mathematical model to search for and optimize other control algorithms. Inaccuracy in the differences between the real robot and the model are due to the imprecise storage of the gearboxes as well as the uneven terrain. Stabilisation of the system during a simulated calculation of the right wheel occurs at a time of 1.796 s at the value of 0.3640 m/s, where in the real case the dynamic system stabilised at the value of 0.3352 at a time of 1.437 s. We have determined similarly the characteristic form of peripheral velocity and times of stabilisation of the dynamic system when the simulated case the peripheral velocity of the left wheel was stabilised at the value of 0.3519 m/s at a time of 1.372 s. Fig. 14 shows a relative error of the left and right driving wheel peripheral velocity at a time from the start of the system identification till the system stabilisation. The biggest relative error at the change of the right wheel peripheral velocity occurs at a time of 0.130 s when initial oscillation and subsequent time delays of the system take place. The maximum value of the relative error of the left wheel peripheral velocity occurs at a time of 0.098 s where similarly as in the case of the right wheel velocity the system oscillations take place.

CONCLUSION
The mobile robotic platform presented in this article EN20 is considered from the viewpoint of a model to be a stochastic, dynamic, continuous, and non-linear model. Mobile robot with a differential chassis has separate drive and measuring wheels, what is advantage in proces of measure rpm. Identification of the robot motion dynamics using the transition characteristic was performed. The response of the dynamic system and therefore of the peripheral velocity of the right and left driving wheels was monitored. The dynamic system with the damped oscillation characteristic was approximated by a static system of the second-order, with time constant, damping coefficient, and gain being determined. Approximation corresponds to the assumption of determination of the system of the second order, which was confirmed based on determination coefficients, where the value R 2 = 0.9080 was for the evolution of the right wheel rpm and the value R 2 = 0.9303 was for the evolution of the left wheel rpm. The amplifications have a significant effect on the values of stabilised peripheral velocities. For this reason, regression analysis was used for describing the evolution of amplification by polynomials of the fourth order. The mathematical model of the robot EN20 was obtained by deducting the relations for calculation of the driving wheels peripheral velocity and their application in the differential equations of the mobile robot differential chassis. We deduce in conclusion that by using dynamic system identification and kinematic equations for a differential robotic platform, it is possible to obtain a model for a mobile robot presented in this study. Such a procedure could also be applied to other kinematic structures of robots. It is possible to use such model for testing the control algorithms based on the soft-computing methods, including fuzzy logic [13,25]. In this case, a regulator with 49 interference rules and triangular membership functions was used, and the motor speeds of the mobile robot EN 20 have been determined. In a fairly accurate manner, the speed was determined by the regulator when the input values were the mobile robot rotation values and the mobile robot's offset angle from the target position. This principle can be used in mobile robotic navigation process [26], what was in this case. The solution gives the incentive to further research into control algorithms for mobile robot control and implementing complex control algorithms into microcontrollers to reach the target position by a robot in the shortest possible time with the maximum precision.