Tunable lenses: dynamic characterization and fine-tuned control for high-speed applications

Tunable lenses are becoming ubiquitous, in applications including microscopy, optical coherence tomography, computer vision, quality control, and presbyopic corrections. Many applications require an accurate control of the optical power of the lens in response to a time-dependent input waveform. We present a fast focimeter (3.8 KHz) to characterize the dynamic response of tunable lenses, which was demonstrated on different lens models. We found that the temporal response is repetitive and linear, which allowed the development of a robust compensation strategy based on the optimization of the input wave, using a linear time-invariant model. To our knowledge, this work presents the first procedure for a direct characterization of the transient response of tunable lenses and for compensation of their temporal distortions, and broadens the potential of tunable lenses also in high-speed applications. © 2019 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

ability to focus at both near and far distances [19]), and temporal-multiplexing based visual simulators are clinically viable tools that allow patients experience multifocality prior to implanting multifocal intraocular lenses.
Tunable lenses are based on different technologies, most of them using fluids in combination with elastic membranes: elastomeric membrane [1], mechanical actuators [20] or oscillators [4], electrowetting [21,22], dielectrophoresis [23], microfluidics in combination with stimulus-responsive hydrogels [24] or pneumatic pumps [25,26]. As any optomechanical system, tunable lenses inevitably have limitations in their temporal response. The output optical power of the lens does not perfectly follow the electrical input signal used to command it. When asked to change its power, the lens needs a certain amount of time to provide a stable optical power. During this period of time (settling time), which can vary between fractions of milliseconds and minutes, the output signal of the lens passes through a series of transient states including overshoots, undershoots and/or oscillations. The response of the lens during this time interval is defined as its transient response and is determined by the operation principle and design parameters of the tunable lens. The transient response describes dynamic artifacts, present in all tunable lenses to a greater or lesser extent, which impose the ultimate speed limitation in existing high-speed applications or in new developments to come.
There are well-known strategies to model and control linear time-invariant systems [27] minimizing the distortions introduced by their transient response. These strategies assume repeatability and linearity. However, to our knowledge, the dynamic properties of tunable lenses are for the most part unknown, as their transient response has never been directly characterized, nor indirectly measured with sufficient accuracy to provide precise estimations or predictions.
The new applications of tunable lenses requiring fast dynamic measurements of optical power impose new requirements for measurement instrumentation, far beyond the existing techniques. The static power of a lens can be measured by changing optical interdistances, between the lens and an object [25,26,28], an imaging screen or a camera [29,30]; or, as most ophthalmic lens meters do, by measuring the change in the interdistances of a collimator [31]. Aberrometers as Laser Ray Tracing [32] or Hartmann-Shack [33] are another option that provide not only optical power measurements, but also detailed information about the optical quality of the lens. Unfortunately, Laser Ray Tracing is not sufficiently fast to measure the dynamic response of many tunable lenses, which can change their power in fractions of milliseconds, and Hartmann-Shack has limited dynamic range for defocus. Dorronsoro et al. [16] used a laser scanning circular trajectory to demonstrate and evaluate the stability of two or three foci in a dynamic regime, although this method has some limitations due to mechanically moving parts. A faster method, although indirect, involves sensing the luminous intensity at the center of a laser beam [21,9] with a small photodiode or with an optical fiber. A more direct approach to test the dynamic performance involves imaging objects through the tunable lens with a high-speed camera [34], although measuring the focal length poses challenges. As the current techniques cannot provide an accurate dynamic characterization of tunable lenses, the compensation of dynamic effects of tunable lenses has not been demonstrated to date. New dynamic characterization techniques, able to guide the compensation of dynamic effects, will boost the performance of tunable lenses in current applications, and open paths for new applications.
In this paper, we present and validate a linear time-invariant model of optical power, for compensating the dynamic effects of tunable lenses. As the model requires a precise characterization of dynamic effects, we developed a novel fast focimeter that can measure optical power at high temporal sampling rates. The system uses a high-speed camera and a prism, providing direct and robust measurements of optical power, and it is insensitive to misalignments and decentrations (even those produced by the lens under test). It was calibrated in static measurements and validated in repeated dynamic characterizations of different tunable lenses in the time and in the frequency domains. The model also requires a predictable dynamic response of the tunable lens, in order to provide reliable estimations of its temporal response. The focal length measurements performed with the focimeter showed that the lenses are repetitive and linear (and also the focimeter itself). Finally, using the model, we demonstrated the compensation of dynamic effects, both theoretically and experimentally. These experiments require a new level of precision in the control of the tunable lens, which we achieved through the development of a custom electronic driver for fine-tuned control of the lens at high speed. The focimeter developed was used to quantify an important improvement in the performance of the tunable lenses after the compensation of their dynamic effects. Finally, we used the instrument to validate the predictions of the model, demonstrating the feasibility of simple open-loop compensation strategies to minimize the effect of the transient response.
The focimeter was also used (see Appendix) to characterize other active optical elements (a deformable mirror and a spatial light modulator).

Modeling temporal dynamics
The transient response of tunable lenses introduces distortions in the temporal response of the lens with respect to the intended input signal driving the lens. As generally encountered in electrical and mechanical engineering systems, we propose a description of the system inertia, load dump, and resonant frequency of the tunable lens in terms of the temporal step response function [27]. The temporal step response function characterizes the dynamic performance of the tunable lens, and can anticipate its suitability for different applications. Moreover, the temporal step response function can ultimately predict the output of the lens to any input, and therefore guide the compensation strategies to mitigate the transient effects or to evaluate tradeoffs between lens speed and control. Assuming that the system is linear (as discussed in section 3.2), the temporal response s(t) can be expressed as the convolution of any given input signal, u(t), and the impulse response function, h(t), as follows: The impulse response function of the tunable lens was calculated as the time derivative of the average temporal step response function measured with the focimeter (Sections 2.4 and 2.6) when the electric input signal is an ideal step function. To avoid noise amplification in the differentiation operation, an analytical expression of s(t) may be obtained by fitting the measured response with a damped harmonic oscillator model. Once the impulse response is estimated, the true response of the tunable lens can be predicted for any input wave (assuming a linear time-invariant system). This prediction capability will enable (Section 2.7) compensation strategies for dynamic effects, based on the fine tuning of the predicted optical power output by optimization of the input electrical signal.

High-speed tunable lens driver
We developed a custom high-speed driver for the tunable lenses (including hardware and firmware, and a new data frame for the input wave), in order to achieve the temporal accuracy required to compensate for the dynamic effects. The hardware comprises an Arduino Nano 3 (Arduino, Italy) and a DRV8833 Dual Motor Driver (Texas Instruments, TX). The signal driving the tunable lens is based on pulse width modulation (PWM at 32 KHz) and typically provides a temporal sampling of 0.1 ms along a periodic signal of 20 ms, although other configurations are also possible. The high-speed driver is compatible with the tunable lenses used in this study (see Section 2.6) and has the capability to read the temperature sensor included in some of them.

