You are on page 1of 6

TOWARDS „PLUG&CONTROL“:

SELFTUNING TEMPERATURE CONTROLLER FOR PLC


Bernd-Markus Pfeiffer
Siemens AG
Automation & Drives
Advanced Group Technologies A&D GT5
D-76181 Karlsruhe, Germany
Phone +49(721)595-5973
Fax +49(721)595-6728
e-mail: bernd-markus.pfeiffer@khe.siemens.de

Keywords: adaptive control, software PID control, process dynamics. Such a controller is supposed to learn
programmable logic controller (PLC), temperature control enough about an unknown process during the first heating
phase and to be able to reach even the first given setpoint
without an overshoot („plug & control“). This paper describes
a new concept to reach this goal with very low computational
Abstract effort and memory requirements.
Software PID controllers have become a standard component The first section summarizes some basic aspects of modeling
of automation with PLCs (Programmable Logic Controllers) and control of temperature processes. The second section
and work together with classical sequential function charts in gives details on the identification algorithm, the third on the
the same processing units. However, traditional methods for controller design. In section four some practical aspects of
the computer-aided design of control systems often involve implementation and application are discussed.
high mathematical effort and are usually implemented on
additional PCs that are only connected for commissioning
purposes. Therefore a new, very simple concept for self- 1.1 Modeling of Temperature
tuning PID controllers will be presented, which is
implemented together with the controller on the PLC and
Processes
which enables automatic tuning without prior knowledge of According to [3.], physical models for temperature dynamics
the process. The concept is designed specifically for can be constructed from first order models for elementary
temperature control, but can also be used for other control subsystems. That way it is not necessary to define a system
loops in the process industry which show stable time-lag model with spatially distributed parameters using partial
dynamics and allow sufficient setpoint steps. For users, the differential equations.
most important advantage is the drastic reduction of
commissioning time and effort. If, for example, there are ten
temperature loops in one machine, the successive tuning of all
ten controllers used to require several days. With the new + Qi 1 Ti
concept, there is no longer any need for dedicated tuning. The
- ci s
self-tuning of all control loops is performed automatically and
simultaneously on machine startup. Control performance is
better than it is with the traditionally-designed PID
controllers, particularly for slow temperature processes. The
concept is based on a systematic startup sequence to explore Ti-Ti+1 +
Qi,i+1
process dynamics, a modified inflection point method for ai,i+1
process identification and a separation of setpoint and -
disturbance control.

1 Introduction Figure 1: Elementary heat capacity as a subsystem of a


temperature process
Customer demands for modern digital control systems
meanwhile include the need for selftuning controllers, that
automatically adapt to any temperature process without Each subsystem i (Figure 1) is characterized by its heat
manual parametrization and without prior knowledge of capacity ci [Ws/K] and the respective heat transfer coefficient
ai,i+1 [W/K] to the next, colder subsystem. The subsystem difficult. From a dynamic point of view, PD control would do
receives the heat input Qi and stores it, i.e. integrating over better, but is not applicable because of steady state errors. The
time, thereby reaching the temperature Ti . The heat output to integral time constant Ti of the PID controller cannot be
the next subsystem is calculated as a product of temperature selected according to the dominant, slowest process time
difference Ti -Ti+1 and heat transfer coefficient. This heat constant, as proposed by many tuning formulas, because this
output is taken away from subsystem i, and transferred to time constant usually is in the order of hours. If Ti is selected
subsystem i+1 . External e.g. electrical energy is an additional much faster, there will be large overshoots for setpoint step
input to the subsystem „heating“. changes due to a closed loop transfer zero, even if closed loop
damping is sufficient and the response to load disturbances is
satisfactory. Therefore, the most important decision even for a
1.2 Control of Temperature simple control concept is a separation of setpoint and load
Processes disturbance design. The PID is optimized for tight disturbance
control and is enhanced with a special structure
The resulting transfer functions for temperature dynamics in decomposition to avoid overshooting setpoint responses:
most cases have time-delay characteristics of rather small proportional and derivative terms are placed in the feedback
order. There are rarely more than three relevant time path.
constants that can be identified in industrial processes, but
these time constants depend in a non-trivial way on the time
constants of the elementary subsystems. Process gains range
from 0.5 to 30, depending on the design of the heating and on
measurement normalization factors. Time constants from one 2 Identification
to several thousand seconds are observed. In open loop, there Control design is supposed to rely on a rather simple process
are no oscillations and no extremely long deadtimes. But identification algorithm that easily fits into a PLC function
anyway there are some properties that make temperature block. But the identification must at least deliver a second
control difficult: order model with two different time constants, because they
• Slow drift time constants, i.e. poles of the system differ by an order of magnitude for most temperature
transfer function that are close to the origin of the processes. Many identification algorithms for such
complex plane, and are causing integrator-like dynamics measurement data deliver only first order models, that are not
in the relevant working range. After applying a step input sufficient to design good PID control. Therefore a modified
(„heating on“), it takes a very long time to reach a steady inflection point method is applied in a systematic startup
state. Therefore, identification methods based on sequence (Figure 2) to obtain information of the process and
evaluation of step responses (e.g. [2.]) are rather time successively improve the mathematical model.
consuming and sometimes not practicable. Moreover the The startup sequence has the following steps (called PHASE
relevant time constants time-lag and recovery time differ in Figure 2):
from each other by an order of magnitude or more,
posing special problems for identification algorithms. Phase 1: Heating is off and the steady state cg of the
temperature is measured.
• Transfer zeros, i.e. numerator terms in the transfer
function. They are found if the controlled variable is not Phase 2: As soon as the user demands a setpoint step of
defined at the end of the heat transfer chain, e.g. if an sufficient size, constant heating energy is applied until the
oven is heated from the inside, but the heat capacity of inflection point of the step response is detected. This requires
the outside isolation plays an important role. adaptive low-pass filtering of the measured temperature to
suppress noise effects. As soon as the filtered ascent ratio of
• In many cases, there is no active cooling, and the the step response is decreasing in two successive cycles or the
positive temperature gradients observed are much bigger temperature increases over 70% of the step size, the self-tuner
than the negative ones. Anyway, this effect can be is considering the inflection point to be found, with time
explained with a linear dynamic model, that does not abscissa, ordinate and ascent ratio:
allow negative values of the manipulated variable.
 dx w 
• Nonlinearities can be caused by evaporation, t w , x w , 
condensation or actuators with nonlinear characteristics  dt 
(e.g. valves). However, in many cases they are
From the tangent at the inflection point, the time delay
considered as a cause for control problems that actually
are bound to one of the first three difficulties mentioned x w − x0
above. t u = t w − t sprung − t hilf 1 , t hilf 1 =
dx w / dt
In principle, temperature control is feasible with simple PID-
controllers, but the combination of a process with integrator-
like characteristics and a controller with integral action is

2
is calculated, assuming the steady state x0 = cg . For the
behavior observed up to now, an integrating process model
3 Control Concept
with first order time lag (IT1) The control concept is based on classical PID control, but
allows a separation of setpoint and load disturbance design:
Ki dx w / dt
G ( s) = , Ki = , T2 = t u the PID is optimized for tight disturbance control and is
s(T2 s + 1) y max enhanced with a special structure decomposition to avoid
overshooting setpoint responses: proportional and derivative
can be assumed, for which PI-control according to the terms are placed in the feedback path.
symmetric optimum ( [1.], p. 263) with integrating time
constant
Ti= 4 T2 and gain
3.1 Structure Decomposition Control
Ti
Kp = 2
Structure decomposition as shown in Figure 3 is well known
8T2 K i in literature for integrating processes, because there is a
fundamental dilemma between good disturbance control and
is designed. It is slightly detuned to avoid overshoots. good setpoint control: a PID controller designed for optimal
disturbance control leads to overshoots of 10-20% of the step
Phase 3: “Rough” PI-control to reach the setpoint. The
size on setpoint changes, even if all closed loop poles are
estimated IT1-model does not have a steady state, i.e. the
sufficiently damped. This is due to a dominant transfer zero in
process gain is still unknown. Due to the lack of information
the closed loop reference transfer function. The same
on process dynamics, the PI control must be tuned quite
dilemma is also found for temperature control, where usually
conservative. But as soon as this rough control has achieved a
the requirement is “no overshoot”, because even small
steady state, the process gain
overshoots take a very long time to decay without active
x ∞ − x0 cooling. On the other hand, sluggish disturbance control is
K= also not acceptable, because the temperature processes are
y ∞ − y0 always “too slow”.
can be calculated. At this time at the end of phase 3 it The new discovery is: structure decomposition originally
becomes now possible to make additional use of the intended for integrating processes is also helpful for
inflection point data from the beginning of phase 3. The open temperature control with integrator-like dynamics in the
loop control with fixed heating power (phase 2) had to be relevant working range. Optional structure decomposition is
interrupted a long time before the respective steady state already available in many software PID controllers.
could be reached. From this first part of the step response, the
classical inflection point method ([4.], p. 365) only delivers
the time-lag, but not the recovery time. But with the 3.2 Controller Design
additional information about process gain, an enhancement of
The whole configuration in Figure 3 can be considered as a
the classical inflection point method becomes feasible: the
cascade control: in an inner loop, the slow temperature
intersection of the inflection tangent and a virtual (not
dynamics are accelerated by PD control; in the outer loop, the
measurable) steady state at the end of the step response (that
whole inner loop is directed to steady state precision by I-
was interrupted !) is defined, from which the recovery time is
control. The design procedure follows the usual strategy for
obtained.
cascade control: firstly, the inner loop is tuned.
The parameters of a second order Laplace transfer function Each second order process has two states: the process value x

K and its time derivative x = dx . The transfer function can
G ( s) = , T1 > T2 dt
(T1 s + 1)(T2 s + 1) be transformed to an equivalent state space representation

are obtained from gain, time lag tu and recovery time ta by an x  x • = Ax + b y 
analytic solution of a polynomial approximation of the x =  • ,  
nonlinear equation system: x   x = c ′ x + dy 
T1
 T  T1 −T2  0 1 
t a = T2  1  A = − 1 − (T1 + T2 ) ,
 T2   T1T2 T1T2 
TT T
t u = 1 2 ln( 1 ) − t a + T1 + T2  0 
T1 − T2 T2 b = K  , c′ = [1 0], d = 0
 T1T2 

3
A state feedback for this process is defined by At zone 1 plastic powder is filled into the machine, and is
pressed with extruder screws through the cylinder zones 2 to
y = − k ′ x = −( k1 x + k2 x • ) 6, before it leaves the machine with high pressure through a
heated tool (zones 7 to 10), giving the material the desired
and can be implemented using profile shape. There are 10 temperatures to be controlled, all
of them measured with thermocouples. Actuators are
1 electrical heating inductors controlled by solid state relays.
k = Kp  Zones 2,3 and 4 are additionally equipped with cooling blast
Td  engines controlled by mechanical relays.
as conventional PD controller with gain Kp and derivative Automatic self-tuning is performed for all 10 channels at the
time Td ! This allows to design PD control for a second order same time as shown in Figure 4. The control loops are just
process with the rigorous mathematical methods of state switched on and supplied with a setpoint, before all self-
space optimization, minimizing a quadratic performance tuners step through their startup sequence, identify the
index. The time consuming optimizations are performed process model for the respective control channel, and take
offline for the relevant parameter space 1.1 < f= T1 / T2 < 40 their controllers in automatic operation. After self-tuning has
and the results are approximated with low order polynomials finished, regular production can be started in controlled mode.
for fast online computation on the PLC. The same strategy This example does not show the additional cooling test to
applies to the design of the I-controller: it is optimized in identify the difference between heating and cooling dynamics.
offline simulations for the relevant parameter space and the
resulting tables for the integral time constant are
approximated with a polynomial, depending on the already 5 Conclusions
known derivative time constant.
The „PID Self Tuner“ V1.0 with variable structure control
instead of structure decomposition is delivered since January
1998 to the customers. Patents are pending under Appl. No.
4 Practical Aspects 19548909.8, 19722431.8, 19851827.7 and 19851826.9. With
the self tuner, customers are enabled to perform control
commissioning in the sense of a “plug&play”-philosophy: the
4.1 Implementation controller is connected to input and output signals, afterwards
switched on, and is immediately ready to drive the process to
The new methods described in this paper are implemented as the first given setpoint. There are still some control
a PLC function block for SIMATIC S7. Programming parameters that can be handled by the user, e.g. to select
language is structured text according to IEC 1131-3. The operating modes, but they only need attention if there are
product name is „PID Self-Tuner“. It does not contain a PID special problems or desires. The self tuner is applicable to
controller itself, but is working together with all software continuous output control, to puls-width modulation control
controllers of SIMATIC S7, i.e. „Standard PID Control“, for binary actuators (relays) and to step control for motor
„Modular PID Control“ and the integrated „Step 7 PID valves with or without position feedback (repeated
Control“. The self-tuner takes actual setpoint, process value manipulated variable). Version 2.0 with structure
and manipulated variable as input signals. During the startup decomposition will be capable to handle three-point control
sequence the self-tuner sets the controller in manual mode, for two actuators per loop (heating and active cooling) and is
and makes use of the bumpless switching from manual to expected for June 1999.
automatic mode. As a result of automatic commissioning, the
parameters gain, integral time and derivative time of the PID
are defined. In a PLC program, controller and self-tuner are
called one after each other in the same cycle. The self-tuner is
6 Literature
a very lean function block, needing only 5kB of code plus [1.] Föllinger, O.: Regelungstechnik, 6. Auflage, Hüthig,
0.3kB of data per control channel. It actually requires less Heidelberg, 1990
resources than the PID controller.
[2.] Preuß, H.-P., Linzenkirchner, E., Kirchberg, K.-H.:
SIEPID - ein Inbetriebsetzungsgerät zur automatischen
Regleroptimierung. atp 29, 9/1987.
4.2 Industry Applications
[3.] Preuß, H.-P.: Modellbildung und Regelung von
The new concept was verified in simulation and laboratory
Temperaturstrecken, vorläufiger Bericht, Siemens AG, A&D
experiments before it was tested with selected pilot
GT 34, 6/94.
customers. As an example, some results from the practical
application to a plastic profile extruder “Weber CE7 272K“ [4.] Unbehauen, H.: Regelungstechnik 1, Vieweg,
for PVC-window frames, located at Kömmerling (Pirmasens, Braunschweig, 1992.
Germany), will be given.

4
PHASE = 1 PHASE PHASE = 3 PHASE = 4
=2
SP LMN
PV

Warm state of
SP process:
operating point
PV
LHLM_TUN

LMN
Inflection
point

Cold state of
process
t

TUN_ON
t

Figure 2: Self-tuning of controller for unknown process - setpoint SP, process value PV, manipulated variable LMN; constant
heating LHLM_TUN for identification and control; bit TUN_ON for activation of self-tuning (source: Siemens user manual)

input- z_e output- z_a


disturbance disturbance
w
x
I-control
y
setpoint
K_i(s) p rocess
p rocess G(s) value
PD-control

K _ p d ( s)

Figure 3: Structure decomposition – PD in feedback path

5
Figure 4: Control commissioning for plastic extruder. Setpoint, process value and manipulated variable for startup procedure
to 180 oC. (scales: 0-100% manipulated variable for heating only, -100..+100% for heating and cooling, 0-200 oC setpoint and
process value)

You might also like