Development of Decentralized Speed Controllers for a Differential Drive Wheel Mobile Robot

. This research presents a comprehensive mathematical model and a control-oriented model for a differential drive wheel mobile robot (DDWMR). The components and their interconnection within the robot are thoroughly modelled. The proposed mathematical models are used to analyse the characteristics of the robot. The control-oriented model is a simplified one which will be used to design speed controllers. The performance of the proposed system is evaluated through four case studies, focusing on both stand-alone motor systems and the entire DDWMR. The tracking performance is evaluated using metrics such as absolute error integration and root mean square error. Simulation results show that under ideal step command, the pole-zero cancellation PI speed controller achieves the best tracking performance, while PID controllers obtained from Matlab’s Auto-tuning App perform best for standalone motor systems. For motors in a DDWMR, the PID controller with parameters derived from the Ziegler-Nichols tuning rules provides optimal tracking performance. These simulation results show that there is no universal controller that can achieve the best performance in all situations; rather, each controller is suited to specific circumstances. Nonetheless, in all


Introduction
Nowadays mobile robots are popular and their application can be seen in every aspect of life, from floor cleaning to space exploration. A global overview of mobile robot control and navigation can be found in [1]. Exhaustive review on trajectory tracking in differential drive WMRs can be found in [2]. Published works related to applications, perception, and communication of mobile robots can be found in [3].
One of the most attractive topics in mobile robots is trajectory tracking control, which involves accurately following a desired path or trajectory. When the dynamic structure and the parameters of the mobile robot system are completely known, the trajectory tracking problem can be solved by using kinematic model [4], backstepping technique [5], or dynamic feedback linearization [6]. Considering disturbances, unmodelled dynamic and parameter uncertainty, the tracking problem can be solved by various nonlinear control techniques such as sliding mode [7,8], adaptive [9,10], fuzzy adaptive [11,12], or model predictive [13,14,15,16].
In mentioned published works, the motors used in wheel mobile robots (WMRs) were considered as either torque sources, which serve as inputs to the dynamic model, or speed sources for the kinematic model of the robots. This means that the control system is designed to control the motors in order to track a desired trajectory, either by regulating the torque or speed of the motors. However, no detail speed control system design for the motors was discussed.
Most of available commercial and research mobile robots are actuated by electrical motors. The majority of WMRs use either permanent magnet direct current (PMDC) motors [2], brushless direct current (BLDC) motors [8,17], stepper motors [18] or direct current servo motors [19]. Among of them, PMDC motors are most widely used due to their simple mathematical model as well as control mechanism.
Typical control problems for a PMDC motor are speed, torque, and position one. Various linear and nonlinear control techniques have been used for speed control of PMDC motors. Among of them, PID is extensively used in industrial application, academic, and research activities. An interesting topic in design PID speed control system is parameter tuning. Conventional approaches such as pole-zero cancelation, pole-placement are used for academic activities. Ziegler-Nichols rules based are usually used for tuning the parameter of PID controller for practical systems whose step responses are in S-curve shape. Commercial PID controllers have auto-tuning feature [20]. Various online and offline PID parameter tuning algorithms have been proposed, for example, generic algorithm [21,22,23,24], particle swarm optimization [25,26,27,28], or soft computing [29,30,31,32,33]. However, all of these works considered the PMDC motors as standalone systems, with the load torque being considered a constant, a step change, or some noise. As a result, the performance of these controllers can differ greatly when applied to standalone PMDC motors versus PMDC motors used in mobile robots.
The output of the controllers used for the PMDC motors are normally desired armature voltage that applied to the motors. In practical systems, power electronic converters must be used as drivers to convert the desired voltage into the duty cycle that will be fed into some pulse-width-modulation generator to control the converters. For dc motors, buck, boost, or buckboost topologies are commonly used [34]. When using these converters, the voltage apply to the motor can be smaller or larger than the voltage of the DC power source but always positive (or negative). The direction of the current is also fixed. With these converters, the motors are always work at the first quadrant. On the other words the manoeuvrability and mobility of the mobile robots are reduced.
In mobile robots, each robot typically has several driving wheels that are actuated by electrical motors. These motors are inter-connected and form a coupling multi-input-multi-output (MIMO) system, meaning that they work together to control the movement of the robot. The design of the control system for electrical motors used in mobile robots must take into account the interaction and coupling between the different motors and the effect on the overall system performance.
In this work, a detailed model of a differential drive WMR is introduced. The model consists of four subsystems: the kinematic and dynamic models of the robot, the dynamic model of the DC motor actuators, and the model of an H-bridge converter with a built-in PWM generator. To simplify the analysis, a half-weight model of the WMR that considers only the longitudinal dynamic is proposed. This model is used as a control-oriented one for designing the speed control system of the DC motor. The effect of the multi-motor coupling characteristics in DDWMRs is presented in terms of the same disturbance torques acting in different directions on the right and left motors.
Details of designing the PI/PID speed controllers for the system is also presented in a systematically approach. Initially, conventional pole-zero (PZ) cancelation technique is applied to determined parameters of PI speed controllers. Since the open-loop respond of the halfweight robot is an S-curve shape, Ziegler-Nichols (ZN) rules are utilized the determined parameters of P, PI, and PID speed controllers. The parameters of ZN-PID are used as initial values for the PID controller when using the PID Auto Tuning (AT) App in Matlab/Simulink for further improvement.
The effectiveness of the controllers are evaluated under four different case studies. The first two case studies are utilized to evaluate the performance of the controllers when applying for standalone PMDC motors while in the last two case studies, the controllers are applied for PMDC motors used in a differential drive wheel mobile robot (DDWMR). In each case study, the performance of proposed system is further considered under different situations, for example, with/without power electronic converters, with-/without disturbance torques.
The remain of this work is organized as follow. Section II presents the description and modelling of the proposed system. Section III presents the design of the speed controller for PMDC motors. Performance of the designed controllers used for standalone motor systems and WMRs system are described in Section IV. Main contributions and future research direction of this work are presented in Section V.

2.
System Description and Modeling

System Description
The overall block diagram of the proposed Differential Drive Wheel Mobile Robot (DDWMR) is shown in Fig. 1. The system is commanded to move in desired orientation θ des with certain velocity linear velocity v des . A virtual robot block is utilized to generate the desired information of the robot: the global location, linear and angular velocities. Among of them, most important information are the desired angular velocities of the left-and the right-wheel, ω L,des and ω R,des respectively. The Left-and Right-Motor-Controllers are the speed controllers for dc motors whose outputs are the pulse-width-modulation values that will be applied to the motor drivers, the H-bridge converters. The outputs of the Hbridges are armature voltage that apply to the PMDC motors. The torques available at the output of the motor shafts are feeding to the dynamic model of the robot whose outputs are linear and angular velocities. Using kinematic model, the current position and orientation of the robot and the angular velocities of the wheels can be determined. The angular velocities of the wheels are also the angular speed of the motors that will be used as measured feedback to ensure that the angular speeds of the motors are followed the reference ones. Following section will describe all the block in detail.

1) Kinematic Model
In this work, the proposed DDWMR is equipped with two identical PMDC motors whose output shafts are connected to corresponding driving wheels. There are two small caster wheels located at front and rear positions for balancing purpose. The caster wheels are neglected in the modelling process but their effects will be taken into account under the form of load torque disturbance to driving wheels later. For an easily reading purpose, the PMDC motors and casters wheels are neglected in the kinematic diagram as shown in Fig. 2.
With the assumption of rolling without slipping of the wheels, the longitudinal speeds of the wheel-hub centers are determined by Where ω L and ω R are the angular speed of the wheels; Rw is the wheel radius; i G is the gearbox ratio. The longitudinal speed V and the yaw rate ω z of the robot at point O B , the midpoint of the line connecting the wheel-hub centers, can be obtained as: where 2W is the distance between the wheel centers, also the distance between the ground contact point of the left and right wheels.
In term of global frame, we have where V X is the X-axis velocities, V Y is the Yaxis velocity, andθ is the yaw rate of the robot. The orientation and location of the robot in global frame will be determined by where θ 0 and X 0 , Y 0 ) are initial orientation and position of the robot. Detail of kinematic block is shown in Fig. 3.

