Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2016 IEEE 59th International Midwest Symposium on Circuits and Systems (MWSCAS), 16-19 October 2016, Abu Dhabi,

UAE

Modeling Analysis and Simulation of 2-DOF


Robotic Manipulator
Samia M. Mahil, Student Member, IEEE, Ahmed Al-Durra, Senior Member, IEEE
Department of Electrical Engineering
The Petroleum Institute, Abu Dhabi, United Arab Emirates
sammahil@pi.ac.ae, aaldurra@pi.ac.ae

Abstract—Robotics is a very active field that crosses the Then by using the Langrangian equation of motion we obtain
traditional boundaries of engineering. The field combines the dynamics of the system. The final dynamical equation is
various engineering disciplines and merges numerous linearized around nominal equilibrium points to get the state
engineering applications. Robotics manipulators present a space matrices.
complex area of study related to kinematics, dynamics, computer
vision and control. In this paper we present the mathematical A. Forward Kinematics by Denavit Hartenberg Convention
model of a 2-DOF robotic arm using Denavit Hartenberg A typical approach for obtaining the forward kinematics of
convention and the Langrangian equation of motion. The 2-DOF a robotic planner is through the Denavit Hartenberg (DH)
robotic arm is a highly dynamic nonlinear system that requires convention [2].
complex methods of control. In our paper we attempted to
linearize the mathematical model around nominal equilibrium
points we then utilized the linearized state space equations in the
measurement of three qualitative analysis defined by stability,
controllability and observability. According to the qualitative
analysis results we designed two types of controllers; full state
feedback controller and LQR in addition to a full order observer.

I. INTRODUCTION (ROBOTIC MANIPULATORS)


Robotic manipulators are the most common industrial
robots encountered in different applications including car
Fig. 1. Respective Coordinate systems for 2-DOF Robotic Arm
manufacturing, space exploration, and medical surgeons [1]. A
robotic manipulator has other terminologies like (arm and The Denavit Hartenberg convention was implemented by
planner) [2]. Due to the vast applications of theses robots, the following four main rules explained in [2]. The DH parameters
need to design and test different control approaches to improve differ according to the type of joint into variable and constant
its performance, optimizing both precession and accuracy has parameters. Table (1) presents the DH parameters of the 2-
become a necessity and an important research area. In the next DOF robotic arm system.
section we present the mathematical model of the system TABLE I. DH PARAMETERS OF 2-DOF ROBOTIC PLANNER
starting with the forward kinematics by Denavit Hartenberg Joint i ai ri di i

convention, followed by the Langrangian equation of motion. 1 L1 0 0 θ1


