Introduction
============

With improving living standards, the demand for better health care is growing.  As a kind of necessary tool for doctors, medical apparatus and instruments are playing more and more important roles in therapeutic process.  The development of modern medicine has required increasingly intelligent and automatic medical equipment, one type of which is surgical instruments.  Over the past several decades, with developments in mechanics and electronics, surgical instruments have been continually improved, making many surgical procedures safer. 

The otological drill is one of the fundamental tools used in ear surgery.  It is usually used to mill holes in the skull to remove diseased tissue or provide access for further intervention, including cochlear implantation.[@b1-mder-8-207] It is controlled directly by the operating surgeon, and requires a high degree of hand-foot coordination, with one hand controlling its path and one foot controlling its switch state.  As an intracranial surgery of high risk, the surgical cavity for otological surgery is narrow ([Figure 1](#f1-mder-8-207){ref-type="fig"}).  The drill bit, which operates at high speed, can easily damage important intracranial structures.[@b2-mder-8-207]

Milling beyond the bone tissue wall is a common fault during the milling process.[@b2-mder-8-207] In intracranial surgery, a hole in the bone has to be milled.  When the bone is milled very thin, even the slightest touch may cause the high-speed rotating drill bit to break through the bone wall, causing unexpected damage to the patient's tissues.  Preventing the drill from penetrating the bone wall is a difficult task for surgeons.[@b3-mder-8-207] During a surgical procedure, surgeons have to estimate the thickness of the remaining bone covering the patient's tissue. 

Cotton swabs are used to stop bleeding at the surgical site.  These swabs can easily become entangled with the rotating drill bit, and cause damage at the surgical site.  It is also hard for surgeons to stop the entangled drill bit in a timely manner and avoid damage to the patient.[@b4-mder-8-207]

If the otological drill is able to intelligently identify milling faults and make appropriate treatment adjustments automatically, the risk of additional injury arising from the surgery could be reduced.  Much effort has been made by scientists and engineers to develop a smart otological drill system. 

At the end of the last century, Ong and Bouazza-Marouf investigated a robust detection method for drill bit breakthrough when drilling into long bones using an automated drilling system associated with mechatronic-assisted surgery.  They described a reliable and repeatable method of breakthrough detection based on a modified Kalman filter.  By applying the modified Kalman filter to the force difference between successive samples, imminent drill bit breakthrough could be detected in the presence of system compliance and inherent drilling force fluctuation.[@b5-mder-8-207],[@b6-mder-8-207]

In 2006, Lee and Shih described a robotic bone drilling system for application in orthopedic surgery.  Their goal was to devise a three-axis robotic drilling system that could automatically stop drilling at the moment the drill breaks through bone.  The robotic bone drilling system they proposed consists of an inner loop fuzzy controller for robot position control, and an outer loop PD controller for feed unit force control.[@b7-mder-8-207]

Hong et al devised an image-guided system for otological surgery in 2008.  With reliable hybrid registration, real-time patient movement compensation and virtual intraoperative computed tomography imaging was originally proposed, and could be used in various surgical procedures for accurate targeting and protection of critical organs.[@b8-mder-8-207]

In 2014, Dillon et al developed a compact, bone-attached milling robot to mill away part of the temporal bone in mastoidectomy procedures.  A positioning frame, containing fiducial markers and attachment points for the robot, is rigidly attached to the skull of the patient, and a computed tomography scan is acquired.  The target bone volume is manually segmented during computed tomography by the surgeon and automatically converted to a milling path and robot trajectory.  The robot is then attached to the positioning frame and used to drill the desired volume.[@b9-mder-8-207] Some of the presented methods are based on automatic robots, by which surgeons cannot play their subjective initiative into the surgery, and other methods may have higher costs. 

In an effort to improve safety during surgery, this paper presents a new method for identifying milling faults, including milling through the bone tissue wall and entanglement with cotton swabs.  This method is inexpensive, and offers surgeons the chance to play their subjective initiatives.  Our paper is structured as follows.  First, the function of the sensors and the experimental design are explained.  Second, essential differences between normal milling and abnormal milling are analyzed.  The recognition method is then described, and finally, the test results are presented and discussed. 

Our tests show that the milling states of an otological drill can be identified precisely in real time.  The average recognition rate for milling through the bone wall was 93%, with only 2% of normal millings identified as abnormal milling states.  The average recognition rate for entanglement with a cotton swab was 92%, with only 2% of normal millings identified as abnormal milling states. 

Materials and methods
=====================

Many parameters are able to reflect milling states, including motor current, milling force, torque, and drill rotational speed.[@b10-mder-8-207] According to our solutions, two kinds of sensors, specifically a current sensor (CHB-25NP; Beijing Sensor Electronics Company, Beijing, People's Republic of China) and a two-dimensional force sensor (RN20 strain gauge; Jinan Jinzhong Electronic Scale Corporation, Jinan, People's Republic of China), were installed on a modified otological drill (ZCW-1; 21st Institute, China's Ministry of Machinery and Electronics, Shanghai, People's Republic of China). 

The current sensor was used to measure the electromagnetic torque of a DC motor.  The relationship between current *i* and electromagnetic torque *T~e~* is as follows: $$T_{e} = C_{e}i$$where *C~e~* is a constant.  According to the data sheet for the drill, the measurement range of the current sensor is 0--2.5 A.

The force sensor was used to measure the normal cutting force at the milling surface.  A sleeve was added in front of the drill handle.  Through a sliding bearing installed in the front of the sleeve, the normal cutting force *F* of the drill bit can be transferred to the sleeve ([Figure 2](#f2-mder-8-207){ref-type="fig"}).  Four strain gauges were bonded onto the sleeve; these could measure the radial force *F~j~*, which is close to the normal cutting force *F*, by measuring the elastic deformation that occurred on the sleeve.  The force sensor could measure two orthogonal component forces of the radial force *F~j~*, *F~x~* and *F~y~*, wherein *F~x~* represents the relatively horizontal component force and *F~y~* represents the relatively vertical component force.  The radial force *F~j~* is calculated as follows: $$F_{j} = \sqrt{F_{x}^{2} + F_{y}^{2}}$$

The measurement range of the force sensor is from −5 N to 5 N, with a resolution of 0.005 N and an accuracy of 0.05 N.

As the rotating drill bit may stir up blood or other corrosive liquids, the strain gauges and signal conditioning circuit are covered in protective casing ([Figure 3](#f3-mder-8-207){ref-type="fig"}).  The sample rate of each sensor signal channel is 1,024 Hz.  To suppress sensor noise, an oversampling method is used.[@b11-mder-8-207]

The grinding object used in the experiment was calvarial bone that had been fixed in formalin.  Ethical permission for use of the bone sample was given by Peking Union Medical College Hospital.  All the experimental data were accessed and processed by a computer. 

Data preprocessing
------------------

The original signal from the sensors contains a lot of noise and interference.  And we use DB2 wavelet transform and reconstruction as a denoising method. 

Since the original data, as well as the wavelet processed sample data, were oversampled, a mean filter is used: $${\overline{x}}_{t} = \frac{1}{16}{\sum\limits_{j = 0}^{15}x_{16t + j}}$$where ${\overline{x}}_{t}$ represents the input data of the recognition method at time *t*, updated every 0.0156 seconds, and *x*~16~*~t~*~+~ *~j~* denotes the sample data processed by DB2 wavelet.  After the average-filtering, the frequency of the input data was decreased from 1,024 Hz to 64 Hz.  However, the data preprocessing has not ended. 

One thing we know is that the values of the force sensors do not correspond to zero when the drill is idling, since readings from the force sensors can be influenced by the weight of the drill bit.  During surgery the drilling angle is changing all the time, so the readings of the force sensors during idling periods are not constant. 

However, if we want to calculate the normal cutting force *F* more accurately, we need to remove the influence of the weight of the drill bit.  Therefore, the readings of each force sensor, *F~x~* or *F~y~*, should be preprocessed.  We can calculate the average values of each force sensor before a drilling maneuver, and set it as a base value for the following force signals.  The reversed force signal is the difference between the original signal and the base value.  The readings of force sensors before every drilling operation change but the readings of the current sensor do not, so we can judge whether the drill is idling by the readings of the current sensor.  The collation map of the initial and reversed force signal of *F~x~* or *F~y~* are shown in [Figure 4](#f4-mder-8-207){ref-type="fig"}. 

Mathematical model of the DC motor
----------------------------------

The essential to find the relationships between the force signal and the current signal lies in the mathematical model of the DC motor.  According to the properties of the DC motor, the change rules of the armature current and the motor speed can be described by the following equations:[@b12-mder-8-207] $$\begin{array}{l}
{\frac{di}{dt} = - \frac{r}{L}i - \frac{k}{L}\omega - \frac{1}{L}u} \\
{\frac{d\omega}{dt} = - \frac{k}{J}i - \frac{B}{J}\omega - \frac{1}{J}T_{L}} \\
\end{array}$$where *i* is the armature current, *u* is the armature voltage, *r* and *L* are the equivalent resistance and equivalent inductance of the armature winding, *k* is the torque constant determined by the permanent magnet and armature magnetic properties of the motor, *B* is the coefficient of frictional resistance of the motor rotor, *T~L~* is the torque of the rotating load, **ω** is the rotor angular velocity, and *J* is the total moment of inertia of the motor rotor and the drill bit. 

The solutions of the differential [Equations 4](#fd4-mder-8-207){ref-type="disp-formula"} are shown in [Equations 5](#fd5-mder-8-207){ref-type="disp-formula"}, where *C*~1~ and *C*~2~ are constants.  $$\begin{array}{l}
{i = - \frac{C_{1}Le^{- \frac{r}{L}t} + k\omega + u}{r}} \\
{\omega = - \frac{C_{2}Je^{- \frac{B}{J}t} + ki + T_{L}}{B}} \\
\end{array}$$

After eliminating the *ω*, we obtain the expression of *i* : $$i = \frac{- C_{1}LBe^{- \frac{r}{L}t} + C_{2}kJe^{- \frac{B}{J}t} + kT_{L} - uB}{rB - k^{2}}$$

To obtain the relationship between the armature current *i* and the torque of the rotating load *T~L~*, we write [Equation 6](#fd6-mder-8-207){ref-type="disp-formula"} as below: $$i = C_{1}e^{C_{2}t} + C_{3}e^{C_{4}t} + C_{5}T_{L} + C_{6}$$where *C*~1~ to *C*~6~ are constants, and differ from those in [Equation 6](#fd6-mder-8-207){ref-type="disp-formula"}.  The first two terms on the right side of the equation are exponential terms, which decrease with time.  Their existence can be revealed by the armature current ([Figure 5](#f5-mder-8-207){ref-type="fig"}).  The current signal right after turning on is a little higher than that during idling. 

If we use *i* to express *T~L~*, and ignore the exponential terms, [Equation 7](#fd7-mder-8-207){ref-type="disp-formula"} can be written as follows: $$T_{L} = C_{k1}i + C_{k2}$$where *C~k~*~1~ and *C~k~*~2~ are constants. 

Since the drill bit is slipping on the bone surface during milling, the milling force can be recognized as sliding friction.  Its value *f* depends on the surface materials and the normal pressure *F~N~*.  The expression of *f* is shown below: $$f = \mu F_{N} = \mu\sqrt{{(F_{a}\sin\theta)}^{2} + {(F_{j}\cos\theta)}^{2}}$$where *μ* is the coefficient of sliding friction, *θ* is the angle between the axis and the grinding surface, *F~a~* is the axial force, and *F~j~* is the radial force. 

During a normal milling operation, the axial force is usually much smaller than the radial force, so we assume that *T~L~* during normal milling is in proportion to the radial force *F~j~*, and this relationship can be described as follows:[@b13-mder-8-207],[@b14-mder-8-207] $$T_{L} = k_{t}F_{j}$$where *k~t~* is a coefficient that depends on the physical properties of the grinding object.  The higher *k~t~* is, the harder the object could be.  The value of *k~t~* can be changing, while the value of *F~j~* can be measured by the current and value of *k~t~*.  From [Equations 8](#fd8-mder-8-207){ref-type="disp-formula"} and [10](#fd10-mder-8-207){ref-type="disp-formula"}, we derive the following equation: $$F_{j} = \frac{C_{k1}i + C_{k2}}{k_{t}}$$

Since every term in the right side of [Equation 11](#fd11-mder-8-207){ref-type="disp-formula"} has its coefficient, we set the value of *k~t~* to be 1 during normal milling, so that it will be easier to compare values between normal milling and abnormal milling. 

Next we use Matlab to fit these two coefficients, *C~k~*~1~ and *C~k~*~2~, through the current and force data during normal milling.  The scatter diagram of the fitting outcome is shown in [Figure 6](#f6-mder-8-207){ref-type="fig"}. 

Phase difference and its influence
----------------------------------

Now we can use the coefficients fitted by the data collected from normal milling, *C~k~*~1~ and *C~k~*~2~, to calculate the curve of *k~t~*.  The value of *k~t~* is expected to be around 1, and its expression is shown in the following formula: $$k_{t} = \frac{C_{k1}i + C_{k2}}{F_{j}}$$

To avoid sharp fluctuations of *k~t~* when the value of *F~j~* is near zero, we add a small constant to the denominator of the expression above, and to keep the average value of *k~t~*, the same constant is also added to its numerator.  Now the expression of *k~t~* is: $$k_{t} = \frac{C_{k1}i + C_{k2} + C_{k3}}{F_{j} + C_{k3}}$$

Here the constant *C~k~*~3~ =0.05

The curve of *k~t~* during normal milling is shown in [Figure 7](#f7-mder-8-207){ref-type="fig"}.  We can see easily that when *F~j~* increases rapidly, *k~t~* will suddenly decrease, and when *F~j~* decreases rapidly, *k~t~* will suddenly increase.  As the increasing speed of *F~j~* at the beginning of each milling is higher than its decreasing speed at the end, the amplification of *k~t~* at the beginning is larger than its damp at the end of each milling. 

Cao at the University of Science and Technology Beijing identified a phase difference between the force signal and the current signal.  During normal milling, the force signal changes a little earlier than the current signal.  However, when the bone wall is being milled through, or the drill is entangled with a cotton swab, the current signal seems to change earlier than the force signal.[@b15-mder-8-207]

This phenomenon can be explained by [Equation 5](#fd5-mder-8-207){ref-type="disp-formula"} and the curve of *k~t~* during normal milling ([Figure 7](#f7-mder-8-207){ref-type="fig"}).  There is an exponential term about time in the rotate speed expression of [Equation 5](#fd5-mder-8-207){ref-type="disp-formula"}, and the variation amplitude with time of this exponential term depends on *J* and *B*, the moment of inertia, and the coefficient of frictional resistance of the motor rotor. 

From [Figure 7](#f7-mder-8-207){ref-type="fig"} we find that when the status of the drill changes from idling to milling, the value of *k~t~* will suddenly decrease.  This is because when the resistance to the drill bit increases rapidly, and the rotation speed decreases rapidly, some of the rotational kinetic energy of the drill will help the electrical energy to overcome the resistance, so the current increases relatively slowly.  As a result, the value of *k~t~* declines rapidly. 

Likewise, the value of *k~t~* will suddenly increase while the status of the drill changes from milling to idling.  This is because when the resistance decreases rapidly, the current signal decreases more slowly than the force signal. 

However, we should take note of the fact that the discussion above is reasonable only in the following precondition, ie, when all the load resistance comes from frictional resistance, ie, the status of the drill must be normal milling, because only in this circumstance can the resistance to the drill bit be in proportion to the value of force sensor signal. 

When the drill bit is entangled with a cotton swab or is milling through the bone wall, there will be further resistance besides milling force.  At this time, the delay in the current signal when compared with the force signal seems to decrease, and even reverse.  This phenomenon is consistent with the research reported by Cao.[@b15-mder-8-207]

However, Cao did not offer an explanation for this phenomenon, and used a moving average filter to eliminate the influence of the phase difference, regarding it as a measurement error.  In fact, the phase difference should be constant as long as the DC motor has not been changed.  We can treat this as a systematic error, so that we can take more advantage of the information from sensors. 

Eliminating the influence of the phase difference
-------------------------------------------------

From the discussion above, we know that *k~t~* is a key parameter in distinguishing whether the state is abnormal, and *k~t~* can be influenced by the phase difference between the current signal and the force signal.  To eliminate the influence of phase difference, we attempted the following steps. 

First, differentiations are done to both sides of [Equation 7](#fd7-mder-8-207){ref-type="disp-formula"}, and we obtain: $$\frac{di}{dt} = C_{1}C_{2}e^{C_{2}t} + C_{3}C_{4}e^{C_{4}t} + C_{5}\frac{dT_{L}}{dt}$$

According to [Equation 14](#fd14-mder-8-207){ref-type="disp-formula"}, the rate of change in current *i* and that of *T~L~* only differs by two exponential terms, and [Equation 6](#fd6-mder-8-207){ref-type="disp-formula"} shows that both these exponential terms decrease with time, ie, if we shift the time axis of current *i* to an earlier time, the rate of change in current *i* will be approximately in proportion to that of *T~L~*. 

Now the question becomes how long time we shift earlier the time axis of current will make the change rates of *i* and *T~L~* close to a proportional relationship?  We think that this happens when the variance of the *k~t~* array reaches the minimum value, ie, when the following function *f*(*m*) with the independent variable *m* also has the minimum value: $$\begin{matrix}
{f(m) = Var(k_{t}(n,m))} \\
{k_{t}(n,m) = \frac{C_{k1,m}i_{n} + C_{k2,m} + C_{k3}}{F_{j,m - n} + C_{k3}}} \\
\end{matrix}$$

Here *k~t~*(*n*,*m*) is a two-dimensional matrix, where *n* is the point in the time array; its value is a positive integer, and *m* is the number of time points by which we shift earlier the time axis of current *i*, or we shift later the time axis of *F~j~*. * i~n~* is the value of the current sensor at time point *n*, and *F*~*j,n*−~*~m~* is the composition of *F~x~* and *F~y~* in time point *n*−*m*. * C~k~*~1~,*~m~* and *C~k~*~2,~*~m~* are the coefficients fitted by the shifted data, *i~n~*, *i~n+~*~2~, *i~n+~*~2~... and *F*~*j,n*−~*~m~*, *F~j~, ~n-m~*~+1~, *F~j,\ n-m~*~+2~... which are collected from normal milling.  As the frequency of the data is 64 Hz, the time between the two nearest time points is 1/64 of a second. 

When *m* values from 0 to 80, integer only, the functional relationship between *f*(*m*) and *m* is shown in [Figure 8](#f8-mder-8-207){ref-type="fig"}.  It is obvious that when *m* =2, approximately 0.03 seconds that we shifted earlier the time axis of current *i*, *f*(*m*) will have a minimum value. 

We compared the curve of *k~t~* when *m* values were 0 and 2, and the result is shown in [Figure 9](#f9-mder-8-207){ref-type="fig"}.  We can see easily that when the *m* value is 2, the influence of the lag of the current signal brought to *k~t~* has almost been eliminated.  And now the value of the coefficient *C~k~*~1~ is 1.3263 and that of *C~k~*~2~ is −0.8789. 

Although when *m* values 2, *f*(*m*) has a minimum value if *m* must be an integer, what if *m* equals a decimal number?  To obtain a more accurate *m*, we can linearly interpolate the force data that will be used to fit coefficients.  From the results above, we know the value of *m* we want is between 2 and 3.  So the force data that are shifted earlier by time point number *m* can be calculated by the following expression: $$F_{j(n - m)} = F_{j(n - 2)} \cdot (3 - m) + F_{j(n - 3)} \cdot (m - 2),2 < m < 3$$

We set the interval of interpolation to 0.02, and then calculate the 51 values of *f*(*m*), the result of which is shown in [Figure 10](#f10-mder-8-207){ref-type="fig"}.  When the *m* value is 2.42, *f*(*m*) reaches a minimum value. 

Through [Figure 11](#f11-mder-8-207){ref-type="fig"}, we can find that the fluctuation of *k~t~* when the *m* value is 2.42 is smaller than that when the *m* value is 2.  Now the coefficient *C~k~*~1~ value is 1.3240 and the *C~k~*~2~ value is −0.8763.  Since the coefficients are both determined by the properties of the DC motor, but not the grinding object, use them as a couple of standard coefficients in the next. 

Since the value of *k~t~* is unstable when the current decreases rapidly, we need to eliminate this interference.  Here we do a revision to the calculation of *k~t~* to make it more smooth and steady when the current decreases rapidly.  At the same time, we add a larger number to the denominator of the expression of *k~t~* to make it steadier during idling.  So *k~c~*, the correction value of *k~t~*, can be calculated by the following equation: $$k_{c},n = \frac{C_{k1}i + C_{k2} + C_{k5}(i_{n} - i_{n - 1})}{F_{j,n} + C_{k4}}$$where *C~k~*~4~=0.2, *C~k~*~5~=1, and *k~c,n~*, *i~n~*, and *F*~*j,n*~ are the values of *k~c~*, *I*, and *F~j~* in moment *n*. 

Recognition algorithms
----------------------

According to the surgeons' operating habits and the experimental data, the rate of change in the current during normal milling is usually small, not exceeding 5 A per second.  However, when milling through the bone wall, the rate of change can reach 2 A per second.  The reason for this is shown in [Figure 12](#f12-mder-8-207){ref-type="fig"}.  When the bone wall is being milled through, the rotating concave bit will meet the edge of the bone cavity, which can prevent the bit from rotating rapidly, and has a larger resisting moment to the bit.  The duration is short but the feature is remarkable. 

We should set thresholds for the current rate of change to judge whether the bone wall is being milled through.  Here the thresholds, including the upper threshold and the lower threshold, are determined by $\overline{\Delta i}$, the average increment rate of the current signal during normal milling.  When the increment rate of the current signal is positive, we can use it to calculate the average value. 

Likewise, the thresholds for the increment rate of *k~c~*, including the upper threshold and the lower threshold, are determined by $\overline{\Delta k_{c}}$, ie, the average increment rate of *k~c~* during normal milling.  Further, when the increment rate of *k~c~* is positive, we can use it to calculate the average value. 

Both $\overline{\Delta i}$ and $\overline{\Delta k_{c}}$ should be continuously revised during the milling operation. 

The final recognizing algorithm for milling through the bone wall can be realized by a piecewise function.  We use the function *P~th,n~* to represent the chance of milling through by time point *n*. 

The value of *P~th,n~* is the summation of two parts, one determined by the increment rate of *i* and the other by the increment rate of *k~c~*; both parts have equal weighting.  For either of the two increment rates, if it is smaller than its lower threshold, then it will contribute zero to the value of *P~th,n~*; if it is between the lower and upper thresholds, its contribution to *P~th,n~* will change from 0 to 0.5 linearly; if it is larger than the upper threshold, it will increase the value of *P~th,n~* by 0.5.  That is to say, if the increment rates of both *i* and *k~c~* reach their upper thresholds, the value of *P~th,n~* will be 1. 

The expression of *P~th,n~* can be described by [Equation 18](#fd18-mder-8-207){ref-type="disp-formula"}.  $$p_{th,n} = \left\{ \begin{array}{l}
{0,\Delta i_{n,n - 3} < \Delta i_{\min} \parallel \Delta k_{c,n,n - 3} < \Delta k_{\min}} \\
{\frac{1}{2} + \frac{\Delta i_{n,n - 3} - \Delta i_{\min}}{2(\Delta i_{\max} - \Delta i_{\min})},0 < \Delta i_{n,n - 3} < \Delta i_{\max}\&\Delta k_{c,n,n - 3} \geq \Delta k_{\max}} \\
{\frac{\Delta i_{n,n - 3} - \Delta i_{\min}}{2(\Delta i_{\max} - \Delta i_{\min})} + \frac{\Delta k_{c,n,n - 3} - \Delta k_{\min}}{2(\Delta k_{\max} - \Delta k_{\min})},0 < \Delta i_{n,n - 3} < \Delta i_{\max}\&\Delta k_{\min} < \Delta k_{c,n,n - 3} < \Delta k_{\max}} \\
{\frac{1}{2} + \frac{\Delta k_{c,n,n - 3} - \Delta k_{\min}}{2(\Delta k_{\max} - \Delta k_{\min})},\Delta i_{n,n - 3} \geq \Delta i_{\max}\&\Delta k_{\min} < \Delta k_{c,n,n - 3} < \Delta k_{\max}} \\
{1,\Delta i_{n,n - 3} \geq \Delta i_{\max}\&\Delta k_{c,n,n - 3} \geq \Delta k_{\max}} \\
\end{array} \right.$$where Δ*i*~min~, Δ*i*~max~, Δ*k*~min~, and Δ*k*~max~ are all thresholds determined by $\overline{\Delta i}$ and $\overline{\Delta k_{c}} \cdot \Delta i_{n,n - 3} = i_{n} - i_{n - 3}$, Δ*k~c,n,n~*~−3~ = *k~c,n~*−*k~c,n~*~−3~, where *i~n~* and *k~c,n~* represent the value of *i* and *k~c~* at time point *n*.  If *P~th,n~* is \>0.5, milling through bone wall will be predicted to happen by the system. 

When the drill bit is entangled by a cotton swab, it is not a remarkable feature that the current signal increases rapidly, but *k~c~* increases quickly.  Of course, the current signal will certainly increase in this period because of the extra resisting moment brought about by the cotton swab. 

The final recognizing algorithm for entanglement with the cotton swab can also be described by a piecewise function.  We use *P~wr,n~* to represent the chance of entanglement in time point *n*. 

This time, we set a smaller lower threshold for the increment rate of *i*, and a lower and upper threshold for that of *k~c~*. 

If the increment rate of *i* is smaller than its lower threshold, then *P~wr,n~* will get the value of zero, and the system will not predict that the entanglement is happening; as long as the increment rate of *i* is larger than its lower threshold, *P~wr,n~* will depend on the increment rate of *k~c~*, and values of 0 to 1 linearly with the increment rate of *k~c~* values from its lower threshold to its upper threshold.  If the increment rate of *i* is larger than its lower threshold and the increment rate of *k~c~* reaches its upper threshold, the value of *P~wr,n~* will be 1. 

The expression of *P~wr,n~* can be described by [Equation 19](#fd19-mder-8-207){ref-type="disp-formula"}.  $$p_{wr,n} = \left\{ \begin{array}{l}
{0,\Delta i_{n,n - 3} < \Delta i_{\min 2} \parallel \Delta k_{c,n,n - 3} < \Delta k_{\min 2}} \\
{\frac{\Delta k_{c,n,n - 3} - \Delta k_{\min 2}}{\Delta k_{\max 2} - \Delta k_{\min 2}},\Delta i_{n,n - 3} \geq \Delta i_{\max 2}\&\Delta k_{\min 2} < \Delta k_{c,n,n - 3} < \Delta k_{\max 2}} \\
{1,\Delta i_{n,n - 3} \geq \Delta i_{\min 2}\&\Delta k_{c,n,n - 3} \geq \Delta k_{\max 2}} \\
\end{array} \right.$$where Δ*i*~min2~, Δ*i*~max2~, Δ*k*~min2~ and Δ*k*~max2~ are all thresholds determined by $\overline{\Delta i}$ and $\overline{\Delta k_{c}} \cdot \Delta i_{n,n - 3} = i_{n} - i_{n - 3}$ and Δ*k~c,n,n~*~−3~ = *k~c,n~* − *k~c,n~*~−3~, where *i~n~* and *k~c,n~* represent the value of *i* and *k~c~* in time point *n*.  If *P~wr,n~* is \>0.5, entanglement with cotton swab will be predicted to happen by the system. 

Results
=======

We have done tests to prove the effectiveness of the recognition algorithms presented above using the experimental data collected from five surgeons. 

During 500 experiments of milling through bone tissue wall by five doctors, 465 of them in total were recognized successfully.  The recognition rate was 93%.  When we used the judgment function for milling through bone wall in 250 times' normal millings, only five times in total were recognized as milling through bone tissue wall.  The error rate was 2%. 

As a result, we can say that the recognition algorithm for milling through the bone wall is effective.  The recognition of milling through the bone tissue wall is shown in [Figure 13](#f13-mder-8-207){ref-type="fig"}. 

During 250 times' experiments of milling entangled by cotton swabs by five doctors, a total of 230 of them were recognized.  The recognition rate was 92%.  And when we used the judgment function for entanglement in 250 times' normal millings, only 2% of them were unexpectedly recognized as entanglement.  The error rate was 2%. 

As the result, we can say that the recognition algorithm for entanglement with cotton swabs is effective.  The recognition of entanglement is clearly shown in [Figure 14](#f14-mder-8-207){ref-type="fig"}. 

The final results of the recognition method for milling through the bone wall and entanglement with cotton swabs are shown in [Table 1](#t1-mder-8-207){ref-type="table"}. 

Discussion
==========

This paper presents a new method for identifying the milling state of an otological drill.  This multi-sensor based otological drill system could be adapted for individual surgeons and identify the early stage of milling through a bone tissue wall or entanglement with a cotton swab in a timely and accurate manner, with few false alarms during the normal milling process.  This identification method could assist surgeons when performing otological procedures with fewer unexpected injuries to patients. 

Our final discriminant for milling through contains two indices, ie, the rate of change of *k~c~* and that of the current signal.  During normal milling, if the current signal increases rapidly only because the surgeon presses hard suddenly, the value of *k~c~* will not undergo a sudden change.  However, when the drill bit is milling through the bone wall, there will be not only a sudden increment of current signal, but also an obvious increment of *k~c~* because of the increased resistance.  Surgeons usually operate carefully, so it seldom happens that the current signal increases suddenly during normal milling.  However, to ensure accuracy, *k~c~* is calculated and plays a complementary role. 

Since the signals in the period of milling through and entangling have something in common, so we use the change rate of *k~c~* as a recognition judgment for both of them.  As a result, some of the signals may fit both of the recognition algorithms.  This will not hinder the decision whether to stop running, since the system just needs to distinguish whether the milling state is normal or abnormal.  When milling is normal, the drill keeps running until the surgeon turns it off, and when milling is abnormal, the drill will turn itself off automatically. 

If you want to differentiate between milling through and entangling, you can delay the time of judging, so that their differences will come out.  However, when using this intelligent system, it is essential to recognize the abnormal state as soon as possible, so we prefer to identify whether the state is abnormal immediately then tell which kind of abnormal state it is. 

The final recognition rates for the abnormal milling states, which were expected to be 100%, are just larger than 90%, so the recognition methods need further improvement. 

The reason for the errors in recognition of milling through perhaps lies in the thresholds, because sometimes the demarcation line of the selected indices between milling through and normal milling are not clear.  For example, if the extra resisting moment acted on the concave bit by the bone cavity is not large enough during milling through, the recognition function may give a wrong result.  Similar reason can be used to explain the recognition errors of entanglement. 

The indices in our final discriminants did not include change in force direction, which may also aid recognition of milling states.  The only use of the two-dimensional force sensor was to calculate the resultant force, but the force direction was ignored, which may be useful to reduce the error rate. 

This work was funded by the National Key Technology R&D Program (2012BAI12B01) for China's 12th Five-year Plan Period. 

**Disclosure**

The authors report no conflicts of interest in this work. 

![ Milling process in otological surgery.](mder-8-207Fig1){#f1-mder-8-207}

![ Force sensors on the sleeve.\
**Notes:** 1, hand shank; 2, strain gauge; 3, protective shield; 4, sleeve; 5, sliding bearing; 6, drill pipe; 7, drill bit.](mder-8-207Fig2){#f2-mder-8-207}

![ Modified drill system.](mder-8-207Fig3){#f3-mder-8-207}

![ Collation map of the initial and reversed force signal of *F~x~* and *F~y~*.\
**Note:** The data in this figure were collected in the process of normal milling.](mder-8-207Fig4){#f4-mder-8-207}

![ Current signal after starting the drill, when we find a slow decline in the current.\
**Note:** The data in this figure were collected in the process of normal milling.](mder-8-207Fig5){#f5-mder-8-207}

![ Scatter diagram of *F~j~ and i* during normal drilling and their fitting curve.](mder-8-207Fig6){#f6-mder-8-207}

![ Comparison of *i*, *F~j~* and *k~t~* during normal milling.\
**Notes:** The data in this figure were collected in the process of normal milling.  The dimension of *k~t~* is determined according to [equation (10)](#fd10-mder-8-207){ref-type="disp-formula"}.](mder-8-207Fig7){#f7-mder-8-207}

![ Functional relationship between *f*(*m*) and *m*, where the horizontal ordinate represents *m* and the vertical ordinate represents *f*(*m*).](mder-8-207Fig8){#f8-mder-8-207}

![ Comparison of the curve of *k~t~* when the *m* values are 0 and 2, where the horizontal ordinates represent time points and the vertical ordinates represent *k~t~*.](mder-8-207Fig9){#f9-mder-8-207}

![ Curve graph between *f*(*m*) and *m* for *m* values of 2 to 3, where the horizontal ordinate represents *m* and the vertical ordinate represents *f*(*m*).\
**Note:** *f*(*m*) is a function defined by [equation (15)](#fd15-mder-8-207){ref-type="disp-formula"}, and *m* is the number of time points by which we shift earlier the time axis of current *i*, as is mentioned in this article.](mder-8-207Fig10){#f10-mder-8-207}

![ Comparison of the curve of *k~t~* for *m* values of 2 and 2.42.](mder-8-207Fig11){#f11-mder-8-207}

![ Sketch of the drill bit when it is milling through the bone wall.](mder-8-207Fig12){#f12-mder-8-207}

![ Recognition of milling through bone tissue wall.\
**Note:** The data in this figure were collected in the process of milling through.](mder-8-207Fig13){#f13-mder-8-207}

![ Recognition of entanglement with cotton swabs (the data in this figure was collected in the process of entanglement).](mder-8-207Fig14){#f14-mder-8-207}

###### 

Final results of the recognition method for abnormal milling states

  Abnormal milling states                    Milling through bone tissue wall   Entanglement with cotton swabs
  ------------------------------------------ ---------------------------------- --------------------------------
  Total test times of abnormal milling       500                                250
  Total test times of normal milling         250                                250
  Recognized instances of abnormal milling   465                                230
  Recognition rate                           93%                                92%
  Error warnings during normal milling       5                                  5
  Error rate                                 2%                                 2%
