Optimization Method for Solving Cloaking and Shielding Problems for a 3D Model of Electrostatics

: Inverse problems for a 3D model of electrostatics, which arise when developing technologies for designing electric cloaking and shielding devices, are studied. It is assumed that the devices being designed to consist of a ﬁnite number of concentric spherical layers ﬁlled with homogeneous anisotropic or isotropic media. A mathematical technique for solving these problems has been developed. It is based on the formulation of cloaking or shielding problems in the form of inverse problems for the electrostatic model under consideration, reducing the latter problems to ﬁnite-dimensional extremum problems, and ﬁnding their solutions using one of the global minimization methods. Using the developed technology, the inverse problems are replaced by control problems, in which the role of controls is played by the permittivities of separate layers composing the device being designed. To solve them, a numerical algorithm based on the particle swarm optimization method is proposed. Important properties of optimal solutions are established, one of which is the bang-bang property. It is shown on the base of the computational experiments that cloaking and shielding devices designed using the developed algorithm have the simplicity of technical implementation and the highest performance in the class of devices under consideration.


Introduction
In recent years, a new direction in electromagnetism has been intensively developing, associated with the development of design technologies for devices for electrical or magnetic cloaking of material bodies.The first works in this area (see [1][2][3][4][5][6]) are devoted to the study of cloaking problems using the transformation optics method, developed in [7], or the scattering cancellation technology proposed in [8].An approximate scheme for designing magnetic cloaking devices based on the concept of an anti-magnet was proposed in [9].
Another direction in magnetic and electrical cloaking is associated with using for cloaking radially anisotropic cylindrical or spherical shells (see, e.g., [10][11][12][13][14]).In [12] it is shown when studying the 2D electrostatic cloaking problem that a high cloaking effect can be achieved even for a single-layer cylindrical shell, but in the case of a small diameter of the body being cloaked, and/or with a very high anisotropy ratio.In recent papers [13,14], it is shown without using the approximation of the smallness of the body being cloaked, that a high cloaking effect in the case of a multilayer cloaking shell can be achieved due to a large number of layers filled with anisotropic media with different dielectric permittivities.
It should be noted a series of works [15][16][17][18][19][20], devoted to the development of efficient numerical algorithms for solving problems of magnetic and dc electric cloaking, based on the use of an optimization method for solving inverse problems, to the class of which cloaking problems belong.The mentioned papers used cylindrical and spherical shells composed of a finite number of layers filled with homogeneous isotropic media as cloaking devices.
The optimization method was first proposed in the fundamental works of the outstanding Soviet mathematician A.N. Tikhonov in the 1960s (see, e.g., [21,22]) while creating his famous regularization method for solving ill-posed problems, which include inverse problems.After that, the optimization method began to be widely used when solving inverse problems for differential equations encountered in electromagnetism, acoustics, hydrodynamics, and other areas of mathematical physics [23].
In accordance with the optimization method, inverse problems are reduced to extremum problems of minimizing special cost functionals, which are called Tikhonov functionals.To minimize such functionals, iterative methods and, in particular, gradient methods are usually used.But it should be noted that in the case of coefficient inverse problems the Tikhonov functionals are non-convex.It is well known that for such functionals gradient methods can converge to a local minimum, which can be very different from the global minimum.
To overcome this shortcoming, special methods have been developed.We note among them the stationary point clustering method (see, for example, Kokurin [24]) and the Klibanov's convexification method (see [25][26][27][28]).The last method is based on the fundamentally new idea of so-called convexification.Its goal is to avoid the phenomenon of multiple local minima of conventional least squares cost functionals.This idea of convexification has roots in [29], where Carleman estimates were introduced in the field of inverse problems for the first time.However, while the goal of [29](and many follow-up publications of a number of authors) was to prove uniqueness theorems, the recent works of Klibanov and his research team (see e.g., [28]) focus on applications of Carleman estimates to numerical methods for coefficient inverse problems by constructing globally strictly convex Tikhonov-like functionals.
The analysis of inverse extremum problems, to which inverse problems are reduced as a result of applying the optimization method, allows us to establish important new properties that are inherent precisely to solutions of extremum problems.One such property is the so-called bang-bang property (see [46]) (which we will discuss and use later when analyzing the results of numerical experiments).As it will be shown below, the use of this property will make it possible to obtain solutions to the problems under consideration that have a simple technical implementation.In addition, the use of the bang-bang property allows us to significantly simplify the numerical algorithms developed by us for solving the problems of designing cloaks, shields, and other special devices.
In this paper, we will consider a fairly general physical scenario, when a multilayer shell with anisotropic (in the general case) layers is used for shielding or cloaking from an electrostatic field.Just as in [18,19], to solve the problems of designing shielding or cloaking devices under consideration, we will develop a numerical algorithm based on the optimization method for solving inverse problems using the particle swarm optimization method (PSO) (see [47]) as a numerical optimization method.
Using the proposed algorithm we will show with the help of computational experiments that the high performance of the cloaks and shields being designed can be achieved using both single-layer anisotropic shells with a high anisotropy ratio and multilayer isotropic shells.In addition, we will establish for the case of an isotropic scenario that the optimal solutions to the shielding and cloaking problems possess the bang-bang property.Based on this fact, we will conclude that the designed shielding and cloaking devices, which correspond to the optimal solutions constructed in this work, have high performance and ease of technical implementation.
The paper is organized as follows.In Section 2 the direct problem of electrostatics, which corresponds to the scenario of placing a cloaking shell into free space is formulated, analytical properties of its solution are studied and exact statements of inverse problems of designing cloaking and shielding devices are presented.In Section 3, the mentioned inverse problems are reduced to finite-dimensional extremum problems, for the solution of which a numerical algorithm based on the particle swarm optimization method is developed.Section 4 describes some important properties of the optimal solutions obtained using the developed algorithm and discusses the simulation results.Conclusions are summarized in Section 5.

