I've designed a Type 3 compensator and wanted to see it's bode plot on matlab.
Here is the transfer function of type 3 compensator:
My values are:
The code I've used on matlab is:
Here is my result:
As you can see here, the phase margin has a negative value but it should be positive. I can't find the problem, what's my mistake here?