In this paper, a spatial image technique is used to efficiently calculate the mixed potential Green's functions associated with electric sources, when they are placed inside arbitrarily shaped cylindrical cavities. The technique is based on placing electric dipole images and charges outside the cavity region. Their strength and orientation are then calculated by imposing the appropriate boundary conditions for the fields at discrete points on the metallic wall. A method for the assessment of the potentials accuracy is proposed, and several optimization techniques are presented. Three cavities are analyzed to demonstrate the usefulness of the techniques. The cutoff frequencies and potentials patterns are compared to those obtained by a standard finite elements technique, showing excellent agreement. Finally, a band-pass filter based on coupled lines is analyzed, demonstrating the practical value of the technique.
If you can't find a tool you're looking for, please click the link at the top of the page to "Go to old article view". Alternatively, view our Knowledge Base articles for additional help. Your feedback is important to us, so please let us know if you have comments or ideas for improvement.
 The need to develop techniques which allow for the prediction of the electrical behavior of shielded circuits and cavity backed antennas has triggered the growth of studies in this area. In order to make an accurate analysis of this kind of circuits, pure numerical techniques such as finite elements, finite differences or the transmission line matrix method can be used [see, e.g., Jin and Volakis, 1991; Omiya et al., 1998; Hoefer, 1985].
 Moreover, the integral equation technique combined with the Method of Moments [see Harrington, 1968] has become very popular, because of its efficiency and moderate computational cost for circuits with electrical size in the order of few wavelengths [Gentili et al., 1997; Livernois and Katehi, 1989]. The formulation of the integral equation requires an algorithm which leads to the computation of the electromagnetic scalar and vector potentials of the problem, i.e. the so called mixed potentials Green's functions. In the literature, several formulations can be found for the case of shielded structures, where the enclosure influence has to be included inside the Green's functions [see Eleftheriades et al., 2004; Gentili et al., 1997]. In this case, the numerical treatment of the problem is reduced to the printed circuits itself, and therefore, the computational cost decreases considerably.
 Because of this complex mathematical treatment, the circular waveguide has been less studied. Green's functions inside circular geometries can be formulated by using spectral domain techniques, which express them as vector modal series of Bessel functions [see Leung and Chow, 1996; Zavosh and Aberle, 1994]. These methods are strongly dependent on the chosen numerical approach, since the higher order Bessel functions are not easily computed with enough accuracy.
 On the other hand, a new spatial domain method for the Green's functions computation inside circular cylindrical cavities was recently proposed by Vera-Castejón et al.  and Quesada-Pereira et al. . The technique uses image theory to enforce the proper boundary conditions for the fields. The numerical evaluation of the Green's functions under electric current excitation inside an empty circular cylindrical cavity was described by Vera-Castejón et al. , whereas in the work of Quesada-Pereira et al.  Green's functions under magnetic currents were studied. Besides, the technique was extended by combining it with the potentials of a stratified medium formulated in the spatial domain with the Sommerfeld integral [see Mosig, 1989], which allows the analysis of practical multilayer printed circuits.
 In this framework, this paper presents an extension of the original image theory that permits its application to arbitrarily shaped cylindrical geometries. The new formulation to compute both the electric scalar potential and the magnetic vector potential dyadic Green's functions produced by electric currents inside arbitrarily shaped cylindrical cavities is shown. This formulation computes the Green's functions when source and observation points belong to the same transverse plane. However, a multiring approach, similar to the one presented by Pereira et al.  for circular cavities, can be used in order to evaluate observation points located at a different height than the source point. Geometries, such as rectangular, triangular and cross shaped are analyzed, while fast convergence behavior is exhibited.
 A new technique for the evaluation of the accuracy of the Green's functions is introduced, whereas two methods to increase the precision are proposed. The first is based on properly locate the spatial images, by optimizing its distance from the cavity wall in order to obtain the lowest possible error. The second is based on a gradient technique which optimizes either the complex value of the images or their location. Some useful results are obtained, showing the effectiveness of both techniques for reducing the computational error during the calculation of the Green's functions in several cavities.
 In this section, the formulation needed to obtain the potentials inside arbitrarily shaped cylindrical cavities under electric currents excitation is presented. A technique to assess the accuracy of the potentials, and two methods for their optimization are then proposed.
 With the proposed technique, the calculation of the potential Green's functions can be done inside any geometry, defined by polygonal sides. A triangular shaped geometry is depicted in Figure 1 in order to introduce the formulation without lack of generality. A unitary electric dipole is placed inside the perfectly conducting triangular cavity; the situation is analogous if other geometries are chosen. The electric field can be expressed by using the mixed potentials formulation as:
 To evaluate the electric scalar potential, the basic formulation presented by Vera-Castejón et al.  for circular cavities can be used. The idea is to impose the cancellation of this potential at N discrete points along the cavity wall. To do that, N image charges will be placed outside the structure, in order to impose the boundary conditions. Figure 2 is used to illustrate the basic idea with a triangular cavity. In this manner, the next system of linear equations is formulated to numerically evaluate the N charge complex values:
 For the sake of simplicity, the basic formulation of the method has been established by using the free space Green's functions as the foundation of the technique. In this way, GV(, ′) is the electric scalar potential Green's function of a unit point charge in free space. If one intends to model real cavities, more complex Green's functions, such as those evaluated by applying the Sommerfeld transformation for multilayer structures, should be used [see Michalski and Mosig, 1997]. This will allow considering the influence of the top and the bottom conducting covers in real cavities, and also dielectric substrates, where real circuits can be printed.
 It is interesting to point out that equation (2) is independent on the geometry of the waveguide, because a specific coordinate system is not used, and a fixed location of the images and the tangent points is not assumed. The solution of the system provides the complex values of the N-images charges (qk) needed to satisfy the boundary conditions at N-different points on the wall. The final electric scalar potential Green's function inside the cavity (GVT) is simply evaluated by reusing the already computed charge amplitudes:
 For the evaluation of the magnetic vector potential dyadic Green's function, a similar procedure is followed by taking into account the vector nature of the quantity to be computed. In this case, an arbitrary oblique wall, as shown in Figure 3, is employed to define the unitary vectors in rectangular coordinates. The boundary condition for the electric field at a discrete point on the wall is:
where ên is the unit vector normal to the oblique plane (see Figure 3), and C is the countour of the cavity. The idea is to impose the boundary conditions on the potentials, not on the fields. To translate above condition to the potentials, the mixed potential form of the electric field shown in equation (1) is used. Then, the previous condition for the electric field can be split into two different conditions for the potentials:
At this point, the Lorentz gauge is considered:
Since the electric scalar potential is zero at the cavity contour, the Laurentz gauge imposes the following final condition on the magnetic vector potential:
If equation (5) is satisfied, then equation (8) is simplified, working in rectangular coordinates, to a single condition involving the normal component of the magnetic vector potential (An), as follows:
 Considering an electric unitary dipole oriented along the x-axis (see Figure 4), the boundary conditions are imposed at N points on the wall. The utilization of two orthogonally oriented electric dipole images is proposed in order to fulfill both conditions (equations (5) and (9)) at each point. Each orthogonal dipole has its own weight. Therefore, 2N image dipoles are used, obtaining a 2N × 2N system of linear equations:
where the following definition for the constants has been used:
and GA is the magnetic vector potential Green's function without cavity. For free space, it can easily be express as:
The constant Ci,k can be computed, for a general multilayered medium, using the spectral domain formulation combined with the Sommerfeld integral transformation. For the free space case, a closed form expression can be obtained as follows:
Finally, the magnetic vector potential is recovered inside the arbitrary geometry, by using all the amplitudes of the (2N) image electric dipoles (Ikxx, Ikxy):
It is worth mentioning that, according to these expressions, an x-directed electric dipole can produce a magnetic vector potential with a y-component (or vice versa), depending upon the geometry features.
 If the electric unitary dipole inside the cavity is oriented along the y-axis, the same procedure can be followed in order to impose the boundary conditions on the wall. In this case, a similar 2N × 2N system of linear equations is obtained:
we can observe that only the excitation vector changes with respect to the system formulated for the x-oriented dipole. The computed image electric dipoles are used to recover the magnetic vector potential inside the cavity, in a similar way as before:
 Although the formulation has been introduced with a polygonal enclosure, the developed method can analyze any kind of cylindrical cavity. If the enclosure has any curved side, the normal component at each point must be taken with respect to the tangent to the cavity wall. Taking into account this detail, the formulation correctly treats any structure containing linear or curved sides.
 One interesting remark, is that it is important for the numerical algorithm to properly select the points where the boundary conditions are imposed. One possible strategy is to select uniformly the points in each segment of the cavity, avoiding the corners, where the tangent and normal vectors are not defined. Another important issue is how to place the image dipoles around the cavity.
 Because the proposed formulation pretends to be useful for the evaluation of arbitrary geometries, the situation of the images changes as a function of the waveguide shape. An intelligent way to locate them is to follow the structure contour, with an adequate separation distance (see Figure 5). However, the numerical accuracy depends directly on how this selection is made.
 To estimate the numerical precision, in both scalar and vector potentials, the boundary conditions fulfillment is measured. After that, several techniques for accuracy optimization are proposed. This is very useful, especially to limit the maximum number of images which are employed, and therefore, to reduce the computational cost, avoiding ill-conditioned systems.
 A method to estimate the precision of the electric scalar potential is the evaluation of its magnitude on the whole waveguide contour, assuming it has to be null to satisfy the proper boundary condition:
where C is the cavity contour. Once the cost is defined, it can be optimized, having in mind that the ideal (target) situation is that of zero cost.
 The first proposed technique to reduce the cost consists on changing the distance of the image charges relative to the structure, in order to find an optimum separation (see Figure 5). For every distance, the corresponding cost is obtained; the target is to find the separation of the images that leads to the minimum cost. Once it is estimated, the optimal distance is used to locate the images and to accurately compute the relevant Green's functions.
 The second technique is based on a gradient optimization applied to the image charges complex magnitudes. First, the charge values are updated using an LMS (Least Mean Square [see Haykin, 1999]) algorithm:
where (k) is a vector containing the magnitude of the N charges for the k-iteration, and (k + 1) is a vector containing the values in the next iteration.
 The cost gradient function is obtained by differentiating with respect to every charge value. To do that, the following differentiation rule is used for a function of complex variables:
where qp and qp are the real and imaginary parts of a generic image charge qp. Straightforward calculations lead to the following closed-form expression for the cost gradient with respect to a generic p-th charge:
This technique yields to a local minimum in the cost, and allows to increase the accuracy of the electric scalar potential. It is important to point out that the cost reduction depends upon the kind of analysis (the number of images, their initial situation, and the position of the source).
 In practice, this algorithm achieves better results if the number of images is not very high (up to 4–5 images per wavelength of the perimeter in average). This is because, in these situations, there is a larger improvement margin, as the local minimum is far away from the initial point. With respect to the computational cost, it can be easily controlled by modifying the LMS algorithm μ-parameter for each iteration, and stopping the process when it has converged.
 Alternatively, the accuracy of the electric scalar potential can also be improved by modifying the location of the charges. The idea is based on automatically moving each image, to obtain a configuration which optimizes the cost function (see Figure 6). For that, a gradient based algorithm is again proposed:
where (k + 1)′ is a vector containing the image positions to optimize in the (k + 1) iteration. At this point, the cost function gradient is recalculated (in this case we take the derivative with respect to a generic image position p′):
where the vector function is written as:
 Once the algorithm stops, the images have changed their position so that the cost is minimum (see Figure 6). This technique is very effective, especially for more complicated situations; for example, if the source charge is very close to the cavity walls. In this case, the images try to compensate the scalar potential singularity, approaching some of them very near to the source. An example will be given in the next section to illustrate this issue. This effect will reduce notably the cost, and yields a very accurate electric scalar potential. In this method, the computational cost is fundamental, since all the integrals must be calculated for each iteration. Techniques such as a μ-parameter dynamical modification, or an automatic stop are essential.
 The magnetic vector potential precision can also be estimated. Although this quantity is not null on the geometry contour, if an x-orientated dipole is placed inside the cavity, equations (10) and (11) must be satisfied for all points situated on the wall. Note that if the dipole is oriented along the y-axis, then equations (18) and (19) are employed. In order to measure the fulfillment of the chosen boundary condition, a contour integral can be defined along the cavity wall:
