Precise image capture using a mechanical scanning endoscope is framed as a resonant structural-deflection control problem in a novel application. A bipolar piezoelectric self-sensing circuit is introduced to retrofit the piezoelectric tube as a miniature sensor. A data-driven electromechanical modeling approach is presented using system identification and system inversion methods that together represent the first online-adaptive control strategy for the scanning fiber endoscope (SFE). Trajectory tracking experiments show marked improvements in scan accuracy over previous control methods and significantly, the ability of the new method to adapt to changing operating environments.

## Introduction

The SFE is a unique, miniature, imaging device developed by the Human Photonics Laboratory at the University of Washington, Seattle, WA. The SFE is an optomechanical camera. A single optical fiber projecting focused red–green–blue laser illumination is vibration-modulated near its first mechanical resonance by a piezoelectric tube. As the fiber-tip scans an expanding and collapsing spiral trajectory, a ring of passive light-collectors captures the reflected laser light. The variation in the reflectance intensity signal is used to reconstruct an image pixel-by-pixel. This laser-scanning mechanism enables a new class of small scale (1 mm diameter, 9 mm long rigid scope attached to 2 m flexible tether) and high field-of-view (>70 deg) imagers [1] with applications in medical diagnosis [2,3] and treatment [4] and even precision manufacturing [5].

The challenge of using a mechanical scanner for imaging is the resulting sensitivity of image quality to perturbations of the system, necessitating precise trajectory control that has so far been open-loop methods. In particular, changing structural stress, applied load, and temperature drift [6] during the use of the endoscope (e.g., in confined body cavities) introduces image distortion at the moment most critical for visual monitoring, such as mechanical cutting or laser ablation. Mitigating this distortion is critical for some minimally invasive surgical applications that tend to take longer during surgery with a more rapid patient recovery, for example, Natural Orifice Translumenal Endoscopic Surgery [7]. The mechanical scanner in the SFE can accumulate distortion over time in the central region of the visual field using the spiral pattern of scanning (Fig. 1). Furthermore, clamping the distal tip of the SFE to a robotic arm or surgical tool can immediately cause distortion in the image and necessitate a difficult recalibration of the sterile combination [8]. Therefore, a robust scheme is necessary to ensure that the optical fiber is vibrated along a defined trajectory accurately and precisely, frame-over-frame. To date, no closed-loop control scheme has been demonstrated with the SFE due to the lack of miniature sensors (<1 mm diameter) to measure the fiber-tip displacement. A feedback-control scheme for scan tracking was proposed but it required a large (> 25 mm square) external optical detector placed in the image plane [9], precluding its implementation in an endoscopic system. Two open-loop feedforward approaches have been demonstrated where the scanner is precalibrated with the external optical detector, but the endoscope cannot recalibrate while in use [10,11]. These three strategies constitute the control methods designed for the SFE so far.

In this publication, we present a new adaptive feedforward controller that utilizes a novel piezoelectric self-sensing approach, building on previous piezoelectric sensing work by Yeoh et al. [8]. Recently, it has been reported that the piezoelectric tube within the scanner can also be used as a miniature sensor, during off-periods (when not actuating). A piezoelectric sensing method capable of identifying the parameters needed to drive the scanner in an imaging-braking-settling format [12] was proposed [8]. In this paper, a bipolar piezoelectric self-sensing circuit is introduced that allows the piezoelectric tube to act as a miniature sensor during all the periods (actuating or not). This in turn enables a new system identification approach that empirically extracts the dynamical model of the scanner. Via system inversion, the scanner can be made to track arbitrary trajectories through an adaptive feedforward method. Our proposed vibration control approach maintains the small size of the endoscope, while the embedded miniature sensor allows for more accurate scanning with constant system recalibration while in use.

The organization of this paper is as follows: In Sec. 2, we present the new bipolar piezoelectric self-sensing circuit with a unified electromechanical model to predict the sensor–actuator system response. Next, a system identification and model reduction method is proposed in Sec. 3 to empirically isolate the dynamics relevant for controlling resonant vibrations of the imaging optical fiber. The procedure for exactly inverting the dynamical relationship to find a control input corresponding to an arbitrary trajectory is described in Sec. 4, followed by experimental reports, analysis, and discussion in Sec. 5, demonstrating the calibration and adaptive control process implemented using the piezoelectric self-sensing signal. Finally, Sec. 6 concludes the paper.

## Electromechanical Model

### New Self-Sensing Circuit.

In this section, a new self-sensing circuit architecture will be introduced and analyzed to show that the voltage output of the sensing circuit is directly related to the strain and bending of the piezoelectric tube. Piezoelectric self-sensing is an approach pioneered by Dosch et al. [13] and Anderson and coworkers [14], and it has since been explored by many other researchers [1517] for collocated sensing and actuation. The self-sensing approach taken in this work is similar to the capacitive bridge balancing of Dosch et al. [13] and Anderson and coworkers [14], but is tailored to the applications of miniature devices and high-frequency resonant structure control.

In this work, the structure to be controlled for two-dimensional (2D) vibration is the SFE scan engine comprised of a piezoelectric tube and a cantilevered optical fiber. In order to maintain the slender 1 mm size of the endoscope, a low-footprint self-sensing approach was implemented as in Fig. 2. The sensor is the piezoelectric tube at the distal end within the scan engine, with a sensing circuit located at the proximal end. This self-sensing circuit taps into the base of the 2 m long electrical wires to give measurements of the bending displacement of the piezoelectric tube, the methods of which will be described in this section.