Operation of the high-speed focimeter
When an object, for example a slit, is imaged through a tunable lens, the position of the image changes along the optical axis as the lens changes its optical power. This study proposes the use of a prism to transform the axial displacements of the image (slit) into lateral displacements. A fixed camera can then measure the focal length (optical power) of the tunable lens in just one frame, by capturing the lateral displacement produced on the image of the slit. Figure 1 illustrates the principle, reminiscent of the prism-based focusing screens of manual-focus cameras. As the optical axis is deviated by the prism, each optical power of the tunable lens produces a lateral displacement of the image (slit) depending on its axial position. Snell's law predicts the deviation of the principal ray as follows: (2) where θ is the deviation angle in radians, n is the refractive index of the prism material, and α is the prism angle (in radians). Under small angle approximation, Eq. (2) can be simplified as follows: Equation (3) shows that the higher the refractive index, n, of the prism and the angle, α, the higher is deviation angle. The lateral image displacement d is obtained as r·sin (θ), being r the distance between the prism and the real or virtual image of the slit, that changes with the optical power. For small angles, d is proportional to r (and to the changes in the optical power): In the high-speed focimeter presented here, a fast camera (with high frame rate) is used to record the transient displacement of the slit's image as the power of the tunable lens changes. As shown in Fig. 1, the prism only covers half of an intermediate image plane. The other half is used to obtain a reference, preventing the measurements to be affected by vibrations, decentrations and misalignments.

Optical set-up
OpticStudio (Zemax LLC, WA, USA) was used to simulate the arrangement of the optical elements and to optimize the parameters (focal lengths, prismatic powers, optical interdistances and diaphragm diameters) that provide the best balance between displacement of the slit with optical power change and slit widening due to defocus. Figure 2 shows a diagram of the experimental set-up, to scale, with (b) and without (a) the prism. An incoherent source of polychromatic light illuminates a diffuser in front of a tilted slit (25 μm wide; 3 mm long). A 4f projection system (lenses L1 and L2, f = 50 mm) creates a pupil plane in which the electrically tunable lens (TL) under evaluation is placed. A second 4f system (lenses L3 and L4, f = 50 mm) creates a second pupil plane optically conjugated to the tunable lens. Trial lenses (TrL; positive and negative thin lenses from an optometry trial lens set) are placed in this second pupil plane for calibration/validation purposes, allowing for inducing known magnitudes of optical power in the optical system. A prism (P; see details in Fig. 1(a) and in section 2.3) is placed at the focal plane of L2, covering one half of the intermediate image (S') of the slit. The base of the prism is orthogonal to the optical axis of the instrument. Due to the prism, the image of the slit appears split in the high-speed camera (IL5S; Fastec Imaging, USA), provided with a macro objective (MO; 100mm f/3.5; Cosina). The light passing through the prism forms a displaced image (DI), and the rest provides a reference image (RI). Figure 3 shows examples of the displaced out-of-focus slit images in comparison with reference in-focus slit images. For each frame, the left side of the slit provides a reference, and the right side is displaced upwards. The vertical distance between the displaced and reference images is directly proportional to the optical power of the tunable lens. The lateral displacement of the slit is calibrated with the help of trial lenses.
For dynamic characterization, the camera is configured at a speed of 3823 frames per second (with 320 × 256 pixels per frame). The position of the slit can be estimated every 0.26 ms with an initial spatial resolution of 5 μm per pixel, which is improved later with a superresolution algorithm (described in Section 2.5). By tracking the distance between the reference and displaced slit images, the instrument characterizes the transient response of the lens.

Image processing
The slit is intentionally tilted to reduce the effect of spatial sampling (aliasing) due to image pixelation and to simplify an automatic superresolution algorithm. After measuring the slit angle with a Radon transform, the region of the image containing the slit is cropped, bilinearly interpolated, and rotated (to compensate the tilt). The different luminance profiles along the slit (sampled by the pixels with different shifts due to the original tilt), are then averaged. This procedure provides a simple and robust estimation of the luminance profile of the image of the slit (combining the data of more than 100 rows of the image, each row providing an independent 'observation' of the slit position), with subpixel resolution (8x). The peak positions in the super-resolved luminance profiles (corresponding to the displaced image and the reference image) provide an accurate measurement of the displacement, which in turn provide an independent observation of the transient optical power of the lens at a given time point. The procedure is repeated for the stack of images corresponding to the successive frames (during which time the tunable lens changes its shape), tracking in this manner the temporal response of the tunable lens that generates the addressed input signal. The measurement and the processing are automatic, providing a unique combination of simplicity, temporal discrimination, speed, robustness and accuracy that surpasses other instruments able to measure dynamic optical power.
The temporal step response function of each tunable lens was obtained by measuring the response to a square electric input wave with periodic temporal steps (rise time < 30 μs), upwards and downwards. For a reference quantitative description of the temporal response function and settling time, we used 3 D amplitude waves with a 100-ms period. A series of 9 cycles of the temporal response from the same lens were superimposed to evaluate the repeatability of the response of the lens, as well as the precision of the instrument. The linearity of the lenses was assessed by measuring other wave amplitudes (different step heights): 1, 1.5, 2, 2.5 and 3 D; and normalizing the response between 0 and 1. Further, we measured the frequency response of the lens by driving it at a fixed step size and variable frequency (10, 50, 100, 250 and 500 Hz).

Model validation and compensation of transient response
The validation of the high-speed optical power measurements obtained with the focimeter is not straightforward, as a gold standard is lacking. To assess the accuracy of the measured transient optical power response, we used the model described in section 2.1. The predicted transient response of the lens to an electric input wave including positive and negative steps (of 1 D), was compared to the corresponding transient response measured with the focimeter. The procedure not only validates the measurements, but also the model used to obtain the predictions.
This validation enabled strategies to compensate for the transient response of the tunable lenses. As a first demonstration of the capability to manipulate the temporal response of the lens, a simple compound waveform was generated by inserting to the transitions of a square wave a short and small correction step (2 ms, 0.2 D), reducing the overshooting in the measurements.
The final strategy to compensate the transient response was based on automatically generating input waves of higher complexity, using an optimization algorithm (implementing the linear model described in 2.1) to minimize the deviations in the predicted response of the lens [35]. In particular, we minimized the root mean square error between the theoretically estimated response and the target curve, with constrains: the maximum and minimum optical power available, the temporal resolution of the device (Section 2.2) and the sampling of the optical power dynamic range. By definition, the compensated waveform produces a temporal response close to the target curve when the transient response is taken into account, both in predictions and experiments.
This approach can be applied to any target curve and in this study it was demonstrated with a 50-Hz waveform including successive positive and negative increments of 1D.

Computer optical simulations
The amount of light that reaches the high-speed camera determines the performance of the instrument and its design. Computer ray tracing simulations predict an increase in image displacement with higher prismatic powers, and therefore an increase in measurement sensitivity, at the expense of a reduction in the amount of light reaching the camera. On the other hand, defocus, inherent to the changes in the measured optical power produces a widening in the slit image and reduces the measurement precision. A reduction of the effect of the defocus can be achieved by reducing the diameter of the camera objective (that increases the depth of focus), at the cost of additional reduction in light. With a focal length of F = 50 mm for the projection lenses L1 to L4, a good compromise is achieved with a prism of 10 deg (5.71 Δ), a camera objective with focal length 100 mm and a 5-mm pupil diameter. The computer simulations predict a displacement of 18.1 pixels per diopter with a widening of 3.3 pixels per diopter, while allowing 0.6% of the light to reach the detector. Opening the pupil diameter of the camera objective to 12.5 mm increases the light to 3% without affecting the displacement, but it increases the widening to 8 pixels per diopter. Figure 3 illustrates the displacement of the slit image in the experimental set-up when trial lenses of different powers are placed in the plane indicated by TrL in Fig. 2. To compensate for the light loss predicted by the simulations, a 25 μm wide slit (magnified to 40 μm in the plane of the camera) was used, directly illuminated with a high power white LED source. The left side of the slit image corresponds to the light that does not propagate through the prism, and this portion of the image is used as a reference since it is unaffected by changes in optical power. The right side of each image is imaged through the prism, and the slit image suffers a vertical displacement that is directly proportional to the optical power, as shown later in this section.

Experimental validation and calibration
The automatic 8x super-resolution algorithm detected slit tilts between 0.5 and 5 deg, and by digitally inverting the rotation was able to overcome the limit imposed by the sampling resolution of the camera, even when 2 × 2 binning was used. The ultimate limit to the estimation of the slit position was imposed by the optical quality of the image (mainly defocus) and, to a lower degree, to the irregularities in the slit and the illumination, and was estimated to be 0.5 pixels (0.8 pixels with a defocus of 3 D). The instrument translates the different optical powers (induced by the trial lenses in this case) into lateral displacements of the image of the slit. Panels b) and c) show some widening in the slit image due to defocus. That widening (under 3 pixels per D in the measurements) affects the estimation of the peak position (<1 pixel as described before), but it is relatively lower than the displacement (16 pixels per D in the measurements), allowing accurate measurements (high displacement-to-widening ratio, i.e. high signal-to-noise).
The complete static calibration (with trial lenses) of the instrument showed a highly linear relationship (R 2 > 0.99) between optical power and image displacement. The static calibration with tunable lenses showed a linear relationship between steady voltage and optical power (R 2 > 0.99 in all the tested tunable lenses), from which a calibration equation (optical power versus input voltage) was obtained for each lens unit and model.

