Rockwell Automation Publication 2080-UM002L-EN-E - November 2021
281
Appendix F PID Function Blocks
flow of fluid from a tank, a motor with constant torque driving a disk flywheel
or an electric RC lead network. The energy storage element for these systems
are heat energy, potential energy, rotational kinetic energy and capacitive
storage energy, respectively.
This may be written in a standard form such as f(t) =
τ
dy/dt + y(t), where
τ
is
the system time constant, f is the forcing function and y is the system state
variable.
In the cooling of a fluid tank example, it can be modeled by the thermal
capacitance C of the fluid and thermal resistance R of the walls of the tank. The
system time constant will be RC, the forcing function will be the ambient
temperature and the system state variable will be the fluid temperature.
A second order system can be described by two independent energy storage
elements that exchange stored energy. Examples of second order systems are a
motor driving a disk flywheel with the motor coupled to the flywheel via a shaft
with torsional stiffness or an electric circuit composed of a current source
driving a series LR (inductor and resistor) with a shunt C (capacitor). The
energy storage elements for these systems are the rotational kinetic energy
and torsion spring energy for the former and the inductive and capacitive
storage energy for the latter. Motor drive systems and heating systems can be
typically modeled by the LR and C electric circuit.
PID Code Sample
The illustration PID Code Sample shows sample code for controlling the PID
application example shown before. Developed using Function Block Diagrams,
it consists of a pre-defined function block, IPIDCONTROLLER, and four use-
defined function blocks. These four are: