Coder Social home page Coder Social logo

balancingstick's Introduction

BalancingStick

Overview

Double reaction wheel balancing stick, using 2 pairs of DJI's M2006/C610 motor controller and ESC combo.

It balances!

Video of the stick balancing: https://youtu.be/Hc7ZZhGV2LI

Inspired by Mike Rouleau's balancing stick.

Control Loop

The Teensy runs a full state feedback controller, initially designed using LQR and then tuned, with original states [pitch, pitch rate, pitch flywheel velocity, roll, roll rate, roll flywheel velocity]'.

The states are augmented with additional open loop integrators on the velocities of both flywheels. Since the reference input is 0, the flywheel velocities should also be 0 at steady state (open loop integrator drives error to 0). This is desirable for disturbance rejection, as control effort can be exerted equally in both rotation directions.

The wheel velocities conveniently act as integrators on the torque applied, which result in zero steady state commanded torque. This means that in theory, the stick will still balance if the IMU zero is imperfect, with or without the additional integrator on the flywheel velocity. However, this is not the case in real life. Later testing showed that system requires the additional integrator on the wheel velocity to stabilize. I believe this is because the coupling terms that were ignored in the model are proportional to wheel velocity.

There are also first order low pass filters on the roll rate and pitch rate, as the raw measurements from the IMU were quite noisy.

More information can be found on my website.

CAD

Solidworks models for the stick can be found on GrabCAD.

balancingstick's People

Contributors

gregoryxie 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.