LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Coding Challenge: Inverted Pendulum

Okay, now that the challenge has been going for a little while, here are a few questions:

 

How many people (and who) are working on solutions for the challenge?  Either put a quick post here, or send me an email so I can get an idea of the number of active participants.

 

Did requiring the CD&SIM module stop anybody from looking at the challenge?  If so, I could post a version that doesn't use the CD&SIM module just so people could see what the challenge entails before downloading/installing the CD&SIM module.  The CD&SIM module definitely will help with parts of the challenge.

 

Anybody have any comments, questions, thoughts, anything?  Usually challenges generate a lot of dialog between competitors...

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 11 of 50
(2,665 Views)

Bruce,

 

I hope to enter, but have not had any time to even look at it yet.  

 

Probably Ben scared everyone off. But we know he is a big teddy bear.

 

Lynn 

0 Kudos
Message 12 of 50
(2,648 Views)
Bruce, I looked at it briefly, but am now in the process to migrate to a new machine and have not installed the toolkit yet. I'll work on it once things clear up a bit here. 😄
0 Kudos
Message 13 of 50
(2,637 Views)

Just a question but whats the use to code this when there is already a example on the website of NI itself?

 

Secondly is a double pendulum also okay :P? 

 

double pendulum.png 

0 Kudos
Message 14 of 50
(2,634 Views)
Sorry for my post I see now that I didn't fully understand this challange, need to check it out if I will compete because now I'm more bussy with controlling the double pendulum. For the rapid prototype it already works, in praxis and theoretical, but now I need to build labVIEW code for a real time target.
0 Kudos
Message 15 of 50
(2,621 Views)

WouterG,

 

Is this an NI example?  I couldn't find it anywhere on the web site.  Could you post a link?  I would like to see how it works, especially the swing up.  This application looks significantly different than the challenge, so it won't do much other than provide ideas.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 16 of 50
(2,600 Views)

I'm sure it was somewhere on the NI website. I know it has because I was working with the 3D picture control for my pendulum, and the application is a example for how the use the 3D picture control in labVIEW. But here is the same application on a non-ni website; http://cnx.org/content/m12977/latest/

 

It doesn't include however the swing up and swing down I notice but that can be implemented pretty easy. Just put a sinus as a setpoint for the position of the little car with a PD as the regulator, and up goes your pendulum. Furthermore the VI uses the old 3D picture controls from labVIEW not the new ones which are now standard in labVIEW, this can be fixed however very easily.

Message Edited by WouterG on 06-04-2010 02:57 PM
0 Kudos
Message 17 of 50
(2,582 Views)

The CD&SIM toolkit is useful and it does have a cart and rod example, located at:  

 ..\LabVIEW 2009\examples\Control and Simulation\Case Studies\Mechatronics\Inverted Pendulum\Linear Inverted Pendulum Simulation.vi

.. on my computer 

However this (like all the examples) has an explicitly solved state-space for theta=0 (upright), so we're going to have to do a little math to solve it for the other stable (theta=180deg[pi]). The challenge will come in the optimization of transitioning from upright to hanging.

 

An intriguing challenge that has a lot of subtleties as I continue to look at it.

 

-Mello


Data Science Automation

CTA, CLA, CLED
SHAZAM!
Message 18 of 50
(2,570 Views)

Mello,

 

Actually, I was nice to everybody - I already derived the linearized versions for the simulation.  They can be found within the simulation, just under the formula node used for the non-linear calculations.  All you have to do is convert them to state-space matrices...

 

I agree the tough part of the challenge is an efficient swing up and swing down routines, although tuning the stable portions does take a little bit of effort.

 

For those people that want to start with the easy part, just set the initial conditions to all zero.  This will start you with an inverted pendulum, and all you have to do is keep it upright.  After you get that working, start on the swing up.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 19 of 50
(2,557 Views)

As said for the swing up you just use a PD controller with a sinus as a setpoint. It's the most basic attempt but in my experiments with my pendulum from my post it is also the most effective one, using difficult controllers only will give you headaches. For the steadiness you just use a PID controller.

 

But there is also a lot of info on the web about this topic.  

 

I think I will try to compete if I find the time but my prio number is finishing my own system since it's my graduation project. I wish everyone good luck!

@Mellobuck yes that was the one I really meant, it uses also the standard 3D picture control and not the old one.
Message Edited by WouterG on 06-04-2010 04:33 PM
0 Kudos
Message 20 of 50
(2,555 Views)