Some Problems of Optimization of Computing Process

Some Problems of Optimization of Computing Process

Copyright @ IFAC Control Applications of Optimization, SI. Petersburg, Russia, 2000 SOME PROBLEMS OF OPTIMIZATION OF COMPUTING PROCESS l Serge N. And...

1MB Sizes 1 Downloads 42 Views

Copyright @ IFAC Control Applications of Optimization, SI. Petersburg, Russia, 2000

SOME PROBLEMS OF OPTIMIZATION OF COMPUTING PROCESS l Serge N. Andrianov, Nikolaj S. Edamenko

* Faculty of Applied Mathematics-Control Processes, St. Petersburg State University, St.-Petersburg, Russia, e-mail: [email protected]

Abstract: In this report some problems appearing in any modeling process are discussed. All our reasoning are supported by beam physics examples. This approach was formed as a natural result of solution of practical problems from beam physics and demonstrated undoubted effectiveness and flexibility. Copyrightf9 2000IFAC Keywords: Computer experiments, Dynamic models, Mathematical models, Matrix algebra, Nonlinear systems, Parallel computation, Mass spectrometry.

1. INTRODUCTION

field. There is an amazingly broad range of beam parameters for different applications, and there is a correspondingly diverse set of technologies to achieve the parameters. The process of ordering and accumulation of used knowledge, decomposition of complex systems into a set of simple subsystems (real and/or virtual) must guarantee good maintainability, reason ability, and extensibility of designed codes for numerical modeling. On this step a researcher forms his understanding of practical problems under study. Evidently complexity of modern problems have to lead to necessity of using of databases and knowledge bases ideology and corresponding tools. On this phase of modeling it is necessary to pay attention to classification and systematization of used knowledge about the problem under study. Similar approach may be suggested on the phase of mathematical models forming too. Moreover, the deep mathematical formalization helps researchers to create adequate mathematical models more easy than it is done on the previous phases. Last time symbolic representation of knowledge begins to play more essential role in modern scientific researches. But as distinct from usual fields modern physical and mathematical problems demand to do complex manipulations over mathematical objects of different nature. Naturally effectiveness

The modeling process (including optlmLZation procedures) has several major phases: • the initial phase of problems formalization on physical understanding level - creation of a physical model for our problem; • construction of approximating models in confOT)1lity with experiments data - creation of a hierarchy of approximating models; • the phase of problems formalization on mathematical understanding level - creation of a hierarchy of mathematical models; • creation of computing models (including algorithms and software) realized mathematical models; • realization of the computing process for modeling and optimization - so called computing experiments; • the phase of the interpretation of computing results and testing on adequacy to the physical model. Complexity of the most modern physics problems produces rather severe restrictions for realization of all steps of our modeling process. In particular, beam accelerator research is a vast and varied II

of computer algebra methods and codes usage depends on selected mathematical methods and tools. These methods must admit a deep hierarchy of "elementary blocks". These blocks have their own characteristics needed for sewing together in a whole physical element. These blocks can be separated in two groups: the first has corresponds to some physical object, the second has a virtual character. In other words a researcher can not corre~pond to such virtual block some physical element. As an example of similar virtual element the fringe field block can be mentioned. Indeed the fringe fields can not exist independently without magnetic or electric elements. But the total generated field has three parts: central (usually described with the help of constant function) and two parts describing entering and output fields abatement. These elementary blocks are used for decomposition the whole physical system (as an example a beam line) into a set of subsystems. The symbolic representation of these blocks allows to create knowledge base of elementary classes of ready modules. Manipulation by these classes is similar to play in LOGO-blocks. Similar approach is developed in some works (see, for example, Cai, et al. , 1997), but the authors do not use symbolic representation in a full measure. All elementary blocks have their representatives on all phases of modeling process: from physical up to computing models (see below). Including and exclusion either elementary block must be realized quietly, without distortion of the whole model. This approach is realized using dynamic modeling paradigm (Andrianov, 1997). It should be note that the visualization procedures must be included to the computing model as its integral part. Indeed the results of visualization process help us understand dynamical processes occurred in either situation. Here it is necessary to tell some words about optimization procedure particularly. Usage of symbolic representation for problems under study can realize the corresponding optimization process more effectively (see, for example, Andrianov, 1998). As the conclusion it is necessary to note that realization of discussed approach allows to carry out the analysis in a virtual laboratory, that is not only favorable from the economic point of view, but also allows in to investigate many effects more detail and carefully, usually this is inaccessible at use only natural experiments.

