The KCLBOT: A Framework of the Nonholonomic Mobile Robot Platform Using Double Compass Self-Localisation

The key to effective autonomous mobile robot navigation is accurate self-localization. Without self-localization or with inaccurate self-localization, any non-holonomic autonomous mobile robot is blind in a navigation environment. The KCLBOT [1] is a nonholonomic two wheeled mobile robot that is built around the specifications for ‘Micromouse Robot’ and the ‘RoboCup’ competition. These specifications contribute to the mobile robot’s form factor and size. The mobile robot holds a complex electronic system to support on-line path planning, self-localization, and even simultaneous localization and mapping (SLAM), which is made possible by an onboard sensor array. The mobile robot is loaded with eight Robot-Electronics SRF05 [2] ultrasonic rangers, and its drive system is supported by Nubotics WC-132 [3] WheelCommander Motion Controller and two WW-01 [4] WheelWatcher Encoders. The motors for robot are modified continuous rotation servo motors, which are required for the WheelCommander Motion Controller. The rotation of the mobile robot is measured by Robot-Electronics CMPS03 [5] Compass Module. These two modules make the double compass configuration, which supports the self-localization theory presented in this paper. Each individual module provides the bearing of the mobile robot relative to the magnetic field of the earth. The central processing for the mobile robot is managed by a Savage Innovations OOPic-R microcontroller. The OOPic-R has advanced communication modules to enable data exchange between the sensors and motion controller. Communication is managed via a serial bus and an 2 I C bus. The electronics are all mounted on two aluminium bases, which make the square structure of the mobile robot. To support the hardware requirements of the novel localisation methodology, the cutting edge technology of a 200 MHz 32-bit ARM 9 processor on a GHI ChipworkX module [6] is employed. The software architecture is based on the Microsoft .NET Micro Framework 4.1 using C# and the Windows Presentation Foundation (WPF). The combination of hardware electronics and drive mechanics, makes the KCLBOT, as represented in Fig. 1, a suitable platform for autonomous self-localization. Many different systems have been considered for self-location, from using visual odometry [7] to using a GPS method. While all of these have benefits and detriments, the solution


50
proposed in this paper endeavours to offer significantly more benefits than detriments.Over the years, several solutions to self-localization have been presented.The most common application uses the vehicle's shaft encoders to estimate the distance travelled by the vehicle and deduce the position.Other applications use external reference entities to compute the vehicle's position, like global positioning systems (GPS) or marker beacons.All of these applications come with their respective weaknesses; for example, the shaft encoder assumes no slippage and is subject to accumulative drift; the GPS will not work indoors and is subject to a large margin of accuracy; and the beacons method is subject to the loss of the multi-path component delivery and accuracy is affected by shadowing, fast/slow fading, and the Doppler effect.More accurate applications have been presented using visual odometry but such applications require off-line processing or high computation time for real-time applications.Frederico et al. [8] present an interesting self-localization concept for the Bulldozer IV robot using shaft encoders, an analog compass, and optical position sensor from the PC mouse.This configuration of the vehicle is dependent on a flat surface for visual odometry to be effective; any deviation from the surface will cause inaccuracy.Hofmeister et al. [9] present a good idea for self-localization using visual odometry with a compass to cope with the low resolution visual images.While this is a very good approach to self-localization, the vehicle is dependent on a camera and the computation ability to process images quickly.Haverinen et al. [10] propose an excellent basis for self-localization utilizing ambient magnetic fields for indoor environments, whilst using the Monte Carlo Localization technique.

Fig. 1. The KCLBOT: A Nonholonomic Manoeuvrable Mobile Robot
It is not ideal to have multiple solutions to the position and orientation of the mobile robot and the computational requirement will affect the ability of the solution being available in real-time.Heavy computation also affects the battery life of the mobile robot and this is a critical aspect.In the technique utilizing two compasses, an analytical calculation model is presented over a numerical solution, which allows for minimal computation time over the numerical model.The configuration of the mobile robot employs two quadrature shaft encoders and two digital magnetic compasses to compute the vehicle's position and angular

www.intechopen.com
The KCLBOT: A Framework of the Nonholonomic Mobile Robot Platform Using Double Compass Self-Localisation 51 orientation on a two dimensional Cartesian plane.The accuracy of analytical model is benchmarked against visual odometry telemetry.However, this model still suffers from accumulative drift because of the utilization of quadrature shaft encoders.The digital compasses also encounter the same problem with the level of resolution being limited.The ideal solution will not have accumulation of drift error and will not be dependent on the previous configuration values of position and orientation.Such a solution is only available via visual odometry.

A manoeuvrable nonholonomic mobile robot
In this section, the experimental vehicle is evaluated by defining its constraints and modelling its kinematic and dynamic behaviour.The constraints are based on holonomic and nonholonomic behaviour of the rotating wheels, and the vehicles pose in a two dimensional Cartesian plane.The equations of motion for the mobile robot are deduced using Lagrangian d'Alembert's principle, with the implementation of Lagrangian multiplier for optimization.The behaviour of the dual motor configuration is deduced using a combination of Newton's law with Kirchhoff's law.

Configuration constraints and singularities
In the manoeuvrable classification of mobile robots [11], the vehicle is defined as being constrained to move in the vehicle's fixed heading angle.For the vehicle to change manoeuvre configuration, it needs to rotate about itself.Fig. 2. A typical two wheel mobile robot constrained under the maneuverable classification.
As the vehicle traverses the two dimensional plane, both left and right wheels follow a path that moves around the instantaneous centre of curvature at the same angle, which can be defined as  , and thus the angular velocity of the left and right wheel rotation can be deduced as follows: www.intechopen.com

52
where L is the distance between the centres of the two rotating wheels, and the parameter r icc is the distance between the mid-point of the rotating wheels and the instantaneous centre of curvature.Using the velocities equations ( 1) and ( 2) of the rotating left and rights wheels, L   and R   respectively, the instantaneous centre of curvature, r icc and the curvature angle,  can be derived as follows: Using equations ( 3) and ( 4), two singularities can be identified.When R L θθ   , the radius of instantaneous centre of curvature, r icc tends towards infinity and this is the condition when the mobile robot is moving in a straight line.When R L θθ    , the mobile robot is rotating about its own centre and the radius of instantaneous centre of curvature, r icc , is null.When the wheels on the mobile robot rotate, the quadrature shaft encoder returns a counter tick value; the rotation direction of the rotating wheel is given by positive or negative value returned by the encoder.Using the numbers of tick counts returned, the distance travelled by the rotating left and right wheel can be deduced in the following way: where ticks L and ticks R depicts the number of encoder pulses counted by left and right wheel encoders, respectively, since the last sampling, and D is defined as the diameter of the wheels.With resolution of the left and right shaft encoders res L and res R , respectively, it is possible to determine the distance travelled by the left and right rotating wheel, L d and R d .This calculation is shown in equations ( 5) and (6).
In the field of robotics, holonomicity [12] is demonstrated as the relationship between the controllable and total degrees of freedom of the mobile robot, as presented by the mobile robot configuration in Fig. 3.In this case, if the controllable degrees of freedom are equal to the total degrees of freedom, then the mobile robot is defined as holonomic.Otherwise, if the controllable degrees of freedom are less than the total degrees of freedom, it is nonholonomic.The manoeuvrable mobile robot has three degrees of freedom, which are its position in two axes and its orientation relative to a fixed heading angle.This individual holonomic constraint is based on the mobile robot's translation and rotation in the direction of the axis of symmetry and is represented as follows: where, c x and c y are Cartesian-based coordinates of the mobile robot's centre of mass, which is defined as c P , and  describes the heading angle of the mobile robot, which is www.intechopen.com The KCLBOT: A Framework of the Nonholonomic Mobile Robot Platform Using Double Compass Self-Localisation 53 referenced from the global x-axis.To conclude, Equation (7) presents the pose of the mobile robot.The mobile robot has two controllable degrees of freedom, which control the rotational velocity of the left and right wheel and, adversely -with changes in rotation -the heading angle of the mobile robot is affected; these constraints are stated as follows: where r θ  and l θ  are the angular displacements of the right and left mobile robot wheels, respectively, and where r describes the radius of the mobile robot's driving wheels.As such, the two-wheeled manoeuvrable mobile robot is a nonholonomic system.To conclude, Equation ( 8) and ( 9) describe the angular velocity of the mobile robot's left and right wheel.The mass of each of the mobile robot's wheels and rotating motors Table 1.The Mobile Robots Constants

Symbol
Based on the mobile robot drive configuration, presented in Fig. 4., Table 1 describes the structured constants required to provide the physical characteristics of the mobile robots movement.

