File Exchange

image thumbnail

NXT Ballbot (Self-Balancing Robot On A Ball) Controller Design

version (11.7 MB) by Yorihisa Yamamoto
NXT Ballbot Model-Based Design based on Embedded Coder Robot NXT.


Updated 28 Apr 2009

View License

NXT Ballbot is a LEGO Mindstorms NXT version of Ballbot that is developed by Ralph Hollis at Carnegie Mellon University. The Ballbot is designed to balance itself on its single spherical wheel while traveling about. Please refer the following URL to know more detailed information about Ballbot.

This demo presents sample models and documents describe the following contents.

How to Build NXT Ballbot
Mathematical Dynamics Model of NXT Ballbot
Controller Design for Balance and Drive Control
NXT Ballbot Model Illustration
Simulation and Experimental Results

You can simulate NXT Ballbot model and generate controller program that can be executed on the NXT. Furthermore, you can watch movies of NXT Ballbot simulation and control experiment at the following URL.

This demo requires Embedded Coder Robot NXT Demo as MBD environment. You need to download it from the following URL before trying this demo.

LEGO(R) is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this demo. LEGO(R) and Mindstorms(R) are registered trademarks of The LEGO Group.

Cite As

Yorihisa Yamamoto (2021). NXT Ballbot (Self-Balancing Robot On A Ball) Controller Design (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Giang Vu

Would you please to provide the new p file version because this one is the old version that can not run on recent matlab release. Thanks in advance

JeongMo Kim


vamsi krishna Mamidi

when I run your simulation I am getting the following error. Can you tell where it might be wrong 'nxt_ballbot_sfun.bat' is not recognized as an internal or external command,
operable program or batch file

Dominic Guri

Lorenzo Garcia


Piotr Czekalski

Great model.
Works almost perfect - I've been able to create and test one in our university's robotics lab - still need some tuning, mostly because of gyro sensor offsets I guess. Anyway very spectacular one ;-).

Thank you for sharing!

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!