From the series: Control Systems in Practice

*
Brian Douglas, MathWorks
*

We like to categorize transfer functions into groups and label them because it helps us understand how a particular system will behave simply by knowing the group that it’s part of. We gain some insight into the system if we know, for example, that we’re dealing with a type 1, second-order transfer function. In a similar way, we can glean some additional information about how our system will behave if we know whether it’s a minimum phase or non-minimum phase system. So, in this video, we’re going to talk about what minimum phase means, what causes a non-minimum phase system, and how that impacts the system behavior.

We like to categorize transfer functions into groups and label them because it helps us understand how a particular system will behave simply by knowing the group that it’s part of. We gain some insight into the system if we know, for example, that we’re dealing with a type 1, second-order transfer function. In a similar way, we can glean some additional information about how our system will behave if we know whether it’s a minimum phase or non-minimum phase system. So, in this video, we’re going to talk about what minimum phase means, what causes a non-minimum phase system, and how that impacts the system behavior. So, I hope you stick around for it. I’m Brian, and welcome to a MATLAB Tech Talk.

We can graph the frequency response of a transfer function with a Bode plot. For example, the Bode plot for (s+2)/(s^2 + 3s + 1) looks like this. The top graph shows how the magnitude of the input signal is altered for each frequency in the spectrum and the bottom graph shows how the phase is shifted for each frequency. And from this we can see that if we input a 1 rad/s sine wave into this system the output signal would have a magnitude around 2.6 dB lower and the signal would be shifted about -64 degrees. Or in other words, the input signal would be delayed by about 1/6th of a cycle and the amplitude would be a little bit lower.

Here’s something interesting, though. This isn’t the only transfer function that can create this specific magnitude response. We can create any number of transfer functions that produce this but that all have different phase responses. So, the top graph will be the same but the bottom graph will be different.

For example, we could simply add a time delay into our system. If we delay the signal by some amount of time - like the 1 second that I’m doing here, that won’t impact the size of the signal, it’ll just shift it in time affecting the phase. And we can see this is the case when we graph the frequency response. Notice that the magnitude response is the same, but we’ve added additional phase. The jaggedness of the phase plot at higher frequencies is the result of how I’m wrapping the signal when I plot it so that it stays between + and - 180 degrees. If we input a 1 rad/s sine wave into this function, the phase will be shifted about -122 degrees. So, adding additional delay into the system is one way to affect just the phase.

The other way is to move one or more of the transfer function zeros from the left half plane over into the right half plane. For this transfer function, we can move the zero from s = -2 over into the right half plane at s = +2. And check this out, this transfer function also has the same magnitude, but again not the same phase shift.

So, we have three different transfer functions, and each have the same frequency response magnitude, but different phase. And with this we can talk about the concept of minimum phase and non-minimum phase systems. The transfer function (s+2)/(s^2 + 3s + 1) is the minimum phase system for this particular magnitude response, and the other two transfer functions are non-minimum phase systems, which hopefully is obvious from the fact that there is additional phase. Interestingly, even though there is only one minimum phase system for a given magnitude response, there are an infinite number of non-minimum phase systems, which is why you never hear the term maximum phase system. There is no maximum phase shift since we could just delay the signal by any amount of time we want. I suppose a system with infinite time delay, one that just blocks the signal completely would be a maximum phase system but clearly that’s not useful.

OK, now let’s look at the step response for each of these transfer functions and see how the additional phase lag impacts the system in the time domain. The step response for the minimum phase system is the blue line on the far left, and the delayed response the green line, predictably just shifts the response to the right by the amount of the delay. The interesting thing here is that the right half plane zero causes the step response to dip in the wrong direction first before recovering back to the same steady state value as the other two. So, both non-minimum phase systems produce what looks like a delayed response and this makes sense because there is additional phase lag in both of these systems.

OK, these are the two ways that we can create non-minimum phase systems, with a pure transport delay and with right half plane zeros. We have other videos that talk about transport delay and I’ve linked to those videos in the description. So, in this video, I want to focus solely on transfer functions that have a right half plane zero, the systems that exhibit this behavior where the response initially moves in the "wrong" direction before correcting itself. And to begin, let’s look at some systems that exhibit this behavior in real life, and see if we can gain a little intuition about what causes it and how it impacts our ability to control it.

We encounter systems that initially move in the wrong direction all the time, even if it’s so insignificant as to not be noticed. A classic example is pitching an aircraft up to increase its altitude. When the elevator is deflected up, this causes a downward force on the tail which provides the nose up pitching torque. That downward force however also pulls the whole aircraft down, slightly lowering the altitude before the airplane has a chance to rotate and increase the lift from the wings. So, if you pull back on the control stick, the airplane will drop slightly before heading back up in the direction you intend. In this case, the dynamics of the system itself has a right half plane zero, and we need to be aware of that when designing a pitch controller for it. We’ll come back to this idea in just a second.

For the aircraft, the dynamics were the cause of the right half plane zero, but sometimes the feedback controller is responsible for the right half plane zero. Think about the case with a control system that is trying to balance an inverted pendulum on a cart while at the same time moving the cart to a particular location. To move the cart to the right, the controller first needs to move left to get the pendulum angled correctly, and then move to the right.

We can see this in action with the inverted pendulum example in MATLAB. I’m not going to go through the details of this example, but I recommend checking it out if you want to see how to build a controller for this system yourself. If you just run the default example, it’ll show you the result of a tuned control system and a whole bunch of graphs will pop up. The only thing I want to point out for this video is that when the cart is commanded to step some distance to the right, you can see that it does in fact move slightly left first. You can see in the root locus that the open loop transfer function ̶̶̶— that’s the system dynamics and the controller — have a pair of complex conjugate right half plane zeros. This is what causes the cart to move left before moving right.

Actually, for each right half plane zero, the system switches directions. So for two zeros like we have here, we’d expect the cart to move right, left and right again. And if we zoom in on the graph, we can see that this is in fact the case! So that’s pretty cool!

We can even see this sort of double motion that the cart does using the mechanics explorer to animate the inverted pendulum. It does this quick right left right dance at the beginning. Now, I’m not sure this is necessary for the solution. I think you solve it with a single right half plane zero and just move the cart left and then right, but at the very least, with this solution we can see the result of having one or more right half plane zeros.

So, the question you might have is why does a right half plane zero cause this strange negative direction behavior?

Let’s take our transfer function from earlier, (s+2)/(s^2 + 3s + 1), and break it into two parts, the numerator and the denominator. In this way, it’s easier to see that the numerator or the zeros affect the input into the system, and the denominator or the poles affect the response and the stability of the system. So, the input is modified in some way by the zeros first, before being affected by the poles.

If we take the inverse Laplace transform of the numerator so that we can see what this is doing in the time domain, we get that the output of this function is the derivative of the input plus two times the input. Therefore, we double whatever the input signal is and add it to its derivative to get the modified signal. This modified input signal is then the input into the remaining transfer function. For the left half plane zeros, the derivative and the signal tend to complement each other since a positive derivative means the signal is moving in the positive direction. So, when you add them together, they amplify their positiveness and this more positive signal can be thought of as the input signal into the second half of the transfer function, which would then respond accordingly.

On the other hand, with a RHP zero, the s is negative, therefore the derivative is negative which counters the direction the input signal is heading in. For example, if the input signal is a step, there is that initial impulse in the wrong direction from the derivative of the step. This is what is causing the initial wrong direction move. We’ve modified the input with a wrong direction impulse which then is fed into the remaining transfer function.

OK, now that we know why the negative direction dip occurs, we can talk about why it’s harder to control systems with these RHP zeros. First off, if we just think about it, it makes that if you have to move in the wrong direction first, then it’s going to be a slower response than just moving in the right direction to begin with. And if you tried to increase the speed of the response by increasing the gain of the controller you could get yourself into trouble.

Take the airplane pitch example, and say you’ve designed a super-fast linear controller that could respond to disturbances and errors in the system much faster than the dynamics. You request that the airplane raise its altitude by 100 meters, and you want to do it quickly. The controller deflects the elevator up, which causes a downward force, dropping the altitude a couple of meters. The fast controller recognizes that the error has increased to 102 meters and so it requests even more elevator, increasing the force more, dropping the plane further, and therefore requesting more elevator and so on. Putting the system into an unstable situation that will eventually max out the elevator range, at which point the airplane will pitch up rapidly and possibly stall or worse. So clearly not a good situation!

We can see that this instability occurs in a more mathematical sense by looking at the phase margin. Let me bring up the Bode plot from earlier with the transfer functions and display the phase margins. There are about 124 degrees of phase margin for the minimum phase system and about 86 degrees of phase margin for the two non-minimum phase systems. The fact that they are this close to each other is coincidence. As I said earlier, we could have chosen any other delay time and that would have moved these curves away from each other. The thing to note, though, is that the phase margin is smaller for the non-minimum phase systems because of the additional phase lag. And lower phase margin means that your system is more sensitive to any additional phase in the system and, therefore, more at risk of becoming unstable.

Also, these non-minimum phase systems are more susceptible to increased gain as well. If we increase the gain of the system, that moves this red line up, which increases the crossover frequency. Since phase margin is defined at the gain crossover frequency, we need to follow this down to find that there is more phase lag here and therefore less phase margin.

Or if you prefer to work with a root locus plot instead, we can see the same phenomenon. As a root locus plot shows, as we increase the gain in the feedback loop, the closed loop poles travel from the open loop poles to the open loop zeros. And if there is one or more open loop zeros in the right half plane, then as you increase the gain in the system, the closed loop poles will be dragged over to the right half plane as well, creating an unstable system. In the Control System Designer app in MATLAB, the pink boxes are the locations of the closed loop poles for a given gain. And as I drag them to the right, this is increasing the gain, and eventually the system will go unstable. So, just like we reasoned through with the airplane example, increasing the gain in the system, or speeding up the controller will cause instability for non-minimum phase systems.

What can we do about this? Well, we may be tempted to try to cancel the right half plane zero in the dynamics by placing a right half plane pole directly over it with the controller. This is a bad idea because this creates an unstable controller which could generate some unbounded controller commands even if the whole system itself appears to be stable.

We could also handle non-minimum phase systems with predictive controllers or other nonlinear approaches. However, the easiest solution is just to slow the system down by lowering the controller gain. If the control system can’t react fast enough to the error generated by the non-minimum phase components, then it will behave as though they weren’t there in the first place. For the airplane, if the pitch controller couldn’t move the elevator very quickly, then it wouldn’t be able to request too much elevator motion before the airplane had a chance to recover from its initial dip in altitude.

Of course, this solution produces something that is stable, but at the cost of being more sluggish and having lower performance, but that is a typical result for systems with delay. And delay is a byproduct of non-minimum phase systems.

OK, that’s where I’m going to leave this video. I really just wanted to provide a general understanding of what non-minimum phase systems are and how they impact your system’s response to inputs. Hopefully, now if you see a linear system that responds initially in the wrong direction, you’ll have a better understanding of its cause and you’ll be in a better position to figure out how to deal with it.

If you don’t want to miss any future Tech Talk videos, don’t forget to subscribe to this channel. Also, if you want to check out my channel, Control System Lectures, I cover more control theory topics there as well. Thanks for watching. I’ll see you next time.