Introduction

From nonlinear image processing1 to cryptography2, the ability to quickly solve mathematical problems involving linear algebra is the key for handling the increasing volume of information generated every day. As traditional electronic computers find it more difficult to increase their capabilities by achieving further miniaturization3, novel approaches based on different platforms have become closer to being functional. Researchers have managed to exploit the laws of physics in such a way that the response of well-known physical systems can be utilized to solve more abstract mathematical problems4. Among the most promising scenarios are those based on wave phenomena, such as quantum5,6,7,8,9 or wave systems10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28.

While earlier efforts using optical signal processing required extensive free-space propagation to do mathematical operations in a Fourier-transformed space29,30,31,32, more recent approaches have benefitted from the use of compact inverse-designed structures that can reliably reproduce the desired optical functionality in a more limited footprint17,33,34,35,36. Inverse-design techniques have been largely exploited for the design of complex nanophotonic structures, such as couplers for multiplexing,37 devices involving nonlinear phenomena38,39, and devices for sound classification35. Similar to other photonic devices, in the linear regime these structures can be characterized by a scattering matrix connecting a set of complex-valued input modes to a set of complex-valued output modes, thus capturing the operation of matrix multiplication40. Other researchers have exploited known resonant geometries to achieve differential equation solvers for time-envelope signals41, and an example of parallel photonic differentiation has also been recently proposed42.

By implementing feedback paths into linear systems the output and input modes can be linked together, resulting in platforms that, in addition to performing mathematical operations, can also compute the solution of mathematical problems requiring matrix inversion17. In an earlier work from our group, this concept was experimentally demonstrated with a reflective cavity, which necessitates symmetric kernels17.

In this work, we embark on a more ambitious approach to fulfill two important goals: (1) To design a single metamaterial structure that can simultaneously solve several independent equations with different kernels each with arbitrary input signals encoded on a wave with different frequency; and (2) to include more general, i.e., nonsymmetric and symmetric, kernels, using the transmissive cavity and feedback mechanism.

Results and discussion

Simultaneously solving two arbitrary integral equations

Our structures, which follow the scheme shown in Fig. 1, are capable of solving equations given by

$$g\left( u \right) = e\left( u \right) + \int_{a}^{b} {K\left( {u,v} \right)g\left( v \right)dv}$$
(1)

which constitutes a Fredholm integral equation of the second kind. In a physical realization of the device based on N input and N output waveguides, this equation can be discretized into matrix form, g = e + Kg, where g represents a N × 1 vectorial solution obtained as the complex-valued signal at each waveguide, e is the N × 1 vector input signal and K is an N × N discretized version of the kernel K(u,v). The metamaterial device gives the output g = inv(Inxn − K)e, where Inxn represents the identity matrix of the same order as the kernel. This mathematical representation provides important insight on the capability of this metamaterial platform, as it allows for the fully analog inversion of a given matrix—an important mathematical process in diverse fields. The problem is then reduced to finding a dielectric distribution whose transmission parameters reproduce the N × N matrix form of the kernel, while having near-zero reflections, where the inputs and outputs are the waveguides on the left and on the right, respectively. In other words, we need to prescribe the transmission part of the S-matrix, T, to be K.

Fig. 1: Parallel, material-based, analog computing with waves: The figure shows a conceptual schematic of a device that can simultaneously solve two integral equations as the wave goes through it.
figure 1

This includes three levels of design: a the device, able to output the solution of two Fredholm integral equations of the second kind encoded in waves at two different frequencies, for which the input waves as the excitation term is introduced into the device, as the arbitrary input to the integral equations. b the zero-phase-difference feedback mechanism required for the solution of integral equations. Panel c shows the sketch of the physical implementation of the operator block in the form of an inverse-designed dielectric distribution whose transmission matrix corresponds to the values of the kernels of the two Fredholm integral equations of the second kind at the frequencies f1 and f2, respectively.

To achieve these goals, let us start by considering the following two complex kernels as our first example for two independent Fredholm integral equations of the second kind

$$K_1\left( {u,v} \right) = 0.2\cos \left( {0.2u} \right)\sin \left( {u - v} \right) + 0.2\tanh \left( {3v - 0.4iu} \right)e^{i\left( {2u - v} \right)}$$
(2)
$$K_2\left( {u,v} \right) = 0.2J_1\left( v \right) + 0.07\sinh \left( {iv - u} \right)e^{i(3u - 1)}$$
(3)

which have been chosen to have a wide distribution of scattering parameter values in the complex plane for greater clarity and as a method to intentionally challenge our design process. These two kernels are realized simultaneously in a single metamaterial structure having five inputs and five outputs and dimensions 30 × 60 cm shown in Fig. 2a. We have found that the degrees of freedom increase with the size of the optimization domain. The size of the structure was chosen to be large enough to contain sufficient degrees of freedom while also being experimentally feasible. The transmission matrices, T1 and T2, are equal to the two kernels in the sampling grid within the interval u,v[−2.5, 2.5] at two different frequencies, i.e., at f1 = 4 GHz for K1(u, v) and f2 = 5 GHz for K2(u, v), while requiring negligible reflection (more information about the choice of the kernels and their discretization can be found in the Supplementary Materials). The two frequencies of operation were chosen to balance the tradeoff between the optimization of the metamaterial structure and the waveguiding components involved. We assume a harmonic time dependence for the fields given by ei2πft.

Fig. 2: Experimental demonstration of our device that can solve two integral equations at the same time.
figure 2

a Inverse-designed dielectric distribution that reproduces the two desired mathematical kernels when two waves with two frequencies f1 and f2 are used. b Comparison between the simulation results for the transmission scattering matrices of our design at 4 GHz and 5 GHz, and the corresponding ideal required values for such kernels. c Rendering of the device including feedback path through a two-level waveguide system, whose schematic is shown in the bottom part. d Photograph of the constructed device. e Solutions (real and imaginary parts) of the two integral equations for single inputs applied to each of the five input waveguides, obtained theoretically, experimentally and from full-wave simulation.

We utilize the method of inverse design17,37,38,39 to determine the required permittivity distribution of this structure while enforcing several fabrication constraints: (1) The structure is binary consisting of either air or the commercially available dielectric material Rexolite, with relative permittivity of 2.53 with a loss tangent lower than 10−4; and (2) The resulting dielectric distribution can be manufactured via standard CNC milling, imposing a minimum internal radius and feature size to allow for fabrication with conventional tooling. Minor postprocessing corrections were performed to reinforce these constraints where necessary. The results of this design process are shown in Fig. 2a.

In Fig. 2b, the resultant design was simulated using commercial software CST Microwave Studio®43 and the comparison between the simulation results for the complex-valued transmission part of the scattering matrices and the ideal values of the discretized desired kernels at the two frequencies of interest is presented, showing good agreement. The small errors are due to the aforementioned shape postprocessing needed for its in-house manufacturing.

Once the planar kernel design is completed, a transmission-based feedback and coupling mechanism is required to excite, recurse, and read the system. While this is theoretically possible in a fully two-dimensional (2D) geometry, a three-dimensional (3D) (i.e., two-level) feedback structure is a suitable way to ensure that the feedback waveguides are of equal length as shown in Fig. 2c, thus ensuring equal phase between the feedback lines. Slot couplers are designed to allow total transmission between the upper and lower levels at the two frequencies of interest, similar to those used in pillbox-type antennas44. To allow for the unidirectional excitation and evaluation of the system, excitation and measurement occur using two pairs of appropriately phased coaxial antennas, which act as a two element endfire array antenna45. Figure 2d is a photograph of the experimental setup (top off for clarity), showing the dielectric parts fixed in place using plastic pins, the input and output waveguides on either side, and the slot couplers bridging to the hidden waveguides on the backside.

To demonstrate the experimental functionality of our device, we have studied the solutions of our two discretized integral equations with the above selected kernels for five separate excitations, each being a unit-amplitude monochromatic signal at one of the five input ports, which indeed form the basis for any general input to the five input waveguides. These monochromatic signals have one of the two frequencies, f1 and f2 given above, each for one of the two integral equations. The experimentally extracted solutions at these two frequencies of interest are shown in Fig. 2e, compared with those obtained from the full-wave simulation of the complete structure as well as those obtained theoretically by directly inverting the discretized problems, showing an excellent agreement. The small deviations may be attributed to manufacturing imperfections, possible inconsistencies of the dielectric constant and loss tangent of the absorbing materials, or to leakages from the cavity. These results demonstrate the device’s ability to simultaneously solve two Fredholm equations of the second kind in a fully analog manner at multiple frequencies.

