MCA4 - aes journals

JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH COMPUTER
SCIENCE AND APPLICATIONS
COMMUNICATION DATA BASE MANAGEMENT
SYSTEM
P.SENTHIL KUMARI
Faculty Of MCA Dept., Mohamed Sathak Engineering College, Kilakarai
[email protected]
ABSTRACT: This paper tries to implement a database management system that is called CDBMS
( Communication Data Base Management System) for a robot’s control. DBMS for a communication robot has
to satisfy the following three conditions. The first condition is to make the internal states of a robot to depend
on robot’s action. The second condition is to give priority to the execution of a reflective action. The third
condition is to deal with the influence of past robot’s actions. CDBMS satisfies the three conditions with
C_Index and EDF scheduler. C-Index represents internal states as a directed graph which reflects a robot’s
current action and the sequence of past actions. Also, EDF scheduler achieves the prior execution of a reflective
action. This paper reports the experiments conducted which confirms that CDBMS satisfies the three
conditions .
Key Words: Communication Dbms, Robot’s Control, Normal And Reflective Action, Spatial Indexing,
Subsumption Architecture
1 INTRODUCTION
Communication robots such as pet robots and care taker robots have been developed to support person’s
everyday life. In the near future, communication
robots will be closer to human and they will
communicate with human using various types of
action patterns. Communication robots are used as
warfare weapon for surveillance and mine detection.
Japan’s earth simulator super computer is used for
identifying natural disasters such as Tsunami and
earthquake. Communication robots are also used in
identifying chemicals present in the underground
caves in the sea.
The robot must manage the various action patterns
efficiently to encourage various interaction between
human and robots. It is obvious that a good way to
deal with the action management is to apply DBMS.
Following three conditions are required to develop
DBMS for a communication robot. The first
condition is that DBMS must decide the next robot’s
action that is suitable for the robot’s current action
efficiently using the data produced from sensors of
the robot. This is because the decision of the next
action on human - human interaction depends on
current one’s action and the another one’s reaction.
The second condition is that DBMS must prioritize a
decision of a reflective action such as an escape from
unexpected dangerous events. The reason is
explained by the fact that an unexpected dangerous
event, such as a sudden appearance of a car moving
to the robot, damages the robot fatality. The third
condition is that DBMS must influence robot’s past
actions to the decision of the current action. The
reason can be explained by the fact that a decision of
the next action on human – human interaction is
affected by past actions, so the decision of the next
action on human – robot interaction is same.
In order to satisfy the first condition, spatial indexing
[1][2][3] is used which makes a decision of the next
action using efficiently the data of sensors. Spatial
indexing provides quick search by dividing the multi
– dimensional space of sensors. A spatial database
consists of a collection of tuples representing spatial
objects and each tuple has a unique identifier which
can be used to retrieve it. Leaf nodes in an R – tree
contain index record entries of the form
( I, tuple – identifier)
where tuple – identifier refers to a tuple in the
database and I is an n – dimensional rectangle which
is the bounding box of the spatial object indexed
where I = ( I0, I1, ……… In-1).
In order to satisfy the second condition, the
subsumption architecture [4] is used. Subsumption
generates a reflective action of a robot, converting
data of sensors to a robot’s action. All the robots
implement the same abstract architecture, which we
call the subsumption architecture which embodies
the fundamental ideas of decomposition into layers
of task achieving behaviors, and incremental
composition through debugging in the real world.
Each layer in the subsumption architecture is
composed of a fixed - topology network of simple
ISSN: 0975 – 6728| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 19
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH COMPUTER
SCIENCE AND APPLICATIONS
finite state machines. Each finite state machine has a
handful of states, one or two internal registers, one or
two internal timers, and access to simple
computational machines, which can compute things
such as vector sums. The finite state machines run
asynchronously, sending and receiving fixed length
messages (1-bit messages on the two small robots,
and 24-bit messages on the larger ones) over wires.
There is no theory of DBMS related to the third
condition .
This paper is organized as follows. Section 2
formulates the three conditions of DBMS for a
communication robot. Section 3 proposes CDBMS.
In section 4, CDBMS is evaluated by experiment.
Section 5 contains conclusions.
2
CONDITIONS
OF
DBMS
FOR
A
COMMUNICATION ROBOT
2.1 Actions of a Communication Robot
Actions of a communication robot are divided into
two kinds and defined as follows.
Definition 1: The term “normal action” is defined as
an action of the communication robot aiming at
human-robot interaction.
Definition 2: The term “reflective action” is defined
as an action of the communication robot aiming at an
escape from unexpected dangerous events.
The robot has l sensors (touch sensor, light
sensor, ultrasonic sensor and sound sensor) and m
kinds of actions. A time instant is represented by t,
which is a positive integer. When the robot starts, t is
0. If t1 < t2, then t2 is later than t1. And sensor i
represents i-th sensor, and sensori(t) represents the
value of sensori at t. All of sensori(t)s are represented
by Sensor(t).
Definition 3: The term “emergency” is defined as a
situation that satisfies the following inequalities,
where the sensor number SN, the interval IT, the
threshold Th and the difference threshold Dist are
given by a user.
SensorSN(t) < Th And SensorSN(t) - SensorSN(t-IT) <
Dist and i-th emergency is represented by
emergencyi.
Definition 4: The term “Tranj(RobotState(t))” is
defined as the set of RobotStates at t that may
become RobotState(t+1).
Definition 5: The term “NormalAct” is defined as a
function. Sensor(t) and RobotState(t) are arguments
of the function, and RobotState(t+1) and actm are are
outputted by the function.
{ act m, RobotState(t+1) } := NormalAct
(Sensor(t),RobotState(t))
(1)
Where RobotState(t+1) ε Tranj( RobotState(t)).
At t, the decision of a reflect action is represented by
ReflectAct.
Definition 6: The term “ReflectAct” is defined as a
function. Sensor(t) and RobotState(t) are arguments
of the function, and actm are outputted by the
function.
act m := ReflectAct( Emergencyk, RobotState(t))
(2)
2.2
Formulation of the Conditions
The three conditions of DBMS for a communication
robot are formulated. The first condition is
achievement of the internal state depending action.
The second condition is to give priority to the
execution of a reflective action. The third condition is
to influence past robot’s action to current context.
2.2.1
Internal State Depending Action
To achieve the internal state depending action, each
of NormalAct and ReflectAct must satisfy the
following equality.
NormalAct:
Let t ≠ t’ and RobotState(t) ≠
RobotState(t’) be satisfied. NormalAct outputs
different act j when the same Sensor(t) and different
RobotState(t) from other t’ are given:
{ act m, RobotState(t+1) } := NormalAct (Sensor j,
RobotState(t))
{ act m‘, RobotState(t’+1) } := NormalAct (Sensor j,
RobotState(t’))
Then act m ≠ act m‘
(3)
ReflectAct:
Let t ≠ t’ and RobotState(t) ≠
RobotState(t’) be satisfied. ReflectAct outputs
different act j when the same Emergencyk and
different RobotState(t) from other t’ are given.
ReflectAct(Emergencyk,RobotState(t))≠ReflectAct(
Emergencyk,RobotState(t’))
(4)
To achieve the internal state depending action, (3)
and (4) must be satisfied.
2.2.2
Priority of Reflective Action
Suppose NormalAct and ReflectAct occur at the
same t, and suppose the following equalities are
satisfied.
{ act m, RobotState(t+1) } := NormalAct (Sensor(t),
RobotState(t))
act k := ReflectAct( Emergencyk, RobotState(t))
Even when ReflectAct and NormalAct occur at the
same time, ReflectAct is prioritized over NormalAct.
StartTime(t’,actk)<StartTime(t’,actm)
(5)
2.2.3
Influence of
Past
Robot’s
Actions
Let t > t’ and RobotState(t) = RobotState(t’) be
satisfied. NormalAct outputs different act j when the
same Sensor(t) and the same RobotState(t) are given.
The influence is caused by the act j executed at t cause
( t’ <= t cause < t).
{ act m, RobotState(t+1) } := NormalAct (Sensor j,
RobotState(t))
ISSN: 0975 – 6728| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 20
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH COMPUTER
SCIENCE AND APPLICATIONS
{ act m‘, RobotState(t’+1) } := NormalAct (Sensor j,
RobotState(t’))
Then act m ≠ act m‘
(6)
2.3
System Configuration
2.3.1
System Configuration of CDBMS
The system configuration of CDBMS is shown in
figure 1.
Figure 1: System Configuration of CDBMS
CDBMS consists of C – Index (Contextual Index),
Message Queue, EDF (Earliest Deadline First)
scheduler and Action DB. C – Index is a directed
graph that has nodes as RobotStates. Message Queue
sends EDF scheduler a request to search Action DB
for actj. EDF scheduler schedules processes that
search Action DB. Action DB is a database that
stores all act js.
CDBMS has two types of client processes. The first
type of process is a normal process that executes
normal actions, and the second type of process is a
reflective process that executes reflective actions.
The normal process queries a normal action to the
CDBMS. And the normal process executes act js that
is the result of the query. Only one normal process
works in a robot to control actions of the robot
efficiently. The reflective process monitors an
occurrence of Emergencyj. When Emergencyj occurs,
the reflective process issues a query to decide a
reflective action to CDBMS. Then the reflective
process executes act j, the result of the query. And a
reflective process can monitor several Emergencyjs.
2.3.2
Action DB
Action DB is a table that has tuples consisting of act j
. To accelerate search of act Action DB has a B-Tree
index structure.
2.3.3
EDF Scheduler
EDF scheduler selects the earliest deadline process as
a running process, when a new process occurs and
when a running process finishes. A deadline is a time
when a process must finish. If there are feasible
scheduling of processes on uni-processor, then EDF
scheduler can generate a feasible scheduling.[5]
3 CDBMS
This section proposes the CDBMS and describes how
the CDBMS satisfies the three conditions.
3.1 Proposes of CDBMS
3.1.1 C-Index Structure
C-Index is a directed graph that has nodes as
RobotStates and directed vectors. The o-th node
matches to RobotStateo and is represented by Nodeo.
And C – Index has CurNode corresponding to
RobotState(t). If a directed vector connects Node j
with Nodek, the directed vector is described as v m
(Nodej  Nodek). If vm (Nodej  Nodek) and
RobotState(t)
=
Nodej,
then
Nodek

