Getting frequency of a signal from its phase

encoderfrequency-measurementphasetime

How Can I get the real time frequency of a signal from its encoder phase angle. The encoder gives us a triangular wave from (0-2*pi). If I use derivation, I get discontinuity which provoke spikes.

Thank you.

Best Answer

You need to count how much the phase advances in a certain time period. As for the discontinuities, just add 2*pi each time you get a jump down.