Data Acquisition (DAQ) and Control from Microstar Laboratories

PIDZ Processing Command

Module PIZDM :: PIDZ

ISA form PID control with zero shaping extensions to adjust setpoint transient response.

Syntax

PIDZ( PSET, PFB, K, TI, TD, Kb, TSAMP, POUT, YMIN, YMAX)



Parameters

PSET
Setpoint level command input
WORD PIPE
PFB
System response feedback input
WORD PIPE
K
Feedback gain parameter
FLOAT CONSTANT | FLOAT VARIABLE
TI
Integral time parameter
FLOAT CONSTANT | FLOAT VARIABLE
TD
Derivative time parameter
FLOAT CONSTANT | FLOAT VARIABLE
Kb
Zero shaping parameter in range 0.0 to 1.0
FLOAT CONSTANT | FLOAT VARIABLE
TSAMP
Time interval between PID updates, seconds
FLOAT CONSTANT
POUT
Control output
WORD PIPE
YMIN
Output lower limit
WORD CONSTANT, WORD VARIABLE
YMAX
Output upper limit
WORD CONSTANT, WORD VARIABLE

Description

The PIDZ processing command is intended for PID control applications where the controlled plant tends to oscillate and overshoot in response to setpoint changes under closed loop control. Oscillations resulting from setpoint changes can be corrected by reducing loop gains, but that has the side effect of reducing disturbance rejection as well.

The command input is taken from a data pipe. The processing loop uses the previous value if no new command level is provided. There are various ways to apply this feature. In an asynchronous level-setting strategy, just place the desired setpoint value into the command pipe. In a tracking strategy, a setpoint command level is specified point by point for each update. In a ramping strategy, a sequence of points describes each ramp shape, and then once the desired level is reached no additional data are needed and the loop attempts to hold the final setpoint value.

The controller response characteristic is

  K ( 1 + 1/TI integral(y-r) +  TD F(derivative(y)))

where the terms in this expression are

K
Controller (feedback) gain
TI
Integral time constant
TD
Derivative time constant
r
Command reference level (setpoint)
y
System output (feedback)
F
Derivative gain limiting filter

The gain limiting filter F has a fixed single-pole rolloff at about 1/10 of the Nyquist frequency for the update sample stream.

The zero shaping gain parameter b affects only the transfer function of system output response y to setpoint command signal r . For closed loop operation, this transfer function is:

                 K ( s b + 1/TI ) G
Y/R  =   -----------------------------------------
            s   +   K ( s + 1/TI + s TD F(s)) G

where G is the unknown transfer function of the plant to be controlled. The value of b must be in the range 0.0 to 1.0. When set to 1.0, the controller is conventional PID and provides faster rise times. When set to 0.0, the controller is known as a pseudoerivative controller and provides smoother rise time response with greatly reduced overshoot. It is usually not necessary to "ramp" setpoint command levels in pseudoderiviative operation.

The integral gain must not be zero. Applications that require exactly zero integral feedback for long term stability should not use this command. With zero integral gain, the pseudoderivative controller configuration can not respond to changes in the command input, and the PID controller configuration is subject to very long term accumulation of rounding errors. The DAPL system's PID1 command works fine for pure P-D control applications.

A parameter must be provided to specify the sampling time interval in a floating point notation. This is used internally to relate the sampled data streams to the time specifications of the integral and derivative gains. Specify the sampling interval in units of microseconds.

The control output level is always bounded. For some systems, appropriate limits will be 0 and some positive upper bound. For other systems where bounds are unimportant, select the largest possible limits, for example -32728 and +32767. There is no error accumulation at times when the control output is at limits — a feature known as anti-windup.

When the command first starts, one sample of setpoint command data and one sample of output feedback data are captured for initializing controller state. To force the system to start from zero state, push artificial zero values into the PSET and PFB data streams. If the system has already settled to reasonable proximity of the desired setpoint prior to starting loop operation, no special action is necessary, just supply the setpoint value and allow the loop to make any necessary minor adjustments.

Warning

This is a work in progress and not a finished commercial product. Do not use this in field applications unless you have tested thoroughly and are willing to accept any and all risks!

Examples

 PIDZ(PSET, IP(0), 12.8, .24, .05, 0.1, 2.5e-4, POUT, -32767, 32767)
 DACOUT(POUT,0)

Read the setpoint level from pipe PSET. For each feedback sample received from input sampling channel IP0, compute PID updates and place them into pipe POUT. The output values are immediately converted to a voltage command level on analog channel 0. Use feedback path gain of 12.8, with integral time 0.24 and derivative time of 0.05. Use a zero-shaping parameter value of 0.1, making the command response somewhat slower but generally smoother than conventional PID. The sampling interval for the PID updates is 250 microseconds. Set output limits to the maximum symmetric extremes, positive and negative.

See Also

PID1 in the DAPL 2000 Manual.

 

Return to the PIDZ - PID With Zero-Shaping Control page.