Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Determining the Step Length and Control Loop Update Period for Servo Tune

Primary Software: Driver Software>>NI-Motion/FlexMotion
Primary Software Version: 7.5
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Motion Control>>Controllers>>PCI-7340, Motion Control>>Controllers>>PCI-7350, Motion Control>>Controllers>>PXI-7340, Motion Control>>Controllers>>PXI-7350

Problem:
I have a NI 7340/7350 motion controller.  I am using it to control a servo motor, but I am having trouble tuning it in the Servo Tune tab in the Measurement & Automation Exploxer (MAX). In that Servo Tune tab's Step Response tab, what is an appropriate value for Step Length?  Also, in the Control Loop Settings tab, what is an appropriate value for the control loop update for Derivative Sampling Period (Td)?

Solution:
A  good Derivative Sampling Period (Td) is determined by your systems performance. For slower systems (i.e. load is much larger than the motor), longer update periods are better. For faster systems (i.e. load is about the same as the motor, or the motor is able to move to load easily), shorter update periods are better.

When performing your step response in the Servo Tune tab in MAX, it is important to select the correct Step Length.  Generally, you want to set the Step Length to the maximum number of counts your system will go in one control loop update period. To calculate this, see the sample calculation below:
  1. First, determine the maximum velocity your system requires in revolutions per second (i.e. rps). Multiply this value by the the encoder counts per revolution to calculate your counts per second. 
  2. Calculate the corresponding counts per control loop update period by multiplying your counts per second with your update period. 
  3. Go to the Servo Tune tab's Step Response tab in MAX, and enter in this calculated value of counts per control loop update period for your Step Length.
  4. Now tune your PID parameters based on this setting.

For example:

If there are 4000 counts per revolution on your encoder and a maximum target velocity of 10 rev/sec, you would have 40,000 counts per second (10rps * 4000 counts/rev). If your control loop update period is 62.5 us, then the maximum number of counts per control loop update period your motor will achieve is 2.5 (40,000 counts/sec * .0000625 sec).  This value would then be used for your Step Length in MAX. Finally you would tune your PID parameters to meet your desired overshoot and settling times.


Note: After you are done tuning, if the system response seems too sluggish, you can either try re-tuning it to incorporate more overshoot in the step response or you can try re-tuning it using a Step Length that is twice as long as the calculated max number of steps per control loop update period.

Related Links:
Developer Zone: Understanding Servo Tune
KnowledgeBase 4AD9N5P9: A Simple Method for Servo Tune

Attachments:





Report Date: 07/03/2007
Last Updated: 09/11/2008
Document ID: 4B2F4AS4

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit