# Fuzzy Controllers for a Gantry Crane System with Experimental Verifications

Authors: Naif B. Almutairi; Mohamed Zribi
Journal: Mathematical Problems in Engineering
 (2016)

---

## Abstract

The control problem of gantry cranes has attracted the attention of many researchers because of the various applications of these cranes in the industry. In this paper we propose two fuzzy controllers to control the position of the cart of a gantry crane while suppressing the swing angle of the payload. Firstly, we propose a dual PD fuzzy controller where the parameters of each PD controller change as the cart moves toward its desired position, while maintaining a small swing angle of the payload. This controller uses two fuzzy subsystems. Then, we propose a fuzzy controller which is based on heuristics. The rules of this controller are obtained taking into account the knowledge of an experienced crane operator. This controller is unique in that it uses only one fuzzy system to achieve the control objective. The validity of the designed controllers is tested through extensive MATLAB simulations as well as experimental results on a laboratory gantry crane apparatus. The simulation results as well as the experimental results indicate that the proposed fuzzy controllers work well. Moreover, the simulation and the experimental results demonstrate the robustness of the proposed control schemes against output disturbances as well as against uncertainty in some of the parameters of the crane.


---

## Body

## 1. Introduction

Gantry cranes are used in many industrial applications. Generally, they are used in maintenance and in manufacturing applications because in these applications the efficiency and the downtime are very important economic factors.In controlling a gantry crane, one has to ensure that the cart is properly positioned while minimizing the swings of the payload. Hence, the cart of the crane should move toward its destination as fast and as precise as possible while the swings of the payload should be kept as small as possible. However, the motion of the cart of the crane is always accompanied with swings of the payload. These swings can be dangerous and may cause damage or accidents. Moreover, the parameters of the crane and the payload are generally not known exactly; also external disturbances might act on the crane system. Therefore, it is necessary to develop controllers to properly control gantry cranes even when some of their parameters are not known exactly and/or when some disturbances are acting on crane.A lot of research studies were completed on the control of gantry cranes [1–4]. Also, the fuzzy control technique has shown successful results when applied to many real-life problems including gantry crane systems [5].Fuzzy control systems are knowledge-based or rule-based systems. The heart of a fuzzy control system is the knowledge base which consists of the so-called fuzzy IF-THEN rules. A fuzzy IF-THEN rule is an IF-THEN statement in which some linguistic variables are characterized by mathematical functions called membership functions. A fuzzy controller is a control system based on analyzing analog signals using linguistic variables. These linguistic variables can take values in the range between zero and one [6].Using fuzzy control, we can represent and analyze human expertise used to solve control problems. This is due to the approximation characteristics of artificial intelligent techniques such as fuzzy logic and neural networks. In recent years, there was a rapid growth in the design and the implementation of fuzzy logic control techniques in a wide range of applications, particularly applications related to engineering systems such as electromechanical systems [7], chaotic systems [8], and chemical reactor systems [9, 10]. In the following two paragraphs, we will review some of the research studies done on the different applications of fuzzy logic controllers to gantry cranes.In [11], a fuzzy controller based on single input-rule modules for motion control of a gantry crane system is developed. In [12], an adaptive fuzzy sliding mode controller was employed to control a gantry crane system. A fuzzy logic-based robust feedback antisway control system applied on a gantry crane system was presented in [13]. In [14], the authors proposed a hierarchical multiobjective fuzzy controller for a gantry crane system. The proposed controller consists of three components: a multiobjective optimization controller, an actuation signal modulator, and a fuzzy logic regulator; the linear model of the gantry crane was used in the design of this hierarchical fuzzy controller. A combination of the backstepping control technique with a fuzzy logic system was proposed in [15] to control the position of the cart of the gantry crane and to control the swing of the payload of the crane; two fuzzy systems were used: the first one is an online scheme while the second fuzzy system is an offline scheme. In [16], a PD controller with a fuzzy mode is used to control both the position tracking and the antiswing problems of a crane. A fuzzy PID antiswing controller is applied to the linear model of a gantry crane system in [17]; the proposed fuzzy system was used to tune the PID gains. Two antiswing controllers for the linear model of a gantry crane system were proposed in [18]; the first controller was a delayed feedback controller, while the second controller was a PD-type fuzzy controller. A fuzzy controller based on the Takagi-Sugeno fuzzy model of the gantry crane was proposed in [19], while another fuzzy controller based on an IF-THEN fuzzy model of a gantry crane system was proposed in [20]. It is shown in [20] that using a fuzzy descriptor system instead of the traditional Takagi-Sugeno fuzzy system in modeling a gantry crane system resulted in a fewer number of fuzzy rules used to describe the system. On the other hand, the fuzzy controller proposed in [21] was based on the projection of the swing angle vectors of the gantry crane system on the two-dimensional plane and the remaining distance to the destination; the proposed method modifies the accelerating direction instead of decelerating the trolley during the motion. An antiswing fuzzy controller for a gantry crane system was proposed in [22]; this fuzzy controller consists of three components: a travel controller, a hoist controller, and an antiswing controller. The ranges of the input and output variables of the three fuzzy controllers were set using the inverse dynamics based on the system’s characteristics and the desired motion of the gantry crane.A control scheme consisting of a trajectory following controller and a fuzzy controller was proposed in [23]; the trajectory following controller was used to control the position of the trolley while the fuzzy controller was used to suppress the swing vibration of the payload. Two fuzzy controllers were designed in [24]; the first controller was a displacement fuzzy controller while the second one was an antiswing fuzzy controller. An antiswing fuzzy controller based on the time-delayed feedback of the load swing angle was proposed in [25]; the fuzzy rules of the second controller were generated by mapping the performance of a time-delayed feedback controller. A fuzzy controller that mimics the operator behavior was proposed in [26]; the authors assumed that the crane dynamics consists of two decoupled subsystems so that the number of fuzzy rules is reduced. Another human knowledge-based antiswing fuzzy controller was proposed in [27]. In addition, a control scheme applied to the gantry crane system and based on the so-called single input-rule modules was proposed in [28]; the proposed controller was designed using a dynamic fuzzy inference model. In addition, a fuzzy controller designed to control the motion in the three directions of the crane was proposed in [29]; a distance-speed reference curve for the control of the crane system was designed. A fuzzy controller applied to a gantry crane was proposed in [30]; the fuzzy controller was used with a swing-damped bang-bang motion profile based on the natural frequency of the payload of the crane.This paper proposes two fuzzy controllers to control the position of the cart of a gantry crane while minimizing the swing angle of the payload. The first controller is a dual PD fuzzy controller which uses two fuzzy PD subsystems to achieve the position regulation and the swing suppression. The second controller is a fuzzy controller which uses only one fuzzy system to achieve the control objective. The simulation results as well as the experimental results indicate that the proposed two fuzzy controllers work well under different operating conditions.The rest of the paper is organized as follows. The mathematical model of the gantry crane system is presented in Section2. A dual PD fuzzy controller is proposed in Section 3; simulation results are presented to show the effectiveness of the proposed controller. A fuzzy controller which is based on heuristics is presented in Section 4; simulation results are also presented. Section 5 studies the robustness of the two proposed control schemes through extensive MATLAB/Simulink simulations. Experimental results of the proposed control schemes are presented and discussed in Section 6. Finally, some concluding remarks and possible future work are given in Section 7.Sometimes, the arguments of a function will be omitted in the analysis when no confusion may arise.


