EE5325 Course Project: Robot Arm Control
We will use the 2-link planar elbow robot arm for simulation studies. Assume link masses m1 , m2 are
concentrated at the ends of the links. The length of link 1 and link 2 are a1 and a2 , respectively.
Submission: For design problem without given control law or control gain, list the control law and
choose appropriate gain by your own. Paste all MATLAB code and simulation results into the report
(PDF format). Submit all M-files zipped in one folder.
Part I: Modeling (10 pts)
Problem 1 (5 pts) Robot Dynamics
Derive the robot arm dynamics with
M (q)q̈ + N (q, q̇) = τ.
Problem 2 (5 pts) State-Space Form
Based on Problem 1, write the state-variable representation with
T
T
x = θ1 θ2 θ̇1 θ̇2 ,
u = τ = τ1 τ2 .
Part II: Open-Loop Simulation (15pts)
Problem 3 (15pts)
Simulate the arm in Problem 2 in MATLAB using ode23 in 20 seconds with:
• Parameters: m1 = m2 = 1 kg, a1 = a2 = 1 m, g = 9.8 m/s2
• Input: τ1 = sin(2πt), N · m, τ2 = cos(2πt), N · m
• Initial states: [θ1 (0) θ2 (0) θ̇1 (0) θ̇2 (0)]T = [0 0 0 0]T .
Plot:
(a) Time vs. joint angles
1
(b) Time vs. joint angular velocity
(c) 3D plot of time vs. end effector position
Part III: Closed-Loop Control (75pts)
Problem 4 PD-gravity Control (15pts)
Design a PD-gravity controller. Simulate the arm in Problem 2 using ode23 in 10 seconds with:
• Parameters: m1 = m2 = 1 kg, a1 = a2 = 1 m, g = 9.8 m/s2
• Gains: kp1 = kp2 = 2500; kv1 = kv2 = 100
• Desired joint trajectory: qd1 = 0.1 sin(2πt), qd2 = 0.1 cos(2πt)
• Initial states: [π/3 π/3 0 1]T .
Plot:
(a) Time vs. joint angles
(b) Time vs. tracking errors
(c) Time vs. control torques
(d) 3D plot of time vs. end effector position
Discussion: What are the limitations in the control design?
Problem 5 Controller Design (15pts)
To overcome the limitation of controller in Problem 4, design a controller that is capable of overcoming
the limitation. Repeat Problem 4.
Problem 6 Controller Design (15pts)
Consider the disturbances τd = 5N m for each joint in robot dynamics. Design a control such that the
tracking error converges to 0. Repeat Problem 4.
Problem 7 Controller Design (15pts)
Consider the torque for each link with upper limit of 15N m and the lower limit −15N m. Repeat Problem
4 using PID computed-torque control with initial states [θ1 (0) θ2 (0) θ̇1 (0) θ̇2 (0) ε1 (0) ε2 (0)]T =
[0 0 1 2 0 0]T .
Problem 8: Only choose one between a) and b) (15pts)
a) Assume the parameter m1 and m2 are unknown. Design an adaptive control such that the tracking
error converges to 0. Repeat Problem 4.
b) The computed-torque controller requires exact knowledge of m1 and m2 . In practice, parameters are
uncertain. Design a robust to parametric uncertainty. The controller uses parameters m̂1 = m̂2 = 0.8 kg
while the true values are m1 = m2 = 1 kg. Design a robust control such that the tracking error is
bounded. Repeat Problem 4.
2