View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Smart Manufacturing Robotics Cyber Physical System

5.0 | 4 ratings Rate this file 10 Downloads (last 30 days) File Size: 1.49 MB File ID: #38515 Version:
image thumbnail

Smart Manufacturing Robotics Cyber Physical System



19 Oct 2012 (Updated )

Distributed Towers of Hanoi where three blocks with local control emerge in a sorted order.

| Watch this File

File Information

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.
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.

Required Products DSP System Toolbox
Simulink 3D Animation
MATLAB release MATLAB 8.0 (R2012b)
Other requirements To use the optional stereoscopic vision feature, the Computer Vision System Toolbox is also required.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
13 Oct 2016 hanchao liu

16 Jan 2015 Justyna Zander

This software is citable:
author = "Pieter Mosterman and Justyna Zander",
title = "{TowersOfHanoiOnGitHub: Towers of Hanoi in MATLAB/Simulink}",
month = "Jan",
year = "2015",
doi = "{10.5281/zenodo.13977}",
url = "{}",}

13 Nov 2014 Carlos Moran

26 Jun 2013 Pieter Mosterman

This model was the subject of my presentation at the <i>IEEE Real-Time and Embedded Technology and Applications Symposium</i> (RTAS) Industrial Session.
The video of my talk is available on YouTube at

Comment only
14 Jan 2013 Pieter Mosterman

A video of one scenario where a stack of blocks is sorted is available on YouTube at:

Comment only
29 Oct 2012 Joachim Schlosser

Excellent complete example for Model-Based Design!

04 Dec 2012 1.9

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

08 Jan 2014 1.11

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

01 Sep 2016

Updated license

Contact us