Balancing robots

But what happens when the acceleration of of the other car depends quite sensitively on your position and velocity relative to him? It's not so simple then.

-- Torque

Reply to
Torquemada
Loading thread data ...

But, did you consider that 1% PWM is not 1% robot speed. Or you use other feedback (rotation decoders), or you use some table to get the non lineairity out of the PWM to speed function. I think it would be very hard to get it working in an other way.

Good luck,

Peter

Reply to
Peter

Reply to
Robert C Monsen

Right, but in a balancing robot the balance point is always in the same place, operator can change it, when he wants robot to move, but it only depends on operator's will, not robot position.

Marcin

Reply to
Marcin Sommer

As pointed out to me by Peter van der Vos some of the problems I've been having were due to the fact that for small voltages the motor does nothing and hence just driving the pulse width from a PID controller does nothing until the robot is already significantly out of equilibrium. Fixing things so that the motor 'dead area' is skipped it now balances fairly well! Also, there is a magic 'sweet spot' for which the PID parameters work and that was hard to find. (Actually it's more PI than PID)

Check out the video at

formatting link
Outstanding problems: (1) Its behaviour changes as the battery voltage changes (2) The robot isn't built symmetrically. I've no idea how to automatically find the equilibrium point. (3) It's not as stable as I'd like. I've no idea how to improve it. (4) I can't make it move forward. If I add a term to provide forward impetus it immediately tries to correct the resulting disequilibrium by pushing backwards and ends up nowhere!

-- Torque

Reply to
Torquemada

Re: moving forward...it's probably related to the sweet spot you mentioned. Since, as you also mentioned, the robot can't find it's own center of gravity, the "sweet spot" is probably where you discovered the equilibrium postion by trial and error. If you move the center of gravity beyond the axle centerline and maintain that displacement, the robot should roll in that direction. Essentially it will "fall" forward and continuously compensate by driving the wheels forward. So forward motion should be possible to do by changing the target value from your ranging device; a shorter distance should make the robot roll towards the ranger, because you are trying to maintain a different angle.

Reply to
Garrett Mace

I tried this: it simply becomes unstable and falls over. I know other people have found that this method works but here's why I expect it not to: if the robot is tilted then it needs a constant force to maintain it at equilibrium. A constant force is obtained by driving the wheels with constant acceleration. But after a short period of acceleration the wheels hit maximum speed and there is no possibility of providing further acceleration. This suggests the alternative method of periodically 'pumping' the motor for short periods of acceleration followed by a period of equilibrium seeking and hoping it averges out at a net forward movement. I'll try that. It might also be that the servos simply aren't powerful enough to handle a displacement of more than a few degrees. I have a pair of solarbotics RM2 motors (upgraded GM2 motors) that are much more powerful but they're particularly awkward to mount and will require a new higher current H-bridge. Back to the drawing board...

-- Torque

Reply to
Torquemada

I think the other robots you speak of probably had acceleration sensors. If you start the rolling motion by changing the target angle, then pull the target angle back to equilibrium range when the desired speed is reached, you might get the robot to roll. You'll need to be able to maintain equilibrium by changes in motor speed rather than forward and reverse pulses.

Reply to
Garrett Mace

I definitely like that idea and I'll probably give it a shot!

Thanks,

-- Torque

Reply to
Torquemada

This one uses proximity sensors:

formatting link
Regards, Bob Monsen

Reply to
Robert C Monsen

Hi Dan,In article , Torquemada wrote:> As pointed out to me by Peter van der Vos some of the problems I've> been having were due to the fact that for small voltages the motor does>

nothing and hence just driving the pulse width from a PID controller does> nothing until the robot is already significantly out of equilibrium. Fixing> things so that the motor 'dead area' is skipped it now balances fairly well!> Also, there is a magic 'sweet spot' for which the PID parameters work> and that was hard to find. (Actually it's more PI than PID)> > Check out the video at

formatting link
> Outstanding problems:>

(1) Its behaviour changes as the battery voltage changesMaybe the voltage of you sensor changes, so you read an other distance.> (2) The robot isn't built symmetrically. I've no idea how to automatically>

find the equilibrium point.Maybe if started, you could keep it in an upright position. It couldtake that as it correct value. But, doesn't the I part in the controllergets it to the correct value?> (3) It's not as stable as I'd like. I've no idea how to improve it.You could use a lookup table and get the pwm -> motor rotation correct.> (4) I can't make it move forward. If I add a term to provide forward impetus> it immediately tries to correct the resulting disequilibrium by pushing> backwards and ends up nowhere!Couldn't you change the algoritm of the PID. Don't try to keep the anglecorrect, but keep the change in the angle at zero. Maybe this solvesproblem (2) too.Good luck,Peter-- No Spam please

Reply to
Peter

You could take a tip from the Segway and simply "tip" it forward. It should try to regain equilibrium by continually moving in the direction offset. You could automate this with a servo attached to a small weight.

Chris S.

Reply to
Chris S

That's not really how the Segway works. He explained earlier that in order to maintain an angle of tilt, you need a constant force. That can only be obtained by accelerating constantly. Soon enough you'll max out the speed of your motors and then fall down.

With the Segway, you tilt it forward a bit, but the rider is not actually part of the machine. The machine accelerates a bit, then finds the new center of balance of the machine and rider, and maintains that while rolling forward. In a machine like original poster has, the robot would tilt forward a bit in order to start moving, then regain its former equilibrium position (straight up) while maintaining speed on the wheels. Balancing accelerations and decelerations are then mixed into the existing forward speed.

Reply to
Garrett Mace

I don't recall how you sense where up is, but if you can hang it upside-down from its wheel while it thinks "up" is towards the floor, the robot will hang at its resting equilibrium point. Perhaps you just deactivate it, and just sense the position the wheel goes to, then record that position. Of course, you need to obtain that position without any remaining momentium to sit still.

Joe Dunfee

Reply to
Smiley

One other thing, though I am just throwing out ideas so don't expect it to necessarily solve your problems;

If you want to introduce more resistance to becoming unbalanced, the way is to move the weight further out. For example, if the battery were mounted further away from the wheels, such on the top, .... hmmm this is getting harder to picture in my mind. The rotation will be the center of gravity, and moving the battery up would move that center of gravity up, so I am not sure what it would do. HOwever, for a human ballancer, it would make it easier to ballance because the weight at the top helps to keep the stick they are ballancing from moving around as much. It keeps the movement within the human respsonse time.

To increase the rotational inertia alone, you would have to move half of the batteries towards the front , and the other half to the back. This would maintain the center of gravity in its current position. It would also make it slower to tip away from ballance, as well make it slower to respond to a correction.

But, I still can't convince myself in my mind whether it is more desirable to keep the center of gravity higher or lower. The Human balancer would certainly prefer higher... but I am not sure about a robotic balancer.

Joe

Reply to
Smiley

I see what you're saying, but it came out misleading. A lower center of gravity is generally advantageous for stability.

A tight rope walker, however, has a lot of mass above his shoulders -- the example that I think you were grasping for. Notice, though, that its in the form of a long pole. The idea is that a massive pole will have a lot of rotational inertia, so that it takes more torque to get it moving, and thus the human is shielded from his own tiny waverings.

They only put the pole on their shoulders because there's no where else to hold it. If they could hold it on their waist, they probably would.

Reply to
Mark Haase

A freely swinging system is more stable the lower its centre of gravity. But a balancing robot is a system driven by motors and so a different kind of stability is important. Basically if the centre of mass is distance l from the pivot then the whole system has a 'characteristic time' sqrt(l/g) which is a measure (to within an order of magnitude) of how quickly the controller must react. The higher the mass, the larger g, and hence the longer you have to figure out what is going on and respond. In my case the sensors update at

25Hz and 0.04s is close to sqrt(l/g) and that is one reason it's only just able to balance. So raising the battery should help. Unfortunately my robot has now started being cannibalised for the next project...

-- Torque

Reply to
Torquemada

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.