Please see PID_servo.gif and G320_PID_servo.gif for the results.
This is it. A step motor running as a PID servo and doing a darn good job of it too.
The PID_servo.gif yellow trace is the position error summing node. That is the difference between the command location and the motor's actual location. The scale is 14 degrees per volt, center line equals zero position error. The motor is commanded to turn 600RPM and the direction is reversed every 100mS.
The stepper servomotor develops a peak 15 degree following error on the direction change, overshoots by 2 degrees before settling to zero error in 28 mS. All this before I've even tried adjusting the PID coefficients.
For comparison, I added a G320_PID_servo.gif to contrast a DC servomotor under the identical conditions. The scale 9.2 degrees per volt, centerline equals zero position error. The DC servo develops a peak following error of 23 degrees, overshoots by 1.8 degrees before settling to a 1 degree following error in 45 mS. The following error is eventually taken up by the integral term but not in the 100 mS before direction changes again.
The step motor servo trace looks much better (even before PID optimization) by comparison. As a servomotor, the stepper accelerated more quickly and settled far more rapidly to zero error than the DC servomotor. This is exciting.
The servo control algorithms were developed in assembly language on a Rabbit RCM3720 and it is what's running the step servo in real time. These algorithms will be translated in VHDL and will go into a CPLD. This will bring a large increase in performance because execution will not be limited by the constraints imposed by a sequential machine like a microprocessor.
The final PID step motor servo control algorithm is unlike anything I had ever imagined at the beginning of this project. It is also unlike any other servo control algorithm I've ever dealt with before. I simply followed what the motor needed and this is the result.
The step motor is an MCG IH23014 3A/phase NEMA-23 run at 24VDC, the DC servomotor is an DGM D860-30B7 NEMA-34 24VDC rated 60W servomotor. Both motors are roughly comparable in power output at 24VDC.
Mariss