Getting error with rlocfind command in Octave

993 views Asked by At

I want to plot a rootlocus plot. I have added addpath(pwd) and pkg load control commands but no help. I keep getting the error: error: 'rlocfind' undefined near line 1 column 7.

Please tell me what my mistake is.

addpath(pwd)
pkg load control
%script to demostrate RL
%Model of plat
ng=[1];% no of zeros
dg= [1 0.5]; %s+0.5

%controller structure
ngc= [1];
dgc= [1 0 ];%I only

%H tf
nh=[1];
dh=[1];

%loop tf. Gc*Gp*H
nl= conv(conv(ng,ngc),nh);
dl= conv(conv(dg,dgc),dh);

[k,p]=rlocfind(nl,dl)
1

There are 1 answers

1
M.I. On

Try rlocusx instead.

https://octave.sourceforge.io/control/function/rlocusx.html

rlocusx is an interactive root locus plot of the specified SISO system SYS.

This functions directly calls rlocus() from the control package which must be installed and loaded. In contrast to rlocus(), mouse clicks on the root locus display the related gain and all other poles resulting from this gain together with damping and frequency of conjugate complex pole pairs.