You are on page 1of 69

UNIVERSITY OF BRADFORD

School of Engineering, Design and Technology

Fuzzy Logic Controller for


Automated Guided Vehicle
Fuzzy Logic Controller for Automated Guided Vehicle

Sebastian B. Tidikwe

BEng Mechanical Engineering

Project Supervisor: Dr H.S.Qi

Stage 3 Final Year Project

2014

FUZZY LOGIC CONTROLLER FOR


AUTOMATED GUIDED VEHICLE

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 2
Fuzzy Logic Controller for Automated Guided Vehicle

By Sebastian B. Tidikwe

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 3
Fuzzy Logic Controller for Automated Guided Vehicle

I. ABSTRACT
Modern technology is evolving at an exponential rate, with engineers continuing to
produce more human like automation and Fuzzy Logic has proved to be one of the
major contributors to this reality. The objective of this report is to provide an
understanding of fuzzy logic with an aim to develop a fuzzy controller for an automated
guided vehicle. In this report the author provides a detailed understanding of fuzzy
logic and its implementation on MATLAB followed by an insight into Automated
Guided Vehicles where the problem can be identified. A solution to the problem is
implemented in MATLAB Fuzzy Logic Toolbox then tested in Simulink with assumed
conditions. Positive results obtained from the experiment prove the viability of Fuzzy
Logic programming hence readers can use this document as basis to real-time
programming.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 4
Fuzzy Logic Controller for Automated Guided Vehicle

TABLE OF CONTENTS

I.ABSTRACT....................................................................................................................................... 3

II.TABLE OF FIGURES..................................................................................................................... 5

III.ACKNOWLEDGEMENTS........................................................................................................... 5

1.INTRODUCTION............................................................................................................................ 5

1.1.BACKGROUND............................................................................................... 5
1.2.OUTLINE OF REPORT..................................................................................... 6
1.3.AIMS AND OBJECTIVES.................................................................................. 8
1.3.1.AIM:........................................................................................................ 8
1.3.2.OBJECTIVES:........................................................................................... 8
2.LITERATURE REVIEW................................................................................................................. 9

2.1. FUZZY LOGIC............................................................................................... 9


2.1.1. THE CONCEPT OF FUZZINESS.............................................................. 10
2.1.2. FUZZY INFERENCE PROCESS............................................................... 24
2.2.AUTOMATED GUIDED VEHICLE SYSTEMS.................................................... 32
2.2.1.DAWN OF THE AUTOMATED GUIDED VEHICLE...................................... 33
2.2.2.GENERAL TECHNOLOGY........................................................................ 37
3.FUZZY CONTROLLER FOR AUTOMATED GUIDED VEHICLE........................................ 45

3.1. DEVELOPMENT........................................................................................... 48
3.1.1. MEMBERSHIP FUNCTIONS.................................................................... 48
3.1.2. RULES................................................................................................. 55
4.RESULTS AND DISCUSSION...................................................................................................... 59

5.CONCLUSION AND RECOMMENDATIONS........................................................................... 63

5.1. CONCLUSION............................................................................................. 63
5.2. RECOMMENDATIONS.................................................................................. 64
6.REFERENCES AND BIBLIOGRAPHY...................................................................................... 65

7.APPENDIX...................................................................................................................................... 67

7.1.GANTT CHART............................................................................................. 67
7.2.HEALTH & SAFETY, ETHICS AND SUSTAINABILITY....................................... 68
7.3.PARAMETERS.............................................................................................. 68

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 5
Fuzzy Logic Controller for Automated Guided Vehicle

II. TABLE OF FIGURES

III. ACKNOWLEDGEMENTS
I would like to express my very great appreciation to Dr H.S.Qi for his valuable and
constructive suggestions during the planning and development of this report. His
willingness to give his time so generously has been highly appreciated. I would also like
to thank all the colleagues and friends who contributed to the successful completion of
this project. My grateful thanks are also extended to Dr Readle for his valuable advice
upon completion of the project.

1. INTRODUCTION

1.1. BACKGROUND
The issue of uncertainty has not always been embraced within the scientific
community; uncertainty represents an undesirable state, a state that must be avoided at
all costs. The leading theory in quantifying uncertainty in specific models from the late
nineteenth century until the late twentieth century had been probability theory.
However, the gradual evolution of the expression of uncertainty using probability theory
was challenged, first in 1937 by Max Black, with his studies in vagueness, followed by
the introduction of fuzzy sets by Lofti Zadeh in 1965 whos work had a profound
influence on the philosophy about uncertainty because he challenged not only
probability theory as a sole representation of uncertainty, but the very fundamentals
upon which probability theory was based: classical binary (two valued) logic [Klir and
Yuan, 1995 cited in (Ross, 2004)].

This project has been inspired by the fuzzy computer research which focuses in
achieving high speed characteristics with fuzzy interference computer relationships

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 6
Fuzzy Logic Controller for Automated Guided Vehicle

together with fuzzy computer architecture, fuzzy logic vague and fuzzy computer
programming language.

During research it was gathered that AGVs are installed with a basic safety mode. This
safety mode is too basic in the sense that it could slow production as the AGVs cannot
avoid the obstacle but rather wait until the obstruction has been removed. As a result
this project was undertaken as means to find a solution around this problem. The main
aim and objectives of the report are listed in chapter 1.2.

Methods of implementation include building of fuzzy controllers on MATLAB fuzzy


logic tool box, followed by a brief insight into the suitable methods of input and output;
the use of IR sensors and DC motors respectively. The fuzzy controllers are then
imported to Simulink to be integrated with the output and input for simulation. Test
results are obtained for three conditions then analysed. Analysis proves the model as
working ad ready for further development; possible error calculations and real-time
programming.

1.2. OUTLINE OF REPORT


Report focuses on developing fuzzy controllers that will allow automated guided
vehicles to avoid stagnant obstacles on guidepath.

Chapter 1: Introduction

A brief presentation of the problem to be addressed by the report.

Chapter 2: Literature Review

Critical analysis of work done previously, main achievements and existing problems.
This chapter also proves lack of solutions which justifies the significance of this report.
Achieved by the use of University library services and electronic documentation.

Chapter 3: Fuzzy Controller for Automated Guided Vehicle

This chapter provides a detailed formulation and solution of the simplified software
model. A physical model is transformed into a software model for testing the fuzzy
controller developed using methods explained in section 2.1. of literature review.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 7
Fuzzy Logic Controller for Automated Guided Vehicle

Chapter 4: Results and Discussion

A presentation of selected results concerning validation, comparison and confirmation


of experimental data under a set of nominal conditions. These results are a graphical
representation of findings which are then discussed by summarising, comparing,
evaluating and interpreting with respect to original research problems.

Chapter 5: Conclusion and Recommendations

The last main section of the report, this chapter focusses on providing a summary of
technical conclusions drawn from the report. The conclusion constitutes a review of the
project with respect to the aim and objectives. This chapter also states further work that
could be carried out to improve the project, extension of ideas and optimisation of
concepts. By thinking around the subject, it displays an awareness of relevance to other
applications critique and future preference.

Chapter 6: References and Biography

List of all items referred to in the main text.

Chapter 7: Appendix

Supports the report and has information that impedes the main text such as Gantt chart
and simulation parameters. Also includes a critical reflection on Health and Safety,
Ethics and Sustainability.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 8
Fuzzy Logic Controller for Automated Guided Vehicle

1.3. AIMS AND OBJECTIVES

1.3.1. AIM:

Use fuzzy logic to build Simulink model of an automated guided vehicle

1.3.2. OBJECTIVES:

Understand the automated guided vehicle

Explain core technology of automated guided vehicle

Identify fuzziness in process

Set fuzzy rules

Build fuzzy controllers using mat lab

Integration of fuzzy controller using Simulink

Discuss results

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 9
Fuzzy Logic Controller for Automated Guided Vehicle

2. LITERATURE REVIEW

2.1. FUZZY LOGIC

Fuzzy logic is a form of multivalued logic derived from fuzzy set theory to deal with
reasoning that is approximate rather than precise. Just as in the fuzzy set theory the set
membership values can range (inclusively) between 0 and 1, in fuzzy logic the degree of
truth of a statement can range between 0 and 1 and is not constrained to the two truth
values {true, false} as in classic predicate logic (Vargus, 2009, p. vii). With the use of
logistic variables, these degrees may be managed by specific functions.

Mankind often uses notions which are quite vague; for example, a man is considered
young or old, an object light or heavy, a car slow or fast and so on. Take young as an
illustration; Suppose A is a 20 year old man, who is reflected to be certainly young. Now
comes another man B, only one day older than A. Of course, B is also young but how
about a man only one day older than B. Continuing in this way, it quite difficult to
determine an exact age beyond which a man will be considered middle aged. As a
matter of fact, there is no distinct line between the two but rather a gradual transition
from one concept to another.

