APPLICABILITY OF AKTlFlClAL INTELLIGENCE LANGUAGES TO SOLVING THE SCATTERING AND DlFFRACTION PROBLEMS USING A PERSONAL COMPUTER R M J h a , SA Bokhari, V Sudhakar and PR hlahapatra D e p a r t m e n t of Aerospace Engineering Indian Institute of Science Bangalore, 560 012 India ABSTRACT The applicability of t h e AI m a t h e m a t i c a l packages t o Eh1 theory is examined with t h e high frequency r a y - t h e o r e t i c problems a s specific examples. It is possible t o g e n e r a t e expressions in both readable and FORTRAN foriri,it so t h a t t h e Task of c o m p u t e r c o d e g e n e r a t i o n is g r e a t l y simplified. Although s o m e of t h e mathematical operations available have a limited range, the users can nevertheless employ such packages t o cross-check t h e i r rriathemat ical analyhes. Introduction T h e m a t h e m a t i c a l analysis in E&! theory o f t e n leads t o lengthy v e c t o r , tensor and dyadic expressions which a r e cunibersorne Iroin t h e coniputer c o d e g e n e r a t i o n point of view. i k v e l o p i n g coriiputer s o f t w a r e packages riianudlly is b e s e t with t h e problem of veracity of t h e codes. On t h e other hand, a n a c c u r a t e g e n e r a t i o n of t h e coniputer c o d e s is a prerequisite t o g e t t i n g t h e t h e o r e r i c a l results b e f o r e o n e could judge t h e x c u r a c y of a particuldr tlirJreticdl niodel. In t h i s p a p e r , t h e p o s s i b i l i t y of a p p l y i n g A r t i f i c i a l I n t e l l i g e n c e ( A I ) languages t o t h e EM theory is examined in order t o o v e r c o m e t h e complexity of t h e m a t h e m a t i c a l expressions involved in t h e coinputer progranrming. The example chosen for this purpose is REDUCE which i s a n AI s o f t w a r e package. Programming via Non-numeric Logic In c o n t r a s t t o t h e common higher level languages like F O R T R A N , PASCAL and BASIC etc. with which t h e s c i e n t i s t s a r e usually familiar, t h e r e exists a s e t a languages such as LISP and PROLOG which a r e essentially non-numeric in nature. Such languages a r e ideal f o r developing rule-based systems, commonly known as t h e Knowledge based Systems. O n e such e x a m p l e of t h e rule based s y s t e m s could b e niatheniatical packages which a r e c a p a b l e of g e n e r a t i n g explicit a l g e b r a i c expressions, periorining m a t h e m a t i c a l operations like d i f f e r e n t i a t i o n , integration, riiatrix inversion etc., symbolically and obtaining closed form solutions f o r s e t of simultaneous equations. R E D U C E is o n e sucli s o f t w a r e p a c k a g e which is w r i t t e n in LISP. A l ~ l i u u g l i wc' c l i u o ~ c L<I.I)CICL dh d i i e x d i i i p l v l o r tltc p u r p o x . u l lurtlier discussion, several o t h e r s o f t w a r e packages such a s M A T H C A D and MACSYMA a r e also well-known t o c a r r y o u t t h e s e operations equally well. In t h e discussion below we c o n c e n t r a t e on t h e +pIicability of ILEUUCE t o t h e EM probleirr. Thc pdrticular CH2654-2/89/0000-0738 $1.00 01989 lEEE 738 I e x a i ~ ~ p l( c~ I ~ O Z ICZ I It t i d t 01 Iiigti Ircquciicy rdy-tlieoreiic ~ : i d I y s i sZ U C ~ I clb t h u w applied i n t h e GTD and UT11 [I]. Applications to EM Theory A coiiimon f e a t u r e of most of t h e non-numeric AI languages is t h a t they c a n b e used t o g e n e r a t e explicit algebraic expressions. Exmple I : I f U then find v = u3 (1) = (al+hn) (2) In this c a s e t h e answer is returned in t h e readable f o r m a t a s 3 3 V := A *L 2 2 + 3*A *B*L 2 Wf-4 + 3*AT *LW 2 2 2 2 W + 3*A K*L W + 3*A*B *LW + 6*AXBK*L* 2 + 3 3 B XM + (3) 3 3 3*0 KW *N + 3 % K xM*N + C W 2 2 2 2 The m a t h e m a t i c a l analysis is greatly simplified by t h e options in REDUCE t o expand a s well as f a c t o r i z e t h e s e a l g e b r a i c expressions besides writing t h e m in a particular order of occurrence. While t h e capability of inlost of t h e packages t o i n t e g r a t e is necessarily limited, m o s t of t h e m can r e t u r n e l e g a n t expressions upon differentiation. This m a y b e used by t h e s c i e n t i s t s a n d engineers t o verify t h e expression t h a t they might have derived. Example 2: Cross-checking t h e expressions m*u db = chm,(4u2+a2)1/2 du au(a2u2-hin)1/2 which h a s been i n t e g r a t e d by t h e a u t h o r s as [21 It is possible t o check t h e v e r a c i t y of t h i s i n t e g r a t i o n s i n c e d i f f e r e n t i a t i n g e q ( 5 ) gives symbolically 2 2 2 2 2 W(7Em\in,U) ( H W Q ? T ( A + 4 W ) ) / ( Q . T ( A X u - H&4 )*AW) (6) which is s a m e a s equation (4). AI packages such a s REDUCE a r e o f t e n c o m p a t i b l e with o t h e r languages in t h e sense of c o m p u t e r c o d e generation. For e x a m p l e , t h e s a m e expressions which a r e b e g e n e r a t e d during t h e m a t h e m a t i c a l analysis c a n also b e obtained in t h e FORTRAN compatible form. While, e q (3) provides an e x a m p l e of t h e r e a d a b l e f o r m a t , we now present a n e x a m p l e of t h e F O R T R A N c o d e g e n e r a t i o n which has been actually used in high frequency s c a t t e r i n g problem. 739 E x a m p l e 3: To show t h e FORTRAN c o d e generation. T h e explicit expressions f o r t h e s u r f a c e m a g n e t i c fields dH,(P/S) a t t h e observation point P d u e t o a radiation s o u r c e d p ( S ) a t t h e s o u r c e point S a r e obtained in t e r m s of t h e dyadics of t h e Frenet-fryme field v e c t o r s and o t h e r r a y g e o m e t r i c p a r a m e t e r s as given below. T h e symbols a r e explained in [Ij. ks The corresponding FOKTRAN c o d e g e n e r a t e d by REDUCE for t h e x-component reads a s ANSX3=2.*BLENDS*GHFEXl*J**2*TXF*PMXS*TXS+2.*BLENDS*GHFEXl*J . * * 2*TX F* PM YS*TYS+ 2.*BL ENDS*GHFEX I *J * *2" TXF* PM Z S* TZS. GHFEXI*TRSNFC**2*J*K*BXF*PMXS*BXS*ARCLNT-GHFEXI*TRSNFCX*2 . *J*K*BXF*PMYS*BYS*ARCLNT-GHFEXl*TRSNFC**2*J*K*BXF*PhlZS* . BZS*ARCLNT-GHFEXI*TRSNFC*J*K*BXF*PMXS*TXS*ARCLNT-GHFEXI* . TlISNFC*J*K*BXF*PMYS*TYS*ARCLNT-GHFEXI*TKSNFC*J*K*BXF*PMZS *TZS*ARCLNT-GI-IFEXI*TRSNFC~J*K*TXF*PMXS*BXS*ARCLNT-CHFEXI* . TRSNFC*J*K*TXF*PhZYS*BYS*ARCLNT-GHFEXI*TRSNFC*J*K*TXF*PhlZS . *BZS*AlICLNT-GHFEXI*~*K*TXF*P~lXS*TXS*ARCLNT-GHFEXl~J*I<*TXF . *PMYS*TYS*AKCLNT-GHFEXI*J*K*TXF*PMZS*TZS*AKCLNT A N SX 2=-GS F EX I *BL EN DC*DI V F CT**2*J * * 2*BXF * Ph4 XS *BXS-C SFEX I * . BLENDC*DIVFCT**2*J**2*BXF*P~~YS*BYS-GSFEXl*BLENDC*DI\'FCT** . 2*J**2*LlXF*PIVIZS*BZSt2.*GSF~XI*BLENDC*J**2*TXF*PhlXS*T~S+2. . *GSFEXI*BLENDCXJ**2*TXF*Ph~YS*TYS+2.*GSFEXl*~LENDC*J**2* . TXF*PMZS*TZS-GSFEXIXDlVFCT**2*J*K*TXF*PMXS*TXS*ARCLNT- . GSF EX I* D IV FCT* * 2*J*K * TXF * PM YS*T YS* A R CLN T-GSFEXI* DIV FCT* * 2 . *J*K*TXF*PMZS*TZS*ARCLNT+GSFEXI*TRSNFC**2*J*K*BXF*PI\IlXSX . BX S* A R CL N T+GSFEX 1* T R SN F C* *2 *J* K * B X F * PM Y S* B Y S* A K CL NT+ . G SFEX I * TItS N FC* *2*J " I< * U>( F I'M Z S* DZS*A 13CLNTti 51' EX I* T1: 5NFC *J * . K*BXF*PMXS*TXS*ARCLNT+GSFEXI*TRSNFC*J*K*BXF*P~lL'S*TYS" . ARCLNT+GSFEXI*TRSNFC*J*K*~XF*P~ZS*TZS*ARCLNTtGSFEXI* . TRSNFC*J*K*TXF*PMXS*BXS*ARCLNT+GSFEXI"TRSNFC*J*K*TXF~P~l~ S . *BYS*ARCLNT+GSFEXI*Tl~SNFC*~*~*TXF*P~tZS*BZS*A~CLNT+GSFEXl~ . J*K*BXF*PMXS*BXS*AKCLNTt~SFEXI*J*K*BXF*P~~YS*BYS*ARCLNT+ X . GSFEXI*3*K*BXF*PMZS*BZS*AKCLNT-GSFEXI*K**2*BXF*P~lXS*BXS* 740 . ARCLNT**2-CSFEXI*I<**2*BXF*PMYS*BYS*ARCLNT**2-GSFEXI*K**2* . BXF*PMZS*BZS*ARCLNT**2-BLENDS*GHFEXI*DlVFCT**2*J**Z*BXF* . PMX~*RXS-BLENDS*GHFEXIXDIVFCT**2*J**2*BXF*PMYS~BYS-BLENDS . *C HFEXI*DIVFCT**2*J**Z*BXF*PMZS*BZS+ANSX3 ANSX I=CEXP(-J*K*ARCLNT)*DIVFCT*J*YO*ANSX2 DHMX-ANSX I/(2.*K*PI*ARCLNT**3) The authors have extensively used REDUCE t o cross-check their expressions derived for t h e ray g e o m e t r i c p a r a m e t e r s f o r t h e c o m p l e t e c l a s s of convex quadrics a s well a s several Non-Eisenhart s u r f a c e s such a s ogive [3] which a r e e x t r e m e l y i m p o r t a n t s c a t t e r e r s frorri t h e a e r o s p a c e engineeriiig point of view [&I. These ray g e o m e t r i c p a r a m e t e r s c a n b e readily used in t h e UTD analysis of t h e a n t e n n a c h a r a c t e r i s t i c s of a n t e n n a s in p r e s e n c e of convex s c a t t e r e r s . Summary In t h e high frequency ray-theoretic approach a s indeed in t h e e n t i r e field of e l e c t r o m a g n e t i c s , t h e expressions obtained at e a c h s t e p of t h e m a t h e m a t i c a l analysis a r e o f t e n q u i t e complex and unwieldy. I t is now possible t o consign most of t h e s e operations t o such AI packages a s REDUCE to a c c u r a t e l y g e n e r a t e t h e symbolic codes. Finally, once t h e analysis has been verified, t h e s a m e program c a n b e used t o g e n e r a t e t h e familiar FORTRAN codes. Hence, non-numeric logic and AI l a n g u a g e s c a n b e u s e d a s v a l u a b l e tools f o r a n t e n n a a n a l y s i s a n d d e s i g n problems. REFERENCES [ I ] P.H. Pathak and N. Wang, “Ray analysis of mutual coupling b e t w e e n a n t e n n a s on a convex surface”, IEEE Trans. Antennas & Propagat. (USA), vol. AP-29, no. 6, pp. 911-922, Nov. 1981. J h a , V . Sudhakar and N. Balakrishnan, “Kay analysis of m u t u a l coupling b e t w e e n a n t e n n a s on a g e n e r a l paraboloid of revolution (CPOR)”, Electronics L e t t e r s (CB),vol. 23, pp. 583-584, May 1987. L2] R.M. [ 3 ] P. Moon and D.E. Spencer, Field Theory Handbod<. Berlin: Springer-Verlag, 1971. [41 R.M. J h a , Surface Ray Tracing on Convex Quadrics with Applications to Mutual Coupling between Antennas on Aerospace Bodies, Ph C Dissertation. Submitted t o D e p a r t m e n t of Aerospace Engineering, Indian Institute of Science, Bangalore, India, Nov. 1988. 741