You are on page 1of 57

International Masters Thesis

Path Following for a Car-like Mobile Robot based on Fuzzy-logic

Wenjie Lin Technology

Studies from the Department of Technology at rebro University 0 rebro 2012

Path Following for a Car-like Mobile Robot based on Fuzzy-logic

Studies from the Department of Technology at rebro University 0

Wenjie Lin

Path Following for a Car-like Mobile Robot based on Fuzzy-logic

Wenjie Lin, 2012


Title: Path Following for a Car-like Mobile Robot based on Fuzzy-logic
ISSN

1650-8580

Abstract
The aim of this Masters thesis is to investigate a path following approach for car-like robots using fuzzy logic. The approach takes into account the vehicle non-holonomic constraints. The thesis covers also the generation of a continuous path given a set of waypoints. The continuous path is modeled using uniform cubic splines. The method is evaluated using a simulated robot running in the 2D simulator Stage, part of the Player robot middleware.

Acknowledgements
I am sincerely thankful to my supervisor Abdelbaki Bouguerra for his helpful guidance during this work, I would also thank Amy Lout and Jonas Ullberg for their enthusiastic help.

iii

Contents
1 Introduction 1.1 Aim of the thesis . . . . . 1.2 Motivation . . . . . . . . 1.3 Work description . . . . . 1.3.1 Research objectives 1.3.2 Limitations . . . . 1.3.3 Development work 1.4 Organization . . . . . . . 1 1 1 2 2 2 3 3 5 5 6 7 8 8 9 10 10 15 15 16 17 19 21 21 22 22 23 23

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

2 Background and Related work 2.1 Car-like vehicles . . . . . . . . . . . . 2.2 Path generation and modeling . . . . 2.3 Path following . . . . . . . . . . . . 2.3.1 Traditional control . . . . . . 2.3.2 Neural prediction controllers 2.3.3 Reinforcement Learning . . . 2.3.4 Hybrid methods . . . . . . . 2.3.5 Fuzzy controllers . . . . . . .

3 Continuous path generation using B-splines 3.1 Description . . . . . . . . . . . . . . . 3.2 Path representation . . . . . . . . . . . 3.3 Spline modication . . . . . . . . . . . 3.4 Collision checking . . . . . . . . . . . 4 Path following using Fuzzy logic 4.1 Knowledge base of fuzzy controller 4.1.1 Fuzzication . . . . . . . . 4.1.2 Rule inference . . . . . . . . 4.1.3 Defuzzication . . . . . . . 4.2 Design of the fuzzy controller . . . . . . . . . . . . .

vi

CONTENTS

4.2.1 Position error control . . . . . . . . . . . . . . . . . . . . 4.2.2 Orientation error control . . . . . . . . . . . . . . . . . . 4.2.3 The structure of the fuzzy controller . . . . . . . . . . . 5 Experiments and evaluation 5.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Newton-Rhapson method . . . . . . . . . . . . . . . . . . . . . 5.3 Position errors and orientation errors analyze . . . . . . . . . . 6 Conclusions 6.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Further work . . . . . . . . . . . . . . . . . . . . . . . . . . . . References

24 28 28 31 31 34 36 41 41 41 43

Chapter 1

Introduction
1.1 Aim of the thesis

This thesis is the result of a masters degree project done at AASS Learning System lab. The aim of the current work is to develop control strategies to follow paths by car-like robots. The results of this work can, therefore, be implemented on vehicles destined to operate safely in dynamic environments.

1.2

Motivation

Car-like Mobile Robots have been widely researched with the goal to use them in application areas such as industry, military, mining, planet exploration, etc [2]. Such robot systems are considered as vehicles whose kinematic models approximate the mobility of a car. Path following is one of the essential motion tasks for robots where a robot tries to reach and follow a geometric path (represented as a set of oriented waypoints from a given initial conguration) without human intervention. The position and orientation of robots main body and the angle of the steering wheels form the conguration of the robot. To achieve this task in the classical approach, stationary obstacles and conguration of mobile robot are presented in a two-dimensional map, the waypoints are generated by a planner that has to take into account the geometrical structure and kinematics of the robot. The generated path contains waypoints with feasible curvature that avoid collision with obstacles. Modifying the path in advance is effective for robot system since it is much easier for the robots to achieve the motion autonomy in a priori known and well-modied environment, robots can move without receiving extra visual or range information. Besides, generating smooth paths can avoid non-smooth motions that may lead to slipping of the wheels and reduce the robots dead-reckoning ability. After obtaining the smooth path, the controller guides the vehicle to follow this path as closely as possible at execution time. The motivation for using a fuzzy controller to follow the path is its ability to handle complex systems in a manner inspired from human expertise.

CHAPTER 1. INTRODUCTION

1.3

Work description

Car-like robots have kinematics constraints, specically, they can not drive sideways or rotate in place. They may need to perform many manoeuvres to reach the target position. For example, they may need to stop and move backwards in order to take a sharp turn. Such constraints that limit the possible directions of motion at a point but can be undone by local maneuvering is called nonholonomic constraints [23]. "Since nonholonomic control systems are nonlinear systems in essence, linear control strategies cant be used directly to solve such kind of problems" [25].

1.3.1

Research objectives

This thesis is intended to do some introductory research in the area of path following by mobile vehicles. The chief goal is developing a softerware controller to achieve smooth and collision-free path following. The input of the system is a set of waypoints and a group of polygonal obstacles. The waypoints are determined by both position and orientation. To achieve our goal, we should rst generate a continuous path to connect all the given waypoints. Because car-like robots have steering constraints, the curvature of the generated path should be easy to modify. Cubic B-splines are adapted in this work, since the curvature can simply be obtained by a function that operates on the derivatives of the curve. Besides, cubic B-splines allow sectional adjustments by moving some of their control points. To achieve path following, the thesis presents a fuzzy controller that is tested in a 2D multiple-robot simulator. Even if the working environment is wellknown, sensor signal is uncertain and imprecise, the robot itself, is a system whose kinematics and dynamics are complex and non-linear, hence it is hard to nd an adaptive control system which is accurate and complete. Intelligent control theory [31] has been : the wheel steering angle.introduced to solve complex nonlinear behavior problems. Fuzzy controller, whose main component is a set of fuzzy rules encoding the reactive behaviors of the vehicle, is based on typical intelligent control. It is the control mechanism that straightforwardly handles the problems of behavior arbitration and command fusion. This permits an easy and incremental construction of the fuzzy rule base and also to develop and test the basic behaviors separately.

1.3.2

Limitations

Although the principle tasks were implemented and the expected goal has been achieved, still some issues are ignored and many capabilities can be improved in future work. Firstly, only stationary obstacles were considered. In this project, the working environment is assumed to be static. That is, the obstacles are stationary

1.4. ORGANIZATION

and neither added nor removed at execution time. Moving objects(obstacles) are not considered in this work. Thus the continuous path generation is limited to simple environments. Therefore, theres lack of capabilities for handling emergency cases. Secondly, only path-forward motion was considered. In the developed behaviorbased approach, the robot is assumed to follow the generated path by forward motion. i.e., the robot never moves backwards. Because the environment is completely known and stationary, only wheel turning e.g. right-low, right-high, left-low, left-high was used to tune the orientation and position errors. This approach makes the robot reach the target as soon as possible. But only forward and turning motions are not enough sometimes, as they can result in inefciencies and deadlock situations.

1.3.3

Development work

The implementation of the path following controller has been done in C++ programming language. The controller was implemented as a Player driver [6]. The testing and evaluation were carried using the 2D simulator Stage.