In 1965, Zadeh introduced the concepts of fuzzy sets just in order to represent this class
of sets. Providing a number to every element in the universe, which indicates the degree
(grade) to which the element belongs to a fuzzy set. In this interpretation, everybody has
a degree to which he or she is young (eventually the degree is 0 or 1). (Xushu, et al.,
2009, pp. 21-22)

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 10
Fuzzy Logic Controller for Automated Guided Vehicle

2.1.1. THE CONCEPT OF FUZZINESS

In order to introduce the concept of fuzzy sets, the elementary set theory in classical
mathematics must first be reviewed briefly as it shows how the fuzzy set theory is a
natural extension of the classical set theory.

Classical set theory

A set consists of some elements which are definite, in other words, it should be clear
whether or not an element belongs to a particular set. As a result, a set can only be
employed to describe a concept which is crisply defined. For example, a collection of
universities with the population more than 1 million forms a set since we can judge that
a given university is in this set or not with vagueness. (Xushu, et al., 2009, p. 21)

In classical logic, a simple proposition P is a linguistic, or decorative statement


contained within a universe of elements, X, that can be classified as being a collection of
elements in X that are strictly true or false. The truth of an element in the proposition P
can be assigned a binary truth value called T(P). For binary (Boolean) classical logic,
T(P) is assigned a value of either 1(truth) or 0(false). If U is the universe of all
propositions, then T is a mapping of the elements, u, in these propositions (sets) to the
binary quantities (0,1)

i.e. T : u U (0,1)

Example 1. Let P be the proposition the structural beam is an 18WF45 and let Q be
the proposition the structural beam is made of steel. Let X be the universe of
structural members comprised of girders, beams and columns; x is an element (beam),
A is the set of all wide-flange (WF) beams, and B is the set of all steel beams. Hence

P : x is in A

Q : x is in B

A propositional calculus (also known as algebra of propositions) will exist for the case
where proposition P measures the truth of the statement that an element, x, from the
universe X is contained in set A and the truth of the statement Q that this element, x, is
contained in set B, or more conventionally.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 11
Fuzzy Logic Controller for Automated Guided Vehicle

P : truth that x A

Q : truth that x B

Where truth is measured in terms of the truth value, i.e.,

If x A, T(P) = 1; otherwise T(P) = 0

If x is B, T(P) = 1; otherwise T(P) = 0

or using the characteristic function to represent truth (1) and falsity (0), the following
notation results:

(Ross, 2004, pp. 121-122)

Set Operations

In its simplest meaning, an operation is a procedure which produces a new value from
one or more input values. In ordinary arithmetic and algebra the four common
operations that can be performed are namely; addition, subtraction, multiplication and
division. Similarly we also define several operations on sets, the most fundamental
operations being union, intersection and complement of any set with respect to some
superset of it.

Union: The union of two sets A and B is written as A B and defined as that set which
contains all the elements lying within either A or B or both. In the basic representation
the definition is:

A B = { x: x A or x B}

Example: if A = (a,b,c,d) and B = (b,d,e,f),

Then: A B = (a,b,c,d,e,f)

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 12
Fuzzy Logic Controller for Automated Guided Vehicle

Intersection: The intersection of two sets A and B is written as A B and defined as that
set which contains all the elements lying within both A or B. In the basic representation
the definition is:

A B = { x: x A and x B}

Example: if A = (a,b,c,d) and B = (b,d,e,f),

Then: A B = (b,d)

Both Union and Intersection obey the associative, commutative and distributive law and
can be used in any combination.

Complement: the complement of a set A is the set of elements which do not belong to A,
that is, the difference between the universal set U and A. we denote the complement of A
by:

A' = {x: x U, x A}

A' = {x: x A}

Example: if U = (a,b,c,d,e,f) and A = (a,c,f)

Then: A' = (b,d,e)

Fuzzy Set Theory

A basic concept of fuzzy logic is that, instead of strictly true or strictly false, all things
can be conceptualized as having a position on a sliding scale in the way they belong to
categories. In order to express this position, objects (observations, properties, etc.) are
assigned a degree of membership. (Dijk & Geert, 2009)

The word fuzziness has evolved to portray the information associated with the human
language which is being used in our everyday decision making process and in a
mathematical sense, not very precise. For example in Botswana in the month of
September daytime temperature is usually around 37C to 42C. A resident of Botswana

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 13
Fuzzy Logic Controller for Automated Guided Vehicle

will classify this temperature as not very hot. By a friend just arriving from England,
his classification for this temperature would be very very hot. (Xushu, et al., 2009, p. V)

Mathematical Modelling

The basic concept of fuzziness as shown in the examples above needs to be represented
in a mathematical manner. This is a requirement in getting to the sentiment of the
notion, in manipulating fuzzy statements, and in applying them. (Nguyen & Walker,
1997, p. 2). The succeeding definition expresses this concept of fuzzy sets
mathematically.

Definition: Let X be the universe. A mapping A : X [0,1] is called a fuzzy set on X. the
value A(x) of A at x X stands for the degree of membership of x in A. The set of all
fuzzy sets on X will be denoted by F(X).

A(x) = 1 means full membership, A(x) = 0 means non membership and intermediate
values between 0 and 1 mean partial membership. A(x) is referred to as membership
function or characteristic function as x varies in X.

Defined as

Example: let O denote old and Y denote young. We limit the scope of age to X = [0,100]
then both O and Y are fuzzy sets that are respectively defined as follows:

For instance, O(60) = 0.8 and Y(30) = 0.5

(Xushu, et al., 2009, p. 22)

Different functions of A can be considered. The choice of the function A is subjective and
depends on particular circumstances. Suppose we want to model the notion of high
wages with a fuzzy set. By reviewing a large number of people it could be observed that
Supervised By: Dr. H.S.Qi
Report By: Sebastian Baboni Tidikwe Page 14
Fuzzy Logic Controller for Automated Guided Vehicle

no one thinks that an income under 20 000 is high, but that the fraction p of people
think that an income x between 20 000 and 75 000 is high is approximately

Of course everyone thought thinks an income over 75 000 is high. Measuring in


thousands pounds, one reasonable model of the fuzzy set high income could be

Figure 1 membership example 1

(Nguyen & Walker, 1997, pp. 3-5)

One of the most frequently used examples of a fuzzy set against classic set is the set of
human height. In this case, the universe of discourse is all heights that have the potential
of being perceived as tall, say from 1 meter to 2 meters, and the word tall would
correspond to a curve that defines the degree to which any person is tall. If the set of tall
people is given the distinct boundary of a classical set, it could be assumed that all
people taller than 1 meter are officially considered tall. However, such a distinction is
clearly ludicrous. It may make more sense to consider the set of all real numbers greater
than 1 because numbers belong on an abstract plane, but when we want to talk about
real people, it is unreasonable to call one person short and another one tall when they
differ in height by the width of a hair.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 15
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 2 classic logic example

If the kind of distinction shown previously is impractical, then what is the right way to
define the set of tall people? The following figure shows a smoothly varying curve that
passes from not-tall to tall. The output-axis is the membership value between 0 and 1
where is the membership function that defines the transition from not tall to tall.

Crisp output

Fuzzy output

Types of Membership Functions

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 16
Fuzzy Logic Controller for Automated Guided Vehicle

The only condition a membership function must really satisfy is that it must vary
between 0 and 1. The function itself can be subjective to suit us from the point of view of
simplicity, convenience, speed, and efficiency.

When using MATLAB, up to 11 types of membership functions can be generated from


the following basic arithmetic functions:

1. Piece-wise linear functions

2. The Gaussian distribution function

3. The sigmoid curve

4. Quadratic and cubic polynomial curves

Piece-wise linear functions consist of the triangle and trapezoidal functions, trimf and
trapmf respectively. These are straight line membership functions that have the
advantage of simplicity.

Figure 3 piece-wise linear membership functions

The Gaussian distribution function includes two membership functions: a simple


Gaussian curve and a two-sided blend of two different Gaussian curves, known
as gaussmf and gauss2mf respectively. The bell-like membership function, gbellmf
has one more parameters than the Gaussian membership function which means it can
approach a non-fuzzy set if the free parameter is regulated. Due to their smoothness and

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 17
Fuzzy Logic Controller for Automated Guided Vehicle

concise notation, Gaussian and bell membership functions are popular methods for
specifying fuzzy sets.

Figure 4 Gaussian distribution membership function

