Edited by Leland Teschler
Velocity algorithms and linear quadratic regulators,
Torque-ripple velocity disturbances,
In a servosystem, velocity disturbances are a manifestation of how the system reacts to outside effects caused by various components. If all system components are perfect, there will be no velocity disturbances.
Of course, servosystems are only perfect in textbook examples. The main elements in a servosystem — the controller, amplifier, feedback sensor, and motor/ load — are less than perfect, so they each produce disturbances which lead to velocity variances.
Such disturbances are facts of life and the design engineer must deal with them. Some velocity disturbances are generated by the motion controller. Motion controllers today are digital and, thus, digitize and quantize the physical variables; such quantization introduces velocity disturbance to the motion-control system. But there are ways to reduce this sort of disturbance.
The DAC produces the output signal which goes to the amplifier. Although such a signal is digital, the DAC resolution (typically 12 to 16 bits) is sufficiently high that the analog output granularity from one LSB digital input to the next is insignificant. Therefore, the effect of the DAC on the velocity disturbance is negligible.
The Sampled-Data (SD) effect denotes one where the motion controller performs the computation periodically. The SD effect may reduce the level of system stability, but does not produce any direct velocity disturbances. Its affects can be minimized by boosting the sample frequency to significantly above the bandwidth of the control system. In most cases the system bandwidth is about 50 Hz, and the sampling frequency varies typically between 1 to 10 kHz.
The third effect, position quantization, has the most disturbing impact. Here the position sensor, typically an optical encoder, quantizes the location of the load (or in the case of speed encoder counts, which then go to the controller.
To illustrate the effect of position quantization, consider a velocity-control system which must run at a constant velocity of 900 counts/sec. Also assume the sampling frequency is 1 kHz. An interesting condition arises when the speed is not an exact multiple of the sample rate. The problem is that the average number of counts per sample is not an integer, but the feedback count, of course, is an integer. As a result, the controller incorrectly rounds the counts/sample to an integer. In other words, the feedback is in full encoder counts, but the actual rate is fractional. The resulting rounding of the feedback rate causes a distortion that repeats and hence is periodic.
In the example at hand, assume the motor runs at the correct speed. Consider the position feedback in this case over a period of 10 samples. (See Commanded and sampled feedback rate diagram.) The feedback is one count per sample for nine samples, and zero for one sample. It follows that the position error is 0.1 counts for samples zero through nine, then spikes to 0.9 counts at sample 10.
This behavior suggests that even under perfect conditions, when the motor runs exactly as required, the controller will produce a periodic position error. This error is then amplified and applied to the motor, thereby producing a velocity disturbance. In other words, this velocity disturbance comes directly from the position quantization effect.
With this realization in mind, it is possible to develop an improved control algorithm which reduces this effect. Since the problem is caused by the position-quantization effect, it is evident that a reduction of the position quantization will cause a corresponding reduction in disturbances. One improved method uses this idea to reduce the position quantization by a factor of 256.
In effect, this method looks at motor- speed feedback while factoring in knowledge about how quickly the motor speed can change. In that regard, it incorporates wisdom about motor behavior and uses it to make educated guesses for interpolating between encoder-feedback pulses. Here the position-feedback signal is reconstructed to produce 1 byte of fraction, in addition to the integral number of counts provided by the sensor.
To illustrate the effect of such an improved algorithm, consider the same example discussed previously. Note the average velocity is 0.9 counts/sec. Now suppose you have divided the time of each pulse by 256 ticks of a faster clock. So the 0.9 counts/sec can be expressed as 230.4/256 counts/sec when the quantization resolution is improved by 1 byte. To get back to a representation as an integer, this value can be represented by two values of 230/256 and 231/256. This is an improvement over the two values of 0 and 1 in the original example of commanded feedback rate. The higher resolution cuts the position error from 1 count peak-to-peak to 1/256th of a count. So the disturbance also drops by a factor of 256.
In one case, this improved method for velocity control was implemented on an air-bearing-spindle application that needed accurate velocity control. The spindle motor was mounted on a granite base and was driven by a sinusoidally commutated amplifier operating in velocity mode. The application was demanding because air bearings have no viscous damping. Furthermore, the spindle has low inertia so there is no mechanical damping to filter out torque disturbances. The application needed a system that was both less costly than the current design and which exhibited even less velocity ripple especially at lower speeds.
Other causes of velocity disturbances
The most significant velocity disturbances arise from load variations, and the most significant of those come from changes in friction. Therefore, system designs must incorporate ways of reducing friction. Motor imperfections constitute another major source of disturbances. While the motor must provide a given level of torque, that level depends on the magnetic field, among other factors. Any imperfections in the magnetic field produces a torque error, which leads to disturbances. Finally, the power amplifier can be a source of similar disturbances. Any change in amplifier current produces a torque disturbance that affects the velocity.
There was an encoder installed on the spindle. It provided a measurement of velocity accuracy by monitoring how the phase of its index pulse varied. This measurement took place by overlaying the edges of the index pulses at a given speed and measuring any difference in the period from one revolution to the next. The specification called for the time variation between two index pulses to be less than ± 12 sec at 5.8 rev/sec (0.007% ripple) and less than ±200 nsec at 333 rev/sec (0.006% ripple). The specification also required that the controller accurately control speeds to a curve that specified decreasing time variations for higher speeds. (See Spindle speed versus time variation graph.)
The previously described algorithm can be coded into custom firmware to handle this situation. The firmware modification went into a Galil DMC-18x2 Econo Series PCI motion controller. Use of this controller and a low resolution purely digital encoder helped keep costs down while boosting performance.
To optimize performance, programmers used different control parameters for different velocity ranges. The proportional (KP) and derivative (KD) gains of the DMC-18x2 controller were tuned for three ranges of velocities. The update rate for the controller was set at 500 sec for each velocity range. Note the integral gain (KI) is not needed for this application because velocity accuracy is the goal. Zeroing the steady-state position error has no effect on a constant-velocity output.
For the slower speeds, ranging from 5.8 to 33 rev/sec, the system used a larger proportional gain to quickly react to mechanical changes such as changes in air pressure. Programmers dialed in a larger derivative gain to quickly dampen any possible oscillations that might arise from the fast adjustments. For speeds ranging from 33 to 333 rev/sec, the inertia of the spindle added a level of filtering which allowed for lower proportional and derivative gains. The settings made for a highly responsive system with good instantaneous velocity control over a wide speed range.