Mach-DSP User’s Manual
Document Number: MACH-DSP-9021
Page 83
www.ScannerMAX.com
9.4
Going beyond PD – adding integration to accomplish PID tuning
A system that uses only Proportional servo terms to position the mirror will inevitably
leave a small difference between the position commanded by the input and the position
actually achieved by the mirror. This small difference is referred to as the “Position
Error”. The Position Error is amplified by the servo loop (the amplification amount being
controlled by the Servo Gain control) and applied to the motor in the form of current.
Nevertheless, as long as there are mechanical imperfections in the scanner (and there
always are) including bearing friction and magnetic hysteresis, some small amount of
position error will always be present in the system. In many cases, this error is
sufficiently small that it will not impact the user’s application, especially since removing
this small error can come with its own complications and may hinder performance.
This section describes how the Position Error can be eliminated by adding an
Integration term to the servo loop.
See the figure below, which illustrates the Position Error signal during a squarewave
command input. On the left side of the figure, you can see that the Position Error signal
actually never goes all the way to zero volts, which indicates that there is always some
error (difference) between the commanded position and actual position. The solution is
to integrate (i.e. accumulate) this error over time, and include this integrated error in the
final current that drives the motor. The right side of the figure shows the error signal
when integration is added.
Above we have presented a figure that is intended to graphically represent Position
Error signal, but this can also be seen using the Oscilloscope built-into the Mach-DSP
program.
Figure 10.4: Without and with integration
Position-
error
t
V
o
Position-
error
t
V
o
With integration
Without integration