Variable Sample Time Algorithm for Microcomputer Control of a Heat

system. The disc operating system allowed all development work ... The A/D-D/A board contained seven channels each of input ... MICROCOMPUTER. V/l l/P...
0 downloads 0 Views 717KB Size
15 Variable Sample Time Algorithm for Microcomputer

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

Control of a Heat Exchanger RICHARD R. STEWART and NEIL G. SWEERUS Department of Chemical Engineering, Northwestern University, Boston, MA 02115

Mutharasan and co-workers have published s e v e r a l papers on the sampled-data c o n t r o l of d i s t r i b u t e d parameter systems. Mutharasan and Coughanowr (2) developed DDC algorithms f o r the flow-forced tubular r e a c t o r and heat exchanger as w e l l as the w a l l temperature forced heat exchanger. The n o n - l i n e a r a l g o rithms employed previous values of the manipulated v a r i a b l e to c a l c u l a t e the current i n l e t s t a t e from which the new manipulated v a r i a b l e is c a l c u l a t e d . In another paper (3) the same authors showed that sampled data p r o p o r t i o n a l c o n t r o l of the flow-forced tubular r e a c t o r r e s u l t s in sustained o s c i l l a t i o n s f o r c e r t a i n step changes in load f o r a given p r o p o r t i o n a l gain and sampling time. The oscillations were e l i m i n a t e d by the a d d i t i o n of i n t e g r a l a c t i o n . Mutharasan and Coughanowr (4) a l s o derived minimal prototype algorithms f o r a l i n e a r model of the w a l l temperature f o r c e d heat exchanger. Mutharasan and Luus (5) developed minimal prototype algorithms f o r the l i n e a r i z e d model of a flow-forced heat exchanger. The authors a l s o used an a l t e r n a t e design method which involved a d i r e c t search on the parameters of the general l i n e a r DDC algorithm. The purpose of the present study is to present a simply d e r i v e d and implemented DDC algorithm f o r the flow-forced heat exchanger which does not r e q u i r e storage o f previous values of the manipulated v a r i a b l e o r e r r o r . The algorithm r e q u i r e s that steady-state e x i s t at the sampling i n s t a n t s which means that the sample time is v a r i a b l e . However, the algorithm is shown to c o n t r o l f o r the constant sample time case. C o n t r o l Algorithm. exchanger is given by

The equation f o r the flow-forced heat

- | f - + (i+a) -|5

3

( i

b +

a

)

x

(1)

where " a " is the change in f l u i d v e l o c i t y r e l a t i v e to the o r i g i n a l steady-state v e l o c i t y . For sampled data c o n t r o l of the 0-8412-0549-3/80/47-124-281$05.00/0 © 1980 American Chemical Society Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

282

APPLICATIONS

T O CHEMICAL

ENGINEERING

exchanger, " a " is constant between sampling i n s t a n t s . When the steady-state p o r t i o n of Equation (1) is i n t e g r a t e d between i n l e t and o u t l e t temperatures, x^ and x^, the f o l l o w i n g equation r e s u l t s x

= x

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

±

15

0

1

expt-SU+a) " ]

(2)

Equation (2) can now be used to c a l c u l a t e the i n l e t tem­ perature using the measured o u t l e t temperature, χ- , the e s t i ­ mated system parameter, 3 » the known system parameter, b, and the c u r r e n t v e l o c i t y , t l + a ) . e

x

0,calc "

x

l exptiWa+a)"- ] 1

(3)

The c o n t r o l a l g o r i t h m which c a l c u l a t e s the new v e l o c i t y (1+a)^ is obtained by, a) in Equation (2), changing x t o i t s s e l p o i n t v a l u e , χ, changing (1+a) t o (1+a) , and changing 3 to S » b) ' s u b s t i t u t i n g the right-hand s¥de of Equation (3) f o r x^ in Equation (2), c) s o l v i n g the r e s u l t i n g equation f o r (1+a) . The r e s u l t is new w

1

W

n

t

(1+a)

new= I
8

]

À

( 4 )

est Equation (4) is a feedback c o n t r o l a l g o r i t h m f o r both s e t p o i n t and load changes which computes the new v e l o c i t y from the current v e l o c i t y , current and d e s i r e d o u t l e t temperatures, and estimated and known system parameters. Storage of previous values of the manipulated v a r i a b l e and e r r o r are not r e q u i r e d f o r the a l g o r i t h m of Equation (4). Because the c o n t r o l a l g o r i t h m was derived from the steadys t a t e p o r t i o n of Equation 1 it may be a p p l i e d , s t r i c t l y , only a f t e r the system has reached steady-state f o l l o w i n g a change in v e l o c i t y , that is, a f t e r one residence time. T h i s means that the minimum sampling time, T , is given by g

Τ

1

s

= (1+a)' new

In a d d i t i o n , because the c o n t r o l s i g n a l , f l u i d v e l o c i t y , v a r i e s from one sampling i n s t a n t to the next, the minimum sampling time is v a r i a b l e . Mutharasan and Coughanowr (2) in developing t h e i r ALG1 algorithm f o r the case of constant sampling time a l s o used the c o n t r o l l e d and manipulated v a r i a b l e s to estimate the current i n l e t s t a t e and then compute the new manipulated v a r i a b l e . However, f o r the constant sampling time case it is necessary to s t o r e previous values of the manipulated v a r i a b l e s in order to compute the new manipulated v a r i a b l e . A recent paper by Fuhrman, et_ a l (1) presents experimental data using the ALG1 algorithm.

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

15.

STEWART

AND

Variable

SWEERUS

Sample

Time

Algorithm

283

Experimental

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

The equipment arrangement is shown in F i g u r e 1. Equipment. A double-pipe heat exchanger c o n s i s t i n g of twenty one f e e t of 3/4-inch Schedule 40 s t e e l pipe w i t h i n twenty f e e t of 3-inch Schedule 40 s t e e l pipe was used. The exchanger and steam l i n e s were i n s u l a t e d w i t h 1-inch formed F i b e r g l a s . O u t l e t water temperature was measured by an in­ d u s t r i a l type iron-constantan thermocouple and temperature t r a n s m i t t e r manufactured by T a y l o r . The t r a n s m i t t e r was spanned to produce a 10 to 50 ma s i g n a l over a temperature range of 16°C. The t r a n s m i t t e r current s i g n a l was passed through a 50 ohm r e s i s t o r to produce a 0.5 to 2.5 v o l t s i g n a l which was read by the microcomputer A/D converter and recorded by a Brush recorder. The computer D/A output s i g n a l of 0.0 to 2.54 v o l t s was connected in s e r i e s with a 1.5 v o l t b a t t e r y to b i a s the v o l t a g e range to 1.5 to 4.0 v o l t s . A Foxboro Model 62H c o n t r o l l e r , set f o r p r o p o r t i o n a l a c t i o n , was used as a v o l t a g e / c u r r e n t converter. The c o n t r o l l e r output s i g n a l in the 10 to 50 ma range was sent to a Taylor current/pressure converter which produced an output s i g n a l in the 3 to 15 p s i g range. T h i s pressure s i g n a l operated a 1/2-inch Foxboro c o n t r o l v a l v e with stem p o s i t i o n e r , equal percentage t r i m , and a C of 5.0. v

Microcomputer. A Gromemco Z - l microcomputer was used as the c o n t r o l l e r . I/O devices were a L e a r - S i e g l e r CRT and an AR33 Teletype. The microcomputer u t i l i z e d the Z80 microprocessor at 4 MHz c y c l e time, 32 Κ of RAM, and a PROM-based d i s c operating system. The d i s c operating system allowed a l l development work to be performed in FORTRAN IV. The use of the higher l e v e l language g r e a t l y expedited implementation of the c o n t r o l a l g o ­ rithm. The compiled c o n t r o l algorithm r e q u i r e d l e s s than IK of RAM. The A/D-D/A board contained seven channels each of input and output. S p e c i a l input and output commands provided c o n t r o l of the A/D and D/A s i g n a l s . Results and D i s c u s s i o n The v a r i a b l e sample time c o n t r o l algorithm was tested ex­ p e r i m e n t a l l y and the r e s u l t s compared with computer s i m u l a t i o n s . Tests were made w i t h and without modeling e r r o r (parameter s h i f t ) f o r s e t p o i n t and load changes. Set P o i n t Changes, V a r i a b l e Sample Time. F i g u r e 2 shows the r e s u l t of the f i r s t comparison f o r a set p o i n t change from ap­ proximately 55 to 50°C. The upper curves are f o r the case where

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