The sigmoidal membership function is open either left or right. Closed membership
functions can be synthesised using two sigmoidal functions, so in addition to the
basic sigmf, you also have the difference between two sigmoidal functions, dsigmf,
and the product of two sigmoidal functions psigmf.

Figure 5 Sigmodial curve membership functions

Polynomial based curves include Z, S, and Pi curves, all named because of their shape.
The function zmf is the asymmetrical polynomial curve open to the left, smf is the
mirror-image function that opens to the right, and pimf is zero on both extremes with
a rise in the middle.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 18
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 6 polynomial based membership function

(MathWorks, 1994-2014)

Logical Operations

Fuzzy logic, just as fuzzy sets, borrows notion from crisp logic. As in our extension of
classical set theory to fuzzy set theory, our extension of crisp logic to fuzzy logic is made
by replacing membership functions of crisp logic with fuzzy memberships. (Bandemer
& Gottwald, 1995). If you keep the fuzzy values at their extremes of 1 (completely true)
and 0 (completely false), standard logic operations will hold.

For example: consider the following truth variables;

Figure 7 truth table

Now, because in fuzzy logic the truth of any statement is a matter of degree, these truth
tables can be altered.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 19
Fuzzy Logic Controller for Automated Guided Vehicle

AND: this operation is almost similar to the classical set intersection but with a
difference that an element can partly belong to both the sets but still with a different
memberships.
OR: In a similar way to classical set union, means how many of the element is in either
set.
NOT: Similar to the classical set complement, implicates to what extent elements are not
the member of the set

With the above awareness, statement A AND B can be resolved by using the function
min(A,B), using the same reasoning, the OR operation can be replaced with the
maximum function so that A OR B becomes equal to max(A,B). Finally the operation
NOT A becomes equal to the operation 1-A.

Notice how the previous truth table is completely unaffected by this substitution.

Figure 8 truth table b

Because there is a function behind the truth table rather than just the truth table itself,
you can now consider values other than 1 and 0. Figure 10 uses a graph to show the
same information, the truth table is converted to a plot of two fuzzy sets applied
together to create one fuzzy set. The upper part of the figure displays plots
corresponding to the preceding two-valued truth tables while the lower part of the
figure shows how the operations work over a continuously changing range of truth
values A and B according to the fuzzy operations.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 20
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 9 truth table c

In this case, we have defined what is called Fuzzy Intersection (AND), Fuzzy Union
(OR) and Fuzzy Complement (NOT).

These fuzzy operators which are often referred to as T-norm and S-norm operators
respectively, meet the following basic requirements:

Boundary: T(0,0) = 0, T(1,a) = T(a,1) = a


S(1,1) = 1, S(a,0) = S(0,a) = a

Monotonicity: T(a,b) <= T(c,d) if a <= c and b <= d


S(a,b) <= S(c,d) if a <= c and b <= d

Commutativity: T(a,b) = T(b,a)


S(a,b) = S(b,a)

Associativity: T(a,T(b,c)) = T(T(a,b),c)


S(a,S(b,c)) = S(S(a,b),c)

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 21
Fuzzy Logic Controller for Automated Guided Vehicle

The first requirement imposes the correct generalization to crisp sets. The second
requirement implies that a decrease in the membership values in A or B cannot produce
an increase in the membership value in A intersection/union B. the third requirement
indicates that the operator is indifferent to the order of the fuzzy sets to be combined.
Finally, the fourth requirement permits the intersection/union of any number of sets in
any order of pair-wide groupings.

Fuzzy Rules

Represented by a sequence of the form IF-THEN, fuzzy rules lead to procedures


describing what action or output should be taken in terms of the currently observed
information, which includes both input and feedback, if a closed-loop control system is
applied. The law to design of fuzzy rules is based on a human beings knowledge or
experience, which is dependent on each application.
The IF part is mainly used to capture knowledge by using the elastic conditions
whereas the THEN part can be utilized to give the conclusion in linguistic variable
form.
A linguistic variable is a variable whose values are words in a natural language, for
example, height is a linguistic variable which can take values as short, average and
tall and so on.
If-Then Rules
Fuzzy sets and fuzzy operators are subjects and verbs of fuzzy logic. These if-then
statements are used to express the conditional statements that compromise fuzzy logic. A
fuzzy if-then rule assumes the form;

If x is A then y is B

Where A and B are linguistic values defined by fuzzy sets on the ranges X and Y,
respectively. The if-part of the rule x is A is called the antecedent, while the then-part
of the rule y is B is called the consequent or conclusion. An example of such a rule
might be;

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 22
Fuzzy Logic Controller for Automated Guided Vehicle

If object is far then speed is fast

The concept far is represented by numbers 0 and 1, and so the antecedent is and
interpretation that returns a single number between 0 and 1. On the contrary, fast is
represented as a fuzzy set, and so the consequent is a consignment that assigns the entire
fuzzy set B to the output variable y.
In general, the input to an if-then rule is the current state for the input variable (in this
case, object) and the output is an entire fuzzy set (in this case, fast). This set will later be
defuzzified. The concept of defuzzification is described later in the next section.

Interpreting an if-then rule involves distinct parts; first evaluating the antecedent and
second applying that result to the consequent. In the case of two-valued or binary logic,
if-then rules do not present much difficulty, if the antecedent is true then the conclusion
is true. If the restrictions of two-valued logic are released to allow the antecedent to be a
fuzzy statement, how does this reflect on the conclusion? The answer is a simple one; if
the antecedent is true to some degree of membership then the consequent is also true to
that degree.
Thus:

In binary logic: p q (p and q are either both true or both false.)


In fuzzy logic: 0.5p 0.5q (partial antedecedents provide partial implication.)

The antecedent of a rule can have multiple parts.

If sky is gray and wind is strong and barometer is falling ,then

In which case all parts of the antecedent are calculated simultaneously and resolved to a
single number using logical operators.
The consequent of a rule can also have multiple parts.

If temperature is cold then hot water valve is open and cold water valve is shut

(MathWorks, 1994-2014)

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 23
Fuzzy Logic Controller for Automated Guided Vehicle

2.1.2. FUZZY INFERENCE PROCESS

The process of fuzzy inference involves all the pieces described in the previous sections:
membership functions, fuzzy logic operators and if-then rules. There are two types of
fuzzy inference systems that can be implemented in the MATLAB Fuzzy Logic
Toolbox: Mandani-type and Sugeno-type. These two types of inference systems vary
somewhat in the way outputs are determined.

Mandanis fuzzy inference method is the most commonly seen fuzzy methodology and
as defined for the Fuzzy Logic Toolbox, expects the output membership functions to be
fuzzy sets. After the aggregation process, there is a fuzzy set for each output variable
that needs defuzzification. It is possible, and in many cases efficient, to use a single spike
as the output membership function rather than a distributed fuzzy set. This is
sometimes known as singleton output membership function, and it can be thought of as
a pre-defuzzified fuzzy set. It enhances the efficiency of the defuzzification process
because it greatly simplifies the computation required by the more general Mandani

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 24
Fuzzy Logic Controller for Automated Guided Vehicle

method, which finds the centroid of a two-dimensional function. Rather than


intergrating across the two-dimensional function to find the centroid, it use the weighted
average of a few data points. Sugeno-type systems support this type of model. In general
Sugeno-type systems can be used to model any inference system in which the output
membership functions are either linear or constant.

Example
The Basic Tipping Problem: consider the tipping problem; Given a number between 0
and 10 that represents the quality of service at a restaurant (where 10 is excellent), what
is the right amount to tip your waitperson?
With information flowing from left to right, from two inputs to a single output, the
diagram below shows a basic structure of the example problem;

Figure 10 dinner for 2

In the Fuzzy Logic Toolbox there are five parts of the fuzzy inference process:
Fuzzification of the input variables
Application of fuzzy operator (AND or OR) in the antecedent
Implication from the antecedent to the consequent
Aggregation of the consequents acroos the rules

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 25
Fuzzy Logic Controller for Automated Guided Vehicle

Defuzzification

Step 1. FUZZIFY INPUTS

The first step is to take the inputs and determine the degree to which they belong to
each of the appropriate fuzzy sets via membership functions. The input is always a crisp
numerical value limited to the universe of discourse of the input variable and the output
is a fuzzy degree of membership in the qualifying linguistic set. Fuzzification of the
input amounts to either a table lookup or a function evaluation.

This example is built on three rules, and each of the rules depends on resolving the
inputs into a number of different fuzzy linguistic sets.. Before the rules can be evaluated,
the inputs must be fuzzified according to each of these linguistic sets. For example to
what extend is the food really delicious?
Figure 13 shows how well the food at the hypothetic restaurant (rated on a scale of 0 to
10) qualifies via its membership function, as the linguistic variable delicious. In this
case, the food is rated an 8, which, given your graphical definition of delicious
corresponds to = 0.7 for the delicious membership function.
In this manner, each
input is fuzzified over
all the qualifying
membership functions
required by the rules.

