0% found this document useful (0 votes)
9 views

DynamicsandControlofaTwo-linkManipulatorusingPIDandSlidingModeControl2018

Uploaded by

sibi raja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DynamicsandControlofaTwo-linkManipulatorusingPIDandSlidingModeControl2018

Uploaded by

sibi raja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/329066565

Dynamics and Control of a Two-link Manipulator using PID and Sliding Mode
Control

Conference Paper · August 2018


DOI: 10.1109/ICCCEEE.2018.8515795

CITATIONS READS
17 4,031

2 authors:

Amin A. Mohammed Ahmed Eltayeb


King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals
10 PUBLICATIONS 121 CITATIONS 13 PUBLICATIONS 74 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Energy Harvesting View project

VAWT KACST PROJECT View project

All content following this page was uploaded by Amin A. Mohammed on 15 December 2018.

The user has requested enhancement of the downloaded file.


2018 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE)

Dynamics and Control of a Two-link Manipulator


using PID and Sliding Mode Control
1st Amin A. Mohammed 2nd Ahmed Eltayeb
Mechanical Engineering Department Department of Control and Mechatronics Engineering
King Fahd University of Petroleum & Minerals Universiti Teknologi Malaysia
Dhahran 31261, Saudi Arabia 81310 Johor Bahru, Johor, Malaysia
[email protected] [email protected]

Abstract—A robotic arm having two links is considered in based on the back-stepping control (BC), the Lyapunov stabil-
this report for modeling and control. First the dynamic model ity theorem and the SMC has been tackled. When the system
of the robot is obtained using the so-called Lagrange equation, is in the sliding mode, the perturbations were suppressed
then a robust control strategy based on the conventional sliding
mode control is introduced to control the motion of the robot at and the asymptotic stability was achieved by applying the
specific position for pick and place tasks along with PID control adaptive technique in the design of the sliding surface. The
scheme. The results of the two controllers are compared. From simulated results have revealed the robust tracking perfor-
the simulation results the SMC is found to be superior to the PID mance. A MATLAB/SIMULINK realization of the PUMA
controller in term of fast and robust response yet with higher 560 manipulator position control strategy was demonstrated in
control input. High join speeds are observed in case of SMC
which are related to the high control signals. details in [5]. Where the robot manipulator has been analyzed
Index Terms—dynamic model, robot manipulator, PID control, and implemented by designing a nonlinear SMC. SMC is an
SMC control important nonlinear controller under the condition of partly
uncertain system dynamics and used popularly in the control of
I. I NTRODUCTION highly nonlinear systems such as robot manipulators. However,
A robotic arm with two-degree of freedom is a classical ex- it has a major pitfall, namely, chattering. The chattering
ample of a simple nonlinear multi-input multi-output (MIMO) phenomenon can be reduced by utilizing a linear saturation
dynamic system in robotic literature. It represents a benchmark boundary layer function in SMC law. On other hand, A
for testing and performance evaluation of different control review of SMC for robotic manipulators is given in [6].
concepts and has been utilized by several researchers to study In which, over 90 publications have been reviewed and the
and compare various control schemes. main subject of classical SMC was introduced. Moreover,
In [1], modeling of 2-DOF robot arm and control was fuzzy control, adaptive fuzzy SMC, and neural network &
proposed. According to the obtained results, the robot arm its application to SMC have been investigated to improve
has been controlled to reach and remain within a desired the performance of the SMC. Sliding mode PID-controller
joint angle position via the simulation and implementation design using fuzzy tuning scheme for robot manipulators
of PID controllers using MATLAB/Simulink. Moreover, the is investigated in [7]. Furthermore, a sliding mode position
results have shown that changes in initial joint angles of the tracking control strategy for a 2 DOF robotic arm is proposed
manipulator had led in different desired joint positions which in [8]. A nonlinear disturbance observer had been proposed
necessitated that the gains of the PID controllers should be to enhance the performance. The control system stability had
adjusted and tuned continuously in order to prevent overshoots been analyzed according to Lyapunov theory. The obtained
and oscillations. A basic example of PID control applied to a results had verified that the nonlinear disturbance observer
robotic arm having two DOF was explained in [2] along with can estimate the time-varying disturbances effectively, and
an illustration of the dynamic model. Also it was shown how the robot control structure has strong robustness and adequate
to introduce the PID controller parameters to the dynamical tracking performance. In this paper PID and SMC are designed
equation of the manipulator. A similar approach was followed along with required implementation in the dynamic model
in [3]. of the system. Then, numerical simulation results of the two
Design of sliding mode controller (SMC) for two-link controller are compared considering a 2 DOF manipulator for
manipulator was proposed in [4]. Sliding surfaces design for pick and place activities.
position tracking control problem for two-link robotic arm