Tranj(RobotState(t)) is satisfied.
A vm (Nodej  Nodek) has a evalfuncm which is an
operation that measures distance from Nodej to
Nodek, and a operatem which is a changing operation
of C – Index. The evalfuncm and the operatem are set
by a user. The evalfuncm is a function: If
evalfuncm(Sensor(t)) is negative, then Nodej can not
change to Nodek by Sensor(t). Sensor(t) is an
argument of the function, and a real number is
outputted by the function.[6]
3.1.2 Deadline with the Query Type
A query from a reflective process has an
earlier deadline than a query from a normal process.
The deadline of a query from a normal process is
dlNorm seconds after its issue. A deadline of a query
from a reflective process is an input of the query. If
dl seconds is given by the query, the deadline is dl
seconds after its issue.
Deadlines are used by EDF scheduler to schedule
processes that search actj in Action DB.
3.2
Solution
3.2.1 First Condition: Queries
Query: Normal Action:
The algorithm of a decision of a normal
action is shown in figure 2.
ISSN: 0975 – 6728| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 21
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH COMPUTER
SCIENCE AND APPLICATIONS
The algorithm is executed when CDBMS
receives a query from a normal process. At line 6 to
14, vm (CurNode  Nodei) is invoked in order, and
the distance from CurNode to Nodei is calculated by
evalfuncm belonging to vm . At line 9 to 12, Nodei‘
that has the smallest value of evalfuncms, where the
value > 0, is selected as NextNode. At line 18,
Operatem‘ belonging to vm’ (CurNode  NextNode)
is executed. At line 21, CurNode is changed to
NextNode.
The algorithm satisfies (3). A decision of a
normal action depends on the set of vm (CurNode 
Nodei)s, the set of evalfuncms, the set of Nodeis and
Sensor(t). If each Nodej has different set of vm (Nodej
-> Nodek)s and different set of Nodeks from others,
then the algorithm chooses different actj , where
different CurNode but the same Sensorj are given.
Query: Reflective Action:
The algorithm of a decision of a reflective
action is shown in figure 3.
Emergencyk and dl are arguments to the algorithm.
The algorithm satisfies (4). Now CDBMS satisfies
the first condition because (3) and (4) are satisfied.
3.2.2 Second Condition: EDF Scheduler
By introducing EDF scheduler, the decision of a
normal action and the decision of a reflective action
can satisfy. If a query from a normal process and a
query from a reflective process with dlRef issue at the
same time t, then dlRef <dlNorm is satisfied. Because
EDF scheduler selects a process with the earliest
deadline as a running process, tnorm that the normal
process receives the result of its query, and tref that
the reflective process receives the result of its query,
are satisfied tref < tnorm. Thus CDBMS satisfies (5)
and satisfies the second condition.
3.2.3 Third Condition: operate m
The operation to modify C-Index is operatem , and
operatem consists of 0 or more graph modify
operations, which are basic operations to modify CIndex. The different types of graph modify operations
are shown in table 1.
Operation Name
Inputs
Insert vm’ (Nodei’  Nodei’
,
Nodej’)
Nodej’
Delete vm’ (Nodei’  Nodei’
,
Nodej’)
Nodej’
Insert Nodej’
Nodej’
Modify evalfuncm’
evalfuncm’
Table 1: Graph Modify Operations
operatem satisfies (6). Let CurNode = Nodei
be satisfied at t old and let CurNode = Nodei at t ( t >
told ). An insertion of vm’ (Nodei’  Nodej’) and a
modify of evalfuncm’ are also same. Thus CDBMS
satisfies (6) and therefore satisfies the third condition.
4 EVALUATE EXPERIMENTS
Experiment was conducted to evaluate CDBMS.
CDBMS was implemented by Visual programming
language in Visual C# and was applied to LEGO
MINDSTORMS NXT scorpio model robot. The
LEGO MINDSTORMS NXT has four sensors such
as Ultra sonic sensor, touch sensor, sound sensor and
light sensor and four different kinds of actions. The
four different types of actions are : Move Right,
Move Left, Move Forward and Move Backward. All
the three conditions of CDBMS are satisfied by
LEGO MINDSTORMS NXT scorpio model robot.
Original source program for activating the sensors
will be written in Visual C#. It will be compiled and
compressed to XML files. The compressed XML
format will be run by the robot. Compressed XML
file created by Manifest editor will be sent to the
robot. By looking the header files, XML coding will
be distributed to separate sensors depending on the
headers.
SAMPLE PROGRAM FOR CONFIGURING
THE SONAR SENSOR
A sample program for activating ultra sonic sensor is
illustrated. The ultra sonic sensor will send
SonarSensorUpdate notifications everytime it gets a
reading. If the distance is less than 50cm, turn the
robot 45 degrees to the left by setting the rotate
degrees as 45. If the distance is greater than 50cm
and less than 90 cm, arc to the left by setting drive
power for the left wheel as 0.3 and for the right wheel
as 0.6. If the distance is greater than 90cm, blast on
ISSN: 0975 – 6728| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 22
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH COMPUTER
SCIENCE AND APPLICATIONS
ahead by setting drive power for the left and right
wheel as 0.8.
Configure the brick, by dragging the “Lego NXT
Brick (v2) service” on to the VPL surface, then select
“Set initial configuration” and change the Serial
Port as appropriate for our Bluetooth connection
with the default BaudRate of 0. Set the
“ShowInBrowser”. Then configure the ultra sonic
sensor, by dragging the “Lego NXT Ultra Sonic
Sensor (v2) service” on to the VPL surface, then
select “ Set initial configuration ” and Select the
partners setting as NxtBrick. Change the sonar sensor
state as follows: Set the name as range finder, set the
sensor port as sensor 4.
Choose the activity box “If” on to the VPL surface.
Select the round notification pin on the
NxtUltrasonicSensor and drag it onto the “If”. This
will open the connections dialog. Select From the
SonarSensorUpdate and select OK. Then configure
the drive, drag the “Lego NXT Drive (v2) service” on
to the VPL surface, then select “ Set initial
configuration ” and Select the partners setting as
NxtBrick. Change the Drive state as 0.112 for
distance between wheels. Set the following for left
wheel properties: motor port as motor B, Wheel
diameter as 0.055. Set the following for right wheel
properties: motor port as motor C, Wheel diameter
as 0.055.
In the “If” expression box, type a space. A drop –
down dialog will open, indicating the values which
are available from the sensor. Select or type
“Distance < 50”. Drag from the pin to the right of the
expression over to the NxtDrive activity. This will
open the connections window. Select From
TrueChoice and To the Rotate Degrees. Select OK.
This will open the data connections for
RotateDegrees. Select “[x] Edit Values directly” ,
then type in “45” degrees and “.50” power. Select
OK. When an obstacle is less than 50cm distance,
this will turn the tribot 45 degrees to the left or
counterclockwise.
Right click on the NxtDrive and select Copy. Paste
two times. Since we copied the drive, instead of
dragging a new instance from the services window,
this will allow us to issue more commands to the
same drive. Expand the if block by clicking on the
“+” in the lower left corner. Add a new condition
“Distance < 90”. Drag a connection from the second
condition to the second NxtDrive. This time, select
SetDrivePower and enter “0.3” for left wheel power
and “0.6” for right wheel power. When an obstacle is
between 50 and 90 cm, this will cause the tribot to
drive in an arc to the left.
Finally, connect the “Else” pin to the third NxtDrive.
In the connections dialog, select “SetDrivePower”
again. Set the data connections dialog as such: Left
and Right wheel power as “ 0.8 “ . When no objects
are less than 90cm from the tribot, blast straight
ahead at 80% power.
VPL program with more activity boxes for activating
the
ultrasonic
sensor
is
shown
below.
Figure 4: Modified Visual Program for activating
the ultra-sonic sensor
In the experiment whether priority to the execution
of a reflective action can be achieved or not, issuing a
query from a normal process and a query from a
reflective process was evaluated.
Table 2
indicates the Action DB.
Type of Action
Reflective Action
Normal Action
Normal Action
Act
Ignore
emergency
Greet “Hello”
“Act as guide”
Table 2: Action DB
The experiments were conducted for Lego
Mindstorm’s Nxt Scorpio model and the following
results were obtained.
Normal Action for Ultra Sonic Sensor:
Robot will move forward by sensing the
objects.
Reflective Actions for Ultra Sonic Sensor:
1.
If the distance between the objects is less
than 50cm, robot should turn left 45 degrees and
move forward. ( We can call this action also as
emergency action )
2.
If the distance between the objects is 50 to
90 cm, robot should arc moderately to the left by
setting 0.3 and 0.6 power for the left and right
wheels. ( We can call this action also as emergency
action )
ISSN: 0975 – 6728| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 23
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH COMPUTER
SCIENCE AND APPLICATIONS
3.
If the distance between the objects is greater
than 90cm, robot should move forward.
Normal Action for Touch ( Contact) Sensor:
Robot will move in forward direction by
sending the notifications for contact sensor.
Reflective Actions for Touch ( Contact) Sensor:
1.
If any object hits the touch sensor, since we
have created scorpio model of the robot, it should
slightly move backwards.(We can call this action also
as emergency action )
2.
Sting the object with the help of motors.
[5] JANE W.S.Liu ,“REAL – TIME SYSTEMS”,
Prentice – Hall, pp.67-68, 2002.
[6]Satoru SATAKE, Hideyuki KAWASHIMA,
Michita IMAI, “CDBMS : Database Management
System for A Communication Robot”, Proceedings
of the IEEE International Workshop, Millbrae,
California, USA, pp.205 – 210, 2003.
Normal Action for Sound Sensor:
Robot will move in forward direction by
sending the notifications for sound sensor.
Reflective Action for Sound Sensor:
If the robot senses sound, it will move very
rapidly. Since it is a scorpio model, scorpio will
move fastly and hide anywhere because of fear.
Normal Action for Light Sensor:
Robot will move forward by sensing the
light.
Reflective Actions for Light Sensor:
1.
If it senses light, it will not move. Because
scorpio will not move in the day time.
2.
If it senses dark, then only it will move
forward.
5 Conclusion
In this paper, CDBMS for a communication robot
was implemented. CDBMS consists of C – Index
and EDF scheduler. C – Index is designed to achieve
the internal state depending action and the influence
of the past robot’s action. EDF scheduler is designed
to give priority to the execution of a reflective
action. It has been shown from the results, that
CDBMS has possibility to achieve the internal state
depending action and the prior decision of a
reflective action.
References
[1] Antonin Guttman, R – Trees, “ A Dynamic Index
Structure for Spatial Searching” , Proceedings of
ACM SIGMOD ICMD, pp.47-57,1984.
[2] John T. Robinson, “ The K-D-B Tree: A Search
structure for Large Multi - dimensional Dynamic
Indexes”, Proceedings of ACM SIGMOD Conf.,
1981, Ann Arbor, MI, pp. 10-18, April 1981.
[3] N. Beckmann, H.P. Kriegel, R. Schneider and B.
Seeger, “ The R* tree: An efficient And Robust
Access Method for Points and Rectangles”,
Proceedings of ACM SIGMOD, Atlantic City, USA,
pp.322-331, May 1990.
[4] R.A. Brooks, “ Intelligence without representation
“ , Artificial Intelligence 47 (1991), MIT AI Lab,
Cambridge, USA, pp. 139 -159, 1987.
ISSN: 0975 – 6728| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 24