## 2. The Dynamic Model of the Gantry Crane System

A gantry crane system is shown in Figure1. The system can be modeled as a cart with a mass M
c moving on a one-dimensional track with a pendulum attached to it; a payload of mass M
p is attached to the pendulum. The movement of the cart causes the pendulum to swing.Figure 1
Schematic diagram of the gantry crane system.As illustrated in Figure1, the positive rotation is defined to be counter-clockwise (CCW), when facing the cart. Also, the zero angle corresponds to a suspended pendulum which is vertical and pointing downwards. The positive direction of the displacement is to the right when facing the cart. In the figure, x
c
(
t
) is the position of the cart, x
p
(
t
) is the x-coordinate position of the payload, y
p
(
t
) is the y-coordinate position of the payload, M
c and M
p are the masses of the cart and the payload, respectively, and l
p is the length of the pendulum. The angle between the pendulum and its resting position is denoted by α
(
t
) while the angular velocity of the payload is α
˙
(
t
). Note that the force acting on the cart, F
c
(
t
), is given by F
c
(
t
)
=
-
c
1
x
˙
c
(
t
)
+
c
2
u
(
t
), where x
˙
c
(
t
) is the velocity of the cart, c
1 and c
2 are constants which are functions of the parameters of the crane, and u
(
t
) is the voltage applied to the servomotor driving the cart.The nonlinear equations of motion of the gantry crane system are given in [31] as follows:(1)
M
c
+
M
p
x
¨
c
t
+
M
p
l
p
cos
⁡
α
α
¨
t
-
M
p
l
p
sin
⁡
α
α
˙
2
t
+
B
e
q
+
c
1
x
˙
c
t
=
c
2
u
t
,
M
p
l
p
cos
⁡
α
x
¨
c
t
+
I
p
+
M
p
l
p
2
α
¨
t
+
M
p
g
l
p
sin
⁡
α
t
+
B
p
α
˙
t
=
0
,where the constants c
1 and c
2 are such that(2)
c
1
=
η
g
K
g
2
K
m
η
m
K
t
R
m
r
mp
2
,
c
2
=
η
g
K
g
η
m
K
t
R
m
r
mp
.Note that the definitions of the parameters of the gantry crane and their numerical values are given in Table1.Table 1
Notation and numerical values of the gantry crane parameters.
Symbol
Description
Value
Unit
R
m
The armature resistance of the motor
2.6
Ω
K
t
The torque constant of the motor
0.00767
N⋅m/A
η
m
The efficiency of the motor
100%
K
m
Back EMF constant of the motor
0.00767
V⋅sec/rad
K
g
Planetary gearbox ratio
3.7
η
g
Planetary gearbox efficiency
100%
M
c
Mass of the cart
1.0731
Kg
B
e
q
The viscous damping at motor pinion
5.4
N⋅m⋅sec/m
r
m
p
The radius of the motor pinion
6.35
×
1
0
-
3
m
M
p
Mass of the payload
0.23
Kg
l
p
The length of the pendulum
0.3302
m
I
p
The moment of inertia of the pendulum
7.88
×
1
0
-
3
Kg⋅m2
B
p
The viscous damping at pendulum axis
0.0024
N⋅m⋅sec/rad
g
Gravitational constant
9.81
m/sec2The objective of this paper is to design a fuzzy control scheme for the gantry crane such that the cart moves to a desired position as fast as possible while the swing of the payload is minimized.


## 3. Design of Dual PD Fuzzy Controller

Motivated by the work done in [32], where a serial PD controller with a constant PD gains was designed, we propose a dual PD fuzzy controller with variable PD gains. In this control scheme, the gains are adjusted such that the objective of the control scheme is achieved. Recall that the control objective is to move the crane to a desired position while suppressing the swings of the payload of the crane.


### 3.1. Controller Design

