Este Trabajo Fin de Grado analiza y resuelve el problema del control de mecanismos tipo acrobot con técnicas de aprendizaje por refuerzo. El acrobot es un sistema mecánico planar de dos eslabones y dos articulaciones con solo una actuada, que se asemeja a un acróbata, de ahí su nombre. Es un robot bastante estudiado en el mundo de los sistemas subactuados y no lineales, y en el mundo de aprendizaje por refuerzo. El objetivo principal del trabajo es analizar, diseñar e implementar un controlador mediante aprendizaje por refuerzo (Reinforcement Learning, RL) que sea capaz de aprender de forma autónoma una política de control que resuelva la tarea de swing-up (balancear el acrobot hasta elevarlo a una determinada altura) y estudiar su rendimiento y estabilidad. Se ha elegido el algoritmo Q-learning por su simplicidad y eficiencia, pero ha requerido de un análisis para ver qué hiper parámetros y configuraciones obtenían mejores resultados, tales como el nº de episodios de entrenamiento. Además, se ha implementado un entorno de simulación del acrobot, que utiliza las ecuaciones dinámicas clásicas, ya formuladas. En este entorno se puede entrenar y evaluar al agente, además de visualizar al agente resolviendo la tarea del swing-up.
Además, el trabajo presenta una revisión del estado del arte en la que se explican o introducen brevemente los algoritmos empleados para resolver esta tarea: métodos de diferencia temporal (TD) como Q-learning ó Sarsa y sus extensiones, técnicas de aproximación de funciones como tile coding, aprendizaje profundo (como DQN ó SAC), métodos basados en modelos y arquitecturas híbridas que combinan RL con controladores analíticos. En esta revisión, se presta atención a las principales aportaciones y limitaciones de cada algoritmo.
En conclusión, este TFG demuestra que el aprendizaje por refuerzo es un método viable y efectivo para el control de mecanismos tipo acrobot, y proporciona una comparativa del impacto de las decisiones de diseño del agente y del entorno. El trabajo ayuda a comprender cómo los métodos de RL pueden aplicarse a problemas de control no lineal y subactuado.
ABSTRACT
This Bachelor’s Thesis analyzes and solves the problem of controlling acrobot-type mechanisms using reinforcement learning techniques. The acrobot is a planar mechanical system with two links and two joints, only one of which is actuated, resembling an acrobat, hence its name. It is a well-studied robot in the field of underactuated and nonlinear systems, and in the field of reinforcement learning. The main objective of this work is to analyze, design, and implement a controller using reinforcement learning (RL) capable of autonomously learning a control policy to solve the swing-up task (swinging the acrobot to a certain height) and to study its performance and stability. The Q-learning algorithm was chosen for its simplicity and efficiency, but it required analysis to determine which hyperparameters and configurations yielded the best results, such as the number of training episodes. Furthermore, a simulation environment for the acrobot was implemented, using the classical, previously formulated dynamic equations. In this environment, the agent can be trained and evaluated, and the agent can be visualized solving the swing-up task.
Furthermore, the work presents a review of the state of the art, briefly explaining or introducing the algorithms used to solve this task: time-difference (TD) methods such as Q-learning or Sarsa and their extensions, function approximation techniques such as tile coding, deep learning (such as DQN or SAC), model-based methods, and hybrid architectures that combine reinforcement learning with analytical controllers. This review focuses on the main contributions and limitations of each algorithm. In conclusion, this final degree project demonstrates that reinforcement learning is a viable and effective method for controlling acrobot-type mechanisms and provides a comparison of the impact of agent and environment design decisions. The work helps to understand how reinforcement learning methods can be applied to nonlinear and underactuated control problems.
Este Trabajo Fin de Grado analiza y resuelve el problema del control de mecanismos tipo acrobot con técnicas de aprendizaje por refuerzo. El acrobot es un sistema mecánico planar de dos eslabones y dos articulaciones con solo una actuada, que se asemeja a un acróbata, de ahí su nombre. Es un robot bastante estudiado en el mundo de los sistemas subactuados y no lineales, y en el mundo de aprendizaje por refuerzo. El objetivo principal del trabajo es analizar, diseñar e implementar un controlador mediante aprendizaje por refuerzo (Reinforcement Learning, RL) que sea capaz de aprender de forma autónoma una política de control que resuelva la tarea de swing-up (balancear el acrobot hasta elevarlo a una determinada altura) y estudiar su rendimiento y estabilidad. Se ha elegido el algoritmo Q-learning por su simplicidad y eficiencia, pero ha requerido de un análisis para ver qué hiper parámetros y configuraciones obtenían mejores resultados, tales como el nº de episodios de entrenamiento. Además, se ha implementado un entorno de simulación del acrobot, que utiliza las ecuaciones dinámicas clásicas, ya formuladas. En este entorno se puede entrenar y evaluar al agente, además de visualizar al agente resolviendo la tarea del swing-up.
Además, el trabajo presenta una revisión del estado del arte en la que se explican o introducen brevemente los algoritmos empleados para resolver esta tarea: métodos de diferencia temporal (TD) como Q-learning ó Sarsa y sus extensiones, técnicas de aproximación de funciones como tile coding, aprendizaje profundo (como DQN ó SAC), métodos basados en modelos y arquitecturas híbridas que combinan RL con controladores analíticos. En esta revisión, se presta atención a las principales aportaciones y limitaciones de cada algoritmo.
En conclusión, este TFG demuestra que el aprendizaje por refuerzo es un método viable y efectivo para el control de mecanismos tipo acrobot, y proporciona una comparativa del impacto de las decisiones de diseño del agente y del entorno. El trabajo ayuda a comprender cómo los métodos de RL pueden aplicarse a problemas de control no lineal y subactuado.
ABSTRACT
This Bachelor’s Thesis analyzes and solves the problem of controlling acrobot-type mechanisms using reinforcement learning techniques. The acrobot is a planar mechanical system with two links and two joints, only one of which is actuated, resembling an acrobat, hence its name. It is a well-studied robot in the field of underactuated and nonlinear systems, and in the field of reinforcement learning. The main objective of this work is to analyze, design, and implement a controller using reinforcement learning (RL) capable of autonomously learning a control policy to solve the swing-up task (swinging the acrobot to a certain height) and to study its performance and stability. The Q-learning algorithm was chosen for its simplicity and efficiency, but it required analysis to determine which hyperparameters and configurations yielded the best results, such as the number of training episodes. Furthermore, a simulation environment for the acrobot was implemented, using the classical, previously formulated dynamic equations. In this environment, the agent can be trained and evaluated, and the agent can be visualized solving the swing-up task.
Furthermore, the work presents a review of the state of the art, briefly explaining or introducing the algorithms used to solve this task: time-difference (TD) methods such as Q-learning or Sarsa and their extensions, function approximation techniques such as tile coding, deep learning (such as DQN or SAC), model-based methods, and hybrid architectures that combine reinforcement learning with analytical controllers. This review focuses on the main contributions and limitations of each algorithm. In conclusion, this final degree project demonstrates that reinforcement learning is a viable and effective method for controlling acrobot-type mechanisms and provides a comparison of the impact of agent and environment design decisions. The work helps to understand how reinforcement learning methods can be applied to nonlinear and underactuated control problems. Read More


