Motion Control ICs  
      Motion Control Cards  
      Motion Control Digital Drives  
      Motor Control ICs  
      Developer's Kits  
      Development Software  
      Product Selection Guide  
      Product Family Features  
     
 




Motion Control University

Whitepaper servo control card
Motion Control Cards for Machine Design
Whitepaper Download

PMD on Twitter  Follow Us on Twitter

 

The Servo Loop

6.1 Overview

For the servo-based chipsets (MC2100, MC2300, MC2800, MC3110, MC3310, MC58000) a positional servo loop is used as part of the basic method of determining the motor command output. Chapter 4 made references to the PID loop that exists in PMD’s servo based products. It was mentioned that the output of the PID represents a desired motor torque. The function of the servo loop is to match as closely as possible the commanded position, which comes from the trajectory generator, and the actual motor position.

To accomplish this the profile generator’s commanded value is combined with the actual encoder position to create a position error, which is then passed through a digital PID-type servo filter. The scaled result of the filter calculation is the motor command (also referred to as the torque signal), which is output as either a PWM signal to the motor amplifier, or a 16-bit input to a D/A Converter. In the context of multiphase motors, the motor command is broken down into components (phases) based on the current commutation angle before being sent to the amplifier.

6.2 PID loop algorithm

The servo filter used with the servo-based chipsets is a proportional-integral-derivative (PID) algorithm, with velocity and acceleration feed-forward terms and an output scale factor. An integration limit provides an upper bound for the accumulated error. An optional bias value can be added to the filter calculation to produce the final motor output command. A limiting value for the filter output provides additional constraint. This limit is set using the command SetMotorLimit.

All filter parameters, the motor output command limit, and the motor bias are programmable, so that the filter may be fine-tuned to any application. The parameter ranges, formats and interpretations are shown in the following table:

Term Name Representation & Range
Ilim Integration Limit unsigned 32 bits (0 to
2,147,483,647)
KI Integral Gain unsigned 16 bits (0 to 32767)
Kd Derivative Gain
unsigned 16 bits (0 to 32767)
Kp Proportional Gain unsigned 16 bits (0 to 32767)
Kaff Acceleration feedforward unsigned 16 bits (0 to 32767)
Kvff Velocity feed-forward unsigned 16 bits (0 to 32767)
Kout Output scale factor
unsigned 16 bits (0 to 32767)
Bias DC motor offset signed 16 bits (-32768 to 32,767)
  Motor command limit unsigned 16 bits (0 to 32767)

6.3 Motor bias

When an axis is subject to a net external force in one direction (such as a vertical axis pulled downward by gravity), the servo filter can compensate for it by adding a constant DC bias to the filter output. The bias value is set using the host instruction SetMotorBias. It can be read back using the command GetMotorBias.

6.4 Output scaling

The Kout parameter can be used to scale down the output of the PID filter in situations that require it. It does this by multiplying the filter result by Kout/65536. It has the effect of increasing the usable range of Kp, which is typically programmed in the 1 to 150 range when no output scaling is done. The Kout value is set using the host instruction SetKout. It can be read back using the command GetKout.

6.5 Output limit

The motor output limit prevents the filter output from exceeding a boundary magnitude in either direction. If the filter produces a value greater than the limit, the motor command takes the limiting value. The motor limit value is set using the host instruction SetMotorLimit. It can be read back using the command GetMotorLimit. The motor limit applies only in closed-loop mode. It does not affect the motor command value set by the host in open-loop mode.



 
  Site Map
Performance Motion Devices, Inc.
55 Old Bedford Road | Lincoln, MA 01773 | P: 781.674.9860 F: 781.674.9861 | motion-control@pmdcorp.com