InTech uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Technology » "New Trends in Technologies", book edited by Blandna Ramov, ISBN 978-953-7619-62-6, Published: January 1, 2010 under CC BY-NC-SA 3.0 license. © The Author(s).

Chapter 10

Design of Neural Network Mobile Robot Motion Controller

By Jasmin Velagic, Nedim Osmic and Bakir Lacevic
DOI: 10.5772/7584

Article top


Mobile robot motion control system
Figure 1. Mobile robot motion control system
The representation of a nonholonomic mobile robot.
Figure 2. The representation of a nonholonomic mobile robot.
Mobile robot control system
Figure 3. Mobile robot control system
Neural network learning architecture
Figure 4. Neural network learning architecture
Dynamical neural network.
Figure 5. Dynamical neural network.
The concept of tracking of a virtual reference robot.
Figure 6. The concept of tracking of a virtual reference robot.
Tracking the lamniscate trajectory
Figure 7. Tracking the lamniscate trajectory
Time history of x coordinate
Figure 8. Time history of x coordinate

						X coordinate error
Figure 9. X coordinate error
Time history of y coordinate
Figure 10. Time history of y coordinate

						Y coordinate error
Figure 11. Y coordinate error
Time response of robot orientation
Figure 12. Time response of robot orientation
Linear velocity of right wheel
Figure 13. Linear velocity of right wheel
Linear velocity of left wheel.
Figure 14. Linear velocity of left wheel.

Design of Neural Network Mobile Robot Motion Controller

Jasmin Velagic1, Nedim Osmic1 and Bakir Lacevic1

1. Introduction

Neural networks are recommended for intelligent control as a part of well known structures with adaptive critic (Barto, 1983; Lacaze, 1997; Hendzel, 2007). Recently, much research has been done on applications of neural networks for control of nonlinear dynamic processes (Narenda & Pathasarathy, 1990; Nguyen & Widrow, 1990). These works are supported by two of the most important capabilities of neural networks; their ability to learn and their good performance for the approximation of nonlinear functions (Hornik et al., 1990). At present, most of the works on system control using neural networks are based on multilayer feedforward neural networks with backpropogation learning or more efficient variations of this algorithm (Narenda & Pathasarathy, 1990). It has been shown (Hornik, 1990) that a neural network with one hidden layer with an arbitrarily large number of neurons in the hidden layer can be approximate any continuous functions over a compact subnet of n .

The neural network-based control of mobile robots has recently been the subject of intense research (Corradini et al., 2003). It is usual to work with kinematic models of mobile robot to obtain stable motion control laws for trajectory following or goal reaching (Jiang, 2001; Ramírez & Zeghloul, 2000). The most authors solved the problem of mobile robot motion control and stability using nonlinear backstepping algorithm (Tanner & Kyriakopoulos, 2003; Velagic et al., 2006). Fierro and Lewis (1998) developed a neural network based model by combining the backstepping tracking technique and a torque controller, using a multi-layer feedforward neural network, where the neural network can learn the dynamics of the mobile robot by its on-line learning. But the control algorithm and the neural network learning algorithm are very complicated and it is computationally expensive. In (Yang & Meng, 2001) a single-layer neural network based controller for robot is proposed. This approach does not include any nonholonomic kinematics therefore it can not be used for robot with kinematic constraints. However, the problem of control of mobile robots has attracted the interest of researchers in view of its theoretical challenges. In fact, these systems are a typical example of nonholonomic mechanisms due to the perfect rolling constraints (no longitudinal or lateral slipping of the wheels).

In this paper we used a recurrent neural network for controlling the mobile robot with nonholonomic constraints. This network is trained on-line using the backpropagation optimization algorithm with an adaptive learning rate (Velagic & Hebibovic, 2004; Velagic et al., 2005). The optimization algorithm is performed at each sample time to compute the optimal control inputs. This is a simple control system and computationally very effective for real-time requirements.

