The basic modelling of the two wheeled mobile robot is based on the kinematic and dynamic models,17,18 in addition to the DC motor dynamics that must be taken into account.19,20 In fact, the control inputs of the robot dynamic model are the torques delivered by the two DC motors incorporated in the left and the right wheels.
Illustration of the kinematic model
Coordinates and non-holonomic constraints: The typical model of non-holonomic wheeled mobile robot is shown in the Figure 1 the robot is operated with two wheels in addition to a castor one ensuring its stability.
Figure 1 Posture of non-holonomic wheeled mobile robot.
Firstly, we need to define two different coordinate frames:
- An inertial and global reference frame in the environment, in which the robot moves in. It is denoted as
:
- A local frame which is attached to the robot and is denoted as
:
The origin of the local robot frame is the mid-point O’ on the axe between the wheels and the centre of mass C is at a distance d from the origin O’.
The posture of any point in the robot can be represented in the local frame as
:and in the inertial frame as:
Where:
: are coordinates in the local frame,
: are coordinates in the inertial frame,
: is the angle between the heading direction and the x axis.
The two coordinates are linked by the orthogonal rotation matrix as follows:
(1)
We can apply the same transformation between frames on motions as:
(2)
This equation is very important, because it defines relations between velocities in the inertial frame and the local frame. In fact, motions of a differential-drive mobile robot are described by two non-holonomic conditions which are:
- 1st Condition: in the local robot frame, the velocity of the center-point O’ is zero along the lateral axis:
(3)
Considering the orthogonal rotation matrix, the velocity in the inertial frame gives:
(4)
II. 2nd Condition: each wheel maintains one contact point S with the ground. The velocities of the contact points in the robot frame are related to the wheel velocities by:
(5)
Are angular velocities of right and left wheels.
The positions of left and right wheels in the inertial frame are expressed with:
(6)
Considering the rotation matrix
, the velocities of right and left wheels are given by:
(7)
Replacing positions equations in the velocities equations, we obtain:
(8)
Thus the rolling constraint equations are formulated as follows:
(9)
We can express these equations by the following matrix
of non-holonomic constraints:
(10)
This matrix of constraints and the posture vector verify:
(11)
Kinematic model: The main principle of kinematic modeling is to provide relationships between linear and angular robot velocities and angular velocities of left and right wheels. The overall study is based on the mechanical system motion without taking into consideration forces.
From the matrix constraints, we can give the derivative posture as functions of wheels angular velocities:
(12)
The linear velocity of each driving wheel in the robot frame is:
(13)
Therefore, the linear velocity of the robot is the average of the linear velocities of the two wheels:
(14)
And the angular velocity of the robot is expressed with the two wheels angular velocities as:
(15)
On the contrary, we can obtain the two wheels angular velocities as functions of linear and angular robot velocities as:
(16)
Finally, the forward robot kinematic model is given by:
(17)
We can have also this model:
(18)
Dynamic modelling development
The main purpose is to represent robot dynamic model which is crucial for simulation study of various motion control algorithms design. The robot dynamic model should take into account different forces which affects its motion.
Generally, a non-holonomic differential robot with m constraints, n generalized coordinates and n-m inputs is illustrated by the above motion equation:
(19)
where:
: Is a symmetric positive definite inertia matrix,
: Is the centripetal and coriolis matrix,
: Is the surface friction matrix,
: Is the gravitational vector,
: Is the bounded unknown disturbance,
Is the input matrix,
Is the control input vector, provided by actuators,
Is the matrix associated with the kinematic constraints and verify, and is the Lagrange multipliers vector.
The approach used for such modeling is the Lagrange dynamic approach.19,20 The principle of the method is analytically based on the kinetic and potential energies of the system.
The following equation describes the Lagrange equation:
(20)
Where:
(21)
In the Lagrangian function, U is the kinetic energy, T is the potential energy, q is the generalized coordinates, (𝑞) is a matrix that relies actuators torques and generalized forces;
First of all, kinetic and potential energies that govern the motion of the robot should be calculated. And since the robot is moving in the inertial frame, its potential energy is considered to be zero.
The generalized coordinates are selected as:
(22)
The global kinetic energies of the robot consist on the sum of the kinetic energy of the robot platform with the kinetic energies of the wheels and actuators. This relation is given by:
(23)
Where:
is the kinetic energy of the robot platform defined as:
(24)
is the kinetic energy of the right wheel given by:
(25)
Is the kinetic energy of the left wheel given by:
(26)
where, mc is the mass of the robot platform, mw is the mass of each driving wheel, Ic is the moment of inertia of the robot through the center of mass, Im is the moment of inertia of each driving wheel with a motor about the wheel axis, and Iw is the moment of inertia of each driving wheel with a motor about the wheel diameter.
With consideration to the center of mass coordinates and the two wheels coordinates in the local frame, these equations depend on the generalized coordinates x and y as:
(27)
(28)
(29)
After development and with considering that the Lagrangien is equal to the kinetic energy:
The Lagrangien equation is then given by:
(30)
Where,
Is the total mass of the robot,
And
is the total inertia of the robot.
Applying the Lagrangien derivative equation, different matrixes of the dynamic equation are given by:
(31)
(32)
(33)
(34)
(35)
Where:
Are torques control inputs of the robot.
Considering that the Lagrangien coefficients are equal to zero, the robot dynamic model is given by:
(36)
Actuators dynamic modelling
In general cases, the driving system of mobile robots is based on an armature-controlled DC motors which are considered as servo actuators. These actuators train the two wheels and drive the mobile robot by providing torques control inputs.
The control inputs of the motors are the armatures voltages E(t) (Figure 2).
Figure 2 Architecture of a DC motor.
These following equations describe electrical and mechanical parts of the motor circuit:
(37)
Omitting the inertia and the friction of the motor:
(38)
As motors are mechanically coupled to the wheels by the reducers, mechanical equations of motors are directly linked with those of the robot:
(39)
Consequently, for the right motor:
(40)
And for the left motor:
(41)
As a result, the obtained equations are the dynamic model of the two motors:
(42)
The dynamic equations of the mobile robot and those of the actuators are given by this scheme: (Figure 3)
The closed loop feedback scheme in which angular velocities references of the right and the left wheels are considered as inputs, is given by the Figure 4.
Figure 3 Open loop dynamical robot system developed on SIMULINK software.
Figure 4 Closed loop scheme of dynamical robot system developed on SIMULINK software.
Different control strategies are used and designed for both speed control of DC motors and trajectory tracking for mobile robots.
In this section, the trajectory tracking and the speed control problems for the mobile robot are presented even in the presence of load torques Tlr and Tll which are applied to test the system’s control performances. This applied load torques Tlr and Tll are used to model the obstacles in the form of holes and the stones in the hostile environment in which the robot is evolving. The problematic is that the robot moves in a hostile environment full of holes and stones and must behave in an autonomous manner. The control objective is to design a controller which can adapt the mobile robot behavior to the application of different load torques.
In fact, it is important to know that the couple: load torque and robot behavior must be correspondent and must respect some rules:
- If
that is the load torques are less than the robot wheels torques, so the robot can overcome the obstacles (soft holes or stones), and then should evolve normally in its trajectory without changing its behaviour;
- If
that is the load torques are higher than the robot wheels torques, thus the robot should try to overcome the obstacles ( medium holes or stones), brake and then continue its trajectory normally ;
- If
that is the load torques are extremely higher than the robot wheels torques, hence the obstacles are quite difficult to overcome (very deep holes or big stones), then the robot should STOP to avoid motors damages, bypass and encounter the obstacles ;
- If
that is the left load torque is less than the right load torque ( left obstacle is less important than the right one), then the robot should turn to the LEFT;
- If
that is the left load torque is higher than the right load torque (left obstacle is more important than the right one), then the robot should turn to the RIGHT.
Our case study is based on two controller strategies: a classical PID controller (CPIDC) and a Real Time Dynamic PID optimized Neural Networks Controller (RTDPID). These two controllers were implemented on Matlab/Simulink environment and a comparative study is presented to demonstrate the effectiveness of the proposed smart control strategy based on neural networks.
Classical PID controller (CPIDC)
PID controller is a standard control feedback loop method commonly used in industry. The essential mission of PID controllers consists in reducing to zero the error between output or measured process variable and a desired set point by calculating and then outputting a corrective action that can adjust the process accordingly.
Since PID controllers are well recognized for achieving desired behavior, the control design should attend the goals which are: speed control and trajectory tracking even with the presence of load torques Tlr and Tll and without affecting the overall system stability.
In this section, a closed loop feedback algorithm based on PID controller has been developed for precise position, speed control, and especially for testing the behaviour of mobile robot regarding load torque application.
PID structure consists of proportional, integral and derivative actions which are implemented in parallel form. The derivative term is used to reduce the overshoot by improving the transient response and stabilizing the overall system behaviour, and the Integral term is used to reduce steady state error in a control system.
This classical PID controller is represented with its well known continuous transfer function as follows:
(43)
Where kP, kI and kD refer to proportional, integral and derivative gain constants respectively.
The tuning of these coefficients is done based on the Ziegler and Nichols approach considering the closed loop scheme. The main advantage of this method is its simplicity, and it consists in setting the integral KI gain to the maximum, and derivative KD gain to zero.
However, the proportional KP gain is then increased until it reaches the critical gain Kosc, and the system oscillates continuously among constant amplitude oscillations with Tosc period. Then Kosc and Tosc are used to set the PID gains based on mathematical approximations.21
The simulation leads to: (Figure 5)
Figure 5 Response of Ziegler and Nichols approach.
Where: Tosc=0.04s with Kosc=15.
By tuning these three constants, the PID controller algorithm can provide control action designed to let velocities of the wheels and the robot following desired specific process requirements, and mainly to test the behaviour of mobile robot against load torque application.
The closed loop PID control scheme is represented as: Figure 6
Figure 6 Closed loop PID control scheme.
The inputs of the closed loop system are references of linear and angular velocities of the robot
, and the outputs are linear and angular velocities of the robot
, angular velocities of the wheels
, x, y positions and the angle
.
Real time dynamic PID optimized neural networks controller (RTDPID)
In this section, the main idea is to optimize PID controller coefficients with the use of neural networks method.
Neural network architecture: The neural network utilised is a multi-layer network with the most popular training method, which is the back-propagation algorithm. Its structure is composed of three layers: the first one is the intput layer, the second is the hidden layer and the third is the output layer.
The first layer is constituted of four inputs which are the two errors between angular velocities of the wheels
and their referencesand the two armature voltages of the two motors, the second layer is composed of eighteen hidden neurons with “tansigmoid” activation functions and the third layer have three outputs “purelin” neuron which are the coefficients of the PID controller kP, kI and kD. So, for this application, the neural network is expected to provide the optimal PID coefficients for the mobile robot control behaviour against some load torques.
Learning phase: The back-propagation algorithm trains the neural network. In a typical back-propagation training session, the supervisor presents input data to the network and compares the network’s actual output Op to the target (or desired) output Tp. The basis of this comparison is the adjustment of weights wij and biases bij in order to reduce the value of a certain criterion: the energy function E represented by this equation:
(44)
This difference is used to change the connection weights between neurons in the network as:
(45)
By this way, the weights are adjusted in a gradient descent manner, which means the minimization of the error between the expected output and the actual output for a particular input.
For training purpose and tests, some data sets were created from the closed loop feedback scheme describing the mobile robot desired behavior against load torque application.
Closed loop real time dynamic PID optimized neural networks controller: Figure 7 shows the proposed strategy of mobile robot control. It is a task of replacing both classical PID controllers with one Real Time Dynamic PID optimized Neural Networks Controller. This neural network is asked to learn information about a data set, in order to compute a number of weights that best allow the controller to track the given input/output data, in order to provide PID controller with the optimal values of its coefficients {kP, kI, kD} corresponding to the desired mobile robot behavior.
Figure 7 PID optimized Neural Networks controller scheme.
Once the interconnection weights and the biaises are adjusted according to the desired output, these neural models are incorporated in the control loop of the overall controlled system, and are used as one controller providing the inverter with the appropriate voltage vector.
The neural networks utilised are the same as the one described in the previous section. However, its structure is quite different.