Vous êtes sur la page 1sur 12

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: In this paper, the interval type-2 fuzzy proportional–integral–derivative controller (IT2F-PID) is pro-
Received 5 December 2012 posed for controlling an inverted pendulum on a cart system with an uncertain model. The proposed
Received in revised form controller is designed using a new method of type-reduction that we have proposed, which is called the
29 January 2014
simplified type-reduction method. The proposed IT2F-PID controller is able to handle the effect of
Accepted 16 February 2014
Available online 21 March 2014
structure uncertainties due to the structure of the interval type-2 fuzzy logic system (IT2-FLS). The
This paper was recommended for results of the proposed IT2F-PID controller using a new method of type-reduction are compared with the
publication by A.B. Rad 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
Keywords: controller is significantly improved compared with the T1F-PID controller.
Fuzzy PID controllers
& 2014 ISA. Published by Elsevier Ltd. All rights reserved.
Interval type-2 fuzzy logic system
Interval type-2 fuzzy PID controller
Inverted pendulum system
Uncertain system

1. Introduction obtain the overall improved performance. The fuzzy PIþD con-
troller is developed which is a combination of a fuzzy PI controller
The conventional PID controllers are still the most widely used and a fuzzy D controller [13]. The fuzzy P þID controller is
control structure in most of the industrial processes. This is mainly developed for tracking control of a two-link experimental direct
because PID controllers have simple control structures, affordable arm [14]. There are different control structures for the fuzzy PID
price, and effectiveness for linear systems [1–6]. Due to their linear controller mentioned in [15–21], in order to improve the closed
structure, the conventional PID controllers are usually not effective loop systems. Despite the significant improvement of system
if the system to be controlled has a high level of complexity, such performance with the fuzzy PID controllers over their conven-
as, time delay, high order, modeling nonlinearities, vague systems tional counterparts, it should be noted that they are usually not
without precise mathematical models, and structural uncertainties effective if cases where the system to be controlled has structure
[7]. For these reasons, many researchers have attempted to com- uncertainties as the ordinary fuzzy controllers (type-1 FLCs) have
bine a conventional PID controller with a fuzzy logic controller limited capabilities to directly handle data uncertainties [22].
(FLC) in order to achieve a better system performance over the There are five sources of uncertainties in type-1 fuzzy logic
conventional PID controller. systems (T1-FLSs) [23,24]: (1) uncertainties in the inputs to the
The fuzzy PI controller [8] and the fuzzy PD controller [9] are FLS, which translate into uncertainties in the antecedents mem-
developed to improve the system performance rather than con- bership functions as the sensor measurements are affected by high
ventional PID controllers. The fuzzy PI controllers are preferred noise levels from various sources. (2) Uncertainties in the control
more than the fuzzy PD controllers as the fuzzy PD controllers are outputs, which translate into uncertainties in the consequents
not able to eliminate the steady state errors [10]. However, the membership function of the FLS. (3) The meanings of the words
fuzzy PI controllers show a poor performance during the transient that are used in the antecedents and consequents of rules can
phase for higher order processes due to their internal integration be uncertain (words mean different things to different people).
operation. The fuzzy PI and the fuzzy PD controllers are combined (4) Uncertainties associated with the change in the operating
to get a fuzzy PID controller [11,12]. Its knowledge base consists of conditions of the controller. Such uncertainties can translate into
two-dimensional rule base for the PI and the PD controllers to uncertainties in the antecedents and/or consequent membership
functions. (5) The data that is used to tune the parameters of a T1-
FLS may also be noisy. All of these uncertainties translate into
n
Corresponding author.
uncertainties about fuzzy set membership functions. The T1-FLSs
E-mail addresses: dralbardini@ieee.org (M. El-Bardini), are not able to directly model such uncertainties because their
Ahmed_elnagar@menofia.edu.eg (A.M. El-Nagar). membership functions are totally crisp.

http://dx.doi.org/10.1016/j.isatra.2014.02.007
0019-0578/& 2014 ISA. Published by Elsevier Ltd. All rights reserved.
M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743 733

On the other hand, the type-2 fuzzy sets (T2-FSs) that were The major contributions of this study are (1) the successful
introduced by Zadeh in 1975 are able to model such uncertainties development of fuzzy PID controller to IT2F-PID controller. (2)
because their membership functions are themselves fuzzy; they The successful application of the proposed IT2F-PID controller for
are very useful in circumstances where it is difficult to determine controlling the uncertain inverted pendulum on a cart system. (3)
an exact membership function for a fuzzy set [25]. The concept of a The success of the proposed method of type-reduction to mini-
T2-FS is an extension of the concept of ordinary fuzzy sets (type-1 mize the memory required and reduces the time of compu-
fuzzy sets; T1-FSs). A T2-FS is characterized by a fuzzy member- tation for the type-reduction process. (4) The success of the
ship function (i.e., the membership grade for each element of this proposed controller to minimize the effect of the system uncer-
set is a fuzzy set in [0, 1]), unlike a T1-FS where the membership tainties and the external disturbance.
grade is a crisp number in [0, 1] [25]. Therefore, a T2-FS provides This paper is organized as follows. In Section 2, the IT2F-PID
additional degrees of freedom that make it possible to model and controller is included. The description of the mathematical model
handle the uncertainties directly [26]. Both the T1-FLS and T2-FLS of the uncertain inverted pendulum is presented in Section 3.
have the same four components, which are a fuzzifier, a rule base, Section 4 presents the simulation and practical results followed by
a fuzzy inference engine, and an output processor. Furthermore, the conclusions and the relevant references.
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 2. Interval type-2 fuzzy PID controller
or consequent sets are type-2. A T2-FLS can be used when the
circumstances are too uncertain to determine membership grades The prime objective of the controller design is to achieve a
exactly and they have been used in many applications, especially better control performance in terms of the stability and the
in the control systems [27–34]. The IT2-FLS is a special case of the robustness for the system uncertainties and the environmental
T2-FLS [24]. These are simpler to work with than general T2-FSs disturbances. The proposed control structure consists of a simple
and distribute the uncertainty evenly among all admissible pri- upper-level intelligent controller and a lower-level classical con-
mary memberships [35]. The IT2-FLSs have been applied to troller. The upper level controller provides a mechanism to select
various fields with great success [36–43]. the gains of a classical PID controller, whereas the lower-level
The structure of the IT2-FLS has four components, viz. a fuzzifier, a controller should deliver the solutions to a particular situation. In
rule base, a fuzzy inference engine, and an output processor. The the proposed control structure, a rule-based Mamdani-type-2
output sets of the IT2-FLS are interval type-2, so we have to use an fuzzy controller is used in the upper level and a conventional
extended version of type-1 defuzzification methods. The extended PID controller is selected for the lower level. The structure of the
defuzzification operation with the type-2 case gives a T1-FS at the IT2F-PID controller is shown in Fig. 1. In usual practice, the error
output. Since this operation takes us from the T2-FSs of the IT2-FLS to (e) and the change of error (Δe) parameters were preferred to the
a T1-FS, this operation is called a type-reduction and calls the type-1 designing of the antecedent of the fuzzy rules for control applica-
set so obtained a type-reduced set [44]. The type-reduced set is a tions [50]. So, in this proposed controller the error signal and
collection of the outputs of all of the embedded T1-FLSs [25]. The the change in error signal are used for the antecedent part of the
type-reduction is usually performed by iterative Karnik–Mendel (KM) rule based.
algorithms [45], which are computationally intensive. However, the The PID controller is usually implemented as follows:
IT2-FLS has a computational overhead associated with the computa- Z
deðtÞ
tion of the type-reduced fuzzy sets using the KM algorithms [46]. This uðtÞ ¼ kp eðtÞ þki eðtÞdt þ kd
dt
computational overhead reduces the real-time performance of the eðtÞ ¼ yr ðtÞ ym ðtÞ ð1Þ
IT2-FLS, especially when operating on industrial embedded controllers
which have limited computational and memory capabilities. So, the where kp, ki, and kd are the proportional, the integral, and the
type-2 computational overhead can limit the application of the IT2- derivative gains respectively. The controller output, the process
FLSs in industrial embedded controllers. Wu and Mendel [47] pro- output, and the set point are denoted as u, ym, and yr, respectively.
posed a method called uncertainty bounds (UB) to approximate the In the classical PID controller, the values of kp, ki, and kd in Eq. (1)
type-reduced set, thus avoiding the use of the iterative KM algorithms. are adjusted by the operator according to the changes in the
In this study, we propose a new method of type-reduction called the process condition. By developing a rule-based intelligent type-2
simplified type-reduction method which is able to reduce the computa- fuzzy controller structure, these parameters can be modified
tion cost of the type-reduction and also, reduces the memory required online, according to the changes in the process condition without
for the IT2-FLS when implemented in embedded systems. much intervention of an operator and further it will enhance the
As reported in [48,49], the T1F-PID controller is proposed to conventional controller performance over a wide operating range.
improve the system performance where the fuzzy rules and reason- The structure of upper-level IT2-FLS contains four components: a
ing are utilized on-line to determine the PID controller parameters fuzzifier, an inference engine, a rule base, and an output processing
based on the error signal and its first difference. The main drawback
of the T1F-PID controller [48,49] is the limitation capabilities to IT2F-PID Controller
directly handle data uncertainties. For these reasons, the main
objective of this paper is developing an IT2F-PID controller using Interval Type-2
the proposed type-reduction method which combines the conven- Fuzzy System
tional PID controller with the IT2-FLS to improve the system
performance compared with the T1F-PID controller. The proposed kp ki kd
controller has the ability to minimize the effect of structure uncer-
tainties and external disturbance. The proposed controller is used for yr + e u ym
PID Controller Process
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 improve-
ments in system performance over the T1F-PID controller under the
effect of the system uncertainties and the external disturbance. Fig. 1. Interval type-2 fuzzy PID controller structure.
734 M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743

Crisp
Crisp output
Fuzzifier Rule Base
Inputs Defuzzifier

Type-1 Reduced
Output Fuzzy
Sets
Type-Reduction

Type-2 Input Type-2


Inference Output
Fuzzy Sets Fuzzy Sets

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

Table 1
1 Effects of gain parameters.

~ Gain parameters Effects of increasing gain


UMF
~
( A) UMF ( A)
Rise time Overshoot Settling time

kp Decrease Increase Small change


Ki Decrease Increase Increase
Kd Decrease Decrease Decrease

~ ~
FOU ( A) LMF ( A) ~
FOU ( A)
x ~ and is denoted as
associated with the lower bound of FOU (A)
Fig. 3. Interval type-2 fuzzy set [22]. μ ~ ðxÞ, 8 x A X:
A

~
μA~ ðxÞ ¼ FOUðAÞ 8xAX ð4Þ

that are interconnected as shown in Fig. 2 [22]. The IT2-FLS works as ~


μ A~ ðxÞ ¼ FOUðAÞ 8xAX ð5Þ
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
Note that Jx is an interval set:
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 T1- J x ¼ fðx; vÞ : v A ½μ ~ ðxÞ; μA~ ðxÞg ð6Þ
A
FLS, but the antecedents and/or the consequences will be repre-
sented 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 2.2. The rule base
calculation that leads to T1-FSs called the type-reduced sets. After
the type reduction process, the type-reduced sets (or approximate The upper-level IT2-FLS of the proposed control structure
type-reduced sets) are defuzzified (by taking the average of the contains operator knowledge in the form of IF–THEN rules to
type-reduced or approximated type-reduced set) to obtain crisp decide the gain factors of the conventional PID controller. The
outputs. 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
2.1. Interval type-2 fuzzy set and the change in error as a premise and the proportional,
integral, and derivative gains are consequent of each rule. The
An IT2-FS A~ is characterized as [23] structure of the fuzzy rule is written as
Z Z Z "Z #
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Þ
A~ ¼ 1=ðx; vÞ ¼ 1=v =x ð2Þ
x A X v A J x D ½0;1 xAX v A J x D ½0;1
where A~ 1 , A~ 2 , B~ 1 , B~ 2 , and B~ 3 are IT2-FSs as described in Fig. 3.
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
2.3. Fuzzification and inference
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
When e ¼ x01 , the vertical line at x01 intersects FOUðA~ 1 Þ every-
uncertainty (FOU) of A~ (see Fig. 3):
where in the interval [μ ~ ðx01 Þ; μA~ 1 ðx01 Þ]; and, when Δe ¼ x02 ,
~ ¼ [ J ¼ ðx; vÞ : v A J D ½0; 1
A1
FOUðAÞ x x ð3Þ the vertical line at x02 intersects FOUðA~ 2 Þ everywhere in the
8xAX
interval [μ ~ ðx02 Þ; μA~ 2 ðx02 Þ]. Two firing levels are then computed,
A2
The upper membership function (UMF) and the lower member- a lower firing level, f ðx0 Þ, and an upper firing level, f ðx0 Þ, where
ship function (LMF) of A~ are two type-1 membership functions f ðx0 Þ ¼ min[μ ~ ðx01 Þ; μ ~ ðx02 Þ] and f ðx0 Þ ¼ min[μA~ 1 ðx01 Þ, μA~ 2 ðx02 Þ]. The
A1 A2
that are bound to the FOU. The UMF is associated with the upper main thing to observe from the result of input and antecedent
bound of FOU (A)~ and is denoted as μ ~ ðxÞ, 8 x A X, and the LMF is operations is the firing interval Fðx0 Þ, where Fðx0 Þ ¼ ½f ðx0 Þ; f ðx0 Þ.
A
M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743 735

2.4. Type-reduction and defuzzification B. Compute the average between the two end points of the
centroid for each consequent IT2-FS as
Type-reduction is an extension of type-1 defuzzification which i i
i kl þ kr
represents a mapping of a T2-FS into a T1-FS [47]. The output of a kc ¼ ð15Þ
2
type-reduction process is called a type-reduced set which is a
collection of the outputs of all the embedded T1-FLSs. We i
i
introduce a new method for the type-reduction, which is able to C. Compute the firing interval for each fired rule. Call it ½f ; f 
reduce the time of computations and the memory required for the ði ¼ 1; :::; MÞ.
IT2F-PID controller. In order to show the difference between the D. Compute kl ðxÞ and kr ðxÞ as follows:
UB method and the proposed type-reduction method, we describe i i i i
∑M
i ¼ 1 f kc ∑M
i ¼ 1 f kc
the computation steps for each method. kl ðxÞ ¼ i
; kr ðxÞ ¼ i
ð16Þ
∑M
i ¼ 1f ∑M
i ¼ 1f
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: The UB method depends on the two end points of the centroids
i i
kl and kr (i ¼ 1; :::; MÞ, the end points of the centroids of the M of the M consequent IT2-FSs but, the proposed type-reduction
consequent IT2-FSs, are computed using KM algorithms [46,51]. method depends on the average of the two end points of the
These computations can be performed after the design of the centroids. This modification reduces the time of computations and
IT2-FLS has been completed and they only have to be done once. also reduces the size of the memory required to implement the
B. Compute the four boundary T1-FLS centroids: output processing when the IT2F-PID controller is implemented in
, the embedded systems. The calculations which are shown above
M M
ð0Þ i i i for the proposed method of type-reduction are performed to
kl ðxÞ ¼ ∑ f kl ∑f
i¼1 i¼1 obtain the values of kp, ki, and kd.
,
M i i M i
ð0Þ
kr ðxÞ ¼ ∑f kr ∑f ;
i¼1 i¼1
, 3. Uncertain inverted pendulum system
M i M i
ðMÞ i
kl ðxÞ ¼ ∑f kl ∑f
i¼1 i¼1 3.1. Mathematical model
,
M M
ðMÞ i i i
kr ðxÞ ¼ ∑ f kr ∑f ð8Þ The inverted pendulum system defined here is shown in Fig. 4,
i¼1 i¼1
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
C. Compute the four uncertainty bounds: 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
k l ðxÞ r kl ðxÞ r k l ðxÞ; k r ðxÞ r kr ðxÞ r kr ðxÞ ð9Þ
rail freely. It is given that no friction exists in the system between
n o n o the cart and the rail or between the cart and the pendulum
ð0Þ M ð0Þ M
k l ðxÞ ¼ min kl ðxÞ; kl ðxÞ ; k r ðxÞ ¼ max kr ðxÞ; kr ðxÞ ð10Þ [52,53].
2  i      3 The dynamic equation of the uncertain inverted pendulum
i i i 1 i M i
∑M
i ¼ 1 f f
∑M f kl  kl ∑M f kl  kl system can be expressed as [52,54]
6 i ¼ 1 i ¼ 1 7
k l ðxÞ ¼ k l ðxÞ  4 i
  i
 5 2 3 2 3
∑M f ∑M
i
f ∑M
i i 1
f kl  kl þ ∑M
M
f kl  kl
i " # x2 " # 0
i¼1 i¼1 i¼1 i¼1 x_ 1 6 ðm þ Δm Þlx 2 sin ðx Þ cos ðx1 Þ 7 x1 6 cos ðx1 Þ
7
¼6
4
g sin ðx1 Þ  p ðmp þ 2Δm þ m1 Þ 7 þ ΔA
5 þ4 ðmp þ Δmp þ mc Þ 5u
ð11Þ x_ 2
p p
ðmp þ Δmp Þl cos 2 ðx1 Þ
c
x2 ðmp þ Δmp Þl cos 2 ðx1 Þ
4l
 ðm
4l
3
 ðmp þ Δmp þ mc Þ
3 p þ Δmp þ mc Þ
2  i    3
i i i 1 i M i
6
∑Mi ¼ 1 f f ∑M
i ¼ 1 f kr  kr ∑M i ¼ 1 f ðkr  kr Þ
7 ð17Þ
k r ðxÞ ¼ k r ðxÞþ 4 i i
  5 ð12Þ
i i 1
∑Mi ¼ 1 f ∑i ¼ 1 f
M ∑M i ¼ 1f kr  kr þ ∑M i¼1
i M i
f ðkr  kr Þ

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 ð13Þ

E. Compute the approximate defuzzified output:


1 2l
kðxÞ ¼ ½kl ðxÞ þ kr ðxÞ ð14Þ
2

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Þ. 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 gravity acceleration. The parameter l is the half length of the
force in the unit (Newton) applied horizontally to the cart. The pendulum in the unit (m). Δmp is the uncertainty in the mass of
parameters, mc and mp, are, respectively, the mass of the cart and the pendulum. ΔA is the structural uncertainty of the inverted
the mass of the pendulum in the unit (kg), and g ¼ 9:8 m=s2 is the pendulum.

3.2. The proposed controller for the inverted pendulum


d
Interval Type-2
u + + x1 Fig. 5 shows the block diagram of an IT2F-PID controller for
yr + e Inverted
Fuzzy PID
Pendulum
balancing an inverted pendulum on a cart. yr Denotes the desired
- Controller 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
Fig. 5. Interval type-2 fuzzy PID controller for an inverted pendulum. 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 Table 4
Rule base for the proportional gain. Rule base for the derivative gain.

Change of error signal Error signal Change of error signal Error signal

NL NS Z PS PL NL NS Z PS PL

NL M S S S M NL M M B M M
NS B M S M B NS M M B M M
Z VB B M B VB Z S M B M S
PS B M S M B PS M M B M M
PL M S S S M PL M M B M M

Table 3
Rule base for the integral gain. as the input variables; and the proportional, the integral, and
the derivative gains as the output variables.
Change of error signal Error signal
(2) Once the fuzzy controller inputs and outputs are chosen, we
NL NS Z PS PL
define the universe of discourse for the input and output
variables. Then, we divide the universe of discourse into IT2-
NL B M S M B FSs as described in Fig. 3. For the inverted pendulum system,
NS B M M M B Figs. 6 and 7 show the membership function for the error
Z VB B M B VB
signal and the change in error signal respectively, where the
PS B M M M B
PL B M S M B 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,
respectively. The steps for designing the proposed controller for and the derivative gains are shown in Figs. 8–10, correspond-
the inverted pendulum are summarized as follows: ingly. Where the linguistic variables are labeled Small (S),
Medium (M), Big (B), and Very Big (VB).
(1) Choosing the input and output variables for the fuzzy con- (3) Writing the rule-bases for the inverted pendulum system for
troller. We use the error signal and the change of error signal 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 a small overshoot for the two proposed controllers and T1F-PID
gains are shown in Tables 2–4 correspondingly. controller.
(4) Applying the algorithm of the IT2F-PID controller that are
described in Sections 2.3 and 2.4.
4.1.2. Task 2: uncertainty in mass

Fig. 12 shows the response of the inverted pendulum system


4. Simulation and practical results using the two proposed IT2F-PID controllers and the T1F-PID
controller for initial conditions x1 ¼ 0:1 rad and x2 ¼ 0 rad=s;
4.1. Simulation results Δmp ¼ 2 kg after 3 s. The inverted pendulum system with the
two proposed controllers can be balanced at the desired posi-
In this section, an inverted pendulum–cart system has been tion after adding the uncertainty value of the pendulum mass.
simulated using the two proposed controllers: the IT2F-PID con- So, the response of the two proposed IT2F-PID controllers is made
troller using the UB method and the IT2F-PID controller using the significantly better than the T1F-PID controller. Fig. 13 shows the
proposed method of type-reduction. In order to clear the improve- response of the inverted pendulum system when Δmp ¼ 2:2 kg.
ment of the proposed controllers, the T1F-PID controller is also It is clear that, the system remains stable for the two proposed
implemented for comparison purposes. The parameters of an controllers and unstable for the T1F-PID controller. So, the two
inverted pendulum–cart system are given in Table 5. There are proposed IT2F-PID controllers are superior to respond to the
four simulation tasks performed for the inverted pendulum. uncertainty in the mass of the pendulum.

4.1.1. Task 1: normal case


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 Fig. 14 shows the response of the inverted pendulum system
initial conditions x1 ¼ 0:1 rad and x2 ¼ 0 rad=s. The output moves using the two proposed IT2F-PID controllers and the T1F-PID
toward the inverted position without a steady state error and controller for initial conditions x1 ¼ 0:1 rad and x2 ¼ 0 rad=s. The
uncertainty value is defined as
 
0:075 0:075
Table 5 ΔA ¼
0:075 0:075
Parameters of the inverted pendulum system.

Symbol Parameter name Values


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
mc Mass of the cart 0.5 kg of the system after adding the uncertainty value but the system
mp Mass of the pendulum 0.2 kg becomes unstable for the T1F-PID controller. So, the two proposed
l Half-length of the pendulum 0.5 m
controllers are superior in responding to the uncertainty rather
g Gravity acceleration 9.8 m/s2
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 RMSE and the IAE are defined in Eqs. (18)–(20) correspondingly.
Z 1
The response of the inverted pendulum system using the two ISE ¼ ½eðtÞ2 dt ð18Þ
0
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 sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
1 N
seen that the response of the system for the proposed IT2F-PID RMSE ¼ ∑ ðeðtÞÞ2 ð19Þ
Ni¼1
controller using a new method of type-reduction is made sig-
nificantly better than the proposed IT2F-PID controller using the Z 1
UB method and the T1F-PID controller after adding an external IAE ¼ jeðtÞjdt ð20Þ
0
disturbance at time equal to 2 s.
To show the visual indications of control performance, an Tables 6–8 list the ISE, the RMSE and the IAE values corre-
objective measure of error performance was made using the spondingly, for the T1F-PID controller [48,49], the IT2-FLC [55],
integral of square of errors (ISE), the root mean square error the Type-2 FLC [56], the fuzzy sliding mode control (FSMC) [57,58]
(RMSE) and the integral of absolute error (IAE) criteria. The ISE, the 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 Table 7
ISE values. RMSE values.

Task 1 Task 2 Task 2 Task 3 Task 4 Task 1 Task 2 Task 2 Task 3 Task 4
(Δmp ¼2 kg) (Δmp ¼2.2 kg) (Δmp ¼ 2 kg) (Δmp ¼2.2 kg)

T1F-PID [48,49] 0.0496 0.1643 1.5395 6.483 306.08 T1F-PID [48,49] 0.01 0.0091 0.0277 0.0805 0.5532
FSMC [57,58] 0.0452 0.1251 1.356 1.852 255.70 FSMC [57,58] 0.0095 0.0079 0.0260 0.0430 0.5057
IT2-FLC [55] 0.0413 0.0935 0.5248 0.0698 223.87 IT2-FLC [55] 0.0091 0.0068 0.0162 0.0084 0.4731
Type-2 FLC [56] 0.0411 0.0856 0.4821 0.0621 192.51 Type-2 FLC [56] 0.0091 0.0065 0.0127 0.0079 0.4388
IT2F-PID 0.0369 0.0584 0.0714 0.0534 143.90 IT2F-PID 0.0086 0.0054 0.006 0.0073 0.3793
(UB method) (UB method)
IT2F-PID (proposed 0.0360 0.0581 0.0710 0.0531 81.85 IT2F-PID (proposed 0.0085 0.0053 0.005 0.0072 0.2861
method) method)
M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743 741

simulation tasks. As shown in Tables 6–8 the values of the ISE, the 4.2. Practical results
RMSE and the IAE for the two proposed IT2F-PID controllers are
lower than those obtained for the T1F-PID controller, the IT2-FLC, In this section, we show the effect of the two proposed IT2F-
the Type-2 FLC and the FSMC. For the external disturbance task, PID controllers practically. The two proposed IT2F-PID controllers
the values for the IT2F-PID controller using the proposed type- are implemented using the PIC microcontroller (P18F4685). Fig. 16
reduction method are lower than that obtained for the IT2F-PID shows the response of the two proposed IT2F-PID controllers and
controller using the UB method. In the next section, the best two the T1F-PID controller for the normal case. It is clear that, the
controllers which are the proposed IT2F-PID controller using the response of the inverted pendulum has a small overshoot and
new method of type-reduction and the proposed IT2F-PID con- without a steady state error for all the controllers. Fig. 17 shows
troller using the UB method are implemented practically using the the response of the inverted pendulum when the uncertainty of
PIC microcontroller. 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
Table 8 shown in Fig. 18. It is clear that, the response of the inverted
IAE values.
pendulum remains stable for the two proposed IT2F-PID control-
Task 1 Task 2 Task 2 Task 3 Task 4 lers and unstable for the T1F-PID controller. The response of the
(Δmp ¼2 kg) (Δmp ¼2.2 kg) inverted pendulum when applying the external disturbance in the
force is shown in Fig. 19. The response of the proposed IT2F-PID
T1F-PID [48,49] 1.9969 11.626 45.417 50.707 258.30
controller using a new method of type-reduction is better than
FSMC [57,58] 1.9821 8.561 35.260 6.634 240.54
IT2-FLC [55] 1.901 6.559 19.485 2.814 219.65 the proposed IT2F-PID controller using the UB method and the
Type-2 FLC [56] 1.8821 5.012 16.521 2.751 189.65 T1F-PID controller.
IT2F-PID (UB 1.8031 3.603 4.959 2.004 166.92 Table 9 lists the memory usage and computation time for
method) the IT2F-PID controller based on the UB method and the IT2F-PID
IT2F-PID (proposed 1.8001 3.501 4.804 1.996 95.10
method)
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 the uncertain inverted pendulum on a cart system. The two


Memory usage and computation time for IT2F-PID controllers. proposed controllers have been tested by using four simulation
tasks including the normal case, the mass uncertainties, the
IT2F-PID (UB method [21]) IT2F-PID (proposed method)
structure uncertainties, and the external disturbance. The simula-
ROM usage 45% 30% tion results of the two proposed controllers are compared with the
RAM usage 35% 25% results of the T1F-PID controller. In the normal case, the response
Computation time 0.1518 ms 0.0404 ms 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
type-reduction method reduces the size of memory used which a small settling time rather than the T1F-PID controller.
saves 15% of the read only memory (ROM) and 10% from The response of the inverted pendulum for the T1F-PID controller
the internal random access memory (RAM). The proposed remains unstable when the value of the mass uncertainty is
type-reduction method reduces the computation time of type- increased. For the structured uncertainty case, the inverted pen-
reduction process which the IT2F-PID controller using the pro- dulum system remains stable for the two proposed controllers.
posed method of type-reduction is about 3.75 times faster than But, it becomes unstable for the T1F-PID controller. So, the two
the IT2F-PID controller using the UB method [18]. proposed IT2F-PID controllers can handle the structured uncer-
tainties rather than the T1F-PID controller. For the external
disturbance case, the proposed IT2F-PID controller using the
5. Conclusions new method of type-reduction has the ability to respond to the
effect of external disturbance rather than the proposed IT2F-PID
In this paper, the IT2F-PID controller using the UB method and controller using the UB method and the T1F-PID controller.
the new method of type-reduction are proposed for controlling The two proposed controllers are implemented using the PIC
M. El-Bardini, A.M. El-Nagar / ISA Transactions 53 (2014) 732–743 743

microcontroller. The practical results show that the two proposed [25] Castillo O, Melin P. Type-2 fuzzy logic: theory and application. Studfuzz
IT2F-PID controllers are superior to the T1F-PID controller to 2008;223:29–43.
[26] Mendel JM, John RB, Liu F. Interval type-2 fuzzy logic systems made simple.
reduce the effect of uncertainty and the external disturbances. IEEE Trans. Fuzzy Syst 2006;14:808–21.
Although the response of the IT2F-PID controller using the UB [27] Sepúlveda R, Castillo O, Melin P, Rodríguez-Díaz A, Montiel O. Experimental
method and the new method of type-reduction is the same to study of intelligent controllers under uncertainty using type-1 and type-2
fuzzy logic. Inf Sci 2007;177:2023–48.
respond to the mass uncertainty and the structure uncertainty, the [28] Hagras H. A hierarchical type-2 fuzzy logic control architecture for autono-
new method of type-reduction reduces the memory required for mous mobile robots. IEEE Trans Fuzzy Syst 2004;12:524–39.
the controller when it is implemented in microcontroller which [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
saves 15% of ROM and 10% of RAM; and also, it reduces the environments. IEEE Trans. Fuzzy Syst 2007;15:41–55.
computation time of the type-reduction process where the IT2F- [30] Liu Z, Zhang Y, Wang Y. A type-2 fuzzy switching control system for biped
PID controller using the proposed method of type-reduction is 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
about 3.75 times faster than the IT2F-PID controller using the UB
of bio-inspired algorithms applied to the optimization of type-1 and type-2
method. The test is carried using the three performance indices fuzzy controllers for an autonomous mobile robot. Inf Sci 2012;192:19–38.
(the ISE, the RMSE and the IAE). For the normal task, the mass [32] Dereli T, Baykasoglu A, Altun K, Durmusoglu A, Türksen IB. Industrial
uncertainty task and the structure uncertainty task, all values applications of type-2 fuzzy sets and systems: a concise review. Comput Ind
2011;62:125–37.
which are obtained for the two proposed IT2F-PID controllers are [33] Li YM, Sun YY, Type-2 T–S. fuzzy impulsive control of nonlinear systems. Appl
lower than those obtained for the T1F-PID controller, the IT2-FLC, Math Modell 2012;36:2710–23.
the Type-2 FLC and the FSMC. For the external disturbance task, [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.
the values which are obtained for the IT2F-PID controller using the [35] Liang Q, Mendel JM. Interval type-2 fuzzy logic systems: theory and design.
proposed method of type-reduction are lower than those obtained IEEE Trans Fuzzy Syst 2000;8:535–50.
for all the other controllers. So, the proposed controller is superior [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
to respond to the effect of the mass uncertainties, the structure Fuzzy Syst 2009;17:1123–43.
uncertainties, and the external disturbance rather than the T1F- [37] Sepúlveda R, Montiel O, Castillo O, Melin P. Embedding a high speed interval
PID controller, the IT2-FLC, the Type-2 FLC and the FSMC. 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
References (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
[1] Bennett S. Development of the PID controller. IEEE Control Syst Mag
2014;53(1):23–32.
1993;13:58–65.
[40] Wu D, Tan WW. A simplified type-2 fuzzy logic controller for real-time
[2] Chen G. Conventional and fuzzy PID controllers: an overview. Int J Intell
control. ISA Trans 2006;45:503–16.
Control Syst 1996;1:235–46.
[41] El-Bardini M, El-Nagar AM. Direct adaptive interval type-2 fuzzy logic controller
[3] Li W. Design of a hybrid fuzzy logic proportional plus conventional integral-
for the multivariable anaesthesia system. Ain Shams Eng J 2011;2:149–60.
derivative controller. IEEE Trans Fuzzy Syst 1998;6:449–63.
[42] El-Nagar AM, El-Bardini M. Practical implementation for the interval type-2
[4] Bandyopadhyay R, Patranabis D. A new autotuning algorithm for PID con-
fuzzy PID controller using a low cost microcontroller. Ain Shams Eng J 2014 (in
trollers using dead-beat format. ISA Trans 2001;40:255–66. press).
[5] Dey C, Mudi RK. An improved auto-tuning scheme for PID controllers. ISA [43] Fazlyab M, Pedram MZ, Salarieh H, Alasty A. Parameter estimation and interval
Trans 2009;48:396–409. type-2 fuzzy sliding mode control of a z-axis MEMS gyroscope. ISA Trans
[6] Tran HD, Guan ZH, Dang XK, Cheng XM, Yuan FS. A normalized PID controller 2013;52:900–11.
in networked control systems with varying time delays. ISA Trans [44] Karnik NN. Type-2 fuzzy logic systems [Ph.D. dissertation]. Los Angeles, CA:
2013;52:592–9. University of Southern California; 1998.
[7] Kim JH, Oh SJ. A fuzzy PID controller for nonlinear and uncertain systems. Soft [45] Karnik NN, Mendel JM, Liang Q. Type-2 fuzzy logic systems. IEEE Trans Fuzzy
Comput 2000;4:123–9. Syst 1999;7:643–58.
[8] Patel AV, Mohan BM. Analytical structures and analysis of the simplest fuzzy PI [46] Mendel JM. Uncertain rule-based fuzzy logic systems: introduction and new
controllers. Automatica 2002;38:981–93. directions. Upper Saddle River, NJ: Prentice-Hall; 2001.
[9] Mohan BM, Patel AV. Analytical structures and analysis of the simplest fuzzy [47] Wu H, Mendel JM. Uncertainty bounds and their use in the design of interval
PD controllers. IEEE Trans Syst Man Cybern Part B 2002;32:239–48. type-2 fuzzy logic systems. IEEE Trans Fuzzy Syst 2002;10:622–39.
[10] Qiao WZ, Mizumoto M. PID type fuzzy controller and parameters adaptive [48] Zhao ZY, Tomizuka M, Isaka S. Fuzzy gain scheduling of PID controllers. IEEE
method. Fuzzy Sets Syst 1996;78:23–35. Trans Syst, Man, Cybern 1993;23:1392–8.
[11] Mohan BM, Sinha A. Analytical structure and stability analysis of a fuzzy PID [49] Amoozgar M.H., Chamseddine A., Zhang Y.M., Fault-tolerant fuzzy gain-
controller. Appl Soft Comput 2008;8:749–58. scheduled PID for a quadrotor helicopter tested in the presence of actuator
[12] Xu JX, Hang CC, Liu C. Parallel structure and tuning of a fuzzy PID controller. faults, In: Proceedings of IFAC conference on advances in PID control. Brescia,
Automatica 2000;36:673 684. Italy; 2012.
[13] Misir D, Malki HA, Chen G. Design and analysis of a fuzzy proportional– [50] Kanagaraj N, Sivashanmugam P, Paramasivam S. Fuzzy coordinated PI con-
integral–derivative controller. Fuzzy Sets Syst 1996;79:297–314. troller: application to the real-time pressure control process. Adv Fuzzy Syst
[14] Li W, Chang XG, Wahl FM, Farrell J. Tracking control of a manipulator under 2008.
uncertainty by fuzzy P þID controller. Fuzzy Sets Syst 2001;122:125–37. [51] Karnik NN, Mendel JM. Centroid of a type-2 fuzzy set. Inf Sci 2001;132:
[15] Callai TC, Santos JES, Sumar RR, Coelho AAR. Applying the potentiality of using 195–220.
fuzzy logic in PID control design. Adv Soft Comput 2005;1:193–204. [52] Becerikli Y, Celik BK. Fuzzy control of inverted pendulum and concept of
[16] Chen H. Bacterial foraging based optimization design of fuzzy PID controllers. stability using java application. Math Comput Modell 2007;46:24–37.
Adv Intell Comput Theor Appl 2008:841–9. [53] Tinkir M., Onen U., Kalyoncu M., Botsali F.M., PID and interval type-2 fuzzy
[17] Natsheh E, Buragga KA. Comparison between conventional and fuzzy logic PID logic control of double inverted pendulum system, In: Proceedings of the 2nd
controllers for controlling DC motors. Int J Comput Sci 2010;7:128–34. international conference on computer and automation engineering (ICCAE);
[18] Carvajal J, Chen G, Ogmen H. Fuzzy PID controller: design, performance 2010. p. 117–121.
evaluation, and stability analysis. Inf Sci 2000;123:249–70. [54] Lin K. Stabilization of uncertain fuzzy control systems via a new descriptor
[19] Kumar V, Mittal AP. Parallel fuzzy P þfuzzy I þfuzzy D controller: design and system approach. Comput Math Appl 2012;64:1170–8.
performance evaluation. Int J Autom Comput 2010;7:463–71. [55] Du X, Ying H. Derivation and analysis of the analytical structures of the interval
[20] Fadaei A, Salahshoor K. Design and implementation of a new fuzzy PID type-2 fuzzy PI and PD controllers. IEEE Trans Fuzzy Syst 2010;18:802–14.
controller for networked control systems. ISA Trans 2008;47:351–61. [56] Chen Y., Wang T., Interval type-2 fuzzy PID control and simulation, In:
[21] Blanchett TP, Kember GC, Dubay R. PID gain scheduling using fuzzy logic. ISA Proceedings of the 2nd international conference on electronic & mechanical
Trans 2000;39:317–25. engineering and information technology (EMEIT-2012).
[22] Mendel JM. Type-2 fuzzy sets and systems: an overview. IEEE Comput Intell [57] Dastranj MR, Moghaddas M, Ghezi Y, Rouhani M. Robust Control of inverted
Mag 2007:20–9. pendulum using fuzzy sliding mode control and genetic algorithm. Int J
[23] Mendel JM, John RB. Type-2 fuzzy sets made simple. IEEE Trans Fuzzy Syst Inform Electron Eng 2012;2:773–6.
2002;10:117–27. [58] Chang W, Park JB, Joo YH, Chen G. Design of robust fuzzy-model-based
[24] Hagras H. Type-2 FLCs: a new generation of fuzzy controllers. IEEE Comput controller with sliding mode control for SISO nonlinear systems. Fuzzy Sets
Intell Mag 2007:30–43. Syst 2002;125:1–22.