## 5 The 5 DOF Hybrid Position/Force Control  
To achieve a functional control method, the mobile robots' manipulator, used for sorting waste materials, has to be able to move at target points and then grab the recycling materials using a simple gripper. For this, the hybrid position/force control method [15] was chosen and then modified to integrate the systems' state, changing the control type of the manipulator when needed, between position and force control mode. Thus, we changed the static selection of control type for each degree of freedom to a deterministic state of the S-matrix that separates each DOF into two categories: control mode and force mode. Figure 9 presents the new hybrid position/force control architecture used to drive the 5 DOF manipulator. Figure 9 presents the data flow of information between each control block, where:  
\(O(p,\;type)=\) Object (position, type);  
type = Glass, Aluminum, Plastic;  
\(O(depth)=\) Object (depth);  
Depth = distance from the robot reference system to the detected object. In the new architecture of the hybrid position/force control method of Figure 9, we have included several control blocks that group the control architecture by task, while the arrows present the data flow. The control diagram starts with the reference generation block. This block receives information from the video detection system that will provide the objects' position in XOY coordinates and the object type. The type is then used by the reference generation to compute the required force according to the friction force coefficient influence. Another input is received from the proximity sensors, which will provide the distance to the target object, which represents the third coordinate in the 3D space, the OZ axis. The video detection system [50] uses neural networks to detect the type, position, and orientation of the recyclable objects and will send this information as input for the 5 DOF manipulator, through a TCP network interface. Combining both video detection for XOY coordinates and orientation with the proximity sensors for depth distance, we get the OXYZ coordinates with \(\theta\) angle orientation. The detection system was developed by  
Figure 8: Gripper force by object mass and friction coefficient. our project team and is already published by [PERSON] et al. [50], which is why we will not focus on its results in this paper, but we are using the AI detection module as input to our control architecture. The video camera used has an RGB resolution of 1280 \(\times\) 1024 pixels, which is more than enough for our AI detection system to use, with a detection confidence of 75.54% and over 95% accuracy [50], using a 9 FPS image analysis rate. Added to the input data, the systems' state, provided by the state machine, the robot can now decide what to do next, to achieve the given recycling task. If the robot is in search mode, the manipulator is resting at the starting position. Then, when an object is detected, the systems' state switches to the start state of the pick-and-drop process. When the state of the system requires the manipulators' gripper to switch in order to force control then the \"S-matrix control\" block will update the S-matrix, by switching the control type of the gripper DoF. Equation (16) presents the way the S-matrix is composed out of the \(S_{p}\) and \(S_{f}\) matrix:  
\[S=\left[ \begin{array}{ccc}1&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&1\end{array} \right]=S_{p}+S_{f}=\left[ \begin{array}{ccccc}1&.&.&.& 0\\.&1&&.\\.&1&&.\\.&&1&.\\ 0&.&.&.&0/1\end{array} \right]+\left[ \begin{array}{ccccc}0&.&.&.&0\\.&0&&.\\.&&0&&.\\.&&0&.\\ 0&.&.&.&1/0\end{array} \right]. \tag{16}\]  
After the reference values are calculated, the hybrid method splits into two control branches, each dealing with a specific control type: position control and force control.