1.4

Organization

This thesis is organized as follows: Chapter 2 introduces background and related work. The chapter includes also a summary of different robot controllers with an emphasis on fuzzy logic. Chapter 3 presents an approach of building uniform cubic B-splines paths given for sets of oriented waypoints. Chapter 4 describes work to develop a fuzzy controller, several rules representing behaviors of an intelligent system have been established. The fuzzy controller is implemented as a Player driver. Chapter 5 reports experiments for testing and evaluating the developed controller. Chapter 6 summarizes the work developed in this thesis. It also discusses the obtained results and concludes with remarks regarding possible directions for future work.

Chapter 2

Background and Related work


This chapter gives some background of the material presented in this thesis. The rst part describes the features and constraints of car-like robots that make the path following more complex. The second part gives a summary overview of the existing methods on generating the continuous path by a given set of waypoints. A particular way of path generation is based on cubic B-splines. The spline function and modication will be explained in detail in the next chapter. The rest of chapter introduces the main types of existing controllers of path following category based on articial intelligence; such as neural prediction, reinforcement learning and hybrid methods, the advantage of fuzzy controller is emphasized and a brief introduction of fuzzy theory is given in the end of this chapter.

2.1

Car-like vehicles

A Car-like robot (see Figure 2.1) has similar locomotion structure to a car. It is a mobile vehicle whose two front wheels can be steered in parallel and the two rear wheels are parallel and xed. Car-like robots cant drive sideways since they are not able to rotate in place. Car-like robots can be considered as a three-dimensional system moving on the plane. Their motions are limited by non-slipping and curvature constraints. The minimal length paths for such robots are composed by a nite sequence of arcs of circles and straight-line segments. However, the curvatures of these two parts are discontinuous. If the robot wants to follow such a path, it has to stop at the points whose curvatures are discontinuous to adjust its angular velocity and linear velocity. Therefore, the key problem of related research is how to generate a path that has continuous curvature. In the gure 2.1, x and y are the coordinates of robots position in XY frame, is the vehicles orientation angle, is vehicles steering angle, R is the middle point of rear axle which represents the origin of the vehicle reference frame, l is the distance between wheel axles, v is the linear velocity of point R. The motion is expressed as in Equation (2.1) [7].
5

CHAPTER 2. BACKGROUND AND RELATED WORK

f
l

y
q

Figure 2.1: A Car-like robot. (For the robots we consider in this thesis, a given position and orientation is known as a 3-tuple conguration (x, y, ).)

= v cos x = v sin y = v tan l

(2.1)

2.2

Path generation and modeling

In this work, the input of the execution system is a set of discrete oriented waypoints. As shown in Figure 2.2, the oriented waypoint set includes four points, they are represented as {p1 , p2 , p3 , p4 }, each point is set into the map with both position coordinates and orientation that are represented by arrow line segments. A smooth path is a continuous curve that goes through each waypoint while avoiding collision with the obstacles in the meantime. To solve the path-planning problem, many prior works use different splines to generate smooth paths. John C and Gabriel E [3] have presented a method to generate an efcient and collision free path by bending and adjusting a B-spline. JungHung H and Arkin R [11] realized a supervisory control by generating a Bezier curve on-line trajectory. Shin D and Singh S [20] using clothoidal curves to build a trajectory for robot vehicles. Wagner P and Kotzian J [24] discussed path planning and tracking based on cubic hermite splines in real-time.

2.3. PATH FOLLOWING


Y
Obstacle

P2

P3
P4
P 1
Obstacle

Figure 2.2: A path contains a set of oriented waypoints {p1 , p2 , p3 , p4 }. Kale H and James F [9] implement an autonomous helicopter trajectory which is specied by a cubic B-spline. The trajectory is constructed after the user sets a series of control points in the plane, extra waypoints are interpolated between each pair of control points along the slope of the line connecting them. Catmull-Rom B-splines is used to generate the path which pass though the control points. This method allows user to control the helicopter by simply providing limited via points for the trajectory. In this thesis, the uniform cubic B-spines are used to construct the car-like robot smooth paths. The B-spline was created by Isaac Jacob Schoenberg and is stands for basis spline. They are used as a modeling tool to generate smooth curves using a minimal set of control points. More details about uniform cubicB splines are given in the next chapter.

2.3

Path following

Once the continuous path has been generated, the robot can start to track it from the start point to the end. Tracking is generally done with the aim of minimizing errors in position and orientation with respect to a reference point on the path. Path following system should also decide which way it should follow and whether the robot is lost or succeed the tracking action. Controller design is the core part of path following, previous works on building controller is summarized in the following main methods.

8
Input error

CHAPTER 2. BACKGROUND AND RELATED WORK


Output

PID

Mobile robot model

Figure 2.3: The structure of PID controller [15].

2.3.1

Traditional control

Traditional control systems are based on the concept of feedback. Value in negative feedback is calculated by an error as the difference between a measured process variable and a desired value. This kind of controller attempt to minimize the error by adjusting the process control inputs. A. De Luca and G. Oriolo described a very detailed way of using feedback control techniques to achieve car-like robot motion tasks [14]. Most of the applications belong to the form of closed-loop control. One of the developed closed-loop control is PID (Proportional-Integral-Differential) control. It requires three terms operating on the error signal to produce a control signal Figure 2.3. Since PID controller is easy to model, and it is robust, some researchers use it to build the path-tracking controller. In Julio E and Ismael As work [15], a PID based path tracking controller is successfully implemented in a synchro-drive mobile robot. But it is only adapted to a linear model with simple parameters. Another form of control is on-off control. System output is in the form of on or off with the movement provider. Servomechanism type control is widely used in robot path planning as well. Servomechanism is one kind of automatic device that use error-sensing negative feedback to control mechanical position, speed or other parameters [26]. For the position control, the inputs are compared with the actual positions that measured by sorts of transducer at the outputs. Any difference between the actual and desired value is amplied and converted to reduce the error and lead the system go to acceptable area.

2.3.2

Neural prediction controllers

Some prior works use a neural predictive controller for path tracking. The idea of predictive controller is computing a future control action that is based on output values predicted by a model [18]. Neural networks are an attractive way to model complex non-linear systems due to their inherent ability to approximate arbitrary continuous function. Gu D and Hu H [8] presents a modelbased predictive controller(MPC) based on multi-layer back-propagation neural network. As shown in Figure 2.4, the two basic value sources for network training are the desired states with control vector and the measured states. The path generation module produces the desired states, which are represented by Z (k) = [z (x) , z (y) , z ()], where k is the sample time. The control vec-

2.3. PATH FOLLOWING

Figure 2.4: The structure of back propagation network [8]. tor consist of two variables, the speed of robot v(k 1) and the steer angle (k 1). Both control vector and measured states formed the inputs of backpropagation neural network. The measured states are represented by the current states of robots, which obtained from the position estimation module as X (k 1) = [x (k 1) , y (k 1) , (k 1)]T . Then the network start the forwards training though the hidden layer functions, yielding outputs are represented as X (k) = [x (k) , y (k) , (k)]T . The errors E between Z(k) and X(k) are obtained and set as feedback signals, which are further decomposed into tangential and normal errors. If E is larger than a threshold, the back propagation happens, the weight of each hidden layer will be modied, and the iteration will continue until the errors are small and less than the given thresholds.

2.3.3

Reinforcement Learning

