## Abstract

We develop a method for synthesis of a desired intensity profile at the output of a multimode fiber (MMF) with random mode coupling by controlling the input field distribution using a spatial light modulator (SLM) whose complex reflectance is piecewise constant over a set of disjoint blocks. Depending on the application, the desired intensity profile may be known or unknown *a priori*. We pose the problem as optimization of an objective function quantifying, and derive a theoretical lower bound on the achievable objective function. We present an adaptive sequential coordinate ascent (SCA) algorithm for controlling the SLM, which does not require characterizing the full transfer characteristic of the MMF, and which converges to near the lower bound after one pass over the SLM blocks. This algorithm is faster than optimizations based on genetic algorithms or random assignment of SLM phases. We present simulated and experimental results applying the algorithm to forming spots of light at a MMF output, and describe how the algorithm can be applied to imaging.

© 2012 OSA

## 1. Introduction

The ability to form a desired intensity profile at the output of a MMF has several promising applications, such as single-fiber scanning microscopy [1,2], optical coherence tomography [3], targeted light delivery [4], micromanipulation [5,6] and sensor multiplexing [7]. Assuming the desired intensity profile is known *a priori*, one approach is to use an SLM to control the electric field at the MMF input, use a camera to monitor the intensity profile at the MMF output, and use an adaptive algorithm for finding the optimal SLM pattern. Typically, the SLM reflectance is piecewise constant over a disjoint set of blocks, each of which may comprise one or more pixels. Recent work has pursued two classes of methods for adaptively setting the SLM.

The first class is based on measuring the entire electric field transmission matrix of a fiber or other scattering medium between each block of the SLM and each pixel of the camera [8–10]. Measuring this matrix requires approximately 4*N _{SLM}* measurements, where

*N*is the number of SLM blocks. Once the transmission matrix has been measured, however, one can synthesize

_{SLM}*any number*of desired field or intensity profiles at the MMF output.

The second class is based on defining an objective function indicative of how close the output intensity distribution is to a desired intensity distribution, and using a randomized optimization algorithm to minimize (or maximize) the objective function and find the optimal SLM pattern [11, 12]. Such algorithms usually require multiple optimization passes over the SLM, and are not necessarily guaranteed to converge to the global optimum of the objective function.

In this work, we address the problem of synthesizing a desired intensity profile at a MMF output. We identify an inherent convexity in the problem and develop adaptive sequential coordinate ascent algorithms that do not require a random search and converge to the global optimum of the objective function after only one optimization pass over the SLM. These algorithms require 3*N _{SLM}* measurements for synthesis of

*each*desired intensity profile. The number of measurements required in our algorithm for the synthesis of a single desired intensity profile is on the same order as the methods measuring the electric field transmission matrix of the system. Those methods could be preferable to our algorithm when a large number of known intensity profiles need to be synthesized. However, our algorithm has the advantage that it can be applied to problems where the desired intensity profile is not known

*a priori*, such as targeted light delivery to fluorophores at unknown locations. It is not clear how algorithms based on measurement of the electric field transmission matrix could be used in such applications. We also show how control of the intensity profile at a MMF output can be used to realize a single-fiber scanning microscope, and evaluate the performance of this imaging scheme.

Although our adaptive algorithm for control of the intensity profile has been developed considering a MMF supporting a definite number of propagating modes, it is also applicable to scattering media supporting an indefinite number of modes, such as human tissues [13–15].

The organization of this paper is as follows. In Section 2, we describe how the synthesis of a known or unknown intensity profile at a MMF output can be posed as a convex optimization problem. In Section 3, we introduce our adaptive algorithms and find analytical lower bounds on the optimal values of our objective functions. In Section 4, we present simulation and experimental results of spot formation in known and unknown locations. In Section 5, we discuss how our method can be applied to imaging and evaluate the performance of our system as a single-fiber scanning microscope. We discuss the limitations of our method and topics for future work in Section 6, and provide concluding remarks in Section 7. Finally, we find bounds on the performance of our system in spot formation in Appendix A.

## 2. Optimization problems

#### 2.1 Input-output relationship of the system

Our goal is to synthesize a desired intensity distribution at the output of a MMF by using an SLM to shape the spatial phase (or amplitude-and-phase) distribution of the electric field at the input of the MMF. Assuming, for now, that the desired output intensity distribution is known *a priori*, the system shown in Fig. 1
is employed. Light from a laser is collimated, reflected from an SLM, and focused into the MMF input. At the MMF output, a microscope and camera are used to measure the intensity distribution. The measured intensity profile is fed back to a personal computer that controls the SLM pattern. The feedback data are used to determine an SLM pattern such that the measured intensity distribution optimally approximates the desired distribution. In this section, we show how this can be posed as an optimization problem, and in Section 3 we develop adaptive algorithms for finding the optimal SLM pattern.

