How To Draw Root Locus Plots Using Matlab

by Nima on 21 October, 2008

Drawing Root Locus plots by hand is a hard and time consuming task so it is always good to check the answers with Matlab just to be sure you are on the right track.

The process of drawing the Root Locus with Matlab is as follow:

  1. Define the numerator (num).
  2. Define the denominator (den).
  3. Draw the Root Locus (rlocus (num, den))

So let’s say we want to draw the root locus for the following system:

G(s) = k / ( s )*( s^2 + 4s + 8 )

The Matlab code will be:

  1. num = [1];
  2. den = conv ([1 0] , [1 4 8]);
  3. rlocus (num, den)

{ 31 comments… read them below or add one }

Enjoy Life Play October 23, 2008 at 4:59 pm

Aaah Matlab…such wonderful memories :)

Anonymous March 31, 2009 at 2:01 pm

it was helpful. thanks

s1512 September 1, 2009 at 8:48 am

useful

narender reddy October 28, 2009 at 1:13 pm

thanks…………..
helpful…

Ahmed Wagdy December 19, 2009 at 5:23 am

Thanks alot, it really helped me out. :D

Wobble February 3, 2010 at 6:59 pm

Ah.. thanks. Can finish my homework now.. [;)]

Anonymous February 24, 2010 at 12:01 am

thank u

ivana April 4, 2010 at 1:09 am

Thanks for doing that tutorial. I noticed that it is similar to Modern Control System by Dorf and Bishop Question E.7.13a, how would you approach b and c?

Nikesh April 18, 2010 at 10:36 am

looks quite simple than what we do in theory
thanks!
if any other rule please forward.

fatemeh rouzbeh May 21, 2010 at 11:27 am

salam
age bekhaym makane rishe haye ye system ta’khirdar ro rasm konim bayad chikar konim?

Sriram August 6, 2010 at 1:13 pm

how can we use the grids….?

Nima August 6, 2010 at 10:53 pm

Honestly I did that so long ago I don’t remember. I’m sorry

g3n September 20, 2010 at 8:43 am

thanks for the info..very helpful.. =)

Nima September 22, 2010 at 9:51 am

No problem g3n. Glad it helped

seyedzade November 3, 2010 at 7:04 am

salam. motshakeram az rahnamayitun. shoma iran zendegi mikonin? kodum uni?

Nima November 3, 2010 at 9:37 pm

Khahesh mikonam ostad. Man Iran nistam. Amrica zendegi mikonam. shoma che daneshgahi miri?

Anonymous November 9, 2010 at 11:08 pm

use rl tool instead to see the entire nature of the root locus

Anonymous December 8, 2010 at 10:03 am

salam nima khan
ei vala khosahm miad ke irani hasti.
thanks a lot for your guidence.

Nima December 15, 2010 at 12:45 pm

Thanks for your comment.

Anonymous March 21, 2011 at 12:06 am

that actually leaves so many unanswered questions

Nima March 21, 2011 at 9:59 am

What questions do you have?

pradeep April 8, 2011 at 11:18 am

hi sir i want the code to dewarp the image obtained by capturing in camera plzzz help me

Anonymous April 22, 2011 at 3:14 am

so helpful!

marmar July 22, 2011 at 7:13 am

Hi how are you? if we have a function with 2 variables , how we can plot 1 variable against the other one,

i will appreciate it if you answer me. :)

hany October 18, 2011 at 7:02 pm

>> grid
>> [k,poles]=rlocfind(num,den)
Select a point in graphics window

John October 25, 2011 at 10:11 pm

Very helpful. Thank you. It was so easy to use.

sai November 2, 2011 at 5:42 am

WAT U SAID WE NOT UNDERSTAND NOTHING

serena November 21, 2011 at 12:14 pm

it’s just practical approch of soliving , but theoritical calculation would help me .

blake November 26, 2011 at 11:50 pm

How do you graph the negative root locus?!

youhanna January 8, 2012 at 3:31 pm

i don’t to how to write the code of this G(S)= k(s+2) (s+3) / s(s+1)
plz help!!

yantzee January 23, 2012 at 4:04 am

you can solve by take out the K
expand the den & num equations.
& the system will be like this
G(s) = k *([num]/[den])

The Matlab code will be:
num = [1];
den = conv ([1 0] , [1 4 8]);
rlocus (num, den)

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: