Keywords

1 Introduction

In this paper, we suggest an H-based eddy current formulation of the time-harmonic Maxwell equations, where a standard scalar elliptic equation is given in the insulator and a vector formulation is only needed in the conductor. This approach is theoretically slightly more complicated than the well known vector potential ansatz. However, we think that the computational savings can be considerable, if the computational domain \(\varOmega \) must be large. We apply this H-based formulation to the optimal control of electric and magnetic fields and discuss associated optimality conditions. Special emphasis is laid on a variety of models for controls.

Optimal control of electromagnetic fields is a quite active subject, important for various applications. We mention only the control of induction heating as in [8, 9, 16], the optimal control of MHD processes as in [3,4,5,6,7], optimal control problems for time-harmonic eddy current problems as in [10, 11], inverse problems for electromagnetic fields as in [2], or the control of magnetic fields in flow measurement as in [12, 13] and refer to [15] for more references.

2 The Model for the Electromagnetic Fields

2.1 Time-Harmonic Maxwell and Eddy Current Equations

The main quantities in our eddy current formulation, are the magnetic field H, the electric field E, and the (total) current J that is the sum of the generated current and an impressed current \(J_e\). By the generalized Ohm’s law, we have

$$\begin{aligned} J = \sigma E + J_e, \end{aligned}$$
(1)

where \(\sigma \) is the electrical conductivity, that is assumed to be a symmetric and (uniformly) positive definite matrix in the conducting region and to vanish in the insulating region. We assume that the entries of \({\sigma }\) are bounded and measurable real functions on the conducting domain \(\varOmega _C\).

We consider a time-harmonic model and assume that \(J_e\) is an alternating current of the form \( J_e(\mathbf{x},t) = J(\mathbf{x}) \cos (\omega t + \phi ), \) where J is a real vector function that accounts for direction and strength of the current, \(\omega \) is the angular frequency and \(\phi \) is the phase angle. Expressing these quantities in a complex setting, we have

$$ J_e(\mathbf{x},t) = \mathop {\mathrm {Re}\,}[J(\mathbf{x})e^{i\, \omega t + i\, \phi }] = \mathop {\mathrm {Re}\,}[\mathbf {J}_e(\mathbf{x})e^{i\, \omega t}]. $$

The complex vector function \(\mathbf {J}_e=J\, e^{i \phi }\) will be our control; we assume that it is supported in the conducting region, namely, it is vanishing inside the non-conducting region. This time-periodic impressed current \(J_e\) generates associated time-periodic solutions in the form

$$ E(\mathbf{x},t) = \mathop {\mathrm {Re}\,}[\mathbf {E}(\mathbf{x})e^{i\, \omega t}], \qquad H(\mathbf{x},t) = \mathop {\mathrm {Re}\,}[\mathbf {H}(\mathbf{x})e^{i\, \omega t}]. $$

Inserting these quantities in the full Maxwell equations and assuming that the displacement current term \(\partial (\varepsilon E)/\partial t\), \(\varepsilon \) being the electric permittivity, can be neglected, one arrives in a standard way at the following time-harmonic eddy current system

$$\begin{aligned} \begin{aligned}&\mathop {\mathrm {curl}}\nolimits \mathbf {H}- \sigma \mathbf {E}= \mathbf {J}_e\\&\mathop {\mathrm {curl}}\nolimits \mathbf {E}+ i \omega \mu \mathbf {H}= \mathbf {0} \end{aligned} \end{aligned}$$
(2)

that holds in the whole space \(\mathbb {R}^3\). Here, \({\mu }\) is the magnetic permeability, a uniformly positive definite matrix that is assumed to have bounded and measurable real functions as entries on the holdall domain \(\varOmega \).

2.2 Eddy Current Formulation in Weak and Strong Form

Assumption 1

(Geometry). In the paper, \(\varOmega \subset \mathbb {R}^3\) is a bounded and simply connected Lipschitz domain with connected boundary \(\varGamma \); \(\varOmega \) is the “holdall” computational domain containing all conductors. The subdomain \(\varOmega _C \subset \varOmega \) that denotes the conductor is a bounded Lipschitz set. We require that \(\varOmega _C\) is the union of finitely many disjoint open and connected sets \((\varOmega _C)_l\), \(l \in \{1,\ldots ,k\}\), the so-called (connected) components of \(\varOmega _C\). Assume further that . The set stands for the non-conducting domain. For simplicity, it is assumed to be connected.

Definition 1

Let \(g \in \mathbb {N} \cup \{0\}\) be the number of all “handles” of \(\varOmega _I\) (precisely, the rank of the first homology group of , or, equivalently, the first Betti number of \(\varOmega _I\)). Due to our assumption on \(\varOmega \), it is also the number of “handles” of \(\varOmega _C\). If all the components \((\varOmega _C)_l\) are simply connected, we have \(g = 0\).

This assumption allows fairly general forms of conductors. For instance, the conducting domain can include finitely many tori which might form together more complicated geometrical figures like the Borromean rings.

The function spaces used in our paper will include complex functions. For instance, \(L^p(D)\), \(1 \le p < \infty \), is defined as the space of all complex valued functions \(v: D \rightarrow \mathbb {C}\) such that \(|v|^p\) is integrable on \(D \subset \mathbb {R}^3\). To distinguish this space from the one with real-valued functions, we introduce

$$ L^p_{\mathbb {R}}(D) = \{ v: D \rightarrow \mathbb {R}, \ |v|^p \text{ is } \text{ integrable }\}. $$

The spaces \(L^\infty (D)\) (complex) and \(L^\infty _{\mathbb {R}}(D) \) (real) are defined accordingly.

Definition 2

We denote by \(\varvec{\rho }_j\), \(j \in \{1,\ldots ,g\}\), a basis of the space of \(\mu \)-harmonic fields

$$\begin{aligned} \mathcal{H}_I^\mu = \{\mathbf{v} : \varOmega _I \rightarrow \mathbb {R}^3 \, : \, \mathop {\mathrm {curl}}\nolimits \mathbf{v} = \mathbf{0} \ \text{ in } \ \varOmega _I, \mathop {\mathrm {div}}\nolimits (\mu \mathbf{v})= 0\ \text{ in } \ \varOmega _I, \mu \mathbf{v} \cdot \mathbf{n}=0\ \text{ on } \ \partial \varOmega _I \}, \end{aligned}$$
(3)

where \(\mathbf{n}\) is the unit outward normal vector on \(\partial \varOmega _I\).

The functions \(\varvec{\rho }_j\) can be computed once “offline” before the numerical solution of the optimal control problem is started. For associated equations, we refer to [1].

From (2)\(_1\) we see that \(\mathop {\mathrm {curl}}\nolimits \mathbf {H}= \mathbf{0}\) holds in \(\varOmega _I\). Therefore, \(\mathbf {H}_{|\varOmega _I}\) can be written as \(\nabla \psi + \sum _{j=1}^g \alpha _j \varvec{\rho }_j\) (see, e.g., [1, Appen. A.3]). This leads to the weak formulation of our eddy current system: Let \(\mathbf {V}= H(\mathrm{curl};\varOmega _C)\times H^1(\varOmega _I)/\mathbb {C}\times \mathbb {C}^g\) and define the state space

$$ \mathbf {V}_0 = \{ (\mathbf {H},\psi ,\varvec{\alpha }) \in \mathbf {V}\text { that satisfy the interface conditions (4) below} \} \, , $$

where

$$\begin{aligned} \mathbf {H}\times \mathbf {n}- \nabla \psi \times \mathbf {n}- \sum _{j=1}^g \alpha _j {\varvec{\rho }}_j \times \mathbf {n}= \mathbf {0}\qquad \text { on } \varGamma . \end{aligned}$$
(4)

Both spaces \(\mathbf {V}\) and \(\mathbf {V}_0\) are equipped with the norm

$$ \Vert (\mathbf {H},\varPsi ,\varvec{\alpha })\Vert _{\mathbf {V}} = \left( \Vert \mathbf {H}\Vert _{H(\mathrm{curl};\varOmega _C)}^2 + \Vert \psi \Vert _{H^1(\varOmega _I)/\mathbb {C}}^2 + |\varvec{\alpha }|^2\right) ^{1/2}, $$

where \( \Vert \mathbf {H}\Vert _{H(\mathrm{curl};\varOmega _C)} = \left( \int _{\varOmega _C} (\mathop {\mathrm {curl}}\nolimits \mathbf {H}\cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {H}} + \mathbf {H}\cdot \overline{\mathbf {H}}) \right) ^{1/2} \) and \( \Vert \psi \Vert _{H^1(\varOmega _I)/\mathbb {C}} = \left( \int _{\varOmega _I} \nabla \psi \cdot \nabla \overline{ \psi } \right) ^{1/2}. \) We also need the norms \( \Vert \mathbf{Q}\Vert _{\varOmega _C} := \left( \int _{\varOmega _C} |\mathbf{Q}(\mathbf {x})|^2\right) ^\frac{1}{2}, \) \( \Vert \mathbf{Q}\Vert _{\mu ,\varOmega _C} := \left( \int _{\varOmega _C} \mu (\mathbf {x}) \mathbf{Q}(\mathbf {x})\cdot \overline{\mathbf{Q}(\mathbf {x})}\right) ^\frac{1}{2}, \) and analogous norms \(\Vert \mathbf{Q}\Vert _{\sigma ,\varOmega _C}\) and \(\Vert \mathbf{Q}\Vert _{\mu ,\varOmega _I}\). Further, we introduce a symmetric and positive definite matrix M by

$$ M_{nj} = \int _{\varOmega _I} \mu \varvec{\rho }_n \cdot \varvec{\rho }_j \, ; $$

and the vector norm \(|\mathbf{q}|_M =(M \mathbf{q} \cdot \overline{\mathbf{q}})^\frac{1}{2}\), where \(\mathbf{q} \in \mathbb {C}^g\). Finally, we define an antilinear form \(a: \mathbf {V}\times \mathbf {V}\rightarrow \mathbb {C}\) by

$$ a[\mathbf {u},\mathbf {v}] = \int _{\varOmega _C} \sigma ^{-1} \mathop {\mathrm {curl}}\nolimits \mathbf {H}\cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {W}} + \int _{\varOmega _C} i \omega \mu \, \mathbf {H}\cdot \overline{\mathbf {W}} + \int _{\varOmega _I}i \omega \mu \, \nabla \psi \cdot \nabla \overline{\eta } + i \omega M \varvec{\alpha }\cdot \overline{\varvec{\varvec{\beta }}}, $$

where \(\mathbf {u} = (\mathbf {H},\psi ,\varvec{\alpha })\) and \(\mathbf {v}= (\mathbf {W},\eta ,\varvec{\beta })\). The form \(a[\cdot ,\cdot ]\) is continuous and coercive on \(\mathbf {V}\times \mathbf {V}\) (see, e.g., [1, p. 37]).

Definition 3

A triplet \(\mathbf {u}=(\mathbf {H},\psi ,\varvec{\alpha })\in \mathbf {V}_0\) is said to be a weak solution of the eddy current model associated with \(\mathbf {J}_e \in L^2(\varOmega _C)^3\), if

$$\begin{aligned} a[\mathbf {u},\mathbf {v}] = \int _{\varOmega _C}\sigma ^{-1} \mathbf {J}_e \cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {W}} \qquad \forall \, \mathbf {v} := (\mathbf {W},\eta ,\varvec{\beta }) \in \mathbf {V}_0. \end{aligned}$$
(5)

Lemma 1

(Well posedness, [15]). For all \(\mathbf {J}_e \in L^2(\varOmega _C)^3\), there exists a unique weak solution \((\mathbf {H},\psi ,\varvec{\alpha })\) of (7). Moreover, there is a constant \(c > 0\) not depending on \( \mathbf {J}_e\) such that

$$\begin{aligned} \Vert (\mathbf {H},\psi ,\varvec{\alpha })\Vert _\mathbf {V}\le c\, \Vert \mathbf {J}_e\Vert _{\varOmega _C}. \end{aligned}$$
(6)

We have shown in [15] that the solution \((\mathbf {H},\psi ,\varvec{\alpha }) \in \mathbf {V}_0\) to the variational problem (5) satisfies the following strong eddy current equations, provided that the variational solution is sufficiently smooth:

$$\begin{aligned} \begin{array}{rcll} \mathop {\mathrm {curl}}\nolimits (\sigma ^{-1} \mathop {\mathrm {curl}}\nolimits \mathbf {H}) + i \omega \mu \, \mathbf {H}&{}=&{} \mathop {\mathrm {curl}}\nolimits (\sigma ^{-1} \mathbf {J}_e)&{}\text { in }\varOmega _C\\ \mathbf {H}\times \mathbf {n}&{}=&{} \nabla \psi \times \mathbf {n}+ \sum \nolimits _{j=1}^g \alpha _j \mathbf {\varvec{\rho }}_j \times \mathbf {n}&{}\text { on }\varGamma \\ \mu \mathbf {H}\cdot \mathbf {n}&{}=&{} \mu \nabla \psi \cdot \mathbf {n}&{}\text { on }\varGamma \\ - \mathop {\mathrm {div}}\nolimits \, (\mu \, \nabla \psi )&{}=&{} 0&{}\text { in } \varOmega _I\\ \mu \nabla \psi \cdot \mathbf {n}_\varOmega &{}=&{} 0 &{}\text { on }\partial \varOmega \end{array} \end{aligned}$$
(7)

with additional geometrical conditions

$$\begin{aligned} (M\varvec{\alpha })_j = (i \omega )^{-1} \int _{\varGamma } \sigma ^{-1} (\mathop {\mathrm {curl}}\nolimits \mathbf {H}- \mathbf {J}_e)\cdot (\mathbf {n}\times {\varvec{\rho }}_j )\quad \forall \, j \in \{1,\ldots ,g\}. \end{aligned}$$
(8)

3 Optimal Control

3.1 The Optimal Current Problem and Its Well-Posedness

We discuss the following steady state optimal control problem of elliptic type, where the impressed current \(\mathbf {J}_e\) is the control. As fixed data, vector functions \(\mathbf {H}_d \in \mathbf {L}^2(\varOmega )^3\), \(\mathbf {E}_d \in L^2(\varOmega _C)^3\) and constants \(\nu _{C} \ge 0,\, \nu _{A} \ge 0,\, \nu _{B} \ge 0,\, \nu _E \ge 0,\, \nu \ge 0\) with \(\nu _{C} + \nu _{A} + \nu _{B} + \nu _E + \nu > 0\) are given. In \(\varOmega _I\) the reference magnetic field \(\mathbf {H}_d\) is split as \(\nabla \psi _d + \sum _{j=1}^g \alpha _{d,j} \varvec{\rho }_j\). Moreover, a nonempty, bounded, convex and closed set of admissible controls \(\mathbf {J}_{ad}\subset L^2(\varOmega _C)^3\) is given. Possible choices for \(\mathbf {J}_{ad}\) will be specified later.

Thanks to Lemma 1, for each control \(\mathbf {J}_e \in \mathbf {J}_{ad}\) there exists a unique weak solution of (7). We express the correspondence of the solution to \(\mathbf {J}_e\), by the notation \((\mathbf {H}_{J_e},\psi _{J_e},\varvec{\alpha }_{J_e})\) for the solution. Let us now skip the subscript e from the controls and denote them just by \(\mathbf {J}\), i.e. \(\mathbf {J}\) stands now for the impressed current \(\mathbf {J}_e\) and is not the total current. We use the following (reduced) objective functional F,

$$\begin{aligned} \begin{aligned} F(\mathbf {J})&= \frac{\nu _C}{2} \, \Vert \mathbf {H}_J - \mathbf {H}_d\Vert _{\mu ,\varOmega _C}^2 + \frac{\nu _A}{2} \, \Vert \nabla \psi _J - \nabla \psi _d\Vert _{\mu ,\varOmega _I}^2 +\frac{\nu _B}{2} \, |\varvec{\alpha }_J - \varvec{\alpha }_d|^2_M \\&\qquad \qquad + \frac{\nu _E}{2}\, \Vert \sigma ^{-1} (\mathop {\mathrm {curl}}\nolimits \mathbf {H}_J - \mathbf {J}) - \mathbf {E}_d\Vert _{\sigma ,\varOmega _C}^2 + \frac{\nu }{2}\, \Vert \mathbf {J}\Vert _{\varOmega _C}^2 . \end{aligned} \end{aligned}$$
(9)

Recalling that the electric field associated with \(\mathbf {J}\) is given by \(\mathbf {E}_J = \sigma ^{-1} (\mathop {\mathrm {curl}}\nolimits \mathbf {H}_J - \mathbf {J})\), it is easily checked that in F the magnetic energy and the electric energy (per unit time) of \(\mathbf {H}\) and \(\mathbf {E}\), respectively, appear.

The optimal control problem, written in short form, is

$$\begin{aligned} \min _{\mathbf {J}\in \mathbf {J}_{ad}} F(\mathbf {J}). \end{aligned}$$
(10)

A control \(\mathbf {J}^* \in \mathbf {J}_{ad}\) is said to be optimal, if \( F(\mathbf {J}^*) \le F(\mathbf {J}) \) holds for all \(\mathbf {J}\in \mathbf {J}_{ad}\).

Theorem 2

The optimal control problem (10) admits at least one optimal control denoted by \(\mathbf {J}^*\). The optimal control is unique, if \(\nu > 0\).

In view of the continuity of the control-to-state mapping, this is a standard result.

3.2 Necessary Optimality Conditions

The objective functional F is not differentiable, but it is directionally differentiable. This is enough to derive necessary (and by convexity also sufficient) optimality conditions. After quite elementary calculations, the derivative in the direction \(\mathbf {J}\) at an arbitrary fixed (not necessarily optimal or admissible) control \(\widehat{\mathbf {J}}\) with associated solution \(\widehat{\mathbf {H}} := \mathbf {H}_{\widehat{J}}\), \(\widehat{\psi }:= \psi _{\widehat{J}}\) and \(\widehat{\varvec{\alpha }} := \varvec{\alpha }_{\widehat{J}}\) is obtained as

$$\begin{aligned} \begin{aligned}&F^\prime (\widehat{\mathbf {J}})\, \mathbf {J}= \mathop {\mathrm {Re}\,}\left\{ \int _{\varOmega _C} \nu _C\, \mu (\widehat{\mathbf {H}} - \mathbf {H}_d)\cdot \overline{\mathbf {H}_J}\right. \\&\qquad \qquad + \int _{\varOmega _I} \, \nu _A \, \mu (\nabla \widehat{\psi } - \nabla \psi _d)\cdot {\nabla \overline{\psi _J}} + \nu _B \, M (\widehat{\varvec{\alpha }} - \varvec{\alpha }_d)\cdot \overline{\varvec{\alpha }_J} \\&\qquad \qquad + \int _{\varOmega _C} \nu _E \big (\widehat{\mathbf {E}} - \mathbf {E}_d\big )\cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {H}_J}\\&\left. \qquad \qquad - \int _{\varOmega _C} \nu _E \big (\widehat{\mathbf {E}} - \mathbf {E}_d\big )\cdot \overline{\mathbf {J}} + \nu \ \int _{\varOmega _C} \widehat{\mathbf {J}} \cdot \overline{\mathbf {J}}\right\} \, . \end{aligned} \end{aligned}$$
(11)

Here, we have inserted the relation \(\sigma ^{-1} (\mathop {\mathrm {curl}}\nolimits \widehat{\mathbf {H}} - \widehat{\mathbf {J}}) = \widehat{\mathbf {E}} := \mathbf {E}_{\widehat{\mathbf {J}}}\). By an adjoint state, this derivative is transformed to one with explicit appearance of \(\mathbf {J}\).

Definition 4

(Adjoint equation). Let \(\widehat{\mathbf {J}} \in L^2(\varOmega _C)^3\) be a given control with associated states \(\widehat{\mathbf {H}} := \mathbf {H}_{\widehat{\mathbf {J}}}, \, \widehat{\mathbf {E}} := \mathbf {E}_{\widehat{\mathbf {J}}},\, \widehat{\psi }:= \psi _{\widehat{\mathbf {J}}}, \, \widehat{\varvec{\alpha }}:= \varvec{\alpha }_{\widehat{J}}\), and let \(\mathbf {H}_d \in L^2(\varOmega _C)^3\), \(\psi _d \in H^1(\varOmega _I)/\mathbb {C}\), \({\varvec{\alpha }_d \in \mathbb {C}^g}\), \(\mathbf {E}_d \in L^2(\varOmega _C)^3\) be given as above. The equation for \((\mathbf {W},\eta ,\varvec{\beta })\),

$$\begin{aligned} \begin{aligned}&\int _{\varOmega _C} \sigma ^{-1} \mathop {\mathrm {curl}}\nolimits \mathbf {W}\cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {H}} - i \omega \int _{\varOmega _C} \mu \mathbf {W}\cdot \overline{\mathbf {H}} - i \omega \int _{\varOmega _I} \mu \nabla \eta \cdot \nabla \overline{\psi } - i \omega M \varvec{\beta }\cdot \overline{\varvec{\alpha }}\\&\quad =\int _{\varOmega _C} \nu _C \, \mu (\widehat{\mathbf {H}} - \mathbf {H}_d) \cdot \overline{\mathbf {H}} \\&\qquad + \int _{\varOmega _I} \nu _A \, \mu (\nabla \widehat{\psi } - \nabla \psi _d)\cdot \nabla \overline{\psi }+ \nu _B \, M(\widehat{\varvec{\alpha }} - \varvec{\alpha }_d)\cdot \overline{\varvec{\alpha }}\\&\qquad + \int _{\varOmega _C} \nu _E (\widehat{\mathbf {E}} - \mathbf {E}_d)\cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {H}} \qquad \forall \, (\mathbf {H},\psi ,\varvec{\alpha }) \in \mathbf {V}_0 \end{aligned} \end{aligned}$$
(12)

is said to be the adjoint equation of equation (5). The solution \((\mathbf {W}_{\widehat{J}},\eta _{\widehat{J}},\varvec{\beta }_{\widehat{J}})\in \mathbf {V}_0\) is called the adjoint state associated with \(\widehat{\mathbf {J}}\).

For the strong form of the adjoint equation, we refer the reader to [15].

