# Set Point and Motion Control

##### by Ken Melvin

When learning to drive, we discover how to vary the car's acceleration and rate to smoothly achieve our desired speed. Likewise, new drivers find out how to easily control the car's direction by varying the extent and rate of their steering actions. Learning how to operate boats and airplanes requires developing similar skills. For control applications such as these, there is at any time—at all times—a specific desired value of the controlled variable.

## Set Point as a Variable

This time-specific desired value of the controlled variable (i.e., current set point) isn't separate from the control of that variable. It's as essential as the variable we're currently measuring. In fact, we compare the two in order to effect control. For such control applications a controller, whether it's a human or a computer, needs to know both the desired and the actual values of the variable at all times.

There are many process control applications where a "current" set point is desirable or even required. What follows is a focus specifically on motion control using this current set point concept.

## Process Control Applications Involving Motion

For motion control applications, we may desire to control the speed of motion, the relative position, or both. Speed control applications tend to have a great deal in common with one another. Controlling a high-speed bottling line is much like controlling a light rail system; controlling an auto's speed is much like controlling room pressure with variable frequency drive-controlled fans. Often, several (or even many) speed-controlled units operate together to form a system. Commonly, we desire a system's units (e.g., trains in a rail transit system or cars on a freeway) to operate as an integral unit. Being able to change the final set point, its maximum rate of change, and the rate of change of its rate of change (acceleration) for the individual units allows for their integration into a system that itself operates as a unit. Even for the stand-alone unit (e.g., a stand-alone, electric motor-driven pump), there may be reason to control the unit's acceleration, its rate, or both en route to the final set point.

Similarly, for motion control applications involving positioning, it's often critical that something reaches a given position at a given time and at a desired rate. Moreover, sometimes there's a need to coordinate motion along two or more axes (e.g., the position of a robotic arm and another moving assembly). These types of applications, too, demand the ability to change speed per chosen values for acceleration and rate.

## The Controller and Motion Control

The "Melvin" controller I've developed (hereinafter, simply the controller) has set point generation that provides for changing the final set point, its maximum rate of change, and its acceleration at any time. To illustrate, consider Figure 1, which shows a given current set point, Sc, its associated current rate, Rc, and its acceleration, A. Sc is plotted from some initial value to an intermediate desired value (say, Sf), where it remains for a time before returning to its initial value. In order to reach the desired final set point at the desired rate and acceleration, the controller continuously develops Rc and Sc by manipulating the acceleration as required (Figure 2).

When we use the controller to manage speed, the current set point, Sc, represents the desired current velocity, Vc, while the desired final set point, Sf, represents the desired final velocity, Vf. Sc approaches Sf at the current rate, Rc, which changes per the acceleration.

When we use the controller for motion control involving positioning, at a given time, Rc is the speed of motion desired, and Sc is the desired current position. Again, as with speed control, per the chosen values for acceleration and rate, Sc becomes the desired final position.

How does a process controller best go about regulating the controlled variable at or very near the set point at all times? At any given time, if Sc and its related variable are the same and are changing at the same rate, then the controller is providing the correct output. If the two aren't the same at a given time, or if they're changing at different rates, then the controller needs to adjust its output to bring the variable to and maintain it at set point.

