# lpvss

## Description

Use `lpvss`

to represent linear state-space models whose dynamics
vary as a function of time-dependent parameters. *Linear parameter-varying*
(LPV) models are helpful to obtain low-complexity, locally linear approximations of nonlinear
systems. They can model a much richer class of behaviors than LTI models, especially when the
parameters are allowed to depend on internal states (quasi-LPV). Hence, using
`lpvss`

models lets you efficiently apply design techniques, such as
gain-scheduled control, to nonlinear models.

You can use `lpvss`

to create continuous-time or discrete-time linear
parameter-varying state-space models. In continuous time, an `lpvss`

model is
described by the following state-space equations.

$$\begin{array}{c}E(t,p)\dot{x}={\delta}_{0}(t,p)+A(t,p)(x-{x}_{0}(t,p))+B(t,p)(u-{u}_{0}(t,p))\\ y(t)={y}_{0}(t,p)+C(t,p)(x-{x}_{0}(t,p))+D(t,p)(u-{u}_{0}(t,p))\end{array}$$

Here, *p* is a vector of time-dependent exogenous parameters and
*δ*_{0}(*t*),
*x*_{0}(*t*),
*u*_{0}(*t*), and
*y*_{0}(*t*) are time-varying
derivative, state, input, and output offsets, respectively.

In discrete time, an `lpvss`

model is described by the following
state-space equations.

$$\begin{array}{c}E(k,{p}_{k}){x}_{k+1}={\delta}_{0}(k,{p}_{k})+A(k,{p}_{k})({x}_{k}-{x}_{0}(k,{p}_{k}))+B(k,{p}_{k})({u}_{k}-{u}_{0}(k,{p}_{k}))\\ {y}_{k}={y}_{0}(k,{p}_{k})+C(k,{p}_{k})({x}_{k}-{x}_{0}(k,{p}_{k}))+D(k,{p}_{k})({u}_{k}-{u}_{0}(k,{p}_{k}))\end{array}$$

Here, the integer index *k* counts the number of sampling periods
`Ts`

.

You can use an `lpvss`

object to model:

Linear systems whose coefficients depend on external or environmental parameters. For an example, see Control Design for Spinning Disks.

Nonlinear systems operating near steady-state conditions that change in time and depend on a few physical parameters. For example, see Design and Validate Gain-Scheduled Controller for Nonlinear Aircraft Pitch Dynamics.

Use `lpvss`

to construct LPV models whose dynamics are described by a
MATLAB^{®} function (the *data function*). Use `ssInterpolant`

to
construct LPV models that interpolate linearized LTI dynamics over a grid of operating
conditions. The `lpvss`

object cannot represent quasi-LPV models consisting of
an LPV model with a scheduling map *p*(*t*) =
*h*(*t*,*x*,*u*), but
you can implicitly specify the parameter trajectory as a function of time
*t*, states *x*, and inputs *u* to simulate
quasi-LPV models. See LPV and LTV Models for functions and
operations applicable to `lpvss`

objects.

## Creation

### Syntax

### Description

creates a continuous-time LPV model. `lpvSys`

= lpvss(`ParamNames`

,`DataFcn`

)`ParamNames`

specifies a name for
each element of the parameter vector *p*. `DataFcn`

is
the name or a handle to the *data function*, the user-defined
MATLAB function that calculates the matrices and offsets for given
(*t*,*p*) values (or
(*k*,*p*) values in discrete time).

creates a discrete-time LPV model with sample time `lpvSys`

= lpvss(`ParamNames`

,`DataFcn`

,`ts`

)`ts`

.

evaluates `lpvSys`

= lpvss(`ParamNames`

,`DataFcn`

,`ts`

,`tcheck`

,`pcheck`

)`DataFcn`

at
(`tcheck`

,`pcheck`

) to determine the number of states,
inputs, and outputs. By default, `lpvss`

uses
(`tcheck`

,`pcheck`

) = (0,0).

sets properties of the linear parameter-varying model using one or more name-value
arguments. Use this syntax with any of the previous input-argument combinations.`lpvSys`

= lpvss(___,`Name=Value`

)

### Input Arguments

## Properties

## Object Functions

## Examples

## Version History

**Introduced in R2023a**

## See Also

`ltvss`

| `getTestValue`

| `setTestValue`

| `sample`

| `ssInterpolant`