Some of the researchers use the reinforcement learning strategies to control robot behavior. Reinforcement learning (RL) is a supervised learning [22], which ne-tune the behavior by rewards or punishments. There are three main groups of methods of RL, they are dynamic programming (DP) methods, monte carlo (MC) methods and temporal difference (TD) methods. They are divided by two factors, models of the environment and bootstrapping. In RL system, Bootstrapping is used to update the estimate of state values and action values based on the estimate of later states. DP requires both bootstrapping and complete model of the environment. MC and TD methods do not require the model of environment, and TD methods need do bootstrap but MC methods do not. It is hard to use DP methods based on models of well-known environments, since the environment of the robot is the real world and it might change often. On the other hand, TD methods learn faster than MC methods during exploring

10

CHAPTER 2. BACKGROUND AND RELATED WORK

because of TD bootstrap allowed estimate to update other estimate, that is, TD methods update value after each time step, rather than after each episode. TD methods can know whether an explored choice is good or bad immediately and update the policy at each time step, they do not need to wait until the end of the episode to decide the policy is better or worse than previous one. So many researchers choose TD method to training the robot. Q learning is a popular method of TD methods. Lavi M and Sara K use Q learning to realize the path following of a koolio robot [30]. J.Baltes and Yuming manage to use a case-based function approximator to expand the RL to deal with path-tracking problem with a car-like robot [1]. Each case is represented as a collection of the state and the action. Some of the cases that similar to the inputs are found to generate a nearest neighbor set. Q learning is adapted to choose the next state and update the system inputs.

2.3.4

Hybrid methods

In some previous works, to achieve more complicated motions, more than one controller is used to cooperate with each other in order to achieve better results. Philippe G and Cyril N implement a hybrid controller that is made of escape lines controller and fuzzy one on Praxitele cars [5]. The escape lines controller built the free escape lines set and compare with the catch-up curve which is built by the path planner, then chose the nearest free escape line as the following path and send it to fuzzy controller. The fuzzy controller follows this path taking into account obstacles detected by sensors. By this hybrid controller, the priori given path by a path planner is adapted to the real and dynamic environment. Matthias H and Oliver W present a hybrid feedback controller that integrate a local obstacle-avoidance controller and a global path replanning controller for a mobile robot [10]. This controller enables collision-free tracking for preplanned path in both indoor and outdoor environments.

2.3.5

Fuzzy controllers

Fuzzy methods became one of the most popular ways to design controllers for nonlinear, time varying and uncertain system. Fuzzy logic controllers are cheaper to develop, they cover a wider range of operating conditions, and they are easier to understand in natural language terms [17]. As early as 1965, Zadeh of California University published a rst paper about fuzzy logic. Later he analyzed his ideas in a 1973 paper, which introduced the concept of linguistic variables [29]. In 1987, Japanese researcher Takeshi Yamakawa demonstrated fuzzy control method by an inverted pendulum experiment [27]. Since path-tracking problem for nonhonolomic robots involves both kinematics and dynamics difculties and the interaction between the vehicle and the terrain may be hard to model in general, many studies focus on adopting the fuzzy logic control method to solve the path-tracking problems. In most of the

2.3. PATH FOLLOWING

11

approaches, both position controller and orientation controller are developed to achieve the desired state [16, 4]. The idea of fuzzy logic is to explain thoughts and concepts by uncertain and imprecise linguistic variables [29]. It allowed all things associate with a certain degree. As Zadeh point out in 1965, Fuzzy logic is determined as a set of mathematical principles for knowledge representation based on degrees of membership rather than on crisp membership of classical binary logic. Crisp set theory uses only true or false value in its logic. This logic cannot accept the vague concepts and it therefor falls to answer the paradoxes. The fuzzy set theory not tread the proposition as only true or false way, but would be partly true or partly false to some degree of membership. For example, the crisp and fuzzy sets of hot weather could be different. In crisp set, 30 C is set to be a threshold value and the weathers above 30 C are hot and below are cold. In fuzzy set, the weather which is 29 C, no longer suddenly becomes a cold weather. Instead of the crisp function, a smooth transition is provided to the fuzzy set and weathers are gradually removed from the set of hot weather according to the decrease of their temperatures. Fuzzy sets In the fuzzy theory, a fuzzy set A of universe X is dened by a function A (x), which is called the membership function that has values between 0 and 1. For any element x of universe X, the membership function is read as the individual x belong to the set A is set to A (x). For example, fast (buss) = 0.5 is read as Buss belongs to the set of fast vehicle to the degree 0.5. The fuzzy sets can interact with each other. These interactions are called operations. There are four basic operations. The rst one is called complement. The complement of a set is an opposite of this set. For example, if we have the set of hot weather, its complement is the set of not hot weather. It can be expressed by A (x) = 1 A (x). Second, when one set is a subset of another one, we say a set contains the subset. For example, we say the set of hot weather contains the set of very hot weather. This containment operation is represented as, A B, where A (x) B (x) for all x X. The next one is an intersection operation. It is used to nd out the common part of elements which shared by two sets. For example, we have a hot weather set and a dry weather set, the intersection would be dry AND hot weather. In many cases, an element may belong to both sets with different memberships. Thus, the lower membership is used as the intersection value. A B (x) = min[A (x), B (x)] = A (x) B (x) In the opposite way, the union of two sets is to combine both set with every element that falls into either set. For example, the union of hot weather and dry weather would become the weathers are hot OR dry. It is represented as A B (x) = max[A (x), B (x)] = A (x) B (x).

12

CHAPTER 2. BACKGROUND AND RELATED WORK

Minimum/Maximum Algebraic product/sum Algebraic product/sum Drastic product/sum

T-norm ab ab 0 (a + b 1) if b = 1 a b if a = 1 0 a, b < 1

T-conorm ab a + b ab 1 (a + b) if b = 0 a b if a = 0 1 a, b > 0

Table 2.1: T-norm and T-conorm operators. In general, the intersection can be specied by T-norm (triangular norm) operators. A T-norm is a binary operator on [0, 1] which satisfying boundary, monotonicity ,commutativity and associativity. There is another class of operators, which refer to fuzzy union operation, called T-conorm. The justication of basic requirements for T-conorm is similar to that of the requirements for T-norm operators. Table 2.1shows the most frequently used T-norm and Tconorm operators. Assume that a and b are two membership functions between 0 and 1 [12].

Fuzzy rules Fuzzy rule-based system on fuzzy set theory is the most important tool to build the fuzzy controller. Fuzzy rule also known as fuzzy if-then rule, we can express as the following form: IF x is A THEN y is B. where A and B are linguistic values dened by fuzzy sets on universes of discourse X and Y. x and y are linguistic variables. This rule can be represented as A B. For example, we can set the following rules to a fuzzy controller of a robot: IF road is smooth, THEN speed is fast. IF road is rugged, THEN speed is slow. Assume that a fuzzy if-then rule be dened as a binary fuzzy relation R on the product space X. There are two ways to express the fuzzy rule A B. One of them is A coupled with B and the other one is A entails B. If A B is interpreted as A coupled with B, R = A B = A B = XY A (x) B (x)/(x, y), where is a T-norm operator [12]. If A B is interpreted as A entails B, then it can be written as four different formulas [12],

2.3. PATH FOLLOWING

13

* Material implication: R = A B = A B * Propositional calculus: R = A B = A (A B) * Extended propositional calculus: R = A B = (A B) B * Generalization of modus ponens:R (x, y) = sup{c|A (x)c c 1} Fuzzy inference After known the theory of fuzzy set and fuzzy rules, we should use the fuzzy inference to mapping the input and output of fuzzy controller. The most common fuzzy inference is called Mamdani-style inference, it was introduced by Ebrahim Mamdani in 1975 [19]. The Mamdani inference is performed by four steps, fuzzication of the input variables, rule evaluation, aggregation of the rules outputs and defuzzication. Fuzzicatin is to take the crisp inputs into fuzzy sets. Rule evaluation is to elicit and construct fuzzy rules. Usually there are multiple fuzzy rules of a fuzzy controller. Each rule generates a membership function of rule consequent. All the membership functions are aggregated into a single fuzzy set as the input of defuzzication process. The nal output should change back to a crisp value. There are several methods of defuzzicaiton. One of the popular one is to nd the centre of gravity(COG). In other word, it nds the point where its vertical line would cut the aggregate set into two equal pieces [12]. Assume that the aggregate output membership function is a discontinuous fuzzy set A. The formula is applied as in equation (2.2), COG =
b x=a A (x)x b x=a A (x)

B (x)

(2.2)

Where A is the aggregated output membership function; x is the sample of points of the fuzzy set A, on the interval ab. If we use singleton spikes as the membership function of the rule consequents, it is called Sugeno-style inference [21]. A singleton is a fuzzy set that contains only a single particular point on the universe of discourse. If the output of each fuzzy rule is constant, the inference becomes zero-order Sugeno. As shown in Figure 2.5, the difference between Sugeno and Mamdani methods is that rule consequents are singletons in Sugeno method.

14

CHAPTER 2. BACKGROUND AND RELATED WORK

0.4

0.2

AND
(PROD)

0.08

0.4

0.2

AND
(PROD)

0.08

Rule: If x is A1(0.2)And y is B1(0.4)

Then

z is C2(0.08)

Figure 2.5: The Mamdani rule evaluation(top) and The Sugeno rule evaluation(bottom).

Chapter 3

Continuous path generation using B-splines


A path generating method based on cubic B-splines is presented in this chapter to represent a path that connects all the waypoints that are given as the inputs of the control system. A stretch method is adapted to make the path avoid undesired and unnavigable situations, such as too large curvatures for robot steering or too narrow space for robot passages though obstacles.

3.1

Description

As shown in Figure 3.1, the inputs of the path generator include a set of waypoints and a group of obstacles. The waypoints have both position coordinates (x, y) and orientations. The obstacles are presented as a group of polygons on a two-dimensional map. The output of path generator is represented as a feasible path that connects all the waypoints. The path satises both smoothness and collision-free requirements.

P2

P2

P3
P4
P 1 P 1

P3
P4

Figure 3.1: The inputs and outputs of path generator. Left(input): Oriented waypoints and obstacles; Right (Output):A continuous path passing through the given waypoints.
15

16

CHAPTER 3. CONTINUOUS PATH GENERATION USING B-SPLINES

In our work, we only consider the forward motion of car-like robots that are not supposed to stop except at the nal goal. Considering kinematics constraints, there are two non-holonomic constraints, The robot can only move along the main axle which is perpendicular to the rear wheels of robot, and the front wheels steering angle is upper bounded. Therefore the required path should be smooth and its curvature should not be larger than the maximum one. On the other hand, collision-free paths are required, i.e., the robot has to follow the path without colliding with obstacles.

3.2

Path representation

We choose uniform cubic B-splines as the path generating function which is a typical smooth function and its curvature is easy to obtain. A cubic B-spline formulation in t is written as:
n1

St =
i=0

Pi Ni,3 (t)

1, n 1

(3.1)

Where Pi are the control points and Ni,3 is normalized B-spline basis function (blending function), t is a global parameter. n control points design n 3 segments and each segment is related to four control points [7], The blending function of uniform cubic B-spline can easily be precalculated and is equal for each segment in this case, it is given as in (3.2), Pi1 1 3 3 1 1 3 6 3 0 Pi (3.2) Si (t) = t3 t2 t 1 6 3 0 3 0 Pi+1 1 4 1 0 Pi+2 As shown in Figure 3.2, the spline generated by four control points with function (3.2) is not passing the control points but only imitate the overall shape of the control polygon connecting the control points. In order to make the spline go across all the oriented points in original waypoint set, we add two additional points for each control point, one in front of and one behind along the orientation, as the new control points. Once the path is generated, the curve checking occurs from the rst to the last point of the spline. The B-spline should satisfy the curvature constraint, in other words, the curvature for each point on spline which represented by ki is no larger than the maximum curvature kmax . ki kmax , kmax = 1 rmin = tan(max ) l (3.3)

Where rmin is the minimum turning radius, l is the wheelbase,max is the maximum steering angle. The curvature of points on generated B-spline is calculated by:

3.3. SPLINE MODIFICATION

17

Figure 3.2: A uniform cubic B-spline specied by four control points {p0 , p1 , p2 , p3 }.

ki =

|x y y x | (x 2 + y 2 ) 2
3

(3.4)

Where (x, y) is the coordinate of a point on the spline.

3.3

Spline modication

Curvature and collisions should be checked simultaneously. Once either the wrong curvature or obstacle collision is detected, the related segments should be modied. As mentioned before, each segment is related to four control points, the control points are formed by the original inputs and the additional points. The curve can be modied by increasing or decreasing the stretch weight of additional points. When one additional control point changes, all the related segments should be re-measured. As shown in Figure 3.2, the control polygon is specied by the set of control points.The curve tends to imitate the overall shape of the control polygon while it passes none of the control points. After adding two extra points along the orientation of each control point, as shown in Figure 3.3, the path is available to go across the original control points. The additional points is calculated by Equation (3.5),

18

CHAPTER 3. CONTINUOUS PATH GENERATION USING B-SPLINES

4.4

4.2

P1
4

P3 Wi=0.2

3.8

3.6

3.4

3.2

P0
3

P2

2.8

10

11

Figure 3.3: A cubic B-spline specied by the original and the additional control points. All points here were placed using wi = 0.2.

4.4

4.2

P1
4

P3 Wi=0.4

3.8

3.6

Wi=0.1

3.4

3.2

P0
3

P2

2.8

10

11

Figure 3.4: The shape of the curve changes by stretching the additional points, i.e.,by changing the values of the weights wi .

3.4. COLLISION CHECKING

19

P0

R2

P2

P1

R0

P3

R3

P4

R1

Figure 3.5: Collision-free detecting of robot and obstacle.

a1 = pi + wi a2 = pi wi

(3.5)

Where a1 and a2 are two additional points of pi , is the orientation of pi . wi is the stretch weight and is a unit vector, such that = (cos , sin )T , in Figure 3.3 wi is 0.2. As shown Figure 3.4, one of the curves is specied by adding two additional points for each control points by decrease wi to 0.1, while the other curve is obtained by increasing the wi to 0.4. It is obvious to see that wi pulling the curve towards control points as it decreases or moving the curve away as it increases. In my work, the maximum steering angle is set to be pi/4, the maximum curvature is calculated using equation (3.3). During the path modication, the path turns smoother as long as the additional points move further from original points. If the distance between the additional point and original point exceed the maximum regulated distance we set, the modication process will end and indicate that there is no available path generated.

3.4

Collision checking

The continuous path, once generated, have to be checked for collision avoidance. To detect whether a path is collision-free, we rst load robot to current position, as shown in Figure 3.5, the location of robot is represented by O which is the middle of the robots rear axle. In two-dimensional map, we use a simple math method to store the robot and the obstacle as two arrays of triangles {(R0 R1 R2 ), (R1 R2 R3 )} and {(P0 P1 P2 ), (P1 P2 P3 ), (P3 P4 P1 )}, here we use proximity query package (PQP) to check whether pairs of triangles from different arrays are overlapping [13]. If a collision is detected, the segment of collision area would be selected and the path modication starts with the related control points.

Chapter 4

Path following using Fuzzy logic


In this chapter, we describe the fuzzy rule-based controller that was developed, as part of the work of this thesis, to control a mobile robot to follow a continuous path.

4.1

Knowledge base of fuzzy controller

In the fuzzy controller, each fuzzy variable is associated with a fuzzy set that is characterized by its membership function. We use a piecewise function to generate variety of membership functions. The function called RampUp is implemented as, if x < xl 0 xxl if xl < x < xr RampUp(xl , xr , x) = (4.1) xr xl 1 else Where xl is the left breakpoint and xr is the right Down function is just reection. 1 xr x RampDown(xl , xr , x) = xr xl 0 breakpoint, then the Rampif x < xl if xl < x < xr else

(4.2)

The Trapazoid function is implemented as a combination of the RampUp and RampDown function, operation is dened as minimum function which belong to T-norm operators. T rapazoid(xcen , xd , xslope , x) = RampUp(xcen xd xsolpe , xcen xd , x) RampDown(xcen + xd , xsolpe + xcen + xd , x) (4.3)
21

22

CHAPTER 4. PATH FOLLOWING USING FUZZY LOGIC

RampDown

Trapazoid

RampUp

0.5

Slow

Medium

Fast

1 .

Speed (m/s)

Figure 4.1: The RampDown, RampUp and Trapazoid functions. The fuzzy rules follow the IF condition THEN action type. The condition part is a set of input variables which related to the membership functions formed by the types shown in Figure 4.1. The action part is the output which represented as singleton spike. A singleton is a fuzzy set with a membership function that is unity at a single particular point on the universe of discourse and zero everywhere else. This type is called sugeno-style and it was rst introduced by Michio Sugeno, in 1985 [21]. The sugeno method is computationally effective and works well with optimization and adaptive techniques, which makes it very attractive in control problems, particularly for dynamic nonlinear systems. The fuzzy controller implement by three steps, fuzzication, rule inference, defuzzication.

4.1.1

Fuzzication

Fuzzication involves taking the crisp inputs to determine the degree to which these inputs belong to each of the appropriate fuzzy sets. For example, in Figure 4.1, the three fuzzy set Slow, Medium, Fast associated to the fuzzy variable speed, fuzzication of a 1m/s value yields (Slow, 0.5), (Fast, 0.5).

4.1.2

Rule inference

This step is to take the fuzzied inputs, and apply them to the antecedents of the fuzzy rules. The activation degree of each antecedent is calculated. If the given fuzzy rule has multiple antecedents, the fuzzy operator (AND or OR) is used to obtain the single value of the antecedent evaluation. To evaluate the conjunction or disjunction of the rule antecedents, we use the min and max function

4.2. DESIGN OF THE FUZZY CONTROLLER


Medium And
1 0.82

23
Medium Then
1 0.82

Close

If

1 0.9

0
3m

Distance

5m/s

Speed

-2m/s

Braking

Figure 4.2: Sugeno-style fuzzy rule inference. respectively. The output for each rule in zero-order sugeno-style inference is constant. As Figure 4.2 shows, applying sugeno-style inference to the fuzzy rule If (Distance is Close) and (Speed is Medium) then Braking is Medium yields the part of the fuzzy set associated with Braking that represented as singleton.

4.1.3

Defuzzication

The nal step is transforming the fuzzy sets into a crisp value. The input for the defuzzication is the aggregate output fuzzy set. In this model aggregation operation simply includes all the singletons. Suppose there are n rules, the output crisp value is calculated by obtaining weighted average (WA) of singletons for all rules [12]. n 1 (xi )xi (4.4) WA = i= n i=1 ( xi ) Where (xi ) is the weighing coefcient that attached to the consequence constant value for rule i.

4.2

Design of the fuzzy controller

The path can be treated as a series of ordered oriented points. Path following motion is good or bad depend on how precise the robot passes by the sequence of points. Assume the current state of robot is (xc , yc , c ) which is called conguration vector, the desired one is (xi , yi , i ) which is called orientation goal. The task is achieved by two set of rules whose respective purposes are to minimize both the error in position which represented by Ep and the error in orientation which represented by Efo . |Ep | =
2 ( yi y2 c ) + (xi xc )

(4.5)

Efo = i c To achieve the goal of our task, one signicant step is how to choose the subgoal points and send them to the fuzzy controller to update the position that the

24

CHAPTER 4. PATH FOLLOWING USING FUZZY LOGIC

robot should arrive to next. Path is generated by smooth-path generator. The algorithm was described in chapter 3. The generated path has several segments which contain a number of oriented points. A constant threshold value is used when choosing the next position the robot should go to. If the distance between the current position and a point on the spline is smaller than the threshold value the point is ignored and a point further away on the spline is used. Otherwise, the point will be selected as a sub-goal and sent to controller.

4.2.1

Position error control

As for the fuzzy rules, they were obtained by a straightforward encoding of common sense human experience and knowledge about car driving. When the robot is far away from sub-goal point, the principle assignment is moving the robot to desired place as fast as we can. In this case, only the position modication rules are considered. When the robot gets close to sub-goal, the speed should slow down and the orientation rules are applied by the fuzzy controller system simultaneously. It helps robot to match the orientation goal under the nonholonomic constraints. There are several parameters of the car-like robot to take into account (Figure 4.3.): (xc , yc ) is the coordinate of point R which is located in the middle of the rear wheels. c is the heading of the vehicle, i.e., the angle between the main axis Hc of vehicle and the x axis. indicates the steering angle of the front wheels. V represents the velocity of the reference point R measured along the main axis of the vehicle. In the non-holonomic system the angular velocity is dictated by the robots forward velocity. In this thesis, we constrained the maximum angular velocity to (k Velc ) where Velc represents current linear speed and k represents a coefcient reect to the curvature of current path. Input variables * Eo : an input variable that indicates the angle between the robots main axis Hc and the vector Ep . It is associated with a ve term set of fuzzy sets dened over the [, ] range that indicates the relative heading toward the desired position G point: FrontLeft(FL), SideLeft(SL), Ahead(A), FrontRight(FR), SideRight(SR). * |Ep |: an input variable that indicates the distance between robot current position and desired position. It is associated with a two term set of fuzzy sets dened over the [0, |EPMax |] range: Close, Far. The orientation error Eo is calculated by a two-argument function atan2, Eo = arctan 2(y1 , x1 ) (4.6)

4.2. DESIGN OF THE FUZZY CONTROLLER

25

Y Ch
proj H c E P
x1

Hc

Eo R
Ep

Hg

projCh EP
y1

q X

Figure 4.3: The position error control.(Ep represents the vector from the origin of the robot, R, to the sub-goal G on the generated path; Eo is the angle between the robots main axis Hc and Ep ; indicates the wheel steering coefcient; projHc Ep is the projection of Ep onto vector Hc and projCh Ep is the projection of Ep onto the vector Ch )

26

CHAPTER 4. PATH FOLLOWING USING FUZZY LOGIC

where y1 = sgn(Ep Ch )|projCh Ep | and x1 = sgn(Ep Hc )|projHc Ep |, arctan 2 function is available to distinguish angles come from four quadrants. The projection of Ep onto Hc is given by, projHc Ep = Hc Ep Hc |Hc |2 (4.7)

