Due to the high power density and wide speed range, a permanent magnet synchronous motor (PMSM) is commonly used in industry. Efficient production requires optimized motion control of the mechanism driven by the PMSM. Unfortunately, designing the controller is usually based on a model of the mechanism without including parameters originating from the motor. Cogging stiffness originates from the magnetic forces between rotor magnets and stator teeth and is one of these forgotten parameters. The performance is sub-optimal when this stiffness is not considered during control design. The stiffness also changes over time due to changing load conditions such as temperature. Aiming for optimized motion control of high-speed mechanisms, this article proposes to expand the classic motion controller with an on-line stiffness tracker. The tracker is based on the sliding discrete Fourier transform (SDFT). The tracking technique is conceptually analyzed and experimentally validated on a PMSM-driven rod. The classic Welch technique having an update time of at least 100 s is used as a benchmark. With similar accuracy and a much faster update time of 1.25 ms, the stiffness is tracked on-line using SDFT. The developed stiffness tracker is implemented on the provided commercial motion controller, proving its computational efficiency.