0% found this document useful (0 votes)
15 views

Process Ident, Controller Tuning and Control Circuit Sim in Excel

Uploaded by

Ilich Lama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Process Ident, Controller Tuning and Control Circuit Sim in Excel

Uploaded by

Ilich Lama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

PROCESS IDENTIFICATION, CONTROLLER TUNING AND CONTROL CIRCUIT SIMULATION

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

Keywords: linear, data-based tuning, process control systems, computer/software

1. INTRODUCTION K P e  sTt
G P s  
Office programs are installed on nearly every PC or
1 s1 1 s2  (1)

laptop. Spreadsheets provide numerous mathematical


and graphical tools that can be used for solving with least square fitting between the step response of
problems in engineering sciences. Based on the plant and the model using the solver function of
Microsoft Excel a tool has been developed for Excel. From this the characteristic frequency
process identification, controller tuning and control parameters of the plant follow as
circuit simulation.
Sum of time constants:
T1  1 2  Tt (2)
2. PROCESSI DENTIFICATION
Product sum of time constants:
Process identification and modelling can be carried T22  12   1 2  Tt  0.5 Tt2 (3)
out for the open and closed-loop control circuit. The
values of the input and output signals of the plant can
Figure 1 shows the step response of a flow process
be represented in ASCII-format.
that is provided by the Online Lab of J. Henry at the
University of Chattanouga (Henry). The results of the
process identification are given below as
2.1 Least square approximation using the solver
function of EXCEL
Kp = 0.514 lb/min/%
For the open loop the step response of the plant is 1 = 0.233s T1 = 0.866 s
2 = 0.233s T22 = 0.321 s²
approximated by a second order system plus dead-
time Tt = 0.400s.
These parameters are used for controller tuning Ziegler and Nichols (1942) have demonstrated that
according the criterion of cascaded damping ratios. information obtained from the inflection tangent can
be used for a controller tuning. Their investigations
27 were based on plants with first order lag plus dead-
26,5 time (FOPDT). It is obvious that for the same values
26 of Tu and Tg one can find numerous configurations of
Flow/(lb/min)

25,5 different lag orders with and without dead-time (Fig.


25 2). The FOPDT-approximation with identical values
24,5 of dead-time Tu and build-up time Tg proves to be
24 insufficient In order to locate the specific response
23,5
function within the family of curves possible an
23
12 13 14 15 16 17 18 19 20
additional parameter is needed.
x(t) x(t) appr. t/s
The problem has to be looked at from the point of
process identification. A controller design is only
Fig. 1. Step response of a flow process and
possible if a process identification can be carried out
approximation by a SOPDT-model
on the basis of parameters obtained by the inflection
tangent. With this background a controller design
then can be accomplished. Process identification has
2.2 Method of inflection tangent
not to be highly accurate because PID- controllers are
rather robust against deviations of the plant
Another method of parameter estimation is provided
parameters.
on the basis of the inflection tangent applied to the
step response (Schaedel 1999).
Figures 3 shows the normalised characteristic time
constant T1/Tg as a function of the normalised lag-
time  = Tu/Tg for typical processes in table 1.
h(t inflection tangent
KP

hx Table 1 Frequency transfer functions of typical


 sTu

G S (s)  e processes
1  sTg

K sTL K
G P1  s   e G P2  s  
1 s1 1 s1 
Tu : dead-time
Tg : build-up time 1 s

Ke  sTL
G P3  s   with  = 0...1
1 s1 1 s1 
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 
i1  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)  1sT s
0 1
2
T2 2
]2 ds  min (8)

This a superposition of two integrating terms with This leads to


different delays Tu and Tt = Tu+Tg. This approach is
modified by introducing a time lag into the integral 

 [x(s){1 sT  s T2 2 }  u(s)K S ]2 ds  min


2
term. 1
(9)
0

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.

The parameters Tt and  have to be adjusted in such a 


x(s) x(s) u(s)
manner that the unit step response function passes [
0 s2
 T1 
s
 T2 2  x(s)  K S  2 ]2 ds  min
s
(10)
through the build-up value hx = h(Tu+Tg). From this
one finds the relation for time constant  as a function
Applying Parseval theorem
of the build-up value hx Using apparent dead-time
Tu, build-up time Tg and build-up value h(Tu+Tg) the  
characteristic frequency parameters T1 and T22 1
 X() d  x 2 (t)dt
2
(11)
according equations (2) and (3) may be estimated 2  

 0.104   0.104 the problem is transferred into the time domain


T1    A  Tg T1    A  Tg
(6) 
   [I (x)  T1 I(x)  T2 2  x(t)  K S I 2 (u)]2 dt  min
2
1 (12)
T  2 T12
2
T  2
T12
2  0, 2A
2 2
A 0

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 k1 )  (x k  x k1 ) 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 k0
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

 k0
 k 0
 k 0

 
k 0
 

Matrix A Matrix C

Figure 4 shows the results for a PI-controlled flow


process with poor tuning. proportional gain KC and reset time Tr.

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 11.2
KP = 0.5 lb/min/% T1 = 0.826 s T22 = 0.246 s T12

From these data a first-order plus dead-time model


for the plant has be calculated in order to compare Table 3 PI-contoller for optimal disturbance rejection
the response of the real process with the model
identified.
Butterworth (normal design)
KP = 0.5 lb/min/% Tt =0.38s = 0.446 s 1  1 T12  T22  T22 
KC   2
1 Tr  4 1 2 2 
The referred dead-time d = Tt/To is varied for optimal
KP  2 T2  T1  T1 
fitting manually. Figure 4 shows excellent agreement
between approximating model and real plant. Tschebyscheff 0.1 db

1  T12  T22  T22 


3. CONTROLLER TUNING KC   0.7 2 1 Tr  3.11 11.43 2 
KS  T2  T1  T1 
Controller tuning is done according to the criterion of
cascaded damping ratios (Schaedel, 1997a, 1997b, ITAE
1998). The design is based on a direct relation
between the parameters of the process and the 1  T12  T22  T22 
KC   0.69 2 1 Tr  3.86 11.46 2 
controller and enables the use of classical filter KP  T2  T1  T1 
design (e.g. Butterworth, Tschebyscheff) and
standard forms (e.g. ITAE, IAE). A design for From parameter estimation in section 2.1 the tuning
optimal set-point control as well as optimal of the PI-controller of the sharp design is obtained for
disturbance rejection provided. Table 2 and 3 give optimal reference control of the flow process as
tuning rules for the parameters of the PI-controller
KC = 0.973 % /(lb/min) Tr = 0.495 s. variable for changes in set-point. The tuning for
optimal disturbance rejection responds with a
Figure 5 and 6 show the response of the control significant overshoot for changes in set-point but has
circuit to a set-point change at 15s and a change in a much faster settling for disturbance rejection.
disturbance at 20 s.
1,4
30 1,2

controlled variable x(t)


29 1,0

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

Fig. 7. Simulation of the response a PI-controlled


Fig. 5. Response of the PI-controlled process to a set- process to set-point and disturbance changes
point change and a disturbance change
6,0
manipulating variable u(t)
90 5,0
4,0
80
3,0
70 2,0
u(t)/ %

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

Fig. 8. Simulation of the input signal (manipulated


Fig. 6. Input signal (manipulated variable) of the PI- variable) of a PI-controlled process
controlled flow process

4.2 DIDO control circuit simulation


4. CONTROL CIRCUIT SIMULATION
For the DIDO control circuit structures with main
There are excellent possibilities in a spreadsheet to controllers of the PI-type and with additional de-
simulate the time response of a control circuit using coupling blocks are realised. Figure 9 shows the
difference equations. Single-input/single-output and simple case, where only two PI-controllers are
dual-input/dual-output systems have been realised so provided for controlling the process. The click-boxes
far for proportional and integral plants with dead- in the cross-coupling branches can be used for
time. Controllers are of PID type. Signal generators activating and deactivating these branches. Figure 10
provide a step and a ramp signal. If a model of the gives an example where the PI-controllers are
plant has been obtained from measured data a designed for optimal set-point control of the upper
controller design can be made and a simulation of the circuit and for optimal disturbance rejection of the
closed control circuit carried out before the real lower circuit when there is no cross-coupling. The
experiment. The closed loop data then again can be transfer functions of the main and coupling branches
used to check and modify the controller tuning. are given in Table 4.

Table 4 Transfer functions of the DIDO control


4.1 SISO control circuit simulation process

Figure 7 and 8 demonstrates the simulation of a PI- 1.5 2.0


G1  s   G 2 s  
controlled plant with a second order delay plus dead-
time. The PI-controller is designed for optimal set-
1 s 1 2s  1 2s 1 4s 
0.5 1
G12  s   G 21  s  
point control (sharp design, Tschebyscheff 0.5 db)
and optimal disturbance rejection (ITAE). The set- 1 s 1 2s  1 2s 1 3s 
point tuning shows fast settling of the controlled
initial page Dual input/dual output process with PI-controllers
Parameter
disturbance z1: Step 2

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

Fig. 9. Dual input/dual output control circuit

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

1,2 Golubec, B. and Horowitz, I. (1982). Plant rational


controlled varaiable x(t)

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.

You might also like