Figure 3 shows our piezoelectric self-sensing circuit design. One of the unique features of this circuit is that it is bipolar (that is, the drive voltages for the piezoelectric tube load are always differential across each pair of the quadrant-electrodes. The core of the piezoelectric tube is hollow and metallized, serving as a virtual ground). This is in contrast to most piezoelectric circuits in literature [1518] with unipolar circuits, where one side of the piezoelectric load is at or referenced to the ground potential. Another specialization of our self-sensing circuit is that the reference/balance branch is not purely capacitive, e.g., $Cbal$ (balance capacitor), but also balances the wire and electrical port impedances with $Rw$ (wire resistance) and $Cw$ (wire capacitance).

The piezoelectric tube (between each pair of electrodes) is modeled following Dosch et al. [13], as a capacitance $Cp$ in series with an internal voltage source $Vp$. For cantileverlike structures, $Vp$ is proportional to the normal strain on a piezoelectric material [13,19]. A general derivation of the relationship between $Vp$ and the strain of the piezoelectric material is given in this section.

Figure 4(a) shows the axes convention for a piezoelectric material poled in the 3-direction. The electric field in the 3-direction, $E3$, is related to the electric displacement in the 3-direction $D3$, and the strain in the 1-direction $S1$, by the following equation [13]:

$E3=D3εS−e13S1εS$
(1)
where $e13$ is a piezoelectric constant, and $εS$ is the material permittivity. For a material of thickness $t$, the voltage across 3-direction is given by [13]
(2)

From Eq. (2), the voltage across the piezoelectric element (with two terms on the right-hand side) can be interpreted as being the combined contribution of free charge displacement (common in regular capacitive materials) and piezoelectric strain polarization (unique to piezoelectric materials), defined below

$(qf/A)=D3$, free charge per area ($A$) on the piezoelectric element

, piezoelectric polarization charge per area ($A$) due to strain

As defined, $qp$ is distinct from $qf$ though the corresponding modeled circuit elements of the piezo-actuator are in series. By defining a piezoelectric capacitance measured at constant strain
$CpS=εSAt$
(3)
The equation for voltage across a piezoelectric element simplifies to
$v=qfCpS−qpCpS$
(4)
$qp$ is the charge proportional to strain. Since $v=q/C$, Eq. (4) is further simplified to
$v=qfCpS−Vp$
(5)
An equivalent circuit with the piezoelectric material is shown on the right branch of Fig. 3. $v$ is the voltage across the piezoelectric element. From Eqs. (2) to (5), we find that $Vp$ is proportional to the normal strain of the piezoelectric material along the 1-direction
(6)

where $kS=e13t/εS$ is a constant. The preceding discussion has established that the internal piezoelectric voltage $Vp$ is proportional to the piezoelectric strain. Next, the relationship between the piezoelectric strain and piezoelectric tube bending is derived following Chen [20].

Figure 5 shows the electrode configuration and bending along the defined y-axis, with bending radius of curvature ρ. The strain $S1$ is proportional to the bending radius

$S1=−yρ$
(7)
Building on Eq. (6) and Fig. 5, the total piezoelectric voltage generated by the bending of the cylindrical piezoelectric tube will be the integral around the circumference of Fig. 5(a). Examining the geometry will help simplify the integral. Since bending is along the y-axis only, the x-axis electrodes X1 and X2 straddle the neutral axis and their strain integral will cancel out to zero. The strain along Y2 will be the negative mirror of the strain along Y1. Thus, we can find the total piezoelectric voltage by integrating the strain only on one quadrant, from $θ=(π/4)$ to $θ=(π/2)$ and multiplying by four. Using a shell approximation, we integrate along a shell of radius r
$Vp,total=kS⋅4∫π4π2−yρdθVp,total=−kS⋅4ρ∫π4π2r sin θdθ=−kS⋅22rρ$
(8)

Equation (8) shows that the piezoelectric voltage is inversely proportional to the radius of curvature of the bending piezoelectric tube. That is, if the piezoelectric tube is not bent (radius of curvature is infinite), the piezoelectric voltage is zero. As the piezoelectric tube bending increases, the piezoelectric voltage increases.

The bending of the piezoelectric tube is assumed to be separable to two bending moments about the y- and the x-axes, producing piezoelectric voltages along the Y and X electrodes, respectively. This approximation is valid for small bending displacements, which is the case for the SFE scanner geometry. For the SFE piezoelectric tube of length about 2 mm, diameter 0.45 mm, and wall thickness 0.15 mm, a high voltage of 100 V generated across the electrodes Y1–Y2 corresponds to an very small deflection of less than 0.4 μm [1,20]. Expanding on the small bending approximation, the bending of the piezoelectric tube is related to the transverse defection of the piezoelectric tube.

From Fig. 6, the deflection $h$ of a piezoelectric tube of length $L$ and bending radius $ρ$ is given by

$h=ρ(1−cos θ)=p(1−cos(Lρ))$
(9)
Taking the first-order Taylor expansion of $cos (L/ρ)≈1−((1/2)(L2/ρ2))+⋯$, we get
$h≈12L2ρ$
(10)
Combining Eqs. (8) and (10), it is shown that by the small bending approximation, the piezoelectric voltage $Vp,total$ is proportional to the transverse deflection of the piezoelectric tube $h$
$Vp,total=−kS⋅42rL2h$
(11)

where $r$, the radius, and $L$, the length, of the piezoelectric tube are constants. More detailed treatment of piezoelectric tube bending can be found in, e.g., Refs. [21, 22].

The preceding discussion has related the internal piezoelectric voltage $Vp$ to the bending of the piezoelectric tube. However, from Fig. 3, the voltage $Vp$ is not directly measureable because the voltage across the piezoelectric-material electrodes is $v$. Next, this work will show how the new piezoelectric self-sensing circuit isolates $Vp$ as the measured output of the circuit $Vmeas$, to finally establish this new method of self-sensing the bending of the SFE piezoelectric tube.

