Lahcen Boulbalah
Abdelmalek Essaadi University

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Design and implementation of NMPC for a two-DOF robotic arm using CasADi Lahcen Boulbalah; Faiza Dib; Nabil Benaya; Khaddouj Ben Meziane
IAES International Journal of Robotics and Automation (IJRA) Vol 15, No 2: June 2026
Publisher : Institute of Advanced Engineering and Science

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.11591/ijra.v15i2.pp307-318

Abstract

Achieving accurate joint-space tracking in multi-link robotic arms is complicated by strong configuration-dependent nonlinearities and mandatory actuator limits that classical controllers are structurally unable to enforce. This paper presents a nonlinear model predictive control (NMPC) scheme for a two-degree-of-freedom (2-DOF) serial robotic arm, implemented within the CasADi symbolic computing environment to leverage automatic differentiation and sparse interior-point solving. The complete set of Lagrangian equations of motion-inertia, Coriolis, and gravity terms-is incorporated directly into the optimizer's prediction model through fourth-order Runge-Kutta (RK4) integration, eliminating the need for linearization. Torque, velocity, and angle bounds are imposed as native hard inequality constraints at every step of the finite-horizon optimization. Systematic simulations pit the proposed NMPC against a Ziegler-Nichols-tuned decentralized PID at two distinct sampling periods. The NMPC achieved a 95% reduction in peak tracking error relative to PID (0.0058 rad vs. 0.1347 rad for Joint 1), with mean error decreases of 64.65% and 57.58% for Joints 1 and 2 respectively, at an average solver time of 0.053 s-comfortably within the 0.1 s control cycle. The findings demonstrate that online NMPC with unabridged nonlinear dynamics is computationally practical for real-time joint control on standard computing hardware.