## 5 Application of STPA with POMDP in Collaborative Tasks
### Identification of System-Level Hazards  
The examined system comprises a fenceless collaborative workstation consisted of an SRM, a human operator and the complementary sensors and communication tools, as illustrated in Figure 3. The boundary of this system is the topological area that restricts the aforementioned components to allow clear identification of the hazard causality on the examined case. Thus, any other parts of the industrial area on which the manufacturing task is also referred, e.g., ERP and any other cyberphysical systems, is opted out from our analysis. Upon the definition of the system and the system's boundary, the next step concerns the definition of the system-level hazards by determining system states or conditions that will lead to a loss in worst-case operational and environment circumstances. In order to ensure stability in the analysis and to avoid any redundancy, each identified hazard is trusted to be linked to one or more losses. Based on the SPTA principles, hazards are states or conditions to be avoided, hence we determine the system safety constraints, which will later lead to the determination of the unsafe and safe control states. Then, we iterate again on the hazard analysis and we further classify the hazards in accordance to the components of the system. The conducted analysis led to the identification of seven major group of hazards (H-), which are further analyzed in accordance to the group they belong (H- x,x):  
**Hazard Analysis:**  
1. **H-1**: Robot exceeds maximum set collaborative speed while human inserts its workspace (L-4, L-5). * Workspace monitoring * H-1.1 Workspace monitoring does not report accurately the human position relative to the robot. 2. **H-2**: Robot violates operator's personal space while not being in collaborative mode (L-3, L-4, L-5). * Workspace monitoring * H-2.1 Occlusions in proximity sensor hinder human position. 3. **H-3**: Robot does not complete the grasping task (L-2, L-3, L-5). * Grasping points inference * H-3.1 Selected grasping points is out of robot's reach; * H-3.2 Grasped object slips from robot's end effector. 4. **H-4**: Robot does not complete the manipulation task (L-2, L-3, L-5). * Trajectory plan * H-4.1 Robot cannot compute an inverse kinematics solution to reach the grasping goal; * H-4.2 Trajectory planning time out due to cluttered environment. 5. **H-5**: Robot keeps moving when an un-intentional contact occurs (L-1, L-2, L-3, L-4, L-5). * Hardware sensing * H-5.1 Force/torque sensor does not measure the excessive forces. 6. **H-6**: Robot performs unexpected and abrupt movements that are not foreseen in the collaboration flaw (L-2, L-3, L-4, L-5). * Task planningH-6.1 Robot state does not resemble the monitoring feedback. 7. **H-7**: Human performs unexpected movements that are not foreseen in the collaboration flaw (L-1, L-2, L-3, L-4). * H-7.1 HMI reports outdated manufacturing state;
- H-7.2 AR visualizes outdated robot state. After the definition of the potential system hazards, the STPA analysis necessitates the study of the system-level constraints, which specify system conditions or behaviors that need to be satisfied to prevent hazards. In our research, we link the identified group of hazards with the respective system-level constraints (SLC) as follows:  
**System-Level Constraints:**  
* SC-H-1.1 Excessive speeds should be detected to prevent unintentional contact with human. * SC-H-2.1 The human personal space should be monitored to prevent unintentional contacts. * SC-H-3.1 Grasp stability should be monitored during object transfer. * SC-H-4.1 Human-robot workspace and robot collision area should be continuously monitored and updated. * SC-H-5.1 Real time switch among collaborative and non-collaborative mode. - SLC-H-6:** Robot should follow a planned sequence of tasks. - SC-H-6.1 Robot should move to the next task upon confirmation of completion of the current one. * SC-H-7.1 The planned sequence of tasks should be mutually apprehended by robot and human.