Implementation of Fuzzy Logic Control on a Tower Copter

— Air transport has become a major attraction for scientists in the last decade, to carry out developments in the fields of firefighting, military, and commercial purposes. A quadcopter is a helicopter with four rotors. There are four arms connected to the main control and each arm has a motor with a rotor. In this study, the position control of a tower control is presented. A Fuzzy Logic Controller (FLC) is proposed, and it performance is compared with PID control. The hardware implementation test shows that FLC is superior to PID. The hardware testing shows that the settling time of the FLC control response is 0.5s while the PID control response is 1.2s. That means FLC settling time is faster by 58.33% compared to PID.


I. INTRODUCTION
In recent years, significant developments have been seen in the field of robotics. Several industries, such as automotive, medical, manufacturing, and Antarctica, use robots as substitutes for workers to avoid dangerous situations. Air transport has become a major attraction for scientists in the last decade, to carry out developments in the fields of firefighting, military, and commercial purposes. While the helicopter itself became the center of attention in the early 20th century. The helicopter was first made using 4 rotors by Debothezat in 1921 or called a quadrotor [1].
A quadcopter is a helicopter with four rotors. There are four arms connected to the main control and each arm has a motor with a rotor. The quadcopter relates to electronic speed control (ESC). ESC is a component that controls the motor speed of the main propulsion [2]. There is a lot of control method for a quadrotor proposed by the researcher. Some of them are PID [3,4], LQR control [5,6], sliding mode control (SMC) [7], model predictive control (MPC) [8,9], and Fuzzy Logic Control (FLC) [10,11].
A fuzzy logic controller (FLC) is a control method that uses a rule-based that converts linguistic rules into control action [12]. The development of fuzzy logic experienced very rapid development in the field of control techniques, more precisely in non-linear problems and complex calculation problems. The non-linear problems in question are problems that contain elements of uncertainty, imprecise, and noise [13]. Various studies apply fuzzy logic control such as motor control [14], battery charging [15], robotic [16,17], PV system [18], and energy management of hybrid vehicles [19]. The FLC does not require precise mathematical models of the system [20]. Therefore, it is suitable for quadrotor which has complex mathematical model.
This study implements the tower copter robot by utilizing fuzzy logic control to control the robot's position. The results will be compared to the PID controller to know the improvement achieved by the proposed control method. It is hoped that this simulation can be useful for further research or as a reference for other studies.

A. Tower Copter
The implementation stage of the tower copter control system uses the driving output in the form of a BLDC motor and the input in the form of the HC-SR04 sensor. The HC-SR04 sensor is a distance sensor based on ultrasonic waves. The tower copter robot work system can be shown in the block diagram of Fig. 1. A BLDC motor is a motor that does not use a brush to change the magnetic field but is done electronically. As with direct current permanent magnet (DCMP) motors, BLDC motors have two main parts, namely the rotor and the stator. In a BLDC motor, the rotor is a permanent magnet, and the stator is an electric coil. This motor has a type of rotor, namely the outer rotor and inner rotor, which differs in the location of the rotor on the outside of the stator and vice versa. The working principle of a BLDC motor is the same as that of a DCMP motor, which utilizes the properties of magnets and electromagnetic fields, but in its use to build a quadrotor, BLDC motors are preferred over DCMP motors. This is done because there are several advantages possessed by BLDC motors when compared to DCMP motors such as high efficiency, high torque, and speed, small noise, and volume [21]. The appearance of a brushless motor used is shown in Fig. 2.
Fahmizal, Implementation of Fuzzy Logic Control on a Tower Copter The HC-SR04 is an ultrasonic sensor that has two elements, namely an ultrasonic wave detection element and an ultrasonic wave generator element. Ultrasonic sensors are devices that can detect ultrasonic waves, which are sound waves with ultrasonic frequencies or frequencies that are higher than those that are audible to humans. The HC-SR04 Sensor hardware is shown in Fig. 3.

B. Fuzzy Logic Control
Prof. Lutfi A. Zadeh, a computer science researcher from California University, first proposed fuzzy logic in 1965 [22]. Professor Zadeh develops a fuzzy logic that can reflect any situation or human mind since he believes that right-false logic (firm logic) cannot capture every human thought. The membership of the items in a set is where assertive logic and fuzzy logic diverge. In strict logic, an element can either be in the set or have a value of one, which indicates that it is true, or it can be out of the set or have a value of zero, which indicates that it is incorrect. In contrast, element membership in fuzzy logic is between 0 and 1.
In this study, Sugeno type fuzzy which has a single value output known as a singleton is used. To obtain fuzzy logic output, 4 stages are needed, including (1) Formation of fuzzy sets (fuzzification). (2) Implication function. The implications used are min, in general, it can be written as in equation (1). (3) Fuzzy rules. In doing fuzzy inference the max (maximum) method is used. In general, it can be written as in equation (2). (4) The defuzzification process uses the center of the area (COA) method. This method is method that is often used in the defuzzification stage. In general, it can be written as in equation (3). Where:

C. System Design
The design of the tower copter in CAD form is presented in Fig. 4. and the finished tower copter is presented in Fig. 5. In the electronic design of the tower copter, consists of a device from the HC-SR04 sensor, a setpoint input module with a push button, the Arduino Uno device, and the BLDC motor as the main driving actuator of the tower copter. Because the tests carried out are static for altitude control, the electricity supply is from the power supply, not the battery. The overall block diagram of the tower copter design electronic system in this study is presented in Fig. 6.
The fuzzy logic implemented in the tower copter control system is embedded in the Arduino Uno with the term embedded fuzzy, meaning that all fuzzy stages are computed on a chip. Fig. 7. is the flow diagram of the fuzzy control system implemented on the tower copter.    The control system workflow starts with the initialization and declaration of variables and constants. Followed by BLDC motor calibration. Then the altitude information from the ultrasonic sensor is processed through a filter so that the readings are more accurate. Altitude readings are compared to a given set point. The difference in the height of the set point and the sensor generates an-error signal which is processed by the FLC. The FLC provides a control signal output to the ESC to control the BLDC motor speed. After testing, the results of the graphic response are shown in Fig. 9. Based on the graph, it can be concluded that the fuzzy logic control system is faster than the PID control. This is because the settling time of the fuzzy logic control response is 0. 5   From a series of tests and analyses that have been carried out on the implementation of the fuzzy logic control system on the copter tower, the design of tower copter system has been successfully designed and implemented with a fuzzy logic control system. Based on the graph of the response comparison of fuzzy logic and PID controls, it is found that the fuzzy logic response reaches the setpoint faster and is more stable. FLC settling time is faster by 58.33% compared to PID. When testing for a long time, the tower copter using the ESC 30A will overheat after operating for 20 minutes.