A Position Controller Model on Color-Based Object Tracking using Fuzzy Logic

. Robotics vision is applying technology on the camera to view the environmental conditions as well as the function of the human eye. Colour object tracking system is one application of robotics vision technology with the ability to follow the object being detected. Several methods have been used to generate a good response position control, but most are still using conventional control approach. Fuzzy logic which includes several step of which is to determine the value of crisp input must be fuzzification. The output of fuzzification is forwarded to the process of inference in which there are some fuzzy logic rules. The inference output forwarded to the process of defuzzification to be transformed into outputs (crisp output) to drive the servo motors on the X-axis and Y-axis. Fuzzy logic control is applied to the color-based object tracking system, the system is successful to follow a moving object with average speed of 7.35 cm/s in environments with 117 lux light intensity.


Introduction
The technology of robotics requires information vision to decide the action to be performed.Application of vision on a robot as a navigation tool, the search for the desired objects, etc. Vision information on the robots become very important as information received more details compared with the proximity sensor or other sensors.Robotics vision is a technology that combines the technology of robotics and computer vision.
Computer vision is a combination of image processing, pattern recognition and decision making.The main purpose of computer vision is to translate an image.Many benefits can be gained from the fields of computer vision, one of which can be applied to the color object tracking system.By using computer vision technology on the robot, it allows the robot to be able to move autonomous in accordance with the information obtained from the imaging camera mounted on the robot.The system's ability to follow a moving object became an obstacle in the process of positioning the camera to always follow the position of the object, so we need a reliable position control so that the camera is able to follow an object moving at a certain speed.Generally, the control of the position that has been applied are using conventional controls, such as PID control or a combination of them.In this paper we apply fuzzy logic method for controlling servo motors on the X axis and Y axis, so that the camera can follow the movement of the object and evaluate speed of response on a fuzzy logic control applied in the control of servo motor to position the camera always follows the object being detected.

Image Processing
One application of image processing is to separate the image in parts, e.g.certain parts that are wanted for feature extraction and pattern and get the desired image [1].Image processing operations are categorized into: image enhancement, image segmentation, restoration, and image compression, by using a computer algorithm to perform digital image processing [2].Image segmentation is the first step in extracting the information contained in an image.Image segmentation is a technique to divide the image into two parts so as not to overlap [3].

Fuzzy Logic
Fuzzy logic is used to declare the operation of a system of law with language expression and not with the mathematical equation.Many systems are too complex to be modeled accurately, even with complex mathematical equations.Fuzzy approach involves the rules expressed in words and does not require high precision and tolerance for less precise data [4].
Four main factors are needed in implementing FLC, namely the number of fuzzy sets in linguistic form, rule base for a process of inference, decision-making to determine the behavior of the controller and the shape of the membership function [5].Fuzzy control does not require complex mathematical models.Control rules stated on the basis of the logic of language variation.Fuzzy control adaptive control techniques so far is good.[6].Generally, the fuzzy control system consists of four basic factors: fuzzification, rule base, inference and defuzzification [7].The membership function is a curve that describes the mapping input data into membership values, which have a range between 0 and 1.The membership function has several different types, such as a triangular shape, a trapezoidal shape, etc.For systems -systems that require significant dynamic variation, triangular or trapezoidal shape can be used.For the control system is very high, gaussian shape or S-curves can be utilized [8].
Position control using fuzzy logic in this paper using a triangle curve and Trapezoidal Curve, as shown in Figures 1 and 2. (2)

Result and Discussion
Realization colour object tracking system using fuzzy logic as position control, done in two phases: the design and manufacture which includes the design and manufacture of hardware and software.

Design of Fuzzy Logic Controller
The system in this research is designed to implement the fuzzy logic that consists of two inputs: input data (X-axis data and Y-axis data) and input del_data_prev.Input data is data read out position of the object captured by the camera while del_data_prev input is the input data is reduced to previous data.And consists of one output of the PWM value (Pulse Width Modulation) for controlling DC servo motors for movement on the X axis and Y axis.Design of position control using fuzzy logic of this approach is to have a set of fuzzy triangular shape (a, b, c) according to the equation 1. Input data and input del_data_prev then used as crisp for fuzzification process in determining the direction of rotary motors by setting the PWM (Pulse Width Modulation) to position the camera to always follow the position of the ball-shaped object.The analysis of fuzzification process for both inputs are as follows: a. Input data Input data is represented by the shoulders and triangular membership functions as in Figure 3.   Then the next stage is the defuzzification process, process defuzzification used methods singleton weight average of Sugeno, while the design of defuzzification process is described as follows:

Hardware Design of Colour Object Tracking System
Hardware manufacture color object tracking system using some of the equipment and materials needed and make the design, while the block diagram of a color object tracking system can be seen in Figure 6.6 describe show the color object tracking system follows the position of the ball-shaped object based on the pixel value of each axis into a microcontroller (Fuzzy Logic Controller), the results of data processing performed by the microcontroller are then sent to the X-axis and Y-axis servo motor to move the camera to follow the changing position of the object detected.The test results detecting a ball shaped object with a diameter of 16.9mm, 31mm, and 63.7mm.The test results are presented in Table 2.
Table 2 reveals that the camera is able to detecting objects green balls with a diameter of 16.9 mm, 31 mm, and 63.7 mm, it is marked with a red circle around the objects and the pixel value of the object's position will be read.Results of testing the response of the camera position control using fuzzy logic to change the position of objects, are presented in Table 3.The object is not able to follow Table 3 shows that the speed of the object of 2.87 cm/s -7.35 cm/s, camera is able to follow the movement of the object.This is indicated by the rate of which has a speed camera near the speed of the object.While, at a rate of an object 16.33cm/s camera is not able to keep pace with the object.

Conclusion
Fuzzy logic controller was implemented using the C language on this system, which includes the process of fuzzification, inference and defuzzification able to control two servo motors that move on the X axis and Y axis to follow the change in position of an object well.Position control with fuzzy logic applied is able to follow an object moving horizontally at an average rate of 7.35 cm/s.

Figure 3 .
Figure 3. Fuzzy set for input data

Figure 6 .
Figure 6.Block diagram of colour object tracking system

Table 1 .
Fuzzy Logic Rule

Table 2 .
Testing Results of object detecting with variations in the size of the object

Table 3 .
Results of testing the response of control position in following moving objects