978-1-5386-4123-1/18/$31.00 ©2018 IEEE


II. DYNAMIC M ODEL C21 = 0 & C22 = −m2 L1 L2 θ̇1 sin θ2
A typical 2 DOF robotic arm is shown in Fig.1:  T
The gravity vector g = g12 g21 is given by:
g12 = −(m1 + m2 )gL1 sin θ1 − m2 gL2 sin(θ1 + θ2 )

g21 = −m2 L2 g sin(θ1 + θ2 )


 
Fθ 1
Finally, F = is torque exerted by actuators (servo
Fθ 2
motors) at each joint.

III. C ONTROLLER D ESIGN


This section provide the controller formulation along with
its integration with the system dynamics. Two different con-
trollers are considered, namely, PID and SMC.

A. PID controller
Fig. 1. Two links manipulator [2] The PID controller is given by [2], [10]:
Z
Referring to Fig.1 the kinematical relations for each mass F = KP q̃ + KI q̃dt + KD q̃˙ (5)
can be written easily [2]:
where KP , KD and KI represent the proportional, derivative
x1 =L1 sin θ
and integral gain matrices respectively which are symmetric
y1 =L1 cos θ positive-definite matrices; and q̃ = qd − q denotes deviation
(1)
x2 =L1 sin θ + L2 sin (θ1 + θ2 ) from the desired angle qd . Here the robot actuators are
y2 =L1 cos θ + L2 cos (θ1 + θ2 ) considered as an ideal sources of forces and torques. Under
this assumption, the dynamic model of an n-DOF robot is
The potential and kinetic energies of the system are given by: given by
V =m1 gL1 cos θ + m2 gL2 cos (θ1 + θ2 ) M (q)q̈ + C(q, q̇)q̇ + g(q) = F (6)
1  1 (2)
T = m1 ẋ21 + ẏ12 + m2 ẋ22 + ẏ22 The main task now is to propose a PID controller Eq.(5) to

2 2 the dynamic model given by (6). An additional state variable
By applying Lagrange’s equation [9] is needed to account for the integral action of the PID control

d ∂T

∂T ∂V law Eq.(5). We denote the new state variable by ξ such that
− + = Qj (3) ξ˙ = q̃ (where ξ˙ is the time derivative of ξ). The PID control
dt ∂ q̇j ∂qj ∂qj
is given by
we get the following system of equations, after some manip-
ulation F = KP q̃ + KI ξ + KD q̃˙ (7)
M (q)q̈ + C(q, q̇)q̇ + g(q) = F (4) ξ˙ = q̃ (8)
 T
Where the state variable q is defined by: q = θ1 θ2 and The closed-loop system’s equation can be found by introduc-
M represent the inertia matrix (symmetric positive definite) ing the control action F from Eq. ( 7) in the system dynamics
which is given by: Eq. (6), i.e.
 
M11 M12 M (q)q̈ + C(q, q̇)q̇ + g(q) = KP θ̃ + KI ξ + KD θ̃ (9)
M=
M21 M22
ξ˙ = q̃ (10)
Where:
which may be written in terms of the state vector
T
M11 = (m1 + m2 )L21 + m2 L22 + 2m2 L1 L2 cos θ2 q̃ T q̃˙T
 T
ξ as
M12 = m2 L22 + m2 L1 L2 cos θ2
   
M21 = M12 & M22 = m2 L22 ξ q̃
d   
q̃ = q̃˙ 
C is the Coriolis and centrifugal matrix which is given by dt ˙ −1 ˙
q̃ q̈d − M [KP q̃ + KI ξ + KD q̃ − C q̇ − g]

C11 C12
 (11)
C=
C21 C22 At the equilibrium, q̃ = 0 and q̃˙ = 0, which implies q =
qd . Thus, the previous equation (11) yields [ξ T q̃ T q̃˙T ] =
C11 = −m2 L1 L2 2θ̇2 sin θ2 = 2C12 [ξ ∗ 0T 0T ] where
are never precisely zero to the final precision digit during
ξ ∗ = KI−1 [M (qd )q̈d + C(qd , q̇d )q˙d + g(qd )] the computer calculation but rather switching from small -
    ve to small +ve. These switchings are magnified by the