Step 2. APPLY FUZZY OPERATOR

If the antecedent of a given rule has more than one part, the fuzzy operator is applied to
obtain one number that represents the result of the antecedent for that rule.
In the toolbox, two built-in AND methods are supported: min (minimum) and prod
(product). Two built-in OR methods are also supported: max (maximum), and the

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 26
Fuzzy Logic Controller for Automated Guided Vehicle

probabilistic OR method probor. The probabilistic OR method (also known as algebraic


sum) is calculated according to the equation;

Probor(a,b) = a + b ab

Figure 14 shows the OR operator max evaluation of the antecedent of the rule 3 yielding
fuzzy membership values 0.0 and 0.7 respectively.

Figure 11 Fuzzy operation

Step 3. APPLY IMPLICATION METHOD

Before applying the implication method, rule weight must be determined, a number
between 0 and 1 which is applied to the number given by the antecedent. Generally this
weight is 1 (as it is for this example) and thus has no effect at all on the implication
process.
After proper weighting has been assigned to each rule, the implication method can be
applied. The consequent is reshaped using a function associated with the antecedent.
The input of the implication process is a single number given by the antecedent, and the
output is a fuzzy set. Two built in methods are supported and they are the same
functions that are used by the AND method: min (minimum), which truncates the
output fuzzy set, and prod (product), which scales the output fuzzy set.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 27
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 12 Fuzzy Implication

Step 4. AGGREGATE ALL OUTPUTS

Aggregation is the process by which the fuzzy sets that represent the outputs of each
rule are combined into a single fuzzy set. The input of the aggregation process is the list
of condensed output functions returned by the implication process for each rule. The
output of the aggregation process is one fuzzy set for each output variable.
Three built-in methods are supported:

max (maximum)

probor (probabilistic OR)

sum (simply the sum of each rules output set)

figure 16 shows all three rules placed together to show how the output of each rule is
combined, or aggregated, into a single fuzzy set whose membership function assigns
a weighting for every output (tip) value.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 28
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 13 Fuzzy Aggregation

Step 5. DEFUZZIFY

The input of the defuzzification process is the aggregate output fuzzy set and the output
is a crisp number. As much as fuzziness helps the rule evaluation during the transitional
steps, the final desired output for each variable is generally a crisp number. However,
the aggregate of a fuzzy set incorporates a range of output variables, and so must be
defuzzified in order to resolve a single output value from the set.

The most common defuzzification method is the centroid calculation, which returns the
centre of area under the curve. There are five built-in methods supported: centroid,
bisector, middle of maximum (the average of the maximum value of the output set),
largest of maximum and smallest of maximum.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 29
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 14 Defuzzification

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 30
Fuzzy Logic Controller for Automated Guided Vehicle

Fuzzy Inference Diagram


The fuzzy inference diagram is the combination of all the smaller diagrams presented so
far in this chapter; it displays all parts of fuzzy inference process examined.
There is a lot to see in a fuzzy inference diagram, once familiarised to it, a lot can be
identified about the system very quickly. For instance, from this diagram with these
particular inputs, you can easily see that the implication method is truncation with the
min function. The max function is being used for the fuzzy OR operation. Rule 3 (the
bottom-most row in the diagram shown previously) is having the strongest influence on
the output and so on. When using MATLAB the fuzzy inference diagram can be
accessed through the Rule Viewer.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 31
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 15 Fuzzy Inference Diagram

(MathWorks, 1994-2014)

2.2. AUTOMATED GUIDED VEHICLE SYSTEMS

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 32
Fuzzy Logic Controller for Automated Guided Vehicle

Definitions
The AGVS product section of the Material Handling Institute defines an automatic
guided vehicle as:
A vehicle equipped with automatic guidance equipment, either electromagnetic
or optical. Such a vehicle is capable of following prescribed guide paths and may
be equipped for vehicle programming and stop selection, blocking and any other
special functions required by the system.

Is an AGVS a robot? The Robotic Industries Association defines an industrial robot


as:
A programmable multifunctional manipulator designed to move materials, parts,
tools or specialized devices through variable programmed motions for the
performance of a variety of tasks.

The computer-directed AGVS, being programmable, would appear to qualify as a robot


under this definition. The fact that the AGV follows a guidepath, however, distinguishes
it from a conventional industrial robot. Essentially, the AGV may be considered to be a
robot with a limited number (typically one to three) of degrees of freedom. Most
industrial robots utilize five or six degrees of freedom. The fact that the AGV may not
be considered to be a manipulator (unless the vehicle has an attached arm) also
distinguishes it from traditional robots. (Miller, 1987, p. 2)

2.2.1. DAWN OF THE AUTOMATED GUIDED VEHICLE

The first AGVS was built and introduced in the early


50s by Barrett Electronics, USA. Subsequently,
commercial AGVs were introduced by Barrett, by the
late 50s and early 60s towing AGVs were in operation
in many types of factories and warehouses.
(FROG AGV Systems, 2014).

SMART FLOORS AND DUMB VEHICLES

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 33
Fuzzy Logic Controller for Automated Guided Vehicle

Wire guidance was the major AGV guidance technology in the 70s where an electronic
frequency is induced in a wire buried in the floor. An antenna is then fixed on the AGV
that would seek out the frequency and guide the vehicle based on the strength of the
signal. For decisions points and intersections, multiple wires are installed but only the
wire corresponding to the intended direction is energised.
This principal navigation scheme was expensive to install as the strict path of the AVG
needed to be cut in the floor in order to bury the wire and the cut for a turn had to
follow the radius curve that the vehicle will make when turning. Usually systems had to
embed four wires, three for guidance and one for communications. Also sometimes
electronic signals would interfere with the guidance signals in the wires. Smart floor,
dumb vehicles was the name given to these systems as the core intelligence of the system
was in the floor controllers. As of today this technology is sometimes applied on very
basic applications as new guidance systems have emerged.

DEAD RECKONING CAPABILITY

As electronics and microprocessors advanced, more intelligent Automatic Guided


Vehicles were created and the need for a sophisticated path was reduced. The first
major development being dead reckoning, the ability to navigate space without having
to rely on the physical presence of a guidance wire. The principal advantage was that
dead reckoning eliminated the need to make the cut radius turns at intersections, the
AVGs could leave the wire, turn at a set radius, then pick up the wire to continue its
course of travel.
In the late 70s, integrated circuit technology was adapted which allowed for the
development of more advanced controllers. Also, during the same period,
microcomputers were placed on-board vehicles thus producing smart vehicles; non-
wire guided AVGSs which included laser and inertia guidance as the two main AVG
guidance technologies. This was a major evolution in AVGS technology as the two
guidance methods allowed increased system flexibility and accuracy. Changes to the
path could be made easier, cheaper and with less time consuming floor alterations or
production interruptions. Modern AVGs are computer-controlled vehicles with on-
board microprocessors and most include a supervisory control system to optimize
utilization. (Hammond, 1986, p. 10).

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 34
Fuzzy Logic Controller for Automated Guided Vehicle

APPLICATIONS AND CONTROLS

Within industrial environments, the use of AVGs has evolved radically. Originally
designed for horizontal transportation of palletized material, the design and application
of AVGs and controls are now as varied as those of industrial robots. They can be stand
alone systems, an integral part of another system, or aid in pulling together islands of
automation.
Outside industrial environents, Automated Guided Vehicles are now also being applied
for transhipment at ports, as people movers and in the entertainment industry. (FROG
AGV Systems, 2014)

UNUSUAL APPLICATIONS

Two unique applications of a very customized AVGS are the two Mars rovers, Spirit and
Opportunity. These are automated guided vehicles that operate on mars and are
engaged via radio transmitted instructions from earth by a team at the National
Aeronatics and Space Administration (NASA). They have spent nearly eleven years
(originally landing injanuary 2003) on mars, travelling several miles and frequently
stopping to do scientific analysis. Their mission is a big success for NASA and represents
one of the more unusual applications of AVG to date. (Inc., 2014).

ADVANTAGES