where projHc Ep is the heading vector of robot, Hc Ep is the dot product, and the length of the projection is, |projHc Ep | = |Hc Ep | |Hc | (4.8)

The projection of Ep onto Ch that is perpendicular to Hc is given by projCh Ep . It indicates the sideways vector of the robot. Output variables * : an output variable which represents the wheel steering coefcient. It is associated with a ve term set of fuzzy sets dened over the [1, 1] range: LeftLow(LL), LeftHigh(LH), Zero(Z), RightLow(RL), RightHigh(RH). * V : an output variable which represents the velocity coefcient of the reference point R measured along Hc . It is associated with a two term set of fuzzy sets dened over the [0, 1] range: Slow , Fast. The fuzzy reasoning rules used for modifying position error are presented as: * IF Eo is FL THEN is LL. * IF Eo is SL THEN is LH. * IF Eo is A THEN is Z. * IF Eo is FR THEN is RL. * IF Eo is SR THEN is RH. * IF |Ep | is Close THEN V is Slow. * IF |Ep | is Far THEN V is Fast.

4.2. DESIGN OF THE FUZZY CONTROLLER

27

Y Ch
x2

Hc

E fo

qi R G
y2

qc X

Figure 4.4: The orientation error parameters.(Efo is the angle between sub-goal orientation i and robots main axis Hc ; c is the heading of the vehicle; Efo is calculated by i c )

28

CHAPTER 4. PATH FOLLOWING USING FUZZY LOGIC

4.2.2

Orientation error control

Input variable * Efo : an input variable that reprsents the angle between sub-goal orientation i and robots main axis Hc . It is associated with an ve term set of fuzzy sets dened over the [, ] range that indicate the relative heading toward the desired orientation: FrontLeft(FL), SideLeft(SL), Ahead(A), FrontRight(FR), SideRight(SR). Output variable * : an output variable which represents wheel steering coefcient. The fuzzy reasoning rules used for decreasing orientation error are presented as follows: * IF Efo is FL and |Ep | is Close THEN is LL. * IF Efo is SL and |Ep | is Close THEN is LH. * IF Efo is A and |Ep | is Close THEN is Z. * IF Efo is FR and |Ep | is Close THEN is RL. * IF Efo is SR and |Ep | is Close THEN is RH. The membership functions of input and output variables are shown in gure 4.5.

4.2.3

The structure of the fuzzy controller

The fuzzy controller structure is illustrated in Figure 4.6. It includes two groups of rules which used to modify position (PM) and orientation (OM) in reasoning system.

4.2. DESIGN OF THE FUZZY CONTROLLER

29

m Eo / E fo
SR

m EP
SL C los e Far

FR

FL

E
- 60 -3 0 -1 5 -1 0 0 10 15 (A) 30 60

fo

/ E o ( )
0 2 4

(m )

mf
RH RL Z LL LH

mV
Slow
Fa st

-1 .0

- 0.5

0. 5

1 .0

f (rad )

0. 5

1.0

V (m/ s)

Figure 4.5: The input and output membership functions used in the path following controller.

30

CHAPTER 4. PATH FOLLOWING USING FUZZY LOGIC

Fuzzy controller

Ep

PM
V

Eo

f1
f
OM

f2

E fo

Figure 4.6: The structure of the fuzzy controllers.

Chapter 5

Experiments and evaluation


We develop a Player driver to implement our controller. Player is a network sever for robot control. It contains various drivers, which have different functions such as path panning and localization for robots. Drivers can send and receive information from Player by interfaces. Interfaces specify the Player syntax and semantics of how the drivers and Player interact. In this Player, path following driver is applied to control a simulated robot to follow continuous path. The driver supports the position2D interface in order to read new positions for the robots motors. The driver is written in C++ language and running in Ubuntu8.04. The structure of the Player is shown in Figure 5.1. The most important part of path following driver is the fuzzy controller, it directly communicates with Stage to control the similated robot. We used the 2D robot simulator Stage(version3.0.1) to simulate our robot. Stage is a plugin for Player. It receives instructions from Player and moves a simulated robot in a simulated world. In this test, simple positioning is implemented on a car-like kinematic model. The size of robot is [0.44, 0.33], and the size of the built map is [30, 30] in meters.

5.1

Implementation

As mentioned before in chapter 4.1, a constant threshold value is used to choose the sub-goal points on the generated path. For a car-like robot, the minimum radius of turning is given by equation (5.1), and all the points inside the circle, that passes by the (x, y) coordinates of the robot and whose radius is rmin , are not accessible directly using just one combination of translation and rotation velocities. Therefore, to choose a goal point on the path, we x the threshold of distance between the robot and that point to be at least rmin . rmin = l tan(max ) (5.1)

31

32

CHAPTER 5. EXPERIMENTS AND EVALUATION

Player Path following Driver


Position2d Fuzzy Controller Position2d Smooth-path generator

Stage simulated robot

Figure 5.1: The connection between the Player driver and the simulated robot. Setting different thresholds leads to different results. As Figure 5.2 shows, the solid track is not far from the original path compares with the dotted one. The reason is when we set the threshold to zero,the robot always goes to the closest point on the path. If the robot failed to follow the path, the robot always tries to go to the closest point once again, and the steering angle of the robot would probably be perpendicular to the sub-goal point and the orientation of robot couldnt be tuned in time. If we use a threshold of 0.5m to set the tolerance of the sub-goal point a little bit larger than rmin , the robot will always go forward towards the subgoal point. Therefore, less orientation error would happen and the robot moves more stable. For that reason, we choose to set 0.5m as the threshold value in our simulated experiments. In Figure 5.3, we test the path following controller with different paths under various speeds. The rst path is generated by ve oriented waypoints, the conguration of the robot on the waypoints are (4.0, 3.0, 0), (6.0, 4.0, 0), (8.0, 3.0, 0), (10.0, 4.0, ), (12.0, 3.0, 0). The robot should start moving from the rst waypoint and follow the generated path as close as possible. In the circle path, the original waypoints are (4.0, 4.0, pi/2), (4.6, 5.4, pi/4), (6.0, 6.0, 0), (7.4, 5.4, pi/4), (8.0, 4.0, pi/2), (7.4, 2.6, 3pi/4), (6.0, 2.0, pi), (4.6, 2.6, 3pi/4). The robot motion should begin and stop at the rst waypoint. In the "eight" path, the robot moves from the center of the "eight" path which is located at the point (4.0, 6.0, pi/4), and the motion stops when arriving at the start point. The dash-dot line shows the original path; the solid lines show the tri-

5.1. IMPLEMENTATION

33

4.4 4.2 4 3.8 3.6 3.4 3.2 3 2.8 2.6 original path threshold=0 threshold=0.5 4 5 6 7 8 9 10 11 12 13

Figure 5.2: The results under different thresholds.The dash-dot line represents the path generated by the given waypoints. The solid line is the track followed by the simulated robot by setting distance threshold to 0.5m while the dotted line is obtained by setting the threshold to 0m

34

CHAPTER 5. EXPERIMENTS AND EVALUATION

als of path following motions with different speeds, they are 1.0m/s, 2.0m/s, 3.0m/s respectively.

5.2

Newton-Rhapson method

