2018 Implementation of Fuzzy-PD for Folding Machine Prototype Using LEGO

wahyusp@itats.ac.id Abstract Folding machine prototype is a tool for folding clothes that used a LEGO Mindstorm EV3 and the movement of this LEGO will be controlled by using the proposed method.This research is using 2 kind of systems, first is (Proportional Integration Derrivative) and second is Fuzzy-PD. This system can improve the production efficiency especially in micro convection-based industry (UKM). This folding machine prototype has 3 folds connected to the EV3 Large Motors as actuators. PID and Fuzzy-PD control systems are used to control the position of the motor angle by reading the rotary encoder. Based on the test results with load condition at Kp=7,00; Ki=2.00; Kd=15.5,the PID control system has a rise time of 0.479s with settling time of 0.551s and overshoot value of 9,1%. While the result of Fuzzy-PD control shows the rise time is equal to 0.617s with settling time of 0.7s and overshoot value of

LEGO as manufacturer of Mindstorms EV3 already provides LEGO Mindstorms EV3 (Home Edition) tool with programming blocks. There are also many other third-party tools that use C language, such as NBC, ROBOTC, BrixCC, leJOS, and so on. CPU in LEGO Mindstorms EV3 is using LINUX Operating System, the specifications are; 300 MHz ARM9 Controller, Flash Memory 16 MB, 64 MB RAM and USB communications [17]. Based on this specification LEGO Mindstorms EV3 is capable to do the PID and Fuzzy control systems using DC motor actuators [18][19][20][21][22]. The use of LEGO Mindstorms EV3 on the simulation and programming control system is able to reduce costs, even though the work is approaching the real problem. This is because LEGO MindstormsEV3 has the hardware to simulate, program and test on the industrial applications.

Research Method
In this study, the research design is divided into several main parts like design of hardware systems (hardware), design of software systems (software), and design of tool mechanisms. The method of control system in this research is using Fuzzy PD to control the motion of flipped arm. Hardware from Folding Machined was built by using LEGO Mindstorms EV3 module and consists of EV3 Brick, Large motor LEGO, touch sensor and flipped arm mechanism from LEGO mechanical device. The Large motor LEGO has a built-in rotation sensor with 1-degree resolution for precise control.
In Figure 1, the Block diagram of hardware system is a part of the system work that associated with the hardware system applications in the folding machine, the input to start the system is coming from the touch sensor. Figure 2 is the design of the prototype folding machine using LEGO Mindstorms EV3. The design of the folding machine prototype was built using a freeware computer program called Lego Digital Design. Based on Figure 2, the design of folding machine have 3 flipped arm mechanism.  Figure 3 is the structure of the Fuzzy-PD control system for the folding machine; the fuzzy output value is used to control the rotation angle of the DC motor. The input variables of Fuzzy-PD are the error value (Err) and delta error (Δ Err) which is obtained from the difference between the setpoint and the pulse count from the rotary encoder sensor [3], [6][7][8]. Application of Fuzzy-PD method to LEGO EV3 Brick is done by using C language on RobotC.    In the Fuzzy-PD control there are rules (rule evaluation) and serves to generate output value. The rules are shown in Table 1.

Results and Analysis 3.1. Folding Machine Simulation
In the performance analysis of the folding machine prototype is given a step signal as the input on the plant as shown in Figure 3. The simulation is using dynamic motion principles while for the system in real uses LEGO Mindstorms EV3. The observed perfomanceson PID and Fuzzy-PD are consists of rise time, overshoot, steady state error and settling time. In the simulation program in this research is using motion dynamics in 1 DOF (degree of freedom) arm manipulator for flipped arm, then the simulation of movement will be approached in a real conditions. This is because the dynamic concept to reach the setpoint angle is determined based on the magnitude of torque, mass, inertia, gravity and arm length. In the simulation the torque will be used as the output to be controlled and as an input to generate a large angle using equations 1-3.
In this folding machine simulation, PID and Fuzzy-PD will be compared each other, both control systems are using the input error and delta error values to produce torque output to  Figure 7, control response has a rise time of 0.002s, settling time of 0.005s, overshoot at 23.3% and steady state error of 1.03%. If we looked to the PID response in Figure 8, the PID controller with the values of Kp=0.5; Kd=1; Ki=0.001 has an overshoot of 1° or 1.1%. At this condition, the rise time of the system is equal to 0.004s with the steady state or settling time at 0,009s. Based on Figure 9, the simulation response from Fuzzy-PD has a rise time of 0.069 s with a delay of 0.049 s. Fuzzy-PD system produce an overshoot of 5° or 5.5% due to the maximum value of 95°, steady sate condition is happened at 92° with the settling time of 0.079 s. The control system with Fuzzy-PD has a steady state error of 2 o . From that result, it appears that the result of Fuzzy-PD has not been optimum, with a slower response from PID and it has steady state error.
The steady state Fuzzy-PD is still tolerable because the value is only 2.2% of the setpoint, since the prototype of folding machine does not require precision angle. If we want to compare with the previous research on the application of fuzzy PID control system [23], it was explained that fuzzy PID need more than 1.6 s to reach the settling time. It means the proposed fuzzy-PD method in this paper has better settling time. The combination of fuzzy and PID has lower overshoot when it was compared with cascade PID. Higher overshoot will not good for the reliability for the arm manipulator. The next testing process is to use LEGO Mindstorms EV3 that arranged into a prototype of folding machine. Initial testing of this prototype of folding machine is built with no load or without using clothes. Figure 9. System Response of Fuzzy-PD In Figure 10, the PID response when using the parameters of Kp=7, Ki=2, Kd=15.5 has a rise time of 0.294s, settling time of 0.354s, 15.8% overshoot and 12.5% steady state error. If we are using a Fuzzy-PD control system, it has a rise time of 0.37s, settling time of 0.462s, overshoot at 10.8% and 2.5% steady state error. In Figure 11, a response control system on the prototype of folding machine by using a shirt. PID control response has a rise time of 0.479s, settling time of 0.551s, overshoot at 9.1% and steady state error of 3.33%. When using Fuzzy-PD, the rise time is reached at 0.617s, settling time at 0.7s, overshoot of 7.5% and steady state error at 1.6%.

Conclusion
The principle of 1 DOF arm manipulator is used to control the flipped arm on the prototype of folding machine with PID and Fuzzy-PD control method was done by simulation procedure and direct performance by using the prototype of folding machine with LEGO Mindstorms EV3. The prototype of folding machine in this study is expected to have a fast response or even no overshoot. Based on the simulation of the control response, it can be observed that the best response is the PID method with the parameters setting of Kp=0,5; Kd=1; Ki=0.001, at this point the overshoot value is closed to 0° and the error steady state is equal to 1°. On the Fuzzy-PD control, the simulation shows a long delay due to the long program execution process. This is happened because Fuzzy-PD must go through the several stages of fuzzification, evaluation rule and defuzzification. As in the folding machine simulation model, the system is also significantly applied to this research. The system is using LEGO Mindstorms EV3 with Fuzzy-PD and PID control system with parameters setting of Kp=7, Ki=2, Kd=15.5. From the obtained response, although Fuzzy-PD is slower than PID, Overshoot on Fuzzy-PD is very small compared to PID. Although it has steady state error, due to its small value then this value can be tolerated by considering that the prototype of folding machine not required a high precision performance. Both of them also have a little differentiation of the rise time performance. The experimental results of the proposed position control using Fuzzy-PD is better than previous research, where rise time less than 0.386s and settling time less than 0.616s.