## 2 Materials and Methods
### Federated Learning for Articulated Robot Control
#### 2.3.1 FL Module
This process is then repeated until the performance of the global model is converged. #### 2.3.2. Articulated Robot Control Module

The proposed articulated robot control module uses the global model generated by the proposed FL module addressed in Section 2.3.1. It recognizes a picking object and its workspace position from the images taken by the camera sensor, and it derives the parameters of each joint of the articulated robot accordingly. Finally, the movements of the end-effector (a gripper) and joints (two R joints and one T joint) are controlled by PWM. The \(3-\)DOF robot arm is an articulated robot that performs a picking task using two R joints (Joint\({}_{\text{r1}}\) and Joint\({}_{\text{r2}}\)), one T joint (Joint\({}_{\text{t}}\)), and an end-effector (G; Gripper). In Figure 3, the base is used to connect the robot to the ground; \(l_{1}\), \(l_{2}\), and \(l_{3}\) are the links of the robot; \(\theta_{1}\), \(\theta_{2}\), and \(\theta_{3}\) represent the actuation angles of Joint\({}_{\text{t}}\), Joint\({}_{\text{r1}}\), and Joint\({}_{\text{r2}}\), respectively. The major role of the articulated robot control module is to capture an image of the picking object and recognize its location via the trained client local model so that the joint movement plan can be computed with the inverse kinematics solution, as shown in Algorithm 2. Figure 3: Coordinate system of the \(3-\)DOF articulated robot (TRR-type); \(l_{1}\), \(l_{2}\), and \(l_{3}\) represent the lengths of each joint; \(\theta_{1}\), \(\theta_{2}\), and \(\theta_{3}\) indicate the angle of each joint; \(G\) represents the coordinates of the end-effector. The weighted average (\(\mu_{x,y}\)) of sub-area \(s\) is derived using the two-dimensional Gaussian filter \(G(x,y)\) described in Equation (1). With the derived Gaussian weighted average of sub-area \(s\), threshold \(\theta_{x,y}\) of sub-area \(s\) can be expressed as Equation (2) with integral image \(I(x,y)\). For example, \(p_{x,y}=p_{2,2}=I(2,2)-I(2,1)-I(1,2)+I(1,1)\). \[G(x,y)=\frac{1}{\sqrt{2\pi\sigma}}\mathrm{exp}\left(-\frac{\left(x^{2}+y^{2} \right)}{2\sigma^{2}}\right) \tag{1}\]

\[\theta_{x,y}=\frac{1}{b^{2}}{\sum_{x_{i}}\sum_{y_{i}}I(x+x_{i},y+y_{i})}-C \tag{2}\]

The preprocessed image goes to the inference node in the aggregated global model. The object detection process feeds the image to a neural network for feature extraction, and the extracted features (e.g., edges, corners or contours, and pixels) are then used to predict the location and class of an object in the image using anchor boxes. Anchor boxes, also known as prior boxes, are pre-defined bounding boxes with specific shapes and sizes that are placed at different locations across the image. These anchor boxes serve as references for the neural network to predict where the object is located and what its size might be. This predicted information, which includes the adjusted anchor box parameters (e.g., width, height, and position) and associated class probabilities, is obtained as an output of the trained client local model. However, the output can sometimes result in multiple overlapping bounding box predictions for the same picking object. To overcome this problem, a non-maximum suppression (NMS) process is conducted. Non-maximum suppression is a post-processing step that removes redundant bounding box predictions. From all of the predicted bounding boxes, it iteratively selects bounding boxes with high confidence scores until there is no more overlapping between the selected boxes. As a result, the final output of the object detection process consists of the selected bounding box and the class of the picking object. Once the inference node of the FL module identifies the location of an object, a movement plan is generated for the joint angles to set the configuration of the end-effector. Therefore, in the kinematics solver processor, the angle of each joint is derived to conduct the picking task via the end-effector from its current location to the location of the object.