For evaluating the results of the proposed path following controller, we analyze the performance of the controller by looking at the errors in position and orientation of the robot with respect to the original path. This means that we have to nd for each point of the resulting path (the trace of the position of the robot) the reference point on the original path. In this thesis, we try to compare the position of the robot with the closest point on the original path. For this matter, we follow two steps: First, we get a rough guess of the closest point. Second, we rene the guess with the Newton- Rhapson method applied to a function that gives the distance from the robot to a point evaluated on the path. Newton-Rhapson is a method for nding continuous better approximations to the zeroes of a real-valued function [28]. The idea of the method is to use one initial guess which is close to the true root, get the tangent line of this point and calculate the x-intercept. Then this x-intercept is treated as a better approximation of the function root and the method is iterated until the accurate value is found. The iteration function is xn+1 = xn f(xn ) f (xn ) (5.2)

Here we use Newton-Rhapson to solve the minimization problem. In other words, we are searching for the minimum of a point to spline distance function. When the derivative is zero, the function is at minimum or maximum value. The iteration becomes, Gn+1 = Gn f (Gn ) f (Gn ) (5.3)

In my work, the initial guess is determined by detecting the distance between the current position and each point on the original path (the quantity of the points on the original path depend on the B-spline parameter increment). The distance function in this case is given by Gt = (xi (t) xr )2 + (yi (t) yr )2 , 0 t 1, 0 i m (5.4)

where i is the index of the spline segments, (xi , yi ) are the points of the spline in segment i, (xr , yr ) is the poistion of the robot. We take the point with shortest distance as the initial guess. Since it is hard to calculate the derivative of the distance function, we approximate the derivative by calculating the average value of two slopes of nearby points. In Figure 5.4, we sample two additional points, one before and one after the initial point G0 along the spline as G0 + and G0 , the distance from each of the

5.2. NEWTON-RHAPSON METHOD


12 10 6 8 6 4 2 2 4 6 8 10 12 4 2 2 4 6 8

35

10 8 6 4 2 Original path v=1.0m/s 2 4 6 8 10 8 6 8 6 4 2 2 4 6 8 10 12 4 2 2 4 6 8

(a) Path following by setting speed to 1.0m/s


12 10

10 8 6 4 2 Original path v=2.0m/s 2 4 6 8 10


8

(b) Path following by setting speed to 2.0m/s


12 10 6 8 6 4 2 4

2 2 4 6 8 10 12 2 4 6 8

10

4 Original path v=3.0m/s 2 2 4 6 8 10

(c) Path following by setting speed to 3.0m/s

36

CHAPTER 5. EXPERIMENTS AND EVALUATION

f (G )

f (G0 - a )
G0 + a

f (G0 )
f (G0 + a )

G0 - a

G0

G
X

Figure 5.4: Using Newton-Rhapson method to nd the closest point on the path to the robot.(f(Gn ) is a function that represents the distances between the robot and the points on the path;G0 is a rough guess of the closest point; G0 + and G0 are two nearby points of G0 where is a small vector.) three points to current position is easy to calculate. Then we calculate f (G0 ) by, f1 (G0 ) = f(G0 + ) f(G0 ) || f(G0 ) f(G0 ) f2 (G0 ) = || f (G0 ) + f2 (G0 ) f (G0 ) = 1 2

(5.5)

we calculate f (G0 ) by, f (G0 ) = f1 (G0 ) f2 (G0 ) || (5.6)

Finally, we implement Newton-Rhapson method to get the next initial guess. We run this process 10 times to approach the acceptable point.

5.3

Position errors and orientation errors analyze

Figure 5.5 shows the position errors for the different paths. The errors periodically oscillate up and down around an average value. The sharper the curvature is, the bigger the position error is. From the three gures above, we can see that under different speeds, the cycles and trends of error variation are similar. The

5.3. POSITION ERRORS AND ORIENTATION ERRORS ANALYZE


Position errors of wave path following 0.35 v=1.0m/s v=2.0m/s v=3.0m/s

37

0.3

0.25

0.2 y(m) 0.15 0.1 0.05 0 0

10 t(s)

12

14

16

18

20

(a)
Position errors of circle path following 0.09 0.08 0.07 0.06 0.05 0.04 0.03 0.02 0.01 0 v=1.0m/s v=2.0m/s v=3.0m/s

y(m)

10

15 t(s)

20

25

30

(b)
Position errors of "eight" path following 0.25 v=1.0m/s v=2.0m/s v=3.0m/s 0.2

0.15 y(m) 0.1 0.05 0 0

10

15

20 t(s)

25

30

35

40

45

(c)

Figure 5.5: The position errors under different speeds for three types of paths, where the x axis represents time in seconts.

38

CHAPTER 5. EXPERIMENTS AND EVALUATION

Errors Speed Wave path Circle path "Eight" path

1.0m/s 0.1058 0.0441 0.0609

Avg(Ep (m)) 2.0m/s 3.0m/s 0.1132 0.1320 0.0547 0.0630 0.0703 0.0827

Avg(Eo (rad)) 1.0m/s 2.0m/s 3.0m/s 0.3529 0.3587 0.3695 0.2427 0.2302 0.2179 0.2516 0.2386 0.2233

Table 5.1: The average position and orientation errors of the different paths under different speeds. maximum error of three paths is lower than 0.26m. It proves that the robot follows the paths in good way. Figure 5.6 shows the orientation errors between the robot and the closest point on the path for each sampling time increment(x axis indicates the change of the time). In the Figure 5.6a, the dotted line represents the orientation errors that uctuates from 0 to 1 (rad) during 19.5 seconds with speed 1.0m/s, the solid line shows the orientation errors oscillated between 0 and 0.9 (rad) during 10.0 seconds with speed 2.0m/s, The uctuation of the dashed line is below 0.7 radian during 7.0 seconds. From Figure 5.6b and 5.6c, we can nd that the range of the three different types of lines are even more closer to each other comparing with Figure 5.6a. The orientation variation is close to each other under different speeds. These oscillations seem to happen when the spline curvature is big. Since both position and orientation errors are oscillating in a reasonable area, the path following driver is working fairly well. It is clear that these results can be improved by tuning the fuzzy rules, and maybe adding more rules to have a ner coverage of the errors in distance and orientation. The table below indicates the average position and orientation errors under different speeds for three types of path.

5.3. POSITION ERRORS AND ORIENTATION ERRORS ANALYZE


Orientation errors of wave path following 1 0.9 0.8 0.7 0.6 y(rad) 0.5 0.4 0.3 0.2 0.1 0 v=1.0m/s v=2.0m/s v=3.0m/s

39

10 t(s)

12

14

16

18

20

(a)
Orientation errors of circle path following 0.4

0.35

0.3

0.25 y(rad) 0.2 0.15 v=1.0m/s v=2.0m/s v=3.0m/s 0 5 10 15 t(s) 20 25 30 0.1 0.05

(b)
Orientation errors of "eight" path following 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 v=1.0m/s v=2.0m/s v=3.0m/s

y(rad)

10

15

20 t(s)

25

30

35

40

45

(c)

Figure 5.6: The orientation errors under different speeds for three types of paths, where the x axis represents time in seconts.

Chapter 6

Conclusions
6.1 Summary

This thesis has presented an implementation of a fuzzy-logic-based controller for following continuous paths. The controller was implemented a simulated robot through the robot middle ware "Player". The result of the simulation experiments show that with a minimal set of rules, it is possible to get an acceptable path following behavior. The thesis has also presented a way of generating continuous path from a set of oriented waypoints. Such paths were generated using uniform cubic Bsplines, which are a exible tool used for geometric modeling. The generation of the B-splines takes into account possible collisions with nearby obstacles as well as the kinematic constraints of the vehicle that is intended to follow the continuous path. Additional control points are added along the orientation of control points, by moving these additional points away or towards the waypoints, the curvature of spline is modied to fulll the steering constrain of car-like robot and to avoid the static obstacles.