The input voltage is $Vdrive$, which excites the scanner to resonate in a controlled spiral trajectory. $Rw$ and $Cw$ on the left of Fig. 3 model the resistance and capacitance of the 2 m wire-tether of the endoscope. These elements and the piezoelectric capacitance $Cp$ are mirrored on the left branch in Fig. 3. The measurement output of the self-sensing circuit is given by
$Vmeas(t)=V1(t)−V2(t)$
(12)
In Laplace-domain analysis
$Vmeas(s)=V1(s)−V2(s)=12[1sCw||(1sCp+2Rw)2R+1sCw||(1sCp+2Rw)Vdrive(s)−1sCw||(1sCbal+2Rw)2R+1sCw||(1sCbal+2Rw)Vdrive(s)+1sCw||2R1sCp+2Rw+1sCw||2RVp(s)]$
(13)
If $Cbal=Cp$, i.e., the reference capacitance exactly matches the equivalent piezoelectric capacitance, then the first two terms in Eq. (13) cancel out, and we get a strain-measurement sensor signal from the self-sensing circuit
$Vmeas(s)=12[1sCw||2R1sCp+2Rw+1sCw||2RVp(s)]$
(14)

where $||$ is the parallel element operator, $a||b=(a⋅b/a+b)$. This measurement of $Vp$ has previously been shown to be proportional to the small bending displacements of the piezoelectric tube.

Practice has shown that such piezoelectric self-sensing circuits are difficult to sufficiently balance [18,19] leading to a measurement signal that is an unknown weighted sum of the drive and sensing signals. This signal contamination degrades sensing and can cause closed-loop systems incorporating piezoelectric self-sensing to go unstable if unaccounted for [18,19]. In the next part of our modeling method, we will not assume that the bridge circuit is perfectly balanced, but include each circuit element into an expanded model that will account for $Cbal≠Cp$.

### Model Derivation.

Building on previous experimental characterizations of the scanning device, we determine that a linear vibration model adequately describes the system. Kundrat et al. showed that within the range of operation of up to 30 V actuation, the scanner's fiber deflection responds linearly and is decomposable into two orthogonal eigendirections [10]. The feedforward control design of Kundrat et al. [12] and the baseline closed-loop control model of Smithwick et al. [9,11] for SFE scan tracking were based on a simple harmonic oscillator or mass–spring–damper form for the system dynamics.

Furthermore from our experiments, the transfer function from input-to-fiber deflection along each eigendirection has two distinct resonant modes at around 11.5 kHz and 22.5 kHz, as shown in Fig. 7. The simple form of the system's transfer function makes it easy to fit a lumped-mass model to the data. Since the frequency of excitation of the structure is narrow-band at the first resonance (to excite the fiber to resonance), the system is also less sensitive to modeling errors at frequencies far from 11.5 kHz.

Given the availability of the piezoelectric miniature sensor, we take a data-driven or empirical modeling approach by selecting the most general model form that sufficiently explains the experimental transfer function. Figure 8 shows the lumped-mass model of the mechanical scanner along one eigendirection. To unify the mechanical model with the self-sensing circuit model, we convert the mechanical elements into their circuit equivalents.

The electrical resistor is analogous to the mechanical damper, with governing equations
(15)

with voltage $V$, resistance $R$, current $i$, velocity $ν$, damping $c$, and force $f$.

The electrical inductor is analogous to the mechanical spring, with governing equations
(16)

with voltage $V$, inductance $L$, current $i$, velocity $ν$, stiffness $k$, and force $f$.

The electrical capacitor is analogous to the mechanical mass, with governing equations
(17)

with current $i$, capacitance $C$, voltage $V$, force $f$, mass $m$, and velocity $ν$.

Converting the model for a piezoelectric to its current-source Norton equivalent and combining the electrical circuit with the double mass–spring–damper equivalent model, we get a unified description of the actuation-plus-sensor system. Figure 9 shows the full electromechanical model of the scanner for one active eigendirection, using circuit element analogs. This linear model can be cast into state-space form as

(18)
The input $u(t)$ represents the drive voltage, the output $y(t)$ the self-sensing voltage, and the eight states $x=[Qw1Qw2QpQbi1i2Q1Q2Qf]$ correspond to the charge on $Cw1$ and $Cw1$, charge on piezoelectric capacitance $Cp$, balance capacitance $Cb$, analogous force through $k1$ and $k2$, analogous charge across $m1$ and $m2$, and charge across filtering capacitor $Cf$, respectively.

### Experimental Verification.

To verify the presented electromechanical model, the model parameters were fit to experimental self-sensing data using gray-box identification and matlab nonlinear optimization functions. Figure 10(a) compares the experimental data versus model prediction for system response to a sinusoidal burst excitation at the first resonant frequency

(19)

Figure 10(b) plots the normalized (with respect to maximum sensing signal amplitude) error between the experimental data and the model prediction; the maximum prediction error was 24.6%, and the mean prediction error was 2.2% of the maximum signal amplitude.

The above experimental data show that the expanded model—which includes the capacitive bridge circuit—is able to predict the effects of the circuit imbalance that manifests as feedthrough when the actuation signal is active (t < 0.03 s) as in Fig. 10(a). Self-sensing is made robust to variations in reference capacitor values because the capacitor values are included in the system identification parameters.

## System Identification and Modal Transform

To speed up computation and allow for rapid system identification and recalibration, we develop a batch least squares (BLS) method for finding the best-fit parameter values. This new BLS approach can be implemented recursively [24,25] and is more efficient than structured or state-space model-based methods. The nine-state model in Eq. (18) has 17 parameters—if we are able to precisely measure the circuit component values, then we are still left with seven unknowns, $Cp$, $m1$, $c1$, $k1$, $m2$, $c2$, and $k2$. Given a set of experimental data, a constrained optimization, for example, using matlab's id gray() function can solve for the best-fit parameter values, but these nonlinear optimizations are computationally intensive.

Batch least squares identifies a transfer function from input–output data. Experimental data used for system identification are digitally sampled, meaning that the signals are in discrete time space. We discretize the system model in Eq. (18) and reformulate it in transfer function form. Because this is a model of measurement of a dynamical system, a measurement noise term $e(t)$ is added to the equation
$(1+a1q−1+⋯anq−n)y(t)=(b0+b1q−1+⋯bmq−m)u(t)+e(t)A(q)y(t)=B(q)u(t)+e(t)$
(20)
where $q$ is the forward time-shift operator [24]; $u(t)$ and $y(t)$ are the input and output, respectively; and $e(t)$ is the Gaussian white noise, and the model coefficients. Solving for $y(t)$ and rearranging, we get the general form
(21)
We may solve for the best-fit parameters $θ̂$ using BLS [24,25]
$θ̂=(ΦTΦ)−1ΦTY$
(22)

where $Y$ and $Φ$ are the output and regressor vectors, respectively, over the measurement duration.

BLS is expanded to a high-order (BLS with a higher-order transfer function) to better handle measurement noise [25]. To match the model order in Eq. (18), we may wish to set $n=9$ for the regression model. However, in practice the disturbance $e(t)$ is typically not Gaussian white, leading to poor data-fitting [25]. Equation (20) is expanded to handle colored noise by introducing a general noise filter $1/D(q)$ and rearranging back into an autoregressive with exogenous input format
$A(q)y(t)=B(q)u(t)+1D(q)e(t)[A(q)D(q)]y(t)=[B(q)D(q)]u(t)+e(t)Ã(q)y(t)=B̃(q)u(t)+e(t)$
(23)

$Ã(q)$ may be set to a high (e.g., 50 versus the minimum order 4 for a double mass–spring–damper system) order to give very good data fit.

Finally, the high-order transfer function is separated into independent subsystems, and the dynamics of interest is extracted. Since we are implementing an adaptive feedforward control for first mode resonant vibration, we are primarily interested in the transfer function from input-to-first mode excitation amplitude. In other words, we wish to determine the relationship between the input and the generalized displacement of the first vibration mode. We may extract the first mode dynamics by first converting the identified transfer function $y(t)=(B̃(q)/Ã(q))u(t)$ into a modal state-space form
$x˙=Ax+Buy=Cx$
Here, $y$ and $u$ are still the sensor output and system input, respectively. The $A$ matrix of the modal state-space form will consist of block-diagonal entries $ai,jk$, with each block $ai$ corresponding to an eigenvalue or conjugate eigenvalue pair, e.g.,
$A=[σ1ω1000⋯−ω1σ1000⋯00σ2ω20⋯00−ω2σ20⋯0000λ3⋯⋮⋮⋮⋮⋮⋱]=[a1,11a1,12000⋯a1,21a1,22000⋯00a2,11a2,120⋯00a2,12a2,220⋯0000a3⋯⋮⋮⋮⋮⋮⋱]$
(24)
The $B$ and $C$ coefficients corresponding to the block diagonals are
$B=[b1,11b1,12b1,13b1,14b1,15⋯b1,21b1,22b1,23b1,24b1,25⋯b2,11b2,12b2,13b2,14b2,15⋯b2,21b2,22b2,23b2,24b2,25⋯b3,11b3,12b3,13b3,14b3,15⋯⋮⋮⋮⋮⋮⋱]C=[c1,1c1,2c2,1c2,2c3⋯]$
(25)
The block-diagonal form of the transformed state-space model decouples the interaction of the model states into separable subsystems. The independent resonant dynamics of the different modes of the vibrational system is extracted using the coefficients $ai$, $bi$, and $ci$. The mode resonant frequency corresponding to this subsystem is given by $ωi$
$x˙i=aixi+biuyi=cixi$
(26)
In Eq. (26), $yi$ represents the generalized displacement of a vibrational mode (also called mode displacement or response), corresponding to the mode with natural frequency $ωi$.

### Experimental Verification.

The first mode resonant dynamics are identified along each eigendirection. The system identification method presented in Sec. 3 is performed sequentially along each eigendirection of the scanner. A sinusoid-burst excitation at the nominal 11.5 kHz frequency is input to the system to excite the first mode resonance, while piezoelectric self-sensing signal is recorded.

Figure 11(a) shows the piezoelectric self-sensing measurement signal with sinusoidal input active from 0 s to 0.02 s. Data were captured from 0.01 s until 0.03 s, showing the first mode decaying vibrations after 0.02 s. Figure 11(a) shows a close match between the sensor data trace (solid) and the first mode response prediction (dashed). Using the method previously described, the first mode dynamics was accurately isolated and model-predicted from the input.

In Fig. 11(b), the predicted response was then subtracted from the measurement signal, resulting in a residue signal with no resonant or underdamped response. The residue signal is largely due to feedthrough of the drive input caused by capacitive bridge circuit imbalance. The presented data-driven system identification method is able to isolate and tolerate considerable sensing circuit imbalance, while still extracting the modal parameters. The extracted model is then applied to accurately control the optical fiber-tip trajectory.

## Feedforward Control Via System Inversion

The subsystem models extracted into the form of Eq. (26) may be exactly inverted to calculate the control inputs needed to achieve specific scan trajectories. For instance, with the SFE, the first resonant mode of the scanning cantilever is to be controller to achieve high optical fiber deflection. The dynamics of the first resonant mode is extracted from the block-diagonal subsystem with $ωi$ closest to the expected first mode resonance.

The input-to-first mode dynamics isolated from the system identification steps can be described as a second-order system
$x˙d=a1xd+b1uffyd=c1xd$
(27)

where $yd$ is the desired output trajectory, $xd$ is the state trajectory vector associated with that output, $uff$ is the required feedforward input to achieve the desired trajectory, and $a1$, $b1$, and $c1$ are the model coefficients identified for the first mode dynamics.