Fig . .1. The two types of hierarchy sequences of approximation models. deep physical understanding of physical process under study. But there are situations when a researcher has a vague idea of these process nature. In this case he must to create a model sequence beginning from the simplest (USUally so called linear model). These hierarchical sequences can have both an embedded character and a more complex structure (see Fig.l). The numbers 1,2, ... denote different approximating models. On the phase of approximating models creation "motion equations" and auxiliary information (for example, optimal criteria) have usual mathematical view, but the physical sense of corresponding definitions is preserved. The approximating models include all information about the applicability domain for corresponding suggestions.

3. MATHEMATICAL MODELS On this phase the selected approximating model is abstracted and added mathematical solution methods. The abstraction process allows to use all power of modern mathematics not depending on initial physical contents. Obviously the selected mathematical solution methods must admit usage all modern achievements in computer sciences both in software (computer algebra, objectoriented programming and so on) and hardware, for example, parallel processing. As mentioned above these methods have to admit a deep structure of elementary blocks, flexible manipulation and natural supplement during transfer from one model to another. For beam physics problems the Lie algebraic methods are suggested as these methods allow to built powerful tools for analysis and synthesis systems under study. The matrix formalism for these approach (Andrianov, 1996a) allows to use all advantages of matrix algebra from computational point of view (including the parallel processing). At first on this phase a researcher creates the ready for usage block-matrices Mik (see below) as elements of corresponding databases. Than he manipulates by these block-matrices for construction of solutions and optimal criteria. The possibility to find symmetries and invariants admitted by the system plays the great role on this phase. This procedure

2. APPROXIMATING MODELS This phase of modeling process plays the basic role because namely on it an investigator formulates all dynamical equations and a control parameters and functions set. On this phase very responsible decisions are accepted. The approximating model hierarchy is usually constrained on the base on 12

