File Exchange

image thumbnail

Markov Decision Process - Pendulum Control

version (23.3 KB) by Matthew Kelly
Creates a Markov Decision Process model of a pendulum, then finds optimal swing-up policy.


Updated 21 Feb 2016

From GitHub

View Version History

View license on GitHub

Takes a single pendulum (with a torque actuator) and models it as a Markov Decision Process (MDP), using linear barycentric interpolation over a uniform grid. Then, value iteration is used to compute the optimal policy, which is then displayed as a plot. Finally, a simulation is run to demonstrate how to evaluate the optimal policy.

Cite As

Matthew Kelly (2021). Markov Decision Process - Pendulum Control (, GitHub. Retrieved .

Comments and Ratings (3)

Matthew Kelly

@Hazim -- This work is loosely based on materia from Russ Tedrake's underactuated class at MIT, and some of his other papers on the topic. I think these course notes are a good place to start: The barycentric interpolation implementation is based (roughly) on some code from the an early version of the Drake optimization toolbox, but rewritten to be fast in Matlab.

Hazim Alzorgan

Hi Matthew. Great work! Could you please share your references?

Karissa Stisser

MATLAB Release Compatibility
Created with R2014a
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!