Motion Control Services
Professional, on-site, motion control services for both new and existing systems. Servo, stepper, and piezo motion axis PID tuning for outstanding performance. Experienced development of Motion Control libaries for Galil, PI Motion, and others, in C, C++, C#. Have a troublesome axis, or performance issue with an XYZTheta table stack, robot, H-bot, or metrology stage? Have a jittery air-bearing or low friction axis? Give us a call. Here is our 10 step, methodical approach to tuning an axis of motion... 1) Start by turning off all PID gain values. Set Kp Kd Ki Kvff Kaff Kff to zero. No energy will be input into the system with zero gain values. 2) Verify you're receiving encoder counts and that they're increasing and decreasing in value with your intended axis directions of + and -. Move the axis by hand to confirm this step. 3) Verify, with the axis not moving - payloads stationary, that the encoder counts aren't increasing or decreasing due to outside noise. Verify encoder cables are grounded on one end only. 4) If you have a vertical axis, z axis, or one influenced by gravity / cable carrier / springs / etc.. Start by placing the payload in the middle of the travel and increase the bias gain or coefficient until gravity /other influences do not influence the position of the payload. Note the gain is directional and has a +/- sign if starting from zero. Essentially the payload is 'neutrally bouyant' wrt to exterior influences when this step is completed. 5) With all PID gains: Kp Kd Ki Kvff Kaff still zero - we're finally ready to put some energy into the system (other than the bias gain in Step 4). Set the velocity and acceleration to small values. Increase Kp only at first. Increase Kp in small increments until there is barely enough energy to break 'stiction' and start moving the payload toward the commanded position. Try setting up a pair of points, relatively close to one another in the middle of the travel, to test cycle the axis payload between them. Stay away from the limit swithces for now. The payload likely won't get to either position yet, but the move profile will start to show motion in both directions as we oscillate the payload back and forth between a pair of points. Increase Kp until the payload becomes more and more responsive. Make sure that the 'following error', the error between the payload actual position and the profile position, is relatively small, during the move. Don't use Kd or Ki to minimize following error - only enough Kp should be used to keep it responsive and following error minimized. 6) At some point in the process of increasing Kp the payload will start to 'overshoot' the destination position, with 'ringing' or oscillation about the destination position. Add a small amount of Kd to dampen the ringing. Keep adding Kd in small amounts only to 'dampen' ringing due to increasing Kp. 7) Note we still haven't added any Ki or 'Integral gain' to the tuning set yet. Use this parameter only to bring the payload to within the expected settling position at the end of the move. Use it sparingly, and add only enough to 'pull' the payload into position and decrease settling time to within tolerance. 8) Repeat steps 5, 6, and 7 until the axis is responsive and within the budgeted travel time for velocity and acceleration. Iteratively increase velocity and acceleration to your requirements, adding Kp as necessary to support the responsiveness you need. 9) Up to this point the payload should still be cycling between a pair of points in the middle of the travel. When confident, move the pair of points outward to the ends of the travel, near but not exceeding the software Limits, nor hardware travel limit switches. Continue cycling the axis now along the full length of axis travel. Tuning an axis in a small sub-region of the travel can be mis-leading if the bearing rails have irregular loading by the assembler technician. This step proves the tuning parameters are valid for the full length of travel. 10) Some sanity checks and things to keep in mind... a) Try varying the payload mass to get a feel for how 'robust' the tuning set is. A larger mass will take more energy (Kp) to move and vice versa. Test over the range of expected payload masses. b) A new bearing rail may be stiff at first. The initial 'stiction' of an axis will decrease with use and you may not need as much Kp in the later service life of the axis. c) Also keep in mind that if the motor, or bearings are changed / replaced, the tuning parameters should be 'loose' enough to accomodate the new components. Said differently, it's easy to 'over tune' an axis making it 'fussy' or 'brittle' to system changes. In an effort to avoid having to remotely tune an axis every time a bearing is replaced, don't over-tune a system, use only enough energy to get the job done and no more. d) One last test. Using a rubber mallet or other influencer as appropriate, lightly tap the payload ( don't go caveman, just lightly perturb the payload) verify the tuning set 'self dampens' and there isn't unexpected or uncontrolled ringing. You're making sure the system is stable.