The resulted dynamical equations are used to obtain the state 2 L2 0 0 θ2
space model of the system after it undergoes a linearization
process. In the proceeding sections we utilize the state space After obtaining the DH parameters of the system we
matrices in the measurement of three qualitative analysis attempt to find the transformation matrices to relate the base
defined by stability, controllability, and observability. frame with the end effector frame by its successive coordinate
According to the qualitative analysis results we design two system as shown in figure (1). The homogenous transformation
types of controllers; a full state feedback controller and LQR. of the robot arm is governed by the following equation:
Finally we cascade the designed controller with a full order = ( )× ( ) × ( ) × ( ) (1)
observer to form a full order compensator.
The equation consists of four similarity transformations.
II. MATHMATICAL MODEL OF 2-DOF ROBOTIC ARM The final homogenous transformation is the multiplication
result of the four similarity transformations
Our 2-DOF robot arm system composes of two revolute
joints. The length of the two arm links (L1, L2) respectively is
1m and the weight of both links (M1, M2) is 1kg. The rotational ( + ) − ( + ) ( ( + ) +
angles of the revolute joints are (θ1, θ2). ( + ) ( + ) ( ( + )) + ( )
=

The mathematical model of the nonlinear system has been


developed through a systematic approach. The mechanism of
the arm was treated as a combination of open Kinematic-chains The linear displacements in terms of x and y can be retrieved
[1]. Through the formulation by Denavit Hartenberg from the above equation as the following
convention we derive the forward kinematics of the system. = cos (3)

978-1-5090-0916-9/16/$31.00 ©2016 IEEE


2016 IEEE 59th International Midwest Symposium on Circuits and Systems (MWSCAS), 16-19 October 2016, Abu Dhabi, UAE

= cos cos( + ) (4)


+ ℎ ℎ +ℎ
= sin (5) = (26)
−ℎ 0
= sin + sin( + ) (6)
B. System Dynamics by Langarngian Equation of Motion C. Linearization and State Space Model
The Langrangian equation of motion is a second order To obtain the state space model we convert the equivalent
differential equation defined as the difference between kinetic model to a linear model by defining new constants from C1 to
energy and potential energy [2]. We start by redefining the C6 [3].
kinetic energy equation as the following = − ( − ) + ( − ) −
= ( )( ) (7)
The matrix D is the inertia matrix, while D (q) is a [C − cos ( x − x )]x
symmetric positive definite matrix that is in general =T
configuration dependent. c T
The translational part of the kinetic energy is − cos(x − x )
C
+ = { + c c
+ cos(x − x ) sin(x − x )x
} (8) C
c c
+ cos( x − x ) cos x − C cos x
The rotational kinetic energy of the overall system is C
1 0 1 1 (28)
{ + } (9)
0 0 1 1 x = x (29)
The new ( ) matrix entries are:
x = x (30)
= + ( + +2 +
2 cos ) + + (10) x = θ x = θ x = θ x = θ (31)
= = ( +2 cos ) + (11) = = = = = = (32)
= + (12) Next we obtain the state space model using linearization
The Christoffal symbols are computed in three dimensional around equilibrium points
matrix as: = − ; = 0 (33)
= = 0 (13) = 0; = 0; = 0; = 0 (34)
The state space model after linearization will be:
= = = − sin =: ℎ (14) 0 0 1 0
∆ 0 0 0 1 ∆
= − = ℎ (15) ∆ ∆
= 0 0 +
= − = −ℎ (16) ∆ ∆
∆ 0 0 0 ∆
= = = 0 (17)
0 0
= = 0 (18) 0 0

The potential energy of the two joints manipulator will be (35)

the sum of the potential energy of each. The potential energy
0
will be the mass multiplied by the gravitational acceleration
and the height of its center of mass. ∆
= (19) ( ) 1 0 0 0 ∆
= (36)
= ( + sin( + )) (20) ( ) 0 1 0 0 ∆
= + = ( + ) sin + sin( + ∆
) (21) Finally, we choose constant values from C1 to C6 as shown
The functions ∅ is defined as in table (2) to substitute in the state space model.
∅ = =( + ) cos + cos ( + ) Table II . CONSTANT VALUES USED IN STATE SPACE MODEL
(22) C1 C2 C3 C4 C5 C6

∅ = = cos ( + ) (23) 1.27 -0.1189 1.01 -0.58 -2.19 -14.54

The final dynamical equations of the system are


The state space matrices are
+ + + + + ∅ =
(24) 0 0 1 0
+ + + ∅ = (25) 0 0 0 1
The ( , ) matrix will be = (37)
−0.4568 −0.6196 0 0
0.2485 −6.6174 0 0
2016 IEEE 59th International Midwest Symposium on Circuits and Systems (MWSCAS), 16-19 October 2016, Abu Dhabi, UAE

0 0 1 0 0 0
0 0 0 1 0 0
= (38)
0.7870 −0.0426 0 0 1 0
0.04285 0.1349 0 0 0 1
0 0 1 0
III. QUALTIATIVE ANALYSIS OF THE 2-DOF ROBOTIC
0 0 0 1
MANIPULATOR
−4.4560 −0.6196 0 0
The qualitative analysis of nonlinear systems is important 0.2485 −6.6174 0 0
for highlighting some of the key concepts of stability in O=
−4.4560 −0.6196 0 0
nonlinear dynamics [4]. For the 2-DOF robotic arm system we 0.2485 −6.6174 0 0
measure the three qualitative analysis respectively of the 0 0 −4.4560 −0.6196
linearized state space model. 0 0 0.2485 −6.6174
A. Stablity of 2-DOF Robotic Planner 0 0 −4.4560 −0.6196
0 0 0.2485 −6.6174
The internal and external stability of the linear state space
model was examined by determining the poles and eigenvalues 19.7020 6.8611 0 0
respectively using MATLAB software. −2.7517 43.6360 0 0
(43)
For BIBO stability we extract the poles of the system The matrix has full row rank which indicates that the linearized
through the command pole (sys). state space model is observable.
0 + 2.12 2) 0 − 2.12 3) 0 + 2.5581 4)0 −
2.5581 (39) IV. CONTROLLER AND OBSERVOR DESIGN FOR 2-DOF ROBOTIC
All the obtained poles have zero real parts which indicate MANIPULATOR
that the linearized model is not BIBO stable since the zero real The qualitative analysis of the linearized model provided
parts are repeated [6]. the basis to design a full state feedback controller and a linear
For Internal stability we use the command eig (A) to obtain quadratic regulator followed by the design of a full order
the eigenvalues of (A) matrix and determine the type of observer. Using Simulink we combine the full order observer
stability. with the state feedback controller to get a full order
1)0 + 2.12 2) 0 − 2.12 3) 0 + 2.5581 4)0 − 2.5581 compensator as shown in figure (2).
(40)
Since all the eigenvalues have zero real parts we check the
Jordan form of matrix (A) using the command Jordan (A).
0 + 2.12 0 0 0
0 0 − 2.12 0 0
(41)
0 0 0 + 2.5581 0
0 0 0 0 − 2.5581
The associated Jordan blocks of the zero eigenvalues are of
order one which indicates that the system is
marginally/Lyapunov stable.
B. Controllablity of 2-DOF Robotic Planner
The command ctrb (sys) in MATLAB was used to
calculate the controllability matrix of the state space model
[6].
=
1 0 0.7870 −0.6196 0 0 −3.5334 2.6774
0 0 0.0428 0.1349 0 0 −3.5334 −1.0467
0.7870 −0.6196 0 0 −3.5334 2.6774 0 0 Fig. 2. Full order compensator of 2-DOF Robotic Arm
0.0428 0.1349 0 0 −0.0877 −1.0467 0 0
(42) A. State Feedback Controller
The matrix has full row rank which indicates that the linearized As stated by stability measurement, the linear model
state space model is controllable. requires a state feedback controller using pole placement
C. Observablity of 2-DOF Robotic Planner method to drive it to be BIBO and asymptotically stable [5, 6].
The linearized model of the system is controllable which
The command obsv (A, C) in MATLAB was used to permit the design of state feedback controller.
calculate the Observability matrix of the state space model [4].
2016 IEEE 59th International Midwest Symposium on Circuits and Systems (MWSCAS), 16-19 October 2016, Abu Dhabi, UAE

