Fuzzy Control Strategies Development For A 3-DoF Robotic
Fuzzy Control Strategies Development For A 3-DoF Robotic
Article
Fuzzy Control Strategies Development for a 3-DoF Robotic
Manipulator in Trajectory Tracking
John Kern * , Dailin Marrero and Claudio Urrea
Abstract: This research delves into the development and evaluation of two distinct controllers for
a 3-DoF robotic arm in the context of Industry 4.0. Two primary control strategies are presented in
the study. The first is a Fuzzy Logic Controller that utilizes joint position error and its derivative
as inputs, employing a set of 9 control knowledge rules. The second is an Adaptive Neuro-Fuzzy
Inference System (ANFIS) Controller, trained to learn the inverse dynamic model of the robot through
a structured dataset. The research emphasizes the importance of accurate parameter tuning and
data acquisition to achieve optimal control system performance. Extensive experimentation was
conducted to evaluate the controllers’ performance in trajectory tracking and their response against
external disturbances, such as load variations. The controllers exhibited remarkable precision and
proficiency in tracking reference trajectories, with minimal deviations, overshoots, or oscillations.
A quantitative analysis using performance indices such as root mean square error (RMSE) and the
integral of the absolute value of the time-weighted error (ITAE) further confirmed the controllers’
effectiveness. Notably, the ANFIS Controller consistently outperformed the Fuzzy Logic Controller,
demonstrating superior precision in trajectory tracking. The study underscored the importance of
selecting the right control method and obtaining high-quality training data. Challenges in parameter
tuning for Fuzzy Logic Controllers and potential time constraints in training ANFIS were discussed.
The findings have significant implications for advancing robotic control systems, particularly in the
era of Industry 4.0.
Citation: Kern, J.; Marrero, D.; Urrea, Keywords: robotic manipulator; fuzzy logic control; ANFIS; trajectory tracking; performance analysis
C. Fuzzy Control Strategies
Development for a 3-DoF Robotic
Manipulator in Trajectory Tracking.
Processes 2023, 11, 3267. https://
1. Introduction
doi.org/10.3390/pr11123267
In the era of Industry 4.0, robotic manipulation technologies have revolutionized
Academic Editor: Gorazd Karer industrial manufacturing processes, transforming robots into flexible, autonomous, and
Received: 26 October 2023
intelligent entities [1,2]. Robotic arms, known for their versatility in tasks such as welding,
Revised: 15 November 2023 pick-and-place, assembly, and precision operations, play a pivotal role [3,4].
Accepted: 19 November 2023 However, developing effective controllers for these dynamic, nonlinear, and multivari-
Published: 22 November 2023 able robotic arms poses significant challenges, especially as demands for higher accuracy,
performance, speed, reliability, autonomy, and adaptability increase [5,6].
Among the different types of controllers, the Fuzzy Logic Controller has gained
popularity due to its linguistic structure and its robustness in controlling nonlinear systems.
Copyright: © 2023 by the authors.
By implementing knowledge-based control rules, it enables addressing the difficulty or
Licensee MDPI, Basel, Switzerland.
impossibility of modeling some systems through mathematical equations [7].
This article is an open access article
This technique is categorized under the realm of expert systems, specifically oriented
distributed under the terms and
towards numerical processing. In these systems, fuzzy logic is employed to define inference
conditions of the Creative Commons
rules and membership functions, facilitating reasoning about data and decision-making.
Attribution (CC BY) license (https://
Expert knowledge is encapsulated in the form of IF-THEN rules, which proves to be better
creativecommons.org/licenses/by/
4.0/).
adapted to the analyzed problem [8].
In [9], the use of a fuzzy controller for the control of a 2-DoF manipulator is proposed.
The authors employ fuzzy sets to design a trajectory planning scheme using a trapezoidal
fuzzy PID (Proportional, Integral, Derivative), which allows them to effectively control the
symmetric motion of the manipulator. The design of two type-I and type-II fuzzy controllers
is presented in [10] for the position and force control of a robot in an object manipulation
task. This robot is composed of an angular gripper with two fingers attached to a robotic
arm mounted on a mobile robot. A comparison of the performance of both controllers and
a PID was established, with the type-I fuzzy controller obtaining the best results.
A novel iterative feedback method for PID controller tuning using fuzzy logic is
proposed in [11]. The proposed method uses the desired overshoot characteristics and the
settling time of the plant to calculate the error. Then, the error value is sent to the fuzzy
logic based tuning system to calculate the PID gains. In [12], a fuzzy PID controller is also
introduced. In this work, the controller is tuned using the Cuckoo Search (CS) algorithm to
control a highly nonlinear 3-degree-of-freedom robotic manipulator for trajectory tracking.
The work presented in [13] introduces a control method based on fuzzy logic and
fractional-order (FO) operators. It employs an extended PID error manifold and a Takagi-
Sugeno inference system based on the extended PID error and its FO integral. A fuzzy linear
quadratic regulator (FLQR) controller is presented in [14], where an optimal control approach,
as in the linear quadratic regulator (LQR), is combined with a fuzzy control approach.
In [15], the authors address the problem of actuator saturation in controller design.
For this purpose, they present a design method of fuzzy controllers subject to actuator
saturation for nonlinear systems with uncertain parameters. In [16], a fuzzy proportional-
derivative (PD) controller is proposed to overcome the uncertainties of a robotic manipula-
tor in real-time.
Recent advancements in fuzzy control have been directed towards simplifying struc-
tures and reducing computational loads associated with numerous logic rules. In the realm
of adaptive control for nonlinear systems, the focus has shifted towards adaptive mecha-
nisms with minimal learning parameters, alleviating computational challenges linked to
the increasing number of adaptive laws. An event-based adaptive tracking control scheme,
introduced in [17], aims to enhance computational efficiency while ensuring robust tracking
performance. Additionally, a low-computation adaptive fuzzy control strategy, coupled
with constraint-handling techniques, has been presented in [18] for precise trajectory track-
ing and signal boundedness in systems characterized by unknown nonlinear functions and
unmatched disturbances.
Moreover, adaptive fuzzy finite-time control has attracted attention. Research in this
domain has explored applications in pure feedback switched nonlinear systems, lever-
aging dynamic surface control and backstepping techniques to enhance robustness and
anti-disturbance performance [19]. This approach has also found application in [20], em-
phasizing robustness, chattering avoidance, fault tolerance, and saturation elimination.
One of the drawbacks of fuzzy controllers is the lack of a systematic methodology for
their design. These systems are not experts by themselves, as they need an adjustment of
their parameters [21]. In most cases, there is not enough knowledge about the behavior
of the system. For this reason, the trial-and-error method is usually used in the design to
obtain the best performance, which sometimes requires a lot of time.
To overcome this limitation, the use of neural network learning techniques has been
proposed as a way to automate this process, reducing time significantly and increasing
performance. The fusion of Artificial Neural Networks (ANN) and Fuzzy Inference Systems
(FIS) has resulted in the Adaptive Neuro-Fuzzy Inference System (ANFIS) techniques as a
powerful method in the resolution of control tasks.
Based on the input and output data of the systems, ANN learns the behavior of the
system, applies the corresponding rules, and assigns the correct values of membership
functions using error minimization algorithms [22].
In [23], ANFIS is employed to perform an input–output mapping of the inverse
dynamic model of a 5-DoF manipulator robot (Intelbot). The ANFIS system is trained using
Processes 2023, 11, 3267 3 of 30
. ..
the robot’s joint coordinates (θ, θ, θ ) and a payload index ( β) to allow the robot to work
with varying loads. A similar approach is implemented in [24], where an ANFIS network is
trained to model the inverse dynamics of the 6-DoF Stanford Robotic Arm. In [25], ANFIS
has been used for cooperative control of two 3-DoF manipulators that grasp a common
object under the constraint of no-slipping.
A controller designed using a computed torque controller (PD type) based on an
ANFIS system is presented in [26]. In the paper, the authors demonstrate that this approach
allows the achievement of high accuracy in trajectory tracking and satisfactory stabilization,
improving the performance obtained with the traditional computed torque method. The
ANFIS network is trained to automatically adjust the gain parameters k p and k v of the
controller to compensate for the inaccuracies of the dynamic model.
In [27], an adaptive fuzzy computed pair control system is proposed. In this case
the ANFIS is used to compensate the deviations caused by the presence of structured
uncertainty and unstructured uncertainty.
The use of ANFIS for controlling a 4-DoF hydraulic manipulator is proposed in [28]
to increase the accuracy of trajectory tracking. Similar to the other research cited here, the
function of ANFIS consists of the adaptive regulation of the parameters of a PID controller
using autonomous learning and its fuzzy reasoning capability.
The focus of this study is on the development of intelligent controllers for a 3-DoF
robotic arm, specifically fuzzy and ANFIS controllers, to address the intricate control
requirements of robotic arms in Industry 4.0 scenarios. The main objective is to contribute to
the development of automatic control systems by analyzing the behavior of both controllers
and evaluating their performance in trajectory tracking using performance indices.
The major contributions of this work are described below:
• A detailed and comparative evaluation is presented for two intelligent control strate-
gies: the Fuzzy Logic Controller and the Adaptive Neuro-Fuzzy Inference System
(ANFIS), specifically applied to a 3-DoF robotic arm. The study emphasizes the preci-
sion and overall performance of both controllers, as demonstrated by comprehensive
assessments, particularly in trajectory tracking;
• A thorough comparison with recently published controllers not only establishes that
the proposed controllers demonstrate robust performance but also demonstrates
their superiority in a competitive manner. This comprehensive analysis extends
beyond trajectory tracking, incorporating an examination of their responsiveness to
external disturbances, providing valuable insights into the controllers’ resilience and
practical applicability;
• The efficiency achieved by the ANFIS controller in precise trajectory tracking and
effective regulation, even in the presence of load variations in the robotic arm system,
is demonstrated. This robust and adaptable performance of ANFIS holds significant
implications across various industrial scenarios where adaptability to load fluctuations
is crucial for operational success;
• This study enriches the field of industrial robotics by providing a quantitative anal-
ysis supported by performance indices. This methodology simplifies the objective
comparison of the controllers, enabling a precise and measurable understanding of
their effectiveness in practical scenarios. This approach significantly contributes to
the development of evaluative standards, thereby consolidating the relevance and
applicability of the controllers in advanced industrial environments.
This paper is structured as follows: Section 2 details the kinematic and dynamic models
of the plant used to test the controllers. Section 3 address the theoretical foundations and
design parameters for the development of the fuzzy controller and ANFIS. Section 4
describes the simulation environment used to test the controllers and discusses the results.
The conclusions are presented in Section 5, as well as potential future work.
This paper is structured as follows: Section 2 details the kinematic and dynamic mod-
els of the plant used to test the controllers. Sections 3 address the theoretical foundations
and design parameters for the development of the fuzzy controller and ANFIS. Section 4
describes the simulation environment used to test the controllers and discusses the results.
The conclusions are presented in Section 5, as well as potential future work.
Processes 2023, 11, 3267 4 of 30
Table Table
1. D-H1.parameters of the of
D-H parameters 3-DoF manipulator.
the 3-DoF manipulator.
R0
P
T30 = T10 · T21 · T32 = 3 (2)
0 1
Processes
Processes2023, 11,11,
2023, 3267
x FOR PEER REVIEW 55 ofof3031
where
end effector with respect to the base, where 𝑠 = 𝑠𝑒𝑛(𝜃 ),𝑐 = 𝑐𝑜𝑠(𝜃 ), 𝑠 = 𝑠𝑒𝑛(𝜃 𝜃 ), and
𝑐 = 𝑐𝑜𝑠(𝜃 𝜃 ). c1 c23 −c1 s23 s1
R03 = s1 c23 −ss23 −c1 (3)
𝑇 = 𝑅𝑜𝑡(𝑍 , 𝜃 ) ∙s𝑇𝑟𝑎𝑠(𝑍
23 c 23, 𝑑 ) ∙ 𝑇𝑟𝑎𝑠(𝑋
0 , 𝑎 ) ∙ 𝑅𝑜𝑡(𝑋 , 𝛼 ) (1)
x a2 c1 c2 + a3𝑅c1 c23𝑃
P = y𝑇 = =𝑇 ∙a𝑇2 s1∙c𝑇2 +=a3 s01 c231 (2)
(4)
z a2 s2 + a3 s23 + d1
where
Inverse kinematics problem consists 𝑐of𝑐determining −𝑐 𝑠 𝑠the joint variables corresponding
to a given position and orientation𝑅of=the𝑠 end 𝑐 −𝑠𝑠
effector −𝑐 [31]. The procedure is based
(EF) (3)
on establishing sufficient relationships between 𝑠 𝑐the two0 coordinate systems, and these
equations depend on the geometry and physical dimensions of the robot [30].
𝑥 𝑎 𝑐 𝑐 𝑎 𝑐 𝑐
For robots with few degrees of freedom, geometric methods can be employed to
𝑃= 𝑦 = 𝑎 𝑠 𝑐 𝑎 𝑠 𝑐 (4)
solve the inverse kinematic problem. Trigonometric
𝑧 𝑎 𝑠 𝑎 𝑠and geometric
𝑑 relations on the robot
elements are utilized for this purpose [30].
Inverse
The kinematics
geometric problem consists
representation shown of indetermining
Figure 2 is used the joint variables
to obtain the corresponding
inverse kine-
matics, where two possible poses of the manipulator have been represented toisreach
to a given position and orientation of the end effector (EF) [31]. The procedure based
theon
establishing sufficient relationships between the two coordinate systems,
desired position p x , py , pz of the end effector. From Figure 2, the Expressions (5) and (6) and these equa-
tions
are depend on the geometry and physical dimensions of the robot [30].
derived.
For robots with few degrees ofθ1freedom,
= atan2 geometric methods can be employed to solve
py , p x (5)
the inverse kinematic problem. Trigonometric p and geometric
relations on the robot ele-
ments are utilized for this purpose [30]. ± 1 − D2 , D
θ3 = atan2 (6)
The geometric representation shown in Figure 2 is used to obtain the inverse kine-
where,
matics, where two possible poses of the manipulator have been represented to reach the
2 + p2 + ( p − d )2 − a2 + a2
desired position (𝑝 , 𝑝 , 𝑝 ) ofpthex end
y effector.
z 1From Figure2 3 the Expressions (5) and (6)
2,
D= (7)
are derived. 2a2 a3
(a) (b)
Figure2.2.Geometric
Figure Geometric representation
representation and
and postures
postures for for inverse
inverse kinematics
kinematics of robotic
of the the robotic
arm:arm: (a) geo-
(a) geomet-
metric representation; (b) geometric representation of the manipulator with two possible postures
ric representation; (b) geometric representation of the manipulator with two possible postures [32].
[32].
If a positive value of θ3 is taken, the lower posture shown in Figure 2 is selected, while
if a negative value of θ3 is taken, the upper
𝜃 =posture
𝑎𝑡𝑎𝑛2(𝑝 is, 𝑝selected.
) The value of θ2 is obtained
(5)
by the following expressions:
𝜃=α 𝑎𝑡𝑎𝑛2( 1 − 𝐷 , 𝐷) (6)
− β si θ3 > 0
where, θ2 = α+β si θ3 < 0 (8)
si θ3 = 0
α
𝑝 (𝑝 − 𝑑 ) − (𝑎
𝑝 𝑎 )
𝐷= (7)
2𝑎 𝑎
p 2 + p 2 + p 2 + a2 − a2
−1 x y z 2 3
If a positive value βof=𝜃cosis taken, theq lower posture
2 2 2
(9)
shown in Figure 2 is selected,
2a2 p x + py + pz
while if a negative value of 𝜃 is taken, the upper posture is selected. The value of 𝜃 is
obtained by the following expressions:
Processes 2023, 11, 3267 6 of 30
q
α = atan2( pz , r ) = atan2 pz , 2
p x + py 2 (10)
Equations (5), (6), and (8) constitute the inverse kinematic model of the 3-DoF manipulator.
m2 a2 2
Iy2 = Iz2 = (18)
12
m3 a3 2
Iy3 = Iz3 = (19)
12
C C12 C13
. 1 11
C (q, q) = C C22 C23 (20)
2 21
C31 C32 C33
n o .
2
C11 = − m2 lc2 sen(2θ2 ) + m3 a22 sen(2θ2 ) + lc3
2
sen(2θ2 + 2θ3 ) + a2 lc3 sen(2θ2 + θ3 ) θ2
. (21)
−{m3 lc3 (lc3 sen(2θ2 + 2θ3 ) + 2a2 sen(2θ2 + θ3 ) + 2a2 sen(θ3 ))}θ3
n o .
2
C12 = − m2 lc2 sen(2θ2 ) + m3 a22 sen(2θ2 ) + lc3
2
sen(2θ2 + 2θ3 ) + a2 lc3 sen(2θ2 + θ3 ) θ1 (22)
.
C13 = −{m3 lc3 (lc3 sen(2θ2 + 2θ3 ) + 2a2 sen(2θ2 + θ3 ) + 2a2 sen(θ3 ))}θ1 (23)
n o .
2
C21 = − m2 lc2 sen(2θ2 ) + m3 a22 sen(2θ2 ) + lc3
2
sen(2θ2 + 2θ3 ) + a2 lc3 sen(2θ2 + θ3 ) θ1 (24)
Processes 2023, 11, 3267 7 of 30
m3 a2 lc3 s23 .
C22 = − θ3 (25)
2
m3 a2 lc3 s23 . .
C23 = − θ2 + θ3 (26)
2
.
C31 = −{m3 lc3 (lc3 sen(2θ2 + 2θ3 ) + 2a2 sen(2θ2 + θ3 ) + 2a2 sen(θ3 ))}θ1 (27)
m3 a2 lc3 s23 .
C32 = θ2 (28)
2
C33 = 0 (29)
0
G (q) = (m2 lc2 c2 + m3 ( a2 c2 + lc3 c23 )) g (30)
m3 lc3 c23 g
. .
b1 θ1
F v q 1
. . .
F q = Fv q2 = b2 θ2
(31)
. .
Fv q3 b θ
3 3
The two most important and widely used methods in fuzzy inference are the Mamdani
method and the Sugeno method. The main difference between these methods lies in the
consequent part of the fuzzy logic rules. Mamdani-type fuzzy inference methods use fuzzy
sets as the consequents for the rules, while Sugeno-type systems use linear functions [38].
A fuzzy controller is designed, implementing a three-channel independent control sys-
tem. In this approach, each controller focuses on a specific joint, designed to minimize the
influence of other joints. Detailed system modeling of the robot’s kinematics and dynamics
is crucial for achieving a comprehensive understanding of the robot’s behavior and enables
the management of coupling quantities between joints for efficient and decoupled control
of each joint.
To establish independence between joints, fuzzy rules were designed for each joint,
considering its state and desired behavior. Fuzzy inference calculates control signals for
each joint based on its input channel, with the assurance that fuzzy rules do not directly
couple control inputs from different joints. The controller was experimentally tuned by
observing its behavior at each moment.
The fuzzy controller consists of 9 control knowledge rules. The joint error and its
derivative are taken as inputs, and the output is defined as the torque to be applied to the
plant input. The fuzzy controller was developed using the Mamdani inference method
with the Fuzzy Logic Toolbox in MatLab. Three membership functions are defined for the
inputs and five for the output, with trapezoidal-type functions at the corners and triangular
type functions in the center.
The linguistic variables for the input are P, positive value; Z, zero value; and N,
negative value. The linguistic variables for the output are: TPP, large positive torque; TP,
positive torque; TZ, zero torque; TN, negative torque; an TNN, large negative torque. The
rules of the fuzzy controller were implemented following the correspondences given in
Table 2.
de/dt
P Z N
e(t)
P TPP TP TZ
Z TP TZ TN
N TZ TN TNN
Figure
Figure3.3.Schematic
Schematicdiagram
diagramused
usedin
inthe
theimplementation
implementationof
ofthe
theFuzzy
FuzzyLogic
LogicController.
Controller.
Processes 2023, 11, 3267 9 of 30
Figure 3. Schematic diagram used in the implementation of the Fuzzy Logic Controller.
(a)
(b)
(c)
Figure 4. Membership
Figure 4. Membershipfunctions of the
functions offuzzy control:
the fuzzy (a) membership
control: functions
(a) membership for for
functions thethe
input varia-
input variable
ble Error; (b) membership functions for the input variable error derivative (dError); (c) membership
Error; (b) membership functions for the input variable error derivative (dError); (c) membership
functions for the
functions foroutput variable
the output Torque.
variable Torque.
TableTable
3 shows thethe
3 shows empirically
empirically obtained
obtainedvalues
valuescorresponding
correspondingtotoproportional 𝐾P and
proportional K
and derivative 𝐾D controller
derivative K controller gains
gains for
foreach
eachjoint.
joint.
Joint 𝑲𝑷 𝑲𝑫
1 3.2 3.1
2 7.8 7.5
3 5.8 5.5
Processes 2023, 11, 3267 10 of 30
Joint KP KD
1 3.2 3.1
2 7.8 7.5
3 5.8 5.5
Figure
Figure 5.
5. ANFIS
ANFIS structure
structure [39].
[39].
The hybrid learning procedure used mostly in training ANFIS networks is one of its
most attractive
attractive features.
features. InIn this
this procedure,
procedure, the adaptation
adaptation of network weights is divided
into two steps.
steps. Firstly,
Firstly, the least-squares
least-squares estimation (LSE) is used to identifyidentify the
the consequent
consequent
parameters ofofthe theoutput functions. Secondly, the backpropagation gradient descent descent
output functions. Secondly, the backpropagation gradient method
method
is used tois fine-tune
used to fine-tune
the premisethe premise
parametersparameters of the membership
of the membership functions.
functions.
For the design
design ofof the
the ANFIS
ANFIS controller
controller in
in this
this work,
work, aaclassic
classiccomputed-torque
computed-torque control control
scheme has been taken as a basis. This This scheme
scheme consists of applying torque to compensate
effects, gravitational effects,
for centrifugal and Coriolis effects, effects, and friction.
The implemented control law law is
is described
describedin inEquation
Equation(32), whereM̂,
(32),where 𝑀,Ĉ,
𝐶 , 𝐺Ĝ,, 𝐹F̂repre-
repre-
sent the estimates of the inertia matrix; the Coriolis matrix, the vector of gravitational
the estimates of the inertia matrix; the Coriolis matrix, the vector of gravitational forces,
and theand
forces, vector
the of frictional
vector forces, forces,
of frictional respectively; and u(tand
respectively; 𝑢(𝑡) is described
) is described by Equation (33).
by Equation
(33). . .
τ (t) = M̂ (q)u(t) + Ĉ q, q + Ĝ (q) + F̂ q (32)
𝜏(𝑡) = 𝑀(𝑞)𝑢(𝑡) + 𝐶 (𝑞, 𝑞) + 𝐺 (𝑞) + 𝐹 (𝑞) (32)
𝑢(𝑡) = 𝑞 + 𝑘 (𝑞 − 𝑞) + 𝑘 (𝑞 − 𝑞) (33)
The positive definite and diagonal matrices, corresponding to the derivative and pro-
portional gain, are represented by 𝑘 and 𝑘 , respectively. 𝑞 , 𝑞 , 𝑞 represent the posi-
Processes 2023, 11, 3267 11 of 30
.. . .
u(t) = qd + k D qd − q + k P (qd − q) (33)
The positive definite and diagonal matrices, corresponding to the derivative and
. ..
proportional gain, are represented by k D and k P , respectively. qd , qd , qd represent the
position, velocity, and acceleration of the desired joint trajectory.
Considering small errors in the model estimates, the error in the joints can be approxi-
mated by Equation (34), a second-order linear differential equation.
.. .
e + kD e + kP e ≈ 0 (34)
.. .. ..
e = qd − q (35)
. . .
e = qd − q (36)
ANFIS can be trained to implement Equation (32). However, it is more efficient to
perform the training so that it learns the dynamic equation of the robot, and once this is
..
completed, the controller is implemented by substituting the input corresponding to qd for
Equation (33). In this way the training time is reduced considerably.
In this work, the ANFIS network is trained to learn the inverse dynamic model of the
robot, using a total of 300,000 samples. To perform the training, it is of utmost importance
to generate a dataset that allows for capturing as faithfully as possible the dynamics of the
robot and mapping its motion space. The performance of the developed controller will
Processes 2023, 11, x FOR PEER REVIEW
depend on this. The more accurate the training datasets are, the more accurate ANFIS 12 of 31
will
be in estimating the required torques.
To select the type and number of membership functions, the combinations that offered
the lowest error asselecting
indices obtained, a result the
of training and obtained
option that the betterthe
performance indices
best tracking, werethe
without determined.
presence
In the selection, greater weight
of oscillations or overshoot. was given to the value of the performance indices obtained,
selecting the option that obtained the best tracking, without the presence of oscillations
In all cases, the training process involved utilizing 300 epochs, the Grid Partition op-
or overshoot.
tion, and a hybrid optimization method.
In all cases,
Finally, the training
the inference process
system was involved
designed utilizing 300 epochs,
with 6 Gaussian the Grid functions
membership Partition
option,
for jointand
1 anda hybrid optimization
5 Gaussian membershipmethod.
functions for joint 2 and 3. A constant membership
function is used for the output since itdesigned
Finally, the inference system was with 6performance
reports better Gaussian membership functions
in Takagi–Sugeno for
type
joint 1 and 5 Gaussian membership functions for joint 2 and 3. A constant membership
systems. The ANFIS controller was developed using the ‘anfisedit’ function of the Fuzzy
function is used for the output since it reports better performance in Takagi–Sugeno type
Logic Toolbox of MatLab R2022b.
systems. The ANFIS controller was developed using the ‘anfisedit’ function of the Fuzzy
Figure 6 shows the diagram used in the implementation of the ANFIS controller. Ta-
Logic Toolbox of MatLab R2022b.
ble 4 shows the 𝑘 and 𝑘 gain values established.
Figure 6 shows the diagram used in the implementation of the ANFIS controller.
Table 4 shows the k D and k P gain values established.
Joint 𝑲𝑷 𝑲𝑫
1 700 70
2 800 80
3 900 90
The uniqueness of this approach lies in its ability to avoid direct numerical compu-
Processes 2023, 11, 3267 12 of 30
Joint KP KD
1 700 70
Processes 2023, 11, x FOR PEER REVIEW 2 800 80 13 of 31
3 900 90
TheInuniqueness
addition toofthe thisexisting
approach literature supporting
lies in its the stability
ability to avoid of fuzzy systems,
direct numerical computa-we
conducted
tion of dynamic an effects
experiment to further By
compensation. assess the stability
employing ANFIS ofas
the system presented
a function approximator,in this
thestudy.
system A learns
new fuzzy controller
the complex was designed
relationship betweenwiththemembership
provided inputsfunctions, as depicted
and the required in
Figure
control 7. Thethereby
torque, deliberate choiceprecise
enabling of a membership
and smooth function
controlwith
of thenarrow
robot. central tendencies,
close to zero at the input of the fuzzy controller, was made to investigate sensitivity to
3.3.small
Stability Analysis
variations in tracking error.
By narrowing
Fuzzy controllersthe arecentral
widelymembership
acknowledged function, thestability
for their system’sinsensitivity is focused
the majority of cases.on
a specific
Their fuzzy range of the
structure input efficient
enables signal. While this approach
modeling and controlcanof effectively
nonlinearhighlight and in-
and complex
systems,
tensivelydemonstrating
respond to certainincreasederrortolerance
ranges, ittomaysystem
alsouncertainty and variability
increase susceptibility due to
to minor var-
theiations
absence of a precise
within mathematical
those ranges. model narrow
An extremely requirement.
centralBoth theoreticalfunction
membership and practical
can im-
evidence
balancesupports the idea
the influence that fuzzy
of different controllers
rules offer robustness and adaptability across
in the system.
variousExamining
environments and applications. In dynamic
Figure 8, displaying torque signals and changing
generatedsettings,
by thisfuzzy controllers
controller during
have proven effective, showcasing their ability to adapt to different operating
tracking of a circular trajectory, constant torque saturations for all three joints are evident. conditions
while maintaining
In this design, the stability.
system’s stability is crucial, and the extreme sensitivity introduced by
an The stabilitynarrow
extremely of fuzzymembership
controllers has been extensively
function can resultanalyzed
in abrupt in various references,re-
and undesirable
such as [43–47],
sponses. where BIBO
The constant torque (Bounded
saturations Input, Bounded
observed Output)
in Figure stability
8 serve conditions
as an indicatorarethat
established using the well-known
the system may not be stable. Small Gain Theorem. Many studies have shown that
fuzzy controllers
In contrast,offer
thisrobustness
behavior isand notadaptability
evident when in dynamic
analyzing andthechanging environments,
torque signal of the con-
indicating
troller presented in this work, as illustrated in Figure 9. In this case, appropriatestable.
their ability to adapt to different operating conditions while remaining tracking
In addition
curves to the
and torque existing
signals are literature
exhibited,supporting
suggesting the thatstability of fuzzy systems,
these membership functionsweare
conducted an experiment
more effective in providing to further
stability assess
to thethe stability
system. Theofdesign
the system presented
choices, includingin this
mem-
study. A new fuzzy controller was designed with membership functions,
bership function shapes, contribute to the stable performance of our controller, ensuring as depicted in
Figure 7. The deliberate choice of a membership
robust responses even under varying conditions. function with narrow central tendencies,
close to zero at the input of the fuzzy controller, was made to investigate sensitivity to small
variations in tracking error.
(a) (b)
Figure 7. Membership functions of a new fuzzy controller designed to make inferences about the
Figure 7. Membership functions of a new fuzzy controller designed to make inferences about the
stability of the system: (a) Membership functions for the input variable ‘error’; (b) membership func-
stability of the
tions for the input
system: (a) Membership
variable functions for the input variable ‘error’; (b) membership
‘error derivative’.
functions for the input variable ‘error derivative’.
variations within those ranges. An extremely narrow central membership function can
imbalance the influence of different rules in the system.
Examining Figure 8, displaying torque signals generated by this controller during
tracking of a circular trajectory, constant torque saturations for all three joints are evident.
In this design, the system’s stability is crucial, and the extreme sensitivity introduced by an
Processes 2023, 11, x FOR PEER REVIEW
extremely narrow membership function can result in abrupt and undesirable responses. 14 of 31
The constant torque saturations observed in Figure 8 serve as an indicator that the system
may not be stable.
Figure
Figure8. 8.
Torque signal
Torque generated
signal during
generated the tracking
during of a circular
the tracking trajectory
of a circular by theby
trajectory new
thefuzzy
new con-
fuzzy
troller designed to make inferences about the stability of the system.
controller designed to make inferences about the stability of the system.
In contrast, this behavior is not evident when analyzing the torque signal of the con-
troller presented in this work, as illustrated in Figure 9. In this case, appropriate tracking
curves and torque signals are exhibited, suggesting that these membership functions are
more 8.
Figure effective in providing
Torque signal generatedstability to tracking
during the the system. The design
of a circular choices,
trajectory by theincluding
new fuzzymem-
con-
bership
troller function
designed shapes,
to make contribute
inferences abouttothethe stableofperformance
stability the system. of our controller, ensuring
robust responses even under varying conditions.
Figure 9. Torque signal generated during the tracking of a circular trajectory by the fuzzy controller
designed in the study.
𝑥 = 0.352
Processes 2023, 11, 3267 𝑦 = 0.15𝑠𝑒𝑛(2𝑡) (38)
14 of 30
𝑧 = 0.15 cos(2𝑡) + 0.4
Latency and delays play a crucial role in the precise control of robots over time, and
they
as can
well asmanifest in various
a quantitative stages
analysis of thethe
through control block [48].
performance The delay
indices: in input
residual mean control
square
can beofattributed
value the error to various
and factorsofwithin
the integral the control
the absolute errorsystem.
weightedFirstly, the dynamics of the
in time.
actuator itself can introduce a delay, as it takes time for the actuator to respond and gen-
4.1.
erateSimulation Environment
the desired control output. Additionally, the processing of data used for generating
The performance
the control of as
signal, such both controllers
sensor is evaluated
measurements andincalculations,
trajectory tracking. Two trajectories
can contribute to input
with
control delay. Delays in the transmission of sensor information can result from defined
sinusoidal type profiles in position and velocity are used. The trajectories are various
by Equations
factors, (37) and
including (38)
signal and are represented
processing, in Figure
data acquisition, 10.
or communication systems.
(a) (b)
Figure 10.
Figure 10. Test
Test trajectories:
trajectories: (a)
(a) Trajectory
Trajectory 1;
1; (b)
(b) Trajectory
Trajectory2.2.
Furthermore,
Then, delay canisalso
a load variation ariseduring
applied from failures or malfunctions
trajectory 2 tracking inin electronic
order interface
to analyze the
devices or data acquisition systems, which can impact the overall control loop
robustness of the system and to observe its behavior in the rejection of external disturbances.response
time. Additionally, when filtering out noise components from velocity or force measure-
ments, there can be a phase shift that
= 0.05senintroduces
rindirectly (2t) a delay in the control system
[49]. x = 0.2 + rsen(t)
(37)
With the aim of carrying out = 0.2realistic
a ymore + rcos(simulation,
t) a delay of 3 milliseconds
(ms) was incorporated between the plantz and = 0.352
the controller. In this way, the simulations
include the inherent delays in the control of a real robotic manipulator.
x = 0.352
y = 0.15sen(2t) (38)
4.2. Performance Indices
z = 0.15cos(2t) + 0.4
Performance indices are quantitative measures that specify the cost of system opera-
tion Latency and delays
as a function play
of error anda energy.
crucial role
Theyin are
the used
precise
to control
evaluateofthe
robots over time,
dynamic and
behavior,
they can manifest in various stages of the control block [48]. The
the quality of the transient response and the stress of the controller [50]. delay in input control
can be attributed
These to allow
indices various factors
the within theand
measurement control system. Firstly,
quantification the dynamics
of different of the
performance
actuator itself can introduce a delay, as it takes time for the actuator to respond and generate
characteristics of a robotic manipulator. These metrics facilitate the study, evaluation, and
the desired control output. Additionally, the processing of data used for generating the
optimization of the design, as well as the application of manipulator robots. Furthermore,
control signal, such as sensor measurements and calculations, can contribute to input
they enable the establishment of comparisons between architectures and performance of
control delay. Delays in the transmission of sensor information can result from various
different controllers or manipulators used in the same task [51].
factors, including signal processing, data acquisition, or communication systems.
Furthermore, delay can also arise from failures or malfunctions in electronic interface
devices or data acquisition systems, which can impact the overall control loop response time.
Additionally, when filtering out noise components from velocity or force measurements,
there can be a phase shift that indirectly introduces a delay in the control system [49].
With the aim of carrying out a more realistic simulation, a delay of 3 milliseconds (ms)
was incorporated between the plant and the controller. In this way, the simulations include
the inherent delays in the control of a real robotic manipulator.
Processes 2023, 11, 3267 15 of 30
Figure 11. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 1.
Figure 11. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 1.
It can be seen that a good tracking of the desired trajectory is achieved with this
controller, which is proven by the rather small error values obtained. The error values are
shown in Figures 13 and 14 for the Cartesian trajectory and the joint trajectory respectively.
The tracking of trajectory 1 achieved with the ANFIS controller is illustrated in
Figure 15, for the Cartesian space, and in Figure 16 for the joint trajectory. A good tracking
of the reference is observed, without the presence of overshoots or oscillations, similarly to
the result obtained with the fuzzy controller.
Processes 2023, 11, 3267 16 of 30
Figure 11. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 1.
The tracking of trajectory 1 achieved with the ANFIS controller is illustrated in Figure
15, The tracking
for the of trajectory
Cartesian 1 achieved
space, and in Figurewith thethe
16 for ANFIS
jointcontroller
trajectory.isAillustrated in Figure
good tracking of the
15,
reference is observed, without the presence of overshoots or oscillations, similarly tothe
for the Cartesian space, and in Figure 16 for the joint trajectory. A good tracking of the
reference is observed,
result obtained with without
the fuzzythe presence of overshoots or oscillations, similarly to the
controller.
result obtained
Figures 17with
andthe
18 fuzzy
show controller.
the error graphs obtained with ANFIS in the Cartesian and
Figures
joint space.17 and error
Small 18 show the error
values graphs obtained
are obtained, consideredwith ANFIS in smaller
acceptable, the Cartesian
valuesand
than
joint space. Small error values are obtained, considered
those obtained with the fuzzy controller are observed. acceptable, smaller values than
those obtained with the fuzzy controller are observed.
Figure 12. Simulated and desired joint trajectory with the fuzzy controller for trajectory 1.
Figure 12. Simulated and desired joint trajectory with the fuzzy controller for trajectory 1.
It can be seen that a good tracking of the desired trajectory is achieved with this con-
troller, which is proven by the rather small error values obtained. The error values are
shown in Figures 13 and 14 for the Cartesian trajectory and the joint trajectory respec-
tively.
Figure13.
Figure 13.Cartesian
Cartesian trajectory
trajectory error
error withwith the fuzzy
the fuzzy controller
controller for trajectory
for trajectory 1. 1.
Figure 13. Cartesian trajectory error with the fuzzy controller for trajectory 1.
Figure 14. Joint trajectory error with the fuzzy controller for trajectory 1.
Figure 14. Joint trajectory error with the fuzzy controller for trajectory 1.
FigureFigures
14. Joint17trajectory error the
and 18 show with the fuzzy
error graphscontroller
obtainedfor trajectory
with ANFIS 1.in the Cartesian and
joint space. Small error values are obtained, considered acceptable, smaller values than
those obtained with the fuzzy controller are observed.
The performance analysis of both controllers for trajectory 1 is carried out from Table 5,
which shows the indices for the Cartesian trajectory, and Table 6, which shows the values
obtained in the joint trajectory.
Processes 2023, 11, 3267 17 of 30
Figure 14. Joint trajectory error with the fuzzy controller for trajectory 1.
Figure 15. Simulated and desired Cartesian trajectory with the ANFIS controller for trajectory 1.
Figure 15. Simulated and desired Cartesian trajectory with the ANFIS controller for trajectory 1.
Figure 18.18.
Figure Joint trajectory
Joint errorerror
trajectory with the
withANFIS controller
the ANFIS for trajectory
controller 1.
for trajectory 1.
Processes 2023, 11, x FOR PEER REVIEW The performance analysis of both controllers for trajectory 1 is carried out19 from
of 31 Table
5,Table Performance
which5.shows indices
the indices for Cartesian trajectory
for the trajectory,1.and Table 6, which shows the val-
ues obtained in the joint trajectory.
ITAE 1.
Table 5. Performance indices for Cartesian trajectory RMSE
Fuzzy ANFIS Fuzzy ANFIS
ITAE RMSE
x 0.2267
Fuzzy 0.1373
ANFIS Fuzzy 0.0045ANFIS 0.0029
y 0.2302 0.0901 0.0045 0.0020
𝑥 0.2267 0.1373 0.0045 0.0029
z 0.5047 0.0279 0.0106 6.1412 × 10−4
𝑦 0.2302 0.0901 0.0045 0.0020
𝑧 0.5047 0.0279 0.0106 6.1412 × 10−4
Table 6. Performance indices for joint trajectory 1.
Table 6. Performance indices for joint trajectory 1.
ITAE RMSE
ITAE RMSE
Fuzzy
Fuzzy ANFIS
ANFIS Fuzzy FuzzyANFIS ANFIS
q1𝑞 0.0441
0.0441 0.2116
0.2116 0.0016 0.00160.0047 0.0047
q2𝑞 0.8575
0.8575 0.5201
0.5201 0.0189 0.01890.0099 0.0099
q3 0.9341 0.4584 0.0184 0.0090
𝑞 0.9341 0.4584 0.0184 0.0090
Based on these
Based values,
on these it can be
values, it stated
can bethat boththat
stated controllers have good performance
both controllers have good performance in
in tracking
trackingtrajectory 1. However,
trajectory 1. However, a slight improvement
a slight is observed
improvement for the ANFIS
is observed con-
for the ANFIS controller.
troller. This finding is reinforced by the graphical representation in Figure 19, where a
This finding is reinforced by the graphical representation in Figure 19, where a side-by-side
side-by-side comparison of the tracking curves for each joint indicates an improvement in
comparison
accuracy achievedofbythe
the tracking curvesinfor
ANFIS controller each trajectory
tracking joint indicates
1. an improvement in accuracy
achieved by the ANFIS controller in tracking trajectory 1.
(a)
(b)
(c)
Figure 19. 19.
Figure JointJoint
trajectory performance
trajectory comparison
performance of the of of
comparison controllers for trajectory
the of controllers for1.trajectory
(a) Perfor-1. (a) Perfor-
mance comparison for joint; (b) performance comparison for joint 2; (c) performance comparison
mance comparison for joint; (b) performance comparison for joint 2; (c) performance comparison for
for joint 3.
Processes 2023, 11, x FOR PEER REVIEW
joint 3. 21 of 31
Next, the results for the tracking of trajectory 2 are analyzed. Figures 20 and 21 show
Next,
the robot’s paththe results
using for the
the fuzzy tracking
controller of Cartesian
for the trajectorytrajectory
2 are analyzed. Figures
and the joint trajec- 20 and 21
show the robot’s
tory, respectively. path using the fuzzy controller for the Cartesian trajectory and the joint
trajectory, respectively.
Figure 20. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 2.
Figure 20. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 2.
Figure 20. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 2.
Processes 2023, 11, 3267
Figure 20. Simulated and desired Cartesian trajectory with the fuzzy controller for trajectory 2. 20 of 30
Figure 21. Simulated and desired joint trajectory with the fuzzy controller for trajectory 2.
Figure
Figure 21. 21. Simulated
Simulated andand desired
desired joint
joint trajectory
trajectory with
with thethe fuzzy
fuzzy controller
controller forfor trajectory
trajectory 2. 2.
In the case of Figure 21, it can be observed that this trajectory demands greater effort
In the
In the case
case of Figure 21,
of Figure it can be observed thatthat
thisthis trajectory demands greater effort
from the controller as it has21, it can
a wider be observed
range of movement intrajectory
each jointdemands
and along greater effort
the z-axis,
from
from the the controller as it has a wider range of movement in each joint and along the z-
where it iscontroller
necessaryas toitcompensate
has a widerfor range of movement
interactions in each joint
with gravity. and alongFigures
By observing the z-axis,
22
axis,
where where
it isthe it
necessaryis necessary
to and
compensate to compensate for
for interactions interactions
with gravity. with gravity.
By observing By observing
Figures 22
and 23 of Cartesian joint errors, it can be verified that although error values are
Figures
and 23 of the 22 and 23 of the Cartesian and joint errors, it can be verified that although error
acceptable, theyCartesian
are slightlyandhigher
joint errors, it can
than those be verified
obtained withthat although
trajectory 1. error values are
values are acceptable, they are slightly higher than those
acceptable, they are slightly higher than those obtained with trajectory 1. obtained with trajectory 1.
Figure 22.22.
Figure Cartesian trajectory
Cartesian error
trajectory with
error thethe
with fuzzy controller
fuzzy forfor
controller trajectory 2. 2.
trajectory
Figure 23.23.
Figure Joint trajectory
Joint error
trajectory with
error thethe
with fuzzy controller
fuzzy forfor
controller trajectory 2. 2.
trajectory
The results obtained with the ANFIS in the tracking of trajectory 2 are illustrated in
Figure 24, for the Cartesian space, and in Figure 25 for the joint space.
Figure 23. Joint trajectory error with the fuzzy controller for trajectory 2.
Processes 2023, 11, 3267 Figure 23. Joint trajectory error with the fuzzy controller for trajectory 2. 21 of 30
The results obtained with the ANFIS in the tracking of trajectory 2 are illustrated in
Figure 24, for the Cartesian space, and in Figure 25 for the joint space.
The results obtained with the ANFIS in the tracking of trajectory 2 are illustrated in
FigureThe
24, results
for theobtained
Cartesian space,
with and inin
the ANFIS Figure 25 for of
the tracking thetrajectory
joint space.
2 are illustrated in
Figure 24, for the Cartesian space, and in Figure 25 for the joint space.
Figure 24. Simulated and desired Cartesian trajectory with the ANFIS controller for trajectory 2.
Figure 24. Simulated and desired Cartesian trajectory with the ANFIS controller for trajectory 2.
Figure 24. Simulated and desired Cartesian trajectory with the ANFIS controller for trajectory 2.
Figure
Figure Simulatedand
25.25.Simulated and desired
desired joint
jointtrajectory with
trajectory thethe
with ANFIS controller
ANFIS for trajectory
controller 2.
for trajectory 2.
The error plots obtained with ANFIS, shown in Figures 26 and 27, show small error
values,The
Figure lower
25. than
error plotsthose
Simulated and obtained
obtained with
desired with
jointANFIS, the
trajectoryfuzzy
shown
withincontroller.
Figures
the ANFIS26 and 27, show
controller small error
for trajectory 2.
values, lower than those obtained with the fuzzy controller.
Figure
Figure26.
26.Cartesian
Cartesian trajectory errorwith
trajectory error withthe
the ANFIS
ANFIS controller
controller for trajectory
for trajectory 2. 2.
Processes 2023, 11, 3267 22 of 30
Figure 26. Cartesian trajectory error with the ANFIS controller for trajectory 2.
Figure
Figure27.
27.Joint
Jointtrajectory errorwith
trajectory error withthe
theANFIS
ANFIS controller
controller for trajectory
for trajectory 2. 2.
Accordingto
According tothe
the values
values inin Tables
Tables 7 and
and 8,8, which
which show
showthetheperformance
performanceindices
indices ob-
obtained
tained in trajectory
in trajectory 2 tracking,
2 tracking, it can
it can bebeconcluded
concludedthat
thatboth
both controllers
controllers exhibit
exhibitgood
good per-
performance in tracking trajectory 2. However, a notably superior performance
formance in tracking trajectory 2. However, a notably superior performance is observed is observed
for the ANFIS controller. This outcome is further supported by the graphs presented in
for the ANFIS controller. This outcome is further supported by the graphs presented in
Figure 28, where a detailed comparison between the two controllers is established through
Figure 28, where a detailed comparison between the two controllers is established through
the tracking curves for each joint. It is evident from the graphs that the ANFIS controller
the tracking
achieves curves for each
a significantly higherjoint.
levelItofisaccuracy
evidentinfrom the trajectory
tracking graphs that2. the ANFIS controller
achieves a significantly higher level of accuracy in tracking trajectory 2.
Table 7. Performance indices for Cartesian trajectory 2.
Table 7. Performance indices for Cartesian trajectory 2.
ITAE RMSE
Fuzzy ITAE
ANFIS Fuzzy RMSE
ANFIS
x 0.4673 Fuzzy0.1923 ANFIS 0.0087 Fuzzy 0.0039 ANFIS
y 𝑥 0.1211 0.46730.0825 0.1923 0.0030 0.0087 0.0023 0.0039
z 1.17
𝑦 0.12110.1052 0.0825 0.0217 0.0030 0.0023
0.0023
𝑧 1.17 0.1052 0.0217 0.0023
Table 8. Performance indices for joint trajectory 2.
ITAE RMSE
Fuzzy ANFIS Fuzzy ANFIS
q1 0.1367 0.1213 0.0054 0.0047
q2 2.573 0.3517 0.0482 0.0079
q3 0.7583 0.4471 0.0174 0.0089
(a)
(b)
(c)
Figure 28. Joint28.
Figure trajectory performance
Joint trajectory comparison
performance of the of of
comparison controllers for trajectory
the of controllers 2: (a) perfor-
for trajectory 2: (a) perfor-
mance comparison for joint 2; (b) performance comparison for joint 2; (c) performance
mance comparison for joint 2; (b) performance comparison for joint 2; (c) performance comparison
comparison
for joint 2.
for joint 2.
Table 9. Comparison between the performance of the controllers designed and results from other
authors.
Comparison Criterion
Controllers DoF
ITAE RMSE
Processes 2023, 11, 3267 24 of 30
Table 9. Comparison between the performance of the controllers designed and results from other
authors.
Comparison Criterion
Controllers DoF
ITAE RMSE
Fuzzy-FO
2 0.5812 -
(fractional-order) [13]
Fuzzy PID [12] 3 0.4860 -
Fuzzy LQR [14] 3 0.313 -
Fuzzy PID [28] 4 - 0.0149
ANFIS PID [28] 4 - 0.00037
Fuzzy PD [16] 2 - 0.0316
Optimized fuzzy
3 - 0.00458
computed torque [53]
Proposed Fuzzy 3 0.5861 0.01113
Proposed ANFIS 3 0.1266 0.0028
From the analysis of Table 8, it can be concluded that the controllers developed in this
study exhibit competitive performance compared to those proposed by other authors, with
the ANFIS standing out as having the best ITAE index and the second-best RMSE. Further-
more, it is concluded that the application of optimization techniques in defining fuzzy sets
significantly enhances the performance of fuzzy controllers, as evidenced in [53], where
the parameters of the proposed controller are tuned using the Archimedes Optimization
Algorithm (AOA).
Additionally, the designed controllers in this work are characterized by their simplicity,
which has proven to be a valuable attribute, yielding robust and effective results. The
inherent simplicity of these controllers offers several significant advantages. It facilitates
system understanding, adjustment, and implementation, streamlining the process and
enhancing operational efficiency. Furthermore, it contributes to system reliability and
stability by reducing complexity.
Figure 29. Simulated and desired joint trajectory with the fuzzy controller for trajectory 2 in the
29. Simulated
presence of
presence of external
external disturbances.
disturbances.
Processes 2023, 11, 3267 25 of 30 2 in th
Figure 29. Simulated and desired joint trajectory with the fuzzy controller for trajectory
presence of external disturbances.
Figure30.30.Simulated
Figure Simulatedandand
desired jointjoint
desired trajectory with the
trajectory ANFIS
with controller
the ANFIS for trajectory
controller 2 in the 2 in th
for trajectory
presence of external disturbances.
presence of external disturbances.
that adequately compensate for the effects of the augmented mass. The saturation of the
torque signal suggests a restricted operational range or imprecise modeling of the system
the torquehampering
dynamics, signal suggests a restricted operational
the controller’s range or
ability to deliver imprecise
optimal modeling of
performance in the
such con-
system dynamics, hampering the controller’s ability to deliver optimal performance in
ditions.
such conditions.
Figure 32. Torque signal applied to the robot using the ANFIS controller for trajectory 2 in the
Figure 32. Torque signal applied to the robot using the ANFIS controller for trajectory 2 in the pres-
presence of load disturbances.
ence of load disturbances.
The performance indices were recalculated for these conditions. The new values
The performance
obtained indices
are shown in Table 10, were recalculated
for Cartesian space, for
andthese conditions.
in Table 11 for jointThe new values ob-
space.
tained are shown in Table 10, for Cartesian space, and in Table 11 for joint space.
Table 10. Performance indices for Cartesian trajectory 2 in the presence of external disturbances.
Table 10. Performance indices for Cartesian trajectory 2 in the presence of external disturbances.
ITAE RMSE
Fuzzy ITAE
ANFIS Fuzzy RMSE
ANFIS
x 1.337 Fuzzy0.2167 ANFIS0.0261 Fuzzy 0.0044 ANFIS
y 𝑥 0.3128 1.3370.08206 0.2167 0.0065 0.0261 0.0019 0.0044
z 5.095 0.6778 0.0955 0.0167
𝑦 0.3128 0.08206 0.0065 0.0019
𝑧 5.095 0.6778 0.0955 0.0167
Table 11. Performance indices for joint trajectory 2 in the presence of external disturbances.
ITAE RMSE
Fuzzy ANFIS Fuzzy ANFIS
𝑞 0.1375 0.1126 0.0055 0.0036
Processes 2023, 11, 3267 27 of 30
In the presence of this variation in the load, a variation in the indices with respect to
those obtained in the trajectory tracking is observed. In this test, much higher values of the
ITAE are observed in comparison with the rest of the tests, considering that this index is an
indicator of the time it takes for the system to recover from an error.
Table 11. Performance indices for joint trajectory 2 in the presence of external disturbances.
ITAE RMSE
Fuzzy ANFIS Fuzzy ANFIS
q1 0.1375 0.1126 0.0055 0.0036
q2 11.02 2.101 0.2158 0.0502
q3 2.734 0.5478 0.0452 0.0110
5. Conclusions
In this study, a comprehensive and comparative evaluation of two intelligent control
strategies was conducted, specifically the Fuzzy Logic Controller and the Adaptive Neuro-
Fuzzy Inference System (ANFIS), tailored for a 3-DoF robotic arm operating in the context of
Industry 4.0. The examination focused on assessing the precision and overall performance
of both controllers, particularly in trajectory tracking scenarios.
The results of these evaluations consistently demonstrated that both controllers exhib-
ited commendable performance in the functional tests. Notably, they successfully achieved
accurate tracking of the predefined reference trajectory without any observed oscillations
or overshoots. This consistent and reliable performance underscores the controllers’ effec-
tiveness in meeting the demands of the given scenarios.
The application of the ITAE and RMSE performance indices further verified the preci-
sion attained by the controllers. Specifically, the ANFIS controller demonstrated superior
performance compared to the fuzzy controller, as indicated by its ability to achieve the
smallest indices in the tests. This outcome was validated through a meticulous comparison
with recently published fuzzy controllers.
The ANFIS controller showcases remarkable efficiency in achieving precise trajectory
tracking and effective regulation, even in the face of load variations within the robotic
arm system. This adaptability holds significant implications for a broad spectrum of
robotic applications, particularly in scenarios involving complex manipulation tasks such as
palletizing in the logistics industry. The ability of the ANFIS controller to dynamically adapt
to variations in the weight and size of products is crucial for tasks like assembly, where the
payload may vary due to the manipulation of components with different sizes and weights.
Similarly, in automated loading and unloading applications, such as those seen in robotic
warehouses, the ANFIS controller proves to be a versatile and reliable solution.
For future research, the aim is to continue evolving controllers for robotic arms,
aligning with the precision and autonomy requirements of Industry 4.0 standards. An
exciting avenue for exploration involves the potential integration of bio-inspired controllers,
particularly those based on Spiking Neural Networks, which could emulate the informa-
tion processing capabilities of the human brain and further enhance the capabilities of
robotic systems.
Author Contributions: Conceptualization, J.K. and D.M.; methodology, J.K. and D.M.; software, J.K.
and D.M.; validation, J.K. and D.M.; formal analysis, J.K. and D.M.; investigation, J.K. and D.M.;
resources, J.K. and D.M.; data curation, J.K. and D.M.; writing—original draft preparation, J.K. and
D.M.; writing—review and editing, J.K. and D.M.; visualization, J.K. and D.M.; supervision, J.K. and
C.U.; project administration, J.K. and C.U.; funding acquisition, J.K. and C.U. All authors have read
and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Data Availability Statement: Data are contained within the article.
Processes 2023, 11, 3267 28 of 30
Acknowledgments: This work has been supported by Agencia Nacional de Investigación y Desar-
rollo ANID, Chile, through IDeA I + D ID21I10087 project and by ANID-Subdirección de Capital
Humano/Doctorado Nacional/2021- 21210149. It also received support from the Vicerrectoría de
Investigación, Innovación y Creación of the University of Santiago of Chile (USACH), Chile.
Conflicts of Interest: The authors declare no conflict of interest.
References
1. Czimmermann, T.; Chiurazzi, M.; Milazzo, M.; Roccella, S.; Barbieri, M.; Dario, P.; Oddo, C.M.; Ciuti, G. An Autonomous Robotic
Platform for Manipulation and Inspection of Metallic Surfaces in Industry 4.0. IEEE Trans. Autom. Sci. Eng. 2022, 19, 1691–1706.
[CrossRef]
2. Galin, R.; Meshcheryakov, R. Automation and Robotics in the Context of Industry 4.0: The Shift to Collaborative Robots. IOP
Conf. Ser. Mater. Sci. Eng. 2019, 537, 032073. [CrossRef]
3. Chotikunnan, P.; Chotikunnan, R.; Nirapai, A.; Wongkamhang, A.; Imura, P.; Sangworasil, M. Optimizing Membership Function
Tuning for Fuzzy Control of Robotic Manipulators Using PID-Driven Data Techniques. J. Robot. Control 2023, 4, 128–140.
[CrossRef]
4. Bryndin, E. Increase of Safety Use Robots in Industry 4.0 by Developing Sensitivity and Professional Behavioral Skills. Am. J.
Mech. Ind. Eng. 2020, 5, 6. [CrossRef]
5. González-Rodríguez, A.; Baray-Arana, R.E.; Rodríguez-Mata, A.E.; Robledo-Vega, I.; Acosta Cano de los Ríos, P.R. Validation
of a Classical Sliding Mode Control Applied to a Physical Robotic Arm with Six Degrees of Freedom. Processes 2022, 10, 2699.
[CrossRef]
6. Rawat, D.; Gupta, M.K.; Sharma, A. Intelligent Control of Robotic Manipulators: A Comprehensive Review. Spat. Inf. Res. 2023,
31, 345–357. [CrossRef]
7. Hentout, A.; Maoudj, A.; Aouache, M. A Review of the Literature on Fuzzy-Logic Approaches for Collision-Free Path Planning of
Manipulator Robots. Artif. Intell. Rev. 2023, 56, 3369–3444. [CrossRef]
8. Eckert, J.J.; Barbosa, T.P.; Silva, F.L.; Roso, V.R.; Silva, L.C.; da Silva, L.A.R. Optimum Fuzzy Logic Controller Applied to a Hybrid
Hydraulic Vehicle to Minimize Fuel Consumption and Emissions. Expert Syst. Appl. 2022, 207, 117903. [CrossRef]
9. Bi, M. Control of Robot Arm Motion Using Trapezoid Fuzzy Two-Degree-of-Freedom PID Algorithm. Symmetry 2020, 12, 665.
[CrossRef]
10. Hernandez-Mendez, S.; Palacios-Hernandez, E.R.; Marin-Hernandez, A.; Rechy-Ramirez, E.J.; Vazquez-Leal, H. Design and
Implementation of Composed Position/Force Controllers for Object Manipulation. Appl. Sci. 2021, 11, 9827. [CrossRef]
11. Gonzalez-Villagomez, J.; Rodriguez-Donate, C.; Lopez-Ramirez, M.; Mata-Chavez, R.I.; Palillero-Sandoval, O. Novel Iterative
Feedback Tuning Method Based on Overshoot and Settling Time with Fuzzy Logic. Processes 2023, 11, 694. [CrossRef]
12. Karahan, O.; Ataşlar-Ayyıldız, B. Optimal Design of Fuzzy PID Control. In Intelligent Computing; Arai, K., Kapoor, S., Bhatia, R.,
Eds.; Springer International Publishing: Cham, Switzerland, 2019; pp. 174–188.
13. Muñoz-Vázquez, A.J.; Gaxiola, F.; Martínez-Reyes, F.; Manzo-Martínez, A. A Fuzzy Fractional-Order Control of Robotic
Manipulators with PID Error Manifolds. Appl. Soft Comput. 2019, 83, 105646. [CrossRef]
14. Mohamed, M.; Abdul Samad, B.; Anayi, F.; Packianather, M.; Yahya, K. Analysing Various Control Technics for Manipulator
Robotic System (Robogymnast). Comput. Mater. Contin. 2023, 75, 4681–4696. [CrossRef]
15. Chang, W.-J.; Lin, Y.-W.; Lin, Y.-H.; Pen, C.-L.; Tsai, M.-H. Actuator Saturated Fuzzy Controller Design for Interval Type-2
Takagi-Sugeno Fuzzy Models with Multiplicative Noises. Processes 2021, 9, 823. [CrossRef]
16. El-Nagar, A.M.; Abdrabou, A.; El-Bardini, M.; Elsheikh, E.A. Embedded Fuzzy PD Controller for Robot Manipulator. In
Proceedings of the 2021 International Conference on Electronic Engineering (ICEEM), Menouf, Egypt, 3–4 July 2021; pp. 1–6.
17. Zhang, L.; Yang, G.-H. Low-Computation Adaptive Fuzzy Tracking Control for Nonlinear Systems via Switching-Type Adaptive
Laws. IEEE Trans. Fuzzy Syst. 2019, 27, 1931–1942. [CrossRef]
18. Zhang, J.-X.; Yang, G.-H. Low-Computation Adaptive Fuzzy Tracking Control of Unknown Nonlinear Systems With Unmatched
Disturbances. IEEE Trans. Fuzzy Syst. 2020, 28, 321–332. [CrossRef]
19. Zhou, P.; Zhang, L.; Zhang, S.; Alkhateeb, A.F. Observer-Based Adaptive Fuzzy Finite-Time Control Design With Prescribed
Performance for Switched Pure-Feedback Nonlinear Systems. IEEE Access 2021, 9, 69481–69491. [CrossRef]
20. Liu, K.; Yang, P.; Wang, R.; Jiao, L.; Li, T.; Zhang, J. Observer-Based Adaptive Fuzzy Finite-Time Attitude Control for Quadrotor
UAVs. IEEE Trans. Aerosp. Electron. Syst. 2023, 1–17. [CrossRef]
21. Lai, K.L.; Vu, N.H.; Lai, T.H. The Hedge-Algebras-Based Controller for Robotic Arm. In Advances in Engineering Research and
Application; Fujita, H., Nguyen, D.C., Vu, N.P., Banh, T.L., Puta, H.H., Eds.; Springer International Publishing: Cham, Switzerland,
2019; pp. 572–579.
22. Di Bello, P. Cartesian Control of a 3DoF Upper Limb Prosthetic Device. Master’s thesis, Politecnico di Torino, Torino, Italy, 2021.
23. Rain, T.; Dovgal, V.M.; Soe, Y.N. Efficient Method for Inverse Dynamics of Robot Manipulators by Using Adaptive-Network-
Based Fuzzy Inference System. In Proceedings of the 2019 International Conference on Industrial Engineering, Applications and
Manufacturing (ICIEAM), Sochi, Russia, 25–29 March 2019; pp. 1–6.
Processes 2023, 11, 3267 29 of 30
24. Barua, R.; Rahaman, S.; Shee, P.; Kumar, A.; Das, D.; Bhowmik, S. Analysis of Inverse Dynamics of 6-DOF Stanford Robotic Arm
by Adaptive Neuro-Fuzzy Inference System (ANFIS). J. Mech. Robot. 2022, 7, 1–7.
25. Abderrahim, B.; El Houssine, E.-C.M.; Hassan, S.; Hicham, A.E.; Bouras, A. Intelligent ANFIS Controller of Two Cooperative
3-DOF Manipulators: The Case of Manipulation under Non-Slip Constraints. In Proceedings of the 2022 2nd International
Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET), Meknes, Morocco, 3–4 March
2022; pp. 1–7.
26. Ortatepe, Z.; Parlaktuna, O. Two Dof Robot Control With Fuzzy Based Neural Networks. Anadolu Univ. J. Sci. Technol.-Appl. Sci.
Eng. 2017, 18, 819–830. [CrossRef]
27. Wang, Z.; Zou, L.; Su, X.; Luo, G.; Li, R.; Huang, Y. Hybrid Force/Position Control in Workspace of Robotic Manipulator in
Uncertain Environments Based on Adaptive Fuzzy Control. Robot. Auton. Syst. 2021, 145, 103870. [CrossRef]
28. Han, J.; Wang, F.; Sun, C. Trajectory Tracking Control of a Manipulator Based on an Adaptive Neuro-Fuzzy Inference System.
Appl. Sci. 2023, 13, 1046. [CrossRef]
29. Spong, M.W.; Hutchinson, S.; Vidyasagar, M. Robot Modeling and Control; John Wiley & Sons: Hoboken, NJ, USA, 2020;
ISBN 978-1-119-52399-4.
30. Pascal Mamani, J.L. Estudio Y Simulación De Técnicas De Identificación De Parámetros Para Un Robot Tipo Scara. Bachelor’s
Thesis, Universidad de Santiago de Chile, Santiago, Chile, 2015.
31. García López, E. Desarrollo de Un Sistema de Rehabilitación Bilateral Asistido Por Robots. Master’s thesis, Centro de investigación
y de estudios avanzados del instituto politécnico nacional, Mexico City, Mexico, 2017.
32. Cardoso, E.; Fernández, A.; Marrero-Osorio, S.A.; Guardado, P.F. Modelos cinemático y dinámico de un robot de cuatro grados de
libertad. Ing. Electrónica Automática Comun. 2017, 38, 56–75.
33. Montalvo, W.; Escobar-Naranjo, J.; Garcia, C.A.; Garcia, M.V. Low-Cost Automation for Gravity Compensation of Robotic Arm.
Appl. Sci. 2020, 10, 3823. [CrossRef]
34. Abdul-Sadah, A.M.; Raheem, K.M.H.; Altufaili, M.M.S. A Fuzzy Logic Controller for a Three Links Robotic Manipulator. AIP
Conf. Proc. 2022, 2386, 050026. [CrossRef]
35. Inayathullaah, M.A.; Sivakumar, N.; Balasundaram, A.; Arul, R.; Angalaeswari, S. Time Domain Investigation of Hybrid
Intelligent Controllers Fed Five-Phase PMBLDC Motor Drive. Appl. Sci. 2023, 13, 3281. [CrossRef]
36. Thakur, A. Neuro-Fuzzy: Artificial Neural Networks & Fuzzy Logic. Int. J. Res. Appl. Sci. Eng. Technol. 2021, 9, 128–135.
[CrossRef]
37. Ledeneva, T. Special Aspects of the Design of Fuzzy Inference Mechanism. In Proceedings of the 2020 2nd International
Conference on Control Systems, Mathematical Modeling, Automation and Energy Efficiency (SUMMA), Lipetsk, Russia, 11–13
November 2020; pp. 128–132.
38. Alonso Fernández, F. Relación Entre Los Métodos de Inferencia Difusa y La Programación Lógica Multiadjunta. Bachelor’s
Thesis, Universidad de Cádiz, Cádiz, Spain, 2019.
39. Wang, X.; Abtahi, S.M.; Chahari, M.; Zhao, T. An Adaptive Neuro-Fuzzy Model for Attitude Estimation and Control of a 3 DOF
System. Mathematics 2022, 10, 976. [CrossRef]
40. Chawla, I.; Chopra, V.; Singla, A. Performance Comparison of PID and ANFIS Controller for Stabilization of x and X-y Inverted
Pendulums. In Intelligent Systems Design and Applications; Abraham, A., Cherukuri, A.K., Melin, P., Gandhi, N., Eds.; Springer
International Publishing: Cham, Switzerland, 2020; pp. 182–192.
41. Ramos-Fernández, J.C.; López-Morales, V.; Márquez-Vera, M.A.; Pérez, J.M.X.; Suarez-Cansino, J. Neuro-Fuzzy Modelling and
Stable PD Controller for Angular Position in Steering Systems. Int. J. Automot. Technol. 2021, 22, 1495–1503. [CrossRef]
42. Abtahi, S.; Sharifi, M. Machine Learning Method Used to Find Discrete and Predictive Treatment of Cancer. arXiv 2020,
arXiv:2004.09753.
43. Zhang, X.; Li, S.; Li, H. Structure and BIBO Stability of a Three-Dimensional Fuzzy Two-Term Control System. Math. Comput.
Simul. 2010, 80, 1985–2004. [CrossRef]
44. Mohan, B.M.; Sinha, A. The Simplest Fuzzy PID Controllers: Mathematical Models and Stability Analysis. Soft Comput. 2006, 10,
961–975. [CrossRef]
45. Wang, N.; Meng, X. Analytical Structures and Stability Analysis of Three-Dimensional Fuzzy Controllers. In Proceedings of the
2008 IEEE International Conference on Fuzzy Systems (IEEE World Congress on Computational Intelligence), Hong Kong, China,
1–6 June 2008; pp. 64–69.
46. Chen, G.; Ying, H. BIBO Stability of Nonlinear Fuzzy PI Control Systems. J. Intell. Fuzzy Syst. 1997, 5, 245–256. [CrossRef]
47. Malki, H.A.; Li, H.; Chen, G. New Design and Stability Analysis of Fuzzy Proportional-Derivative Control Systems. IEEE Trans.
Fuzzy Syst. 1994, 2, 245–254. [CrossRef]
48. Abadía, I.; Naveros, F.; Ros, E.; Carrillo, R.R.; Luque, N.R. A Cerebellar-Based Solution to the Nondeterministic Time Delay
Problem in Robotic Control. Sci. Robot. 2021, 6, eabf2756. [CrossRef] [PubMed]
49. Kang, Y.; Li, Z.; Cao, X.; Zhai, D. Robust Control of Motion/Force for Robotic Manipulators With Random Time Delays. IEEE
Trans. Control Syst. Technol. 2013, 21, 1708–1718. [CrossRef]
50. Velásquez Lobo, M.F. Control En Modo Deslizante Con Estimación de La Perturbación Aplicado a La Marcha de Un Robot.
Master’s Thesis, Instituto Nacional de Astrofísica, Óptica y Electrónica: Puebla, Mexico, 2013.
Processes 2023, 11, 3267 30 of 30
51. Patel, S.; Sobh, T. Manipulator Performance Measures—A Comprehensive Literature Survey. J. Intell. Robot. Syst. 2015, 77,
547–570. [CrossRef]
52. Liu, K.; Wang, R.; Zheng, S.; Dong, S.; Sun, G. Fixed-Time Disturbance Observer-Based Robust Fault-Tolerant Tracking Control
for Uncertain Quadrotor UAV Subject to Input Delay. Nonlinear Dyn. 2022, 107, 2363–2390. [CrossRef]
53. Aouaichia, A.; Kara, K.; Ghoul, A. An Optimized Fuzzy Computed Torque Control for the Robot Manipulator PUMA 560. In
Proceedings of the 2023 International Conference on Advances in Electronics, Control and Communication Systems (ICAECCS),
Blida, Algeria, 6–7 March 2023; pp. 1–7.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.