2. Control System of Mobile Robot

The proposed neural network control system is shown in Fig. 1. The control system consists of the neural network controller, the kinematic model of mobile robot, a reference trajectory generator and an encoder which provides odometric information. In this section the kinematic model of mobile robot with differential drive and convergence conditions of overall control structures are described. Design of neural network controller will be presented in the next subsection.


Figure 1.

Mobile robot motion control system

2.1. Kinematic model of mobile robot

In this paper the mobile robot with differential drive is used (Fig. 2).


Figure 2.

The representation of a nonholonomic mobile robot.

The robot has two driving wheels mounted on the same axis and a free front wheel. The two driving wheels are independently driven by two actuators to achieve both the transition and orientation. The position of the mobile robot in the global frame {X, O, Y} can be defined by the position of the mass center of the mobile robot system, denoted by C, or alternatively by position A, which is the center of mobile robot gear, and the angle between robot local frame {xm , C, ym } and global frame.

Kinematic equations of the two-wheeled mobile robot are:

[x˙y˙θ˙]=[cos(θ)     0sin(θ)      0    0         1][vω]
[vω]=[r          rrD     -rD][vRvL]

where x and y are coordinates of the center of mobile robot gear, θ is the angle that represents the orientation of the vehicle, v and ω are linear and angular velocities of the vehicle, vR and vL are velocities of right and left wheels, r is a wheel diameter and D is the mobile robot base length.

Combining equations (1) and (2) yields:

[x˙y˙θ˙]=[rcos(θ)      rcos(θ)rsin(θ)       rsin(θ)     rD            -rD][vRvL]

Inputs of kinematic model of mobile robot are velocities of right and left wheels vR and vL .

The constraint that the wheel cannot slip in the lateral direction is:


The stability conditions of mobile robot system with PI controller will be investigated in the next subsection.

2.2. Convergence condition of control system

The feedback control system of mobile robot is shown in Fig. 3.


Figure 3.

Mobile robot control system

The time derivation of mobile robot output yields:

[dxdtdydt]=[1   0  00   1  0][x˙y˙θ˙]
[dxdtdydt]=[1   0  00   1  0][rcos(θ)rcos(θ)rsin(θ)rsin(θ)rD-rD][vRvL]

The equation (6) can be rewritten in compact form as:


where J is Jacobian matrix.

It is required that the position error vector go exponentially to a zero as a function of time:

where ei =e i,0 exp(-kt).

This requirement is satisfied with the following control law:


where matrix K need to be positive definitive. On the other words the following relation hold:

where k 1 and k 2 are elements of the matrix K, respectivelly:

K=[k1     0 0     k2]

Using equation (8) velocities of the right and left wheels:


The Jacobian matrix J is a non-singular one so as to assure that a control law based on the inversion of J is possible.

Various controller parameters were tested by using lamniscate desired motion trajectories. The controller parameters, which ensure the good tracking performance is found to be:

k1= 102.9822,k2= 1.3536

On the basis of this velocity controller, the neural network controller will be designed in the next section.

3. Neural Network Control Design

In design of velocity mobile robot controller the following simplifications are assumed:

  • Kinematic model is captured by first order differential equation.

  • Assume that an arbitrary commanded speed can be achieved (instantaneously).

Under these simplifications, results are expected:

  • Exponential convergence of trajectory to desired trajectory.

  • Speed of convergence can be tuned.

3.1. Design of neural network controller

A neural network (NN) performs the system model identification that will be used to design the appropriate intelligent mobile robot controller. The usage of NN for controlling a mobile robot is justified from the following reasons: the operational conditions considered raises complex nonholonomic mobile robot kinematics and NN has universal approximation and supervised learning capabilities.

The neural network controller in Fig. 4, based on the recurrent network architecture, has a time-variant feature: once a trajectory is learned, the following learning takes a shorter time.

The dynamic neural network is composed of two layered static neural network with feedbacks (one hidden and one output layers) (Fig. 5). The hidden layer contains ten tansigmoidal neurons and the output layer has one neuron with a linear activation function.

It is important to note that rather then learning explicit trajectories, the neural network controller learns the relationship between linear velocities and position errors of the mobile robot. This network is trained using the backpropagation algorithm through time with an adaptive learning rate (Velagic & Hebibovic, 2004; Velagic et al., 2005). In the training phase the network is presented with a series of input-answer pairs.


Figure 4.

Neural network learning architecture

The network’s current output vk is compared with the desired input ek , and the errors are used to correct the weights in order to reduce the network’s error on this input:


Synaptic weights are updated as


where η is the learning rate, δj is the error gradient at unit j, δk is the error at unit k and vi and vj are the outputs of unit i and j, respectively.


Figure 5.

Dynamical neural network.

A unifying framework for neural networks that encompasses process identification concept is to view neural network training as a nonlinear optimization problem:

That is, we need to find values for neural network parameters w (weight vector) for which some cost function J(w) is minimized.

Let us assume that the controller is described by the following time difference equation:


where v(t) is the process output at time t depends on the past n output values and on the past m values of the input e. For identification plant model the neural network is used in the following form:


where nm for physically realizable systems.

Here fw represents the nonlinear input-output map of the neural network which approximates the controller mapping f ( ). The input to the neural network includes the past values of the controller output.

The training process for neural network modeling can be expressed as the minimization of an error measure. If the sampled process data are collected over a period [0, T], the cost function J(w) is defined as:


In our algorithm (Velagic & Hebibovic, 2004; Velagic et al., 2005) we define relationship between ΔJ(w,t) and J(w,t) by the relative factor χ(t):


Then, we determine how to adjust learning rate term according to the relative factor χ. The adjustment of the learning rate is given as follows:

η(t+1)=η(t)[1sgn(χ(t))υeχ(t)],   υ(0,1)

The learning rate is adjusted at each iteration according to equations (21) and (22). The algorithm proceeds as follows. First, we select the number of neurons in hidden and output layers, initial value of learning rate and the parameter υ. Then, the training process in the closed control loop is performed for various values of parameter υ, υ[0,1]. We adopt the value of υ for which a satisfactory identification performance is achieved. Our neural network has 10 sigmoid neurons in hidden layer and 2 linear neurons in its output layer. The proposed algorithm starts with the same initial learning rate η=0.02 for both layers. The good results were obtained with υ=0.71.

The trajectory tracking performance obtained by adopted neural controller will be shown in the following section.

4. Simulation Results

The effectiveness of the neural network controller is demonstrated in the case of tracking of a lamniscate curve. The trajectory tracking problem for a mobile robot is based on a virtual reference robot (Egerstedt et al., 2001) (Fig. 6) that has to be tracked.

The tracking position error between the reference robot and the actual robot can be expressed in the robot frame as:

ep=[e1e2e3]=Tpeq=[ cosθ    sinθ     0sinθ   cosθ     0    0         0        1][xrxyryθrθ]


eq=[ex ey eθ]T

The position error dynamics can be obtained from the time derivative of the (23) as:

e˙1=ωe2+u1 e˙2=ωe1+vrsine3

where v=vrcose3u1 and



Figure 6.

The concept of tracking of a virtual reference robot.

The overall system is designed and implemented within Matlab/Simulink environment. We consider the following profiles: position, orientation, linear and angular velocities.

The simulation results obtained by neural network controller are shown in Figs. 7-14. Results achieved in Figs. 7-11 demonstrate the good position tracking performance. Also, a desired orientation during robot motion is following in satisfactory manner, which is depicted in Fig. 12. The proposed neural controller ensures small values of the control input velocities (linear) for obtaining the reference position trajectories (Figs. 13 and 14). This mean that smaller power of DC motors is requested.


Figure 7.

Tracking the lamniscate trajectory


Figure 8.

Time history of x coordinate


Figure 9.

X coordinate error


Figure 10.

Time history of y coordinate


Figure 11.

Y coordinate error


Figure 12.

Time response of robot orientation


Figure 13.

Linear velocity of right wheel


Figure 14.

Linear velocity of left wheel.

5. Conclusions

This paper presented a design of the neural network-based velocity controller for the kinematic model of mobile robot with differential drive. The proposed neural controller has two inputs (position errors of wheels) and two outputs (velocities of wheels). It is trained on-line through controlling of the mobile robot by PD controller. For this purpose the backpropagation algorithm with adaptive learning rate is applied. Simulation results demonstrate the effectiveness of the proposed neural network-based control system.


1 - A. G. Barto, 1983 Neuron like adaptive elements that can solve difficult learning control problems. IEEE Transactions on System, Man and Cybernetics, 13 834 846 .
2 - M. Corradini, G. Ippoliti, S. Longhi, 2003 Neural networks based control of mobile robots: development and experimental validation, Journal of Robotic Systems, 20 10 587 600 .
3 - M. Egerstedt, X. Hu, A. Stotsky, 2001 Control of mobile platforms using a virtual vehicle approach. IEEE Transactions on Automatic Control, 46 11 1777 1882 .
4 - R. Fierro, F. L. Lewis, 1998 Control of a nonholonomic mobile robot using neural networks. IEEE Transactions on Neural Networks, 9 4 389 400 .
5 - Z. Hendzel, 2007 Adaptive critic neural networks for motion control of wheeled mobile robot. Nonlinear Dynamics, 50 4 849 855 .
6 - K. Hornik, M. Stinchombe, H. White, 19900 Universal approximation of an unknown mapping and its derivatives using multilayer feedforward networks. Neural Networks, 3
7 - Z. P. Jiang, E. Lefeber, H. Nijmeijer, 2001 Saturated stabilization and tracking of a nonholonomic mobile robot. Systems & Control Letters, 42 327 332 .
8 - A. Lacaze, 1997 A neural network planner that prunes its own tree. Term paper, Knowledge Engineering Department, University of Meryland.
9 - K. S. Narenda, K. Pathasarathy, 1990 Identification and control of dynamic systems using neural network. IEEE Transaction on Neural Networks, 1 1 4 27 .
10 - D. Nguyen, B. Widrow, 1990 Neural networks for self- learning control systems. IEEE Control System Magazine, 10 1 18 23 .
11 - G. Ramírez, S. Zeghloul, 2000 A new local path planner for nonholonmic mobile robot navigation in cluttered environments, Proceedings of IEEE International Conference on Robotics and Automation, 2058 2063 .
12 - H. G. Tanner, K. J. Kyriakopoulos, 2003 Backstepping for nonsmooth systems. Automatica, 39 1259 1265 .
13 - J. Velagic, M. Hebibovic, 2004 Neuro-fuzzy architecture for identification and tracking control of a robot, Proceedings of the World Automation Congress- 5th International Symposium on Soft Computing for Industry ISSCI2004, June 28 - July 1, Sevilla, Spain, paper ISSCI-032 (1:9).
14 - J. Velagic, B. Lacevic, M. Hebibovic, 2005 On-Line identification of a robot manipulator using neural network with an adaptive learning rate, Proceedings of 16th IFAC World Congress, 03 08 June, Prague, Czech Republic, 2005, paper 2684 1-6).
15 - J. Velagic, B. Lacevic, B. Perunicic, 2006 A 3-Level autonomous mobile robot navigation system designed by using reasoning/search approaches. Robotics and Autonomous Systems, 54 12 989 1004 .
16 - S. X. Yang, M. Meng, 2001 Real-time fine motion control of robot manipulators with unknown dynamics,” in: Dynamics in Continuous, Discrete and Impulse Systems, Series B.