Coder Social home page Coder Social logo

tsitsimis / underactuated Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 4.0 3.66 MB

Python implementations of Optimal Control and Optimization algorithms for simulated underactuated systems and walking robots

Python 100.00%
robotics optimal-control underactuatedrobotics simulation

underactuated's Introduction

Underactuated Robotics

Python implementations of Control and Optimization algorithms for simulated underactuated systems and walking robots

Inspired by the MIT's course 6.832 - Underactuated Robotics of Russ Tedrake. The corresponding edX course as well as the course notes largely assisted in studying the mathematical background of the showcased algorithms.

Implementations

Rigid-Body Dynamical Systems

For benchmarking and simulation purposes, some well-known low-dimensional systems (frequently used in the literature) are implemented. Both fully-actuated and underactuated versions are tested.

Acrobot Simple Pendulum Cart-Pole
Rimless Wheel

Fully-actuated systems

Feedback Linearization

Fully-actuated control becomes trivial when using feedback linearization by cancelling-out the complex dynamics of the system and converting it to a linear system (feedback equivalent).

For a second-order control-affine system

the feedback control

makes the system equivalent to allowing us to plug-in a simple PD controller with pole placement and transition the system to the desired state.

Swing-up control for pendulum and acrobot:

Underactuated systems

LQR Stabilization with Linearized Dynamics

Stabilize a non-linear system around a fixed point by applying a Linear Quadratic Regulator (LQR) on a linearized version of the system. The system's initial state needs to be in the region of attraction of the fixed point.

LQR is a feedback controller derived from Dynamic Programming for linear systems and quadratic cost on state and control signal.

Energy Shaping with Partial Feedback Linearization (PFL)

To apply LQR, we first have to bring the system near the fixed point. To achieve this, energy shaping controller pumps or draws energy from/to the system until it reaches the energy of the desired state. This is usually done by calculating the error between the system's energy and the desired energy (that is ) and expressing its time derivative in the form

Then, the control signal guarantees that the energy error is non-increasing (since ).

Theoretically, this should suffice but small perturbations (either physical or due to numerical errors) can move the system far from the goal state.

In this situation, once the system is near the fixed point (inside its basin of attraction) the controller can switch from energy shaping to LQR and stabilize the system.

Walking systems

Rimless Wheel

The simplest model of legged robot. Assumes there will always be a swing leg in position at the time of collision. It uses pendula for legs and moves only thanks to the gravity. With appropriate initial leg angle and angular velocity the wheel reaches periodic stability (limit cycle) and walks down the slope.

The foot standing on the ground is modeled with a simple pendulum (systems/pendulum.py) with initial angle near the upward position. Using the simple collision detection logic that the pendulum's angle (from the upward position) is the pendulum's position is changed during the simulation and is placed in the position of next leg to hit the ground.

underactuated's People

Contributors

theodoretsitsimis avatar tsitsimis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.