= exp{Cv,} . exp{C\,J ... . , Hk = HkX[kl, Vk = V kX[k] are

allows to enlarge the effectiveness of modeling process. Indeed knowledge of symmetries and invariants gives additional information which must be included into computing process. In particular, corresponding solution methods must take into account all conservation laws for accurate computing (Andrianov, 1996b).

where homogeneous polynomials of k-th order. The matrices Hk or V k can be calculated with the help of the continuous analogue of the CBH-and Zassenhauss formulae and by using the Kronecker product and Kronecker sum technique for matrices (Andrianov, 1996a). Moreover, using the matrix representation for the Lie operators one can write a matrix representation for the Lie map generated by these Lie operators

3. J Mathematical Tools.

The necessary mathematical tools are based on the Lie algebraic methods, in the first place on the Lie transformation (map) ideology in the matrix representation (Andrianov, 1996a) .

M·X =M XOO =

= (MIOMllMI2 . .. Mlk . . . )XOO = 00

= I: Mlk k=O

The Lie Transformation. It is known that time

XOO

evolution of dynamic systems may be represented by oue-parameter groups of maps M(tlto) acting on the initial values of phase space variables M : Xo -t X = M 0 Xo. In the case of Hamiltonian syste~s such maps form a symplectic group of symplectic maps, so called Lie maps. In this way one have to compute the action of this group for given dynamic systems. Let dX

dt

= (1 X

X[21 . . . X[kl .. .)*,

where the matrices Mlk (solution matrices) can be calculated according to the recurrent sequence of formulae of the following types: Mk· X[I]

= X(l] +

= exp{Cc

k



X [I]

f: ~ IT G~((j-I}(k-I )+I) m=l

m.

= x[m(k - l)+l),

i=l

where G $ I = G $(1-1l (9 E + E[I - I] (9 G denotes the Kronecker sum of l-th order. For the inverse map M-I: X -t Xo = M-I. X one can compute the corresponding block-matrices using the generalized Gauss's algorithm.

= F(X, U, t)

be a motion equation for charged particles in a beam line and there is an expansion F (X, t) = 2:;:'=0 Plk(t)X[k]. Here X is a phase vector in a local coordinate system, U is a control vector describing external control fields (generated, for example, by dipoles, quadrupoles and so on) and corresponding geometrical parameters. X [k] = X (9 .. . (9 X is the Kronecker power of

Computer Algebra and Knowledge Bases. The desired solution is created in the form of power series. It is clear that this way can be realized only with truncated procedures for some chosen order of expansions. In the referred works the corresponding matrices plk, G 1k , H k , V k and Mlk are calculated up to seventh order in symbolic forms using the computer algebra codes (REDUCE, MAPLE V) . It is necessary to note that for this approach there appear two problems:

---k-times

a phase vector X of k-th order, Plk(U; t) is a (n x (n+z-l) -dimensional matrix. This representation is similar the Hamiltonian expansion which well known in beam physics thanks to Alex Dragt's works (see, for example, Dragt, 1982). For non-autonomous systems the so called Magnus's representation (Andrianov, 1996a) is used. This apprqach allows to pass from the time-ordered exponent operator to a routine exponential operator. The expansion of the function F generates an expansion of the function G(X; tlto) = 2:~0 Gk(tlto)X[k] which appears in the Magnus's representation and one can write M(tlto)

X [kl,

• the support of the accuracy of truncated expansions; • the support of intrinsic properties (for example, symplecticity for Hamiltonian systems).

The second problem is solved with the help of the correction procedure (Andrianov, 1996b) for the matrices Mlk. For this correction one have to solve a chain of the linear algebraic equations and redefined some of the elements of Mlk. These calculations one can make in symbolic forms too and they make matrix elements calculation more accurately and quickly, because such calculations are made only once and the results are used as required. All these block-matrices form the corresponding knowledge bases. These knowledge bases have contents in the form of matrices in

= exp {fCCk(X,U;tltol}, k=O

GdX, U; tlto) = Glk(U; tlto) X[k] . The similar to the Dragt-Finn factorization for the Lie transformations allows to rewrite the exponential operator as an infinite product of exponential operators of Lie operators

M = .. . . exp{C H2 } · exp{CHJ = 13

programming methods. The second approach is based on optimal criteria, which are written in the following generalized form: t.

J[U]

=/

/

gl(X,U ; T)dXdr+

to 9Jl(U ;Tlto)

+

/

9Jl(U;t. )lto)

where t. is a terminal moment. In this presentation of the optimization procedure one can take · into account more subtle effects of beam dynamics. The usual methods for solution of the corresponding problems are based on methods of the optimal control theory. In this work parametric descriptions ofthe control functions U(t) are used: U(t) = U(A , t) E W , A E Rm for almost all t E [to , t.]. Here A is a parameters vector representing a class of the used control function U (t). Here a set of model functions can be used. For each set there is a separate parameters vector A. Some of these parameters have geometric nature and some of them describe focusing and deflecting forces acting in the beam line. Usually the computer experiments dictate to select a discrete subset for most geometric parameters in some technological desired set of its variations. The optimization procedure on this discrete subset is reduced to a tabulation procedure using an appropriate lattice. This tabulation procedure can be realized either using a regular multivariate lattice or using a random lattice. The first variant is suitable for some defined lattice of control parameters. This approach allows to create databases of valid systems. The second variant is most often used in the case when there is not any information about the starting point in the parameters space. The both variants are convenient to realize with the appropriate visualization procedure, which helps to detect those or another singularity. Similar approach was used for high solid angle massspectrometer modeling (Andrianov, et al., 1997). As to the control functions concerning to focusing and deflecting forces the control theory methods are more preferable. As it is mentioned above there are two approaches. In the first one the problem is formulated in the terms of mappings generated by the system and in the second approach the object function J[U] and constraint conditions are written using phase portrait of the beam. The first approach is often used in part for the linear approximating model (usually it is the simplest model). But using the computer algebra methods and codes one can compute the necessary conditions in symbolic forms for nonlinear approximating models too. For this purpose it is more convenient to use the matrix formalism. Indeed in this case one can include nonlinear effects in the symbolic form , which allows to find a desired

Fig. 2. The scheme of modeling process. symbolic forms and corresponding sampling rules for nest usage.

4. COMPUTER MODELS Computer models realize all concepts and algorithms which are built on base of the selected approximating and mathematical models. The approximating model is used for creation of rules and qualitative analysis in the first place. The mathematical model is more concrete and it is used for algorithms creation. Certainly, the databases of ready elements help essentially to form effective numerical and symbolic codes ·for computational experiments. The structure of models and correlation between them are presented on the Fig.2. 5. OPTIMAL CONTROL PROBLEMS LETTERS In the beam physics there are two approaches to the formalization procedure for optimization problems: the first is based on beam optics properties, such as the focusing distance, the magnification (demagnification), linear and nonlinear aberrations (geometrical, chromatic) and so on; the second is based on the description of the beam evolution as the evolution of the phase set occupied by some set of particles 9Jl(U ; tlto) = M(U ; tlto) o9JlQ, where 9Jlo is a starting phase set. The first approach allows to create mathematical optimal criteria regardless of beam state knowledge. This leads to nonlinear equations and inequaljties which describe the corresponding properties of the system under study. To solve these equations and inequalities one can use nonlinear 14

solution more effectively. For example, for the problem of nonlinear aberrations correction the optimal control problem is reduced to solving proced_UI:e for the system of linear algebraic equations (Andrianov, 1997).

6.

COMPUTEREXPE~NTS

The described approach was used for some practical problems of beam physics, in particular, for a mass-spectrometer design. The basic problem which have to been solved was a problem of selection of appropriate domains in the corresponding parameters space. The matrix formalism for Lie transformations allows to create effective visualization procedure for decision domains on which the optimization procedure was realized. For optimal structure selection the databases of ready objects are used. This allows to insert new elements and extract unsuitable ones dynamically without distortion of the computational modules.

Fig. 3. Two variant of hypersurfaces in the parameters space d2 = d2 (B s2 ,w). The left picture corresponds to the focusing systems with solenoids. The right picture corresponds to the focusing systems with doublets of quadrupoles. ratio mass/charge. This coefficient defines the mass dispersion D of the mass-spectrometer and its value must be equal to 1 to satisfy the usual requirement 10 mm/%. Comparison of these two schemes based on doublets of quadrupoles and solenoids as focusing subsystems shows deep difference between these cases. The second variant is more complex owing to coupling of motions in coordinates planes. At the same time the variant with solenoids allows to design mass-spectrometers with high solid entrance angle. One of the important parameters is the distance between electric and magnetic deflectors - d 2 • The Fig.3 demonstrates the values d 2 (as a function of the focusing force of the second solenoid BS2 and the focusing force of the central quadrupole w) calculated from the appropriate achromatic (according to the particle velocity) condition.

Here two variants of high solid angle massspectrometer are discussed. These variants differ by focusing systems: the first variant includes two focusing doublets of quadrupole lenses (at the entrance and at the exit of the system) and the second one contains two solenoids instead of quadrupoles doublets. Besides these focusing systems the mass-spectrometer contains two electrical deflectors, two magnets separated by either a quadrupole lens or a solenoid. The central quadrupole lens can be used for focusing in the deflection plane (let it be X -plane) or in other plane. In the case of focusing in Xplane the envelopes along the total system are acceptable. This case demonstrates sensitivity with respect to influence of high order aberrations. Therefore this variant must be considered only as a preliminary variant of the mass-spectrometer. In the case of focusing in Y-plane the envelope values are acceptable too, but the drift length d 2 (between the electric and magnetic deflectors) greater then 3.5 m (under achromatic condition) , and this variant should be refused.

7. CONCLUSIONS In this report we demonstrated the advantages of using deep structured approach based on using computer algebra methods. This allows to built effective computing codes using the objectoriented programming, knowledge-based systems and parallel processing for computational experiments. The necessity of similar approach leads from complexity of modern physical problems, in particular, beam physics problems.

The variant with central solenoid seems promising. I;lut this solenoid must be short (not greater then 0.4 m). Besides, the usage of a solenoid as the central focusing element introduces more complex dependence on a set of the system parameters. This variant should be investigated for high order aberrations more careful.

8. REFERENCES

As for achromatic condition it should be noted that this problem is treated in different ways. For a mass-spectrometer it is better to vanish coefficient attached to the fractional deviation of velocity 8v and simultaneously to increase the coefficient attached to the deviation 8M/Q of the

Cai,Y. , M. Donald, J. Irwin, Y. T. Yan (1997). LEGO: A Modular Accelerator Design Code. In: Proc. of the 1997 Particle Accelerator Conference - PAC'97. Vo1.2, pp. 2583-2585, IEEE Operation Center, N.Y. , USA. 15

Andrianov, S.N. (1997). Dynamic Modeling Paradigm and Computer Algebra. In: Proceedings of the 9th International Conference "Computational Modelling and Computing in Physics". pp. 60-65, JINR, D5, 11-97-112, Dubna, Russia. Andrianov, S.N.(1998} Some Problems of Optimization Procedure for Beam Lines. In: : Proc. of the Sixth European Particle Accelerator Conference - EPAC-9S. pp. 1153-1155, Institute of Physics Publishing, Bristol, UK. Andrianov, S.N. (1996a}A Matrix Representation of the Lie Algebraic Methods for Design of Nonlinear Beam Lines. In: : Proc. of the 1996 Computational Accelerator Physics Conference - CAP'96 (Eds. Bisognano, J.J., . A.A.Mondelli, A.A.), pp. 355-360,AIP Conf. Proc. 391, NY, 1997. Andrianov, S.N. (1996b). Construction of a Approximate Symmetries and Invariants for Dynamical Systems. In: Proc. of the Second Int. Workshop Beam Dynamics fj Optimization - BDO'95, pp. 16-24,SPbU, St.Petersburg, Russia. Dragt, A.J. (1982) Lectures on Nonlinear Orbit Dynamics, In: : Physics of High Energy Particle Accelerators (Eds. Carrigan, Huson F.R.,Month M.), pp. 147-313, AlP Conf. Proc. 81, NY, 1982. Andrianov, S.N., Edamenko, N.S., Ovsyannikov, D.A., Mittig, W. (1997). Computer Modeling of a High Solid Angle Mass-Spectrometer. In: Proc. of the Fourth Int. Workshop Beam Dynamics fj Optimization - BDO '97 (Eds. Zhidkov, E.P., Ovsyannikov, D.A., Yudin, LP.), pp. 5-12, JINR, Dubna, Russia. Andrianov, S.N. (1997). Some Problems of Nonlinear Aberration Correction. In: Beam Stability and Nonlinear Dynamics (Ed. Zohreh Parsa), pp. 103-116, AlP Conf.Proc., 405, NY, USA.

16