This function varies the AVR gain and, for each value, it linearizes the equations of the example system and extracts the eigenvalues from the state matrix A. By doing so, it stores all the poles of the system and how their loci change with the parametric variation corresponding to AVR gain.
The main goal of this function is to identify for what values of the AVR gain, the system is stable and the poles have adequate damping.
function root_locus extends Modelica.Icons.Function; import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2.TransferFunction; input String pathToPlantModel = "OpenIPSL.Examples.Tutorial.Example_1.Example_1" "Model in which root locus will be performed"; output Modelica_LinearSystems2.StateSpace ss "Object with ABCD matrices of linearized model"; end root_locus;