0% found this document useful (0 votes)
5 views8 pages

Homework2013 - 1 Robot Learning

This document is a homework assignment for a Robot Learning course, covering topics such as kinematics, control strategies, and machine learning. It includes various tasks that require calculations and explanations related to robotics, including forward and inverse kinematics, PID control, and performance evaluation of regression models. The assignment also involves implementing solutions using MATLAB and analyzing results from simulations.

Uploaded by

leilasamer2
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)
5 views8 pages

Homework2013 - 1 Robot Learning

This document is a homework assignment for a Robot Learning course, covering topics such as kinematics, control strategies, and machine learning. It includes various tasks that require calculations and explanations related to robotics, including forward and inverse kinematics, PID control, and performance evaluation of regression models. The assignment also involves implementing solutions using MATLAB and analyzing results from simulations.

Uploaded by

leilasamer2
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/ 8

Robot Learning

Winter Semester 2013/14, Homework 1


G. Neumann, R. Calandra, A. Paraschos
Due date: Thursday, 14 November 2013 (Before the lecture)

Aufgabe 1.1 Robotics in a Nutshell [15 Points]


The new and improved S-Bot 7000 is a multi-purpose robot platform. It is made of a kinematic chain consisting of a
linear axis q1 , two rotational axes q2 , q3 , and another linear axis q4 , as shown in the figure below. These four joints are
actuated with forces and torques of ui , i ∈ {1, 2, 3, 4}. A gripper is mounted onto the end of the robot, indicated by the
letter E. The robot is mounted on a table and its base is in the x base = [0, 0, 0].

q2 q3

L1
E

q4

q1
Z y

Side View

a) Forward Kinematics [2 Points]


Compute the kinematic transformation in the global coordinate system from the base, xbase , to the end-effector E .
Write the solution for the xend-eff = [x, y, z] T according to the joint values qi , where i ∈ {1, 2, 3, 4}.

1
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

b) Inverse Kinematics [2 Points]


Explain briefly what the inverse kinematics problem is and what generally is the main difficulty that you face on
computing it. Is it possible to model inverse kinematics with a function? Explain your answer.

c) Differential Kinematics [4 Points]


Compute the Jacobian matrix J(q) of robot, such that ẋ = J(q)q̇ where q̇, is the first time derivatives of the state
vector q of the robot. Explain in a sentence the physical meaning of the Jacobian and name an application that is
useful.

d) Singularities [3 Points]
How is the kinematic singularity defined in robotics? Under which conditions does our robot enter a singularity
and how can you detect it?

2
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

e) Workspace[4 Points]
Suppose that you would like to move the end effector of the robot as close as possible to the base on the x − y plane.
What is the necessary condition to achieve it? Can you show mathematically what is the shape of the manifold
when the condition is fulfilled? For this exercise assume that there are no joint limits for qi , where i ∈ {1, 2, 3}, but
q4 < L1 . (Hint: x 2 + y 2 = r 2 )

Aufgabe 1.2 Control[25 Points]


In robotic locomotion it is common to abstract from the robot by using an inverted pendulum models. In this exercise we
will use a planar double inverted pendulum to test different control strategies. Our robot can be controlled by specifying
the torque u = u1 , u2 of its motors. Consider that in mechanical systems the torque u is a function of the joint positions
q, velocities q̇ and accelerations q̈, as given by

u = M(q)q̈ + c(q, q̇) + g(q)

where M denotes the mass matrix, c(q, q̇) the Coriolis and centripetal forces, and g the gravity terms. In the following
exercises assume that these terms are given. For the programming exercises use the MATLAB environment to develop
your solutions and attach a printout with plots and source code for each exercise. The source code which provides you
the dynamics of the system as well as with a template script that will help you develop your solutions can be found at
http://www.ias.informatik.tu-darmstadt.de/uploads/Teaching/RobotLearningLecture/dynSys.tar.gz

3
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

a) PID Controller[2 Points]


What is the form of a proportional-integral-derivative (PID) controller and how could you use it to to control the
joint angles of a robot? What value would you use for the integral (I) gain and why?

b) PID Controller problems[3 Points]


Explain briefly the cases that the controller that you proposed in the previous question is not sufficient and performs
badly.

c) Gravity compensation and Inverse Dynamics Control[2 Points]


Suppose that you would like to create a control law to set the joint angles on the double inverted pendulum model
by controlling the torque of the motors. Write a feedback control law which additionally gravity compensates and
then extend it to full inverse dynamics control.

4
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

d) Comparison of different control strategies[7 Points]


Show the differences of the following control algorithms, PD, PD with gravity compensation, and full inverse
dynamics, in the following scenario: start from state qstart = [−π, 0] and set the target state of the controller
to qend = [0, 0]. Simulate the system with a time-step d t = 0.002 seconds using second-order Euler integration
in MATLAB. Run the simulation until 10 seconds has elapsed or when the maximum error distance between the
current and desired position is less that 5 10−4 rad. Use the following feedback gains K p = 500 and Kd = 50.
Explain briefly the behavior of the second DoF. Attach the plots of q, q̇ and source code to your solution.

e) Spline Interpolation[6 Points]


Redo the comparison but this time instead of setting the desired target state, interpolate using a spline. Consider
that our robot is sensitive to jerky motor commands and that you would like to set the desired velocity and
acceleration at the target state to zero. What is the simplest spline model that you could use in this case? First
explain your answer and then attach the plots and source code. How do you compare it against the set point
scenario?

f) Task Space Control[5 Points]


The robot must now reach a desired position in task space xend = [−0.35, 1.5]. Implement the Jacobian transpose,
Jacobian pseudo-inverse, and Jacobian pseudo-inverse with damping methods and show the intermediate steps
after 5,10,60 steps. Which of the methods do you prefer to use and why? The Jacobian of the system is given. You
are free to decide on how you will control the robot but explain briefly your selection.

5
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

Aufgabe 1.3 Machine Learning in a Nutshell [30 points]


Look at the following training set (available at:
http://www.ias.informatik.tu-darmstadt.de/uploads/Teaching/RobotLearningLecture/RL_1_train.txt)
x 0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 5.50 6.00
y -0.13 -0.31 1.33 0.73 -0.73 0.20 0.12 -0.81 -0.12 0.54 -1.59 -0.45 0.02
Based on these data, we want to learn a function mapping from x values to y values, of the form y = θ T φ(x).

a) Supervised vs Unsupervised Learning [2 Points]


The problem above is a Supervised learning task. Briefly explain why this is a supervised learning problem, and what are
the differences with unsupervised learning.

b) Regression vs Classification [2 Points]


Supervised learning is typically divide into regression and classification tasks. Briefly explain what are the differences
between regression and classification.

c) Linear Least Squares [4 Points]


Consider the training set above to calculate the feature values φ(x), and features φ(x) of the form sin(2n x). Compute
the feature values when using 2 features (n ∈ {0, 1}), 3 features (n ∈ {0, 1, 2}), and 8 features (n ∈ {0, . . . , 7}). Use the
Linear Least Squares (LLS) method to predict the output values y for each of the points x ∈ {0, 0.01, 0.02, . . . , 6} using
the different numbers of features. Attach a plot of the resulting predictions when using 2, 3 and 8 features.

6
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

d) Performance Evaluation [4 Points] q


1
PN predicted 2
The Root mean square error (RMSE) is defined as RMSE = N i=1 ( yi
real
− yi ) , where N is the number of
data points. Using LLS from exercise 3, train a different model for each of the number of features between 1 and 9, i.e.,
[1,2,3...,9]. For each of these models compute the corresponding RMSE on the training set. Attach a plot having on the
x axes the number of features and on the y axes the corresponding RMSE.

e) Model Selection part 1 [4 Points]


A validation set is shown in the following table. (available at:
http://www.ias.informatik.tu-darmstadt.de/uploads/Teaching/RobotLearningLecture/RL_1_validation.
txt)
x 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 5.25 5.75
y -0.15 0.46 1.48 -0.15 -0.24 0.92 -0.15 -0.43 0.44 -0.29 -1.44 0.43
Using the models trained in the previous exercise, compute the RMSE of the validation set for each of these models.
Attach a plot having on the x axes the number of features and on the y axes the corresponding RMSE (of the validation
set).

f) Model Selection part 2 [4 Points]


Show in the same plot the RMSE for the training and validation set (hint: plot of exercise 4 + plot of exercise 5). How
do they differ? Can you explain what is the reason of these differences (hint: remember the plot from exercise 3)? What
is the number of features that you should use (to achieve a proper modeling)?

7
Robot Learning - Homework 1

Name, Vorname: Matrikelnummer:

g) Kernel Functions [4 Points]


A kernel function k(xi , x j ) is given by the inner product of two feature vectors. Write out the kernel function for the
previous set of features where n = 3.

h) Kernel Regression [4 Points]


The kernel function in the previous question required explicit definition of the type and number of features, which is often
difficult. Instead, we can use a kernel that defines an inner product in a(possibly infinite
 dimensional) feature space.
2
Using the training set and an exponential squared kernel k(xi , x j ) = exp − σ12 xi − x j with σ = 0.7, predict the y
values at each of the points x ∈ {0, 0.01, . . . , 6}. Plot the results (hint: Use standard kernel regression: y(x) = k> K−1 Y
with Ki j = k(xi , x j ) and ki = k(x, xi )).

i) Performance Evaluation [2 Points]


Compute the RMSE of the validation set for the Kernel Regression model of the previous exercise. Compare it with the
RMSE for the “optimal” Linear Least Squares model (hint: remember what is number of features that you should use!).

Model RMSE
“Optimal” Linear Least Squares
Kernel Regression

You might also like