284

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

HEAT EXCHANGER (TRANSMITTER l/P MICROCOMPUTER

Figure 1.

ι

v

55

ο

50

ο

Id

ι

V/l

Equipment and arrangement

1

β^-β-0.542

.

w , ----- , . . y* = 0.759 est

=5 55 UJ α.

^

55

est

= 0.325

50 0 Figure 2.

20

40

60

80

TIME (SECONDS)

100

120

—EXP, —SIM

Variable sample time-without thermocouple dynamics in simulation

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

15.

STEWART

AND

SWEERUS

Variable

Sample

Time

Algorithm

285

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

3

agrees with the experimentally determined value of 0,542. middle and lower s e t s of curves are f o r β . values 40% est greater and l e s s than the a c t u a l v a l u e . Lack or agreement be­ tween experimental and simulated r e s u l t s is due p r i m a r i l y to the omission of thermocouple dynamics from the s i m u l a t i o n s . Measure­ ment l a g turned out to a f f e c t s i g n i f i c a n t l y exchanger dynamics. Because of the measurement l a g , the assumption of steady-state at the sampling i n s t a n t s which is r e q u i r e d of the v a r i a b l e sample time a l g o r i t h m , is v i o l a t e d . A secondary reason f o r d i s ­ agreement, in the case of 3 40% low, is the omission of con­ t r o l v a l v e s a t u r a t i o n from tee s i m u l a t i o n s . The low value of $ r e s u l t s in excessive c o n t r o l a c t i o n which l e d to c o n t r o l v a l v e s a t u r a t i o n f o r the set p o i n t change employed. F i g u r e 2 shows that as 3 is decreased from values above to values below the a c t u a î p , the experimental response becomes more o s c i l l a t o r y . The simulated r e s u l t s show the best p o s s i b l e cont r o l when 3 e equals 3, overdamped response when 3 exceeds 3» and undefâamped response when 3 is l e s s than I? T h i s is due to c a l c u l a t i n g e x a c t l y , under c i r c u l a t i n g , and over c a l c u l a t i n g , r e s p e c t i v e l y , the proper c o n t r o l a c t i o n . Figure 3 shows the experimental r e s u l t s of F i g u r e 2 compared with s i m u l a t i o n s modified to i n c l u d e measurement l a g . The experimentally determined thermocouple time constant was four seconds. I n c l u s i o n of measurement l a g b r i n g s the simulations i n t o b e t t e r agreement with experimental r e s u l t s although f o r the case of 3 40% low, disagreement, remains due to c o n t r o l v a l v e s a t u r a t i o n ? As with F i g u r e 2, the sampling i n s t a n t s f o r F i g u r e 3 are computed s o l e l y on the b a s i s of f l u i d residence time f o r both experimental and simulated r e s u l t s . Therefore, the r e quirement of steady-state p r i o r to c a l c u l a t i o n of the c o n t r o l a c t i o n is not met due to measurement l a g . In an e f f o r t to more c l o s e l y achieve steady-state at the sampling i n s t a n t s , the v a r i a b l e sample time based on f l u i d residence time was increased by twenty seconds or f i v e thermocouple time constants. F i g u r e 4 shows c l o s e agreement between experimental and simulated r e s u l t s f o r 3 equal to and 40% greater than 3. For 3 40% l e s s than § t h e experimental response e x h i b i t s smalîer f l u c t u a t i o n s about the new set p o i n t than does the s i m u l a t i o n . T h i s damping is l i k e l y due to the e f f e c t of the thermal capacitance of the inner pipe w a l l which was neglected in the s i m u l a t i o n s but is more pronounced at the low values of 3 where the magnitute of the c o n t r o l a c t i o n is greatest. t

e

t

g t >

t

e

s

Set P o i n t Changes, Constant Sample Time. When the constant twenty seconds was added to the v a r i a b l e residence time, the r e s u l t i n g v a r i a b l e sample times were in the 22-26 second range. Since this v a r i a b l e sample time is s i m i l a r to a long constant sample time, the performance of the c o n t r o l a l g o r i t h m was t e s t e d w i t h v a r i o u s constant sample times. The constant sample times

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

286

Figure 3.

APPLICATIONS

T O CHEMICAL

ENGINEERING

Variable sample time-with thermocouple dynamics in simulation

Figure 4.

Modified variable sample time

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

15.

STEWART

AND

SWEERUS

Variable

Sample

Time

Algorithm

287

s t u d i e d ranged from 5 to 25 seconds in 5 second i n t e r v a l s . The r e s u l t s f o r the 25 second sample time are not shown s i n c e they are n e a r l y i n d i s t i n g u i s h a b l e f o r those of Figure 4. S i m i l a r l y , the r e s u l t s f o r the 5 second sample time are not shown as they are c l o s e to those of F i g u r e 3. Results f o r an intermediate constant sample time of 10 seconds are shown in Figure 5. The c o n t r o l in this case and a l s o f o r the 15 second sample time case, not shown, is improved compared w i t h the constant 25 and 5 second sample times. This suggests that an optimal constant sample time e x i s t s f o r a p p l i c a t i o n of the v a r i a b l e sample time algorithm. The optimum constant sample time appears to be on the order of 2 to 3 thermocouple time constants plus the average f l u i d r e s i d e n c e time. This shorter sample time, in a d d i t i o n to g i v i n g b e t t e r set p o i n t c o n t r o l , would permit a more r a p i d response to unexpected load upsets. Wall Temperature Load Upsets The dynamic equation from which the v a r i a b l e sample time c o n t r o l a l g o r i t h m is derived assumes a constant w a l l temperature. I f the w a l l temperature is changed, the r e s u l t i n g v a r i a t i o n in o u t l e t temperature is due to an unmodelled load upset f o r which the algorithm was not d e r i v e d . A change in w a l l temperature can be approximated mathematically through a change in the o v e r a l l heat t r a n s f e r c o e f f i c i e n t , U , with the r e s u l t that the parameter 3 assumes a new v a l u e . Computer simulations of these load disturbances are performed by changing the value of 3· From steady-state experimental data, the new v a l u e of 3 c o r r e sponding to a s h e l l - s i d e steam pressure of 40 kPa is 0.481. Experimentally, w a l l temperature is manipulated by changing the s h e l l - s i d e steam pressure. The r e s u l t s f o r a step change of s h e l l - s i d e steam pressure from 110 kPa to 40 kPa and from 40 to 110 kPa are shown in F i g u r e s 6 and 7, r e s p e c t i v e l y . For both f i g u r e s , v a r i a b l e sample times of f i v e thermocouple time constants p l u s the f l u i d residence time are used. Despite g e n e r a l l y s l u g g i s h experimental responses, c o n t r o l is a t t a i n e d w i t h approximately 3 to 5 sample times. The s l u g g i s h experimental responses and disagreement with simulations are due to the thermal l a g involved in changing the inner pipe w a l l temperature once the steam pressure is changed. The w a l l temperature f o r the s i m u l a t i o n , made by changing the v a l u e of 3, is instantaneous. Summary. A simply derived and implemented v a r i a b l e sample time c o n t r o l algorithm is shown to c o n t r o l a l a b o r a t o r y flow forced heat exchanger f o r both set p o i n t changes and unmodeled load upsets in the presence of modeling e r r o r . The algorithm computes the new c o n t r o l a c t i o n from the present v a l u e of the manipulated v a r i a b l e making storage of p r i o r v a l u e s of the

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

1

1

^est^-

55 Ο ο

LU CL

0 5 4 2

-

_

50 ι

RATURE

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

288

ι



ι

ι

1

I

ι

y* = 0.759

55

est

50

Έ

LU

t—

1

·

^est

55 50 0

= 0

-

3 2 5

.

V

1

20

Figure 5.

1

1

1

40 60 80 TIME (SECONDS)

1

ι

100 120 — EXP, — SIM

Constant sample time of 10 seconds

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

STEWART

Variable

A N D SWEERUS

ι

Sample Time

289

Algorithm

1

0.542

.

/9 = 0 . 7 5 9

.

#^-β-

50 4 5

I

ι

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

est

50 4 5



Γ"

-

I

/S = 0 . 3 2 5

" Γ" "

est

50

.

45 ι

0

2 0

ι

4 0

_J

6 0

1

1

1

8 0

100

TIME (SECONDS) Figure 6.



120

—EXP, —SIM

Modified variable sample time for steam pressure change from 110 to 40kPa

"I

Γ"

β ^ - β -

0.542

£

=

0.759

=

0.325

50 45Ο

§

50

e

s

t

CL -ι

UJ

r

^

50

e

s

t

4 5 _l

Ο

2 0

4 0

6 0

8 0

TIME (SECONDS) Figure 7.

100

Ι­

120

—EXP, —SIM

Modified variable sample time for steam pressure change from 40 to 110 kPa

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

290

APPLICATIONS

TO

CHEMICAL

ENGINEERING

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

manipulated v a r i a b l e or e r r o r unnecessary. Although, s t r i c t l y , the a l g o r i t h m r e q u i r e s that steady-state be reached p r i o r to i t s use, the a l g o r i t h m is shown to c o n t r o l f o r a constant sample time during unsteady-state c o n d i t i o n s . An optimum constant sample time on the order of 2 to 3 thermocouple time constants plus the average f l u i d residence time is shown to e x i s t f o r the algorithm used. Nomenclature a A

v/v, u n i t l e s s 2 cross s e c t i o n a l flow area, m c

A

s

heat t r a n s f e r surface area, m

2

b

parameter, e f f e c t of v e l o c i t y on U

C

f l u i d heat c a p a c i t y , J/kg'K

L

exchanger l e n g t h , m

t

time, s

Τ

f l u i d temperature, Κ

Τ

sample time, u n i t l e s s s

2

U _o ν

o v e r a l l heat t r a n s f e r c o e f f i c i e n t , J/m

ν

change in f l u i d v e l o c i t y from steady-state,

χ

(Τ -T)/(T - T ), u n i t l e s s w w 0,s

ζ

axial position, m

steady-state f l u i d v e l o c i t y ,

-s'K

m/s m/s

n

Greek L e t t e r s 3

heat exchanger parameter, U A /(vpC A ) os ρ c

η

z/L, u n i t l e s s

θ

vt/L, unitless

3 ρ

f l u i d density,

kg/m

Subscripts 1

outlet

0

inlet

est

estimated

sp

set p o i n t

w

wall

s

steady-state Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

15.

STEWART AND SWEERUS

Variable

Sample

Time

Algorithm

291

Downloaded by UNIV OF CALIFORNIA SANTA BARBARA on April 3, 2018 | https://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch015

Literature Cited 1.

Fuhrman, J.E., R. Mutharasan, and D.R. Coughanowr, "Computer C o n t r o l of a D i s t r i b u t e d Parameter System", presented at N a t i o n a l AIChE Meeting, Houston, Texas, April 1979.

2.

Mutharasan, R., and D.R. Coughanowr, IEC Proc. Des. and Dev., 13, 168-176, 1974.

3.

Mutharasan, R., and D.R. Coughanowr, IEC Proc. Des. and Dev., 15, 141-144, 1976.

4.

Mutharasan, R., and D.R. Coughanowr, IEC Proc. Des. and Dev., 15, 378-381, 1976.

5.

Mutharasan, R., and R. Luus, IEC Proc. Des. and Dev., 15, 137-141, 1976.

RECEIVED November 5, 1979.

Squires and Reklaitis; Computer Applications to Chemical Engineering ACS Symposium Series; American Chemical Society: Washington, DC, 1980.