Modeling and Control of Low-Frequency
Electromagnetic Fields in Multiply Connected
Conductors

Fredi Tröltzsch, Alberto Valli

► To cite this version:

Fredi Tröltzsch, Alberto Valli. Modeling and Control of Low-Frequency Electromagnetic Fields in Mutiply Connected Conductors. 27th IFIP Conference on System Modeling and Optimization (CSMO), Jun 2015, Sophia Antipolis, France. pp.505-516, 10.1007/978-3-319-55795-3_48 . hal-01626886

HAL Id: hal-01626886

https://inria.hal.science/hal-01626886

Submitted on 31 Oct 2017

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Modeling and Control of Low-Frequency Electromagnetic Fields in Multiply Connected Conductors

Fredi Tröltzsch* and Alberto Valli

Institut für Mathematik, Technische Universität Berlin, D-10623 Berlin, Germany
and Dipartimento di Matematica, Università di Trento, 38123 Trento, Italy
fredi.troeltzsch@math.tu-berlin.de, valli@science.unitn.it

**Abstract.** We consider a particular model for electromagnetic fields in the context of optimal control. Special emphasis is laid on a non-standard *H*-based formulation of the equations of low-frequency electromagnetism in multiply connected conductors. By this technique, the low-frequency Maxwell equations can be solved with reduced computational complexity. We show the well-posedness of the system and derive the sensitivity analysis for different models of controls.

**Keywords:** Electromagnetic fields, Maxwell equations, eddy current equations, *H*-based approximation, low frequency approximation, optimal control

## 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 $\Omega$ 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.

<footnote>* The first author was supported by Centro Internazionale di Ricerca Matematica (CIRM-FBK) Trento and by the Einstein Center for Mathematics Berlin (ECMath)</footnote>
## 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

$$J = \sigma E + J_e, \qquad (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 $\Omega_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) = \operatorname{Re}[J(\mathbf{x})e^{i\omega t + i\phi}] = \operatorname{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) = \operatorname{Re}[\mathbf{E}(\mathbf{x})e^{i\omega t}], \quad H(\mathbf{x}, t) = \operatorname{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} \operatorname{curl} \mathbf{H} - \sigma \mathbf{E} &= \mathbf{J}_e \\ \operatorname{curl} \mathbf{E} + i\omega\mu\mathbf{H} &= \mathbf{0} \end{aligned} \qquad (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 $\Omega$.

### 2.2 Eddy current formulation in weak and strong form

*Assumption 1 (Geometry)* In the paper, $\Omega \subset \mathbb{R}^3$ is a bounded and simply connected Lipschitz domain with connected boundary $\Gamma$; $\Omega$ is the “holdall” computational domain containing all conductors. The subdomain $\Omega_C \subset \Omega$ that denotes the conductor is a bounded Lipschitz set. We require that $\Omega_C$ is the union of
finitely many disjoint open and connected sets $(\Omega_C)_l$, $l \in \{1, \dots, k\}$, the so-called (connected) components of $\Omega_C$. Assume further that $\text{cl} \, \Omega_C \cap \partial \Omega = \emptyset$. The set $\Omega_I := \Omega \setminus \text{cl} \, \Omega_C$ 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 $\Omega_I$ (precisely, the rank of the first homology group of $\text{cl} \, \Omega_I$, or, equivalently, the first Betti number of $\Omega_I$). Due to our assumption on $\Omega$, it is also the number of "handles" of $\Omega_C$. If all the components $(\Omega_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 \to \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_{\mathbb{R}}^{p}(D) = \{v: D \to \mathbb{R}, |v|^p \text{ is integrable}\}.$$

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

**Definition 2.** We denote by $\rho_j$, $j \in \{1, \dots, g\}$, a basis of the space of $\mu$-harmonic fields

$$\mathcal{H}_I^\mu = \{ \mathbf{v} : \Omega_I \to \mathbb{R}^3 : \text{curl } \mathbf{v} = \mathbf{0} \text{ in } \Omega_I, \text{div}(\mu\mathbf{v}) = 0 \text{ in } \Omega_I, \mu\mathbf{v} \cdot \mathbf{n} = 0 \text{ on } \partial\Omega_I \}, \quad (3)$$

where $\mathbf{n}$ is the unit outward normal vector on $\partial\Omega_I$.

The functions $\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 $\text{curl } \mathbf{H} = \mathbf{0}$ holds in $\Omega_I$. Therefore, $\mathbf{H}|_{\Omega_I}$ can be written as $\nabla\psi + \sum_{j=1}^g \alpha_j \rho_j$ (see, e.g., [1, Appen. A.3]). This leads to the weak formulation of our eddy current system: Let $\mathbf{V} = H(\text{curl}; \Omega_C) \times H^1(\Omega_I)/\mathbb{C} \times \mathbb{C}^g$ and define the state space

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

where

$$\mathbf{H} \times \mathbf{n} - \nabla\psi \times \mathbf{n} - \sum_{j=1}^{g} \alpha_j \rho_j \times \mathbf{n} = \mathbf{0} \quad \text{on } \Gamma. \quad (4)$$

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

$$\|(\mathbf{H}, \Psi, \boldsymbol{\alpha})\|_{\mathbf{V}} = \left( \|\mathbf{H}\|_{H(\text{curl};\Omega_C)}^2 + \|\psi\|_{H^1(\Omega_I)/\mathbb{C}}^2 + |\boldsymbol{\alpha}|^2 \right)^{1/2},$$
where $\|\mathbf{H}\|_{H(\mathrm{curl};\Omega_C)} = (\int_{\Omega_C} (\mathrm{curl}\,\mathbf{H} \cdot \mathrm{curl}\,\overline{\mathbf{H}} + \mathbf{H} \cdot \overline{\mathbf{H}}))^{1/2}$ and $\|\psi\|_{H^1(\Omega_I)/\mathbb{C}} = (\int_{\Omega_I} \nabla\psi \cdot \nabla\overline{\psi})^{1/2}$. We also need the norms $\|\mathbf{Q}\|_{\Omega_C} := (\int_{\Omega_C} |\mathbf{Q}(\mathbf{x})|^2)^{1/2}$, $\|\mathbf{Q}\|_{\mu,\Omega_C} := (\int_{\Omega_C} \mu(\mathbf{x})\mathbf{Q}(\mathbf{x}) \cdot \overline{\mathbf{Q}(\mathbf{x})})^{1/2}$, and analogous norms $\|\mathbf{Q}\|_{\sigma,\Omega_C}$ and $\|\mathbf{Q}\|_{\mu,\Omega_I}$. Further, we introduce a symmetric and positive definite matrix $M$ by

$$M_{nj} = \int_{\Omega_I} \mu \rho_n \cdot \rho_j;$$

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

$$a[\mathbf{u}, \mathbf{v}] = \int_{\Omega_C} \sigma^{-1} \mathrm{curl} \, \mathbf{H} \cdot \mathrm{curl} \, \overline{\mathbf{W}} + \int_{\Omega_C} i\omega\mu \mathbf{H} \cdot \overline{\mathbf{W}} + \int_{\Omega_I} i\omega\mu \nabla\psi \cdot \nabla\overline{\eta} + i\omega M\alpha \cdot \overline{\beta},$$

where $\mathbf{u} = (\mathbf{H}, \psi, \alpha)$ and $\mathbf{v} = (\mathbf{W}, \eta, \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, \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(\Omega_C)^3$, if

$$a[\mathbf{u}, \mathbf{v}] = \int_{\Omega_C} \sigma^{-1} \mathbf{J}_e \cdot \mathrm{curl} \, \overline{\mathbf{W}} \quad \forall \mathbf{v} := (\mathbf{W}, \eta, \beta) \in \mathbf{V}_0. \quad (5)$$

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

$$\|(\mathbf{H}, \psi, \alpha)\|_{\mathbf{V}} \le c \|\mathbf{J}_e\|_{\Omega_C}. \quad (6)$$

We have shown in [15] that the solution $(\mathbf{H}, \psi, \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{align} \mathrm{curl}(\sigma^{-1} \mathrm{curl} \, \mathbf{H}) + i\omega\mu \mathbf{H} &= \mathrm{curl}(\sigma^{-1} \mathbf{J}_e) && \text{in } \Omega_C \nonumber \\ \mathbf{H} \times \mathbf{n} &= \nabla\psi \times \mathbf{n} + \sum_{j=1}^g \alpha_j \rho_j \times \mathbf{n} && \text{on } \Gamma \nonumber \\ \mu \mathbf{H} \cdot \mathbf{n} &= \mu \nabla\psi \cdot \mathbf{n} && \text{on } \Gamma \tag{7} \\ -\mathrm{div}(\mu \nabla\psi) &= 0 && \text{in } \Omega_I \nonumber \\ \mu \nabla\psi \cdot \mathbf{n}_{\Omega} &= 0 && \text{on } \partial\Omega \nonumber \end{align} $$

with additional geometrical conditions

$$(M\alpha)_j = (i\omega)^{-1} \int_{\Gamma} \sigma^{-1}(\mathrm{curl}\,\mathbf{H} - \mathbf{J}_e) \cdot (\mathbf{n} \times \rho_j) \quad \forall j \in \{1, \dots, g\}. \quad (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 $J_e$ is the control. As fixed data, vector functions $H_d \in L^2(\Omega)^3$, $E_d \in L^2(\Omega_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 $\Omega_I$ the reference magnetic field $H_d$ is split as $\nabla\psi_d + \sum_{j=1}^g \alpha_{d,j}\rho_j$. Moreover, a nonempty, bounded, convex and closed set of admissible controls $J_{ad} \subset L^2(\Omega_C)^3$ is given. Possible choices for $J_{ad}$ will be specified later.

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

$$ F(\mathbf{J}) = \frac{\nu_C}{2} \|\mathbf{H}_J - \mathbf{H}_d\|_{\mu, \Omega_C}^2 + \frac{\nu_A}{2} \|\nabla\psi_J - \nabla\psi_d\|_{\mu, \Omega_I}^2 + \frac{\nu_B}{2} |\alpha_J - \alpha_d|_M^2 + \frac{\nu_E}{2} \|\sigma^{-1}(\operatorname{curl} \mathbf{H}_J - \mathbf{J}) - \mathbf{E}_d\|_{\sigma, \Omega_C}^2 + \frac{\nu}{2} \|\mathbf{J}\|_{\Omega_C}^2. \quad (9) $$

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

The optimal control problem, written in short form, is

$$ \min_{J \in J_{ad}} F(J). \quad (10) $$

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

**Theorem 2.** The optimal control problem (10) admits at least one optimal control denoted by $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 **J** at an arbitrary fixed (not necessarily optimal or admissible) control
**\hat{\mathbf{J}}** with associated solution **\hat{\mathbf{H}}** := **\mathbf{H}_{\hat{\mathbf{J}}}**, **\hat{\psi}** := **\psi_{\hat{\mathbf{J}}}** and **\hat{\alpha}** := **\alpha_{\hat{\mathbf{J}}}** is obtained as

$$
\begin{equation}
\begin{split}
F'(\hat{\mathbf{J}}) \mathbf{J} = \operatorname{Re} \left\{
  \begin{aligned}[t]
  & \int_{\Omega_C} \nu_C \mu(\hat{\mathbf{H}} - \mathbf{H}_d) \cdot \overline{\mathbf{H}_J} \\
  & + \int_{\Omega_I} \nu_A \mu(\nabla\hat{\psi} - \nabla\psi_d) \cdot \overline{\nabla\psi_J} + \nu_B M(\hat{\alpha} - \alpha_d) \cdot \overline{\alpha_J} \\
  & + \int_{\Omega_C} \nu_E (\hat{\mathbf{E}} - \mathbf{E}_d) \cdot \operatorname{curl} \overline{\mathbf{H}_J} \\
  & - \int_{\Omega_C} \nu_E (\hat{\mathbf{E}} - \mathbf{E}_d) \cdot \overline{\mathbf{J}} + \nu \int_{\Omega_C} \hat{\mathbf{J}} \cdot \overline{\mathbf{J}}
  \end{aligned}
\right\} .
\end{split}
\tag{11}
\end{equation}
$$

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

**Definition 4 (Adjoint equation).** Let $\hat{\mathbf{J}} \in L^2(\Omega_C)^3$ be a given control with associated states $\hat{\mathbf{H}} := \hat{\mathbf{H}}_{\hat{\mathbf{J}}}$, $\hat{\mathbf{E}} := \mathbf{E}_{\hat{\mathbf{J}}}$, $\hat{\psi} := \psi_{\hat{\mathbf{J}}}$, $\hat{\alpha} := \alpha_{\hat{\mathbf{J}}}$, and let $\mathbf{H}_d \in L^2(\Omega_C)^3$, $\psi_d \in H^1(\Omega_I)/\mathbb{C}$, $\alpha_d \in \mathbb{C}^g$, $\mathbf{E}_d \in L^2(\Omega_C)^3$ be given as above. The equation for $(\mathbf{W}, \eta, \beta)$,

$$
\begin{align}
& \int_{\Omega_C} \sigma^{-1} \operatorname{curl} \mathbf{W} \cdot \operatorname{curl} \overline{\mathbf{H}} - i\omega \int_{\Omega_C} \mu \mathbf{W} \cdot \overline{\mathbf{H}} - i\omega \int_{\Omega_I} \mu \nabla\eta \cdot \nabla\overline{\psi} - i\omega M\beta \cdot \overline{\alpha} \nonumber \\
& = \int_{\Omega_C} \nu_C \mu(\overline{\mathbf{H}} - \mathbf{H}_d) \cdot \overline{\mathbf{H}} \nonumber \\
& \quad + \int_{\Omega_I} \nu_A \mu(\nabla\overline{\psi} - \nabla\psi_d) \cdot \overline{\nabla\psi} + \nu_B M(\overline{\alpha} - \alpha_d) \cdot \overline{\alpha} \nonumber \\
& \quad + \int_{\Omega_C} \nu_E (\overline{\mathbf{E}} - \mathbf{E}_d) \cdot \operatorname{curl} \overline{\mathbf{H}} \quad \forall (\mathbf{H}, \psi, \alpha) \in \mathbf{V}_0 \tag{12}
\end{align}
$$

is said to be the adjoint equation of equation (5). The solution $(\mathbf{W}_{\hat{\mathbf{J}}}, \eta_{\hat{\mathbf{J}}}, \beta_{\hat{\mathbf{J}}}) \in \mathbf{V}_0$ is called the adjoint state associated with $\hat{\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(\Omega_C)^3$, $\psi_d \in H^1(\Omega_I)/\mathbb{C}$, $\alpha_d \in \mathbb{C}^g$, $\mathbf{E}_d \in L^2(\Omega_C)^3$, $\hat{\mathbf{J}} \in L^2(\Omega_C)^3$, the adjoint equation (12) has a unique solution $(\mathbf{W}_{\hat{\mathbf{J}}}, \eta_{\hat{\mathbf{J}}}, \beta_{\hat{\mathbf{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 **J**\* be an optimal control of problem (10) and let **H**<sub>J\*</sub> and **E**<sub>J\*</sub> be the associated optimal magnetic and electric fields, respectively. Then there exists a unique solution (**W**<sub>J\*</sub>, **η**<sub>J\*</sub>, **β**<sub>J\*</sub>) of the adjoint equation (12) such that the variational inequality

$$
\mathrm{Re} \int_{\Omega_C} \left( \sigma^{-1} \operatorname{curl} \mathbf{W}_{J^*} - \nu_E (\mathbf{E}_{J^*} - \mathbf{E}_d) + \nu \mathbf{J}^* \right) \cdot (\mathbf{J} - \overline{\mathbf{J}^*}) \ge 0 \quad \forall \mathbf{J} \in \mathbf{J}_{ad} \quad (13)
$$
is satisfied.

*Proof.* The optimal control **J**\* must obey the standard variational inequality

$$F'(\mathbf{J}^*)(\mathbf{J} - \mathbf{J}^*) \geq 0 \quad \forall \mathbf{J} \in \mathbf{J}_{ad}. \qquad (14)$$

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

$$F'(\mathbf{J}^*)(\mathbf{J} - \mathbf{J}^*) = \operatorname{Re} \left[ \nu_C \int_{\Omega_C} \mu(\mathbf{H}_{J^*} - \mathbf{H}_d) \cdot \overline{\mathbf{H}_{J-J^*}} \right. \\ \left. + \nu_A \int_{\Omega_A} \mu(\nabla\psi_{J^*} - \nabla\psi_d) \cdot \overline{\nabla\psi_{J-J^*}} + \nu_B M(\alpha_{J^*} - \alpha_d) \cdot \overline{\alpha_{J-J^*}} \right. \\ \left. + \nu_E \int_{\Omega_C} (\mathbf{E}_{J^*} - \mathbf{E}_d) \cdot \operatorname{curl} \overline{\mathbf{H}_{J-J^*}} - \nu_E \int_{\Omega_C} (\mathbf{E}_{J^*} - \mathbf{E}_d) \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}) \right. \\ \left. + \nu \int_{\Omega_C} \mathbf{J}^* \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}) \right].$$

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

$$F'(\mathbf{J}^*)(\mathbf{J} - \mathbf{J}^*) = \operatorname{Re} \left[ \int_{\Omega_C} \sigma^{-1} \operatorname{curl} \mathbf{W}_{J^*} \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}) \right. \\ \left. - \int_{\Omega_C} \nu_E (\mathbf{E}_{J^*} - \mathbf{E}_d) \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}) + \int_{\Omega_C} \nu \mathbf{J}^* \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}) \right] \quad (15) \\ = \operatorname{Re} \int_{\Omega_C} \left( \sigma^{-1} \operatorname{curl} \mathbf{W}_{J^*} - \nu_E (\mathbf{E}_{J^*} - \mathbf{E}_d) + \nu \mathbf{J}^* \right) \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}),$$

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

Let us define for convenience

$$\mathbf{D}_{J^*} := \sigma^{-1} \operatorname{curl} \mathbf{W}_{J^*} - \nu_E (\mathbf{E}_{J^*} - \mathbf{E}_d). \qquad (16)$$

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

$$\operatorname{Re} \int_{\Omega_C} (\mathbf{D}_{J^*} + \nu \mathbf{J}^*) \cdot (\overline{\mathbf{J}} - \overline{\mathbf{J}^*}) \geq 0 \quad \forall \mathbf{J} \in \mathbf{J}_{ad}. \qquad (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'(\hat{\mathbf{J}})$ as its reduced gradient:

$$\nabla F(\hat{\mathbf{J}}) := \mathbf{D}_{\hat{\mathbf{J}}} + \nu \hat{\mathbf{J}}. \qquad (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

$$ \mathbf{J}_{ad} = L^2(\Omega_C)^3 \quad (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(\Omega_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

$$ \mathbf{J}_{ad} = \{ \mathbf{J} \in L^2(\Omega_C)^3 : \begin{array}{l} |\mathrm{Re} \, J_\ell(\mathbf{x})| \le \mathrm{Re}_{\max}, \quad |\mathrm{Im} \, J_\ell(\mathbf{x})| \le \mathrm{Im}_{\max} \\ \text{for } \ell = 1, 2, 3, \text{ and for almost all } \mathbf{x} \in \Omega_C \end{array} \} \quad (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

$$ \mathrm{Re} \int_{\Omega_C} \nabla F(\mathbf{J}^*) \cdot \bar{\mathbf{J}}^* \le \mathrm{Re} \int_{\Omega_C} \nabla F(\mathbf{J}^*) \cdot \bar{\mathbf{J}} \quad \forall \mathbf{J} \in \mathbf{J}_{ad}. $$

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

$$ \int_{\Omega_C} \mathrm{Re}(\nabla F(\mathbf{J}^*)) \cdot \mathrm{Re} \mathbf{J}^* \le \int_{\Omega_C} \mathrm{Re}(\nabla F(\mathbf{J}^*)) \cdot \mathrm{Re} \mathbf{J} \quad \forall \mathbf{J} : |\mathrm{Re} \mathbf{J}(\cdot)| \le \mathrm{Re}_{\max}, $$

$$ \int_{\Omega_C} \mathrm{Im}(\nabla F(\mathbf{J}^*)) \cdot \mathrm{Im} \mathbf{J}^* \le \int_{\Omega_C} \mathrm{Im}(\nabla F(\mathbf{J}^*)) \cdot \mathrm{Im} \mathbf{J} \quad \forall \mathbf{J} : |\mathrm{Im} \mathbf{J}(\cdot)| \le \mathrm{Im}_{\max}. $$

Here, the inequalities $|\mathrm{Re} \mathbf{J}(\cdot)| \le \mathrm{Re}_{\max}$ and $|\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

$$ \mathrm{Re} \nabla F(\mathbf{J}^*)(\mathbf{x}) \cdot \mathrm{Re} \mathbf{J}^*(\mathbf{x}) \le \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\} $$

holds for almost all $\mathbf{x} \in \Omega_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}} \mathrm{Re}(\nabla F(\mathbf{J}^*))_{\ell}(\mathbf{x}) v = \mathrm{Re}(\nabla F(\mathbf{J}^*))_{\ell}(\mathbf{x}) \mathrm{Re} J_{\ell}^*(\mathbf{x}), $$
i.e., that, for a.a. $\mathbf{x} \in \Omega_C$, the minimum at the left-hand side is attained by $\mathrm{Re} \, J_{\ell}^{*}(\mathbf{x})$.

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

$$ \mathrm{Re} \, J_{\ell}^{*}(\mathbf{x}) = \begin{cases} -\mathrm{Re}_{\mathrm{max}}, & \text{if } \mathrm{Re} \, (\mathbf{D}_{J^{*}} + \nu \mathbf{J}^{*})_{\ell}(\mathbf{x}) > 0 \\ \mathrm{Re}_{\mathrm{max}}, & \text{if } \mathrm{Re} \, (\mathbf{D}_{J^{*}} + \nu \mathbf{J}^{*})_{\ell}(\mathbf{x}) < 0 \end{cases} \quad (21) $$

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

$$ \mathrm{Re} \, J_{\ell}^{*}(\mathbf{x}) = \mathbb{P}_{[-\mathrm{Re}_{\mathrm{max}}, \mathrm{Re}_{\mathrm{max}}]} \left\{ -\frac{1}{\nu} \mathrm{Re} \, (\mathbf{D}_{J^{*}})_{\ell}(\mathbf{x}) \right\} \quad (22) $$

for almost all $\mathbf{x} \in \Omega_C$ and all $\ell \in \{1, 2, 3\}$. Here, the projection function $\mathbb{P}_{[a,b]} : \mathbb{R} \to [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 $\Gamma$ of the conductor, say at the surface of the human head $\Omega_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 $\Gamma$. In view of the interface conditions on $\Gamma$, we have then also $\mu \nabla \psi_d \cdot \mathbf{n}$ on $\Gamma$. Together with the homogeneous boundary conditions on $\partial \Omega$, we then can determine the harmonic scalar potential $\psi_d$ and hence also $\nabla \psi_d$ in $\Omega_I$ that can serve as measurement in $\Omega_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_*/Q_{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:

$$ \Omega_{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 **e** is defined by

$$ \mathbf{e}(x_1, x_2, x_3) = \begin{cases} \frac{1}{\sqrt{x_1^2 + x_2^2}} \begin{bmatrix} -x_2 \\ x_1 \\ 0 \end{bmatrix} & \text{in } \Omega_{coil} \\ 0 & \text{in } \Omega_C \setminus \text{cl } \Omega_{coil}. \end{cases} \quad (23) $$

In $\Omega_{coil}$, **e** is a unit vector.

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

$$ \mathbf{J}_{ad} = \{ \mathbf{e}(\cdot) j : |\mathrm{Re} \, j| \le \mathrm{Re}_{\max} \text{ and } |\mathrm{Im} \, j| \le \mathrm{Im}_{\max} \}. \quad (24) $$

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$

$$ \mathrm{Re} \, j^* = \begin{cases} -\mathrm{Re}_{\max}, & \text{if } \int_{\Omega_C} \mathrm{Re} \, (\mathbf{D}_{J^*} \cdot \mathbf{e} + \nu j^*) > 0 \\ \mathrm{Re}_{\max}, & \text{if } \int_{\Omega_C} \mathrm{Re} \, (\mathbf{D}_{J^*} \cdot \mathbf{e} + \nu j^*) < 0. \end{cases} \quad (25) $$

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

$$ \mathrm{Re} \, j^* = \mathbb{P}_{[-\mathrm{Re}_{\max}, \mathrm{Re}_{\max}]} \left\{ -\frac{1}{\nu} \int_{\Omega_C} \mathrm{Re} \, \mathbf{D}_{J^*} \cdot \mathbf{e} \right\}. \quad (26) $$

Analogous conditions are satisfied by $\mathrm{Im} \, j^*$ with $\mathrm{Im}$ substituted for $\mathrm{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: \Omega_{coil} \to \mathbb{C}$ that stands for the strength of the current while the direction is still given by a function such as **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 **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

$$ \mathbf{J}_{ad} = \mathbf{e} j_{ad} \qquad (27) $$

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)) : |\mathrm{Re} \, j| \le \mathrm{Re}_{\max} \text{ and } |\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 (21) and (22), but $(r_1, r_2) \times (c_1, c_2)$ must be substituted for $\Omega_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

$$ \mathrm{Re} \, j^*(r, z) = \mathbb{P}_{[-\mathrm{Re}_{\max}, \mathrm{Re}_{\max}]} \left\{ -\frac{1}{\nu} \int_{0}^{2\pi} \mathrm{Re} \, \mathbf{D}_{J^*}(r, z) \cdot \mathbf{e}(r, \varphi, z) \, d\varphi \right\}. \quad (28) $$

**Real current vectors** A smaller but perhaps more realistic class of controls **J** has the particular form

$$ \mathbf{J}(\mathbf{x}) = e^{i\phi} J(\mathbf{x}), \qquad (29) $$

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

$$ J_{ad} = \{J \in L^2(\Omega_C)^3 : -j_{\max} \le J_{\ell}(\mathbf{x}) \le j_{\max} \quad \text{for a.a. } \mathbf{x} \in \Omega_C, \text{ all } \ell \in \{1, 2, 3\}\} \qquad (30) $$

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

$$ \min_{J \in J_{ad}} f(J). \qquad (31) $$

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

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

$$ \mathrm{Re} \int_{\Omega_C} (\mathbf{D}_{J^*} + \nu \mathbf{J}^*) \cdot (\bar{\mathbf{J}} - \overline{\mathbf{J}^*}) \ge 0 \quad \forall \mathbf{J} \in \mathbf{J}_{ad} $$

using the notation (16). With the particular ansatz (29), this variational inequality can be further simplified. Finally, inserting the particular form of **J**, we find

$$ \int_{\Omega_C} (D_{J^*} + \nu J^*) \cdot (J - J^*) dx \ge 0 \quad \forall J \in J_{ad}, \qquad (32) $$

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

1. Alonso Rodríguez, A., Valli, A.: Eddy current approximation of Maxwell equations, MS&A. Modeling, Simulation and Applications, vol. 4. Springer-Verlag Italia, Milan (2010), theory, algorithms and applications

2. Arnold, L., von Harrach, B.: A unified variational formulation for the parabolic-elliptic eddy current equations. Submitted (2011)

3. Bärwolff, G., Hinze, M.: Optimization of semiconductor melts. ZAMM Z. Angew. Math. Mech. 86(6), 423–437 (2006),

4. Druet, P., Klein, O., Sprekels, J., Tröltzsch, F., Yousept, I.: Optimal control of three-dimensional state-constrained induction heating problems with nonlocal radiation effects. SIAM J. Control Optim. 49(4), 1707–1736 (2011),

5. Griesse, R., Kunisch, K.: Optimal control for a stationary MHD system in velocity-current formulation. SIAM J. Control Optim. 45(5), 1822–1845 (2006),

6. Gunzburger, M., Trenchea, C.: Analysis and discretization of an optimal control problem for the time-periodic MHD equations. J. Math. Anal. Appl. 308(2), 440–466 (2005),

7. Hinze, M.: Control of weakly conductive fluids by near wall Lorentz forces. GAMM-Mitt. 30(1), 149–158 (2007)

8. Hömberg, D., Sokołowski, J.: Optimal shape design of inductor coils for surface hardening. Numer. Funct. Anal. Optim. 42, 1087–1117 (2003)

9. Hömberg, D., Volkwein, S.: Control of laser surface hardening by a reduced-order approach using proper orthogonal decomposition. Mathematical and Computer Modeling 38, 1003–1028 (2003)

10. Kolmbauer, M.: The multiharmonic finite element and boundary element method for simulation and control of eddy current problems. Phd thesis (2012)

11. Kolmbauer, M., Langer, U.: A Robust Preconditioned MinRes Solver for Distributed Time-Periodic Eddy Current Optimal Control Problems. SIAM J. Sci. Comput. 34(6), B785–B809 (2012),

12. Nicaise, S., Stingelin, S., Tröltzsch, F.: On two optimal control problems for magnetic fields. Computational Methods in Applied Mathematics (2014)

13. Nicaise, S., Stingelin, S., Tröltzsch, F.: Optimal control and model reduction for two magnetization processes. Discrete and Continuous Dynamical Systems-S (2015)

14. Tröltzsch, F.: Optimal Control of Partial Differential Equations. Theory, Methods and Applications, vol. 112. American Math. Society, Providence (2010)

15. Tröltzsch, F., Valli, A.: Optimal control of low-frequency electromagnetic fields in multiply connected conductors. Submitted (2015)

16. Yousept, I., Tröltzsch, F.: PDE-constrained optimization of time-dependent 3d electromagnetic induction heating by alternating voltages. ESAIM M2AN 46, 709–729 (2012)