Statement of Direct and Inverse Problems of Electrostatics in 3D Space
We start with the formulation of the direct problem of electrostatics, considered in the entire space R 3 filled with a homogeneous isotropic medium with a constant permittivity ε 0 > 0. It is assumed that a constant electric field E a = −gradU a is given in R 3 which corresponds to the electric potential U a described in spherical coordinates r, θ, ϕ by the formula U a (r, θ) = −E a (r/b) cos θ, where E a = const, b = const.Let us further assume that an object filled with a medium whose (relative) permittivity ε differs from ε 0 is placed into the space.Then the field U a changes and takes the form U = U a + U s .Here U s is the perturbation of the field U a caused by the placing of an object into R 3 , which we will call the scattered electrostatic response of the object.
To find the response U s , it is necessary to formulate a direct problem of electrostatics corresponding to the considered scenario of placing an object into R 3 .For concreteness, we assume below that the role of the placed object is played by the pair (Ω, ε).Here Ω is a spherical layer described in spherical coordinates r, θ, ϕ by equation Ω = {x ∈ R 3 : a < r = |x| < b}, where a and b are the inner and outer radii of the layer (see Figure 1), while ε is the permittivity of the medium filling Ω.The permittivity ε is assumed to be the diagonal in spherical coordinates r, θ, ϕ tensor, i.e. ε = diag(ε r , ε t , ε t ).Here ε r (or ε t ) is the radial (or tangential) component of the tensor ε. (We assume that the last two components of the tensor ε are the same and equal to ε t ).We assume that the medium occupying the region Ω is piecewise homogeneous in the sense that the region Ω can be divided into a finite number M of elementary spherical layers of the same width d = (b − a)/M.Each of them is filled with a homogeneous anisotropic (generally) medium, the constant permittivity of which is described by the diagonal in spherical coordinates tensor ε m = diag(ε rm , ε tm , ε tm ), m = 1, M.Here ε rm (or ε tm ) is the radial or tangential component of the tensor ε m .This partition of the domain Ω into parts Ω m corresponds to the global radial and tangential permittivities ε r and ε t of the original global tensor ε ≡ diag(ε r , ε t , ε t ) of the domain Ω defined by the formulas Here χ m is the characteristic function of the elementary layer Ω m , equal to one in Ω m and zero outside Ω m .
Below, to describe a piecewise homogeneous medium filling Ω, we will use the vector e = (e r1 , e t1 ; . . .; e rM , e tM ), composed of components ε rm , ε tm of permittivity tensors ε m of separate layers Ω m , m = 1, M, while a pair (Ω, e) will be referred to as the electrical shell.The medium filling the region Ω will be called admissible if the following condition of the positivity of all components: ε rm > 0, ε tm > 0, m = 1, M is satisfied.It stems from the physical meaning of the radial and tangential components ε rm and ε tm , m = 1, M.
In addition to the sets (1), we define the following sets (see Figure 1) and denote by U m the restriction U| Ω m of the total field U = U a + U s to the subdomain Ω m , m = 0, M + 1. Taking into account this notation, the direct problem of finding the total field U = U a + U s or, what is the same, finding the electrostatic response U s is reduced to finding all M + 2 fields U m in the regions Ω m , m = 0, M + 1 by solving the following electric transmission problem: considered in the entire space R 3 .Here the conditions (5)- (7), where n is the unit vector of the normal outward to Ω, follow from the fundamental laws of continuity of the tangential component of the electric field vector E = −gradU and the normal component of the electric displacement vector D = ε 0 εE in the absence of surface charges at the dielectric discontinuities r = R m , m = 0, M, where ε 0 is an electrical constant [48].The conditions (9) have the meaning of the standard boundedness conditions for the solution as r → 0 and the condition at infinity (r → ∞).Arguing as in [49], one can show that the solution U = (U 0 , U 1 , . . ., U M+1 ) of the problem (3)-( 9) exists and is unique.Moreover, using the method of separation of variables the fields U 0 , U 1 ,. . .,U M+1 can be expressed explicitly as Here α 0 , α 1 , β 1 ,. . .,α M ,β M , β M+1 are some coefficients, ν m is medium anisotropy coefficient in the subdomain Ω m , determined by the formula It is easy to check that all the functions U m , m = 0, M + 1, defined in ( 10)-( 12), satisfy all equations in (3), ( 4) and conditions ( 9) for any values of the coefficients α m , β m .It remains to choose them so that the transmission boundary conditions ( 5)-( 8) are satisfied.
Substituting (11), ( 12) into ( 5)-( 8), we arrive at the following system of 2M + 2 linear algebraic equations with respect to 2M + 2 unknown coefficients α 0 , α m , β m , β M+1 , m = 1, M: Solving the system ( 14) and substituting the found values α 0 , α m , β m , β M+1 into (10)-( 12), we can find the corresponding fields U 0 in Ω 0 , U m in Ω m , m = 1, M, and U M+1 in Ω M+1 forming the desired solution of the problem (3)-( 9), and to investigate their properties depending on the values of the main parameters-the radial and tangential components ε rm and ε tm of tensors ε m , m = 1, M. Now, we can formulate coefficient inverse problems for the electrostatic model under consideration, which arises when designing devices that serve for electric cloaking or shielding.To this end, denote by , where e = (ε r1 , ε t1 ; . . .; ε rM , ε tM ), the solution of the problem (3)-( 9) corresponding to the permittivity tensors ε m in Ω m and to the constant permittivity ε 0 in Ω 0 and Ω M+1 .Let B R be a ball of sufficiently large radius R containing Ω inside it.We set Ω e = Ω M+1 ∩ B R (see Figure 2).Now we can formulate the following two inverse problems.The first inverse problem, called the electric cloaking problem, is to find the permittivity vector e = (ε r1 , ε t1 ; . . .; ε rM , ε tM ) based on the following two conditions: The second condition in ( 15) is equivalent to the condition U s = 0 in Ω e , which, by virtue of the unique continuation principle [50] for the harmonic in Ω M+1 function U s , is equivalent to condition U s = 0 in Ω M+1 .In the case when the vector e is found from the fulfillment of only the first condition in (15), we will refer to the corresponding inverse problem as an internal cloaking problem or a shielding problem.
One should also add the condition of the positivity of all components of the vector e to the conditions in (15).It is clear that the exact solutions of the inverse problems formulated above may not exist, so in the next section, we will replace the inverse problems with approximate formulations using the optimization method.As a result, finite-dimensional extremum problems will be obtained, for the numerical solution of which we will apply the particle swarm optimization method (see [47]).

