THE LNIVERSITY OF MICHIGAN INDUSTRY PROGRAM OF THE COLLEGE OF ENGINEERING THE CALCULATION OF TRANSIENT RESPONSE USING THE ANALOG COMPUTER H. D. YopQ D. T. Greenwood M, R, Tek December, 1960 IP-482

ACKNOWLEDGMENT The authors wish to acknowledge the financial assistance and the support provided by the Michigan Gas Association through their fellowship program at the University of Michigan. Valuable advice and help were generously provided by Professor Do L, Katz. ii

TABLE OF CONTENTS Page ACKNOWLEDGMENT.... *. *......... *............. i LIST OF FIGURES,..............a 0....9.0 0 Si SI....... iv NOMENCLATURE.0... 0.................*... o... o *o ** s 4*4 ^ oe v INTRODUCTION............ 9. o o....... o o..... i* o 1 Theory..0 00..............0,,0.,....00000 00000000o0.,0oo.000000 2 Example.o...........a.....o.o..o..o..............oo.oo.......aoo 9 Complex Systems,. o0e., 0 000, 0 000 0 0 0 0 0.......... 0 00 0a. 0 12 Conclusion..0... 0...........0...,0 000000,........4 13 REFERENCES................0 0 0 0 0. o.0 0 0 0 0 0. o. a a 0 a 0 a a 0 0 0 0 0 0 0 0 0 0 14 APPENDIX............................. *............. o 15 iii

LIST OF FIGURES Figure Page 2 Unit Step Response...~.......~....<..f.o..,. 3 3 Overall Block Diagram_ of the Analog Simulation Arrangement. o... o o O0 o0 0 0 0... o o o o o 4 4 Analog Simulation Circuit ooo........ o * o o* o oo 7 5 AAnalog Computer Circuit Diagram to Get Cumulative Flux Function for Infinite Aauifer.....,.... 10 6 An Arbitrary Input Case Solution.. o o 7 (a) Client Adaptive Systemn. oooooooooOO,oooooo*oonoooo. 12 7 (b) Client Adaptive System......................... 13 8 Analog Computer Circuit Diagram for Simu.lation of Equation (9) o.o...............ooooooo oooaooo,oo o. 6 iv

NOMENCLATURE a aO, al1 a2, a3 b2, b3 C e D f 1 G K L P P!1 P2' ~ Q tD tD Rf, Ri rD s tD reservoir time constant, relating the actual time to dimensionless time(6) (7) constants constants electrical capacitor, mfd differential operator Laplace transform of QVtD forcing function Laplace transform of G Machine time constant sec/month Laplace transform pressure potentiometer settings Unit step response system response for specified G function electrical resistors dimensionless radius6) (7) Laplace transform variable dimens ionless time T time variable actual time

INTRODUCTION The study of transient behavior has become an important subject in chemical engineering applications. When an input to a system fluctuates, one is interested in predicting how the system will respond in order to prepare for the response or to prevent unwanted fluctuations. Because of the dependence upon past history a computational scheme is needed to integrate the effects of past action and thereby determine the present state of the system. Even though the need is frequently encountered in practice, the computational techniques for solving systems with time-varying inputs or time-varying coefficients are not widely known. For a linear system the separate solutions, obtained by using each driving force alone, can be added to obtain a composite solution with all the driving forces present. This principle of adding solutions is called the Principle of Superposition. The integral expression of the principle is known variously as the convolution integral. superposition integral, Faltung integral, or Duhamel integralo() Corn.putation of this classical integral gives a solution for the case where a linear system is subject to a time-varying input. This paper presents a method of direct computation of this integral by simulating the system. on an electronic differential analyzerO In a chemical process, the driving force may be temperature, pressure or concentration. Only one time-varying input is examined at a time while holding the rest of the variables constant0 -1

Theory When a system. is linear, it is possible to describe the system, characteristics by a linear differential equation or by its solution.o Using the superposition principle (owing to its linearity), the response (2) can be described by the following convolution integral () tD tDt dG QtD J/ dT Q-tD (tD - T) dT () where Q'tD = response to a unit step, assuming initial conditions are zero. G = forcing function (assumed equal to zero for t < 0). QtD = system response for a specified G. Equation (1) can be used to find the response of a linear system with constant coefficients for an arbitrary forcing function when the Runit step response is known. The response to a unit step input is a system characteristic and is unique. When the system is nonlinear, the step response is no longer unique in form but depends on the input levelO The unit step input and its system response are illustrated in Figures 11 and 2. The essential feature of analog simulation is to obtain the desired process performance as an output by feeding in known information as an input signal. A pictorial representation of the simulation is shown in Figure 3. The discussion is devoted to the representation of the transfer function. Upon taking the Laplace transform of Equation (1) we obtain QtD(S) = S g(s) ~ f1(s)

-3 1. z 1.0 4 m 0 TIME Figure 1. Unit Step Input. LJ <n V) UJ z 0 Q. U) MJ 0. w U) z H SYSTEM A SYSTEM B 0 0 TIME Figure 2. Unit Step Response.

Input Signal Simu lation Performance 100 v. Manual Function Generation with a potentiometer which is an integral part of an analog computer G(8) Representation of a transfer function on an analog computer QtD(O) Recording of the output voltage as a function o time on a recorder I I I Figure 3 - Overall Block Diagram of the Analog Simulation Arrangement.

-5 or QtD()= fl(s) (2) g(s) where g(s) = L {G} f1(s)= L {Q}'tD Note that fl(s) is the Laplace transform of the unit step response. Therefore, sfl(s) can be approximated from the solution of the constant input case. If the initial value of the unit step response is zero, from the well-known property of the Laplace transformn rule for the derivative(2) sf1 (s) can be expressed in the form L dQ't-D s f1(s) }tD 1 d Qt This relationship can be used to approximate s fl(s) from tD or d tD directly from Q'tD' ai Suppose that s fl(s) is approximated as a sum, of ao3 - a2, and a; or 1 + s 1 + s 1+s 1+_ b2 b3 t(S) =s f (s) a + a1 + (3) g(s) s 3 S 1+b +b2 3 Then one can write QtD(S) = ao g(s) + a g() a2 g(s) a3 g(s) s 1 + s + -3 b^ b3 The inversion of QtD(s) to obtain the response is the sum of inverse transforms of the individual term.s~ QtD(tD) = [QtD(tD) o + [QtD(t ) + tD(tD] +) ] + [Qt(tD)]3

