Author Topic: PID controller not enough  (Read 789 times)

0 Members and 1 Guest are viewing this topic.

Offline salamaTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
PID controller not enough
« on: February 16, 2012, 12:42:57 AM »
Hello,
I'm building robot with piston legs and driving them with DC motor controlled with AVR. When the leg is on ground and need to push the robot up the force needed to move is really big compared when going down(pretty much no force needed). This makes using the standard PID algorithm really hard. I need pretty big P value to even move that leg. But when there is no load it pretty much impossible to make it stable. I will add force sensor to leg so I think I need to adjust the algorithm according to that. Any ideas how to do this most effectively? Thank you.
« Last Edit: February 16, 2012, 12:45:23 AM by salama »

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: PID controller not enough
« Reply #1 on: February 16, 2012, 01:34:54 AM »
What does PID have to do with how much force motor can output?

How do You use PID to control pistons? Do You have some sort of linear encoder for each piston?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline salamaTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: PID controller not enough
« Reply #2 on: February 23, 2012, 02:02:22 AM »
I use the the encoder value to determine current angle of motor. So with this information I can make pid controller with controls the motor output value from 0-255. With small control values the leg does not move at all. So when it is most hardest to move legs with small control values it moves pretty slowly.

But I think I found one critical bug in my code. So this might actually work. Thou I cannot get the data out of my circuits now for some reason so I am not sure yet.

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 363
  • Helpful? 10
Re: PID controller not enough
« Reply #3 on: February 23, 2012, 08:45:35 AM »
Your motor is operating in two regimes: MOVE_LEG_UP and MOVE_LEG_DOWN.  The simplest way of dealing with this is to just know which function you're in, and adjust the gains accordingly.  This is a (very crude) version of sliding mode control. 

Keep in mind one thing with this approach: the switch is NOT dependent on the sign of the error.  What I mean by this is if you overshoot while trying to move up, then the leg has to come down.  *but you are still in the GO_UP mode, so keep your gains high*.  If you don't, then your robot will "chatter": you'll overshoot just a bit, then the gains will jack right up, you'll undershoot, gains go low, overshoot...

It's not a big deal, but it can be funny to watch.

On the other hand, adding a very simple force sensor will just about solve the problem entirely, but will make position control a bit harder.

Good luck!

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline salamaTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: PID controller not enough
« Reply #4 on: February 29, 2012, 12:21:44 AM »
Yes I am going to use force sensor. I hope it will make it easier. Thank you for your advice!

 


Get Your Ad Here

data_list