6.2

Further work

The work presented in this thesis can be considered as an initial step towards realizing a robust path-following controller for car-like robots. Therefore, these are many possible other steps that can be taken to improve our controller. Firstly, the controller can be extended to react to moving and static objects by adding more behaviors for that matter. Secondly, one can improve the controller by considering more rules that cover different situations of how the robot pose is with respect to the original path. Thirdly, in the thesis we only did experiments to follow paths, a future work can be testing and tuning the performance of the controller to follow trajectories at different speeds. We expect that the controller to be modied by

41

42

CHAPTER 6. CONCLUSIONS

adding more output sets to be able to cope with the change in the reference point of the trajectory. Another interesting possible future work would be to port and test the controller on a real mobile robot.

References
[1] Jacky Baltes and Yuming Lin. Path-tracking control of non-holonomic car-like robot with reinforcement learning. In Working notes of the IJCAI99 Third International Workshop on Robocup, pages 162173. IJCAI Press, 2000. (Cited on page 10.) [2] Abdelbaki Bouguerra, Henrik Andreasson, Achim J. Lilienthal, Bjrn strand, and Thorsteinn Rgnvaldsson. Malta: A system of multiple autonomous trucks for load transportation. In Proceedings of the European Conference on Mobile Robots (ECMR), pages 9196, 2009. (Cited on page 1.) [3] J. Connors and G. H. Elkaim. Manipulating b-spline based paths for obstacle avoidance in autonomous ground vehicles. In ION National Technical Meeting, ION NTM 2007, San Diego, CA, USA, 2007. (Cited on page 6.) [4] Th. Fraichard and Ph. Garnier. Fuzzy control to drive car-like vehicles. Robotics and Autonomous Systems, 34:122, 1997. (Cited on page 11.) [5] Philippe Garnier, Cyril Novales, and Christian Laugier. An hybrid motion controller for a real car-like robot evolving in a multi-vehicle environment. Grenoble Cedex, pages 2526, 1995. (Cited on page 10.) [6] Brian P. Gerkey, Richard T. Vaughan, and Andrew Howard. The player/stage project: Tools for multi-robot and distributed sensor systems. In In Proceedings of the 11th International Conference on Advanced Robotics, pages 317323, 2003. (Cited on page 3.) [7] F. Gmez-Bravo, F. Cuesta, A. Ollero, and A. Viguria. Continuous curvature path generation based on b-spline curves for parking manoeuvres. Robot. Auton. Syst., 56(4):360372, April 2008. (Cited on pages 5 and 16.)

43

44

REFERENCES

[8] Dongbing Gu and Huosheng Hu. Neural predictive control for a carlike mobile robot. International Journal of Robotics and Autonomous Systems, 39:7386, 2002. (Cited on pages 8 and 9.) [9] Kale Harbick, James F. Montgomery, and Gaurav S. Sukhatme. Planar spline trajectory following for an autonomous helicopter. In in IEEE International Symposium on Computational Intelligence in Robotics and Automation, pages 237242, 2001. (Cited on page 7.) [10] Matthias Hentschel, Oliver Wulf, and Bernardo Wagner. A hybrid feedback controller for car-like robots - combining reactive obstacle avoidance and global replanning. Integr. Comput.-Aided Eng., 14(1):314, January 2007. (Cited on page 10.) [11] J. H. Hwang, R. C. Arkin, and D. S. Kwon. Mobile robots at your ngertip: Bezier curve on-line trajectory generation for supervisory control. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, 2003. (Cited on page 6.) [12] Jyh-Shing Roger Jang and Chuen-Tsai Sun. Neuro-fuzzy and soft computing: a computational approach to learning and machine intelligence. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1997. (Cited on pages 12, 13, and 23.) [13] Eric Larsen, Stefan Gottschalk, Ming C. Lin, and Dinesh Manocha. Fast proximity queries with swept sphere volumes. Technical report, 1999. (Cited on page 19.) [14] Alessandro De Luca, Giuseppe Oriolo, Alessandro De, and Claude Samson. Feedback control of a nonholonomic car-like robot, 1997. (Cited on page 8.) [15] Julio E. Normey-Rico, Ismael Alcal, Juan Gmez-Ortega, and Eduardo F. Camacho". Mobile robot path tracking using a robust pid controller. Control Engineering Practice, 9(11):1209 1214, 2001. (Cited on page 8.) [16] Fares Boudjema Noureddine Ouadah, Lamine Ourak. Car-like mobile robot oriented positioning by fuzzy controllers. volume 5, 2008. (Cited on page 11.) [17] P Venkata Subba Reddy. Fuzzy modeling and natural language processing for panini s sanskrit grammar. Journal of Computer Science and Engineering, 1(1):99101, 2010. (Cited on page 10.) [18] Eric Ronco and Peter J. Gawthrop. Neural networks for modelling and control. Technical report, 1997. (Cited on page 8.)

REFERENCES

45

[19] M. Gloria Snchez-Torrubia, Carmen Torres-Blanc, and Sanjay Krishnankutty. Mamdanis fuzzy inference emathteacher: a tutorial for active learning. W. Trans. on Comp., 7(5):363374, May 2008. (Cited on page 13.) [20] Dong Hun Shin and Sanjiv Singh. Path generation for robot vehicles using composite clothoid segments. Technical Report CMU-RI-TR-90-31, Robotics Institute, Pittsburgh, PA, December 1990. (Cited on page 6.) [21] M. Sugeno and G. T. Kang. Structure identication of fuzzy model. Fuzzy Sets Syst., 28(1):1533, October 1988. (Cited on pages 13 and 22.) [22] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. Adaptive Computation and Machine Learning. Mit Press, 1998. (Cited on page 9.) [23] B. Triggs. Motion planning for nonholonomic vehicles: An introduction. Jun. 1993. (Cited on page 2.) [24] Petr Wagner, Jiri Kotzian, Jan Kordas, and Viktor Michna. Path planning and tracking for robots based on cubic hermite splines in real-time. In ETFA, pages 18, 2010. (Cited on page 6.) [25] Jiajun Wang. Nonlinear control strategies research of nonholonomic control systems. Sep. 2010. (Cited on page 2.) [26] Lee Weiss, Arthur C Sanderson, and C.P. Neuman. Dynamic visual servo control of robots: An adaptive image-based approach. In Proceedings of the 1985 IEEE International Conference on Robotics and Automation (ICRA 85), volume 2, pages 662 668, March 1985. (Cited on page 8.) [27] T. Yamakawa. Stablization of an inverted pendulum by a high-speed fuzzy logic controller hardware system. Fuzzy Sets Syst., 32(2):161180, September 1989. (Cited on page 10.) [28] Tjalling J. Ypma. Historical development of the newton-raphson method. SIAM Rev., 37(4):531551, December 1995. (Cited on page 34.) [29] L. Zadeh. The concept of a linguistic variable and its application to approximate reasoning. Information Sciences, 8(3):199249, 1975. (Cited on pages 10 and 11.) [30] Lavi M. Zamstein. Koolio: Path planning using reinforcement learning on a real robot platform. In University of Florida, pages 2526, 2006. (Cited on page 10.) [31] Ali Zilouchian and Mohammad Jamshidi, editors. Intelligent Control Systems Using Soft Computing Methodologies. CRC Press, Inc., Boca Raton, FL, USA, 1st edition, 2000. (Cited on page 2.)

You might also like