-6 where L {[QtD(tD)] = a g(s) (4) a2 g(s) L {[t(tD)l} = -g) (5) L {[QD(tD) ]?= gi (6) b L T[QtD(tD)}= a3 g() (7) b3 1+These individual terms are to be considered for their theoretical possibilities for analog simulation. Equation (4) can be written directly in the time domain as [QtD(tD) ]o ao G(tD) The analog simulation for this relationship is represented by amrplifier 1 in Figure 4. (Those who are not familiar with analog computers are referred to the Appendix and also to references (3) and (4). Equation (5) needs to be written in the time domain. Since QD(o ) = o, sL {[QD(tD)]l} L {d t = a g(s) or d QtD a1 G(tD) L d tDJ or [rtD (tD a _ G(tD)_J D d where D is the differential operaton. d tD The analog simnulation for this relationship is obtained by amplifier 20 [D(tD)li -1 -GtD) d [I(tDD)]l =0 -G(tD) ] tD

I D(tD))O I/aO I I/al I -G(tD) QtD(tD) I/02 = Ri,QtD(tD))3 Figure 4 - Analog Simulation Circuit.

-8 or [QD(tD) 11 -a, -G(tD) D Similarly, Equation (6) can be written as b2 [QD(s)]2 + tD(s) = a2 g(s) Since tD(O) = 0, 1 d QtD + [Qt(tD) ] = a2 G(tD) b2 dtD 2 or [QtD(tD)]2 a2 G(tD) 1+ b2 Amplifier 3 performs this operation. QtD (t) ]2 -a2 -Rf/Ri tD D 2 _ 2 D 1 + RfCe D -G(tD) 1 + 1 + R2 D Equation (7) is much the same as Equation (6). Thus, summing up the individual terms with amplifier 5, the system can be simulated on an electronic differential analyzer as shown in Figure 4. The consequence of this simulation is that Equation (2) can be represented by analogous voltages on the electronic differential. analyzer and can be regarded in terms of a system transfer function. The system transfer function is an operator expression that establishes the relationship of output and input variables. Once an adequate check is obtained for a step input to a linear system, the response to an arbitrary input can be obtained with the same circuit by simply applying this input to the circuit.()(5)

-9 Example In order to demonstrate the application of the method to practical problems, an underground reservoir problem is choseno The flow of liquid through a homogeneous porous mediumn cwan be (6)(7) described by the radial diffusivity equation, a2p 1 P aP D rD "D where P = pressure rD = radius The solutions to this partial differential equ.ation for constanit te- rminal reservoir conditions are available in tabular form in thEe literature. (7)) For the terminal pressure case, the following approxLimate transfer function is fou.nd: 0.75 2.64 + 18 0.28a 2 4x10 5a s (s) - + + 0 —. s a 0.Oba O.Ola (8) where a is the reservoir time constant. In Equation (8) the Laplace transform is taken with respect to the actual time in months. Based orn this equation, the circuit shown in Figure 5 is obtained for a - 4 and K = 5. The result obtained from this circuit is compared with the theoretical constant pressure case solution in Table I. The circuit of Figure 5 can now be used, for the arbit;rary input case by simply generating the appropriate input voltage variation. The machine time constant is made large enough (i.eo, the computer solution rate is made slow enough) so that the input voltage can be generated manually with a potentiometer. An example of the arbitrary input case is given in Figure 6.

-10 K= 5 ro 4 rD =0G ~0115 1 5 J QtD/50 6 0.120 6 10 0.268 1i r 1o o2 14 Figure 5 - Analog Computer Circuit Diagram to Get Cumulative Flux Function for Infinite Aquifer. 0.!

I3D (,0 I N A%.9 _i -a- — I___a~L n- I %- r, - %! I V \~-NXJ " TIME I0 0 TIME I H 0 Figure 6. An Arbitrary Input Case Solution.

Complex Systems We have shown how to simulate a time invariaznt linear systemr using approximated transfer function expressiono For large number of problems the assumption of constant coefficient results in good approximation. However in some problems'the system actu.ally changes its chasracteristics as a function of time. In other words the coefficients of the equation change with time in a definite fashiono Thereore, t it is necessary to modify the system characteristics to ad-apt to t';h.e new situation at all times. A block diagram of a client adaptive system, is shown in Figure 7(a) below: In ut Client Output System. Adapt ive System Figurre t7 (a) One probable practical2 application of the client-adaptive system may be the classical moving boundary problem~ The adaptive system, will change the characteristics of the client syst;em as the boundary moves0 In the analysis the change of coefficients can. be handled by the use of servo-multiplier. Once the systemr is successful1y simulated, control schemes can be added on to the process to study its behavior~ or -to imIprove the transient response. See Figure 7 (b), -12

-13 Input Control Process -- _ _ -— ~~~~~~~~~~~~~~~~~~~~~ - w- O Figure 7 (b) Conclusion The proposed method of handling an arbitrary input to a linear system provides a quick and easy way of obtaining an engineering solution. The method can be used to check theoretical model studies or the effects of nonlinearities when experimental data are availableo The method can also be used to predict system behavior for the case of an arbitrary input, based on a knowledge of the step responseo

REFERENCES 1. Gardner, M. F. and Barnes, J. Lo Transient in Linear Systrs9 1, John Wiley and Sons, Inco 1948o 2. Churchill, Ro V. Modern Operational Mathematics in Eng.i.eeri:..g New York: McGraw-Hill, 1944o 3o Johnson, C. L. Analog Computer Techniaiiues New York~ Me-GCra~w Hill Book Coo, 1956. 4o Korn, Go Ao and Korn, T. Mo Electronic Analog Computers. Nvew Yor~: McGraw-Hill Book Coo, 19560 5. Josephs, H. J. and Radley, Wo Go Heaviside's Electric Circui-t Theory. New York: Chemical Publishing Co., 1946. 6. Coats, K. H. Prediction of Gas Storage Reservoir Behavioro Ph.D. Thesis, The University of Michigan, April, 19590 7. Van Everdingen, A. F, and Hurst, W. "The Application of the Laplace Transformation to Flow Problems in Reservoirs* Petron-lm Trans. AIME, 186, 305, 149. 8. Chatas, A. To "A Practical Treatment of Nonsteady-State Flow Problems in Reservoir Systems," Petro. Engr,, May, 19530 9. Katz, D. L., et al, Handbook of Natural Gas Engineeringo New York~ McGraw-Hill Book Co, 1959. -14

APPENDIX EXAMPLE OF THE DERIVATION OF A SIMULATIONT CIRCUIT FROM THE TRANSFER IFNCTi'ON In order to show the detail derivation for a simulation circuit from the transfer function, an example calculation is shotwn here, A. Basic Characteristics of the Electronic Differential Analyzer. Before any attempt to show how numlbers are selected in the analog circuit, it would be well to describe some basic features of an electronic differential analyzer in order to understand the symbols used in the circuit. Referring to Figure 8, there are four symbols that must be explained. First, the most important components are the highgain d-c amplifiers or operational amplifiers which are designated by triangles with the output at the point. It is these amplifiers that become summers or integrators or simulate each term of the transfer function expression. The second symbol. is the circle which designates a potentiometer. The potentiometer is used to multiply by a constant less than unity, the value being determined according to the dial seJting, This dial setting is written in or by the circle. The third and fourth symbols are for resistors and for capacitors and need no expl.anationo The input to the computer circuit is at the left and the output is at the right. Since the independent variable is always time on the analog computer, a machine time constant K plays an important role in relating the actual time and the machine running time. The details are expl.ained as the calculation is carried out, -15

-16 I + 21.5 +1+ s - L 0.01220 J Figure 8 - Analog Computer Circuit Diagram for Simulation of Equation (9).

-17 B. Derivation of the Computer Circuit, Suppose the transfer function of a system is given by s fl(s) = 2.20 { 1 + 21. (9) 1 + s 0,0122a Equation (9) is a combination of Equations (4) and (6). We wi.ll show how the numbers are obtained from the transfe-r func.tion as expressed. in Equation (9) to give the circuit of Figure 80 One of the basic requirements in deriving an. analog circuit is to keep the output, voltage magnitude for each amrrplifier les than 100 volts but not too small. Suppose, for example^ that a aunit magnitude in the equation is represented. by one volt on the computer~ Then a unit input should produce an output corresponding to the first term of Equation (9) of 2. 20 volts. This can. be accomplished by choosing the output of potentiometer 8 to be -22 voltsO The potentiometer set.ting is -22 P8 = 100 = 0.220 This -22 volts is fed. into amplifier 4 giving an outpiut as follows Amplifier 4 output = (-22) (0 ) = 11 volts The 11 volt signal is applied to amplifiers 5 and 6, Amplifier 6 h.al an output of -11 volts which goes through potentiometer 7 and amplifier 1, being reduced to the required 2,20 volts. The calculation of the required setting of potentiometer 7 to give this voltage is gi ven as follows: 2.20 = (-11) (P7) (- ) or P = 0,400 -7

Next consider the second term. As shown in th.e simulation of Equation (6), c -l= 1 or R K f (0.0122a) (C K) Choosing CeK = 1 and letting K = 10 and a = 7,52, we find that Rf = 109 megohm. It is actually represented by a 20 megohm resistance driven by poten.tiometer 1 set to 20 P1 l = o183 The steady state output at amplifier 1 due to this second term is (2o2) (21.5) = 47.3 volts. Therefore the dial setting of potentiometer 4 is found from (11) (P4) ( 5 47.3 or P4 = 0.197 The outputs of amplifiers 5 and 6 are sunmmed by amplifier 1 giving the overall transfer function of Equation (9), Since the input to amplifier 4 was set at -22 volts in checking out the step function response it actually corresponded to an input amplitude of -22o So if the negative of the actual input is generated at one volt per unit by potentiometer 8, the output will be QtD/22 as shown in Figure 80