Scilab · Autonomous Robotics · 4WS

Agricultural Robot Simulator

A high-fidelity closed-loop simulation environment for 4-Wheel Steering autonomous vehicles navigating unstructured agricultural terrains — slip, mud, slopes and all.

Path Tracking Frenet-Serret Curvilinear Abscissa Bicycle Model 4WS Control State Observer Kinematic Inversion Lyapunov-based Adaptive Observer PD Control Backstepping Exact Linearization Model Predictive Control Tire Dynamics Pacejka Magic Formula Actuator Lag
Scroll

0 Modules
0 Control Laws
0 Observer Types
0 Trajectories

Closed-Loop Pipeline

Every simulation tick flows through four stages, from raw GPS waypoints to physical wheel forces — and back through state observers.

Path Tracking
Butterworth filter · Frenet-Serret frame · Curvature · Closest point · Lateral & heading errors
System Models
Kinematic & dynamic bicycle model · State observers · Slip angle estimation
Vehicle Dynamics
Rigid-body equations of motion · Pacejka tire model · Actuator delay · Euler integration
State Vector
Updated \(X,\, Y,\, \theta,\, \beta,\, \delta_F,\, \delta_R\) fed back to next iteration

What's Inside

Seven self-contained modules, each solving a distinct challenge of autonomous navigation on real agricultural terrain.

01 Overview
Overview

Defines the simulator's architecture, scope, and physical foundations. Introduces the closed-loop pipeline from raw GPS waypoints to steering commands, establishes the Extended Bicycle Model, and lists the key geometric and inertial parameters of the vehicle.

Global Architecture Bicycle Model Parameter Table
02 Icon Path Tracking
Path Tracking & Error Computation

Converts raw RTK-GPS waypoints into smooth, derivable trajectories. Finds the robot's closest point on the path, computes lateral and heading errors in the Frenet-Serret frame, and anticipates upcoming curvature for feedforward control.

Butterworth Filter Polynomial Fitting Curvature
03 Icon Math Foundations
Mathematical Foundations

Establishes the complete kinematic and dynamic model in the moving reference frame. Handles tangent singularities, angular wrapping, and first-order actuator delay modeling via state-space representation.

Extended Kinematic Model Path Scale Factor Actuator Delay
04 Icon Vehicle Dynamics
Vehicle Dynamics & Physical Modeling

Simulates a full rigid-body 4-wheel vehicle. Implements the extended bicycle model, Pacejka-inspired lateral tire force generation, and Euler integration for real-time state propagation under non-linear terrain conditions.

Yaw Inertia Newton-Euler Pacejka Magic Formula
05 Icon State Observer
State Observers

Tire slip angles can't be measured without prohibitively expensive sensors. Three observer architectures — Kinematic Inversion, Luenberger and Lyapunov-based Adaptive Observer — reconstruct \(\beta_F\) and \(\beta_R\) in real-time from available measurements.

Kinematic Inversion Luenberger Lyapunov-based Adaptive Observer
06 Icon Front Axle
Front Axle Control

Three levels of control sophistication for the primary steering actuator: a baseline PD, a non-linear Exact Linearization via Backstepping, and a predictive GPC layer that compensates for hydraulic actuator lag.

PD Control Backstepping GPC
07 Icon Rear Axle
Rear Axle Control

The rear axle is an active contributor: counter-phase for tight headland turns, in-phase for crab steering on slopes, and quadratic curvature-based resolution for heading stabilization without disturbing lateral tracking.

Crab Steering Counter-phase Quadratic Law

From PD to Predictive Non-Linear

The simulator stacks four control laws of increasing sophistication, letting you benchmark each against real agricultural constraints — curvature, slip, actuator lag — in the same environment.

  • PD Controller Baseline linear proportional-derivative. Fast to tune, blind to curvature and slip.
  • Exact Linearization — Backstepping Transforms the non-linear kinematic model into a linear chained integrator system for perfect geometric tracking.
  • Predictive Feedforward (GPC) Predicts future robot position over a planning horizon to cancel phase lag from actuator inertia.
  • Rear Axle Quadratic Law Solves a curvature-dependent second-order equation to decouple lateral error from heading error.