ISA Transactions 53 (2014) 732–743

Contents lists available at ScienceDirect

ISA Transactions journal homepage: www.elsevier.com/locate/isatrans

Research Article

Interval type-2 fuzzy PID controller for uncertain nonlinear inverted pendulum system Mohammad El-Bardini, Ahmad M. El-Nagar n Department of Industrial Electronics and Control Engineering, Faculty of Electronic Engineering, Menofia University, Menof 32852, Egypt

art ic l e i nf o

a b s t r a c t

Article history: Received 5 December 2012 Received in revised form 29 January 2014 Accepted 16 February 2014 Available online 21 March 2014 This paper was recommended for publication by A.B. Rad

In this paper, the interval type-2 fuzzy proportional–integral–derivative controller (IT2F-PID) is proposed for controlling an inverted pendulum on a cart system with an uncertain model. The proposed controller is designed using a new method of type-reduction that we have proposed, which is called the simplified type-reduction method. The proposed IT2F-PID controller is able to handle the effect of structure uncertainties due to the structure of the interval type-2 fuzzy logic system (IT2-FLS). The results of the proposed IT2F-PID controller using a new method of type-reduction are compared with the other proposed IT2F-PID controller using the uncertainty bound method and the type-1 fuzzy PID controller (T1F-PID). The simulation and practical results show that the performance of the proposed controller is significantly improved compared with the T1F-PID controller. & 2014 ISA. Published by Elsevier Ltd. All rights reserved.

Keywords: Fuzzy PID controllers Interval type-2 fuzzy logic system Interval type-2 fuzzy PID controller Inverted pendulum system Uncertain system

1. Introduction The conventional PID controllers are still the most widely used control structure in most of the industrial processes. This is mainly because PID controllers have simple control structures, affordable price, and effectiveness for linear systems [1–6]. Due to their linear structure, the conventional PID controllers are usually not effective if the system to be controlled has a high level of complexity, such as, time delay, high order, modeling nonlinearities, vague systems without precise mathematical models, and structural uncertainties [7]. For these reasons, many researchers have attempted to combine a conventional PID controller with a fuzzy logic controller (FLC) in order to achieve a better system performance over the conventional PID controller. The fuzzy PI controller [8] and the fuzzy PD controller [9] are developed to improve the system performance rather than conventional PID controllers. The fuzzy PI controllers are preferred more than the fuzzy PD controllers as the fuzzy PD controllers are not able to eliminate the steady state errors [10]. However, the fuzzy PI controllers show a poor performance during the transient phase for higher order processes due to their internal integration operation. The fuzzy PI and the fuzzy PD controllers are combined to get a fuzzy PID controller [11,12]. Its knowledge base consists of two-dimensional rule base for the PI and the PD controllers to

n

Corresponding author. E-mail addresses: [email protected] (M. El-Bardini), Ahmed_elnagar@menofia.edu.eg (A.M. El-Nagar). http://dx.doi.org/10.1016/j.isatra.2014.02.007 0019-0578/& 2014 ISA. Published by Elsevier Ltd. All rights reserved.

obtain the overall improved performance. The fuzzy PIþD controller is developed which is a combination of a fuzzy PI controller and a fuzzy D controller [13]. The fuzzy P þID controller is developed for tracking control of a two-link experimental direct arm [14]. There are different control structures for the fuzzy PID controller mentioned in [15–21], in order to improve the closed loop systems. Despite the significant improvement of system performance with the fuzzy PID controllers over their conventional counterparts, it should be noted that they are usually not effective if cases where the system to be controlled has structure uncertainties as the ordinary fuzzy controllers (type-1 FLCs) have limited capabilities to directly handle data uncertainties [22]. There are five sources of uncertainties in type-1 fuzzy logic systems (T1-FLSs) [23,24]: (1) uncertainties in the inputs to the FLS, which translate into uncertainties in the antecedents membership functions as the sensor measurements are affected by high noise levels from various sources. (2) Uncertainties in the control outputs, which translate into uncertainties in the consequents membership function of the FLS. (3) The meanings of the words that are used in the antecedents and consequents of rules can be uncertain (words mean different things to different people). (4) Uncertainties associated with the change in the operating conditions of the controller. Such uncertainties can translate into uncertainties in the antecedents and/or consequent membership functions. (5) The data that is used to tune the parameters of a T1FLS may also be noisy. All of these uncertainties translate into uncertainties about fuzzy set membership functions. The T1-FLSs are not able to directly model such uncertainties because their membership functions are totally crisp.

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

