==<span id="Axes_Servo_Tuning_and_Trajectory_Planner" class="mw-headline">Axes Servo Tuning and Trajectory Planner</span>==
===Basic Servo Tuning Overview===
Once an axis is configured and proved capable of holding a position it is ready to be tuned and optimized. Most often a small value of P Gain only is used to show the servo is functional and can hold position. The Servo may be very weak and inaccurate but will be functional.
Every system is different and the tuning parameters are interactive in a manner that usually doesn't allow parameters to be determined one at a time. Rather after one parameter is changed it may be necessary to revisit the other parameters.
In general higher gains will reduce errors and improve accuracy, but tend to make the system more unstable. So the general idea is to increase gains to reduce errors as much as possible but still have a stable system.
Often during tuning the system may go unstable. In fact, it is normally intentionally driven to instability to find its limits for a certain parameter. This can result in a violent oscillation or worse so one should be prepared to quickly disable the Servo. If an appropriate [http://dynomotion.com/Help/ConfigurationScreen/ConfigurationScreen.htm#Max_Following_Error Max Following Error] is used the axis can be automatically disabled before the oscillation becomes too violent, yet not disable when performing a normal test.
KMotion.exe allows you to change any axis parameter on the Step/Response, Config, or Filters Screens then simply push "Move" to see the effect of the change. Note that as performance improves the errors will become small and difficult to see on the Position Plot without Zooming in (Left click drag) so changing the plot type to plot the error is useful.
The overall process normally goes something like this:
# Select a Test [http://dynomotion.com/Help/StepScreen/StepScreen.htm#Measurement Move Size] and [http://dynomotion.com/Help/StepScreen/StepScreen.htm#Motion_Profile Motion Profile]. [http://www.dynomotion.com/wiki/index.php?title=Main_Page#Velocity.2C_Acceleration.2C_and_Jerk See Also]
# Select [http://dynomotion.com/Help/StepScreen/StepScreen.htm#max_limits Max Limits] to allow for the Test. [http://www.dynomotion.com/wiki/index.php?title=Main_Page#Max_Limits_-_Error See Also]
# Determine maximum level of [http://dynomotion.com/Help/StepScreen/StepScreen.htm#PID P Gain]
# Determine maximum level of [http://dynomotion.com/Help/StepScreen/StepScreen.htm#PID D Gain] (with Low Pass Filtering) See Also [http://www.dynomotion.com/wiki/index.php?title=Main_Page#Torque_Servos_vs_Velocity_Servos here] and [http://www.dynomotion.com/wiki/index.php?title=Main_Page#Lead_Compensator_vs_Derivative_Gain here].
# Determine new maximum level of P Gain now that D Gain increased stability
# Add I Gain to improve accuracy and remove steady state errors. [http://www.dynomotion.com/wiki/index.php?title=Main_Page#I_Gain.2FMax_Limit_Integrator See Also]
# Add [http://dynomotion.com/Help/StepScreen/StepScreen.htm#Feed_Forward Feed Forward] to reduce errors
===Torque Servos vs Velocity Servos===
+/-10V Analog Amplifiers usually come in one of two varieties: '''Torque''' or '''Velocity'''. Torque mode amplifiers consider the input command as a Torque Command and work to generate the commanded Motor Torque. Velocity mode amplifiers consider the input command as a Velocity Command and work to generate the commanded Velocity. Its important to understand what type of Amplifiers you have.
'''Velocity Mode Amplifiers''' need some form of feedback going to the Amplifier in order for the drive to know the current velocity. This might be a digital encoder or an analog tachometer.
[[File:LowPass400Q1p4.png|none|link=|680x439px]]
===<span id="Velocity.2C_Acceleration.2C_and_Jerk" class="mw-headline">Velocity, Acceleration, and Jerk</span>===