2) Dynamic Model
The dynamic diagram of the proposed DDWMR is shown in Fig. 4 below. In this diagram, F R and F L are tractive forces generated at the wheel's ground contact points, C R and C L , respectively; T R and T L are the torques available at the output shafts of the right-and the leftmotor, respectively.
Using Newton second law for the motor-wheel systems we have: where J w is the moment of inertia of the wheel, i G and η G are the gearbox ratio and efficiency respectively.
Using Newton second law for the robot systems we have: where m is the total weight of all the robot system, J z is the moment of inertia of the robot with respect to Z-axis; F d and T d are unknown lumped force and torque against the linear and rotation movement of the robot.
Substitutes Eq. (1) and Eq. (2) into Eq. (6) we have Solving Eq. (7) we obtained: where m lin = mRw 4i G + JzRw 4W 2 i G is the linear equivalent weight acting on the motors due to the linear movement and m rot = mRw 4i G − JzRw 4W 2 i G is the equivalent mass acting on the motors due to the rotational movement. where is the equivalent moment of inertia refer to the motor due to linear movement and J rot = mrotRw i G η G is the equivalent moment of inertia refer to the motor due to the rotational movement.
Solving Eq. (9) we obtained Then the angular speed of the motors will be obtained as: where ω R0 and ω L0 are initial speed of the motors. Detail of dynamic block is shown in Fig.  5.

3) Actuator Model
Assumed that we can have the same PMDC motors for the left and the right-wheels, the linear time invariant model of PMDC motors is: where R a and L a are the resistance and inductance of the armature winding; K E is the voltage constant; U aR and U aL are the voltage applied  to the armature winding of the right-and the left-motor respectively.
The torques at the output shafts of the motors are where K T is the torque constant, and B m is the viscous coefficient of the motors. Detail of motor block is shown in Fig. 6.

4) H-Bridge Converter Model
An H-bridge is composed of four fully controlled power electronic switches such as power BJT, MOSFET, IGBT, IGCT, or GTO. In this work, four MOSFETs with built-in diodes are used as power switches and the schematic of the Hbridge is shown in Fig. 7.
To adjust the level of output voltage of the converter, pulse-width-modulation method is used. The duty cycle adjustment is implemented by comparing a triangular signal with magnitude of 0.5, offset 0.5 and frequency of fc with a constant D as shown in Fig. 8. The switch is turned on if D ≥ V c and is turned off if D < V c , where the carrying signal is a triangular varied It is obviously that the on-duty period of the pulse is proportional to the value of D as Assume that the motor will move forward if a positive voltage is applied to the motor terminal and backward if a negative voltage is applied to the motor terminal. In this manner, (S 1 and S 2 ) are used to control the rotating direction while (S 3 and S 4 ) are used to adjust the armature voltage of the motor. The timeline of the switches and the resultant voltage are shown in Fig. 9. The pulse-width of S 3 and S 4 are adjusted based on the relationship between the desired duty D and the carrying signal. The value of D can be used to set the moving direction, if D > 0 the robot moves forward and if D < 0 the robot moves backward. The carrying signal also depends on the moving direction, a positive carrying signal is for forward movement and a negative signal is for backward movement. The switching scheme is straightforward: if D > V c , then (S 4 on, S 3 off) and if D < V c , then (S 4 off, S 3 on). The average voltage applied to the motor is where U dc is the voltage of a dc voltage source, U a is the voltage applied to the armature winding of the PMDC motors. Detail of H-bridge block is shown in Fig. 10.

5) Virtual Robot Block
Imitated by human driving behaviours, the robot is demanded to follow the commanded lon-  gitudinal velocity and the orientation (the heading angle). Based on the commanded information, the steering block generates the linear and angular speed trajectories of the robot in the global frame. After that, using an inverse kinematic model of DDWMR, the linear and angular speed will be converted into actuators' angular velocity.
There are several methods to generate the trajectory of the yaw rate for a desired yaw angle. The trajectories can be cubic polynomial shapes, S-curve shapes or linear segment with blends. Among of them, cubic polynomial offers a smooth movement but requires longer traveling time. S-curve shape trajectory offers a smooth movement, optimizable traveling time but requires a higher computational effort. Linear segment with blends trajectory is a simplified version of s-curve shape, this kind of trajectory offers a reasonable smooth movement with tunable traveling time and lower computational effort. The linear segment with blends trajectory is resulting a trapezoidal yaw rate profile. In this work, the cubic polynomial is used to generate the angular speed trajectory for a desired heading angle. For a cubic polynomial, the yaw angle is a 3 rd order polynomial, the yaw rate will be a 2 nd order polynomial, and the yaw acceleration is a 1st order polynomial as described by equations from Eq. (16) to Eq. (18) and illustrated in Fig.  11.
where a i (i = 1..4) are the polynomial coefficients.
If we know the time period required for steering command, the coefficients will be determined by the initial conditions: where t 0 is the time instant that the steering is started and t f is the time instant that the steering is finished. Substitute Eq. (16) into Eq. (19) and after some mathematical manipulation we obtained: Normally the yaw rate is limited by the physical capability of the actuators and the parameters of the robot, which means that ω z,max are given. Set yaw acceleration from (18) to zero, we obtained: where t ωzmax is the time instant at which the yaw rate is maximum.
Substitute (21) into (17) we have Substitute (20) into (22) we obtained: And the coefficients become: Substitute Eq. (24) into Eq. (18), the angular acceleration profile is determined by It can be seen from Eq. (25) that the angular acceleration is maximum at t = t 0 and equal to This value will be considered as a limited acceleration for of the system for a desired steering angle and maximum steering velocity. The desired steering velocity and steering trajectory are determined by The robot is demanded to run at desired linear velocity, V dem . Noticed that the acceleration of system is limited in order to protect the mechanical parts. Assumed the maximum acceleration is given by a max , then the acceleration time will be determined by: The desired trajectory of linear velocity is given by: Which the linear velocity, determined by Eq. (30) and the yaw rate, given by Eq. (17) or Eq. (27), the reference angular speed for the PMDC motors are determined by

PMDC Control System Design
In this section, two speed controllers are developed to make sure that the angular speed of the PMDC motors track their corresponding references. The reference speed of the right-motor is given by Eq. (31) and the reference speed for the left-motor is given by Eq. (32). Obviously if the parameters of the robot are determined with enough accuracy, when the angular speed of the motors track their reference, the linear and angular speed of the robot will also track their references.

Half-weight Robot Model
In order to design the speed control system, only longitudinal dynamic of the robot is considered in the initial design stage. The effect of coupling characteristic of DDWRM on individual motor will be considered as lumped disturbance torque. Since there are two motors used for the robot, it is assumed that the motors are identical and each motor should carry a haft weight of all robot system. The simplified longitudinal dynamic equations of a half-weight mobile robot are: Above equations can be rearranged as where is the equivalent moment of inertia of the robot and T d = Rw i G η G J T F d is the disturbance torque referred to the motor shaft. Eq. (34) can be rewritten in the form of standard linear system aṡ where x = i a ω m T is the state variable vector, u = U a is the input, τ = F d is the disturbance, y = ω m is the output, and A, B, C, D are system matrices, determined by: Above system can also be presented in form of transfer functions as illustrated in Fig. 12.

System Analysis
When ignoring the disturbance, T d , the transfer function of the motor can be obtained as: (37) which can be expressed in standard 2 nd order system as where ω n is the natural frequency; ζ is the damping ratio, and K dc is the dc gain.
The system has two poles at The parameters of PMDC motors are listed in Table 1. With these parameters, the transfer function of the motor in the half-weight robot model is where ω n = 40.12(rad/s), ζ = 1.35, and K dc = 1.692.
The system has ζ > 1, which means that it is an overdamped one. It has two distinguish negative open-loop poles at s 1 = -90.108 and s 2 = -17.86. This means that the system is stable and no overshoot.
The open-loop characteristics of the motor can also be obtained by using the "Linear System Analysis" toolbox from Matlab. The results are shown in Fig. 14. It can be seen from the figure that the half-weight robot system is stable, fast response, and no overshoot but high steadystate error, 69%. These results are agreed with that one obtained from the analytical calculations above.

Control System Design
In most electrical drive system, PI controller is widely used for speed control. Hence, in this section, different design approaches will be used to synthesis the PI speed controller. The block diagram of the half-weight model with PI speed controller is shown in Fig. 13. The transfer func-  tion of the PI controller is given by where K p is the proportional and K i is the integral gains of the PI controller.
The open-loop transfer function of the speed control system, without disturbance, is given by

