# How do I find a controller for non-minimum phase systems?

Assume that we have a transer function $G(s) = \frac{B}{A}$ which has stable poles, but unstable zeros. We use the controller $Q(s) = \frac{A}{B} = G^{-1}(s)$ and we want that the loop transfer function $L(s) = QG = 1$ due to the feedback transfer function:

$$G_f(s) = \frac{QG}{1 + QG} = \frac{1}{2}$$

But the problem here is that $G^{-1}(s)$ is unstable!

Question:

How can I form the $Q(s)$ controller so $L(s) = c$, where $c$ is a constant for all $G(s)$ and $Q(s)$?

The only option would be $c=0$, but for any other value your system will be unstable. To see this you can use the Nyquist stability criterion. Namely since $L(s)$ is constant it can't make any encirclements around the minus one point, therefore the same number of unstable poles in $L(s)$ will also be present in the closed loop system.

• So is there any method to design $Q(s)$? Jun 25 '18 at 15:09
• I posted an answer now. Jun 25 '18 at 17:35

I think I got an answer to my own question.

We have our transfer function $$G(s) = \frac{B(s)}{A(s)}$$

The best way to find the controller $Q(s)$ is to take the inverse of $G(s)$, but in this case, the zeros of $G(s)$ is positive. That means $G^{-1}(s)$ will be unstable.

The goal of this answer is to find the approximation $G^*(s)$ of $G^{-1}(s)$.

A good choice is to have this:

$$|G(j\omega)G^*(j\omega)| = |G^+(j\omega)G^+(-j\omega)| =1 \forall \omega$$

Where $G^+(s)$ is the positive zero polynomial and $G^-(s)$ is the rest of the zero polynomial.

Example:

$$G(s) = \frac{(s+2)(s-3)}{s^2 + 1}$$

Then $B^+(s) = (s-3)$ and $B^-(s) = (s+2)$

Then we can write $G^*(s)$ as:

$$G^*(s) = \frac{A(s)}{B^+(-s)B^-(s)}$$

But we still have a problem if $deg(A) > deg(B)$, which is very common!

I will then introduce you to this correction transfer function:

$$G^*(s, m, \tau) = \frac{A(s)}{B^+(-s)B^-(s)A_m(s, \tau)}$$

Where $$A_m(s, \tau) = (1+\tau s)(1+ \alpha \tau s)...(1+\alpha ^{m-1}\tau s)$$

Where $\alpha = 0.5-1$ is a tuning factor and $\tau$ is the time constant, not from $G(s)$. It's a tuning factor as well.

The choice of $\alpha = 1$ gives a multiple pole in $s = -\frac{1}{\tau}$ for degree $m >= deg(A) - deg(B)$.

Now to an example!

Let's say that we have a transfer function of a LTI system:

$$G(s) = \frac{b_0s - b_1}{as^2 + a_0s + a_1} = \frac{3s - 2}{s^2 + 3s + 1}$$

Where $B^+(s) = 3s-2$ and $B^-(s) = 1$

The inverse $G^{-1}$ looks like this:

And the $G(s)$ looks like this:

My working frequency is very low, because I want to deal with self tuning controllers, that means I will set say that

$$|G(j\omega)G^*(j\omega)| = 1 , [0 <= \omega <= 10]$$

That's my goal!

Now we need to focus on cutting frequency. We want to cut at $10$ rad/s , that means there is going to be a some dB difference between $|G^{-1}(j10)|$ and $|G^*(j10)|$.

Too choose $m$ and $\alpha$ and $\tau$ we say that:

$m = 2$, because $deg(A) - deg(B) = 1$ and $deg(A) > deg(B)$. The zeros need to be at least many as the poles, or else, our transfer function won't be proper!

That means we need to have an extra pole in $s = -\frac{1}{\tau}$ so $deg(A) = deg(B)$. The solution is $\alpha = 1$

Now we need to select $\tau$. Then we using the bandwidth formula:

$$\omega _b \tau = \sqrt{2^{1/m} - 1}$$

We know $\omega _b = 10$ rad/s and $m = 2$. Then we can find out that

$$\tau = \frac{\sqrt{2^{1/m} - 1}}{\omega _b} = \frac{\sqrt{2^{1/2} - 1}}{10} = 0.0643594$$

Now we can choos $A_m(s,\tau)$ as

$$A_2(s, \tau) = (1+ \alpha^{1-1}\tau s)(1+\alpha ^{2-1} \tau s) = (1+\tau s)^2$$

beacuse $m = 2$ and $\alpha = 1$. Remember: $1^0 = 1^1$.

Anyway

$$A_2(s, 0.0643594) = (1+0.0643594s)^2$$

And now $G^*(s)$ is:

$$G^*(s) = \frac{A(s)}{B^+(-s)B^-(s)(A_m(s,\tau)}= \frac{s^2 + 3s + 1}{(-3s - 2)1(1+0.0643594s)^2}$$

Simulating $G^*(s)$ will show us the blue line:

Now it's time for bode plotting

$$|G(j\omega)G^*(j\omega)|$$

Very good!

If you don't want to compute to much, you can set:

• $\alpha = 1$
• $m = 2$
• $\tau$ = 0.00000001 or a very low number

if you dealing with a second order non-minimum phase system.

The result will be:

So let's go controll engineers and control theorists, create invertible controllers like never before!

• Maybe you should look into the areas of lambda-tuning/internal model control/Youla-Kucera parameterizations (in increasing order of complexity/generality) which essentially does this. If that is where you've taken the answer, you should perhaps add a suitable reference/link, so no-one reinvents the wheel. Jun 25 '18 at 18:15
• I have never heard about that. The issue I try to solve is self tuning controllers for a non-minimum phase system. Jun 25 '18 at 18:34
• I wonder if those formulas works for discrete systems? Jun 25 '18 at 18:40
• I would assume the theory is well developed also for the discrete-time case. These are classical problems from the 60s and 70s. Jun 25 '18 at 18:51
• Yes. Even if the problems is from 60's and 70's, that means that they exist today too? Most of the PID-controllers I have been installed has autotuning. I have not meet an MPC yet, but I probably will in the future. Jun 25 '18 at 19:26