d qd q̇d
= (12) multiplier K in the control law which may lead to significant
dt q̇d M (qd )−1 [F − C(q, q̇)q̇ − g(q)]
fluctuations in the control command. To circumvent chattering,
The system of ordinary differential equations is solved by the discontinuity of the SMC must be removed by replacing
using ode45 solver in Matlab/Simulink environment. the sign function with a saturation function given by:
B. Sliding Mode Control

sgn(x), if abs(x) ≥ 1
sat(x) = (18)
The SMC approach, also called the variable structure con- x, if x < 1
trol, is a typical robust control scheme that can be implemented
to any dynamic system having the same number of outputs and The saturation function must only be operated inside a bound-
inputs [11]. In this section, we explain how to design a SMC ary about the surface. The thickness of this boundary is
for a system having a dynamic model of the form of Eq. (4) represented by φi . Upon replacing the sign function with the
following the approach given in [11] which may be consulted saturation function, the control law Eq. (17) becomes
for further details. In SMC, the needed behavior of the closed-
F = M̂ ṡr + Ĉsr + ĝ − Ksgn(s/φ) (19)
loop system from a beginning state q to the final state qd is
given by IV. R ESULTS AND D ISCUSSION
s = q̇ − sr (13)
For simulations, the system parameters selected are those
where of David et. all 2012 [2]:
sr = q̇d − Λq̃ (14)
q̃ = q − qd , s is called the surface and Λ is a diagonal gain m1 = m2 = 1 kg, g = 9.81 m/s2 , L1 = L2 = 1 m
matrix having positive elements. To make the plant’s states
The objective is to move the robotic arm from an ini-
track the wanted behavior, the controller must stabilize the
tial position, θ0 = [− π2 π2 ]T to a final desired position
variable s at zero in spite of uncertainties of the plant model
θd = [ π2 − π2 ]T . The obtained results using PID controller
q̇ − sr = 0 (15) and SMC are presented in the following paragraph. The PID
controller parameters are selected as follows [2]:
The SMC design problem can be defined as seeking a con-      
troller that ensures the stabilization of s at zero regardless 15 7 10
KP = , KD = and KI =
of any bounded doubt in the dynamic model of the plant, 15 10 10
and guarantees the system states obey the surface s = 0 to
the states of dynamic equilibrium. In other words, the SMC The parameters of the SMC, on other hand, are taken as:
consist of two main parts: 
0.09
 
8

1) Equivalent control: This part must confirm that the states K = 150, φ = , and Λ = (20)
0.03 8
of the system follow the surface to the system’s dynamic
equilibrium. The equivalent control command is formed using The response using the PID controller is depicted in Fig.2, it
the nominal parameters of the system (without uncertainty) is clear that the PID controller take at least 5 seconds to bring
the arm at the desired position with maximum control input
F̂ = M̂ ṡr + Ĉsr + ĝ (16)
of less than 100 N.m as shown in Fig.3. The SMC, on other
where the hat is used to emphasis that these matrices are hand, is capable of moving the arm to the desired position
different form those of the real dynamic model as given by in less than 1 sec (see Fig.4), yet with a control signal of at
Eq. (4) which may contain uncertain dynamic parameters. least four times that of the PID as depicted in Fig.5. The high
2) Robust control law: The second part of a SMC must control signal is needed for fast movement of the arm which
guarantee that s becomes zero and remains zero even in increase the amplitude of the required torque at each joint.
the presence of uncertainty in the model parameters and The obtained results of both controllers are compared in
for an arbitrary initial conditions of the states. This part is Fig.6 and Fig.7 for join angles and control inputs respectively.
represented by an intermittent function of s that is attached to As shown in Fig.7 the required control signal in the case of
the equivalent control. A complete SMC law reads: SMC is much higher than that of the PID controller which
suggests that the SMC uses higher torque in order to move the
F = F̂ − Ksgn(s) = M̂ ṡr + Ĉsr + ĝ − Ksgn(s) (17)
arms to the desired position in short period of time (around 1
where K is a diagonal controller discontinuity gain matrix sec or less) which will consequently require fast movement of
whose elements must be suitably decided, and the ”sgn” the arm and this is evident in Fig.8 which clearly show that the
function returns a vector with the sign of the elements of required joint speeds are much higher for SMC compared to
s. However, this ”sgn” function may lead to a serious issue the PID controller. Table I summarizes the important response
in SMC called chattering since the surface parameters si characteristics.
Fig. 2. Trajectories of θ1 and θ2 using PID Fig. 5. Torques of θ1 and θ2 using SMC

Fig. 3. Torques of θ1 and θ2 using PID Fig. 6. Trajectories of θ1 and θ2 using PID and SMC

Fig. 4. Trajectories of θ1 and θ2 using SMC Fig. 7. Torques of θ1 and θ2 using PID and SMC
[7] A. Mohammad and S. S. Ehsan, Sliding mode PID-controller design
for robot manipulators by using fuzzy tuning approach, in Control
Conference, 2008. CCC 2008. 27th Chinese, 2008, pp. 170174.
[8] W. Zheng and M. Chen, Sliding mode tracking control of a two-link
robotic manipulator using nonlinear disturbance observer, in Informa-
tion, Cybernetics and Computational Social Systems (ICCSS), 2017 4th
International Conference on, 2017, pp. 192197.
[9] H. Ginsberg, Advanced engineering dynamics. Cambridge University
Press, 1998.
[10] H. M. Al-Qahtani, A. A. Mohammed, and M. Sunar, Dynamics and
Control of a Robotic Arm Having Four Links, Arabian Journal for
Science and Engineering, Oct. 2016.
[11] F. Fahimi, Autonomous Robots. Boston, MA: Springer US, 2009.

Fig. 8. Trajectories of joint speeds (θ̇1 and θ̇2 ) using PID and SMC

TABLE I
S TEP R ESPONSE C HARACTERISTICS

Property PID SMC


θ1 θ2 θ1 θ2
Settling Time (sec) 4.9042 6.7938 0.6338 0.5890 Amin A. Mohammed was born in Alhedor, East
Overshoot (%) 72.7300 45.0044 0 0 of Gezira, Sudan on 1st January 1988. He obtained
Peak 155.4570 130.5039 90 90 his B.Sc. degree in Mechanical Engineering from
University of Khartoum (UofK) in 2011, and the
M.S. degree in Mechanical Engineering from King
Fahd University of Petroleum & Minerals (KFUPM),
Saudi Arabia in 2015 where he is currently working
V. C ONCLUSIONS toward his PhD degree. His research encompass
A two links robotic manipulator was studied and it’s dynam- work across the fields of dynamics, control, robotics,
and wind turbines.
ics was modeled using Lagrange mechanics. A robust control
based on the conventional sliding mode controller is intro-
duced to control the motion of the robot at specific position
for pick and place activities along with PID control scheme.
The obtained results have shown that the SMC outperform the
PID controller in term of fast and robust response though with
higher control signal. The high joint speeds in case of SMC,
which are a consequence of high control signal in this case,
are required for rapid movement of the links . It is expected
that adaptive SMC control may lead to a better response which
is left for future work.
R EFERENCES Ahmed Eltayeb received the B.Sc. degree in Elec-
[1] A. Okubanjo, O. Oyetola, M. Osifeko, O. Olaluwoye, and P. Alao, tronic Engineering from the University of Gezira,
Modeling of 2-DOF Robot Arm and Control. Sudan in 2008, and the M.S. degree in Systems En-
[2] David, I., and G. Robles. ”PID control dynamics of a Robotic arm gineering from King Fahd University of Petroleum
manipulator with two degrees of Freedom.” Control de Procesos y & Minerals (KFUPM), Saudi Arabia in 2013. He
Robotica (2012): 1-7. is currently pursuing the Ph.D. degree in the Dept.
[3] M. Baccouch and S. Dodds, A two-link manipulator: simulation and of Control and Mechatronics at UTM University,
control design, University of Nebraska at Omaha, 2012. Malaysia. His research interests include linear and
[4] C.-T. Lin, K.-C. Liu, C.-W. Chung, and Y. Chang, Design of Sliding non-linear control systems particularly: robotics con-
Mode Controller for Two-Link Robot Manipulator, in Robot, Vision trol and unmanned aerial vehicles control.
and Signal Processing (RVSP), 2011 First International Conference on,
2011, pp. 9093.
[5] F. Piltan, S. Emamzadeh, Z. Hivand, F. Shahriyari, and M. Mirazaei,
PUMA-560 Robot Manipulator Position Sliding Mode Control Meth-
ods Using MATLAB/SIMULINK and Their Integration into Gradu-
ate/Undergraduate Nonlinear Control, Robotics and MATLAB Courses,
International Journal of Robotics and Automation, vol. 3, no. 3, pp.
106150, 2012.
[6] F. Piltan and N. B. Sulaiman, Review of sliding mode control of
robotic manipulator, World Applied Sciences Journal, vol. 18, no. 12,
pp. 18551869, 2012.

View publication stats

You might also like