1) Pole-Zero Cancellation
Since the PI controller has a zero of (K i /K p ) while the motor has poles at ω n ζ ± (ζ 2 − 1) , the simplest way to select the gain constants of the PI controller is to cancel the pole-zero of the open-loop transfer function. In addition, the smaller negative pole is the shorter settling time the system will achieve, hence the gains of the PI controller will be select in order to cancel the larger pole. In this condition, we have After some mathematical manipulation, the open-loop transfer function becomes And the closed-loop transfer function is (46) in which the undamped natural frequency is ω ncl = ω n K p K dc and the damping ratio is For desired location of the dominant closedloop poles, the value of K p can be determined. For example, if damping ratio is interested, the proportional gain will be obtained from: The corresponding undamped natural frequency of the closed-loop transfer function will be In contrast, if natural frequency is interested, the proportional gain is obtained by: And the corresponding damping ratio will be The main drawback of the pole-zero cancellation method is that the K p gain only select to satisfy either desired damping ratio or undamped natural frequency. On the other words, when increasing the damping ratio, the   response will have smaller overshoot but longer settling time. Similar performance will be obtained when decreasing the undamped natural frequency of the closed-loop system.

2) Ziegler-Nichols Rules-based PID
It can be seen that the open loop response of the proposed PMDC motor exhibits an S-shape curve. Hence, Ziegler-Nichols tuning rule will be applied to estimate the controller parameters.
The S-shaped curve is characterized by two constants, delay constant L and time constant T. The delay time and time constant are determined by drawing a tangent line at the inflection point of the S-shaped curve and determining the intersections of the tangent line with the time axis and line K = y(∞) as shown in Fig. 16. From the figure we get K = 556 rpm (=58.22 rad/s), L = 0.006s and T = 0.083s. The Ziegler-Nichols tuning rules and the corresponding values of controller's parameters are listed in Table  2. The transfer function of the PID controller is The step responses and Bode diagrams of the system under different controllers are shown in   Fig. 17a and Fig. 17b. It can be seen that there is some steady state error when using the P controller. By adding the Integrator, the PI controller eliminate the steady state error. When adding the derivative part, the closed-loop transfer has higher damping ration which reduce the overshoot and the settling time.

3) Matlab's PID Auto-tuning App
Starting from the gain constants obtained from Ziegler-Nichols rules in previous section, we utilized the PID Auto-tuning app in Matlab software to further tune the gain constants of the PID speed controller. Since the software is graphically interactive, it is easily to obtain the desired performance for a given system. Considering the response time, transient behavior, controller effort, input and output disturbance rejections, the response of the initial and the tuned PID controller are shown in Fig. 18.

