Application of Learning Vector Quantization and Trajectory Planning on a 4-DoF Robotic Arm to Move the Object

ABSTRACT


INTRODUCTION
Robotic arms are static robots that move within a limited range.The robot arm is formed from joint angles and several links.Robotic arms are widely used in industrial applications such as component assembly, metal welding, cutting, picking up, and moving objects.The role of robots in industry is as machines to replace human limitations in working.In industry, robots have a central controller that the operator can program and even manual settings to improve performance.The robot arm can be moved with the help of a controller system to regulate the direction of movement in Cartesian.Robotic arms have the advantage of operating continuously and can increase production results.
Many researchers and practitioners have carried out the development of robotic arms.Some robots that have been created include a robot arm controlled by a mobile smartphone [1], Robot arm integrated with PLC and SCADA [2,3], Robot arm movement using sensors [4], and the application of trajectory planning for navigation on robotic arm [5].These robots have the same goal: to make good movements in their duties.On the other hand, the application of intelligent systems such as Fuzzy Logic and Artificial Neural Networks is also combined in robot arm [6,7].The reason for using intelligent systems in robots is automation for dynamic tasks and minimizing the use of complex mathematical models.Smart systems also create decision-making reasoning within the machine.Intelligent systems are generally programmed in a microcontroller and based on a single-board or personal computer.Therefore, the application of intelligent systems can make data processing better.
In some cases, implementing cameras as visual sensors on robots has a good performance impact.The camera is useful in capturing objects and environments.There are various techniques for processing images captured by a camera, such as digital image processing techniques or computer vision facilities [8].Even image processing has been combined with intelligent systems for detection systems or recognizing certain patterns.An automatic navigation robot arm receives stimuli from sensor devices or cameras and commands from the operator.Our previous research related to robotic arms, such as applying speech word recognition methods as commands to robotic arms [9].There is also an application of Trajectory Planning as a movement route for the robotic arm [10].
In this research, we developed a 4-DoF robot arm with the implementation of an intelligent system and a camera, where the robot is responsible for moving objects based on the color captured by the camera.The smart system method uses the Learning Vector Quantization technique.LVQ is applied to identify red, green, and blue object colors.Navigating from initial to final positions uses the Trajectory Planning method.The computing process is done on the computer, and there is serial communication between the computer and the microcontroller system.

4-DoF Robotic Arm
Robotic arms are a type of robot specifically designed to carry out specific tasks.There are several types of robot arms, including planar, manipulator, translation, and rotation models.The robotic arm works within a limited area and is designed for continuous activity.In developing this research, our project is on a laboratory scale, as shown in Figure 1.This robot arm comprises a microcontroller system, four servo motors as joint angles, a power supply, and other electronic devices.The microcontroller uses an Arduino Uno, a motion controller for servo motors.Arduino receives commands from the computer via serial communication.Four servo motors have their respective tasks.Servo_1 is used as a joint angle on the base for movement in the X-axis and Y-axis directions.Servo_2 and servo_3 are used as Zdirection movement.Servo_4 is integrated with the gripper to regulate opening and closing when picking up an object.The robotic arm system's working area adjusts the link's overall length.Figure 2 shows a sketch of the robot arm's movement direction.

Object color recognition with LVQ.
In this study, the colors used are red, green, and blue.Figure 3 shows the shape and color of the objects in this study.The object's size ranges from 2.5 cm x 2.5 cm, which adjusts the shape of the gripper and the robot.The camera is mounted on a support pole with a height of 30 cm.The camera captures objects with a resolution of 240 x 320 pixels.From the capture results, pre-processing is carried out, namely cropping the image to 120 x 120 pixels.The results of the cropped image are calculated by calculating the total pixels for each red, green, and blue channel.The formula for calculating the real pixels for each channel is shown in (1).
The x and y indices are pixels of the crop image with width (M) and height (N) limits.The total from each channel is then processed into normalization using (2).The normalized values become training data in LVQ.
LVQ is a supervised machine learning technique.The learning process in LVQ consists of training and testing stages.The LVQ program is designed on the computer, where data and weights are also stored.Figure 4 shows the LVQ architecture in recognizing object colors.LVQ architecture consists of input, hidden layer, and output.

