MEV Journal of Mechatronics, Electrical Power, and Vehicular Technology 13 (2022) 101-112 Journal of Mechatronics, Electrical Power, and Vehicular Technology e-ISSN: 2088-6985 p-ISSN: 2087-3379 mev.lipi.go.id doi: https://dx.doi.org/10.14203/j.mev.2022.v13.101-112 2088-6985 / 2087-3379 ©2022 National Research and Innovation Agency This is an open access article under the CC BY-NC-SA license (https://creativecommons.org/licenses/by-nc-sa/4.0/) MEV is Scopus indexed Journal and accredited as Sinta 1 Journal (https://sinta.kemdikbud.go.id/journals/detail?id=814) How to Cite: J. A. Prakosa et al., “Experimental studies of linear quadratic regulator (LQR) cost matrices weighting to control an accurate take-off position of bicopter unmanned aerial vehicles (UAVs),” Journal of Mechatronics, Electrical Power, and Vehicular Technology, vol. 13, no. 2, pp. 101-112, Dec. 2022. Experimental studies of linear quadratic regulator (LQR) cost matrices weighting to control an accurate take-off position of bicopter unmanned aerial vehicles (UAVs) Jalu Ahmad Prakosa a, *, Hai Wang b, Edi Kurniawan a, Swivano Agmal c, Muhammad Jauhar Kholili c a Research Center for Photonics, National Research and Innovation Agency (BRIN) PUSPIPTEK, South Tangerang City, Indonesia b Discipline of Engineering and Energy, Murdoch University 90 South Street, Murdoch, Western Australia, 6150, Australia c Research Center for Quantum Physics, National Research and Innovation Agency (BRIN) PUSPIPTEK, South Tangerang City, Indonesia Received 27 March 2022; 1st revision 22 May 2022; 2nd revision 29 May 2022; Accepted 30 May 2022; Published online 29 December 2022 Abstract Controller design for airplane flight control is challenged to achieve an optimum result, particularly for safety purposes. The experiment evaluated the linear quadratic regulator (LQR) method to research the optimal gain of proportional-integral- derivative (PID) to hover accurately the bicopter model by minimizing error. The 3 degree of freedom (DOF) helicopter facility is a suitable bicopter experimental simulator to test its complex multiple input multiple output (MIMO) flight control model to respond to the challenge of multipurpose drone control strategies. The art of LQR setting is how to search for appropriate cost matrices scaling to optimize results. This study aims to accurately optimize take-off position control of the bicopter model by investigating LQR cost matrices variation in actual experiments. From the experimental results of weighted matrix variation on the bicopter simulator, the proposed LQR method has been successfully applied to achieve asymptotic stability of roll angle, although it yielded a significant overshoot. Moreover, the overshoot errors had good linearity to weighting variation. Despite that, the implementation of cost matrices is limited in the real bicopter experiment, and there are appropriate values for achieving an optimal accuracy. Moreover, the unstable step response of the controlled angle occurred because of excessive weighting. ©2022 National Research and Innovation Agency. This is an open access article under the CC BY-NC-SA license (https://creativecommons.org/licenses/by-nc-sa/4.0/). Keywords: experimental evaluation; cost matrices; LQR; bicopter; MIMO flight control. I. Introduction Research aircraft flight control [1] is complicated due to its dynamic behavior and uncertainties. The nonlinear behavior of plants also must be taken to account. Not only rotors [2], [3] characteristics but also aerodynamic behaviors of aircraft cause its uncertainty and dynamic. Besides, it must control an airplane's rotation angles in three dimensions: pitch, roll, and yaw. Interaxis coupling between angles adds a more complex task [4]. Because of these reasons, flight control is an exciting research topic. Flight control has a vital role in running unmanned aerial vehicles (UAVs) [5], [6] well, becoming famous today. The application of UAVs in remote sensing, surveillance, and disaster mitigation has gained more attention because of their relatively low cost, more accurate, and higher maneuvers possibility than on-board pilots [1]. The excellent development of UAVs flight control can ensure its application successfully, although the major use of DC motors provides challenges. The helicopter is a UAV type with excellent maneuverability and versatility for flight control studies. Moreover, this type has more advantages than fixed wings UAVs in smaller landing areas [7]. Bicopter is a helicopter-type with two rotors on both * Corresponding Author. Tel: +62-8888311358 E-mail address: jalu.ahmad.prakosa@brin.go.id https://dx.doi.org/10.14203/j.mev.2022.v13.101-112 http://u.lipi.go.id/1436264155 http://u.lipi.go.id/1434164106 https://mev.lipi.go.id/mev https://mev.lipi.go.id/mev https://dx.doi.org/10.14203/j.mev.2022.v13.101-112 https://dx.doi.org/10.14203/j.mev.2022.v13.101-112 https://creativecommons.org/licenses/by-nc-sa/4.0/ https://sinta.kemdikbud.go.id/journals/detail?id=814 https://crossmark.crossref.org/dialog/?doi=10.14203/j.mev.2022.v13.101-112&domain=pdf https://creativecommons.org/licenses/by-nc-sa/4.0/ J.A. Prakosa et al. / Journal of Mechatronics, Electrical Power, and Vehicular Technology 13 (2022) 101-112 102 arms for its maneuver, which is famously implemented by the Chinook helicopter [8]. The plant of 3 DOF helicopters for the laboratory, which Quanser Consulting Inc. develops, is a useful experimental tool to test the flight control method strategies for the bicopter model [9]. Two propellers to generate thrust for lifting the helicopter are driven by both DC motors. The aircraft has free movement to pitch from its center on one side of the arm. Moreover, the arm allows the helicopter body to move in the elevation and yaw directions. Here is Figure 1, which describes the bicopter simulator. Figure 1 shows that a counterweight is used as a balancing from the propellers. Encoder sensors install some joints; therefore, the helicopter's angular rotation, namely pitch, roll, and yaw, can be measured accurately as feedback elements. The data acquisition is connected between the personal computer (PC) and motor through a driver and amplifier. The pitch, roll, and yaw measurement is delivered via its data acquisition to PC. The application software of MATLAB Simulink can be used to design the flight control technique due to its accessibility to the plant. Hence, the 3 DOF helicopter is a suitable experimental platform to test and validate new flight control strategies to deal with dynamic behavior, nonlinearities, and the helicopter's uncertainties as a UAV plant. Besides implementing adaptive control with LQR [10] to deal with dynamic behavior, nonlinearities, and uncertainties, the method of optimal control can also be used. Optimal control is a method to achieve the desired dynamic and deal with researching a control law system over a while to optimize an objective function. Some researchers applied many optimal control theories to the helicopter as an object. The application of the H-infinity optimal control [3] approach was analyzed to solve high- order unmodeled dynamics on a helicopter. Sliding Mode Control [11] was simulated and studied for a laboratory helicopter of 3 DOF [12]. Robust LQR attitude control [13], [14] was built for aggressive maneuvers on 3 DOF helicopters, both theory and experiment [15]. LQR theory minimizes the cost function to solve dynamic system operation, commonly implemented in flight control [16]. The research of cost matrices variation of LQR algorithm for flight control [17] is not only exciting but also challenging to be conducted. The weighting of cost matrices [18] supplied by an engineer may have different behavior on another plant. The platform of 3 DOF helicopters should be used to study experimentally optimal flight control strategies for UAV type of bicopter [19]. This research aims to investigate the cost matrices variation of LQR theory to evaluate the most accurate flight control experimentally for the bicopter plant as an optimization strategy. The efficient weighting on cost matrices should be analyzed to achieve optimal flight control strategies [20]. The optimal desire can be obtained by minimizing its error or cost function in the LQR term. Therefore, the accurate position of the helicopter must be achieved to ensure its safety. In addition, it would succeed the application of UAV. Besides, the following points provide a summary of our contributions: • Demonstrate MIMO control system of the bicopter model through PID controller signal. • Test the strategies of optimal control theory on experimental tools of 3 DOF helicopters as the bicopter simulator. • Investigate cost matrices weighting variation of LQR optimization calculation. • Assess the accuracy of flight position on the LQR method through each error. • Develop cost matrices of LQR calculation to get minimal errors of angle control from bicopter experimental results. This activity is conducted as the following: Section II indicates the modeling of the bicopter system. Cost matrices variation of LQR calculation is investigated and discussed in Section III as experimental evaluation. Finally, Section IV presents the conclusion of this work. II. Materials and Methods A. Design and method The angles of rotation of 3-DOF helicopter is analogous with Chinook bicopter description; therefore, the pitch, roll, and yaw can be seen in Figure 2 as general aircraft flight control below: The set of the angle's rotation for flight control of Chinook's bicopter in Figure 2 is implemented to the 3 DOF helicopter facilities. Its free body diagram is illustrated in Figure 3. Figure 1. The experimental platform of 3 DOF helicopter as bicopter simulator J.A. Prakosa et al. / Journal of Mechatronics, Electrical Power, and Vehicular Technology 13 (2022) 101-112 103 The angles of rotation and the force illustration are described in Figure 3. The signs of each axis for angles of rotation are determined below: a) The roll angle lies in the direction of the X-axis rotation. The horizontal position of a helicopter if r(t)=0, then roll angle becomes positive, r(t)>0, a helicopter flies higher than counterweight. b) The yaw angle is in the direction of the Z-axis rotation. The yaw angle is positive, ɣ(t)>0, if it rotates counterclockwise (CCW) direction. c) The pitch angle is situated in the direction of the Y-axis rotation. The pitch angle increases positively, p(t)>0, when the front motor is higher than the back motor. The Newton’s Law I works when the helicopter hovers stationary or moves at a steady speed. Because of that reason, the whole force sum on the free body diagram of the helicopter is zero when it hovers. Those circumstances are illustrated in equations (1), (2), (3), and (4). 0=−=∆ W F T FF (1) The total torque is also zero. 0WT =τ−τ=τ∆ (2) gbmaLfmaLwmwLfKaLoV )(2 −−= (3) fKaL gbmaLfmaLwmwL oV 2 )( −− = (4) The equation (4) shows the voltage (Vo) produced by the amplifier to drive the DC motor. The mathematical model of control systems design for analysis usually uses a state-space model that applies state variables to describe a system by a set of first-order differential or difference equations in equation (5) and Figure 4. DuCxy;BuAxx +=+= • (5) where: x = state vector; y = output vector; u = input vector; A = state matrix; B = input matrix; C = output matrix; D = feedforward matrix. The state vector is defined as equation (6):     γγ= ••• prprx T (6) On the other hand, the output vector can be written as (7): [ ]γ= pry T (7) Figure 2. Angles rotation of bicopter Figure 3. Free body diagram of 3 DOF helicopter Figure 4. State-space model J.A. Prakosa et al. / Journal of Mechatronics, Electrical Power, and Vehicular Technology 13 (2022) 101-112 104 Furthermore, the other state-space matrices are set in equation (8), (9), (10), and (11):                     ++ −− = 0000 2 aL.fm.2 2 hL.fm.2 2 wL.wm g).bm.aLfm.aLwm.wL(0 000000 000000 100000 010000 001000 A (8)                         − ++ = 00 2 hL.fm.2 fK 2 hL.fm.2 fK 2 aL.fm.2 2 wL.wm fK.aL 2 aL.fm.2 2 wL.wm fK.aL 00 00 00 B (9)         = 000100 000010 000001 C (10)         = 00 00 00 D (11) B. Proposed cost matrices variation of LQR algorithm The LQR theory applied a mathematical algorithm that minimizes a cost function by weighting factors supplied by an engineer. The sum of the deviations of critical measurements, such as pitch, roll, and yaw on flight control, is often called the cost function. These settings are usually implemented on machines or processes, particularly on airplanes. Further, the LQR algorithm is an automated method of finding an optimal state- feedback controller of close loop systems [21] as shown in Figure 5. From the state-feedback law in Figure 5, the input vector is indicated in equation (12): Kxu −= (12) State-feedback gains K becomes the optimal gain matrix to minimize the quadratic cost function. Input, u, provides the optimal control signal when the performance index function J is minimized on equation (13). Selecting appropriate weighting matrices Q and R that indicates an important relationship between the state error and control signal in the performance index function aims for the optimal controller design. dt 0 )NuTx2RuTuQxTx()u(J ∫ ∞ ++= (13) Generally, for simple, N is set to 0 (N=0) and becomes equation (14). dt 0 )RuTuQxTx()u(J ∫ ∞ += (14) Principally, the optimal gain of LQR can be determined by solving an algebraic Riccati equation. However, it is not efficient in computation time. Therefore, the calculation is held by the application program of MATLAB Simulink. The integrals of the roll and yaw states are included in equation (15) as augmented state vectors from equation (6).     ∫∫ • γ •• γ= prprprTx (15) Because the updated state vector in equation (15) has eight columns, the cost matrix Q also has an 8x8 matrix size in equation (16).                           ∫ ∫ • γ • • γ p0000000 0r000000 0000000 000p0000 0000r000 0000000 000000p0 0000000r (16) Then the weighting matrix, R, is written in equation (17).       = c0 0c R (17) The constant values, c, are chosen 0.01