Smart Manufacturing Robotics Cyber Physical System

Industry 4.0 as the Towers of Hanoi, where three blocks with local control emerge in a sorted order.
Updated 27 Apr 2020

View License

A pick and place machine is modeled to provide services of moving blocks either one or two positions over. The objective is to move a stack of three colored blocks from one location to the next such that the final stack is ordered according to color and size. The ordering is an emerging behavior based on local control for each of the blocks. As such, this is a distributed version of the Towers of Hanoi puzzle which is an example of a cyber-physical system.

A detailed industry grade network model based on EtherCAT and TCP/IP allows control of the packet error rate (PER) to test the robustness of the model when the network is unreliable.

Stereoscopic vision of a video stream of the virtual world enables the machine to first locate where the stack of blocks is. Feedforward control allows a quick pick and place action. Feedback control is used to move the blocks between locations. A pneumatic airflow is modeled to enable the machine to pick and move the blocks.

Cite As

Pieter Mosterman (2024). Smart Manufacturing Robotics Cyber Physical System (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with R2020a and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!



Version Published Release Notes

Link to a different YouTube video.


This version has two major changes:
1. The model now is compatible with R2020a.
2. The model now includes a discrete-event model of an industry-grade network.

Added Industry 4.0 to the summary.

Updated license

Added a link to the YouTube video that shows an animation of the sorting of an initial stack of blocks.

This version is extended to now include a third block being sorted.