Simultaneous inversion of four arbitrary matrices

In the following, as a second example, we theoretically study the extension of our idea to the design of a single metamaterial platform that is able to reproduce four different mathematical kernels simultaneously. In contrast to the previous results, in this case we consider four different matrices, which we would like to invert using our metamaterial device. Here we find the dielectric distribution such that the transmissive part of the S-parameters, T, is equal to IA, where A is the matrix we wish to invert, while the reflection part is required to be negligible. To demonstrate the multi-kernel capability of this approach, four different passive (i.e., that allow for energy conservation) complex-valued matrices have been chosen arbitrarily, A1, A2, A3, and A4. given by:

$$A_1 = \left( {\begin{array}{*{20}{c}} {0.88 + 0.13i} & {0.08 - 0.05i} & { - 0.04 - 0.27i} & {0.24 + 0.26i} & { - 0.29 - 0.32i} \\ {0.22 - 0.31i} & {0.65 + 0.16i} & { - 0.16 + 0.28i} & {0.1 + 0.09i} & {0.2 - 0.2i} \\ { - 0.14 - 0.08i} & {0.12 - 0.24i} & {0.9 + 0.13i} & {0.37 - 0.11i} & { - 0.07 - 0.28i} \\ {0.02 - 0.18i} & {0.14 - 0.18i} & {0.23 + 0.04i} & {0.87 + 0.01i} & {0.13 - 0.24i} \\ { - 0.25 + 0.23i} & {0.19 - 0.27i} & { - 0.25 - 0.19i} & { - 0.04 - 0.07i} & {0.86 - 0.2i} \end{array}} \right)$$
(4)
$$A_2 = \left( {\begin{array}{*{20}{c}} {1.29 - 0.25i} & { - 0.01 + 0.04i} & {0.21 - 0.24i} & { - 0.28 + 0.32i} & { - 0.2 - 0.15i} \\ { - 0.04 + 0.11i} & {0.97 - 0.15i} & { - 0.08 - 0.1i} & {0.41 + 0.21i} & { - 0.11 + 0.01i} \\ {0.3 + 0.17i} & {0.3 + 0.18i} & {0.74 + 0.09i} & {0.12 - 0.01i} & {0.24 + 0.01i} \\ {0.33 + 0.11i} & { - 0.10 - 0.23i} & { - 0.07 - 0.21i} & {1.06 - 0.05i} & { - 0.14 + 0.16i} \\ { - 0.01 - 0.04i} & { - 0.29 + 0.14i} & { - 0.3 - 0.31i} & { - 0.26 - 0.04i} & {0.67 + 0.22i} \end{array}} \right)$$
(5)
$$A_3 = \left( {\begin{array}{*{20}{c}} {0.73 + 0.24i} & {0.05 - 0.06i} & { - 0.16 - 0.02i} & {0.34 - 0.04i} & { - 0.06 - 0.11i} \\ {0.17 - 0.28i} & {0.79 + 0.2i} & { - 0.05 + 0.24i} & { - 0.2 - 0.07i} & {0.2 - 0.13i} \\ { - 0.29 - 0.16i} & { - 0.12 - 0.27i} & {1.1 + 0.03i} & {0.17 - 0.07i} & { - 0.2 - 0.19i} \\ { - 0.2 - 0.19i} & {0.16 + 0.04i} & {0.2 + 0.16i} & {0.88 + 0.04i} & {0.18 - 0.26i} \\ { - 0.16 + 0.17i} & {0.31 - 0.26i} & {0.03 + 0.08i} & {0.14 - 0.02i} & {1.13 - 0.27i} \end{array}} \right)$$
(6)
$$A_4 = \left( {\begin{array}{*{20}{c}} {0.76 - 0.21i} & {0.16 - 0.05i} & { - 0.03 - 0.07i} & {0.4 + 0.02i} & { - 0.14i} \\ {0.27 - 0.27i} & {0.76 + 0.18i} & {0.03 + 0.24i} & { - 0.03 - 0.04i} & {0.29 - 0.14i} \\ { - 0.15 - 0.14i} & {0.03 - 0.25i} & {1.04 + 0.05i} & {0.3 - 0.07i} & { - 0.07 - 0.2i} \\ { - 0.05 - 0.18i} & {0.25 - 0.01i} & {0.3 + 0.13i} & {0.86 + 0.03i} & {0.26 - 0.24i} \\ { - 0.07 + 0.17i} & {0.37 - 0.25i} & {0.07 + 0.03i} & {0.2 - 0.03i} & {1.05 - 0.24i} \end{array}} \right)$$
(7)

