To facilitate the modeling of LPV systems, LPVcore introduces a set of fundamental classes:
timemapobject to represent the extended scheduling signal.
pbasisparent object to represent scalar scheduling dependent basis functions.
pmatrixobject to represent scheduling dependent matrix functions.
lpvrepparent 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 , often represents a physical quantity , such as position or temperature, as a function of time . LPV systems can be formulated both in continuous-time (CT) and discrete-time (DT), in which case assumes values in or , 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 . 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 forward- and backward-shifted version of :
As a CT example, consider an extended scheduling signal that consists of the derivatives of up to the order:
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 (explicit time-dependence is dropped for notational convenience):
For more information on the
timemap object, type
doc timemap or consult the 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 maps the value of the extended scheduling signal at a point in time to a real scalar, i.e.:
Some examples of parameter-varying basis functions:
- , for
- , for some .
- , for
The above examples are all supported by classes in LPVcore inheriting from
pbasis. The first example, the constant , can be constructed from the
pbconst object. It takes no arguments:
The second example, the function , is constructed from the
pbaffine object.It takes one argument: the index of the extended scheduling signal that is selected, or the value for a constant. For example, the following code snippet constructs :
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 :
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
pbcustom relies on this naming convention. The expected format for
rho is that is a -by- matrix, where 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 :
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:
where are standard MATLAB matrices, are the scheduling dependent basis functions, and 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:
- The coefficients
- The basis functions
- The extended scheduling signal
For example, the following code snippet constructs the scheduling dependent matrix function , with :
As a simpler alternative to
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 , with scheduling signal and extended scheduling signal :
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:
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 and an output signal is presented. The dependence between these two signals is given as follows:
where are polynomials in with coefficients that depend on the extended scheduling signal . is the backward time-shift operator (DT) or the differentiation operator (CT). is a monic polynomial, i.e., the constant term is the non-scheduling dependent identity matrix . The following example denotes a DT SISO system where and both have 2 terms:
To construct such a representation in LPVcore, the
lpvio class is used. The polynomials and 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:
lpvss: state-space representation#
In this section, the LPV-SS representation is introduced, where the state-space matrices are scheduling dependent, i.e.:
with scheduling dependent matrix functions and the backward time-shift operator (DT) or the differentiation operator (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:
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, , and a scheduling dependent matrix function, , in the following manner:
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 , 1 output , and 3 components in both interconnection signals and .