File Exchange

image thumbnail

Impedance Control for a 2-Link Robot Arm - User-interactive

version (8.95 KB) by Matthew Sheen
Click and drag to watch the arm respond. Includes well-commented derivation code.


Updated 25 Jun 2016

From GitHub

View license on GitHub

Video here:

2-link planar arm with a compliant controller and gravity compensation. The user can click and drag to move the end-effector's target position. Hit a keyboard key to change to "disturbance-mode." This mode instead applies a disturbance force to the end-effector.

MAIN.m -- Run this first!
Plotter.m -- Display the arm and integrate the equations in real time
deriverRelativeAngles.m -- Derives all dynamics and controls equations.
ALL other files -- Auto-written by deriverRelativeAngles.m

Cite As

Matthew Sheen (2021). Impedance Control for a 2-Link Robot Arm - User-interactive (, GitHub. Retrieved .

Comments and Ratings (15)

ning lu

Gabriele Sisinna

Thank you so much!

Asjad Malik

Cw Sun


mohammad bagheri

mohammad bagheri

yue ma

jing luo

mohammad bagheri


XD Zhou

Matthew Sheen

For the specifics, look in deriverRelativeAngles.m. You'll find the symbolic derivation of the impedance control. As a broader reference, see section 19.4.2 of I referenced this pdf when making.

Could you please submit the equations used for the impedance control?


good! Get it!

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!