Given an arbitrary but sufficiently smooth (continuous second derivative) desired trajectory $yd$, the required input $uff$ to achieve $yd$ can be calculated as [26]
$uff=1c1a1r−1b1[drdtryd−c1a1rx]$
(28)

Here, $r$ is the relative degree of the system, given by $r=#poles−#zeros$.

Since $yd$ is known, Eq. (28) may be substituted into Eq. (27) to generate the $x$-trajectory that is then resubstituted into Eq. (28) to find the feedforward input. For more efficient computation, a reduced-order inverse can also be used [27].

We have described the system identification, dynamics isolation, and system inversion methods needed to calculate a feedforward input that will achieve given desired scan trajectories. This procedure utilizes the piezoelectric self-sensing measurements, which can be acquired at any time to generate new control inputs, enabling the endoscope to perform computerized self-calibration. In Sec. 5, we implement and experimentally validate the presented adaptive control approach.

## Scanner Self-Calibration

### Experiment Methodology.

Figure 12(a) shows the experimental setup. A PZT-5 A piezoelectric tube of 0.45 mm outer diameter, 4 mm length and a cantilevered optical fiber of 0.08 mm outer diameter and 2.27 mm length constitute the SFE scan engine, with first mode resonant frequency at about 11.5 kHz. A National Instruments PCI-6115 Data Acquisition card operating at 500 k samples/s was used to produce the control drive and to measure the self-sensing signals. For verification purposes, a 520 nm laser diode (Thorlabs, Newton, NJ) was coupled to the optical fiber, and an optical position sensor (DL-20, OSI Optoelectronics) was used to measure the scanned laser spot trajectory.

To quantify trajectory tracking/image error, we used a radial-phase error convention. Assuming that the desired locations for the image pixels are as shown in Fig. 13(a), we use the optical position sensor to sample the laser spot position at regular intervals or “pixel times.” Figure 13(b) shows an example of a desired location O versus the achieved position X of a given pixel.

Using polar coordinates, we described the desired and achieved positions for a given pixel
$xpixel=ar̂+bθ̂$
(29)
where $r̂$ and $θ̂$ are the radial and angular directions, respectively. We quantify the radial and phase error of each pixel, respectively, as
$Δradial=aachieved−adesiredΔphase=bachieved−bdesired$
(30)
For comparison with previous open-loop control methods, the desired trajectory $r1(t)$ was chosen to be 180 imaging spirals of uniformly ramping amplitude, followed by a nonimaging collapsing time. Each spiral is constituted by a sine and a cosine of frequency 11.315 kHz, one on each eigendirection
(31)

To capture images, a 2D scan is spanned by actuation in both eigendirection 1, $r1(t)$ and eigendirection 2, $r2(t)$. The trajectory $r2(t)$ is exactly the same as $r1(t)$ except that $cos (ω0t)$ replaces the sinusoid. $T0$ is the period corresponding to $ω0$. and $A0$ scales the maximum scan amplitude.

The experiment is designed to investigate the scan accuracy between the de facto open-loop control versus the proposed adaptive feedforward method under changing mechanical stress. The procedure is as follows:

Unclamped: Initially, the scan probe was rested in a V-groove to simulate the starting operative state of the scanner, docked within the calibration chamber. The open-loop control is initialized in this unclamped state. The performance of the open-loop control versus the proposed adaptive controller is quantified.

Clamped: Next, the scanner was mechanically clamped sequentially at five different positions as in Fig. 12, to simulate the scanner being removed from the calibration chamber and inserted into, e.g., the gastrointestinal or respiratory tracts for medical use, where changing mechanical stresses will be applied to the scan probe. During operation, the open-loop method cannot recalibrate, but the adaptive controller utilizing piezoelectric self-sensing is able to update its control inputs. The scan accuracies obtained with the baseline open-loop and the new adaptive controller are recorded for the five different clamping configurations.

### Results and Discussion.

The scan accuracies of the open-loop versus the presented adaptive feedforward control are compared in the unclamped state and then in different clamped configurations to demonstrate the advantage and robustness of the adaptive controller under changing operating conditions.

#### Unclamped.

An endoscope probe was initially in a resting/mechanically unstressed condition representative of the calibration chamber. The open-loop controller was initialized in this unclamped state. Figure 14(a) shows the 20 scan parameters that need to be manually configured for the open-loop protocol. Figure 14(b) shows the laser scan result of a correctly calibrated open-loop control. The straight bright line indicates that braking is correct along the first eigendirection. The small bright spot shows that braking is correct along the second eigendirection, and the fiber is brought rapidly to rest before the next scan cycle. (Note that in practice, the laser is turned off during braking and settling, such the bright line and spot are not normally visible). The open-loop control is not reinitialized in later parts of the experiment because in practice, recalibration can only be done within the calibration chamber.

Using a position sensitive detector, the scanned laser spot positions were recorded and compared with the desired trajectory to measure scan accuracy. This measurement is repeated three times in the unclamped case. Figures 15(a) and 15(b) show 2D plots of the achieved scan trajectory with the open-loop and the adaptive feedforward controllers. Qualitatively, the adaptive feedforward tracks the spiral scan more accurately. Figures 15(c) and 15(d) show quantitatively the squared error in the normalized-radial and phase/tangential components. There is clearly a reduction in the overall error using the adaptive feedforward method, in the unclamped state.

#### Clamped.

Next, the scan probe was clamped in five different configurations to introduce varying mechanical stress. This procedure replicates the operating conditions during surgery or manipulation of the ultrathin and flexible SFE within small ducts, where tissue contact is unavoidable. Figures 16(a) and 16(b) show 2D plots of the achieved scan trajectory with the open-loop and the adaptive feedforward controllers, respectively. Qualitatively, the adaptive feedforward tracks the spiral scan much more accurately. Figures 16(c) and 16(d) show quantitatively the squared error in the normalized-radial and phase/tangential components. In the clamped state, the adaptive feedforward clearly outperforms the open-loop because the new adaptive controller is able to update its control input in response to changing operating conditions to maintain high-image quality.

