0% found this document useful (0 votes)
32 views4 pages

Modeling A Controller For An Articulated Robotic A

Uploaded by

yugioh bee
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)
32 views4 pages

Modeling A Controller For An Articulated Robotic A

Uploaded by

yugioh bee
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/ 4

Intelligent Control and Automation, 2012, 3, 207-210

doi:10.4236/ica.2012.33023 Published Online August 2012 (http://www.SciRP.org/journal/ica)

Modeling a Controller for an Articulated Robotic Arm


Rajeev Agrawal1*, Koushik Kabiraj2, Ravi Singh1
1
Department of Production Engineering, Birla Institute of Technology, Ranchi, India
2
Department of Mechanical Engineering, Birla Institute of Technology, Ranchi, India
Email: *[email protected]

Received December 1, 2011; revised May 7, 2012; accepted May 15, 2012

ABSTRACT
The precise control upon each degree of freedom of a robotic arm is a great challenge in implementing industrial work.
This paper aims to design a novel controller for an automated robotic arm. A discrete Proportional Integral Derivative
(PID) control technique is being used to replace the complex electronic circuitry, which would greatly reduce the cost
and size of the controller. DC motors will be controlled on the basis of Closed-Loop System using an avr (Atmega 16/32)
microcontroller. Transfer functions have been derived for mathematical modeling of the system through which the sta-
bility of the system can be evaluated prior to fabrication.

Keywords: Robotic Arm; Proportional Integral Derivative (PID) Controller; Transfer Function; Computed Torque
Technique; Atmega 16/32

1. Introduction robotic arm, the basic problem is to determine the vari-


ous torque/forces to drive all the joints of the arm in real
The recent rapid progress in robotic technologies has led
time. This is done in order to track a desired time based
to great expectations for robots to be applied in various
trajectory as closely as possible. The motor current/
fields such as industrial robots, guard robots and home
voltage characteristics and the computed torque are con-
robots [1]. Robotic arms find vast applications in several
verted into an applied motor current/voltage which actu-
industrial automation processes such as manufacturing
ates the dc motors.
tasks, assembly lines etc. [2]. Motion control of a robotic
A closed loop PID controller is being used to reduce
arm can be classified into many categories. Lygorouas et
the overshoot, rise time and the steady state error. A PID
al. [3] developed a computer-controlled light weight me-
controller usually comprises of a Proportional, Integral
chanical arm. This mechanical arm was a self-contained,
and Derivative circuitry but here the whole PID control-
autonomous system capable of executing high-level com-
ler is implemented through programming which greatly
mands from a supervisory computer. The actuators of the
reduces the electronic circuitry as well as cost of the sys-
joints were permanent magnet type DC motors driven by
tem. This approach also simplifies tuning of the propor-
servo amplifiers via Pulse Width Modulation. Aung [4]
tional (Kp), integral (Ki) and derivative (Kd) gains. The
designed and implemented a controller circuit based on
computed voltage from the error signal is applied to the
PIC microcontroller and H bridge circuit to control the
motor by Pulse Width Modulation (PWM) technique.
motion of a Wheeled Mobile Robot (WMR). He used
A Transfer function is a mathematical expression
MATLAB software for the modeling of the total system.
which relates the input and output variables by using La-
Silva [5] applied fuzzy logic at several hierarchical levels
place transform. This can be modeled via MATLAB
of a typical robotic control system. For controlling ro-
(SIMULINK) to obtain the various performance charac-
botic manipulators, Moosavian [6] used Transpose Jaco-
teristics of the whole system which may be in the form of
bian (TJ) control. Arciniegas et al. [7] developed neural
graphs. Here an approximate transfer function is derived
network based adaptive control system to control the
considering the parameters such as damping, moment of
flexible robotic arm. Tseng [8] developed a DSP based
inertia, gear ratio etc.
instantaneous torque controller to control the manipulator.
The first section gives insight into modeling of system
Rogers [9] designed a microcontroller circuit for inter-
using a suitable transfer function. It is followed by the
facing joint sensor to control robotic arm. In this text a
concepts of Proportional Integral Derivative control.
unique computed torque technique is being used to actu-
Then, the advantage of implementing a discrete PID con-
ate the various joints. Given the dynamic equation of a
troller is highlighted by using an atmega 16/32 bit mi-
*
Corresponding author. crocontroller.

Copyright © 2012 SciRes. ICA


208 R. AGRAWAL ET AL.

2. Transfer Function K p  e t 
Va  t   (1.4)
The transfer function of a single joint can be well ap- n
proximated by Equation (1.1) using the following vari- Taking Laplace transform:
ables:
K p E s
Va = Armature voltage (Volts) Va  s   (1.5)
La = Armature inductance (Henry) n
Ra = Armature resistance (Ohms) Substituting the value of Va(s) from Equation (1.5) to
θm = Angular displacement of thee motor shaft (Radi- Equation (1.3) the following equation is obtained:
ans) L  s Ka K p
Jeff = (Jm + n2JL)  G s  (1.6)
Jm = Moment of inertia of the motor referred to the
E s  s  sRa J eff  Ra f eff  K a K b  
 
motor shaft (oz.in.s2/rad) After some algebraic manipulation the following equa-
JL = Moment of inertia of the load referred to the load tion is obtained:
shaft (oz.in.s2/rad)
n = Gear reduction ratio
L  s  G s

feff = (fm + n2fL)  d  s  1  G  s  
fm = Viscous friction coefficient referred to the motor Ka K p
shaft (oz.in.s/rad) (1.7)
Ra J eff
fL = Viscous friction coefficient of the load referred to 
the load shaft (oz.in.s/rad)  2  Ra f eff  K a K b   Ka K p  
n = Gear reduction ratio s   s 
  Ra J eff   Ra J eff  
Ka = Motor torque proportional constant (oz.in/A)
Kb = Proportionality constant between ω (angular speed) Equation (1.7) is a proportional controller for a single
and eb (back emf) joint and is always stable is the system parameters are
Kp = Position feedback gain positive. To increase the system response time and re-
θd = Desired angle duce the steady state error an appropriate PD, PI or PID
e(t) = (θd(t) – θ(t)) the error in position controller can be used.
In case of a PID controller:
m  s 
Va  s 

 K p  e  t    Ki   e  t  dt   K d
d
 
e  t  
Va  t   
(1.1) dt 
Ka (1.8)
 n
 
 s s 2 J eff La   La f eff  s  Ra f eff  K a K b 
  In Equation (1.8) Kp, Ki and Kd are the position, inte-
gral and derivative feedback gain respectively.
Since the electrical time constant of the motor is much
Taking Laplace transform of Equation (1.8):
smaller than the electrical time constant, the armature
E s
inductance (La) can be neglected. K p  E  s    Ki
s

 Kd s  E  s  
Hence, Va  s   (1.9)
m s n
Ka
 (1.2)
Va  s   s  sRa J eff  Ra f eff  K a Kb  
The closed loop transfer function is obtained by per-
  forming some algebraic manipulations after substituting
Since the output of the controller is the angular dis- the value of Va from Equation (1.9) to Equation (1.3)
placement of the joint (θL), therefore it can be written: L  s 
L  s nK a d  s 
 (1.3)
 s  sRa J eff  Ra f eff  K a K b  
Va  s   Ka Kd  2  Ka K p   K a Ki 
 
 s  s 
This is an open loop second order system, to improve  Ra J eff   Ra J eff   Ra J eff 

the response of the system a closed loop Proportional,  Ra f eff  K a K b  K a K d   K a K p  K a Ki
PD, PI or PID controller can be used. This helps in re- s3  s 2  s 
 Ra J eff   Ra J eff  Ra J eff
ducing the rise time and the steady state error. In case of
a simple Proportional closed loop control the applied (1.10)
voltage is linearly proportional to the error between the For implementing a PD control Ki should be 0;
desired and the actual angular displacement of the joint. And for a PI control Kd should be 0.

Copyright © 2012 SciRes. ICA


R. AGRAWAL ET AL. 209

The values of Kp, Ki and Kd has to be determined ac- Alternatively the timer interrupt can be activated and
curately to get the best system performance. The Ziegler- the PID() function can be called in that interrupt. After
Nichols method can be used to determine the “Best Fit” each time interval T the timer interrupt is executed and
value of the three parameters. The Ziegler-Nichols tun- hence the PID() function is called.
ing method is a heuristic method of tuning a PID con- In case the feedback component is an optical shaft en-
troller. It is performed by setting the “I” (integral) and coder then the value of the encoder is taken as an exter-
“D” (derivative) gains to zero. The “P” (proportional) nal interrupt in the microcontroller. After that the angle is
gain, is then increased (from zero) until it reaches the converted to an equivalent voltage and finally the error
ultimate gain Ku, at which the output of the control loop signal is computed.
oscillates with a constant amplitude. Ku and the oscilla- To increase accuracy the P-factor, I-factor and D-factor
tion period Tu are used to set the P, I, and D gains de- arescaled with a factor 1:128. The result of the PID algo-
pending on the type of controller used. rithm is later scaled back by dividing by 128. The value
128 is used to allow for optimizing in the compiler.
3. Discrete PID Controller The computed voltage after the PID algorithm is exe-
A discrete PID controller reads the error signal, calcu- cuted is generated by using PWM (Pulse Width Modula-
lates the output and controls the input given to the motor tion) technique, which can be very easily done using
at a given time interval, at the sample period T. The sam- Atmega 16/32.
ple time should always be less than the shortest time
constant in the system. 6. Conclusion
The paper has presented an alternative solution for con-
4. Algorithm for the Discrete PID Controller trolling robotic arm using discrete PID controller tech-
Unlike simple control algorithms, the PID controller is nology. The PID controller presented here is a simplified
capable of manipulating the system inputs based on the example. The controller should work fine, but it might be
history and rate of change of the signal. This gives a necessary to make the controller even more robust (limit
more accurate and stable control method. runaway/overflow) in certain applications. Adding satu-
Considering Equation (1.8) ration correction on the integral term, basing the propor-
tional term on only the system process value can become

 K p  e  t    Ki   e  t  dt   K d
d
 e  t   necessary. In calculating the I-factor and D-factor the
Va  t   
dt  sample time T is a part of the equation. If the sample time
n T used is much smaller or larger than 1 second, accuracy
Here, e(t)dt can be approximated as T  e  k  where k for either I-factor or D-factor will be poor.

varies from 0 to n and  e  t   can be approximated as


d
7. Acknowledgements
dt
e  n   e  n  1 We thank The Institution of Engineers (India) for sup-
, t = nT and n is the discreet step at time t. porting this work through a grant-in-aid. We are also
T
grateful to the Department of Production Engineering,
BIT Mesra for providing the required infrastructure.
5. Implementation in Atmega 16/32
Microcontroller
Atmega 16/32 is a 16bit avr microcontroller that has in-
REFERENCES
built 8-bit and 16-bit timers. These timers are used to set [1] T. A. Salih and O. I. Yehea, “A Novel Control System for
a pre-specified time interval, and an Interrupt Service Robotics Devices,” Journal of Theoretical & Applied In-
Routine (ISR) is executed after every such time interval. formation Technology, Vol. 28, No. 1, 2011, pp. 48-53.
The PID controller uses a structure to store its status [2] P. I. Corke and S. Hutchinson, “A Tutorial on Visual Servo
and parameters. This structure is initialized in main(??), Control,” IEEE Transactions on Robotics and Automation,
Vol. 12, No. 5, 1996, pp. 651-670.
and only a pointer to it is passed to the Init_PID() and doi:10.1109/70.538972
PID() functions.
[3] N. Lygorouasjohn, G. Mertziosbasil and C. Voulgaris-
The PID() function must be called for each time inter- Nicholas, “Design and Construction of a Microcomputer-
val T. This is done by a timer which sets the PID_timer Controlled Light-Weight Robot Arm,” Robotics and Auto-
flag when the time interval has passed. When the PID_ nomous Systems, Vol. 7, No. 4, 1991, pp. 269-283.
timer flag is set the main routine reads the desired pro- doi:10.1016/0921-8890(91)90058-S
cess value (setPoint) and system process value, calls [4] W. P. Aung, “Analysis on Modeling and Simulink of DC
PID() and gives the output to the control input. Motor and Its Driving System Used for Wheeled Mobile

Copyright © 2012 SciRes. ICA


210 R. AGRAWAL ET AL.

Robot,” World Academy of Science, Engineering and Tech- “Neural-Networks-Based Adaptive Control of Flexible Ro-
nology, Vol. 32, 2007, pp. 299-306. botic Arms,” Neurocomputing, Vol. 17, No. 3-4, 1997, pp.
[5] C. W. de Silva, “Applications of Fuzzy Logic in the Con- 141-157. doi:10.1016/S0925-2312(97)00037-4
trol of Robotic Manipulators,” Fuzzy Sets and Systems, [8] K. J. Tseng, “DSP-Based Control of Brushless DC Drives
Vol. 70, No. 2-3, 1995, pp. 223-234. for Direct-Driven Robotic Arms,” Microprocessors and
doi:10.1016/0165-0114(94)00219-W Microsystems, Vol. 19, No. 10, 1995, pp. 581-589.
[6] S. Ali, A. Moosavian and E. Papadopoulos, “Modified doi:10.1016/0141-9331(96)84159-7
Transpose Jacobian Control of Robotic Systems,” Auto- [9] J. R. Rogers, “Low-Cost Teleoperable Robotic Arm,” Me-
matica, Vol. 43, No. 7, 2007, pp. 1226-1233. chatronics, Vol. 19, No. 5, 2009, pp. 774-779.
doi:10.1016/j.automatica.2006.12.029 doi:10.1016/j.mechatronics.2009.03.004
[7] I. Arciniegasjorge, H. Eltimsahyadel and J. Cioskrzysztof,

Copyright © 2012 SciRes. ICA

You might also like