Chapter 38
Modeling and Optimization of Extruder Temperature Control P. Kip Mercure and Ron Trainor
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
The Dow Chemical Company, 1776 Building, Midland, M I 48674
This paper
demonstrates
the use of computer
productivity in experimental work, including: systems, collection
of experimental
tools
to
easily configured
data, mathematical
improve control
modeling of
distributed parameter systems, statistical analysis of experimental data including parameter
estimation and optimization.
Easy to use tools
helped in the design and optimization of an extruder barrel temperature control system.
Publicly
available
software was used to model the
system. Parameter estimation and controller optimization for a reduced order model were performed using another publicly available package.
The results of optimizing
software
the control system were faster
startup, improved control during material changes, and tighter control of the temperature.
A computer is a tool in the same sense that a workbench is a tool. It provides a platform for other work — it is only as useful as the other tools which are placed on it. In principle, using fundamental equations and programming languages, one can solve many problems. This statement is similar to the statement that with a vise and a metal file one can hand-build an extruder. While this might be possible for crude work, there are tools, such as lathes and grinders, which produce much higher quality work with less time invested. This paper discusses the application of computer tools which have the same relationship to programming languages as lathes have to files. The word "tools" is used to indicate that these are not just programs, but are "productivity aids" — the means to produce higher quality work in less time. Readily available computer tools allow: the easy collection of experimental data, mathematical modeling of process equipment, statistical analysis of experimental data including parameter es timation and optimization, and easily configured control systems. This paper shows the optimization of an extruder temperature control system by means of such computer tools. The intent of the paper is not so much to demonstrate the tuning of a specific extruder, but to demonstrate a methodology that serves to improve productivity in research. 0097-6156/89/0404-0490$06.00/0 ο 1989 American Chemical Society
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
38. MERCURE & TRAINOR
Extruder Temperature Control
491
Experimental An extruder for a polymer was controlled by a microprocessor based data acquisition and control system. The C A M I L E * system (Control And Monitoring Interface for Laboratory Experiments) connects the sensors and control elements of the extruder to a host MS-DOS computer. While a variety of variables are measured and controlled, this paper will consider only temperature control.
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
1.
Description of data acquisition and control system
Thermocouples are used for temperature measurement; thermocouple extension wire is connected directly to the C A M I L E , which provides cold junction compensation and conversion to engineering units. The control algorithm is the industry standard PID function, with additional calculation "modules" to provide further processing of signals; these calculations are all performed by a master microprocessor within the C A M I L E box with a fixed update period of 1 second. The output of the control calculation is "split" by means of calculation modules, such that when the outputs are in the upper part of the range the amount of electrical heating is adjusted by means of a solid state relay, and when the outputs are in the lower part of the range the amount of cooling is adjusted by means of solenoid valves controlling cooling water. The auxiliary microprocessor, which controls the digital inputs and outputs, converts percent output to a time proportioned digital signal for both heating and cooling (the "percent" output of the PID algorithm is used to set the percent of time that the digital output is "on" during a 1.666 second period). Experience has shown that this is a very precise means of controlling temperature; by eliminating the time lags, nonlinearity, and drift in calibration of the final power controller to the heater, typical improvements in temperature control from ±5.0 Celsius with a conventional power controller to ±0.25 Celsius have been achieved in systems of this type.
2.
Description of extruder barrel
A schematic view of an extruder is shown in figure 1. The extruder barrel is essentially a ferrous alloy cylinder, with aluminum block heaters attached to the outside. There are several temperature control zones along the length of the extruder. Measurement thermocouples are installed in the extruder barrel itself. Barrel temperature is used to control the temperature of the polymer melt. Energy from the heaters is conducted both radially and axially in the barrel. Below, figure 2 shows a sketch of the extruder barrel, with the heaters and the temperature measurement points used in this paper marked.
* Trademark of The Dow Chemical Company
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
COMPUTER APPLICATIONS IN APPLIED POLYMER SCIENCE II
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
492
Statement of Problem Long time constants in the system and zone-to-zone interaction of the heaters complicated the controller design and tuning. The time available for experimental measurements was limited by the schedule of other experimental work to be performed by the extruder. The classic step response methods of tuning controllers would take on the order of hours to perform, and frequently disturbances in the polymer feed or in the ambient room conditions would invalidate the test. Consequently, a mathematical rather than an empirical approach was desirable.
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
Extruder Temperature Control
38. MERCURE & TRAINOR
493
Mathematical Model A first principle mathematical model of the extruder barrel and temperature control system was developed using time dependent partial differential equations in cylindrical coordinates in two spatial dimensions (r and z). There was no angular dependence in the temperature function (3Τ/3Θ=0). The equation for this model is (from standard
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
texts, i.e. 1-2):
The numerical method of solving the model using computer tools does not require the explicit form of the differential equation to be used except to understand the terms which need to be entered into the program. The heater and the barrel were modeled as layers of materials with varying thermal characteristics. The energy supplied was represented as a heat generation term (qg) in a resistance wire material. Equation 1 was to be satisfied in each material region.
1.
Boundary
Conditions
The differential equation describing the temperature distribution as a function of time and space is subject to several constraints that control the final temperature function. Heat loss from the exterior of the barrel was by natural convection, so a heat transfer coefficient correlation (2) was used for convection from horizontal cylinders. The ends of the cylinder were assumed to be insulated. The equations describing these conditions are:
f dT
dT
k I-y n (dT k
\ o T * n
Λ
+ ~2^ z)-Q dT \ n
r
+
3T zJ n
a t
+ h ( T ) Γ
insulating boundaries =
W
(2)
Tambient
at convection and radiation boundaries T= T(r,z) 3it = tQ (initial conditions)
(3) (4, 5 )
The heat loss to the melting polymer was assumed (for a first order approximation) to be negligible compared to the heat loss by convection. This is one area of the model which could profit from more study to determine the exact magnitude of energy exchange with the polymer.
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
494
COMPUTER APPLICATIONS IN APPLIED POLYMER SCIENCE Π Control Algorithm
2.
The temperature control was modeled by using these defining equations for a PID (Proportional-Integral-Derivative controller) algorithm: Error = ε = Set Point - Measured Temperature
(6,7) (8)
Output = OP = KC*e + TI* J ε dt + T D W d t
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
where, KC is the proportional constant [units of %output/°C ] TI is the integral constant [units of %output/(°C-seconds) ] TD is the derivative constant [units of (%output-seconds)/C ] e
One should note the use of engineering units in the controller tuning parameters. The units become important when one must compare different controllers' tuning parameters using different units for the PID calculation. Numerical Solution of the Model
Publicly available software was used to solve the mathematical model. The program TOPAZ, written by Arthur B. Shapiro (3), was used. This program takes into account a wide variety of boundary conditions for heat transfer, including natural and forced convection, fixed heat flux at a surface, radiation, generation, and phase change among others. The geometry of the solid can be in rectangular coordinates ("planar") or in cylindrical coordinates ("axisymmetric"). The solid can be divided into finite elements by quadrilateral and triangular areas.
The program can solve both steady-state problems as well as time-dependent problems, and has provisions for both linear and nonlinear problems. The boundary conditions and material properties can vary withtime,temperature, and position. The property variation with position can be a straight line function or or a series of connected straight line functions. User-written Fortran subroutines can be used to implement more exotic changes of boundary conditions, material properties, or to model control systems. The program has been implemented on MS DOS mi crocomputers, VAX computers, and CRAY supercomputers. The present work used the MS DOS microcomputer implementation.
The basic model equations used by TOPAZ are defined (3) as: n
\de\
d\
dff] d[,
dû]
P n^r^l x^r^lh^\ lg C
k
+c
.
0
mregionβ
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
(9)
38. MERCURE & TRAINOR
k ^ ~ n + ky ^ - n y + β θ=γ x
x
θ=Θ(χ,γ)Μΐ
Extruder Temperature Control
on boundary Γ
= ΐ
0
495
(10) (11)
By comparing equations 1-4 and 9-11, one can see a one-to-one correspondence between terms in the mathematical description and the numerical program. The flexibility of T O P A Z derives from the fact that the parameters of equations 9-11 ( ρ , Cp, k , ky , qg , β, γ) can be linear or non-linear functions of spatial coordinates, x
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
time, and temperature. For the extruder model, the cross-section of the cylindrical solid was divided into rectangular regions (in r and z). Points were first chosen as the vertices of the regions (called nodes in Topaz); then regions (called elements in Topaz) were specified as a series of 4 nodes. For a precision of 1000 ncrv i s the actual curve number atime i s the time aterrp i s the temperature of the point being evaluated valu i s the calculated value returned The routine also has access (via the COMONs below) to the temperatures of a l l nodes: numnp i n common /blk03/ i s the t o t a l number of nodes a(nl04) i s the f i r s t node's temperature so, the i t h node temperature i s = a(nl04+i-l), where i=l to numnp Logical init(2) Integer ipv(2) Real time (2) ,arrocte(2) ,set(2) ,kc(2) ,ti(2) ,td(2) + , t l a s t (2),pvold (2), spold (2), φ ν ο ΐ ά (2), output (2) common // a(10000) common /blk02/ n l , n2, n3, n4, n5, n6, n7, n8, n9, nlO, n i l , nl2, 1 nl3, nl4, nl5, nl6, nl7, nl8, nl9, n20, n21, n22, n23, n24, n25, 2 n26, n27, n28, n29, n30, n30a, n31, n32, n33, n34, n35, n36, n37, 3 n38, n39, n40, n41, n42, n43, n44, n45, n46, n47, n48, n49, n50, 4 n51, n52, n53, n54, n55, n56, n57, n58, n59, n60, n61, n62, n63, 5 n64, n65, n66, n67, n68, n69, n70, n71, n72, n73, n74, n75, n76, 6 n77, n78, n79, n80, n81, n82, n83, n84, n85, n86, n87, n88, n89, 7 n90, n91, n92, n93, n94, n95, n96, n97, n98, n99, nlOO, nlOl, 8 nl02, nl03, nl04, nl05, nl06, nl07, nl08, nl09 nllO common /blk03/ nummat, numnp, numel, iunits, igeom, iband, i e f , 1 n s l , nslvt, nmsrt, numels, nprof, numst, sigma, irtyp, itmaxb, 2 tolb, numelt, iphase, igenm, igene f
C C C C
This common provides storage space for two PID controllers. Controller η i s used for ncurv 10On.
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
504
C C C C C C C C C C C C C C C C C C C C C C
c c c c c c c c c c c c c c c
COMPUTER APPLICATIONS IN APPLIED POLYMER SCIENCE II common /user/ i n i t , time, amode, set, kc, t i , td, ipv + , t l a s t , pvold, spold, dpvold, output The data f i l e f o r the controller consists of two types of lines: (1) i n i t i a l i z a t i o n lines t o set node t o use f o r input, and controller parameters, and (2) switching lines to set when to trigger events such as switching from manual t o automatic mode or changing the setpoint. For example, t h i s type 1 l i n e : I
5
1.0
0.1
0.0
would indicate that loop 1 should use node 5 as input with a proportional constant of 1.0, an integral constant of 0.1, and 0 derivative and t h i s type 2 l i n e : 1
200.0
1.0
100.0
would indicate that loop 1 at 200 seconds would be i n automatic with a setpoint of 100. The variables used are: index init time amode set
(integer) (logical) (real) (real) (real)
the value of (ncurv-1000), selects controller f l a g t o indicate controller i n i t i a l i z a t i o n switch time indicating: read new settings controller .ge.l = automatic, . l t . l = manual i f auto mode t h i s i s the setpoint, i f manual mode t h i s i s output output (real) the output frem the controller kc (real) proportional constant ti (real) integral constant td (real) derivative constant ipv (integer) node used as controller input (present value) tlast (real) the time at the l a s t sample pvold (real) the l a s t value of the present value (pv) dpvold (real) the l a s t value of the rate of change of pv spold (real) the l a s t value of the setpoint
Q index = ncurv - 1000 pv= a(nl04+ipv(index)-1) dt=atime-tlast(index) dpv= (pv-pvold (index) ) /dt IF (init(index)) goto 30 C I n i t i a l i z e PID loop read (7,101) loop,ipv(index),kc(index),ti(index),td(index) 101 format(2ilO,3elO.O) i f (loop.ne.i) write(*,120) loop,index 120 format(lx,'Loop ',ϋ,' does not match ncurv ' , i l , + '; data f i l e lines out of order'); read (7,100) loop,time(index),amode(index),set(index) i f (loop.ne.i) write(*,120) loop,index tlast(index)= atime output(index)=0.0
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
38. MERCURE & TRAINOR
C C
Extruder Temperature Control
505
pvold(index)= a(nl04+ipv(index)-1) dpvold (index)= 0.0 spold (index) = set (index) i n i t (index)=. True. goto 60 Check swtiching time 30 IF (atime.It.tiite(index)) goto 20 get settings for the controller read (7,100) loop, time (index), amode (index), set (index) 100 format(il0,3el0.0) i f (loop.ne.i) write(*,120) loop,index write(*,110) index,time(index),amode(index),set(index) 110 f o r m a t ( l x , ' C o n t r o l l e r ^ , i l , switch time=',f6.4,2x, + ' mode=',f5.0,2x,' setting=',f6.4) Implement the PID controller 20 IF (amode(index).ge.1.0) goto 50 Output i n manual i s i n % output(index) = set(index)*0.01 goto 60 PID calculation of output Proportional term 50 output(index)=output(index)+kc(index) + *(set(index)-pv -(spold(index)-pvold(index))) Integral term output(index)=output(index)+ti(index)*dt*(set(index)-pv) Derivative term output (index) =output (index) -td(index) * (dpv-dpvold (index) ) Anti-reset windup i f (output(index).It.0.0) output(index)=0.0 i f (output(index).gt.100.0) output(index)=100.0 60 valu = output(index) This l i n e i s for debugging write (*, 10) atime, valu 10 formatdx,'atime=',el0.5, ' value='.,el0.5) pvold (index) = pv spold (index)= set(index) tlast(index)= atime dpvold (index)= dpv RETURN END 1
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
C C
C C
C C C
C C
Literature Cited 1. Bird, R. B. et al. Transport Phenomena ; John Wiley & Sons: New York, 1960; p 319. 2. Welty, J. R. et al. Fundamentals of Momentum, Heat, and Mass Transfer; John Wiley & Sons: New York, 1976; p 360. 3.
Shapiro, A. B. " T O P A Z - A Finite Element Heat Conduction Code for Analyzing 2-D Solids"; NTIS publication DE84-010676, March 1984; Lawrence Livermore National Laboratory, Livermore California,.
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.
506 4. 5. 6. 7. 8.
COMPUTER APPLICATIONS IN APPLIED POLYMER SCIENCE II Brubaker, T. A. et al. Anal. Chem. 1978, 50(11), 1017A-1024A. Brubaker, T. Α.; K. R. O'Keefe Anal. Chem. 1979, 51(13), 1385A-1388A. Marquardt, D. W. Chemical Engineering Progress, 1959, 55(6), 65-70. Lopez, A. M . Instrumentation Technology, 1967, 14(11), 57-62. Roiva, A. A. Instruments and Control Systems, 1969, 42(12), 67-69.
Downloaded by UNIV OF ARIZONA on January 14, 2013 | http://pubs.acs.org Publication Date: August 29, 1989 | doi: 10.1021/bk-1989-0404.ch038
RECEIVED May 24, 1989
In Computer Applications in Applied Polymer Science II; Provder, T.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.