# sparss

Sparse first-order state-space model

## Description

Use `sparss`

to represent sparse descriptor state-space models
using matrices obtained from your finite element analysis (FEA) package. FEA involves the
concept of dynamic substructuring where a mechanical system is partitioned into components
that are modeled separately. These components are then coupled using rigid or semi-rigid
physical interfaces that express consistency of displacements and equilibrium of internal
forces. The resultant matrices from this type of modeling are quite large with a sparse
pattern. Hence, using `sparss`

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

to
convert a second-order `mechss`

model object to a `sparss`

object.

You can use `sparss`

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

$$\begin{array}{r}E\frac{dx}{dt}=A\text{}x(t)+B\text{}u(t)\\ y(t)=C\text{}x(t)+D\text{}u(t)\end{array}$$

Here, `x`

, `u`

and `y`

represent the states, inputs and outputs respectively, while `A`

,
`B`

, `C`

, `D`

and `E`

are the state-space matrices. The `sparss`

object represents a state-space
model in MATLAB storing sparse matrices `A`

, `B`

,
`C`

, `D`

and `E`

along with other
information such as sample time, names and delays specific to the inputs and outputs.

You can use a `sparss`

object to:

Perform time-domain and frequency-domain response analysis.

Specify signal-based connections with other LTI models.

Transform models between continuous-time and discrete-time representations.

For more information, see Sparse Model Basics.

## Creation

### Syntax

### Description

creates a continuous-time first-order sparse state-space model object of the following form:`sys`

= sparss(`A`

,`B`

,`C`

,`D`

,`E`

)

$$\begin{array}{r}E\frac{dx}{dt}=A\text{}x(t)+B\text{}u(t)\\ y(t)=C\text{}x(t)+D\text{}u(t)\end{array}$$

For instance, consider a plant with `Nx`

states,
`Ny`

outputs, and `Nu`

inputs. The first-order
state-space matrices are:

`A`

is the sparse state matrix with`Nx`

-by-`Nx`

real- or complex-values.`B`

is the sparse input-to-state matrix with`Nx`

-by-`Nu`

real- or complex-values.is the sparse state-to-output matrix with

`Ny`

-by-`Nx`

real- or complex-values.`D`

is the sparse gain or input-to-output matrix with`Ny`

-by-`Nu`

real- or complex-values.`E`

is the sparse mass matrix with the same size as matrix`A`

. When`E`

is omitted,`sparss`

populates`E`

with an identity matrix.

creates a discrete-time sparse state-space model with sample time
`sys`

= sparss(`A`

,`B`

,`C`

,`D`

,`E`

,`ts`

)`ts`

with the form:

$$\begin{array}{r}E\text{}x\left[k+1\right]=A\text{}x\left[k\right]+B\text{}u\left[k\right]\\ y\left[k\right]=C\text{}x\left[k\right]+D\text{}u\left[k\right]\end{array}$$

To leave the sample time unspecified, set `ts`

to
`-1`

. When `E`

is an identity matrix, you can set
`E`

as `[]`

or omit `E`

as long
as `A`

is not a scalar.

### Input Arguments

### Output Arguments

## Properties

## Object Functions

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

model
objects.

## Examples

## References

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

## Version History

**Introduced in R2020b**

## See Also

`sparssdata`

| `mechss`

| `showStateInfo`

| `xsort`

| `full`

| `getx0`

| `spy`

| Descriptor
State-Space (Simulink)