.Modelica_LinearSystems2.WorkInProgress.StateSpace.Examples.designCraneController

Information

This example demonstrates how to design a lq-controller or a pole placement controller respectively. Compared with example craneController, the plant is smaller to achieve suitable dynamics for animation. The feedback matrices and a simple pre filter for tracking are save to MATLAB files which can be used in ModelicaController library.

It is also shown how to linearize a model of a crane trolley system [1]. The linear model is used as a base for control design

References

 [1] Föllinger O.:
Regelungstechnik. Hüthig-Verlag.
 

Interface

function designCraneController
  import Modelica.Utilities.Streams;
  import MatricesMSL = Modelica.Math.Matrices;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.Math.Complex;
  import Modelica_LinearSystems2.Math.Matrices;
  import Modelica_LinearSystems2.TransferFunction;
  import Modelica_LinearSystems2.ZerosAndPoles;
  input String modelName = "Modelica_Controller.Examples.Components.Pendulum_small" "name of the model to linearize";
  input Complex pa[4] = {-3.5 + 0*j, -3.5 + 0*j, -3.5 - 0.5*j, -3.5 + 0.5*j} "assigned poles";
  output Real K_lq[:, :] "feedback matrix LQ controller";
  output Real K_pa[:, :] "feedback matrix pole assignment controller";
  output Real M_lq[:, :] "pre filter LQ controller";
  output Real M_pa[:, :] "pre filter pole assignment controller";
end designCraneController;

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos