Electronic – How to make a PLL output the phase modulo 360°

controldigital-logicpll

I have made a PLL to obtain the mechanical angle encoded in quadrature sine signals (the envelope of a resolver output) ; it implements: error=in-out is approximatively equal to sin(in-out)=sin(in)cos(out)-cos(in)sin(out)).

I tuned the controller with Simulink's control toolbox and the PLL works, however I can only seem to get unbounded angles out of it, i.e. the angle output increases with time without bounds beyond 360°. I tried putting a modulo 2*pi operation inside the PLL at this location, but it throws off everything and the loop fails (certainly because of non-linearity):

enter image description here

How to make this PLL output a bounded angle (between -180° and 180°)? Meaning, obtain a sawtooth between -180° and 180° on the considered block diagram.

Best Answer

Related Topic