# Embedded Bayesian Network Contribution for a Safe Mission Planning of Autonomous Vehicles
## 4 Methodology for the BN Integration at the Mission Manager Level
### Markov Decision process (MDP)  
In this section, we propose to integrate BN to Markov Decision Process (MDP) [28] to elaborate a more complex mission planning. This model is named **BFM** remodel (Bayesian network built from FMEA table to feed the MDP model) [29]. The BFM model relies on an architecture based on two principal modules: the diagnosis module based on BN and the decision-making module based on MDP. Figure 17 shows the proposed architecture where the diagnosis modules are organized in three categories: health of the sensors, health of embedded applications in term of QoS and the health of the system (computing resources, battery, etc.). The decision modules manage the mission and are specified by the mission designer using the MDP model. The diagnosis module computes the probability of the health status of the different HW/SW components of the system (sensors, applications, etc.) considering the context hazards and the internal event for the components. Therefore, different types of Health Management (HM) are available to feed the decision module by probabilities (applications HM, sensors HM and system HM). The \"applications HM\" contains multiples HMs, one for each application that can run on the embedded system (e.g., tracking, navigation, obstacle avoidance, etc.). The \"sensor HM\" also contains different HMs for the different sensor or set of sensors (e.g., GPS, camera, etc.). Finally, the \"system HM\" includes the HM of the other components of the system as resources (i.e., CPU load, etc. ), battery, etc. For the HM generation, we can use the different patterns (\(FMEA\_HM\) pattern, the \(FMEA\_MIT\) pattern and the \(FMEA\_EMB\) pattern) introduced in Section 3. Figure 16: HLS design tool proposal for Decision Networks onto FPGA SoC support. The decision module uses the MDP to specify the mission and to select the set of actions to execute. The MDP model takes as inputs the probabilities provided by the different HM of diagnosis module. These probabilities are carried by the transition functions of the MDP model. The MDPs consider the potential sensor failures (sensor HM), system failure (resource HM) and the different alternatives for the embedded applications (application HM). The mission can be expressed using concurrent BFMs. The different BFMs highlight some functionalities (or missions phases) of the mission. For instance, we can have three main functionalities:  
* Navigation functionality (BFM navigation): considers all the applications needed to achieve navigation phase. These applications are for example take-off, path planning, obstacle avoidance, etc. * Safety functionality (BFM safety): consists of a set of application that used for mission and autonomous system safety. These applications are landing, obstacle detection and avoidance, emergency search landing area, etc. * Application functionality (BFM application): consists of a set of applications using to achieve the mission aim like target detection, tracking, indoor/outdoor mapping, etc. For an autonomous system, we need an embedded mission planning. The diagnosis part continuously monitors by the help of the sensors or by the help of internal flags the embedded system and the environmental context of the mission. This part is fed by the sensor data or by the application metrics. Then as shown in Figure 18, the decision module can update its decision online taking the new probabilities of the diagnosis into account in order to generate a new mission plan. Figure 17: Concurrent MDPs for the mission-planning. Example of Mission Planning with BFM Model  
We take as a case study a tracking mission where the aim is to detect and track a potential target (for more details see [30]). We define the mission planning using the concurrent BFMs (BFM navigation, BFM landing, BFM tracking). Each BFM is associated to a MDP detailed as follows:  
* For the BFM-navigation: the MDP of the navigation phase includes 9 states (ex: waypoints states, obstacle detection state, etc.)