High speed focimetry
Visualization 1 shows an example of high-speed focimetry of a tunable lens (30C#1), placed in the plane TL of Fig. 2. The camera captures the shift of the slit image in slow motion (the video is 153 times slower than the real event). An ideal (abrupt) square wave is used as input (0 to 3 D with a rise time < 30μs), but the nonzero settling time results in a smooth transition between optical powers. For visualization purposes, the contrast was raised in the displayed video frames, but saturation was avoided during the real measurements. The transient responses were obtained from the position of the slit image as a function of time, as shown in the examples of Fig. 4, for different models and units of tunable lenses. Table 1 shows some key parameters obtained from the measurements. In Fig. 4(a), corresponding to lens 30C#2, deviations from the ideal response are restricted to the region around the transition between the two states (high power and low power). The focimeter is sufficiently fast to track the transient optical powers between states and describes a smooth transition. The maximum speed of the tunable lens is 1.27 D/ms. This tunable lens converges to the desired optical power 6.80 ms after the beginning of the transition following an overshoot (11.47% of the step height), and damped oscillation. The lens is free of dynamic artifacts (in one of the two stable positions) 86.40% of the time (for a duty cycle of 100ms). A detail of the transient response of the same lens is shown in Figs. 4(b) and 4(c) (without and with super-resolution algorithm, respectively). Super-resolution (based on Radon transform) softens the transient response curve and removes quantization artifacts due to image pixelation. Figure 4(d) shows the superposition of 9 different cycles (each one shown in a different color) for a different unit (30C#3), and 20-ms cycles. For each temporal sampling position, the figure represents 9 points. The high degree of superposition (RMS 0.05 D) demonstrates the high repeatability in the measurement of the transient response of the lens (as already evidenced in Fig. 4(a)), as well as a high precision of the proposed instrument. Figure  4(e) shows lenses with a less stable plateau (noise and oscillations) and illustrates the capability to detect differences across units (30TC#1 and 30TC#2; see figure caption for details). A large aperture lens is shown in Fig. 4 (40TC#1). This model is not intended for high-speed applications and shows strong distortions with oscillations, and a settling time over 50 ms, with a low average speed of 0.04 D/ms.   Figure 5(b) shows the normalized transient responses (mean RMS difference 0.055 D) and illustrates that all the curves in Fig. 5(a) are approximately directly proportional to the step height. This validates the hypothesis that the transient response of the tunable lens under consideration is linear. This assumption makes the process of correcting the input signal to achieve the desired output simple. Figure 5(c) shows the corresponding impulse response (Section 2.1).   (Fig. 6(b)) close to two Dirac delta functions, as the tunable lens is in a stable state most of the time and the relevance of the transient response is minor. At 50 Hz, a significant percentage of the energy is spread across optical powers beyond the 0-3 D range, and the energy at the peaks decreases. Beyond 100 Hz, the peaks at nominal powers are lost, either due to overshooting, or due to a lack of compliance of the tunable lens to the frequency of the input signal.

Compensation of transient response
The results shown in Figs. 4(d), 5(b) and 6(a) demonstrate high repeatability, linearity and predictability in the behavior of the tunable lenses (RMS < 0.05 D), confirming the possibility of using linear-system design strategies to compensate for transient response and to improve the expected performance of the lens by manipulating the input wave.
As a proof-of-concept, Fig. 7(a) shows a modified input wave with softened transitions aiming at modulating the lens response and to reduce the overshooting. Figure 7(b) compares the outputs measured in the focimeter for a tunable lens (30C#4), with a square input wave (in black) and with the modified softened input wave (in orange). This simple example shows that the transient response can be locally adjusted, and could be fine-tuned by applying a stepby-step correction of the electric signal to improve lens compliance. As the distortions introduced by transient response are known to be systematic, we can predict them using the linear model described in Section 2.1. Once the behavior of the tunable lens is predicted, we can use inverse problem modeling approaches to optimize the input signal to generate a desired response in a design step. Figure 8(a) shows results for another input wave, in which 3 different focusing states (1 D, 2 D and 3 D) are sequentially scanned at high speed (50 Hz). This scenario mimics, for example, an artificial vision system or a camera focused at 0.5 m, but periodically seeing or recording objects at 1 m and at 0.33 m. The nominal input signal, shown in blue, is severely degraded by the transient response effects of the tunable lens. The gray curve shows the predicted transient response, using the data in Fig. 5(c) in the linear invariant model (h(t) in Eq. (1)). The difference between the predicted transient response and the nominal wave is higher than 0.05 D (the reported RMS due to repeatability) 50% of the time, with a RMS difference of 0.34 D. The transient response of the corresponding lens (30C#4) was experimentally measured (black curve in Fig. 8(a)). The high degree of superposition between the measured response (black) and the predicted response (gray) in Fig. 8(a) (less than 0.05 D RMS difference) validates the model, and the inherent assumption of linearity of the tunable lens transient response with optical power. The small discrepancy is compatible with the repeatability of the lens and the measurements in the focimeter (see Figs. 4(d) and 5(b)). Due to the considerable distortions in the transient response with respect to the nominal wave ( Fig.  8(a)) the tunable lens without compensation of transient response could not be used in this application as it would be unable to image all the objects in focus. Fig. 7. a) Modified square input wave with a transient correction step (2 ms, 0.2 D), to generate an improved square step response. b) The corresponding measured temporal response (tunable lens 30C#4) showed a reduced overshoot (orange curve) in comparison with the measured step response to a square input wave (black curve). Figure 8(b) shows the optimal compensated input wave (orange) that minimizes the distortions in the temporal response. This compensated input wave results from an iterative optimization (Section 2.7) using the linear model (Section 2.1) and shows two main features: an abrupt pulse right before each step transition, to produce the maximum acceleration of the lens, and a progressive slow down following each transition. These features are not forced by a particular compensation strategy. They appear in the minimization and result to be approximately symmetrical in upwards and downwards steps.  The procedure summarized in Fig. 8 validates the focimeter, justifies the description of the transient response of the lens in terms of step response and impulse response, and supports the hypothesis of considering the tunable lens a linear time-invariant system in the model, and the strategy to compensate the transient response. Figure 8 also shows that although it is not possible to break the fundamental limit set by the maximum speed of the tunable lens, it is possible to improve the transient response of the lens, reducing the settling time and the overshooting, by adjusting the input signal taking into account the transfer function of the lens measured with the developed focimeter.

Discussion
We have presented a new approach to measure and compensate the dynamic behavior of fast tunable lenses. The potential of tunable lenses is remarkable in the fields of machine vision and inspection, microscopy and ophthalmology, and in applications requiring fast and automatic focusing. The proposed new fast focimeter device relies on simple optics (a prism and a slit) in combination with a high-speed acquisition camera. The method has proved to be robust and has demonstrated direct measurements of optical power with high temporal sampling.
Configuration. The optical configuration was optimized to maximize measurement precision (<0.05 D), following a trade-off between image widening due to defocus of the slit, image displacement due to the beam deflection by the prism, and amount of light (i.e. measurement signal in the detector). The optics was tailored to ease image processing. The tilted slit enables a fast and automatic super-resolution algorithm that overcomes the limitation imposed by pixelation (and binning) and improves the estimation of the slit position (resolution in optical power). The sampling rate of the camera, 3823 fps, was sufficient to measure the fastest lens at maximum speed (1.27 D/ms).
Measurements. The new focimeter was able to provide, besides static calibrations, dynamic measurements at 3.8 kHz. It has proven to be versatile with the ability to measure at high speed, a range of active transmissive and reflective (Appendix) optical elements that are known to be subject to transient response [10,18]. The availability of a reference image during the measurements, inherent to the approach, contributes to the precision of the instrument (0.05 D), making it robust against tunable lens positioning. The additional pupil plane allows a channel for calibration. The technique captures subtle differences in the dynamic behavior, both across lens models and across units of the same model, suggesting that the approach could be used for quality control. The instrument could be used to measure tunable lenses with different principles of operation. Among others, it can also detect timedependent abnormalities in the tunable lens and in the driving electronics with a temporal resolution of 0.2 ms.
Predictability and compensation of transient response. The response of the lenses under study was shown to be systematic and linear: they have similar normalized response for different step heights, i.e. the same transient response (although scaled) with different amplitudes. This linearity enables precise predictions of the output of the lens, for any input, with simple linear models, and further design compensation strategies to dump the overshoots. We have shown the strong potential of the instrument in combination with a linear model of the temporal response of tunable lenses. The impulse responses of the tunable lenses were obtained from measurements of the temporal step response function with the focimeter. The focimeter was also used to experimentally measure the output response, that was successfully compared with the predictions of the model. A numerical optimization [35] demonstrated that the compensation of transient response is possible, and experimental measurements proved that applying this compensation represents a significant improvement in the performance of tunable lenses working at high speed.
The capability to detect differences across lens models and across units of the same model (Table 1) enables compensation strategies at an individual level, that would require to measure the transient response of each individual lens.
Tunable lenses are prone to power drifts with temperature changes that can be external (environmental), but also internal, owing to different energy dissipations at different dynamic regimes. These power drifts introduce additional dynamic variability, reducing long-term repeatability, that could be compensated with more sophisticated models incorporating temperature measurements (already available in commercial lenses with temperature sensors). A focimeter like the one presented can be envisioned as part of a compensation arm of an optical instrument using tunable lenses to provide real time testing and closed loop compensation of transient response. On the other hand, focimeters are also instrumental in the evaluation of presbyopic corrections mapped by temporal multiplexing in simultaneous vision simulators [16]. The quality of a simulation will rely on an accurate representation of the multifocal optics.
Advantage over the state-of-the-art. There are other methods to evaluate tunable lenses that can work at high speed. In methods relying on focused energy, (normally at the peak or at the center of the point spread function), the measurements are affected by optical quality: through-focus energy changes due to aberrations and diffraction spread of energy that typically overestimate the transient response. Methods relying on light pencils, as deflectometry or phase detection are quite independent of the image quality, but are sensitive to lens geometry and position, and therefore not suitable with active optical elements such as tunable lenses. Hartmann-Shack aberrometry does not rely on energy and is robust against lens position, and can work in combination with a high speed camera. In comparison with Hartmann-Shack, the focimeter presented in this study has larger dynamic range, is simpler, and the processing is straightforward.
While optical quality has not been explored as an outcome, it could also be estimated with the focimeter. If the slit is sufficiently narrow, the energy profile provides the Line Spread Function of the system (LSF), following background subtraction and normalization. The LSF is a fundamental optical image quality descriptor, that provides common metrics like the Strehl ratio (the value of the LSF peak) and the modulation transfer function (by Fourier Transform). As defocus blur and motion blur degrade the slit image quality, the estimation of optical quality is only valid for the static optical power of the lens that brings the slit to focus. The measurement of optical quality is obtained at no cost, and provides additional evaluation capabilities.
Applications. Tunable lenses are becoming ubiquitous in optical instruments (artificial vision, 3D displays, microscopy, OCT [5], visual simulation [16]) and are often used to scan a range of through focus positions at high speed. As they are prone to suffer from dynamic artifacts, commercial tunable lenses can exhibit inaccurate responses (slowed down hardware or electronic driver) designed to avoid overshooting and oscillations, at the expense of slower responses. The high speed focimeters like the one presented here, will stimulate designing strategies for tunable lens manufactures and for application developers, compensating the transient response associated with the operation of tunable lenses at high speed. Within the limits of repeatability and linearity, the tunable lens (based on any working principle, or any other variable focus active optical element) can be pushed to the limits of its potential, after characterization and optimization of the driving electrical signal.

Conclusion
The combination of the linear time-invariant model and the fast focimeter presented in this study enables the first procedure, to our knowledge, for direct characterization of the transient response of tunable lenses and for compensation of the temporal distortions introduced. This allows an accurate control of the operation of tunable lenses working at high speed.

Appendix: Deformable mirror and spatial light modulator
Besides tunable lenses, other technologies that can produce a rapid change in focus are deformable mirrors, where piezo-actuators deform a reflective membrane normally in a closed-loop operation with inputs from a wavefront sensor, and liquid crystal spatial light modulators, where about 1 million or more pixels arranged in a 2-dimensional array can independently change their phase in response to an input electrical or optical signal.
In this study, we also measured with the focimeter the transient response of a deformable mirror with 52 actuators (mirao 52-e, Imagine Eyes, France) and a reflective phase-only liquid crystal spatial light modulator (PLUTO-VIS; Holoeye Photonics AG, Germany). The design of the focimeter was modified due to their reflective nature. After calibration of the focimeter in its initial configuration (Fig. 2), the slit (S) and the measuring arm (Prism (P), Macro Objective (MO) and High Speed Camera (HSC)) were moved to an adaptive optics system [36], where they were coupled to the existing projecting elements creating an intermediate slit image (S'). We measured temporal waves with steps of 2 D, also in cycles of 100 ms. To account for potential chromatic effects, both active elements were measured in green monochromatic light (555 nm). Figure 9(a) illustrates the dynamic behavior of the adaptive optics deformable mirror (membrane with actuators). The estimated speed is comparable to that of the tunable lens of Fig. 4(a), but with more oscillations. Figure 9(b) shows the behavior of the liquid crystal spatial light modulator. This device has a completely different dynamic behavior. Using the same camera parameters, the image of the slit does not move progressively from one position to another (as in the tunable lenses and in the deformable mirror). Instead, the image of the slit progressively fades out from one position, without moving, and at the same time it progressively appears in the second position, without a transition through intermediate foci.
These fade-in/fade-out events are represented by gray scales in Fig. 9(b). The period of coexistence of foci is four times longer for the excitation (20.80 ms to change from 0 to 2 D) than for the relaxation (5.03 ms to change from 2 to 0 D). The different time needed by each pixel of the spatial light modulator, dependent on the phase induced, can explain this singular bimodal behavior without intermediate foci.

Funding
VA and EL acknowledge financial support from Comunidad de Madrid and Marie Curie