# How does RootLocusPlot handle TransferFunctionModel

I'd like to analyze the poles (denominator-roots) of a TransferFunctionModel, that was generated from a NonLinearStateSpaceModel.

However, I don't understand how RootLocusPlot handles the input of a TransferFunctionModel (or full transfer function) compared to when it is only passed the denominator of the transfer function.

Let's call the transfer function $G(s)= \frac{N(s)}{D(s)} =\frac{numerator}{denominator}$

I suppose RootLocusPlot builds a closed loop system and analyzes thus the closed transfer function $G^*(s) = \frac{G(s)}{1+G(s)}$?

Would it be correct to only hand the denominator part of the TransferFunctionModel to RootLocusPlot in order to determine the poles of $G(s)$ as a function of a control parameter (i.e. RootLocusPlot[tfm[[1, 2]], {F, 0, 20000})?

Example illustrating the different plots (1st plot: expected behavior poles of $G(s)$, 2nd & 3rd plot: closed loop?, 4th plot: seems correct only passing D(s) to RootLocusPlot, 5th: zeros of $1+G(s)$):

num = s^2 a1 + s a2 + a3;
denom = s^3 b1 + s^2 (b2 + F b3) + s F b4 + b5;

num/denom

constants = {a1 -> 3421.02, a2 -> 0.760227 F, a3 -> 21524.5,
b1 -> 5592, b2 -> 3421 , b3 -> 1.242, b4 -> 0.760 , b5 -> 21524};

(*build TransferFunctionModel*)

tfm = TransferFunctionModel[num/denom, s];
(*compute roots manually*)
Clear[roots];
roots[currF_] :=
Root[denom /. constants /. F -> currF, #] & /@ {1, 2, 3}
Clear[roots2];
roots2[currF_] :=
Root[1 + num/denom /. constants /. F -> currF, #] & /@ {1, 2, 3}

(*plot different variants*)
ParametricPlot[{Re[#], Im[#]} & /@
Quiet[roots[F]], {F, 0, 20000}, PlotLabel -> "Goal: roots of D(s)"]
{RootLocusPlot[tfm /. constants, {F, 0, 20000}, PlotLabel -> tfm,
ImageSize -> 250]
(*,RootLocusPlot[tfm[[1,1,1,1]]/tfm[[1,2]]/.constants,{F,0,20000},\
PlotLabel-> tfm[[1,1,1,1]]/tfm[[1,2]]]*)
,
RootLocusPlot[num/denom /. constants, {F, 0, 20000},
PlotLabel -> num/denom, ImageSize -> 250]
(*,RootLocusPlot[tfm[[1,2]]/.constants,{F,0,20000},PlotLabel-> \
tfm[[1,2]]]*)
,
RootLocusPlot[denom /. constants, {F, 0, 20000}, PlotLabel -> denom,
ImageSize -> 250]
, ParametricPlot[{Re[#], Im[#]} & /@ Quiet[roots2[F]], {F, 0, 20000},
PlotLabel -> "roots of 1 + num/denom"]

}

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. Commented Oct 10, 2015 at 12:19

I think you are understanding things correctly and I hope I am understanding your question correctly. The default is to assume a negative feedback but you may set this as an option using FeedbackType which takes values of "Positive", "Negative" or None. With none you are just looking at the poles of your G(s).

num = s^2 a1 + s a2 + a3;
denom = s^3 b1 + s^2 (b2 + F b3) + s F b4 + b5;
constants = {a1 -> 3421.02, a2 -> 0.760227 F, a3 -> 21524.5,
b1 -> 5592, b2 -> 3421, b3 -> 1.242, b4 -> 0.760, b5 -> 21524};
tfm = TransferFunctionModel[num/denom, s];

RootLocusPlot[tfm /. constants, {F, 0, 20000},
FeedbackType -> "Negative", PlotLabel -> "FeedbackType->Negative"]
RootLocusPlot[tfm /. constants, {F, 0, 20000},
FeedbackType -> "Positive", PlotLabel -> "FeedbackType->Positive",
AspectRatio -> 1/GoldenRatio]
RootLocusPlot[tfm /. constants, {F, 0, 20000}, FeedbackType -> None,
PlotLabel -> "FeedbackType->None"]


Hope that helps

• Thanks, yes that helps. I was looking for the "None"-option. I was expecting to see it more clearly documented under RootLocusPlot (reference.wolfram.com/language/ref/RootLocusPlot.html). There, they provide one example for the "None"-option, referring to it as "closed-loop", while they call the "Positive"-option an "open-loop". I'm not very familiar with the different control terminology, but wouldn't it be exactly the other way round? The same terminology is used under: reference.wolfram.com/language/ref/FeedbackType.html Commented Oct 10, 2015 at 18:33
• @Fabian Strange, I would have said "none" is open-loop and "positive"/"negative" are the closed loop variants, too. Also RootLocusPlot[ SystemsModelFeedbackConnect[tfm, "Negative"] /. constants, {F, 0, 20000},FeedbackType->None, AspectRatio -> 1/GoldenRatio] should give the same as RootLocusPlot[tfm /. constants, {F, 0, 20000}, FeedbackType -> "Negative"]. So that's my understanding of closed loop/open loop.
– Phab
Commented Oct 12, 2015 at 6:09