  The dynamic time warping (DTW) distance has been used as a misfit function
for wave-equation inversion to mitigate the local minima issue. However, the
original DTW distance is not smooth; therefore it can yield a strong
discontinuity in the adjoint source. Such a weakness does not help nonlinear
inverse problems converge to a plausible minimum by any means. We therefore
introduce for the first time in geophysics the smooth DTW distance, which has
demonstrated its performance in time series classification, clustering, and
prediction as the loss function. The fundamental idea of such a distance is to
replace the $\min$ operator with its smooth relaxation. Then it becomes
possible to define the analytic derivative of DTW distance. The new misfit
function is entitled to the differentiable DTW distance. Moreover, considering
that the warping path is an indicator of the traveltime difference between the
observed and synthetic trace, a penalization term is constructed based on the
warping path such that the misfit accumulation by the penalized differentiable
DTW distance is weighted in favor of the traveltime difference. Numerical
examples demonstrate the advantage of the penalized differentiable DTW misfit
function over the conventional non-differentiable one.
