Using Bayesian Network for Robot Behavior with Sensor Fault

This paper presents the framework that is combination Bayesian networks and fault detection that all of them learning a behavior of the robot. Fault removing is performed by changing the Bayesian network structure using interpreted evidences from robot sensors. Both simulation and real robot show that these frameworks can perform door crossing behavior properly by using prior knowledge and sensors data and it is robust to the changing of map. The motivation for this research comes from the need for an Instrument Fault Detection and Isolation (IFDI) method that is applicable to robotics. We apply Bayesian network to the task of fault diagnosis in a complex behavior of mobile robot like door crossing. Bayesian networks have important features such as representing direct causal dependency and ability to imitate thinking like human.


Introduction
This paper presents the framework that is combination Bayesian networks and fault detection that all of them learning a behavior of the robot.Fault removing is performed by changing the Bayesian network structure using interpreted evidences from robot sensors.Both simulation and real robot show that these frameworks can perform door crossing behavior properly by using prior knowledge and sensors data and it is robust to the changing of map.
The motivation for this research comes from the need for an Instrument Fault Detection and Isolation (IFDI) method that is applicable to robotics.We apply Bayesian network to the task of fault diagnosis in a complex behavior of mobile robot like door crossing.Bayesian networks have important features such as representing direct causal dependency and ability to imitate thinking like human.

Review of approaches
Analytical redundancy [1] is one approach based on residual generation.The residual can be computed through comparison of the measurements of sensors and expected values provided analytically by models.
Model-based method is another method used in diagnosis for systems such as electro-mechanical ones.These methods use analytical redundancy to reduce cost for adding extra sensors.This idea was introduced in 1970s [2][3] and has been shown to be successful in a wide variety of applications [4].
The literature is not rich when it comes to the application of Bayesian networks for fault detection and diagnosis.Aradhye [5] used Bayesian networks for both detection and identification of sensor faults too.Aradhye used dynamic Bayesian network (DBN) and Bayesian networks for IFDI for dynamic systems and systems under steady state conditions.He proposed a scheme for FDI in dynamic system using continuous node Bayesian network.The use of continuous nodes in a BN needs the process model to be linear.Mehranbod et al. [6] proposed a BN model with discredited nodes and showed that this model did not require the unrealistic one to one cause-effect mappings.In their work, the BN is used to progress a multi-sensor model for all sensors in the process under consideration.
This paper shows how Bayesian network can be effective when it is part of a framework that includes behavior-based diagnostics.Furthermore, this paper presents a new structure for determining dynamic fault probabilities based on raw sensor data and behavior of robot.This is accomplished by using a Bayesian network to interpret evidence.

Bayesian networks structure
Bayesian networks are directed acyclic graphs (DAG), where each node would have discrete or continuous values corresponding to random variables.A Bayesian network shows the exponentially sized Joint Probability Distribution (JPD) in a compact manner.Each probability in the JPD can be computed from the information in BN by the chain rule (1) )) ( | ( ) ,...,

Proposed method
In this section, at first a Bayesian network for implementing the door crossing behavior of a mobile robot is introduced.This framework is adapted from [7]; however, as it is unable to detect and tolerate sensor faults, a new BN framework able to detect sensor fault and continue corrected behavior in the presence of sensor malfunction is introduced.The goal is to train robot to learn door crossing behavior without collision with walls of the room.Robot receives an error when it cannot cross a door in specified time intervals.Two types of error are recognized: lost or collision.Robot is lost when it cannot pass the door in specified time.Collision takes place every time the robot hits the walls.
We adapt the Bayesian network model proposed by Lazkano et al. [7] for our door crossing behavior.As shown in Fig. 1, this model assumes that the network structure is determined by an expert.In this figure, evidence from 13 ultrasonic sensors labeled S1 to S13, are used to determine an action (C) of the robot.Any action has three states: turn left, turn right and go straight.Fig. 1 shows that each node is linked to its immediate neighbor.The three actions of robot are computed based on (2): (2) The speeds of left and right wheels of the robot are computed using (3): ( )) * 0.1, ( )) * 0.Where the action has three values to show the sign of the rotational speed of the robot: negative, positive, and null rotational velocities.
In door crossing behavior, the current action of robot is effected by the previous action.Therefore, this research modifies Bayesian networks structure into a Dynamic Bayesian Network.A DBN is implemented according to Fig. 2 to implement this behavior.The arcs are included to make the relationship between actions at two time steps.
The action of robot is computed from (4) using sensor values: ).

Action model structure
We use the same structure as shown in Fig. 1 for training the actions of robot.
The training data is collected with a series of actions in 1925 different trajectories for door crossing.The robot reaction is learned using (2).

Fault detection network structure
Any fault occurring in robot sensors would make sensor value different from its expected value.We use a simple model of environment to predict unreliable data from sensors.The environment which is sensed by 3 adjacent sensors is modeled by a piecewise line segment as shown in Fig. 4.
The value of a sensor such as sensor b can be verified by using the other two sensors.It is considered as a valid data, provided it is on the line connecting the other two sensor data.
We use a Gaussian function to determine the probability of the 2 belonging to the line.This probability is calculated from the distance between the sensor value and prediction value.The mean of the Gaussian function ( ) is the predicted value and its variance ( 2) is the measured sensor variance.We use this Gaussian function to measure the difference between the sensor value and the prediction value, and then, set up the probability related to this difference.This probability is compared with a threshold to determine the fault.This structure will fail when the faulty sensor is in front of a door or discontinuity of the walls.For solving this problem, a separate Bayesian network is used for door detection.If robot detects a door with this network, then the sensor value is not considered as a fault.

Door detection network structure
The door detection network structure is given in Fig. 5.

Fig. 5. Door detection network structure
It applies sonar readings to detect the door.This network produces a probability value for every sensor.This value shows the probability of that sensor being in front of the middle of the door.This network selects one of the sensors based on the maximum likelihood of being the nearest sensor to the door.The output from this network is used for diagnosis network.

Diagnosis network structure
After diagnosis of a faulty sensor, the action structure is changed to eliminate faulty sensor node and its arcs and CPD of the action structure is refreshed.For instance, if we assume that S4 sensor was faulty, then the modified structure after elimination would be as shown in Fig. 6. .

Experimental results
Two separate experiments have been done to verify the proposed method.The first sets of experiments have been conducted in MATLAB simulation environment by using a simulated robot and simulated sonar data.The second experiment has been conducted by using a real differential drive robot and data from a rotary laser scanner.
The purpose of the experiments is to show that our proposed model can learn the complex behavior in different environments with faulty sensors.

Simulation environment
A simulated robot is located in the environment that consists of a room with 4 walls and an open door.Fig. 7 shows the environment used for training the BN.For collecting the training data and learning the action, the robot is driven to different points of the environment with different directions.For each of the points and directions, the action is selected by the supervisor based on the difference between direction of the robot and the middle of the door.
For training the Bayesian network, 75000 entries were used.Each entry included an action and readings for 13 sonar sensors.The sonar values more than 3meters were truncated.20 discrete values were collected for each sonar sensor.The door was supposed to be completely open during the experiments.
The robot was expected to follow the shortest path and cross the door without collision with walls.The initial position and direction of the robot were selected arbitrarily with a direction ranging from 0 to 180 degrees.Robot received an error penalty when it could not cross a door on specified time range or it collided to the wall.
The robot was guided to cross the door using Bayesian network of Fig. 1 and Dynamic Bayesian network of Fig. 2. In first experiment, the sensors were supposed to work without any fault, and in the other experiment, one of the sensors were randomly selected to be faulty and produce random values in each path.Fig. 8 compares the performance of BN and DBN networks in these experiments.
This figure shows the total error penalty gained by robot when it starts from different initial directions at different starting points.Experimental results depict that, in the first experiment which sensors are without fault, both BN and DBN structures work well, with error being less than 9%.It also shows that in the initial angles, which many sensors can sense the door (such as 60, 90, and 120), the DBN structure has better performance.
To show the performance of the proposed model when there is a sensor fault in mobile robot, we repeated the experiment on map1 using FTBN.Fig. 9 shows the result for FTBN and compares it with BN and DBN results.The proposed model has better performance than both methods in the presence of fault.The results show that the proposed structure is robust against fault and decreases errors of behavior from 21% down to 13%.
To show the learning ability of the proposed method, it was experimented on different maps of Fig. 10, while it was trained using only data from map1.Fig. 11 shows that FTBN can guide the robot in unseen environment with an acceptable accuracy.
The results show that the average error for unseen maps is larger than the trained map; but, it is almost the same for different maps except map 4 in which, the location of the door has been extremely changed.

Sourena robot
The Sourena robot which is shown in Fig. 12 is a 3wheeled differential drive robot.The base has a size of 35cm x 60cm x 40cm and the total height of robot is 150cm.The robot is located inside a 5m x 6m room with an 80cm open door.The robot is equipped with a rotary laser scanner which can scan the environment 5 times per second.The resolution of sampling was reduced to 15 degrees to make it comparable with the sonar data used in the simulation.

Fig. 12. Sourena robot
For training the proposed FTBN framework, 500 entries were used.Each entry includes an action and readings for 13 sensors value.
For testing the proposed FTBN framework, the robot was located at 100 different starting positions in the room with arbitrary directions.The robot could cross the door in 82 test runs successfully.The same experiment was repeated by using BN structure for robot guidance, that caused 73 successful door crossing behavior.This experiment also showed the superiority of FTBN to the conventional BN.

Conclusions
In this work, a new Bayesian network has been successfully applied for door-crossing behavior in robotic domain with faulty sensors.We proposed a new structure for simultaneous performing of the behavior as well as detecting of the fault.
The performance of new proposed real-time method has been tested successfully.Using this method, the robot can be trained in an environment without fault, and then can be used in a real environment in which fault might occur in the sensors.By using this method, the influence of sensor fault on the behavior of the robot extremely decreases.
In future works, we will apply this method to more complex and realistic problems like avoiding moving obstacles.

Fig. 2 .
Fig. 2. A DBN for door crossing behaviorA fault tolerant BN frameworkIn this section we propose a Fault Tolerant BN model (FTBN) that can perform the desired action in the environment with faulty sensors.The proposed method is able to work properly by detecting the fault and removing its effects on the performance of the mobile robot.

Fig. 8 .Fig. 9 .Fig. 11 .
Fig. 8.Comparison of two different networks (BN and DBN) for door crossing behavior on map1 with presence of fault and absent of fault

Table 2 .Table 2 .
Probability table of P(S3|C) 05+0.15)/2=0.1 (0.35+0.6)/2=0.475Value of every cell in Table2is calculated from two columns in table 1 that have the same C values.As sum of columns in CPD table must be 1 thus, every cell is divided to 2.