The material handling institute provides the following list of benefits of an AGVS:
Economic Justification. In more and more material handling situations, AGVSs are
proving themselves as the most economical method of moving material.
Automatic Interface with Other Systems. An AGVS is designed to interface
automatically with other material handling systems including conveyors, automatic
storage / retrieval systems, production lines and other devices including elevators,
doors, draw bridges, robots and shrink and stretch wrap tunnels.
System Liability. Computer control allows material tracking between stations and
delivery confirmation in real time.
Increased Productivity. In cases where driverless vehicles are used, a substantial
savings is incurred due to labour reduction. Order picking vehicles require
operators to perform the picking and stowing functions; however, a substantial

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 35
Fuzzy Logic Controller for Automated Guided Vehicle

increase in productivity is realised since operators no longer have to perform


complex paperwork functions for the material tracking process.
Expandable System Capacity. As material movement needs increase, load movement
capacity in the AGVS is easily accomplished by adding one or more vehicles.
Destinations Unlimited. The AGVS can be designed with an unlimited number of
pickup and delivery points.
Safe Handling. Studies prove there is less product and plant equipment damage
when an AGVS is used to move material. This is because the vehicles travel on a
predetermined route and thus cannot collide with racks or other obstacles.
Reliable System. Because an AGVS is composed of a number of vehicles, when one
vehicle requires maintenance, productivity of the other vehicles is not affected and a
high degree of system availability is maintained. All automatic guided vehicles
available are equipped to allow manual override for special material or vehicle
movement situations.
Ease of Installation. An AGVS, designed by professionals, can be installed in less
time than most other material handling systems available today.
(Miller, 1987, pp. 2-3)

LIMITATIONS
No matter how marvellous an automation device may be, there are always associated
drawbacks. AGVS are no exception. In some instances these drawbacks may prevent a
system from being installed or necessitate extensive modification of the existing facility
to permit use of the device. Negative management and/or employee attitudes should be
considered as a possible drawback.
Expense. Experienced users claim that the initial investment for large assembly-type
AGVS may be two or three times that of traditional material handling methods.
Worker Attitudes. Not only must management be committed to successful system
implementation, but equal support from the work-force is also essential. Many of the
early AGV systems failed because the unions saw them as a direct threat. Systems
were forced out because of sabotage by employees.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 36
Fuzzy Logic Controller for Automated Guided Vehicle

Ramp Gradients. Ramp gradients are usually limited to 4-6%, although gradients of
up to 10% are permissible with reduced load capacity. Long ramps may create such
problems as overheating of motors and my further reduce the load capacities. In
addition, if the vehicle is required to stop on the ramp (either emergency or
programmed stop), the motor may not have sufficient restart power.
Complexity. Use of higher level of software and hardware prevents the majority of
electricians from troubleshooting and repairing AGVs. (Hammond, 1986, pp. 17-19).

2.2.2. GENERAL TECHNOLOGY


AVG NAVIGATION

The main aspect of AGVs is navigation; there are two basic principles of the navigation
of an Automated Guided Vehicle:

1. Fixed path
2. Free ranging

Fixed path navigation is the oldest method of navigation. Most of the systems that are
being installed are now free ranging AGVS that allow greater flexibility and better
maintainability.

Fixed path AVG navigation


Also described as dumb vehicles, smart floors, general characteristics of fixed path
AGV navigation are:
AVG paths are engraved on the floor
AVG paths are continous
AVG paths are fixed but can be changed
Different types of fixed AGV paths can be distinguished
as:
magnetic tape on the surface of the floor
photo sensetive chemical strip on the surface of the floor
photo reflective tape on the surface of the floor
wire buried just below the surface of the floor
Supervised By: Dr. H.S.Qi
Report By: Sebastian Baboni Tidikwe Page 37
Fuzzy Logic Controller for Automated Guided Vehicle

The first three methods require a sensor under the Automated Guided Vehicle which
can detect the existence of the surface mounted path. If the path makes a turn the
sensor detects a turn providing feedback to the onboard vehicle controller, which in
turn causes the Automated Guided vehicle to steer in the direction of the path.
In case of a current carrying wire, the sensor underneath the AVG is usually a small
antennae consisting of magnetic coils. With current flowing, a magnetic field surrounds
the buried wire. The closer the buried wire is to the AGV antennae, the stronger the
field. The magnetic field is completely symmetrical around the conductor or the buried
wire. At a given instance from the wire the field has the same strength on either side of
the cable. The field strength is detected by the antennaes magnetic coil and induces
voltage in the coil.
The Automated Guided Vehicle steers itself to follow the magnetic field surrounding the
buried wire. To get a steering correction signal the AGVs sensing antennae consists of
two coils, when the vehicle is centered directly above the buried wires, equal voltages
are induced in the two coils. If the Automated Guided Vehicle moves a bit to one side of
the wires, a difference in signal strength in the coil proportional to side displacement of
the coil is produced and this difference is fed back to control an onboard servo motor,
which turns the guide wheel or wheels until both coils receive equal signs, and therefore
the course will be corrected.

Free Ranging AVG Technology


Non-wire guided AGV technologies offer an infinite number of ways to navigate to open
space between two points. To navigate in an open, unrestricted space without the help of
a fixed path, an Automated Guided Vehicle must have a way of knowing where it is and
be capable of knowing where to go. All open space navigation methods require:

A map of the area in which the AGV can operate contained in the vehicles
computer memory.
Multiple, fixed reference points located within the operating area that can be
detected or seen by the AGV.

During travel the AVG will measure distance and direction by counting the number of
wheel revolutions and measuring the steering angle (odometry). Sensors attached to the

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 38
Fuzzy Logic Controller for Automated Guided Vehicle

wheels provide the data that determine the distance covered as well as the change in
direction.
Errors are revised by relating the calculated position of the vehicle with actual position
of the vehicle which is determined by means of external reference points. There are
three different types of calibration for free ranging AGVs:
Laser
Grid
GPS
The GPS option is only applicable outdoors. Grid and laser are calibration alternatives
suited for indoor environments, while the grid can also be applied in outdoor AGV
applications.

Laser
Commonly used in industry environments, laser guidance involves reference
points strategically located as targets (super-
high reflective reflectors)
mounted to a vertical surface
such as a wall or column on
known X and Y locations. A
guiding light on top of the vehicle emmits
a rotating laser beam, which is reflected back to the
vehicle when it strikes the reflector. An Automated Guided Vehicle needs only two (but
idealy three or four) targets in order to calculate a relative coordinate location and
heading using simple geometry.

Grid
Tuning by means of grid is less common as it
is original to only a selected group of licencees
such as FROG AGV Systems. The grid
consists of small magnets implanted in the
road surface and the AVG re-calibrates its
position everytime the vehicle travels over one

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 39
Fuzzy Logic Controller for Automated Guided Vehicle

of the magnets. A magnets ruler (sensor) mounted underneath the AGV is used to detect
the magnets.

Laser and grid calibration are just as accurate and companies will always select the
calibration principle most suited to the AGV application. (FROG AGV Systems, 2014)

GUIDANCE

There are two basic types of AGVS steering control differential speed steer control
and steered wheel steer control.

Differential speed control uses two


fixed wheel drives and varies the
speeds between the two drives on
either sides of the guidepath to
permit the vehicle to negotiate a turn.
An amplitude detection type of sensor
is used to give guidance information
to the steer system. This is based on
balancing the signal received from a
left and right sensor in front of the
vehicle. When one or the other signal is greater, the steering system compensates by
correcting the steering until the amplitude of the left or right signal is equal.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 40
Fuzzy Logic Controller for Automated Guided Vehicle

Steered wheel control uses


automotive type steering
control in which a front wheel
turns to follow the guidepath.
Phase detection guidance is
usually used for this type of
steering. The phase detection
guidance sensor can
differentiate whether the
vehicle is to the left or right of the path by detecting the positive or negative phase of the
signal received from the guidepath calibration.
Steered wheel control is used in all types of automated guided vehicles; however,
differential steer control is not used in towing applications or on vehicles which have
many on-board controls. Differential steer control vehicles are used in pivot steer
modules in space limited applications not requiring high throughput volume. This is
because the vehicle can perform 90 turns and proceed into or out of a station. If
sufficient room is present, a normal radius curve is often better from the standpoint of
flow and controls simplicity.
Steered wheel type vehicles have excellent guidance tolerance along the guidepath.
Differential steer vehicles normally have less tracking tolerance and therefore require
external guides or positioning devices at load stations when used in automatic load
transfer applications.
Because of the advantages of each type of steering for various situations, some
commercial vehicles are supplied with dual steering capabilities. (Miller, 1987, pp. 16-
17)

COMMUNICATION

Message commands such as where to go, when to start, when to slow down and when to
stop and also includes fault condition reporting. Computer-controlled systems
overseeing remote objects need a means of communication commands, and in many
cases confirming replies between a supervisory computer and the objects being

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 41
Fuzzy Logic Controller for Automated Guided Vehicle

controlled. Depending on the application, there are four types of basic communication
media being used within AGVSs:

Radio Communication

Infrared Communication

Guide Wire Data Communication

Inductive Loops Communication

There are two classifications for AGV communication systems: continuous and
discrete. Continuous indicates that the supervisory controller can always communicate
with any vehicle; whereas discrete means that the supervisory controller can only
communicate with a particular vehicle at certain times (usually determined by vehicle
positioning). Such positions are commonly referred to as communication points.
(Hammond, 1986, p. 75)

Radio Communication is a widely used form of communication. Each AGV is equipped


with a transmitter/receiver antenna and the area controllers generally have a number of
similar antennae tactically positioned throughout the facility. Each AGV may be on a
different frequency, or an address polling system may be used by the area controller
allowing the same frequency for communication.

Radio communication provides maximum flexibility in system control, new routings and
maps can be downloaded quickly and system speed of response to changing load
movement demands is improved. (FROG AGV Systems, 2014). In manufacturing
applications, large motors or spot welding processes in the vicinity of the AGVS system
can create radio frequency noise interference with the communication broadcasts.
As a result, some suppliers provide Inductive Communication systems whereby a
second set of wires is layered in the floor with the guidepath wires or alternatively
multiplex digital data is transmitted through the guidewire itself. (Hammond, 1986, pp.
75-76). Electronic commands in the form of programmed frequencies are sent out via
the wire loops where antennas on the underside of the vehicles can sense the frequencies
which are then decoded and acted on by the AGV. (FROG AGV Systems, 2014).

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 42
Fuzzy Logic Controller for Automated Guided Vehicle

Infrared Communication is highly reliable but has the advantage of not being
continuous but rather point to point. AGVs are stopped during this data exchange
which usually occurs at load stations where the fixed and mobile units are aligned and
in close proximity (e.g. hokuyo sensors). Otherwise, the AGV communicates at fixed
points along its guidepath as the AGV travels through a given zone. Usually infrared
communication is not used any longer to communicate between Automated Guided
vehicles and the supervisory control system. Infrared is now used for local
communication such as lining up with a conveyor belt. (FROG AGV Systems, 2014).

Guide Wire Data Communication as it is involves data being transmitted on the guide
wire by the guide line. It provides almost the same flexibility as radio, with the exception
of vehicle movement off the wire. Since the distance between the guide wire and the on
board responders is constant, there are no transmission dead spots, as there may be
with radio. The techniques to accomplish this type of data link are not widespread.
(FROG AGV Systems, 2014).

ENERGY MANAGEMENT

Power on virtually all AGVs is provided by batteries. Different battery technologies are
available for AGVs, but the selection of most appropriate battery type for each AGV-
application is determined by factors such as ambient temperature, throughput, number
of shifts in operation, the type of AGV used to handle the loads, the load weight, and
specific customer requirements.

SAFETY

The purpose of an AGV obstacle detection is to detect any obstacle on the path, in the
time, so that the AGV can slow down and stop, if necessary until the path is clear. As the
path clears, the AGVs will automatically continue their trip.

Bumpers: Some AGVs are equipped with bumpers and/or contact strips which work
upon impact causing the vehicle to stop immediately when in contact with an obstacle.
This is the most basic form of obstacle detection but is perfectly adequate for certain
AGV acoording to application.
Supervised By: Dr. H.S.Qi
Report By: Sebastian Baboni Tidikwe Page 43
Fuzzy Logic Controller for Automated Guided Vehicle

Non-Contact Detection: Same as sensors assisting truck drivers when backing, AGVs
also have familiar systems of obstacle detection where sensors based on non-contact
detection are used to provide a signal before collision occurs. This type of detection
especially important in environments involving people. The sensor system is
programmed to transmit two digital signals: upon early detection of obstacles, a
warning signal is activated, causing the AGV to steadily reduce speed and as the AGV
reaches a pre-set distance, a stop signal is triggered, bringing the AGV to a full halt.
The range of warning and stop zones is flexible to the speed of the vehicle.
Once the object moves or is removed the AGV will delay for a set period of time, and
then start in snail speed. After achieving takeoff speed and finding no obstructions, the
AGV will resume its previous travel speed.

A continous or near-continous field of detection in front of the AGV will be covered by


the object detection system at a minimal distance. Numerous techniques for generating
the field of view exist such as laser, infrared, ultrasonic. It is generally possible to detect
obstructions as small as 1 inch by 1 inch and even smaller obstructions may be detected
using specialized sensory devices.
(FROG AGV Systems, 2014).

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 44
Fuzzy Logic Controller for Automated Guided Vehicle

3. FUZZY CONTROLLER FOR AUTOMATED GUIDED VEHICLE

As seen on the previous chapter, AGVs are somehow limited when it gets to obstacle
avoidance. This could be a major drawback in the technology as one of the main factors
to be considered in technology progression is safety at large. However, technology grows
in all directions and when we make ends meet we come up with better solutions to our
continuously evolving problems.

With the use of modern programming, sensors and actuators, we can improve the safety
of Automated Guided Vehicles and this chapter shows us how. In this chapter we shall
design and make a model of an automated guided vehicle that can avoid obstacles using
MATLAB Simulink.

This model can be annexed to any complete guide-path program and will override the
guide-path whenever an obstacle has been detected. Like any control system it involves
an input a processing unit and an output. These vary according to the kind of detection
and steering system used. In this case we assume the model uses infrared sensors as
inputs and differential motor steering as the form of output. As explained in the
previous section most current AGV that use non-contact obstacle detection are limited
to only two commands; stop when an obstacle is detected, and go when obstacle has
Supervised By: Dr. H.S.Qi
Report By: Sebastian Baboni Tidikwe Page 45
Fuzzy Logic Controller for Automated Guided Vehicle

passed. This provides room for improvement hence the fuzzy logic model implemented
in this project.

In order to have a functioning fuzzy logic system we need an input and a desired output.
Below is the designed Mandani model which involves two inputs, distance and angle
of the object, and two outputs, W1 and W2.

Figure 16 AGV Mandani fuzzy model

Using an IR sensor obstacle distances can be approximated and classified into NR


(near), MID (mid-range) and FAR. Angle of obstacle can be determined by tactically
placing the IR sensors, one for obstacles in front and two for obstacles on either sides
which gives 3 angle inputs; LT (left), FT (front) and RT (right). Outputs W1 and W2 are
the left and right motor speeds respectively. Below is an illustration of basic
membership functions which can be modified according to sensor output parameters.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 46
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 17 Distance membership functions

Figure 18 Angle membership functions

Figure 19 wheel speed membership functions

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 47
Fuzzy Logic Controller for Automated Guided Vehicle

3.1. DEVELOPMENT

3.1.1. MEMBERSHIP FUNCTIONS


Input: SHARP IR SENSOR

Sharp infrared detectors and rangers boast a small package,


very low power consumption and a variety of output options. In
order to maximise each sensors potential, it is important to understand how these types
of sensors work, their effective ranges and how to interface them.

Infrared rangers use triangulation and a small linear CCD array to compute the
distance and/or presence of objects in the field of view. In order to triangulate, a pulse of
IR light is emitted by the emitter. The light travels out into the field of view and either
hits an object or just keeps on going. In the case of no object, the light is never reflected
and the reading shows no object. If the light reflects off an object, it returns to the
detector and creates a triangle between the point of reflection, the emitter and the
detector.

The incident angle of the reflected light varies based on the distance to the object. The
reciever portion of the IR rangers consists of a precision lens that transmits reflected
light onto various portions of the enclosed linear CCD array based on the incident angle
of the reflected light. The CCD array can then determine the incident angle and thus
calculate the distance to the object..

Unfortunately, due to the trigonometry involved in computing the distance based on the
reflected light incident angle, the output of these detectors is non-linear with respect to
the distance being measured. In other words a big change in output voltage does not
always indicate a big change in distance to an object. The graph below taken off the
Acroname website shows an
example of the analog
output voltage vs distance to
an object.

The output of the detectors


within stated range (10cm

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 48
Fuzzy Logic Controller for Automated Guided Vehicle

80cm) is not linear but rather somewhat logarithmic. This curve will vary slightly from detector
to detector so it is a good idea to normalise the output with a lookup table or parameterized
function, this way each detector can be calibrated to be consitent and result in data which varies
nearly linearly realtive to the distance to the object.
Notice that the output drops rapidly once the object is closer than the minimum distance (less
than 10cm) , as a result the output could be confused with a longer range reading. Such readings
can be disastrous if confused with the apparently long range reading. If this errant reading is
not handled correctly, the robot may drive full-speed into the objects. The easisets way to avoid
this is to cross fire the detectors across the width or length of the robot as shown below.