Figure 17 graphs the radial and tangential mean squared error (MSE) for the unclamped and then the clamped configurations. In the unclamped configurations, the open-loop and adaptive feedforward scan accuracies are steady over three trials, with the new adaptive feedforward method achieving higher accuracy. In the five clamped configurations, the absolute error for the open-loop controller shoots up by a factor of 23 because it is unable to adjust to the changing mechanical stress. On the other hand, the adaptive controller maintains a much lower level of scan error over the five different clamping conditions. The standard deviation in the radial MSE is 0.027 for the open-loop case, while the standard deviation in the radial MSE is 0.008 for the adaptive feedforward controller.

#### Image Quality.

To visually compare the image quality produced by the open-loop and the new adaptive controller during each scanned video frame, laser light was modulated through the optical fiber to project target images as in Fig. 18(a). The projected images were then captured using a hand-held camera. Figure 18(b) shows the unclamped initial image quality of the de facto open-loop controller. Even with manual tuning of the scan parameters, image distortions are still present. Figure 18(c) shows the open-loop image quality after clamping at position 1. Under various mechanical stresses, the response of the scanner can change dramatically, leading to severe image distortions.

Figure 18(d) shows the unclamped initial image quality of the new adaptive feedforward controller. Image quality is improved over the open-loop method. Figure 18(e) shows the image quality after clamping at position 1. Even in the extreme case of hard mechanical clamping at the base of the piezoelectric actuator (e.g., position 1—Fig. 12(a)), the image quality is largely maintained and far better than the open-loop result, because the adaptive controller can autocalibrate to the new stress conditions.

#### Discussion.

The above experimental results demonstrate for the first time a closed-loop adaptive controller utilizing the integrated piezoelectric tube as an online miniature sensor. All the previously demonstrated controllers required an external optical sensor for precalibration and then operated in open-loop [1012]. The open-loop controller in Refs. [10] and [12] was used as the baseline method in the experiments for this paper. A closed-loop controller should be able to compensate for the changing stresses while maneuvering the endoscope, e.g., taking a biopsy within the respiratory or digestive tract while maintaining image quality with the correct scan trajectory. From Fig. 18, the different stresses clearly alter the open- and closed-loop responses but the closed-loop controller always preserves higher scan accuracy. Figure 17 quantitatively shows that the controller consistently maintains a lower scan error when compared with the open-loop approach in both the unclamped and especially the mechanically clamped case.

For each 180 imaging spirals, the manually tuned open-loop control required 58 cycles of nonimaging braking and settling time, resulting in a frame rate of 45.45 Hz. The adaptive feedforward controller was setup to track a scan trajectory of 180 imaging spirals and 36 nonimaging contracting spirals, resulting in a frame rate of 50 Hz. Thus, the adaptive feedforward controller enabled slightly higher frame rates in addition to maintaining high-image quality with varying mechanical disturbance. Higher frame rates during endoscopic surveillance can allow the endoscope to move more rapidly during diagnostic inspections, such as flexible cystoscopy [3].

Compared to the uncontrolled case, scan trajectory error has been significantly reduced using the adaptive controller. Scan accuracy may be further improved by implementing model/control-point optimization methods that are currently being researched. Also, the system identification method thus proposed requires a 40 ms burst sinusoidal excitation as the probing signal. Imaging is interrupted during system probing, though the 40 ms blanking may not be noticeable at the 15 Hz imaging frame rates that are acceptable in many endoscopic applications. During long endoscopic procedures, the recalibration may be user-initiated to minimize the risk of the interruption to high frame rate imaging. Other methods of online system adaptation/recalibration are being investigated to remove this calibration probing or blanking interval.

In a nonadaptive or open-loop system, certain disturbances can cause the output to be grossly in error. In Fig. 14, we find that the clamped positions 2 and 5 result in extremely high scan error compared to other clamped positions, meaning that in this particular stress configuration, the scan engine dynamics is significantly distorted. The widely varying open-loop performance versus the steady adaptive controller result highlights the advance of this work's adaptive feedforward controller in maintaining scan accuracy without manual intervention, accomplishing a stable, self-calibrating imaging system.

Regarding the image quality of current SFE prototypes, a “pixel distortion remapping” is performed where the scan trajectory is recorded by the optical detector within the calibration chamber, and a distortion map is then used to prewarp the SFE images. This is an additional open-loop image-correction that was not performed in this investigation, since this paper is focused on the actual trajectory accuracy.

As shown in Fig. 12(b), the clamping force in the experiments was exerted on the scan tube resting in a 5 mm long v-groove, by tightening a M2 screw. Up to 100 N axial clamping force is applied when firmly tightening the M2 screw in the different positions. From Fig. 12(b), this 100 N force is distributed between the point contact of the screw and the two contacts with the 5 mm groove, providing a pressure of greater than 10 kg/cm2.

Mechanical disturbances during maneuvering, biopsy, or even surgery within the ducts of soft tissue organs in the body are not expected to perturb the SFE as significantly as physically clamping the fiber scanner. In a review of literature, we find that the pressure of closure of the human esophageal sphincter and esophagus is below 0.75 kg/cm2 [23]. In laparoscopic procedures where biopsies are taken, the puncturing force on prostate tissue was reported to be less than 2 N [28], brachytherapy needle insertion exerted a force of less than 16 N [29], and the needle insertion and removal forces into bovine liver tissue were less than 2.5 N [30]. The average force to make surgical ties of the ureter, renal artery, and renal vein laparoscopically was reported to be less than 15 N [31]. All these reported forces are much less than the 100 N axial force during tightening of the screw into the steel v-groove, except for deep insertion of bone biopsy needle which can reach up to 1000 N [32]. In addition, depending on the laparoscope or endoscope design, the reported biological forces will not necessarily be fully transmitted to the camera region of the scope. Thus, the mechanical clamping experiments in this investigation represent worst-case mechanical perturbations for soft tissue biopsy and surgical interventions using endoscopes.