On the other hand, the type-2 fuzzy sets (T2-FSs) that were introduced by Zadeh in 1975 are able to model such uncertainties because their membership functions are themselves fuzzy; they are very useful in circumstances where it is difficult to determine an exact membership function for a fuzzy set [25]. The concept of a T2-FS is an extension of the concept of ordinary fuzzy sets (type-1 fuzzy sets; T1-FSs). A T2-FS is characterized by a fuzzy membership function (i.e., the membership grade for each element of this set is a fuzzy set in [0, 1]), unlike a T1-FS where the membership grade is a crisp number in [0, 1] [25]. Therefore, a T2-FS provides additional degrees of freedom that make it possible to model and handle the uncertainties directly [26]. Both the T1-FLS and T2-FLS have the same four components, which are a fuzzifier, a rule base, a fuzzy inference engine, and an output processor. Furthermore, unlike a T1-FLS, the output processor generates a T1-FS output using the type-reducer or a crisp number using the defuzzifier. A T2-FLS also is characterized by IF–THEN rules, but its antecedent or consequent sets are type-2. A T2-FLS can be used when the circumstances are too uncertain to determine membership grades exactly and they have been used in many applications, especially in the control systems [27–34]. The IT2-FLS is a special case of the T2-FLS [24]. These are simpler to work with than general T2-FSs and distribute the uncertainty evenly among all admissible primary memberships [35]. The IT2-FLSs have been applied to various fields with great success [36–43]. The structure of the IT2-FLS has four components, viz. a fuzzifier, a rule base, a fuzzy inference engine, and an output processor. The output sets of the IT2-FLS are interval type-2, so we have to use an extended version of type-1 defuzzification methods. The extended defuzzification operation with the type-2 case gives a T1-FS at the output. Since this operation takes us from the T2-FSs of the IT2-FLS to a T1-FS, this operation is called a type-reduction and calls the type-1 set so obtained a type-reduced set [44]. The type-reduced set is a collection of the outputs of all of the embedded T1-FLSs [25]. The type-reduction is usually performed by iterative Karnik–Mendel (KM) algorithms [45], which are computationally intensive. However, the IT2-FLS has a computational overhead associated with the computation of the type-reduced fuzzy sets using the KM algorithms [46]. This computational overhead reduces the real-time performance of the IT2-FLS, especially when operating on industrial embedded controllers which have limited computational and memory capabilities. So, the type-2 computational overhead can limit the application of the IT2FLSs in industrial embedded controllers. Wu and Mendel [47] proposed a method called uncertainty bounds (UB) to approximate the type-reduced set, thus avoiding the use of the iterative KM algorithms. In this study, we propose a new method of type-reduction called the simplified type-reduction method which is able to reduce the computation cost of the type-reduction and also, reduces the memory required for the IT2-FLS when implemented in embedded systems. As reported in [48,49], the T1F-PID controller is proposed to improve the system performance where the fuzzy rules and reasoning are utilized on-line to determine the PID controller parameters based on the error signal and its first difference. The main drawback of the T1F-PID controller [48,49] is the limitation capabilities to directly handle data uncertainties. For these reasons, the main objective of this paper is developing an IT2F-PID controller using the proposed type-reduction method which combines the conventional PID controller with the IT2-FLS to improve the system performance compared with the T1F-PID controller. The proposed controller has the ability to minimize the effect of structure uncertainties and external disturbance. The proposed controller is used for controlling the uncertain nonlinear inverted pendulum on a cart system. The results are compared with the T1F-PID controller to test the robustness of the proposed controller to provide some improvements in system performance over the T1F-PID controller under the effect of the system uncertainties and the external disturbance.

733

The major contributions of this study are (1) the successful development of fuzzy PID controller to IT2F-PID controller. (2) The successful application of the proposed IT2F-PID controller for controlling the uncertain inverted pendulum on a cart system. (3) The success of the proposed method of type-reduction to minimize the memory required and reduces the time of computation for the type-reduction process. (4) The success of the proposed controller to minimize the effect of the system uncertainties and the external disturbance. This paper is organized as follows. In Section 2, the IT2F-PID controller is included. The description of the mathematical model of the uncertain inverted pendulum is presented in Section 3. Section 4 presents the simulation and practical results followed by the conclusions and the relevant references.

2. Interval type-2 fuzzy PID controller The prime objective of the controller design is to achieve a better control performance in terms of the stability and the robustness for the system uncertainties and the environmental disturbances. The proposed control structure consists of a simple upper-level intelligent controller and a lower-level classical controller. The upper level controller provides a mechanism to select the gains of a classical PID controller, whereas the lower-level controller should deliver the solutions to a particular situation. In the proposed control structure, a rule-based Mamdani-type-2 fuzzy controller is used in the upper level and a conventional PID controller is selected for the lower level. The structure of the IT2F-PID controller is shown in Fig. 1. In usual practice, the error (e) and the change of error (Δe) parameters were preferred to the designing of the antecedent of the fuzzy rules for control applications [50]. So, in this proposed controller the error signal and the change in error signal are used for the antecedent part of the rule based. The PID controller is usually implemented as follows: Z deðtÞ uðtÞ ¼ kp eðtÞ þki eðtÞdt þ kd dt eðtÞ ¼ yr ðtÞ ym ðtÞ ð1Þ where kp, ki, and kd are the proportional, the integral, and the derivative gains respectively. The controller output, the process output, and the set point are denoted as u, ym, and yr, respectively. In the classical PID controller, the values of kp, ki, and kd in Eq. (1) are adjusted by the operator according to the changes in the process condition. By developing a rule-based intelligent type-2 fuzzy controller structure, these parameters can be modified online, according to the changes in the process condition without much intervention of an operator and further it will enhance the conventional controller performance over a wide operating range. The structure of upper-level IT2-FLS contains four components: a fuzzifier, an inference engine, a rule base, and an output processing

IT2F-PID Controller Interval Type-2 Fuzzy System

kp

yr +

e

ki

PID Controller

kd

u

Process

-

Fig. 1. Interval type-2 fuzzy PID controller structure.

ym

734

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

Crisp

Crisp output

Rule Base

Fuzzifier Inputs

Defuzzifier Type-1 Output

Reduced Fuzzy Sets

Type-Reduction

Type-2 Input

Inference

Fuzzy Sets

Type-2 Output Fuzzy Sets

Fig. 2. Structure of the type-2 fuzzy logic controller.

Table 1 Effects of gain parameters.

1

UMF

Gain parameters

~

UMF ( A)

~ ( A)

Effects of increasing gain

kp Ki Kd

FOU

~ ( A)

~

LMF ( A)

FOU

~ ( A)

x

2.1. Interval type-2 fuzzy set

1=ðx; vÞ ¼ x A X v A J x D ½0;1

xAX

v A J x D ½0;1

# 1=v =x

Settling time

Decrease Decrease Decrease

Increase Increase Decrease

Small change Increase Decrease

A