The SLM comprises a two-dimensional array of reflective pixels. In order to simplify optimization of the SLM reflectance, multiple pixels are grouped into larger blocks, which are disjoint. The complex reflectance of the SLM can be represented as

where*N*is the number of blocks, ${s}_{k}(x,y)$ is an indicator function for the

*k*

^{th}block:

*k*

^{th}block. For a phase-only SLM $\left|{\upsilon}_{k}\right|=1$, while for an amplitude-and-phase SLM $\left|{\upsilon}_{k}\right|\le 1$. Let ${E}_{\text{SLM,in}}(x,y)$ and ${E}_{\text{SLM,out}}(x,y)$ be the electric fields incident on, and reflected from, the SLM. Then

If a linear optical device, such as a lens, is used to focus the electric field reflected from the SLM to the MMF input, propagation can be modeled by a linear operator $L$(e.g., for a Fourier lens,$L$is a Fourier transform). Thus, the electric field at the MMF input plane is

*N*

_{m}modes (including spatial and polarization degrees of freedom), we can expand the field at the MMF input in the basis of these propagating modes. Let ${E}_{\text{M,}i}(x,y)$and ${H}_{\text{M,}i}(x,y)$ be the electric and magnetic fields corresponding to the

*i*

^{th}propagating mode in the MMF. Then

*N*

_{m}modes supported by the fiber and the expansion coefficients ${c}_{i}$are given by the following inner product

Note that the electric and magnetic fields corresponding to the propagating modes of the fiber are normalized in the following way

The portion of the input field that couples to the propagating modes of the MMF is denoted by ${E}_{\text{coupled,in}}\left(x,y\right)$, which is given by the first term in Eq. (5). In the space spanned by the propagating modes, this can be represented by a state vector ${E}_{\text{coupled,in}}$, which is a column vector of the expansion coefficients ${c}_{i}$. Then

whereNeglecting mode-dependent loss, propagation in the MMF can be represented in the basis of propagating modes by a unitary propagation operator **U**, which describes phase shifts and mode coupling [16]. Mode-independent loss, while not considered here, can be described by scaling **U** by a constant. The field at the MMF output can be represented by a state vector

Given the state vector ${E}_{\text{coupled,out}}$, the field distribution at the MMF output is described by

Thus, the output field distribution is

For simplicity of notation, we have defined ${w}^{H}(x,y)={M}^{T}(x,y)UA$.We observe that the output field distribution is a linear function of the SLM reflectances ${\upsilon}_{i}$.

From this point on, unless noted otherwise, we will assume the fiber is weakly guiding, so the propagating modes are transverse. Under this assumption, the intensity distribution at the MMF output is proportional to the magnitude squared of the field distribution. Up to a normalization constant, we have

We observe that the output intensity distribution has a quadratic dependence on the SLM reflectances.

#### 2.2 Synthesis of a known intensity profile as an optimization problem

In applications such as single-fiber scanning microscopy, multiplexing of optically interrogated sensors or targeted delivery of light to known locations (e.g., for stimulating neurons), the desired MMF output intensity profile may be known *a priori*. In order to pose this as an optimization problem, we define an objective function $F(\upsilon )$ such that when it is minimized, the result is an intensity distribution ${I}_{\text{fiber,out}}(x,y)$ that is as close as possible to the known desired intensity distribution ${I}_{\text{des}}(x,y)$. We define the objective function as

_{1}is the region over the MMF core over which ${I}_{\text{des}}(x,y)$is larger than some specified fraction of its peak value (chosen to be 5% in the examples below) and R

_{2}is the rest of the fiber core area (See inset of Fig. 1). We found that among various possible objective functions, Eq. (18) performs best in terms of convergence speed and closeness of the final output intensity profile to the desired intensity profile.

Assuming a phase-only SLM, the optimization for the SLM reflectances is

If an amplitude-and-phase SLM is used, the constraint in Eq. (19) becomes $\left|\upsilon \right|\le 1$. Note that the objective function defined by Eq. (18) is not convex in $\upsilon $, and hence, standard convex optimization techniques cannot be used to solve Eq. (19) and find the globally optimal value of $\upsilon $ [17]. In practice, this optimization problem can be solved by an adaptive algorithm.

#### 2.3 Synthesis of an unknown intensity profile as an optimization problem

In applications such as targeted light delivery to fluorophores at unknown locations [18], the desired intensity profile may not be known *a priori*. In the setup of Fig. 1, a test object containing fluorophores may be placed at the MMF output, and the fluorescence power back-scattered from one or more fluorophore(s) may be measured by a power meter. In order to pose this as an optimization problem, we define an objective function that is the negative of the total measured fluorescence intensity. When this objective function is minimized, the intensity profile at the MMF output is expected to closely match the unknown distribution of the fluorophores. We define the objective function as

*n*is set to 1 for single-photon fluorescence and 2 for two-photon fluorescence. The integral is carried over the whole core area of the MMF. The optimization problem for SLM reflectances is identical to Eq. (19). Like the problem described in Section 2.2, the present optimization problem is non-convex, but can be solved using adaptive algorithms in practice. In the next section, we describe adaptive optimization algorithms that find the optimal SLM settings based on measurements of the objective function.

## 3. Adaptive optimization algorithms

#### 3.1 Adaptive sequential coordinate ascent

An experimental system requires an adaptive algorithm to find the optimal SLM reflectances. In such an algorithm, at each step, one or a few SLM reflectances are updated based on some measurements of the objective function. If a phase-only SLM is used then the reflectances to be optimized are of the form ${\upsilon}_{i}={e}^{j\varphi i}$, where the ${\phi}_{i}$ are the phases of the SLM blocks. In this case, the optimization algorithm is a continuous-phase sequential coordinate ascent (CPSCA) algorithm [19] that finds the optimal phase of one SLM block at each step based on three measurements of the objective function. Because the light intensity at the MMF output has a quadratic dependence on the SLM reflectances Eq. (17), the objective functions Eq. (18) and Eq. (20) have the following dependence on the phase of the *i*th SLM block:

Defining ${\varphi}_{i}^{\ast}={\mathrm{tan}}^{-1}\left({a}_{i}/{b}_{i}\right)$, then the optimal phase of the *i*^{th} block is

If an amplitude-and-phase SLM is used, we need to optimize both the amplitude ${r}_{i}$ and phase ${\varphi}_{i}$ of each SLM block with the constraint $0\le {r}_{i}\le 1$. The reflectivity of the *i*^{th} block is ${\upsilon}_{i}={r}_{i}{e}^{j{\varphi}_{i}}$. The optimization algorithm in this case is an amplitude-and-phase sequential coordinate ascent (APSCA), which optimizes the amplitude and phase of one SLM block at each step based on four measurements of the objective function. In this case, the objective functions Eq. (18) and Eq. (20) have the following dependence on the amplitude and phase of the *i*^{th} SLM block

Defining ${\varphi}_{i}^{\ast}={\mathrm{tan}}^{-1}\left({a}_{i}/{b}_{i}\right)$, two cases must be considered. The first case is when ${d}_{i}\ge 0$, where the optimal phase of the *i*^{th} block is given by Eq. (24), and the optimal amplitude is given by

The second case is when ${d}_{i}<0$, where we find

We can then set ${\upsilon}_{i}={r}_{i,\text{opt}}{e}^{j{\varphi}_{i,\text{opt}}}$ and move to next block. To ensure the constraint $0\le {r}_{i}\le 1$ is satisfied, we normalize the amplitudes of all SLM blocks at the end of each step:

Like the CPSCA, APSCA usually converges to the global minimum of the objective function after one pass over the SLM. Before applying our adaptive optimization algorithms to Eq. (19) we find analytical lower bounds on the optimal values of our objective functions that will be used in evaluating the performance of our algorithms.

#### 3.2 Lower bound on the optimal value of the objective function

As mentioned above, the optimization problem of Eq. (19) is not convex and cannot be solved analytically. However, it can be directly relaxed into a convex problem that when solved, yields a lower bound on the optimal value of the objective function. For simplicity of notation we define

We also define **V**, which is a matrix that depends on the SLM reflectance vector $\upsilon $ as follows

We can now express the MMF output intensity profile of Eq. (17) in terms of $W(x,y)$and $V$as

**V**. Rewriting the objective function Eq. (18) as a function of

**V**we obtain

*n*= 1 as a function of

**V**we obtain

We observe that in both cases $F(V)$ is a convex function of **V**, and the optimization problem of Eq. (19) can be rewritten as

The first constraint in the optimization problem of Eq. (36) is not convex, but we can relax it by replacing it with a positive semidefiniteness constraint $V-\upsilon {\upsilon}^{H}\succ 0$, which can itself be formulated as a Schur complement [17]. The relaxed optimization problem then becomes

This is the semidefinite program (SDP) relaxation of the original non-convex problem of Eq. (19). If we are considering an amplitude-and-phase SLM, the second constraint should be replaced by $\text{diag}(V)\le 1$. The SDP-relaxed optimization problem can be solved analytically, and its optimal value forms a lower bound on the optimal value of the objective function in the original non-convex problem [20]. In the next section, we show the results of applying our adaptive optimization algorithm to forming spots at known and unknown locations at the output of a MMF and we will use this lower bound to evaluate the performance of our algorithm.

