Modelica_LinearSystems2.Examples.StateSpace

Package Content

NameDescription
Modelica_LinearSystems2.Examples.StateSpace.analysis analysis Example to check controllability of a state space system
Modelica_LinearSystems2.Examples.StateSpace.analysisControllability analysisControllability Example to check controllability of a state space system
Modelica_LinearSystems2.Examples.StateSpace.analysisObservability analysisObservability Example to check controllability of a state space system
Modelica_LinearSystems2.Examples.StateSpace.analysisControllablePoles analysisControllablePoles Example to check controllability of a state space system and print the controllable poles
Modelica_LinearSystems2.Examples.StateSpace.analysisTimeResponse analysisTimeResponse Compute time response of a state space system
Modelica_LinearSystems2.Examples.StateSpace.analysisInitialResponse analysisInitialResponse Initial response example
Modelica_LinearSystems2.Examples.StateSpace.analysisImpulseResponse analysisImpulseResponse Impulse response example
Modelica_LinearSystems2.Examples.StateSpace.analysisStepResponse analysisStepResponse Step response example
Modelica_LinearSystems2.Examples.StateSpace.analysisPolesAndZeros_SISO analysisPolesAndZeros_SISO Compute poles and invariant zeros of a SISO state space system by transformation to a minmal system
Modelica_LinearSystems2.Examples.StateSpace.analysisStairCase analysisStairCase Example to check controllability of a state space system
Modelica_LinearSystems2.Examples.StateSpace.analysisInvariantZeros analysisInvariantZeros Compute invariant zeros of transfer function
Modelica_LinearSystems2.Examples.StateSpace.conversionFromZerosAndPoles conversionFromZerosAndPoles Transform a TransferFunction into a StateSpace description
Modelica_LinearSystems2.Examples.StateSpace.conversionToTransferFunctionMIMO conversionToTransferFunctionMIMO Example to compute a transfer function matrix of a MIMO system from state space representation
Modelica_LinearSystems2.Examples.StateSpace.conversionToTransferFunctionSISO conversionToTransferFunctionSISO Example to compute a transfer function from SISO state space representation
Modelica_LinearSystems2.Examples.StateSpace.conversionToZerosAndPolesMIMO conversionToZerosAndPolesMIMO Example to compute a zeros-and-poles representation of a MIMO system from state space representation
Modelica_LinearSystems2.Examples.StateSpace.conversionToZerosAndPolesSISO conversionToZerosAndPolesSISO Example to compute a zeros and poles representation from SISO state space representation
Modelica_LinearSystems2.Examples.StateSpace.designAssignPolesSISO designAssignPolesSISO Example for pole placing using Ackermann's method
Modelica_LinearSystems2.Examples.StateSpace.designKalmanFilter designKalmanFilter Description
Modelica_LinearSystems2.Examples.StateSpace.designLQG designLQG Description
Modelica_LinearSystems2.Examples.StateSpace.designLQR designLQR Description
Modelica_LinearSystems2.Examples.StateSpace.plotPolesAndZeros plotPolesAndZeros Example for plotting eigenvalues and invariant zeros of a state space system
Modelica_LinearSystems2.Examples.StateSpace.plotBodeMIMO plotBodeMIMO Constructs a transfer function from state space representation and plots the Bode diagram with automatic determination of the frequency range to plot
Modelica_LinearSystems2.Examples.StateSpace.plotBodeSISO plotBodeSISO Constructs a transfer function from state space representation and plots the Bode diagram with automatic determination of the frequency range to plot
Modelica_LinearSystems2.Examples.StateSpace.plotTimeResponse plotTimeResponse Time response plot example
Modelica_LinearSystems2.Examples.StateSpace.plotImpulse plotImpulse Impulse plot example
Modelica_LinearSystems2.Examples.StateSpace.plotInital plotInital Initial condition plot example
Modelica_LinearSystems2.Examples.StateSpace.plotRamp plotRamp Plot ramp response
Modelica_LinearSystems2.Examples.StateSpace.plotStep plotStep Step plot example
Modelica_LinearSystems2.Examples.StateSpace.plotZeros plotZeros case studies of systems with zeros
Modelica_LinearSystems2.Examples.StateSpace.transformation transformation Example to demonstrate the transformation to Jordan- observabilitiy- and controllability canonical form
Modelica_LinearSystems2.Examples.StateSpace.transformationExtract transformationExtract Example how to extract input/output related subsystems from state space system record
Modelica_LinearSystems2.Examples.StateSpace.transformationToIrreducibleForm transformationToIrreducibleForm Example to compute the minimal state space realization of a given SISO state space realization

Modelica_LinearSystems2.Examples.StateSpace.analysis

Example to check controllability of a state space system

Information


This example shows the usage of function Modelica_LinearSystems2.StateSpace.Analysis.isControllable which is 
to check whether a system is controllable or not.

Inputs

NameDescription
ssi 
analyseOptions 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.analysisControllability

Example to check controllability of a state space system

Information


This example shows the usage of function Modelica_LinearSystems2.StateSpace.Analysis.isControllable which is 
to check whether a system is controllable or not.

Inputs

NameDescription
ssi 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.analysisObservability

Example to check controllability of a state space system

Information


This example shows the usage of function Modelica_LinearSystems2.StateSpace.Analysis.isObservable which is 
to check whether a system is observable or not.

Inputs

NameDescription
ssi 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.analysisControllablePoles

Example to check controllability of a state space system and print the controllable poles

Information


This example shows the usage of function Modelica_LinearSystems2.StateSpace.Analysis.isControllable which is 
to check whether a system is controllable or not.

Inputs

NameDescription
ssi 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.analysisTimeResponse

Compute time response of a state space system

Information


Computes the time response of the system StateSpace sc = StateSpace(A=[-1,1;0,-2],B=[1, 0;0, 1],C=[1,0; 0,1],D=[0, 0; 0, 0]), sampled at Ts=0.01 with inititial state x0=[0;0] subject to the system input u = ones(samples,2), (samples is set to 30).

Inputs

NameDescription
u[:, 2] 

Modelica_LinearSystems2.Examples.StateSpace.analysisInitialResponse

Initial response example

Information


Computes and plots the step response

Outputs

NameDescription
y[:, size(sc.C, 1), size(sc.B, 2)]Output response: (number of samples) x (number of outputs) x (number of inuputs)

Modelica_LinearSystems2.Examples.StateSpace.analysisImpulseResponse

Impulse response example

Information


Computes and plots the step response

Outputs

NameDescription
y[:, size(sc.C, 1), size(sc.B, 2)]Output response: (number of samples) x (number of outputs) x (number of inuputs)

Modelica_LinearSystems2.Examples.StateSpace.analysisStepResponse

Step response example

Information


Computes and plots the step response

Outputs

NameDescription
y[:, size(sc.C, 1), size(sc.B, 2)]Output response: (number of samples) x (number of outputs) x (number of inuputs)

Modelica_LinearSystems2.Examples.StateSpace.analysisPolesAndZeros_SISO

Compute poles and invariant zeros of a SISO state space system by transformation to a minmal system

Inputs

NameDescription
system data definition
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix
system matrices
A[:, :] 
B[:, :] 
C[:, :] 
D[:, :] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.analysisStairCase

Example to check controllability of a state space system

Information


This example shows the usage of function Modelica_LinearSystems2.StateSpace.Design.assignPolesMI which is 
to design pole assigment controllers for state space systems with multiple input.

Inputs

NameDescription
ssi 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.analysisInvariantZeros

Compute invariant zeros of transfer function

Inputs

NameDescription
z[:]Zeros (Complex vector of numerator zeros)
p[:]Poles (Complex vector of denominator zeros)
kConstant multiplied with transfer function

Modelica_LinearSystems2.Examples.StateSpace.conversionFromZerosAndPoles

Transform a TransferFunction into a StateSpace description

Inputs

NameDescription
zp 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.conversionToTransferFunctionMIMO

Example to compute a transfer function matrix of a MIMO system from state space representation

Inputs

NameDescription
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix
system matrices
A[:, size(A, 1)] 
B[size(A, 2), :] 
C[:, size(A, 1)] 
D[size(C, 1), size(B, 2)] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.conversionToTransferFunctionSISO

Example to compute a transfer function from SISO state space representation

Inputs

NameDescription
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix
system matrices
A[:, :] 
B[:, :] 
C[:, :] 
D[:, :] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.conversionToZerosAndPolesMIMO

Example to compute a zeros-and-poles representation of a MIMO system from state space representation

Inputs

NameDescription
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix
system matrices
A[:, size(A, 1)] 
B[size(A, 2), :] 
C[:, size(A, 1)] 
D[size(C, 1), size(B, 2)] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.conversionToZerosAndPolesSISO

Example to compute a zeros and poles representation from SISO state space representation

Inputs

NameDescription
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix
system matrices
A[:, :] 
B[:, :] 
C[:, :] 
D[:, :] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.designAssignPolesSISO Modelica_LinearSystems2.Examples.StateSpace.designAssignPolesSISO

Example for pole placing using Ackermann's method

Information


Computes the gain vector k for the state space system

 
sc = StateSpace(A=[-1,1;0,-2],B=[0, 1],C=[1,0; 0, 1],D=[0; 0])
such that for the state feedback
u = -k*y = -k*x
the closed-loop poles are placed at
p = {-3,-4}.

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

NameDescription
sc 

Outputs

NameDescription
k[2]Gain vector

Modelica_LinearSystems2.Examples.StateSpace.designKalmanFilter Modelica_LinearSystems2.Examples.StateSpace.designKalmanFilter

Description

Information

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

NameDescription
ss 

Outputs

NameDescription
L[:, :] 
kss 

Modelica_LinearSystems2.Examples.StateSpace.designLQG Modelica_LinearSystems2.Examples.StateSpace.designLQG

Description

Information

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

NameDescription
ssi 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.designLQR Modelica_LinearSystems2.Examples.StateSpace.designLQR

Description

Information

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

NameDescription
ssi 
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.plotPolesAndZeros

Example for plotting eigenvalues and invariant zeros of a state space system

Information

Extends from Modelica_LinearSystems2.StateSpace.Plot.polesAndZeros (Plot poles (i.e. eigenvalues) and/or invariant zeros of a state space system).

Inputs

NameDescription
ssLinear system in state space form
poles= true, to plot the poles (i.e. the eigenvalues) of ss
zeros= true, to plot the (invariant) zeros of ss
defaultDiagramDefault diagram layout
deviceProperties of device where figure is shown

Modelica_LinearSystems2.Examples.StateSpace.plotBodeMIMO

Constructs a transfer function from state space representation and plots the Bode diagram with automatic determination of the frequency range to plot

Inputs

NameDescription
system data definition
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
system matrices
A[:, size(A, 1)] 
B[size(A, 2), :] 
C[:, size(A, 1)] 
D[size(C, 1), size(B, 2)] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.plotBodeSISO

Constructs a transfer function from state space representation and plots the Bode diagram with automatic determination of the frequency range to plot

Inputs

NameDescription
systemOnFiletrue, if state space system is defined on file
fileNamefile where matrix [A, B; C, D] is stored
A[:, size(A, 1)] 
B[size(A, 2), :] 
C[:, size(A, 1)] 
D[size(C, 1), size(B, 2)] 
iuindex of inout
iyindex of output

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.plotTimeResponse

Time response plot example

Information


Computes the impulse response of the system StateSpace sc = StateSpace(A=[-1,1;0,-2],B=[1, 0;0, 1],C=[1,0; 0,1],D=[0, 0; 0, 0]).

Inputs

NameDescription
responsetype of time response
ss 

Modelica_LinearSystems2.Examples.StateSpace.plotImpulse

Impulse plot example

Information


Computes the impulse response of the system StateSpace sc = StateSpace(A=[-1,1;0,-2],B=[1, 0;0, 1],C=[1,0; 0,1],D=[0, 0; 0, 0]).

Inputs

NameDescription
ss 

Modelica_LinearSystems2.Examples.StateSpace.plotInital

Initial condition plot example

Information


Computes the initial condition response of the system StateSpace sc = StateSpace(A=[-1,1;0,-2],B=[1, 0;0, 1],C=[1,0; 0,1],D=[0, 0; 0, 0]) to the initial condition x0=[1;1].

Inputs

NameDescription
ss 

Modelica_LinearSystems2.Examples.StateSpace.plotRamp

Plot ramp response

Information


Computes the ramp response of the system StateSpace sc = StateSpace(A=[-1,1;0,-2],B=[1, 0;0, 1],C=[1,0; 0,1],D=[0, 0; 0, 0]).

Inputs

NameDescription
ss 

Modelica_LinearSystems2.Examples.StateSpace.plotStep

Step plot example

Information


Computes and plots the step response

Inputs

NameDescription
ss 

Modelica_LinearSystems2.Examples.StateSpace.plotZeros

case studies of systems with zeros

Information


Computes the initial condition response of the system StateSpace sc = StateSpace(A=[-1,1;0,-2],B=[1, 0;0, 1],C=[1,0; 0,1],D=[0, 0; 0, 0]) to the initial condition x0=[1;1]. This example plts the output y and the states (x1, x2, x3) of a system with the input

   u(t) = uk*exp(zk*t)
where zk is an invariant zero of the system. Assuming appropriate initial conditions, the output of the system is forced to zero. It is demonstrated that the output can also be forced to zero by applying a transient unstable input. Although the output is zero, the states show transient and unstable behavior. In comparison, the outputs as an reaction of inputs with half or double frequency are not equal to zero.

Modelica_LinearSystems2.Examples.StateSpace.transformation

Example to demonstrate the transformation to Jordan- observabilitiy- and controllability canonical form

Inputs

NameDescription
system data definition
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix
system matrices
A[:, :] 
B[:, :] 
C[:, :] 
D[:, :] 

Outputs

NameDescription
ok 

Modelica_LinearSystems2.Examples.StateSpace.transformationExtract

Example how to extract input/output related subsystems from state space system record

Modelica_LinearSystems2.Examples.StateSpace.transformationToIrreducibleForm

Example to compute the minimal state space realization of a given SISO state space realization

Information


This example shows the usage of function Modelica_LinearSystems2.StateSpace.reduceSystem which compute
a controllable and observable state space realization of a given state space realization.

Inputs

NameDescription
A[:, :] 
B[:, :] 
C[:, :] 
D[:, :] 
system data definition
fileNamefile where matrix [A, B; C, D] is stored
matrixNameName of the state space system matrix

Outputs

NameDescription
ok 

HTML-documentation generated by Dymola Tue Sep 08 18:52:56 2009.