26
A Framework for Multi-agent A Framework for Multi-agent Discrete Event Simulation: V-Lab® Discrete Event Simulation: V-Lab® Prasanna Sridhar Shahab Sheikh-Bahaei 12/05/2003 Autonomous Control Engineering University of New Mexico This work was supported by NASA AMES under grant NAG 2-1547

Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Embed Size (px)

Citation preview

Page 1: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

A Framework for Multi-agent A Framework for Multi-agent Discrete Event Simulation: V-Lab®Discrete Event Simulation: V-Lab®

Prasanna SridharShahab Sheikh-Bahaei

12/05/2003Autonomous Control Engineering

University of New Mexico

This work was supported by NASA AMES under grant NAG 2-1547

Page 2: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

V-Lab®• V-Lab® Environment Layers

– Hardware Networking • Networking foundation for

inter-machine communication– Middleware

• Software environment for inter-process communication

– IDEVS• Library of tools for soft

computing in DEVS formalism– V-Lab®

• Organizational structure for DEVS objects.

• Management objects to control time and message flow in multi-agent systems

PHYSICAL NETWORK

MIDDLEWARE

I-DEVS

V-Lab

Page 3: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Inside Layered Architecture

middleware

AtomicModel

CoupledModel

simman

Page 4: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

V-lab® • Uses the IDEVS

structure for creating objects

• Provides inbuilt agents and physics to model multi-agent multi-physics system

• SimMan is the message router to perform indirect message passing.

• Hierarchical TreeSimEnv

Agents

Agents

Physics

Agents

SimMan Physics

Page 5: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

SimMan and SimEnv• SimEnv

– Highest leveled coupled model– Instatiates all other models– Houses all other models– Couples all other models

together• SimMan

– Message liaison providing indirection between all other models

– Controls flow of time and messages between models for the simulation

SimEnv

SimMan

Agent

Agent

Agent

Agent

Page 6: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Parsing

• A grammar defines rules for building syntactically correct programs.

• One way of defining grammar is through BNF (Backus-Naur Form)

• BNF of our simulation configurations is translated JavaCC format and saved as file parseConfig.jj

• When parseConfig.jj is compiled by JavaCC, it generates a Java file parseConfig.java. Parsing can be done by instatiating an object of parseConfig.java

Page 7: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Sample Config file

robo2 = Robot.Robot; //agentrobo3 = Robot.Robot; //agentrobo4 = Robot.Robot; //agentrobo5 = Robot.Robot; //agentrobo6 = Robot.Robot; //agentrobo7 = Robot.Robot; //agentterr = Robot.Terrain;

Page 8: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Need for Agent Manager

4 agents connected together 18 agents connected

18 agents connected with manager

manager

Page 9: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Message routing

A1

SimMan

R1

A2

A3A4

A5

R1:A2, A4, A5R2:A1,A3

R1

R1

R1

Legend:A1,A2,A3,A4,A5: AgentsR1: Request MessageR1: A2 , A4,… : Database for request/response

A1

SimMan

Re

A2

A3A4

A5

R1:A2, A4, A5R2:A1,A3

Re

Re

Re

Legend:A1,A2,A3,A4,A5: AgentsRe: Response MessageR1: A2 , A4,… : Database for request/response

Re R

e

Potential repliers can be known by special messages

Page 10: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

I-DEVS

DEVSJAVALibrary

Soft Computing

I-DEVSLibrary Extension

of DEVSJAVAclasses

Efficient wayof handlingTime parameters

Page 11: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Simulation Results

Page 12: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Fuzzy Logic ControllerFuzzy Logic Controller

DefuzzilierFuzzifier Inference Engine

Membership Functions

Fuzzy (IF THEN) RulesFuzzy VariablesLinguistic Variables

CrispValues

CrispValues

Page 13: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Devs-Fuzzy LogicDevs-Fuzzy Logic

DEVS primitives to compose a Mamdani rule:

Membership Functions

A typical Mamdani rule can be composed as follows i

1 1 2 2IF is AND is THEN is , for 1,2,...,i i ix A x A y B i l

X (real number)

Fuzzy Value

Fuzzifier

Output Block

Fuzzy Value

Y (Fuzzy set)

AND/ORFuzzyValues

DOF

DefuzzifierY1Y2

Yn…

Method of Defuzzification

Defuzzified output (real number)

Connectives

Page 14: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

IF theta is POS AND theta_dot is POS THEN force is NEG

NEGZERO

POS

Fuzzifier(POS)

ANDDefuzzifier

theta

theta_dot Fuzzifier(NEG)

forceOutput Block

(NEG)

Center of Gravity

Rule #2

Rule #3

force

force

Output

Change Detectors

Page 15: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Robot ObstacleRobot Obstacle AvoidanceAvoidance

Distance to obstacle (measured by sensor i)

Angle of sensor i w

v

Fuzzy-Logic-Controller

2

1

Page 16: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Fuzzy-Logic Obstacle AvoidanceFuzzy-Logic Obstacle Avoidance

a) Distance measured by sensor (d) b) Angle of sensor (th)

c) Forward velocity (V) d) Angular Velocity (W)

Close Near Far Neg Zero Pos

Zero VSlow Slow Fast Neg SNeg Zero SPos Pos

Membership Functions:

Page 17: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Fuzzy-Logic Obstacle AvoidanceFuzzy-Logic Obstacle Avoidance

1."IF distancei is Close And anglei is Pos Then V Is VSlow W is Neg "2."IF distancei is Close And anglei is Zero Then V Is Zero " 3."IF distancei is Close And anglei is Neg Then V Is VSlow W Is Pos "4."IF distancei is Near And anglei is Pos Then V Is Slow W Is SNeg"5."IF distancei is Near And anglei is Zero Then V Is VSlow W Is SNeg"6."IF distancei is Near And anglei is Neg Then V Is Slow W Is Spos"7."IF distancei is Far And anglei is Pos Then V Is Fast W Is Zero"8."IF distancei is Far And anglei is Zero Then V Is Fast W Is Zero"9."IF distancei is Far And anglei is Neg Then V Is Fast W Is Zero"

Fuzzy rules for the ith sensor:

Page 18: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Simulation timeSimulation time

Act

iviti

es

Discrete Event FuzzyConventional Fuzzy

Conventional Fuzzy vs. DEVS-FuzzyConventional Fuzzy vs. DEVS-Fuzzy

Page 19: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Cooperative RoboticsCooperative Robotics

Cooperative pushing task:

Page 20: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Pushing task:Pushing task:

Pushing region

rArB

G

B

rwlw

fr=0

fr<0fr>0

fl<0

fl=0fl>0

A

Page 21: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Cooperative pushing task:Cooperative pushing task:

rB

G

B

rwlw

Pushing regions

Page 22: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Cooperative Pushing TaskCooperative Pushing Task

“in”?command

“out”!goal_reached

“in”?object_reached

“in”?object_lost

“out”?object_touched

“in”?everybody_ready

“in”?outside_pushing_region

“out”?object_reached_the_goal

“in” “out”

Page 23: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Simulation ResultsSimulation Results

Page 24: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Simulation ResultsSimulation Results

Page 25: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Experiment ResultsExperiment Results

Page 26: Fuzzy Logic Controller - Home | School of Electrical …oren/SCS_MSNet/pr… · PPT file · Web view · 2003-12-09Title: Fuzzy Logic Controller Author: Shahab Last modified by:

Experiment ResultsExperiment Results