How to calculate the frequency, phase shift and duty …