0

I seem to have coded myself into a corner with the following issue: I'm trying to control a motor on a robot through a slow RS485-based bus connection. Unfortunately, I don't have access to the firmware on the motor, so I'm stuck with the current setup.

The biggest issue is that I can only control the motor's target speed. While I can retrieve its absolute position through a built-in encoder, there is no positioning function built into the firmware on the motor itself.

The second issue is that the bus connection is really slow, the somewhat awkward protocol needs 25 ms for a full cycle - is controlling a position via speed adjustments even feasible this way?

I have a tried a naive approach of estimating the position 25 ms ahead, subtracting the current position and dividing by 25 ms to calculate the speed required to the next desired position. However, this oscillates badly at certain speeds when targeting a fixed position, I assume due to the high cycle times producing a lot of overshoot.

Maybe a PID controller could help, but I am unsure what the target value would be -- every PID I have used so far used a fixed target. A completely moving target (i.e. the position) is hard to imagine, at least for me.

What's the usual way to deal with a situation like this? Maybe combine the naive approach and add PID-control only for an additional offset term? Or do I need to buy different motors?

stacked_deck
  • 113
  • 1
  • 4
  • What sort of motor? Do you have a part number? – TomServo Jul 09 '17 at 22:16
  • No, all I have is an interface to the networking component. It's not a small stepper motor if that helps, but an inverter driving an electrical motor on a larger axle. The whole construction weights a couple of hundred kilos. The construction is rather proprietary =(. – stacked_deck Jul 11 '17 at 18:54
  • That sort of part is out of my league, sorry. – TomServo Jul 11 '17 at 19:04

1 Answers1

0

If you want to keep the benefits of rs485 (it has some great positive things), then you likely would need to rethink how you drive this engine. It might be easier to change the motor control, so that you only have to send some numeric data as "end position" and leave it to you smart control to handle that. In that situation your rs485 communication is minimal.

I always tend to think keep the "brains" at place where they are needed in industrial environments so you keep your IO down, or else someday you end up with behemoths such as industrial ethernet.

Peter
  • 2,043
  • 1
  • 21
  • 45