Process Ident, Controller Tuning and Control Circuit Sim in Excel
Process Ident, Controller Tuning and Control Circuit Sim in Excel
USING MS EXCEL
H. M. Schaedel
University of Applied Sciences Koeln, Faculty of Information, Media and Electrical Engineering
Betzdorfer Str. 2, 50769 Koeln, e-mail: [email protected]
Abstract: The paper presents a tool for process identification, controller tuning and control circuit
simulation based on spreadsheets like MS-Excel. Process identification and modelling can be
carried out for the open and closed-loop control circuit. Controller tuning is done according to the
criterion of cascaded damping ratios. The design is based on a direct relation between the
parameters of the process and the controller. Tuning for optimal set-point control as well
disturbance rejection is provided. Single-input/single output (SISO) and dual-input/dual-output
(DIDO) systems can been simulated for proportional and integral plants with dead-time. Copyright
2003 IFAC
1. INTRODUCTION K P e sTt
G P s
Office programs are installed on nearly every PC or
1 s1 1 s2 (1)
G S (s) e processes
1 sTg
K sTL K
G P1 s e G P2 s
1 s1 1 s1
Tu : dead-time
Tg : build-up time 1 s
Ke sTL
G P3 s with = 0...1
1 s1 1 s1
2
Tg t/s
Tu K K
G P4 s G P5 s
1 s
n i
n
Fig. 2. Step response of a lag process and first order
plus dead-time approximation (FOPDT) with
1 s
i1 i
identical Tu and Tg
T1
2 The dead-time term is approximated using Taylor
Tg
GP1 series expansion. A set of curves results that is
1.8
confined at the upper border by the first order lag
transition GP1 to GP4 with time delay (GP1) and at the lower border by the
1.6 GP3
nth order lag with equal time constants (GP4). The left
1.4 border for low ratios Tu/Tg is confined by the
1.2
transition from the first order lag to the second order
lag with varying ratios of the two time constants
1 (GP2). In order to determine the sum of time constants
0.8
GP4 T1 for a given ratio = Tu/Tg an additional
information is needed. For practical application this
GP2 GP5
0.6 characteristic information has to be taken in a simple
0.4
way from the step response. It is rather obvious to
0 0.1 0.2 0.3 0.4 0.5
T u / Tg
0.6 0.7 0.8 0.9 1 take the value of the unit step response hx for the time
tx = Tu + Tg. This build-up value hx can be taken with
rather good accuracy.
Fig. 3. Sum of time constants T1 as a function of The simplest way of approximating the step response
=Tu/Tg is a polygonal approach using the inflection tangent
K I sTu KP Ks
G P s
sT x(s)
s
e 1 e g with K I
Tg
. (4)
[ u(s) 1sT s
0 1
2
T2 2
]2 ds min (8)
K I sTu KI
GS s e e sTt ; Tt Tu Tg (5) Using integration instead of differentiation the
s s 1 s methods proves to be very insensitive against noise.
where where
t
A 0.5 1 H 2 I(x) x(t)dt I 2 (x) x(t)dt 'dt
H e 1 h x K P (7)
Tg 0 0 0
(13)
t
I(u) u(t)dt I (u) u(t)dt 'dt
2
and 0 0 0
Tu lag time (apparent dead-time)
Tg build-up time are the integrals of the input and output data of the
Tu/Tg plant. The discrete time version follows as
hx h(Tu+Tg) build-up value.
N N
The results of identification through the inflection [I
k 0
2
(x k ) T1 I(x k ) T2 2 x k K S I 2 (u k )]2 e 2 (k)
k 0
tangent for the flow process under test in section 2.1
differ only slightly from those according to least T
with I(x k ) I(x k1 ) (x k x k1 ) 0 (14)
square approximation using the solver function of 2
Excel.
using trapezium rule for integration. Looking for
least square error by taking the differentials to the
2.3 Closed loop identification characteristic values KP. T1 and T22 leads to a matrix
relation between input and output data and frequency
For the closed loop the characteristic frequency parameters (15) from which the characteristic
parameters T1 and T22 of the process can be estimated frequency parameters of the plant can be determined
from the input signals u(t) and output signals x(t) by matrix inversion (16).
applying least square approximation of the frequency
response GP(s) (Golubev and Horowitz, 1982).
N N
K S
e
k 0
k
2
2 [I 2 (x k ) K S I 2 (u k ) T1 I(x k ) T2 2 x k ]I 2 (u k ) 0
k 0
N 2 N
T1 k0
e k 2 [I 2 (x k ) K S I 2 (u k ) T1 I(x k ) T2 2 x k ]I(x k ) 0
k 0
(15)
N N
T2 2
e
k 0
k
2
2 [I 2 (x k ) K S I 2 (u k ) T1 I(x k ) T2 2 x k ] x k 0
k 0
N 2 N N
N 2
[I (u k )] I(x k )I 2 (u k ) x k I 2 (u k ) I (x k )I (u k )
2 2
k 0 k 0 k 0
K S k 0
N 2 N N
N 2
I (u k )I(x k ) [I(x k )] x k I(x k ) T1 I (x k )I(x k ) (16)
2
k 0 k 0 k 0 T 2 k 0
N 2 N N 2 N 2
I (u k ) x k I(x k ) x k [x k ] I (x k ) x k
2
k0
k 0
k 0
k 0
Matrix A Matrix C
30 65
Table 2 PI-controller for optimal set-point control
29
Butterworth (normal design)
60
Flowrate/(lib/min)
28
0.5 Tr Tr T12 2T22
27 KC
55 K P T1 Tr
26
25
50
24 Tschebyscheff 0,5 db (sharp design)
23 45 0.375 Tr T22
12 14 16 18 20 22 24 26 28 30 KC Tr T1
K P T1 Tr T1
x(t) x_approx(t) u(t) t/s
ITAE
Fig. 4. Step response of a PI-controlled flow process
with poor parameter tuning 0.375 Tr
KC
K P T1 Tr
Parameter estimation based on input and output data
gives the characteristics of the plant
T22
Tr 0.64T1 1.64T1 11.2
KP = 0.5 lb/min/% T1 = 0.826 s T22 = 0.246 s T12
28 0,8
Flowrate/(lib/min)
27 0,6
0,4
26
0,2
25
0,0
24 0,0 2,0 4,0 6,0 8,0 10,0
23 Tschebyscheff 0,5db ITAE t/s
14 18 22 26 t/s 30
1,0
60
0,0
50 -1,0
0,0 2,0 4,0 6,0 8,0 10,0
40 Tschebyscheff 0,5db ITAE t/s
14 18 22 26 t /s 30
w1 - v1 x11 x1
+
R (s)
1 G 1(s) + +
Step 2 Tscheb 0,5 setpoint opt.
Parameter x12
G 12(s)
x21
Parameter
G 21(s)
0 1 Tscheb 0,1 disturb. opt.
w2 + v2 x22 + + x2
-
R 2(s) G 2(s)
disturbance z2: 0 1
Parameter
Activating the cross-coupling branches through the order to illustrate modern methods of control
click-boxes results in a significant interference engineering for application in industry.
between the two circuits (Figure 11). The whole
control circuit remains stable. REFERENCES
x1
1 transfer approximation from input-output data.
0,8 Int. J. Control, Vol. 36, No. 4, pp 711-723
0,6
x2
0,4
0,2
Henry, J. Online Lab, University of Tennesse at
0
Chattanouga, http://chem.engr.utc.edu
-0,2
0 10 20 30 40 50 t/s 60 Schaedel, H.M. (1997a). Parameterschätzung über
die Wendetangente und direkter Reglerentwurf
in den CAE-Werkzeugen SimTool und SIMID. 2.
Fig. 10. Response of the DIDO-control circuit VDI/VDE Aussprachetag "Rechnergestützter
without cross coupling Entwurf von Regelsystemen", 16./17.Sept.,
Kassel, GMA-Bericht 32, pp. 9-18.
1,4
Schaedel, H.M. (1997b). A new method of direct
controlled varaiable x(t)
1,2
x1
1 PID controller design based on the principle of
0,8 cascaded damping ratios. Proc. 4th European
0,6
0,4 Control Conference, Brussels, 1.-4. July 1997,,
0,2
x2
Paper WE-A H4, BELWARE Information
0
-0,2
Technology, Waterloo (B).
0 10 20 30 40 50 t/s 60
Schaedel, H.M. (1998). Neue Prinzipien des
direkten Entwurfs parameteroptimierter Regler
für stabile, schwingungsfähige und instabile
Fig. 11. Response of the DIDO-control circuit Strecken mit dem CAE-Werkzeug SimTool.
without cross coupling GMA-Kongress ’98 Mess- und Automati-
sierungstechnik, Ludwigsburg, VDI-Berichte
1397, pp. 103-110.
CONCLUDING REMARKS
Schaedel, H.M. (1999), Prozessidentification und
The Spreadsheet Control Tool is designed for use in Regleroptimierung auf der Basis minimaler
teaching as well as industrial application. An Prozessinformation aus der Übergangsfunktion
extension of the program may be done quite easily des offenen und geschlossenen Regelkreises.
by adding sheets and introducing hyperlinks. Cells Internal Report, FH Koeln.
may be protected to avoid unintentional changes.
The program will be continuously extended and
examples will included for educational purposes in
Ziegler, J.G. and G.A. Nichols, (1942). Optimum
settings for automatic controllers, Trans.
ASME, 64, pp. 759-768.