# Design and Validation of a Camera-Based Safety System for Fenceless Robotic Work Cells
## 3 Design of the Image-Based Safety System  
### Locating the Camera(s)  
In the design of the safety system, the dimensional parameters of a work cell are primarily considered based on the safety distances per the standards. The number of cameras, camera lens angle, camera orientation angle, and camera height values are considered in the optimization problem. The safety standards used in this study are shown in Figure 1.  
Figure 1: Schematic representation of the relationships between the robotic systems and related international standards [8]. Considering the standards (EN ISO 13849-1: 2008 and EN ISO 13849-2: 2013) [22], collaboration modes can be defined to ensure human and robot collaboration in a safe manner. These include the following modes:  
* Safe posture;
* Safe speed and distance monitoring;
* Manual robot orientation [23; 24]. Safety distance (S) in work cells with robot arms defined in the related standards is stated as  
\[\text{S = K (t}_{1}+\text{t}_{2})+\text{ C} \tag{1}\]  
where t\({}_{1}\) is the reaction time of the measurement, t\({}_{2}\) is the reaction time of the machine, C is the possible approach to the alarm zone, and K is the estimated approach speed of the human body or body parts. The ISO 13855 standard identifies K with a walking speed of 1600 mm/s and a hand speed of 2000 mm/s [13]. The optimization problem is considered a linear fractional function. The properties of linear fractional functions facilitate the usage of a well-known scalar optimization problem. If the constraints are linear, the linear fractional programming (LFP) function is obtained as follows [25]:  
\[\text{max }\left[\text{f(x)}=\frac{\text{P(x)}}{\text{q(x)}}\right]\text{ such that x }\in\text{S}\subset\text{R}^{\text{n}} \tag{2}\]  
Figure 2 shows a sketch of a system consisting of two cameras and one robot planned to be realized. In addition, Figure 2 shows three safety areas, which are the warning, alarm, and working zones. The robot arm is required to decelerate and stop when entries into the warning and alarm zones are detected, respectively. In addition, the visualization of the projected areas of these cameras is shown with parametric expressions in Figure 3. The outermost edge of the scanning area of the cameras is placed so that it intersects the outermost edge of the safety area. The area scanned by the cameras is geometrically in the form of an angular truncated cone. In Figure 3, the camera lens angle is given as 2\(\alpha\). The angle of the camera with the horizontal axis (orientation angle) is given as \(\theta\). The height of the camera from the ground is shown as h.  
Figure 2: Illustration of a system with two cameras and one robot (**upper**) and front (**lower left**) and side (**lower right**) views. The projection of a camera with specific angle parameters (\(\alpha\) and \(\theta\)) to a working space of a robot is a truncated cone base area (Figure 4). The major and minor axis (a and b) of truncated cone base geometry is given in Equations (3) and (4), respectively [26]. Depending on these two equations, the area scanned by the camera can be expressed in a parametric function with two variables, a and b.  
\[\mathrm{a}=\mathrm{h}(\sin 2\alpha)/\left(\sin^{2}\theta-\sin^{2}\alpha\right) \tag{3}\]  
\[\mathrm{b}=2\mathrm{h}(\sin\alpha)/\sqrt{\left(\sin^{2}\theta-\sin^{2}\alpha \right)} \tag{4}\]  
where \(\alpha\) is the one-half of the camera's view angle, \(\theta\) is the camera's orientation angle concerning the x-axis, and h is the camera's vertical position (Figure 4). The image formed on the camera sensor is rectangular. Therefore, the image outside the circular area is removed by masking in the program. The camera's scanning depends on camera lens angle, camera orientation angle, and camera height as the variables. The area scanned by the camera is the objective function  
Figure 4: Display of skewed cone parameters. Figure 3: The intersection of projections in a two-camera system. that is intended to be maximized. The camera height (h) is the optimization constraint.