Compilation of Nyquist Plot Pages

This document comprises the bulk of the text describing the Nyquist, and is formatted slightly differently to facilitate printing.

Contents


The Nyquist Plot

The Nyquist plot (one is shown in the video above) is a very useful tool for determining the stability of a system.  It has advantages over the root locus and Routh-Horwitz because it easily handles time delays.  However, it is most useful because it gives us a way to use the Bode plot to determine stability.  We can not only use the Bode plot to determine stability, but it also gives us insight on how to improve the stability of a system.  To fully understand the Bode plot based methods for determining stability it is important to first understand the Nyquist plot.  This presents some difficulties because the Nyquist plot uses some rather abstract mathematical techniques.  These web pages try to demystify the process by starting with some simple examples (with animations) and then proceeding to more complicated examples.  The treatment given here is not meant to be mathematically rigorous (it does not even use contour integration in the complex plane), but rather to give engineering students an intuition for what the Nyquist plot represents, and how it is used to determine the stability of a system.

The next several documents describe the Nyquist plot.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Mapping in the Complex Plane

Contents

Mapping in the Complex Plane

The mapping of functions in the complex plane is conceptually simple, but will lead us to a very powerful technique for determining system stability.  In addition it will give us insight into how to avoid instability.  To introduce the concept we will start with some simple examples.  There are several videos on this page - they merely support the written material, but are not absolutely vital.

Mapping of Functions with a Single Zero

The simplest functions to map are those with a single zero.  Several examples follow.

Example: Mapping with circle in "s", zero at the origin in "L(s)"

Consider the trivial function L(s)=s (we will deal with more complicated functions later, this simple function allows us to introduce concepts associated with mapping). We let the variable s traverse a circular path centered at the origin with a radius of 5 moving in the clockwise direction (the left side graph),   In other words

We then plot L(s) on the right hand graph.  This is shown in the image below, followed soon thereafter by a video that better demonstrates the mapping.

Notes about image above

There are several aspects about the image above that are important (many of these come up later):

Video: Mapping with a single zero

2½ minute video created with the Matlab script NyquistGui)

 

Example: Mapping with circle in "s", zero at s=-4

If we now place a zero at s=-4 so that L(s)=s+4, the mapping is still very straightforward.  Every location in "s" simply maps to a location that is 4 units to the right in "L(s)".  The path in s remains as before. (Note: this example is also considered as part of the video above.)

Notes about image above

Example: Mapping with circle in "s", zero at s=-6

If we now place a zero at s=-4 so that L(s)=s+6, the mapping is still very straightforward.  Every location in "s" simply maps to a location that is 4 units to the right in "L(s)."  The path in s remains as before. (Note: this example is also considered as part of the video above.)

Notes about image above

Comments about mapping with a pole in "L(s)"

There are three important, and general, statements we can now make about mapping from "s" to "L(s)" when there is a zero in "L(s)":

  1. If the path in "s" is in the clockwise direction, then the path in "L(s)" is in the clockwise direction.
  2. As the path in "s" gets close to the zero in "L(s)" the path in "L(s)" goes to its smallest value.
  3. If the path in "s" encircles the pole of "L(s)," then the path in "L(s)" encircles the origin once in the same direction.

Mapping with a single pole

Mapping of functions with a single pole is not much more difficult than mapping with a single zero.   There are two important facts about encirclements of poles that can be shown by considering L(s) with a single pole at the origin, and the path in "s" being a clockwise circle of radius 'r' around the origin:

  1. The first characteristic to be realized is that as the path in "s" comes close to a pole, the path in "L(s)" gets large
                        
    Clearly as the radius of the encirclement, r, becomes small, the magnitude of L(s) becomes large.
  2. The second characteristic is that the path in "L(s)" is in the opposite direction of the path in "s."  In this example, the path in "s" is clockwise, so the path in "L(s)" is counterclockwise.
                        

The mapping around various functions, L(s), with a single poles are shown in the diagrams in the examples below, followed by a video that shows several functions.   Each example in the video is also included in the examples that follow.  It is useful to read the examples before viewing the video.

Example: Mapping with circle in "s", pole at origin

If we choose L(s) such that it has a pole at the origin,


(note: the constant multiplier makes the plots looks nicer, but isn't necessary for the mathematics to work)

and we let s follow the same path as before

We get

Because the ewas originally in the denominator, its sign is changed when it moves to the numerator.  In other words, the path in "L(s)" is a circle of radius 2 that encircles the origin once in the clockwise direction. 

Notes about image above

Example: Mapping with circle in "s", pole at s=-4

If we now place a pole at s=-4 so that


Note: this example is also considered as part of the video above.)

The path in s remains as before, but the path in "L(s)" has changed.   The center and extent of the path in "L(s)" have both changed. 

(note: if you can show that the path in "L(s)" is also a circle and derive equations for the radius and center, I'll include it here, with an acknowledgement for the first person who sent it to me)

Notes about image above

Example: Mapping with circle in "s", pole at s=-6

If we now place a pole at s=-6 so that


Note: this example is also considered as part of the video above.)

The path in s remains as before, but the path in "L(s)" has changed.   The center and extent of the path in "L(s)" have both changed. 

Notes about image above

Example: Mapping with circle in "s", pole at s=-4.8

If we now place a pole at s=-4.8 so that


Note: this example is also considered as part of the video above.)

The path in s remains as before, but the path in "L(s)" has changed.   The center and extent of the path in "L(s)" have both changed.   The shape

(note: if you can show that the path in "L(s)" is also a circle and derive equations for the radius and center, I'll include it here, with an acknowledgement for the first one to send it to me)

Notes about image above

Video: Mapping with a single pole

(2½ minute video created with the Matlab script NyquistGui)

Comments about mapping with a pole in "L(s)"

There are thee important, and general, statements we can now make about mapping from "s" to "L(s)" when there is a pole in "L(s)":

  1. If the path in "s" is in the clockwise direction, then the path in "L(s)" is in the counterclockwise direction.
  2. As the path in "s" gets close to the pole in "L(s)" the path in "L(s)" goes to its largest value.
  3. If the path in "s" encircles the pole of "L(s)," then the path in "L(s)" encircles the origin once in the opposite direction.

Mapping with multiple poles and/or zeros

If you understand the concept of mapping of functions with individual poles and zeros, it is not much harder to understand mapping of functions with multiple poles and zeros.  A few examples will illustrate this.  You should read through the first example carefully, it has a lot of important information.

Example:  L(s) has two poles, one zero; all are encircled

Consider mapping of the transfer function

where s follows a clockwise circular path of radius 5 around the origin , as before.

To get an idea of what the mapping will look like, let's express the function in polar notation.

At this point we are mostly interested in the angle of L(s), so lets examine it more closely.

Recall that, in general, the angle

is determined by drawing a line from s0 to s, and finding the angle between that line and the horizontal (described here).  So if we let s0=-2, then the angle

would be determined by drawing a line from s=-2 to s and finding the angle to the horizontal.  This is shown in the diagram below on the left for angles between the location s=-5j to the zero at -2, and the poles at -1 and -3.

Since the angle of L(s) is given by

then this is the angle shown in the image above on the right.  Since we know the first term in the angle of L(s) goes from 0→-2*π,  and we subtract the other two terms, then the angle of L(s) must go from 0→2*π,  that is it encircles the origin once in the counterclockwise direction.  This can be seen in the image below, and in the video that follows.

Notes about image above

Aside: Magnitude of L(s)

The magnitude of L(s) is given by

This means that if s is very close to a zero (i.e., near s=-2) that the magnitude of L(s) becomes very small, and if s is very close to a pole (i.e., near s=-1 or s=-3) that the magnitude of L(s) becomes very large.

Key Concept: Magnitude and phase of L(s)

The phase of L(s) is simply the sum of the angles from the zeros of L(s) to s, minus the angles from the poles of L(s) to s.

The magnitude of L(s) is small near zeros of L(s) and large near poles of L(s).

Example:  L(s) has two poles, one zero, one pole; one zero is encircled

Now if we change the transfer function to

then the path in s encircles the zero, but only one of the poles.

Notes about image above

Example: L(s) has two poles, one zero; one zero is encircled

Now if

then the path in "s" encircles only the zero

Notes about image above

Example:  L(s) has two poles, one zero; two poles are encircled

Now if

then the path in "s" encircles only the zero

Notes about image above

Example:  L(s) has two complex conjugate poles encircled by s

Consider

Poles at -2±4j which are inside a circle with radius 5.

 

Notes about image above

Example:  L(s) has two complex conjugate poles not encircled by s

Consider

Poles at -4±4j, which are outside a circle of radius 5.

Notes about image above

 Video: Mapping with a multiple poles and zeros
 (3½ minute video created with the Matlab script NyquistGui)

The path in "s" need not be circular

Nothing that we have done so far depends on the fact that the path in "s" be circular, which is important to the development of the Nyquist stability criterion on the next web page.  Two examples below (and a video) demonstrate this.  In the first example, immediately below, the path in "s" encircles a zero in the clockwise direction, and the path in "L(s)" encircles the origin in the same direction.  In this first example L(s)=s, i.e., there is a zero at the origin.

In the second example, below, the path in "s" encircles a pole in the clockwise direction, and the path in "L(s)" encircles the origin in the opposite direction, Though the path is a very different shape.  Note also that where the distance from the path in "s" to the pole is minimal (i.e., where the path is light blue), then the distance of path in "L(s)" to the origin is maximal  (and where the distance in "s" is maximal (where the path is red), the distance in "L(s)" is minimal). In this example L(s)=10/(s+6), i.e., there is a pole at s=-6.

 Video: Mapping with a multiple poles and zeros
 (2 minute video created with the Matlab script NyquistGui))


Key Concept: Mapping from "s" to "L(s)"

The key points to keep in mind as you move to the next page:

Moving Forward

After reading through the material above, the question arises "So what?".  What we have done here is introduce a technique that gives use information about the number of poles and zeros in a closed contour.  To determine the stability of a system, we want to determine if a system's transfer function has any of poles in the right half plane.  With just a little more work, we can define our contour in "s" as the entire right half plane - then we can use this to determine if there are any poles in the right half plane.

 


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Determining Stability using the Nyquist Plot

Contents

Statement of the Problem

Given a single loop feedback system

we would like to be able to determine whether or not the closed loop system, T(s), is stable.  This is equivalent to asking whether the denominator of the transfer function (which is the characteristic equation of the system)

has any zeros in the right half of the s-plane (recall that the natural response of a transfer function with poles in the right half plane grows exponentially with time).

If we perform a mapping (as explained on the previous page) of the function "1+L(s)" with a path in "s" that encircle the entire right half plane and we count the encirclements of the origin in the "1+L(s)" domain in the clockwise direction we get the number N=Z-P (where Z is the number of zeros, and P is the number of poles).  What we want, though, is Z, the number of zeros in the right half plane.  But since we know L(s), we can easily find P, the numbers of poles of "1+L(s)."  This is because any pole of L(s) is also a pole of "1+L(s)."  So now we know N (from the mapping) and we know P (from L(s)), so we can easily determine Z.

Before continuing we make one small change.  Instead of mapping from "s" to "1+L(s)" and counting encirclements of the origin, we map from "s" to "L(s)" and count encirclements of the point -1+j0 in the complex plane.  This is because the origin in "1+L(s)" corresponds to the "-1+j0" point in "L(s)" (if L(s)=-1, then 1+L(s)=0).

Key Concept: Statement of the Problem

To determine the stability of a system we:

The Nyquist Path (with no poles on the jω axis).

