EDUCBA

EDUCBA

MENUMENU
  • Blog
  • Free Courses
  • All Courses
  • All in One Bundle
  • Login
Home Data Science Data Science Tutorials Matlab Tutorial Root Locus Matlab

Root Locus Matlab

Updated March 8, 2023

Root-Locus-Matlab

Introduction to Root Locus Matlab

The W.R. Evans developed the root locus method. It is widely used in control engineering for the design and analysis of control systems. In this method, system poles are plotted against the value of a system parameter, especially the open-loop transfer function gain root locus analysis is a graphical method for examining how the roots of a system change with variation of a certain system parameter are typically used in control theory and stability theory. In this topic, we are going to learn about Root Locus Matlab.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

Syntax

The syntax for Root Locus Matlab is as shown below:-

rlocus (sys)

How to Do Root Locusmatlab?

In a Matlab for a root locus, rlocus inbuilt function is available. For using these inbuilt rlocus function, we need to create one transfer function on a Matlab; for that, we can use a tf inbuilt function which can be available on Matlab.

Let us see how we used these function to display the root locus. For that, first, we need to create one transfer function. For creating a transfer function, we need to know the coefficients of the numerator and denominator of that transfer function

we create transfer function in two ways. The ways are as follows:-

1. Num3= [25 ];

Den3 = [1 -1 -2];

TF1 = tf (Num3 , Den3)

In a first way, we can take two variables to store the numerator and denominator coefficients and then we just pass those two variables on tf function and that a comma separates two variables.

2. GH1 = tf([1],[1 5 6 0])

In the tf function, we take two square brackets; in the first square brackets, we write the coefficients of the numerator (order s^4, s^3……, s, constant), and in second square brackets, we write coefficients of the denominator (order s^4, s^3……, s, constant). The comma separates these two square brackets.

Then use rlocus function in brackets the variable which is assigned for the transfer function.

Examples of Root Locus Matlab

Here are the following examples mention below

Example 1

Let us consider one example,

Root Locus Matlab output 1

In this example, we take one transfer function for that we create two variables, ‘num1’ and ‘den1’, respectively. The variable ‘num1’ contains the coefficients of the numerator of the transfer function, and variable ‘den1’ stores the coefficients of the denominator of the transfer function. The tf function generates a transfer function for given coefficients of ‘num1’ and ‘den1’ variables on Matlab. Then using two variables of transfer function ‘num1’ and ‘den1’, we can display the transfer function and stored it in variable ‘TF1’.Then use the ‘rlocus’ function in brackets the variable which is assigned for transfer function ‘TF1’.

Code:

clc;
clear all;
close all;
num1= [1 3 ];
den1 = [1 -1 -2];
disp ('Transfer function :-  ');
TF1 = tf (num1 , den1)
rlocus(TF1)

Output:

Root Locus Matlab output 2

As shown in the resultant rot locus, it can show poles and zeros. For locating poles, the ‘×’ sign is used, and for zeros, the ‘o’ sign is used on a root locus.

Root locus exists on the real axis between:
2 and -1
-3 and negative infinity

Example 2

Let us see one more example related to root locus Matlab,

output 3

In this example, we can take the above transfer function for a root locus. We create the above transfer function on Matlab by using the tf inbuilt function. In tf function, we assign the coefficients of the above transfer function; in tf function, we take two square brackets, in first square brackets, we write the coefficients of numerator for the above transfer function (order s^4, s^3, ……, s, constant) and in second square brackets, we write coefficients of the denominator for above transfer function (order s^4, s^3……, s, constant). The comma separates these two square brackets. Then we use a rlocus function in brackets; we assign the variable which is use to generate a transfer function.

Code:

clc;
clear all;
close all;
disp ('Transfer function :-  ');
GH1 = tf ( [ 1 ] , [ 1 5 6 0 ] )
rlocus (GH1)

Output:

output 4

Example #3

Let us consider another one example,

output 5

Code:

clc;
clear all;
close all;
disp ('Transfer function :-  ');
sys = tf ( [ 1 2 3 ] , [ 1 9 34 51 2810 ] )
rlocus(sys)

Output:

output 6

In this example, we have five poles and two zeros. The poles are shown by ‘×’, and the zeros are shown by ‘o’ on a root locus.

Root locus exists on the real axis between:
0 and -1
-2 and negative infinity

Recommended Articles

This is a guide to Root Locus Matlab. Here we discuss the basic concepts of root locus. And how we use a root locus in Matlab, what exactly syntax is used to create a root locus. In this article, we also saw some examples related to root locus with Matlab codes. You may also have a look at the following articles to learn more –

  1. Matlab Syms
  2. Matlab Format
  3. Dot Product MATLAB
  4. Moving Average Matlab
SPSS Course Bundle - 14 Courses in 1 | 5 Mock Tests
34+ Hours of HD Videos
14 Courses
5 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
MICROSOFT AZURE Course Bundle - 15 Courses in 1 | 12 Mock Tests
62+ Hour of HD Videos
15 Courses
12 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
HADOOP Course Bundle - 32 Courses in 1 | 4 Mock Tests
125+ Hour of HD Videos
32 Courses
4 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
INFORMATICA Course Bundle - 7 Courses in 1
47+ Hours of HD Videos
7 Courses
Verifiable Certificate of Completion
Lifetime Access
4.5
Primary Sidebar
Popular Course in this category
MATLAB Course Bundle - 5 Courses in 1 | 3 Mock Tests
 11+ Hours of HD Videos
5 Courses
3 Mock Tests & Quizzes
  Verifiable Certificate of Completion
  Lifetime Access
4.5
Price

View Course
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

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

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

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

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

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more