Cubic Trajectory Planning
Trajectory planning is an approach to planning the desired route.Trajectories generally use polynomial functions and are developed in several methods, such as linear, parabolic, cubic, etc.In this study, path planning uses the Cubic Trajectory method, namely the development of linear and curved.The trajectory on this robotic arm is a joint space because the route data is based on the joint angle (servo).The cubic trajectory formulation is as in (3).
Meanwhile, qs is the initial position, qf is the final position, t is the change in time, tf is the time duration, and q(t) is the change in the joint angle value.Equation ( 3) results from a third-order polynomial [12].Equation ( 3) is used on the robotic arm to drive four servo motors.

RESULTS AND DISCUSSION
This research was conducted in the Controlled Engineering Laboratory of the Faculty of Engineering, UNSRI.In prototype form, the robotic arm consists of four servo motors, an Arduino microcontroller, and other electronic devices (see Figure 1).The first experiment is to detect red, green, and blue objects.The camera installed on the support pole captures the object in an image resolution of 230 x 240 pixels, as shown in Figure 5.The object is placed in the purple city area, and then the image is cropped to a resolution of 120 x 120 pixels.The resulting crop image calculates the total pixels in each channel R, G, and B. The total pixels are processed in normalization.Figure 6 shows the results of the cropped image and the total pixels in each normalized channel.Data from each channel is trained in LVQ.Sampling for each colored object in a different position.Five samples were taken each object, so the total samples were 15. Figure 7 shows the pattern for each colored object.The next experiment is a trajectory for the robot to pick up an object and place the object according to the color box in the camera view (see Figure 5).In the screenshot of the camera, there are red, green, and blue squares.The robotic arm picks up colored objects and places them in a box according to their color.Tracks on each path are adjusted based on the direction of the colored squares.When an object is detected in red, the robot takes the object and places it in a red box, and the robot arm also does this for green and blue objects.The respective tracks are shown in Table 1.The data in Table 1 is stored in computer memory.During the experiment, the camera captures the object and is processed by LVQ to determine the color.When a red object is detected, route_1 is activated, and the robot moves the object to the red box.Figure 9 shows the movement of the robot arm in picking up and moving red objects.First, when the robot is activated, the robot is in the original position.Slowly, the end-effector approaches the object, takes the object, and then the robot moves the object to the red box (see monitoring Figure 9).

Figure 2 .Figure 3 .
Illustration of the rule of movement of the robot arm.(a) top view, and (b) side view In this research, the movement of the robot arm is regulated by servo motors by adjusting the direction of the angle based on the sketch in Figure 2. The computer directly gives movement commands to four servo motors, and the method used is Trajectory Planning.The camera is an object detection sensor integrated with a computer, and the technique used is RGB color recognition based on Learning Vector Quantization.Colored object.(a) red, (b) green, and (c) blue

Figure 4 .
Figure 4. LVQ architecture for object color pattern recognitionThe LVQ algorithm for the learning process for object color recognition is as follows[11]: 1. Set initialization such as initial weight (W), maximum epoch, minimum error, and learning rate (α). 2. Input variable X(m,n) and target T(l,n).3. Provide the initial condition value, epoch = 0, and the error value.4. Learning process: a. epoch = epoch + 1 b.do it from i = 1 to n c. determine j to || X-Wj || minimum is called Cj d.Update the weight with the following conditions: if T = Cj Then ( ) ( ) ( ) ( ) j new j old j old w w x w  = + − if T ≠ Cj then

Figure 9 .
Figure 9.A robotic arm picks up and carries a red object

Figure 10 .
Figure 10.A robotic arm picks up and carries a green object