ƒ

Nyquist Plot

Analysis
Run the live example Free · no sign-up · runs in your browser

The NyquistPlot block computes and visualizes the complex-plane frequency response (Nyquist diagram) of a linear dynamical system or open-loop transfer function. It plots the real component of the frequency response on the horizontal axis (Re{G(jω)}\text{Re}\{G(j\omega)\}) against the imaginary component on the vertical axis (Im{G(jω)}\text{Im}\{G(j\omega)\}) across a swept angular frequency range ω∈[0,ωmax⁡]\omega \in [0, \omega_{\max}].

By mapping frequency response trajectories directly onto the complex plane, the Nyquist plot provides direct physical insight into closed-loop stability, gain margins, phase margins, and the proximity of the loop transfer function to the critical stability point (−1,j0)(-1, j0).

Mathematical Model

The open-loop frequency response is mapped to the complex plane as:

G(jω)=Re{G(jω)}+j Im{G(jω)}=∣G(jω)∣ej∠G(jω)G(j\omega) = \text{Re}\{G(j\omega)\} + j \, \text{Im}\{G(j\omega)\} = |G(j\omega)| e^{j \angle G(j\omega)}

Closed-loop stability is evaluated via Cauchy's argument principle and the Nyquist stability criterion:

Z=N+PZ = N + P

where:

  • ZZ is the number of unstable closed-loop poles in the right-half complex plane (RHP).
  • PP is the number of unstable open-loop poles in the right-half plane.
  • NN is the number of clockwise encirclements of the critical stability point (−1,j0)(-1, j0).
  • For open-loop stable systems (P=0P = 0), closed-loop stability requires zero encirclements (N=0N = 0).

Inputs & Outputs

Direction ID Label Type Status
→ In in1 Input number Required

Parameters

Parameters Label Type Default Description
title Title text Nyquist Plot
showUnitCircle Show Unit Circle boolean true

Usage Examples

Example 1: First-Order Stable Lag System

Analyzing a stable first-order transfer function G(s)=10.5s+1G(s) = \frac{1}{0.5 s + 1}. The Nyquist locus begins at (1,j0)(1, j0) at ω=0\omega = 0, traces a smooth semi-circle in the lower-right complex quadrant, and terminates at the origin (0,j0)(0, j0) as ω→∞\omega \to \infty. The locus remains far from the critical point (−1,j0)(-1, j0), confirming an infinite gain margin and a 90∘90^\circ phase margin.

Example 2: Conditionally Stable Third-Order Feedback Loop

Evaluating an open-loop plant L(s)=K(s+1)3L(s) = \frac{K}{(s+1)^3} under variable loop gain KK. As frequency sweeps from ω=0\omega = 0 toward infinity, the locus crosses the negative real axis. Inspecting the real-axis intercept relative to (−1,j0)(-1, j0) allows engineers to determine the maximum allowable loop gain before closed-loop instability occurs (K<8K < 8).

Remarks & Best Practices

  • Critical Point (-1, j0): Stability depends on whether the open-loop locus encircles (−1,j0)(-1, j0). The distance between the locus and (−1,j0)(-1, j0) provides a direct measure of stability robustness.
  • Unit Circle Reference: The unit circle enables immediate visual inspection of the phase margin at the unity-gain crossover frequency.
  • Gain and Phase Margins: Gain margin is the reciprocal of the distance from the origin to the negative real-axis intercept; phase margin is the angle between the negative real axis and the unit-circle intersection.
  • Real-Time Updates: The complex frequency response updates dynamically as plant parameters or sweep ranges are tuned in the diagram.

Related Components

  • TransferFunction: Continuous-time transfer function block for modeling plant dynamics.
  • PIDController: Configurable feedback controller for closed-loop compensation.
  • StateSpace: Continuous-time multi-state linear system representation.
  • uPlotDisplay: Multi-channel time-series oscilloscope for transient response verification.