Lse

Model ElementLse is an abstract modeling element that defines a linear dynamic system.

Class Name

Lse

Description

The dynamic system is characterized by a vector of inputs u, a vector of dynamic states x, and a vector of outputs y. The state vector x is defined through a set of differential equations. The output vector y is defined by a set of algebraic equations. The image below illustrates the concept of a dynamic system.


Figure 1.

Attribute Summary

Name Property Modifiable by command? Designable?
id Int ()   No
label Str () Yes
x Reference ("Array") Yes
y Reference ("Array") Yes
u Reference ("Array") Yes
ic Reference ("Array") Yes
a Reference ("Matrix") Yes
b Reference ("Matrix") Yes
c Reference ("Matrix") Yes
d Reference ("Matrix") Yes
static_hold Bool () Yes
active Bool () Yes

Usage

# Defined in a compiled user-written subroutine
Lse (x=objArray, A=objMatrix, optional_attributes)

Attributes

x
Reference to an existing Array object of type "X"
Specifies the Array used to store the states "x" of this LSE. You can use the Array() function to access the states in a MotionSolve expression. You can also use this in SYSFNC and SYSARY to access the state values from a user subroutine.
This attribute is mandatory.
a
Reference to an existing Matrix object
Specifies the Matrix object containing the state matrix for the linear dynamic system. The A matrix encapsulates the intrinsic properties of the dynamic system. For instance, the eigenvalues of A represent the eigenvalues of the system. Similarly, the eigenvectors of A represent the mode shapes of the dynamic system. A is a constant valued matrix. It is required to be invertible. If there are nx states, the A matrix is of dimension nx x nx.
This attribute is mandatory
id
Integer
Specifies the element identification number. This number must be unique among all the LSE objects in the model.
Optional. MotionSolve will automatically create an ID when one is not specified.
Range of values: id > 0
label
String
Specifies the name of the LSE object.
Optional. When not specified, MotionSolve will create a label for you.
u
Reference to an Array object of type U
Specifies the ARRAY used to store the input u of this LSE. You can use the ARYVAL() function to access the inputs in a MotionSolve expression. You can also use SYSFNC and SYSARY to access the inputs in a user subroutine.
Optional.
Y
Reference to an Array object of type Y
Specifies the ARRAY used to store the output, y, of this LSE. You can use the ARYVAL() function to access the states in a MotionSolve expression. You can use SYSFNC and SYSARY to access the outputs in a user subroutine.
Optional.
lc
Specifies the Array used to store the initial values of the states, x of this LSE.
Optional. When not specified, the initial values of all the states default to zero.
static_hold
Boolean
Specifies whether the value of the dynamic states are kept fixed or not during static equilibrium and quasi-static solutions.
  • "TRUE" implies that the value of the dynamic state is kept constant during static and quasi-static solutions.
  • "FALSE" implies that the value of the dynamic state is allowed to change during static equilibrium or quasi-static solutions.
Optional. When not specified it defaults to "FALSE".
b
Reference to an existing Matrix object
Specifies the Matrix object containing the input matrix for the linear dynamic system. B is a constant valued matrix. If there are nx states and nu inputs, the B matrix is of dimension nx x nu.
Optional. When not specified it is not used.
c
Reference to an existing Matrix object
Specifies the Matrix object containing the output matrix for the linear dynamic system. C is a constant valued matrix. If there are nx states and ny outputs, the C matrix is of dimension ny x nx.
Optional. When not specified it is not used.
d
Reference to an existing Matrix object
Specifies the Matrix object containing the feed-forward (or feed-through) matrix for the linear dynamic system. D is a constant valued matrix. If there are ny outputs and nu inputs, the D matrix is of dimension ny x nu.
Optional. When not specified it is not used.
active
Boolean
Select one from "TRUE" or "FALSE"
  • "TRUE" indicates that the element is active in the model and it affects the behavior of the system
  • "FALSE" indicates that the element is inactive in the model and it does not affect the behavior of the system. It is almost as if the entity was removed from the model, of course with the exception that can be turned "ON" when desirable.
The attribute active is optional. When not specified, active defaults to "TRUE"

Examples

Define an LSE with 3 states, 2 outputs, 1 input and no feed-forward matrix.
# Define the Arrays first
x = Array (type="X")                            # State  Array
y = Array (type="Y")                            # Output Array

var8 = Variable(function="10*sin(2*pi*time)")   # Forcing function
u = Array (type="U", variables=[var8])          # Input Array

# Define the matrices now
aValues = [  0, 1,  0,
           -20, 0,  10,
            10, 0, -10]
a = Matrix (label="A-Matrix", rows=3, columns=3, full="RORDER", values=aValues)

bValues = [ 0, 1, 0]
b = Matrix (label="B-Matrix", rows=3, columns=1, full="RORDER", values=bValues)

cValues = [ 0, 0, 1,
            1, 0, 0]
c = Matrix (label="C-Matrix", rows=3, columns=2, full="RORDER", values=cValues)

# Finally, define the linear system
lse = Lse (label="mass-spring-damper", x=x, y=y, u=u, a=a, b=b, c=c)
The Lse represents the equations for the system shown below.
  • The input is Fa(t)
  • The two outputs are the coordinates x, y
  • The three states are: x, vx and y


Figure 2.

Comments

  1. See Properties for an explanation about what properties are, why they are used, and how you can extend these.
  2. For a more detailed explanation about Lse, see Control: State Equation.