Skip to content

Nonlinear Model Predictive Control of a Differential Drive Robot in MATLAB, with Extended Kalman Filter based Sensor Fusion and State Estimation

License

Notifications You must be signed in to change notification settings

Fonyuy45/nova_carter_mpc

Repository files navigation

Nonlinear Model Predictive Control of a Differential Drive Robot in MATLAB, with Extended Kalman Filter based Sensor Fusion and State Estimation

Model Predictive Control and Extended Kalman Filter based Sensor Fusion (wheel odometry and IMU) / State Estimation for the NVIDIA Nova Carter differential-drive robot, implemented and validated in MATLAB.

image

Tracking Rectangular Trajectory with curved corners

image image

Project Overview

This project simulates closed-loop autonomy for the Nova Carter AMR platform using:

  • A 5D kinematic model with actuator dynamics
  • An Extended Kalman Filter (EKF) for sensor fusion
  • A Nonlinear Model Predictive Controller (NMPC) for trajectory tracking

Developed entirely in MATLAB, the system fuses encoder and IMU data for robust state estimation and generates smooth, feasible control commands under realistic actuator constraints.


Robot Specifications

  • Platform: Segway RMP Lite 220 + NVIDIA Jetson AGX Orin
  • Wheel radius: 0.140 m
  • Track width: 0.414 m
  • Max speed: 3.0 m/s
  • Max angular rate: 2.0 rad/s

Getting Started

Prerequisites

  • MATLAB R2021b or later
  • Optimization Toolbox (for NMPC)
  • Control System Toolbox

Setup

>> git clone https://github.com/Fonyuy45/nova_carter_mpc
>> cd nova-carter-mpc

>> setup_project
>> cd tests
>> test_closed_loop_autonomy_optionB

Features

Phase 0: Kinematic Model (Option A)

  • 3D state: [x, y, θ]
  • Forward/inverse kinematics
  • Wheel velocity conversions
  • Trajectory generation (circle, spiral, line)
  • Constraint checking

Phase 1: EKF + NMPC Integration (Option B)

  • 5D state: [x, y, θ, v, ω] including actuator dynamics
  • EKF with encoder + IMU fusion
  • NMPC with actuator dynamics and acceleration constraints
  • Closed-loop simulation with realistic motor lag
  • Tracking error and estimation diagnostics

Results

  • EKF achieves <2 cm position error and sub-degree heading accuracy in simulation
  • NMPC generates smooth control commands respecting acceleration limits
  • Full autonomy stack validated over 500-step simulations with reference tracking

Author

Dieudonne YUFONYUY
LinkedIn | GitHub


References


License

MIT License


Star this Repository if you found this helpful

About

Nonlinear Model Predictive Control of a Differential Drive Robot in MATLAB, with Extended Kalman Filter based Sensor Fusion and State Estimation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages