This project simulates a three-wheeled differential drive robot performing trajectory tracking using the RPP (Regulated Pure Pursuit) Law for path following and auto-tuning PID controllers for motor speed regulation.
The simulation focuses on a differential drive system where the motors are identified using system identification techniques to obtain the transfer functions for both left and right wheels.
-
System Identification: Motor dynamics are characterized by coefficients
$a_1, a_2, b_1, b_2$ for precise control. - Path Following: Implementation of the RPP Law to guide the robot along a predefined trajectory.
- Low-level Control: Dual PID controllers for independent motor speed synchronization.
- Trajectory: Rectangular path tracking.
- Trajectory Generator: Inputs a custom rectangular path.
-
Kinematic Controller (RPP): Calculates required linear (
$v$ ) and angular ($\omega$ ) velocities. -
Dynamic Controller (PID): Adjusts motor voltages based on the identified
$a, b$ coefficients.
To run the simulation, follow these steps in MATLAB:
- Open the project folder.
- Run
init.mto load parameters, identified coefficients, and controller gains. - Run
sim_result.mto visualize the performance graphs.
The simulation provides the following output plots:
- Robot's Trajectory: 2D mapping of the robot's movement vs. reference path.
- Cross-track Error: Deviation from the planned trajectory.
- Heading Angle: Orientation of the robot over time.
- Velocity Profiles: Both Linear and Angular velocities.
This project implements the Regulated Pure Pursuit algorithm as described in:
- S. Macenski, S. Singh, F. Martin, J. Gines, "Regulated Pure Pursuit for Robot Path Tracking," Autonomous Robots, 2023.
- MATLAB & Simulink
- System Identification Toolbox
- Control System Toolbox