## 4. Results

#### 4.1 Simulation results for spot formation in known locations

We have simulated the performance of our adaptive algorithms in forming spots at known locations. We assume the setup of Fig. 1 using a MMF with parabolic index profile, numerical aperture NA = 0.19 and 50-µm core diameter. The fiber supports 45 modes in each polarization at 1550 nm. We model propagation of the electric field in the MMF by a random unitary propagation matrix **U**, which is a worst-case model for a real fiber, assuming negligible mode-dependent loss. We assume that a Fourier transform lens is used to focus the SLM output field to the MMF input plane, with only the zeroth diffraction order incident on the MMF core.

We are interested in modeling a weakly guiding fiber whose length is much shorter than the birefringence beat length. These conditions are well-satisfied by the experimental setup described in Section 4.2, where the two lengths are 1 m and at least 10 m, respectively. Hence, spatial mode-dependent polarization coupling and polarization-dependent spatial-mode coupling are negligible. Furthermore, at the MMF output, we are only performing polarization-insensitive intensity measurements. Although the MMF generally supports 2*N*_{m} modes in two polarizations, we can ignore polarization, and all the summations from Section 2 can be performed over the *N*_{m} modes in one polarization.

To determine the matrices $M(x,y)$ and **A**, we have numerically solved for the exact modes of the MMF under the weak-guidance assumption [21]. We have further assumed that ${E}_{\text{SLM,in}}(x,y)$has a Gaussian profile with zero phase everywhere (although a uniform profile leads to identical results). We used the objective function Eq. (18) with a super-Gaussian desired intensity profile given by

*m*is the order of the super-Gaussian (

*m*= 1 corresponds to an ordinary Gaussian distribution), $({x}_{0},{y}_{0})$is the known centroid of the intensity distribution (relative to the center of the MMF core) and

*a*is a parameter determining the full-width at half-maximum (FWHM) of the distribution by

We have set $\kappa ={10}^{4}$ in Eq. (18). After trying super-Gaussians of different orders, we concluded that for spot formation at known locations, a first-order Gaussian profile performs almost the same as the higher-order super-Gaussians. We set the FWHM spot size of the desired Gaussian profile to 4 µm (setting it to smaller values led to identical results).

We evaluate the quality of a spot of light that is formed at the MMF output in terms of five parameters: the longitudinal and transverse sizes of the spot, the location of its centroid, the ratio of its peak intensity to its largest sidelobe intensity (peak sidelobe ratio) and the ratio of its integrated mainlobe intensity to its integrated sidelobes intensity (integrated sidelobe ratio). In imaging applications, performance is optimized when the spot sizes are minimized, the sidelobe ratios are maximized, and the actual spots are formed close to the desired locations.

We have simulated phase-only, and amplitude-and-phase SLMs with 8 × 8 and 16 × 16 blocks. For each SLM, we have set the centroid of the desired Gaussian distribution to $({x}_{0,\text{des}},0)$ and varied ${x}_{0,\text{des}}$ from 0 to 21 µm. We optimized the parameters of each SLM using our algorithm in one pass and then measured the five characteristics of the spots that are formed at different locations with different SLMs. The results are given in Figs. 2(a) -2(e). For comparison, Figs. 2(a)-2(e) also include the characteristics of a backpropagated delta function distribution sampled by a 16 × 16 amplitude-and-phase SLM (See Appendix A for the definition of a backpropagated delta function).

In Figs. 2(a)-2(e), it is observed that for both phase-only and amplitude-and-phase SLMs, and for both numbers of blocks, the longitudinal and transverse spot sizes and the actual spot locations are close to those of the backpropagated delta function sampled by a 16 × 16 amplitude-and-phase SLM. As expected, increasing the SLM resolution increases the peak and integrated sidelobe ratios. At a given number of SLM blocks, an amplitude-and-phase SLM yields higher peak and integrated sidelobe ratios than a phase-only SLM. Interestingly, the CPSCA and APSCA algorithms with a16 × 16-block SLM yield higher peak and integrated sidelobe ratios than the backpropagated delta function sampled by the same number of SLM blocks. This suggests that if we increased the SLM resolution further, the characteristics the spots formed by these algorithms should converge to those of a backpropagated and continuously sampled delta function (See Appendix A).

To illustrate the convergence rate of our adaptive algorithms, Fig. 3 shows the normalized objective function versus optimization step for a spot formed 5 µm away from the center of the MMF using CPSCA on a 16 × 16-block SLM. Also shown is the lower bound on the objective function found as described in Section 3.2. In Fig. 3, after one pass over the SLM, the objective function is observed to reach a value is close to the lower bound. Given that this lower bound is not necessarily tight, this suggests that the algorithm has closely approached the global minimum. Note that only 224 of the nominally 256 SLM blocks are adapted in each pass, because negligible light energy falls on the remaining 32 blocks.