## Conclusion

This paper began by presenting a new miniature sensor for the SFE: Its piezoelectric tube. By retrofitting a custom self-sensing circuit to the system, vibrations of the scan engine can be accurately sensed. This sensing approach maintains the very small diameter dimension of the endoscope (1 mm) while also maintaining the very long axial length (2 m). This work also described and demonstrated a method to use the sense-actuator to isolate pertinent dynamics of the scanning fiber system. For any sufficiently smooth desired trajectory, an exact feedforward input that is adapted to the identified dynamics of the system can be calculated. Since the sensor is embedded in the device, the computerized algorithms allow for automatic recalibration of the control input at any point in time. This expands the usefulness of the endoscope particularly for long-stretches of continuous operation during which the mechanical parameters may drift, such as during surgical procedures.

## Acknowledgment

This work was supported in part by National Science Foundation Grant No. CBET-1351110, the Department of Mechanical Engineering at the University of Washington, and Magic Leap, Inc. The authors also thank Mr. Rich Johnston, Mr. Dave Melville, and Dr. Brian Schowengerdt for support and technical assistance in the development of scanning fiber devices.

## References

References
1.
Lee
,
C. M.
,
Engelbrecht
,
C. J.
,
Soper
,
T. D.
,
Helmchen
,
F.
, and
Seibel
,
E. J.
,
2010
, “
Scanning Fiber Endoscopy With Highly Flexible, 1-mm Catheterscopes for Wide-Field, Full-Color Imaging
,”
J. Biophotonics
,
3
(
5–6
), pp.
385
407
.
2.
Yang
,
C.
,
Hou
, V
. W.
,
Girard
,
E. J.
,
Nelson
,
L. Y.
, and
Seibel
,
E. J.
,
2014
, “
Target-to-Background Enhancement in Multispectral Endoscopy With Background Autofluorescence Mitigation for Quantitative Molecular Imaging
,”
J. Biomed. Opt.
,
19
(
7
), p.
076014
.
3.
Soper
,
T. D.
,
Porter
,
M. P.
, and
Seibel
,
E. J.
,
2012
, “
Surface Mosaics of the Bladder Reconstructed From Endoscopic Video for Automated Surveillance
,”
IEEE Trans. Biomed. Eng.
,
59
(
6
), pp.
1670
1680
.
4.
Woldetensae
,
M. H.
,
Kirshenbaum
,
M. R.
,
Kramer
,
G. M.
,
Zhang
,
L.
, and
Seibel
,
E. J.
,
2013
, “
Fluorescence Image-Guided Photodynamic Therapy of Cancer Cells Using a Scanning Fiber Endoscope
,”
Proc. SPIE
,
8576
, p.
85670L
.
5.
Gong
,
Y.
,
Johnston
,
R. S.
,
Melville
,
C. D.
, and
Seibel
,
E. J.
,
2015
, “
Axial-Stereo 3-D Optical Metrology for Inner Profile of Pipes Using a Scanning Laser Endoscope
,”
Int. J. Optomechatronics
,
9
(
3
), pp.
238
247
.
6.
Kundrat
,
M. J.
,
2010
,
High Performance Open Loop Control for Fiber Scanner Imaging and Display Systems
,
University of Washington
,
Seattle, WA
.
7.
Khashab
,
M. A.
, and
Kalloo
,
A. N.
,
2012
, “
Notes: Current Status and New Horizons
,”
Gastroenterology
,
142
(
4
), pp.
704
710
.
8.
Yeoh
, I
. L.
,
Reinhall
,
P. G.
,
Berg
,
M. C.
, and
Seibel
,
E. J.
,
2015
, “
Self-Contained Image Recalibration in a Scanning Fiber Endoscope Using Piezoelectric Sensing
,”
ASME J. Med. Devices
,
9
(
1
), p.
011004
.
9.
Smithwick
,
Q. Y.
,
Vagners
,
J.
,
Reinhall
,
P. G.
, and
Seibel
,
E. J.
,
2006
, “
An Error Space Controller for a Resonating Fiber Scanner: Simulation and Implementation
,”
ASME J Dyn. Syst. Meas. Control
,
128
(
4
), pp.
899
913
.
10.
Kundrat
,
M. J.
,
Reinhall
,
P. G.
,
Lee
,
C. M.
, and
Seibel
,
E. J.
,
2011
, “
High Performance Open Loop Control of Scanning With a Small Cylindrical Cantilever Beam
,”
J. Sound Vib.
,
330
(
8
), pp.
1762
1771
.
11.
Smithwick
,
Q. Y.
,
Vagners
,
J.
,
Johnston
,
R. S.
, and
Seibel
,
E. J.
,
2010
, “
A Hybrid Nonlinear Adaptive Tracking Controller for a Resonating Fiber Microscanner
,”
ASME J. Dyn. Syst. Meas. Control
,
132
(
1
), p.
011001
.
12.
Kundrat
,
M. J.
,
Reinhall
,
P. G.
, and
Seibel
,
E. J.
,
2011
, “
Method to Achieve High Frame Rates in a Scanning Fiber Endoscope
,”
ASME J. Med. Devices
,
5
(
3
), p.
034501
.
13.
Dosch
,
J. J.
,
Inman
,
D. J.
, and
Garcia
,
E.
,
1992
, “
A Self-Sensing Piezoelectric Actuator for Collocated Control
,”
J. Intell. Mater. Syst. Struct.
,
3
(
1
), pp.
166
185
.
14.
Hagood
,
N.
,
Goodliffe
,
J.
, and
Anderson
,
E.
,
1992
, “
Self-Sensing Piezoelectric Actuation—Analysis and Application to Controlled Structures
,”
AIAA
Paper No. 92-2465.
15.
Kuiper
,
S.
, and
Schitter
,
G.
,
2010
, “
Active Damping of a Piezoelectric Tube Scanner Using Self-Sensing Piezo Actuation
,”
Mechatronics
,
20
(
6
), pp.
656
665
.
16.
Bazghaleh
,
M.
,
,
M.
,
Grainger
,
S.
,
Cazzolato
,
B.
, and
Lu
,
T. F.
,
2013
, “
A New Hybrid Method for Sensorless Control of Piezoelectric Actuators
,”
Sens. Actuators A
,
194
, pp.
25
30
.
17.
,
A.
,
Qiu
,
J.
,
Sebald
,
G.
, and
Guyomar
,
D.
,
2008
, “
Self-Sensing High Speed Controller for Piezoelectric Actuator
,”
J. Intell. Mater. Syst. Struct.
,
19
(
3
), pp.
395
405
.
18.
Simmers
,
G. E.
,
Hodgkins
,
J. R.
,
Mascarenas
,
D. D.
,
Park
,
G.
, and
Sohn
,
H.
,
2004
, “
Improved Piezoelectric Self-Sensing Actuation
,”
J. Intell. Mater. Syst. Struct.
,
15
(
12
), pp.
941
953
.
19.
Hagood
,
N. W.
, and
Anderson
,
E. H.
,
1992
, “
Simultaneous Sensing and Actuation Using Piezoelectric Materials
,”
Proc. SPIE
,
1543
, pp.
409
421
.
20.
Chen
,
C. J.
,
1992
, “
Electromechanical Deflections of Piezoelectric Tubes With Quartered Electrodes
,”
Appl. Phys. Lett.
,
60
(
1
), pp.
132
134
.
21.
Ma
,
Y.
,
Feng
,
Z.
,
Pan
,
C.
, and
Kong
,
F.
,
2009
, “
Static and Dynamic Analysis of a Four-Tube Piezoelectric Actuator
,”
Rev. Sci. Instrum.
,
80
(
6
), p.
065101
.
22.
Jha
,
A. K.
, and
Inman
,
D. J.
,
2002
, “
Piezoelectric Actuator and Sensor Models for an Inflated Toroidal Shell
,”
Mech. Syst. Signal Process.
,
16
(
1
), pp.
97
122
.
23.
Biancani
,
P.
,
Zabinski
,
M. P.
, and
Behar
,
J.
,
1975
, “
Pressure Tension, and Force of Closure of the Human Lower Esophageal Sphincter and Esophagus
,”
J. Clin. Invest.
,
56
(
2
), pp.
476
483
.
24.
Åström
,
K. J.
, and
Wittenmark
,
B.
,
2013
,
,
Dover Publications
,
Mineaola, NY
.
25.
Ljung
,
L.
,
1987
,
System Identification: Theory for the User
,
PTR Prentice Hall
,
Englewood Cliffs, NJ
.
26.
Clayton
,
G. M.
,
Tien
,
S.
,
Leang
,
K. K.
,
Zou
,
Q.
, and
Devasia
,
S.
,
2009
, “
A Review of Feedforward Control Approaches in Nanopositioning for High-Speed SPM
,”
ASME J. Dyn. Syst. Meas. Control
,
131
(
6
), p.
061101
.
27.
Silverman
,
L. M.
,
1969
, “
Inversion of Multivariable Linear Systems
,”
IEEE Trans. Autom. Control
,
14
(
3
), pp.
270
276
.
28.
Kataoka
,
H.
,
Washio
,
T.
,
Chinzei
,
K.
,
Mizuhara
,
K.
,
Simone
,
C.
, and
Okamura
,
A. M.
,
2002
, “
Measurement of the Tip and Friction Force Acting on a Needle During Penetration
,”
Medical Image Computing and Computer-Assisted Intervention—MICCAI 2002
,
Springer
,
Berlin
.
29.
Podder
,
T.
,
Clark
,
D.
,
Sherman
,
J.
,
Fuller
,
D.
,
Messing
,
E.
,
Rubens
,
D.
,
Strang
,
J.
,
Brasacchio
,
R.
,
Liao
,
L.
,
Ng
,
W. S.
, and
Yu
,
Y.
,
2006
, “
In Vivo Motion and Force Measurement of Surgical Needle Intervention During Prostate Brachytherapy
,”
Med. Phys.
,
33
(
8
), pp.
2915
2922
.
30.
Okamura
,
A. M.
,
Simone
,
C.
, and
Leary
,
M.
,
2004
, “
Force Modeling for Needle Insertion Into Soft Tissue
,”
IEEE Trans. Biomed. Eng.
,
51
(
10
), pp.
1707
1716
.
31.
Jeong
,
C. W.
,
Kim
,
S. H.
,
Kim
,
H. T.
,
Jeong
,
S. J.
,
Hong
,
S. K.
,
Byun
,
S. S.
, and
Lee
,
S. E.
,
2012
, “
Insufficient Joint Forces of First-Generation Articulating Instruments for Laparoendoscopic Single-Site Surgery
,”
Surg. Innovation
,
20
(
5
), pp.
466
470
.
32.
Mulligan
,
R.
,
Yin
,
L.
,
Lamont
,
A.
,
Peng
,
Z. X.
,
Forwood
,
M. R.
, and
Teoh
,
S. H.
,
2010
, “
Effect of Penetration Rate on Insertion Force in Trabecular Bone Biopsy
,”
Mater. Sci. Forum
,
654–656
, pp.
2225
2228
.