.Modelica_LinearSystems2.WorkInProgress.StateSpace.Examples.designInverseDoublePendulumController

Information

This example demonstrates how to design pole placement controller to balance an inverted double pendulum. For controller design a linearized model of a (simple) physical system model is used. The controller is applied to the physical model in Moldelica_Controller library.

It is also shown how to linearize a modelica model. The linear model is used as a base for control design

Interface

function designInverseDoublePendulumController
  import Modelica.ComplexMath.j;
  import Modelica.Utilities.Streams;
  import Modelica_LinearSystems2.ComplexMathAdds;
  import Modelica_LinearSystems2.StateSpace;
  input String modelName = "Modelica_LinearSystems2.Controllers.Examples.Components.InverseDoublePendulum" "name of the model to linearize";
  input Complex pa[6] = {Complex(-2, 0), Complex(-2, 0), Complex(-15, -0.2), Complex(-15, 0.2), Complex(-20, -0), Complex(-20, 0)} "assigned poles";
  input String fileName = DataDir + "inverseDoublePendulumController.mat" "file name for results";
  output Real K_pa[:, :] "feedback matrix pole assignment controller";
  output Real M_pa[:, :] "pre filter LQ controller";
end designInverseDoublePendulumController;

Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos