# Lse

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

## Class Name

Lse

## Description

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

## 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"
`a`- Reference to an existing Matrix object
`id`- Integer
`label`- String
`u`- Reference to an Array object of type U
`Y`- Reference to an Array object of type Y
`lc`- Specifies the Array used to store the initial
values of the states,
`x`of this LSE. `static_hold`- Boolean
`b`- Reference to an existing Matrix object
`c`- Reference to an existing Matrix object
`d`- Reference to an existing Matrix object
`active`- Boolean

## Examples

```
# 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 input is F
_{a}(t) - The two outputs are the coordinates x, y
- The three states are: x, vx and y

## Comments

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