A sinusoidal variable is generated at the output of a PI controller. It has switching frequency ripple. I tried zero crossing detection of this variable. However, there is multiple zero crossings at the zero crossings. Kindly let me know the best way to do this zero crossing detection through software.
Thanks and regards,.