Expand Messages
• I am working on an inverted pendulum. I am almost to the point where I will be ready to start testing it. The inputs I have are position and angle. The
Message 1 of 5 , Aug 31, 2005
I am working on an inverted pendulum. I am almost to the point where I
will be ready to start testing it. The inputs I have are position and
angle. The velocity and angular velocity are also used, so I will end
up having 4 gains. How do I go about setting these gains and adjusting
them? What methods are there for doing this?

Thanks
Bryan
• Bryan, Here is a quick-start method that has worked for me, to get you in the ball park (much subsequent tweaking required). There are three gains you need to
Message 2 of 5 , Aug 31, 2005
Bryan,

Here is a quick-start method that has worked for me, to get you in the
ball park (much subsequent tweaking required). There are three gains
you need to adjust to get the robot to balance: the angle proprotional
gain, the angle velocity gain, and the wheel velocity gain. Note that
the latter is a positive feedback.

Set all three gains to zero. Then increase the angle proportional
gain until the the robot will balance, but oscillates violently. Next
increase the angle velocity gain to dampen out the oscillations. At
this point the robot will balance near center, but if pushed off
center it will accelerate in that direction and fall over. Next
increase the wheel velocity gain to counter that acceleration.

The wheel velocity gain can be set hi enough such that the robot will
not move at all. Back off slightly from that setting so that the
robot will continue moving in the direction it is pushed and gently
come to rest. This is a fun gain to play with.

dpa

--- In SeattleRobotics@yahoogroups.com, "Bryan" <BNHrobotics@g...>
wrote:
> I am working on an inverted pendulum. I am almost to the point
where I
> will be ready to start testing it. The inputs I have are position
and
> angle. The velocity and angular velocity are also used, so I will
end
> up having 4 gains. How do I go about setting these gains and
> them? What methods are there for doing this?
>
> Thanks
> Bryan
• Should I ignore the wheel proportional gain? Do you suggest adjusting gains with potentiometers or by using constants set in the balancing program? Currently,
Message 3 of 5 , Aug 31, 2005
Should I ignore the wheel proportional gain? Do you suggest
adjusting gains with potentiometers or by using constants set in the
balancing program? Currently, I have about 10 or 12 inches of space
that the pendulum can move in. How violently should I expect to see
it move? I am a little bit worried that it will run out of room and
slam into the sides of the track. I appreciate the help.

Bryan

ps. I have a picture of the mechanical assembly on my new website:
www.brybot.com To give you an idea of its size, the aluminum base
is 24x3" and the pendulum itself is almost a meter.

--- In SeattleRobotics@yahoogroups.com, "dpa_io" <dpa@i...> wrote:
> Bryan,
>
> Here is a quick-start method that has worked for me, to get you in
the
> ball park (much subsequent tweaking required). There are three
gains
> you need to adjust to get the robot to balance: the angle
proprotional
> gain, the angle velocity gain, and the wheel velocity gain. Note
that
> the latter is a positive feedback.
>
> Set all three gains to zero. Then increase the angle proportional
> gain until the the robot will balance, but oscillates violently.
Next
> increase the angle velocity gain to dampen out the oscillations.
At
> this point the robot will balance near center, but if pushed off
> center it will accelerate in that direction and fall over. Next
> increase the wheel velocity gain to counter that acceleration.
>
> The wheel velocity gain can be set hi enough such that the robot
will
> not move at all. Back off slightly from that setting so that the
> robot will continue moving in the direction it is pushed and gently
> come to rest. This is a fun gain to play with.
>
> good luck with your robot!
> dpa
>
>
>
>
> --- In SeattleRobotics@yahoogroups.com, "Bryan" <BNHrobotics@g...>
> wrote:
> > I am working on an inverted pendulum. I am almost to the point
> where I
> > will be ready to start testing it. The inputs I have are position
> and
> > angle. The velocity and angular velocity are also used, so I will
> end
> > up having 4 gains. How do I go about setting these gains and
> > them? What methods are there for doing this?
> >
> > Thanks
> > Bryan
• Bryan, The wheel proportional gain has the effect of holding the robot in the same location. That is, the error increases and leans the robot toward the set
Message 4 of 5 , Aug 31, 2005
Bryan,

The wheel proportional gain has the effect of holding the robot in the
same location. That is, the error increases and leans the robot
toward the set point as the robot moves away from the set point. With
your setup (looks pretty nifty!) this may be required to hold the
pendulumn in the center of the travel, and keep it from drifting to
the limits of the track. At any rate, it can be adjusted last, after
the other three are roughly set. My experience is that this gain will
cause a slow oscillation around the set point that cannot be damped.
I have observed a Segway in "kickstand" mode doing the same thing.

The other oscillations can be pretty violent, but you can sneak up on
stability by adjusting the angle proportional gain and angle velocity
gain alternately. Best analogy I can think of is the way a unicycle
rider oscillates back and forth when he stays in one location.

I found it easiest, at least initially, to use a separate pot for each
gain.

best regards,
dpa

--- In SeattleRobotics@yahoogroups.com, "Bryan" <BNHrobotics@g...>
wrote:
> Should I ignore the wheel proportional gain? Do you suggest
> adjusting gains with potentiometers or by using constants set in
the
> balancing program? Currently, I have about 10 or 12 inches of space
> that the pendulum can move in. How violently should I expect to see
> it move? I am a little bit worried that it will run out of room and
> slam into the sides of the track. I appreciate the help.
>
> Bryan
>
> ps. I have a picture of the mechanical assembly on my new website:
> www.brybot.com To give you an idea of its size, the aluminum
base
> is 24x3" and the pendulum itself is almost a meter.
>
> --- In SeattleRobotics@yahoogroups.com, "dpa_io" <dpa@i...> wrote:
> > Bryan,
> >
> > Here is a quick-start method that has worked for me, to get you
in
> the
> > ball park (much subsequent tweaking required). There are three
> gains
> > you need to adjust to get the robot to balance: the angle
> proprotional
> > gain, the angle velocity gain, and the wheel velocity gain. Note
> that
> > the latter is a positive feedback.
> >
> > Set all three gains to zero. Then increase the angle proportional
> > gain until the the robot will balance, but oscillates violently.
> Next
> > increase the angle velocity gain to dampen out the oscillations.
> At
> > this point the robot will balance near center, but if pushed off
> > center it will accelerate in that direction and fall over. Next
> > increase the wheel velocity gain to counter that acceleration.
> >
> > The wheel velocity gain can be set hi enough such that the robot
> will
> > not move at all. Back off slightly from that setting so that the
> > robot will continue moving in the direction it is pushed and
gently
> > come to rest. This is a fun gain to play with.
> >
> > good luck with your robot!
> > dpa
> >
> >
> >
> >
> > --- In SeattleRobotics@yahoogroups.com, "Bryan" <BNHrobotics@g...>
> > wrote:
> > > I am working on an inverted pendulum. I am almost to the point
> > where I
> > > will be ready to start testing it. The inputs I have are
position
> > and
> > > angle. The velocity and angular velocity are also used, so I
will
> > end
> > > up having 4 gains. How do I go about setting these gains and
> > > them? What methods are there for doing this?
> > >
> > > Thanks
> > > Bryan
• Bryan ... It s a classic AI problem so everyone who has a wacky idea about how to make computers learn has implemented it. Currently the most popular seem to
Message 5 of 5 , Sep 1, 2005
Bryan

> I am working on an inverted pendulum.
> What methods are there for doing this?

It's a classic AI problem so everyone who has a wacky idea about how to
make computers learn has implemented it. Currently the most popular seem to
be genetic algorithms and neural nets. Personally, I'm not a fan of neural
nets - any system that can take 20,000 iterations to learn XOR is seriously
thick. A bright chimpanzee can learn it in five.

Peter
Your message has been successfully submitted and would be delivered to recipients shortly.