The problem sounds easy, that is, if I would have had an easy function $\phi(k_p, k_i, \omega)$ that defines these ellipses. This function, $\phi$ depends on which transfer system $G(s)$ I am trying to design a controller for. For example if I take $$ G_1 (s) = \frac{1}{(s+1)^3}$$ the function is defined as:
$$\phi(k_p,k_i,\omega) = \frac{1}{(\omega^2+1)^3} \cdot \Big(k_p^2 + (2-6\omega^2)k_p + \frac{k_i^2}{\omega^2} + (2\omega^2 - 6)k_i \Big) + \frac{3}{4}$$
(I don't think it's necessary that I explain why the function is defined like this. If it is, I'll explain that as well).
When I compute for $\omega = 0:0.1:5$ in $\phi$ I get 50 ellipses and the inside envelope is described by a hyperbole*(for this particular system). I have to find the equation of that hyperbole and its maximum.
Now I have tried 2 ways of solving this problem.
The easy way to find an approximate function of the envelope is to pick 5 points on the family of ellipses that the function will go through. I got a pretty good estimate but this has two downsides: I have to pick those points manually, so I can not automate this process in matlab. And it is an approximate function, so I will not find the best values for $k_p$ and $k_i$ for a certain $\omega$. See image below for results.
I also tried to solve this analytically, but that only worked for a simple system, such as $$G_2 (s) = \frac{1}{s^2}$$
This can in fact be solved analytically with matlab's symbolic toolbox and I get a function for the envelope. But for $G_1$, as mentioned above, I get expressions for $\omega$ that are not usable for the analytical method. The expressions contain roots and when substituting this in $\phi$ matlab sort of trips.
The method is simply taking the derivative of $\phi(k_p,k_i,\omega)$ w.r.t. $\omega$, then isolate $\omega$ and finally substitute the $\omega$ found in $\phi(k_p,k_i,\omega)$. $\phi$ is only dependent on $k_p$ and $k_i$ and it will give the envelope of the ellipses. ( used this site) See results below in the image.
So my question is: how do I find the (inside) envelope of these ellipses defined by $\phi(k_p,k_i,w)$, $\omega$ being the parameter of the ellipses?
Do I have to look for the points analytically? Or can I do it some other way? I am really out of ideas.
If there is something missing or my question is not clear, I would gladly explain more.
*I said the envelope was an ellipse, but it was a hyperbole