In the previous section, we specified that the path of s should enclose the entire right half plane.  To start, we assume that the function L(s) has no poles on the jω axis. We define the path as starting at the origin, moving up the imaginary axis to j∞, following a semicircle (in the clockwise direction), and then moving up the -jω axis and ending at the origin.  This is shown below.

Let's examine this procedure with a couple of examples (followed by a video of the two examples).  A variety of examples follow on the next page (Examples).

Example: Nyquist path, no poles on jω axis, stable

Consider a system with plant G(s), and unity gain feedback (H(s)=1)

If we map this function from "s" to "L(s)" with the variable s following the Nyquist path we get the following image (note: the image on the left is the "Nyquist path" the image on the right is called the "Nyquist plot")

If we zoom in on the graph in "L(s)"

the first thing we notice is the multiple arrowheads at the origin.  This is because as the path in "s" traverses a semicircle at ∞ the path in "L(s)" remains at the origin, but the angle of L(s) changes.  More importantly, we can see that it does not encircle the -1+j0, so N=0.  We also know that P=0, and since N=Z-P, Z is also equal to zero.  This tells us that the system is stable.   And, if we close the loop, we find that the characteristic equation of the closed loop transfer function is

which has roots at -2±17.2j so the system is indeed stable.  Recall that the roots of the characteristic equation are the poles of the transfer function.   

Behavior of the Nyquist path when |s|→∞

A very large segment of the path in "s" occurs when |s|→∞, shown as the large semicircle in the s-domain plot (i.e., the left plot).  However, during this segment of the plot, the path in L(s) will not move, assuming L(s) is a proper transfer function.  The order of the numerator polynomial of a proper transfer function is less than or equal to that of the denominator.  Let's consider, first, the case when the order of both polynomials is equal to n:

If |s|→∞, then the highest order term of the polynomial dominates and we get

So, when |s|→∞ the path in L(s) is at a single point.   (Note: In the Nyquist diagrams, since there are several arrowheads on the path in "s" as it makes it excursion at infinity, there are also several arrowheads at this single point in "L(s).")

If the loop gain, L(s), is strictly proper (i.e., the order of the numerator is less than that of the denominator)

then

and the path in L(s) is at the origin while |s|→∞.

Example: Nyquist path, no poles on jω axis, unstable

Consider the previous system, with a sensor in the feedback loop

 

If we map this function from "s" to "L(s)" with the variable s following the Nyquist path we get the following image

 

We can see that this graph encircles the -1+j0 twice in the clockwise direction so N=2.  We also know that P=0, and since N=Z-P, we can calculate that Z=2.  This tells us that the system is unstable, because the characteristic equation of the  closed loop transfer function has two zeros in the right half plane (or, equivalently, the transfer function has two poles there).   We can check this by closing the loop to get the characteristic equation of the closed loop transfer function:

 

which has roots at s=-7.5 and s=1.26±8.45j so the system is indeed unstable with two poles in the right half plane.

Video: Mapping with no poles on the jω axis

1 minute video created with the Matlab script NyquistGui

The Nyquist Path (with poles on the jω axis).

If there are poles on the jω axis, we can no longer use the Nyquist Path as specified above because the path will go through poles of L(s) where its value is undefined.  To handle that situation we make small "detours" around the poles that are on the axis.  These detours are small semicircles in the counterclockwise direction around these poles (so that the path stays in the right half plane),  However, we make the radius of the detours infinitesimally small, so they don't exclude any part of the right half plane.  For instance if we have

The path now makes small semicircular detour of infinitesimally small radius around the poles at s=±j4.  However, because the path is so close to the pole, the magnitude of the path in "L(s)" is at infinity.  And because the path is going around the pole in the counterclockwise direction in "s" the path in "L(s)" is in the clockwise direction.  This is shown below (in this diagram the radius of the detours is exaggerated so they can be seen on the graph).

Note that:

Again, we can double check this by finding the zeros of the characteristic equation.

