UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Application of analogue techniques to the solution of problems in optimal control Wiklund, Eric Charles 1965

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1965_A7 W55.pdf [ 3.64MB ]
Metadata
JSON: 831-1.0104718.json
JSON-LD: 831-1.0104718-ld.json
RDF/XML (Pretty): 831-1.0104718-rdf.xml
RDF/JSON: 831-1.0104718-rdf.json
Turtle: 831-1.0104718-turtle.txt
N-Triples: 831-1.0104718-rdf-ntriples.txt
Original Record: 831-1.0104718-source.json
Full Text
831-1.0104718-fulltext.txt
Citation
831-1.0104718.ris

Full Text

APPLICATION OP ANALOGUE TECHNIQUES TO THE SOLUTION OP PROBLEMS IN OPTIMAL CONTROL by ERIC CHARLES WIKLUND B . A . S c , U n i v e r s i t y of B r i t i s h Columbia, 1963 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE i n the Department of E l e c t r i c a l E n g i n e e r i n g We accept t h i s t h e s i s as conforming to the requi r e d , s t a n d a r d Members of the Department of E l e c t r i c a l E n g i n e e r i n g THE UNIVERSITY OF BRITISH COLUMBIA August, 1965 In p r e s e n t i n g t h i s t h e s i s i n p a r t i a l f u l f i l m e n t o f the r e q u i r e m e n t s f o r an advanced degree a t t h e U n i v e r s i t y o f B r i t i s h C o l u m b i a , 1 a g r e e t h a t t h e L i b r a r y s h a l l make i t f r e e l y a v a i l a b l e f o r r e f e r e n c e and s t u d y . I f u r t h e r a g r e e t h a t p e r -m i s s i o n f o r e x t e n s i v e c o p y i n g o f t h i s t h e s i s f o r s c h o l a r l y p u r p o s e s may be g r a n t e d by the Head o f my Department o r by h i s r e p r e s e n t a t i v e s ^ I t i s u n d e r s t o o d t h a t c o p y i n g o r p u b l i -c a t i o n o f t h i s t h e s i s f o r f i n a n c i a l g a i n s h a l l not be a l l o w e d w i t h o u t my w r i t t e n p e r m i s s i o n . Department o f ftLCHU. B^L&l&JliZiUM,. The U n i v e r s i t y o f B r i t i s h Columbia Vancouver 8, Canada D ^ e dipt [ ABSTRACT The thesis i s concerned with techniques for r e a l i z i n g optimum control that are suited for analogue computers. The f i r s t half of the thesis develops an i t e r a t i v e scheme for the solution of the two point boundary value problem. The theory of the i t e r a t i v e scheme i s covered i n d e t a i l and the scheme i s implemented on an analogue computer. Studies of the scheme have also been made using a d i g i t a l computer. The i t e r a t i v e scheme can be modified to cope with constraints on the control law. These modifications have been tested on a d i g i t a l computer. The l a t t e r halfl of the thesis i s concerned with approximation techniques which produce, very simple controller's. These techniques require a large d i g i t a l computer, such as the IBM 7040, to do the design calculations. The f i r s t approximation technique developed from the calculus of variations i s covered i n d e t a i l including a complete controller designed and simulated. The second approximation technique based on dynamic programming i s discussed and a few points are made about the features of the c o n t r o l l e r . i i TABLE OP CONTENTS Page LiS~b Of I 1 lU S "fcr£t"b X 0 n S » « o a o o o o « » o » o o o « o oo o o « a « o « » « a « » « « IV Ackriov 10dgemen'ts A » » * o * o o o o a » Q o » « o » » o » » * o o o « o o o o o o o « o * o v 1 * INTRODUCTION • *•«••••• • o o o o 6 o e * « * e * o o o c t B > « o o o o o O * « * 1 2 . SOLUTION OF THE TWO-POINT BOUNDARY VALUE PROBLEM BY ITERATION 3 2 . 1 Theory of the Iterative Scheme . . . . . . . « » » • • . 3 2 . 2 Application of the Iterative Scheme .....»«,..» 6 2 o 3 The Handling of Constrai 2 . 4 Details of the Implementation of the Scheme on an Analogue Computer . . . . . . . . . o ° o . . » . . . « o . . . » a 1 5 3 . THE LINEAR NEIGHBOURHOOD OPTIMUM CONTROLLER ....... 2 4 3 . 1 Theory of the Linear Neighbourhood Optimum Controller Based on Calculus of Variations »». 2 4 3 . 2 Solution of the Equations for the Neighbourhood 3 . 3 Transversal Surface Comparison Modifications * 3 2 3 . 4 An Example for the Control Scheme; the Hydro-generation Process of Eckman and Lefkowitz ... 3 4 3 . 5 Simulation of the Linear Neighbourhood Optimum 0 O X k 0 l l 6 X * - a O O 0 « » O t t 0 9 6 o o O 0 » 0 C t 0 O 0 O O 0 9 O Q 4 > « » O C < e A * 4" 7 3 . 6 The Mechanization of the Linear Neighbourhood Optimum Controller ........................... 5 5 4 . MERRAIN*S PARAMETER EXPANSION SCHEME .......... 5 8 4 . 1 Outline of the Theory for Merrain Synthesis of Suboptimal Controllers . . . . . . . . . . . . . . . . . . . . . . . 5 8 5 . CONCLUSIONS . . . » > . « . » . » » » » . . « » » o o » » . . . 0 0 ° . . . . . . . . . 6 9 APPENDIX A Estimation of A0, the Perturbation of the Per-iormance APPENDIX B A Comparison with Eckman and Lefkowitz's Re s u i t s . 7 3 LIST OF ILLUSTRATIONS F i g u r e Page 2-1 P l o t s of the U n c o n s t r a i n e d and C o n s t r a i n e d C o n t r o l Lav ................................ 13 2-2 O r g a n i z a t i o n of the I t e r a t i v e Computation Scheme f o r an Analogue Computer 16 2-3 Sequence of the I t e r a t i v e C a l c u l a t i o n s ........... 16 2-4 The Analogue Computer C i r c u i t Diagram of the C o n t r o l l e r f o r the Sample Problem ................ 20 2- 5 The L o g i c S i g n a l s f o r the C o n t r o l l e r ............• 21 3- 1 B l o c k Diagram of the D i g i t a l Computer Programme f o r Computation of the Nominal Optimum T r a j e c t o r y 37 3-2 P l o t s of the Nominal Optimum T r a j e c t o r y f o r the Sample Problem 38 3-3 B l o c k Diagram of D i g i t a l Computer Programme f o r Computation of the C o n t r o l l e r s ' Parameters L ^ j L^, and ****** * * ••»•••••••»•••••»••»•••••••••»»•**• 43 3-4 P l o t s of the Neighbourhood Optimum C o n t r o l l e r s ' Parameters LQ, L^. and 1,^ as F u n c t i o n s of Time ... 44 3-5 B l o c k Diagram of L i n e a r Neighbourhood Optimum C o n t r o l l e r U s i n g the Standard Comparison Mode of O p e r a t i o n 45 3-6 B l o c k Diagram of L i n e a r Neighbourhood Optimum C o n t r o l l e r U s i n g the Tra n s v e r s e Comparison Mode of O p e r a t i o n , Minimum Time Performance F u n c t i o n . . 4 6 3-7A, B P l o t s of the C o n t r o l Lavs Produced by the Neighbourhood Optimum C o n t r o l l e r s and the C o r r e s -ponding Optimum C o n t r o l Lav 53 3—8 P l o t s of the T e r m i n a l E r r o r s and Performance F u n c t i o n Time f o r the Neighbourhood Optimum C o n t r o l l e r s 54 3-9 M e c h a n i z a t i o n of the Neighbourhood C o n t r o l l e r U s i n g the St a n d a r d Comparison Mode .............. 55 3-10 M e c h a n i z a t i o n of the Neighbourhood C o n t r o l l e r U s i n g the Tr a n s v e r s e Comparison Mode ............ 56 i v ACKNOWLEDGEMENTS The author i s indebted to Dr. E. V. Bohn, the super-v i s i n g professor of this project, for his assistance and guidance throughout the course of this work. Grateful acknowledgement i s given to the National Research Council of Canada for assistance received under Block Term Grant A 6 8 awarded to the E l e c t r i c a l Engineering Department of the University of B r i t i s h Columbia. The author also would l i k e to thank Miss B» Rydberg for typing t h i s t h e s i s . v ERRATA Page and l i n e I n s t e a d of Read 9 19 k 2 ( t f ) k -^tp) 10 12 c o n s t r a i n t s c o n s t r a i n t 14 16 Lagrangen Lagrange 19 7 a t t a i n steady s t a t e a t t a i n the steady s t a t e 21 1 b e s i d e x° b e s i d e s x° 22 9 c o n d i t i o n c o n d i t i o n s 34 19 h y d r o g e n e r a t i o n h y d r o g e n a t i on 35 1 h y d r o g e n e r a t i o n h y d r o g e n a t i o n 55 5 s h a f t ' s s h a f t 55 12 i n t e r g r a t o r i n t e g r a t o r 73 4&5 m o n o t o m i c a l l y m o n o t o n i c a l l y 1 APPLICATION OF ANALOGUE TECHNIQUES TO THE SOLUTION OF PROBLEMS IN OPTIMAL CONTROL 1. Introduction Optimization theory based on the calculus of variations or dynamic programming attempts to solve the problem of the best operation of a plant. It i s often the case that a d i g i t a l computer i s considered for the implementation of the analysis since i t appears to be the only device capable of doing the calculations. However, upon further consideration i t i s often realized that the computer cost outweighs the gain to be achieved by the more e f f i c i e n t operation of the plant. Besides cost, quite often i t i s impossible for existing d i g i t a l computer hard-ware to do the problem* For example, either the memory storage i s inadequate or the speed of calculations i s too slow. There i s the consideration too, that the mathematical model of the plant i s inaccurate and thus exact optimization i s not possible• Consideration i n this thesis w i l l be given to the use of an analogue computer i n place of a d i g i t a l computer for con t r o l l i n g the plant. There are three basic advantages to using an analogue computer. F i r s t , the speed of calculations i s much faster than for a d i g i t a l computer. Second, the analogue computer can be designed to solve a s p e c i f i c problem. Third, r e s u l t i n g mainly from the second reason, the cost i s lower. The main disadvantage of using analogue computers i s that 2 for large problems, i f one i s not able to reduce the complexity of the problem by further analysis, too much equipment i s required. This w i l l increase costs considerably besides reducing r e l i a b i l i t y d r a s t i c a l l y . The use of analogue computers i s thus usually r e s t r i c t e d to r e l a t i v e l y simple problems. This thesis w i l l cover two approaches to the use of analogue computers. In the f i r s t method, the analogue computer just replaces the d i g i t a l computer. In the second method analysis i s used to simplify the problem, to make i t more compatible with an analogue computer. In th i s case analysis i s used to form an approximation to the optimum control law. 3 2. SOLUTION OP THE TWO POINT BOUNDARY VALUE PROBLEM BY ITERATION 2.1 Theory of the Iteration Scheme Optimization theory invariably involves the solution of a two point boundary value problem. If i t i s not inherent i n the system equations, the formulation of the optimization problem by means of the calculus of variations w i l l produce the boundary value problem. There are techniques that, in p r i n c i p l e , w i l l solve the two point boundary value problem, no matter how complex."'" These existing numerical techniques, although quite useful for the solution of complex problems by means of a d i g i t a l computer, usually result i n excessive hardware i f transplanted d i r e c t l y for use on analogue computers. Analogue techniques offer the p o s s i b i l i t y of achieving some economy i n special cases. The example presented w i l l be r e l a t i v e l y specialized but i t does give an indicat i o n of the hardware required to realiz e an optimal controller by analogue techniques. The optimization problem considered i s to determine the control variable U ; so that the performance function (2-1) i s a maximum subject to the conditions (2-2) 4 dx 2 x l ( t o ) = X l x 2 ( t o ) = X2 (2-3) (2-4) (2-5) where t i s the i n i t i a l time, t^ i s the f i n a l time, and both are fi x e d . The terminal values of the state variables x^ and x 2 are free. Applying the calculus of variations to the problem yields the Euler-Lagrange equations dX. dt dx^ r. dt - " L ^ f 1 ( x 1 , x 2, u) + A 2 . ^ f 2 ( x 1 , x 2, u) 3 f 2 ( x 1 , x 2, u) dx, i • + x 2 . A b f 1 ( x 1 , x 2, u) 6 x , (2-6) (2-7) 0 = h(X 1, X2> x 2 » u) = \ 1 . + x 2 . 5 f 2 ( x 1 , x 2, u) (2-8) The l a s t equation i s commonly referred to as the control equation. The terminal conditions, from the transversality condition, are x x ( t f ) x 2 ( t f ) = AA d x 0 t = x i f i f t f " 2 f (2-9) (2-10) The f i r s t integal i s = g U p X 2 > x±f x 2, u) = - . f 1 ( x 1 » x 2 » u ) (2-11) + X 2 . f 2 ^ X l ' X2' U ^ where C i s a constant. Note that the Hamiltonian i s of opposite sign, that i s H = - C. The i t e r a t i v e procedure used to solve the two point 2 boundary value problem was suggested by Bohn. It consists of f i r s t assuming an i n i t i a l value for the control variable u . A reasonable guess can usually be made from experience. If C i s known, the i n i t i a l values for X^ and can be determined from equations (2-8) and ( 2 - l l ) . In practice one doesn't know the value for C so a guess i s made. Integration of the d i f f e r e n t i a l equations; (2-2), (2-3), (2-6), (2-7), (2-8); from t Q to t ^ can then be performed. If the terminal conditions for the two point boundary value problem are s a t i s f i e d , i t i s required that 6 " h C X l f ' X 2 f ' W ' x 2 ( t f ) ' u ( V ] = 0 (2-12) C' = g [x* , X* , X 2 ( V ' U ( V ] = C ( 2- 1 3) If e i s nonzero then i t i s necessary to i t e r a t e . The i t e r a t i o n equations are e n = h [ > V Xt> X l { t t ) 9 X 2 ( t f h u ( t f } ] ( 2 - 1 4 ) C n = g LXlf> X 2 f > x i ^ f ) » u ( t f ) ] (2-15) o u n + l = u + K . e (2-16) n n v ' C n = « [W* X 2 ( t o ^ X l ' x2> < ] ( 2 " 1 7 ) 0 = h [ x ^ K X 2 ( t Q ) , x°, x°, u°] (2-18) where n i s the number of i t e r a t i o n s performed, u° i s the n ~ t h e s t i m a t e of u ( t ) . C i s the n - t h e s t i m a t e f o r C o • n E q u a t i o n s (2-17) and (2-18) are l i n e a r e q u a t i o n s i n terms of X ^ ( t Q ) and X 2 ( t Q ) and thus can be e a s i l y e v a l u a t e d . The s i g n and magnitude of K i s determined by t r i a l and e r r o r . I t w i l l be noted t h a t the e x p r e s s i o n f o r C i s t a k e n as an e s t i m a t e f o r C, r a t h e r t h a n the e x p r e s s i o n d e f i n i n g C» T h i s i s done f o r two r e a s o n s ; f i r s t , when the o p t i m a l s o l u t i o n i s o b t a i n e d , t h e n c' = C, t and second the e x p r e s s i o n f o r C , u n l i k e t h a t f o r Ct does not c o n t a i n X ^ ( t ^ ) and X ^ t ^ ) . The q u a n t i t i e s X ^ ( t ^ ) and X 2 ( t ^ ) u s u a l l y f l u c t u a t e c o n s i d e r a b l y more than x ^ ( t ^ ) and x 2(t^)» t Thus the e x p r e s s i o n f o r C w i l l u s u a l l y g i v e a more s t a b l e e s t i m a t e f o r C t h a n the e x p r e s s i o n d e f i n i n g C» 2.2 A p p l i c a t i o n of the I t e r a t i v e Scheme An example of the above t e c h n i q u e f o r s o l v i n g the two p o i n t boundary v a l u e problem w i l l now be d i s c u s s e d . The o r i g i n a l problem i s t a k e n from a paper p r e s e n t e d a t the 1963 JACC con-f e r e n c e . ^ I n t h a t paper the ch e m i c a l r e a c t i o n took p l a c e i n a t u b u l a r reactor.. Here i t w i l l be c o n s i d e r e d t o take p l a c e i n a b a t c h r e a c t o r . T h i s causes no change i n the e q u a t i o n s , a f f e c t -i n g o n l y the f i n a l form of the c o n t r o l l e r . The statement of the problem i s to determine the temperature T so t h a t 0 = x 2 ( t f ) (2^19) i s maximum s u b j e c t t o the c o n d i t i o n s dx, - d i = - k i x i < 2- 2°) dx. - d t = V l " k 2 X 2 ( 2 ~ 2 1 ) k ± = G iexp (E±/RT) i = 1, 2 (2-22) x l ( V = x l ( 2 _ 2 3 ) x 2 ( t Q ) = x° (2-24) t Q = yQ ( f i x e d ) (2-25) t f = T F ( f i x e d ) (2-26) The E u l e r - L a g r a n g e e q u a t i o n s are dX t" = ( X 1 ~ A 2 ) k l (2-27) dt " d f = X 2 k 2 ( 2 ~ 2 8 ) 0 ='(X 1 - X 2 ) k j E ^ j + X 2 k 2 E 2 x 2 (2-29) 8 The f i r s t i n t e g r a l i s C = (X 1 - X 2 ) k 1 x 1 + X 2 k 2 x 2 (2-30) The t r a n s v e r a l i t y c o n d i t i o n y i e l d s the boundary c o n d i t i o n s X1 ( t f ) = 0 (2-31) X 2 ( t f ) = - 1 (2-32) The numerical v a l u e s of the parameters are G l 11 -1 0*535 x 10 minute G 2 18 —1 0*461 x 10 minute E l = 18*000 cal/mole E 2 = 30,000 cal/mole R = 2 cal/mole -°K 0 x l 0*530 mole 0 X 2 = 0.430 mole t o = 0 minutes = 8 minutes The equations f o r the i t e r a t i v e procedure are e n = ( k l E l X l " k 2 E 2 X 2 ) I * f ( 2 - 3 3 ) C n = ( k l X l " k 2 x 2 J I * f (2-34) (k?) = (k°) + Ke (2-35) v l ' n * i v l ' n n < = [W>n + 1 - <*Pn + l ] K>n + 1 X l + <X2>n + 1 + , (2-36) ° = [ ^ n + l - ^ n + l ] ^ n + l V ! + <*2>n + 1 l*Vn + 1 E 2 X 2 (2-37) Note that i t i s more convenient to consider as the control variable and to determine k 2 from the r e l a t i o n k 2/G 2 = ( k ^ ) 3 ^ ! A series of calculations were done using both an analogue computer and a d i g i t a l computer. The implementation of t h i s scheme on the analogue computer i s described i n section 2.4 of this chapter. No major d i f f i c u l t i e s were encountered; the selection of the correction factor K was quite straight-forward. Using a d i g i t a l computer the solution to the sample problem was m a x £ x 2 ( t f ) J = 0.6794 Other results obtained were K = 0.0002 X l * = ° » 1 7 0 4 h ( t o ) = 0. 1820 k2 ( t f * = ° * 1 2 3 5 C = c' = 0.8420 x 10" 2 10 The results of the analogue computation agreed with the above r e s u l t s . A further note about K, the correction factor, i s that for K = 0.00080 the i t e r a t i o n became a l i m i t cycle, never converging. For K = 0.00005 there was very slow convergence. It i s apparent that the range of values K can have i s l i m i t e d . 2.3 The Handling of Constraints U n t i l now consideration has been given only to the case where there i s no constraints on the control v a r i a b l e . In practice there are d e f i n i t e physical constraints on the control variable usually of the form L M. It i s of interest to examine the i t e r a t i o n procedure described in l i g h t of these constraints. In p a r t i c u l a r i t was decided to examine the case where there i s an upper l i m i t on the control variable and to investigate the modifications required f o r the i t e r a t i o n procedure. The f i r s t method that comes to mind i s the addition of a penalty function to the performance function. This i s an approximate way of solving the problem, but i t does avoid analytic and computational d i f f i c u l t i e s and often gives useful p r a c t i c a l r e s u l t s . A simple penalty function i s 11 P(u) = K ( u / u M ) n (2-38) The performance f u n c t i o n becomes 0 (x-) + ] " P ( u ) d t ( t f ( x f ) + J P(u 0 (2-39) f o r the p a r t i c u l a r c l a s s of problems c o n s i d e r e d . I n t r o d u c i n g the p e n a l t y f u n c t i o n r e s u l t s i n the f o l l o w i n g e q u a t i o n s f o r the sample problem: dx, d t ~ k l X l dx. d t ~ k l X l " k 2 X 2 dX d t i = (x x - x 2) k l dX, d t = X 2 k 2 0 = (X, - X 2 ) k 1 E 1 x 1 + X 2 k 2 E 2 x 2 - n E l K ( k l / k l ) n m C = (X, - X 2 ) k l X l + X 2 k 2 x 2 - K ( k l / k l ) n m x l <*0> - x l x 2 ( t Q ) = x° t = y ( f i x e d ) o d o 3*f ( f i x e d ) x 1 ( t f ) = 0 x 2 ( t f ) = -1 (2-40) (2-41) (2-42) (2-43) (2-44) (2-45) (2-46) (2-47) (2-48) (2-49) (2-50) (2-51) I t w i l l be noted t h a t the e q u a t i o n s (2-40) t o (2-5l) are i d e n t i c a l to e q u a t i o n s (2-20} t o (2—32), w i t h the e x c e p t i o n of the c o n t r o l law and the f i r s t i n t e g r a l , e q u a t i o n s (2-44) and (2-45). F o r the i t e r a t i o n c a l c u l a t i o n s ^ the e s t i m a t e f o r C, the f i r s t i n t e g r a l , and the e r r o r measure are d e f i n e d by the e q u a t i o n s Ct = [ k l X l - k 2 x 2 - P ( k l ) ] | t f (2-52) e = [ k 1 E 1 x 1 - k 2 E 2 x 2 - n E l . P ( k ] _ ) ] | (2-53) where P ( k x ) = K . ( k ^ ) n . m The i t e r a t i o n method i s e s s e n t i a l l y unchanged. A f t e r some t r i a l and e r r o r a p e n a l t y f u n c t i o n of the form P ( k x ) =' 0.005 ( k j / k ^ ) ^500 m where ^ = 0*16 m was chosen. The b e s t convergence was found when K of the c o r r e c -t i o n e q u a t i o n (k?) = (k?) + K . e x l'n+i v l ' n n —5 was e q u a l t o 0.75 x 10 * F o r t h i s p a r t i c u l a r examplej the v a l u e of K i s q u i t e c r i t i c a l . F o r example, i f K e q u a l s 0.10 x 10 the i t e r a t i o n becomes a l i m i t c y l e w h i c h never con-—5 v e r g e s , and i f K e q u a l s 0.5 x 10 the convergence i s f a r too s l o w , almost n o n e x i s t e n t * ; From the r e s u l t s f o r the u n c o n s t r a i n t e d case t h i s l i m i t e d range of K i s e x p e c t e d . ° c TIMS • MINUTES Figure 2-1. Plots of the Unconstrained and Constrained Control Lav for the Sample Problem. 14 A scheme w i l l now be described where the exact solution for the constrained control variable problem can be determined. This method i s based upon the Erdman corner conditions of the calculus of variations and some knowledge of the general form of the correct control law* The scheme w i l l not work i f there exist more than one point where the control variable changes from the constrained state to the unconstrained statej that i s , there cannot be more than one breakpoint. For the sample problem^the form of the control law can be deduced to be as i l l u s t r a t e d i n Figure 2.1. The Erdman corner conditions require that C, the f i r s t i n t e g r a l , be constant over the i n t e r v a l ( t Q , t^). The switching function, h (\lt * 2 , x.^ x 2, u) = (X 1 - X 2) k 1 E 1 x 1 + X 2 k 2 E 2 x 2 determines the control law and i s zero only for the in t e r v a l t •< t ^ t„. In general, h w i l l be nonzero at t . This c f ° o prevents calculation of the Lagrangen multipliers at t i n the analogous fashion used previously. To circumvent t h i s , the dynamic equations dx^ I t = " k l x l dx 2 ~dt = k l X l ~ k2 X2 are integrated from t to t with B o c k^ — k-^  , m the constraint. The Lagrange multipliers are calculated at t i n the usual manner. The integration then proceeds as i n the unconstrained case. It i s clear that one i s estimating t i n place of k,(t ) as previously was the case. This estimation i s done i n 1 o an analogous fashion (t ) = (t ) + K . e c n+i c n n with the constraints (t ) > t c n o and (t ) ^ t-x c n — f The best convergence was achieved for K equal to 0.40. For K equal to 1.00 the i t e r a t i o n becomes a l i m i t cycle. It i s apparent that the range of allowed K i s limited. 2.4 Details of the Implementation of the Scheme on an Analogue Computer Since the i t e r a t i v e method discussed was o r i g i n a l l y proposed for use on an analogue computer, i t w i l l be of interest to consider the implementation of the i t e r a t i v e scheme. This w i l l be done using the sample problem. The block diagram, Figure 2-2, t y p i f i e s the basic organization of the i t e r a t i v e computations on an analogue computer. It w i l l be noted that the overall operations shown by the block diagram are sequential. This i s analogous to a 16 d i g i t a l computer as the sequence in Figure 2 - 3 i l l u s t r a t e s . The computations within the individual blocks, except the control unit, are p a r a l l e l i n nature. This i s the usual mode of operation for an analogue computer. Apply i n i t i a l . conditions to the trajectory computero Traj ectory Computer Control n Sample and J store values u ( t . ) X 0 ( t J —2-—o— Boundary Value Computer for boundary value calcula-tions. Figure 2 - 2 . Organization of the Iterative Computation Scheme for an Analogue Computer. t ) o s A = 0, Trajectory calculations A = l s Boundary value calculations 1 0 Figure 2 - 3 o Sequence of the Iterative Calculations. 17 In the implementation of the i t e r a t i v e scheme on the analogue computer, the p o s s i b i l i t y of components being used both for the boundary value calculations and the trajectory calculations exists* Because of this the block diagram, Figure 2-2, can be misleading concerning the mechanics of the calculations. For example* consider the sample problem; the control law i s generated by i m p l i c i t l y solving (A, - A ) k,E . x + A^k E x 0 = 0 (2-54) for the control variable* The same equation U ? - x ° ) < k ° ) n ( k 2 ) n V ° 2 0 (2-55) i s solved simultaneously with C A = ( A ° - A ° ) ( k ° 1 ) n x j + A ° ( k ° 2 ) n x ° (2-56) or dk. dt , H±> 0 (2-57) to generate the control law. The sign of the gain i s found dH by considering -TT, where H i s the Hamiltonian of the system* 18 dx _ _dH dt " 3X dX _ 0 H dt ~ " dx From the above i t follows dH _ du dt _ ^Bu' dt and i f du . v 6 H dt = + K then dH v \ d E\2 dt = K { ~ ^ } From the Maximum Principle,"'""'" noting that the performance function i s maximized, i t follows that K must be chosen less than zero. For the sample problem, the temperature T i s the control variable although k x = G 1 exp (E1/RT) i s the variable used i n i t s place. D i f f e r e n t i a t i n g y i e l d s dk, B, d T ^ - k (- — ± ) d t ~ 1 RT 2 d t Since k^ i s greater than or equal to zero for a l l re a l T, i t follows that the gain constant M-^ , the gain for the i m p l i c i t solution of the control law, w i l l be greater than zero. The l a t t e r problem uses at - M 2 [ > £ - *°2> k i V ? + M 2 > 0 ax! 19 i n c o n j u n c t i o n w i t h . x | = c ; / [ * ° k ° ( i - E 2 / B I ) ] t o s o l v e f o r a n d X ° * The e q u a t i o n f o r was f o r m e d by-s o l v i n g e q u a t i o n s (2—55) a n d (2-56) s i m u l t a n e o u s l y f o r X ° u s i n g e l e m e n t a r y l i n e a r e q u a t i o n t h e o r y . The m a g n i t u d e o f t h e g a i n s a n d a r e made l a r g e e n o u g h so t h a t t h e r e s p e c t i v e e q u a t i o n s a t t a i n s t e a d y s t a t e a l m o s t i n s t a n t a n e o u s l y i n c o m p a r i s o n t o t h e v a r i a t i o n o f t h e o t h e r v a r i a b l e s . I t i s o b v i o u s t h a t h a r d w a r e r e q u i r e m e n t s w o u l d be r e d u c e d i f t h e h a r d w a r e u s e f o r g e n e r a t i n g t h e c o n t r o l l a w was common t o t h e t r a j e c t o r y c o m p u t e r a n d t h e b o u n d a r y v a l u e c o m p u t e r . T h i s was d o n e w h e n t h e s a m p l e p r o b l e m was s o l v e d o n t h e P A C E 2 3 1 R a n a l o g u e c o m p u t e r . F i g u r e 2 - 4 s h o w s t h e p e r -t i n e n t d e t a i l s o f t h e c i r c u i t r y . The s w i t c h SW3 a c c o m p l i s h e s t h e c h a n g e o v e r f r o m i m p l i c i t l y s o l v i n g , t h e c o n t r o l l a w . t o s o l v i n g t h e i n i t i a l v a l u e f o r X2* R e f e r r i n g t o F i g u r e s 2 - 4 a n d 2 - 5 , a b r i e f d e s c r i p t i o n o f t h e o p e r a t i o n o f t h e c o n t r o l l e r f o r t h e s a m p l e p r o b l e m w i l l be g i v e n . T h i s i s b a s e d o n t h e m a n n e r i n w h i c h t h e p r o b l e m was s o l v e d o n t h e P A C E 2 3 1 R c o m p u t e r . The c o n t r o l l e r ' s o p e r a t i o n i s i n i t i a t e d b y t h e s a m p l i n g o f t h e p l a n t ' s s t a t e v a r i a b l e a n d x ^ j a n d s t o r i n g t h e s e v a l u e s a s i n i t i a l c o n d i t i o n s x ° x ° f o r t h e t r a j e c t o r y c o m p u t e r . The i n s t a n t a f t e r s a m p l i n g , t h e f i r s t i t e r a t i o n i s s t a r t e d b y b u s b a r A c h a n g i n g s t a t e t o z e r o a l l o w i n g t h e t r a j e c t o r y c o m p u t e r t o c o m p u t e . The i n i t i a l X„(PUNT) LOGIC SIGNALS X2;(PLANT) f T „ (SET PQtNT) TS3 I TS SW o COMPUTE STORE POSITION 1»(0N) 1 RESET TRACK POSITION {^(OFF) Figure 2-4. The Analogue Computer Ci r c u i t Diagram of thV Controller for the Sample Proble 21 conditions, beside x° and x° are calculated on the basis ~ ^n = ^o a n d ^ k l ^ n = ^ k l ^ o ' v a l u e s that are f i x e d . These are the i n i t i a l guesses referred to i n the outline of the i t e r a t i v e procedure before i n the text. Bus bar B also changes state to zero, remaining so u n t i l the end of the calculations. This t causes switch SW^  to switch allowing the computed C^'s to be used for the remaining i t e r a t i o n s . The i n t e g r a t o r 1^ i s also put i n compute mode,, allowing the i n i t i a l value of to be modified during the i t e r a t i v e c alculation. n n o JL A. TIME Figure 2-5. The Logic Signals for the Controller. by ( t f The termination of the trajectory computer i s determined - t ), the time l e f t to go for the plant. This means 22 that the elapsed time t must be measured or generated. It i s important to remember that the trajectory computer does i t s computation i n scaled time. Its calculations are performed i n scaled time, (t„ — t ) , a f r a c t i o n of a second. ' f o s' At the end of the trajectory calculations the bus bar A changes to unity* The track and store amplifiers TS^ and TS^ store and e^, computed at the end point of the trajectory. The switches, a n < l SW^ , change so that the new i n i t i a l condition (k?) , X° and X° can be calculated. The new (k?) i s I n * 1 2 I n formed by integrating e over the boundary value calculation period, a f i x e d time* This amounts to the formation of (k?) A -j = (k?) + K . e I n + 1 l ' n n At the end of the boundary value c a l c u l a t i o n period bus bar A changes to zero again i n i t i a t i n g the computation of a new trajectory with the calculated i n i t i a l conditions. This sequence of operation w i l l continue for a fixed number of i t e r a -tions, the number of i t e r a t i o n s determined by experience so that converges to zero. At t h i s point the integrator w i l l be sampled for (k°) n and the value used to set the control variable of the plant, f o r example, the set point of a pneumatic valve c o n t r o l l e r * The bus bars A and B w i l l be set to unity putting the computer i n reset mode u n t i l the plant i s sampled again* The procedure w i l l then just be repeated. It w i l l be appreciated that this i s a sampled data, c o n t r o l l e r . The sample interval, time and the computational time are thus quite important. Using an analogue computer w i l l , 23 i n comparison to using a d i g i t a l computer, make the computational time negligible, a very important advantage. For example a IBM 7040, a fast d i g i t a l computer, took fiv e minutes to obtain a solution to this sample problem, while an analogue computer using electromechanical switching solved the same problem within one minute. With electronic switching a f r a c t i o n of a second could be achieved with ease. Generally speaking, the larger the sample i n t e r v a l the poorer the control of the plant. One i s quite correct i n saying that t h i s controller i s a sub—optimal controller, the sample i n t e r v a l determining how close i t i s to the optimum control l e r * 24 3. THE LINEAR NEIGHBORHOOD OPTIMUM CONTROLLER 3.1 Theory of the L i n e a r Neighborhood Optimum C o n t r o l l e r  based on C a l c u l u s of V a r i a t i o n The c o n t r o l l e r d e s c r i b e d i n the p r e v i o u s c h a p t e r w i l l handle a v e r y p a r t i c u l a r problem and w h i l e the q u a n t i t y of hardware i s reduced* i t i s s t i l l c o n s i d e r a b l e . C o n s i d e r a t i o n w i l l now be g i v e n t o a t e c h n i q u e t h a t w i l l cover a w i d e r range of problems and i f analogue equipment i s used, w i l l reduce h a r d -ware t o a minimum* An approximate optimum c o n t r o l l e r can be o b t a i n e d by c o n s i d e r i n g a T a y l o r s e r i e s e x p a n s i o n of the performance f u n c t i o n about a nominal t r a j e c t o r y or the e x p a n s i o n of the n e c e s s a r y c o n d i t i o n s of c a l c u l u s of v a r i a t i o n s , e q u a t i o n s (3-5) to (3-13), about a nominal t r a j e c t o r y . The r e s u l t s are the same. T h i s 3 7 has been done by B r e a k w e l l e t a l and K e l l y u s i n g the f i r s t g approach, and K e l l y u s i n g the second approach. B r e a k w e l l e t 3 7 a l and K e l l y have c o n s i d e r e d o n l y the f i r s t o r d e r a p p r o x i m a t i o n w h i c h r e s u l t s i n a v e r y s i m p l e arrangement, a l i n e a r c o n t r o l l e r , g K e l l y , b e s i d e s c o n s i d e r i n g the f i r s t o r d e r a p p r o x i m a t i o n s , c o n s i d e r e d the h i g h e r o r d e r a p p r o x i m a t i o n s as w e l l . The e q u a t i o n s f o r the h i g h e r a p p r o x i m a t i o n s i n v o l v e n o n l i n e a r d i f f e r e n t i a l e q u a t i o n s and a two p o i n t boundary v a l u e problem. I f these h i g h e r o r d e r a p p r o x i m a t i o n s were t o be used, the c o n t r o l l e r would need t o ' i n c l u d e a computer f o r the s o l u t i o n of a two p o i n t boundary v a l u e problem. The same i s t r u e i f the c o n t r o l l e r was t o s o l v e 25 the problem e x a c t l y * u s i n g the n e c e s s a r y c o n d i t i o n s f o r an optimum, g i v e n by e q u a t i o n s (3—5) to (3-i.]). L i t t l e i n the way of hardware reduction*, o r g e n e r a l s i m p l i f i c a t i o n , would be ac h i e v e d . For these reasons o n l y the f i r s t o r d e r a p p r o x i m a t i o n w i l l be c o n s i d e r e d . The c o n t r o l l e r produced by t h i s a p p r o x i m a t i o n w i l l be r e f e r r e d t o as a l i n e a r neighborhood optimum c o n t r o l l e r . The work w i l l f o l l o w t h a t of B r e a k w e l l e t a l , b o t h i n n o t a t i o n and fornij as much as p o s s i b l e . The problem c o n s i d e r e d by B r e a k w e l l e t a l i s t o f i n d the c o n t r o l law w h i c h m i n i m i z e s 0 [ x ( t f ) , t f ] ( 3 - l ) s u b j e c t t o the c o n s t r a i n t s | | = f ( x , u, t ) (3-2) x ( t Q ) = 5° (3-3) 7/[x ( t f ) , t f ] = ^ f (3-4) where x i s a column v e c t o r of n-dimensions. u i s a column v e c t o r of m-dimensions» ~f i s a column v e c t o r of q—dimensions —T and where q i s l e s s t h a n or eq u a l t o n — 1. The symbol a w i l l be used t o i n d i c a t e the t r a n s p o s e of the m a t r i x a. F o l l o w i n g the u s u a l a n a l y s i s , the f u n c t i o n a l J m = m i n ^ J 0 [ x ( t ) , tJ+^jV.- > [ x + it* • [ f t " 7 <*' = . * ) ] " } 26 and the functions H I A * * f * k 0 [ x ( t ) , t] - v T ( t ) , t] are introduced giving the following necessary conditions for an optimum traj e c t o r y : dx dt dA dt 0 = x (^ = dA ox du —o x > p ( t f ) , t f ] = > f x ( t f ) where H | t f = df v dx ; at It, 3 f n | _ 9 x i ' 3 f n 3 x n (3-5) (3-6) (3-7.) (3-8) (3-9) (3-10) (3-11) 27 and v i s a column vector of q constants. The solution to these equations form the nominal trajectory. A perturbation of the nominal optimum trajectory, caused by disturbances of the i n i t i a l and f i n a l conditions, i s given by the equations (3-12) to (3-18). These equations can be derived by considering the f i r s t v a r i a t i o n & J m for perturbations of the i n i t i a l and f i n a l conditions. This involves minimizing the f i r s t v a r i a t i o n S J which requires that S^J be zero. This m ^ m is similar to the o r i g i n a l optimization problem, the minimization of which requires that be zero. The equations (3-12) to }^-18) can also be formed by expanding the necessary condition for an optimum, equations (3-5) to (3-ll), about a nominal optimum trajectory. The perturbation equations are: d( s x) = a 2H  d t a A a x & X + a 2H dx du £ u ( 3 - 1 2 ) d( <£ x) dt 0 = & u ^ x d 2H 6 ^ Sx S x d 2 H d x b x du &A SA S X + a 2H Q U 2 b2E b x d u 8 u Su (3-13) (3-14) Sx (t ) = 8 (3-15) Dt (3-16) ( t f ) = - ( i i i . S x + ^ [ ( A i ) - A i l d t f . ^ ( x : t ) f \ d x 2 D T L d x dx-1 1 o x 28 T . dv^ (3-17) d H C - ; b H C r I L I d 2 I D / d i d H< d x o t b x + Dt 1 d t " d t ; a X f where S x = x ( t ) - x ( t ) , x ( t ) r e p r e s e n t s the nominal t r a j e c t o r y ; a l s o , fiL_l - dt ) + at ) . r Dt - a t 9 -d x du du ^x F o r d e t a i l s of the d e r i v a t i o n of the e q u a t i o n s , r e f e r t o e i t h e r of the papers by K e l l y or B r e a k w e l l e t a l . 3.2 S o l u t i o n of the E q u a t i o n f o r the Neighbourhood C o n t r o l l e r A b r i e f d e s c r i p t i o n w i l l be p r e s e n t e d e x p l a i n i n g how the s o l u t i o n s o f the p e r t u r b a t i o n e q u a t i o n s and the r e s u l t i n g c o n t r o l l e r e q u a t i o n s are o b t a i n e d . The s o l u t i o n of the p e r t u r -b a t i o n e q u a t i o n s depends upon the f a c t t h a t the e q u a t i o n s are l i n e a r d i f f e r e n t i a l e q u a t i o n s w i t h t i m e - v a r y i n g c o e f f i c i e n t s and thus the p r i n c i p l e of s u p e r p o s i t i o n a p p l i e s a l l o w i n g a g e n e r a l s o l u t i o n o f the form 29 y (t)=:0(t, t ) . y (t ) (3-19) to exist, where y (t ) i s the i n i t i a l value of y ( t ) . Examining the boundary conditions, equations (3-15) to (3-18), for the perturbation equations, i t i s evident that i t i s more convenient to integrate the d i f f e r e n t i a l equations, (3—12) to (3-14), backwards from t^ to t » The f i n a l condition equations, (3-16) to (3—18), are (q + n + l ) equations i n (2n + 2q + l ) unknowns» The unknowns are [&x ( t f ) , SX ( t f ) , dv, d > f , d t f ] If one assumes that the f i n a l condition equations are l i n e a r l y independent, there are (n + independent variables among the (2n + 2q + l ) unknowns. Define the independent variables as (du,, d"/> ) where the vector du. i s composed of the n a r b i t r a r i l y chosen variables among the (2n + q + l ) variables £Sx ( t ^ ) , & X ( t f ) , dv, d t j j • The q variables composing the vector d"y- are specified externally by the operator of the plant and thus are d i s t i n c t from the du,. To form the equivalent of the matrix (t, t ) of equation (3-19) the d i f f e r e n t i a l equations (3-12) to (3-14) are integrated n + q times, each time with a d i f f e r e n t component of (du,, d 'Y' ) unity, and the others zero. The resu l t i n g solutions form 6x (t) _8x (t). » d | J . ( t f ) _d? 7 f-(3-20) 30 the g e n e r a l s o l u t i o n * Now the o b j e c t i v e i s to o b t a i n S x ( t ) , &X ( t ) as f u n c t i o n s of o x ( t Q ) o Since d i / ' i s s p e c i f i e d e x t e r n a l l y , t h i s l e a v e s d(j, ( t ^ ) as the v a r i a b l e of i n t e r e s t . ; I n v e r t i n g e q u a t i o n (3-20) y i e l d s ^ = X x 7 < V t f ) " 1 " [ S x ( V - ^ ^ o ' V • d ^ f ] (3-21) S u b s t i t u t i n g e q u a t i o n (3-2l) back i n t o e q u a t i o n (3—20) y i e l d s ~ x i j . < V * f > * [ 8 * ( t 0 ) - X - - ( t Q , t f ) d ^ f ] S x ( t ) Sx ( t ) ( t , t f ) X-- ( t , t , ) xp, _ f d ^ (3-22) The above e q u a t i o n (3—22) can be s u b s t i t u t e d i n t o the c o n t r o l law e q u a t i o n (3—23) t o y i e l d the c o n t r o l e q u a t i o n . Su ( t ) = - " d2 H " -1 <b2K S u 2 * d u Ox ^ 2 H du ^X (3-23) Thus the s u b o p t i m a l c o n t r o l law i s o b t a i n e d as a f u n c t i o n of the p e r t u r b e d i n i t i a l and f i n a l c o n d i t i o n s and the nominal optimum t r a j e c t o r y * I t i s wise to note t h a t to be a b l e to form the c o n t r o l e q u a t i o n , b o t h and X — ^* ^ f ^  must be non-s i n g u l a r over the i n t e r v a l (tQ» t ^ . ) . To s i m p l i f y the d i s c u s s i o n , dy* w i l l s u b s e q u e n t l y be assumed z e r o . T h i s assumption does not r e s u l t i n any r e s t r i c t i o n 31 on the a p p l i c a b i l i t y of the resulting equations. The equation for the control law i s : Su (t) b2R -1 b 2 H > b2E bu2 ( t o , t f ) , O x ( t o ) (3-24) The calculations of the matrices X and X, involve only n integrations of the perturbations instead of (n + q) integrations for the complete matrix If there i s a continuous estimate of & x (t) for the plant for t 2? t Q , the equation (3-24) simplifies further to I ^ 6u (t) - - , _ 2 • 2 p -1 6 ? "H ^2 H _ bu bx bu _ (t, t f K Su (t) = [ L (t) "] . £ x (t) • S x (t) (3-25) (3-26) where I i s the unit matrix. It should be mentioned that Jazwinski has developed a method of calculating the controller's parameters involving (n + l ) integrations of the perturbation equations, instead of (n + q). However i t was decided to r e s t r i c t the investigation to the approach of Breakwell et a l since perturbations i n the terminal conditions were not considered* 3.3 Transversal Surface Comparison Modification 8 Kelly discusses the manner i n which deviations from the nominal trajectory are calculated. U n t i l now, i t has been assumed the deviations are measured i n terms of the difference i n state from that of the nominal trajectory at a corresponding time, that i s , S x (t) = x (t) - x ( t ) . Kelly refers to an unpublished paper which showed that a mode of comparison based upon transversal surface theory i s more rational and i n an error propagation sense i s optimal. Transversal comparison means that the comparison i s made at corresponding values of the per-formance function increment 0 (x^, t^) - 0 (x, t ) . For the minimum time problem, this means the comparison i s done at the same "time to go'.'» Implementation of the transverse comparison necessitates estimation of the terminal value of the performance function 0 (x, t) for deviations off the nominal trajectory. For a linear neighbourhood controller, r e f e r r i n g to Appendix A, this i s provided by d0 = - X T ( t ) . S x (t) where o x (t) = x (t) - x (t) Thus for the minimum time performance function, the implementation of the transverse state comparison results i n the controller's equation taking the form 33 S'u (t) = L (t - at j . S'x (t) where and f • A (t) = u (t) - u (t - d t f ) S'x (t) = x (t) - x (t - d t f ) t - dtf e t and t f being the nominal trajectory's i n i t i a l and f i n a l time, The variable dtf i s provided by the equation: dtf ='- X T ( t ) . o x . ( t ) . It w i l l be noted that, for the above transverse state comparison, i f either t ^ t f or t - dtf > t f , the controller's equation breaks down* For the standard comparison* S x (t) = x (t) - x (t) and breakdown occurs i f t > tf» Theoretically, the transverse comparison w i l l prevent breakdown of the controller u n t i l the terminal value of the performance function i s reached. Use of an approximation for the terminal value of the performance function compromises t h i s feature. In practice* one modifies the equations as follows: for the transverse comparison, g u (t) = L (fr) . o x (t) (3-27) where S'u (t) k u (t) - u (y) (3-28) S'x (t) 4 x (t) - t m (3-29) where T = t , t - d t . ^  t oT f. o t„ - e j t - dt„ > t„ - e, e > 0 t — dt^» o t h e r w i s e d t f = r - x T ( t ) . £ x ( t ) , t e ( t o , t f ) - t T ( t f ) . £ x ( t f ) , t > t f ox ( t ) = x ( t ) - x ( t ) 34 (3-30) (3-31) (3-32) Fo r c o m p l e t e n e s s , the m o d i f i c a t i o n s t o the c o n t r o l l e r ' s e q u a t i o n s f o r the s t a n d a r d comparison a r e : where and S u ( t ) = L (y) * S x ( t ) £ 5 ( t ) = u ( t ) - u (y) Sx ( t ) = x ( t ) - x (r) t f - e ; t > t f - e » e. 0 „t, o t h e r w i s e . (3-33) (3-34) (3-35) (3-36) Fo r f u t u r e r e f e r e n c e ^ the neighbourhood c o n t r o l l e r based on the e q u a t i o n s (3-27) t o (3-32) w i l l be r e f e r r e d t o as the t r a n s v e r s e comparison mode, w h i l e the c o n t r o l l e r base on e q u a t i o n s (3—33) t o (3-36) w i l l be r e f e r r e d t o as the s t a n d a r d comparison mode. 3-4 An Example f o r the C o n t r o l Sfcheme; the H y d r o g e n e r a t i o n P r o c e s s of Eckman and L e f k o w i t z ' The p r o c e s s c o n s i d e r e d t o t e s t the a p p l i c a b i l i t y of 35 the neighbourhood optimum c o n t r o l l e r i s the h y d r o g e n e r a t i o n 4 p r o c e s s used by Eckman and L e f k o w i t z . Chemical r e a c t i o n e q u a t i o n s of the t y p e : X l + H 2 X 3 X 1 + H 2 ^ _ X 2 X l + H 2 X 3 are d e s c r i b e d by the e q u a t i o n s dx^ = - + k 3 ) X l + k 4 x 2 = f x dx - g ^ = + k 3 x 1 - ( k 2 +k 4)*2_ = f 2 x l + x 2 + X 3 = ^ k i = a i p I l i 1 = 1 ~ 4 where x^, x 2 , and x^ are molar c o n c e n t r a t i o n s and P i s the p r e s s u r e of hydrogen gas i n the r e a c t o r . The temperature i s assumed c o n s t a n t * The p r o c e s s i s a c h e m i c a l b a t c h r e a c t i o n w i t h known i n i t i a l c o n d i t i o n s , w h i c h are a p p r o x i m a t e l y the same always, and s p e c i f i e d f i n a l c o n d i t i o n s w h i c h are not changed* As i n the paper by Eckman and L e f k o w i t z , the minimum time problem w i l l be c o n s i d e r e d . The t e c h n i q u e s f o r m i n i m i z i n g more complex performance f u n c t i o n s , such as p r o f i t are the same. A l s o the c o n t r o l v a r i a b l e , the hydrogen gas p r e s s u r e , w i l l be c o n s i d e r e d u n c o n s t r a i n e d i n magnitude. I f one wishes t o c o n s i d e r 36 the pressure limited i n magnitude, i t is a simple m o d i f i c a t i o n to add a p e n a l t y f u n c t i o n to the performance f u n c t i o n . F o r example, the performance f u n t i o n c o u l d becomes J = t + ) K (P) dO- (3-37) where K (P) » 0 i f P > P and K (P) Cz. 0 i f P^P , and where P . m ' m m i s the maximum p r e s s u r e * F o r the minimum time c r i t e r i o n the e q u a t i o n s are t dx, 3-38) - ± = - ( k x + k 3 ) X]L.-•+ k 4 x 2 dx. 2 d t = k 3 X l " • < k 2 + k 4 } X 2 (3-39) dA. 1 d t = ( k x + k^ ) \j. — k (3-40) dX_ 2 d t = - V i + ( k 2 + k 4 ) X 2 (3-41) k. I ~: a. 1 i = 1, 2, 3, 4 (3-42) 0 ( n ^ + n 3 k 3 ) x x + n 4 k 4 x 2 J + X 2 [ n ^ x . - ( n 2 k 2 + n ^ ) x j (3-43) 1 ( k x + k 3 ) X]_ + k 4 x 2 ] + X 2 [ k ^ - ( k 2 + k 4 ) x ^ I (3-44) x l ( V = X l (3-45) X 2 { t o ) = X 2 (3-46) x l ( t f } = *{ (3-47) 37 Input; Parameters; I n i t i a l and -o E^, etc f i n a l values: -f i I n i t i a l i z e at t ; n Integration oi d i f f e r e n t i a l equations one i n t e r v a l , At. no Calculate a new t r i a l yes Figure 3 - 1 . Block Diagram of the D i g i t a l Computer Programme for Computation of the Nominal Optimum traj e c t o r y . 38 Figure 3-2. Plots of the Nominal Optimum Trajectory" for the Sample Problem. 3 9 x 2 (tP = x 2 (3-48) where t i s the i n i t i a l t i m e , and t„ i s the f i n a l t i m e . As w i l l o 7 f be noted the problem above i s a two p o i n t boundary v a l u e problem, To s o l v e i t , an i t e r a t i o n procedure was used, s i m i l a r t o t h a t suggested by B r e a k w e l l e t a l ..- The i t e r a t i o n d i f f e r s i n t h a t the p e r t u r b a t i o n e q u a t i o n s (3-49) to (3—58) are i n t e g r a t e d f o r w a r d i n time a l o n g w i t h the d i f f e r e n t i a l e q u a t i o n s of optimum t r a j e c -t o r y , g i v i n g : S i ( t ) S t ( t ) = [y ( t , t o ) ] . 8 A ( t o ) S u b s t i t u t i n g t h i s e q u a t i o n i n the t e r m i n a l e q u a t i o n s (3-56) t o (3-58) w i l l g i v e o X ( t ) , the c o r r e c t i o n terms. The b l o c k diagram of the computer programme f o r the s o l u t i o n of the e q u a t i o n s (3—38) to (3^48) i s g i v e n i n F i g u r e 3.1. The s o l u t i o n of these e q u a t i o n s form the nominal s o l u t i o n f o r the neighbourhood c o n t r o l l e r ; the p l o t s of F i g u r e 3.2 demonstrate the form of the nominal s o l u t i o n . The p e r t u r b a t i o n equations of the nominal t r a j e c t o r y f o r the sample problem a r e : d( S x ^ d t ~ dx d( S x 2 ) d f d t ~ 3 x d( S X 1 ) p d t 1 2 g x l + ST 9 x , i + d x , ° A 2 + d P • i x . 8P (3-49) (3-50) (3-51) 40 d( S X 2) dt d x , & P -.1 d p 2 8x 1 ^ 2H ,X„ + H Q x 9 *"*2 • a p &x, -v \ - o x , + _ Q X 1 1 —-2fi s * f l a x 0 b p u X 2 + a p + - y ^ b x ; (3-52) S X-(3-53) O x 1 ( t o ) = & x° S x 2 < V = £x° + f , . d t f ) | t f = dx^ + f 2 . d t f ) | t f = = dx* •1 + f 2 and H = x r . f , + x 2 . (3-54) (3-55) (3-56) (3-57) (3-58) ox. (.t) = x. ( t ) - £. ( t ) where. x\ ( t ) i s the nominal optimum t r a j e c t o r y . The nominal optimum time i s denoted by t ^ . As n o t e d i n the p r e v i o u s s e c t i o n , the p e r t u r b a t i o n e q u a t i o n s are l i n e a r d i f f e r e n t i a l e q u a t i o n w i t h t i m e — v a r y i n g c o e f f i c i e n t s and thus s o l u t i o n s of the form Sx, [ * < t , t Q ) ] , Sx 2 ( t Q ) 41 exi s t . Following the procedure of Breakwell et a l , as outlined in the previous section, the following equations re s u l t , where the p o s s i b i l i t y of end point modifications i s not included, Sx]_ (t) 5x 2 (t) SX-L (t) &>2 (t) and X x (t, t ) X1 A1 1 A A t 0 < t £ t f V 2 ( t' t f ) . A . X a 1 X 2 t f x x 2 x 2 ( t j * f ) Sx 1 ) L&x 2 tff> Referring again to the previous section, the deviation of the general controller equations for the continuous estimation of the deviations S x^ (t) and S x 2 (t) gives S P (t) - 1 1 d 2H b 2H £> 2H 1 dp 2 d P ' X x 1 X 1 (t) X i X 1 A 2 (t)~ « X x 2 X 1 (t) x i X 2 A 2 (t) A 1 A 1 X x 1 x 2 (t) _ A2 A2 x x 2 x 2 (t) • V i ( t ) X x X X1 A2 (t)" X x X ( t ) _ X 2 A 1 X x X X 2 A 2 (t) 1 ^ 2 -1 Sx1 (t)" L S x 2 (t) 42 [ A x ( t ) , A 2 ( t ) ] . x i A i X x X ( t ) - x2 1 A • B S x x (t) _8x 2 (t) = [ L x ( t ) , L 2 ( t ) ] S x x (t) S x 2 (t) X x X ( t )  X1 A2 X x X ( t )  X2 A2 -1 -1 $ X ]_ (t) S x 2 (t) For convenience i n the implememtation of the controller the following form w i l l be used. p (t) = L O ( r ) + L x ( r ) . x x (t) + L 2 ( r ) . x 2 (t) where L Q ) = P ( T ) - ( ? ) . ^ (?) + L 2 CJ ) . x 2 ( r ) and y = l t f - e ; t - d t f ^  t f - e, e > 0 t, otherwise for the standard comparison mode. The block diagram of the computer programme for computation of the control law, the feedforward and feedback gains L Q , L^, and L^t i s given by Figure 3-3. Figure 3—4 demonstrates the form of L , L1, and L _ for a t y p i c a l nominal O X di optimum trajectory of the sample problem. Input? Parameters; Nominal optimum . f P j \ . 43 t etc» ajectory; j 1' /Output: \ / L ( t f ) = -*>\ Integration of perturbation equations backwards one step. At. r Form ma A and B t r i c e s -1 * Figure 3-3. Block Diagram of D i g i t a l Computer Programme for Computation of the Controller Parameters L N , L 1 f and L * 20. 15. Q i 10.-5.-t L 0 L l L 2 0 -•3038 .3717 .4115 10 -.3734 .4496 .5061 20 -.4513 .5354 .6149 30 -••5441 .6351 .7475 40 6623 .7519 .9213 50 -.8249 .9202 1.167 60 -1,068 1.149 1.548 70 -1.471 1.500 2.201 80 -2.253 2.118 3.515 90 -4.303 3.566 7.081 100 -20.38 13.77 35.85 103 - ©o CP lb- 40 ~£o 6o TIME - MINUTES F i g u r e 3-4. P l o t s of the L i n e a r Neighbourhood Optimum C o n t r o l l e r s ' Parameters L Q , L^. and L 2 as F u n c t i o n s of Time. too 20 70 eo 90 A block diagram of the controller for the batch reacto i s shown by Figure 3—5. This i s for standard comparison i n the computation of the deviations from the nominal trajectory., Figure 3-5. Block Diagram of Linear Neighbourhood Optimum Controller Using the Standard Comparison Mode of Operation, Ke l l y demonstated for the simple problem of Zermelo that transverse comparison for the deviations improved terminal accuracy. It i s apparent a controller for a chemical batch reactor i s of l i t t l e value i f the terminal conditions are not closely s a t i s f i e d * Thus, though i t does increase the hardware of the controllers, because of terminal accuracy requirements, the transverse state comparison would need to be considered. For the sample problem being considered, the control 46 <0 ( t - d t f ) *9 dt„ P l a n t (Bdtch R e a c t o r x x ( t ) X Q ( t ) x 2 ( t ) I L 1 ( t - d t f , 2 ( t - d t f ) X Q ( t ) = X 1 ( t ) • x± ( t ) + X 2 ( t ) . x 2 ( t ) F i g u r e 3-6. B l o c k Diagram of L i n e a r Neighbourhood Optimum C o n t r o l l e r U s i n g the T r a n s v e r s e Comparison Mode of O p e r a t i o n , Minimum Time Performance F u n c t i o n . 4 7 e q u a t i o n f o r the t r a n s v e r s e s t a t e comparison made i s P (t) = L o (T) + L x ( ? ) . X ; L (t) + L 2 (T) . x 2 (t) where y = t . , t n - d t „ < t t« - e ; t - dt„ > t „ - e , e > 0 _ t — d t f , o t h e r w i s e and dt„ [ x x ( t ) * S x x ( t ) + X 2 ( t ) . S x 2 ( t ) j , te [ S Q , t f~] [ x 1 ( t f ) * £ X ; L ( t f ) + x 2 ( t f ) . S x 2 ( t f ) j , t > $ f A b l o c k diagram of the c o n t r o l l e r f o r the sample problem, the ch e m i c a l b a t c h r e a c t o r * i n c o r p o r a t i n g "time t o go" comparison i s shown i n F i g u r e 3-<6» 3.5. S i m u l a t i o n of the L i n e a r Neighbourhood Optimum C o n t r o l l e r . I n the s i m u l a t i o n s t u d i e s of the l i n e a r neighbourhood optimum c o n t r o l l e r f o r the sample problem, b o t h the t r a n s v e r s e comparison and s t a n d a r d comparison mode were used. F o r t e r m i n a t i of the p r o c e s s , the t e r m i n a l c o n d i t i o n x x ( t f ) = x^ was u s e d . The chosen nominal t r a j e c t o r y had i n i t i a l c o n d i t i o n s x, ( t ) = 0.900 1 o 48 x 2 ( t ) = 0.000 t = 0 o and f i n a l c o n d i t i o n s x, ( O = 0.350 x 2 ( t f ) = 0.435. 4 T h i s i s one of the t r a j e c t o r i e s t h a t Eckman and L e f k o w i t z c o n s i d e r e d . F i g u r e 3-=*2 i l l u s t r a t e s the optimum t r a j e c t o r y , or nominal t r a j e c t o r y f o r the above c o n d i t i o n s w i t h a performance f u n c t i o n of minimum t i m e , t ^ . I t w i l l be noted t h a t the hydrogen p r e s s u r e i n c r e a s e d mono t o m i c a l l y from 308 p s i . to 444 psi.. T h i s c o n t r a d i c t s the r e s u l t s of Eckman and L e f k o w i t z , where the p r e s s u r e momo t o m i c a l l y d e c r e a s e d . Appendix B e x p l a i n s t h i s c o n t r a d i c t i o n showing t h e i r p o s s i b l e e r r o r . The f e e d f o r w a r d and feedback g a i n s f o r the neighbourhood c o n t r o l l e r based on t h i s nominal t r a j e c t o r y are p l o t t e d i n F i g u r e optimum c o n t r o l l e r , the range t h a t the i n i t i a l c o n d i t i o n s were p e r t u r b e d was 0.1 mole. Thus i n i t i a l c o n d i t i o n s f o r t eq u a l to zero 3-4. To t e s t the e f f e c t i v e n e s s of the l i n e a r neighbourhood w i t h 0.80 S x, ( t ) £ .1.00 1 o x 9 ( t ) = 0.0 2. 0 49 and x, (t ) = 0.90 1 o 0.00 ^ x. (t ) <"0.10 2 o were c o n s i d e r e d * These p e r t u r b a t i o n s w i l l a l s o serve t o check i f the t r a n s v e r s e comparison mode g i v e s any noteworthy improve-ment over the s t a n d a r d comparison mode i n t e r m i n a l r e q u i r e m e n t s and performance f u n c t i o n Value. F i g u r e s 3-7A and 3-7B i l l u s t r a t e some of the r e s u l t i n g c o n t r o l laws f o r the neighbourhood c o n t r o l -l e r , u s i n g t r a n s v e r s e and s t a n d a r d comparison modes a l o n g w i t h the optimum c o n t r o l law* Examining the F i g u r e s 3-7A,.3—7B i t w i l l be seen t h a t f o r s m a l l p e r t u r b a t i o n s (~ - O.Ol) the neighbourhood c o n t r o l l e r produces c o n t r o l laws v e r y d l o s e t o the optimum. T h i s i s demonstrated a l s o by the magnitude of the t e r m i n a l e r r o r s and the v a l u e a c h i e v e d f o r the performance f u n c t i o n , b o t h of which are p l o t t e d i n F i g u r e 3-5. As the p e r t u r b a t i o n s of the i n i t i a l c o n d i t i o n become l a r g e r , the c o n t r o l law has l i t t l e resemblance to the optimum c o n t r o l law, except t h a t i t i s i n the same v i c i n i t y . T h i s d i s t o r t i o n can become such t h a t the c o n t r o l law i s p h y s i c a l l y u n r e a l i z e a b l e . T h i s i s demonstrated by the p l o t of the c o n t r o l law f o r the s t a n d a r d comparison mode made w i t h i n i t i a l c o n d i t i o n s X ; L (0) = 0.86 x 2 (0) = 0.00 i n F i g u r e 3-7A. The hydrogen p r e s s u r e f a l l s o f f u n t i l i t would go n e g a t i v e i f 50 i t was not constrained* Negative absolute pressure cannot exist physically* The same happens for the transverse comparison mode for the i n i t i a l condition x (0) = 0.82 x 2 (0) = 0.00 The region over which the controller using the standard comparison mode produces a v a l i d control law i s with 0.876 x. (0) ^  1.00 x 2 (0) = 0.00, for the transverse comparison mode the region i s 0.82 x x (0) ^  1.00 with x (0) = 0.00 2 The nominal trajectory at the corresponding time has the i n i t i a l values x x (0) = 0.90 x 2 (0) = 0.00 Thus the transverse comparison mode for the neighbourhood con-t r o l l e r i s more useful for larger perturbations of the i n i t i a l conditions than the standard comparison mode. It w i l l be noted examining Figure 3-7B that the control law produced by the controller changes shape d r a s t i c a l l y near 51 the terminal time. Examining the point where the change takes place, i t i s apparent that the change i s caused by the feedback gains remaining fixed. This happens when the controller has gone beyond the tabled values for the gains. That i s , the controller i n the s t r i c t e s t sense i s no longer v a l i d . It w i l l be noted that this event i s somewhat delayed for the transverse comparison mode, as i t should be. The plots in Figures 3-7A and 3-7B suggest that i n place of keeping the feedback gains constant after the controller i s no longer v a l i d , the control variable u should be kept at the la s t v a l i d value. The controller would become an open loop system in place of the closed loop system existing o r i g i n a l l y . Examining the terminal error plots and the performance function value plots, Figure 3-8, i t i s evident that the trans-verse comparison i s better in a l l respects to the standard comparison mode. It always has the lower terminal error and the smaller performance function v a l u e — t h e f i n a l time. Both controllers have reasonable terminal errors and performance function values over their respective regions of v a l i d i t y . The neighbourhood controller, based on the analysis of Breakwell et a l , i s quite acceptable for the control of a chemical batch reactor. Considering terminal accuracy require-ments and the performance function requirements, i t would be advantageous to use the transverse comparison mode i n place of the standard comparison mode. Also, i t appears that larger perturbations of the state variables can be handled without the controller producing impossible control laws. At f i r s t glance, 52 Figure 3-7A. Plots of the Control Laws Produced by the Neighbourhood Optimum Controllers, and the Corresponding Optimum Control Law. 53 -I 1 . — — i 1 1 o to 40 60 eo 100 - TIME -MINUTES Figure 3-7B„ Plots of the Control Laws Produced by the Neighbourhood Optimum Controllers, and the Corresponding Optimum Control Law. 54 .80 .85 .90 -95 1.00 .0 0 .05 .10 Xi(0) „ MOLES X , ( 6 U MOLES [y»(o)s .003 [X,(l>)*-90j .02 .0/ .80 -85 .90 X,(t>K M O L E S CXz(o">=.,003 .05 / . O O .00 JDS •> MOLES 10 Figure 3-8. Plots of the Terminal Errors and Performance Function, Time, for the Neighbourhood Optimum Controllers. 55 the additional equipment would not add too much to the cost. - 3~6« The Mechanization of the Linear Neighbourhood Optimum Controller U n t i l now no mention has been made of how the linear neighbourhood optimum controller would be mechanized* One obvious means would be to use a series of potentiometers shaped to the parameter curves E. For the standard comparison mode the common shaft*s position would be determined by the independ-ent variable, usually elapsed time. The Figure 3-9 demonstrates the mechanization for the sample problem, this i s using the standard comparison mode of operation* The position servo and the intergrator could be replaced by a synchronous clock motor* 1 C . ov. IOOV. POSITION LOADED LOADED LOADED POT SERVO POT POT L, Figure 3-9. Mechanization of the Neighbourhood Controller Us^Lng the Standard Comparison Mode. The transverse comparison mode complicates the imple-mentation s l i g h t l y * The mechanization of the change i n the 5 6 performance f u n c t i o n , d0, would be i n an analogous f a s h i o n t o t h a t shown i n F i g u r e 3-<9. I n g e n e r a l i t would be n e c e s s a r y t h a t the parameters L be t a b l e d as f u n c t i o n s of the v a r i a b l e 0 (Xf, t f ) - 0 ( x , t ) , 0 b e i n g the performance f u n c t i o n * T h i s i s q u i t e s i m p l e and r e q u i r e s no e x t r a c a l c u l a t i o n s * The F i g u r e 3-10 demonstrates the m e c h a n i z a t i o n of the t r a n s v e r s e comparison mode f o r the l i n e a r neighbourhood optimum c o n t r o l l e r . F o r the minimum time performance f u n c t i o n a s l i g h t s i m p l i c a t i o n would be to l e t the parameters L remain as f u n c t i o n s of the e l a p s e d time t and generate (t - d t f ) as the i n p u t t o the second p o s i t i o n s e r v o * An obvious v a r i a t i o n would be t o use f u n c t i o n g e n e r a t o r s i n p l a c e of the l o a d e d p o t e n t i o m e t e r s , t h i s would make sense o n l y i f the p r o c e s s had a v e r y s h o r t d u r a t i o n , o t h e r w i s e i t would be a c o s t l y v a r i a t i o n . < 3 A. 10 0 v. LC. OV-• 100 V. 1 X, l~~ 1 v. POSITION LOAOED LOADED LOADED SERVO POT POT POT POSITION SERVO LOADED LOAOED LOADED POT POT POT F i g u r e 3-10. M e c h a n i z a t i o n of the Neighbourhood C o n t r o l l e r U s i n g the Tr a n s v e r s e Comparison Mode. 57 It should be noted that the transverse mode for the neighbourhood controller would cost approximately twice that for the standard comparison mode controller.. Nevertheless the cost of the neighbourhood controller would seem to be such that the transverse comparison mode should always be mechanized. 58 4. MERRlAM*S PARAMETER EXPANSION SCHEME 4.1 Outline of the Theory for Merriam Synthesis of Suboptimal Controllers. The synthesis procedure developed by Breakwell et al and Kelly i s not the only manner of forming suboptimal controlle In t h i s chapter another development i s presented; since no num-e r i c a l work has been done only the outline of the theory i s presented. 12 Merriam has developed a synthesis procedure for suboptimal control* As developed i n Chapter 9 of his book, the procedure applies only to the free point terminal boundary condition. The problem treated i s the minimization of h (x, u, y) dcr subject to ^ = 7 ( I E , u, y) and the boundary condition x (t) = x° In Appendix E of the book, using his synthesis procedure * he goes through the development of an a i r c r a f t landing control system, demonstrating also a manner of handling fixed point terminal boundary conditions. Outlined below i s the second degree approximation and the corresponding equations for the parameters P , P and the 59 suboptimal contro l l e r * The equations are modified to include fixed point terminal boundary conditions. Also a method for using his technique where the terminal time i s free, for example the minimum time problem, i s presented. The method i s feasible only under certain conditions. The statement of the problems it i s required to f i n d the control u which minimizes r Q n = 1 . . • -1 ' (4-1) subject to the conditions = ? (x, u, 7 ) (4-2) x (t) = x° (4-3) ^ n n ^ > = ^ f T • S ( T - T ) (4-4) where cb(t) i s the unit impulse function. The fixed point terminal boundary conditions are accounted for by using unit impulse functions i n the performance function. Let X (T) = X f n ' n be the terminal boundary conditions. Also l e t E [x, t] = min Y, hffl (x, u", y ) a\y (4-5) u where h (x*, u, T ) = h (x, u, r ) + | r ^ n n ( y ) [ x n ( r ) - x ( r n = 1 (4-6) 60 If the problem was solved exactly using dynamic pro-gramming, the equation for E (x, t) would be - ^ f - ^ + minT h (x, u, t) . ? (x, ut t ) l = 0 O T > - L . m : ^ x _J (4-7) Let • H * F = K *f *) + 6 E .(!' t } . ? (x, 5, t) (4-8) . Ox which corresponds to the Hamiltonian function of the calculus of variations, and l e t *\* (x, t) = toin^ (x, u", t) (4-9) u Following Merriam's method the second degree expansion of E (x, A about a nominal trajectory x i s E 2 (x, t) = P 0 (t) + ;jh p n (t) . [ x n (t) - x n <t)] M M _ _ + z : , s : pnm.(*> [*nw - x n <t>] m = 1 n = 1 f x (t) - x ( t j l L m m v 'J (4-10) where P„ (t) = E (X, t) P (t) = n P (t) nm 7 £E (X, t) dx &E ( x . t) d x A X A X (4-11) (4-12) (4-13) 61 The corresponding truncated Haitiiltonian function for E 2 (x, t) i s *k2 (x, u, t) = h m (x, u , t ) M ^ E 2 t) n = 1 dx f n (x, u, t) n (4-14) where <^E0 (x, t) M -s = P (t) + 5x_ n n 2 > P (t) f x (t) - x ( t ) l m = 1 (4-15) and l e t (x, t) = min'kp (x, u, t) (4-16) u The equation (4^ -16) i s used to define u + , the approximation to the optimum control law u. After further manipulation, which i s covered i n d e t a i l i n Merriam Ts book, the following equations results d P o (*> ~Ht dP (t) n dt - h m (x, u, t) dP (t) nm dt <&* (x, t) ax n bV (x, t), ^ X n * X m (4-17) M - * + 2 5" x = x m = 1 P (t) nm d£ (t) . m dt _ A X = X (4-18) (4-19) The boundary conditions for the parameters P Q ( t ) , P N ( t ) , and P (t) are determined by nm v J E ( x (T), T) = 0 62 If a l l the x. (T) were free then P (T), P (T), and P (T) I X ' o ' n * nm ' would a l l be zero* For fixed point terminal boundary conditions the Hamiltonian becomes % (5, t> - i>" f* n T • &(T - t ) [ X n ( t ) - x n (t)] n — 1 + H_ (x, t) where * [2 and H (x, t) = min H 9 (x* u, t ) , (4-20) (4-21) u H 0 (x, u, t ) h (: M m > u, t) + 21 ( f (x, u, t) . P (t) n• = 1^ P (t) f x (t) - x (t)~f) (4-22) nm N 7 |_ m 7 m x 'Jy x ' This gives d F o <*> dt d P n ( t> dt dp (t) nm ' dt where - ^I0 n X * S(T -t) [ X n (t) - x n ( t ) ] 2 - h (x, u, t) (4-23) n=l ^H* (x, t) n M 2 > P (t) — , nm - - + x = x <£•— , nm m = 1 d£ (t) m dt (4-24) = - 0 n T - S(T - t) . S 6 % U , t ) - - ^ w (4-25) 'mn 0> h ^ m j _ l f n — m* 63 The above d i f f e r e n t i a l equations have the boundary conditions P n (T) = 0 nn (T) = - 0 n T , n < Q 0, Q <c n S M (4-26) (4-27) P M m (T) =0, n ^ m nm . ' (4-28) It w i l l be useful to give some attention to the d H 2 d 2Ho * evaluation of and - along x, the nominal optimum ^ n " n ° m trajectory. Consider the f i r s t order p a r t i a l derivative, d H 2 (x, t) d x n - = x = X J ^ - [ H 2 (X, U? t) _ A X = X H 2 (x, u't t) n X = X c$H (x, u, t) c^u cBx: -+ n d u -+ x = (4-29) since (x, u+ t) u -+ = 0 A X = X i t follows that dH* (x> t) dx. n 6 H 0 (x, uJ t) A X d x n A. X = X (4-30) Consider the second order p a r t i a l derivative, 64 d 2H* ( x , t ) dx d x n m 3 H„ (x, u, t ) x = x 3 x c3 x u n m _ A X = X f3H 2 (x, u+ t ) 3 u + " d x n (x, u+ t ) 3 u + d x m 3 H 2 (x, 5+ t ) d u + C ) u + d H 2 (x, u"f t ) _ A X = X _ A X = X A X = X a*; m -+ d u a x * Q x m u n 3u -+ 2—b d 2u A « X = d x d x x u n m (4-31) As b e f o r e /dH 2 (x, u+ t ) X = 0 removing the l a s t term from c o n s i d e r a t i o n . T h i s s t i l l l e a v e s d u + d x n t o be found* The c o n t r o l law u i s d e f i n e d by H 2 (x, u) = min [H (X, U , t ) ] u or i f t h e r e are no c o n s t r a i n t s , w h i c h w i l l be assumed, then u i s d e f i n e d by d H 2 (x, u, t ) -+ 3 u = 0 and thus from e l e m e n t a r y c a l c u l u s i t f o l l o w s 3u-+ " d 2H 2 ~ r - l r 3 2 h 2 I dx L d u + 2 J * (4-32) 65 - S u b s t i t u t i n g t h i s e x p r e s s i o n i n t o e q u a t i o n (4-31) g i v e s . 3 2 H 2 Ox, u+ t ) <32H* (x , t ) X = x 3 x d x n m x = x a * H 2 ! ( x, u j t ) a H 2 (;,, u j t )  : * a u + 3 u + - i a u * • a. a H 2 ( x , u * t ) m _ A X = X (4-33) S u b s t i t u t i n g the e x p r e s s i o n s (4-30) and (4-33) i n t o e q u a t i o n s (4-24) and (4-2 5) g i v e the parameter e q u a t i o n s dP ( t ) n ' dt aH 0 ( x , u? t ) ax. n M A + 2 x = x m - 1 A A P ( t ) . f (x u, t) m dP ( t ) nm ' d t 5 % (x, u+ t ) 5 x o x n m d 2 H 2 ( x , u+ t ) _ 1 a u + a u + _ A. X = X (4-34) d 2 H 0 ( x , u? t ) a2H2 ( x , u+.t) hu+bx m n — A. X = X w i t h the i n i t i a l c o n d i t i o n s (4-35) K (T) = 0 n $ (T) = nn 0, < n < H (4 .-3.6) (4*37) nm 66 (T) = 0, n ^ m (4-38) The function H.^ (x* "O i s defined by _ M / A H 2 (x, u, t) = h (x, u, t) + ]>~ f (x, u, t) . ( ? (t) n = 1 ^ + 2 Ik.- 6™ <*> •[%, ( t ) ( t ) D < 4- 3 9» m = 1 A A The equations for the parameters P N (t) and P N M (t) are now complete such that the parameter can be evaluated by simply choosing a nominal optimum trajectory and integrating equations (4-34) and (4—3 5) backwards i n time from the f i n a l point "T" to the i n i t i a l point " t " . There i s the selection of the values for 0n^> Merriam covers this i n d e t a i l i n his book* Once P (t) and £ (t) are evaluated the controller i s defined n nn by the equation A h (Z , T * + \ M d f ( x , u, t) ,^ 0 = Q h ^ u; H + 5 ^ a 5 — - . ( P (t) ?» ,7* i • ft ,7* V n + 2 X r Pnm <*> * [ Xm <*> " Xm <*>]) m = 1 ^ where u i s the approximate optimum control law» I t w i l l be noted that the controller w i l l not be a linear controller,unlike the controller produced by the technique of Breakwell et a l . In many problems the independent variable, usually time, does not have a fixed f i n a l value. A transformation w i l l now be given which i n many problems enables this case to be handled. Basically* a change of independent variable i s 67 u n d e r t a k e n * F o r example, one of the s t a t e v a r i a b l e s i s c o n s i d e r e to be the independent v a r i a b l e . T h i s can be done i f the v a r i a b l e .dx. x. i s such t h a t the d e r i v a t i v e , ,;? , i s nonzero over the D d t ' i n t e r v a l of i n t e r e s t * Note t h a t x. has a l s o to have f i x e d i n i t i a l and f i n a l V a l u e s t o be u s e f u l * Thus the problem i s t r a n s f o r m e d from m i n i m i z i n g h ( x , U j y ) a\T (4-41) t s u b j e c t to d * = f (x f-G, 3" ) (4-42) d 3-and J 0 t o the- problem of m i n i m i z i n g x ( t ) = x° (4-43) x. (T) = Xf. (4-44) ^ h ( x , u, T ) . — . dx. (4-45) (x, u, T ) J s u b j e c t t o 68 x o i i = 1, M; i ^ j (4-48) (4-49) and where the f i n a l v a l u e of the independent v a r i a b l e i s f i x e d . time i n v a r i a n t then the d i f f e r e n t i a l e q u a t i o n f o r time (4-47) can be e l i m i n a t e d * I f t h i s i s done th e n the c o n t r o l l e r e q u a t i o n (4-40) w i l l be time i n v a r i a n t . Thus the p o s s i b i l i t y e x i s t s of p r o d u c i n g a c o n t r o l l e r independent of t i m e . I n p a r t i c u l a r , i f the c o n d i t i o n n o t e d above can be met, t h i s i s t r u e f o r the minimum time p r o b l e n u F o r s i m p l i c i t y i n the c o n t r o l l e r i t would be d e s i r a b l e t o e l i m i n a t e t i m e , thus e l i m i n a t i n g the need f o r a c l o c k and f o r the g e n e r a t i o n of s p e c i f i e d f u n c t i o n s of t i m e . The c o n t r o l l e r w i l l undoubtely be s i m p l e r though the c a l c u l a t i o n s to form the parameters of the c o n t r o l l e r w i l l u s u a l l y be more i n v o l v e d * S i n c e these c a l c u l a t i o n s are done o f f - l i n e and o n l y once, t h i s i s no g r e a t h a n d i c a p . produce time i n v a r i a n t c o n t r o l l e r s under the same c o n d i t i o n s . The o n l y e x c e p t i o n i s the minimum time problem. T h i s e x c e p t i o n i s caused by the b a s i c f o r m u l a t i o n of the performance f u n c t i o n s . B r e a k w e l l e t a l use the Mayer f o r m u l a t i o n , 0 (x, t ) , w h i l e Merriam uses the form /*T I f b o t h the system parameters and h ( x , u, ) are The t e c h n i q u e developed by B r e a k w e l l e t a l a l s o can t 5* CONCLUSIONS 6 9 The I t e r a t i v e scheme d e s c r i b e d i n the t h e s i s has been shown u s e f u l f o r s o l v i n g o p t i m i z a t i o n problems, though a l i m i t e d c l a s s of problems* I t has been shown t h a t t h i s scheme c o u l d form the b a s i s f o r an on~<line computer f o r the c o n t r o l of a che m i c a l b a t c h p r o c e s s * The b a s i c computer has been s i m u l a t e d on a PACE 231R a n a l o g computer sucessfully„ The second scheme examined, the l i n e a r neighbourhood optimum c o n t r o l l e r o f B r e a k w e l l e t a l and K e l l y has been shown to h o l d promise as a c o n t r o l l e r f o r c h e m i c a l b a t c h r e a c t o r s * The t r a n s v e r s a l s u r f a c e comparison, mentioned by K e l l y , has been shown t o be s u p e r i o r t o the s t a n d a r d comparison method* T h i s was shown by the s m a l l e r t e r m i n a l e r r o r s , the lower v a l u e s f o r performance f u n c t i o n , and the l a r g e r p e r t u r b a t i o n s t h a t c o u l d be h a n d l e d when t r a n s v e r s a l s u r f a c e comparison was used* T h i s agrees w i t h K e l l y * s work w i t h r e s p e c t t o t e r m i n a l e r r o r s * g however K e l l y has not examined the o t h e r f a c t o r s i n h i s paper . Prom a p r e l i m i n a r y e x a m i n a t i o n the l i n e a r n e i g h b o u r -hood optimum c o n t r o l l e r would be cheaper t h a n the f i r s t scheme based on an i t e r a t i v e p r o c e d u r e * Thj§ main d i f f i c u l t y w i t h the l i n e a r neighbourhood c o n t r o l l e r i s t h a t a l a r g e computer, such as the IBM 7040, i s needed t o do the d e s i g n c a l c u l a t i o n s * T h i s i s n o t much of a d i s a d v a n t a g e , s i n c e such machines are i n wi d e s p r e a d use* The s y n t h e s i s procedure of MerrSiam i s i n t e r e s t i n g and sh o u l d be examined by a p p l i c a t i o n t o some p h y s i c a l problem* I t 70 i s apparent that unless Merriam's controller produced a decided improvement over the linear neighbourhood optimum controller using transversal surface comparison Merriam's controller would not be used. The controller based on Merriam's synthesis i s nonlinear and would e n t a i l considerably more hardware than the l i n e a r neighbourhood optimum controller of Breakwell et a l and K e l l y . An interesting feature of Merriam's suboptimal controller i s the p o s s i b i l i t y of producing a time invariant controller for the minimum time problem i f the plant i s time invariant. 7 1 APPENDIX A ESTIMATION OF A0, THE PERTURBATION OF THE PERFORMANCE FUNCTION I t i s o f t e n c o n v e n i e n t t o have an e s t i m a t e of how much the performance f u n c t i o n J = min 0 ( x f , t f ) u i s changed by p e r t u r b a t i o n s of the i n i t i a l and f i n a l c o n d i t i o n s , — —.f x ( t Q ) and \^ . P r e s e n t e d below i s a d e r i v a t i o n of the f i r s t o r d e r a p p r o x i m a t i o n t o A J . A r e l a t i o n s h i p u s e f u l i n the d e r i v a t i o n i s ( t ) .• <b x ( t ) = c o n s t a n t . T h i s i s proved by d i f f e r e n t i a t i n g i t w i t h r e s p e c t t o time and making the a p p r o p r i a t e s u b s t i t u t i o n j f A f ( t ) . s ; ( t ) = . &: ( t ) + f f t ) N L X d x d X c»u X •Su (t)J d x d x a u = 0 Thus —T r — X (t) • 6 x (t) = constant. and it follows that A^ (tQ) . S x (tQ) = X T (t f) . Sx (t f) 72 Substituting A Ax ( t f ) ^ S x ( t f ) + f t f * d t f and the f i n a l conditions O x 5CT * f } f ~ d t where yie l d s 5 = 0 ( x , t) - v T . y > ( x , t) X"T ( t o ) . S x ( t Q ) X T ( t f ) . Ax ( t f ) - X T ( t f ) * f x t . Ax (t„) + v T . O x + * dt„ t f f t Ax ( t J f 1 d t and f i n a l l y = - d0 + V T * d V - f AJ ~ i d0 = - X T ( t ) . S x (t ) + v T , d ^ -T If the f i n a l conditions are not perturbed, which i s often the case, then AJ ^ - £ (t ) . & x (t ), g the equation used by K e l l y » APPENDIX B A COMPARISON ¥ITH ECKMAN AND LEFKOWITZ*S RESULTS Comparison of the r e s u l t s p r e s e n t e d i n Chapter 3 w i t h 4 Eckman and L e f k o w i t z r e s u l t s shows t h a t t h e r e i s a c o n t r a d i c t i o n i n the shape of the d e r i v e d c o n t r o l l a v s . They have the p r e s s u r e of the hydrogen gas m o n o t o m i c a l l y d e c r e a s i n g w h i l e F i g u r e 3*2 i n d i c a t e s t h a t i t i s monvotomically i n c r e a s i n g . To d i s c u s s t h i s d i s c r e p a n c y c o n s i d e r J = min (t„ - t ) p f c s u b j e c t t o dx _1 d t dx, = - (k^ f k^) x.^ + k 4 x 2 B - l = 'k.^i ~" (k2 + x2 B"^2 d t kj^ = a ± P ~ % i t 1 - 4 B-3 n l = n2 n 3 = n 4 where t„ i s the f i n a l time and t i s the i n i t i a l t i m e * Eckman i o and L e f k o w i t z c a r r i e d out the t r a n s f o r m a t i o n s x = l n [ x l ( t o V X l ( t ) ] 74 3 B = k 4 / k 3 = a 4 / a 3 C * k2/k 1 = a 2 / a i a = V ( n r - n 3) m - 1 . a , / m A = 1 / a 3 which results i n the equations §2L = „ + ! _ fS] +G,A » ) . = % . B*3 dq \g + 1 - B . (0) ^ ° 1 - m r dq = (g + 1 - Bo>) = r t = r-ML „ = j> B_ 4 These equations agree with the equations i n th e i r paper* Applying the calculus of variations analysis to the optimization problem gives the following: P.= x t X + = 1 d o _ Ag 1 " m *;, B. x r Cg j„ _ g ( l + C»)B dq ~ (g + 1 - Bco)2 ~ «. | j " (g + 1 - Bw) (g + 1 - Bw)^ B-5 0 = Ag m • [(1 - Bfi>) (1 - m) - mg] + Xtf Q l + c») ( l - Bco)] , (g + 1 - B«>) ^ 0 B-6 Eckman and Lefkowitz had in place of the control equation* B-6, 75 a d i f f e r e n t i a l equation for g, and A 2 being eliminated* To obtain this^ the control equation i s di f f e r e n t i a t e d with respect to g , - [m (m - 1) (1 - B») Ag" ( m + 1 ) - m (m - 1) . A . g"**1] & = ( B (m - 1) Ag~ m +X W [c ( l - B») - B ( l + Ceo)]). f | + [(1 + Cn) (1 - Btt)]. ^ B-7. The variables w and — c a n be eliminated by substituting equations B-5, and B—6 into the equation B-7. Instead of attempting to reduce the equation B-7, t y p i c a l values of g and 03 were substituted into the two equations for the equation B—7 and the i r equation ^ = n +tt _ 1 r g (i - B * q>)i dq |^  dqj ' |_(m - 1) (1 ~ Btt) m J B-8 As expected, the two values for disagreed^ being of opposite sign. If equations B—3»' B-4, and B-7 are integrated i t i s found that the results agree with o r i g i n a l analysis of Chapter 3. Thus i t can be d e f i n i t e l y said that an error was made i n the derivation of the optimization equations by Eckman and Lefkowitz. If one t r i e s to reduce the equation B-7, an error i n the reduction w i l l not be surprising* In conclusion* the importance of correct comparisons should be noted* Eckman and Lefkowitz compare a constant pressure run from 76 X I ^ o ' = O o 9 ° x 9 (t ) = 0.00 to x x ( t f ) = 0.35 x 2 ( t f ) =-0.435 with an optimum pressure run from X l ( t Q ) = 0*90 x 0 (t ) = 0.00 2 o to X j ( t f ) = 0.350 x 2 ( t f ) = 0.450 The l a t t e r has a batch time 23$ less than the former. This i s used as a j u s t i f i c a t i o n f o r using an optimizing controller* If one, using t h e i r model of the reactor, computed the batch times for the two sets of end conditions, using either a constant pressure law or an optimum pressure law, i t would be found that the batch times d i f f e r by about 20$. Furthermore^ the difference for batch times between a constant pressure run and an optimum pressure i s very marginal, less than lfo0 This indicates the importance of making comparisons under similar conditions i n order to avoid erroneous conclusionsi 77 REFERENCES. 1. B a l a k r i s h n a n , A. V,, and Neustad, L. ¥., Computing Methods i n O p t i m i z a t i o n Problems (Book), Academic P r e s s , New York, 1964. 2. Bohn, E.'.'V., The P r a c t i c a l R e a l i z a t i o n of Optimal C o n t r o l of M u l t i v a r i a b l e Dynamic P r o c e s s e s . Conference on Canadian I n d u s t r i a l Research, C a r l e t o n U n i v e r s i t y , J u l y , 1964. 3. B r e a k w e l l , J . V., Speyer, S. L., and B r y s o n , A. E., O p t i m i z a t i o n and C o n t r o l of N o n l i n e a r Systems u s i n g  the Second V a r i a t i o n . SIAM C o n t r o l S e r i e s A, V o l . 1, No. 2, 1963, pp. 193-223. 4. Eckman, D. P. and L e f k o w i t z , I . . A Report on O p t i m i z i n g C o n t r o l of a Chemical P r o c e s s . C o n t r o l E n g i n e e r i n g , September, 1957, 'pp. 197-204. 5. K a p l a n , V., Advanced C a l c u l u s (Book), A d d i s o n Wesley P u b l i s h Company, I n c . , Reading M a s s a c h u s e t t s , 1952, pp. 90-98. 6. J a z w i n s k i , A. H., Optimal T r a j e c t o r i e s and L i n e a r C o n t r o l of N o n l i n e a r Systems. AIAA J o u r n a l , V o l . 2, No. 8, August, 1964, pp. 1371-1379. 7. K e l l y , H. J . , Guidance Theory and E x t r e m a l F i e l d s , IEEE T r a n s a c t i o n s f o r Automatic C o n t r o l , AC7, No. 5, October, 1962, pp. 75-82. 8. K e l l y , H. J . , An Optimal Guidance A p p r o x i m a t i o n Theory IEEE T r a n s a c t i o n on Automatic C o n t r o l , AC9, No. 4, October, 1964, pp. 375-380. 9. K o r n , G. A., E n f o r c i n g P o n t r y a g i n s Maximum P r i n c i p l e by Continuous S t e e p e s t Descent, IEEE T r a n s a c t i o n s on E l e c t r o n i c Computers, V o l . EC13, No. 4 August, 1964, pp. 475-476. 10. Lee, E. S., O p t i m i z a t i o n by P o n t r y a g i n s Maximum P r i n c i p l e on the A n a l o g Computer. P r o c e e d i n g s 1963 J o i n t A u t omatic C o n t r o l Conference, pp. 524-531. 11. L e i t m a n , G., O p t i m i z a t i o n Techniques w i t h A p p l i c a t i o n s to Aerospace Systems "(Book), Acadamic P r e s s , New York, 1962, Chapters 4, 5, 7. 12. Merriam I I I , C* V., O p t i m i z a t i o n Theory and the D e s i g n of Feedback C o n t r o l Systems (Book). M c G r a w - H i l l . New York, 1964. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0104718/manifest

Comment

Related Items