Appendix 3 PID Tuning Tips V200

RMT Ltd.
TEC Controller DX5100
Technical Manual
Appendix 3
PID TUNING TIPS
RMT Ltd.
Moscow, 2009
Version 2.00
DX5100 Technical Manual. Appendix 3
RMT Ltd.
CONTENTS
1.
CONTROLLING ALGORITHM ........................................... 3
Sampling Period ........................................................... 6
2.
AUTO-PID FUNCTION ....................................................... 6
2.1.
Introduction .................................................................. 6
2.2.
Ziegler-Nichols Algorithm ............................................. 7
3.
PID TUNING TIPS .............................................................. 8
1.1.
Page 2 of 9
Version 2.00/2009
RMT Ltd.
DX5100 Technical Manual. Appendix 3
1. CONTROLLING ALGORITHM
The block diagram of the system of automatic control with a
feedback is shown in the figure below.
Fig.1 Block diagram of the system of automatic control with a
feedback
Here w(t) is a desired value, y(t) is a target variable; e(t) = w(t) y(t) - is a deviation of the target variable y(t) from the desired value
w(t); u(t) is a managing influence; z(t) is an external perturbation
whose influence should be reduced to minimum;.
The target variable can be temperature. The purpose of the
regulation can be a maintenance of the target variable equal to a
desired value w(t). For this purpose it is necessary to minimize the
regulation error e(t).
This task is solved by the automatic control Gr (Fig.1), which is
described by some law of regulation u(t) = Gr[e(t)].
The synthesis of the optimum controller giving the maximal
parameters of quality of regulation is quite a complicated problem. In
many cases for the manufacturing automation other simpler and
widely-used types of linear controls can be applied - P-, PI-. and PIDcontrollers.
The idealized equation of the PID-control looks like
Version 2.00/2009
Page 3 of 9
DX5100 Technical Manual. Appendix 3
RMT Ltd.
t

1
de(t ) 
u (t ) = K e(t ) + ∫ e(τ )dτ + TD
,
T0
dt 

(1)
where K - transfer ratio, T - integration constant, TD differentiation constant.
These three parameters are chosen during the adjustment of the
controller so that as to make the functioning algorithm as close to the
desirable one as possible.
The described system of the automatic control is continuous, i.e.
it uses continuous time. When designing a controller it is necessary
to quantize the set and target variables of the controller in time with
some step T0 and to transform then to the digital form with the help
of analog-to-digital and digital-to-analog converters. For it the
equation of the PID-control should be transformed into the differential
one by replacing the derivative by a finite difference and the integral
by the finite sum.
If using the method of rectangulars for the integral replacement
with the finite sum we obtain:


T0 k
T
u (k ) = K e(k ) + ∑ e(i − 1) + D [e(k ) − e(k − 1)] ,
T i=0
T0


(2)
where k=0, 1, …
t
T0
- discrete time serial number.
The shortcoming of this approach is the necessity to remember
the values of deviations е (k) for all the moments of time from the
beginning of the process of regulation.
This shortcoming can be removed, if a current value of
managing variable u (k) is calculated by its previous value u (k-1)
and a correction. For such a recurrent algorithm it is enough to
subtract from equation (2) the following equation:
Page 4 of 9
Version 2.00/2009
RMT Ltd.
DX5100 Technical Manual. Appendix 3


T k −1
T
u (k − 1) = K e(k − 1) + 0 ∑ e(i − 1) + D [e(k − 1) − e(k − 2)]
T i =0
T0


,
(3)
As a result we have:
u (k ) − u (k − 1) = q0 e(k ) + q1e(k − 1) + q2 e(k − 2) ,
where
 T 
q0 = K 1 + D  ,
 T0 

T
T 
q1 = K 1 + 2 D − 2 0  ,
T0
T 

q2 = K
TD
T0
,
The PID coefficients stored in the in non-volatile memory of the
device factors:
K
- proportional coefficient of PID-controller,
2 *T0/T
- integral coefficient of PID-controller,
TD/T0
- differential coefficient of PID-controller.
These coefficients are set by the command 31h and can be read
by the command 32h.
When coming from continuous operators to discrete ones there
is an error whose value is proportional to the remainder term of the
Taylor series of the function e (t). The obtained discrete equations
can be considered equivalent to the continuous ones only if the
function e (t) changes little within the limits of the sampling period.
Version 2.00/2009
Page 5 of 9
DX5100 Technical Manual. Appendix 3
1.1.
RMT Ltd.
Sampling Period
Since the controlled value in PID regulation is temperature, the
Controller applies an algorithm in which the PID sampling period is
equal to the period of temperature measurement. The period of
temperature measurement, in turn, depends on the number of
channels of ADC involved in the measurement.
Different values of PID sampling period in correspondence to
various modes of ADC operation are given in the table.
PID
sampling
period
(~mSec)
ADC mode
460
All ADC channels are measured (by default)
287
Only 2 temperatures are measured (the choice is
done by mask – the command 18h)
145
Only 1 temperature is measured (the choice is done
by mask – the command 18h)
38
Only 1 temperature is measured (the choice is done
by the command17h)
A change of the sampling makes it necessary to correct the PID
factors.
It is necessary to take into account that an increase of the
sampling period results in the data similar to reduction of
proportionality factor and, on the contrary, a reduction of sampling
period is similar to increase of proportionality factor.
2. AUTO-PID FUNCTION
2.1. Introduction
The finding of optimum parameters of regulation of the given
object is quite a delicate and long procedure. It is a consecutive
experimental choice of parameters.
At the same time the quality of regulation of temperature
depends on the optimality of the set parameters.
Page 6 of 9
Version 2.00/2009
RMT Ltd.
DX5100 Technical Manual. Appendix 3
Attention! The parameters preset at the device delivery are
formal and do not concern a real controlled object.
With the purpose of simplification of the PID controller optimum
parameters choice in the ТЕС Controller DX5100 the function autoPID is realized.
This function realizes the known Ziegler-Nichols algorithm. The
user applying this function can use the obtained PID controller
parameters for the subsequent accurate adjustment or apply the
given parameters directly to the control of the object.
Attention! Before starting the auto-PID function it is necessary
to set alarm limit of maximal allowable voltage of thermoelectric
module.
Attention! Nevertheless the manufacturer regards the
parameters obtained with the help of the built-in auto-PID function as
estimated and not quite optimum. It is recommended to check up the
obtained parameters and if necessary to carry out a more accurate
tuning of the PID parameters depending on the required quality of
the thermal regulation.
2.2. Ziegler-Nichols Algorithm
In the Controller DX5100 one of the known algorithms of an
automatic finding of the PID parameters is realized.
When the object of regulation is exposed to voltage (current) of
a certain value the dynamic characteristic of the object of regulation
is obtained as the parameters of its transition into a stationary
condition at a given influence.
The figure below illustrates the dynamics of the process and the
required parameters.
Version 2.00/2009
Page 7 of 9
RMT Ltd.
dP
DX5100 Technical Manual. Appendix 3
dU
t
τD
t
τ
The required parameters are:
- Deadtime τD
- Process gain
K=
τ
dU
τD
dP
The found values of the specified parameters by the ZieglerNichols method enable to estimate the PID parameters as:
Proportional coefficient
1,2 х K
Integral coefficient
2 x τD
Differential coefficient
0,5 x τD
3. PID TUNING TIPS
The tuning quality can be estimated by different criteria: by the
rate of achieving the setpoint, by the minimal overshot, by accuracy
of setpoint maintenance. The tuning quality can also be estimation
by the transient process of achieving the setpoint. Recommendations
for PID tuning by the form of the starting curve are given below.
1. Set values of integrated and differential components equal
to zero:
Ki=0; Kd=0
Modify the value of the proportional component factor so that the
form of the transitive characteristic correspond that of curve 2 or 3.
Page 8 of 9
Version 2.00/2009
RMT Ltd.
DX5100 Technical Manual. Appendix 3
2.
Modify the value of the differential component factor so that
the form of the transitive characteristic correspond that of curve 2.
The integrated component is intended to remove a residual
3.
mismatch between the temperature value achieved in the system
and the setpoint. Modify the value of the proportional component
factor so that the form of the transitive characteristic correspond that
of curve 3.
Version 2.00/2009
Page 9 of 9