#### 4.2 Experimental results for spot formation in known locations

Our adaptive algorithms were tested using the experimental setup shown in Fig. 4
. A 1550-nm laser is coupled through a polarization-maintaining single-mode fiber (NA = 0.11), collimated using an *f* = 10.4 mm lens, and directed through a linear polarizer onto a 256 × 256-pixel phase-only SLM. Each pixel is 18 × 18 µm^{2}, with a phase controllable from 0 to 2π with 8-bit resolution, and with a switching speed of 50 ms. The SLM output passes through a first 45%-45% polarization-independent beam splitter and is coupled by an *f* = 5.5 mm lens into a parabolic-index MMF having 50-μm core diameter and an NA of 0.19. The MMF output facet is AR-coated, with a reflectivity <1%. The MMF output is magnified 65 × using an *f* = 4.5 mm aspherical lens and imaged onto a phosphor-coated CCD array. The camera image is monitored by a personal computer (PC) that controls the SLM. The SLM is adapted to form a desired intensity profile using CPSCA, and the resulting SLM pattern can be stored for later use. When a nominally 16 × 16-block SLM is used, the SLM pixels are grouped into blocks, each comprising 16 × 16 pixels. A set of 224 blocks covers a circle enclosing more than 95% of the energy incident on the SLM (See the upper-right corner of Fig. 1), so only these 224 blocks are adapted. When a nominally 8 × 8-block SLM is used, pixels are grouped into blocks of 32 × 32 pixels, and 60 blocks are adapted. Adaptation of a single SLM block requires about 1.2 s, of which about 0.2 s is allocated for the four phase changes, and about 1 s is allocated for the three objective function measurements. Adaptation of 224 blocks requires a total of about 270 s. Some elements of Fig. 4, including a second beam splitter, a power meter, and a test object (shown in the inset), are used for imaging, as described in Section 5 below.

Measured characteristics of the spots formed using the setup of Fig. 4 are shown in Figs. 2(a)-2(e) as red triangles. For both 16 × 16-block and 8 × 8-block SLMs, experimental results are generally in good agreement with simulations. In both experiments and simulations, longitudinal and transverse spot sizes increase and sidelobe ratios decrease as the spot centroid approaches the core-cladding boundary at *x* = 25 μm, and it is difficult to form high-quality spots beyond *x*_{0,des} = 20 µm. Two minor discrepancies are observable as the spot centroid approaches this value. In Fig. 2(b), the experimental transverse spot sizes are smaller than the simulated values, and in Fig. 2(c), the experimental spot centroids lie closer to the desired values than the simulated spot centroids. We comment on these discrepancies in Section 6.

Figures 5(a) -5(d) show simulated and experimental intensity distributions for spots formed at the center of the MMF core and 20 µm away from the center using a 16 × 16-block phase-only SLM. Good agreement between simulated and experimental intensity distributions is observed. Close comparison of Fig. 5(c) and (d) reveals the minor discrepancies mentioned in the previous paragraph. In particular, the simulated spot in Fig. 5(c) appears more elliptical than the experimental spot in Fig. 5(d).

#### 4.3 Simulation results for spot formation in unknown locations

We have simulated the performance of our adaptive algorithms in forming spots at unknown locations. We assume the setup of Fig. 1 with a MMF the same as that described in Section 4.1. We use the objective function Eq. (20) with *n* = 1 and $\kappa =1$. We assume a Gaussian fluorophore distribution $P(x,y)$ with 4-µm FWHM. The centroid of this distribution is placed at the core center, 10 μm away from the core center, and 20 μm away from the core center. The SLM is phase-only with 16 × 16 blocks. Figures 6(a)
-6(c) show simulated intensity distributions. It is seen that our algorithm can efficiently concentrate light at locations not known *a priori*, based only on measurement of the total fluorescence intensity.

Figure 7 shows the normalized objective function versus optimization step for targeted light delivery to a fluorophore centered 10 µm away from the core center, using CPSCA on a 16 × 16-block phase-only SLM. Also shown is the lower bound on the objective function found as described in Section 3.2. In Fig. 7, it is observed that after one pass over the SLM, the objective function reaches a value close to the lower bound. Given that the lower bound is not necessarily tight, this suggests that the algorithm has come very close to the global minimum.

Thus far, we have described how our algorithm can be applied to spot formation at known and unknown locations. In the next section, we describe how the setup of Fig. 4 and spot formation at known locations can be used to realize a single-fiber scanning microscope.

## 5. Application to imaging