This has roots at s=-0.25±j2.63, so the system is stable.

Video: Mapping with poles on the jω axis

1½ minute video created with the Matlab script NyquistGui

Key Concept: Detours around poles on the jω axis

If the path in "s" makes a 180° counterclockwise detour around a pole on the jω axis, then the corresponding path in "L(s)" has infinite radius and goes through 180° in the clockwise direction.  If the detour in "s" is around  two coincident poles (e.g., two poles at the origin) the angle in "L(s) will be 360°.

 

Counting Encirclements

Counting the number of encirclements of the -1+j0 point is obviously of critical importance to determining the stability of the system (the number of encirclements in the clockwise direction is the "N" in the equation "N=Z-P").  There are two ways to do this.  The first is easier conceptually, the second is easier practically. 

Counting encirclements by visualization

Imagine you are presented with the Nyquist diagram below

How many encirclements of the -1+j0 point are there.  To visualize the answer, assume you have a pointer whose base is at the -1+j0 point and whose head is anywhere on the Nyquist plot.  For example we can start at the point near the origin and call this angle zero (Note: since we will be traversing the entire path the place where we start on the graph is arbitrary.)

We follow the path with the tip of our arrow to the first crossing of the jω axis (180° counterclockwise) and continue following the path until we get back to the starting point.  As we do so we keep track of the total angle that has been swept out by the arrow, as shown below.

1) 180° counterclockwise 2) 0° (total) 3) 180° clockwise (total) 4) 0°  (total)
           
This diagram show 180°
movement, ccw
Here we have 180°, cw,
for a total of 0°
Another 180° cw, for
a total of 180°, cw
A final 180° movement ccw
yields 0° total.

When we are finished we have traversed a net of 0°, so the -1+j0 point is not encircled.

However, with a slightly different Nyquist diagram we get a different result.  Start as before,

and then follow the path with our arrow

1) 180° counterclockwise 2) 360° ccw 3) 360° ccw
         
 
4) 360° ccw 5) 540° ccw 6) 720° ccw
         

In this case we have two encirclements in the counter clockwise direction.

Counting encirclements the easy way

An easier way to determine the number of encirclements of the -1+j0 point is to simply draw a line out from the point, in any directions.   Consider the first example from above, shown below with a vertical line drawn from -1+j0.

 If you count the number of times that the Nyquist path crosses the line in the clockwise direction (i.e., left to right in the image, and denoted by a red circle) and subtract the number of times it crosses in the counterclockwise direction (the blue dot), you get the number of clockwise encirclements of the -1+j0 point.  A negative number indicates counterclockwise encirclements.  In the image above, there is one crossing in each direction, and therefore zero encirclements (as determined previously). 

The direction of the line draw is arbitrary.  The image below shows the same Nyquist path, but a different line.  In this case there are two clockwise crossings (red) and two counterclockwise crossings, for a total of zero encirclements, as expected.

 

We now apply this technique to another example (the second example from above), in which we have the same path shifted to the right.

 

Here we see two counterclockwise crossings of the line and hence two counterclockwise encirclements of -1+j0. 

If we choose a different line we get one clockwise crossing of the line, and three counterclockwise crossings.  Hence we have two counterclockwise encirclements of -1+j0, as expected.

Gain and Phase Margins

At this point you may well ask, "Why go through this whole procedure if we can just find the closed loop transfer function and see if it is stable?"  The reason we use the Nyquist Stability Criterion is that it gives use information about the relative stability of a system and gives us clues as to how to make a system more stable.  In particular, there are two quantities, the gain margin and the phase margin, that can be used to quantify the stability of a system.

A stable system

Consider a system with

Let us draw the Nyquist plot:

If we zoom in, we can see that the plot in "L(s)" does not encircle the -1+j0, so the system is stable.

We can verify this by finding the roots of the characteristic equation

The roots are at s=-5.5 and s=-0.24±2.88j so the system is stable, as expected.

This can be seen even more clearly using Matlab's "nyquist" command.  In fact, the "nyquist" command is generally more useful for examining the details of a Nyquist plot (called here the Nyquist diagram) than the plots we have been using, but the plots we have been using may be better for learning about the plots.


Now lets draw a unit circle around the origin (using Matlab's "ltiview" command).

There are two spots on the Nyquist plot that are emphasized.  The first is where the Nyquist plot crosses the real axis in the left half plane.  If we zoom in and put the cursor over this point we get the following image.

As you can see, the plot crosses the real axis at about -2/3, or -0.67.  This tells us that if we multiply L(s) by a number greater than 3/2 that the path would encircle the -1+j0 and the systems would be unstable.  So the "gain margin" is 3/2 or 20log10(3/2)=3.5dB.  The greater the gain margin, the more stable the system.  If the gain margin is zero, the system is marginally stable.  (Note: the text also shows that the Nyquist plot crosses the real axis when the Nyquist path is going through the point s=j3.32 (this is the "frequency" shown).)

The second point shows where the Nyquist plot crosses the unit circle as displayed on the images below.

           

The angle between between the point at which the plot crosses the unit circle (when the Nyquist path is at s=j2.73) has an angle of 14° to the horizontal axis.  This tells us that if we decrease (where a decrease moves the plot in the clockwise direction) the phase of L(s) by more than 14° that the -1+j0 point becomes encircled and the system becomes unstable.  We say that the system has a phase margin of 14°.  A higher phase margin yields a more stable system.  A phase margin of 0° indicates a marginally stable system.  Note: if you know about the frequency response time delays, recall that a time delay corresponds to a change in phase - for this system we could have a delay of 0.089 seconds (corresponding to 14° at 2.73 rad/sec).  If you don't know about time delays, you can skip this.

A marginally stable system

If we multiply L(s) by 3/2 we get

and we see that the system gain and phase margins go to zero so we expect the system to be marginally stable.

Nyquist Plot                   Nyquist plot zoomed with stability margins=0
 

We can verify this by finding the roots of the characteristic equation

The roots are at s=-6 and s=±3.32j so the system is marginally stable, as expected.

An unstable system

If we multiply the original L(s) by 4 we get

and we see that the system gain and phase margins become negative so we expect the system to be unstable.

Nyquist Plot      Zoomed with negative gain margin shown      Zoomed with negative phase margin shown
   

The margins tell us that we'd have to decrease the gain by -8.52dB (multiply by 0.375) or change the phase by -25.9° to make this system stable.  (Note: we can readily verify the gain margin because we know that multiplication of L(s) by 3/2 made the system marginally stable, and 4·0.375=3/2 (the current gain (4) multiplied by the gain margin (0.375) yields the gain that creates marginal stability (3/2).)  We can verify that the system is unstable by finding the roots of the characteristic equation

 

The roots are at s=-7.5 and s=+0.75±4.64j so the system is unstable, as expected.

Aside: Gain and Phase Margins may be Infinite

Infinite Gain Margin

The gain margin of a system will be infinite if the phase of the loop gain never reaches -180° (i.e., if the Nyquist plot never crosses the real axis in the left half plane).  If then the Nyquist path is as shown

 

The gain margin is infinite because the path never crosses the real axis in the left half plane (the path goes to the origin as |s|→∞.

Infinite Phase Margin

The phase margin will be infinite if the magnitude of gain of L(s)  is never greater than one.  If then the Nyquist path is as shown

 

The phase margin is infinite because the gain is always less than one, so no matter how much the phase changes, the -1+j0 point will never be encircled. 

 


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Nyquist Plot Examples

What follows are several examples of Nyquist plots. In general each example has five sections: 1) A definition of the loop gain, 2) A Nyquist plot made by the NyquistGui program, 3) a Nyquist plot made by Matlab, 4) A discussion of the plots and system stability, and 5) a video of the output of the NyquistGui program.  In some cases, one or more of these sections will be omitted because they are unnecessary to the understanding of the example.

Contents

Example 1: Straightforward case, no special conditions

Loop gain:

NyquistGui plot

Matlab plot

Discussion

The -1+j0 point is not encircled so N=1.  There are no poles of L(s) in the right half plane so P=0.  Since N=Z-P, Z=0.  This means that the characteristic equation of the closed loop transfer function has no zeros in the right half plane (the closed loop transfer function has no poles there).  The system is stable.

We can check this by finding the location of the zeros of the characteristic equation:

This has roots at s=-4.5±9.4j  so the system is stable as expected.

NyquistGui animation

Example 2: L(s) has pole at the origin

Loop gain:

NyquistGui plot

Matlab plot


Note: This plot is zoomed in (the original Matlab plot has axes with much higher  limits, making it hard to decipher).

This Nyquist Diagram is a little hard to decipher because the branches go off towards infinity.  However, because there is a pole at the origin, we can infer that the counterclockwise 180° detour around the origin in "s" yields a clockwise 180° detour in "L(s)"  that is not shown in the Matlab plot.  Hence the -1+j0 point is not encircled and the system is stable.

NyquistGui animation

Discussion

This system has a pole at the origin (i.e., on the jω axis) so we must take a detour around it.  This is clear on the NyquistGui plot, but is not shown on the Matlab plot.  Whenever a detour around a pole is required, this is not shown on the Matlab plot, and the user must understand what happens going around the detour.  In this case, since there is a single pole at the origin and the detour in "s" has radius approaching zero and moves in the counterclockwise direction, you know that the part of the Nyquist plot that is not shown must be a semicircle at infinity in the clockwise direction.

 The -1+j0 point is not encircled,  so N=0.  L(s) has no poles in the right half plane, so  P=0.  Since N=Z-P, Z=0.  This means that the characteristic equation of the closed loop transfer function has no zeros in the right half plane (the closed loop transfer function has no poles there).  The system is stable.

We can check this by finding the location of the zeros of the characteristic equation:

This has roots at s=-4.64, -0.18±2.07 so the system is stable as expected.

Since the gain margin is 3.52 dB (=1.5), this tells us that we could increase the gain by up to a factor of 1.5 before the system goes unstable.  Let's test this.  If we multiply L(s) by 5.

we get the Nyquist plot shown, which has negative gain and phase margins, so the system is indeed unstable. 

The Matlab plot is initially quite hard to decipher,

But it becomes clear if we zoom in (and display the stability margins, which are both negative, indicating instability).

We can check this by finding the location of the zeros of the characteristic equation:

This has roots at s=-5.36, 1.18±4.15j  so the system is unstable as expected.

Example 3: L(s) has pole in RHP, and is stable

Loop gain:

NyquistGui plot

Matlab plot

Discussion

The -1+j0 point is encircled one in the counterclockwise direction so N=-1.  There is one pole of L(s) in the right half plane so P=-1.  Since N=Z-P, Z=0.  This means that the characteristic equation of the closed loop transfer function has no zeros in the right half plane (the closed loop transfer function has no poles there).  The system is stable.

We can check this by finding the location of the zeros of the characteristic equation:

This has roots at s=-5±1j, so the system is stable as expected.

NyquistGui animation

Example 4: L(s) has pole in the RHP and is unstable

Loop gain:

NyquistGui plot

Matlab plot

Discussion

The -1+j0 point is encircled one in the clockwise direction so N=1.  There is one pole of L(s) in the right half plane so P=-1.  Since N=Z-P, Z=2.  This means that the characteristic equation of the closed loop transfer function has two zeros in the right half plane (the closed loop transfer function has two poles there).  The system is unstable.

We can check this by finding the location of the zeros of the characteristic equation:

This has roots at s=-1.53, 1.26±7.95j so the system is unstable as expected.

NyquistGui animation

Example 5: L(s) has double pole at the origin

