2
$\begingroup$

I'm driving a DC motor (actually a linear actuator) with a Polulu motor controller from a Raspberry Pi. The motor drives if you ask for anything between 20 and 100% duty cycle, so there is a dead zone between -20% and 20% duty cycle.

I'm using a laser distance sensor to measure position of the actuator, and I'd like to make the actuator track a desired position using a PID controller.

The problem I'm facing is that as the position crosses over from being too low to too high, the PID controller takes a load of time to cross through this deadband, after which the position is completely wrong!

I've tried creating a lookup table for the motor speed based on the requested speed, but this doesn't help a huge amount. I was thinking of creating two lookup tables, one for when the position is above setpoint and one for when it is below which cross over instantly from -20 to 20 and vice-versa.

Any thoughts on this problem (or just what it is called so I can Google it!) would be much appreciated.

$\endgroup$
  • $\begingroup$ Is it likely that the dead band is caused by static friction of your system? Could you reduce this friction? $\endgroup$ – fibonatic Mar 14 at 11:54
  • $\begingroup$ How is your PID loop implemented? Have you tried adjusting the tuning? If so how? $\endgroup$ – Ohio ChemE Mar 14 at 17:00
0
$\begingroup$

You just need a two loops control strategy.

An inner speed loop will simply set PWM needed to achieve requested rotational speed . This unfortunately needs a speed transducer on the motor spindle but it's definitely worth. The input of this sub-system is requested speed coming from outer position loop

The outer position loop processes requested position set point and position feedback and feeds inner loop. This is basically what you've already implemented .

This approach to position control roots back to the very beginning of control theory, it shouldn't be hard to Google much more details

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.