Inverted Pendulum Balanced On A Drone

[Nicholas Rehm] works during the day at the Applied Physics Laboratory at Johns Hopkins, Maryland, so has considerable experience with a variety of UAV applications. The question arose about how the perseverance mars rover landing worked, which prompted [Nicholas] to hang a rock under his drone, attached via a winch. This proved to be interesting. But what is more interesting for us, is what happens when you try to attach an inverted pendulum to the top of a drone in flight? (video embedded, below)

This is a classic control theory problem, where you need to measure the angle of the pendulum with respect to the base, and close the loop by calculating the necessary acceleration from the pendulum angle. Typically this is demonstrated in one dimension only, but it is only a little more complicated to balance a pendulum with two degrees of freedom.

[Nicholas] first tried to derive the pendulum angle by simply removing the centering springs from an analog joystick, and using it to attach the pendulum rod to the drone body. As is quite obvious, this has a big drawback. The pendulum angle from vertical is now the sum of the joystick angle and the drone angle, which with the associated measurement errors, proved to be an unusable setup. Not to be discouraged, [Nicholas] simply added another IMU board to the bottom of the pendulum, and kept the joystick mechanism as a pivot only. And, as you can see from the video after the break, this indeed worked.

The flight controller is [Nicholas’] own project, dRehmFlight (GitHub), which is an Arduino library intended for the Teensy 4.0, using the ubiquitous MPU6050 6-DOF IMU. [Nicholas] also made an intro video for the controller, which may prove instructive for those wishing to go down this road to build their own VTOL aircraft. The code for pendulum experiment is not available at the time of writing, perhaps it will hit the GitHub in the future?

For some more inverted pendulum fun, do check out this simple linear sled. We did cover dRehmFlight a little while ago regarding the suspended pendulum, which may also worth a look.

9 thoughts on “Inverted Pendulum Balanced On A Drone”

1. tinfish says:

Minor gripe — it’s the Johns Hopkins University Applied Physics Laboratory. There is an ‘s’ in “Johns”. (This typographic error is a peeve for some people who work there.)

1. Fixed. Thanks.

How many times do you see “John’s”? Like it’s not Elliot’s Hopkins, but John’s Hopkins?

1. The Commenter Formerly Known As Ren says:

Quora.com

“Why is it called Johns Hopkins?

JHU is named for Johns Hopkins because it is actually a family surname (Johns). Johns Hopkins was a wealthy financier, who was involved in the inception of the Baltimore and Ohio railroad. He arranged for the University and the Hospital to be incorporated.”

2. tinfish says:

Think I’ve seen John’s a few times, but not as often as John. I guess that’s because John’s looks even more strange than Johns — who is John, and why does he have a Hopkins, and what does this all have to do with a university anyway?

The man the university is named after was also called Johns Hopkins. If I remember correctly, his first name was taken from the last name of some side of his family.

2. Drone says:

Human turns Pendulum-Mode OFF mid-flight – a really BAD idea – system immediately crosses into the right-half plane and becomes irreversibly uncontrollable – device meets surface of planet Earth HARD!

3. Istvan Fedor says:

It’s a cool project but I don’t see any practical use for a reverse pendulum stabilization… What is the point really apart from saying I’ve done it?

This made think of Space X landing boosters. There is a YouTube channel “BPS Space” that has built thrust vectoring model rockets.

2. Drone says:

@Istvan Fedor said: “It’s a cool project but I don’t see any practical use for a reverse pendulum stabilization… What is the point really apart from saying I’ve done it?”

Pffft… As if it isn’t obvious; the I-Pendulums will be tipped with mirrors that provide a safe peek-a-boo camera and directed-energy weapon view of the battle-space. See that autonomous armed robot doggy over there? BZZZZZT! Yeah, not any more.

4. Jfis says:

What about 2 degrees of freedom? I’m not sure it would be trivial, but it would be interested if it was.

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.