Application of the Optimization Method
In accordance with the optimization method (see [21,39]), we replace the inverse problems of electric cloaking and shielding formulated above with the corresponding extremum problems.To this end, we introduce into consideration two cost functionals corresponding to the first or second condition in (15): Here, in particular, In addition, to obtain regularized solutions to the problems under consideration, we define the following bounded set in the space R 2M : which below will play the role of a set of controls in the general anisotropic case.From the definition (18) of the set K it follows that each of its elements e ≡ (ε r1 , ε t1 ; . . .; ε rM , ε tM ) ∈ K corresponds to a cloaking (or shielding) device in the form of a spherical material shell (Ω, e) filled with an admissible piecewise inhomogeneous anisotropic medium described by the vector e.In other words, the set K can be considered as the digital twin of the set of all admissible piecewise homogeneous media filling the domain Ω.In the special case corresponding to the isotropic scenario, when ε rm = ε tm = ε m > 0 for all m = 1, M, the set (18) transforms into the set The set (19) will play the role of a set of controls when solving the problems of designing isotropic cloaking and shielding devices.
Below we will consider the following two finite-dimensional extremum problems: J(e) ≡ 0.5 which are optimization analogs of the inverse problems formulated above.
Recall that the ability of the designed shell (Ω, e) to cloak material objects is characterized by cloaking performance.Arguing as in [18,19], it is easy to show that the cloaking performance of the shell (Ω, e) is related to the value J(e) by an inverse relationship: the smaller the value J(e), i.e. the smaller the error in fulfilling both conditions in (15), the higher the cloaking performance of the shell (Ω, e) and vice versa.Similarly, the smaller J i (e), the higher the shielding performance of the shell (Ω, e).It follows that the problem (20) (or (21)) is aimed at finding the shell (Ω, e) that has the highest shielding (or cloaking) performance in the class of devices corresponding to the set K defined in (19) (or in (18)).
Denote by e opt the minimizer (optimal solution) of problem (21).If the condition J(e opt ) = 0 is also satisfied, then this means according to ( 16) and ( 21) that e opt is an exact solution of the cloaking problem.However, such a situation for the cloaking problem can arise only in exceptional cases [37].Therefore, our main goal when solving the problem (21) will be to find such parameters of the desired shell in the form of a vector e opt ∈ K for which J(e opt ) takes on a rather small value having the order 10 −n , n = 4, 5, . . ., which corresponds to a high cloaking performance.A similar situation takes place for the shielding problem (20), and the smaller the value J i (e opt ) for the minimizer e opt ∈ K of problem (20), the higher the shielding performance of the designed shell (Ω, e opt ).
It follows from ( 16), (17) that the functionals J i and J e have the meaning of the Tikhonov functionals corresponding to the first or second condition in (15).Gradient methods have been developed to minimize such functionals.But, as already mentioned above, their application is complicated by the fact that the solutions obtained using gradient methods can describe a local minimum, which can differ greatly from the desired global minimum.Another disadvantage of gradient methods is the fact that the solution obtained with their help is difficult to implement in practice.
Global minimization methods and, in particular, the particle swarm optimization method (PSO) are free from these shortcomings.They showed its high efficiency in [18, 19,37], devoted to the development of numerical algorithms for solving magnetic and thermal cloaking problems based on the optimization method.
For the numerical solution of problems ( 20) and ( 21), we apply an algorithm based on the particle swarm optimization method.A detailed description of the main steps of this algorithm as applied to magnetic cloaking problems can be found in [18,19].From a computational point of view, it is important that all mean-square integral norms included in ( 16), (17), as well as the values J i (e) and J e (e), can be calculated explicitly.Indeed, using the representations (10) and ( 12) of the fields U 0 and U M+1 , and reasoning as in [19], it is easy to show that for any vector e = (ε r1 , ε t1 , . . ., ε rM , ε tM ) ∈ K values J i (e) and J e (e) are determined by Here α 0 and β M+1 are the first and last components of the solution (α 0 , α 1 , β 1 , . . ., β M+1 ) of the system (14) corresponding to the tensor permittivities ε m = diag(ε rm , ε tm ), m = 1, M of anisotropic media in layers Ω m whose components ε rm , ε tm make up the vector e = (ε r1 , ε t1 , . . ., ε rM , ε tM ).
From (22) follows that the calculation of the values J i (e) and J e (e) for a vector e ∈ K (that describes the position of the particle, which is the main element in the particle swarm optimization method [47]), consists of two stages.First we find the two components α 0 and β M+1 of the solution (α 0 , α 1 , β 1 , . . ., β M+1 ) of the system ( 14) corresponding to the given components ε r1 , ε t1 ,. . ., ε rM , ε tM of the tensor permittivities ε 1 , . . ., ε M of the media filling Ω. Next, we substitute the found values α 0 and β M+1 into (22) and calculate the desired values J i (e) and J e (e) with the required degree of accuracy.The subsequent application of the particle swarm optimization method is carried out according to the scheme outlined in detail in [18].The result of applying the algorithm described above to solve problem (21) (or problem (20)) is an approximate optimal solution e opt = (ε 21) (or problem (20)) and the value J(e opt ) (or J i (e opt )) describing the cloaking (or shielding) performance of the designed shell (Ω, e opt ).We emphasize that, due to the illconditionedness of the system ( 14) for large M, setting its coefficients, finding the solution, as well as all other calculations were performed with a fairly high accuracy provided by the rules of the Wolfram Mathematica package.

Simulation Results and Discussion
Let us discuss here the results of the numerical solution to the problems of designing electric cloaking and shielding devices under consideration using PSO.All computational experiments were carried out for the following initial data: The external field was a constant field E a = −gradU a , where U a = −E a (r/b) cos θ for E a = 1 V/M.The purpose of numerical experiments was to study the dependence of the properties of solutions to problems (20) and ( 21) on the number of layers M of the shell being designed, as well as on the choice of the control set K in (18 ) or in (19), and, in particular, on the value ε max /ε min , called the contrast of media with permittivities ε max and ε min .In the case of a homogeneous anisotropic medium with parameters (ε min , ε max ), instead of contrast, we will use the concept of the degree of anisotropy ν, which is determined by the contrast ε max /ε min by the formula similar (13).For convenience, we divide the set of all computational experiments into two groups: the first group corresponds to the shielding and cloaking problems for the anisotropic scenario, while the second group corresponds to the purely isotropic one.
Our first test relates to solving the extremum problem (20) using the PSO for the case of a fully anisotropic multilayer shell (Ω, e) for the following pair of values ε min and ε max : For contrast of data (25) we have ε max /ε min = 100, which corresponds to a small anisotropy coefficient ν equalled to 13.65 due to (24).
Optimization analysis for various values of M = 1, 16 showed that the optimal values (ε opt rm , ε opt tm ), m = 1, M, of permittivities of each layer, found using PSO, coincide with the pair (ε min , ε max ) defined in (25), for any M = 1, 16. Hence the corresponding minimizer e opt of the problem (20) corresponding to the pair (25) has the form e opt = (ε min , ε max ; ε min , ε max ; . . .; ε min , ε max ), (26) while the value J i (e opt ) which has the meaning of the inverse of the shielding performance of the shell (Ω, e opt ), equals to 6.340 × 10 −3 .This means that all layers of the designed multilayer shell (Ω, e opt ) must be filled with the same anisotropic medium with permittivities ε opt rm = 0.02 and In other words, the cloaking shell designed with the help of PSO is a single anisotropic sample for which the global permittivities ε opt r , ε opt t determined by the formulas (2) and the minimum value J i (e opt ) are given for any number of layers M = 1.16 by the relations The value J i (e opt ) in ( 27) corresponds to the low shielding performance of the designed anisotropic shell (Ω, e opt ).Thus, the solution of the problem (20) in the case of the anisotropic scenario for the first pair of parameters ε min = 0.02 and ε max = 2 does not provide a high shielding performance (we explain this by the smallness of the anisotropy coefficient ν = 13.65 of the shield (Ω, e opt )), nor the simplicity of its technical implementation due to the anisotropy of the medium filling Ω.
To increase the shielding performance of the shell being designed, the contrast of the pair (ε min , ε max ) should be increased.This can be seen from the analysis of the results of computational experiments for the second pair ε min = 0.02 and ε max = 16 (28) with contrast ε max /ε min = 800, which due to (24) corresponds to the anisotropy degree ν = 39.50.As shown by the optimization analysis, the optimal values of permittivities of all layers, found using PSO, again coincide in each layer with a new pair (ε min , ε max ) for any M = 1, 16; besides, we have J(e opt ) = 1.032 × 10 −6 , where e opt is given by ( 26), (28).This corresponds to filling all layers of the designed shell with the same anisotropic medium, so that the global permittivities ε opt r , ε opt t and the minimum value J i (e opt ) for all M = 1, 16 are given by The value J i (e opt ) in ( 29) corresponds to the high shielding performance of the designed anisotropic shell (Ω, e opt ).Thus, the solution of the problem (20) for the case of the anisotropic scenario when using the second pair (28) of parameters (ε min , ε max ) provides a high shielding performance due to the high anisotropy coefficient ν = 39.50 of the shield (Ωe opt ).But it does not ensure the simplicity of its technical implementation due to the anisotropy of the designed shielding device.
Similar results hold for the cloaking problem.To verify the validity of this fact, the particle swarm optimization method must be applied to solve the extremum problem (21) corresponding to the design of an anisotropic cloaking shell for the case of the first and second pairs ( 25) and ( 28) of parameters ε min and ε max .
Optimization analysis with the help of PSO for the first pair (25) led to results that are similar for all values of M = 1, 16 to the results obtained when solving the shielding problem (20), namely: Here e opt is given by ( 25), (26), and the single difference between ( 30) and ( 27) is that instead of J i (e opt ), the value J(e opt ) is used in (30).Thus, the found optimal solution e opt of the cloaking problem, which again has the form ( 26), (25), corresponds to a single anisotropic sample with global permittivities ε opt r = 0.02, ε opt t = 2 and the minimum value J(e opt ) = 3.364 × 10 −3 , which corresponds to low cloaking performance of the optimal cloak (Ω, e opt ).
To increase the cloaking performance of the shell being designed, the contrast of the pair (ε min , ε max ) should be increased, for example, by choosing the second pair (28).As the optimization analysis showed, the optimal values of the permittivities of all layers, found using the PSO for the second pair (28) of the parameters ε min and ε max , again coincide in each layer with the mentioned pair (ε min , ε max ) for any M = 1, 16.The latter corresponds to filling all layers of the designed shell with the same anisotropic medium with global permittivities ε opt r = 0.02 and ε opt t = 16.Besides, we have J(e opt ) = 4.635 × 10 −5 for each M = 1, 16, where e opt is given by ( 26), (28).This value J(e opt ) corresponds to the high performance of the designed anisotropic cloaking shell.Thus, the solution of the problem (21) for the anisotropic scenario for the second pair (28) of parameters (ε min , ε max ) provides a high cloaking performance due to the high degree of anisotropy with ν = 39.50 of the cloak (Ω, e opt ), but it does not ensure the simplicity of its technical implementation due to the anisotropy of the designed cloak.
Let us now discuss the results of computational experiments for tests of the second group, corresponding to the M-layered isotropic shell schematically represented in Figure 3. Remind that in this case the set of controls is defined by the formula (19), while as the lower and upper bounds (ε min , ε max ) of the set K we will use one of the following pairs: 1) (0.02, 2), 2) (0.02, 16), 3) (0.02, 50).(31) Note that all the values included in (31), except for ε min = 0.02, correspond to the permittivities of widespread materials.In fact, the value ε max = 2 describes the permittivity of polypropylene, ε max = 16 describes the permittivity of germanium, and ε max = 50 describes the permittivity of certain grades of capacitor ceramics, known as tikond.Our optimization analysis of the shielding problem (20) showed for pairs in (31), as well as for all other pairs used, that, the optimal solutions e opt ≡ (ε opt 1 , ε opt 2 , . . ., ε opt M ) obtained with the help of PSO for the case of the isotropic scenario, have two important properties.They are similar to the properties established in [18,19] for optimal solutions of shielding problems for magnetostatic models.The first property is that an analog of the so-called bang-bang property (see [46]) holds for the optimal solution.According to this property, each component ε opt m , m = 1, M, of the optimal solution e opt takes one of the two values ε min or ε max , which are the boundaries of the set K defined in (19).
Moreover, the components ε opt m of the optimal solution e opt are strictly alternated, i.e., one of the following two relations is satisfied: or corresponding to the so-called alternating design scheme of the 1st or 2nd type (see [19]).
The second important property is that for any number of layers M, the minimum value J opt i = J i (e opt ) decreases and, consequently, the shielding performance of the designed shell (Ω, e opt ) increases with increasing the contrast ε max /ε min .
A clear confirmation of these properties are presented in Table 1 and Figures 4 and 5. Table 1 presents the results of solving the problem (20) for the third pair in (31) in the form of optimal values ε opt permittivities of the first two and last two layers and values J i (e opt ), J e (e opt ), J(e opt ) of the functionals J i , J e , J for the optimal solution e opt of problem (20).Figure 4 shows the dependence of the minimum value J opt i ≡ J i (e opt ) on the number of layers M for three different pairs (ε min , ε max ) given in (31).Figure 5a schematically shows the structure of the six-layer shield designed by solving problem (20) using PSO for the first pair (ε min , ε max ) in ( 31) at M = 6. Figure 5b,c are analogs of Figure 5a for the second and third pairs in (31).Table 1.Results of solving shielding problem for ε min = 0.02,  (33).The same is true for other values of ε opt m due to the bang-bang property.In addition, as M increases from 2 to 16, the value J i (e opt ) decreases from 1.419×10 −2 to 1.679×10 −5 , which corresponds to a sufficiently high shielding performance of the optimal shell (Ω, e opt ).At the same time, the values J e (e opt ) and J(e opt ) given in the last two columns of Table 1 are relatively large, since it is the functional J i (e) that we are minimizing when solving the shielding problem.From Figure 4, in turn, it follows that the higher the contrast ε max /ε min , the lower in Figure 4 is a graph of the function J opt i = J opt i (M) describing the dependence of J opt i on M, and hence the higher the shielding performance of the corresponding shield (Ω, e opt ).An analysis of Figure 5a-c shows that each of the designed shields (Ω, e opt ) exactly satisfies the alternating design rule: in its structure, it consists of two alternating materials A and B with permittivities ε A = ε min and ε B = ε max , where the pair (ε min , ε max ) takes one of three values in (31).
Let us now turn to the cloaking problem (21).Our optimization analysis using PSO showed that the above-mentioned two properties hold for their optimal solutions, but with two differences.The first is that these properties are satisfied under the additional condition.
to the boundaries ε min and ε max of the set K in (19).The second difference is that the alternating design relations (32) or (33) hold for all components ε opt m of the optimal solution e opt , except for the last one ε opt M , which can take an intermediate value between ε min and ε max .A clear confirmation of these properties are Table 2 and Figures 5 and 6.Table 2 presents the results of solving the problem (21) for the third pair in (31) in the form of the first two and last two optimal components ε opt the vector e opt and values J i (e opt ), J e (e opt ), J(e opt ) of functionals J i , J e , J the optimal solution e opt of problem (21).Figure 5d schematically shows the structure of a six-layer cloak designed by solving problem (20) using PSO for the first pair (ε min , ε max ) in ( 31) at M = 6. Figure 5e,f are analogs of Figure 5d for the second and third pairs in (31).Figure 6 shows the dependence of the minimum value J opt = J(e opt ) on the number of layers M for three different pairs (ε min , ε max ) given in (31).From Table 2 follows that as M increases from 2 to 16, the value J(e opt ) decreases from 4.349 × 10 −2 to 1.031 × 10 −5 , which corresponds to a sufficiently high cloaking performance of the optimal shell (Ω, e opt ).In this case, the optimal ε  (33), while the optimal value ε opt M of the last component ε M decreases from 0.184 to 0.031 as M changes from 2 to 16.From Figure 6 follows that the higher the contrast ε max /ε min , the lower in Figure 6 is the graph of function J opt = J opt (M), and consequently, the higher the cloaking performance of the corresponding shell (Ω, e opt ).An analysis of Figure 5 shows that each of the three cloaks located on the right side of Figure 5 differs from the corresponding shield located on the left side of takes some intermediate value from the interval [ε min , ε max ].This is precisely the peculiarly of the cloaking problem and its main difference from the shielding problem.
On the one hand, due to this fact, the cloaking performance strongly depends on the permittivity ε opt M of the last layer.On the other hand, this makes it possible to significantly simplify the solution to the cloaking problem.Indeed, since, by the bang-bang property, the first M − 1 layers consist of alternating materials with permittivities ε max and ε min , then to find the desired optimal solution, there is no need to solve the general M-dimensional problem (21), but it is sufficient to solve the corresponding one-parameter extremum problem with respect to the last control.
Just on this principle the generalization of the alternating design rule, called in [18] the almost alternating design rule, is based.This design rule is to choose alternating values ε max and ε min as the first M − 1 components ε opt m of the optimal solution e opt while the last one ε opt M is found by solving the corresponding one-dimensional control problem with respect to last component ε M .We emphasize that the use of the almost alternating design rule, instead of the alternating design rule, for designing cloaking shells leads to a significant increase in the cloaking performance of the cloak designed in this way.This can be verified by comparing the last columns of Tables 1 and 2 containing the values J(e opt ) found using the alternate design and almost alternate design strategies, respectively.This comparison, for example, for M = 6 shows that J(e opt ) = 3.900 × 10 −2 in the case of Table 1, which corresponds to low cloaking performance, while for Table 2 J(e opt ) = 2.981 × 10 −4 , which corresponds to high cloaking performance.As M increases, this difference is getting greater.The latter confirms the high efficiency of using the almost alternating design rule when solving the cloaking problem.
In the case when the found value ε opt M does not correspond to any extended material, a purely technical difficulty arises associated with the creation of this material.However, this difficulty is not fundamental in view of the great successes achieved to date in the creation of metamaterials with desired dielectric properties.Another way to get rid of this difficulty, proposed in [37] for thermal cloaking problems is to choose the value εopt M in the vicinity of ε opt M , corresponding to the available natural or engineering material, and to replace ε opt M with the value εopt M .We emphasize that the algorithm developed in this work has high accuracy, efficiency, and universality.The latter means that it can be used to solve design problems for various special devices, including energy concentrators, illusion devices, etc., both for models of electrostatics, magnetostatics, and for models of static fields of a different physical nature.With some natural changes, the developed algorithm can be extended to the case of electromagnetic cloaking using some results from [51] (namely, regarding dynamical motion under the action of various unsteady restoring and perturbation torques).Another possible generalization of the obtained results, motivated by the recently published article [52], refers to the study of the behavior of multilayer (three-layer) spherical celestial bodies.

Conclusions
Inverse problems for a 3D electrostatic model which arise when developing technologies for designing electric cloaking and shielding devices were considered.It is assumed that the devices being designed to consist of a finite number of concentric spherical layers filled with homogeneous anisotropic or isotropic media.A mathematical technology for solving these problems based on the use of an optimization method for studying inverse problems has been developed.The quantities inverse to the cloaking or shielding performances of the shells being designed were chosen as the cost functionals under minimization.The material parameters of spherical shells played the role of control parameters in the formulated extremum problems.To find the desired controls, an efficient numerical algorithm based on the particle swarm optimization method was proposed.Using the developed algorithm, a series of computational experiments were carried out to solve the problems of designing shielding and cloaking devices in a wide range of changes of the main parameters included in the electrostatics model used.
The performed optimization analysis showed that the high performance of the designed cloaking and shielding devices can be achieved using both single-layer anisotropic shells with a high anisotropy coefficient and multilayer isotropic shells consisting of several isotropic spherical layers Ω m , m = 1, M, each of which is filled with a homogeneous medium with a certain constant permittivity ε m > 0. The values of the indicated permittivities ε m of all layers are found using the developed numerical algorithm based on PSO.
In the case of isotropic shells, the constructed optimal solutions e opt ≡ (ε  (19).This allows us to make an important conclusion that the optimization algorithm developed in the paper allows us to construct optimal solutions to the shielding and cloaking problems, which, with an appropriate choice of the control set K, correspond to highly efficient shielding and cloaking shells that possess the simplicity of technical implementation.

Figure 1 .
Figure 1.Schematic representation of an externally applied electric field E a and the multilayer spherical shell (Ω, ε), immersed in free space.

Figure 2 .
Figure 2. Schematic representation of a ball B R containing the multilayer spherical shell (Ω, ε).

Figure 3 .
Figure 3. Schematic of a layered spherical isotropic shell consisting of M layers filling with alternating materials.

Figure 4 .Figure 5 .
Figure 4. Three graphs of the dependence of the minimum value J opt i= J i (e opt ) of the cost functional J i corresponding to the shielding problem on the number of isotropic layers M for three different pairs (ε min , ε max ) given in(31).

1 ,
as well as the intermediate values ε opt m , 2 < m < M − 1, obey the alternating design property in

Figure 6 .
Figure 6.Three graphs of the dependence of the minimum value J opt ≡ J(e opt ) of the cost functional J corresponding to the cloaking problem on the number of isotropic layers M for three different pairs (ε min , ε max ) given in(31).
Figure 5, only by the value ε opt M of the permittivity of the last layer.If for the shield we have ε opt M = ε max , in accordance with the alternating design rule, while for the cloak the last permittivity ε opt M the bang-bang property, according to which, for any number of layers M, each component ε opt m of the optimal solution e opt (except for the last component ε opt M in cloaking problem) takes one of the two values ε min and ε max , which are the boundaries of the control set K in Analysis of Table1shows that the values ε optM exactly satisfy the relation