Since all the contributions are positive, they are accumulated to obtain a global cost, which gives an estimation of the magnetic vector potential accuracy:
 As it happened with the electric scalar potential, the ideal situation is the nullity of the magnetic vector potential cost. After the cost function is defined, the next step is its optimization. Due to the complexity of the cost function, only the variation of the distances of the images with respect to the cavity is proposed, in order to achieve a configuration which yields a minimum cost. The technique is similar to that applied to the electric scalar potential optimization. It is important to indicate that all the techniques employed to measure and improve the accuracy of both scalar and vector potentials are independent on the cavity geometry, so they can be applied to optimize cavities of any shape.
 One of the main advantages of the technique previously derived is that it can be easily extended to consider a multilayered medium. This is simply done by replacing the free-space Green's functions by the multilayered media Green's functions formulated in the spatial domain through the well known Sommerfeld transformation [see Michalski and Mosig, 1997]. This allows, not only to take into account the presence of dielectric layers, but also to automatically impose the boundary conditions at the top and bottom covers for the case of completely close cavities. The details of this formulation for cylindrical enclosures were presented by Quesada-Pereira et al. , and can be easily extended to general cavities.
 Another important remark is that the developed formulation can be easily extended to consider source and observation points belonging to different transverse planes. This can be carried out by using several rings of images to impose the boundary conditions on different planes. All the images from all rings interact together, and all of them are used to recover the Green's functions at any transverse plane. The details of this procedure were presented by Pereira et al.  for circular cylindrical enclosures, and it can be easily extended to arbitrarily shaped cylindrical enclosures.
 In order to estimate the performance of the developed technique, the numerical accuracy in the calculation of the Green's functions is measured inside a rectangular cavity, as shown in Figure 7. In this case, 16 images are used to enforce the boundary conditions, while the unit charge or dipole source is placed at the waveguide center.
 For this configuration, the boundary conditions are evaluated on the wall, which provides the necessary information to evaluate the potentials accuracy. The boundary conditions fulfillment for the electric scalar potential at the waveguide contour is shown in Figure 8. The presence of 16 zeros for the electric scalar potential can be observed around the contour (the boundary condition has been enforced at 16 points). In between these points higher values of the potential are observed. For the magnetic vector potential, a similar situation is obtained in Figure 9. In this case, to evaluate the boundary conditions fulfillment, the sum of the absolute values of equations (10) and (11), evaluated along the cavity wall, is plotted in Figure 9. Again, 16 zeros are obtained, corresponding to the points where the boundary conditions are imposed.
 It is important to notice in Figures 8 and 9 that there are several peaks at some of the corners, both in the scalar and vector potentials. These peaks are produced by the abrupt changes of the contour direction, that occur close to the corners of the geometry.
 The electric scalar potential cost for the first situation (placing the source at point (1) of Figure 7) is 78.041. If the gradient based algorithm, which optimizes charge values is used, the cost is decreased to only 11.51 (a reduction of ≃85.25% is achieved) as it can be seen in Figure 10.
 All the charge complex values have been updated at the same time for each iteration. Convergence has been achieved within 6 iterations, with a minimal computational budget. Depending on the waveguide, on the number of images and on the source position, the cost reduction and the number of iterations needed will change.
 If the location of the source is changed (for example, to position (2) in Figure 7), the scalar potential cost increases to 83.67. A potential singularity, which appears close to the wall rises the cost. In this case it is recommended the optimization of the images distribution using the gradient based algorithm. The final distribution of images is shown in Figure 11. It can be observed that some of the images have been positioned in front of the source, in order to compensate the scalar potential singularity close to the wall.
 This technique has provided very good results. In this case, the cost has decreased to only 32.74 (a reduction of ≃60.87%) within 15 iterations. Figure 12 illustrates the fulfillment of the boundary conditions at the waveguide contour, before and after application of the gradient optimization. The quantity plotted is the absolute values of equation (3), evaluated at several points along the cavity contour. It is worth noticing, that the potentials at the points where the boundary conditions are enforced are not null after the gradient optimization, because the algorithm tried to optimize the global cost, moving the position of the images. Therefore, the boundary conditions are not anymore imposed at several fixed points after the optimization algorithm is applied. Rather, the boundary conditions are impose on average on the whole cavity contour. Because of this fact, the cancelation of the potential near the singularity is also not perfect. We have observed that in general the algorithm can compensate at to certain point the peaks near to the source. In the example of Figure 12, the value of the potential in the peak is reduced in 6% with respect to the original value before optimization. Also we can observe in the figure, that far from the singularity the improvement is important.
 At this point, the cavity height (z-axis in Figure 7) is considered by introducing the Sommerfeld transformation [see Quesada-Pereira et al., 2005]. When the Sommerfeld transformation is used in the formulation, the boundary conditions are automatically imposed at the top and the bottom covers for completely closed enclosures.
 Taking up again the rectangular waveguide of Figure 7, a configuration, where the cavity height is 0.5λ and the source is placed at a middle-height, is considered. For general situations, it is not necessary to employ many images to achieve convergence, obtaining a very good result with only 2–3 images per wavelength of the cavity perimeter. Figure 13 shows the scalar potential along the x-axis obtained with two different numbers of images, when the source is placed at position (1) of Figure 7. The observation point is placed along the dotted line also shown in Figure 7. The results are compared with a spectral domain technique valid only for rectangular cavities, presented by Melcón and Mosig . Some differences can be seen if 5 images are used. However, the results agree well with the spectral domain approach when only 15 images are used.
 A more difficult situation occurs if the source is placed near the wall, for example, when the source is located at position (2) of Figure 7. In this case, the first image distribution fails, and the optimized image positions obtained in Figure 11 becomes really appropriate. A comparison for the scalar potential along the x-axis, with and without the optimization is shown in Figure 14. Results obtained with the technique presented by Melcón and Mosig  are included for reference. An important improvement of the accuracy is observed when the new optimization procedure is applied.
 Another kind of structure, like the cross-shaped waveguide shown in Figure 15, can also be analyzed with this technique. For this configuration, the optimization technique based on varying the distance from the images to the wall is used. These optimum distances are different for the electric scalar and for the magnetic vector potential components. The scalar potential cost variation as a function of the images separation from the cavity wall in meters is illustrated in Figure 16, at 3 GHz. As it can be observed, the cost function converged to a minimum value (0.228), situating all the images at a distance greater than 80 mm from the cavity wall.
 The same procedure has been followed in Figure 17 to obtain the relationship between the magnetic vector potential cost and the distance of the images (in meters) from the cavity. In this case, it can be noticed that a local minimum, with a cost of only 5.66, appears at 135 mm. These results show that the accuracy of both scalar and vector potentials can be considerably increased, if the distance from the images to the cavity is properly selected.
 This last example shows a very interesting aspect of the developed theory. In fact, the potentials at the cavity resonances can be computed without any convergence problems. To show that this is indeed the case, the natural resonances of a triangular cavity, illustrated in Figure 20, are calculated. The waveguide is 30 mm height and the point source is placed at 15 mm (half height). 30 images have been used to make the analysis, locating them around the waveguide as shown in Figure 20.
 To obtain the resonances, in Figure 21 the potentials are presented as a function of frequency for a fixed position of the observation and source points (see Figure 20). One can clearly observe the cavity resonances corresponding to sharp peaks in the response. Resonant frequencies predicted with the new spatial method are compared to those obtained by the finite elements technique. Table 1 shows that a high accuracy has been achieved maintaining in all cases a relative error below 0.2%.
Table 1. Cutoff Frequencies Comparison for a Real Triangular Enclosure
 The developed technique can also be used for the analysis of practical printed circuits shielded in arbitrarily-shaped enclosures. This can be done by using the new formulated Green's functions inside an electric field integral equation, formulated for the metallic objects printed on the dielectric substrates. A shielded band-pass filter based on coupled lines sections inside a square box is presented in Figure 26. For this simple geometry, only 12 images are needed to obtain good convergence. The images are placed at the air dielectric interface, surrounding the structure. The scattering parameters are presented in Figure 27, showing an excellent agreement between our results and those obtained with a spectral domain technique presented by Melcón et al. . Also, the agreement is good with the results obtained with a neural network method presented by García et al. .