The proposed dual PD fuzzy controller consists of two fuzzy systems. The first fuzzy system is designed to tune the gains of the first PD controller which is used for regulating the position of the cart. The second fuzzy system is used to tune the gains of the second PD controller which is used for suppressing the swing of the payload during the movement of the crane. Recall that a PD controller can be written as(3)
u
t
=
K
p
e
t
+
K
d
d
d
t
e
t
,where u
(
t
) is the control signal and e
(
t
) represents the error signal. The gain K
p is the proportional gain constant and the gain K
d is the derivative gain constant. For the proposed dual PD fuzzy controller, the proportional and derivative gains are tuned using fuzzy systems.The proposed dual PD fuzzy controller for the crane system is depicted in Figure2. For the first PD controller, define the error in the cart position to be e
1
(
t
)
=
x
c
(
t
)
-
x
ref, where x
ref is a constant representing the prespecified desired position of the cart. Then, the first PD controller is given by(4)
α
d
t
=
P
x
t
e
1
t
+
D
x
t
e
˙
1
t
,where P
x
(
t
) and D
x
(
t
) are the proportional gain and the derivative gain, respectively. These gains are adjusted using the first fuzzy system. The output α
d
(
t
) is an intermediate variable representing the desired path of the swing angle of the payload during the motion of the cart towards the desired position. This variable will be used in computing the error signal of the second PD-type fuzzy controller. In the second PD controller, we define the error in the swing angle of the payload to be e
2
(
t
)
=
α
(
t
)
-
α
d
(
t
), where α
d
(
t
) is the output of the first PD controller. Then, the second PD controller is given by(5)
u
t
=
K
p
t
e
2
t
+
K
d
t
e
˙
2
t
,where K
p
(
t
) is the proportional gain and K
d
(
t
) is the derivative gain. These gains are adjusted using the second fuzzy system. The output u
(
t
) is the voltage applied to the servomotor driving the cart.Figure 2
The dual PD fuzzy controller for the gantry crane system.In the proposed control scheme, each of the two fuzzy systems is designed using the methodology proposed in [33]. In this methodology, an online gain scheduling scheme of the PD gains is used. To do this, two different fuzzy rule bases were designed. The first fuzzy rule base is used to tune the proportional gain, while the second fuzzy rule base is used to tune the derivative gain.In the first fuzzy system, the error in the cart position, which is limited to the range ofe
1
m
i
n
,
e
1
m
a
x, and its derivative, which is limited to the range of e
˙
1
m
i
n
,
e
˙
1
m
a
x, are the input linguistic variables. The output linguistic variables for this fuzzy system are the gains P
~
x
(
t
) and D
~
x
(
t
); these gains are normalized so that they are limited to the range of [
0,1
]. Then, the gains of the first PD fuzzy controller are given by(6)
P
x
t
=
P
x
m
i
n
+
P
x
m
a
x
-
P
x
m
i
n
P
~
x
t
,
D
x
t
=
D
x
m
i
n
+
D
x
m
a
x
-
D
x
m
i
n
D
~
x
t
,where P
x
m
i
n, D
x
m
i
n, P
x
m
a
x, and D
x
m
a
x are the minimum and maximum values which bound the range of operation in each gain.We use seven fuzzy sets (three for the negative portion, three for the positive portion, and the Zero fuzzy set) with their associated mathematical membership functions to cover the range of each input variable. The three fuzzy sets (or membership functions) used to describe the negative portion of each input linguistic variable range are denoted by Negative Big (NB), Negative Medium (NM), and Negative Small (NS). The Zero fuzzy set is denoted by (ZE). While the three fuzzy sets used to describe the positive portion of each range of the input linguistic variable are denoted by Positive Small (PS), Positive Medium (PM), and Positive Big (PB). In addition, two fuzzy sets are used to cover the range of each output variable. These two fuzzy sets are denoted by Small (S) and Big (B) [34].All membership functions used in this fuzzy system are assumed to be triangular membership functions. The membership functions used to describe these linguistic variables are shown in Figure3. In this figure, the values of e
1
m
i
n, e
1
m
a
x, e
˙
1
m
i
n, and e
˙
1
m
a
x are taken to be e
1
m
i
n
=
-
40 (cm), e
1
m
a
x
=
40 (cm), e
˙
1
m
i
n
=
-
10 (cm/sec), and e
˙
1
m
a
x
=
10 (cm/sec).Figure 3
Membership functions of the input and output variables of the first fuzzy system used to tune the gainsP
x and D
x.
(a)
(b)
(c)In the second fuzzy system, the error in the swing angle of the payload is limited to the range ofe
2
m
i
n
,
e
2
m
a
x, and its derivative is limited to the range of e
˙
2
m
i
n
,
e
˙
2
m
a
x. The error and its derivative are the input linguistic variables. The output linguistic variables for this fuzzy system are the gains K
~
p
(
t
) and K
~
p
(
t
); these gains are normalized so that they are limited to the range of [
0,1
]. Then, the gains of the second PD fuzzy controller are given by(7)
K
p
t
=
K
p
m
i
n
+
K
p
m
a
x
-
K
p
m
i
n
K
~
p
t
,
(8)
K
d
t
=
K
d
m
i
n
+
K
d
m
a
x
-
K
d
m
i
n
K
~
d
t
,where K
p
m
i
n, K
d
m
i
n, K
p
m
a
x, and K
d
m
a
x are the minimum and maximum values which bound the range of operation in each gain.The membership functions used to describe these linguistic variables are shown in Figure4. In this figure, the values of e
2
m
i
n, e
2
m
a
x, e
˙
2
m
i
n, and e
˙
2
m
a
x are taken to be e
2
m
i
n
=
-
0.4 (rad), e
2
m
a
x
=
0.4 (rad), e
˙
2
m
i
n
=
-
1 (rad/sec), and e
˙
2
m
a
x
=
1 (rad/sec).Figure 4
Membership functions of the input and output variables of the second fuzzy system used to tune the PD gainsK
p and K
d.
(a)
(b)
(c)From the above input and output linguistic variables and the associated membership functions used to describe these variables, a total of 49 fuzzy rules were used in each fuzzy rule base. These fuzzy tuning rules are given in Tables2 and 3.Table 2
Fuzzy tuning rules for the proportional gainsP
x and K
p.
e
˙
(
t
)
NB
NM
NS
ZO
PS
PM
PB
e
(
t
)
NB
B
B
B
B
B
B
B
NM
S
B
B
B
B
B
S
NS
S
S
B
B
B
S
S
ZO
S
S
S
B
S
S
S
PS
S
S
B
B
B
S
S
PM
S
B
B
B
B
B
S
PB
B
B
B
B
B
B
B
Note thate
t
=
x
c
t
-
x
r
e
f when tuning P
x, and e
t
=
α
t
-
α
d
(
t
) when tuning K
p.Table 3
Fuzzy tuning rules for the derivative gainsD
x and K
d.
e
˙
(
t
)
NB
NM
NS
ZO
PS
PM
PB
e
(
t
)
NB
S
S
S
S
S
S
S
NM
B
B
S
S
S
B
B
NS
B
B
B
S
B
B
B
ZO
B
B
B
B
B
B
B
PS
B
B
B
S
B
B
B
PM
B
B
S
S
S
B
B
PB
S
S
S
S
S
S
S
Note thate
t
=
x
c
t
-
x
r
e
f when tuning D
x, and e
t
=
α
t
-
α
d
(
t
) when tuning K
d.We used the product inference engine, the singleton fuzzifier, and the center average defuzzifier, to combine the 49 rules in each fuzzy system [34].


### 3.2. Simulation Results

The controller designed in this section was simulated using the MATLAB/Simulink© software. The system parameters used in these simulations are for the Quanser Gantry Crane apparatus [31] and they are given in Table 1. It should be mentioned that the voltage applied on the servomotor of the cart of the gantry crane varies from −20 V to +20 V. Hence, to obtain realistic results, the simulations are carried out using the following servomotor voltage constraint:(9)
-
20
V
≤
u
t
≤
+
20
V
.The initial conditions used in all simulations in this paper are assumed to be zero. To show the effectiveness of the proposed control scheme, the desired cart position,x
ref, takes three different set point values. First the desired position is set to 20 (cm), then it changes from 20 (cm) to −20 (cm), and finally it changes from −20 (cm) to 0 (cm). The desired trajectory versus time is depicted in Figure 5.Figure 5
The profile of the desired cart position versus time.In the following, the simulation results are presented and discussed. The cart position versus time is shown in Figure6(a).Figure 6
The desired and actual cart positions, the swing angle, and the input voltage versus time of the controlled gantry crane when using the dual PD fuzzy controller.
(a)
(b)
(c)It can be seen from Figure6(a) that the cart position achieved the desired values in a reasonable time. The swing angle of the payload is shown in Figure 6(b). This figure confirms that the desired values of the cart positions are achieved with small swing angles. The input voltage applied on the servomotor is shown in Figure 6(c). This figure shows that the input voltage is bounded such that u
(
t
)
<
14 (volt). Moreover, the control parameters of the serial PD fuzzy controllers are shown in Figure 7. Note that the PD parameters limits are P
x
m
i
n
=
0, P
x
m
a
x
=
1 (rad/cm), D
x
m
i
n
=
0, D
x
m
a
x
=
1 (rad·sec/cm), K
p
m
i
n
=
0, K
p
m
a
x
=
200 (volt/cm), K
d
m
i
n
=
0, and K
d
m
a
x
=
1 (volt·sec/cm).Figure 7
The parameters of the dual PD fuzzy controller.
(a)
(b)
(c)
(d)To show the effectiveness of the proposed control scheme, the settling times as well as the maximum percentage overshoots of the cart position trajectories for each of the different reference positions are computed. In addition, the maximum swing angles associated with each reference position are computed. The results are summarized in Table4.Table 4
Summary of the simulation results when using the dual PD fuzzy controller.
Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
3.36
3.19
3.36
Maximum% overshoot forx
c
(
t
)
0%
0%
0%
Maximum swing angle in (deg)
3.35
7.22
3.35The results in Table4 indicate that the settling times for each of the three cases is less than 3.4 (sec) and the maximum swing angle is less than 7.5°. The responses of the three cases did not display any overshoot. Also, it should be mentioned that the control input signal is within an acceptable range.Therefore, it can be concluded from the simulation results that controlled gantry crane achieved the desired objective, that is, moving the cart of the crane to the desired position while maintaining a small swing angle.


## 3.1. Controller Design

The proposed dual PD fuzzy controller consists of two fuzzy systems. The first fuzzy system is designed to tune the gains of the first PD controller which is used for regulating the position of the cart. The second fuzzy system is used to tune the gains of the second PD controller which is used for suppressing the swing of the payload during the movement of the crane. Recall that a PD controller can be written as(3)
u
t
=
K
p
e
t
+
K
d
d
d
t
e
t
,where u
(
t
) is the control signal and e
(
t
) represents the error signal. The gain K
p is the proportional gain constant and the gain K
d is the derivative gain constant. For the proposed dual PD fuzzy controller, the proportional and derivative gains are tuned using fuzzy systems.The proposed dual PD fuzzy controller for the crane system is depicted in Figure2. For the first PD controller, define the error in the cart position to be e
1
(
t
)
=
x
c
(
t
)
-
x
ref, where x
ref is a constant representing the prespecified desired position of the cart. Then, the first PD controller is given by(4)
α
d
t
=
P
x
t
e
1
t
+
D
x
t
e
˙
1
t
,where P
x
(
t
) and D
x
(
t
) are the proportional gain and the derivative gain, respectively. These gains are adjusted using the first fuzzy system. The output α
d
(
t
) is an intermediate variable representing the desired path of the swing angle of the payload during the motion of the cart towards the desired position. This variable will be used in computing the error signal of the second PD-type fuzzy controller. In the second PD controller, we define the error in the swing angle of the payload to be e
2
(
t
)
=
α
(
t
)
-
α
d
(
t
), where α
d
(
t
) is the output of the first PD controller. Then, the second PD controller is given by(5)
u
t
=
K
p
t
e
2
t
+
K
d
t
e
˙
2
t
,where K
p
(
t
) is the proportional gain and K
d
(
t
) is the derivative gain. These gains are adjusted using the second fuzzy system. The output u
(
t
) is the voltage applied to the servomotor driving the cart.Figure 2
The dual PD fuzzy controller for the gantry crane system.In the proposed control scheme, each of the two fuzzy systems is designed using the methodology proposed in [33]. In this methodology, an online gain scheduling scheme of the PD gains is used. To do this, two different fuzzy rule bases were designed. The first fuzzy rule base is used to tune the proportional gain, while the second fuzzy rule base is used to tune the derivative gain.In the first fuzzy system, the error in the cart position, which is limited to the range ofe
1
m
i
n
,
e
1
m
a
x, and its derivative, which is limited to the range of e
˙
1
m
i
n
,
e
˙
1
m
a
x, are the input linguistic variables. The output linguistic variables for this fuzzy system are the gains P
~
x
(
t
) and D
~
x
(
t
); these gains are normalized so that they are limited to the range of [
0,1
]. Then, the gains of the first PD fuzzy controller are given by(6)
P
x
t
=
P
x
m
i
n
+
P
x
m
a
x
-
P
x
m
i
n
P
~
x
t
,
D
x
t
=
D
x
m
i
n
+
D
x
m
a
x
-
D
x
m
i
n
D
~
x
t
,where P
x
m
i
n, D
x
m
i
n, P
x
m
a
x, and D
x
m
a
x are the minimum and maximum values which bound the range of operation in each gain.We use seven fuzzy sets (three for the negative portion, three for the positive portion, and the Zero fuzzy set) with their associated mathematical membership functions to cover the range of each input variable. The three fuzzy sets (or membership functions) used to describe the negative portion of each input linguistic variable range are denoted by Negative Big (NB), Negative Medium (NM), and Negative Small (NS). The Zero fuzzy set is denoted by (ZE). While the three fuzzy sets used to describe the positive portion of each range of the input linguistic variable are denoted by Positive Small (PS), Positive Medium (PM), and Positive Big (PB). In addition, two fuzzy sets are used to cover the range of each output variable. These two fuzzy sets are denoted by Small (S) and Big (B) [34].All membership functions used in this fuzzy system are assumed to be triangular membership functions. The membership functions used to describe these linguistic variables are shown in Figure3. In this figure, the values of e
1
m
i
n, e
1
m
a
x, e
˙
1
m
i
n, and e
˙
1
m
a
x are taken to be e
1
m
i
n
=
-
40 (cm), e
1
m
a
x
=
40 (cm), e
˙
1
m
i
n
=
-
10 (cm/sec), and e
˙
1
m
a
x
=
10 (cm/sec).Figure 3
Membership functions of the input and output variables of the first fuzzy system used to tune the gainsP
x and D
x.
(a)
(b)
(c)In the second fuzzy system, the error in the swing angle of the payload is limited to the range ofe
2
m
i
n
,
e
2
m
a
x, and its derivative is limited to the range of e
˙
2
m
i
n
,
e
˙
2
m
a
x. The error and its derivative are the input linguistic variables. The output linguistic variables for this fuzzy system are the gains K
~
p
(
t
) and K
~
p
(
t
); these gains are normalized so that they are limited to the range of [
0,1
]. Then, the gains of the second PD fuzzy controller are given by(7)
K
p
t
=
K
p
m
i
n
+
K
p
m
a
x
-
K
p
m
i
n
K
~
p
t
,
(8)
K
d
t
=
K
d
m
i
n
+
K
d
m
a
x
-
K
d
m
i
n
K
~
d
t
,where K
p
m
i
n, K
d
m
i
n, K
p
m
a
x, and K
d
m
a
x are the minimum and maximum values which bound the range of operation in each gain.The membership functions used to describe these linguistic variables are shown in Figure4. In this figure, the values of e
2
m
i
n, e
2
m
a
x, e
˙
2
m
i
n, and e
˙
2
m
a
x are taken to be e
2
m
i
n
=
-
0.4 (rad), e
2
m
a
x
=
0.4 (rad), e
˙
2
m
i
n
=
-
1 (rad/sec), and e
˙
2
m
a
x
=
1 (rad/sec).Figure 4
Membership functions of the input and output variables of the second fuzzy system used to tune the PD gainsK
p and K
d.
(a)
(b)
(c)From the above input and output linguistic variables and the associated membership functions used to describe these variables, a total of 49 fuzzy rules were used in each fuzzy rule base. These fuzzy tuning rules are given in Tables2 and 3.Table 2
Fuzzy tuning rules for the proportional gainsP
x and K
p.
e
˙
(
t
)
NB
NM
NS
ZO
PS
PM
PB
e
(
t
)
NB
B
B
B
B
B
B
B
NM
S
B
B
B
B
B
S
NS
S
S
B
B
B
S
S
ZO
S
S
S
B
S
S
S
PS
S
S
B
B
B
S
S
PM
S
B
B
B
B
B
S
PB
B
B
B
B
B
B
B
Note thate
t
=
x
c
t
-
x
r
e
f when tuning P
x, and e
t
=
α
t
-
α
d
(
t
) when tuning K
p.Table 3
Fuzzy tuning rules for the derivative gainsD
x and K
d.
e
˙
(
t
)
NB
NM
NS
ZO
PS
PM
PB
e
(
t
)
NB
S
S
S
S
S
S
S
NM
B
B
S
S
S
B
B
NS
B
B
B
S
B
B
B
ZO
B
B
B
B
B
B
B
PS
B
B
B
S
B
B
B
PM
B
B
S
S
S
B
B
PB
S
S
S
S
S
S
S
Note thate
t
=
x
c
t
-
x
r
e
f when tuning D
x, and e
t
=
α
t
-
α
d
(
t
) when tuning K
d.We used the product inference engine, the singleton fuzzifier, and the center average defuzzifier, to combine the 49 rules in each fuzzy system [34].


## 3.2. Simulation Results

The controller designed in this section was simulated using the MATLAB/Simulink© software. The system parameters used in these simulations are for the Quanser Gantry Crane apparatus [31] and they are given in Table 1. It should be mentioned that the voltage applied on the servomotor of the cart of the gantry crane varies from −20 V to +20 V. Hence, to obtain realistic results, the simulations are carried out using the following servomotor voltage constraint:(9)
-
20
V
≤
u
t
≤
+
20
V
.The initial conditions used in all simulations in this paper are assumed to be zero. To show the effectiveness of the proposed control scheme, the desired cart position,x
ref, takes three different set point values. First the desired position is set to 20 (cm), then it changes from 20 (cm) to −20 (cm), and finally it changes from −20 (cm) to 0 (cm). The desired trajectory versus time is depicted in Figure 5.Figure 5
The profile of the desired cart position versus time.In the following, the simulation results are presented and discussed. The cart position versus time is shown in Figure6(a).Figure 6
The desired and actual cart positions, the swing angle, and the input voltage versus time of the controlled gantry crane when using the dual PD fuzzy controller.
(a)
(b)
(c)It can be seen from Figure6(a) that the cart position achieved the desired values in a reasonable time. The swing angle of the payload is shown in Figure 6(b). This figure confirms that the desired values of the cart positions are achieved with small swing angles. The input voltage applied on the servomotor is shown in Figure 6(c). This figure shows that the input voltage is bounded such that u
(
t
)
<
14 (volt). Moreover, the control parameters of the serial PD fuzzy controllers are shown in Figure 7. Note that the PD parameters limits are P
x
m
i
n
=
0, P
x
m
a
x
=
1 (rad/cm), D
x
m
i
n
=
0, D
x
m
a
x
=
1 (rad·sec/cm), K
p
m
i
n
=
0, K
p
m
a
x
=
200 (volt/cm), K
d
m
i
n
=
0, and K
d
m
a
x
=
1 (volt·sec/cm).Figure 7
The parameters of the dual PD fuzzy controller.
(a)
(b)
(c)
(d)To show the effectiveness of the proposed control scheme, the settling times as well as the maximum percentage overshoots of the cart position trajectories for each of the different reference positions are computed. In addition, the maximum swing angles associated with each reference position are computed. The results are summarized in Table4.Table 4
Summary of the simulation results when using the dual PD fuzzy controller.
Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
3.36
3.19
3.36
Maximum% overshoot forx
c
(
t
)
0%
0%
0%
Maximum swing angle in (deg)
3.35
7.22
3.35The results in Table4 indicate that the settling times for each of the three cases is less than 3.4 (sec) and the maximum swing angle is less than 7.5°. The responses of the three cases did not display any overshoot. Also, it should be mentioned that the control input signal is within an acceptable range.Therefore, it can be concluded from the simulation results that controlled gantry crane achieved the desired objective, that is, moving the cart of the crane to the desired position while maintaining a small swing angle.


## 4. Design of a Heuristic Fuzzy Controller

In the previous section, we proposed a fuzzy controller which consists of two fuzzy systems to achieve the desired control objective. In this section, we will design a fuzzy controller which consists of one fuzzy system to achieve the desired control objective. This controller is called heuristic fuzzy controller; it is based on developing heuristic fuzzy rules (in terms of fuzzy IF-THEN rules) obtained from an expert in controlling gantry cranes.


### 4.1. Controller Design

The heuristic approach is a conventional method to design a fuzzy controller for a given system. This approach needs a good understanding of the physics of the system and the knowledge of an experienced operator in order to construct the fuzzy rules that describe an expert operator action. The heuristic approach consists of the following four steps.(1)
Analyze the real system and choose the states and control variables.
(2)
Derive fuzzy IF-THEN rules that relate the state variables to the control variables.
(3)
Combine these derived fuzzy IF-THEN rules with a fuzzy system.
(4)
Test the performance of the closed-loop system when using the developed fuzzy system as the controller.In order to develop a fuzzy controller based on heuristic rules for the gantry crane system, the following linguistic variables and their associated fuzzy sets are used to describe the fuzzy controller.The first linguistic input variable for this fuzzy controller is the error in the cart position: namely,e
(
t
)
=
x
c
(
t
)
-
x
ref. To describe this variable, three fuzzy sets used to describe this variable are used to cover the range of this variable in the interval e
m
i
n
,
e
m
a
x. The fuzzy sets used are Negative (NE), Zero (ZE), and Positive (PO). The membership functions used to describe this linguistic variable with e
m
i
n
=
-
50 (cm) and e
m
a
x
=
50 (cm) are shown in Figure 8(a). The second linguistic input variable is the velocity of the cart, namely, x
˙
c
(
t
). This variable is limited within a range of x
˙
m
i
n
,
x
˙
m
a
x. Again, three fuzzy sets are used to describe this variable: Negative (NE), Zero, (ZE) and Positive (PO). The membership functions are shown in Figure 8(b) with x
˙
m
i
n
=
-
100 (cm/sec) and x
m
a
x
=
100 (cm/sec). The third linguistic input variable is the swing angle of the pendulum, α
(
t
). This variable is limited within a range of α
m
i
n
,
α
m
a
x. Again we used three fuzzy sets, namely, Negative (NE), Zero (ZE), and Positive (PO), to cover its range. The membership functions used to describe this linguistic variable are shown in Figure 8(c) with α
m
i
n
=
-
45
° and α
m
a
x
=
45
°. The fourth linguistic input variable is the angular velocity of the payload, α
˙
(
t
). This variable is within a range of α
˙
m
i
n
,
α
˙
m
a
x; the fuzzy sets used to describe this variable are Negative (NE), Zero (ZE), and Positive (PO). The membership functions used to describe this linguistic variable with α
˙
m
i
n
=
-
55 (deg/sec) and α
˙
m
a
x
=
55 (deg/sec) are shown in Figure 8(d).Figure 8
Membership functions of the input and output variables used in the heuristic fuzzy controller.
(a)
(b)
(c)
(d)
(e)The linguistic output variable for this fuzzy controller is the voltage applied to the servomotor,u
(
t
); it has a range of u
m
i
n
,
u
m
a
x. We use nine fuzzy sets to cover this range. The fuzzy sets used to cover the negative portion of this range are denoted by Negative High (NH), Negative Big (NB), Negative Medium (NM), and Negative Small (NS). The Zero fuzzy set is (ZE), while the four fuzzy sets used to cover the positive portion of the range are Positive Small (PS), Positive Medium (PM), Positive Big (PB), and Positive High (PH). The membership functions used to describe the linguistic output variable are shown in Figure 8(e) with u
m
i
n
=
-
20 (volt) and u
m
a
x
=
20 (volt). All membership functions used in this control scheme are assumed to be Gaussian functions [34].From the above input and output linguistic variables and the associated fuzzy sets used to describe these variables, a total of 81 fuzzy rules were derived based on heuristics and a deep understanding of the dynamics and the control of the gantry crane system. The objective of these fuzzy heuristic rules is to control the position of the cart while suppressing the swing angle of the payload. The generated 81 fuzzy rules are listed in the Appendix. To combine these rules, we have used a product inference engine, a singleton fuzzifier, and a center average defuzzifier.


### 4.2. Simulation Results

The simulation results when using the proposed heuristic fuzzy controller are presented and discussed in this section. The simulations are performed using the zero initial conditions and the desired cart position profile depicted in Figure5. The actual and desired cart positions when using the heuristic fuzzy controller are shown in Figure 9(a), while the swing angle of the payload is shown in Figure 9(b). The input voltage applied to the servomotor of the cart is shown in Figure 9(c).Figure 9
The actual and desired cart positions, the swing angle, and the input voltage versus time of the controlled gantry crane system when using the heuristic fuzzy controller.
(a)
(b)
(c)It can be seen from Figure9 that the cart position reached its desired values in a reasonable time with small swing angles. The settling times as well as the maximum percentage overshoots of the cart position trajectories for each of the different reference positions are computed. In addition, the maximum swing angles associated with each reference position are computed. These results are summarized in Table 5.Table 5
Summary of the simulation results when using the heuristic fuzzy controller.
Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
2.34
2.11
2.33
Maximum% overshoot forx
c
(
t
)
0%
0%
0%
Maximum swing angle in (deg)
3.56
6.23
3.56The summary of the results in Table5 indicates that the settling times for each of the three cases are less than 2.5 (sec) and the maximum swing angle is less than 6.5°. The responses of the three cases did not display any overshoot. Moreover, it is noted that the control input signal is within an acceptable range. Therefore, it can be concluded that the proposed heuristic fuzzy controller when applied to the gantry crane system works well.


## 4.1. Controller Design

The heuristic approach is a conventional method to design a fuzzy controller for a given system. This approach needs a good understanding of the physics of the system and the knowledge of an experienced operator in order to construct the fuzzy rules that describe an expert operator action. The heuristic approach consists of the following four steps.(1)
Analyze the real system and choose the states and control variables.
(2)
Derive fuzzy IF-THEN rules that relate the state variables to the control variables.
(3)
Combine these derived fuzzy IF-THEN rules with a fuzzy system.
(4)
Test the performance of the closed-loop system when using the developed fuzzy system as the controller.In order to develop a fuzzy controller based on heuristic rules for the gantry crane system, the following linguistic variables and their associated fuzzy sets are used to describe the fuzzy controller.The first linguistic input variable for this fuzzy controller is the error in the cart position: namely,e
(
t
)
=
x
c
(
t
)
-
x
ref. To describe this variable, three fuzzy sets used to describe this variable are used to cover the range of this variable in the interval e
m
i
n
,
e
m
a
x. The fuzzy sets used are Negative (NE), Zero (ZE), and Positive (PO). The membership functions used to describe this linguistic variable with e
m
i
n
=
-
50 (cm) and e
m
a
x
=
50 (cm) are shown in Figure 8(a). The second linguistic input variable is the velocity of the cart, namely, x
˙
c
(
t
). This variable is limited within a range of x
˙
m
i
n
,
x
˙
m
a
x. Again, three fuzzy sets are used to describe this variable: Negative (NE), Zero, (ZE) and Positive (PO). The membership functions are shown in Figure 8(b) with x
˙
m
i
n
=
-
100 (cm/sec) and x
m
a
x
=
100 (cm/sec). The third linguistic input variable is the swing angle of the pendulum, α
(
t
). This variable is limited within a range of α
m
i
n
,
α
m
a
x. Again we used three fuzzy sets, namely, Negative (NE), Zero (ZE), and Positive (PO), to cover its range. The membership functions used to describe this linguistic variable are shown in Figure 8(c) with α
m
i
n
=
-
45
° and α
m
a
x
=
45
°. The fourth linguistic input variable is the angular velocity of the payload, α
˙
(
t
). This variable is within a range of α
˙
m
i
n
,
α
˙
m
a
x; the fuzzy sets used to describe this variable are Negative (NE), Zero (ZE), and Positive (PO). The membership functions used to describe this linguistic variable with α
˙
m
i
n
=
-
55 (deg/sec) and α
˙
m
a
x
=
55 (deg/sec) are shown in Figure 8(d).Figure 8
Membership functions of the input and output variables used in the heuristic fuzzy controller.
(a)
(b)
(c)
(d)
(e)The linguistic output variable for this fuzzy controller is the voltage applied to the servomotor,u
(
t
); it has a range of u
m
i
n
,
u
m
a
x. We use nine fuzzy sets to cover this range. The fuzzy sets used to cover the negative portion of this range are denoted by Negative High (NH), Negative Big (NB), Negative Medium (NM), and Negative Small (NS). The Zero fuzzy set is (ZE), while the four fuzzy sets used to cover the positive portion of the range are Positive Small (PS), Positive Medium (PM), Positive Big (PB), and Positive High (PH). The membership functions used to describe the linguistic output variable are shown in Figure 8(e) with u
m
i
n
=
-
20 (volt) and u
m
a
x
=
20 (volt). All membership functions used in this control scheme are assumed to be Gaussian functions [34].From the above input and output linguistic variables and the associated fuzzy sets used to describe these variables, a total of 81 fuzzy rules were derived based on heuristics and a deep understanding of the dynamics and the control of the gantry crane system. The objective of these fuzzy heuristic rules is to control the position of the cart while suppressing the swing angle of the payload. The generated 81 fuzzy rules are listed in the Appendix. To combine these rules, we have used a product inference engine, a singleton fuzzifier, and a center average defuzzifier.


## 4.2. Simulation Results

The simulation results when using the proposed heuristic fuzzy controller are presented and discussed in this section. The simulations are performed using the zero initial conditions and the desired cart position profile depicted in Figure5. The actual and desired cart positions when using the heuristic fuzzy controller are shown in Figure 9(a), while the swing angle of the payload is shown in Figure 9(b). The input voltage applied to the servomotor of the cart is shown in Figure 9(c).Figure 9
The actual and desired cart positions, the swing angle, and the input voltage versus time of the controlled gantry crane system when using the heuristic fuzzy controller.
(a)
(b)
(c)It can be seen from Figure9 that the cart position reached its desired values in a reasonable time with small swing angles. The settling times as well as the maximum percentage overshoots of the cart position trajectories for each of the different reference positions are computed. In addition, the maximum swing angles associated with each reference position are computed. These results are summarized in Table 5.Table 5
Summary of the simulation results when using the heuristic fuzzy controller.
Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
2.34
2.11
2.33
Maximum% overshoot forx
c
(
t
)
0%
0%
0%
Maximum swing angle in (deg)
3.56
6.23
3.56The summary of the results in Table5 indicates that the settling times for each of the three cases are less than 2.5 (sec) and the maximum swing angle is less than 6.5°. The responses of the three cases did not display any overshoot. Moreover, it is noted that the control input signal is within an acceptable range. Therefore, it can be concluded that the proposed heuristic fuzzy controller when applied to the gantry crane system works well.


## 5. Robustness Studies

In this section we will present more simulation results of the performances of the controlled gantry crane system using the two proposed fuzzy control schemes. These results are given to investigate the robustness of the proposed controllers when an output step disturbance acts on the cart position. In addition, we will investigate the performance of the controlled system when some of the parameters of the gantry crane are not known exactly.


### 5.1. Output Step Disturbance Rejection

A step disturbance of magnitude 5 (cm) is applied att
=
1 (sec) to the gantry crane when the crane is at rest position (i.e., when the crane is at zero cart position and at zero swing angle). The controlled gantry crane performance when using the dual PD fuzzy controller is shown in Figure 10. The actual position versus time is shown in Figure 10(a); the swing angle versus time is depicted in Figure 10(b). The motor voltage versus time is shown in Figure 10(c).Figure 10
Controlled gantry crane performance using the dual PD fuzzy controller when an output step disturbance occurs.
(a)
(b)
(c)The simulation performance when using the heuristic fuzzy controller is shown in Figure11. The actual position versus time is shown in Figure 11(a); the swing angle versus time is depicted in Figure 11(b). The motor voltage versus time is shown in Figure 11(c).Figure 11
Controlled gantry crane performance using the heuristic fuzzy controller when an output step disturbance occurs.
(a)
(b)
(c)Hence, it can be concluded that both control schemes were able to reject a step output disturbance.