A controller could conceivably know the values for the current variable and Sc at all times. A time base or clock is needed, however, for determining rates. Evaluating information, making calculations, and making changes takes time. Together, these time requirements imply a cycle of operation (i.e., one that's long enough to see the changes and perform the necessary calculations).

Each cycle, the controller determines the current error, ec, and change in error, ec, and converts each to an equivalent output value. The controller then adds the converted values to its previous output; thus, it provides the current output needed to control the variable at or very near Sc at all times. The system characteristic ratio—that of a change in controller output to a resultant change in the variable—is used to convert the units of error into those of the output. For some applications (among them, speed control), the change in controller output may not be proximally synchronous to the resultant variable change. Consequently, the amount of error correction needs to be time proportioned according to this time lag between when a change is made in controller output and when the controller sees a resultant variable change (i.e., the system response time). The controller determines both these parameters during initial tuning.

## Applications

Forclosed-loop positioning using a servo or variable-speed drive, an encoder's signal would probably represent the current position. We could also control drive speed by using the current rate as the set point for the speed of motion and comparing this rate with the actual rate of motion derived from the encoder signal (or furnished by a tachometer). However, a better way would be to control the motion's speed as a function of the relationship of the current position and Sc. The controller compares the current and desired (i.e., Sc) positions each cycle and determines both ec and ?ec. Those values are then converted to units of output and added to the previous output. Thus, the current position is controlled at or very near Sc at all times, and the speed of motion is the same or very nearly the same as the current rate at all times.

For open-loop stepping motor position control, the desired position at any time is a function of the total pulse count to the motor up to that time. The desired rate of motion at any time is a function of the pulse rate at that time. The actual position at any time might be determined by some form of encoder. A processor could use the signal from such an encoder to determine the actual rate of motion at a given time. When using the controller's set point generation for this type of position control, the desired position at any time is the pulse-count equivalent of Sc. Likewise, the desired rate of motion at any time is that resultant pulse rate equivalent to the current rate.

Usually, stepping motor control is locked train, so there may not be an encoder. If there's any reason to expect slippage, or if slippage presents an unacceptable hazard, such slippage could be detected using a position encoder, continuously comparing its output with Sc. To compensate for slippage, much as with speed control, the controller being used could adjust the pulse rate. Alternatively, we could compensate at the final desired position by comparing Sf with the encoder-determined position, thus deriving the pulse count and motor direction required to attain Sf.

Motion control applications are plentiful. We could, for example, accelerate a commuter train to the desired speed at a desired rate, vary speed as required while the train is en route, and then, as it nears a station, shift to position control and decelerate to a precise stopping point. The controller could also, using existing sensor technology, control an aircraft's speed, altitude, and direction at all times. Likewise, we could control a ground vehicle's speed, direction, and position relative to other vehicles. Elevators provide yet another vehicular example.

Unlike vehicular control, where we're controlling speed relative to a fixed surface, moving material efficiently about during the manufacturing process often demands speed control of a conveyance surface. The high-speed bottling or canning line is a good example. By controlling filler speed, the controller is able to manage the line speed, adjusting the rates of various line components (e.g., conveyors, labelers, uncasers, casers) as necessary for the line to operate as an integral unit.

Robotics is another potential application area. Used for axis positioning in manufacturing and assembly, the controller could bring an assembly to position as smoothly and quickly as practicable. Coordinating two or more axes of motion is feasible, as is the smooth, accurate manipulation of servo-driven robotic arms, synchronizing their actions with other ongoing processes.

## Fine Control

For position or speed control, or both, there are times when it's desirable or even necessary that any position or speed changes be made very smoothly. For example, positioning a large telescope, gun turret, or similar object might involve substantial mass. The accuracy requirements might be very high, and yet we want to change position as quickly as possible. For that matter, starting a 700-car freight train and controlling its speed requires a delicate touch.

In Figure 3, the lower three curves are like those of Figure 1, except now the curve Sc is shown as Vc (current velocity). The fourth curve, Pc (current position), looks very much like one-half of Vc. Now then: Vc of the Vc curve is the current rate, Rc, for the Pc curve; Rc of the Vc curve is the current acceleration, Ac, of the Pc curve; and A of the Vc curve is the "third derivative" of Pc. Correspondingly, Vf becomes Rm for Pc, etc. Adjusting A of the Vc curve affords finite adjustment of the rate of change in the rate of change in the rate of change in the current postion, Pc. A change in motion can be just this smooth.

For process control, any time we require variable control, we also require a "current" desired set point; otherwise, there's no way for the controller to know whether the variable is where it should be. This is why set point is as much a part of control as variable measurement. For motion control applications, the "current" set point might be the desired speed or the desired position at a given time. In addition, the rate of change in the desired speed or position at any given time may be all important. The controller's set point generation allows changes in the final desired set point, the rate of change in the current set point, and the rate of change in the rate of change in the current set point at any time. MC

## Author Information

Kenneth P. Melvin is a consultant for Industrial Control Systems in Oakland, Calif., and inventor of the "Melvin" controller (U.S. patent 6,049,739). Contact him at 556 Boden Way #7, Oakland, CA 94610; tel: (510) 834-0175.