Simulation Results and Discussion
In this section, the performances of different controllers are investigated in several case studies as listed in Table 3. In the first case study, the motor in the half-weight model is demanded to follow a step reference speed while in the second case study, the reference speeds of the motors are sinusoidal function of time. In the third case study (CS3), the controllers resulted from the design stage are utilized for the differential drive WMR. In this case study, the motors are required to follow the same amplitude but differ- ent frequency sinusoidal speed references. In the last case study (CS4), the demands for the robot are the linear speed and heading angle. Based on the initial and the desired heading angle, the cubic trajectory generation algorithm is applied to generate desired yaw rate trajectory.
The load disturbance torques is assumed a band-limited white noise with 0.25 noise power, 0.2s sample time [23341] pattern as shown in Fig.  19. The integration of absolute error (IAE) is used as a metric to evaluate the performance of the motors and the robots in the two first case studies.
In the first two case studies, the performances of the controllers are investigated under four sub-situations for each type of speed reference: without H-Bridge converter and without load torque disturbance (Ideal); with H-Bridge and without load disturbance (wH-woD); without H-Bridge and with load disturbance (who-wD); and with H-Bridge and with load disturbance (wH-wD). The resulted IAEs are listed in Table  4. Detail analyses are given below.
In CS1, under the ideal situation, the output speed of the motor of the half-weight robot    Fig. 20. Since the output of the controller is the armature voltage which is limited by the rated one as shown in Fig. 20b.
Only the output of the Pole-Zero Cancelation (PZ) controller is not exceeding the rated voltage. The limiting has great effect on the performance of the Ziegler-Nichols PID controller that the output shape is more different from the step response. The Auto-tuned PID (AT-PID) controller help the system to achieve smaller overshoot in comparison with the ZN-PID. In this case study, PZ controller offers the most reasonable performance.
In CS2, the robot is demanded to follow a rated speed amplitude and 0.5 rad/s frequency sinusoidal reference. Under ideal situation, since the reference is gradually increase and decrease, the system is easily to follow the reference. Hence all the controllers have good tracking performance. The error of the speed tracking for the first 0.7s is shown in Fig. 21. The presentation of H-bridge converter brings some input disturbance to the system while load torque variation is an output disturbance. For a rated speed reference, after short time the system reach its steady state. Since the robot has high undamped ratio, the effect of input and output disturbance is insignificant as can be seen from rows 2, 3, 4 in Table 4. However, for a sinusoidal speed reference, the disturbances effects are significant. With PZ controller, the presentation of H-bridge lead to a much higher error than the load torque. Since ZN-PID is designed based on the step response of the system, the controller is naturally suitable with sinusoidal reference speed. That why this controller helps the system achieve a smallest IAE in CS2 under ideal situation. Inherent from ZN-PID and considered input/output disturbance rejections during the design stage, AT-PID offers more robustness for the system. As a consequence, with the AT-PID controller, the system achieves consistent results in two case studies under different situations.
In next steps, we investigate the effect of the speed controllers of the motors to the performance of the DDWMR. In CS3, the speed references are sinusoidal signals with the same amplitude but different frequency, 2.5 rad/sec for the right motor, and 5 rad/sec for the left. To evaluate the performance of the controllers, we use the root-mean-square of the error (RMSE) where e i is the error of the quantity under evaluation at simulation time step i th and n is the total simulation steps.
The RMSE of the motors and robots speed are listed in Table 5. Simulation results indicate that the performance of the robot is depended on the performance of the motors. Smaller motor speed error will result a smaller robot speed error. The interesting point is the ZN-PID helps the system achieve smallest RMSE for all evaluated quantities.
For more details, the outputs of the robot with ZN-PID are shown in Fig. 23 below.
In the last case study, the robot is initially heading at 30 • , then demanded to run at longitudinal speed of 2 m/s with rated 4 m/s2 acceleration. At time 0.1s, the robot is commanded to steer to the new heading angle of 540 • . The steering velocity is generated by cubic trajectory generation. The motors and robot speeds  with ZN-PID are shown in Fig. 24a and the corresponding speed errors are shown in Fig. 24b. The RMSE of motors and robot speeds are listed in Table 6. It can be seen that, ZN-PID offers a smallest error of motor speeds while the system with PZ-PI speed controllers achieves largest errors in term of individual motor and the whole robot as well.
The robot states in global frame are shown in Fig. 25a and the corresponding errors are shown in Fig. 25b. It can be seen that all the speed errors approach zero after second of 1.2 but the position errors are not converged. This phenomenon is obvious because only speed control is considered in this work.

Conclusion
In this work, we introduce a detail model and a control-oriented model of a differential drive WMR. In the detail model, the robot is divided into main components whose mathematical model and Simulink implementation is represented in detail.
For control system design purpose, the robot is assumed symmetrically, the left and the right motors/wheels are identical. The mass distributes equally to the left and the right. Considering longitudinal dynamics only, a controloriented model is introduced. Only haft-weight of the robot is referred to the motor shaft.
Based on the control-oriented model, the characteristic of the robot is analysed. Different PI/PID speed controllers, pole-zero cancelation PI, Ziegler-Nichols P, PI, PID, Auto-Tuning PID, are designed in a systematically approach.
The performance of the controllers is investigated in four different case studies in term of motor only and the whole robot. IAE and RMSE are used as metrics to evaluate the tracking performance of the left/right motors and the robot. Simulation results indicate that there are different in performance of the same controllers for the same system under step response in design stage and under working conditions. Since the PZ-PI speed controller is designed based on the desired performance of the system under step response, the controller achieves a good tracking performance under step reference command and only suitable for ideal situation where the effect of power electronic converter and load torque disturbance are ignored. Inherent from ZN-PID, the AT-PID offers the best performance in the two first case studies when considering the motors are standalone systems. When applying for motors in the proposed differential drive WMR, ZN-PID offers the best tracking performance. The results from CS3 and CS4 convince that a better motor speed tracking help to get a better trajectory tracking performance of the robot.