blockObserverTemplate

Template of a Luenberger observer for state space systems
Diagram of ObserverTemplate

Extends from Interfaces.PartialSampledBlock (Partial block of Sampled library (icon + default parameters)).

Parameters

TypeNameDefaultDescription
Booleancontinuous (from PartialSampledBlock)blockType == Types.BlockTypeWithGlobalDefault.Continuous or blockType == Types.BlockTypeWithGlobalDefault.UseSampleClockOption and sampleClock.blockType == Types.BlockType.ContinuousTrue, if continuous block, otherwise discrete block
Types.Initinit (from PartialSampledBlock)Modelica_LinearSystems2.Controller.Internal.convertToInit(initType, sampleClock.initType)Type of initialization (no init/steady state/initial state/initial output)
BooleanmatrixOnFilefalseTrue, if matrix should be read from file
StringfileNameModelica_LinearSystems2.DataDir + "observer.mat"Name of the state space system data file
StringsystemName"stateSpace"Name of state space system
StringobserverMatrixName"L"Name of matrix
Modelica_LinearSystems2.Internal.StateSpace2plantModelSystemModelica_LinearSystems2.Internal.StateSpace2(A = [0], B = [1], C = [1], D = [0])Plant state space system
Real[:,:]L[1]Observer feedback matrix
BooleanwithDelayModelica_LinearSystems2.Math.Matrices.Internal.haveZeroRow(observerStateSpace.system.A)True, if a unit delay should be considered
Integernoutsize(L2, 2)Dimension of vector of measured output (y)
Advanced options
Types.BlockTypeWithGlobalDefaultblockType (from PartialSampledBlock)Modelica_LinearSystems2.Controller.Types.BlockTypeWithGlobalDefault.UseSampleClockOptionType of block
Types.InitWithGlobalDefaultinitType (from PartialSampledBlock)Types.InitWithGlobalDefault.UseSampleClockOptionType of initialization (no init/steady state/initial state/initial output)
Real[size(plantModelSystem2.A, 1)]x_startzeros(size(plantModelSystem2.A, 1))Initial or guess values of states
Advanced options › Discrete block parameters
Types.MethodWithGlobalDefaultmethodType (from PartialSampledBlock)Types.MethodWithGlobalDefault.UseSampleClockOptionType of discretization if discrete block
IntegersampleFactor (from PartialSampledBlock)1Sample factor (Ts = sampleFactor * sampleClock.sampleTime)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInput[size(plantModelSystem2.B, 2)]u
Modelica.Blocks.Interfaces.RealInput[nout]y
Modelica.Blocks.Interfaces.RealOutput[size(observerStateSpace.system.A, 1)]x_estimated

Components

TypeNameDefaultDescription
Modelica.Blocks.Routing.Multiplex2multiplex2_1
Controller.StateSpaceobserverStateSpace