Figure 20 cross firing

(Acroname Inc., 2014)[15]

The sensor output can be linearized by plotting the analog output voltage against the
inverse of the distance of obstacle as shown below.

Using the acquired data about the IR sensor above, the Distance membership
functions can be customized to suit the Sharp IR sensor. Due to the logarithmic change
in the analog output, the gaussmf will be a suitable membership function for the sensor.
With corresponding parameters obtained from the linearized graph, assume NR to be
0cm to 40cm, MID to be 30cm to 70cm and FAR to be 60cm+. Cross-firing the sensors
will result in the sensor detection range being between 10cm and 80cm thus eliminating
interference confusion. Figure 33 shows the modified Distance membership functions.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 49
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 21 developed distance membership functions

Most Sharp IR sensors have a viewing angle that ranges between 25 and 35 so it will
be reasonable to give the sensors an average viewing angle of 30. Figure 34 below
shows the modified Angle membership functions as according to viewing angle.

Figure 22 developed anglemembership functions

Angles 0 to 35 and 145 to 180 are not included in detection range because any
obstacles that could be detected on these angles will be on the side but this project
mainly focuses on obstacles on the robot guide-path. During further development, more
sensors can be added to the system in order to detect obstacles approaching the AGV
from the sides.

Output: DC MOTOR

The output involves a differential drive configuration with two DC motors, Vl and Vr.
Since the motors have a rated voltage of 12V, the output from the inference system will
Supervised By: Dr. H.S.Qi
Report By: Sebastian Baboni Tidikwe Page 50
Fuzzy Logic Controller for Automated Guided Vehicle

be a voltage ranging from 0 to 12V and because the motors speed has a linear
relationship of speed vs voltage the trapmf is suitable for the membership function as
illustrated below.

Figure 23 developed wheel speedmembership functions

Since the motor voltage is regarded as output of the system, a DC motor simulation has
been deemed necessary. To be able to simulate the output, it must be understood how
the DC motors convert electrical energy into mechanical energy.

Figure 24 DC motor

Above is the electrical diagram of a DC motor, its working principle lies in the Lorenz
force created as a consequence of having an electric current going through a conductor
which is placed within an external magnetic field. Following are briefly explained
equations that govern the DC motor.

(1)

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 51
Fuzzy Logic Controller for Automated Guided Vehicle

(2)

(3)

(4)

Where: is the input voltage. is the voltage across the resistor.

is the voltage across the inductor is the back e.m.f

is the velocity constant is the rotor rotational speed

is the rotor torque is the torque constant

is the inertia of the rotor and is the damping coefficient

From these equations it can noticed that there is a linear relationship between the
current in the winding () and the rotor torque () and there a correspondence between
the back e.m.f. ( ) and the rotor rotational speed (). The torque is exerted to accelerate
the rotor and ultimately this mechanical power will be transmitted through a gear set to
the wheel. Therefore part of the torque will cause a rotational acceleration of the rotor,
depending on its inertia, and the rest of the energy will be dissipated in the bearings
according to its viscous friction and the rotational speed. The application will require
certain reduction in order to adapt to the speed (reduced) and torque (increased) and
meet the wheel kinematics needs. Therefore the desired modelling would be:

Figure 25

Moving on to studying the gear reduction effect in more detail it is evident that not only
does it adapt the mechanical variables but it also reduces quadratically the dynamic

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 52
Fuzzy Logic Controller for Automated Guided Vehicle

effect of the wheel inertial and viscous friction on the motor. These equations reveal this
idea precisely:

Using relationships; and and


through substitution we end up with:

Once these equations are gathered, they are arranged and Laplace transformation is
applied. Working out the calculations, the outcome could be represented on the block
diagram as follows;

Figure 26 DC motor simulink model

The input of this sub-system is the voltage of the motor (V1) and it has as outputs, the
linear speed generated by the rotation of the wheel (m/s) and its displacement (m),
which is simply its integral. The large transfer function relates the rotor torque with the
rotor speed considering the wheel dynamic influence and also the gear efficiency. For a
differential drive steering two of these subsystems will be required.

Where:

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 53
Fuzzy Logic Controller for Automated Guided Vehicle

is the distance between wheels

is the robot speed

and are the linear speed of the right and left wheels, respectively.

is the wheel radius

is the turning radius

is the rotational speed of the robot

The average speed and the rotational speed of the mobile platform can be simply
determined as;

Bearing in mind that the linear velocity is the cross product of the rotational velocity
and the distance from the turning point to the centre, in other words the turning radius
as we just need its absolute value:

Next is the modelling of all the differential drive equations in Simulink and related the
according blocks. Therefore, the centre of the robot can be tracked.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 54
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 27 kinematic model

The subsystem at the bottom represents the position of the robot in function of its angle
through time.

(Raul, 2011)

3.1.2. RULES
With information flowing from left to right, from two inputs to two outputs with three
membership functions each, the result is 9 rules as shown below.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 55
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 28 rules

These rules are decided using human logic and can be altered depending on ones
preference. Once decided the rules can be implemented on the rule editor and viewed on
the rule viewer as shown below.

Figure 29 rule editor

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 56
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 30 rule viewer

Once the rules have been implemented the model can be imported to the workspace to
be used in Simulink to simulate the steering model. On the Simulink library is the fuzzy
logic controller block under the fuzzy logic toolbox which is used to interface the fuzzy
model into the simulation. Once in the fuzzy controller block parameters, the matrix
can be viewed by looking under the mask, figure 43 shows how it looks like.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 57
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 31 fuzzy logic simulink model

Now that the fuzzy controller has been implemented, it can now be introduced to the
differential drive kinematic model. The diagram below shows the complete model with
inputs distance and angle as constants in the universe of their respective discourse.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 58
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 32 AGV fuzzy logic complete model

4. RESULTS AND DISCUSSION

In order to see the behaviour of the vehicle, scopes have been placed on points of
interest. With parameters taken off the Faulhaber website for a 2224SR009 DC motor,
the open loop dynamic model was simulated and works as expected. When
uninterrupted the car makes a complete circle which is a sign of steady state steering.
Bear in mind that this will be just a fraction of the whole AGV navigation program.
Once the obstacle has been avoided the vehicle control system will end this program and
return to following the guidepath. All parameters used in the model can be found in the
appendix.

When testing the model, inputs can be any desired constants depending on where you
assume an obstacle to be. The model was tested on three cases of different conditions as
follows;

Case 1: Assume an obstacle 40cm away (0.72V, mid-range) on the right (110), plugged
as the inputs to the system, below are the resulting output graphs;

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 59
Fuzzy Logic Controller for Automated Guided Vehicle

The graphs above illustrate the voltage output from the fuzzy controller in Volts, this
voltage is then fed to the motors to produce the desired steering of the vehicle.

Below is the resulting wheel speeds in m/s.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 60
Fuzzy Logic Controller for Automated Guided Vehicle

The results are positive as they show the differential speed of the motors, this can be
checked with any input and it works fine. The graph below shows the location of the car
on an X and Y graph.

Case 2: Assume
an obstacle 15cm away (1.65V, near) on the left (50).

Figure 50 case 2 Figure 51 case 2 uncut

Case 3: Assume an obstacle more than 80cm away (0.0V, far) on the left (50),

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 61
Fuzzy Logic Controller for Automated Guided Vehicle

Figure 52 case 3 Figure 53 case 3 uncut

Notice the difference in all three cases. Case 1 demonstrates a greater turning radius to
Case 2 because of the differences in distances. The nearer the obstacle to the vehicle the
sharp the turn is expected hence the behaviour in Case 2. The direction of the turn can
also be noticed to change according to angle of obstacle. Case 3 demonstrates the
response of the vehicle when an obstacle is detected far. When left for longer the
vehicle tends to turn to the right gradually, this could be due to the controller error and
can be avoided by optimising.

This model would be most efficient for Free Range AGV Navigation Systems as they are
not required to follow a fixed path to reach their destination. For Fixed Path Navigation
Systems it might require too many modifications to the system program in order for the
obstacle avoidance to be effective as the AGV will have to leave the path to avoid the
obstacle.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 62
Fuzzy Logic Controller for Automated Guided Vehicle

5. CONCLUSION AND RECOMMENDATIONS

5.1. CONCLUSION

In this report the automated guided vehicle has been researched and understood.
this includes historical background, applications, benefits and limitations, safety
as well as general technology

The fuzziness of the AGV was identified needed as most AGVs would only stop
when detecting a vehicle rather than avoiding it. This means if obstacle is
stagnant, AGV will have to stop until object has been moved thus slowing
production and efficiency.

