Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Study of estimation and optimization techniques suitable for microprocessor adaptive controllers Spasov, Peter 1979

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

Item Metadata

Download

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

Full Text

STUDY OF ESTIMATION AND OPTIMIZATION TECHNIQUES SUITABLE FOR MICROPROCESSOR ADAPTIVE CONTROLLERS by PETER SPASOV B . A . S c . ( E . E . ) , U n i v e r s i t y o f T o r o n t o , 1977 A THESIS SUBMITTED I N PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF A P P L I E D SCIENCE i n THE FACULTY OF GRADUATE STUDIES (Depar tment o f E l e c t r i c a l E n g i n e e r i n g ) We a c c e p t t h i s t h e s i s as c o n f o r m i n g t o t h e r e q u i r e d s t a n d a r d THE UNIVERSITY OF B R I T I S H COLUMBIA M a y , 1979 © P e t e r S p a s o v , 1979 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 the U n i v e r s i t y o f B r i t i s h Columbia, I agree t h a t the 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 agree 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 purposes 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 E l e c t r i c a l E n g i n e e r i n g The U n i v e r s i t y o f B r i t i s h Columbia 2075 Wesbrook P l a c e Vancouver, Canada V6T 1W5 Date May 17. 1979 5E-6 B P 75-51 1 E ABSTRACT A d a p t i v e c o n t r o l l e r s a r e c o n t r o l l e r s t h a t p e r f o r m o p t i m a l l y i n unknown o r c h a n g i n g e n v i r o m e n t s . One c l a s s o f a d a p t i v e c o n t r o l l e r s a r e c o n v e n t i o n a l c o n t r o l l e r s t h a t tune t h e m s e l v e s . T h i s I s done by e s t i m a t i n g t h e p l a n t s y s t e m p a r a m e t e r s and o p t i m i z i n g t h e c o n t r o l l e r b a s e d on t h e s e e s t i m a t e s . I t i s d e s i r e d t o have a l g o r i t h m s t h a t a r e s h o r t i n b o t h p r o g r a m l e n g t h and e x e c u t i o n t i m e so . t h a t i m p l e m e n t a t i o n i n a d e v i c e s u c h as a m i c r o p r o c e s s o r i s p o s s i b l e . G e n e r a l i z e d G e o m e t r i c P rog ramming (GGP) i s u s e d t o o p t i m i z e b o t h PID c o n t r o l o f a s e c o n d o r d e r s y s t e m and l e a d - l a g c o m p e n s a t i o n o f a s e r v o m o t o r s y s t e m . These a l g o r i t h m s n o r m a l l y c o n v e r g e i n a few i t e r a -t i o n s . The p a r a m e t e r s o f a s e c o n d o r d e r p l a n t a r e e s t i m a t e d by two t e c h n i q u e s . One t e c h n i q u e i n v o l v e s c u r v e f i t t i n g o f a s t e p r e s p o n s e w i t h c u b i c s p l i n e s to f i n d t h e c o e f f i c i e n t s o f t h e c h a r a c t e r i s t i c e q u a t i o n . The o t h e r t e c h n i q u e , c a l l e d W a l s h F u n c t i o n P a r a m e t e r I d e n t i f i c a t i o n , (WFPI) u se s a s q u a r e wave t e s t i n p u t and f i n d s t h e phase t a n g e n t s by c o r r e l a t i o n o f t h e o u t p u t w i t h W a l s h F u n c t i o n s . I n g e n e r a l , each o f t h e s e a l g o r i t h m s i s e s t i m a t e d t o r e q u i r e no more t h a n 1000 l i n e s o f code w i t h e x e c u t i o n t i m e s o f l e s s t h a n 1 s e c o n d , once t h e measured d a t a i s a v a i l a b l e . TABLE OF CONTENTS Page ABSTRACT i i TABLE OF CONTENTS i i i SYMBOLS v ABBREVIATIONS v i L I S T OF ILLUSTRATIONS AND TABLES v i i ACKNOWLEDGEMENTS v i i i I . INTRODUCTION - ADAPTIVE CONTROL 1 I I . OPTIMIZATION USING GENERALIZED GEOMETRIC PROGRAMMING (GGP) . . . 4 2.1 I n t r o d u c t i o n t o GGP 4 2.2 C o n d e n s a t i o n o f P I D C o n t r o l P r o b l e m 7 2.3 O p t i m i z a t i o n o f t h e D u a l P r o b l e m - P I D C o n t r o l 15 2.4 S e r v o m o t o r L e a d - L a g N e t w o r k C o m p e n s a t i o n 25 I I I . PARAMETER IDENTIFICATION USING CUBIC SPLINES 35 3.1 The P r o b l e m o f P a r a m e t e r I d e n t i f i c a t i o n 35 3.2 C u b i c S p l i n e s 36 3.3 I d e n t i f y i n g t h e Second O r d e r S y s t e m 39 I V . PARAMETER IDENTIFICATION USING WALSH FUNCTIONS 51 4.1 Deve lopmen t o f t h e Method 51 4.2 T e s t i n g t h e Me thod 54 4.3 C o n c l u s i o n f o r t h e WFPI T e c h n i q u e 61 V . IMPLEMENTATION STUDIES 63 5.1 F e a s i b i l i t y o f I m p l e m e n t a t i o n 63 5.2 T e s t o f yP P rog rams 67 i v Page CONCLUSIONS 70 REFERENCES . 72 APPENDIX A - GGP A l g o r i t h m s 75 APPENDIX B - P a r a m e t e r E s t i m a t i o n A l g o r i t h m s 82 APPENDIX C - W a l s h F u n c t i o n P a r a m e t e r I d e n t i f i c a t i o n 85 APPENDIX D - P ID C o n t r o l and L e a d - L a g C o m p e n s a t i o n 87 S Y M B O L S C h a p t e r 2 g c o n s t r a i n t and c o s t f u n c t i o n f o r GGP G i n g , f u n c t i o n f o r z = I n X s p a c e X p r i m a l v a r i a b l e 6 , a d u a l v a r i a b l e s t t i m e s c a l i n g f a c t o r s Y , u , C p a r a m e t e r f o r 2nd o r d e r s y s t e m n ' n ' n ^ J K , T . , T , p a r a m e t e r s f o r P ID c o n t r o l c 1 d K , T p a r a m e t e r s f o r s e r v o m o t o r P P K ^ , , a p a r a m e t e r s f o r l e a d - l a g n e t w o r k C h a p t e r 3 C . . c u b i c s p l i n e c o e f f i c i e n t S ( t ) s p l i n e f u n c t i o n x , x s y s t e m o u t p u t y f i r s t d e r i v a t i v e o f s y s t e m o u t p u t z s e c o n d d e r i v a t i v e o f s y s t e m o u t p u t a l > a2 » Yp» T Q p a r a m e t e r s f o r 2nd o r d e r s y s t e m a k ' ^ k ' ^ k ' r k ' ^ k ' S k v a r i a b l e f o r i d e n t i f i c a t i o n a l g o r i t h m C h a p t e r 4 x s i n e t y p e W a l s h f u n c t i o n y c o s i n e t y p e W a l s h f u n c t i o n x c , y c c o r r e l a t i o n f u n c t i o n 1^ i n t e g r a l segment s^ s i g n o f i n t e g r a l segment Y , <D , ? p a r a m e t e r s f o r 2nd o r d e r s y s t e m P P P y J co f r e q u e n c y o f s q u a r e wave t e s t s i g n a l t an6 phase t a n g e n t v i ABBREVIATIONS D / A d i g i t a l t o a n a l o g c o n v e r t e r GGP g e n e r a l i z e d g e o m e t r i c p rog ramming I / O i n p u t / o u t p u t I S E i n t e g r a l s q u a r e e r r o r pP m i c r o p r o c e s s o r PID p r o p o r t i o n a l i n t e g r a l d e r i v a t i v e c o n t r o l l e r RAM random a c c e s s memory ROM r e a d o n l y memory WFPI W a l s h f u n c t i o n p a r a m e t e r i d e n t i f i c a t i o n v i i L I S T OF ILLUSTRATIONS AND TABLES F i g u r e Page 1.1 Use o f A d a p t i v e A l g o r i t h m s i n a C o n t r o l l e r 2 2 . 1 S t e p Response f o r O p t i m a l PID C o n t r o l 24 2 . 2 L a g C o m p e n s a t i o n U s i n g GGP 32 2 . 3 C o n v e n t i o n a l L a g C o m p e n s a t i o n 33 2 . 4 L e a d C o m p e n s a t i o n U s i n g GGP 34 3 . 1 C u b i c S p l i n e C u r v e F i t t i n g 47 3 .2 PID T u n i n g Based on E s t i m a t e d 2nd O r d e r S y s t e m 50 4 . 1 Sys t em O u t p u t i n Response t o a T e s t S i g n a l 55 T a b l e 2 . 1 GGP A l g o r i t h m R e s u l t s f o r P ID C o n t r o l o f a 2nd O r d e r S y s t e m 23 3 . 1 C o m p a r i s o n o f S p l i n e A p p r o x i m a t i o n t o A n a l y t i c F u n c t i o n 48 3 . 2 P a r a m e t e r E s t i m a t e s o f a 2nd O r d e r Sys t em 48 3 .3 D e l a y Time E s t i m a t i o n 49 4 . 1 Phase Tangen t V a l u e s D e t e r m i n e d f rom T e s t I n p u t 58 4 . 2 D e t e r m i n i n g Phase T a n g e n t s by A v e r a g i n g N o i s y D a t a 59 4 . 3 P a r a m e t e r E s t i m a t i o n s 60 5 . 1 P e r f o r m a n c e E s t i m a t e s 65 5 . 2 Phase T a n g e n t s D e t e r m i n e d w i t h t h e TMS 9900 69 ACKNOWLEDGEMENTS Many p e o p l e and e v e n t s i n t h e Depa r tmen t have been i n v a l u a b l e f o r t h e c o m p l e t i o n o f t h i s w o r k . I n p a r t i c u l a r , t h e a u t h o r a c k n o w l e d g e s t h e f o l l o w i n g : D r . E . V . Bohn f o r e x p e r t s u p e r v i s i o n and i n t r o d u c t i o n t o t h e c o n c e p t s o f GGP, S p l i n e C u r v e f i t t i n g , and WFPI w i t h o u t w h i c h t h e r e w o u l d o f been no b e g i n n i n g . D r . M . I t o and D r . P . L a w r e n c e f o r e x p r e s s i n g i n t e r e s t and h e l p i n t h e i m p l e m e n t a t i o n a s p e c t s . I . S t e w a r t f o r much a p p r e c i a t e d h e l p i n u s i n g t h e TMS 9 9 0 0 . V . Wong f o r i n s t r u c t i o n and h e l p i n u s i n g t h e T e k t r o n i x ^ P r o c e s s o r s u p p o r t s y s t e m . 1 1. INTRODUCTION - ADAPTIVE CONTROL C o n t r o l 1 1 To e x e r c i s e r e s t r a i n t o f d i r e c t i o n upon t h e f r e e a c t i o n o f ; t o d o m i n a t e , c o m m a n d . . . " A d a p t " F i t , a d j u s t , (a t h i n g t o a n o t h e r ) ; make s u i t a b l e ( t o o r f o r a p u r p o s e ) ; m o d i f y , a l t e r . ~ i v e . Adap t o n e s e l f t o c o n d i t i o n s . . . " The O x f o r d D i c t i o n a r y A d a p t i v e C o n t r o l Sys tems a r e d e v i c e s t h a t a t t a i n a d e f i n e d , u s u a l l y o p t i m a l , s e t o f s y s t e m s t a t e s i n an unknown a n d / o r c h a n g i n g e n v i r o n m e n t . T h e r e a r e many c o m p l e x a d a p t i v e schemes . Some o f t h e more s o p h i s t i c a t e d o f t h e s e a l l o w t h e s t r u c t u r e s o f t h e c o n t r o l s y s t e m t o c h a n g e . These a b s t r a c t t h e o r e t i c a l methods a r e g e n e r a l l y t o o c o m p l i c a t e d t o be w i d e l y u sed i n a p p l i c a t i o n s . On t h e o t h e r h a n d , s a t i s f a c t o r y c o n t r o l has h i s t o r i c a l l y been e f f e c t e d w i t h s i m p l e , i n s e n s i t i v e c o n t r o l l e r s s u c h as P ID c o n t r o l l e r s and l e a d - l a g ne twork c o m p e n s a t o r s . T a k i n g a d v a n t a g e o f t h i s e x p e r i e n c e , t h e c o n t r o l l e r s t h e m s e l v e s can be r e s t r i c t e d t o t h e s e f o r m s , b u t w i t h t h e i r c o n t r o l p a r a m e t e r s a d a p t i v e l y c h a n g e d . Such a h y b r i d a p p r o a c h c a n be a d a p t i v e i n t h e s e n s e t h a t i t i s s e l f t u n i n g . I f a p l a n t s y s t e m , i . ' e . a p l a n t t o be c o n t r o l l e d , i s unknown, an a d a p t i v e c o n t r o l l e r w i l l i d e n t i f y i t a n d , b a s e d on t h i s a c q u i r e d k n o w l e d g e , s e t t h e c o n t r o l p a r a m e t e r s to meet some s p e c i f i e d op t imum. One s u c h scheme i s shown i n F i g u r e 1 . 1 . Many i d e n t i f i c a t i o n and o p t i m i z a t i o n a l g o r i t h m s e x i s t w i t h v a r y i n g d e g r e e s o f c o m p l e x i t y . I t i s d e s i r a b l e t o have s i m p l e a l g o r i t h m s , s u c h t h a t t h e p r o g r a m memory r e q u i r e m e n t i s s m a l l enough t o f i t i n a m i c r o -p r o c e s s o r and s u c h t h a t t he e x e c u t i o n t i m e i s s h o r t enough t o a l l o w a 2 Open Loop T e s t (Squa re Wave I n p u t ) ( A c q u i r e D a t a ) P a r a m e t e r I d e n t i f i c a t i o n ( U s i n g W a l s h F u n c t i o n s [WFPI.]) I C a l c u l a t e C o n t r o l S e t t i n g s ( O p t i m i z a t i o n U s i n g G e o m e t r i c P rog ramming [GGP]) C l o s e d Loop C o n t r o l (PID) I Measure P e r f o r m a n c e ( I S E ) Compare W i t h C a l c u l a t e d P e r f o r m a n c e ( I S E Based On GGP) F i g . 1.1 Use o f A d a p t i v e A l g o r i t h m s i n a C o n t r o l l e r (One Example ) 3 p r o g r a m t o r u n i n r e a l t i m e . T h i s t h e s i s c o n c e r n s i t s e l f w i t h t h e d e v e l o p m e n t o f i d e n t i f i c a t i o n and o p t i m i z a t i o n a l g o r i t h m s t h a t a r e s u f f i c i e n t l y s i m p l e t o meet t h e above o b j e c t i v e s . One o f t h e p a r a m e t e r e s t i m a t i o n schemes i n v o l v e s c o r r e l a t i o n o f a s y s t e m o u t p u t w i t h W a l s h f u n c t i o n s . A n o t h e r scheme t o be s t u d i e d i s a method u s i n g c u b i c s p l i n e s . Once t h e p a r a m e t e r s a r e k n o w n , a t u n i n g ( o p t i m i z a t i o n ) scheme b a s e d on G e o m e t r i c P rog ramming can be u s e d . The a c t u a l c o n t r o l l e r i s c o n v e n t i o n a l , s u c h as P ID o r l e a d - l a g n e t w o r k c o m p e n s a t i o n . The f e a s i b i l i t y o f i m -p l e m e n t i n g t h e a l g o r i t h m s on a m i c r o p r o c e s s o r s u c h as t h e TMS 9900 w i l l be i n v e s t i g a t e d . A l e a d - l a g n e t w o r k c o m p e n s a t o r and p a r t o f a W a l s h F u n c t i o n P a r a m e t e r I d e n t i f i c a t i o n (WFPI) a l g o r i t h m f o r t h e m i c r o p r o c e s s o r w i l l be i m p l e m e n t e d . 4 2. OPTIMIZATION USING GENERALIZED GEOMETRIC PROGRAMMING (GGP) 2.1 Introduction To GGP For those who are not f a m i l i a r with the technique of GGP, an ex-ce l l e n t introduction can be found i n reference [17]. Many recent developments can be found i n reference [6]. GGP i s used to solve a clas s of problems i n which signomials describe the cost function and the constraints. In general, using the Kuhn Tucker conditions to solve t h i s class of problems would be very d i f f i c u l t since i t involves solving nonlinear equations. GGP transforms th i s problem into that of solving a system of l i n e a r equations i n dual space. Signomials have the following general form, m o . . for i - i 0 C,- > 0, s. = ±1 1 x As w i l l be shown l a t e r , the optimization problem for both PID control and lead-lag network compensation w i l l involve a 2 term cost and a 2 term constriant with 3 independent v a r i a b l e s . That i s , P a l l a12 aj.3 a 2 i a 2 3 g 0 = s^X.^ X 2 X 3 + s_&2^\ x2 x 3 ( 2- 2 A) P a 4 l a q aoo a a. g / = s 3 C 3 X 1 3 1 X 2 3 2 X 3 3 3 + SltC^X_ klX2 4 2 X 3 (2.2B) where the superscript P designates primal function as opposed to the dual ( i . e . transformed) function. These equations can now be transformed to a dual space i n the form, a l l a12 a l 3 \ S l 6 i / & 2 1 * 2 2 & 2 3 \ s 9 6 o CiXi X 2 U X 3 1 \ 1 1 /C 2Xi X 2 X 3 \. 2 2 SO = SO = 1 : ) (2-3A) S 1 I \ 6 2 *31 a 3 2 a 3 3 \ / a 3 1 a i t 2 a 4 3 c 3 X l x 2 x 3 s 3 G i c a r x 2 - x 3 \ S ^ g ~ ~ g l D = : ' ( 2 - 3 B ) 5 '1 &1 where the superscript D designates dual function. The dual variables <5 and K. a, i n ( 2 . 3 ) are to be evaluated at a point of condensation, x, such that rC equations ( 2 . 3 A , 2 . 3 B ) are l i n e a r approximations to G Q ( Z ) and G^XZ) where z= In X. The dual variables are defined by — ^ x l — ^ i 2 — ^ i 3 C.Xj X 2 X 3 6. = — = i = 1 , 2 ( 2 . 4 A ) go 00 - a i l - a i 2 - a i 3 L..a]^ a 2 a 3 .. CT. = = i = 3 , 4 ( 2 . 4 B ) gi(X) Often, the o r i g i n a l primary problem i s not i n the signomial form of equations ( 2 . 2 A , 2 . 2 B ) . In such cases i t i s necessary to condense the functions into a convenient form such as equations ( 2 . . 2 A , 2 . 2 B ) . i t should be noted that equations ( 2 . 2 A , 2 . 2 B ) are only one convenient form for the s p e c i f i c case of optimizing 3 variables with one constraint. Condensation i s the approximation of a signomial function into a po s i t i v e monomial function. D e t a i l s and theorems r e l a t i n g to condensation can be found i n references [ 1 2 ] and [ 7 ] . Condensation r e s u l t s i n the function and d e r i v a t i v e values being equal at the point of condensation. I t i s another form of approximation, analogous to expanding a nonlinear function at a point by a Taylor seri e s expansion. The primary problem i n z space i s to solve G 0 P + AGi P = 0 ( 2 . 5 A ) Jx x Gi ± 0 ( 2 . 5 B ) where X i s the Lagrange m u l t i p l i e r i n z space,and :G=£n g. Since the log function i s concave,i.e. g^ and Zn g^ have the same set of maximizing points then one can optimize the dual problem by solving g x ° = 0 ( 2 . 6 A ) where g D = g 0 D g ^ ( 2 . 6 B ) Taking the d e r i v a t i v e of g^ and s e t t i n g i t to zero, D af" = ( S l a i i 6 l + S 2 a 2 i 6 2 + S 3 a 3 i a ^ + S 1 + a 4 i a 2 ^ ) f : = ° ( 2 ' 7 ) X X i = 1 , 2 , 3 For x^, g^O, the following equations are to be solved, s l a l l ^ l "** S2a2i!52 + s3 a3lAo~l + s^a^Ac^ = 0 ( 2 . 8 A ) s l a 1 2 ^ 1 s2a22'->2 S3a32^-CT1 ~*~ s^ai^Ao^ = 0 ( 2 . 8 B ) s l a 1 3 ^ 1 s2 a23^2 s3 a33^°l s^a^Ao^ = 0 ( 2 . 8 C ) and to s a t i s f y the orthogonality conditions, ai&i + s 2 6 2 = 1 ( 2 . 9 A ) s3o1 + shak = 1 (2 .9B) This gives 5 l i n e a r equations with 5 unknowns, 6^, 62, Oj_, 02 and This condition of equal number of unknowns and equations i s c a l l e d a zero 7 d e g r e e o f d i f f i c u l t y c o n d i t i o n i n t h e GGP l i t e r a t u r e . I n g e n e r a l , i t i s p o s s i b l e t o have more unknowns , h e n c e a h i g h e r d e g r e e o f d i f f i c u l t y . T h i s w o u l d r e q u i r e u s i n g more c o m p l e x l i n e a r p rog ramming t e c h n i q u e s t o f i n d a maximum. The opt imum p r i m a r y v a r i a b l e s c a n be found by a r e v e r s e t r a n s f o r m a -t i o n m a k i n g use o f e q u a t i o n s ( 2 . 4 A , 2 . 4 B ) . I n f l o w c h a r t fo rm t h e g e n e r a l s t a t e g y f o r o p t i m i z a t i o n i s t h e f o l l o w i n g : x ( 0 ) y C o n d e n s a t i o n i . e . F i n d C n - 1 s , s . ' s and a,- ., ' s S o l v e D u a l P r o b l e m - i . e . F i n d S ^ ' s , a ^ ' s and A-^ 's x ( i + l ) S o l u t i o n i f g P = g D T h i s g e n e r a l s t r a t e g y w i l l now be u s e d t o f i n d a s u i t a b l e a l g o r i t h m f o r t u n i n g a c o n t r o l l e r g i v e n t h e open l o o p p a r a m e t e r s o f a p l a n t s y s t e m . 2 . 2 C o n d e n s a t i o n o f P I D C o n t r o l P r o b l e m The p r o b l e m condensed h e r e i s t h a t o f d e t e r m i n i n g t h e c o n t r o l l e r p a r a m e t e r s t o g i v e opt imum r e s p o n s e . I n t h i s c a s e , t h e open l o o p ' p l a n t ' i s ( o r i s m o d e l l e d a s ) a s e c o n d o r d e r s y s t e m w i t h a t r a n s f e r f u n c t i o n o f 2 to G... ( s ) = — - ( 2 . 1 0 ) P s 2 + 2 ? co s+o) 2 n n n S i n c e t h e P I D c o n t r o l l e r i s commonly u sed i n i n d u s t r y and i t has w e l l known and s t a b l e c h a r a c t e r i s t i c s , i t was t h e t y p e o f c o n t r o l l e r c h o s e n . As i s w e l l known , t h e t r a n s f e r f u n c t i o n i s [ 1 1 , 2 0 ] G c ( s ) = K c (1 + + T d s ) ( 2 . 1 1 ) A common c o n t r o l p r o b l e m i s t h e s e r v o p r o b l e m i n w h i c h t h e o u t p u t t r a c k s changes i n t h e i n p u t , opt imum c o n t r o l w o u l d t h u s m i n i m i z e d e v i a t i o n o f t h e o u t p u t f rom t h e s e t p o i n t . H e n c e , a p e r f o r m a n c e c r i t e r i o n o f minimum s q u a r e e r r o r t o a s t e p i n p u t i s c h o s e n . I n o r d e r t o s i m p l i f y t h e a l g e b r a , v a r i o u s d e f i n i t i o n s t o be u sed i n t h e f u r t h e r m a t h e m a t i c a l d e v e l o p m e n t s , a r e i n t r o d u c e d now. These a r e : a a = 2? CJ ( 2 . 1 2 A ) hi = a i t ( 2 . 1 3 A ) 1 n n x s a 2 = o> n 2 ( 2 . 1 2 B ) b 2 = a 2 t s 2 ( 2 . 1 3 B ) a 3 = y 'ai 2 ( 2 . 1 2 C ) n- n a1 = a 2 + a 3 K c ( 2 . 1 4 A ) a 2 = a1 + a 3 K c T d ( 2 . 1 4 B ) a 3 K c a 3 = -Y~ ( 2 . 1 4 C ) i X l = a2ts ( 2 . 1 5 A ) %2 = « l t s 2 ( 2 . 1 5 B ) X ' 3 = a 3 t s 3 ( 2 . 1 5 C ) 9 b 3 = b_2 - 2 b 2 ( 2 . 1 6 A ) b 2 bi+ = hi + - j (2 .16B) ; bi b 2 b 5 = 1 + — + - g ( 2 . 1 6 C ) 1 b l be = J + - g ( 2 . 1 6 D ) t g i s a t i m e s c a l i n g f a c t o r t o s e t a t i m e c o n s t r a i n t and t o keep t h e v a r i a b l e s r e a s o n a b l e , n u m e r i c a l l y . The t e c h n i q u e o f u s i n g GGP t o s o l v e t h i s c o n t r o l p r o b l e m was i n v e s t i g a t e d by Bonn [12] and C a r v e r [ 1 4 ] , e a c h o f them h a n d l i n g a t i m e c o n -s t r a i n t d i f f e r e n t l y . M o s t o f t h e d e f i n i t i o n s u s e d h e r e a r e t h e same e x c e p t t h a t C a r v e r d i d n ' t use t i m e s c a l i n g f o r t h e p r i m a l v a r i a b l e s . The c l o s e d l o o p e r r o r t r a n s f e r f u n c t i o n i s g i v e n by s 3 + a i s 2 + a 2 s | = ; • ( 2 . 1 7 ) s 3 + d 2 s 2 + a i s + c t 3 By use o f t h e f r e q u e n c y t r a n s l a t i o n p=st , ( 2 . 1 7 ) c a n be r e w r i t t e n as P 3 + b i P 2 + b 2 P | = ( 2 . 1 8 ) p 3 + x 1 p 2 + x 2 p + x 3 From ( 2 . 1 8 ) , some r a t i o n a l e f o r c h o o s i n g t h e p r e v i o u s d e f i n i t i o n s can be s e e n . The b ' s and X ' s a r e d i m e n s i o n l e s s q u a n t i t i e s . T h e X ' s a r e t h e c o e f f i c i e n t s o f t h e c h a r a c t e r i s t i c e q u a t i o n o f t h e t r a n s f e r f u n c t i o n . The b ' s a r e r e l a t e d t o t h e z e r o e s . A p p l y i n g t h e R o u t h H u r w i t z c r i t e r i o n t o t h e c h a r a c t e r i s t i c e q u a t i o n o f ( 2 . 1 8 ) , i t c a n be s e e n t h a t t h e s t a b i l i t y r e q u i r e m e n t ( n e g a t i v e r o o t s ) i s t h a t x 3 < 1 ( 2 . 1 9 ) X l x 2 The i n t e g r a l s q u a r e e r r o r c a n be found i n t h e f r e q u e n c y domain by u s i n g P a r s e v a l ' s t heo rem [26] t 0 0 I = e 2 ( t ) d t = - ± -0 2TTJ r J ° ° E ( s ) E ( - s ) d s ( 2 . 2 0 ) D e f i n e t h e c o s t t o be go = -_- <2-21) s The s u p e r s c r i p t P d e n o t e s a p r i m a l f u n c t i o n . T h i s i s t h e f u n c t i o n t o be m i n i m i z e d u s i n g GGP. T h i s d e f i n i t i o n p e r m i t s a c o n v e n i e n t d i m e n s i o n l e s s f o r m f o r gg and g i v e s a t i m e s c a l e d e s i g n p a r a m e t e r t g . The e x p r e s s i o n f o r E ( s ) when R= ~ (a s t e p i n p u t ) c a n be d e t e r m i n e d by u s i n g ( 2 . 1 7 ) . Then s u b s t i t u t i n g E ( s ) i n t o ( 2 . 2 0 ) and u s i n g ( 2 . 2 1 ) y i e l d s t h e c o s t f u n c t i o n 2 •p i b 3 b 2 Xo _ 1 g 0 = [ ^ + + T T ~ 3 t 1 _ T T ] (2-22) Xi • X i X 2 X 2X 3 X i X 2 S i n c e a l l t h e v a r i a b l e s a r e p o s i t i v e , i t c a n be s e e n t h a t i n o r d e r P t o have gg > 0 , i t i s n e c e s s a r y t o have e q u a t i o n ( 2 . 1 9 ) s a t i s f i e d . p I f an a t t e m p t t o f i n d t h e minimum o f gg i s made, a p h y s i c a l l y p u n r e a l i z a b l e s o l u t i o n o f gg = 0 c a n be f o u n d , w h i c h r e q u i r e s some c o n t r o l l e r p a r a m e t e r s t o have i n f i n i t e v a l u e s . The l i n e a r mode l o f t h e p l a n t s y s t e m w o u l d n o t t h e n be a p p l i c a b l e . One way o f c i r c u m v e n t i n g t h i s p r o b l e m i s t o c o n s t r a i n t h e o u t p u t t o be some v a l u e C s , a t some t i m e t s d u r i n g t h e i n i t i a l t r a n s i e n t p e r i o d . The o u t p u t i s c ( t ) = 1 - e ( t ) , e ( t ) = X " 1 E ( s ) ( 2 . 2 3 ) where E { s ) c a n be found by d i v i d i n g t h e d e n o m i n a t o r i n t o t h e n u m e r a t o r o f ( 2 . 1 7 ) f o r R= . T h e n , u s i n g t h e d e f i n i t i o n s i n ( 2 . 1 5 , 2 . 1 6 ) y i e l d s ( - b 2+X 2+biX 1-X 1 2) C ( t s ) = -b1 + X l + : ( ^ X i X ^ b i X ^ + b i X ^ b ^ i + X x 3 ) + ' ( 2 . 2 4 ) 6 ( 2 X 3X ! - b 1X 3 - b 2X 2 + 2 b 1 X 1 X 2 + X 2 2 - 3 X 2 X 1 2 - b iXx 3+X x ) + : + . .. 24 The t u n i n g p r o b l e m c a n now be s t a t e d as f o l l o w s : F i n d X1, X 2 , X 3 t o m i n i m i z e g Q s u b j e c t t o c ( t s ) = C s . N o t e t h a t t h e c o n -t r o l l e r p a r a m e t e r s K c , T-^, T d c a n be found f rom X - ^ , X 2 , X 3 . A c o n s t r a i n t c a n now be d e f i n e d as P C ( . t s ) ' 0 cs ( 2 . 2 5 ) A g e n e r a l t e c h n i q u e f o r f i n d i n g t h e opt imum i s by t r y i n g t o s a t i s f y t h e Kuhn T u c k e r n e c e s s a r y c o n d i t i o n s . E v e n i f o n l y t h e f i r s t few te rms o f p g l a r e c o n s i d e r e d , t h e n o n l i n e a r s y s t e m o f e q u a t i o n s w o u l d be e x t r e m e l y d i f f i c u l t t o s o l v e on a m i c r o p r o c e s s o r . T h i s i s why a t e c h n i q u e s u c h as GGP i s a t t r a c t i v e . W i t h t h e p r i m a l p r o b l e m d e f i n e d , i t i s p o s s i b l e t o p r o c e e d w i t h t h e c o n d e n s a t i o n . I t i s d e s i r e d t o have t h e c o s t f u n c t i o n condensed i n t o the f o r m o f ( 2 . 2 A ) . The f u n c t i o n t o be condensed i s d e s c r i b e d by ( 2 . 2 2 ) . S e t where u i = 1 -x 2 xTx ' i i u i 1 A 2 1_ U l u i i - U 1 2 a m ' i i -6 12 >12 12 ( 2 . 2 6 ) X 5 6 1 2- u i 2 X 1 X 2 u i The b a r o v e r t h e u r e f e r s t o t h e condensed v e r s i o n o f t h e o r i g i n a l f u n c t i o n . The condensed f u n c t i o n a p p r o x i m a t e s t h e o r i g i n a l f u n c t i o n as d e -s c r i b e d i n [ 1 2 ] . I t i s a t a n g e n t h y p e r p l a n e t o t h e o r i g i n a l f u n c t i o n i n z=£nX s p a c e . N o t e t h a t c o n d e n s a t i o n i s p e r f o r m e d i n t h e manner d e s c r i b e d by Bohn [ 1 2 ] . - b 1 1 b i ? b i q U l = C n X j X 1 X 2 X 3 ( 2 . 2 7 ) where Cn '11 ' l l 6 1 2 5 12 b n = b 1 2 = 6 1 2, b 1 3 6 1 2 C o n t i n u i n g on w i t h t h e c o n d e n s a t i o n , s e t u 2 = 1 + x 2 Then s i m i l a r l y o b t a i n b 2 i b 2 2 b 2 3  u 2 = c 2 1 x l x 2 x 3 ( 2 . 2 8 ) ( 2 . 2 9 ) where _ I 1 C 2 1 =| — 6 2 i 6 2 2 21 '22 b 2 1 - b 2 3 - 0 , b 2 2 — 6 2 2 1 b 3 &21= » ^ 2 2 =  ^ u 2 " x 2 u 2 w i t h t h e s e two p a r t s o f t h e f u n c t i o n c o n d e n s e d , t h e n 2 where The condensed c o s t f u n c t i o n f i n a l l y i s a l 1 a l ? a 13 A 9 1 A 9 9 a91 g 0 = C 1 X 1 L iX 2 X% i d + C 2 X a 2 i X 2 2 2 X 3 ( 2 . 3 1 ) c l = TJ^ Y ' a i l = " 1 _ a 1 3 » a 1 2 = b 2 2 _ b 1 2 > a 1 3 = " b 1 3 (2.32A) b 2 2 C 2 = 7;— , a 2 1 = - b n , a 2 1 = - l - b 1 2 , a 2 3 = - l - b i 3 ( 2 . 3 2 B ) M l P a r t s o f ( 2 . 3 2 A ) and ( 2 . 3 2 B ) c a n be r e w r i t t e n u s i n g ( 2 . 2 7 ) and (2.29) a l l = - l - < S l 2 a 2 1 = " 5 1 2 a^2 = - 6 2 2 — ^ 1 2 a 2 2 = - 1 - ^ 1 2 ( 2 . 3 3 ) a 1 3 = 6 1 2 a 2 3 = - 1 + 6 ! 2 The n e x t s t e p i s t o condense t h e c o n s t r a i n t i n t o t h e f o r m o f ( 2 . 2 B ) U s i n g t h e f i r s t 4 t e rms o f ( 2 . 2 4 ) and ( 2 . 2 5 ) and t h e d e f i n i t i o n s o f ( 2 . 1 6 ) , t h e c o n s t r a i n t t h e n becomes P I n x l 3 X l X 2 Si = T j ^ ( - b t t + b 5 X 1 - b 6 X 1 2 + — + b f e X 2 - - 3 — ) ( 2 . 3 4 ) X 3 N o t e t h a t t h e — t e r m was d r o p p e d . T h i s i s b e c a u s e i t was l a t e r found o u t t o be i n s i g n i f i c a n t . A l s o , i t i s known t h a t t he i n t e g r a l a c t i o n ( s p e c i f i e d by X3) has l i t t l e e f f e c t on t h e i n i t i a l p o r t i o n o f t h e t r a n s i e n t r e s p o n s e . C o n d e n s a t i o n o f t h e c o n s t r a i n t y i e l d s c ( t ) = u 3 + uk ( 2 . 3 5 ) where 2 X l u 3 = - b i t + b 5 X 1 - b 6 X . 1 - + — = - U 3 2 + U 3 2 - U 3 3 + U 3 4 ui+ = b 6 X 2 - -j X ! X 2 = U 4 1 - U 4 2 I t f o l l o w s t h a t a 3 1 a U l g = C3Xi .-hC^Xi X 2 <_ 1 ( 2 . 3 6 ) where , . 531 . , . 6qo , , <$oq, , 6 3 4 1 / 631 C s \ b 4 / \ 5 32 I ( ^ — ) ( 2 - 3 7 A ) \ b 6 / \ 6 6 3i+ 1 / b 6 6 42 C l + = C s"\^7 ' - ( 3 6 L f 2 ) ( 2 . 3 7 B ) a 31 = 532 ~ 2 6 3 3 + 3 6 3 4 a 3 2 = 0 = a 3 3 a^i - - 6 i + 2 ( 2 . 3 8 ) a ,+ 2 = ^41 ~ 4^-2 = i These e q u a t i o n s a r e t r u e o n l y f o r b ' s > 0 . E q u a t i o n ( 2 . 3 6 ) i s t he c o n s t r a i n t t h a t w i l l be used t o s o l v e t h e d u a l p r o b l e m . Bohn [12] has i n d e p e n d e n t l y shown t h a t a c o n s t r a i n t o f t h e f o r m g 1 = + Ci+Xi,., g i v e s an a c c u r a t e r e p r e s e n t a t i o n o f t h e t i m e domain c o n s t r a i n t c ( t s ) = C s . T h i s r e s u l t s i n some o b v i o u s c o m p u t a t i o n a l s i m p l i f i c a t i o n s . C 3 and C 4 a r e f o u n d by i t e r a t i v e l y s o l v i n g an e q u a t i o n t h a t i s an a p p r o x i m a t i o n o f t h e t r a n s i e n t r e s p o n s e . As w i l l be shown l a t e r , t h e opt imum c a n be found w i t h o u t e x p l i c i t l y u s i n g t h e f o r m o f ( 2 . 3 6 ) . Now t h a t t he p r o b l e m i s p u t i n t o t h e a p p r o p r i a t e condensed f o r m , t h e s t e p o f s o l v i n g t h e d u a l p r o b l e m c a n be p e r f o r m e d . 2 . 3 O p t i m i z a t i o n o f t h e D u a l P r o b l e m - P I D C o n t r o l S i n c e t h e c o s t and c o n s t r a i n t a r e now i n t h e f o r m o f ( 2 . 2 A ) , ( 2 . 2 B ) , i t i s j u s t n e c e s s a r y t o s o l v e t h e l i n e a r e q u a t i o n s o f ( 2 . 8 ) and ( 2 . 9 ) . S o l v i n g t h e 5 e q u a t i o n s , one o b t a i n s Y Y 6 l = f g 2 = ( 2 . 3 9 ) 1 + Y 1 + Y where A Y -a13 and X a 2 = - ( a ^ ^ l + a22^2) ( 2 . 4 0 A ) Xa-y = - l U n S i + a 2 1 6 2 + a 4 1 X a 2 ) ( 2 . 4 0 B ) a31 U s i n g e q u a t i o n s ( 2 . 3 3 ) , t h e d u a l v a r i a b l e s c a n be s i m p l i f i e d t o ( X a 2 ) = 2<512 + 6 2 2 - 6 i 2 6 2 2 ( 2 . 4 1 ) a31 = 6 3 2 - 2 6 3 3 + 3 6 3 1 + ( 2 . 4 2 ) 1 / 6 ^ A = + (Xa2) 1 + ) ( 2 . 4 3 ) a31 \ a31 Then f o r i t e r a t i o n p u r p o s e s (Xo2) az = ( 2 . 4 4 ) X a1 = 1 - a 2 ( 2 . 4 5 ) K n o w i n g t h e d u a l v a r i a b l e s , i t i s p o s s i b l e t o f i n d t h e new p r i m a r y v a r i a b l e s . A t an o p t i m u m , i n d u a l s p a c e , t h e c o n s t r a i n t i s s a t i s f i e d b y t h e e q u a l i t y , hence g ^ D = 1. T h e r e f o r e (2.46) X 3 c an be found by t a k i n g t h e d e r i v a t i v e o f t h e p r i m a l c o s t and s e t t i n g i t e q u a l t o z e r o s i n c e t h e c o n s t r a i n t i s i n d e p e n d e n t o f X 3 . Hence - b 2 x l X 3 = ( b 2 2 - / b 2 2 + X 2 2 + b 3 X 2 ) ( 2 . 4 8 ) X 2 + b 3 These v a l u e s o f X. w o u l d t h e n become t h e c o n d e n s a t i o n p o i n t f o r t h e n e x t i t e r a t i o n . The opt imum i s f o u n d when D P 80 = §0 D p ( 2 . 4 9 ) g l = g l = 1 I t i s d e s i r e d t h a t any a l g o r i t h m f o r c a l c u l a t i n g c o n t r o l p a r a m e t e r s be as s i m p l e as p o s s i b l e , b u t s i m p l i f i c a t i o n o f t e n o c c u r s a t t h e expense o f g e n e r a l i t y . I f one i s a t t e m p t i n g t o c o n t r o l a s e c o n d o r d e r p l a n t , t h e n t h e f o l l o w i n g s i m p l i f i c a t i o n s can be p e r f o r m e d . From ( 2 . 3 9 ) , ( 2 . 4 1 ) , ( 2 . 4 2 ) and ( 2 . 4 3 ) , i t can be seen t h a t n o t a l l o f t h e <5's a r e r e q u i r e d t o be known. By u s i n g t h e d e f i n i t i o n s o f &12 and 6 2 2 , one o b t a i n s 6 2 2 = _ ( 2 . 5 0 ) X 2 + b 3 and X 3 6 l 2 = ( 2 . 5 1 ) x l x 2 _ X 3 Then ( 2 . 4 1 ) can be r e w r i t t e n as 2 X 2 X 3 + b 3 X ^ X 2 ( X a 2 ) = ( 2 . 5 2 ) ( X : X 2 - X 3 ) ( X 2 + b 3 ) S i m i l a r l y by u s i n g t h e d e f i n i t i o n s o f ^ 3 j ' s b 5 X ! - Z b g X i 2 + X ! 2 / 2 a31 ( 2 . 5 3 ) -bk + b ^ - b g X j 2 + X j 3 / 6 and 6^2 ( 2 . 5 4 ) 3bgX2 — X1X2 I f t h i s t y p e o f o p t i m i z a t i o n a l g o r i t h m were t o be done by a uP c o n t r o l l e r , t h e n o t h e r s i m p l i f i c a t i o n s s u c h as e l i m i n a t i n g e x p o n e n t i a l c a l c u l a t i o n s w o u l d be d e s i r a b l e . I n g e n e r a l , c a l c u l a t i o n s o f t h e f o r m y X a r e q u i t e l o n g . I n a yP c o n t r o l l e r , t h e s e t y p e s o f c a l c u l a t i o n s c o u l d be speeded up w i t h s p e c i a l h a r d w a r e o p t i o n s . I f t h e y were t o be done w i t h s o f t w a r e o n l y ( i n c l u d i n g s o f t w a r e m u l t i p l y & d i v i d e ) , t h e y c o u l d r e q u i r e 0 . 5 s econds f o r e a c h c a l c u l a t i o n . j T h i s i s a good i n c e n t i v e t o e l i m i n a t e e x p o n e n t i a l c a l c u l a t i o n s . These c a l c u l a t i o n s o c c u r d u r i n g t h e c a l c u l a t i o n o f d u a l c o s t s and c o n s t a n t s . The p u r p o s e o f t h e a l g o r i t h m i s t o d e t e r m i n e t h e c o n t r o l l e r p a r a m e t e r s . The c a l c u l a t i o n o f c o s t i s o n l y r e q u i r e d i n o r d e r to d e t e r m i n e i f t h e opt imum has b e e n f o u n d . V a r i o u s o t h e r methods c o u l d be u s e d t o d e t e c t an op t imum. (k+1) (k) One s u c h method i s c h e c k i n g i f X - X = 0 . A l s o , one o f t h e Kuhn T u c k e r c o n d i t i o n s i s e a s y to use as a c h e c k f o r t h e op t imum p o i n t . - 1 ( 2 . 5 5 ) Then a c o n d i t i o n f o r an op t imum i s P go = ( 2 . 5 6 ) The r e m a i n i n g e x p o n e n t i a l c a l c u l a t i o n s o c c u r d u r i n g t h e u p d a t i n g o f t h e p r i m a l v a r i a b l e s . The c o n s t r a i n t c o n s t a n t s can be r e w r i t t e n as u 3 - » 3 1 • C 3 = — X X ( 2 . 5 7 ) C s I V C f ^ l / 3 b 6 - X x  C l f = = — ] X l ( 2 . 5 8 ) X 2 C s \ 3 C s S u b s t i t u t i n g ( 2 . 5 7 ) i n t o ( 2 . 4 6 ) , X j c a n - t h e n be u p d a t e d by X l < ^ ) . ( l i c s ) a 3 1 X l « (2.59) t h The o t h e r s y m b o l s a r e f o r t h e i r k i t e r a t i o n v a l u e s . S i n c e g i = l a t an opt imum c . x r ^ ' V ^ = 1 ( 2 . 6 0 ) S u b s t i t u t i n g ( 2 . 5 8 ) i n t o ( 2 . 6 0 ) and by a s s u m i n g X ^ * 1 ^ Xl t h e n ' 3 b 6 - X j X 2 = a2 ( 2 . 6 1 ) 3C s Then f i n a l l y X < k + 1 ) - 3 g 2 C s ( 2 6 j n 3 b 6 - X x A l s o a t an opt imum - = 1 ( 2 . 6 3 ) Hence u 3 U 3 - a 1 C g = 0 ( 2 . 6 4 ) U 3 i s a c u b i c e q u a t i o n o f X ^ o n l y . T h e n , once Oi has been f o u n d , X ^ c o u l d be d e t e r m i n e d b y s o l v i n g a c u b i c e q u a t i o n . U s i n g an i t e r a t i v e t e c h n i q u e f o r s o l v i n g non - l i n e a r e q u a t i o n s ^ i ] » ( 2 . 6 4 ) c a n be s o l v e d . T h u s , i s i t e r a t i v e l y u p d a t e d by t h e f o l l o w i n g , where (k+1) _ ° l ( k ) C g +bh + b 6 X ! ( k ) 2 X l ( k ) : X i ( k + i ) = eCk^Ck+i) + ( 1 _ e ( k ) ) X i ( k ) , (k ) 1 - dXi 3 X X ( 2 . 6 5 ) ( 2 . 6 6 ) ( 2 . 6 7 ) w h i c h i s , (k ) 2 b 5 2 ( b 5 - 2 b 6 X ! ( k ) + X x ( k ) Z ) ( 2 . 6 8 ) (k) I f X i i s c l o s e t o t h e o p t i m u m , t h e n one i t e r a t i o n w i l l s u f f i c e . A r e m a i n i n g p r o b l e m i s how t o s t a r t t h e a l g o r i t h m . A method f o r o b t a i n i n g t h e i n i t i a l c o n d e n s a t i o n p o i n t s w i l l now be shown : 1) F i n d t h e minimum I S E w i t h r e s p e c t t o X j . 3 e z 3e = 2 e — dX_ 3 X X ( 2 . 6 9 ) 2) O b t a i n t h e f i r s t two terms o f t h e e r r o r o u t p u t f rom ( 2 . 2 4 ) t o ge t 3e bl — = 0 = - l + X x 3X n 2 ( 2 . 7 0 ) Hence s e t 2 3) U s i n g t h e f i r s t t e rms o f c ( t ) i n ( 2 . 2 4 ) , X 2 ( 0 ) = 2 ( C s + b l - X l ( 0 ) ) + b 2 - b l X l ( 0 ) 4- X l ( ° ^ ( 2 . 7 1 ) ( 2 . 7 2 ) X 3 ^ can be o b t a i n e d f rom ( 2 . 4 8 ) Now t h e a l g o r i t h m i s r e l a t i v e l y e a s y t o i m p l e m e n t . I t w i l l be shown t o be v a l i d f o r a c e r t a i n r ange o f open l o o p p a r a m e t e r s . M o d i f i c a t i o n s o r g e n e r a l i z a t i o n s c o u l d be u s e d f o r o t h e r r a n g e s . When u s i n g GGP, i t i s n e c e s s a r y t h a t t h e p r i m a l v a r i a b l e s be k e p t p o s i t i v e . N e g a t i v e v a r i a b l e s a l s o i m p l y n e g a t i v e P I D c o n t r o l l e r s e t -t i n g s . C h o o s i n g C g = 0 . 5 and u s i n g ( 2 . 6 2 ) t o e n s u r e t h a t i s p o s i t i v e t h e n 3 b, Xl < 3 b 6 , i e Xl < - + - ( 2 . 7 3 ) 2 2 T h e r e i s an u p p e r l i m i t f o r t b e c a u s e t h e h i g h e r o r d e r t e rms become more s i g n i f i c a n t as t i n c r e a s e s and t h e a p p r o x i m a t i o n s w i l l become l e s s v a l i d . 9e By u s i n g t h e f i r s t few te rms o f e ( t ) and s e t t i n g — = 0 , o b t a i n 3X 2 3 b! Xl * - + - (2.74) 2 2 A v e r a g i n g ( 2 . 7 1 ) and ( 2 . 7 4 ) , 5 + 2b i Xi - (2.75) 4 By s u b s t i t u t i n g ( 2 . 7 5 ) i n t o ( 2 . 7 3 ) , an a p p r o x i m a t e bound on t i s f o u n d t o be 3 t < ( 2 . 7 6 ) 4a! I t i s n e c e s s a r y t h a t , a 2 a r e p o s i t i v e . U s i n g ( 2 . 7 5 ) as an a p -p r o x i m a t i o n f o r X i and s u b s t i t u t i n g i n t o ( 2 . 7 2 ) , i t i s found t h a t 1 + 1 6 b i - 4 b i 2 / b A 2 b 2 < * b i - — ( 2 . 7 7 ) 16 \ 2 / ( 2 . 7 7 ) i n c l u d e s a l l overdamped open l o o p r e s p o n s e s and underdamped r e s p o n s e s w i t h £ > 0 . 6 . I t i s n e c e s s a r y t o i n s u r e t h a t X 3 i s p o s i t i v e . I f b 2 i s assumed t o be s m a l l , t h e n by u s i n g ( 2 . 4 8 ) , X 3 c a n be a p p r o x i m a t e d as X 3 = ' , b 2 X 1 / ( 2 . 7 9 ) X 2 + b 3 Hence r e q u i r e X 2 + b 3 > 0 ( 2 . 8 0 ) I f ( 2 . 7 7 ) i s s a t i s f i e d t h e n ( 2 . 8 0 ) i s a l s o s a t i s f i e d , t h u s i n s u r i n g t h a t X 3 i s p o s i t i v e . T h e r e f o r e i n summary t h e c o n d i t i o n s can be l i s t e d as 3 t < ( 2 . 8 1 A ) 4a^ a1 > 0 , a 2 > 0 ( 2 . 8 1 B ) b 2 < b1 -I —J f o r C g = 0 . 5 ( 2 . 8 1 C ) U s i n g t h e e q u a t i o n s o f ( 2 . 1 4 ) and ( 2 . 1 5 ) , t h e c o n t r o l l e r p a r a m e t e r s a r e found by 1 K = ( X , - b 2 ) ( 2 . 8 2 A ) C 9 a 3 t z  3 s t ( X i - b x ) T, = S d , . ( 2 . 8 2 B ) ( X 2 - b 2 ) t s ( X 2 " b 2 ) T. = z — — — ( 2 . 8 2 C ) I n o r d e r t o d e m o n s t r a t e how r a p i d l y t h e a l g o r i t h m c o n v e r g e s , a n u m e r i c a l example w i l l be g i v e n . Example D a t a : a_ = 0 . 2 5 a 2 = 0 . 0 1 y = 1 C h o o s i n g C = 0 . 5 t = 2 . 5 s s X ( 0 ) = 1 .3125 = 0 .59 X ( 0 ) x 3 = 0 .0624 T a b l e 2 . 1 summar izes t h e n u m e r i c a l r e s u l t s and F i g u r e 2 . 1 shows t h e s t e p r e s p o n s e o f t h e op t imum s y s t e m . As c a n be s e e n f r o m T a b l e 2 . 1 , c o n v e r g e n c e o c c u r s v e r y r a p i d l y . N o t e t h a t t h e i n i t i a l c o n d e n s a t i o n p o i n t s a r e c l o s e t o t h e opt imum and w o u l d y i e l d a s t e p r e s p o n s e s i m i l a r t o t h e o p t i m u m . O t h e r d a t a were t r i e d w i t h s i m i l a r c o n v e r g e n c e r a t e s . Summaries o f t h e a l g o r i t h m s a r e l i s t e d i n A p p e n d i x A . I f t h e open l o o p s y s t e m has a t i m e d e l a y , t h e same a l g o r i t h m can be a p p l i e d a s s u m i n g no t i m e d e l a y . Once X i , X 2 a n d X 3 h ave been f o u n d , t h e c o n t r o l l e r s e t t i n g s may be d e t e r m i n e d by a p a i r o f n o n - l i n e a r e q u a t i o n s . The d e t a i l s o f t h i s method a r e g i v e n i n [ 1 2 ] . GGP Algorithm Results For PID Control Of A 2nd Order System Iteration X l X2 X3 So D go 81 g D 8„ P b2 2 1 1.217 0.710 0.0602 1.306 1.305 1.010 1.327 1..312 1.237 2 1.195 0.746 0.0597 1.309 1.309 1.000 1.310 1.310 1.310 3 1.192 0.753 0.0596 1.310 1.310 1.000 1.310 1.310 1.310 4 1.191 0.754 0.0596 1.310 1.310 1.000 1.310 1.310 1.310 Table 2.1 Outpu t F i g . 2 . 1 S t ep Response f o r O p t i m a l P ID C o n t r o l 2 . 4 S e r v o m o t o r L e a d - L a g N e t w o r k C o m p e n s a t i o n O f t e n , s e r v o m o t o r s y s t e m s a r e c o n t r o l l e d by l e a d - l a g c o m p e n s a t i o n n e t w o r k s . T h e r e a r e many c l a s s i c a l t e c h n i q u e s a v a i l a b l e f o r d e s i g n i n g s u c h s y s t e m s b a s e d on c e r t a i n s p e c i f i c a t i o n s . . . , I t i s a l s o p o s s i b l e [Zb J t o d e s i g n s u c h s y s t e m s u s i n g t h e GGP t e c h n i q u e s d e s c r i b e d i n S e c t i o n 2 . A s e r v o m o t o r i s o f t e n m o d e l l e d as K G ( S ) 2 ( 2 . 8 4 ) P S ( l + T S ) P The p r o b l e m i s t o d e s i g n a c o m p e n s a t i o n n e t w o r k o f t h e f o r m K (1 + a x s ) G ( s ) = - £ ^ — ( 2 . 8 5 ) 1 + X S c The f o l l o w i n g d e f i n i t i o n s a r e made K - K K ( 2 . 8 6 ) P c ( x + x ) t (1 + a x K ) t 2  X i A _ _ c p__s ( 2 . 8 7 A ) , X 2 ^ — ( 2 . 8 7 B ) X X X X c p c p K t 3 t t X 3 ^ — ( 2 . 8 7 C ) , Xh & — ' (2 .87D) , : . a ^ — ( 2 . 8 7 E ) X X X X c p c " P 2 ( I S E ) g 0 ^ ( 2 . 8 8 ) t s From e q u a t i o n s ( 2 . 8 4 ) t o ( 2 . 8 8 ) i t can be f o u n d t h a t , f o r a u n i t s t e p i n p u t , 1 Xl 2aXk a 2 X 4 2 - + + g 0 = X X 2 X X 2 X 2 X 3 ( 2 . 8 9 ) 1 — X 3 / X j X 2 A g a i n , a t i m e c o n s t r a i n t i s n e c e s s a r y . F o r t h e t r a n s i e n t r e s p o n s e , an a p p r o x i m a t i o n can be made. G * G G (2.90) c p G = (2.91) s ( l + T s ) P Then t h e c l o s e d l o o p e r r o r f o r a s t e p i n p u t i s s + 2?«., •E(s) = (2.92) s 2 + 2cws+ a)2 aK 1 where co2 = — , 2£w = — (2.93) T T P P The p a r a m e t e r has v i r t u a l l y no e f f e c t on t h e t r a n s i e n t p o r t i o n o f t h e r e s p o n s e . The i n i t i a l p o r t i o n o f t h e t r a n s i e n t i s d e t e r m i n e d m a i n l y by K a . A t i m e c o n s t r a i n t can be s e t i n t h e f o l l o w i n g manne r : D e f i n e Yi - 2 e w t (2.94) Y 2 - ( w t s ) 2 = (2.95) T P The e r r o r a t t i m e t i s a p p r o x i m a t e d by t a k i n g t h e i n v e r s e L a p l a c e t r a n s f o r m o f (2.92) and u s i n g t h e d e f i n i t i o n s o f (2.94) and (2.95). T h i s y i e l d s -? e ( t ) = e 2 [cos6 + — s i n e ] (2.96A) S 26 / Y O - / Y x V 2 ( 2 . 9 6 B ) The a p p r o x i m a t i o n i s c l o s e t o t h e a c t u a l e r r o r d u r i n g t h e r i s e t i m e o f t h e r e s p o n s e . U s i n g (2.87) and (2.95) , we have Y 2 = X 2 - aXit = X 2 - a X x + a z Now a t i m e c o n s t r a i n t can be s p e c i f i e d . g l = C 3 X ! + chx2 = 1 where - a Y , - a 2 ( 2 . 9 7 ) ( 2 . 9 8 ) ( 2 . 9 9 ) Y 2 - a^ ( 2 . 1 0 0 ) A f t e r s p e c i f y i n g an e ( t g ) , Y 2 c an be f o u n d by s o l v i n g t h e f o l l o w i n g e q u a t i o n . -20 Y , = a2 + e 2 ( t ) / Y 2 - a 2 c o s / Y 2 - a 2 + a s i n / Y 2 - a 5 ( 2 . 1 0 1 ) Y X a a = ( 2 . 1 0 2 ) ( 2 . 1 0 1 ) was s o l v e d f o r v a r i o u s v a l u e s o f a and e ( t ) = 0 . 5 . I t s was found t h a t Y 2 = 1 + a /2 ( 2 . 1 0 3 ) T h i s a p p r o x i m a t i o n was found t o be w i t h i n 2% o f t h e a c t u a l v a l u e o f Y 2 i n t h e r ange o f 1.0 < a < 2 . 0 . H e n c e , s o l v i n g f o r Y 2 c a n be s i m p l i f i e d by u s i n g ( 2 . 1 0 3 ) as a s t a r t i n g p o i n t . I t s h o u l d be n o t e d t h a t f rom ( 2 . 1 0 1 ) , Y 2 must s a t i s f y t h e f o l l o w i n g c o n d i t i o n . ( 2 . 1 0 4 ) A f t e r c o n d e n s a t i o n , t h e c o s t becomes x / c 1 X 1 X 2 X 3 \ 6 l / c 2 X 1 X 2 X 3 \ 6 2 / c 3 X i \ A a i / c 4 X 2 V a 2 8 = S 0 S 1 ( 2 . 1 0 5 ) ; 1 / 6 2 I \ a\ I \ ®2 where d i r e c t u se was made o f t he c o n s t r a i n t ( see ( 2 . 8 7 ) ) Xk = a - X± ( 2 . 1 0 6 ) The p r o c e s s o f c o n d e n s a t i o n and s o l v i n g t h e d u a l p r o b l e m i s done i n a manner s i m i l a r t o t h a t o f P I D c o n t r o l . The a l g o r i t h m i s l i s t e d i n A p p e n d i x A . 3 . T h e r e a r e a few d i f f e r e n c e s , t h a t a r e d i s c u s s e d b e l o w . Once t h e d u a l v a r i a b l e s have been f o u n d , t h e p r i m a l v a r i a b l e s can be e a s i l y c a l c u l a t e d . CT1 X x = — ( 2 . 1 0 7 ) C 3 o 2 X 2 = — ( 2 . 1 0 8 ) X3 c a n be f o u n d by t a k i n g t h e d e r i v a t i v e o f t h e uncondensed f u n c t i o n . T h e r e a r e l i m i t s f o r t h e a l g o r i t h m t o w o r k . A g a i n , t he s t a b i l i t y c r i t e r i a l r e q u i r e s t h a t X 3 < 1 ( 2 . 1 0 9 ) X i X 1 A 2 A n o t h e r s t a b i l i t y c o n d i t i o n c a n be d e r i v e d f rom t h e Kuhn T u c k e r c o n d i t i o n s . These a r e § 0 „ + u 8 l Y = 0 ( 2 . 1 1 0 A ) 8 0 Y + V 8 1 , = 0 ( 2 . 1 1 0 B ) x 2 x 2 g 0 = 0 ( 2 . H O C ) , 8 1 = 1 ( 2 . 1 1 0 D ) X 3 We have - X 2 X 3 g 0 + ( 2 X ] X 3 - 2 a X 3 + 2 a 2 X 1 X l + + a2Xk2) h g 0 = : ( 2 . 1 1 1 ) x l - X l X 3 g o + x 3 g 0 = ( 2 . 1 1 2 ) h *2 ( 2 X 3 - X !X 2 )go + ( X 2 + X x 2 - 2 a X 4 ) g = : ( 2 . 1 1 3 ) X 3 h where h = X ^ X Q , - X 3 2 ( 2 . 1 1 4 ) and g ! = -aCh ( 2 . 1 1 5 ) x l g i = Ck ( 2 . 1 1 6 ) x 2 S o l v i n g t h e f i r s t two Kuhn T u c k e r e q u a t i o n s o f ( 2 . 1 1 0 ) f o r u , y i e l d s g o X l + g 0 v = 0 ( 2 . 1 1 7 ) a X 2 S u b s t i t u t i n g i n ( 2 . 1 1 7 ) by ( 2 . 1 1 1 ) and ( 2 . 1 1 2 ) and by s o l v i n g f o r gg a t t h e o p t i m u m , y i e l d s ^ 2 X X X 3 - 2 a X 3 + 2 a 2 X 1 X i + + a ^ 2 + a X 3 g 0 = ( 2 . 1 1 8 ) X 2 X 3 + a X ! X 3 A s s u m i n g t h a t X 3 > 0 , i m p l i e s a new s t a b i l i t y c o n d i t i o n . X 2 + aXl > 0 ( 2 . 1 1 9 ) U s i n g ( 2 . 9 7 ) w i t h ( 2 . 1 1 9 ) , a c o n d i t i o n f o r Y 2 i s , Y 2 < . a ( 2 X i - a) ( 2 . 1 2 0 ) S i n c e X i > a , t h e n a d e f i n i t e c o n d i t i o n i s Y 2 <_ a 2 ( 2 . 1 2 1 ) Though t h e g e n e r a l c o n d i t i o n i s d e s c r i b e d by ( 2 . 1 2 0 ) , i t i s n o t v e r y u s e f u l s i n c e X^ i s unknown i n i t i a l l y . ( 2 . 1 2 1 ) i s more u s e f u l i n c h o o s i n g a c o n s t r a i n t t h a t i s r e a l i z a b l e . A n o t h e r c o n d i t i o n f o r an opt imum can be found b y s o l v i n g ( 2 . H O C ) f o r g 0 . ^ X 2 + XT 2 - 2aXt t go = ( 2 . 1 2 2 ) x l x 2 _ 2 X 3 T h i s i m p l i e s a n o t h e r s t a b i l i t y c o n d i t i o n . X X X 2 > 2 X 3 ( 2 . 1 2 3 ) Then f r o m ( 2 . 1 0 4 ) and ( 2 . 1 2 3 ) , t h e f o l l o w i n g l i m i t f o r Y 2 i s o b t a i n e d . a 2 - < Y 2 < a 2 ( 2 . 1 2 4 ) 4 T h i s i m p l i e s 1 1 — < K a < — ( 2 . 1 2 5 ) 4x T P P I t s h o u l d be n o t e d t h a t t h e s e l i m i t s a r e u s e f u l f o r c o m p u t a t i o n a l p u r p o s e s . I t i s p o s s i b l e t o e x c e e d t h e l i m i t s w i t h Y 2 > a 2 as l o n g as ( 2 . 1 2 0 ) i s s a t i s f i e d . The a l g o r i t h m was t e s t e d u s i n g s e v e r a l e x a m p l e s . One o f them was an example t a k e n f r o m r e f e r e n c e [ 2 6 ] . The p a r a m e t e r s o f t h i s s e r v o -s y s t e m a r e K = 100 P x = 0 . 0 4 P t = 0 . 0 5 6 2 5 f o r C = 0 . 5 0 0 0 s s The r e s u l t s o f t h e o p t i m i z a t i o n a l g o r i t h m a r e Y 2 = 1 .71 a = 1 .40625 U s i n g X ] / 0 ) = 1.70 O b t a i n X x = 1 .6066 , X 2 = 1 .9917 I S E = 0 . 0 4 3 0 31 K = 0 . 2 4 3 6 , x = 0 . 2 8 0 8 , a = 0 . 8 8 7 5 c c ' The t i m e r e s p o n s e i s shown i n F i g u r e 2 . 2 . V e r i f i c a t i o n o f t h e opt imum was d e t e r m i n e d by s u b s t i t u t i n g t h e op t imum s e t t i n g s i n t o t h e Kuhn T u c k e r e q u a t i o n s . F i g u r e 2 . 3 shows t h e t i m e r e s p o n s e o b t a i n e d f rom t h e c o n -v e n t i o n a l t e c h n i q u e o f l a g n e t w o r k d e s i g n . The g r a p h i s t a k e n f rom p . 543 o f r e f . [ 2 6 ] . A c o m p a r i s o n w i l l show t h a t GGP o f f e r s i m p r o v e d c o n t r o l . The r e s p o n s e i n F i g u r e 2 . 3 has a h i g h e r o v e r s h o o t and a s l o w l y d e c a y i n g t e r m w i t h a r e l a t i v e l y l a r g e t i m e c o n s t a n t o f 0 . 4 6 s e c o n d s . B e t t e r c o n t r o l c o u l d be o b t a i n e d w i t h c o n v e n t i o n a l d e s i g n b u t GGP o f f e r s i t more r e a d i l y w i t h o u t g o i n g t h r o u g h a t r i a l and e r r o r p r o c e d u r e . N o t e t h a t t h e same c o n s t r a i n t i s s a t i s f i e d by b o t h c o m p e n s a t o r s . A l e a d d e s i g n was o b t a i n e d w i t h Y 2 = 1 . 3 1 2 5 , and t = 0 . 0 5 w i t h i t s r e s p o n s e shown i n F i g u r e 2 . 4 . G > ) = K ^ l + o c t s ) O.S F i g . 2 . 4 L e a d C o m p e n s a t i o n U s i n g GGP 35 3 . PARAMETER I D E N T I F I C A T I O N USING CUBIC SPLINES 3 .1 The P r o b l e m o f P a r a m e t e r I d e n t i f i c a t i o n I n t he p r e v i o u s c h a p t e r s i t has b e e n shown t h a t g i v e n the p l a n t s y s t e m p a r a m e t e r s and an a p p r o p r i a t e t i m e c o n s t r a i n t ( s p e c i f i c a t i o n ) , s u i t a b l e s e t t i n g s f o r a c o n t r o l l e r c a n be o b t a i n e d . To a p p l y s u c h c o n t r o l l e r d e s i g n p r o c e d u r e s r e q u i r e s a s y s t e m m o d e l . T h i s m o d e l must be i d e n t i f i e d . A n e x c e l l e n t o v e r v i e w o f t h e p r o b l e m s i n i d e n t i f i c a t i o n and c o n t r o l a r e g i v e n i n r e f e r e n c e [ 2 ] . s y s t e m b a s e d on a p r i o r i k n o w l e d g e o f i t s d y n a m i c s , i . e . an a p p r o p r i a t e m o d e l may be c h o s e n . F o r e x a m p l e , a c h e m i c a l p r o c e s s p l a n t c o u l d be m o d e l l e d as a n o n - l i n e a r s y s t e m o r l i n e a r a p p r o x i m a t i o n s c o u l d be u s e d . S i n c e i t i s c o n v e n i e n t to use s y s t e m s d e s c r i b e d by 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 , t h e r e m a i n i n g p r o b l e m i s t o c h o o s e what t h e o r d e r o f t he s y s t e m i s . Onee t h a t i s done , i t w i l l be n e c e s s a r y t o d e t e r m i n e t h e c o e f f i c i e n t s o f t h e l i n e a r e q u a t i o n s , i . e . i d e n t i f y t h e p a r a m e t e r s . i s o f t e n some d i f f e r e n c e s as t o what i s d e f i n e d as a s t a t e and what i s d e f i n e d as a p a r a m e t e r . F o r t h e p u r p o s e s o f t h i s t h e s i s , t h e f o l l o w i n g d e f i n i t i o n w i l l be c h o s e n : P a r a m e t e r I d e n t i f i c a t i o n : T h i s i n v o l v e s d e t e r m i n i n g t h e c o e f f i c i e n t s o f a l i n e a r e q u a t i o n d e s c r i b i n g ( m o d e l l i n g ) an i n p u t / o u t p u t s y s t e m o f t he f o r m O f t e n an a p p r o p r i a t e ' t y p e ' o f e q u a t i o n can be u s e d t o d e s c r i b e a I n t he l i t e r a t u r e d e s c r i b i n g s t a t e and p a r a m e t e r e s t i m a t i o n , t h e r e 9y d y a 0 + a l Y + 3 2 ^ - + . . a n g ^ r b 0 + b i u + b 2 + b ( 3 . 1 ) F o r A d a p t i v e C o n t r o l , i t w o u l d be d e s i r a b l e t o have some p a r a -me te r i d e n t i f i c a t i o n scheme t h a t c a n be c a r r i e d o u t i n r e a l t i m e . Many a l g o r i t h m s have b e e n p r o p o s e d , t h e most t y p i c a l o f t h e s e b e i n g some f o r m o f e x t e n d e d K a l m a n f i l t e r i n g [ 2 7 ] . A l t e r n a t e schemes have b e e n p r o p o s e d t h a t make use o f s p l i n e c u r v e f i t t i n g t e c h n i q u e s . T h i s i s t h e t y p e o f scheme t h a t w i l l be i n v e s t i g a t e d i n t h i s c h a p t e r . A n o u t p u t r e s p o n s e t o some known i n p u t i s m e a s u r e d . These m e a s u r e m e n t s , t y p i c a l l y n o i s y , a r e f i t t e d w i t h a smooth c u r v e u s i n g s p l i n e s . P a r a m e t e r i d e n t i f i c a t i o n i s p e r f o r m e d b y f i n d i n g t h e c o e f f i c i e n t s o f a d i f f e r e n t i a l e q u a t i o n t h a t w i l l g i v e t h e b e s t f i t t o t h e smoothed c u r v e . I n t h i s c h a p t e r , t h e t e c h n i q u e t o be s t u d i e d w i l l be t h a t o f i d e n t i f y i n g t h e p a r a m e t e r s o f a s e c o n d o r d e r mode l w i t h t i m e de l ay . , u s i n g c u b i c s p l i n e s . 3 .2 C u b i c S p l i n e s I n o r d e r t o o b t a i n i n t u i t i v e i n s i g h t i n t o t h e n a t u r e o f s p l i n e s , a q u o t a t i o n f r o m r e f . [18] w i l l be g i v e n . " D r a f t s m e n h a v e l o n g u s e d m e c h a n i c a l s p l i n e s , w h i c h a r e f l e x i b l e s t r i p s o f an e l a s t i c m a t e r i a l . The m e c h a n i c a l s p l i n e i s s e c u r e d by means o f w e i g h t s a t t h e p o i n t s o f i n t e r p o l a t i o n - h i s t o r i c a l l y c a l l e d k n o t s . The s p l i n e assumes t h a t shape w h i c h m i n i m i z e s i t s p o t e n t i a l e n e r g y , and beam t h e o r y s t a t e s t h a t i : . . t h i s e n e r g y i s p r o p o r t i o n a l t o t h e i n t e g r a l w i t h r e s p e c t t o a r c l e n g t h o f t h e s q u a r e o f t h e c u r v a - .:: t u r e o f t h e s p l i n e . " E s s e n t i a l l y , i n s t e a d o f f i t t i n g a l l o f t h e d a t a w i t h one a n a l y t i -c a l c u r v e , segments ( i n t e r v a l s ) o f d a t a a r e f i t t e d w i t h a c u b i c s p l i n e f u n c t i o n f o r e a c h s egmen t . 37 When the k n o t s ( x . , t . ) , ( x „ , t ~ ) , . . . ( x , t ) a r e g i v e n , t h e 1 1 L i . n n i n t e r p o l a t i n g s p l i n e i s a f u n c t i o n s u c h t h a t S ( t ± ) = x ( t i ) , i = l , 2, n (3.2) s u c h t h a t rt J = n ( S ( t ) ) 2 d t (3.3) J t l i s m i n i m i z e d . The c u b i c s p l i n e has t h e a d d i t i o n a l p r o p e r t y t h a t s ( t ) , s ( t ) and s ( t ) a r e c o n t i n u o u s . Tha t i s , a t t h e k n o t p o i n t s t h e f o l l o w i n g i s t r u e , S . _ 1 ( t i ) = S . ( t . ) (3.4A) ^ i - l ( t i } = K(t±) (3-4B) S . ^ a . ) = S. ( t . ) (3.4C) f o r i = 2, 3, . . . n F o r h i g h e r o r d e r s p l i n e s , t h e s e c o n t i n u i t y c o n d i t i o n s a p p l y f o r t h e i r r e s p e c t i v e h i g h e r o r d e r d e r i v a t i v e s . The J f u n c t i o n a l s o d i f f e r s . F o r t h e i t b i n t e r v a l , l e t t h e s p l i n e be r e p r e s e n t e d b y , S ± ( t ) = C 0 L + CX^.T + C 2, ± T 2 + C 3 , ± T 3 (3.5) "i+1 x = t - t . , t - < t < t . G i v e n t h e k n o t p o i n t s , t h e r e i s a s e q u e n t i a l a l g o r i t h m w h i c h w i l l d e t e r m i n e t h e c o e f f i c i e n t s o f t h e s p l i n e r e p r e s e n t e d by (3.5). The d e t a i l s o f t h i s a l g o r i t h m can be o b t a i n e d f r o m r e f . [ 1 8 ] . The p r o b l e m w i t h t h i s a p p r o a c h i s t h a t t h e k n o t p o i n t s must be g i v e n . S i n c e m e a s u r e -ments a r e t y p i c a l l y n o i s y , t h e above p r o c e d u r e must be m o d i f i e d t o smooth t h e n o i s y d a t a . 38 In ref. [25] this problem was approached by the use of modified cubic splines. A modified spline i s found by minimizing f t ! . . L ( S ( t ) ) 2 d t + I W ( S ( t )-x( t . ) ) 2 (3.6) t 0 i=0 The weighting factors are chosen such that S(t^) and x(t^) do not deviate by more than some chosen confidence lim i t . This method can be seen to be a hybrid of a conventional spline and a weighted least-squares method. The problem with weighted spline f i t t i n g i s that i t requires the solution of 2n equations where n i s the number of knots hence i t s complexity can increase significantly with n. These equations cannot be solved in an iterative form. Conventional spline f i t t i n g can be done Iteratively so i t s complexity i s independent of the number of knots. Only the number of iterations changes. Hence, i t was decided that the simpler technique of conventional splines would be used. Various attempts at system identification have been made using cubic splines [8,9,10,25]. Some of these methods are quite complex and general [9,10], One is used to improve i n i t i a l estimates from Kalman f i l t e r i n g [8]. The technique to be used in this thesis w i l l be different. 3.3 Identifying the Second Order System 39 "It has been found that high order overdamped systems as often encountered in chemical process control can be represented to a fai r accuracy by a second-order model containing transport lag." [24] A second order system with time delay is an adequate model for many physical systems. It gives a f a i r l y accurate description and i t i s relatively simple to use. A system to be controlled is modelled by the transfer function -TnS H(S) = : = (3.7) S 2+ a iS+a 2 U ( S ) ie. , i t s dynamics can be described by x + a ^ + a 2x = y a 2u(t-T- D) (3.8) x(T D) = 0 = x(T D) , x(T D) = y a 2 for x = x(t) The problem is to identify the parameters y, a^, a 2, T^. Using the closed loop response would be considerably more complicated though i t would be more convenient because identification could take place during control. It was decided to use the simpler approach of using an open loop response. The test input was chosen to be a step function. u(t) = u 0 (3.9) Then where z + a :y + a 2x = 0 for t < T D (3.10A) z + a^y + a 2x = y a 2 U Q for t _> T Q (3.10B) y x , z _A x (3.11) y c a n be r e a d i l y i d e n t i f i e d f rom t h e s t e a d y s t a t e r e s p o n s e . From t h e f i n a l v a l u e t heo rem and ( 3 . 7 ) and ( 3 . 9 ) l i m x ( t ) = l i m S X ( S ) =YYU 0 ( 3 . 1 2 ) t-*» s - > 6 Hence Y = ( 3 . 1 3 ) u 0 As w i l l be shown l a t e r , c a n be d e t e r m i n e d a f t e r aj_, a 2 have been f o u n d . F o r an open l o o p s y s t e m , t h e t i m e d e l a y s i m p l y d e l a y s t h e o u t p u t f u r t h e r i n t i m e w i t h x ( t ) = x g f o r t < T Q . I n o r d e r t o d e t e r m i n e when ( 3 . . 1 0 B ) a p p l i e s unde r n o i s y c o n d i t i o n s , one must have x ( t ) > TH where TH i s a t h r e s -h o l d v a l u e t h a t i s g r e a t e r t h a n t h e l a r g e s t n o i s e m a g n i t u d e . W i t h y known, ( 3 . 1 0 B ) has two unknowns . The d e r i v a t i v e s , y and z c a n be d e t e r m i n e d f rom t h e c u b i c s p l i n e c u r v e f i t t i n g t e c h n i q u e by t a k i n g t h e f i r s t and s e c o n d d e r i v a t i v e s o f ( 3 . 5 ) . U s i n g two m e a s u r e m e n t s , a^ and a 2 c a n be d e t e r m i n e d by - z . l "2i+iy ( 3 . 1 4 ) where D e f i n e x A_ x - yuQ (3.15) a , a = — 2 - (3.16) T h e n , by s o l v i n g (3.14) z i y i + i - W i 1 7 . a . = — ( 3 . 1 7 ) x . z . n - x . . , z . 1 1 + 1 1 + 1 1 U s i n g a r e c u r s i v e f o r m t o a v e r a g e d u r i n g many m e a s u r e m e n t s , t h e t h (N+l) i t e r a t i o n i s where V l = a N - (rN+l a N + V l } ( 3 ' 1 8 ) V l * N Z N+1 V l Z N ( 3 - 1 9 ) V l • Z N V l " V l y N ( 3 ' 2 0 ) N V i • i ( x i zi+i - h+iz±> ( 3 - 2 1 ) 1=1 N + l U s i n g ( 3 . 1 0 B ) and ( 3 . 1 7 ) a,i = — — ( 3 . 2 2 ) ax+y a 2 = aa1 ( 3 . 2 3 ) F o r a v e r a g i n g , t h e n where a i = a x - ( d a i + z ) ( 3 . 2 4 ) N + l N N + l N a 2 = a N + 1 al ( 3 . 2 5 ) N + l N + l dN+l = V l + V l V l ( 3 - 2 6 ) N V i - I (xiyi+i - xi+iyi> = V i + DN ( 3 - 2 7 ) 1=1 W i t h Y> aj_, a 2 , k n o w n , t h e t i m e d e l a y T J J c a n be d e t e r m i n e d . U s i n g d i s c r e t e z t r a n s f o r m t e c h n i q u e s , a s t e p r e s p o n s e w i t h a r b i t r a r y t i m e d e l a y c a n be generated. These generated values can be compared to measured values and the time delay can be determined by their respective times. The crucial part of the entire estimation scheme is the determina-tion of a\, a 2 which depend heavily on knowing x^ and i t s derivatives y^ and z-^ . In order for the equations of (3.14) to be independent, no more than two spline approximations (x,y,z) from the same spline interval should be used. Because x,y,z are continuous at the knot points, then just the knot points can be used. This makes the computation of x, y, z simpler. th Then from (3.11) and (3.5) for the i knot x ± = C 0 i - (3.28A) y. = C i (3.28B) 1 i z± = 2C2j. (3.28C) Hence, the spline coefficients can be used directly for :the para-meter identification equations. Another reason for using only the i n i t i a l knot points becomes apparent when the following i s considered. Substitute the spline approximation into (3.8) (2C 2 + a1Cl + a 2(C 0-Y))+(6C 3 + 2a xC 2 + a 2C 1)x + (3aiC 3 + a 2C 2 )x 2 + a 2C 3x 3 = 0 (3.29) At x=0 have (note x= t-t.) x 2C2= -a^i - a 2C 0 + a 2y (3.30) Differentiating (3.8) and substituting in the spline approximation ( 6 C 3 + 2a1C2 + a 2 C 1 ) + ( 6 a 1 C 3 + 2 a 2 C 2 ) T + 3 a 2 C 3 x 2 = 0 ( 3 . 3 1 ) A t T=0 we have 6 C 3 = - 2 a i C 2 - - - 3 . 2 ^ 1 Then t h e o n l y t i m e when t h e s p l i n e s a t i s f i e s ( 3 . 2 9 ) i s ( 3 . 3 2 ) ^ 9 a i x = - 3 ( + ) ( 3 . 3 3 ) 3 C 3 a 2 S i m i l a r l y t o s a t i s f y ( 3 . 3 1 ) C 2 ai - = ~ 2 ( 3 C 3: +aI> <3'34> I f ( 3 . 8 ) i s d i f f e r e n t i a t e d t w i c e and s o l v e d f o r x=0, t h e n a i _ C 2 — - = ( 3 . 3 5 ) a 2 3 C 3 By s u b s t i t u t i n g ( 3 . 3 5 ) i n t o ( 3 . 3 3 ) and ( 3 . 3 4 ) , i t c an be s e e n t h a t ( 3 . 8 ) c a n o n l y be d e s c r i b e d by a s p l i n e a t x=0. T h i s does n o t demon-: s t r a t e t h a t o t h e r x ' s c a n ' t be u s e d , b u t i f x=0 i s c h o s e n as a p o i n t f o r s o l v i n g f o r a 1 ? a 2 t h e n o t h e r x ' s c a n n o t be u s e d . Due t o n o i s y d a t a , s m o o t h i n g must be done b e f o r e s p l i n e c u r v e f i t t i n g i s u s e d . S i n c e i t i s d e s i r a b l e t o keep t h e a l g o r i t h m as s i m p l e as p o s s i b l e , a s i m p l e a v e r a g i n g t e c h n i q u e i s u sed t o smooth t h e d a t a w i t h t h e f o l l o w i n g e u q a t i o n , \ = \ ( x * k - i + 2 X + X m k + i } ( 3 ' 3 6 ) where x, = smoothed d a t a k ^ = measured d a t a k -The e s t i m a t i o n a l g o r i t h m i s shown i n A p p e n d i x B . l . The q u e s t i o n o f how a c c u r a t e l y a c u b i c s p l i n e c a n r e p r e s e n t a s e c o n d o r d e r r e s p o n s e i s i m p o r t a n t . A s p l i n e a p p r o x i m a t i o n was t r i e d on a s i m u l a t e d s y s t e m w i t h a 1 = . 2 5 , a 2 = . 0 1 . The v a l u e s o f t h e f u n c t i o n w i t h i t s d e r i v a t i v e s have been compared w i t h i t s a n a l y t i c r e s p o n s e , i e . x = y ( 1 + - \ 0>e~ a t - a e " b t ) ) ( 3 . 3 7 A ) 3, D Tab ., - b t - a t . , „ „ . , „ . y = x = — ^ (e - £ ) ( 3 . 3 7 B ) z = x = ^ ( a e " a t - b e " b t ) ( 3 . 3 7 C ) where 2 - a j ± / a i - 4 a 2 a , b = ( 3 . 3 7 D ) 2 i e . a , b a r e t h e p o l e s . A p l o t o f a s p l i n e f i t t o n o i s y d a t a i s shown i n f i g u r e 3 . 1 and n u m e r i c a l r e s u l t s a r e g i v e n i n T a b l e 3 . 1 . It c a n be s e e n t h a t t h e r e a r e some s i g n i f i c a n t d i f f e r e n c e s f o r t h e d e r i v a t i v e s a t t h e s m a l l e r v a l u e s o f t i m e . The l i m i t a t i o n i n t h e a c c u r a c y o f s p l i n e f i t d u r i n g t h e t r a n s i e n t r e s p o n s e w i l l l i m i t t h e a c c u r a c y o f e s t i m a t i n g a i , a2- The s p l i n e w i l l f i t s t e a d y s t a t e v e r y w e l l b e c a u s e i t i s a l m o s t a s t r a i g h t l i n e . T h a t i s n o t v e r y u s e -f u l f o r e s t i m a t i o n p u r p o s e s b e c a u s e a l l s t a b l e s e c o n d o r d e r s y s t e m s have t h e same s t e a d y s t a t e v a l u e s o f Y U O » s o o n e c o u l d n o t d e t e r m i n e a p a r t i c u l a r s y s t e m . I n c r e a s e d a c c u r a c y can be o b t a i n e d by m a k i n g t h e s p l i n e i n t e r v a l s n a r r o w e r . T h i s w o r k s i f t h e d a t a i s n o t n o i s y . I f t h e i n t e r v a l s a r e n a r r o w e d , t h e s p l i n e a p p r o x i m a t i o n becomes more s e n s i t i v e t o n o i s e , e s p e c i a l l y the d e r i v a t i v e s . T h e r e i s a r e a s o n why t h e a c c u r a c y d e c r e a s e s when one a p p r o a c h e s t=0 . C o n s i d e r t h e T a y l o r e x p a n s i o n o f x a b o u t t=0 . y a 2 t 2 y a 1 a 2 t 3 y a 2 ( a 2 - a 2 ) t 4 x ( t ) = —2 g + ( 3 , 3 8 ) An a c c u r a t e f i t u s i n g a t h i r d o r d e r e q u a t i o n w o u l d be p o s s i b l e f o r o n l y a v e r y s m a l l r ange o f t . As m e n t i o n e d b e f o r e , p a r a m e t e r e s t i m a t i o n c a n o n l y be done d u r i n g the t r a n s i e n t p a r t o f t h e r e s p o n s e . A t s t e a d y s t a t e , i e . x , y , z = 0 , no f u r t h e r u p d a t e o c c u r s . I n p r a c t i c e , once s t e a d y s t a t e i s a p p r o a c h e d , i t was found t h a t a ^ , a 2 k e p t on b e c o m i n g i n c r e m e n t a l l y l a r g e r , p r o b a b l y due t o n u m e r i c a l e r r o r when u s i n g s m a l l v a l u e s . S i n c e t h e r e i s a t i m e d e l a y i n g e n e r a l , t h e e s t i m a t i o n s h o u l d o c c u r when i t i s known t h a t t h e s y s t e m i s a f f e c t e d by an i n p u t . H e n c e , e s t i m a t i o n i s r e s t r i c t e d be tween two o u t p u t t h r e s h o l d s . T a b l e 3 . 2 shows t h e r e s u l t s o f p a r a m e t e r e s t i m a t i o n f o r a i = 0 . 2 5 , a 2 = 0 . 0 1 w i t h t h e two t h r e s h o l d s b e i n g O . l y and 0 . 9 Y - S i m i l a r b e h a v i o u r was o b s e r v e d f o r o t h e r overdamped s y s t e m s . I t c a n be s e e n t h a t t h e e s t i m a t e s a r e dependen t on t h e s p l i n e i n t e r v a l , s t a r t i n g t h r e s h o l d and t h e number o f t i m e s o f s m o o t h i n g c h o s e n . One c o n v e n i e n t method o f c h e c k i n g t h e a c c u r a c y o f t h e e s t i m a t e s c o u l d be done by c h e c k i n g t h e I S E o f t h e s y s t e m . The c l o s e d l o o p e r r o r i s known i n t e rms o f t h e p a r a m e t e r s as i n ( 2 . 2 2 ) . I t c o u l d a l s o be compared w i t h t h e open l o o p i n t e g r a l once t h e t i m e d e l a y i s known. Time d e l a y c a n be e s t i m a t e d by s i m u l a t i n g t h e r e s p o n s e w i t h t h e e s t i m a t e s o f t h e o t h e r p a r a m e t e r s and c o m p a r i n g them t o m e a s u r e m e n t s . The a l g o r i t h m l i s t e d i n A p p e n d i x B . 2 u se s t h e k n o t p o i n t s i n o r d e r t o f i n d t h e t i m e s h i f t o f t h e s e p o i n t s r e l a t i v e t o t h e a p p r o p r i a t e p o i n t o f a z e r o t i m e d e l a y s i m u l a t i o n . I f t h e e x a c t v a l u e s o f a ^ , a 2 we re u s e d , t h e e x a c t t i m e d e l a y w o u l d be f o u n d . T a b l e 3 . 3 shows t i m e d e l a y e s t i m a t e s when t h e e s t i m a t e s o f a 1 5 a 2 a r e n o t e x a c t . The Tp e s t i m a t e s become more i n a c c u r a t e f o r l a r g e r t , h ence t h e e s t i m a t e s h o u l d be r e s t r i c t e d t o a r a n g e o f o u t p u t s , f o r example t s u c h t h a t . 1 < x m < . 6 . O t h e r w i s e , t h e t i m e d e l a y e s t i m a t e v a r i e s o n l y s l i g h t l y due t o s m a l l e r r o r s i n t h e e s t i m a t e s o f a , a 2 . I t w o u l d be i n t e r e s t i n g t o see how t u n i n g o f a P I D c o n t r o l l e r w o u l d be a f f e c t e d by t h e e s t i m a t e s . The r e s u l t s f o r t h i s t e s t a r e shown i n f i g u r e 3 . 2 . F o r t h e r e s p o n s e x^Ct), t h e I S E i s l e s s t h a n t h e c a s e b a s e d on t h e t r u e p a r a m e t e r s . I n s t e a d x ^ ( t s ) < x - } ( t s ) w h i c h i s why t h e I S E i s s m a l l e r . The c o n v e r s e i s t r u e f o r x^{t). N o t e t h a t t h e same r e l a t i o n s h i p h o l d s t r u e f o r t h e o v e r s h o o t . I n g e n e r a l , c u b i c s p l i n e s o f f e r a c o n s i d e r a b l y s i m p l e r t e c h n i q u e f o r e s t i m a t i o n b u t t h e a c c u r a c y i s l i m i t e d . O u t p u t x F i g . 3 . 1 C u b i c S p l i n e C u r v e F i t t i n g Comparison of Spline Approximation to Analytic Function (*refers to the spline approximation) t X * z ' z* [sec] X y y [10-3] ' [10-3] 0 0 0 0 0.01 10 1.83 10 0.2364 0.2378 0.0314 0.0285 -0.217 4.95 20 0.5156 0.5165 0.0233 0.0242 -0.980 i -1.360 30 0.7033 0.7026 0.147 0.0143 -0.710 .' -0.615 40 0.8197 0.8175 0.009 0.0089 -0.447 - -0.456 Table 3.1 Parameter Estimates of a 'Second Order System a^O.25, a2=0.01, TH=0.1y Noise Spline Interval # of times Variance a l *2 [sec] of smoothing 0.000 0.2397 0.00927 10 1 0.0115 0.2385 0.00970 10 1 0.0115 0.2078 0.00748 10 1 0.0115 0.2277 0.00998 5 3 0.0115 0.2320 0.00860 15 1 0.0115 0.267 0.0103 10 1 0.0115 0.341 0.0144 5 3 *1 TH=0.25y *2 TH=0.25y, a =0.35, a2=0.015 Table 3.2 Delay Time Estimation a =0.25, a =0.01, ^=10 sec, Noise Variance=0.0115 Knot Point ^ = 0 . 2 3 , a2=o 0095 ^=0.27, a2=0. 0105 X c fcc [sec] X . t [seed TD [sec] X t [sec] TD [sec] .100 .407 .633 .775 .862 .914 15.6 25.6 35.6 45.6 55.6 65.6 .100 .410 .634 .775 .862 .914 5.7 15.7 25.1 34.4 43.7 52.8 9.9 9.9 10.5 11.2 11.9 12.8 .102 .409 .634 .775 .862 .914 5.6 15.9 26.3 36.7 47.3 57.7 10.0 9.7 9.3 8.9 8.3 7.9 Table 3 .3 S y s t e m Response x ( t ) F i g . 3 . 2 P I D T u n i n g B a s e d on E s t i m a t e d P a r a m e t e r s , 2nd O r d e r Sys tem 51 4. PARAMETER IDENTIFICATION USING WALSH FUNCTIONS 4 . 1 Deve lopmen t o f t h e Method I n t h e s p l i n e i d e n t i f i c a t i o n m e t h o d , t h e p a r a m e t e r s were e s s e n t i a l l y i d e n t i f i e d u s i n g t h e s y s t e m r e s p o n s e i n t h e t i m e d o m a i n . S i n c e s y s t e m s have a c h a r a c t e r i s t i c f r e q u e n c y s p e c t r u m , i n f o r m a t i o n abou t t h e pa r ame-t e r s can a l s o be o b t a i n e d u s i n g a s e t o f o r t h o n o r m a l s q u a r e wave f u n c t i o n s w h i c h a r e c a l l e d W a l s h f u n c t i o n s . They h a v e been u s e d i n v a r i o u s c o n t r o l a p p l i c a t i o n s [ 1 5 ] . R e c e n t l y some w o r k has been c a r r i e d o u t on t h e use o f W a l s h f u n c t i o n s i n s y s t e m i d e n t i f i c a t i o n [ T 3 ] . A p r o c e d u r e b a s e d on c o r r e l a t i o n f u n c t i o n s w i l l be i n v e s t i g a t e d h e r e . E s s e n t i a l l y i t i n v o l v e s t e s t i n g t h e s y s t e m w i t h a s q u a r e wave and so i s e a s i l y i m p l e m e n t e d . I d e n t i f i c a t i o n i s done by c o r r e l a t i o n o f t h e o u t p u t w i t h v a r i o u s known s q u a r e wave s i g n a l s , h e n c e , due t o t h e c o r r e l a t i o n p r o c e s s , t he e s t i m a t e s a r e l e s s s e n s i t i v e t o n o i s e . A l s o i t has t h e p r o p e r t y o f b e i n g s i m p l e . T h i s method was t e s t e d f o r s e c o n d o r d e r s y s t e m s . The b a s i c t h e o r e t i c a l b a c k g r o u n d can be found i n r e f . [ 1 3 ] . The s y s t e m i s g i v e n a s q u a r e wave i n p u t w i t h a f r e q u e n c y o f co^. Time a v e r a g e c o r r e l a t i o n i s p e r f o r m e d by u s i n g v a r i o u s W a l s h f u n c t i o n s . These a r e (4.1) - N where c ( t ) = o u t p u t u ( t ) = known s i g n a l The known s i g n a l s a r e W a l s h f u n c t i o n s . X i - s q u a r e wave w i t h co = toi X3 - s q u a r e wave w i t h to = to 3 = 3toi x 5 - s q u a r e wave w i t h to = L05 = 5toi where x i i s t h e o r i g i n a l g e n e r a t e d t e s t i n p u t f o r t h e s y s t e m . O t h e r s i g n a l s u s e d a r e y\- 9 0 ° phase s h i f t e d s q u a r e wave w i t h to = toi y 3 - 9 0 ° phase s h i f t e d s q u a r e wave w i t h to = to 3 = 3toi Y 5 ~ 9 0 ° phase s h i f t e d s q u a r e wave w i t h to = 105 = 5toi The s e c o n d o r d e r s y s t e m has the f o l l o w i n g t r a n s f e r f u n c t i o n 2 G (jto) = V^j? = | G | e - j e ( 4 . 2 ) P (to - to ) 2 + j 2 ? to to P P P P 2£ to to where tanG = —2—2— ( 4 . 3 ) 2 2 to z - to z P I t can be shown t h a t t h e c o r r e l a t i o n f u n c t i o n s c a n be a p p r o x i m a t e d i n t e rms o f t h e i r h a r m o n i c s o f t h e f o r m ^ ^ x i c a A i c o s 0 i + — c o s 6 3 + — c o s 0 5 ( 4 . 4 A ) 3 5 x 3 c - A 3 c o s G 3 (4.4B) x ^ c - A 5 c o s e 5 (4.4C) and y i c = A i s i n 9 i + — s i n 0 3 + — s i n 8 5 ( 4 . 5 A ) 3 5 y 3 c - A 3 s i n 0 3 -(4.5B^ . y 5 c = A 5 s i n 0 5 (4.5C) S i n c e t h e s i g n a l s a r e j u s t p l u s o r minus l e v e l s , t h e c o r r e l a t i o n can be e a s i l y p e r f o r m e d n u m e r i c a l l y f rom t h e d a t a . G i v e n t h e c o r r e l a t i o n f u n c t i o n s , t h e n phase i n f o r m a t i o n can be d e t e r m i n e d by t h e f o l l o w i n g . 5 3 y x c - y 3 c / 3 - y 5 c / 5 t a n G j = —— — ( 4 . 6 A ) x j c - x 3 c / 3 - x 5 c / 5 Y 3 C Y 5 C t a n 0 3 = —— (4.6B) t a n 6 5 = — - (4.6C) x 3 c x 5 c The p a r a m e t e r s £^ and 03^ c an t h e n be d e t e r m i n e d by e q u a t i n g (4.6) and ( 4 . 3 ) . T h i s y i e l d s 03 2 OtanSx - 9 t a n 9 3 ) o j 1 2 ( 4 . 7 A ) 3 t a n e ! - t a n G 3 ( 4 5 t a n 6 3 - 7 5 t a n G 5 ) o ) 1 2 a, 2 : ( 4 - 7 B ) P 5 t a n 8 3 - 3 t a n 6 5 ( 2 5 t a n 0 5 - 5tanQl)^i1 o) 2 = ( 4 . 7 C ) P t a n B c - 5 t a n 6 ! (o)! 2 - oj 2 ) t a n 9 1 p = • ( 4 . 8 A ) 2o)i o) 1 P (9o3j 2 - O J 2 ) t a n 6 3 ? = E ( 4 . 8 B ) P 6o)i0) 1 P ( 2 5 0 ) ! 2 - 03 2 ) t a n 6 5 ? = 2 ( 4 . 8 C ) P I O O J I U ) P The g a i n y^, o f a s y s t e m can be d e t e r m i n e d f rom the s t e a d y s t a t e r e s p o n s e due t o a s t e p i n p u t . 4 . 2 T e s t i n g t h e Method A t y p i c a l p e r i o d i c o u t p u t r e s p o n s e f o r a s q u a r e wave i n p u t i s shown i n F i g u r e 4 . 1 . The c o r r e l a t i o n f u n c t i o n s were computed by i n t e g r a t i n g t h e d a t a i n l e n g t h s o f 30 e q u a l segments f o r t h e h a l f p e r i o d ( T / 2 ) . The v a l u e f o r e a c h i s o b t a i n e d by u~c~ = ( s j l j + s 2 I 2 + • • • + s 3 0 I 3 0 ) / K ( 4 . 9 ) where I = i n t e g r a l o f t h e i t b segment s_^  = ± 1 w h i c h d e t e r m i n e s t h e p a r t i c u l a r c o r r e l a t i o n f u n c t i o n K = some c o n v e n i e n t v a l u e T h i s method i s found t o be r e l a t i v e l y i n s e n s i t i v e t o n o i s e b e c a u s e c o r r e l a t i o n i s p e r f o r m e d w i t h a d e t e r m i n i s t i c known s i g n a l . Any i n -a c c u r a c i e s t h a t had o c c u r r e d a r e due p r i m a r i l y t o t h e f a c t t h a t o n l y t h e f i r s t 3 h a r m o n i c s o f c ( t ) a r e b e i n g u s e d . N u m e r i c a l a c c u r a c y i n d e t e r m i n i n g t h e t a n e ' s w o u l d d i m i n i s h a t v e r y h i g h and v e r y l o w v a l u e s o f to and a t to = io . When to^ i s t o o s m a l l , s t e a d y s t a t e i s a p p r o a c h e d . The t r a n s i e n t p a r t o f t h e r e s p o n s e i s t h e n m a i n l y d e t e r m i n e d by h i g h e r f r e q u e n c y c o m p o n e n t s , i e to > 0 ) 5 . S i n c e t h e s e a r e n o t a c c o u n t e d f o r , t h e n i n a c c u r a c y o c c u r s . S i m i l a r l y , i f toj i s t o o l a r g e t h e n i m p o r t a n t l o w e r f r e q u e n c y components a r e n e g l e c t e d . The method was t e s t e d and some r e s u l t s a r e shown i n T a b l e 4 . 1 . D a t a was sampled o v e r one h a l f p e r i o d . The a l g o r i t h m u s e d i s shown i n A p p e n d i x C . The i n a c c u r a c i e s (>5%) due t o t h e f r e q u e n c y u s e d , a r e shown c i r c l e d . F o r l o w i n p u t t e s t f r e q u e n c i e s , t h e a c c u r a c y o f t h e l o w e r h a r m o n i c s d i m i n i s h more r a p i d l y . C o n v e r s e l y , f o r t he h i g h e r i n p u t f r e q u e n c i e s , t h e a c c u r a c y o f t h e h i g h e r h a r m o n i c s d i m i n i s h more r a p i d l y t h a n t h e l o w e r h a r m o n i c s . I n a c c u r a c i e s due t o n o i s e c a n be m i n i m i z e d by a v e r a g i n g more d a t a p o i n t s o v e r more p e r i o d s . N o i s e p l a y s a s i g n i f i -c a n t p a r t i n t h e e s t i m a t i o n o f t a n O ' s b e c a u s e t h e c o r r e l a t i o n f u n c t i o n a t l o w e r f u n d a m e n t a l f r e q u e n c i e s become v e r y s m a l l . F o r co^  = 1 , t h e c o r r e l a t i o n f u n c t i o n s have t h e f o l l o w i n g v a l u e s i n t h e n o i s e l e s s c a s e . x 5 c = - 0 . 0 0 8 0 5 3 y 5 c = - 0 . 0 0 1 8 4 5 W i t h a n o i s e v a r i a n c e o f 0 . 0 1 1 5 , t h e e r r o r s o f t h e s e v a l u e s become s i g n i f i c a n t . The i n p u t f r e q u e n c y c o u l d be i n c r e a s e d to/overcome-: t h e measurement n o i s e p r o b l e m . T h e r e i s a way o f d e t e r m i n i n g t h e a c c u r a c y o f t h e phase t a n g e n t e s t i m a t e s b a s e d on a p r o p e r t y o f t h e WFPI t e c h n i q u e . T h i s p r o p e r t y o c c u r s when t h e s y s t e m i s t e s t e d 3 t i m e s w i t h s q u a r e waves o f f r e q u e n c y oij = O J Q , 3ojg, 5 W Q . The m a t r i x o f phase t a n g e n t s ( c o t a n g e n t s ) i s s y m -m e t r i c a l . U s i n g e q u a t i o n ( 4 . 3 ) , t h e m a t r i x i s f o u n d t o b e , t a n 9], (a1 = u 0 o)! = 3 OJQ o)! = 5 O ) Q where t a n 6 3 3oo t an05 503 O J 2 - 1 (3co) 2 - 1 ( 5 O J ) 2 - 1 3oo 9OJ 15o) (3o)) 2 - 1 (9oo) 2 - 1 (15o>) 2 - 1 5OJ 15a> 25o) (5(D)' A 0) - C0Q ( 1 5 O J ) 2 - 1 (25o)) 2 - 1 2 5 . ( 4 . 1 0 ) H e n c e , t h e a c c u r a c y o f t h e phase t a n g e n t e s t i m a t e can be c h e c k e d by u s i n g t h r e e t e s t s i g n a l s and t h e symmetry p r o p e r t y . By t a k i n g a d v a n t a g e o f t h e p e r i o d i c w a v e f o r m , n o i s e can be a v e r a g e d o u t . E s t i m a t e s o f t h e phase t a n g e n t s w i t h s i m u l a t e d n o i s y d a t a i s shown i n T a b l e 4 . 2 . The n o i s e was s i m u l a t e d by g e n e r a t i n g random num-b e r s w i t h a u n i f o r m p r o b a b i l i t y d i s t r i b u t i o n . S u f f i c i e n t a v e r a g i n g w i l l d i m i n i s h t h e n o i s e e r r o r s . The p a r a m e t e r e s t i m a t e s d e t e r m i n e d f rom a t e s t s i g n a l o f to^ = 0 . 9 0 3 r a d . / s a r e shown i n T a b l e s 4 . 3 . E r r o r s i n e s t i m a t i o n a r e s t r o n g l y dependen t on e r r o r s o f t h e phase t a n g e n t e s t i m a t e s . A more s o p h i s t i c a t e d a l g o r i t h m w o u l d u s e w e i g h t i n g f a c t o r s . I n t h e example shown, t a n 0 5 i s s u b j e c t t o t h e most i n a c c u r a c y . Those e q u a t i o n s o f ( 4 . 7 ) and ( 4 . 8 ) w h i c h a r e more dependen t on t a n 0 5 s h o u l d be w e i g h t e d l e s s . I n t h e e x a m p l e , ( 4 . 7 B ) i s t h e most i n f l u e n c e d by t a n 0 5 . E l i m i n a t i n g t h i s e q u a t i o n i m p r o v e s t h e a c c u r a c y s i g n i f i c a n t l y . A d e t a i l e d i n v e s t i g a t i o n o f w e i g h t i n g t h e e q u a t i o n s i s b e y o n d t h e s c o p e o f t h i s w o r k . 58 Phase Tangen t V a l u e s D e t e r m i n e d f r o m T e s t I n p u t A c t u a l S y s t e m P a r a m e t e r s : y =1> P =0.5, CJ =1.0 3 P P P T e s t i n p u t : u = l , 0 <_ t <_ — , h a l f p e r i o d T h e o r e t i c a l Computed-No n o i s e Trad./ s e c ] t a n 9 1 t a n t a n t a n 0 1 t a n 6 3 t a n 0 5 20. 0 .0501 .167 .0100 .0497 .0161 .0096 15. 0 .0670 .0222 .0133 .0667 .0218 .0129 10. 0 .1010 .0334 .0200 .1001 .0327 .0194 4. 0 .2667 .0839 .0501 .2644 .0823 .0490 3. 0 .3750 .1125 .0667 .3720 .1104 .0651 2. 0 .6667 .1714 .1010 .6617 .1682 .0991 1. 5 1.200 .2338 .1357 1.191 .2295 .1332 1. 1. 25 0 903 2.222 1 0 -4.879 .2871 .3750 .4275 .1642 .2083 .2330 2.205 i n d e t e r -m i n a t e -4.835 .2819 .3682 .4198 .1612 .2050 .2283 75 -1.714 .5538 .2871 -1.677 .5437 .2819 5 - .6667 1.200 .4762 (^~.5730> 1.173 .4675 25 - .2667 -1.714 2.222 (J^70423) -1.772 2.148 1 - .1010 - .3297 - .6667 (=~76j30p (f .2232) - .6544 05 - .0501 - .1535 -,.2667 (^T5l84) (^.1069) C- -1713> C o m p u t e d - N o i s e Variance=0.0115 .903 -4.879 .4275 .2330 -4.850 .4172 .2216 -4.833 .4154 .1133 -4.844 .4351 .2663 • -4.810 .4297 .2688 T a b l e 4.1 Determing Phase Tangents by Averaging Noisy Data co =1.0, p =0.5 P P U!=0.903 * Noi. of Samples tan 0 1 tan 9 3 tan 0 5 Noise Variance N/A -4.835 .4198 .2283 0 4 -4.839 .4125 .2704 .0115 8 -4.838 .4198 .2426 .0115 12 -4.837 .4176 .2156 .0115 12 -4.838 .4154 .2021 .0231 20 -4.835 .4236 .2389 .0231 8 -4.842 .4136 .3650 .0346 15 -4.837 .4121 .2053 .0346 30 -4.834 .4227 .2246 .0346 Table 4.2 Parameter Estimations Noise Variance=.0346, 30 samples Table 4.3A Estimates w 2 P (to =1.037) P P * P (to =.999) P Equation Used .1.000 0.672 0.494 (4. 7A)., (4 . 8A) 1.232 0.471 0.495 (4.7B),(4.8B) 0.995 0.463 0.482 (4.7C),(4.8C) 1.075 0.553 0.490 Average 0.999 N/A 0.490 Average of A & C for U p 2 Parameter Estimations No Noise Table 4.3B Estimates Equation Used - 2 CO P p (w =1.001) P P 0.998 0.496 (4.7A),(4.8A) 1.012 0.491 (4.7B),(4.8B) 0.998 0.490 (4.7C),(4.8C) 1.003 0.492 Average 4 . 3 C o n c l u s i o n F o r The WFPI T e c h n i q u e I n v e s t i g a t i o n o f t h i s t y p e o f p a r a m e t e r i d e n t i f i c a t i o n has o n l y been begun r e c e n t l y . The p r e l i m i n a r y i n v e s t i g a t i o n s have b e e n p r o m i s i n g . I t seems t h a t any f r e q u e n c y t h a t e x c i t e s t h e s y s t e m b e f o r e s t e a d y s t a t e i s r e a c h e d , b u t g i v i n g enough t i m e f o r s i g n i f i c a n t t r a n s i e n t s t o o c c u r i s a d e q u a t e . An i t e r a t i v e l e a s t s q u a r e s p r o c e d u r e f o r r a t i o n a l f u n c t i o n c u r v e f i t t i n g t o d e t e r m i n e a t r a n s f e r f u n c t i o n f r o m phase f r e q u e n c y r e s p o n s e has b e e n p r o p o s e d [ 2 3 ] . A t r a n s f e r f u n c t i o n can be w r i t t e n i n t e rms o f even and odd f u n c t i o n s o f co 2 . Q(co 2) + jcoP(co 2) H(jai ) = — ( 4 . 1 1 ) U(co 2 ) The phase t a n g e n t i s coP(co2) ( p 0 + P i c o 2 + • • • pMco 2^)io tanG(co) = = 2 N ( 4 . 1 2 ) Q(co 2) q 0 + q l t o 2 + • • • qNco G i v e n t h e phase r e s p o n s e d a t a t a n 6 o f a l i n e a r s y s t e m , an i t e r a -t i v e l e a s t s q u a r e s r a t i o n a l a p p r o x i m a t i o n p r o c e d u r e can be u s e d t o f i n d P ( c o 2 ) / Q ( c o 2 ) . The t r a n s f e r f u n c t i o n can t h e n be o b t a i n e d f r o m t h i s f u n c t i o n . T h i s method i s n o t v e r y a p p l i c a b l e f o r m i c r o p r o c e s s o r c o n t r o l s y s t e m s b e c a u s e i t i n v o l v e s e x t e n s i v e f r e q u e n c y r e s p o n s e t e s t s and l e a s t s q u a r e s c u r v e f i t t i n g . A g e n e r a l i z a t i o n o f WFPI t o h i g h e r o r d e r s y s t e m s has been p r o p o s e d . I t i s p o s s i b l e t o d e t e r m i n e more phase t a n g e n t s more a c c u r a t e l y t o i d e n t i f y h i g h e r o r d e r s y s t e m s [ 1 3 ] , I n s t e a d o f u s i n g a F o u r i e r s e r i e s , t h e o u t p u t r e s p o n s e i s expanded i n t o a W a l s h f u n c t i o n s e r i e s e x p a n s i o n i n t h e f o r m o f c ( t ) = a i x ! + a 3 x 3 + a 5 x 5 + • • • ( 4 . 1 3 ) + b1y1 + b 3 y 3 + b 5 y 5 + • • • where x , y a r e t h e s i n e and c o s i n e t y p e W a l s h f u n c t i o n s d e s c r i b e d i n S e c t i o n 4 . 1 and a , b a r e t h e e x p a n s i o n c o e f f i c i e n t s . These c o e f f i c i e n t s can be d e t e r m i n e d by c o r r e l a t i o n f u n c t i o n s . The phase t a n g e n t s can t h e n be d e t e r m i n e d by u s i n g t h e c o e f f i c i e n t s . U s i n g t h e phase t a n g e n t s , a s y s t e m o f e q u a t i o n s t h a t i s l i n e a r i n t h e p a r a m e t e r s can be d e r i v e d . F o r e x a m p l e , t h e p a r a m e t e r s o f a t h i r d o r d e r s y s t e m can be found by s o l v i n g , / t an9} t a n 9 3 O J 3 t a n 0 5 015 where H ( s ) P r o p o s a l s f o r m a k i n g use o f m a g n i t u d e i n f o r m a t i o n t o d e c o u p l e t h e even and odd p a r a m e t e r s o f a t r a n s f e r f u n c t i o n and e s t i m a t i n g t i m e d e l a y have been a l s o made [ 1 3 ] . -co.^tanO 1 - t o 3 2 t a n e 3 - c o c 2 t a n 9 q / 3 \ a i = c o 3 3 ( 4 . 1 4 ) a 2 C O S 3 ) s 3 + a 2 s 2 + a^s + a 0 ( 4 . 1 5 ) 5 . IMPLEMENTATION STUDIES The f e a s i b i l i t y o f i m p l e m e n t i n g t h e a d a p t i v e c o n t r o l a l g o r i t h m s w i l l be shown and t e s t s w i t h a l a g c o m p e n s a t i o n p r o g r a m and an i n t e g r a -t i o n p rog ram f o r t h e WFPI t e c h n i q u e w i l l be c a r r i e d o u t . 5 . 1 F e a s i b i l i t y o f I m p l e m e n t a t i o n A l i s t o f a p p l i c a t i o n s o f . a d a p t i v e c o n t r o l sy s t ems can be found i n r e f . [ 3 0 ] . Many i m p l e m e n t a t i o n s have been o f t h e t y p e where a c o n -v e n t i o n a l c o n t r o l l e r s u c h as P I D , l e a d - l a g c o m p e n s a t o r s o r v a r i a t i o n s o f t h e s e a r e s e l f t u n i n g . The e f f e c t i v e n e s s o f c o n v e n t i o n a l c o n t r o l l e r s and t h e i r v a r i a n t s have been i n v e s t i g a t e d by many r e s e a r c h e r s . A s e l f t u n i n g PID c o n t r o l l e r was i n v e s t i g a t e d i n r e f e r e n c e s [ 4 , 5 ] . D i g i t a l i m p l e m e n t a t i o n o f P ID does n o t a t t a i n t h e same q u a l i t y as a n a l o g PID and a v a r i a n t s u c h as s t a t e v e c t o r f e e d b a c k w i t h i n t e g r a l a c t i o n was p r o p o s e d and i n v e s t i g a t e d [ 4 ] . E x t e n s i v e w o r k was done on s e l f - t u n i n g c o n t r o l l e r s b a s e d on t h e minimum v a r i a n c e r e g u l a t o r - a c o n t r o l a l g o r i t h m d e v e l o p e d f o r s e t p o i n t c o n t r o l o f d i s c r e t e - t i m e - r a n d o m l y - d i s t r i b u t e d sys t ems [ 1 6 , 1 9 , 3 1 ] . An a d a p t i v e ( s e l f - t u n i n g ) c o n t r o l l e r c a n be i m p l e m e n t e d b a s e d on t h e s t r a t e g y o u t l i n e d i n F i g u r e 1 . 1 . The m a i n w o r k c o v e r e d so f a r has been t h e d e v e l o p m e n t o f t h e t e c h n i q u e s f o r p a r a m e t e r e s t i m a t i o n and c o n t r o l p a r a m e t e r t u n i n g . The c o n t r o l l e r s t h e m s e l v e s a r e c o n v e n t i o n a l , h a v i n g t h e i r d e v e l o p m e n t b a s e d on the h i s t o r y o f a n a l o g c o n t r o l . D e s p i t e t h e f a c t t h a t d i g i t a l c o n t r o l l e r s c o u l d be " b e t t e r " u t i l i z e d , t h e r e i s s t i l l u s e f u l n e s s i n u t i l i z i n g t h e c o n v e n t i o n a l c o n t r o l a l g o r i t h m s , m a i n l y b e c a u s e o f t h e i r i n s e n s i t i v i t y , s i m p l i c i t y and f a m i l i a r i t y . The e f f e c t i v e n e s s on c o n v e n t i o n a l c o n t r o l l e r s has been s t u d i e d b e f o r e . [ 3 , 5 , 2 8 ] C o m m e r c i a l s u c c e s s t o d a t e , w i t h uP c o n t r o l u s i n g c o n v e n t i o n a l a l g o r i t h m s has been d e m o n s t r a t e d w i t h s u c h s y s t e m s as t h e TDC-2000 s y s t e m [11] and o t h e r s . A d a p t i v e v e r s i o n s o f t h e s e have y e t t o be w i d e l y u s e d . The q u e s t i o n may a r i s e , how f e a s i b l e i s i t t o i m p l e m e n t a d a p t i v e a l g o r i t h m s o n - l i n e , i n p a r t i c u l a r , t o imp lemen t them w i t h a m i c r o p r o c e s -s o r ? The answer i s h a r d t o p r e d i c t b e f o r e an a c t u a l i m p l e m e n t a t i o n has been done . I t depends on many f a c t o r s s u c h as t h e m i c r o p r o c e s s o r u s e d , t h e a l g o r i t h m s (and o p t i o n s ) u sed and how t h e y a r e i m p l e m e n t e d . S t i l l , i t i s p o s s i b l e t o e s t i m a t e e x e c u t i o n t i m e and p r o g r a m s i z e u s i n g c e r t a i n a s s u m p t i o n s . The t a r g e t m i c r o p r o c e s s o r i s assumed t o be a TMS 9900 w i t h a 3 M Hz c l o c k . T a b l e 5 . 1 shows t h e p e r f o r m a n c e e s t i m a t e s f o r t h e v a r i o u s a l g o r i t h m s . These e s t i m a t e s were d e r i v e d i n t h e f o l l o w i n g manner . The number o f a r i t h m e t i c i n s t r u c t i o n s r e q u i r e d was t o t a l l e d f rom t h e f l o w c h a r t s . The number o f c l o c k c y c l e s was u s e d t o o b t a i n a t i m e [ 3 2 ] . These t i m e s w i l l n o t be p r e c i s e s i n c e o t h e r o p e r a t i o n s s u c h as s c a l i n g , r e g i s t e r t r a n f e r s , b r a n c h e s and memory a c c e s s e t c . a r e r e q u i r e d . Based on t h e e x e c u t i o n t i m e o f t h e l a g c o m p e n s a t o r p r o g r a m a c t u a l l y w r i t t e n , t h i s f a c t o r was e s t i m a t e d t o be a p p r o x i m a t e l y 5 . 5 . The l i n e s o f m a c h i n e code r e q u i r e d was s i m i l a r l y e x t r a p o l a t e d f rom t h e w r i t t e n c o m p e n s a t o r p r o g r a m . I t s h o u l d be n o t e d t h a t t h e e s t i m a t e s do n o t i n c l u d e d a t a a c q u i s i t i o n , o p e r a t i n g i n t e r f a c i n g and o t h e r p e r i p h e r a l o p e r a t i o n s p a r t i c u l a r t o an e n t i r e c o n t r o l s y s t e m . S e l f t u n i n g c o u l d be p e r f o r m e d i n a few s e c o n d s a f t e r open l o o p measurements have been o b t a i n e d . I f d a t a were t o be s t o r e d i n RAM, i t P e r f o r m a n c e E s t i m a t e s A l g o r i t h m ( R e f e r t o A p p e n d i x ) E x e c u t i o n Time ( G e n e r a l ) [ms] P r o b a b l e T o t a l E x e c u t i o n Time [ms] L i n e s o f M a c h i n e Code Comments and A s s u m p t i o n s A . l 4 + 6 . 2 5 / i t e r a t i o n 28 1025 3 i t e r a t i o n s f o r c o n v e r -gence A . 2 6 6 600 One s t e p A . 3 1 . 5 + 6 . 5 / i t e r a t i o n 28 800 4 . i t e r a t i o n s f o r c o n v e r -gence B . l 4 / k n o t + ( . 3 / d a t a ) N + 2 / s p l i n e i n t e r - r v a l 358 625 N=# o f t i m e s o f s m o o t h i n g 10 k n o t s , 9 s p l i n e i n t e r -v a l s , 1000 p t s . o f d a t a , N = l B . 2 . 2 5 + 1 . 5 / d a t a 1 ,500 175 1000 d a t a p t s . C ( I n t e g r a l segments ) l + 3 0 h ( . 1 5 ) p e r h a l f p e r i o d N / A . 50 h=# o f s amp le s p e r i n t e g r a l segment C ( c o n t i n u e d ) 4 12 920 t e s t w i t h 3 s i g n a l s P I D D . 5 / d a t a N / A 50 done e v e r y Sample Compensa to r D . 5 / d a t a N / A 50 done e v e r y Sample T a b l e 5 . 1 c o u l d be s a m p l e d i n t i m e i n c r e m e n t s as s h o r t as a p p r o x i m a t e l y 100 y s . A t y p i c a l a d a p t i v e PID c o n t r o l l e r may use a l g o r i t h m s A . 2 , B . l and B . 2 so t h a t t h e a c t u a l c o n t r o l p a r t o f a p r o g r a m w o u l d be s l i g h t l y l o n g e r t h a n 1 K w h i c h can be e a s i l y accommodated i n a y P . I t i s assumed t h a t 16 b i t i n t e g e r d a t a i s a c c e p t a b l e . I n c r e a s i n g t h e p r e c i s i o n w o u l d s i g n i f i c a n t l y i n c r e a s e b o t h e x e c u t i o n t i m e and memory r e q u i r e m e n t . A d m i t t a b l y u s i n g a TMS 9900 makes i m p l e m e n t a t i o n a t t r a c t i v e b e c a u s e i t i s a 16 b i t m a c h i n e w i t h h a r d w a r e m u l t i p l y and d i v i d e . To see how t h i s has an e f f e c t , a c o m p a r i s o n can be made w i t h a P ID c o n t r o l l e r u s i n g a M o t o r o l a 6 8 0 0 [ 2 8 ] . T h i s i s an 8 b i t m a c h i n e . 2 ' s complement a r i t h m e t i c was p e r f o r m e d u s i n g 16 b i t i n t e g e r s . 12 b i t s were s e l e c t e d f r o m t h e computed r e s u l t t o be an o u t p u t t o a D / A . T h i s c o n t r o l l e r r e q u i r e d an a v e r a g e o f 7 ms t o p e r f o r m c a l c u l a t i o n s u s e d i n t h e PID a l g o r i t h m , m a i n l y b e c a u s e m u l t i p l i c a t i o n had t o be p e r f o r m e d i n s o f t w a r e . When c o m p a r i n g t h i s t o t h e e s t i m a t e d e x e c u t i o n t i m e f o r u s i n g t h e TMS 9900 i t c a n be s e e n t h a t t h e t u n i n g a l g o r i t h m s w o u l d be v e r y l o n g . When d e s i g n i n g a yP c o n t r o l l e r , one i m p o r t a n t q u e s t i o n i s w h i c h one t o u s e . S i n c e c o n t r o l l e r s o p e r a t e i n r e a l t i m e , t h e y must be c a p a b l e o f d o i n g n u m e r i c a l a l g o r i t h m s and I / O o p e r a t i o n s e f f i c i e n t l y . Many m i c r o p r o c e s s o r s a r e a v a i l a b l e and many t r a d e o f f s w o u l d be r e q u i r e d i n o r d e r t o make a c h o i c e [ 1 , 2 9 ] . The yP c h o s e n was t h e Texas I n s t r u m e n t s TMS 9 9 0 0 . The m a i n f a c t o r f o r t h i s c h o i c e was t h e f a c t t h a t i t was r e a d i l y a v a i l a b l e and has a good m o n i t o r i n g s y s t e m (TIBUG) f o r d e b u g g i n g and an a s s e m b l e r ( T e k t r o n i x 8002 y P r o c e s s o r L a b ) . O t h e r a d v a n t a g e s a r e i t s 16 b i t w o r d l e n g t h g i v i n g g r e a t e r a c c u r a c y , and t h e h a r d w a r e m u l t i p l y and d i v i d e . T h i s r e d u c e s s o f t w a r e c o m p l e x i t y and e x e c u t i o n t i m e as m e n t i o n e d p r e v i o u s l y . 5 . 2 T e s t o f uP Programs Two programs were w r i t t e n and r u n u s i n g o f f - l i n e d a t a . One p r o g r a m was t h e l e a d - l a g c o m p e n s a t i o n n e t w o r k m e n t i o n e d p r e v i o u s l y . The o t h e r was a p r o g r a m t o compute t h e i n t e g r a l segments ( I o f e q n . ( 4 . 9 ) ) f o r W F P I . The c o m p e n s a t o r p r o g r a m was u s e f u l i n e s t i m a t i n g t h e r e q u i r e m e n t s f o r i m p l e m e n t i n g t h e o t h e r a l g o r i t h m s . A d a t a a c q u i s i t i o n s y s t e m w o u l d be r e q u i r e d to t e s t i t i n r e a l t i m e . An o f f - l i n e t e s t was p e r f o r m e d b y r u n n i n g a s i m u l a t i o n o f a s e r v o m o t o r u s i n g op t imum s e t t i n g s as d e t e r m i n e d by t h e GGP a l g o r i t h m . The s e r v o m o t o r u sed has a t i m e c o n s t a n t o f x -P 10 ms. The c o n t r o l p a r a m e t e r s u sed were A x = 0 . 9 4 7 4 , A 2 = 0 . 7 3 6 6 , A 3 = 0 . 3 8 2 1 The s e r v o r e s p o n s e was t h e n l o a d e d i n t o ROM. The c o m p e n s a t o r p r o g r a m r e a d s t h i s d a t a e v e r y 1 ms, i e a s i m u l a t e d s a m p l i n g f rom an A / D . The computed c o n t r o l l e r o u t p u t s were l i s t e d i n RAM g i v i n g c l o s e r e s u l t s t o t he s i m u l a t i o n r e s u l t s . T r u n c a t i o n e r r o r was r e s p o n s i b l e f o r t h e d i f f e r e n c e s . The WFPI p r o g r a m was t e s t e d i n a s i m i l a r manner . D a t a was g e n e r a -t e d by a 2nd o r d e r s y s t e m s i m u l a t i o n w i t h n o i s e . The d a t a was c o n v e r t e d i n t o s c a l e d h e x a d e c i m a l i n t e g e r s and l o a d e d i n t o ROM. The i n t e g r a l segments were computed by t h e uP p r o g r a m . The c o r r e l a t i o n f u n c t i o n s and phase t a n g e n t s were computed o f f - l i n e u s i n g t h e s e v a l u e s by t h e method d e s c r i b e d i n C h a p t e r 4 . I t was t e s t e d u s i n g 16 and 12 b i t ( t r u n -c a t e d ) d a t a s i n c e a d a t a a c q u i s i t i o n s y s t e m c o u l d be t y p i c a l l y 12 b i t s . The r e s u l t s a r e shown i n T a b l e 5 . 2 . T r u n c a t i o n e r r o r s due t o a p p r o x i m a t e r e p r e s e n t a t i o n o f i n t e g r a l s by sums were found to be s i g n i f i c a n t . A s i m p l e t e c h n i q u e was u s e d t o c o r r e c t f o r t h i s . G i v e n t h a t t h e r e a r e H sample s t o be summed t o o b t a i n an i n t e g r a l s egmen t , t h e t r u n c a t i o n e r r o r o f t h e sum w i l l be be tween 0 and H b e c a u s e e a c h sample w i l l have an e r r o r be tween 1. and 0 . S i n c e t r u n c a t i o n s h o u l d o n l y o c c u r f o r r o u n d i n g o f f d e c i m a l < O.5. , t h e a v e r a g e t r u n c a t i o n e r r o r o f t h e sum w i l l be H / 2 . H e n c e , c o r r e c t i o n c a n be done by a d d i n g s H / 2 t o each segment where s i s t h e s i g n o f t h e i n t e g r a l segment . One can c o n c l u d e t h a t i t i s f e a s i b l e t o imp lemen t t he o p t i m i z i n g and i d e n t i f i c a t i o n a l g o r i t h m s i n p r e s e n t s t a t e o f t h e a r t m i c r o p r o c e s s o r s . (1979) Phase T a n g e n t s D e t e r m i n e d w i t h t h e TMS 9900 A c t u a l Sys t em P a r a m e t e r s : y =1 , ? = 0 . 5 , to =1 .0 P P P T e s t i n p u t : u = l , 0 <_ t < ^ - cox TT 2TT - 1 , <t< co^  COl N o i s e : V a r i a n c e o f 0 . 0 1 1 5 Case t a n t a n 0 3 t a n 6 5 T h e o r e t i c a l - 4 . 8 7 9 ,428 .233 S i m u l a t i o n - 4 . 8 5 0 .417 . 222 yP R e s u l t s 16 B i t D a t a , T r u n -c a t i o n C o r r e c t i o n - 4 . 8 6 4 .402 .219 No T r u n c a t i o n C o r r e c t i o n - 4 . 8 4 6 .535 . 060 12 B i t D a t a , T r u n -c a t i o n C o r r e c t i o n - 4 . 8 8 5 .400 . 221 No T r u n c a t i o n C o r r e c t i o n - 4 . 8 6 6 . 531 ; 0 6 5 T a b l e 5 . 2 CONCLUSIONS The a l g o r i t h m s f o r o p t i m i z a t i o n and i d e n t i f i c a t i o n as l i s t e d i n t h e a p p e n d i c e s a r e r e l a t i v e l y s i m p l e t h o u g h t h e o f f - l i n e a n a l y s i s and p r o g r a m d e s i g n i s somewhat c o m p l e x . By m a k i n g use o f t h e s e a l g o r i t h m s , a c o n v e n t i o n a l c o n t r o l l e r can be s e l f - t u n i n g , hence a d a p t i v e . G e n e r a l i z e G e o m e t r i c P rog ramming (GGP) c o n v e r g e s r a p i d l y when c a l c u l a t i n g op t imum c o n t r o l l e r s e t t i n g s g i v e n k n o w l e d g e o f t h e p l a n t s y s t e m p a r a m e t e r s . The W a l s h F u n c t i o n P a r a m e t e r I d e n t i f i c a t i o n (WFPI) method i s good f o r p a r a m e t e r e s t i m a t i o n f o r s e c o n d o r d e r s y s t e m s . C u b i c s p l i n e a p p r o x i m a -t i o n s seem t o be l e s s a c c u r a t e f o r p a r a m e t e r e s t i m a t i o n . I m p l e m e n t a t i o n o f t h e s e a l g o r i t h m s seems to be f e a s i b l e f o r m i c r o p r o c e s s o r b a s e d c o n -t r o l l e r s . U s u a l l y , i n v e s t i g a t i o n s l e a d t o f u r t h e r i n v e s t i g a t i o n s and t h e s u b j e c t o f c o n t r o l a l g o r i t h m s i s no e x c e p t i o n . F u r t h e r work can be c a r r i e d o u t u s i n g GGP. T h e r e i s t he p o s s i b i l i t y o f u s i n g d i f f e r e n t c o n s t r a i n t s , s u c h as l i m i t i n g t h e maximum o v e r s h o o t . O p t i m i z i n g o t h e r c o n t r o l l e r s may a l s o be i n v e s t i g a t e d . Due t o m i n o r i n a c c u r a c i e s o f c u b i c s p l i n e f i t t o a 2nd o r d e r s y s t e m , i t w o u l d be i n t e r e s t i n g t o see i f a s i m p l e s y s t e m can be r e p r e s e n t e d a c c u r a t e l y by a c u b i c s p l i n e . Q u i t e a c c u r a t e r e s u l t s were o b t a i n e d when e s t i m a t i n g t h e t i m e c o n s t a n t f o r a f i r s t o r d e r s y s t e m . The r e a s o n f o r a c c u r a t e r e s u l t s i s t h a t t h e h i g h e r o r d e r s p l i n e c o e f f i c i e n t s CQ and C j ( i e x and y ) a r e q u i t e a c c u r a t e b u t t h e h i g h e r o r d e r ones a r e s u b j e c t t o s i g n i f i c a n t i n a c c u r a c y . H i g h e r o r d e r sy s t ems r e q u i r e t h e s e c o e f f i c i e n t s i n o r d e r t o s o l v e t h e e q u a t i o n s f o r t h e i r c o e f f i c i e n t s . I t w o u l d seem l i k e l y t h a t more a c c u r a t e c o e f f i c i e n t s , hence h i g h e r o r d e r s p l i n e s a r e needed f o r e s t i m a t i n g h i g h e r o r d e r s y s t e m s . U n f o r t u n a t e l y , t h i s w o u l d r e s u l t i n a more complex a l g o r i t h m . O t h e r v a r i a t i o n s s u c h as s p e c i f y i n g t h e e n d p o i n t d e r i v a t i v e s o f c u b i c s p l i n e s c o u l d be t r i e d . I n g e n e r a l , p a r a m e t e r i d e n t i f i c a t i o n u s i n g WFPI seems t o be more p r o m i s i n g . E x t e n s i o n s and g e n e r a l i z a t i o n s f o r h i g h e r o r d e r sy s t ems b a s e d on e q u a t i o n s ( 4 . 1 3 ) and ( 4 . 1 4 ) as m e n t i o n e d i n t h e c o n c l u s i o n o f C h a p t e r 4 c o u l d be f u r t h e r i n v e s t i g a t e d . O n l y phase i n f o r m a t i o n was u sed and no a t t e m p t was made t o make use o f o u t p u t m a g n i t u d e as m e n t i o n e d i n C h a p t e r 4 . T h i s c o u l d a l s o be f u r t h e r i n v e s t i g a t e d as w e l l as l o o k -i n g f o r ways t o d e t e r m i n e t i m e d e l a y . R e g a r d i n g t h e e f f e c t i v e n e s s o f r e a l l i f e i m p l e m e n t a t i o n , a d e f i n i t e answer c a n o n l y be g i v e n i f i t i s t r i e d f o r a r e a l p h y s i c a l p r o c e s s , t h o u g h no i n s u r m o u n t a b l e p r o b l e m i s f o r e s e e n . 72 REFERENCES [1] A n d r e w s , M . , " I n f l u e n c e o f A r c h i t e c t u r e on N u m e r i c a l A l g o r i t h m s " M i c r o p r o c e s s o r s , V o l . 2 , N o . 3 , June 1 9 7 8 . [2] A s t r d m , K . J . , W i t t e n m a r k , B . , " P r o b l e m s o f I d e n t i f i c a t i o n and C o n t r o l " , J o u r n a l o f M a t h e m a t i c a l A n a l y s i s and A p p l i c a t i o n s , V o l . 3 4 , 1 9 7 1 . [3] A u s l a n d e r , D . M . , T a k a h a s h i , Y . , T o m i z u k a , M . , " D i r e c t D i g i t a l P r o c e s s C o n t r o l : P r a c t i c e and A l g o r i t h m s f o r M i c r o p r o c e s s o r A p p l i c a t i o n " , P r o c . o f t h e I E E E , V o l . 6 6 , N o . 2 , 1 9 7 8 . [4] A u s l a n d e r , D . M . , T a k a h a s h i , Y . , T o m i z u k a , M . , " P r o c e s s C o n t r o l E x p e r i e n c e and a S e l f - T u n i n g Method f o r a D i s c r e t e - T i m e , F i n i t e Time S e t t l i n g C o n t r o l l e r / O b s e r v e r " , J o u r n a l o f Dynamic S y s t e m s , M e a s u r e m e n t , and C o n t r o l , T r a n s . ASME, S e r i e s G , V o l . 9 9 , N o . 3 , S e p t . 1 9 7 7 . [5] A u s l a n d e r , D . M . , T a k a h a s h i , Y . , T o m i z u k a , M . , " S i m p l e D i s c r e t e C o n t r o l o f I n d u s t r i a l P r o c e s s e s " , J o u r n a l o f Dynamic S y s t e m s , M e a s u r e m e n t , and C o n t r o l " , T r a n s . ASME, S e r i e s F , V o l . 9 7 , N o . 4 , D e c . 1 9 7 5 . [6] A v r i e l , M . ( E d i t o r ) , " S p e c i a l I s s u e on G e o m e t r i c P r o g r a m m i n g " , J o u r n a l o f O p t i m i z a t i o n T h e o r y and A p p l i c a t i o n s , V o l . 2 6 , N o . 1 , S e p t . 1 9 7 8 . [7] A v r i e l , M . , Dembo, R . , P a s s y , U . , " S o l u t i o n o f G e n e r a l i z e d G e o m e t r i c P r o g r a m s " , I n t . J o u r n a l F o r N u m e r i c a l Methods i n E n g i n e e r i n g , V o l . 9 , 1 9 7 5 . [8] B a l a t o n i , N . A . , S h r i d h a r , M . , " A p p l i c a t i o n o f C u b i c S p l i n e s To Sys t em I d e n t i f i c a t i o n " , T e c h n i c a l Memorandum - 1 8 , D e p t . o f E l e c t r i c a l E n g i n e e r i n g , U n i v e r s i t y o f W i n d s o r . [9] B a l a t o n i , N . , S h r i d h a r , M . , " A G e n e r a l i z e d C u b i c S p l i n e T e c h n i q u e f o r I d e n t i f i c a t i o n o f M u l t i v a r i a b l e S y s t e m s " , J o u r n a l o f Mathema-t i c a l A n a l y s i s and A p p l i c a t i o n s , V o l . 4 7 , 1 9 7 4 . [10] B e l l m a n , R . , R o t h , R . S . , "The Use o f S p l i n e s w i t h Unknown End P o i n t s i n t h e I d e n t i f i c a t i o n o f S y s t e m s " , J o u r n a l o f M a t h e m a t i c a l A n a l y s i s and A p p l i c a t i o n s , V o l . 3 4 , 1 9 7 1 . [11] B i b b e r o , R . J . , M i c r o p r o c e s s o r s i n I n s t r u m e n t s and C o n t r o l , J o h n W i l e y & S o n s , I n c . , 1 9 7 7 . [12] B o h n , E . V . , P r i v a t e C o m m u n i c a t i o n R e f e r r i n g t o G e n e r a l i z e d G e o m e t r i c P r o g r a m m i n g , 1 9 7 8 - 1 9 7 9 . [13] B o h n , E . V . , P r i v a t e C o m m u n i c a t i o n R e f e r r i n g t o W a l s h F u n c t i o n P a r a m e t e r I d e n t i f i c a t i o n , 1 9 7 9 . 73 [14] C a r v e r , J . L . , " A p p l i c a t i o n o f G e o m e t r i c P rog ramming t o PID C o n t r o l l e r T u n i n g W i t h S t a t e C o n s t r a i n t s " , M . A . S c i . T h e s i s , D e p t . o f E l e c t r i c a l E n g i n e e r i n g , 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 , J u l y 1 9 7 6 . [15] C h e n , C - F . , H s i a o , C - H . , " D e s i g n o f P i e c e w i s e C o n s t a n t s G a i n s f o r O p t i m a l C o n t r o l v i a W a l s h F u n c t i o n s " , I E E E T r a n s . On A u t o m a t i c C o n t r o l , A C - 2 0 , N o . 5 , O c t . 1 9 7 5 . [16] C l a r k e , D . W. , G a w t h r o p , P . J . , " S e l f - t u n i n g C o n t r o l l e r " , P r o c . o f I E E , V o l . 1 2 2 , N o . 9 , S e p t . 1 9 7 5 . [17] D u f f i n , R . J . , P e t e r s o n , E . L . , Z e n e r , C . , G e o m e t r i c P ro ramming - T h e o r y and A p p l i c a t i o n , J o h n W i l e y & S o n s , I n c . , 1 9 6 7 . [18] F o r s y t h e , G . , M a l c o l m , M . , M 0 l e r , C . , Computer Methods f o r  M a t h e m a t i c a l C o m p u t a t i o n s , P r e n t i c e - H a l l , 1 9 7 7 . [19] G a w t h r o p , P . J . , "Some I n t e r p r e t a t i o n s o f t h e S e l f - t u n i n g C o n t r o l l e r " P r o c . o f I E E , V o l . 1 2 4 , N o . 1 0 , O c t . , 1 9 7 7 . [20] H a r r i o t t , P . , P r o c e s s C o n t r o l , McGraw - H i l l , 1 9 6 4 . [21] I r a c s o n , E . , K e l l e r , H . B . , A n a l y s i s o f N u m e r i c a l M e t h o d s , J o h n W i l e y & S o n s , I n c . , 1 9 6 6 . [22] J e l i n e k , C . 0 . , M e d i t c h , J . S . , " C o n t r o l Sys t em D e s i g n U s i n g Random S e a r c h And G e o m e t r i c P rog ramming A l g o r i t h m s " , CDC P a p e r N o . W P 4 - 5 , S c h o o l o f E n g i n e e r i n g , U n i v e r s i t y o f C a l i f o r n i a . [23] J o n g , M . T . , " D e t e r m i n a t i o n o f a T r a n s f e r F u n c t i o n f rom Phase Response D a t a " , P r o c . o f t h e I E E E , V o l . 6 7 , N o . 4 , A p r . 1 9 7 9 . [24] J o s h i , S . , Kaufman , H . , " p i g i t a l A d a p t i v e C o n t r o l l e r s U s i n g Second O r d e r M o d e l s W i t h T r a n s p o r t L a g " , A u t o m a t i c a , V o l . 1 1 , 1 9 7 5 . [25] Kaufman , H . , " O n - L i n e S t a t e E s t i m a t i o n U s i n g M o d i f i e d C u b i c S p l i n e s " I E E E T r a n s , on A u t o m a t i c C o n t r o l , V o l . A C - 2 1 , N o . 1 , 1 9 7 1 . [26] K u o , B . C . , A u t o m a t i c C o n t r o l S y s t e m s , P r e n t i c e - H a l l , I n c . , 1 9 7 5 . [27] M e n d e l , J . M . , D i s c r e t e T e c h n i q u e s o f P a r a m e t e r E s t i m a t i o n , M a r c e l D e k k e r , I n c . , 1 9 7 3 . [28] M e r g l e r , H . W . , R e e d , M . , " A M i c r o p r o c e s s o r - Based C o n t r o l S y s t e m " , I E E E T r a n s , on I n d u s t r i a l E l e c t r o n i c s and C o n t r o l I n s t r u m e n t a t i o n , V o l . I E C I - 2 1 , V o l . 3 , A u g . 1 9 7 7 . [29] R u s s e l , D . , " M i c r o p r o c e s s o r S u r v e y " , M i c r o p r o c e s s o r s , V o l . 2 , N o . 1 , F e b . 1 9 7 8 . 74 [30] S c h m i d , C , Unbehauen , H . , " S t a t u s And I n d u s t r i a l A p p l i c a t i o n Of A d a p t i v e C o n t r o l S y s t e m s " , A u t o m a t i c C o n t r o l T h e o r y and A p p l i c a t i o n , V o l . 3 , N o . 1 , J a n . 1 9 7 5 . [31] W i t t e n m a r k , B . , " A S e l f - t u n i n g R e g u l a t o r " , R e p o r t 7 3 1 1 , D i v i s i o n o f A u t o m a t i c C o n t r o l , L u n d I n s t i t u t e o f T e c h n o l o g y , A p r i l 1 9 7 3 . [32] TMS 9900 M i c r o p r o c e s s o r D a t a M a n u a l , Texas I n s t r u m e n t s I n c . , D e c . 1 9 7 6 . APPENDIX A - GGP ALGORITHMS A . l GGP A l g o r i t h m To D e t e r m i n e C o n t r o l l e r S e t t i n g s F o r P ID C o n t r o l Of A 2nd O r d e r Sys t em G i v e n a j , a 2 , Choose t , C = 0 . 5 s s D e f i n e b± = a 1 t g , b 2 = a 2 t g 2 , b 3 = b j 2 - 2b 2 b^ = b x + b 2 , b 5 = 1 + b : + b 2 , b 6 = 1 + b x 2 2 6 2 6 S t a r t i n g V a l u e s X 1 ( 0 ) = 1 + bx/2 X 2 = b j + b 2 - b ^ / 4 76 i = 1 1 I t e r a t i o n AO' ( i ) 2 x 2 x 3 + b 3 X l X 2 (1 + X X X 2 ) ( x 2 + b 3 ) &31 ( i ) _ b 5 x i - 2 b 6 X 1 2 + X ^ / 2 -bu + b 5 X x - b g X ^ + X ^ / 6 >i t 2 ( i ) X 1 X 2 X X X 2 + . 3 b 6 X 2 a 2 ( i ) _ a 3 1 ( X o 2 ) 1 + ( X o 2 ) ( a 3 1 + 6 L f 2 ) x l ( i ) 1 be +bh + b g x / 1 X J - X ^ 1 i ; / 6 2b 5 2 ( b 5 - 2 b 6 X 1 ( i - 1 ) ) + X l ( 1 - 1 ) 2 X l( i ) = e ^ x ™ + ( r - e ^ j x / 1 - 1 5 x. ( i ) x3 ( i ) l«5a 2 ( i ) 3 b 6 - X_ " b 2 X l X 2 ( 1 ) + b ; ( i ) b 9 - / b o 2 + x / 1 ^ 2 + b o x / 1 ^ Optimum i s found i f §0 x l , g l = 1 i < — i + 1 1 (x2 - b2) t s(x 2 - b2) x3 78 A . 2 A Q u i c k One S tep A l g o r i t h m To D e t e r m i n e C o n t r o l l e r S e t t i n g s F o r PID C o n t r o l Of A 2nd O r d e r Sys t em I f t h e a c c u r a c y o b t a i n e d f r o m one i t e r a t i o n i s a c c e p t a b l e , t h e n t h e f o l l o w i n g c o u l d be done 1 Choose t = — , 4a C = 0 . 5 s By r e f e r r i n g t o A p p e n d i x A . l , h ave X l( 0 ) - 1 X 2 (0) (0) 1 a 2 b 2 + — where b 2 = 4 1 6 a x 2 0 . 5 b 2 X l .X2 + b 3 . where b 3 = b ^ 2 - 2b 2 Xo-L31 2 X 2 X 3 + b 3 X 2 (1 + X 2 ) ( X 2 + b 3 ) 13 + 4 b 2 12 - 8 b 2 >42 21 13 24 a 3 1 ( X a 2 ) a 2 = (1 + Ua 2))(a 3 1 + 6^2) O i = 1 - Oc 12(&! + b 2 ) - 9 X n = X , = 3 + 4b 2 12a i 13 - X 1 X, 0 . 5 X 3 - b 2 X j X 2 + b 3 C a l c u l a t e K c > T , T ± ( A p p e n d i x A . l ) 80 A . 3 GGP A l g o r i t h m F o r S e r v o m o t o r L e a d - L a g N e t w o r k C o m p e n s a t i o n F o r d e f i n i t i o n o f v a r i a b l e s , s ee S e c t i o n 2 . 4 - 2 a X 3 + 2 a 2 X 3 + a 2 X x 2 - 2a3X_ + ak + X T X 3  X l x 3 " 1 X L X 2 _ _ G i v e n Y 2 , t ( Y 2 a l r e a d y s o l v e d f o r ) - a 1 c 3 = s c 4 = Y 2 - a 2 Y 2 - a 2 1 1 g Q = _ + x l X 2 X 3 Choose i n i t i a l X^ ' (a < X^ < 2a) Y 2 + aXi - a2 1 Xh = Xl - a ( A . 3 - 1 ) X 2 + X x 2 - 2aXi+, B = 2 a 2 X 1 X t f 2 - B + / B 2 - 4AC X 3 = -X -X1 X2 1 h l 2 a X 3 h 2 2 a 3 X -»12 2A C = - a 2 X 4 2 X 1 2 X 2 ( A . 3 - 2 ) 2 a 2 X 3 h 2 = - 2 a X 3 + + a 2 X x 2 - 2 a 3 X ! + ak + X X X 3 X i '12 >22 >25 2 a 2 X 3  x l b 2 1 + 5 2 1 - <522 - 6 2 6 '23 >26 a 2 X i 2 h 2 X l x 3 h 2 = 6 2 2 - 2<5 2 3 + &2k ~ 626 1 + 2 6 1 2 + g 6 2 a 2 = — ( 6 2 + 6 1 2 ) 02 C 4 s X U 1 - a 2 X , = Optimum found i f gg = x 2 + x l " 2 a X i + X j X 2 — 2Xj C a l c u l a t e X 3 , X 1 + , s ee ( A . 3 - 1 ) , ( A . 3 - 2 ) X , K = aX^t X ^ a = — ( X 2 - aXi+) x 3 82 APPENDIX B - P a r a m e t e r E s t i m a t i o n A l g o r i t h m s B . l P a r a m e t e r E s t i m a t i o n A l g o r i t h m U s i n g C u b i c S p l i n e s F o r x + a^x + a 2 x = ya2 , i d e n t i f y a x , a 2 s t e p i n p u t , measure r e s p o n s e ( o b t a i n x ^ ' s ) smooth d a t a x ( k + l ) = l ( x (k) + 2x (k+1) + x (k+2)) m m m c u b i c s p l i n e f i t , s t a r t i n g a t t h r e s h o l d [ see r e f . [ 1 8 ] f o r a l g o r i t h m ] i e f i n d C c o e f f i c i e n t s f o r x, = C 0 . + C i . T + C 2 . T 2 + C 3 . T 3 k u i L ± z i 3 x x . = co< - yuo 1 1 y . = c1. z. = 2 C 2 . f o r a l l s p l i n e i n t e r v a l s R 0 = 0 an = 0 a x = 0 D 0 = 0 0 I -rN+l X N Z N + 1 X N + 1 Z N V l Z N Y N + 1 Z N + 1 Y N d N + l ¥ N + I W N V l V l + \ V l = d N + l + D N aN+l " a N " ~ ( r N + l a N + V l } 1 3 l N * l " a i N " I ( V l a l N + V l } V l 3 2 N + 1 V l a i N + l 84 B . 2 E s t i m a t i o n o f Time D e l a y Have s t o r e d d a t a ( o r j u s t k n o t ) p o i n t s o f s p l i n e f i t ( x ^ ( t c ) ) - o r new measured d a t a , g i v e n a i , a 2 ( a l r e a d y e s t i m a t e d ) t = kT , T = sample t i m e , k = 0 , 1 , 2 , 3 , . . x (k ) , k r e f e r s t o a k n o t p o i n t c c c START ge t x ( k c ) , k c - x ( k + l ) = -A-i-x(k) - A 2 x ( k - 1 ) + (1 + A x + A 2 ) u 0 y i f x ( k + l ) < x (k ) c c N+1 (k - k ) T c z = z + T. N+1 END, T D = N+1 where x ( - l ) , x ( - 2 ) , z n = 0 Al = -(o+B) A 2 = a g a = e - T a = e -Tb a , b = ai ± v a ^ 2 - 4 a 2 , overdamped c a s e 85 APPENDIX C W a l s h F u n c t i o n P a r a m e t e r I d e n t i f i c a t i o n A l g o r i t h m F o r A 2nd O r d e r S y s t e m I n p u t s q u a r e wave o f f r e q u e n c y oo = c o j , p e r i o d o f T Read s y s t e m o u t p u t Do f o r e a c h T / 2 I n t e g r a t e o v e r t i m e o f T / 6 0 YES 30 I n t e g r a t i o n Segments <I:i> C o r r e l a t i o n C a l c u l a t i o n 30 X i c = E I , i = l . 1 10 20 30 x ^ c = Z I . - Z I . + Z I . ° 1 i I i = l i = l l i=21 12 18 2h 30 x s c = Z I . - Z I . + Z I . - Z I . + Z I . i = l i=7 i=13 i=19 i=25 86 15 30 y l C = 1 1 . - 1 I i = l i=16 15 25 30 yoc = H . - I I . + E I. - E I. i = l i=6 i=16 i=26 15 21 27 30 y c = E I. - E I. + E I. - E I. + E I. - E I. 5 1=1 1 i=4 1 i=10 1 i=16 1 1=22 1 1=28 1 Phase T a n g e n t s Y l c - y 3 c / 3 - y 5 c / 5 t a n 9 l = — x ^ c - x 3 c / 3 - x 5 c / 5 y 3 c y 5 c t a n 6 3 = t a n 9 5 = x 3 c x 5 c E s t i m a t e s i 2 j t a n 6 . - i j 2 t a n 6 . 2 1 3 2 P j t a n 0 . - i t a n 6 . i .1 ( i 2 ^ 2 - 6 2) r = ^ — P t a n 6 i 2a)iOJ i P i , j = 1 , 3 , 5 i * 3 APPENDIX D PID C o n t r o l and L e a d - L a g C o m p e n s a t i o n These a r e c o n v e n t i o n a l c o n t r o l schemes t h a t a r e i n s e n s i t i v e w i t h r e s p e c t t o s t a b i l i t y and a r e s i m p l e t o u s e . The d i g i t a l v e r s i o n s o f t h e s e a l g o r i t h m s a r e shown b e l o w , 2_±~\ PID C o n t r o l k u ( k ) = - k y ( k ) + k t [ r ( i ) - y ( i ) ] - k [ y ( k ) - y ( k - l ) ] p i=0 u = c o n t r o l l e r o u t p u t y = p l a n t o u t p u t r = s e t p o i n t k p , k ^ . , k ^ = p r o p o r t i o n a l , i n t e g r a l , d e r i v a t i v e p a r a m e t e r s r e s p e c t i v e l y L e a d - L a g C o m p e n s a t i o n u = A u + A . (w, - w, , ) + A„w k 1 k - l 2 k k - l 3 k , w = r - y T T K K a t . _ . _ s c . _ c A, - ' ? ' 7 T + T T + T T + T s s s where T g = s a m p l i n g t i m e and t h e a n a l o g m o d e l m o d e l i s d e s c r i b e d b y U ( S ) K (1 + errs) _ c W(S) 1 + T S 

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-0065446/manifest

Comment

Related Items