Skip to main content

Core concepts

To facilitate the modeling of LPV systems, LPVcore introduces a set of fundamental classes:

  1. A timemap object to represent the extended scheduling signal.
  2. A pbasis parent object to represent scalar scheduling dependent basis functions.
  3. A pmatrix object to represent scheduling dependent matrix functions.
  4. A lpvrep parent object to represent different types of linear parameter-varying system representations.

On this page, each class is treated in more detail.

timemap: extended scheduling signal#

LPV systems exhibit input-output dynamics that are linear, but whose relation is perturbed by an auxiliary time signal called the scheduling signal. The scheduling signal, denoted here by p(t)∈PβŠ‚Rnpp(t) \in \mathbb{P} \subset \mathbb{R}^{n_p}, often represents a physical quantity pp, such as position or temperature, as a function of time tt. LPV systems can be formulated both in continuous-time (CT) and discrete-time (DT), in which case tt assumes values in R\mathbb{R} or Z\mathbb{Z}, respectively.

Sometimes, the LPV system also depends on derivatives (CT) or time-shifted (DT) versions of the scheduling signal, for example when both the position and velocity of a certain point are considered. Since the velocity is related to the position by differentation, the position can be seen as the scheduling signal, while the velocity can be seen as an extension of this scheduling signal. The position and velocity are together collected in the extended scheduling signal, denoted by ρ\rho. The extended scheduling signal consists of the scheduling signal itself and all derivatives (CT) and time-shifted (DT) versions that are part of the parameter-varying dynamics.

For example, consider a DT extended scheduling signal that consists of the first NN forward- and backward-shifted version of pp:

ρ(t):=[p(t)T,p(tβˆ’1)T,p(t+1)T,...,p(tβˆ’N)T,p(t+N)T]T\rho(t) := [ p(t)^{\mathrm{T}}, p(t-1)^{\mathrm{T}}, p(t+1)^{\mathrm{T}}, ..., p(t-N)^{\mathrm{T}}, p(t+N)^{\mathrm{T}} ]^{\mathrm{T}}

As a CT example, consider an extended scheduling signal that consists of the derivatives of pp up to the NthN^{\mathrm{th}} order:

ρ(t):=[p(t)T,dpdt(t)T,...,dNpdtN(t)T]T\rho(t) := [ p(t)^{\mathrm{T}}, \frac{\mathrm{d} p}{\mathrm{d} t}(t)^{\mathrm{T}}, ..., \frac{\mathrm{d}^N p}{\mathrm{d} t^N}(t)^{\mathrm{T}} ]^{\mathrm{T}}

In LPVcore, an extended scheduling signal is represented using the timemap object. It allows the user to specify the desired time domain and the derivatives (CT) and time shifts (DT) that make up the extended scheduling signal. Properties on the scalar components of the scheduling signal, such as names, bounds and rate bounds, are supported as well. The following code snippet creates a timemap object representing the extended scheduling signal ρ=[a;b;dadt,dbdt]\rho = [ a; b; \frac{\mathrm{d} a}{\mathrm{d} t}, \frac{\mathrm{d} b}{\mathrm{d} t}] (explicit time-dependence is dropped for notational convenience):

rho = timemap([0, 1], 'ct', 'Name', {'a', 'b'})

For more information on the timemap object, type doc timemap or consult the suggested examples:

Suggested examples

pbasis: basis functions#

The parent class pbasis represents the family of scheduling dependent basis functions available in LPVcore. A scheduling dependent basis function Ο•\phi maps the value of the extended scheduling signal at a point in time to a real scalar, i.e.:

Ο•:RNρ→R\phi: \mathbb{R}^{N_{\rho}} \rightarrow \mathbb{R}

Some examples of parameter-varying basis functions:

  • Ο•(ρ(t))=1\phi(\rho(t)) = 1
  • Ο•(ρ(t))=ρi(t)\phi(\rho(t)) = \rho_i(t), for i=1,...,Nρi = 1, ..., N_{\rho}
  • Ο•(ρ(t))=∏i=1Nρρi(t)di\phi(\rho(t)) = \prod_{i=1}^{N_{\rho}} \rho_i(t)^{d_i}, for some {di∈Z∣i=1,...,Nρ}\{ d_i \in \mathbb{Z} | i = 1, ..., N_{\rho} \}.
  • Ο•(ρ(t))=sin⁑(2πρi(t))\phi(\rho(t)) = \sin(2 \pi \rho_i(t)), for i=1,...,Nρi = 1, ..., N_{\rho}

The above examples are all supported by classes in LPVcore inheriting from pbasis. The first example, the constant 11, can be constructed from the pbconst object. It takes no arguments:

phi = pbconst % phi = 1

The second example, the function ρi(t)\rho_i(t), is constructed from the pbaffine object.It takes one argument: the index of the extended scheduling signal that is selected, or the value 00 for a constant. For example, the following code snippet constructs Ο•=ρ1\phi = \rho_1:

phi = pbaffine(1) % phi = rho_1

pbaffine is a parent class of pbconst since it can be seen as a generalization. A further generalization is implemented in the pbpoly class, which represents polynomial functions of the extended scheduling signal (the third example in the list above). It is parametrized using two inputs: a matrix, degrees, representing the degrees of the polynomial, and a vector coeff, representing the coefficient of each monomial. Each row in degrees corresponds to a monomial. For example, the following code snippet constructs Ο•=ρ12+2ρ22\phi = \rho_1^2 + 2 \rho_2^2:

phi = pbpoly([2, 0; 0, 2], [1, 2]) % phi = rho_1^2 + 2 rho_2^2

Lastly, custom scheduling dependent basis functions that cannot be expressed in polynomial form are supported with the pbcustom object. To use it, create a function handle that has a single input argument named rho. It is important that the argument is named rho since pbcustom relies on this naming convention. The expected format for rho is that is a NN-by-NρN_{\rho} matrix, where NN is an arbitrary non-negative integer. Thus, the function handle should support vectorization. To ensure that the format is accepted, LPVcore verifies that each appearance of rho in the function handle is in vectorized format, i.e., rho(:, x) with x the index of the extended scheduling signal. For example, the following code snippet constructs Ο•=sin⁑(2πρ1)+cos⁑(2πρ2)\phi = \sin(2 \pi \rho_1) + \cos(2 \pi \rho_2):

f = @(rho) sin(2 * pi * rho(:, 1)) + cos(2 * pi * rho(:, 2))
phi = pbcustom(f)

pmatrix: matrix function#

Using the extended scheduling signal represented by the timemap object, and a set of scheduling dependent basis functions represented by pbasis objects, the next step is to assemble a scheduling dependent matrix function of the following form:

A(ρ(t))=βˆ‘i=1NAiΟ•i(ρ(t))A(\rho(t)) = \sum_{i=1}^{N} A_i \phi_i(\rho(t))

where AiA_i are standard MATLAB matrices, Ο•i\phi_i are the scheduling dependent basis functions, and ρ\rho is the extended scheduling signal.

There are several ways to construct such matrix functions. First, using the pmatrix class. When instantiating an object of this class, 3 input arguments are required:

  1. The coefficients A_i.
  2. The basis functions phi_i.
  3. The extended scheduling signal rho.

For example, the following code snippet constructs the scheduling dependent matrix function A(ρ(t))=ρ1(t)+2ρ2(t)A(\rho(t)) = \rho_1(t) + 2 \rho_2(t), with ρ=[a;b]\rho = [a; b]:

Ai = cat(3, 1, 2)
phii = { pbaffine(1), pbaffine(2) } % rho_1, rho_2
rho = timemap(0, 'ct', 'Name', {'a', 'b'}) % rho_1 --> a, rho_2 --> b
A = pmatrix(Ai, phii, 'SchedulingTimeMap', rho) % a + 2b

As a simpler alternative to pmatrix, the preal function is available. This function constructs a pmatrix object representing a scalar extended scheduling signal with a specified name, time domain, derivative (CT) or time shift (DT), and other properties. For example, the following code snippet constructs a scheduling dependent matrix function A(t)=q(tβˆ’1)A(t) = q(t-1), with scheduling signal qq and extended scheduling signal ρ(t)=q(tβˆ’1)\rho(t) = q(t-1):

A = preal('q', 'dt', 'Dynamic', -1)

The resulting pmatrix object can then be combined with other pmatrix objects to form more complicated expressions. Many MATLAB operations on regular matrices have been extended to the pmatrix class. For example, addition, matrix multiplication, element-wise multiplication, and more. For a complete overview, see the Reference section, type doc pmatrix, or consult the suggested examples:

Suggested examples

lpvrep: LPV system representations#

LPVcore supports the following system representations:

lpvio: input-output representation#

In this section, an LPV system representation relating an input signal uu and an output signal yy is presented. The dependence between these two signals is given as follows:

A(ρ,ξ)y=B(ρ,ξ)u,A(\rho, \xi) y = B(\rho, \xi) u,

where A,BA, B are polynomials in ΞΎ\xi with coefficients that depend on the extended scheduling signal ρ\rho. ΞΎ\xi is the backward time-shift operator qβˆ’1q^{-1} (DT) or the differentiation operator ddt\frac{\mathrm{d}}{\mathrm{d}t} (CT). AA is a monic polynomial, i.e., the constant term is the non-scheduling dependent identity matrix II. The following example denotes a DT SISO system where AA and BB both have 2 terms:

(1+ρqβˆ’1)y=(ρ2+(1βˆ’Ο)qβˆ’1)u(1 + \rho q^{-1}) y = (\rho^2 + (1 - \rho) q^{-1}) u

To construct such a representation in LPVcore, the lpvio class is used. The polynomials AA and BB are formatted as cell arrays, with each element of the cell array containing a pmatrix object corresponding to a term of the polynomial. For example, the following code snippet constructs the LPV-IO system representation of the example above, with a sampling time of 1 second:

Ts = 1; % seconds
rho = preal('rho', 'dt');
A = {1, rho};
B = {rho^2, 1 - rho};
sys = lpvio(A, B, Ts)

lpvss: state-space representation#

In this section, the LPV-SS representation is introduced, where the state-space matrices are scheduling dependent, i.e.:

ξx=A(ρ)x+B(ρ)u,y=C(ρ)x+D(ρ)u,\xi x = A(\rho) x + B(\rho) u, \\ y = C(\rho) x + D(\rho) u,

with A,B,C,DA, B, C, D scheduling dependent matrix functions and ΞΎ\xi the backward time-shift operator qβˆ’1q^{-1} (DT) or the differentiation operator ddt\frac{\mathrm{d}}{\mathrm{d}t} (CT). In LPVcore, the lpvss class is used to create such a representation. For example, the following code snippet constructs a CT LPV-SS system representation:

rho = preal('rho', 'ct');
A = -1 + rho;
B = 1;
C = 1 + rho + rho^2;
D = 0;
sys = lpvss(A, B, C, D);

As can be seen, each state-space matrix can have a different dependence on the scheduling signal.

lpvlfr: linear-fractional representation#

Another LPV system representation involves the linear-fractional representatin (LFR). Such an LPV-LFR system can be seen as the interconnection between an LTI system, GG, and a scheduling dependent matrix function, Ξ”(ρ)\Delta(\rho), in the following manner:

LPV-LFR

The LPVcore class lpvlfr is used to construct a representation of an LPV-LFR system. The following code snippet gives an example with 1 input uu, 1 output yy, and 3 components in both interconnection signals ww and zz.

rho = preal('rho', 'dt');
Delta = blkdiag(rho, eye(2) * rho^2);
G = drss(10, 4, 4);
sys = lpvlfr(Delta, G);