← Tools & Demos

Model-Based Engineering · Engineering case study

Engineering a line-following robot

From mathematical modelling to simulation and physical experiments.

Originally published

The problem

A line-following robot must respond to changes in the route, including sharp corners. Models, simulation and physical trials provide different ways to investigate the controller.

The approach

The work draws on INTO-CPS model-based engineering experience, including co-simulation with Functional Mock-up Units. It documents a mathematical model, OpenModelica modelling, a C++ controller and simulation-based design-space exploration.

See the research

Watch the demonstration

Line following with sharp corners

Original physical line-following robot demonstration on a route with sharp corners.

Captions and transcript are unavailable. The engineering workflow is described below.

Download the original recording (MP4) ↓

Robot running on the simulation map

Physical robot running on the map used for simulation.

Captions and transcript are unavailable. The engineering workflow is described below.

Download the original recording (MP4) ↓

Simulation on the map

Original simulation recording, kept separate from the physical robot demonstrations.

Captions and transcript are unavailable. The engineering workflow is described below.

Download the original recording (MP4) ↓

What this demonstrates

  1. Compare models and hardware

    The m3pi robot photograph and mathematical model connect the hardware to its specification.

  2. Watch physical and simulated runs

    Three separate original recordings show a sharp-corner route, a robot run on a map used for simulation, and a simulation on that map.

  3. Inspect the implementation and exploration

    The C++ implementation and design-space-exploration figure provide supporting engineering material.

The original author explicitly states that the proposed formal verification was not completed after the research focus moved to probabilistic RoboChart. These physical and simulation recordings are engineering demonstrations, not proofs of controller correctness or new performance measurements.

Models & supporting figures

The m3pi robot from the original line-following robot case study
The m3pi robot

Original photograph of the robot used in the engineering case study.

Mathematical model from the original line-following robot case study
Mathematical model

Mathematical model of the line-following robot.

Design-space exploration from the original line-following robot case study
Design-space exploration

Design-space exploration results obtained using simulation.

Engineering context

This work followed experience in the INTO-CPS project and the start of work on RoboCalc. The original account credits Prof. Jim Woodcock and Prof. Ana Cavalcanti with proposing the physical robot as a way to demonstrate the technologies and explore a potential formal-verification case study.

The original controller discussion cites Optimization of PID Control for High Speed Line Tracking Robots as a source of ideas. That reference is supporting literature, not a publication claimed as the author’s own work. The INTO-CPS Examples Compendium is also linked as a document to which the author contributed.

What was completed

The case study includes a controller implementation, physical robot runs, simulation and design-space exploration. The planned formal verification was not completed.

Implementation

The C++ controller is available as a ZIP download. Consult the hardware, toolchain and simulation requirements before reproducing the experiments.

Research resources & references