Path Tracking of UAV Using Self-Tuning PID Controller ... - IEEE Xplore

0 downloads 0 Views 2MB Size Report
Abstract—The main purpose of this paper is to develop a robust control methodology for an unmanned aerial ve- hicle (UAV) with quad-rotor mechanism.
SICE Annual Conference 2010 August 18-21, 2010, The Grand Hotel, Taipei, Taiwan

Path Tracking of UAV Using Self-Tuning PID Controller Based on Fuzzy Logic Theerasak Sangyam, Pined Laohapiengsak, Wonlop Chongcharoen, and Itthisek Nilkhamhang School of Information, Computer and Communication Technology (ICT) Sirindhorn International Institute of Technology, Thammasat University E-mail: [email protected], [email protected], [email protected] and [email protected]

Abstract—The main purpose of this paper is to develop a robust control methodology for an unmanned aerial vehicle (UAV) with quad-rotor mechanism. A conventional proportional-integral-derivative (PID) controller and selftuning PID based on fuzzy logic are compared and analyzed. Self-tuning PID based on fuzzy logic is suitable for systems suffering from uncertain parameters, such as variation in payload, as the algorithm is able to adjust the gain of the PID controllers so that they maintain robustness and performance. The performance results of the two controllers when applied to a quad-rotor UAV are demonstrated using numerical simulation.

Fig. 1: Quad-rotor free-body diagram

Keywords—quad-rotor UAV; self-tuning PID; fuzzy logic; autonomous flight control;.

II. S YSTEM D ESCRIPTION I. I NTRODUCTION

A. Quad-Rotor Aerial Vehicle

UAV has been widely used in various situations such as aerial mapping, tracking, search and rescue surveillance, and military purposes [1][2][3][4]. In search and rescue operations, rotary wing aerial vehicles are generally preferred over fixed-wing vehicles because they are capable of vertical take-off and landing (VTOL), which require less space. When considering arial vehicles of similar sizes and dimensions, fixed-wing airplane or helicopter usually generate less lifting force than the quad-rotor helicopter or quadrocopter that consists of four propellers. Furthermore, each propeller’s speed of a quad-rotor can be controlled separately making them easier for real implementation. However, the quad-rotor is not preferred for the commercial use. The problem is that it can not take the advantage of high capability in payload when compare to the other type of arial vehicles using conventional controller. Previous researches have focused on implementing a preprogrammed controller of autonomous UAV to develop an automatic navigation system, but those methods are capable of dealing with payload variation. This paper will emphasize the development of an intelligent control algorithm for a UAV to achieve autonomous path tracking subjected to payload variation. Recent works have implemented conventional PID and linear quadratic (LQ) control algorithm to the autonomous UAV [5]. However, the challenge of designing a quad-rotor aerial vehicle capable of fully autonomous flight remains. This research proposes the use of self-tuning PID to achieve stabilization of the UAV and path tracking when the system has parametric variation in the payload. The result will be compared with a conventional PID controller through numerical simulation.

A quad-rotor system consists of four actuators placed at the corners, as show in Figure 1 [6]. A quad-rotor provides stable yaw angle rotation and the desired lift forces is controlled by the rotor speed. The altitude of quad-rotor can be achieved by changing all of the rotor speed at the same time. Translation along the x-axis is related to pitch angle (θ ) [7]. This angle can be obtained by changing rotor 1’s or rotor 3’s speed. On the other hand, translation along the y-axis is the result from roll angle (φ ) by changing rotor 2’s or rotor 4’s speed. To balance the moment, the direction of rotor 1 and 3 have to be opposite of rotor 2 and 4 and at the same speed. In the case that the quad-rotor is required to change in yaw angle (ψ), the speed of rotor 1 and 3 should not be the same as the speed of rotor 2 and 4. B. Dynamic Equation The quad-rotor’s body axis is related to the inertia frame by three position x, y, and z in addition to three Euler angles roll (φ ), pitch (θ ), and yaw (ψ). xyz-Euler angles represent a rotation matrix, as shown in (1): ⎛

Cφ Cθ

⎜ R=⎜ ⎝ Sφ Cθ −Sθ

Cφ Sθ Sψ − Sφ Cψ Sφ Sθ Sψ +Cφ Cψ Cθ Sψ

Cφ Sθ Cψ + Sφ Sψ



⎟ Sφ Sθ Cψ −Cφ Sψ ⎟ ⎠ Cθ Cψ

(1)

where C and S is a mathematical notation used to represent the cosine and sine functions respectively. A quad-rotor has four input forces and six output states. The dynamic equations of the quad-rotor is given as:

- 1265 -

PR0001/10/0000-1265 ¥400 © 2010 SICE

U1 m U1 (− cos ψ sin φ + sin ψ sin θ cos φ ) m U1 −g + (cos θ cos φ ) m U2 Ixx U3 Iyy U4 Izz

x¨ = (sin ψ sin φ + cos ψ sin θ cos φ )

(2)

y¨ =

(3)

z¨ = φ¨ = θ¨ = ψ¨ =

(4) (5) (6) Fig. 2: PID controller structure

(7)

where Ixx , Iyy , and Izz refer to the moment of inertia around x-axis, y-axis, and z-axis respectively. From (2)-(7), the basic movement (U) and the propeller speed (Ω) are related by movement equation which is defined in (8)-(11) as: U1 = b(Ω21 + Ω22 + Ω23 + Ω24 )

(8)

U2 = lb(−Ω22 + Ω24 ) U3 = lb(−Ω21 + Ω23 )

(9) (10)

U4 = d(−Ω21 + Ω22 − Ω23 + Ω24 )

(11)

where b represents thrust force, l represents length from the center of UAV to the motor, and d represents drag force. III. C ONTROL A LGORITHM A controller is a device or logical unit used to adjust the output to with a reference value. The main role of the controller is to minimize a specific error value. This paper focuses on comparison self-tuning PID base on fuzzy logic controller with conventional PID control algorithm. A. Classical PID controller The PID control law represented above consists of three basic feedback control actions, namely proportional, integral and derivative, which represent the current, past and anticipated future errors that cover all the time history of the error signal. The relevant gains are KP , KI , and KD . By adjusting these parameters, the performance and stability of the system can be achieved. By adjusting those parameters, it could make the system to be stable.The mathematical representation of PID controller is given as:  t d u(t) = KP e(t) + KI e(t)dτ + KD e(t) (12) dt 0 The structure of PID controller is shown in Figure 2. B. Self-tuning PID controller According to fixed three gain parameter, PID controller provides a good performance only for specific systems. This is the limitation of PID control algorithm. One possible solution to solve this problem is combining fuzzy logic with PID control algorithm. This is called an auto-tuning PID controller based on fuzzy logic. This controller has control algorithm as same as PID control algorithm, controlled by three gain parameters, in addition with fuzzy logic for autotuning gain parameters.

Fig. 3: Comparison Digital logic and Fuzzy logic

1) Fuzzy logic: Fuzzy control is a form of multi-value logic that closely to human language because it provides true/false in addition with partial truth which shows in Figure 3. The structure of fuzzy logic was shown in Figure 4. Fuzzy logic consists of four components: fuzzification, fuzzy ruled base, inference engine, and defuzzification. • Fuzzification refers to the process of transforming crisp values into grades of membership using linguistic terms of fuzzy sets. The membership of each function is determined by predefined fuzzy rule [8], which represented the logic of a fuzzy control. This logic is based on if-then rule. • Fuzzy rule base is the main part of fuzzy logic. This component is based on if-then logic. Fuzzy rule base will consider how to react with an input. • Inference engine will apply fuzzy rule base to output from fuzzification. After consideration of fuzzy rule base, an inference engine will provide an output and pass this output to defuzzification. • Defuzzification is a method to obtain mathematical data from the output of fuzzy rule base. In other words, it provides the output of the fuzzy controller. The process of membership function of fuzzification, membership function of defuzzification and the fuzzy rule base are shown in Figure 5, 6, and Table 1. 2) Self-tuning PID based on fuzzy logic: Combining the fuzzy and PID controllers result in an auto-tuning PID control algorithm based on fuzzy logic that automatically adjust the parameter gain by using fuzzy logic. Tracking error is considered as an input that to two controllers, is passed onto the consisting of a classical PID control algorithm to minimize error, fuzzy logic for adjusting parameter gain. The large error will provide high gain parameter. On the other hand, low parameter gain is provided by small error. The structure of auto-tuning PID control algorithm based on

- 1266 -

Fig. 6: Membership function of defuzzification Fig. 4: Structure of fuzzy logic TABLE I: Fuzzy rule base if(input) if error1 if error2 if error3

then then then then

output output1 output2 output3

A. Signal flow chart MATLAB and Simulink was used for simulation. The block diagram was shown in Figure 8.The TASK provides a desired position that will be subtracted with real position obtain from sensors. This position error will flow to the controller and fuzzy logic. PID control algorithm provides a acceleration while fuzzy logic gives a new gain parameter. Dynamic block receives acceleration signal and provides U. Movement equation block will change U signal to propeller’s speed. The propeller’s speed will convert to Voltage signal.

Fig. 5: Membership function of fuzzification

fuzzy logic is shown in Figure 7. IV. S IMULATION RESULT The algorithm can be designed separately for each axis by considering the helicopter motions. Notice that the motion along the y-axis is related to the roll angle (φ ) by (3). In order to control motion along y-axis, the value of θ and ψ in (3) are set equal to zero yields: y¨ = − sin φ y¨ = −KP y(t) − KI − sin φ = −KP y(t) − KI

 

(13) y(t)dτ − KD y(t) ˙

(14)

y(t)dτ − KD y(t) ˙

(15)

φd = arc sin (KP y(t) + KI



y(t)dτ + KD y(t)) ˙ (16)

Similarly, in order to control motion along x-axis, the value of φ and ψ in (2) are setting equal to zero yields: x¨ = sin θ x¨ = −KP x(t) − KI sin θ = −KP x(t) − KI

 

(17) x(t)dτ − KD x(t) ˙

(18)

x(t)dτ − KD x(t) ˙

(19)

θd = −arc sin (KP x(t) + KI



x(t)dτ + KD x(t)) ˙ (20)

Consider a quad-rotor UAV system shown in Figure 1 and described by(2)-(7) where the parameters are mass (m) = 0.5 kg, gravity(g) = 9.81 m/s, moment of inertia x (Ixx ), y (Iyy ), z (Izz ) = 1.4325. This system will be used to compare the self-tuning PID and conventional PID control algorithm. The flight path is circular on X-Y plane with 3 meter height.

B. Comparison of PID and self-tuning PID based on fuzzy logic without Load Both PID control algorithm and self-tuning PID based on fuzzy logic provide a good performance when there is no load. PID control algorithm gives a better performance when start to track circle but provide a worse circular path tracking than self-tuning PID base on fuzzy logic. The simulation result of PID control algorithm and simulation result of PID based on fuzzy logic were shown in Figure 9 and Figure 10, respectively. According from the result, PID control algorithm give a little better than auto-tuning PID controller. C. Comparison of PID and self-tuning PID based on fuzzy logic with Load The mass of the UAV is assumed to increase by 4kg. Using the same controller as in previous simulation, the result of PID control algorithm and PID based on fuzzy logic are shown in Figure 11 and Figure 12, respectively. This result shows that a self-tuning PID base on fuzzy logic provides much better result than PID control algorithm. PID control algorithm cannot track the circular path while selftuning PID provides a good performance. According from the result, PID control algorithm is unacceptable result and provided a large value of error both on X-axis and Y-axis. D. Error Analysis An error was analyzed by sum of absolute error. The graph was plotted in figure 13. According from the graph, PID controller provides better performance than self-tuning PID controller based on fuzzy logic both in X and Y axis in

- 1267 -

Fig. 10: Simulation result of Self-tuning based on fuzzy control algorithm

Fig. 7: Self-tuning PID based on fuzzy structure

Fig. 11: Simulation result of PID control algorithm in the case of Loading

Fig. 8: Signal Flow Chart

the case of non-loading. In the case of loading, self-tuning PID control algorithm provides closely to non-loading case while PID control algorithm give an unacceptable result. V. C ONCLUSION This paper presents a self-tuning PID control algorithm to achieve quad-rotor aerial vehicle’s performance with

Fig. 9: Simulation result of PID control algorithm

variation in payload. The comparison of different control algorithm, namely convectional PID and self-tuning PID base on fuzzy logic, the result shows that both control methodologies are acceptable in the case of no variation in load. In addition, the self-tuning PID control base on fuzzy logic is able to compensate for variation in payload to achieve path tracking. The advantage of PID control algorithm is easy to design and give a good performance. But PID control algorithm will provide a good performance only on specific system which lead to disadvantage. Fuzzy logic is applied to PID control algorithm in purpose of tuning parameter gain. This new controller is called selftuning PID control algorithm. A self-tuning PID control algorithm provides a good performance on variation system. A disadvantage of self-tuning PID control algorithm is hardly to design a controller. Self-tuning PID control algorithm provides a less performance when comparing with convectional PID control algorithm on specific system.

Fig. 12: Simulation result of Self-tuning based on fuzzy control algorithm in the case of Loading

- 1268 -

Fig. 13: Sum of absolute position errors

R EFERENCES [1] T. A. E. F.Archer, A.M.Shutko and I.Sidorov, “Introduction, overview and status of the microwave autonomous copter system (MACS),” IEEE Trans. Geosci. Remote Sensing, vol. 5, p. 3574, 2004. [2] N. K. Y. R.Sugiura, T.Fukagawa and K.Toriyama, “Field information system using anagricultural helicopter toward sprecision farming,” IEEE/ASME Trans. Mechatron., vol. 2, p. 1073, 2003. [3] H. E. S.M.Rock, E.W.Frew and B.R.Woodley, “Combined cdgps and vision-based control of a small autonomous helicopter,” American Control Conference, vol. 2, p. 694, 1998. [4] G. LuoJun, XieShaorong and RaoJinjun, “Subminiature unmanned surveillance aircraft and its ground control station for security,” Safety, Security and Rescue Robotics, p. 116, 2005. [5] A. N. Samir Bouabdallah and R. Siegwart, “Pid vs lq control techniques applied to an indoor micro quadrotor,” Autonomous Systems Laboratory Swiss Federal Institute of Technology Lausanne, Switzerland. [6] M. OnderEfe, “Robust low altitude behavior control of a quadrotor rotorcraft through sliding modes,” 2007. [7] S. Sastry, “A mathematical introduction to robotic manipulation,” BocaRaton, FL, 1994. [8] Z. Kovacic and S. Bogdan, “Fuzzy controller design theory and application,” Text book, 2006.

- 1269 -

Suggest Documents