Universal Robotics Term Project
For this project, I developed software and implemented control loops for a Universal Robotics arm as part of MEEN 408/612. This project showcased key concepts from the course, including trajectory generation, inverse kinematics, and dynamic control design. I focused on tuning joint-level gains to achieve critically damped responses under varying load conditions, ensuring smooth and stable motion. The system was initially built and tested in a Linux-based simulation environment using MeshCat for visualization, which was later transferred to the physical Universal Robotics arm for a live demonstration.

DH-Parameters
One of the first things we were required to do were to find the DH parameters, these are a standardized set of dimensions that can be used to describe the size shape and geometry of a robot arm. From this, you can generate transformation from each joint, until you reach the end effector.
​​
The Parameters to describe any joint are as follows
- θ (theta): joint angle (rotation about z-axis)
- d: link offset (translation along z-axis)
- a: link length (translation along x-axis)
- α (alpha): link twist (rotation about x-axis)






Transformation Matrices
These are transformation matrices generated from the DH-parameter table. Each one accounts for both rotation and translation with respect to each joint. By multiplying these matrices in a sequence you can get the overall rotation and position of any joint, or the end-effector, allowing you to generate forward kinematics, calculate the Jacobians, or calculate inverse kinematics. This gets very computationally heavy quickly though, and it's best solved by the programming, especially since it knows the joint angles at any given moment, and can therefore calculate the kinematics and inverse kinematics.
Bezier Curve Interpolation
The main portion of this project that we were responsible for was creating the control loop and the logic that followed it for controlling the robot arm. I decided to go with a modifed PID loop, with tunable gains for each independent joint. The PID control loopwould receive step inputs from a "feedtape" of points, that were then interpolated by a Bezier curve for smooth motion before being set as the desired position in the PID loop.

The PID Loop is explained in a high level by this single line of code.
Control Loop Structure
By using the desired accelerations and the mass matrix, it is able to create a feedforward torque. From this is subtracts the Proportional and Integral and Derivative corrections by multiplying the gains by their respective error. It also compensates for the gravity and Coriolis forces, defined as Vq. The P I and D variables are actually changed on a joint to joint basis, and are scaled by the mass matrix, so that joints with higher inertia receive proportionally stronger corrective torques. The integral error is denoted as "Jank" Since it's not a true integral, but instead is an approximation to make the calculations simpler and faster.

Simulation & Results
This was the simulation I submitted for my project. It focused on maximizing the robot’s responsiveness to a step input, then tested finer motions to evaluate how well the controller handled joint-level inertia. The code was graded in class and successfully moved the robot, though it didn’t complete the full program due to built-in safety limits. Our professor had capped the arm’s speed to prevent hardware and student damage. Still, the demo showed that my control loop could drive the robot to a target position, compensate for gravity, and coordinate joints with varying inertia effectively.