Following the previous approach, we select four frequencies within the band of operation of the waveguides, and we apply the optimization method to determine the dielectric distribution for our metamaterial device in order to render the transmission parts of the S-parameters associated with the four matrices at four frequencies f1 = 4 GHz, f2 = 4.5 GHz, f3 = 5 GHz, and f4 = 5.5 GHz. The resulting dielectric design is shown in Fig. 3a, with the associated transmission matrix, obtained using numerical simulations, shown in Fig. 3b. To show the large capability of the presented approach, in this design we imposed that the structure be binary with no other fabrication based constraints, as we did not plan to build this example. We obtained an excellent agreement for all 100 complex transmission coefficients.

Fig. 3: Simulated design for a single metamaterial device that can invert four matrices simultaneously, designed at four different frequencies.
figure 3

a Dielectric distribution designed for the four selected matrices. b Comparison between the simulation results of our design for the transmission s-parameters of 4 matrices at the four frequencies of interest, and the corresponding desired values of these kernels. c Theoretically expected and the simulation results for the inverse matrices achieved using the designed platform.

Finally, in Fig. 3c we present the simulation results from our design showing the inverses of the four matrices, compared with the theoretical results expected for these inverses, revealing an excellent agreement.

In conclusion, in this article we have demonstrated the capability of single inverse-designed platforms that can simultaneously solve a number of mathematical problems such as integral equations and matrix inversion in a completely independent manner using a multifrequency approach. An experimental device was constructed and measured at microwave frequencies showing the ability of our approach to solve two independent integral equations simultaneously at two different frequencies involving kernels, which are nonsymmetric and nonseparable, through the use of feedback. The traditionally challenging feedback mechanism was implemented in a compact manner using a multilevel waveguide approach, leading to excellent agreement between the analog solution with respect to the theoretical and simulated solutions. In addition, we have presented a design for a dielectric distribution, which could be used for the inversion of four arbitrary matrices using the same approach. We believe that this technology has a strong potential for parallel integrated computing photonic circuitry for fast analog signal processing.

Methods

Inverse design and determination of dielectric distribution

The electromagnetic optimization problem of finding the dielectric distribution associated with the transmission matrix given by the mathematical kernel was undertaken using the topological optimization module commercially available within the finite-element method software COMSOL Multiphysics®. In the software, the objective was set to minimize the complex-plane “distance” between the S-parameters and their desired values, consistent with the transmission part being equal to that obtained from the kernel and the reflection part being zero. A separate “Physics Node” was used for each frequency and for each waveguide input, corresponding to a column in the S-Matrix. Therefore, the number of ‘”Physics Nodes” required was equal to NwgNf, with Nwg being the number of input waveguides and Nf being the number of frequencies for which the design is being optimized. The number of objectives is therefore equal to 2N2wgNf.

To reduce the family of solutions to those given by binary values of the relative permittivity, a soft step function was introduced as a weighting of the optimization variables when defining the relative permittivity as a function of the former. Several initial conditions were used until a preliminary experimentally feasible solution was found. The issues arising with radii of curvature and nonbinarized points within the distribution were solved by iteratively blurring and reoptimizing the distribution until the issues were resolved. To improve the resolution of the raster-based dielectric distribution before being exported for manufacturing, the mesh size was iteratively reduced and reoptimized until the desired resolution was achieved.

Once the final raster-based design was obtained within COMSOL Multiphysics®, a high-resolution image was exported and processed through an in-house developed contour-analyzer code, which extracted the vector-format shape of each of the closed-polygon structures of the dielectric distribution. This vector-format design was then imported into the three-dimensional (3D) design software SolidWorks® for the generation of the toolpath needed for the milling of the plastic pieces. The vector-based format of SolidWorks® was also used for its simulation in CST Microwave Studio® as a verification step.

Choice of the frequencies

Our design implies a balance between several constraints. Due to the fact that the two kernels were chosen to be drastically different, the two frequencies should be chosen distant enough as to allow for the scattered fields in the cavity to be sufficiently different from each other at the two frequencies, avoiding large quality factors that would require unrealistic precision in both geometry construction and material properties, which would make such a distribution difficult to find. Additionally, there were several practical concerns. The feedback loop includes specially designed elements such as the non-reflective 180-degree waveguide turn achieved via the use of a slot coupler, which has to be optimized to work at the two frequencies of operation. In addition, we exploited the lowest order mode (TE10) of the rectangular waveguide sections, which presents a cutoff frequency (2.8 GHz) while the complexity of the scattered fields could trigger the excitation of higher order modes in the waveguide (with cutoff frequency 5.6 GHz). Therefore, to balance the tradeoff between the easier dielectric optimization at distinct enough frequencies with the more difficult design of the microwave circuitry involved, 4 GHz and 5 GHz were chosen as the two final frequencies of operation.

Choice of Kernel functions

Each of the functions (kernels), K1(u,v) and K2(u,v), was chosen to have a wide distribution of scattering parameter values in the complex plane, as we felt that this would increase the difficulty and “arbitrariness” of the problem and that a wide spread had greater pedagogical value. These were scaled to achieve the passivity of the system, ensured by the integral over the interval of interest. In our case, we chose the interval given by u,v[−2.5,2.5]. Due to our discrete implementation of the kernels using waveguiding structures, the integrals in the Fredholm integral equation are calculated using a numerical scheme, in the form of a midpoint integration approximation with five sampling points, each associated with an input-output waveguide pair.

Design of the feedback waveguides in the experimental setup

The challenge of designing a 3D waveguide structure with feedback was solved by implementing a two-level system. To achieve negligible reflections, a slot was designed to connect both levels, whose dimensions and positions were optimized to give minimal reflections at the frequencies of interest (i.e., 4 GHz and 5 GHz). To accommodate manufacturing limitations, rounded corners (1.59 mm radius) and the metal thickness (63.5 mm) were introduced in the model as provided by the manufacturer. The optimization method used was the trust-region optimization routine implemented in CST Microwave Studio®.

Design of the unidirectional excitation

The matrix inversion or integral equation solving functionality of the design requires that all waves propagate predominantly only along the direction in which the dielectric distribution is designed to reproduce the desired mathematical kernel. Therefore, to ensure this, we need to enforce that the couplers (which introduce the excitation of the waveguide systems) only excite the mode along the direction of the desired feedback. To do so, we have introduced a pair of coaxial antennas as sources, whose modes are excited with a given phase difference such that the amplitude of the back-propagating mode is zero. The correct phase difference was found through full-wave simulations at the frequencies of interest. To ensure that the presence of these couplers does not perturb the feedback, the length of the tip belonging to the inner conductor of the coaxial antenna has been designed to ensure a coupling coefficient of 5% in amplitude.

Manufacturing methods

The system was built using several layers. The main metal structure containing the waveguides on both sides and the cavity was manufactured by an external company (Ephrata Precision Parts Inc.) using industrial CNC milling capabilities. The plastic parts representing the mathematical kernels were manufactured in our lab using a table-top CNC milling machine. Once these pieces and the absorbing material were assembled, both the top and bottom of the system were sealed by laser-cut sheet metal. On top of these, the exciting and probing antennas were held in place using custom-made bridges. Four hundred screws and conductive tapes ensured the electromagnetic isolation of the system, including an additional rubber layer and customized ‘washer’ on the outside to achieve a uniform force was pressing the top and bottom covers against the sidewall edges. Additionally, the sidewall edges were recessed to ensure that the electrical conduction occurred at the inside corner of the cavity.