Main Content

Sparse second-order state-space model

Use `mechss`

to represent second-order sparse models using
matrices obtained from your finite element analysis (FEA) package. Such sparse models arise
from finite element analysis (FEA) and are useful in fields like structural analysis, fluid
flow, heat transfer, and electromagnetics. The resultant matrices from this type of modeling
are quite large with a sparse pattern. Hence, using `mechss`

is an efficient
way to represent such large sparse state-space models in MATLAB^{®} to perform linear analysis. You can also use `mechss`

to
convert a first-order `sparss`

model object or other dynamic system models to a `mechss`

object.

You can use `mechss`

model objects to represent SISO or MIMO state-space
models in continuous time or discrete time. In continuous time, a second-order sparse
mass-spring-damper model is represented in the following form:

$$\begin{array}{r}\text{M}\ddot{q}(t)+\text{C}\dot{q}(t)+\text{K}q(t)\text{=B}u(t)\\ y(t)\text{=F}q(t)+\text{G}\dot{q}(t)+\text{D}u(t)\end{array}$$

Here, the full state vector is given by $$\left[q,\dot{q}\right]$$ where $$q$$ and $$\dot{q}$$ are the displacement and velocity vectors. `u`

and
`y`

represent the inputs and outputs, respectively. `M`

,
`C`

and `K`

represent the mass, damping and stiffness
matrices, respectively. `B`

is the input matrix while `F`

and `G`

are the output matrices for displacement and velocity, respectively.
`D`

is the input-to-output matrix.

You can use a `mechss`

object to:

Perform time-domain and frequency-domain response analysis.

Specify signal-based connections with other LTI models.

Specify physical interfaces between components using the

`interface`

command.

For more information, see Sparse Model Basics.

creates a `sys`

= mechss(`M`

,`C`

,`K`

,`B`

,`F`

,`G`

,`D`

)`mechss`

object representing this continuous-time
second-order mass-spring-damper model:

$$\begin{array}{r}\text{M}\ddot{q}(t)+\text{C}\dot{q}(t)+\text{K}q(t)\text{=B}u(t)\\ y(t)\text{=F}q(t)+\text{G}\dot{q}(t)+\text{D}u(t)\end{array}$$

Here, `M`

, `C`

, and
`K`

represent the mass, damping, and stiffness matrices,
respectively. `B`

is the input-to-state matrix while
`F`

and `G`

are the displacement-to-output and
velocity-to-output matrices resulting from the two components of the state
`x`

. `D`

is the input-to-output matrix. You can set
`M`

to `[]`

when the mass matrix is an identity
matrix. Set `G`

and `D`

to `[]`

or omit them when they are empty.

uses the sample time `sys`

= mechss(`M`

,`C`

,`K`

,`B`

,`F`

,`G`

,`D`

,`ts`

)`ts`

to create a `mechss`

object representing this discrete-time second-order mass-spring-damper model:

$$\begin{array}{r}\text{M}q\left[k+2\right]+\text{C}q\left[k+1\right]+\text{K}q\left[k\right]\text{=B}u\left[k\right]\\ y\left[k\right]\text{=F}q\left[k\right]+\text{G}q\left[k+1\right]+\text{D}u\left[k\right]\end{array}$$

To leave the sample time unspecified, set `ts`

to
`-1`

.

The following lists show functions you can use with `mechss`

model
objects.

[1] H. Hilber, T. Hughes & R.
Taylor. " Improved numerical dissipation for time integration algorithms in structural
dynamics." *Earthquake Engineering and Structural Dynamics*, vol. 5, no. 3,
pp. 283-292, 1977.

[2] M. Hosea and L. Shampine.
"Analysis and implementation of TR-BDF2." *Applied Numerical Mathematics*,
vol. 20, no. 1-2, pp. 21-37, 1996.

`sparss`

| `mechssdata`

| `showStateInfo`

| `interface`

| `xsort`

| `full`

| `spy`

| Sparse Second Order