1 Introduction

The focus in this article is on the topology optimization of waveguides where the objective function depends on the envelope of the output signal. Such optimized designs as well as the methodology for obtaining them, can be utilized in a wide range of physical areas—in control of electromagnetic waves in optical waveguides and design of logical elements for photonic processors, in coupled opto-mechanical and acoustic sensors, for sound and vibration isolation, inverse problems in seismology, biomedical imaging and structural health monitoring, etc. The structures are obtained by using alternating layers of different materials in 1D or by distributing several materials in space for multidimensional problems. Periodic structures possess filtering properties and have been investigated by many authors using analytical, numerical and experimental methods (e.g. Brillouin 1953; Mead 1975; Kushwaha et al. 1993). Waves attenuate along these structures within specific bands of frequencies called stop bands or band gaps. The periodic structures act as a filter for frequencies inside the band gap.

Simple filter designs (e.g. band-gaps) can be easily obtained by utilizing analytical techniques, however the design of more complicated filters, like pulse shaping or pulse delaying devices require utilization of numerical techniques such as topology optimization. Topology optimization is an iterative optimization procedure, which produces optimal material distribution. The design domain is split into multiple cells and a design variable is assigned to each of them. The design variables take value 0 if the cell is empty, or 1 if the cell is filled with material. In order to make the optimization problem solvable by using gradient based optimization techniques, the design variables are allowed to vary continuously between 0 and 1. In each optimization iteration the design variables are updated based on fulfillment of prescribed constraints and minimization of a given objective. Initially topology optimization has been developed for mechanical systems (Bendsøe and Sigmund 2004) and later its field of applicability has been extended to include applications in electromagnetics—antenna design and photonics (Sigmund and Jensen 2003; Jensen and Sigmund 2004, 2010; Nomura et al. 2007).

Topology optimization has been applied to wave propagation problems modeled in the frequency domain (Sigmund and Jensen 2003; Jensen and Sigmund 2005) and in the time domain (Nomura et al. 2007; Dahl et al. 2008; Matzen et al. 2010). Time domain topology optimization has been introduced relatively recently and the main advantage compared to the frequency domain topology optimization is lower computational cost for wave problems consisting of broad range of frequencies. For non-linear material behavior where the energy can be exchanged between different frequency components, models in the frequency domain can represent the system behavior approximately for weak interaction and stationary response (Jensen 2010). In contrast, time domain methods can model strongly non-linear or active (time-controllable) materials without any limitations.

Practical applications of the optimized wave guides and filters require the utilization of signal generators and detectors. The generation or the detection of short signals is an unreliable process, e.g. see the discussion in Yang et al. (2009), and in practical applications a signal is composed of one or several modulated high frequency waves. In digital signal processing, the actual information is carried by the signal envelope. A way to extract the envelope information in topology optimization for single frequency modulated wave is reported in Yang et al. (2009). Here a more robust alternative based on the Hilbert transform (e.g. Cohen 1995) is introduced and demonstrated for pulse shaping and delaying devices. The Hilbert transform envelope extraction can be utilized for a broader range of problems: waves with multiple frequencies (i.e. pulses) and non-linear wave guides and filters.

2 Time domain topology optimization

The considered physical problem is wave propagation in a wave guide. The model setup is shown in Fig. 1. Pulses are propagating from left to right and the aim is to find material distribution in the middle region, i.e. the design domain, which minimizes given objective. The objective depends on the pulse envelope. The envelope of the signal is obtained by using the Hilbert transform as

$$ s \left(t\right)=\sqrt{u\left(t\right)^2+\hat{u}\left(t\right)^2} $$
(1)

where u(t) is the signal, \(\hat{u}\left(t\right)\) is the Hilbert transform and s(t) is the signal envelope. The Hilbert transform is defined in the time domain as convolution between the Hilbert transformer 1/(πt) and a function u(t). Examples of signals, their Hilbert transforms and the envelopes are shown in Fig. 2. The transformed signal is obtained from the original one by using π/2 phase shift. For both examples the envelope is smooth and slowly varying function. The envelope extraction is applicable for signal centered around a single frequency Fig. 2a, as well as for signal consisting of a broad range of frequencies Fig. 2b. More details about Hilbert transform can be found in most textbooks on signal processing (e.g. Cohen 1995) and a short introduction can be found in Appendix A.

Fig. 1
figure 1

Numerical model setup for the optimization experiments. Absorbing boundary condition (ABC) is applied in both ends of the modeling domain. Incident signal is generated in the left boundary using the incident-scattered field formulation. The signal and its envelope are extracted in the target node on the right side of the design domain

Fig. 2
figure 2

Pulse envelope obtained by using Hilbert transform

2.1 Wave equation

The physical behavior of the system can be described by the following scalar wave equation

