Author Topic: Control algorithm help for master-slave system  (Read 511 times)

0 Members and 1 Guest are viewing this topic.

Offline Robot AttackTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Control algorithm help for master-slave system
« on: November 26, 2013, 10:42:47 PM »
Hi Guys,

I have a robotic arm that just refuses to be controlled smoothly and am turning to you for help.
I am attempting to control it in real time (or as close to real time as possible) using a kinematically matched master.

The master has encoders on each joint which are read by the main computer.
The main computer communicates with the robots nodes on an RS 485 bus at ~25hz
The motor controllers on the robot run at ~1kHz

My initial attempt was to implement a simple PID loop on the embedded motor controllers. The Set Point is updated every .040s (25 hz). The Processed value is determined from encoders built into the motors on the robot.

The output of this is in general very jerky motion. Essentially what happens is that the robot receives a new command gets to the new position before it receives the next command. If the master is moved fast enough, the motion is smoothed out. I attempted to lower the max velocity (PWM) of the robots motors, however this is more of a band-aid solution, as it can no longer move at high speeds, and if the master is moved slowly enough the jerkyness comes back.

I have a few things I want to try next. For one, I want to implement a ramp (trapezoidal) profile to the output of the PID loop, essentially limiting the max change in PWM per time step. I theory the D gain component should do something like this, but in practice it doesn't seem to do a damn thing other than seriously destabilize the system. This may help, but I do not think it is the optimal solution.

I have done some research and it seems that a combined position / velocity control may be the ticket, but this black magic to me and do not understand it well enough to actually write a usable algorithm.

Oh, and I realize that speeding up the data rate past 25 hz would probably solve the problem, but the other members of my team assure me that this is not possible.

Anyone think they can explain the deeper mysteries of control algorithms to me?

Many thanks!




Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98
Re: Control algorithm help for master-slave system
« Reply #1 on: November 27, 2013, 12:46:55 PM »
Try search the forum for 'PID'. Lots of discussions and suggestions.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: Control algorithm help for master-slave system
« Reply #2 on: November 27, 2013, 02:12:29 PM »
Quote
My initial attempt was to implement a simple PID loop on the embedded motor controllers.

The best solution is to make your motor controllers aware of time. Tell them to plan the movement so that they are at the target 40 milliseconds after the command starts.

If your controllers can't be made to do that, then you need to tune your PID controller parameters such that they move slower for small errors, and faster for large errors. This will lead to more slop, but better matching the master. In general, you'd want to reduce the P, increase the I somewhat, and increase the D by a lot, for this to happen.

Offline hobbes

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 0
Re: Control algorithm help for master-slave system
« Reply #3 on: November 27, 2013, 03:15:43 PM »
A simple solution may be to make the arm heavier so it has more momentum and can not get there as quickly.

 


Get Your Ad Here

data_list