0
\$\begingroup\$

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:

enter image description here

My values are:

wp0=203

wp1=6657000

wp2=31400

wz1=5024

wz2=5024

The code I've used on matlab is:

sys=tf((wp0/s*((s/wz1)+1)((s/wz2)+1))/(((s/wp1)+1((s/wp2)+1))));

bode(sys);

Here is my result:

enter image description here

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?

\$\endgroup\$

1 Answer 1

5
\$\begingroup\$

Phase margin only applies to the open-loop transfer function of a closed-loop system. A compensator has a phase response, but phase margin doesn't make sense unless you add the transfer functions of the rest of the loop.

You would expect the phase of your compensator to start near -90 degrees due to the pole at origin. Once you add your compensator to the system you can then plot the open-loop response of the whole thing and see what the phase margin would be.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you for the answer, is there any other way to check the stability of a compensator? \$\endgroup\$
    – Das D.
    May 30, 2021 at 18:40
  • 3
    \$\begingroup\$ A compensator per se has no stability measure in isolation, it's meant to compensate the response of a control loop. So you check the stability of the whole loop with the compensator added, not the compensator itself. \$\endgroup\$
    – John D
    May 30, 2021 at 19:09
  • \$\begingroup\$ Generally speaking, the compensator by itself (without any feedback) will be designed to be a stable system. Since the poles you chose are in the LHS of the s plane and since the poles at origin / on the imaginary axis ave multiplicity of one, the compensator you designed is a stable system when taken alone by itself without any feedback. There is no further checking required. Just ensure that when you are realising the pole at origin, the component tolerances or the digital realisation errors don't push it to the RHS. \$\endgroup\$
    – AJN
    May 31, 2021 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.