Assignment 1 Robotics 2023
Assignment 1 Robotics 2023
Assignment 1 Robotics 2023
Question 1.
Consider Fig.1., which describes a 2-dof robot arm. The Euler-Lagrange dynamics will be of the following form (as
Choose all the paprameters such as mass, link-length as unity. Choose gravity g = 10 unit. (Your task is to code these
exact expressions of the different components M(q), V (q, q̇) and G(q) for the given manipulator.)
case a) Desired trajectory : qd = [ π3 , π4 ]T , (set-point regulation)
case b) Desired trajectory : qd = [ π4 sin(t), π5 cos(t)]T (sinusoidal tracking)1
Consider the following proportional derivative (PD) control input2
1
Assignment Sayan Basu Roy ([email protected]) 1
where e(t) , q(t) − qd (t) is tracking error and k1 > 0 and k2 > 0 are controller gains. Consider the initial conditions
as q(0) = [0, 0]T and q̇(0) = [0, 0]T , assuming t = 0 as the initial time and choose the controller gains as k1 = k2 = 1
(Note that if the tracking performance is not satisfactory, you may have to tune the gains appropriately!).
Simulate the dynamics and the controller for both of the above mentioned cases of desired trajectories. (You can use
Simulink or Matlab/Python/C++ script with appropriate ODE-solver depending on your preference.) Also visualize
the motion of the manipulator using Peter Corke’s Toolbox or any other visualization tool corresponding to both the
cases.
What you have to submit :
1> Simulink file or matlab/python/C++ code (including the visualization part; you may consider a separate code for
visualization if required!)
2> Plot of time evolution of the following variables for both the cases during the time-span t ∈ [0, 10].
a> e-vs-t,
b> ė-vs-t
c> τ-vs-t.
with a brief description in a pdf file.
3> A video file comprising the animation of both the cases.
Put all of these in a zip file and upload it in the google classroom.