$$ \frac{\partial}{\partial x}\left(A \frac{\partial \Psi }{\partial x}\right)-B \frac{\partial^2 \Psi}{\partial t^2}=0, \quad x\in\Omega $$
(2)

where Ψ is a scalar quantity which can represent:

  1. 1.

    u(x, t)—displacements for elastic wave propagation

  2. 2.

    p(x, t)—pressure for acoustic problems

  3. 3.

    e(x, t)—electric field in electromagnetics

Ψ(x, t) is a function of both the time t and the spatial coordinate x ∈ Ω. The material parameters A and B are equal to:

  1. 1.

    A = E (x) the Young’s modulus and B = ρ (x) the mass density for linear elasticity

  2. 2.

    A = 1/ρ (x) the inverse of the mass density and B = 1/κ (x) the inverse of the bulk modulus for linear acoustics

  3. 3.

    A = 1/μ (x) the inverse of the material permeability and B = ϵ (x) the permittivity in electromagnetics

In order to model an infinite wave guide, first order absorbing boundary conditions are applied at both ends of the modeling domain. The wave field can be split in two parts—scattered and incident field.

$$ \Psi=\Psi^{{\rm{sc}}}+\Psi^{{\rm{inc}}} $$
(3)

The boundary condition at the right end is given as

$$ \frac{\partial \Psi^{{\rm{sc}}}}{\partial x}+c\frac{\partial \Psi^{{\rm{sc}}}}{\partial t}=0 $$
(4)

and at the left end can be written as

$$ \frac{\partial \Psi}{\partial x}+c\frac{\partial \Psi}{\partial t}= \frac{\partial \Psi^{{\rm{inc}}}}{\partial x}+c\frac{\partial \Psi^{{\rm{inc}}}}{\partial t} $$
(5)

The value of Ψinc at the left end of the modeling domain is known a priori. The coefficient \(c=\sqrt{AB}\) is the so-called surface admittance. For elastic wave propagation the two boundary conditions (4) and (5) can be modeled as two dash-pots with damping coefficient \(c=\sqrt{E\rho}\). It should be pointed out that for high dimensional problems in 2D and 3D the above boundary condition cannot absorb the outgoing waves. In these cases an alternative such as perfectly matched layers (PML) (e.g. Jin and Riley 2007; Matzen et al. 2010) can be utilized for avoid the boundary reflections.

2.2 Discretization

The computational domain is discretized into finite elements. A design variable \(\rho_i\in\left[0,1\right]\) is associated with each element located in the design domain (see Fig. 1). By applying the standard Galerkin discretization procedure (Zienkiewicz et al. 2005), the discrete form of equations (2), (4) and (5) becomes

$${\bf{M}}\left({\boldsymbol{\rho}}\right)\ddot{\bf{u}}+{\bf{C}}\left({\boldsymbol{\rho}}\right)\dot{\bf{u}} +{\bf{K}}\left({\boldsymbol{\rho}}\right){\bf{u}}={\bf{f}}\left(t\right),\quad t\in\left[0,T\right] $$
(6)

where u is the nodal displacement vector, \(\dot{\left(\cdot\right)}\) and \(\ddot{\left(\cdot\right)}\) denote first and second derivative with respect to time, f(t) is a vector with the system input. In linear elasticity M(ρ), C(ρ) and K(ρ) and are the standard mass, damping and stiffness matrices, respectively. The damping matrix is populated only with entries coming from the boundary conditions, since the wave guide is considered to be lossless. The vector ρ consists of all design variables associated with the elements in the design domain.

The material properties for each design element are obtained by using the following linear interpolationFootnote 1

$$\begin{array}{rll} A_e&=&\left(1-\rho_e\right)A^{I}+\rho_e A^{II} \\ B_e&=&\left(1-\rho_e\right)B^{I}+\rho_e B^{II} \end{array} $$
(7)

where \(\left(A^{I},B^{I}\right)\) and \(\left(A^{II},B^{II}\right)\) represent the material properties for material I and II, respectively, and ρ e is the design variable associated with element e. The above interpolation scheme makes it possible to apply a gradient based optimization algorithm. The main drawback is the appearance of intermediate (gray) values in the final design (between 0 and 1), which are difficult to interpret. Several techniques have been developed to ensure black and white designs (Bendsøe and Sigmund 2004; Yang et al. 2009; Wang et al. 2010). Obtaining length scale and crisp black and white designs for wave problems is a challenging problem deserving a more detailed study, which is outside of the scope of this article.

2.3 Optimization problem

The focus in this section is to define a pulse shaping and pulse delaying strategy based on a signal envelope extraction. The envelope s(t) in the time domain is defined by (1). The aim of the optimization is to obtain a signal at the registration point (Fig. 1), with an envelope following a prescribed function g(t). The objective is defined as