optimization of the cost function with respect to the values of


the state feedback gain K.
C. Full Order observor
The design of state feedback controller and LQR holds
under the implicit assumption that states variables are
available [4]. However this assumption might not hold if the
state variables are not accessible for direct connection or
sensing devices are not available or expensive. The linearized
model of the system is observable as proved earlier which
permit the design of closed loop observor.
Fig. 3. Output response of Theta one and two with respect to State Feedback Figure (5) shows the output response of the full state
Controller
estimator along with the state feedback controller, due to the
The input to both links is a step function referring to [7] fast observer poles, the output response of the full order
with an angle of 0.78 rad. The output response after compensator is identical to the response achieved from the
implementing the state feedback controller as shown in figure state feedback controller separately, assuming we have a full
(3) induced a stable response for 1 and 2 versus input one, access to the state variables for the second condition.
consequently the settling time was 2s for both angles with no
significant overshoot. The output response of versus the
second input is almost zero while the output response of is
stable with no significant overshoot and a settling time of 2s.
However the responses of both angles subjected to the two
inputs suffers from significant steady state error which can be
further reduced using feed forward gain or integral action.
B. Linear Quadtratic Regulator (LQR)
LQR algorithm defines the optimal pole location based on
two cost matrices Q & R where Q is positive definite and R is
a positive semi-definite [6].
Fig. 5. Joint angles and speed states response of the Full Order Observer with
state feedback controller

V. CONCLUSION
In this paper we presented the modeling, analysis and
simulation of a 2-DOF robotic manipulator. The linear
mathematical model of the system was used in the
measurement of three fundamental qualitative analysis.
According to the analysis results we attempted to improve the
system performance through the implementation and
simulation of two different types of controllers: state feedback
controller and LQR followed by a full order observer using
Fig. 4. Output response of theta one and two with respect to LQR.
MATLAB/Simulink.
Choosing different values of Q and R result in different REFERENCES
responses of the system [8]. In our design we fixed the value
[1] M. Xie, Fundamentals of Robotics: Linking Perception to Action,
of R to 0.01 while the Q matrix was computed in MATLAB World Scientific Publishing Co Pte Ltd, 2003..
using the following equation [2] S. H. M. V. Mark W. Spong, Robot Modeling and Control, WILEY,
= × × (44) December 2005.
[3] A. M. M. &. A. AL-SAIF, "Modeling, Simulation and Control of 2-R
Where P is a scaling factor with a value of 50. Figure (4) Robot," Global Journal of Researches in Engineering:Robotics &
shows the output responses of and with respect to step Nano-Tech, vol. 14, no. 1, 2014.
inputs after implementing LQR. The response towards [4] C.-T. CHEN, Linear System Theory and Design, vol. Fourth Edition,
versus input one and the response of versus input two both New York: Oxford University Press, 2013.
[5] E. A. Mattar, "Neural Net Control of High Nonlinear 2-DOF
suffer from an overshoot percentage. In addition to steady Nonlinear Robotic Arm," in IACSIT 2014, Dubai, May-2012.
state error which can be resolved as stated in previous section. [6] P. M. P. b. N. S. Amit Kumara, "Trajectory control of a two DOF
The pole placement and LQR approaches have both rigid–flexible space robot by a virtual space," Robotics and
Autonomous Systems, pp. 473-482, 2013
induced a stabilized system however a key difference was the [7] Shahab, M. (2008). 2DOF Robotic Manipulator Control Design &
Simulation.-Dahran
[8] Z. J. A. B. H. a. M. R. T. Teng Fonga, "Design and Analysis of
Linear Quadratic Regulator for a Non-Linear Positioning System,"
Applied Mechanics and Materials, vol. 761, pp. 227-232, 2015.

You might also like