balancing and position control

Discussion specific to projects ideas and support.
Post Reply
hergipotter
Posts: 48
Joined: 12 Jan 2011, 18:40
Contact:

balancing and position control

Post by hergipotter »

Hi guys (and gals?)

I'm new to Mindstorms but recently managed to build a robot that is balancing on two wheels (you might call it a nxtway).


I'm quite satisfied so far :)

Now i want to have it drive forwards or backwards, i.e. controlling the position. But i don't really know how to do that.
For balancing, I control the light value from the sensors by adjusting the motorpower with a PID controller.
How do i control the position? Another PID controller controlling the position (i.e. the value of degrees that the motors rotated) by using the motorpower, too?
I guess the controllers would kind of work against each other.

But how could you do it? Any ideas or advices for me?
link to my youtube channel under my avatar!
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

Re: balancing and position control

Post by stryker001 »

I have no idea what your program is but it would appear that you (1) take a reading, (2) store it as the calibrated reading, (3) check all readings from then on against the first one.

If that's so, you could increase/decrease the stored value and it would think it was leaning forward/backward (respectively) and thus attempt to 'fix' itself.

Just an idea.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: balancing and position control

Post by hassenplug »

hergipotter wrote:Hi guys (and gals?)
Now i want to have it drive forwards or backwards, i.e. controlling the position. But i don't really know how to do that.
Generally, you just want it to lean forward, or backward, and continue to stay balanced. If the robot is leaning forward, it must drive forward to stay balanced.

One way to make it lean forward, is to drive the wheels backwards a small amount. This will cause it to tilt forward, then roll forward to balance.

Another way is to tell it that the "balance point" is just a bit ahead of where it really is.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
hergipotter
Posts: 48
Joined: 12 Jan 2011, 18:40
Contact:

Re: balancing and position control

Post by hergipotter »

Thx for your two answers!

I think the idea of altering the stored balance point is a good start, i will try that first!
link to my youtube channel under my avatar!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests