PID Controller design

Discussion in 'General Electronics Chat' started by kasunt, May 24, 2011.

  1. kasunt

    Thread Starter New Member

    May 24, 2011
    Hi guys,

    I dont know if im duplicating another thread on this topic but my case might be different.

    I'm trying to design a robot with two scooter 24v motors, encoders controlled by two RHINO DS72K H-bridge motor drivers by dynamic controls. The PID controller I have so far implemented is based on the AVR221 given in I have done some coding around it with the algorithm mentioned in the document but I am having a tough time picking the right values for Proportional gain. I'm not entirely sure Discrete is required since this is to control the speed of the differential.

    Can someone please help me figuring out initial ballpark Kp and Ki values ? And how would I go about experimentally or mathematically getting these values ?
  2. nigelwright7557

    Senior Member

    May 10, 2008
    You can try general values for the gain and see what response you get.
    If the gain is too small then you will get undershoot.
    If the gain is too large you will get oscillation.

    I have done numerous PID routines for the PIC micro and they work very well but do need the gain tweaking to get it just right.
  3. hgmjr


    Jan 28, 2005
    I found this document by the author of the Arduino PID library is a very good introductory document. Here is the link.