Modeling, Simulation and Control of A Robotic Arm PDF
Modeling, Simulation and Control of A Robotic Arm PDF
Nafiseh Ebrahimi
Department of Mechanical Engineering; the University of Texas at San Antonio
𝑑𝑖 𝑑θ𝑚
𝐿𝑎 + 𝑅𝑎 𝑖 = 𝑉 − 𝐾𝑒 (3)
𝑑𝑡 𝑑𝑡
𝑑2θ 𝑑θ
𝐾𝑡 ∗ 𝑖 − 𝑇𝐿𝑜𝑎𝑑 − 𝐽𝑚 ( 2 ) − 𝑏𝑚 ( ) = 0 (5)
𝑑𝑡 𝑑𝑡
𝐾𝑡 𝐼(𝑠) = (𝐽𝑚 𝑠 + 𝑏𝑚 )𝑠 θ(s) (6)
Ө𝑚 (𝑠) 𝐾𝑡
𝐺𝑚 = = (7)
𝑉(𝑠) 𝑠[(𝑅𝑎 + 𝐿𝑚 𝑠)(𝐽𝑎 𝑠 + 𝑏𝑚 )𝐾𝑏 𝐾𝑡]
The loot locus is drawn for just open loop transfer function
𝑏𝑙𝑜𝑎𝑑 𝐽𝑙𝑜𝑎𝑑
𝑏𝑒𝑞 = 𝑏𝑚 + , 𝐽𝑒𝑞 = 𝐽𝑚 + with gain K=1. However, if there is a variable gain (K) in the
𝑛2 𝑛2
system for maintaining stability of the system K would have a
Substituting Jeq and beq in Eq. (7), the total equivalent range of K< 415.
transfer function, relating input voltage Vin and Arm-load On the other hand, stability can be considered investigating the
output angular position θLoad, is given by Eq. (8). In this eigenvalues of A (system state matrix). if the eigenvalues are
transfer function, gear ration (n) which is the transfer function positive, the system will not satisfy the condition of BIBO
of gear system is included. stability, and will therefore become unstable.
The eigenvalues of matrix A are: 0, -0.9521, -4.3449, therefore
θ 𝐿𝑜𝑎𝑑 (𝑠) the output signal magnitude would not exceed a finite amount
𝐺=
𝑉𝑖𝑛 (𝑠) and it is stable.
𝐾𝑡 ∗ 𝑛
𝐺= (8)
𝐿𝑎 𝐽𝑒𝑞 𝑠3 + (𝑅𝑎 𝐽𝑒𝑞 + 𝑏𝑒𝑞 𝐿𝑎 )𝑠 2 + (𝑅𝑎 𝑏𝑒𝑞 + 𝐾𝑡 𝐾𝑏 )𝑠
B. System Performance Characteristics
The robot arm system to be designed, has the following
nominal values; arm mass, M= 8 Kg, arm length, L=0.4 m, Step response of open loop system to Vin= Step= 1V is:
and viscous damping constant, b = 0.09 N.sec/m. The
following nominal values for the various parameters of
eclectic motor used: Vin=12 Volts; Jm=0.02 kg·m²; bm
=0.03; Kt =0.023 N-m/A; Kb =0.023 V-s/rad; Ra =1 Ohm;
La=0.23 Henry; TLoad, gear ratio, for simplicity, n=1.
−5.2969 −4.1366 0 1
𝑋 . = [ 1.0000 0 0] 𝑋 + [0] 𝑈 (10)
Fig.4. Open loop step respnse
0 1.0000 0 0
𝑌 = [0 0 0.7896] 𝑋 + [0]𝑈
It is obvious that this system with no feedback from output
will continue to infinity. Using MATLAB, below system
III. OPEN LOOP SIMULATION performance characteristics obtained (table 1).
A. Stability
Table1. Open loop system characteristics
Rise Time: NaN
Settling Time NaN
Settling Min NaN
Settling Max NaN
Overshoot NaN
Undershoot NaN
Peak Inf
Peak Time Inf
Table 3. Effects of PID controller parameters Fig.7. Closed loop system with P controller step response
CL Rise Overshoot Settling S-S Error
Response Time Time
System specifications for the controlled system is shown in
Kp Decrease Increase Small Decrease table 4.
Change
Table 4. P controlled system characteristics
Ki Decrease Increase Increase Eliminate Rise Time: 63.70
Kd Small Decrease Decrease No Settling Time 114.72
Change change Settling Min 0.91
Settling Max 0.9993
Overshoot 0
Therefore, for the mentioned system which has settling time
more than 300 seconds the most important coefficient would Undershoot 0
be Kd which decrease settling time. On the other hand, using Peak 0.9993
Ki would worsen the condition of settling time. In terms of Peak Time 212.20
steady-state error, it is already zero and does not need any
action. Similarly, overshoot is already zero and does not need Trying larger Kp s like 100 and 1000 still does not reach
to be considered. desired specification. Then, we need to take into the picture
We are going to investigate two types of controller on the other coefficients Ki and Kd. Ki is used for steady state error
closed loop system in the following. elimination while we do not have any. The main problem for
the system is high settling time so as mentioned before we
need to work with Kd to reduce this quantity. In next section
B. P Controller we focus on PID controller design.
Using PID tuner MATLAB proposes Kp, Ki and Kd
coefficients which are used in PID command to draw the step
response of the controlled system. C. PID Controller
We chose P type of controller in MATLAB, PID tuner and We chose PID type of controller in MATLAB, PID tuner and
obtained following coefficient as first estimation: obtained following coefficient as first estimation:
Kp= 101
Ki= 0
Kd= 94
Step response for closed loop system with PID controller is matrix is equal to the order of system (n). The scheme of full
depicted in Fig.8. state feedback system is depicted in Fig.9.
System specifications for the PID controlled system is listed 𝑈 = −𝐾𝑋 (15)
in table 5.
This leads to the following closed loop system
Table 5. PID controlled system characteristics
Rise Time: 1.29 𝑋 . = (𝐴 − 𝐵𝐾)𝑋 = 𝐴𝐶𝐿 𝑋 (16)
Settling Time 1.98
Settling Min 13.58 where
Settling Max 15.26
Overshoot 1.74 𝐴𝐶𝐿 ≡ (𝐴 − 𝐵𝐾) (17)
Undershoot 0
The gain matrix is designed in such a way that
Peak 15.26
Peak Time 2.92 |𝑆𝐼 − (𝐴 − 𝐵𝐾)| = (𝑠 − 𝑃1 )(𝑠 − 𝑃2 ) … (𝑠 − 𝑃𝑛 ) (18)
Steady state error is zero as well. Then all designing where 𝑃1 , … 𝑃𝑛 are the desired pole locations.
specifications are satisfied with final chosen Kp, Ki and Kd. Solving for K, the gain matrix K is obtained such that the state
feedback control places the closed-loop poles at the loations
of desired poles. That means the eigenvalues of A – BK are
V. FULL STATE FEEDBACK CONTROL AND LINEAR equal to the desired poles.
QUADRATIC REGULATOR CONTROL According to characteristics equation obtained from desired
specification design (Eq.14) we have the following dominant
A. Pole Placement poles:
pole placement, is a method employed in feedback control
system theory to place the closed-loop poles of a plant in pre- P1,2 = -2.0±2.0976i
determined locations in the s-plane.[1] Placing poles is
desirable because the location of the poles corresponds The third pole is chosen such that its magnitude be more than
directly to the eigenvalues of the system, which control the three times of the dominant poles. Fig.10 shows step response
characteristics of the response of the system. The system must of the system after applying pole placement method.
be considered controllable in order to implement this method.
This technique is widely used in systems with multiple inputs
and multiple outputs, as in active suspension systems.
In order to implement pole placement method all state
variable must be measurable. Moreover, system must be
controllable. Using pole placement technique, we could get
the closed loop poles to the desired location. Not only the
“dominant poles”, but “all poles” are forced to lie at specific
desired locations. Our system state space model expressed in
Eq. (10) is controllable because the rank of its controllability
The state feedback control gain matrix K is obtained as
𝐾 = 𝑅 −1 𝐵𝑃 (20)
𝐴𝑇 𝑃 + 𝑃𝐴 − 𝑃𝐵𝑅−1 𝐵𝑃 + 𝑄 = 0 (21)
The weighting matrices are specified such that the closed loop
system is able to track the reference signal with a control
signal that does not significant violates the saturated actuator
limits. The minimum value of J in Eq. (19) is obtained as
𝐽𝑚𝑖𝑛 = 𝑥 𝑇 (0)𝑃𝑥(0)
Fig.10. Full State Feedback Control step response For our simulation we assumed Q and R as follows to design
optimal control.
System specifications for the controlled system is listed in
𝑄 = 104 ∗ 𝐶 ∗ 𝐶 𝑇
table 6.
Table 6. Full state feedback controlled system characteristics 𝑅 = 10−4
Rise Time: 0.81
Settling Time 2.24 In Fig.11 the step response of the system after applying LQR
Settling Min 0.90 technique is displayed. We manipulated R to obtain
Settling Max 1.04 acceptable system characteristics from the optimization.
Overshoot 4.19
Undershoot 0
Peak 1.04
Peak Time 1.73
VII. ACKNOWLEDGMENT
I would like to take this opportunity to express my profound
gratitude and deep regard to Dr. Bing Dong for his guidance,
valuable feedback and constant encouragement throughout
the duration of the project. His valuable suggestions were of
immense help throughout my project work.
VIII. REFERENCES
[1] G. O. Young, “Synthetic structure of industrial plastics
(Book style with paper title and editor),” in Plastics,
2nd ed. vol. 3, J. Peters, Ed. New York: McGraw-Hill,
1964, pp. 15–64.
[2] W.-K. Chen, “Linear Networks and Systems” (Book
style). Belmont, CA: Wadsworth, 1993, pp. 123–135.