← All projects

Completed

Robotic Arm: SolidWorks Design to Simscape Control

A robotic arm taken from CAD design to physics simulation. SolidWorks models are imported into Simscape Multibody, inverse kinematics turn a target point into joint angles, and PID control is demonstrated on a simpler two-joint version.

Robotic ArmMechanical CADPhysical SimulationInverse KinematicsPID Control

Overview

Designing a robotic arm is more than drawing parts: you also need to know it can move smoothly, carry its own weight and reach the point you ask for. This project follows the whole path, from a multi-link arm designed in SolidWorks to a physics-based simulation in MATLAB Simscape Multibody.

Two models are included. A simple two-joint arm is used to learn PID tuning, and a larger five-part arm with a gripper is driven by inverse kinematics.

What the project is about

A robotic arm has to do more than look right: its parts must move smoothly, carry their own weight and reach the point you ask for. This project follows that whole path. The arm is designed in SolidWorks, brought into MATLAB as a physics model, and then given the maths to move to a target position.

The five-part robotic arm assembled from the SolidWorks models
The arm assembled from the exported SolidWorks parts (rendered from the project's CAD files).

From CAD to a physical model

The arm was modelled as separate parts in SolidWorks and assembled. The assembly carries each part's mass, centre of mass and inertia, so when it is imported into Simscape Multibody the simulated arm feels gravity and joint loads like a real one. When the arm is stretched out, for example, the base joint really does need more torque to hold the pose.

The individual SolidWorks parts of the arm
The CAD parts: base, links, joint housing and the gripper finger, each shown on its own.

Two models

  • 2-DOF tutorial arm: a simple two-joint arm used to study PID control, set a target point and watch how the gains change overshoot and settling.
  • Advanced arm: a larger arm with a base turntable, shoulder, elbow, wrist and a two-finger gripper, moved by inverse kinematics.
The simpler 2-DOF tutorial arm
The 2-DOF tutorial arm.

Telling the arm where to go

Instead of guessing each joint angle, you give the arm a point in space (X, Y, Z in millimetres) and the inverse kinematics script works out the angles. The base turns toward the target, and the shoulder and elbow are solved from the arm's link lengths with simple trigonometry. The wrist is then tilted to keep the gripper level. If the target is out of reach, the script warns and clamps it to the arm's maximum reach.

Side view of the assembled robotic arm
Side view of the arm.

Making it simulate reliably

  • Setup scripts load the model, fix the base to the table, lock the gripper joints and add the angle inputs, so the model is ready with one command.
  • CAD imports often fail with a “degenerate mass” error when massless parts are joined directly. A tiny extra mass body between the joints (IntermediateMass) fixes it without changing the arm.
Workflow from SolidWorks CAD through Simscape, inverse kinematics and PID control
The workflow: CAD to physical model, target point to joint angles, and control on top.

Where it stands

The arm moves in step jumps to each target rather than along a smooth trajectory, and the joint-angle offsets between the maths and the CAD model are marked for calibration in the scripts. Natural next steps are smooth trajectory planning, camera-based object detection and moving the control to ROS 2 for hardware tests.

CAD files, MATLAB scripts and setup instructions are in the project repository.

Media

The five-part robotic arm assembled from the SolidWorks models
The five-part robotic arm assembled from the SolidWorks models
Side view of the assembled robotic arm
Side view of the assembled robotic arm
The individual SolidWorks parts of the arm
The individual SolidWorks parts of the arm
The simpler 2-DOF tutorial arm
The simpler 2-DOF tutorial arm
Workflow from SolidWorks CAD through Simscape, inverse kinematics and PID control
Workflow from SolidWorks CAD through Simscape, inverse kinematics and PID control