P
ar
t
1: P
rog
ra
m
ming
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 232 of 909
Introduction
The SmartMotor includes a brushless servomotor with powerful rare-earth magnets and a
stator (the outside, stationary part), which is a densely-wound, multi-slotted electromagnet.
Controlling the position of a brushless servo’s rotor with only electromagnetism is like pulling
a sled with a rubber band—accurate control would seem impossible.
The parameters that make it all work are found in the PID (Proportional, Integral, Derivative)
control section. These are the three fundamental coefficients to a mathematical algorithm that
intelligently recalculates and delivers the power needed by the motor. The input to the PID
control is the instantaneous desired position minus the actual position, whether at rest or part
of an ongoing trajectory. This difference is called the position error.
NOTE:
The PID filter is off when operating in Torque mode.
In the Class 5 SmartMotor, the PID update rate defaults to 125 microseconds (8,000 times per
second). Optionally it may be decreased or increased to a maximum of 62.5 microseconds.
The faster 62.5 microsecond update rate allows for smoother high-speed operation and faster
acceleration/deceleration correction under varying load conditions.
Understanding the PID Control
The Proportional parameter (KP) of the PID control creates a simple spring constant. The
further the shaft is rotated away from its target position, the more power is delivered to
return it. With this as the only parameter, the motor shaft would respond just as the end of a
spring would if it was grabbed and twisted. If the spring is twisted and let go, it will vibrate
wildly. This sort of vibration is hazardous to most mechanisms. In this scenario, a shock
absorber is added to dampen the vibrations, which is the equivalent of what the Derivative
parameter (KD) does.
For example, when you sit on the fender of a car, it dips down because of the additional
weight based on the constant of the car’s spring. It gives you no indication if the shock
absorbers are good or bad. However, if you jump up and down on the bumper, you would
quickly see if the shock absorbers are working or not. That’s because they are not activated
by position but rather by speed.
The Derivative parameter steals power away as a function of the rate of change of the overall
PID control output. The parameter gets its name from the fact that the derivative of position is
speed. Electronically stealing power based on the magnitude of the motor shaft’s vibration has
the same effect as putting a shock absorber in the system.
NOTE:
While the Derivative parameter usually acts to dampen instability, this is
not the true definition of the term. Therefore, it is also possible to cause instability
by setting the Derivative parameter too high.
Even with the Proportional and Derivative parameters working properly, a situation created
by "dead weight" can cause the servo to leave its target. If a constant torque is applied to the
end of the shaft, the shaft complies until the deflection causes the Proportional parameter to
rise to the equivalent torque. Because there is no speed, the Derivative parameter has no
effect. As long as the torque is there, the motor’s shaft position will be off target.
That’s where the Integral parameter (KI) comes in. The Integral parameter mounts an
opposing force that is a function of time. As time passes and there is a deflection present, the
Integral parameter adds a little force to bring it back on target with each PID cycle. There is
also a separate Integral Limit parameter (KL), which limits the Integral parameter’s scope of
what it can do and help prevent overreaction.
Part 1: Programming: Introduction
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...