$$ f=\frac{\int_0^T\left[s\left(t\right)^2-g\left(t\right)^2 \right]^2 {\rm{d}}t}{\int_0^T g\left(t\right)^4 {\rm{d}}t} $$
(8)

The term s(t) is squared in the above equation in order to avoid special handling of the case when u(t) = 0 and \(\hat{u}\left(t\right)=0\). The objective is normalized with respect to the pulse area and obtained results are reported in percentages. The pulse shaping optimization problem can be written in the following form

$$ \begin{array}{rll} \min\limits_\rho &:& f\left({\boldsymbol{\rho}}\right) \\ s.t.&:& {\bf{M}}\left({\boldsymbol{\rho}}\right)\ddot{\bf{u}}+{\bf{C}}\left({\boldsymbol{\rho}}\right)\dot{\bf{u}} +{\bf{K}}\left({\boldsymbol{\rho}}\right){\bf{u}}={\bf{f}}\left(t\right),\quad t\in\left[0,T\right]\\ & & 0\leq {\boldsymbol{\rho}}\leq 1 \end{array} $$
(9)

where the objective is given by (8). Due to the dispersive properties of the optimized structure, the different frequency components of a pulse traveling through the device arrive at the registration point shifted with respect to each other. Therefore, an initially Gaussian shaped pulse changes its shape and amplitude through the optimization domain (Fig. 3). The distortion and the amplitude decrease become significant when the objective is to delay the pulse. In order to account for these changes the pulse delay optimization problem is defined as

$$\begin{array}{rll} \min\limits_\rho &:& -\beta \\ s.t.&:& {\bf{M}}\left({\boldsymbol{\rho}}\right)\ddot{\bf{u}}+{\bf{C}}\left({\boldsymbol{\rho}}\right)\dot{\bf{u}} +{\bf{K}}\left({\boldsymbol{\rho}}\right){\bf{u}}={\bf{f}}\left(t\right),\quad t\in\left[0,T\right] \\ & & g_1\left({\boldsymbol{\rho}},\beta\right)\leq 0\\ & & 0\leq {\boldsymbol{\rho}}\leq 1\end{array} $$
(10)

where β is the pulse delay and the constraint function \(g_1\left(\rho,\beta\right)\) is given as follows

$$ g_1\left(\rho,\beta\right)=\frac{\int_0^T \left[s\left(t\right)^2-\alpha g\left(t-\beta\right)^2\right]^2 {\rm{d}}t}{g^* \int_0^T \alpha^2 g\left(t\right)^{4} {\rm{d}}t} -1 $$
(11)

The parameter α controls the amplitude scaling and the parameter g * controls mainly the envelope distortion (spreading). The meaning of the parameters is shown in Fig. 3.

Fig. 3
figure 3

Pulses with a group delay 0 and β. The parameter β is introduced as an design variable. The g *-parameter controls the temporal spreading of the output pulse envelope. The α-parameter mainly specify the transmitted energy, i.e. the amplitude decrease

The first formulation can be used to find an optimized structure which delays the input pulse with a prescribed fixed value by minimizing the difference between the output signal and prescribed delayed signal. The second formulation tries to find the maximum delay so that the constraint (11) is fulfilled.

2.4 Sensitivity analysis

Sensitivities of the objective and the constraints with respect to all design variables are needed in order to solve the optimization problems. For large numbers of design variables the adjoint sensitivity approach offers a computationally effective alternative to direct sensitivity analysis (Tortorelli and Michaleris 1994; Kang et al. 2006). The objective or the constraint function is augmented with product of Lagrangian multiplier vector λ(t) and the residual of the discretized state problem

$$ \psi=\int_0^T G\left(\hat{\bf{u}},{\bf{u}},{\boldsymbol{\rho}},t\right)+{{\boldsymbol{\lambda}}^{\sf{T}}}\left(t\right) {\bf{r}}\left({\bf{u}},\dot{\bf{u}},\ddot{\bf{u}},{\boldsymbol{\rho}},t \right){\rm{d}}t $$
(12)

where

$${\bf{r}}\left({\bf{u}},\dot{\bf{u}},\ddot{\bf{u}},{\boldsymbol{\rho}} \right)={\bf{f}}-\left({\bf{M}}\left({\boldsymbol{\rho}}\right)\ddot{\bf{u}}+{\bf{C}}\left({\boldsymbol{\rho}}\right)\dot{\bf{u}} +{\bf{K}}\left({\boldsymbol{\rho}}\right){\bf{u}}\right) $$
(13)

The function \(G\left(\hat{\bf{u}},{\bf{u}},\rho,t\right)\) in (12) represents the integrand in the original objective or constraint function. For zero residual the augmented function coincides with the original one. Derivative of the objective function is obtained by differentiating (12) with respect to the design variables

$$\begin{array}{rll} \frac{\partial \psi}{\partial \rho_e} &=& \int_0^T \frac{\partial G}{\partial{\bf{u}}}\frac{\partial {\bf{u}}}{\partial \rho_e} + \frac{\partial G}{\partial{\hat{\bf{u}}}}\frac{\partial \hat{\bf{u}}}{\partial \rho_e}+ \frac{\partial G}{\partial \rho_e} +\frac{\partial {\boldsymbol{\lambda}}^{\sf{T}}}{\partial \rho_e} {\bf{r}} \\ &&+{\boldsymbol{\lambda}}^{\sf{T}} \left[\frac{\partial {\bf{r}}}{\partial {\bf{u}}}\frac{\partial {\bf{u}}}{\partial \rho_e}+ \frac{\partial {\bf{r}}}{\partial \dot{\bf{u}}}\frac{\partial \dot{\bf{u}}}{\partial \rho_e}+\frac{\partial {\bf{r}}}{\partial \ddot{\bf{u}}}\frac{\partial \ddot{\bf{u}}}{\partial \rho_e}+\frac{\partial {\bf{r}}}{\partial \rho_e} \right] {\rm{d}} t \end{array} $$
(14)

Integrating by parts and rearranging the above equation yields

$$\begin{array}{rll} \frac{\partial \psi}{\partial \rho_e} &=& \left[- {\boldsymbol{\lambda}}^{\sf{T}} {\bf{C}} \frac{\partial {\bf{u}}}{\partial \rho_e} - {\boldsymbol{\lambda}}^{\sf{T}} {\bf{M}} \frac{\partial \dot{\bf{u}}}{\partial \rho_e} + \dot{{\boldsymbol{\lambda}}}^{\sf{T}} {\bf{M}} \frac{\partial {\bf{u}}}{\partial \rho_e} \right]_0^T\\ && - \int_0^T\left[ {\ddot{\boldsymbol{\lambda}}}^{\sf{T}} {\bf{M}} \frac{\partial u}{\partial \rho_e} -{\dot{\boldsymbol{\lambda}}}^{\sf{T}}{\bf{C}}\frac{\partial {\bf{u}}}{\partial \rho_e} + {\boldsymbol{\lambda}}^{\sf{T}}{\bf{K}}\frac{\partial u}{\partial \rho_e}\right] {\rm{d}} t \\ && + \int_0^T \left[ \frac{\partial G}{\partial {\bf{u}}}\frac{\partial {\bf{u}}}{\partial \rho_e} + \frac{\partial G}{\partial \hat{\bf{u}}}\frac{\partial \hat{\bf{u}}}{\partial \rho_e} \right] {\rm{d}} t \\ &&{\kern30pt} \!+\! \int_0^T \frac{\partial G}{\partial \rho_e} \!+\! {\boldsymbol{\lambda}}^{\sf{T}} \!\left[ \!-\frac {\partial {\bf{M}}}{\partial \rho_e} \ddot{\bf{u}}\!- \frac {\partial {\bf{C}}}{\partial \rho_e}\dot{\bf{u}}-\frac {\partial {\bf{K}}}{\partial \rho_e}{\bf{u}} +\frac{\partial f}{\partial \rho_e} \right] {\rm{d}} t \end{array} $$
(15)

The above equation holds for arbitrary \(\boldsymbol{\lambda}\), therefore the Lagrangian multipliers can be chosen to eliminate the second and the third integral in (15). Using the identity

$$ \int_0^T \frac{\partial G}{\partial \hat{\bf{u}}} \frac{\partial \hat{\bf{u}}}{\partial \rho_e} {\rm{d}} t = \int_0^T -\widehat{\frac{\partial G}{\partial \hat{\bf{u}}}} \frac{\partial {\bf{u}}}{\partial \rho_e} {\rm{d}} t $$
(16)

and collecting all terms with \(\frac{\partial {\bf{u}}}{\partial \rho_e}\), the following adjoint equation is obtained from the above requirement

$$ {\ddot{\boldsymbol{\lambda}}}^{\sf{T}} {\bf{M}} -{\dot{\boldsymbol{\lambda}}}^{\sf{T}}{\bf{C}} + {\boldsymbol{\lambda}}^{\sf{T}}{\bf{K}} = \frac{\partial G}{\partial {\bf{u}}} -\widehat{ \frac{\partial G}{\partial \hat{\bf{u}}}} $$
(17)

The term \(\widehat{ \frac{\partial G}{\partial \hat{\bf{u}}}}\) denotes the Hilbert transform of \({ \frac{\partial G}{\partial \hat{\bf{u}}}} \). The evaluation of the right hand side of (17) is performed in several steps as follows:

  1. 1.

    the Hilbert transform \(\hat{\bf{u}}\) is obtained from the response u

  2. 2.

    the envelope s(t) is computed using (1)

  3. 3.

    the derivatives \(\frac{\partial G}{\partial \hat{\bf{u}}}\) and \(\frac{\partial G}{\partial {\bf{u}}}\) are computed as functions of time

  4. 4.

    the Hilbert transform \(\widehat{ \frac{\partial G}{\partial \hat{\bf{u}}}}\) is computed using \({ \frac{\partial G}{\partial \hat{\bf{u}}}} \) evaluated in the previous step

The proof of the identity given by (16) is presented in Appendix B.

The first term in (15) is evaluated at time t = 0 and t = T. As the initial velocities and displacements do not depend on the material distribution, the term vanishes at t = 0. To eliminate the remaining part of the term at time t = T, the terminal conditions for the adjoint equation (17) are set to be

$$ \boldsymbol{\lambda}\left(T\right)=0,\quad \dot{\boldsymbol{\lambda}}\left(T\right)=0 $$
(18)

Utilizing the solution of (17) and (18), the sensitivity expression reduces to

$$ \frac{\partial \psi}{\partial \rho_e}=\int_0^T \frac{\partial G}{\partial \rho_e} + {\boldsymbol{\lambda}}^{\sf{T}} \left[ -\frac {\partial {\bf{M}}}{\partial \rho_e} \ddot{\bf{u}}- \frac {\partial {\bf{C}}}{\partial \rho_e}\dot{\bf{u}}-\frac {\partial {\bf{K}}}{\partial \rho_e}{\bf{u}} +\frac{\partial f}{\partial \rho_e} \right] {\rm{d}} t $$
(19)

which consists of only explicit derivatives with respect to the design variables. They are computed based on the numerical discretization and the material interpolation. Usually the first term in the integral \(\frac{\partial G}{\partial \rho_e}\) is zero.

The terminal value problem (17) can be converted to initial value problem by substituting t with t = T − τ, where \(\tau\in\left[0,T\right]\). Setting \(\bar{\boldsymbol{\lambda}}\left(\tau\right)=\boldsymbol{\lambda}\left(T-\tau\right)\), (17) becomes

$${\bf{M}}\ddot{\bar{\boldsymbol{\lambda}}}+{\bf{C}} \dot{\bar{\boldsymbol{\lambda}}}+{\bf{K}}{\bar{\boldsymbol{\lambda}}}=\frac{\partial G}{\partial {\bf{u}}} -\widehat{ \frac{\partial G}{\partial \hat{\bf{u}}}} $$
(20)

with initial conditions \(\bar{\boldsymbol{\lambda}}\left(0\right)=0\) and \(\dot{\bar{\boldsymbol{\lambda}}}\left(0\right)=0\).

The adjoint problem in this form is identical to the state problem. The only difference is the input to the differential equation. Therefore the same solver used for obtaining the state problem solution can be utilized for obtaining the solution of the adjoint equation.

The sensitivity of \(g_1\left({\boldsymbol{\rho}},\beta\right)\) with respect to β is computed as

$$ \frac{\partial g_1}{\partial \beta}=\frac{\int_0^T -4\left[s\left(t\right)^2-\alpha g\left(t-\beta\right)^2\right] \alpha g\left(t-\beta\right) \frac{\partial g\left(t-\beta\right)}{\partial \beta} {\rm{d}}t}{g^* \int_0^T \alpha^2 g\left(t\right)^{4} {\rm{d}}t} $$
(21)

2.5 Time integration

As no analytical solution to (6) and (20) exists in the general case, the solution is obtained numerically at discrete time points. The choice of time integration scheme is extremely important for topology optimization, as the integration has to be performed twice after each update of the design variables. Explicit schemes with lumped mass matrices are preferred over implicit ones, due to their lower computational cost. In each topology optimization iteration step, first the state response is computed and after that the adjoint sensitivities are computed utilizing the state solution for evaluating the adjoint input. The adjoint response is computed at the same time points as for the state solution. During the integration process the value of the integrand in (19) is computed and its contribution is added to the sensitivities. The evaluation of the integrand in (19) is based on the solution for \(\boldsymbol{\lambda}\) and u at the current time step. In order to implement the above scheme, it is necessary to store the state response \(\bf{u}\left(t\right)\).

The time derivatives \(\dot{\bf{u}}\left(t\right)\) and \(\ddot{\bf{u}}\left(t\right)\) are computed based on finite difference scheme. At the n th time step they are given as

$$ \dot{\bf{u}}_n = \frac{{\bf{u}}_{n+1}-{\bf{u}}_{n-1}}{2\Delta t}$$
(22)
$$ \ddot{\bf{u}}_n = \frac{\bf{u}_{n+1}-2{\bf{u}}_{n} +{\bf{u}}_{n-1}}{\Delta t^2} $$
(23)

where Δt = t n + 1 − t n . Inserting the above expressions in (6) and rearranging the term gives

$$\begin{array}{rll} \left(\frac{1}{\Delta t^2}{\bf{M}}+\frac{1}{2\Delta t}{\bf{C}} \right) {\bf{u}}_{n+1}&=& {\bf{f}}_{n}\! -\!\left(\frac{2}{\Delta t^2}{\bf{M}}+{\bf{K}} \right){\bf{u}}_{n} \\ [9pt] &&-\!\left(\!\frac{1}{\Delta t^2}{\bf{M}}\!-\!\frac{1}{2\Delta t}{\bf{C}} \!\right)\!{\bf{u}}_{n-1} \end{array} $$
(24)

where f n is the system input at time t n . Equation (24) provides the solution at time t n + 1, based on the system response at time steps t n and t n − 1. The integration procedure starts with initial conditions u 0 = 0 and u  − 1 = 0. For the sensitivity analysis the second time derivative of the response is computed as

$$ \ddot{\bf{u}}_0={\bf{M}}^{-1}f_0 $$
(25)

The time step is chosen according to Courant-Friedrichs-Lewy (CFL) condition to ensure stable integration, i.e. Δt ≤ Δt c  = Δx / c where Δx is the spatial step and c is the wave speed.

In (24) it is desirable to have diagonal mass M and damping C matrices in order to avoid the solution of a linear system, which will add significant computational cost to the integration process. Various lumping techniques have been presented in the literature. Among them spectral finite element discretization leads to fully diagonal mass matrix for nodal based elements (Cohen 2002; Peng et al. 2009). For acoustic problems the employment of modified central scheme (Yue and Guddati 2005) results in diagonal mass matrix and fourth order dispersion error. In electromagnetic problems, application of the trapezoidal integration rule to vector-based elements results in diagonal mass matrix without compromising the accuracy (Jin and Riley 2007).

2.6 Implementation details

The time domain optimization process consists of the following steps

  1. 1.

    Integration of the state response using (24).

  2. 2.

    Evaluating the objective and the constraint functions using the trapezoidal numerical integration

  3. 3.

    Integration of the adjoint response using (24) with the forcing term evaluated using the state response obtained in step 1. At each time step the integrand in (19) is evaluated and the contribution to the sensitivities is added by using the trapezoidal integration rule.

  4. 4.

    Update the design variables \({\boldsymbol{\rho}}\) using optimizer (MMA)

The Method of Moving Asymptotes (MMA) (Svanberg 1987) is utilized for solving the optimization problem. The optimization iteration is stopped when the infinite norm of the design vector increment is smaller than 10 − 3.

A major challenge for the proposed method is the storage of the solution for the state problem, especially for larger structures and long simulation times. In order to attack large problems the state solution is stored in selected time points. For computing the adjoint solution the state problem solution is recomputed between each of the selected time points. Using such scheme decreases the memory requirement by several orders of magnitude. This method, however increases the computational cost by adding one additional simulation of the state equation.

3 Numerical experiments

Two numerical experiments, which correspond to the two optimization problems defined in Section 2.3, are presented in this section. The first numerical experiment is pulse delay, where the aim is to delay a pulse as much as possible and at the same time restricting the allowable envelope distortion. The objective for the first numerical experiment is given by (10). A well known example of such an experiment is the slow light-matter interaction technology which is achieved by utilizing pulse delaying structures. It might find high applicability in the future optical networks and information processing systems, e.g. to achieve low power consumption and efficient optical buffer devices (Baba 2008). The method presented here works equivalently for other physical problems as well. Among other potential applications are ultrasonic (Arenberg 1948) and surface acoustic wave (Reindl et al. 2001) (SAW) delay lines.

The second numerical experiment is pulse shaping example where the aim is the pulse recorded in the registration point to follow predefined envelope. Optimized designs providing such features can find utilization in data decoding devices and optical networks. In addition the methodology can be utilized for solving inverse problems in seismology or medical applications.

3.1 Pulse delay

Slow light can be realized in structures with composite dielectric media (Joannopoulos et al. 2008). Such composite structures are realized with permeability μ equal to the vacuum permeability, i.e. μ r  = 1, and the only material parameter left for interpolation is the permittivity. The interpolation is done between air and dielectric material, i.e. \(A^I=A^{II}=\mu_r\) and \(B^{I}=\epsilon_0\) and \(B^{II}=\epsilon_r \epsilon_0\).

The structure is excited by an incident plane-wave Gaussian pulse centered around t 0

$$ \Psi^{\rm{inc}}\left(x,t\right)=\Psi_0^{\rm{inc}} \sin\left(kx-\omega_c\left(t-t_0 \right) \right) {\rm e}^{-\frac{\left(t-t_0-x/\nu_p\right)^2}{T_0^2}} $$
(26)

where \(\Psi_0^{\rm{inc}}\) is the amplitude of the pulse, k = ω c /ν p is the wave number, ω c is denoting the center angular frequency, ν p  = c/n is the phase velocity, \(n=\sqrt{\mu_r\epsilon_r}\) is the refractive index, and c is the speed of light in vacuum. T 0 controls the width of the pulse.

The presented examples in Figs. 4 and 5 show the influence of the pulse bandwidth, the allowable envelope dispersion and the pulse amplitude decrease on the slow-down effect (Lenz et al. 2001; Kashyap 2010). It should be emphasized that the results serve to illustrate that the optimization formulation is able to represents the expected physical effects, rather than providing new results with respect to slow light generation. The physical parameters used in the presented study are shown in Table 1. The core material is silicon dioxide (SiO2) with effective refractive index n = 1.446.

Fig. 4
figure 4

Envelope of the signal intensity (bottom) obtained using the optimized structure (top) for T 0 = 0.08ps. The settings for the allowable temporal spreading and the pulse amplitude are as follows: a: \(g^*_{\rm I}\), and α I with a group delay β = 0.05ps. b: \(g^*_{\rm II}\), and α I with β = 0.11ps. c: \(g^*_{\rm I}\), and α II with β = 0.06ps

Fig. 5
figure 5

Envelope of the signal intensity (bottom) obtained using the optimized structure (top) with T 0 = 0.16ps and the simulation time T = 2.5ps. The settings for the allowable temporal spreading and the pulse amplitude are as follows: a: \(g^*_{\rm I}\), and α I with a group delay β = 0.28ps. b: \(g^*_{\rm II}\), and α I with β = 0.39ps. c: \(g^*_{\rm I}\), and α II with β = 0.27ps

Table 1 List of physical and discretization parameters used and their values

The results from the numerical experiments are shown in Figs. 4 and 5. The initial material layout consists of homogeneous core material. The envelope of the transmitted pulse is measured at location 0.9 L s . The spatial discretization provides 20 uniformly spaced elements per wave length in the dielectric material. To investigate the significance of the allowable envelope distortion to the slow down effect, the numerical experiment start with value of g * equal to zero, which is increased gradually to g * = 0.045. Comparison of the results between Fig. 4a and b, and the results in Fig. 5a and b, indicates a slow-down effect enhancement by allowing larger envelope spreading. By increasing g * = 0.015 to g * = 0.045 the light is slowed down from 0.05 ps to 0.11 ps and 0.28 → 0.39 ps. Broadening of the delayed pulse is inevitable in achieving slow light for linear material (Lenz et al. 2001). Comparison of Fig. 4a and c shows how the increase of the parameter α influence the delay. Increasing α from 0.7 to 0.8 has minor effect on the delay (0.05 → 0.06 ps and 0.27 → 0.28 ps for Fig. 5). The influence of the pulse bandwidth and the delay of the transmitted pulse can be seen by comparing Figs. 4 and 5. Increasing T 0 = 0.08ps to T 0 = 0.16ps leads to slow-down (0.11 → 0.39ps).

3.2 Pulse shaping

The objective in the numerical experiments presented in this section is to convert an incident Gaussian pulse into two subsequent Gaussian pulses after passing though the design domain in Fig. 1. The length of the entire modeling area (L s ) is 25 μm and the length of the design domain is 0.6 L s . The modeling area is discretized with 3,000 uniformly spaced elements. The incident pulse prescribed by (26) has the following parameters: t 0 = 0, ω c  = 400π THz, T 0 = 0.02 ps and \(\Psi^{\rm inc}_0 = 1\). The target envelope is prescribed by two Gaussian envelopes with T 0 = 0.02 ps and Ψ0 = 0.5 shifted 0.09 ps from each other.

Two materials with different electric permittivities are used in the design domain: air (ϵ r  = 1) and dielectric with arbitrary (but prescribed initially) permittivity varying from ϵ r  = 1.5 to ϵ r  = 16. Initially, the design domain includes randomly distributed air stripes, so that the probability of each element to be made of air is 1%. The delay of the entire target envelope is defined for each series of experiments with different dielectric materials separately. It coincides with the time when the maximum of the envelope of the registered pulse passes the target node for the non-optimized (initial) distribution of the material inside the modeling domain (e.g. the delay t 0 = 0.092 ps for the experiments with dielectric material having permittivity ϵ r  = 1.5 and t 0 = 0.301 ps for the experiments with dielectric material having permittivity ϵ r  = 16).

Twelve series of experiments with different permittivities of the dielectric material are performed. Sixteen numerical simulations are performed in each of these series with random initial distribution of air inside the design domain (192 numerical simulations in total). Results of the experiments are shown in Fig. 6. The objective function (and therefore the conformance of the envelope of the signal to the target envelope) quickly improves for dielectric materials having higher permittivities. This behavior can be associated with two factors:

  • The effective length of the design domain is higher for materials with high permittivity as the wavelength of the signal passing through these materials is lower. This makes it possible for the design domain to introduce more substantial modifications into the incident signal.

  • Higher refractive index of the dielectric materials makes the design domain more flexible in terms of altering the original signal due to the wider spectrum of material properties.

Fig. 6
figure 6

a. Normalized objective vs. permittivity of the dielectric material used in the entire modeling domain for the pulse shaping experiment. Error bars indicate the standard deviation resulting from 16 independent numerical simulations with random initial distribution of air inside the design domain. b, c. Envelope of the signal intensity (top) obtained using the optimized structure with the lowest objective (bottom) for the dielectric materials with ϵ r  = 1.5 (b) and ϵ r  = 16 (c)

In all presented experiments the optimization procedure results in intermediate materials inside the design domain which can cause problems during manufacturing process. Various techniques exist for enforcing black and white design, including penalization of the objective function (Dahl et al. 2008; Yang et al. 2009), implicit morphological filters imposed on the design variables (Sigmund 2007) and robust design (Sigmund 2009; Wang et al. 2010). However, by forcing the structure to have either air or dielectric but not a linear combination of both, limits the set of possible solution and in this case the improvement of the objective for the dielectrics with higher permittivities might only be expected from longer design domain.

A problem which can be clearly seen on the presented structures is the lack of length scale in the designs. The optimized result consists of oscillating design with oscillations comparable with the elements dimensions. Such solutions are difficult for realization in practice and yield questionable numerical accuracy. In order to avoid such fast oscillations in the optimized design, the optimization problem has to be regularized. The regularization here is achieved by applying a density filter (Bruns and Tortorelli 2001). The design field in the state equations, the objective and the constraint equations is replaced with the filtered design field. The filtered density values \(\tilde{\boldsymbol{\rho}}\) for each element are computed as follows

$$ \tilde{\rho}_e=\frac{\sum_{i \in \mathbb{B}_e } w_i \rho_i}{\sum_{i \in \mathbb{B}_e} w_i} $$
(27)

where \(\tilde{\rho}_e\) is the filtered density for element e, w i is a weighting factor which depends on the distance between the centers of element e and element i and is computed as

$$ w_i=R-\left|x_e-x_i\right| $$
(28)

for \(\left|x_e-x_i\right|\leq R\). For all other elements the weight is zero. \(\mathbb{B}_e\) is the index set of all elements located in the filter support domain, i.e. all elements for which w i  ≠ 0.

The objective, the constraint functions and the state equations depend on the filtered density. The sensitivities are computed using the procedure in Section 2.4 and by applying the chain rule

$$ \frac{\partial f}{\partial \rho_e}=\frac{\partial f}{\partial \tilde{\rho_e}} \frac{\partial \tilde{\rho_e}}{\partial \rho_e} $$
(29)

Applying density filtering restricts the solution space, and the performance of the optimized structure decreases for large filter radius. This can be observed in Fig. 7a. For small filter diameter the objective is on the same order as for the unfiltered design. However, for filter diameter larger than 0.4 − 0.5 d/λ, where λ is the wave length, the objective quickly deteriorates. The design for d/λ = 0.4 is presented at Fig. 7b. It consists of gray areas, which create also difficulties for practical realizations of the optimized structure. As mentioned earlier, obtaining crisp black and white design is an important subject which will be discussed in details in following articles.

Fig. 7
figure 7

a. Normalized objective vs. filter size (normalized by the central wavelength of the signal) for the pulse shaping experiment. Error bars indicate the standard deviation resulting from 12 independent numerical simulations with random initial distribution of air inside the design domain. b. Design domain obtained with the filter size 40% of the wavelength of the signal

4 Conclusions

The application of time domain topology optimization for design of pulse shaping devices is demonstrated. The information transferred through the optimized wave guide is considered to be represented by the pulse envelope. Such representation improves the robustness of the device with respect to signal generation and registration. The pulse envelope is extracted by using the Hilbert transform. The derivation of the sensitivities when the objective depends on the pulse envelope is demonstrated, and the optimization process has been demonstrated with several designs for pulse delaying and pulse splitting devices. The presented approach is applicable to signals consisting of broad range of frequencies. Therefore the optimization methodology opens the possibility for applying time domain topology optimization in non-linear devices such as photonic diodes, transistors and logical elements. The presented algorithm is extendable to 2D and 3D space and it is applicable in a broad range of engineering areas, including acoustics and linear elasticity.