Related Experiment Video
Updated: Aug 10, 2025

Author Spotlight: Enhancing Engineering Education via WebVR-Based Online Laboratories
Published on: February 23, 2024
Reinforcement learning approach to control an inverted pendulum: A general framework for educational purposes
Sardor Israilov1,2, Li Fu1, Jesús Sánchez-Rodríguez1,3
1Université Côte d'Azur, CNRS, INPHYNI, Valbonnes, France.
Abstract:
Machine learning is often cited as a new paradigm in control theory, but is also often viewed as empirical and less intuitive for students than classical model-based methods. This is particularly the case for reinforcement learning, an approach that does not require any mathematical model to drive a system inside an unknown environment. This lack of intuition can be an obstacle to design experiments and implement this approach. Reversely there is a need to gain experience and intuition from experiments. In this article, we propose a general framework to reproduce successful experiments and simulations based on the inverted pendulum, a classic problem often used as a benchmark to evaluate control strategies. Two algorithms (basic Q-Learning and Deep Q-Networks (DQN)) are introduced, both in experiments and in simulation with a virtual environment, to give a comprehensive understanding of the approach and discuss its implementation on real systems. In experiments, we show that learning over a few hours is enough to control the pendulum with high accuracy. Simulations provide insights about the effect of each physical parameter and tests the feasibility and robustness of the approach.
Related Concept Videos
Physical Pendulum
When dealing with complicated systems, the mass moment of inertia is an important parameter, as it...
Simple Pendulum
The period of a simple pendulum depends on two factors: its length and the acceleration due to gravity. The period is completely independent of any other factors, such as mass or maximum displacement. For small displacements, a pendulum...
Torsional Pendulum
As long as the rigid body's angular displacement is small, its oscillation can be modeled as a linear angular oscillation. The amplitude of the oscillation is an angle. The role of mass is played...
Linear Approximation in Time Domain
For a simple pendulum with a mass evenly distributed along its length and the center of mass located at half the pendulum's length,...
Rigid Body Equilibrium Problems - I
Rigid Body Equilibrium Problems - II
Consider two children sitting on a seesaw, which has negligible mass. The first child has a mass (m1) of 26 kg and sits at point A, which is 1.6 meters (r1) from the pivot point B; the second child has a mass (m2) of 32 kg and sits at point C. How far from the pivot point B should the second child sit (r2) to balance the seesaw?