The setup of Fig. 4 can, in principle, be used as a single-fiber scanning microscope [22]. A sampling grid is defined over the MMF core region. In a calibration sequence, the SLM is adapted to form a spot centered at a grid point, the optimized SLM pattern is stored, and the adaptation process is repeated for each point in the sampling grid. After calibration, a test object is placed near the MMF output, as shown in the inset of Fig. 4. The sequence of stored SLM patterns is displayed, sampling the test object at a sequence of grid points. When a sampling spot illuminates the test object, a fraction of the power reflected from the object is captured by the MMF, and is directed by a second polarization-independent beam splitter to a power meter. For normalization, a reference object of uniform reflectivity (e.g., a mirror) is sampled. Samples of the test object, normalized by those of the reference object, are used to reconstruct an image. Successful imaging requires that the MMF not move significantly between calibration and image recording, so that the propagation operator **U** does not change significantly.

We have simulated imaging of infinite checkerboards having different square sizes to illustrate the imaging performance of the system shown in Fig. 4. All cases employed a sampling grid of 40 × 40 spots with 1-μm spacing. To generate the sampling spots, we used CPSCA with a 16 × 16-block phase-only SLM, comparing the results to those obtained using backpropagated delta function distributions sampled by an infinite-resolution amplitude-and-phase SLM (See Appendix A). All the other properties of the system are the same as those described in Section 4.2. Simulation results are shown in Figs. 8(a)
-8(f). The images in Figs. 8(a)-(c), obtained using backpropagated delta functions sampled with infinite resolution, represent a theoretical bound on the imaging performance of the system. Since the MMF supports only 45 orthogonal spatial modes at 1550 nm, we would expect to be able to distinguish at most 45 spatially orthogonal features in an image. Interestingly, the number of distinguishable squares reaches a maximum value of about 52 in Fig. 8(b). In Figs. 8(a)-8(c), the sharpness and contrast of the squares decreases as the core-cladding boundary is approached, for two reasons. First, the longitudinal and transverse spot sizes increase from about 4 µm to about 6 µm and 7 µm, respectively, as shown by the solid black lines in Figs. 9(a)
and 9(b), respectively. Second, the peak sidelobe ratio decreases from about 26 to 12, as shown by the solid black line in Fig. 9(d). The images in Figs. 8(d)-8(f), obtained using CPSCA with a 16 × 16-block phase-only SLM, are lower in contrast and noisier than the corresponding images in Figs. 8(a)-8(c), for two reasons. First, the peak sidelobe ratios of the CPSCA-adapted spots are slightly lower, ranging from about 21 to 10 from the center to the edge of the core, as shown by the blue circles in Fig. 2(d). Second, the mainlobe and sidelobe intensities of the CPSCA-adapted spots exhibit random fluctuations from spot to spot, resulting from applying the CPSCA algorithm with different desired intensity profiles to a system described by a single realization of the random propagation operator **U**.

With proper choice of the desired intensity profile, the objective function Eq. (18) and adaptive algorithm presented can be used in applications beyond the scanning microscopy described here. Such applications include spatial multiplexing of optically interrogated sensors, and targeted light delivery for stimulation of neurons.

## 6. Discussion

As mentioned in Section 4.2, minor discrepancies between experiment and simulation are observed when forming spots near the core-cladding boundary of the MMF. Our simulations are performed using modes obtained by exact numerical solution of the wave equation under the assumption of weak guidance, such that the modal fields can be assumed to be purely transverse. It is likely that the discrepancies originate from the inaccuracy of the weak-guidance assumption.

As mentioned in Section 4.2 and confirmed by experimental results in Section 4.3, increasing the number of blocks on the SLM enables us to form spots with better peak and integrated sidelobe ratios. However, it should be noted that increasing the number of blocks will decrease the amplitude of oscillations in the objective function given by Eq. (21) and Eq. (25). In practice, once the amplitude of these oscillations becomes comparable to the noise variance of the camera, one would not be able to effectively optimize the SLM pattern any more. In our experimental setup we had no problem increasing the number of SLM blocks up to 64 × 64.

Operation of our system as a scanning microscope requires that the fiber propagation matrix **U** undergoes a sufficiently small change between the SLM adaptation phase and the image recording phase. This would be facilitated by using a short fiber (or other multimode waveguide) and by enclosing it in a rigid, slender tube to prevent bending. Methods to enhance the stability of the system are a subject of ongoing research.

Operation of our system as a scanning microscope requires adaptation of the SLM to form spots at each point in the sampling grid, which requires a prohibitive amount of time at present. If possible, it would be desirable to adapt the SLM to form spots at a smaller number of points, and to compute the SLM patterns required to form spots at the remaining points in the sampling grid. Solving this problem might require partial or full knowledge of the fiber propagation matrix **U**, and is a subject of ongoing research.

## 7. Conclusion

We demonstrated optimal control of the field input to an MMF, using an SLM, in order to achieve a desired intensity profile at the MMF output. We described how to define an objective function when the desired intensity profile is known or unknown *a priori*, and developed adaptation algorithms for both phase-only and amplitude-and-phase SLMs. The proposed algorithm brings the objective function close to the global minimum after a single pass over the SLM. We also described how this method can be used to realize a scanning microscope, and simulated its imaging capabilities.

## Appendix A

We are interested in finding bounds on the performance of the system in Fig. 1 for spot formation in known locations. Different intensity distributions may be appropriate for different applications. We were interested in using the setup of Fig. 1 to make a single-fiber scanning microscope. For this application, the desired output intensity distribution is a sampling function that is spatially localized and smooth and has low sidelobes and hence, the super-Gaussian family of functions Eq. (38) are a suitable for this application.

The desired output intensity distribution Eq. (38) is non-negative, so it corresponds to a desired output field distribution given by

*i*

^{th}element of the output field state vector ${E}_{\text{coupled,out}}^{\delta}$ is given by the overlap integral between the desired delta function field and the electric field of the

*i*

^{th}propagating mode of the fiber

We can now choose an SLM block size and sample the electric field on the SLM plane to find the reflectances of the SLM blocks. For a phase-only SLM, we take ${\upsilon}_{k}$ to be the average phase of ${E}_{\text{SLM,out}}^{\delta}(x,y)$over the *k*^{th} SLM block. For an amplitude-and-phase SLM, we take ${\upsilon}_{k}$ to be the average complex amplitude of ${E}_{\text{SLM,out}}^{\delta}(x,y)$ over the *k*^{th} SLM block, and we normalize all the SLM reflectances to ensure that $\left|\upsilon \right|\le 1$. Having determined the SLM block reflectances, we can now forward-propagate the field at the SLM plane to find the actual intensity distribution at the output end of the MMF.

To characterize the spots formed at different positions on the MMF core using backpropagation, we have simulated the system of Fig. 1. All the parameters of the system and simulation methods are the same as those described in 4.1. We have simulated phase-only, and amplitude-and-phase SLMs with 16 × 16, 32 × 32 and 64 × 64 blocks. For each SLM, we have placed the delta function source at a location $({x}_{0,\text{des}},0)$ over the MMF output plane and varied ${x}_{0,\text{des}}$ from 0 to 21 µm. We have backpropagated each of the electric fields using the described method, sampled it at the SLM plane and forward propagated the sampled field to find the actual intensity distribution at the MMF output. We have then measured the five characteristics of the spots that are formed at different locations with different SLMs. The results are given in Figs. 9(a)-9(e).

In each part of Figs. 9(a)-9(e), the solid black curve shows the characteristics of a spot formed by backpropagating a delta function field distribution and continuously sampling its amplitude and phase on the SLM plane and forward propagating it again. This spot has minimum MSE from the desired delta function, and can only be formed using an amplitude-and-phase SLM with infinite resolution. It should be noted that by manipulating the elements of ${E}_{\text{coupled,out}}^{\delta}$, certain properties of the spots can be made to exceed the black curves. For example, by applying a Gaussian window to the elements of ${E}_{\text{coupled,out}}^{\delta}$, the integrated sidelobe ratio can be increased, but at the expense of increased spot sizes.

It is evident in Figs. 9(a)-9(e) that the spot sizes and positions formed are almost independent of the SLM resolution and type. For a given SLM resolution, however, an amplitude-and-phase SLM yields higher peak and integrated sidelobe ratios than a phase-only SLM. Also, for each SLM type, increasing the resolution increases the peak and integrated sidelobe ratios. The curves in Figs. 9(a)-9(e) are a basis for evaluating the performance of our adaptive optimization algorithm, which is described in Section 3.1.

## Acknowledgments

The authors acknowledge helpful discussions with K. J. Boucher, C. Jan and O. Solgaard. This research was supported by National Science Foundation Grant Number ECCS-1101905, Corning, Inc., and a Stanford Graduate Fellowship.

## References and links

**1. **H. J. Shin, M. C. Pierce, D. Lee, H. Ra, O. Solgaard, and R. Richards-Kortum, “Fiber-optic confocal microscope using a MEMS scanner and miniature objective lens,” Opt. Express **15**(15), 9113–9122 (2007). [CrossRef] [PubMed]

**2. **P. M. Lane, A. L. P. Dlugan, R. Richards-Kortum, and C. E. Macaulay, “Fiber-optic confocal microscopy using a spatial light modulator,” Opt. Lett. **25**(24), 1780–1782 (2000). [CrossRef] [PubMed]

**3. **K. M. Tan, M. Mazilu, T. H. Chow, W. M. Lee, K. Taguichi, B. K. Ng, W. Sibbett, C. S. Herrington, C. T. A. Brown, and K. Dholakia, “In-fiber common-path optical coherence tomography using a conical-tip fiber,” Opt. Express **17**(4), 2375–2384 (2009). [CrossRef] [PubMed]

**4. **N. Sim, D. Bessarab, C. M. Jones, and L. Krivitsky, “Method of targeted delivery of laser beam to isolated retinal rods by fiber optics,” Biomed. Opt. Express **2**(11), 2926–2933 (2011). [CrossRef] [PubMed]

**5. **M. Dienerowitz, M. Mazilu, and K. Dholakia, “Optical manipulation of nanoparticles: a review,” J. Nanophotonics **2**, 1–32 (2008).

**6. **T. Čižmár, M. Mazilu, and K. Dholakia, “In situ wavefront correction and its application to micromanipulation,” Nat. Photonics **4**(6), 388–394 (2010). [CrossRef]

**7. **G. Shambat, J. Provine, K. Riviore, T. Sarmiento, J. Harris, and J. Vučković, “Optical fiber tips functionalized with semiconductor photonic crystal cavities,” Appl. Phys. Lett. **99**(19), 191102 (2011). [CrossRef]

**8. **S. M. Popoff, G. Lerosey, R. Carminati, M. Fink, A. C. Boccara, and S. Gigan, “Measuring the transmission matrix in optics: an approach to the study and control of light propagation in disordered media,” Phys. Rev. Lett. **104**(10), 100601 (2010). [CrossRef] [PubMed]

**9. **T. Čižmár and K. Dholakia, “Shaping the light transmission through a multimode optical fibre: complex transformation analysis and applications in biophotonics,” Opt. Express **19**(20), 18871–18884 (2011). [CrossRef] [PubMed]

**10. **M. Mazilu, J. Baumgartl, S. Kosmeier, and K. Dholakia, “Optical eigenmodes; exploiting the quadratic nature of the energy flux and of scattering interactions,” Opt. Express **19**(2), 933–945 (2011). [CrossRef] [PubMed]

**11. **R. Di Leonardo and S. Bianchi, “Hologram transmission through multi-mode optical fibers,” Opt. Express **19**(1), 247–254 (2011). [CrossRef] [PubMed]

**12. **I. M. Vellekoop and A. P. Mosk, “Phase control algorithms for focusing light through turbid media,” Opt. Commun. **281**(11), 3071–3080 (2008). [CrossRef]

**13. **I. M. Vellekoop and A. P. Mosk, “Focusing coherent light through opaque strongly scattering media,” Opt. Lett. **32**(16), 2309–2311 (2007). [CrossRef] [PubMed]

**14. **I. M. Vellekoop and A. P. Mosk, “Universal optimal transmission of light through disordered materials,” Phys. Rev. Lett. **101**(12), 120601 (2008). [CrossRef] [PubMed]

**15. **O. Katz, E. Small, Y. Bomberg, and Y. Silberberg, “Focusing and compression of ultrashort pulses through scattering media,” Nat. Photonics **5**(6), 372–377 (2011). [CrossRef]

**16. **G. P. Agrawal, *Fiber-Optic Communication Systems* (Wiley, New York, 2002).

**17. **S. P. Boyd and L. Vandenberghe, *Convex Optimization* (Cambridge University Press, New York, 2004).

**18. **B. D. Mangum, C. Mu, and J. M. Gerton, “Resolving single fluorophores within dense ensembles: contrast limits of tip-enhanced fluorescence microscopy,” Opt. Express **16**(9), 6183–6193 (2008). [CrossRef] [PubMed]

**19. **R. A. Panicker and J. M. Kahn, “Algorithms for compensation of multimode fiber dispersion using adaptive optics,” J. Lightwave Technol. **27**(24), 5790–5799 (2009). [CrossRef]

**20. **A. d'Aspremont and S. P. Boyd, “Relaxations and randomized methods for nonconvex QCQPs,” http://www.stanford.edu/class/ee364b/lectures/relaxations.pdf.

**21. **B. K. Garside, T. K. Lim, and J. P. Marton, “Propagation characteristics of parabolic-index fiber modes: linearly polarized approximation,” J. Opt. Soc. Am. **70**(4), 395–400 (1980). [CrossRef]

**22. **K. J. Boucher, C. Jan, J. M. Kahn, J. P. Wilde, and O. Solgaard, “Spot formation and scanning microscopy via multimode fibers,” in *2011 IEEE Photonics Conference (PHO)* (IEEE, 2011), pp. 713–714.