.Modelica_LinearSystems2.WorkInProgress.StateSpace.Examples.designCraneControllerWithObserver

Information

This example demonstrates how to use pole placement function assignPolesMI to design a pole placement controller and an observer also using assignPolesMI as well. Function assignPoles is based on the Schur form of the state space matrix an also allows partial poles shifting [1].

An observer can be designed by applying assignPolesMI to the dual system (A', C', B'). The results, which are controller feedback matrix, observer feedback matrix, system model for usage in observer and a simple pre filter for tracking are saved 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 then used as a base for controller design.

References

 [1] Varga A. (1981):
A Schur method for pole assignment. IEEE Trans. Autom. Control, Vol. AC-26, pp. 517-519.
 

Interface

function designCraneControllerWithObserver
  import Modelica.Utilities.Streams;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.StateSpace;
  import Modelica_LinearSystems2.Math.Complex;
  import Modelica_LinearSystems2.Math.Matrices;
  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 system poles";
  input Complex pob[4] = {-10 + 0*j, -10 + 0*j, -10 + 0*j, -10 + 0*j} "assigned observer poles";
  input String fileName = DataDir + "craneController_small.mat" "file name for results";
  output Real K_ob[:, :] "feedback matrix pole assignment controller";
  output Real K_pa[:, :] "feedback matrix pole assignment controller";
  output Real M_pa[:, :] "pre filter LQ controller";
end designCraneControllerWithObserver;

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