The concepts of fuzzy logic had been well understood and applied to the
fuzziness in the AGV safety. Defining the relevant membership functions and

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 63
Fuzzy Logic Controller for Automated Guided Vehicle

rules and finally building the fuzzy controller using MATLAB fuzzy control
toolbox according to the requirement of the system.

Once the fuzzy controller was implemented it was integrated with Simulink to
test its viability and results came positive showing a steady state cornering of the
AGV with assumed conditions.

5.2. RECOMMENDATIONS

Now that it is understood how fuzzy logic operates, there is infinite directions to take
from here. As this report only demonstrates the function of the fuzzy logic, its only a
basic stage of the fuzzy logic application. Given more time and resources, more can be
accomplished through fuzzy logic. Currently most control systems use C software to
program their control systems which also means most of the microcontrollers would
also support C rather than MATLAB. To be able to integrate the MATLAB fuzzy
logic into a C program, one needs to understand both MATLAB and C. One way to
transfer variables from MATLAB to C is by using the MATLAB coder which can be a
whole report by itself. Also C code can be generated through Kalman Filtering or the
use of MATLAB libraries in C or vice versa.

If there was work done in this project in the future, it is recommended that the program
be tested on physical applications. This includes learning and understanding MATLAB
embedded coding or the use of fuzzy logic libraries in C in order to be able to program a
microcontroller to use on a test robot. From there fuzzy logic interface can be modified
to avoid moving objects by adding more rules and membership functions that can
anticipate non stationary obstacles.

There have been numerous researches on how to optimise fuzzy logic controllers to get
the best outputs from the system, it also recommended to look into optimising the
controller once it has been proven to work on physical test robots. One way to optimise
the system would be by using rotating sensors that will be able to tell exactly where the
object is from the AGV.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 64
Fuzzy Logic Controller for Automated Guided Vehicle

For AGV users such as manufacturers with heavy and mass inventory, it is highly
recommended to have fuzzy logic obstacle avoidance systems annexed to the main
vehicle program to reduce time lost in AGVs when encountering obstacles.

6. REFERENCES AND BIBLIOGRAPHY

1. Acroname Inc., 2014. SHARP INFRARED IR RAGER COMPARISON.


[Online]
Available at: www.acroname.com/articles/sharp.html
[Accessed 7 March 2014].

2. Bandemer, H. & Gottwald, S., 1995. Fuzzy Sets, Fuzzy Logic, Fuzzy
Methods and Applications. reprint ed. England: John Wiley and
Sons.

3. Belohlavek, R. & Klir, G. J., 2011. Concepts and Fuzzy logic, s.l.:
Cambridge.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 65
Fuzzy Logic Controller for Automated Guided Vehicle

4. Dijk, M. V. & Geert, P. V., 2009. Fuzzy Logic Theory, Programming


and Applications. In: R. E. Vargus, ed. The Application of Fuzzy
Logic Principles to Developmental Phsycology. New York: Nova
Science Publishers, p. 15.

5. FROG AGV Systems, 2014. AGV Kennis Instituut. [Online]


Available at: www.frog.nl/oplossingen/AGV_Kennis_Instituut
[Accessed 4 february 2014].

6. Gentili, P. L., 2009. Fuzzy Logic; Theory, Programming and


applications. In: R. E. Vargus, ed. Fuzzy Logic In Molecuar
Computing. new York: Nova Science Publishers, p. 3.

7. Hammond, G., 1986. AGVS AT WORK. bedford: IFS.

8. Hammond, G., 1986. AGVS AT WORK. bedford: IFS, p. 9-10.

9. Hammond, G., 1986. AGVS AT WORK. bedford: IFS, p. 10.

10. Hammond, G., 1986. AGVS AT WORK. bedford: IFS, p. 17-19.

11. Hammond, G., 1986. AGVS AT WORK. bedford: IFS, p. 75.

12. Hammond, G., 1986. AGVS AT WORK. bedford: IFS, p. 75-76.

13. Inc., 2014. Automated Guided Vehicle (AGV). [Online]


Available at: http://www.inc.com/encyclopedia/automated-guided-
vehicle-agv.html
[Accessed 7 february 2014].

14. MathWorks, 1994-2014. mathworks. [Online]


Available at: http://www.mathworks.co.uk/help/fuzzy/foundations-
of-fuzzy-logic.html
[Accessed 20 October 2013].

15. MathWorks, 1994-2014. mathworks. [Online]


Available at: http://www.mathworks.co.uk/help/fuzzy
[Accessed 22 january 2014].

16. Miller, R. K., 1987. Automated Guided Vehicles and Automated


Manufacturing. 1st ed. Michigan: Society Of Manufacturing
Engineers.

17. Miller, R. K., 1987. Automated Guided Vehicles and Automated


Manufacturing. 1st ed. Michigan: Society Of Manufacturing
Engineers, p. 2.

18. Miller, R. K., 1987. Automated Guided Vehicles and Automated


Manufacturing. 1st ed. Michigan: Society Of Manufacturing
Engineers, p.2-3.

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 66
Fuzzy Logic Controller for Automated Guided Vehicle

19. Nguyen, H. T. & Walker, E. A., 1997. A First Course in Fuzzy Logic.
Florida: CRC Press.

20. Nguyen, H. T. & Walker, E. A., 1997. A First Course in Fuzzy Logic.
Florida: CRC Press, p. 2.

21. Nguyen, H. T. & Walker, E. A., 1997. A First Course in Fuzzy Logic.
Florida: CRC Press, p. 3-5.

22. Raul, 2011. Kinematic model of a differential drive robot. [Online]


Available at: www.webdelcire.com/wordpress/archives/527
[Accessed 15 march 2014].

23. Ross, T. J., 2004. fuzzy logic with engineering applications. West
Sussex: john wiley and sons.

24. Vargus, R. E., 2009. Fuzzy Logic; Theory, programming and


applications. New York: Nova Science Publishers.

25. Vargus, R. E., 2009. Fuzzy Logic; Theory, programming and


applications. New York: Nova Science Publishers, p. vii.

26. Xushu, W., Da, R. & Kerre, E. E., 2009. Mathematics of Fuzziness -
Basic Issues. vol 245 ed. Berlin: Springer.

27. Xushu, W., Da, R. & Kerre, E. E., 2009. Mathematics of Fuzziness -
Basic Issues. vol 245 ed. Berlin: Springer, p. 21-22.

28. Xushu, W., Da, R. & Kerre, E. E., 2009. Mathematics of Fuzziness -
Basic Issues. vol 245 ed. Berlin: Springer, p. 21.

29. Xushu, W., Da, R. & Kerre, E. E., 2009. Mathematics of Fuzziness -
Basic Issues. vol 245 ed. Berlin: Springer, p. V.

30. Xushu, W., Da, R. & Kerre, E. E., 2009. Mathematics of Fuzziness -
Basic Issues. vol 245 ed. Berlin: Springer, p. 22

7. APPENDIX

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 67
Fuzzy Logic Controller for Automated Guided Vehicle

7.1. GANTT CHART

7.2. HEALTH & SAFETY, ETHICS AND


SUSTAINABILITY

The principal aim of this report is to solve safety problems in automated guided
vehicles. Components needed for the proposed model to function are already installed in
AGVs being produced at the moment. The AGVs themselves can have long term
consequences to the environment as they use components such as batteries which
require exploitation of natural resources to be produced. Progression in this sector of
technology threatens human welfare as it replaces manual labour leaving work for only
the qualified and professionals in higher education. On the bright side, this model can
be annexed to almost any kind of automated guided vehicle with only little modification
made to the vehicle and in most cases only the control program needs to be edited,
leaving a safer working environment for human, robots and inventory.

7.3. PARAMETERS

clear
clc

Dist_wheels=0.12; %m

%DC motor model for a Faulhaber 2224SR009 IE2-16

R=8.71; %Resistance Ohm


L=130e-6; %Inductance H
Km=11.12e-3; %Torque Nm/A
Ke=1.115e-3*60/(2*pi); %EMF constant V/rads
Jrot=2.7e-7; %Rotor inertia Kg*m2
Brot=0; %Rotor friction
Jwheel=4.013e-6; %Wheel inertia Kg*m2
Bwheel=0; %Output gear friction
ro=0.9; %Gear ratio performance
n=8; %Gear ratio
Rwheel=0.065/2; %m
rads2rpm=60/(2*pi); %conversion
rads2mps=Rwheel*(2*pi)/(2*pi); %conversion

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 68
Fuzzy Logic Controller for Automated Guided Vehicle

Supervised By: Dr. H.S.Qi


Report By: Sebastian Baboni Tidikwe Page 69

You might also like