For all given \(\mathbf {H}_d \in L^2(\varOmega _C)^3\), \(\psi _d \in H^1(\varOmega _I)/\mathbb {C}\), \({\varvec{\alpha }_d \in \mathbb {C}^g}\), \(\mathbf {E}_d \in L^2(\varOmega _C)^3\), \(\widehat{\mathbf {J}} \in L^2(\varOmega _C)^3\), the adjoint equation (12) has a unique solution \((\mathbf {W}_{\widehat{J}},\eta _{\widehat{J}},\varvec{\beta }_{\widehat{J}})\). This result follows, analogously to Lemma 1, from the Lemma of Lax and Milgram. By transposition, we can prove the following necessary optimality conditions:

Theorem 3

(Necessary optimality conditions). Let \(\mathbf {J}^*\) be an optimal control of problem (10) and let \( \mathbf {H}_{J^*}\) and \(\mathbf {E}_{J^*}\) be the associated optimal magnetic and electric fields, respectively. Then there exists a unique solution \((\mathbf {W}_{J^*},\eta _{J^*},\varvec{\beta }_{J^*})\) of the adjoint equation (12) such that the variational inequality

$$\begin{aligned} \mathop {\mathrm {Re}\,}\int _{\varOmega _C} \Big ( \sigma ^{-1} \mathop {\mathrm {curl}}\nolimits \mathbf {W}_{J^*} - \nu _E\, (\mathbf {E}_{J^*} - \mathbf {E}_d) + \nu \, \mathbf {J}^*\Big )\cdot (\overline{\mathbf {J}} - \overline{\mathbf {J}^*}) \ge 0 \quad \forall \, \mathbf {J}\in \mathbf {J}_{ad}\end{aligned}$$
(13)

is satisfied.

Proof

The optimal control \(\mathbf {J}^*\) must obey the standard variational inequality

$$\begin{aligned} F^\prime (\mathbf {J}^*)(\mathbf {J}- \mathbf {J}^*) \ge 0 \quad \forall \, \mathbf {J}\in \mathbf {J}_{ad}. \end{aligned}$$
(14)

We show that this is equivalent to the variational inequality (13). We first consider the expression (11) for \(F^\prime (\widehat{\mathbf {J}})\) for the particular choice \(\widehat{\mathbf {J}} := \mathbf {J}^*\) and have

$$ \begin{aligned}&F^\prime (\mathbf {J}^*)\, (\mathbf {J}- \mathbf {J}^*) \\&\qquad = \mathop {\mathrm {Re}\,}\left[ \nu _C\, \int _{\varOmega _C} \mu (\mathbf {H}_{J^*} - \mathbf {H}_d)\cdot \overline{\mathbf {H}_{J-J^*}}\right. \\&\qquad \qquad + \nu _A\int _{\varOmega _I} \mu (\nabla \psi _{J^*} - \nabla \psi _d)\cdot {\nabla \overline{\psi _{J-J^*}}}+ \nu _B \, M(\varvec{\alpha }_{J^*} - \varvec{\alpha }_d)\cdot \overline{\varvec{\alpha }_{J-J^*}} \\&\qquad \qquad + \nu _E \int _{\varOmega _C} (\mathbf {E}_{J^*} - \mathbf {E}_d)\cdot \mathop {\mathrm {curl}}\nolimits \overline{\mathbf {H}_{J-J^*}} - \nu _E \int _{\varOmega _C} (\mathbf {E}_{J^*} - \mathbf {E}_d)\cdot ({\overline{\mathbf {J}}- \overline{\mathbf {J}^*} }) \\&\qquad \qquad + \left. \nu \int _{\varOmega _C} {\mathbf {J}^*} \cdot ({\overline{\mathbf {J}}-\overline{\mathbf {J}^*}})\right] . \end{aligned} $$

Thanks to a lemma on transposition in [15] that is not deep but a bit technical in the proof, we obtain

$$\begin{aligned} \begin{aligned}&F^\prime (\mathbf {J}^*)\, (\mathbf {J}-\mathbf {J}^*) \\&\qquad = \mathop {\mathrm {Re}\,}\left[ \int _{\varOmega _C} \sigma ^{-1}\mathop {\mathrm {curl}}\nolimits \mathbf {W}_{J^*} \cdot {(\overline{\mathbf {J}}- \overline{\mathbf {J}^*})}\right. \\&\qquad \qquad \quad - \int _{\varOmega _C} \nu _E \, (\mathbf {E}_{J^*} - \mathbf {E}_d)\cdot ({\overline{\mathbf {J}}-\overline{\mathbf {J}^*} }) + \left. \int _{\varOmega _C} \nu \, \mathbf {J}^*\cdot ({{\overline{\mathbf {J}}-\overline{\mathbf {J}^*}}})\right] \\&\qquad =\mathop {\mathrm {Re}\,}\int _{\varOmega _C} \Big ( \sigma ^{-1} \mathop {\mathrm {curl}}\nolimits \mathbf {W}_{J^*} - \nu _E \, ( \mathbf {E}_{J^*}- \mathbf {E}_d)+\nu \, \mathbf {J}^*\Big )\cdot ({\overline{\mathbf {J}}-\overline{\mathbf {J}^*}}) \, , \end{aligned} \end{aligned}$$
(15)

where \(\mathbf {W}_{J^*}\) is the first component of the adjoint state associated with \(\mathbf {J}^*\).    \(\Box \)

Let us define for convenience

$$\begin{aligned} \mathbf {D}_{J^*} := \sigma ^{-1} \mathop {\mathrm {curl}}\nolimits \mathbf {W}_{J^*} - \nu _E \, ( \mathbf {E}_{J^*}- \mathbf {E}_d). \end{aligned}$$
(16)

By this definition, the variational inequality (13) simplifies to

$$\begin{aligned} \mathop {\mathrm {Re}\,}\int _{\varOmega _C} \Big (\mathbf {D}_{J^*} + \nu \, \mathbf {J}^*\Big )\cdot (\overline{\mathbf {J}} - \overline{\mathbf {J}^*}) \ge 0 \quad \forall \, \mathbf {J}\in \mathbf {J}_{ad}. \end{aligned}$$
(17)

This is our main necessary condition that will be later used to handle various particular cases for \(\mathbf {J}_{ad}\). Though our objective functional F is only directionally differentiable and hence does not have a gradient, we denote for short the direction of steepest ascent of \(F^\prime (\widehat{\mathbf {J}})\) as its reduced gradient:

$$\begin{aligned} \nabla F(\widehat{\mathbf {J}}) := {\mathbf {D}_{\widehat{J}} +\nu \, \widehat{\mathbf {J}}}. \end{aligned}$$
(18)

3.3 Modeling the Control and Associated Optimality Conditions

Below, we discuss several types of controls and admissible sets that seem to be useful and establish the associated optimality conditions as conclusions of (17).

Unbounded Complex Control Vectors. If \(\nu > 0\), the unbounded control set

$$\begin{aligned} \mathbf {J}_{ad}= L^2(\varOmega _C)^3 \end{aligned}$$
(19)

can be used. Notice that the choice \(\nu = 0\) is only useful here, if the desired fields \(\mathbf {H}_d\) and \(\mathbf {E}_d\) belong to the range of the control-to-state mapping. It follows immediately from the variational inequality (13) that, in the case \(\mathbf {J}_{ad}= L^2(\varOmega _C)^3\), the equation \( \mathbf {D}_{J^*} +\nu \, \mathbf {J}^* = 0 \) is necessary and sufficient for the optimality of \(\mathbf {J}^*\), i.e. we have

$$ \mathbf {J}^* = - \frac{1}{\nu } \mathbf {D}_{J^*}. $$

Complex Control Vectors Bounded by Box Constraints. For all \(\nu \ge 0\), the set

(20)

might be taken, if positive bounds \(\mathrm{Re}_{\max }\) and \(\mathrm{Im}_{\max }\) must be imposed on the possible currents. In this case, using the representation (18), the variational inequality (13) can be re-written as

$$ \mathop {\mathrm {Re}\,}\int _{\varOmega _C}\nabla F(\mathbf {J}^*) \cdot \overline{\mathbf {J}^*} \le \mathop {\mathrm {Re}\,}\int _{\varOmega _C}\nabla F(\mathbf {J}^*) \cdot \overline{\mathbf {J}}\qquad \forall \, \mathbf {J}\in \mathbf {J}_{ad}. $$

Expanding the terms under the integral and invoking that \(\mathop {\mathrm {Re}\,}\mathbf {J}\) and \(\mathop {\mathrm {Im}\,}\mathbf {J}\) can be chosen completely independent, we find the following two inequalities:

$$\begin{aligned}&\int _{\varOmega _C}\mathop {\mathrm {Re}\,}(\nabla F(\mathbf {J}^*)) \cdot \mathop {\mathrm {Re}\,}\mathbf {J}^* \le \int _{\varOmega _C}\mathop {\mathrm {Re}\,}(\nabla F(\mathbf {J}^*)) \cdot \mathop {\mathrm {Re}\,}\mathbf {J}\quad \forall \mathbf {J}: |\mathop {\mathrm {Re}\,}\mathbf {J}(\cdot )|\le \mathrm{Re}_{\max },\\&\int _{\varOmega _C}\mathop {\mathrm {Im}\,}(\nabla F(\mathbf {J}^*)) \cdot \mathop {\mathrm {Im}\,}\mathbf {J}^* \le \int _{\varOmega _C}\mathop {\mathrm {Im}\,}(\nabla F(\mathbf {J}^*)) \cdot \mathop {\mathrm {Im}\,}\mathbf {J}\quad \forall \mathbf {J}: |\mathop {\mathrm {Im}\,}\mathbf {J}(\cdot )|\le \mathrm{Im}_{\max }. \end{aligned}$$

Here, the inequalities \(|\mathop {\mathrm {Re}\,}\mathbf {J}(\cdot )|\le \mathrm{Re}_{\max }\) and \(|\mathop {\mathrm {Im}\,}\mathbf {J}(\cdot )|\le \mathrm{Im}_{\max }\) have to be understood in pointwise and componentwise sense. These inequalities can be discussed further in a pointwise way (for this type of argument, see, e.g., [14, Sect. 2.8]). For instance, the first inequality is equivalent to the condition that

$$\begin{aligned} \mathop {\mathrm {Re}\,}\nabla F(\mathbf {J}^*)(\mathbf{x}) \cdot \mathop {\mathrm {Re}\,}\mathbf {J}^*(\mathbf{x}) \le \mathop {\mathrm {Re}\,}\nabla F(\mathbf {J}^*)(\mathbf{x}) \cdot \mathbf{v} \quad \forall \mathbf{v} \in \mathbb {R}^3: |v_\ell |\le \mathrm{Re}_{\max },\, \ell \in \{1,2,3\} \end{aligned}$$
(21)

holds for almost all \(\mathbf{x} \in \varOmega _C\). All components of the vector \(\mathbf{v} \in \mathbb {R}^3\) can be selected independently. Then the inequality above means for the \(\ell \)th component that

$$ \min _{v\in \mathbb {R}: |v|\le \mathrm{Re}_{\max }} \mathop {\mathrm {Re}\,}(\nabla F(\mathbf {J}^*))_\ell (\mathbf{x}) \, v = \mathop {\mathrm {Re}\,}(\nabla F(\mathbf {J}^*))_\ell (\mathbf{x}) \, \mathop {\mathrm {Re}\,}J_\ell ^*(\mathbf{x}), $$

i.e., that, for a.a. \(\mathbf{x} \in \varOmega _C\), the minimum at the left-hand side is attained by \(\mathop {\mathrm {Re}\,}J_\ell ^*(\mathbf{x})\).

Inserting the concrete expression for the reduced gradient \(\nabla F\) (see (18)), we find

$$\begin{aligned} \mathop {\mathrm {Re}\,}J^*_\ell (\mathbf{x}) = \left\{ \begin{array}{rl} \mathrm{-Re_{\max } },&{} \text {if} \ \mathop {\mathrm {Re}\,}( \mathbf {D}_{J^*} + \nu \, \mathbf {J}^*)_\ell (\mathbf{x}) > 0\\ \mathrm{Re_{\max }},&{} \text {if}\ \mathop {\mathrm {Re}\,}( \mathbf {D}_{J^*} + \nu \, \mathbf {J}^*)_\ell (\mathbf{x}) < 0 \end{array} \right. \end{aligned}$$
(22)

for almost all \(\mathbf{x} \in \varOmega _C\) and all \(\ell \in \{1,2,3\}\). The formula for the imaginary part is the same with \(\mathop {\mathrm {Im}\,}\) substituted for \(\mathop {\mathrm {Re}\,}\). If the Tikhonov regularization parameter is positive, then this is equivalent to the projection formula

$$\begin{aligned} \mathop {\mathrm {Re}\,}J^*_\ell (\mathbf{x}) = \mathbb {P}_{[\mathrm{-Re_{\max }},\mathrm{Re_{\max }}]}\left\{ - \frac{1}{\nu } \mathop {\mathrm {Re}\,}(\mathbf {D}_{J^*})_\ell (\mathbf{x})\right\} \end{aligned}$$
(23)

for almost all \(\mathbf{x} \in \varOmega _C\) and all \(\ell \in \{1,2,3\}\). Here, the projection function \(\mathbb {P}_{[a,b]}: \mathbb {R}\rightarrow [a,b]\) is defined by \(\mathbb {P}_{[a,b]}({s}) := \max ( a,\min (b,s))\).

Example 1

(Optimal control as inverse problem). In electro-encephalography (EEG) or magneto-encephalography (MEG), magnetic or electric fields associated to the electrical activity of the human brain are measured. Then one looks for the electrical currents, located in certain regions of the brain, that generated these fields. Under certain assumptions, this problem can be cast into the form of our optimal control problem, where the desired fields \(\mathbf {H}_d\) and \(\mathbf {E}_d\) stand for the measurements. Normally, these measurements can be taken only at the boundary \(\varGamma \) of the conductor, say at the surface of the human head \(\varOmega _C\) (which can be assumed to be simply connected). Moreover, they are only given at certain points. Let us assume that these measurements can be interpolated to get a measurement of \(\mu \mathbf {H}_d \cdot \mathbf {n}\) on the interface \(\varGamma \). In view of the interface conditions on \(\varGamma \), we have then also \(\mu \nabla \psi _d \cdot \mathbf {n}\) on \(\varGamma \). Together with the homogeneous boundary conditions on \(\partial \varOmega \), we then can determine the harmonic scalar potential \(\psi _d\) and hence also \(\nabla \psi _d\) in \(\varOmega _I\) that can serve as measurement in \(\varOmega _I\).

In this inverse problem, one cannot prescribe any particular form or direction of the unknown electrical current \(\mathbf {J}_e\). Here the general class \(\mathbf {J}_{ad}\) of arbitrary bounded \(\mathbf {L}^2\)-controls is meaningful indeed. Possible selections of \(\mathbf {J}_{ad}\) are the definitions (19) and (20).

Electrical Current in an Induction Coil. Another typical application is the case where the electrical current is prescribed in an induction coil (see, e.g., [13]). A standard induction coil is composed by one wire that is twisted in many windings around the core. Here, the direction of the electrical current in one point is very precisely given by the direction of the wire in that point. The strength j of the current is the only unknown that is to be determined. The control \(\mathbf {J}_e\) has the form

$$ \mathbf {J}_e(\mathbf{x}) = \frac{N_\star }{Q_\mathrm{coil}}\mathbf {e}(\mathbf{x}) \, j $$

where j is a complex number, the unit vector function \(\mathbf {e}\) is the direction of the wire in the point \(\mathbf{x}\) of the coil, \(N_\star \) is the number of windings and \(Q_\mathrm{coil}\) is the area of the cross section of the coil that is perpendicular to the direction of the windings. Assume for convenience that \(N_\star /Q_\mathrm{coil} = 1\) to simplify our notation.

Example 2

In [13] the following geometry was chosen for the induction coil, which is topologically equivalent to a torus:

$$ \varOmega _\mathrm{coil} = \{ \mathbf{x} \in \mathbb {R}^3 \, : \, 0< r_1< x_1^2 + x_2^2< r_2, \, c_1< x_3 < c_2 \}, $$

where \(r_2> r_1> 0 \) and \( c_1 < c_2\) are given real numbers. Here the function \(\mathbf {e}\) is defined by

(24)

In \(\varOmega _\mathrm{coil}\), \(\mathbf {e}\) is a unit vector.

Notice that in this case the control is just one complex number. Here, the analogue of (20) is

$$\begin{aligned} \mathbf {J}_{ad}= \{\mathbf {e}(\cdot ) \, j : |\mathop {\mathrm {Re}\,}j| \le \mathrm{Re}_{\max } \text{ and } |\mathop {\mathrm {Im}\,}j| \le \mathrm{Im}_{\max }\}. \end{aligned}$$
(25)

The optimality conditions can be discussed analogously to complex control vector functions, we leave the main steps to the reader. For the real part, we deduce for \(\nu \ge 0\)

$$\begin{aligned} \mathop {\mathrm {Re}\,}j^* = \left\{ \begin{array}{rl} {-\mathrm Re_{\max }},&{} \text{ if } \int _{\varOmega _C} \mathop {\mathrm {Re}\,}(\mathbf {D}_{J^*} \cdot \mathbf {e} + \nu j^*) > 0\\ \mathrm{Re_{\max }},&{} \text{ if } \int _{\varOmega _C} \mathop {\mathrm {Re}\,}(\mathbf {D}_{J^*} \cdot \mathbf {e} + \nu j^*) < 0 \, . \end{array} \right. \end{aligned}$$
(26)

If \(\nu > 0\), then we have the projection formula

$$\begin{aligned} \mathop {\mathrm {Re}\,}j^* = \mathbb {P}_{[-\mathrm Re_{\max },\mathrm Re_{\max }]}\left\{ - \frac{1}{\nu } \int _{\varOmega _C} \mathop {\mathrm {Re}\,}\mathbf {D}_{J^*} \cdot \mathbf {e} \right\} . \end{aligned}$$
(27)

Analogous conditions are satisfied by \(\mathop {\mathrm {Im}\,}j^*\) with \(\mathop {\mathrm {Im}\,}\) substituted for Re.

Electrical Currents in a Package of Wires. The following situation is somehow intermediate between the two cases mentioned above. Here, the induction coil is composed of a package of single wires that can be controlled separately. Assume that each one of these currents can be controlled independently from the others. The cross section of this package of wires can be viewed as a discrete approximation of a function \(j: \varOmega _\mathrm{coil} \rightarrow \mathbb {C}\) that stands for the strength of the current while the direction is still given by a function such as \(\mathbf {e}\) above.

Let us consider the geometry of Example 2. Here, the strength j of the current depends only on the radius r and the coordinate \(x_3\), while the direction of the current is given again by \(\mathbf {e}\). In terms of cylindrical coordinates, this reads

$$ \mathbf {J}_e = \mathbf {e}(r,\varphi ,z)\, j(r,z), $$

where \(r_1 \le r \le r_2, \, 0 \le \varphi < 2 \pi , \, c_1 \le z \le c_2\). A useful set of admissible control functions might be

$$\begin{aligned} \mathbf {J}_{ad}= \mathbf {e} \, j_{ad} \end{aligned}$$
(28)

where we take controls out of the complex space \(L^2((r_1,r_2)\times (c_1,c_2))\),

$$ j_{ad} = \{ j \in L^2((r_1,r_2)\times (c_1,c_2)): \, |\mathop {\mathrm {Re}\,}j| \le \mathrm{Re}_{\max } \text{ and } |\mathop {\mathrm {Im}\,}j| \le \mathrm{Im}_{\max }\} $$

and the actual control function would be \(j \in L^2((r_1,r_2)\times (c_1,c_2))\). This view is, perhaps, a bit academic but it gives an interpretation on how a controlled distributed current might be generated.

The necessary optimality conditions are analogous to (22) and (23), but \((r_1,r_2)\times (c_1,c_2)\) must be substituted for \(\varOmega _C\). For instance, the optimal solution obeys, for almost all \((r,z) \in [r_1,r_2] \times [c_1,c_2]\), the projection formula

$$\begin{aligned} \mathop {\mathrm {Re}\,}j^*(r,z) = \mathbb {P}_{[\mathrm{-Re_{\max }},\mathrm{Re_{\max }}]}\left\{ - \frac{1}{\nu }\int _{0}^{2\pi } \mathop {\mathrm {Re}\,}\mathbf {D}_{J^*}(r,z) \cdot \mathbf {e}(r,\varphi ,z)\, d\varphi \right\} . \end{aligned}$$
(29)

Real Current Vectors. A smaller but perhaps more realistic class of controls \(\mathbf {J}\) has the particular form

$$\begin{aligned} \mathbf {J}(\mathbf {x}) = e^{i \phi }J(\mathbf {x}) \, , \end{aligned}$$
(30)

where J is a real vector function and \(\phi \) is fixed. Here, J varies in the admissible set

(31)

with a given bound \(j_{\max } > 0\). To cover this ansatz by the control problem (10), we define the functional \( f(J) := F(e^{i \phi } J) \) and consider the problem

$$\begin{aligned} \min _{J \in J_{ad}} f(J). \end{aligned}$$
(32)

This is nothing more than a particular case of the optimal control problem (10) subject to the particular control set defined by (30) and (31).

The associated optimal control \(\mathbf {J}^* = e^{i \phi } J^*\) has to obey the necessary optimality conditions of Theorem 3, in particular (13), i.e.

$$ \mathop {\mathrm {Re}\,}\int _{\varOmega _C} (\mathbf {D}_{J^*} + \nu \mathbf {J}^*)\cdot (\overline{\mathbf {J}} - \overline{\mathbf {J}^*}) \ge 0 \quad \forall \mathbf {J}\in \mathbf {J}_{ad}\, $$

using the notation (16). With the particular ansatz (30), this variational inequality can be further simplified. Finally, inserting the particular form of \(\mathbf {J}\), we find

$$\begin{aligned} \int _{\varOmega _C} (D_{J^*} + \nu J^*)\cdot (J - J^*)\, \ge 0 \quad \forall J \in J_{ad}\, , \end{aligned}$$
(33)

with \(D_{J^*}:= \mathop {\mathrm {Re}\,}(e^{- i \phi } \mathbf {D}_{J^*}).\) The further pointwise discussion of (33) is analogous to (22) and (23), where “\(\mathop {\mathrm {Re}\,}\)” can be omitted, since all quantities in (33) are real.