EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Data Science Data Science Tutorials Matlab Tutorial Nyquist Matlab
 

Nyquist Matlab

Updated March 4, 2023

Nyquist Matlab

 

 

Introduction to Nyquist Matlab

In this article, we will learn how to create a Nyquist plot in MATLAB. Nyquist plots find their utility in analyzing system properties, like phase margin, gain margin & stability. As we will move forward in the article, we will learn how to create simple Nyquist plots and also Nyquist plots with complex conditions.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Understanding of Nyquist Plot

Nyquist plots also known as Nyquist Diagrams are used in signal processing and control engineering for plotting frequencies. Nyquist diagrams are used commonly to assess the stability of systems and also to get feedback. Cartesian coordinates are used for Nyquist plots. On X-axis, we plot the real part of our transfer function and on Y-axis, we plot the imaginary part. To get a frequency plot, it is passed as a parameter and this results in a graph based on the frequency. Polar coordinates can also be used for Nyquist plots. Here, radical coordinates are used to represent the transfer function’s gain, and the corresponding angular coordinate is represented by the transfer function’s phase.

Syntax for Creating a Nyquist Plot in Matlab

nyquist(sys)

Nyquist  function in MATLAB helps us in creating a Nyquist plot, related to frequency response produced by a dynamic model.

Let us understand this clearly with the help of a few examples:

To draw a Nyquist plot, we will first create a transfer function as follows:

H = 70 / (s+5) (s+ 4)

Now, this is a simple example without any other condition.

We can write above system as:

H = 70 / (s^2 + 9s + 20)

This transfer function is then passed as an argument to our function ‘nyquist’
i.enyquist(H)

This is how our input and output will look like in MATLAB console:

Input:

H=tf([0 0 70],[1 9 20]);
nyquist(H)

Output:

nyquist matlab output 1

In the next example, we will see a Nyquist plot with a pole at the center/origin.

Here is our transfer function:

H = 40 / s^3 + 2s ^ 2 + 3s + 4

This transfer function is then passed as an argument to our function ‘nyquist’
i.enyquist(H)

This is how our input and output will look like in MATLAB console:

Input:

H=tf([40],[3 2 3 4]);
nyquist(H)

Output:

nyquist matlab output 2

The system represented by our transfer function is having a pole located at the origin. This signifies the requirement of the detour around this pole. This is not shown on the plot created by Matlab.  In a system like this where a detour is required around the pole, we must understand the result of the detour.  In our case, since we have a single-pole located at origin & the detour has its radius approaching ‘0’&moving in the counter-clockwise direction, we interpret that the missing part of the plot that MATLAB does not show is a semicircle. This semicircle lies at infinity and in the clockwise direction.

Let’s take another example with a different condition:

In this example, we will see a Nyquist plot with a double pole at the center/origin.

Here is our transfer function:

H = 5s + 20 / s^3 + 5s^2

This transfer function is then passed as an argument to our function ‘nyquist’
i.enyquist(H)

This is how our input and output will look like in MATLAB console:

Input:

H=tf([5 20],[1 5 0 0]);
nyquist(H)

Output:

output 3

As we can see from the plot obtained, the 2 branches are going off towards infinity.  Also, as we have a double pole at the origin, it can be inferred that a counter-clockwise detour of 180° around the origin is yielding a clock-wise detour of 360°.

Finally, let’s take an example where transfer function will have one pole in RHP and the pole will be stable:

Here is our transfer function:

H = 20s + 40 / s^2 - 8

This transfer function is then passed as an argument to our function ‘nyquist’
i.enyquist(H)

This is how our input and output will look like in MATLAB console:

Input:

H=tf([20 40],[ 1 0 -8]);
nyquist(H)

Output:

output 4

So, in this article, we learned how to create a Nyquist plot in MATLAB. We can create both stable and unstable plots in MATLAB. As an additional tip, please keep in mind that to display the real & imaginary part of our given frequency, we can activate the data markers in MATLAB. For this, we just need to click at any point on the curve.

Recommended Articles

This is a guide to Nyquist Matlab. Here we discuss the Understanding of Nyquist Plot along with the Syntax for Creating it in Matlab. You may also have a look at the following articles to learn more –

  1. Break in MATLAB
  2. Summation in Matlab
  3. Gaussian Fit Matlab
  4. Matlab Errorbar

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Limited Time Offer! - ENROLL NOW