Print page
Email page

Home » Closed-Loop PID algorithms in motion/motor control

Closed-Loop PID algorithms in motion/motor control

ControlDesign.com

Keywords: loop, closed loop, loop control and motion control

Motion expert and Control Design contributor Ernst Dummermuth explains PID and says to use differential feed forward for numerical controls, or integral feed backward for trajectory control of motion.

By Ernst Dummermuth

The basic function of closed-loop control is to maintain a process characteristic (temperature, flow, pressure, speed, torque) at a desired value. The process can deviate from this desired set point (SP) value as a result of changing material, load requirements, interaction with other processes, and so on. The actual condition of the process characteristic measured is the process variable (PV). The deviation of the measured process variable from the desired set point is the error (E).

The formula for process error is thus: E = SP – PV

Once an error is determined, the function of the control loop is to output a control variable to the process to force the error E to zero. Figure 1 below shows a basic PID closed loop control.

ADVERTISEMENT

FIGURE 1: YOUR BASIC PID
Basic PID
The classical loop control technique can include three-mode control known as PID, which represents  proportional, integral, and derivative. (Click image to enlarge.)

The classical control technique used to operate an analog control loop is known as a “three-mode control.” This control technique is based on the solution of an equation that can include one, two, or three terms, or modes, of control. Three-mode control is known as PID, which represents proportional, integral, and derivative. This is the description of the mathematical operation performed in the terms of the equation.

Functionally, proportional control action provides a control output component proportional to the value of the instantaneous error. Integral control action (also known as reset action) provides a control output component proportional to the summation of the error over a period of time. Derivative control action (also known as rate action) provides a control output component proportional to the rate of change of the error. These modes of control are used individually or in combination to provide the desired control action.

PID Equation
PID control action is represented by the equation:

Nowadays, computers and microprocessors are used to implement control functions. Thus the ideal PID equation is approximated by digital values and discrete time intervals. As such, the error E will be sampled at ∆t time intervals and a new control variable output V will be available every ∆t.

The PID equation also can be represented in a simplified form:

Cascade Loop Control
Cascade loop control is shown in Figure 2 below. Loop 1 is called the outer or primary loop; Loop 2 is called the inner or secondary loop. There might even be a ternary, inner-most loop. The inner loop senses a change, and compensates for it before the outer loop is affected. This type of control is used to reduce the response time of the secondary loop when controlling a primary loop with large inertia.

FIGURE 2: CASCADE LOOP CONTROL
Cascade Loop Control
The inner loop senses change and compensates before the outer loop is affected to reduce the response time to a primary loop with large inertia. (Click image to enlarge.)

Because the inner loop(s) reduce the system’s response time, the sampling time ∆t for the inner loop(s) must be shorter, too. If the position loop of a motion/motor control is closed with a sampling rate of ∆t = 10 msec, then the velocity loop may be closed at ∆t = 1 msec, and the torque or acceleration loop at ∆t = 100 µsec. Finally, if pulse-width modulation (PWM) is used to generate the output power signals, then the on/off times for the power switches should be calculated at ∆t = 10 µsec.

Figure 3 below illustrates a digital servo control. The control boxes perform PID algorithms. Only one or two of the three terms of the PID algorithm might be implemented. In 3, the outer Loop 1 might be a pure P control, Loop 2 a PI control, Loop 3 another P control, and Loop 4 is a P translation to switching times for the PWM. The process feedback(s) in Figure 3 are shown schematically as one line. If an incremental pulse encoder is used for feedback, it could provide velocity as well as position feedback. Torque feedback is obtained from the motor current. The acceleration loop and the PWM control are part of the drive circuit.

FIGURE 3: DIGITAL SERVO CONTROL
Digital Servo Control


More content on this topic: