0
\$\begingroup\$

The function, rlocus(), in MATLAB is used for closed loop system roots for variation in gain K. However, I am curious if there is a similar function for variation in parameter of open loop function. I have tried using the pzmap() function and iterating to vary RL & IL. Unfortunately, it doesn't plot enough points on the graph. Are there any functions that will allow me to plot an open loop transfer function? I am trying to plot the transfer function below:

\$ T(s)= \frac{(RL+sIL)(3s^3+12s^2+12s+4)}{8s^4IL+s^3(28IL+8RL+3)+4s^2(7IL+7RL+3)+4s(2IL+7RL+3)+8RL+4}\$

Thank you for your help.

asked Jun 23, 2018 at 20:30
\$\endgroup\$
9
  • 2
    \$\begingroup\$ Have you considered utilizing the tf() function and then doing rlocus()? For instance, let's call your transfer function above \$T(s)\$... so t=tf(your transfer function) and then rlocus(t). \$\endgroup\$ Commented Jun 23, 2018 at 23:15
  • \$\begingroup\$ The input to the root locus procedure is the open-loop TF. This is because the RL starts at the open-loop poles and ends at the open-loop zeros. The RL determines closed-loop performance from the open-loop TF, so your question is meaningless. \$\endgroup\$ Commented Jun 24, 2018 at 9:37
  • \$\begingroup\$ Root locus is a plot of the closed-loop poles as the feedback gain changes. Poles of an open-loop system do not change position with open-loop gain. To say "pzmap doesn't plot enough points", or "root locus for open loop" are an indication of theoretical misconception. \$\endgroup\$ Commented Jun 24, 2018 at 16:25
  • \$\begingroup\$ @VicenteCunha the definition of Root locus you've stated it is incorrect. The thing you've stated it one of many root locus's cases but the common one. \$\endgroup\$ Commented Jun 26, 2018 at 3:07
  • \$\begingroup\$ @CroCo I'd be happy to delete my comment if you point out where I'm wrong. From the matlab documentation: "The root locus gives the closed-loop pole trajectories as a function of the feedback gain k (assuming negative feedback). Root loci are used to study the effects of varying feedback gains on closed-loop pole locations.". I understand possible variations of use for control design, but the same definition still fits for an augmented system. \$\endgroup\$ Commented Jun 26, 2018 at 14:13

1 Answer 1

1
\$\begingroup\$

Ignoring the semantics of "root locus," you can certainly plot the roots of a polynomial as its coefficients change. The following script plots the set of poles of your system as \$RL\$ varies from 0 to 10000 with \$IL\$ fixed at 1:

IL = 1;
RLvec = linspace(0,10e3,1e5);
rts = zeros(1e5,4);
for k = 1:length(RLvec);
 RL = RLvec(k);
 D = [8*IL, 28*IL+8*RL+3, 4*(7*IL+7*RL+3), 4*(2*IL+7*RL+3), 8*RL+4];
 r = roots(D);
 rts(k,:) = r';
end;
figure
hold on;
for b = 1:4;
 plot(real(rts(:,b)),imag(rts(:,b)));
end;
xlim([-5,0]); grid on;

It executes for me in under 5 seconds.

Admittedly, it does not show how the roots move as both parameters change, but that task is complicated by having a two-dimensional domain and a two-(real)-dimensional range.

answered Jun 30, 2018 at 0:11
\$\endgroup\$
2
  • \$\begingroup\$ In case the roots don't come out 'sorted', the connecting lines may vary wildly. I couldn't find documentation that says that the roots returned will be in any particular order. [in.mathworks.com/matlabcentral/answers/… \$\endgroup\$ Commented May 26, 2020 at 12:53
  • \$\begingroup\$ My solution to that problem would be to omit the "lines" Matlab interpolates between data points: plot(real(rts(:,b)),imag(rts(:,b)),'.'); \$\endgroup\$ Commented Jun 7, 2020 at 21:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.