# NyquistPlot

NyquistPlot[lsys]

generates a Nyquist plot of the transfer function for the system lsys.

NyquistPlot[lsys,{ωmin,ωmax}]

plots for the frequency range ωmin to ωmax.

NyquistPlot[expr,{ω,ωmin,ωmax}]

plots expr using the variable ω.

# Details and Options    • NyquistPlot gives the complex-plane plot of the transfer function of lsys as the Nyquist contour is traversed.
• The system lsys can be TransferFunctionModel or StateSpaceModel, including descriptor and delay systems.
• For continuous-time systems, the Nyquist contour encloses the entire right half-plane and excludes poles on the imaginary axis. It is traversed in a clockwise direction.
• For discrete-time systems, the Nyquist contour is the unit circle, and it encloses poles on the unit circle. It is traversed in a counterclockwise direction.
• The arrows on the NyquistPlot show the direction the Nyquist contour is traversed.
• The Nyquist contours:
• • For a system lsys with the corresponding transfer function , the following expressions are plotted:
• continuous-time system discrete-time system with sample time • If the frequency range is not specified, the entire Nyquist contour is traversed, effectively for continuous-time systems, and for discrete-time systems.
• NyquistPlot treats the variable ω as local, effectively using Block.
• The Nyquist plot can be used to infer the number of unstable poles of the closed-loop system as , where is the number of unstable poles of the open-loop system, and is the number of clockwise encirclements of the point . »
• • The Nyquist plot can be used to infer global exponential stability of linear systems with nonlinear feedback , where satisfies a sector constraint when . The closed-loop system is stable if , where is the number of clockwise encirclements of the disk , and is the number of open-loop unstable poles. »
• • NyquistPlot has the same options as Graphics, with the following additions and changes:
•  Axes True whether to draw axes ColorFunction Automatic how to apply coloring to the curve ColorFunctionScaling True whether to scale arguments to ColorFunction EvaluationMonitor None expression to evaluate at every evaluation Exclusions True frequencies to exclude ExclusionsStyle Automatic what to draw at excluded frequencies FeedbackSector None the sector limits for feedback function FeedbackSectorStyle Automatic style for feedback sector disk FeedbackType "Negative" the feedback type MaxRecursion Automatic maximum recursive subdivisions allowed Mesh Automatic how many mesh divisions to draw MeshFunctions {#3&} placement of mesh divisions MeshShading Automatic how to shade regions between mesh points MeshStyle Automatic the style for mesh divisions NyquistGridLines None the Nyquist grid lines to draw PerformanceGoal \$PerformanceGoal aspects of performance to try to optimize PlotLegends None legends for curves PlotPoints Automatic iniitial number of sample frequencies PlotRange Automatic real and imaginary range of values PlotStyle Automatic graphics directives to specify the style of the plot PlotTheme \$PlotTheme overall theme for the plot RegionFunction Automatic how to determine if a point should be included SamplingPeriod None the sampling period StabilityMargins False whether to show the stability margins StabilityMarginsStyle Automatic graphics directives to specify the style of the stability margins WorkingPrecision MachinePrecision the precision used in internal computations
• The setting excludes frequencies, including resonant frequencies, where the sinusoidal transfer function is discontinuous.
• Exclusions->{f1,f2,} excludes specific frequencies fi.
• specifies that style s should be used to render the curve joining opposite ends of each excluded point.
• Points corresponding to exclusions at resonant frequencies are joined by semicircles at infinity.
• FeedbackSector->{a,b} indicates feedback with .

# Examples

open allclose all

## Basic Examples(5)

A Nyquist plot of a transfer-function model:

A Nyquist plot of a system with resonant frequencies:

A Nyquist plot of a discrete-time system:

A discrete-time system with resonant frequencies:

Another discrete-time system with resonant frequencies:

## Scope(24)

### Basic Uses(11)

Nyquist plot of a continuous-time system:

Nyquist plot of another continuous-time system:

Specify the frequency range:

Nyquist plot of a discrete-time system:

Nyquist plot of a continuous-time, transfer-function model:

Discrete-time, transfer-function model:

Nyquist plot of a state-space model:

The Nyquist plots of systems with resonant frequencies have encirclements at infinity:

An improper system with resonant frequencies:

A system with a time delay:

Specify the expression of the sinusoidal transfer function of a system:

### Linear System Stability(7)

There are no unstable open-loop poles ( ):

The plot shows that is not encircled ( ):

Hence the closed-loop system is stable ( ); all poles are stable:

Here and , and hence :

Here , i.e. one unstable pole in the closed-loop system:

Here and , and hence :

The closed-loop system has two unstable poles:

Now , and is encircled counterclockwise, so , and hence :

The closed-loop system has no unstable poles:

For positive feedback, count encirclement around ; here , :

There are unstable poles in the closed-loop system:

A discrete-time system with no unstable poles ( ):

There are no encirclements of ( ):

Hence the closed-loop system is stable ( ):

A stable discrete-time system ( ) with positive feedback:

There is one clockwise encirclement of ( ) :

The closed-loop system is unstable, with one pole outside the unit circle:

### Nonlinear System Stability(6)

Starting with a stable linear system ( ):

Using feedback , where it is also true that , since the disk is not encircled:

Simulate closed-loop system constant feedback for :

The following stable system ( ) has one clockwise encirclement ( ) of the disk for feedback in the sector :

Hence the closed-loop system is unstable for any feedback in that sector:

An unstable system ( ):

With a feedback configuration that has one counterclockwise encirclement ( ):

The closed-loop system is stable with any feedback in the sector:

A stable system has feedback in the sector , and its NyquistPlot is to the right of :

The closed loop is stable for any feedback in the sector :

A stable system:

The NyquistPlot lies within the circle for feedback in the sector :

The closed loop is stable for any feedback within the sector :

A stable system lsys with feedback in the sector :

The NyquistPlot of -lsys with feedback in the sector shows a stable closed-loop system:

Simulate the closed loop with constant feedback:

## Options(26)

### CoordinatesToolOptions(1)

Obtain magnitude and phase (in degrees) by selecting the graphic and typing a period (.):

### Exclusions(5)

By default, there are no exclusions for a system with no resonant frequencies:

Exclude the point corresponding to 0.75:

Exclude multiple frequencies:

Resonant frequencies correspond to semicircles of infinite radius:

Exclude only one of the resonant frequencies:

### ExclusionsStyle(2)

Specify the style of the exclusions:

A Nyquist plot without the infinite encirclements:

### FeedbackSector(4)

Stable configurations:

The stable configuration of a system that is unstable:

An unstable configuration:

With feedback gain 0.1, the system is stable:

Rescale the gains to use the Nyquist stability criterion:

### FeedbackSectorStyle(1)

Specify the style of the graphics generated by the circle criterion:

### NyquistGridLines(2)

Automatically chosen values of closed-loop magnitude and phase:

Draw specific contours:

### PlotLegends(4)

Use placeholder legends for multiple systems:

Use the systems as the legend text:

Use LineLegend to add an overall legend label:

Place the legend above the plot:

### PlotRange(2)

Specify the range of coordinates to include in a plot:

Points at infinity are shown in the region specified by PlotRangePadding:

Specify the plot range explicitly:

### PlotTheme(2)

Use a theme with a frame and grid lines:

Change the style of the grid lines:

### StabilityMargins(2)

Show the stability margins:

Stability margins for a system with resonant frequencies:

### StabilityMarginsStyle(1)

Specify the style of stability margins:

## Applications(2)

Compute gain and phase margins:

With no encirclements of and no poles in the right half-plane, the closed loop with unity negative feedback is stable (Nyquist stability criterion):

## Properties & Relations(1)

The sinusoidal transfer function of a discrete-time system is periodic: