Pendulum LQR Optimization MapleSim Model - Pendulum LQR Optimization S-Function - MapleSim Model Gallery

Pendulum LQR Optimization

This model consists of a subsystem called ActualPendulum that is a pendulum with the applied torque as an input and the angle and angular velocity as outputs. This model was linearized using the "PendulumLinearization" worksheet attached in the Document Folder. It was linearized about the equilibrium position of 0 rad (hanging straight down). The result of this linearization is the state-space representation contained in "LinearizedPendulum.msys". This file is then loaded into "PendulumLQRWorksheet", where the LQR cost matrices are specified and the results are loaded back into the model. The resulting gains are located in the Parameter Block on the right. The controller is applied continuously to the pendulum located at the origin, and discretely using a discrete sampler.

This Model Requires MapleSim

If you do not have MapleSim, contact us to arrange a short, live demonstration with a MapleSim product expert, where you will:

  • See how this model operates
  • Learn how it was developed
  • Discover how it can be modified to fit your requirements
Request a Live Demo

If you have a copy of MapleSim available, you can 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: Pendulum LQR Optimization

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
  • LQRControlledPendulum The 3-D visualization workspace provides immediate feedback for understanding the system.
  • plots Simulation results showing the continuous and discrete applied torque
  • Model Model diagram of two pendulums: one with a continuous applied torque, the other a discrete applied torque
  • Subsystem Subsystem view of the pendulum model
MapleSim Video
Video not available in this browser.
Simulink is a registered trademark of The MathWorks, Inc.