1 Journal of Intelligent System and Telecommunications 1. 1-12 Journal of Intelligent System and Telecommunications Journal homepage: https://journal. id/index. php/jistel/index Intelligent tuning of LQR for Regulating Ball and Beam Balance System Triawan Nugroho 1*. Fahmi M. Mochtar2. Muhammad B. Musthofa3, and Muhammad M. Syeichu4 Department of Electrical and Computer Engineering. King Abdulaziz University. Jeddah. Saudi Arabia 2,3,4 Department of Electrical Engineering. Universitas Negeri Surabaya. Surabaya. Indonesia *Correspondence: twignyo@stu. ARTICLE INFO ABSTRACT Article History: Submitted/Received 6 November 2024 First Revised 19 December 2024 Accepted 20 December 2024 First Available Online 21 December 2024 Publication Date 21 December 2024 The ball and beam balance systems . S) are widely utilized to test and demonstrate the performance of several control methods. However, regulating bS is challenging since its inherent instability and nonlinear dynamic system. In this paper, linear quadratic regulator (LQR) is proposed to regulate bS. To get the optimal performance, the genetic algorithm (GA) is utilized for intelligent tuning of the LQR. Furthermore, this research uses MATLAB Simulink for numerical simulation. The results reveal that the system can reach the reference for fixed reference. In addition, when the reference is changed, the response can follow the reference with yuaycc , yuayc , and yuayc are 0. 2644 s, 0. 5018 s, and 0. 6840 s, respectively and when the system is given a disturbance, the response can return to the reference with yuaycc , yuayc , and yuayc are 2644 s, 0. 3885 s, and 0. 6785 s, respectively. ____________________ Keyword: Optimal Control. LQR. GA. A 2024 Tim Pengembang Jurnal UNESA Triawan Nugroho. Intelligent tuning of LQR for Regulating Ball and Beam Balance System | 2 INTRODUCTION Ball and beam balance system . S) is widely applied in control engineering to evaluate and demonstrate control methods since its nonlinear dynamic system and difficulty in maintaining balance . , . , . bS is inherently unstable systems, where the position of the ball can be changed indefinitely for fixed beam angle input . , . Although it does not require a complex design, tools used to evaluate and control the system can be developed into other more complex systems. This system has 2 Degrees of Freedom (DOF. , where the ball is assumed to have an inertia acceleration during the movement of the beam. In bS, a ball is located on a beam that can be tilted at varying angles . The bS needs accurate control to maintain the ball balanced at a desired place. However, to achieve a balance between stability and control method is challenging and requires an accurate control technique . , . In the literature, several techniques have been proposed for the bS. Ali H et al. proposed optimization of proportional-integral-derivative (PID) using particle swarm optimization (PSO) to control bS. In this article. PSO was used to tune the gains of PID. The results revealed the proposed technique provides a better response than other method . In . , modelling and control of bS has been presented. To find the ball position. Lagrange method is used. In this research. PID has controlled the nonlinear characteristics of the system. The results showed that the proposed approach gives better In . , the optimal design of PID using intelligent tuning has been proposed to balance the bS. The intelligent tuning methods employed in this research are generic algorithms (GA) and PSO. The results showed that the proposed method provided fast responses for the bS. In . Umar et al. demonstrated the performance of linear quadratic regulator (LQR) for the bS. The results revealed that the velocity and beam angular velocity are superior at smaller ycE. However, they may have limitations to achieve global optimum. In this paper, an intelligent tuning of LQR for bS to achieve global optimum is proposed. To get global optimum parameter, the GA is utilized. The intelligent tuning using GA for optimal gain of LQR improves the control performance and stability of the bS. The proposed technique provides the robustness of LQR with the optimization capability of GA . The rest of this paper is organized as follows. Section II explains the system modelling of ball and beam. In section i, the proposed control method used in this paper is explained. Section IV explains the results of the discussion and simulation. Section V is a conclusion of the paper. bS The bS as shown in Figure 1 is unstable without active feedback. It causes the ball to keep moving up and down. The bS has a linear beam shape, and the ball is placed there. The ball moves on both sides of the beam without leaving the track. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 3 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 pp 1-12 Figure 1. Model Ball and Beam Systems. The system uses a linear potentiometer sensor to know the position of the ball. When the servo motor rotates the lever arm, angle yuE will change the angle of the beam with yu, this is because of gravity the ball rolled along the beam . From the bS, we get a mathematical model which comprises a servo motor transfer function (TF) and a ball model rolling on a The expression of the servo motor which has an angle and voltage position will be written as follows . ya ya. = ycO. = ycycN yc where ya donates the DC motor gain and ycN represents the motor time constant. The formula for a ball linear acceleration along the beam will be written as follows. cI yc. ycO ycoyci sin yu Oe ycoycN yuN 2 = 0 where J is a solid ball inertia moment with a small . The formula of the system can be written as follows. = yca. = ycoyci ya {( 2 yc. yc2 } ycI The connection between the beam angle and displacement motor angle yuE is as follows. ycc yu = ya . The complete TF equation for ball moving to the beam path in relation to the ball position yc. and the rotation angle yuE. will be written as follows. ycO A . = . = ycoyciycc ya ycI . a( 2 yc. yc2 OPTIMAL METHOD 1 Linear Quadratic Regulator The state space system formula is presented as follows. U = yaycu yaAyc DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Triawan Nugroho. Intelligent tuning of LQR for Regulating Ball and Beam Balance System | 4 Reducing the performance index to a minimum value to attain the system's acceptable ultimate performance is the ideal design for the LQR control approach. In the LQR control design, the performance index (J) is: = Oeyaycu. To obtain the feedback gain matrix, two primary equations need to be considered. The equation is K. yaycN ycE ycEya Ae ycEyaAycI Oe1 yaA ycN ycE ycE = 0 the feedback matrix K in the Algebraic Riccati Equation (ARE) is as follows. ya = ycN Oe1 . cN ycN )Oe1 yaAycN ycE = ycI Oe1 yaA ycN ycE Then. Eq. 10 is substituted into Eq. U = yaycu Oe yaAyaycu = . a Oe yaAy. System control may be obtained using the MATLAB software from the state 6 matrix equation. The Q matrix is the identity matrix. The dimensions of the R are determined by the number of entries in B. 2 GA GA is a method of problem-solving that is most appropriate and comparable to genetic processes that naturally occur, also known as crossovers and mutations, and is founded on Darwinian principles of reproduction and survival. GA are a method for optimization and mathematical problems. This programming is designed to increase the genetic population of humans over several generations to identify the optimum solution to a problem. Each member of a population can serves as a representation of a solution in the genetic algorithm for any given issue, such as controlling or altering an individual with match value. The purpose of genetic programming is to be able to create programs automatically on computer programs, so that the computer can solve problems. Genetic algorithms function within populations of diverse computer programs. This software starts with a previous dial flow of millions of randomly created programs with preprogrammed content. Next, use the breeding concept, which creates new program populations. Darwin survival of the fittest principle, which is analogous to genetic processes that occur in crossovers and mutations, is used to run the nursery domain-independently. The purpose of crossover operations is to provide syntactical sound descent programs. Based on the idea of evolution, genetic algorithm programming is a search method that can sustain the population in use. The learning efficiency of Holland's Genetic Algorithm is nearly ideal when using GA. This technique frequently results in computer programs that are used to solve specific The following actions can be taken when using GA. Generate an initial population. Perform repetition until the termination criteria in accordance with the way: Run the code in the population and provide a match value utilizing an appropriate size. Generate a new population from the program by selecting populations with probabilities based on match levels. A Darwinian reproduction, by reproducing existing programs by copying into new DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 5 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 pp 1-12 A Crossover, by combining parts of 2 new programs that already exist randomly using a crossover operation to get two new programs. A Mutation, by creating a new computer program from a mutated piece of random The escape led to the identification of the program using the method. These findings suggest that it is the most effective way to address the issue. RESULTS AND DISCUSSION To be able to simulate the calculation of the equation system derived from plant ball and beam, researchers use statistical software using MATLAB and Simulink. Before performing the simulation should include the required parameters in the system (Table . Table 1. bS Parameters Parameters Value Radius of the ball (R) 0,01 m The ball mass (M) 0,027 Kg Moment inertia of the ball (J) mycI 2 Length of the beam (L) 0,4 m Gravity (G) 9,81 m/sec2 DC motor gain (K) 0,7/rev/sec/volts Time constant motor (T) 0,0141 sec Distance between center of the gear and joint of the lever arm (D) 0,04 m To determine state space model, can enter the values of equation . and equation . to get the following values. ycuN = . 0 0 ycu1 0 ycu2 . cu3 ] . yc yca ycu4 yca yc = . 0 0 . ycu The value of a on the matrix is -71. 43 and the value of b is 89. After determining the system parameter values of the ball and beam model, these parameters can be entered into the MATLAB Simulink to get the response value. In determining the response of this system for the first step do not use a controller or can use an open loop circuit. This study uses a set point value of 1 to determine the value of bS response. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Triawan Nugroho. Intelligent tuning of LQR for Regulating Ball and Beam Balance System | 6 Figure 2. Ball and Beam response in open loop conditions Figure 2 is a response image from bS using an open loop circuit without using a Can be seen for the response value of the ball canAot follow the reference because there is no control system. In using the LQR technique, ycE and ycI often occur by giving random values or using trial-error methods. But in this study the ycE matrix is obtained using the help of genetic programming tuning. The calculation process using this tuning is shown in Figure 2. The first phase taken is to get the quantity of parameter values such as the amount of populations, chromosomes and generations. After entering the value of the parameter, the function value used as a Q value will begin to pass through the selection, crossover and mutase At the selection stage is the process of selecting individuals from the population that is already available. Once selected, it will enter the crossover stage where this process is the process of merging data or marriage between different individuals. During the marriage process is completed new individuals or new data will be mutated to produce good offspring or produce data and Q values that have been optimized. From the results of the genetic tuning algorithm calculations Q values are generated using the following parameters (Table . DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 7 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 pp 1-12 Figure 3. Flowchart of Genetic Algorithm Table 2. Parameters Used for Genetic Algorithm Tuning Population Size Chromosome Size yu ycE = . 0 0 0 yu 0 0 0 yu 0 0 0 yuE where yu is 0. 8175, is 0. 7357, yu is 0. 1582, and yuE is 0. After the ycE matrix is obtained, then find for the ya matrix using the LQR formula in Simulink with the value of ycI = . and ya matrix is obtained as follows. ya = . After determining all parameters to get the Q value, it can determine the response value of bS utilizing the LQR-GA controller. In this study, using 3 times of experiments on the system, the first using a controller system by adding a controller, the second set the reference value is changing, and the last gives disturbance to the system. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Triawan Nugroho. Intelligent tuning of LQR for Regulating Ball and Beam Balance System | 8 Figure 4. Ball and Beam Closed Loop Response In Figure 4 shows the bS response system applying a controller. After the addition of the controller, the ball response can follow the reference. In other words, in his real state the ball is in a balanced location on the Beam path according to the reference value used. The reference value used in the closed loop system is 1 cm for beam response and angle 1A for ball From the observed system responses, the parameters that have been required for this system are delayed time which is the time for the system to initially respond to the input. The rise time reflects a measure of the time the response takes to move from a specified lower percentage . ften 10%) to a higher percentage . ften 90%) of the reference. and the settling time, which is a measure of the time it takes for the system to settle within a particular percentage of the reference. The complete response is presented in Table 3. Table 3. Parameter From Ball and Beam Closed Loop System Method LQR-GA yuayc yuayc DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 9 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 pp 1-12 Figure 5. Ball and Beam Closed Loop Response Figure 5 shows the response of bS due to reference changes. The aim of this test is to determine the performance of the proposed method and whether we can follow the reference From the figure, it can be shown that the response always follows the reference The response of the suggested method with the disturbances is depicted in Figure 6. can be shown that the response is always back to the reference when there is a disturbance. The complete data of the system with the disturbance is presented in Table 4. Figure 6. Ball and Beam Closed with disturbances Table 4. Parameter From Ball and Beam with disturbance Method LQR-GA yuayc yuayc DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Triawan Nugroho. Intelligent tuning of LQR for Regulating Ball and Beam Balance System | 10 CONCLUSION This paper proposes the simulation of bS utilizing a combination of LQR and GA. The GA method is employed to optimize the Q value, while the LQR serves as the primary controller to calculate the K gain. Simulation results validate that the proposed method achieves superior response in a closed-loop system with a constant reference, yielding a steady-state error of 0. 3191 s, a delay time of 0. 2644 s, a rise time of 0. 5018 s, and a settling time of 0. Additionally, when the reference value is changed, the system response effectively tracks the new reference. Furthermore, under disturbance conditions, the system quickly recovers and returns to reference, confirming the robustness of the proposed method. AUTHORSAo NOTE The authors declare that there is no conflict of interest regarding the publication of this The authors confirmed that the paper was free of plagiarism. AUTHORAoS CONSTRIBUTION Triawan Nugroho: Conceptualization. Methodology. Writing Original Draft. Investigation. Fahmi M. Mochtar: Formal Analysis. Writing Original Draft. Supervision. Muhammad B. Musthofa: Data Curation. Review & Editing. Investigation. Muhammad M. Syeichu: Software Review & Editing. Investigation. REFERENCES