### 5.2. Uncertainty in the Parameters of the Gantry Crane

In general, the parameters of the gantry crane system are not known exactly. For example, the gantry crane carries payloads of different weights and volumes. To investigate the robustness of the proposed control schemes, the controlled gantry crane system is simulated under the following changes of the parameters:(i)
The value of the gantry crane cart mass,M
c, is replaced by 10 times of its nominal value.
(ii)
The value of the payload mass,M
p, is replaced by 10 times of its nominal value.
(iii)
The viscous damping coefficient at the motor pinion,B
e
q, is decreased by 10% of its nominal value.It is worth mentioning that the parameters of the controller were maintained the same as in the nominal case. The simulation results when using the dual PD fuzzy controller are shown in Figure12, while the simulation results when using the heuristic fuzzy controller are depicted in Figure 13. In these simulations, a desired cart position of magnitude 20 (cm) is used.Figure 12
Controlled gantry crane performance using the dual PD fuzzy controller with uncertainty inM
c, M
p, and B
e
q.
(a)
(b)
(c)Figure 13
Controlled gantry crane performance using the heuristic fuzzy controller with uncertainty inM
c, M
p, and B
e
q.
(a)
(b)
(c)The cart positions versus time when using the dual PD fuzzy controller in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line) are shown in Figure12(a). The swing angles versus time in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line) are shown in Figure 12(b). The input voltages versus time in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line) are shown in Figure 12(c).Figure13(a) shows the cart positions versus time when using the heuristic fuzzy controller in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line). Figure 13(b) shows the swing angles versus time; Figure 13(c) depicts the input voltages.It can be seen from Figures12 and 13 that both control schemes work well and that the performances of the closed-loop system are acceptable even when uncertainties are present in the system. Also it is clear that the proposed dual PD fuzzy controller gave better results. The performances of the system when controlled using the PD-type fuzzy controller in the presence of uncertainties are similar to its performance in the absence of uncertainties.


## 5.1. Output Step Disturbance Rejection

A step disturbance of magnitude 5 (cm) is applied att
=
1 (sec) to the gantry crane when the crane is at rest position (i.e., when the crane is at zero cart position and at zero swing angle). The controlled gantry crane performance when using the dual PD fuzzy controller is shown in Figure 10. The actual position versus time is shown in Figure 10(a); the swing angle versus time is depicted in Figure 10(b). The motor voltage versus time is shown in Figure 10(c).Figure 10
Controlled gantry crane performance using the dual PD fuzzy controller when an output step disturbance occurs.
(a)
(b)
(c)The simulation performance when using the heuristic fuzzy controller is shown in Figure11. The actual position versus time is shown in Figure 11(a); the swing angle versus time is depicted in Figure 11(b). The motor voltage versus time is shown in Figure 11(c).Figure 11
Controlled gantry crane performance using the heuristic fuzzy controller when an output step disturbance occurs.
(a)
(b)
(c)Hence, it can be concluded that both control schemes were able to reject a step output disturbance.


## 5.2. Uncertainty in the Parameters of the Gantry Crane

In general, the parameters of the gantry crane system are not known exactly. For example, the gantry crane carries payloads of different weights and volumes. To investigate the robustness of the proposed control schemes, the controlled gantry crane system is simulated under the following changes of the parameters:(i)
The value of the gantry crane cart mass,M
c, is replaced by 10 times of its nominal value.
(ii)
The value of the payload mass,M
p, is replaced by 10 times of its nominal value.
(iii)
The viscous damping coefficient at the motor pinion,B
e
q, is decreased by 10% of its nominal value.It is worth mentioning that the parameters of the controller were maintained the same as in the nominal case. The simulation results when using the dual PD fuzzy controller are shown in Figure12, while the simulation results when using the heuristic fuzzy controller are depicted in Figure 13. In these simulations, a desired cart position of magnitude 20 (cm) is used.Figure 12
Controlled gantry crane performance using the dual PD fuzzy controller with uncertainty inM
c, M
p, and B
e
q.
(a)
(b)
(c)Figure 13
Controlled gantry crane performance using the heuristic fuzzy controller with uncertainty inM
c, M
p, and B
e
q.
(a)
(b)
(c)The cart positions versus time when using the dual PD fuzzy controller in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line) are shown in Figure12(a). The swing angles versus time in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line) are shown in Figure 12(b). The input voltages versus time in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line) are shown in Figure 12(c).Figure13(a) shows the cart positions versus time when using the heuristic fuzzy controller in the absence of uncertainties (continuous line) and in the presence of uncertainties (dashed line). Figure 13(b) shows the swing angles versus time; Figure 13(c) depicts the input voltages.It can be seen from Figures12 and 13 that both control schemes work well and that the performances of the closed-loop system are acceptable even when uncertainties are present in the system. Also it is clear that the proposed dual PD fuzzy controller gave better results. The performances of the system when controlled using the PD-type fuzzy controller in the presence of uncertainties are similar to its performance in the absence of uncertainties.


## 6. Experimental Results

The controllers designed in Sections3 and 4 were implemented on a gantry crane apparatus using the MATLAB/Simulink software. A dSPACE 1104 card is used for the implementation purposes. The experimental setup of the gantry crane apparatus is shown in Figure 14.Figure 14
The experimental setup of the controlled gantry crane apparatus.The experimental setup consists of a pendulum mounted on a cart which is free to move along the cart’s axis of motion. The cart is made of solid aluminum and it is driven by a rack and pinion mechanism using a DC motor. The cart slides along a stainless steel shaft using linear bearings. The cart position is measured using a potentiometer coupled to the rack via a pinion, while the swing angle of the pendulum is measured using another potentiometer coupled to the pendulum via an additional pinion. In addition, the velocity of the cart and the angular velocity of the payload are computed by differentiating the cart displacement and the swing angle of the payload, respectively. This was done using the differentiation Simulink block.In all experiments, we used the desired cart position profile depicted in Figure5.


### 6.1. Experimental Results of the Dual PD Fuzzy Controller

The experimental results are shown in Figures15 and 16. The trajectory of the cart position versus time is shown in Figure 15(a) while the swing angle trajectory versus time of the payload is shown in Figure 15(b). The applied voltage signal versus time to the servomotor of the gantry crane is shown in Figure 15(c). The trajectories of the parameters of the dual PD controller are shown in Figure 16.Figure 15
Experimental results of the controlled gantry crane system when using the dual PD fuzzy controller.
(a)
(b)
(c)Figure 16
Experimental trajectories of the parameter of the dual PD fuzzy controller.
(a)
(b)
(c)
(d)Therefore, the experimental results verify that the proposed dual PD fuzzy controller works well. The control objective of moving the gantry crane smoothly to its desired values while having minimal swing angles of the payload is achieved.


### 6.2. Experimental Results of the Heuristic Fuzzy Controller

Figure17 shows the experimental results of the cart position, the swing angle, and the voltage applied to the servomotor versus time. These figures illustrate that the proposed heuristic fuzzy controller performed very well and that the crane moved smoothly to the desired positions while maintaining the swing angles of the payload very small.Figure 17
Experimental results of the controlled gantry crane system when using the heuristic fuzzy controller.
(a)
(b)
(c)The computer simulation results in Sections‎
3.2 and ‎
4.2 are compared. These results are summarized in Tables 6 and 7.Table 6
Summary of the simulation and the experimental results when using the dual PD fuzzy controller.
⁢Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
Simulation
3.36
3.19
3.36
Experimental
4.50
7.30
6.30
Max.% overshoot forx
c
(
t
)
Simulation
0%
0%
0%
Experimental
0%
0%
5%
Max. swing angle in (deg)
Simulation
3.35
7.22
3.35
Experimental
1
2
1Table 7
Summary of the simulation and the experimental results when using the heuristic fuzzy controller.
⁢Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
Simulation
2.34
2.11
2.33
Experimental
3.10
5.20
2.80
Max.% overshoot forx
c
(
t
)
Simulation
0%
0%
0%
Experimental
0%
0%
0%
Max. swing angle in (deg)
Simulation
3.56
6.23
3.56
Experimental
1
1
2The results in Tables6 and 7 indicate that the experimental results are close to the simulation results. However, there are some differences between them. The discrepancies between the simulation and experimental results could be attributed to several factors such as modeling errors (friction is not included in the mathematical model) and the uncertainties in the parameters of the gantry crane system. Moreover, the sensors used to measure the positions and velocities are not very sophisticated and hence some errors in the measurements are expected.


### 6.3. Robustness to Output Disturbance

To verify experimentally that the proposed fuzzy controllers are able to reject a step disturbance, we performed the following test on the gantry crane apparatus. First, the crane is at rest, and then a step disturbance of magnitude 5 (cm) is applied. The results are shown in Figure18.Figure 18
Experimental results where a step output disturbance is applied to the controlled gantry crane. (a) Using dual PD fuzzy controller and (b) using heuristic fuzzy controller.
(a)
(b)The figure clearly shows that both proposed fuzzy controllers are robust against a step output disturbance. This confirms the simulation results shown in Section5.1. This result illustrates the importance of using fuzzy control schemes in industrial applications.Thus, the experimental results as well as the simulation results show that the proposed fuzzy control schemes achieved the control objective of the gantry crane control. This is an expected result since fuzzy controllers generally have successful results when applied to industrial applications [5].


## 6.1. Experimental Results of the Dual PD Fuzzy Controller

The experimental results are shown in Figures15 and 16. The trajectory of the cart position versus time is shown in Figure 15(a) while the swing angle trajectory versus time of the payload is shown in Figure 15(b). The applied voltage signal versus time to the servomotor of the gantry crane is shown in Figure 15(c). The trajectories of the parameters of the dual PD controller are shown in Figure 16.Figure 15
Experimental results of the controlled gantry crane system when using the dual PD fuzzy controller.
(a)
(b)
(c)Figure 16
Experimental trajectories of the parameter of the dual PD fuzzy controller.
(a)
(b)
(c)
(d)Therefore, the experimental results verify that the proposed dual PD fuzzy controller works well. The control objective of moving the gantry crane smoothly to its desired values while having minimal swing angles of the payload is achieved.


## 6.2. Experimental Results of the Heuristic Fuzzy Controller

Figure17 shows the experimental results of the cart position, the swing angle, and the voltage applied to the servomotor versus time. These figures illustrate that the proposed heuristic fuzzy controller performed very well and that the crane moved smoothly to the desired positions while maintaining the swing angles of the payload very small.Figure 17
Experimental results of the controlled gantry crane system when using the heuristic fuzzy controller.
(a)
(b)
(c)The computer simulation results in Sections‎
3.2 and ‎
4.2 are compared. These results are summarized in Tables 6 and 7.Table 6
Summary of the simulation and the experimental results when using the dual PD fuzzy controller.
⁢Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
Simulation
3.36
3.19
3.36
Experimental
4.50
7.30
6.30
Max.% overshoot forx
c
(
t
)
Simulation
0%
0%
0%
Experimental
0%
0%
5%
Max. swing angle in (deg)
Simulation
3.35
7.22
3.35
Experimental
1
2
1Table 7
Summary of the simulation and the experimental results when using the heuristic fuzzy controller.
⁢Desired position,x
r
e
f, in (cm)
x
r
e
f
=
+
20
x
r
e
f
=
-
20
x
r
e
f
=
0.0
Settling time forx
c
(
t
) in (sec)
Simulation
2.34
2.11
2.33
Experimental
3.10
5.20
2.80
Max.% overshoot forx
c
(
t
)
Simulation
0%
0%
0%
Experimental
0%
0%
0%
Max. swing angle in (deg)
Simulation
3.56
6.23
3.56
Experimental
1
1
2The results in Tables6 and 7 indicate that the experimental results are close to the simulation results. However, there are some differences between them. The discrepancies between the simulation and experimental results could be attributed to several factors such as modeling errors (friction is not included in the mathematical model) and the uncertainties in the parameters of the gantry crane system. Moreover, the sensors used to measure the positions and velocities are not very sophisticated and hence some errors in the measurements are expected.


## 6.3. Robustness to Output Disturbance

To verify experimentally that the proposed fuzzy controllers are able to reject a step disturbance, we performed the following test on the gantry crane apparatus. First, the crane is at rest, and then a step disturbance of magnitude 5 (cm) is applied. The results are shown in Figure18.Figure 18
Experimental results where a step output disturbance is applied to the controlled gantry crane. (a) Using dual PD fuzzy controller and (b) using heuristic fuzzy controller.
(a)
(b)The figure clearly shows that both proposed fuzzy controllers are robust against a step output disturbance. This confirms the simulation results shown in Section5.1. This result illustrates the importance of using fuzzy control schemes in industrial applications.Thus, the experimental results as well as the simulation results show that the proposed fuzzy control schemes achieved the control objective of the gantry crane control. This is an expected result since fuzzy controllers generally have successful results when applied to industrial applications [5].


## 7. Conclusion

In this paper, we proposed two fuzzy controllers to control the motion of a gantry crane system while suppressing the swings of the payloads. The first proposed controller consists of two PD-type fuzzy subsystems. The first fuzzy subsystem is used to control the motion of the cart of the gantry crane, while the second fuzzy subsystem is used to suppress the swing angle of the payload during the motion of the crane. The second proposed fuzzy controller was designed based on heuristic fuzzy rules collected by observing an expert crane operator moving the payload from one position to another while suppressing the swing angle of the payload. This controller uses a single fuzzy system to achieve the control objective. The controlled gantry crane system with the proposed fuzzy controllers was simulated using the MATLAB/Simulink software. Also some robustness studies of the proposed schemes were presented to show that the controllers have some robustness features. Moreover, the proposed controllers were implemented on a test-bed apparatus. The simulation results as well as the experimental results confirm that the proposed controllers work very well.Future research directions include the design of fuzzy sliding mode controllers and comparing them with conventional sliding mode controllers; the results will be verified using computational simulations as well as experimental implementations. Moreover, fuzzy observers will be designed to estimate some of the states of the crane especially the velocity of the cart and the angular velocity of the payload. Finally, the use of fuzzy input observers for gantry crane will be investigated.



---

*Source: 1965923-2016-04-26.xml*