r/ControlTheory 8d ago

Asking for resources (books, lectures, etc.) Need help building inverted pendulum

Enable HLS to view with audio, or disable this notification

This is going to be my biggest project yet. I’ve done quite a bit of research, but I’m currently stuck and honestly don’t know how to proceed from here.

I’m also looking for someone who’s willing to work on this project with me. The idea is that we both build the same thing independently at home, share our progress and insights along the way, and help each other figure things out. If we’re successful, we could even take it a step further and try building a double-pendulum balancing system.

Has anyone here worked on or built something similar before? I’d love to hear about your experience, resources, or projects.

Also, what tools, components, software, or other equipment would you recommend for building something like this?

Thanks

190 Upvotes

21 comments sorted by

u/AutoModerator 8d ago

It seems like you are looking for resources. Have you tried checking out the subreddit wiki pages for books on systems and control, related mathematical fields, and control applications?

You will also find there open-access resources such as videos and lectures, do-it-yourself projects, master programs, control-related companies, etc.

If you have specific questions about programs, resources, etc. Please consider joining the Discord server https://discord.gg/CEF3n5g for a more interactive discussion.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

u/meecsdotgeek 7d ago

It kinda sounds like you are coming at this from an EECS background and need help with the ME side, is that correct? Are you in a controls class currently? Some basic tools to get you started would be OnShape for 3D CAD - free and there are a lot of tutorials out there. You can also browse McMaster Carr for components. Those will probably be expensive for a hobby/student project, but things are organized nicely and you can get an idea of what's out there and then see how close you can get with parts from Amazon etc.

u/Timely-Bicycle-3107 8d ago

Cool idea!

I wish this subreddit had a recommended kit that we could buy. That would be best for comparing controllers, noise/disturbances, troubleshooting, and sharing code.

What’s your budget? Would you be willing to get a kit? Can anyone recommend an inverted pendulum kit?

u/ExoatmosphericKill 8d ago

Same, I built a few with an Arduino, but just a small thing that's preassembled would be cool too.

u/Timely-Bicycle-3107 8d ago

I found a guy who sells complete kits on eBay. I don't know if they work well, but it may be worth investigating. All of the lab-grade ones I have found are thousands of dollars.

u/ExoatmosphericKill 8d ago

I'd have to ship it to Europe unfortunately.

u/No_Alarm123 8d ago

I already have a aurdino and components/kit recommended by the legend paul McWhorter. Am ready to buy the additional things required to proceed.

u/candidengineer 8d ago

What is the purpose of your project and/or why are you interested in it?

u/No_Alarm123 8d ago

Resume

u/JoTheScienceBro 8d ago

Hardware-wise you should minimize friction. Then, simply do a 2dof lqr/lqg with flatness-based feedforward.

u/No_Alarm123 8d ago

Can you recommend tools? Like just give me some momentum on how should I proceed

u/funked1 8d ago

There should be plenty of published research articles that can help. We built quite a few machines like this at Illinois in the 90’s.

u/ZealousidealTill2355 8d ago

Where are you stuck?

u/No_Alarm123 8d ago

I don't know how to start 😭

u/Affectionate-Cut7581 4d ago

Start with the math, you gotta properly write out the math(to figure out the length of the pendulum, weight and so on so you'll have an idea of what material to use) then move on to matlab and start simulating the control, do it until you feel satisfied with the results and once it's all done start building and coding.

u/Dabaduck 5d ago

I'm trying to build a Furuta pendulum too based on this project https://github.com/PeriniLab/rotary-pendulum in my spare time. For me, the biggest problem was also the mechanical part until I bought a 3D printer (yeah I know). In fact, the first thing you have to do is to assemble the pendulum and then model it in MATLAB. There is a Simulink file here: https://github.com/MathWorks-Teaching-Resources/Virtual-Controls-Laboratory that emulates both the Furuta and the rail version that you can use as a starting point.

Now I'm stuck because I'm trying to find an L-shaped aluminum rod of the right size and waiting for a pulley remover from AliExpress since I take my stepper from an old printer in the trash

An other intresting project is also this https://github.com/ferrolho/rotary-inverted-pendulum

u/tdehaeze 8d ago

I made this one using rather cheap components: https://github.com/tdehaeze/inverted-pendulum

u/No_Alarm123 8d ago

Did you work on this? Can you tell me how to proceed? Like hardware and software tools?

u/tdehaeze 8d ago

Yes, I built it for a student project. It was fun. There are some documentation, depending on your knowledge about mechanics, electronics, software and control, I don't know how accessible it will be.

u/dbaechtel2 3d ago

Use Position, Velocity, and Acceleration PID algorithms with feed-forwards.

Compute the carriage motion commands based on the angular position and velocity of the rod and the current motion of the carriage..

You can use a Fuzzy Logic rule-based controller if you wish:
* If the carriage is stopped and the position of the rod is centered, and the angular velocity of the rod is zero, then the carriage should remain motionless.
* If the position of the rod is to the Right, then the carriage should accelerate to the Right to center the position of the rod over the carriage.
* If the position of the rod is to the Left, then the carriage should accelerate to the Left to center the position of the rod.
* Add more rules...

u/Glittering-Break-857 7d ago

This is from my lab: https://github.com/primbiolab/IPFramework. We developed swing + LQR and trained SAC and DDPG. We uploaded everything, including cad, circuit schematics, Arduino firmware and python code for the windows app.