sct assignment 3
TRANSCRIPT
-
7/29/2019 Sct Assignment 3
1/24
SCT ASSIGNMENT 3
M.TECH (PID) 12341D4212
1.A fusion Approach of Multispectral Images with SAR Image for flood area
analysis.
ANSWER:
The 20092010 Data Fusion Contest organized by the Data Fusion Technical Committee of theIEEE Geoscience and Remote Sensing Society was focused on the detection of flooded areas
using multi-temporal and multi-modal images. Both high spatial resolution optical and synthetic
aperture radar data were provided. The goal was not only to identify the best algorithms (in
terms of accuracy), but also to investigate the further improvement derived from decision fusion.This paper presents the four awarded algorithms and the conclusions of the contest, investigating
both supervised and unsupervised methods and the use of multi-modal data for flood detection.
Interestingly, a simple unsupervised change detection method provided similar accuracy assupervised approaches, and a digital elevation model-based predictive method yielded a
comparable projected change detection map without using post-event data.
The Data Fusion Technical Committee (DFTC) of the IEEE Geoscience and Remote
Sensing Society serves as a global, multi-disciplinary network for geospatial data fusion,
connecting people and resources. It aims at educating students and professionals, and promoting
the best practices in data fusion applications [1]. The Data Fusion Contest hasbeen annually organized by the DFTC since 2006 [2][4]. It is open not only to IEEE members,but to everyone, with the aim of evaluating existing methodologies at the research or operational
level to solve remote sensing problems using data from different sources. In 20092010, the aim
of the Contest was to perform change detection using multi-temporal and multi-modal data. Twopairs of data sets were available over Gloucester, UK, before and after a flood event occurred in
November 2000. The class change was the river and class no change was the areas thatstayed dry. The optical and synthetic aperture radar (SAR) imageswere provided by the CentreNational dtudes Spatiales (CNES).The participants were allowed to use a supervised or anunsupervised method with all the data, the optical data only, or the SAR data only. Accordingly,six categories were considered to account for different submissions:
SupervisedAll dataSupervisedOptical dataSupervisedSAR data
UnsupervisedAll dataUnsupervisedOptical dataUnsupervisedSAR data
As for the previous editions of the Contest, the ground truth used to assess the results was not
provided to the participants. However, about 60,000 samples were made available fortraining the supervised methods. The single results among all categories were validated and
-
7/29/2019 Sct Assignment 3
2/24
ranked using the estimated Cohens Kappa statistic (orKcoefficient).Then, the best 5 individualalgorithms among all submissions were used to perform decision fusion with majority voting.
The four winning algorithms are briefly described as follows:
1) Supervised method with all data: a supervised neural network approach was proposed toexploit both the optical and SAR images to create a change detection map; the flooded and non-flooded map regions were successively homogenized using a minimum mapping unit
morphological operator.
2) Supervised method with optical data only: it used spatial contextual features extracted fromthe near-infrared (NIR) band of the post-event image (where the flooded areas weremore
distinguishable); themorphological features extracted were stacked to form a ten-dimensional
multi-temporal data set and fed as inputs to a support vector machine (SVM) classifier.
3) Unsupervised method with optical data only: this technique also exploited the relatively high
absorption of water in the NIR band to guide an unsupervised clustering algorithm.
4) A predictive model: a predictive model was used to project post-flood change by exploiting a
digital elevation model (DEM). This model may be helpful to rescue planning during the very
first hours after a flood occurs when the post-event data may still be unavailable.
This paper is organized as follows. First, a short literature review is illustrated in Section II,
whereas the data set used for the Contest is described in Section III. The four winning algorithms
are presented in Sections IVto VII. Finally, decision fusion is discussed in Section VIII, as wellas conclusions and perspectives drawn by this Contest.
In the past few years, there has been a growing interest in the development of change
detection techniques for the analysis of multi-temporal imagery. This interest stems fromthewide range of applications in which change detection methods can be used, such as urban and
environmental monitoring, agricultural and forest surveys, and, as with this years Contest,disaster management.
Supervised and unsupervised approaches proposed in
the literature are here briefly reviewed.
A.Supervised Change DetectionSupervised change detection aims at defining classification rules by modeling labeled examplesprovided by the user, accounting for the different classes of land-cover transitions.When dealingwith high to very high spatial resolution (VHR) imagery (either optical or SAR data sets), the
comprehensive labeled set can be extracted by photo-interpretation of the multi-temporal images.
Two main supervised approaches are found in the literature:
-
7/29/2019 Sct Assignment 3
3/24
Post classification comparisons, where classification is performed independently at each time
instant, and a successive comparison defines a change map; and multi-date classification, where
multi-temporal information is considered simultaneously for classification.
In the first case, a logical comparison is most often performed on the classification
outcomes at each time instant . This approach may not be optimal for VHR imagery, because itmay accumulate single image classification errors. As a result, post classification comparisongenerally provides noisy maps, and changes in viewing acquisition can make the final map
difficult to be interpreted. To avoid these errors, an approach based on post-classification
masking has been proposed in, where a binary neural network is used to remove spuriousdetections, or in, where change vector analysis is used for the same purpose.
On the contrary, multi-date classification converts change detection into a multi-temporal
classification problem. The two images are combined into a multi-temporal representation
(through vector stacking or multi-variate difference) before analysis and a model is defined using
this multi-temporal feature space. For example, supervised multi-temporal classification was
implemented using SVM while in Camps-Valls et al. defined a set of specific kernel functions
for the problem of multi-temporal classification. Finally, recent works studied the relationship
between the efficiency of change detectors and scarceness of labeled information using semi-
supervised methods.
B.Unsupervised Change DetectionMuch of the recent work on unsupervised multi- and hyperspectral image analysis has attempted
to integrate spatial information to improve algorithm performance .In a fuzzy clusteringapproach that incorporates spatial information for segmentation of remote sensing data sets was
investigated. A hierarchical clustering algorithm that exploits spatial informationfor segmentation was described . Spatial- spectral clustering using Gaussian Markov random
fields for scene segmentation and anomaly detection was presented. Similarly, integration ofspatial information into spectral unmixing of multi- and hyper-spectral data was investigated.
The integration of domain specific knowledge has been used in a number of systems fordetection of various materials or objects. This knowledge may be based on the sensing platform,
subjects being sensed, or physical phenomena affecting the system. Such techniques are
discussed where the expected spectral shape of vegetation in the long wave infraredwas used to guide an unsupervised algorithm for the detection of vegetation in remotely sensed
data.
Bridges are detected using rules which leveraged the known spatial arrangementsof bridge pixels with respect to water and concrete in conjunction with classification algorithms.
In the context of SAR image analysis, the problem of unsupervised change detection has been
addressed with less emphasis with respect to optical imagery. Recent studies have investigated
different aspects, including image de-speckling and optimal threshold selection whereasstatistical and fuzzy approaches have been discussed .
-
7/29/2019 Sct Assignment 3
4/24
TABLE I
SPECTRAL BANDS OF THE OPTICAL SPOT SATELLITE. ONLY THE
MULTI-SPECTRAL BANDS WERE USED AS INPUT FOR THE CHANGE
DETECTION PROBLE
TABLE II
ERS SAR SATELLITE SPECIFICATIONS
-
7/29/2019 Sct Assignment 3
5/24
TABLE III
CONFUSION MATRIX AND K COEFFICIENT FOR THE SUPERVISED CHANGE
DETECTIONALL DATA
TABLE IVCONFUSION MATRIX AND K COEFFICIENT FOR THE SUPERVISED CHANGE
DETECTIONOPTICAL DATA
-
7/29/2019 Sct Assignment 3
6/24
TABLE V
CONFUSION MATRIX AND K COEFFICIENT OR THE UNSUPERVISED CHANGE
DETECTIONOPTICAL DATA
TABLE VI
CONFUSION MATRIX AND K COEFFICIENT FOR THE PREDICTIVE METHOD
-
7/29/2019 Sct Assignment 3
7/24
2.The Traveling Salesman Problem: Optimizing Delivery Routes Using
Genetic Algorithms.
ANSWER:The purpose of this paper is to discuss the methodology of optimizing delivery route scheduling
using genetic algorithms to solve the Multiple Traveling Salesman Problem (mTSP). Thetraveling salesman problem (TSP) is a combinatorial optimization problem where a salesmanmust find the shortest route to n cities and return to a home base. While the TSP restricts itself to
one salesman, the mTSP generalizes the problem to account for multiple salesmen.
With robust clustering and genetic algorithm procedures, SAS provides an ideal
environment to solve this type of problem. In order to utilize SAS to optimize the deliveryroutes, clustering will be used, via PROC FASTCLUS, to transform the mTSP problem into a setof traditional TSP problems. These single TSP problems will then be solved using genetic
algorithms, via PROC GA, and visualized using PROC SGPLOT. Finally, the genetic algorithm
solutions will be compared to the greedy algorithm solution in terms of optimal tour distances
and processing speed.
A company must optimize their daily delivery route scheduling from a central warehouse.
One hundred packages must be delivered and five trucks are available. The purpose is to assigneach truck a set of packages and find the route that each truck should take to minimize distance.
Additional costs such as traveling time and gas are implied in the distance traveled. Table 1 lists
the addresses for the first five packages that must be delivered.
-
7/29/2019 Sct Assignment 3
8/24
SAS provides the perfect platform to solve this problem using traditional TSP techniques such
as genetic algorithms and the greedy algorithm. The data provided in this section was read into aSAS dataset that was used to cluster the packages together, solve the clusters using genetic
algorithms, graph the solution, and compare the genetic algorithm solution to the greedy
algorithm solution
THEORY
THE TRAVELING SALESMAN PROBLEM
The traveling salesman problem (TSP) is categorized as being a combinatorial optimization
problem. Combinatorial optimization problems are problems that attempt to find an optimalobject from a finite set of objects. In this case, the goal is to find the optimal tour (path to visit
cities) given all possible tours. In this sense, an optimal tour is one in which distance is
minimized. Computationally, the TSP is difficult to solve for a large number of cities as the
solving time increases exponentially for every increase in n. Thus, approximation and heuristic
algorithms are often used to solve these problems.The delivery route scheduling problem is one representation of the TSP, where a city is a
delivery address (i.e. package) and a salesman is a truck. Additional TSP applications includeplanning, logistics, microchip manufacturing, etc. In these examples, a city can represent
customers, soldering points, DNA fragments, etc. Similarly, distance represents traveling time or
cost.
THE MULTIPLE TRAVELING SALESMAN PROBLEM
The multiple traveling salesmen problem expands the traditional TSP to allow for multiple
salesmen. Thus, each city must be visited exactly once by any salesman. The key characteristics
of the mTSP determine the depot (single depot, multiple depots) and destination (fixeddestination, non-fixed destination). In our case, every salesman departs from a single warehouseor depot. Additionally, every salesman must return to the starting city (i.e. GIS coordinate) and
thus has a fixed destination. To date, no efficient algorithm exists for the solution of a large-scale
mTSP. Traditionally, cities are clustered together and assigned to different salesman, thus
converting the mTSP problem into multiple TSP problems.
GENETIC ALGORITHMS
-
7/29/2019 Sct Assignment 3
9/24
One method used to solve this type of problem is genetic algorithms. Genetic algorithms are
search heuristics that attempt to find an optimal solution based on a process of natural selectionand evolution. The process involves generating random solutions and applying genetic operators
in hopes that the solution will evolve to find the optimal solution. This process can be
characterized by four stages:
During initialization, a random set of solutions is generated to form an initial population. These
random solutions are generated from the entire range of possible solutions (the search space).Once an initial population has been formed, the solutions are evaluated based on the fitness
function (equivalent to an objective function). The best solutions are then selected to breed a new
population. During the reproduction phase, genetic operators are applied to the solutions in orderto breed new characteristics. The most commonly used operators are mutation and crossover:
Crossover operations involve combining two solutions (parents) to produce moresolutions (children). Genetic material from the previous generation is given to the
subsequent generation maintaining fitness strength. Mutation operations involve randomly changing some characteristics of a solution. This
introduces a certain amount of randomness into the search and prevents premature
convergence to a sub-optimal solution.
Once a new population has been bred, it is again evaluated for fit and the best solutions are
selected to continue. This process repeats until a terminating condition has been reached. In thiscase, the terminating condition is a set number of iterations. Once terminated, the best solution in
the current population is selected as being the optimal solution.
MODELING APPROACHIn order to solve the delivery route scheduling assignment, a three step approach was used. The
SAS code used to generate this solution can be found in the references section.
STEP 1: CLUSTER PACKAGES TOGETHER
-
7/29/2019 Sct Assignment 3
10/24
The k-means algorithm was used to group similar GIS coordinates together using PROC
FASTCLUS. PROC FASTCLUS is a SAS procedure that performs a disjoint cluster analysis
using Euclidean distances.This method involves assigning each observation to a cluster through calculating cluster
centroid distances. K-means (i.e. PROC FASTCLUS) is a more efficient clustering algorithm for
larger datasets as compared to the lengthier hierarchical clustering (i.e. PROC CLUSTER).When using PROC FASTCLUS, the following considerations should be made:
1) The variables that are being clustered may need to be standardized if they have different
scales. This is done to ensure that the scale of the variable does not unduly influence theEuclidean distance calculations.
2) PROC FASTCLUS can be extremely sensitive to outliers. In fact, FASTCLUS can be a good
outlier detection method as these observations appear as single stand-alone clusters in the
FASTCLUS output.
3) With smaller datasets (
-
7/29/2019 Sct Assignment 3
11/24
STEP 2: SOLVE THE TSP CLUSTERS USING GENETIC ALGORITHMS
The TSP clusters were solved using genetic algorithms, via PROC GA. PROC GA is a SAS
procedure used to implement genetic algorithm searches. This procedure combines the efficiency
of SAS programming techniques and genetic algorithm function calls. The data is initializedusing programming statements similar to a SAS DATA step,allowing the user to leverageefficient SAS programming statements to manipulate the data and ready it for analysis.
Genetic algorithm function calls are then used to utilize the genetic algorithm solver to arrive at asolution.
In the PROC GA call, the final solution (i.e. optimal tour) was outputted to a SAS dataset usingthe lastgen= option.
This dataset was used to create a graphical representation of the optimal tour after solving the
TSP problem.
-
7/29/2019 Sct Assignment 3
12/24
STEP 3: COMPARE GENETIC ALGORITHM SOLUTION TO GREEDY
ALGORITHM SOLUTION
After solving and graphing the individual TSP problems using genetic algorithms, the solutions
were compared to the greedy algorithm in terms of processing speed and optimal tour distances.The greedy algorithm is a simplistic algorithm used to solve TSP problems that can provide good
tour matches in a short amount of time. The greedy algorithm makes greedy choices in that itchooses to iteratively visit the closest unvisited city. Essentially, the algorithm sorts the cities
based on ascending Euclidean distance and choses to visit the closest unvisited city. This processis repeated until all cities are visited. Although this algorithm produces good tour matches, it
does not guarantee that the total distance will be minimized. In fact, for some specific cases the
greedy algorithm has been shown to produce the worst possible solution.
-
7/29/2019 Sct Assignment 3
13/24
RESULTS
After clustering the packages together, PROC GA was used to solve the five TSP problems.Table 4 displays the genetic algorithm results.
The outputted datasets were then used to visualize the solution. Figure 3 displays the optimal
path for Truck 1.
Figure 3 shows that the optimal path generated by the genetic algorithm seems to be logical.
Meaning, no intersecting paths were generated from this solution. After verifying that the
solution follows a reasonable path, the solutions were compared to the greedy algorithm to gauge
processing speed. Table 4 displays the tour distances for both methods and the increase in
processing time incurred through using the genetic algorithm.
-
7/29/2019 Sct Assignment 3
14/24
In comparing the two methods, the genetic algorithm often provided an optimized solution to the
traveling salesman problem with shorter tour distances. However, processing time also increasedwith an average increase of 2.54 seconds. Although, the processing time may change depending
on the complexity and size of the problem, the results seen in Table 4 display that genetic
algorithms provide a competitive alternative to greedy algorithms in solving the traveling
salesman problem. When using genetic algorithms to solve this type of problem, the followingconsiderations should be made:
1) The selected genetic algorithm options (initial size of the population, rate of mutation and
crossover, selection type, and termination criterion) may affect the ability to converge to anoptimal solution. These values should be selected with care using a trial-and-error approach to
ensure that the genetic algorithm does not converge to a sub-optimal solution.
2) Genetic algorithms are not guaranteed to find the global optimum. Various factors includingthe selected options and deceptive individual strength can cause premature convergence. If a
certain individual emerges early in the search as being a strong competitor, it may bias the search
to converge on a local optimum that represents the competitor rather than a global optimum.
3) Processing time may increase depending on the size and complexity of the problem
3. FUZZY LOGIC CONTROL FOR AN AUTONOMOUS ROBOT.
ANSWER:
FUZZY LOGIC CONTROL FOR AN AUTONOMOUS ROBOT :
In this paper an autonomous wall-following robot is presented. The inputs are obtained fromultrasonic sensors mounted. These inputs are sent to a Microchip PIC16F877 microcontroller
onboard the robot, which analyses the data and provides the necessary control signal. A fuzzy
logic controller is used to control the robots motion along the predefined path. The robot was
first modeled in Matlab Simulink and the fuzzy logic rules were optimized for the best resultspossible. Later the microcontroller was programmed in C language using a PCW C-compiler and
tested. Experimental results are presented to show the performance of the
controller.Mobile robots are mechanical devices capable of moving in an environment with a
certain degree of autonomy. Autonomous navigation is associated with the availability of
external sensors that capture information from the environment through visual images, orthrough distance or proximity measurements. The most common sensors are distance sensors
-
7/29/2019 Sct Assignment 3
15/24
(ultrasonic, laser, etc.) capable of detecting obstacles and of measuring the distance to walls
close to the robot path. When advanced autonomous robots navigate within indoor environments
(industrial or civil buildings), they have to be endowed with the ability to move throughcorridors, to follow walls, to turn corners and to enter open areas of the rooms.
In attempts to formulate approaches that can handle real world uncertainty, researchers are
frequently faced with the necessity of considering tradeoffs between developing complexcognitive systems that are difficult to control, or adopting a host of assumptions that lead tosimplified models which are not sufficiently representative of the system or the real world. The
latter option is a popular one which often enables the formulation of viable control laws.
However, these control laws are typically valid only for systems that comply with
imposed assumptions, and that operate in small neighbourhoods of some nominal state. The
option that involves complex systems has been less prevalent due to the lack of analytical
methods that can adequately handle uncertainty and concisely represent knowledge in practicalcontrol systems. Recent research and application employing non-analytical methods of
computing such as fuzzy logic, evolutionary computation, and neural networks have
demonstrated the utility and potential of these paradigms for intelligent control of complexsystems.In particular, fuzzy logic has proven to be a convenient tool for handling real world
uncertainty and knowledge representation.
A. Literature Survey
As regards the corridor and wall-following navigation problem, some control algorithms based
on artificial vision have been proposed. In [1], image processing is used to detect perspective
lines to guide the robot along the center axis of the corridor. In [2], two lateral cameras mounted
on the robot are used, and the optical flow is computed to compare the apparent image velocity
on both cameras in order to control robot motion. In [3, 4], one camera is used to drive the robot
along the corridor axis or to follow a wall, by using optic flow computation and its temporal
derivatives. In [5], a globally stable control algorithm for wall-following based on incremental
encoders and one sonar sensor is developed. In [6], a theoretical model of a fuzzy based reactive
controller for a nonholonomic mobile robot is developed. In [7], an ultrasonic sensor is used to
steer an autonomous robot along a concrete path using its edged as a continuous landmark. In
[8], a mobile robot control law for corridor navigation and wall following based on sensor and
odometric sensorial information is proposed.
B. Paper Layout
In Section II the mathematical model of the robot is developed. In Section III the fuzzy logiccontroller is developed and discussed in detail. In Section IV the hardware and software design
of the robot are discussed in detail. Performance comparisons are given in Section V to
demonstrate the efficiency of the proposed method. Finally the conclusions drawn from the
results obtained are given in Section VI.
II. MATHEMATICAL MODEL
-
7/29/2019 Sct Assignment 3
16/24
A. Objective
The robot that is to be controlled was initially built to take part in an IEEE competition, held at
Cleveland State University in 2004. The goal of this competition is to compete head to head on a
playing board with an opponent and obtain the most points in an allotted amount of time. Thedimensions of the robot had to be within those specified in the competition. The robot had to fit
within a 1.5-foot square and could not exceed 1.5 feet in height. It had to be totally autonomous,
couldnt transmit or receive signals to or from the outside of the playing area, and could not beequipped to intentionally harm its opponents. It also couldnt carry any onboard cameras. Themain goal of this work, keeping in mind the requirements of the competition,was to cover as
much of the playing area as possible within the shortest time so that the maximum points could
be scored. The robot that was built placed second among eleven other competitors from differentschools.This type of robot has many applications, including habitat mapping, environmental
monitoring, mapping and surveillance, search and rescue operations, planetary surface
exploration, agriculture, manufacturing, and service.
B. Types of Robotic Behaviors and Controllers
A mobile robot could be modeled in numerous ways, but the most important factor for defining
the model would be the application and the complexity involved. The mobile robot designed in
this work is a wheeled robot intended for indoor use as opposed to other types (legged, airborne,
and submersible mobile robots). This robot type is the easiest to model, control, and build. There
are various behaviours that could be modeled, like wall following, collision avoidance, corridor
following, goal seeking,adaptive goal seeking, etc. With the competition in mind we thought of
implementing a wall following robot. This robot would follow the boundaries of the playing area
and cover a maximum area in a predefined path programmed into its onboard microcontroller.
Various control techniques have been proposed and are being researched. The control
strategies of mobile robots can be divided into open loop and closed loop feedback strategies. In
open loop control, the inputs to the mobile robots (velocities or torques) are calculated
beforehand, from the knowledge of the initial and end position (and of the desired path between
them in the case of path following). This strategy cannot compensate for disturbances and model
errors. Closed loop strategies,however, may give the required compensation since the inputs are
functions of the actual state of the system and not only of the initial and end points. Therefore
disturbances and errors causing deviations from the predicted state are compensated by the use of
the inputs. Of the many available closed loop control systems, including P (proportional) control,PI (proportional integral) control, and PID (proportional integral derivative) control, fuzzy logic
control was selected as it was easiest to implement for a highly nonlinear robot model.
Although a relatively new concept, fuzzy logic is being used in many engineering
applications because it is considered by designers to be the simplest solution available for the
specific problem. What gives fuzzy logic advantages over more traditional solutions is that it
-
7/29/2019 Sct Assignment 3
17/24
allows computers to reason more like humans, responding effectively to complex inputs to deal
with linguistic notions such as 'too hot', 'too cold' or 'just right'. Furthermore, fuzzy logic is well
suited to low-cost implementations based on cheap sensors, lowresolution analog-to-digital
converters, and 4-bit or 8-bit microcontroller chips. Such systems can be easily upgraded by
adding new rules to improve performance or add new features. In many cases, fuzzy control can
be used to improve existing traditional control systems by adding an extra layer of intelligence to
the current control method. In many cases, the mathematical model of the system to be
controlled may not exist, or may be too "expensive" in terms of computer processing power and
memory, and a system based on empirical rules may be more effective.
Implementing the enhanced, traditional P controller can be a challenge, especially if auto-
tuning capabilities to help find the optimal P constants are desired. However, the theory of P
control is very well known and widely used in many other control applications. On the otherhand, fuzzy control seems to accomplish better control quality with less complexity (if tuning or
gain scheduling is needed for the P approach).Approximation of the second-order switching
curve used in time-optimal control systems by a polynomial of the first or higher order makesfuzzy control a better candidate for time-optimal control applications [10]. As a relatively newcontrol method, fuzzy logic provides more space for further improvements.
Originally advocated by Zadeh [11] and Mamdani and Assilian [12], fuzzy logic has become ameans of collecting human knowledge and experience and dealing with uncertainties in the
control process. Now fuzzy logic is becoming a very popular topic in control engineering.
Considerable research and applications of this new area for control systems have taken place.Control is by far the most useful application of fuzzy logic theory, but its successful applications
to a variety of consumer products and industrial systems have helped to attract growing attention
and interest.
Based on its design simplicity, its ease of implementation, and its robustness properties, a
fuzzy logic controller is used in this paper to control the navigation behaviour of an autonomous
mobile robot.
-
7/29/2019 Sct Assignment 3
18/24
Fig. 1 Kinematic model of the robot
-
7/29/2019 Sct Assignment 3
19/24
-
7/29/2019 Sct Assignment 3
20/24
III. FUZZY LOGIC CONTROLLER
The FLC used has two inputs: error in the position and error in the angle of the robot. Thus the
FLC is a two input, two output system.
Fig. 2 shows the robot in Cartesian space. It is clear
that the two inputs are error in angle of orientation and
error in distancex. The output of the controller (that is, the
control signals) would be pulse-width-modulated signals tocontrol the angular velocity of the two servo wheels. The
block diagram of the robotic system is given in Fig. 3.
-
7/29/2019 Sct Assignment 3
21/24
A. Fuzzy Inference SystemIn the fuzzy inference system designed in our system, the membership functions of the linguistic
variables are sum normal triangular functions. That means that the sum of the membershipfunctions of any variables at any given point in the domain is equal to one. The triangular
membership functions are used for their simplicity as is quite commonly done. Calculating
fuzzified inputs and the areas of these functions is simple and fast when compared to othermembership functions such as Gaussian. The rule base for the FLC proposed in this study is
listed in Tables I and II below. Thus we see that there are 18 total rules for the two wheels
combined. Of these rules, at any instant only two given rules are fired thus making it easier tounderstand and debug the rules.
Fig. 4 Picture of the robot.
A. Hardware Model Description
-
7/29/2019 Sct Assignment 3
22/24
The robot has two wheels on its sides which are driven separately by two modified servo motors,
and there is a roller wheel in front for balance as well as for smooth turning. The two servo
motors used are MX-50Hp manufactured by MPI and are rated at 4.8 VDC. These are run using
PWM signals generated from the PIC16F877 microcontroller. A pulse with a 15 ms time period
and an on -time of 1500 us will stop the rotation of the motors. If the on-time of the pulse is
changed from 1500 to 1000 us the wheel rotates with increasing velocity in the clockwise
direction. Similarly if the on-time of the pulse is changed from 1500 to 2000 us the wheel rotates
with increasing velocity in the anticlockwise direction.
The sensors used on the robot are SRF04 ultrasonic range finder, two on a side and one in
the front. The transmitter works by transmitting a pulse of sound outside the range of human
hearing at 40 KHz. This pulse travels at the speed of sound away from the ranger in a cone shape
and the sound reflects back to the ranger from any object in the path of sonic wave. If received
back at the ranger, the ranger reports this echo to the microcontroller and the microcontroller can
then compute the distance to the object based on the elapsed time. Due to the hardware
limitations it is not possible to achieve good robot control results by doing the fuzzy calculations
on board the autonomous robot, as the system clock is only 4 MHz. This results in about 0.4
seconds to complete the whole process of fuzzification and defuzzification, and thus the response
of the system in real time is too slow to allow the robot to attain a steady state.
Thus we have used a lookup table instead for fuzzy logic control, and also two PIC16F77
chips are used. One is exclusively used to generate the PWM signals to run the two servo motors.
The other microcontroller is connected to the sensors and calculates the present errors in distance
and angle and sends the necessary control signals to the microcontroller connected to the servo
motors. Figure 5 shows a block diagram of the hardware setup.
B. Simulink Model Description
-
7/29/2019 Sct Assignment 3
23/24
The Simulink model is shown in Fig. 6. The fuzzy block in the Simulink model is a customized
Matlab m-file function block replacing Matlabs fuzzy logic toolbox. The output variables X, Y,and T are the two Cartesian coordinates of the robot position, along with its angular orientation.
The Xref input is intended to keep the robot a certain distance away from the wall which it is
following. The Tref input is zero, as it is intended that the orientation of the robot be maintained
at a zero angle relative to the wall. The process and measurement noise are shown in the
Simulink block diagram as white noise.
V. EXPERIMENTAL RESULTS
The plots in Figs. 7 and 8 shown below compare the simulation results obtained of the response
of the robot both with a FLC and a P controller. The P controller was tuned for optimum resultsusing a genetic algorithm. The robot is asked to maintain a distance of 4 inches from the wall. It
is seen that the robot starts from zero and aligns itself to the reference distance. Fig. 7 shows the
angle of orientation of the robot as a function of time. Fig. 8 shows the distance from the wall as
the robot tries to reach the reference distance. The solid lines represent the response of the robotwith a fuzzy logic controller and the dashed lines represent the response of the robot with a P
controller. It is obvious that the FLC is performing much better than the P controller, as it is seen
that the robot reaches a steady state much earlier with a FLC than a P controller.
-
7/29/2019 Sct Assignment 3
24/24
The results above are those obtained with computer simulations in Simulink. These were verifiedto be comparable with those obtained during real time implementation / experimentation with the
PIC16F877 microcontroller. It was also observed that due to speed limitations of the
microcontroller, the response was comparable only when a lookup table was used to implementthe FLC, rather than calculating the control signals using the FLC equations.