Loop gain:

NyquistGui plot

Matlab plot

This plot is hard to understand because the two branches go off to infinity.  However because there is a double pole at the origin, we can infer that the 180° counterclockwise detour around the origin in "s" yields a 360° clockwise detour in "L(s)."  Hence the because of the large scale involved.

Discussion

The -1+j0 point is not encircled so N=0.  There are no poles of L(s) in the right half plane so P=0.  Since N=Z-P, Z=0.  This means that the characteristic equation of the closed loop transfer function has no zeros in the right half plane (the closed loop transfer function has no poles there).  The system is stable.

We can check this by finding the location of the zeros of the characteristic equation:

This has roots at s=-2.35, -0.321±2.90j, so the system is stable as expected.

NyquistGui animation

A Slightly Different Transfer Function

If we move the zero so that it is to the left of the poles

then we get a slightly, but very significantly, different Nyquist plot:

The NyquistGui plot (above) makes it clear that the origin is encircled twice in the clockwise direction (N=2, P=0 so Z=2), so the closed loop system is unstable with two poles in the right half plane.  If we were using just the Matlab plot (below) we have to remember that L(s) has a double pole at the origin which gives a 360° clockwise path with infinite radius in the "L(s)" domain.

Example 6: L(s) has time delay

Loop gain:


Note: this is the same transfer function that was used in example 1, with the addition of a time delay.

NyquistGui plot

We can see some useful detail if we zoom in on the plot in "L(s)"

Matlab plot

Original                  Significantly magnified
   

Discussion

The shape of this plot is significantly different from those that preceded it, as is evident from the spiral as the path in L(s) approaches the origin.  The cause of this spiral is the delay term

Along the jω axis the delay evaluates to


(Note: magnitude and phase of a time delay are discussed here)

This term has a magnitude of 1, but a phase of -0.05·ω .  So as we move up the imaginary axis, the magnitude of the Nyquist plot doesn't change but the phase is constantly decreasing; this causes the spiral.  (Note: It may be helpful to look at the Nyquist plots above alongside those of example 1).

The -1+j0 point is not encircled so N=0.  There are no poles of L(s) in the right half plane so P=0.  Since N=Z-P, Z=0.  This means that the characteristic equation of the closed loop transfer function has no zeros in the right half plane (the closed loop transfer function has no poles there).  The system is stable.

Because of the time delay, it is impossible to find the roots of the characteristic equation, but simulation (using Simulink or some other program) will show that the system is stable.

NyquistGui animation

A  Longer Time Delay

If we increase the time delay so that

then we get a slightly, but very significantly, different Nyquist plot:

The NyquistGui plot (above) clearly shows the plot in "L(s)" spiraling towards the origin because of the negative phase added by the time delay.  This is even more clear in the Matlab plot.

Original                  Significantly magnified
   

The -1+j0 point is encircled, so the system is unstable.  Because of the time delay, it is impossible to find the roots of the characteristic equation, but simulation (using Simulink or some other program) will show that the system is unstable.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

From Nyquist to Bode

Not yet complete


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

NyquistGui

Contents

Introduction

NyquistGui (Nyquist Graphical User Interface) is a Matlab program designed to help to understand Nyquist Plots.  It is not meant to be an accurate, flexible tool for creating Nyquist diagrams; if that is what you are looking for, use Matlab's "nyquist" command.  The gui has two basic "modes," one for learning about the process of mapping from one domain to another (i.e., from the "s" domain to the "L(s)" domain).  Once you have a good understanding of the mapping process, you can choose to learn about using the Nyquist plot to check for system stability. A brief (4 minute)video follows that shows how to start the program, and describes its major controls.

Get the Files

To run NyquistGUI, you need two files,

You should put these files in a directory in the Matlab path so that Matlab can find them.  After that you just need to enter "NyquistGui" at the command prompt.

System Limitations

The system has several know limitations:


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Copyright 2005-2007 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College