that are interconnected as shown in Fig. 2 [22]. The IT2-FLS works as follows [36]: the crisp input from the input sensors is first fuzzified into input interval type-2 fuzzy sets (IT2-FSs). The input IT2-FSs then activate the inference engine and the rule base to produce output IT2-FSs. The IT2-FLS rules will remain the same as in the T1FLS, but the antecedents and/or the consequences will be represented by the IT2-FSs. The inference engine combines the fired rules and gives a mapping from input IT2-FSs to output IT2-FSs. The IT2 fuzzy outputs of the inference engine are then processed by the type reducer, which combines the output sets and performs a centroid calculation that leads to T1-FSs called the type-reduced sets. After the type reduction process, the type-reduced sets (or approximate type-reduced sets) are defuzzified (by taking the average of the type-reduced or approximated type-reduced set) to obtain crisp outputs.

A~ ¼

Overshoot

~ and is denoted as associated with the lower bound of FOU (A) μ ~ ðxÞ, 8 x A X:

Fig. 3. Interval type-2 fuzzy set [22].

An IT2-FS A~ is characterized as [23] "Z Z Z Z

Rise time

ð2Þ

where x is the primary variable and x A X; v is the secondary variable, v A V and it has a domain Jx at each x A X; Jx is called the primary membership of x and is defined in Eq. (6); and, the secondary grades of A~ are all equal to 1. The union of all the primary memberships for fuzzy set A~ is called the footprint of uncertainty (FOU) of A~ (see Fig. 3): ~ ¼ [ J ¼ ðx; vÞ : v A J D ½0; 1 FOUðAÞ ð3Þ x x 8xAX

The upper membership function (UMF) and the lower membership function (LMF) of A~ are two type-1 membership functions that are bound to the FOU. The UMF is associated with the upper ~ and is denoted as μ ~ ðxÞ, 8 x A X, and the LMF is bound of FOU (A) A

~ μA~ ðxÞ ¼ FOUðAÞ

8xAX

ð4Þ

~ μ A~ ðxÞ ¼ FOUðAÞ

8xAX

ð5Þ

Note that Jx is an interval set: J x ¼ fðx; vÞ : v A ½μ ~ ðxÞ; μA~ ðxÞg A

ð6Þ

2.2. The rule base The upper-level IT2-FLS of the proposed control structure contains operator knowledge in the form of IF–THEN rules to decide the gain factors of the conventional PID controller. The effect of variation in gain parameters on rise time, overshoot, and settling time of a PID controller is illustrated in Table 1. In the proposed method, the control rules are developed with the error and the change in error as a premise and the proportional, integral, and derivative gains are consequent of each rule. The structure of the fuzzy rule is written as If e is A~ 1 and Δe is A~ 2 then kp is B~ 1 and ki is B~ 2 and kd is B~ 3

ð7Þ

where A~ 1 , A~ 2 , B~ 1 , B~ 2 , and B~ 3 are IT2-FSs as described in Fig. 3.

2.3. Fuzzification and inference When e ¼ x01 , the vertical line at x01 intersects FOUðA~ 1 Þ everywhere in the interval [μ ~ ðx01 Þ; μA~ 1 ðx01 Þ]; and, when Δe ¼ x02 , A1 the vertical line at x02 intersects FOUðA~ 2 Þ everywhere in the interval [μ ~ ðx02 Þ; μA~ 2 ðx02 Þ]. Two firing levels are then computed, A2 a lower firing level, f ðx0 Þ, and an upper firing level, f ðx0 Þ, where f ðx0 Þ ¼ min[μ ~ ðx01 Þ; μ ~ ðx02 Þ] and f ðx0 Þ ¼ min[μA~ 1 ðx01 Þ, μA~ 2 ðx02 Þ]. The A1 A2 main thing to observe from the result of input and antecedent operations is the firing interval Fðx0 Þ, where Fðx0 Þ ¼ ½f ðx0 Þ; f ðx0 Þ.

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

735

B. Compute the average between the two end points of the centroid for each consequent IT2-FS as

2.4. Type-reduction and defuzzification Type-reduction is an extension of type-1 defuzzification which represents a mapping of a T2-FS into a T1-FS [47]. The output of a type-reduction process is called a type-reduced set which is a collection of the outputs of all the embedded T1-FLSs. We introduce a new method for the type-reduction, which is able to reduce the time of computations and the memory required for the IT2F-PID controller. In order to show the difference between the UB method and the proposed type-reduction method, we describe the computation steps for each method.

i

i

kc ¼

i

kl þ kr 2

ð15Þ i

i

C. Compute the firing interval for each fired rule. Call it ½f ; f  ði ¼ 1; :::; MÞ. D. Compute kl ðxÞ and kr ðxÞ as follows: i i

i i

kl ðxÞ ¼

∑M i ¼ 1 f kc ∑M i ¼ 1f

i

;

kr ðxÞ ¼

∑M i ¼ 1 f kc ∑M i ¼ 1f

ð16Þ

i

2.4.1. The uncertainty bounds method E. Compute the approximate defuzzified output by Eq. (14).

The steps of this method are calculated as follows [22]: A. Compute the centroids of M consequent IT2-FSs: i i kl and kr (i ¼ 1; :::; MÞ, the end points of the centroids of the M consequent IT2-FSs, are computed using KM algorithms [46,51]. These computations can be performed after the design of the IT2-FLS has been completed and they only have to be done once. B. Compute the four boundary T1-FLS centroids: , M

ð0Þ

M

i i

kl ðxÞ ¼ ∑ f kl i¼1

ð0Þ kr ðxÞ ¼

∑f

i i kr

M

i

i¼1

ðMÞ kl ðxÞ ¼ ðMÞ

,

M

∑f

i

M

i

i¼1

∑f ;

i¼1

,

∑f

i¼1

i kl

∑f

M

i i

kr ðxÞ ¼ ∑ f kr i¼1

3. Uncertain inverted pendulum system

M

i

3.1. Mathematical model

i¼1

,

M

∑f

i

ð8Þ

i¼1

C. Compute the four uncertainty bounds: k l ðxÞ r kl ðxÞ r k l ðxÞ; n

ð0Þ

k r ðxÞ r kr ðxÞ r kr ðxÞ M

o

k l ðxÞ ¼ min kl ðxÞ; kl ðxÞ ; 2

The UB method depends on the two end points of the centroids of the M consequent IT2-FSs but, the proposed type-reduction method depends on the average of the two end points of the centroids. This modification reduces the time of computations and also reduces the size of the memory required to implement the output processing when the IT2F-PID controller is implemented in the embedded systems. The calculations which are shown above for the proposed method of type-reduction are performed to obtain the values of kp, ki, and kd.

n o ð0Þ M k r ðxÞ ¼ max kr ðxÞ; kr ðxÞ

ð9Þ ð10Þ

    3 i i i 1 M i ∑M f kl  kl ∑M f kl  kl i ¼ 1 i ¼ 1 6 7 k l ðxÞ ¼ k l ðxÞ  4    5 i i i i i 1 M i ∑M f ∑M f ∑M f kl  kl þ ∑M f kl  kl i¼1 i¼1 i¼1 i¼1  i  i ∑M i ¼ 1 f f

ð11Þ 2

3  i    i i i 1 i M i ∑M f f ∑M f kr  kr ∑M f ðkr  kr Þ i ¼ 1 i ¼ 1 i ¼ 1 6 7 k r ðxÞ ¼ k r ðxÞþ 4   5 i i i i 1 i M i M kr  kr þ ∑M f ðkr  kr Þ ∑M ∑M i¼1 i ¼ 1 f ∑i ¼ 1 f i ¼ 1f

The inverted pendulum system defined here is shown in Fig. 4, which is formed from a cart, a pendulum and a rail for defining the positions of the cart. The pendulum is hinged in the center of the top surface of the cart and can rotate around the pivot in the same vertical plane with the rail. The cart can move right or left on the rail freely. It is given that no friction exists in the system between the cart and the rail or between the cart and the pendulum [52,53]. The dynamic equation of the uncertain inverted pendulum system can be expressed as [52,54] "

x_ 1 x_ 2

#

2 6 g ¼6 4

x2 ðm þ Δm Þlx 2 sin ðx Þ cos ðx1 Þ sin ðx1 Þ  p ðmp þ 2Δm þ m1 Þ p p c ðmp þ Δmp Þl cos 2 ðx1 Þ 4l  ðm 3 p þ Δmp þ mc Þ

2 " # x1 7 6 7 þ ΔA þ4 5 x2 4l

θ ð13Þ

2l

ð14Þ

2.4.2. The proposed type-reduction method (simplified type-reduction)

u

The calculations of the proposed simplified type-reduction method are performed as follows: A. Compute the centroid of each rule's consequent IT2-FS using i i the KM algorithms [46,51]. Call it ½kl ; kr  ði ¼ 1; :::; MÞ.

3 7 5u

ð17Þ

E. Compute the approximate defuzzified output: 1 kðxÞ ¼ ½kl ðxÞ þ kr ðxÞ 2

0

cos ðx1 Þ ðmp þ Δmp þ mc Þ ðmp þ Δmp Þl cos 2 ðx1 Þ  3 ðmp þ Δmp þ mc Þ

ð12Þ

D. Compute the approximate type-reduction sets: ½kl ðxÞ; kr ðxÞ ¼ ½ðk l ðxÞ þ k l ðxÞÞ=2; ðk r ðxÞ þk r ðxÞÞ=2

3

Fig. 4. Inverted pendulum on a cart.

736

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

where x1 is the angle of the pendulum, x2 ¼ x_ 1 , and u is the control force in the unit (Newton) applied horizontally to the cart. The parameters, mc and mp, are, respectively, the mass of the cart and the mass of the pendulum in the unit (kg), and g ¼ 9:8 m=s2 is the

3.2. The proposed controller for the inverted pendulum

d yr +

e -

Interval Type-2 Fuzzy PID Controller

u +

+

gravity acceleration. The parameter l is the half length of the pendulum in the unit (m). Δmp is the uncertainty in the mass of the pendulum. ΔA is the structural uncertainty of the inverted pendulum.

Inverted Pendulum

x1

Fig. 5. Interval type-2 fuzzy PID controller for an inverted pendulum.

Fig. 5 shows the block diagram of an IT2F-PID controller for balancing an inverted pendulum on a cart. yr Denotes the desired angular position of the pendulum. The goal is to balance the pendulum in the upright position (i.e., yr ¼ 0) when it initially starts with a non-zero angle of the vertical (i.e., x1 a 0). u and d are the control signal (force) and the external disturbance,

Fig. 6. Membership functions for the error signal.

Fig. 7. Membership functions for the change of error signal.

Fig. 8. Membership functions for the proportional gain.

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

737

Fig. 9. Membership functions for the integral gain.

Fig. 10. Membership functions for the derivative gain.

Table 2 Rule base for the proportional gain. Change of error signal

NL NS Z PS PL

Table 4 Rule base for the derivative gain.

Error signal

Change of error signal

NL

NS

Z

PS

PL

M B VB B M

S M B M S

S S M S S

S M B M S

M B VB B M

Table 3 Rule base for the integral gain. Change of error signal

NL NS Z PS PL

Error signal NL

NS

Z

PS

PL

B B VB B B

M M B M M

S M M M S

M M B M M

B B VB B B

respectively. The steps for designing the proposed controller for the inverted pendulum are summarized as follows: (1) Choosing the input and output variables for the fuzzy controller. We use the error signal and the change of error signal

NL NS Z PS PL

Error signal NL

NS

Z

PS

PL

M M S M M

M M M M M

B B B B B

M M M M M

M M S M M

as the input variables; and the proportional, the integral, and the derivative gains as the output variables. (2) Once the fuzzy controller inputs and outputs are chosen, we define the universe of discourse for the input and output variables. Then, we divide the universe of discourse into IT2FSs as described in Fig. 3. For the inverted pendulum system, Figs. 6 and 7 show the membership function for the error signal and the change in error signal respectively, where the universe of discourse is divided into five overlapping IT2-FS values labeled Negative Large (NL), Negative Small (NS), Zero (Z), Positive Small (PS) and Positive Large (PL). The membership functions for the proportional, the integral, and the derivative gains are shown in Figs. 8–10, correspondingly. Where the linguistic variables are labeled Small (S), Medium (M), Big (B), and Very Big (VB). (3) Writing the rule-bases for the inverted pendulum system for all possible cases. Based on the experience and Table 1, the

738

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

rule base for the proportional, the integral, and the derivative gains are shown in Tables 2–4 correspondingly. (4) Applying the algorithm of the IT2F-PID controller that are described in Sections 2.3 and 2.4.

a small overshoot for the two proposed controllers and T1F-PID controller.

4.1.2. Task 2: uncertainty in mass

4. Simulation and practical results 4.1. Simulation results In this section, an inverted pendulum–cart system has been simulated using the two proposed controllers: the IT2F-PID controller using the UB method and the IT2F-PID controller using the proposed method of type-reduction. In order to clear the improvement of the proposed controllers, the T1F-PID controller is also implemented for comparison purposes. The parameters of an inverted pendulum–cart system are given in Table 5. There are four simulation tasks performed for the inverted pendulum. 4.1.1. Task 1: normal case

Fig. 12 shows the response of the inverted pendulum system using the two proposed IT2F-PID controllers and the T1F-PID controller for initial conditions x1 ¼ 0:1 rad and x2 ¼ 0 rad=s; Δmp ¼ 2 kg after 3 s. The inverted pendulum system with the two proposed controllers can be balanced at the desired position after adding the uncertainty value of the pendulum mass. So, the response of the two proposed IT2F-PID controllers is made significantly better than the T1F-PID controller. Fig. 13 shows the response of the inverted pendulum system when Δmp ¼ 2:2 kg. It is clear that, the system remains stable for the two proposed controllers and unstable for the T1F-PID controller. So, the two proposed IT2F-PID controllers are superior to respond to the uncertainty in the mass of the pendulum.

4.1.3. Task 3: structure uncertainty

Fig. 11 shows the response of the inverted pendulum system using the two IT2F-PID controllers and the T1F-PID controller for initial conditions x1 ¼ 0:1 rad and x2 ¼ 0 rad=s. The output moves toward the inverted position without a steady state error and

Table 5 Parameters of the inverted pendulum system. Symbol

Parameter name

Values

mc mp l g

Mass of the cart Mass of the pendulum Half-length of the pendulum Gravity acceleration

0.5 kg 0.2 kg 0.5 m 9.8 m/s2

Fig. 14 shows the response of the inverted pendulum system using the two proposed IT2F-PID controllers and the T1F-PID controller for initial conditions x1 ¼ 0:1 rad and x2 ¼ 0 rad=s. The uncertainty value is defined as   0:075 0:075 ΔA ¼ 0:075 0:075 This value is added at time equal to 2 s. As shown in the figure, the two proposed controllers are able to maintain the stability of the system after adding the uncertainty value but the system becomes unstable for the T1F-PID controller. So, the two proposed controllers are superior in responding to the uncertainty rather than the T1F-PID controller.

Fig. 11. Response of the inverted pendulum system for normal case.

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

739

Fig. 12. Response of the inverted pendulum system for uncertainty in mass (Δmp ¼ 2 kg).

Fig. 13. Response of the inverted pendulum system for uncertainty in mass (Δmp ¼ 2:2 kg).

4.1.4. Task 4: external disturbance The response of the inverted pendulum system using the two proposed IT2F-PID controllers and the T1F-PID controller for the external disturbance value, d ¼ 29 N, is shown in Fig. 15. It can be seen that the response of the system for the proposed IT2F-PID controller using a new method of type-reduction is made significantly better than the proposed IT2F-PID controller using the UB method and the T1F-PID controller after adding an external disturbance at time equal to 2 s. To show the visual indications of control performance, an objective measure of error performance was made using the integral of square of errors (ISE), the root mean square error (RMSE) and the integral of absolute error (IAE) criteria. The ISE, the

RMSE and the IAE are defined in Eqs. (18)–(20) correspondingly. Z 1 ISE ¼ ½eðtÞ2 dt ð18Þ 0

sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 N RMSE ¼ ∑ ðeðtÞÞ2 Ni¼1 Z

ð19Þ

1

IAE ¼

jeðtÞjdt

ð20Þ

0

Tables 6–8 list the ISE, the RMSE and the IAE values correspondingly, for the T1F-PID controller [48,49], the IT2-FLC [55], the Type-2 FLC [56], the fuzzy sliding mode control (FSMC) [57,58] and the two proposed IT2F-PID controllers for all the above

740

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

Fig. 14. Response of the inverted pendulum system for structure uncertainty.

Fig. 15. Response of the inverted pendulum system when the value of disturbance is d ¼29 N.

Table 6 ISE values.

T1F-PID [48,49] FSMC [57,58] IT2-FLC [55] Type-2 FLC [56] IT2F-PID (UB method) IT2F-PID (proposed method)

Table 7 RMSE values. Task 1 Task 2 (Δmp ¼2 kg)

Task 2 (Δmp ¼2.2 kg)

Task 3 Task 4

0.0496 0.0452 0.0413 0.0411 0.0369

0.1643 0.1251 0.0935 0.0856 0.0584

1.5395 1.356 0.5248 0.4821 0.0714

6.483 1.852 0.0698 0.0621 0.0534

306.08 255.70 223.87 192.51 143.90

0.0360 0.0581

0.0710

0.0531

81.85

T1F-PID [48,49] FSMC [57,58] IT2-FLC [55] Type-2 FLC [56] IT2F-PID (UB method) IT2F-PID (proposed method)

Task 1 (Δmp ¼ 2 kg)

Task 2 (Δmp ¼2.2 kg)

Task 2 Task 3

Task 4

0.01 0.0095 0.0091 0.0091 0.0086

0.0091 0.0079 0.0068 0.0065 0.0054

0.0277 0.0260 0.0162 0.0127 0.006

0.0805 0.0430 0.0084 0.0079 0.0073

0.5532 0.5057 0.4731 0.4388 0.3793

0.0085

0.0053

0.005

0.0072 0.2861

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

simulation tasks. As shown in Tables 6–8 the values of the ISE, the RMSE and the IAE for the two proposed IT2F-PID controllers are lower than those obtained for the T1F-PID controller, the IT2-FLC, the Type-2 FLC and the FSMC. For the external disturbance task, the values for the IT2F-PID controller using the proposed typereduction method are lower than that obtained for the IT2F-PID controller using the UB method. In the next section, the best two controllers which are the proposed IT2F-PID controller using the new method of type-reduction and the proposed IT2F-PID controller using the UB method are implemented practically using the PIC microcontroller.

Table 8 IAE values.

T1F-PID [48,49] FSMC [57,58] IT2-FLC [55] Type-2 FLC [56] IT2F-PID (UB method) IT2F-PID (proposed method)

Task 1 Task 2 (Δmp ¼2 kg)

Task 2 (Δmp ¼2.2 kg)

Task 3

Task 4

1.9969 11.626 1.9821 8.561 1.901 6.559 1.8821 5.012 1.8031 3.603

45.417 35.260 19.485 16.521 4.959

50.707 6.634 2.814 2.751 2.004

258.30 240.54 219.65 189.65 166.92

4.804

1.996

95.10

1.8001

3.501

741

4.2. Practical results In this section, we show the effect of the two proposed IT2FPID controllers practically. The two proposed IT2F-PID controllers are implemented using the PIC microcontroller (P18F4685). Fig. 16 shows the response of the two proposed IT2F-PID controllers and the T1F-PID controller for the normal case. It is clear that, the response of the inverted pendulum has a small overshoot and without a steady state error for all the controllers. Fig. 17 shows the response of the inverted pendulum when the uncertainty of the mass of the pendulum (Δmp ¼ 2 kg) is added at time equal to 3 s. It is clear that, the response of the two proposed IT2F-PID controllers is significantly better than the T1F-PID controller. The response of the inverted pendulum when Δmp ¼ 2:2 kg is added is shown in Fig. 18. It is clear that, the response of the inverted pendulum remains stable for the two proposed IT2F-PID controllers and unstable for the T1F-PID controller. The response of the inverted pendulum when applying the external disturbance in the force is shown in Fig. 19. The response of the proposed IT2F-PID controller using a new method of type-reduction is better than the proposed IT2F-PID controller using the UB method and the T1F-PID controller. Table 9 lists the memory usage and computation time for the IT2F-PID controller based on the UB method and the IT2F-PID controller based on the proposed method of type-reduction. It is clear that the IT2F-PID controller using the proposed

Fig. 16. Practical response of the inverted pendulum for normal case.

Fig. 17. Practical response of the inverted pendulum after adding the uncertainty in the mass of the pendulum (Δmp ¼ 2 kg).

742

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

Fig. 18. Practical response of the inverted pendulum after adding the uncertainty in the mass of the pendulum (Δmp ¼ 2:2 kg).

Fig. 19. Practical response of the inverted pendulum after adding the external disturbance.

Table 9 Memory usage and computation time for IT2F-PID controllers.

ROM usage RAM usage Computation time

IT2F-PID (UB method [21])

IT2F-PID (proposed method)

45% 35% 0.1518 ms

30% 25% 0.0404 ms

type-reduction method reduces the size of memory used which saves 15% of the read only memory (ROM) and 10% from the internal random access memory (RAM). The proposed type-reduction method reduces the computation time of typereduction process which the IT2F-PID controller using the proposed method of type-reduction is about 3.75 times faster than the IT2F-PID controller using the UB method [18].

5. Conclusions In this paper, the IT2F-PID controller using the UB method and the new method of type-reduction are proposed for controlling

the uncertain inverted pendulum on a cart system. The two proposed controllers have been tested by using four simulation tasks including the normal case, the mass uncertainties, the structure uncertainties, and the external disturbance. The simulation results of the two proposed controllers are compared with the results of the T1F-PID controller. In the normal case, the response of the inverted pendulum is good for all the controllers. For the mass uncertainty case, the two proposed controllers can realize tracking of an inverted pendulum with a small overshoot and a small settling time rather than the T1F-PID controller. The response of the inverted pendulum for the T1F-PID controller remains unstable when the value of the mass uncertainty is increased. For the structured uncertainty case, the inverted pendulum system remains stable for the two proposed controllers. But, it becomes unstable for the T1F-PID controller. So, the two proposed IT2F-PID controllers can handle the structured uncertainties rather than the T1F-PID controller. For the external disturbance case, the proposed IT2F-PID controller using the new method of type-reduction has the ability to respond to the effect of external disturbance rather than the proposed IT2F-PID controller using the UB method and the T1F-PID controller. The two proposed controllers are implemented using the PIC

M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

microcontroller. The practical results show that the two proposed IT2F-PID controllers are superior to the T1F-PID controller to reduce the effect of uncertainty and the external disturbances. Although the response of the IT2F-PID controller using the UB method and the new method of type-reduction is the same to respond to the mass uncertainty and the structure uncertainty, the new method of type-reduction reduces the memory required for the controller when it is implemented in microcontroller which saves 15% of ROM and 10% of RAM; and also, it reduces the computation time of the type-reduction process where the IT2FPID controller using the proposed method of type-reduction is about 3.75 times faster than the IT2F-PID controller using the UB method. The test is carried using the three performance indices (the ISE, the RMSE and the IAE). For the normal task, the mass uncertainty task and the structure uncertainty task, all values which are obtained for the two proposed IT2F-PID controllers are lower than those obtained for the T1F-PID controller, the IT2-FLC, the Type-2 FLC and the FSMC. For the external disturbance task, the values which are obtained for the IT2F-PID controller using the proposed method of type-reduction are lower than those obtained for all the other controllers. So, the proposed controller is superior to respond to the effect of the mass uncertainties, the structure uncertainties, and the external disturbance rather than the T1FPID controller, the IT2-FLC, the Type-2 FLC and the FSMC.

References [1] Bennett S. Development of the PID controller. IEEE Control Syst Mag 1993;13:58–65. [2] Chen G. Conventional and fuzzy PID controllers: an overview. Int J Intell Control Syst 1996;1:235–46. [3] Li W. Design of a hybrid fuzzy logic proportional plus conventional integralderivative controller. IEEE Trans Fuzzy Syst 1998;6:449–63. [4] Bandyopadhyay R, Patranabis D. A new autotuning algorithm for PID controllers using dead-beat format. ISA Trans 2001;40:255–66. [5] Dey C, Mudi RK. An improved auto-tuning scheme for PID controllers. ISA Trans 2009;48:396–409. [6] Tran HD, Guan ZH, Dang XK, Cheng XM, Yuan FS. A normalized PID controller in networked control systems with varying time delays. ISA Trans 2013;52:592–9. [7] Kim JH, Oh SJ. A fuzzy PID controller for nonlinear and uncertain systems. Soft Comput 2000;4:123–9. [8] Patel AV, Mohan BM. Analytical structures and analysis of the simplest fuzzy PI controllers. Automatica 2002;38:981–93. [9] Mohan BM, Patel AV. Analytical structures and analysis of the simplest fuzzy PD controllers. IEEE Trans Syst Man Cybern Part B 2002;32:239–48. [10] Qiao WZ, Mizumoto M. PID type fuzzy controller and parameters adaptive method. Fuzzy Sets Syst 1996;78:23–35. [11] Mohan BM, Sinha A. Analytical structure and stability analysis of a fuzzy PID controller. Appl Soft Comput 2008;8:749–58. [12] Xu JX, Hang CC, Liu C. Parallel structure and tuning of a fuzzy PID controller. Automatica 2000;36:673 684. [13] Misir D, Malki HA, Chen G. Design and analysis of a fuzzy proportional– integral–derivative controller. Fuzzy Sets Syst 1996;79:297–314. [14] Li W, Chang XG, Wahl FM, Farrell J. Tracking control of a manipulator under uncertainty by fuzzy P þID controller. Fuzzy Sets Syst 2001;122:125–37. [15] Callai TC, Santos JES, Sumar RR, Coelho AAR. Applying the potentiality of using fuzzy logic in PID control design. Adv Soft Comput 2005;1:193–204. [16] Chen H. Bacterial foraging based optimization design of fuzzy PID controllers. Adv Intell Comput Theor Appl 2008:841–9. [17] Natsheh E, Buragga KA. Comparison between conventional and fuzzy logic PID controllers for controlling DC motors. Int J Comput Sci 2010;7:128–34. [18] Carvajal J, Chen G, Ogmen H. Fuzzy PID controller: design, performance evaluation, and stability analysis. Inf Sci 2000;123:249–70. [19] Kumar V, Mittal AP. Parallel fuzzy P þfuzzy I þfuzzy D controller: design and performance evaluation. Int J Autom Comput 2010;7:463–71. [20] Fadaei A, Salahshoor K. Design and implementation of a new fuzzy PID controller for networked control systems. ISA Trans 2008;47:351–61. [21] Blanchett TP, Kember GC, Dubay R. PID gain scheduling using fuzzy logic. ISA Trans 2000;39:317–25. [22] Mendel JM. Type-2 fuzzy sets and systems: an overview. IEEE Comput Intell Mag 2007:20–9. [23] Mendel JM, John RB. Type-2 fuzzy sets made simple. IEEE Trans Fuzzy Syst 2002;10:117–27. [24] Hagras H. Type-2 FLCs: a new generation of fuzzy controllers. IEEE Comput Intell Mag 2007:30–43.

743

[25] Castillo O, Melin P. Type-2 fuzzy logic: theory and application. Studfuzz 2008;223:29–43. [26] Mendel JM, John RB, Liu F. Interval type-2 fuzzy logic systems made simple. IEEE Trans. Fuzzy Syst 2006;14:808–21. [27] Sepúlveda R, Castillo O, Melin P, Rodríguez-Díaz A, Montiel O. Experimental study of intelligent controllers under uncertainty using type-1 and type-2 fuzzy logic. Inf Sci 2007;177:2023–48. [28] Hagras H. A hierarchical type-2 fuzzy logic control architecture for autonomous mobile robots. IEEE Trans Fuzzy Syst 2004;12:524–39. [29] Hagras H, Doctor F, Callaghan V, Lopez A. An incremental adaptive life long learning approach for type-2 fuzzy embedded agents in ambient intelligent environments. IEEE Trans. Fuzzy Syst 2007;15:41–55. [30] Liu Z, Zhang Y, Wang Y. A type-2 fuzzy switching control system for biped robots. IEEE Trans Syst, Man, Cybern C Appl Rev 2007;37:1202–13. [31] Castillo O, Martínez-Marroquín R, Melin P, Valdez F, Soria J. Comparative study of bio-inspired algorithms applied to the optimization of type-1 and type-2 fuzzy controllers for an autonomous mobile robot. Inf Sci 2012;192:19–38. [32] Dereli T, Baykasoglu A, Altun K, Durmusoglu A, Türksen IB. Industrial applications of type-2 fuzzy sets and systems: a concise review. Comput Ind 2011;62:125–37. [33] Li YM, Sun YY, Type-2 T–S. fuzzy impulsive control of nonlinear systems. Appl Math Modell 2012;36:2710–23. [34] Kumbasar T, Eksin I, Guzelkaya M, Yesil E. Type-2 fuzzy model based controller design for neutralization processes. ISA Trans 2012;51:277–87. [35] Liang Q, Mendel JM. Interval type-2 fuzzy logic systems: theory and design. IEEE Trans Fuzzy Syst 2000;8:535–50. [36] Jammeh EA, Fleury M, Wagner C, Hagras H, Ghanbari M. Interval type-2 fuzzy logic congestion control for video streaming across IP networks. IEEE Trans Fuzzy Syst 2009;17:1123–43. [37] Sepúlveda R, Montiel O, Castillo O, Melin P. Embedding a high speed interval type-2 fuzzy controller for a real plant into an FPGA. Appl Soft Comput 2012;12:988–98. [38] Kumbasar T, Eksin I, Guzelkaya M, Yesil E. Interval type-2 fuzzy inverse controller design in nonlinear IMC structure. Eng Appl Artif Intell 2011;24 (6):996–1005. [39] El-Nagar AM, El-Bardini M, El-Rabaie N. Intelligent control for nonlinear inverted pendulum based on interval type-2 fuzzy PD controller. Alex Eng J 2014;53(1):23–32. [40] Wu D, Tan WW. A simplified type-2 fuzzy logic controller for real-time control. ISA Trans 2006;45:503–16. [41] El-Bardini M, El-Nagar AM. Direct adaptive interval type-2 fuzzy logic controller for the multivariable anaesthesia system. Ain Shams Eng J 2011;2:149–60. [42] El-Nagar AM, El-Bardini M. Practical implementation for the interval type-2 fuzzy PID controller using a low cost microcontroller. Ain Shams Eng J 2014 (in press). [43] Fazlyab M, Pedram MZ, Salarieh H, Alasty A. Parameter estimation and interval type-2 fuzzy sliding mode control of a z-axis MEMS gyroscope. ISA Trans 2013;52:900–11. [44] Karnik NN. Type-2 fuzzy logic systems [Ph.D. dissertation]. Los Angeles, CA: University of Southern California; 1998. [45] Karnik NN, Mendel JM, Liang Q. Type-2 fuzzy logic systems. IEEE Trans Fuzzy Syst 1999;7:643–58. [46] Mendel JM. Uncertain rule-based fuzzy logic systems: introduction and new directions. Upper Saddle River, NJ: Prentice-Hall; 2001. [47] Wu H, Mendel JM. Uncertainty bounds and their use in the design of interval type-2 fuzzy logic systems. IEEE Trans Fuzzy Syst 2002;10:622–39. [48] Zhao ZY, Tomizuka M, Isaka S. Fuzzy gain scheduling of PID controllers. IEEE Trans Syst, Man, Cybern 1993;23:1392–8. [49] Amoozgar M.H., Chamseddine A., Zhang Y.M., Fault-tolerant fuzzy gainscheduled PID for a quadrotor helicopter tested in the presence of actuator faults, In: Proceedings of IFAC conference on advances in PID control. Brescia, Italy; 2012. [50] Kanagaraj N, Sivashanmugam P, Paramasivam S. Fuzzy coordinated PI controller: application to the real-time pressure control process. Adv Fuzzy Syst 2008. [51] Karnik NN, Mendel JM. Centroid of a type-2 fuzzy set. Inf Sci 2001;132: 195–220. [52] Becerikli Y, Celik BK. Fuzzy control of inverted pendulum and concept of stability using java application. Math Comput Modell 2007;46:24–37. [53] Tinkir M., Onen U., Kalyoncu M., Botsali F.M., PID and interval type-2 fuzzy logic control of double inverted pendulum system, In: Proceedings of the 2nd international conference on computer and automation engineering (ICCAE); 2010. p. 117–121. [54] Lin K. Stabilization of uncertain fuzzy control systems via a new descriptor system approach. Comput Math Appl 2012;64:1170–8. [55] Du X, Ying H. Derivation and analysis of the analytical structures of the interval type-2 fuzzy PI and PD controllers. IEEE Trans Fuzzy Syst 2010;18:802–14. [56] Chen Y., Wang T., Interval type-2 fuzzy PID control and simulation, In: Proceedings of the 2nd international conference on electronic & mechanical engineering and information technology (EMEIT-2012). [57] Dastranj MR, Moghaddas M, Ghezi Y, Rouhani M. Robust Control of inverted pendulum using fuzzy sliding mode control and genetic algorithm. Int J Inform Electron Eng 2012;2:773–6. [58] Chang W, Park JB, Joo YH, Chen G. Design of robust fuzzy-model-based controller with sliding mode control for SISO nonlinear systems. Fuzzy Sets Syst 2002;125:1–22.

Interval type-2 fuzzy PID controller for uncertain nonlinear inverted pendulum system.

In this paper, the interval type-2 fuzzy proportional-integral-derivative controller (IT2F-PID) is proposed for controlling an inverted pendulum on a ...
4MB Sizes 0 Downloads 3 Views