LQR Control Design for an Inverted Pendulum on a Cart System – Multibody, Multi-Domain Physical Model in MapleSim – Maplesoft

LQR Control Design for an Inverted Pendulum on a Cart System

In this example we show how an inverted pendulum sitting on top of a cart can be controlled using an LQR controller. The pendulum is perturbed by a pulsed torque after five seconds in two second intervals.

Attachments: The plant.msys file is the linearized version of the plant model. This file was generated using the Linearization template attached to the model. Once the system has been linearized, the plant.msys file is used by the Linear System Worksheet template to create an LQR controller for the plant model.

The control strategies used in this model, together with others, are explored in more detail in the application State-Feedback and Observer-Based Control Design.


Download this MapleSim model

This model requires MapleSim. If you do not have MapleSim, contact us for a live demonstration.

  • How this model works and how it was developed
  • How this model can be modified to fit your requirements
  • How we can assist you in developing your own models to solve your engineering design problems

Let Maplesoft Engineering Solutions provide you with the expertise and tools you need to meet your project requirements quickly and effectively. Ask our experts today!

Contact us today

If you have MapleSim, download the model here:

Download the Model


Request an S-Function

MapleSim Models can be readily exported as royalty-free S-functions. To request the S-function corresponding to this model, please fill in the form below.

Model: LQR Control Design for an Inverted Pendulum on a Cart System

Submitting form...

Thank you for requesting the S-Function. Your request has been received and you can expect to hear from us shortly. Close Window
Oops! There was a problem. Try again later Close Window
Model Images
  • LQRControlDesignInvertedPend MapleSim allows for high fidelity plant modeling in addition to controller design capabilities.
  • Model Model diagram of the inverted pendulum and controller
  • Subsystem Subsystem showing the inverted pendulum model and perturbing torque
  • 3dimage 3D rendering of the inverted pendulum
MapleSim Video
Video not available in this browser.