idb - Inverse Deadband component for EMC2

Due to the open-loop response of my servo motors I found I need 'inverse-deadband' on the PID output to achieve a 'tight' PID loop.

The idea is that since the motors don't respond to DAC outputs between around -0.2 to +0.2 it's not a good idea to use this interval of the DAC. I'm mapping the -10 to +10 output of the PID loop to two ranges, -10 to -0.2 and +0.2 to +10, thus avoiding the [-0.2 , +0.2] interval where the amps/motors don't respond.

Comp is a fantastic tool for writing quick custom HAL components. As usual I received knowledgeable help on IRC and was able to test my 16-line idb-component within minutes.

2 Comments

  1. Administrator

    December 5, 2009 at 12:34

    Note that this code will produce a maximum output of 10+amount or -10-amount when the input is +/- 10. Be careful if your drives cannot handle this!

Comments are closed.

© 2019 anderswallin.net

Theme by Anders NorénUp ↑