WOLFRAM

Electrical Engineering

Use System Modeler to construct and study electrical circuits, power electronics, and electrical machinery. Combine electrical and mechanical components to build complete system models. Perform analysis tasks and measure performance.

LEGO Segway: Controlling an Inverted Pendulum

Controlling inverted pendulums in different forms is common in engineering. They can be found in everything, from rockets during liftoff to skyscrapers and Segways. Build a control system for a Segway constructed out of LEGO Mindstorms NXT components.

To run this example, you'll need

The latest versions of System Modeler and Mathematica.

Please make a selection:

Get a
free trial
Continue
with download

Create Custom Libraries

Construct components for parts of the LEGO Segway using existing libraries.

Design Controller

Use Mathematica to find suitable controller gains to keep the Segway upright.

Use CAD files of the LEGO parts to customize the generated 3D animation.

Linearize Model

Linearize the model around the upright stationary point.

Animate in 3D Automatically

View the 3D animation that is automatically generated from the model.

Watch the Video