# Find optimal gains transfer function

I have the following closed loop transfer function:

$$G(s) = \frac{K(s^2 + 200^2)}{0.05s^3 + (1+K)s^2 + 200{K_v}s + 200K}$$

Where $K$ and $K_v$ are gains.

My goal is to find the optimal gains in order to have a settling time under 0.5 seconds and as low as possible overshoot.

Using Routh-Hurwitz I obtained the following constraints:

$$K > 0$$ $$Kv > \frac{0.05K}{1+K}$$

Is there any suggestions how to find the gains?

Thank you.

• What does "best response for step function" mean. Define "best". Commented May 12, 2018 at 11:09
• Rise time, settling time, overshoot
– Ben
Commented May 12, 2018 at 11:17
• Well, you can't have best rise time with best settling time and best overshoot so define what you want. Also please arrange your question so that it shows a recognizable equation for the transfer function. I have no idea what "[K 0 K*200^2],[0.05 (1+K) Kv*200 K*200]" means. Commented May 12, 2018 at 11:24

If you specify a rise time, then you must also specify the working frequency. It could be deduced as $\omega_0=(200K)^{1/3}$. Saying K>0 means no clear information, it could be as low as 1f (or lower), or as high as 1T (or greater). Which means that the 0.5s time is tied to $\omega_0$. Once you have it, you can use either some optimization program, or some simulator of choice to step the value for Kv, then manually determine a "best" value.

I would have just made this a comment, but it turned out a bit more. Here's, for example, what a simulation for K=1 means: Kv>0.025 so step the value from 0.05 to, say 0.25:

with a step response like this:

Since there's no automatic tuning, zooming in over the responses reveals that the best response for an imposed settling time is between the pink (5th, Kv=150m) and grey (6th, Kv=175m) traces:

Stepping with a 5m step reveals the best values are between Kv=160m and Kv=170m:

And, finally, with a 1m step:

The green trace seems to be the one, which is Kv=163m. The tuning can go on from here, if needed.