Four homework assignments from the Robotics course (M.Sc. in Control Systems Engineering, University of Padova, 2024/25). Together they walk through the classical manipulator pipeline: solving the inverse kinematics numerically, deriving the dynamic model from the Lagrangian, proving its notable properties, and finally closing the loop with model-based controllers.
All work is in MATLAB / Simulink, with CasADi used for symbolic kinematics on the UR10. Each folder contains the source code, the resulting plots, and the report I submitted.
| Topic | What it covers | Code | |
|---|---|---|---|
| HW1 | Numerical inverse kinematics | Analytical IK of a planar 3R arm, then gradient descent and Newton's method compared on step size, initial condition and convergence rate; damped pseudo-inverse regularization to escape singularities | MATLAB |
| HW2 | Dynamic modelling | Euler-Lagrange model of a planar prismatic-revolute manipulator: DH frames, partial Jacobians, inertia matrix, Christoffel symbols, equations of motion — plus a point-to-point trajectory with zero boundary velocity | MATLAB (symbolic) |
| HW3 | PD & adaptive control | Notable properties of the model, a PD controller with gravity compensation proven globally asymptotically stable via Lyapunov, linear parametrization Y(q,q̇,q̈)π = τ, and an adaptive controller with online parameter estimation |
— (analytical) |
| HW4 | Control of real manipulators | PD with gravity compensation vs. feedback linearization on a 4-DOF SCARA in Simulink, benchmarked across four reference frequencies; forward kinematics and dynamics of a 6-DOF UR10 with CasADi | MATLAB + Simulink |
HW2 and HW3 study the same planar prismatic-revolute manipulator: HW2 builds the model, HW3 designs controllers on top of it.
Why Newton beats gradient descent — and when it fails. In HW1, gradient
descent with α = 0.5 oscillates and never converges; with α = 0.1 it converges
but crawls through the low-gradient region near the target, needing up to 500
iterations. Newton's method converges in 5 iterations, confirming the
expected quadratic rate — but returns NaN from one of the two initial
conditions, because the joint trajectory passes through a singular
configuration where the Jacobian loses rank. Adding a damped pseudo-inverse
fixes both methods at once.
Feedback linearization scales, PD does not. In HW4, keeping the SCARA's tracking error acceptable with PD + gravity compensation required the gains to grow from Kp = 2500 to Kp = 30000 as the reference frequency went from ω = 0.5 to ω = 10 rad/s — unbounded growth that makes the approach practically unusable. Feedback linearization holds the error small across the whole range with modest gains.
MATLAB R2021a or later. HW1 and HW2 need the Symbolic Math Toolbox; HW4 needs Simulink, Control System Toolbox and CasADi on the path for the UR10 part.
Entry points are listed in each homework's README. Compiled artifacts
(.mexw64, .slxc) are deliberately not committed — MATLAB regenerates them.
Geremia Paoletto — @GeremiaPaoletto
All four assignments were completed individually.
The PDFs under
assignment/are the original problem statements distributed by the course instructor and are included only as context for the reports.