Kinematics a dynamics modeling
Using the diagrammatic model expressed by Figures 2 and 3, and the structured constants listed in Table 1, the nonholonomic equations of motion with Lagrangian multiplier are derived using Lagrange -d'Alembert's principle [13] and are specified as follows: where M(q) describes an n n  dimensional inertia matrix, and where M(q)q  is represented as follows: www.intechopen.com The KCLBOT: A Framework of the Nonholonomic Mobile Robot Platform Using Double Compass Self-Localisation 55 Here, 22 zc w m I( I2 m ( dL ) 2 I )    and V(q,q)  describes an n dimensional velocity dependent force vector and is represented as follows: G(q) describes the gravitational force vector, which is null and is not taken into consideration, u describes a vector of r dimensions of actuator force/torque, E(q) describes an n r  dimensional matrix used to map the actuator space into a generalized coordinate space, and E(q)u is specified as follows: 00 00 00 10 01 Where the expression is in terms of coordinates (q,q)  where q  ℝ n is the position vector and q   ℝ n is the velocity vector.Where q is defined as  , the constraints equation can be defined as A(q)q 0   .Where, A(q) , the constraints matrix is expressed as follows: Where finally, TT B (q) A (q)  and n λ describes an m dimensional vector of Lagrangian multipliers and can be described as follows: The purpose of using the Lagrangian multipliers is to optimize the behaviour of the nonholonomic manoeuvrable mobile robot, by providing a strategy for finding the maximum or minimum of the equations' behaviour, subject to the defined constraints.

The dual-drive configuration
The manoeuvrable mobile robot is configured with two independent direct current (DC) servo motors, set up to be parallel to each other, with the ability for continuous rotation.This configuration allows the mobile robot to behave in a manoeuvrable configuration, is illustrated in Figure 5.The value definitions listed in Table 2 complement Fig. 5's representation of the mobile robot drive configuration.Using Newton's laws of motion and Kirchhoff's circuit laws [14], the motion of the motors can be related to the electrical behaviour of the circuit.
,, ,, , wl r l r l r l r l r , ,, , , , Equation ( 16) specifies the Newtonian derivation of motion of both motors and equation ( 17) specifies how the circuit behaves applying Kirchhoff's laws.Having derived equations ( 16) and ( 17), the next step is to relate the electrical circuit behaviour to the mechanical behaviour of rotating motors, and this is achieved using Laplace transforms and expressing equations ( 16) and ( 17) in terms of s as follows: Using equations ( 18) and ( 19), the open-loop transfer function of this configuration can be derived by eliminating l,r I (s) and relating the equation of motion to the circuit behaviour as follows: Here, equation (20) equates the rotational speed of the motors as the systems output and the voltage applied to the motors as the systems input.In summary, the constraints of the experimental vehicle have been derived in equations ( 7), (8), and (9), in both holonomic and nonholonomic forms.Using the system constraints, the behaviour of the nonholonomic manoeuvrable mobile robot is formed using the Lagranged'Alembert principle with Lagrangian multipliers to optimize the performance of the system, as specified in equations ( 10), ( 11), ( 12), ( 13), (14), and (15).Finally, using Newton's laws of motion and Kirchhoff's laws to evaluate circuits, a model is derived using Laplace transforms, to relate the behaviour of the systems motion to the electrical circuit.

Manoeuvrable mobile robot self-localization
The self-localization offers a different approach to solving for an object's position.The reason for the perpetuation of so many approaches is that no solution has yet offered an absolutely precise solution to position.In the introduction, three major approaches using the shaft encoder telemetry, using the visual odometry, and using the global position system were discussed, of which all three have inherent problems.This paper, hence, proposes an alternative approach, which is a hybrid model using the vehicle's dual shaft encoders and double compass configuration.

