Solar Panel Control System using an Intelligent Control: T2FSMC and Firefly Algorithm

Solar panel is a solar energy converter to electrical energy. On solar tracker, there is a controller which sets the movement of solar panel such that it is perpendicular with solar rays. Previous research had designed Type 2 Fuzzy Sliding Mode Control (T2FSMC) controller to control the position of solar panel. However, there was trial and error process to determine gain scale factor so the development of optimization method is needed. This paper aims to modify gain scale factor using Firefly algorithm to increase performance of system. The simulation shows that T2FSMC Firefly has better performance than T2FSMC. T2FSMC Firefly shows the increase of performance on rise time, settling time, and integral time absolute error.


Introduction
Indonesia is one of the tropical countries that considerably provide adequete solar energy. Utilization of solar energy as an alternative energy source can be maximized to overcome the energy crisis, which has unlimited amount. Moreover, the utilization does not cause pollution that can damage environment. According to the ministry of Energy and Mineral Resources, solar energy in Indonesia is very large amount for about 4.8 KWh/m2 or equivalent to 112.000 GWp, unfortunately this abundant amount has been utilized only about 10 MWp. Currently, the government has issued a roadmap of solar energy utilization that target the installed capacity of PLTS in 2025 is 0.87 GW or about 50 MWp/year. This amount represents a promising market potential for future solar energy development. Thus, this fact can be used as a basis to overcome the energy crisis in Indonesia [1]. Solar panel is a tool that can be used to convert solar cells into electrical energy. The most critical problem in realizing solar cells as an alternative energy source is its efficiency. Efficiency, in this case, is defined as the ratio between the electricity generated by solar panels compared to the amount of light energy received from the sun's rays [2]. Tomson designed and implemented one-axis solar poll system, the result indicated that the intensity of solar radiation received was in a maximum of 20%. The less-efficiency of solar panel was due to the position of the panel was not always perpendicular to the position of the sun that causes solar panel cannot absorb the solar energy to the maximum [3][4][5].
In order to the solar panel follow the direction of the sun motion, a controller is needed to control the position of the solar panels angle. Previous research that was conducted by Mardlijah by using a Type 2 Fuzzy Sliding Mode Control (T2FSMC) to control the position of solar panels angle. However, the result showed that the performance of T2FSMC can still be improved, because the determination of gain scale factor was using trial and error method [6]. Thus, the best gain scale factor was not optimal.
Mardlijah succeeded to improve T2FSMC by using Firefly Algorithm to determine the gain of scale factor and its fuzzy membership function automatically on Plant Inverted Pendulum on Cart (TWIP). This research showed more clearly how the TWIP Robot angular response toward the impulse trigger signal gave more accurate Firefly-T2FSMC result with lower settling time than the FSMC and T2FSMC results [7]. The use of Firefly Algorithm is based on the pattern and behavior of light from Firefly flocks. In addition, Firefly algorithm has many advantages that have been analyzed and found previously. Besides to being easy to implement,  (Mardlijah) 2989 this algorithm has a fast and highly effective convergence capability to produce solutions of optimization problems [8].
To find out more about the Firefly Algorithm method in optimizing gain scale factor in T2FSMC control system for control the angle position of solar panel, it is simulated to find the best firefly. It is a combination of gain scale factor which is inputted into the T2FSMC control system. Then, the performance of it can be seen.

Research Method
In this section, the method contains about solar panel, solar panel driven system, type 2 Fuzzy logic controller, T2FSMC controler, Firefly Algorithm.

Solar Panel
Solar panels are tools that can convert sunlight directly into an electrical energy or known as photovoltaic. The solar panel can be analogized as a tool with two terminals. When dark conditions or insufficient light, it serves as a diode. Nonetheless, when exposed with sufficient sunlight, it can produce voltage. It was a simple model of a solar panel that has been proposed by Kuo [9]. The solar panel system scheme can be seen in Figure 1. The principle of this model is how to set the position of the collector or the collecting disk to be constantly perpendicular to the sun. When the sunlight drops precisely to the surface of the panel perpendicularly, it got a maximum energy of approximately 1000 W/m 2 or 1 kW/m 2 [10]. As in Figure 2, the angle 1 is the input of the system in form of sunlight received by two solar panel sensors system. When the sensor is directed to the sunlight, the light rays from the gap circles the two cells. The angle 0 is the output of the system in form of motor angular position used to move the collector in order to rotate in the direction of the sun's position. Modeling of solar panel system is derived from the mathematical equations of major component parts such as DC motor which is the driving force of solar panels.

Solar Panel Drive System
Prototype of solar panel in this research is driven a Motor DC system. The input of the DC motor is in form of electric and the output is in form of mechanic. In the previous research, the identification of parameters on the DC motor system has been done so that the mathematical model of DC motor along with the representative parameters to the DC motor condition used as a driver on the prototype solar panel has been discovered. The measurement was done on the resistance and inductance parameters in DC motor by using LCR meter test. Furthermore, Torque constant and reverse emf constant use CNC Milling and Avometer test. The moment of inertia and the viscous friction coefficient is obtained by referring to the similar specifications of the motor tested. The DC motor scheme is presented in Figure 3.

Type 2 Fuzzy Logic Controller
The principle of Type 2 Fuzzy Logic is the application of fuzzy set theory in the field of system control. Type 2 Fuzzy is a development model of Type 1 Fuzzy. Type 2 Fuzzy Logic is often used to build unpredictable rules [6,11]. The reason of uncertainty rules can occur are: 1. Differences in determining the set of consequences of each rule. 2. Differences in antecedent and consequent words of rules can have different rules in different people. 3. The existence of disturbances (noise) that insert between data.
Type 1 Fuzzy Logic system that has a strict membership function, is unable to overcome this uncertainty while the fuzzy logic system of type 2 intervals that has an interval membership function, it has the ability to overcome this uncertainty [6,12]. The notion of the type 2 fuzzy logic system interval was introduced by Zadeh in the 1970s as an extension of the usual fuzzy set concept or can be called the Type 1 fuzzy set [13]. The main concept of type 2 fuzzy is the word can be interpreted differently by different people. Type2 fuzzy logic includes membership function, fuzzy inference system, and defuzzification [14].

T2FSMC Controller
As previously discussed, the T2FSMC controller is the development of FSMC controller. It is a combination of SMC and FLC. The T2FSMC control scheme is similar to the FSMC control scheme where the inputs in IT2FLC are two predefined variables, and variable, from the SMC controller. Figure 4 is the basic scheme of T2FSMC controllers [9]: The T2FSMC controller scheme and FSMC control scheme differ on the fuzzy used. T2FSMC uses type 2 fuzzy logic which the membership function uses type 2 fuzzy. The design of T2FSMC uses the same sliding surface as SMC. In order to determine the input value u of the plant, switching function is required. The input u value is derived from the fuzzy rules as follows (5) [15].
As shown in Figure 5, is the distance between the sliding surface and the state vector which is the ordered pair of (, ) while is the distance between the state vector and the normal vector to the sliding surface [17]. The values of and can be written as it seen in and , the result value is multiplied by the gain scale factor (K f ) to obtain the control U r ( ). U r ( ) with added noise ( ) are inputted to the plant (DC motor) to move the prototype. On the T2FSMC controller, the fuzzy rule required is same as the FSMC fuzzy rule defined as where NB = negative big, NM = negative medium, NS = negative small, N = negative zero, PB = positive big, PM = positive medium, PS = positive small, PZ = positive zero. The rule is used to determine the range membership function and .

Firefly Algorithm
Firefly Algorithm is a metaheuristic algorithm inspired by nature. It is an optimization based on the social behavior of flashing fireflies found in the tropics. This algorithm was developed by Dr. Xin-She Yang at Cambridge University in 2007, and was based on swarm behaviors such as fish, insects, or birds in nature. In particular, Firefly Algorithm has many similarities with other algorithms based on swarm intelligence such as Particle Swarm Optimization, Artificial Bee Colony Optimization and Bacterial Foraging Algorithms. It is indeed much simpler in concept and implementation. Furthermore, according to the last bibliography, this algorithm is very efficient and can outperform another algorithm conventional, such as Genetic Algorithm to solve many optimization problems. The fact that had justified in a recent study, the performance statistics Firefly Algorithm can be measured over another famed optimization algorithm using standard stochastic test functions. The main advantage is that it uses of real random numbers and have a based on global communications among the particle collections, in this case are fireflies [18][19][20].

Attractiveness
In Firefly Algorithm, fireflies' attraction function form is a monotonically decreasing function defined as (8): which is the distance between two fireflies, 0 is the initial attraction at = 0, and is the absorption coefficient which controls the decrease in light intensity. The distance between two fireflies I and j, in the position of and , respectively, can be defined as Cartesian or Euclidean distance as follows (9): which , is the -th component of the spatial coordinate of the -thread fireflies and is the number of dimensions.

Movement
The movement of the -th firefly interested in the brighter -th firefly is given by the following (10): the coefficient is a randomization parameter determined by the ratio of problems, which is a random number vector taken from the normal distribution or uniform distribution.

Design of T2FSMC and T2FSMC Firefly
By calculating mathematically of each solar panel component, it is obtained from equation of solar panel system as follows (11): the following are varibles assumed Designing T2FSMC and T2FSMC Firefly control system require control input from SMC. As the result, it requires switching function as follows (17) The design of T2FSMC control system is presented in Figure 9. It requires Gain 1, Gain 2 and Gain 3 which are obtained by trial and error. Thus, it yields Gain 1 = 10 -7 , Gain 2 = 5×10 -5 , and Gain 3 = 0.022945. The design of T2FSMC Firefly control system as shown in Figure 10 is almost same with the design of T2FSMC Firefly control system as in Figure 9. The difference is clear that it uses Firefly algorithm. It also requires Gain 1, Gain 2 and Gain 3 which are obtained by using Firefly Algorithm. Thus, we obtain Gain 1=1.0844023248565905×10 -7 , Gain 2=4.910932153091892×10 -5 , and Gain 3=2.2963190116691054×10 -2 .

Results and Analysis
In this simulation, T2FSMC Controller is compared to T2FSMC Controller Firefly. The aims of this simulation is to know the performance of each controller and which controller is more robust. The simulation uses parameter values shown asTable 2 [9]. First, T2FSMC Controller and T2FSMC Controller Firefly on solar panel are simulated. From this simulation the data are analyzed so that the better controller performance is obtained.
The simulation is performed by comparison between the T2FSMC Firefly control response and T2FSMC control for 10 seconds with parameters. The simulation result using MATLAB is shown in Figure 11.  Figure 11. Comparison angel velocity between T2FSMC and T2FSMC Firefly Figure 11 shows that it is difficult to find the difference in performance of T2FSMC Firefly controller with T2FSMC, but the difference can be seen from ITAE value of each controller, and shows that the performance of T2FSMC Firefly controller is better than T2FSMC controller. The comparison of both two control systems can be seen in Table 3.  Table 3 shows that ITAE from controllers before and after modification has very little difference. This is because T2FSMC has been very good at controlling the solar panel motor drive system. However, the base of the Firefly optimization is to eliminate the unpredictability of trial error taking of scale scale gain values. It shows that there is an increase in ITAE performance so that the results obtained are better than simulation before. The other performance improvement is the decrease of rise time and settling time. This shows that the modified system has a better system response.

Conclusion
Based on the results of the simulations, the results can be concluded as follows. T2FSMC Firefly is able to improve the performance of T2FSMC, where the system angle control of the solar panel position with T2FSMC Firefly controller is able to achieve stability on time to 4.53 seconds with ITAE 9.63824211077099x10 -5 and the T2FSMC controller is able to achieve stability at 6.78 seconds with ITAE 9.83330298068067x10 -5 . Judging from the rise time, T2FSMC Firefly also shows a performance improvement that is from 2.533 seconds to 2,504.