# CSEM Optimization Using the Correspondence Principle
## 2 Methodology
### Gradient Calculation for CSEM Inversion  
The estimate of subsurface resistivity is an ill-posed non-linear problem and inversion of CSEM data usually applies interactive algorithms, where update of the resistivity model is a step along the gradient of the objective function relative to the model parameters. The adjoint state method allows for the efficient computation of the gradient [16]. For a conductive model, \(\sigma\), the objective function for inversion of CSEM data is the least squares mismatch between the observed and modeled data:  
\[\chi(\mathbf{E},\sigma)=\sum_{s}\sum_{\omega}\sum_{r}W^{E}(\mathbf{x}^{\prime}, \mathbf{x}^{s})\Big{\|}\mathbf{E}^{\text{obs}}(\mathbf{x}^{\prime},\omega; \mathbf{x}^{s})-\mathbf{E}(\mathbf{x}^{\prime},\omega;\mathbf{x}^{s}|\sigma) \Big{\|}^{2}, \tag{23}\]  
where index \(s\) indicates the summation over all sources, index \(r\) indicates the summation over the receiver position, and index \(\omega\) indicates the summation over all recorded frequencies. The weighting factors \(W^{E}\) penalize the residuals between the modeled and observed field components [24]. The observed electric field at the receiver position, denoted by \(\mathbf{x}^{\prime}\), due to a source located at \(\mathbf{x}^{s}\), for a given frequency, \(\omega\), is represented by the vector \(\mathbf{E}^{\text{obs}}(\mathbf{x}^{\prime},\mathbf{x}^{s},\omega)\). The field vector \(\mathbf{E}(\mathbf{x}^{\prime},\mathbf{x}^{s},\omega)\) represents the corresponding modeled field for a given conductivity model, \(\sigma\). We derived the gradient of \(\chi(\mathbf{E},\sigma)\) relative to the conductivity model through the adjoint state method, which is an extension of the Lagrange multipliers method. The starting point is the extended Lagrangian, containing the sum of the least-squares data misfit plus the state equations that enforce the modeled fields and medium properties should honor the Maxwell equations, i.e.,  
\[\mathcal{L}(\mathbf{E},\mathbf{H},\sigma,\lambda_{E},\lambda_{H})= \sum_{s}\sum_{\omega}\sum_{r}W^{E}(\mathbf{x}^{\prime},\omega; \mathbf{x}^{s})\Big{\|}\mathbf{E}^{\text{obs}}(\mathbf{x}^{\prime},\omega; \mathbf{x}^{s})-\mathbf{E}(\mathbf{x}^{\prime},\omega;\mathbf{x}^{s}|\sigma) \Big{\|}^{2} \tag{24}\] \[+\sum_{s}\sum_{\omega}\Re\bigg{(}\int_{\Omega}d\Omega\lambda_{E}^ {*}(\mathbf{u})[-\
abla\times\mathbf{H}(\mathbf{u})+\sigma(\mathbf{x}) \mathbf{E}+\mathbf{J}(\mathbf{u})]\bigg{)}\] \[+\sum_{s}\sum_{\omega}\Re\bigg{(}\int_{\Omega}d\Omega\lambda_{H} ^{*}(\mathbf{u})[\
abla\times\mathbf{E}(\mathbf{u})-i\omega\mu\mathbf{H}( \mathbf{u})]\bigg{)}\]  
where \(\Re(z)\) indicates the real part of its complex argument and \(\mathbf{u}\equiv(\mathbf{x},\omega;\mathbf{x}^{s})\). \(\lambda_{E}(\mathbf{x},\omega;\mathbf{x}^{s})\), and \(\boldsymbol{\lambda}_{H}(\mathbf{x},\omega;\mathbf{x}^{s})\) are the adjoint-state fields. The stationarity of the first variation of the Lagrangian functional relative to the electromagnetic fields produces the system of equations for the adjoint-state fields [15; 16], \(\boldsymbol{\lambda}_{E}\) and \(\boldsymbol{\lambda}_{H}\),  
\[\
abla\times\lambda_{H}^{*}(\mathbf{u})+ \sigma(\mathbf{x})\boldsymbol{\lambda}_{E}^{*}(\mathbf{u})=\sum_{r} \delta(\mathbf{x}-\mathbf{x}^{r})W^{E}(\mathbf{u})\Big{[}\mathbf{E}^{\text{ obs}}(\mathbf{u})-\mathbf{E}(\mathbf{u})\Big{]}, \tag{25}\] \[-\
abla\times\lambda_{E}^{*}(\mathbf{u})-i\omega\mu\lambda_{H}^{ *}(\mathbf{u})=\mathbf{0}\,, \tag{26}\]  
and the gradient of the objective function relative to the conductivity tensor,  
\[\frac{\partial\chi}{\partial\sigma}\bigg{|}_{\mathbf{x}}=\sum_{s}\sum_{\omega }\Re\{\boldsymbol{\lambda}_{E}^{*}(\mathbf{x},\omega;\mathbf{x}^{s})\mathbf{E }(\mathbf{x},\omega;\mathbf{x}^{s})\}. \tag{27}\]  
Therefore, to evaluate the gradient of the objective function, we need to solve the direct electromagnetic fields equation's and the adjoint-state fields equation's. To solve the system Equations (25) and (26), we apply the correspondence principle proposed by [13].