2
\$\begingroup\$

I am trying to calculate gains ( Kp, Ki, Kd ) of a PID controller. I have to improve the response of a plant. I already have the Transfer function of the plant.

I was wondering if matlab has some command for calculation of controller gains ( kp ki and kd ) from the transfer function of the plant and it finds those gains based on certain parameters ( less than 5% OS, no Steady State error )

PS - I would highly appreciate solutions other than simulink

EDIT:

TF = 1.546/s+0.497

\$\endgroup\$
2
  • \$\begingroup\$ Can you let us know what the transfer function of the plant is? Will the controller run in continuous time or discrete time? \$\endgroup\$
    – akellyirl
    Commented Apr 7, 2014 at 12:24
  • \$\begingroup\$ @akellyirl see edit \$\endgroup\$
    – sukhvir
    Commented Apr 7, 2014 at 12:42

1 Answer 1

1
\$\begingroup\$

Your Plant transfer function is a simple pole (1st order).

From a theoretical perspective your controller requirement is first order including an integrator for non-zero error. This is also known as a PI controller.

My advice is to proceed as follows:

  1. Consider the controller to be k(s+a)/s i.e. an integrator, a zero and a gain; a.k.a a PI controller
  2. Select a so that it is 2x the pole frequency of the plant (i.e. 2* 0.497)
  3. Convert pole zero values to P and I coefficients.

This design will yield approximately 70 degrees of Phase Margin. Use SISOTOOL in Matlab to tune for overshoot.

Alternatively, you could easily calculate overshoot based on ZETA from closed loop equations or from open loop Phase Margin... a so called "paper design". The following graph is useful for finding out how Damping Ratio and Phase Margin Equate to Overshoot requirements.

enter image description here

The conversion from ZPK (zero-pole-gain) model to PI follows from simple algebra by setting the PI transfer function equal to the zpk version and identifying the parameter equivalence by inspection. For example:

Kp + Ki/s = k(s+b)/s

(sKp + Ki)/s = k(s + b)/s

Kp(s + Ki/Kp) = k(s + b)

so Kp = k and Ki = Kp.b

\$\endgroup\$
0

Your Answer

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

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