HyperWorks Solvers

Lse

Lse

Previous topic Next topic No expanding text in this topic  

Lse

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Model Element

Class Name

Lse

Description

Lse is an abstract modeling element that defines a linear dynamic system.  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.

lse_api_img1

Attribute Summary

Name

Property

Modifiable by command?

id    

Int ()

 

label

Str ()

x        

Reference ("Array")

y        

Reference ("Array")

u        

Reference ("Array")

ic        

Reference ("Array")

a

Reference ("Matrix")

b

Reference ("Matrix")

c

Reference ("Matrix")

d

Reference ("Matrix")

static_hold

Bool ()

active

Bool ()

Usage

# Defined in a compiled user-written subroutine

Lse (x=objArray, A=objMatrix, optional_attributes)

Attribute Description

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

Optional attributes

id

Integer

Specifies the element identification number.  This number must be unique among all the LSE objects in the model.

This attribute is 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.

This attribute is 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.

This attribute is 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.

This attribute is optional.

ic

Specifies the Array used to store the initial values of the states, x of this LSE.

This attribute is 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.

This attribute is 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.

This attribute is 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.

This attribute is 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.

This attribute is optional. When not specified it is not used.

active

Bool

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

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 the Comments in the XML syntax section.

Examples

1.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

lse_api_img2