Implementing a dual-shaft encoder configuration
By using the quadrature shaft encoders that accumulate the distance travelled by the wheels, a form of position can be deduced by deriving the mobile robot's x , y Cartesian position and the manoeuvrable vehicle's orientation  , with respect to time.The derivation starts by defining and considering s (t) and () t  to be function of time, which represents the velocity and orientation of the mobile robot, respectively.The velocity and orientation are derived from differentiating the position form as follows: The change in orientation with respect to time is the angular velocity  , which was defined in equation ( 4) and can be specified as follows: When equation ( 23) is integrated, the mobile robot's angle orientation value (t)  with respect to time is achieved.The mobile robot's initial angle of orientation (0)  is written as 0  and is represented as follows: The velocity of the mobile robot is equal to the average speed of the two wheels and this can be incorporated into equations ( 21 By implementing equations ( 29), (30), and (31), we provide a solution to the relative position of a manoeuvrable mobile robot.This might offer a possible solution to the self-localization problem but is subject to accumulative drift of the position and orientation with no method of re-alignment.The accuracy of this method is subject to the sampling rate of the data accumulation, such that if small position or orientation changes are not recorded, then the position and orientation will be erroneous.

Numerical approach with a single compass configuration
Having derived a self-localization model using only the telemetry from the quadrature shaft encoders, the next step to evolve the model is to add a digital compass to input the manoeuvrable mobile robot's orientation.The ideal position on the vehicle for the digital compass would be at the midpoint between its centre of its mass and the intersection of the axis of symmetry with the mobile robot's driving wheel axis.In this case, the vehicle is configured such that there is no deviation between the two points, o P and c P .When the manoeuvrable mobile robot starts a forward or backward rotation configuration, it induces two independent instantaneous centres of curvatures from the left and right wheel.The maximum arcs of the curvature lines are depicted in Fig. 9, showing the steady state changes to the configuration as it rotates.Using a steady state manoeuvre, it is assumed that the actual distance travelled in a rotation manoeuvre does not equal the distance used to model the calculation for position and orientation.This assumption is depicted in Fig. 6., clearly showing the actual and assumed distance travelled.The difference does not cause any consequence to the calculation model as the difference cannot be measured in the resolution of the quadrature shaft encoders.
Having derived the complex notation of the vector loop equation in equation (33), the next step is to substitute the Euler equations to the complex notations as follows: (cos( ) sin( )) (cos( ) sin( )) (cos( ) sin( )) (cos( ) sin( )) 0 Equation ( 34) is separated into its corresponding real and imaginary parts, considering o 180  , as follows: where, L d , R d , and L are all known constants, and c specifies the new angle of orientation of the mobile robot.Having two equations ( 35) and (36), with two unknown angles L and R , when solving simultaneously for these two angles, it will return multiple independent values.This approach requires a large amount of computation to first find these angles and then deduce the relative position.

www.intechopen.com
The KCLBOT: A Framework of the Nonholonomic Mobile Robot Platform Using Double Compass Self-Localisation 61

Double compass configuration methodology
Having described the issues associated with using a single compass to solve for the position above, it is clear that it would be preferable to have a model that eliminated having simultaneous solutions and led to a single solution.This would ideally mean that the angles L and R are known constants, and to achieve this condition requires additional telemetry from the vehicle.A model with dual compasses is proposed to resolve the angles L and R , as shown in Fig. 8. Using the same approach as a single compass configuration, the double compass manoeuvre configuration is modelled using a six-bar mechanism as shown in Fig. 9. Using an identical approach as the single compass configuration, the vector loop equations remain the same, equations ( 35) and (36), with the difference being the ability to define the angles L and R .For this manoeuvre model, presented in Fig. 9., the configuration can be calculated as follows: where, L and R are the trigonometric angles used for calculating L and R for each pose of the mobile robot, based on the different configuration states of L d and R d .For the configuration state described by Fig. 13, where equations ( 39) and ( 40) solve the single compass solution to the position of the centrally positioned digital compass, indicated by c .Using the simultaneous solutions from comparing equations ( 35) and ( 36), and evaluating their difference to either equation (39) or (40), it is possible to derive the accuracy of the measurement.The simultaneous equation solution will be the best fit model for the hybrid model and any ambiguity can be considered resolution error or a factor of wheel slippage.

Mobile robot localization using visual odometry 4.1 Implementing visual odometry with an overhead camera
Using any standard camera at a resolution of 320 by 240 pixels, the system uses this device to capture images that are then used to compute the position and orientation of the manoeuvring mobile robot.The results presented in Table 3 show the statistical analyses of 362 samples recorded from the linear and sinusoidal manoeuvre experiments.Both left and right marker mean values are relatively low and, for more accuracy, because the data might be skewed, the median value is presented because it compensates for skewed data.The confidence intervals, which represent two standard deviations from the mean, equivalently present a low error rate.The histograms of the error distribution, shown in Fig. 13, present the distribution of error, which is the difference between the visual tracking position and double compass position.The Q-Q plot depicted in Fig. 14. presents the performance of the observed values against the expected values.This demonstrates that the errors are approximately normally distributed centrally, with anomalies at both tail ends.The boxplot presented in Fig. 15.visually shows the distance from 0 to the mean, which is 12.3mm and 11.3mm, for the right and left respectively.It also presents the interquartile range, which is 19.6mm and 18.3mm, for the right and left respectively, and minimum (1mm) and the maximum (20.6mm and 19.3mm) values.

Analysis using Kolmogorov-Smimov test
Using the statistical analysis presented in the previous section, a non-parametric test is required to validate the practical effectiveness of the double compass methodology.The ideal analysis test for a non-parametric independent one-sample set of data is the Kolmogorov-Smirnov test [16] for significance.The empirical distribution function n F for n independent and identically distributed random variables observations i X is defined as follows:  It should also be noted that the asymptotic power of this analysis test is 1.
For the experimental data presented in this paper, the null hypothesis is that the distribution of error is normal with a mean value of 11.78 and a standard deviation of 4.56.Based on significance level of 0.05, a significance of 0.663 is returned using the one-sample Kolmogorov-Smirnov test (44).The strength of the returned significance value allows us to retain the null hypothesis and say that the distribution of error is normal with a mean value of 11.78 and a standard deviation of 0.663.

Conclusions
The most fundamental part of implementing a successful maneuverable non-holonomic mobile robot is accurate self-localization telemetry.The biggest concern about using a selflocalization technique is the amount of computation it will require to complete the task.Ideally, having an analytical solution to position offers the benefit of a single solution, where the numeric solution has many possibilities and requires more time and computation to derive.In this paper, three different solutions have been presented for the position of the mobile robot.The first solution presented a method where only the quadrature shaft encoder telemetry is used to solve position.However, using an accumulative method leads to the drifting of the position and orientation result, caused by slippage of the wheels or even by the limiting resolution of the shaft encoders.The second solution presented the implementation of a hybrid model using both the quadrature shaft encoders and a single, centrally placed digital compass.Modeling the maneuver configuration of the mobile robot as a six-bar linkage mechanism and using vector loop equation method to analyze the mechanism for a numeric solution was derived.The final solution presented a model that implements a dual digital compass configuration to allow an analytical solution to the purposed six-bar linkage mechanism.An analytical model was derived to resolve the numeric nature of the single compass configuration, which will allow the swift resolution of position and orientation.

Fig. 3 .Fig. 4 .
Fig. 3.A Manoeuvrable Nonholonomic mobile robot inertia of the mobile robot without the driving wheels and the rotating servo motors about a vertical axis through o P w I The moment of inertia of each of the wheels and rotating servo motors about the wheel's axis m I The moment of inertia of each of the wheels and rotating servo motors about the diameter of the wheels c m The mass of the mobile robot without the driving wheels and the rotating servo motors w m

Fig. 5 .
Fig. 5. Dual Servo Motor Drive ConfigurationIt is assumed that both the left and right servo motors are identical.The torque, l,r τ , of the motor is related to the armature current, l,r i , by the constant factor t K and is described as l,r t l,r τ K. i  .The input voltage source is described as l,r V , which is used to drive the servo motors, where l,r R is internal resistance of the motor, l,r L is the internal inductance of the motor, and l,r e describes back electromagnetic field (EMF) of both the left and right electric servo motors.It is known that l,r l,r eK .θ   , where

Fig. 7 .
Fig. 7. Six-bar Linkage Manoeuvre Model with a Single Compass Configuration Using the vector loop technique [15] to analyse the kinematic position of the linkage model in Fig. 7., the vector loop equation is written as follows: 0 LL RL RR LR NO N N ON OO IIII   (32) Using the complex notation, equation (32) is written as follows: .. .. .. .. 0 co LR jj jj Lr d e Le d e Le        (33)

Fig. 8 .
Fig. 8. Double Compass Manoeuvre Configuration By introducing two compasses, which are placed directly above the rotating wheels, when a configuration change takes place, the difference is measured by L and R , which represent the change in orientation of the left and right mobile robot wheels, respectively.Using the same approach as a single compass configuration, the double compass manoeuvre configuration is modelled using a six-bar mechanism as shown in Fig.9.

Fig. 9 .
Fig. 9. Six-bar Linkage Manoeuvre Model with a Double Compass Configuration

I
 describes the indicator function, which is equal to

Table 2 .
Dual Servo Motor Configuration Value Definitions

Table 3 .
Statistical analysis of experimental data [17]escribes the Brownian bridge[17].If F is continuous, then under the null hypothesis n nD to the Kolmogorov distribution, which does not depend on F .The analysis test is constructed by using the critical values of the Kolmogorov distribution.The null hypothesis is rejected at level  if