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

Proceeding of the IEEE

International Conference on Information and Automation


Wuyi Mountain, China, August 2018

Control of a Two-link Robotic Arm


using Fuzzy Logic
Nairi Dersarkissian1, Ruting Jia1*, Danielle Lima Feitosa2
1. Department of Electrical and Computer Engineering
Email: ruting.jia@csun.edu.
2. Department of Mechanical Engineering
California State University, Northridge.
Northridge, USA

Abstract – Wheelchair mounted robotic arms (WMRA) aim to paper, we introduced fuzzy logic to implement fuzzy logic
help individuals with physical disabilities such as spine controllers (FLC) that use feedback control laws without
injuries or amputated arms by improving independent living
and social participation of individuals with upper extremity knowing parameters of the control plants. The design and
impairments. Various research has been conducted and simulation of a large size control system should be based
shown different ways of controlling the position of a robotic on the best available knowledge instead of the simplest
arm using Proportional Integral-derivative (PID). However,
available model to deal with uncertainties in the system.
Fuzzy Logic Controller (FLC), when well designed, can
behave like a nonlinear controller or even like a set of linear Therefore, a large size system is better treated by
PID controllers that operate differently according to the knowledge-based approaches specifically fuzzy logic.
inputs. Using FLC in this application has benefits in various Fuzzy controllers are simple systems that allow nonlinear
aspects mentioned in the paper. Therefore, the focus of our
research is to prove the performance of the studied position control laws to conciliate uncertainty. We explain the
controller using Fuzzy Logic. The assessment is based on entire system parts in the following sections.
system efficiency, settling time to changes in the command The paper is organized as follows: Section II reviews the
signals and system overshoot. mathematical model of a two-link robotic arm. In section
Keywords– DC motor; Fuzzy Logic Controller; WMRA; PID. III, the fuzzy logic and fuzzy inference system and the
method implementation are explained. Section IV
I. INTRODUCTION discusses the results. The conclusion is written is Section
V.
According to the national center for health statistics,
over 39 million Americans have difficulty performing
functional activities [1]. Robotic arm aids [2] are one of II. MATHEMATICAL MODELING
the leading solutions for individuals that have difficulty
performing physical activities or spinal disabilities. To have a better understanding on how Lagrange’s
WMRAs often use DC motor position controllers to equations apply to a simple robotic system, we have a two-
control the position of a robotic arm. DC motor position link robot manipulator displayed in Figure 1. By modeling
systems are commonly controlled by (PID) control each link as a homogeneous rectangular bar with mass
approach with PID coefficients adjusted to improve and moment of inertia tensor I as given in equation (1) [4]:
efficiency of the operation. The main objective of the
robotic arm controller is to achieve the desired position in
case of having a dysfunctional arm or spine injury. The 0 0
objective of a PID controller in a position control system is = 0 0 . (1)
to maintain a position set point at a given value and be able 0 0
to accept new values dynamically [3]. Recent position
control environments require controllers that can cope with
parameter variations and system uncertainties. In this

481
978-1-5386-8069-8/18//$31.00 ©2018 IEEE
Considering = sinθ , = sin (θ +θ ), and similarly for
and . The kinetic energy becomes,

T( , )= ( + ) + + ( + )+
( ,

2
T( , )= . (11)

Where
Fig. 1: Two-link robotic arm
= + + ( ,
Relative to a frame attached at the center of mass of the
link and aligned with the principal axes of the bar. ∈ is = ,
the translational velocity of the center of mass for the
link and ∈ R3 is the angular velocity, the kinetic energy = .
of the manipulator is given by [4]:
Lastly, the Lagrangian L=T was substituted into Lagrange’s
equations to obtain the following equation:
T( , = || || || || . (2)
2 (
+ = . (12)
0
The kinetic energy is solved by using the kinematics
equation and by letting = ( , , 0) be specified by the
The first term in the above equation represents the inertial
position of the center of mass. 1 and 2 are the distance
forces due to acceleration of the joints, the second term in
from the joints to the center of mass for each link, as
the equation represents the Coriolis and centrifugal forces,
shown in equations (3) through (10), we have [4]:
and the right-hand side is applied torques [4].

= , (3)
III. Design Overview
= , (4)
A comparison between PID controllers and FLC
= , (5) controllers is done to show the pros and cons of each
controller. In general, FLC controllers have a small to
= , (6) relatively no overshoot while PID controllers have large
overshoot [5]. In robotic arm applications, large overshoot
= - , (7) would be a major issue as far as safety and efficiency. FLC
in our design evaluated the system in real time making it a
= , (8) faster system. Settling time to reach the desired position is
another aspect to consider when designing a controller. In
=-( + - , (9) general, PID usually has less oscillations while FLC has
more oscillations. In our project, having oscillations is not
a major concern since oscillations do not impact the
=( + + . (10)
system reliability to reach the desired position.

482
The Fuzzy logic controller design considers two inputs
that are significant to obtain accurate results. The two The feedback of the system consists of a potentiometer
inputs are: the change between current voltage and transfer function that converts the DC motor output
previous voltage using equation (13) shown below, position signal into an input voltage signal, next, the
concurrently, the change between current error rate and voltage signal is fed back into the system as an input.
previous error rate in every cycle using equation (14) Equation 6 below shows the transfer function used for the
shown below [3]: potentiometer,

e = v– , (13) (
= 0.159. (16)
(

Δe = , (14)
IV. FUZZY LOGIC CONTROLLER (FLC)
DESCRIPTION AND DESIGN
Next, the two inputs mentioned earlier join the fuzzy logic
controller that will be described in detail in the next
The purpose of this study is to classify the different
section. The output of the controller is connected to the DC
possible arm positions using a Mamdani-type fuzzy
motor used under our study. The dc motor converts the
inference system with two inputs and one output. Two
input voltage signal into an output position signal and has
cases were tested and analyzed, the first case includes five
the following parameters:
membership functions for the two inputs and the output as
shown in Figures 3 and 5. The second case includes seven
Table 1. DC Motor Parameters
membership functions for the two inputs and the output as
1.5 ohms (armature resistance) shown in Figure 4. The standard procedure of fuzzy
controller design was used, which consists of fuzzification,
2.3 mH (armature inductance) control rule-based design, and defuzzification. 1)
0.040832 NM/Amp (torque constant) Fuzzification: Fuzzify the crisp inputs individually and
combine the fuzzy control rules for each one of them. The
0.04098726 volt/rad* (emf constant) fuzzy controller employs two inputs: The error signal and
the rate of change of the error signal.
J 4.942*10 Kg- (rotor inertial)
Fuzzy inference system with the five membership
functions and the seven membership functions consist of
The transfer function of the controlled dc motor is given as triangles are designed.
[3]:


( / ( ∗
M(s) = = ∗ ∗ . (15)
( ∗

Fig. 3: Five Membership Functions case for input e(t) and


Fig. 2: DC Motor Transfer Function (Δe).

483
PS Positive Small

PM Positive Medium

PB Positive Big

3) Defuzzification: in this stage, the fuzzy output is


defuzzified into a crisp value to be used by the DC motor.
In this design, the output value determines the voltage that
is used as an input in the DC motor's transfer function.
Fig. 4: Seven membership functions case for Inputs e(t),
(Δe) & output. Table 3: Summary of the fuzzy rules
∆e\ e NB NM NS ZE PS PM PB
NB ZE PS PS PM PM PB PB
NM NS ZE PS PS PM PB PB
NS NS NS ZE PS PS PM PM
ZE NM NS NS ZE PS PS PM
PS NM NM NS NS ZE PS PS
PM NB NM NM NS NS ZE PS
PB NB NB NM NM NS NS ZE

Fig. 5: The output (voltage) for the five membership V. RESULTS AND DISCUSSION
functions case
. The overall Simulink model shown in Figure 9 illustrates
the controller, the plant, the reference, and the feedback
2) Control Rule-based design: The linguistic variables signal. The results are tested in two different controller
for all inputs and output are stated as follows: NB, NM, cases, five membership functions and seven membership
NS, ZE, PS, PM and PB. The model with the seven functions. The five membership functions case has less
membership functions contains 49 rules as shown below in oscillations and shorter settling time. The seven
the table 3 that summarizes the rules used. The model with membership functions case has more oscillations and
the five membership functions used the same linguistic longer settling time. The five membership functions'
variables except NM and PM which makes it contain only controller is selected since it has a smaller overshoot, less
25 rules performing similarly. settling time and less oscillations.

Table 2: Linguistic variable’s description Figure 6 and 7 show the simulation results in a 3D surface
Linguistic Description: generated by the fuzzy controller rules, inputs and outputs
Variable: variables for the five and seven MF cases respectively. The
NB Negative Big seven MFs case provides a more linear surface since it
contains additional rules that consider more possibilities as
NM Negative Medium
far as the position of the robotic arm compared to the five
NS Negative Small MFs case.

ZE Zero Although FLC performs better than the PID controller in


some respects, using PID Controllers are

484
manifest the best control method design solution. The
simulation results for the five-membership and the seven-
membership cases show that both controllers function
properly and have an overshoot, which is considered
within the acceptable range. The case of five membership
functions controller has shorter settling time and less
oscillations compared to the seven membership functions'
controller, as shown in Figure 8 and 10 respectively.
However, the steady state error in the seven membership
functions controller is smaller compare to the 5 MFs one.
The design of a DC motor positioning system using
fuzzy logic reveals that using FLC in the position control
application, shorter settling time can be achieved by tuning
the control rules, membership functions, and universe of
Fig. 6: Five MFs simulation results (3D surface) discourse of the output variable.
A suggestion to reduce the overshoot and the steady
essential to compensate for the lack of the FLC in a state error presented in the Fuzzy Logic Controller is to
WMRA system. Therefore, we believe to design a hybrid combine it with PID controller [5], [7]. Using FLC in this
Fuzzy-PID controller will further improve the application has benefits in various aspects such as flexible
performance. and can perform as a nonlinear controller, real time results
and being able to use feedback control laws without
knowing parameters of the control plants.
For future work, we will combine PID controller with
fuzzy logic controller in order to achieve better control
performances. Additionally, we will include a transfer
function for a 2 degree of freedom (2 DOF) robotic arm in
the previously mentioned system.

Fig. 7: Seven MFs simulation results (3D surface)

VI. CONCLUSION

The most common types of disability involve difficulties


with walking or independent living [6]. A wheelchair
mounted robotic arm has the capability of providing an
extended physical ability for wheelchair-bound
individuals. This study arranges the different methods used
to design a controller to control the position of a
wheelchair mounted robotic arm using an advanced fuzzy Fig. 8: Simulation result in the five MFs case.
inference system. This study is also used to identify and

485
Fig. 9: Overall closed loop Simulink model

[3] Paul I-Hailin,Santai Hwang and John Chou, "COMPARISON ON


FUZZY LOGIC AND PID CONTROLS FOR A DC MOTOR POSITION
CONTROLLER" Indiana-Purdo University Fort Wayne.

[4] Richard M. Murray, Zexiang Li and S. Shankar Sastry, A Mathematical


Introduction to Robotic Manipulation. 1994, CRC Press.
[5] Haidar A. Malki, Dave Misir, Denny Feigenspan and Guanrong Chen,
Fuzzy PID Control of a Flexible-Joint Robot Arm With Uncertainties from
Time-Varying Loads. IEEE Transactions on Control Systems Technology,
vol. 5, no. 3, pp371-378, 1997. [6] Kristen Bialik, 7 FACTS ABOUT
AMERICANS WITH DISABILITIES, Pew Reasearch Center, 2017.
[7] Musa Mailah and Nurul Izzah A. R., INTELLIGENT ACTIVE FORCE
CONTROL OF A ROBOT ARM USING FUZZY LOGIC. 2000 IEEE
TENCON proceedings. Intelligent Systems and Technologies for the New
Millennium, pp291-296, Malaysia.

Fig. 10: Simulation result in the seven MFs case.

REFERENCES

[1] Summary Health Statistics: National Health Interview Survey, 2015.


Table A-10a. Age-adjusted percentages(with standard errors) of difficulties in
physical functioning among adults aged 18 and over, by selected
characteristics: United States, 2015.
[2] Lea, R.N, J. Hoblit and Y. Jani, " FUZZY LOGIC BASED ROBOTIC
ARM CONTROL". IEEE 2nd International Conference on Fuzzy Systems,
pp128-133, vol.1, San Francisco, CA, 1993.

486

You might also like