The technology described in this document can be embodied in a computer-implemented method that includes receiving a first plurality of values representing a set of current coefficients of an adaptive filter disposed in an active noise cancellation system. The method also includes computing a second plurality of values each of which represents an instantaneous difference between a current coefficient and a corresponding preceding coefficient of the adaptive filter, and estimating, based on the second plurality of values, one or more instantaneous magnitudes of a transfer function that represents an effect of a secondary path of the active noise cancellation system. The method further includes updating the first plurality of values based on estimates of the one or more instantaneous magnitudes to generate a set of updated coefficients for the adaptive filter, and programming the adaptive filter with the set of updated coefficients.