Toolbox compatibility
Overview
LPVcore offers compatibility with the LPV objects in both the Control System Toolbox and LPVTools through conversion functions. In the following sections, we give more details on the compatibility with each toolbox.
Control System Toolbox
Since MATLAB R2023a, the Control System Toolbox (CST) offers the creation of LPV state-space representations in the form of lpvss
objects. These objects differ from the similarly named LPVcore.lpvss
objects in the LPVcore Toolbox. Namely, the parameter dependency of lpvss
objects in the CST is defined through custom functions, while LPVcore.lpvss
objects have their dependency defined through pmatrix
objects with basis functions. Due to these differences, only conversion from LPVcore.lpvss
objects to (CST) lpvss
objects is possible and not vice versa.
Conversion from a LPVcore.lpvss
object to an lpvss
object is facilitated through the LPVcore.conversionLpvss
function. An example of its use is demonstrated in the following code snippet:
p = preal('p', 'ct', 'Range', [0, 9]);
A = [0 1; - 1 - p, -3];
B = [0;1];
C = [1 0];
D = 0;
model = LPVcore.lpvss(A, B, C, D);
modelConverted = LPVcore.conversionLpvss(model);
LPVTools
The LPVTools toolbox offers LPV state-space representations in the form of the plftss
object and pss
object. The plftss
object is a Linear Fractional Representation (LFR) and shares similarities with the LPVcore.lpvlfr
object in LPVcore. The pss
object is a grid-based representation, whereby the dynamics at specific parameter grid points are specified, which is similar to the LPVcore.lpvgridss
object in LPVcore. To convert these LPVTools objects to and from their counterparts in LPVcore, we provide the following commands:
LPVcore.plftssConversion
: To convert an (LPVTools)plftss
object to an (LPVcore)LPVcore.lpvlfr
object.LPVcore.pssConversion
: To convert an (LPVTools)pss
object to an (LPVcore)LPVcore.lpvgridss
object.LPVcore.conversionPlftss
To convert an (LPVcore)LPVcore.lpvlfr
(orLPVcore.lpvss
) object to an (LPVTools)plftss
object.LPVcore.conversionPss
To convert an (LPVcore)LPVcore.lpvgridss
object to an (LPVTools)pss
object.
An example of the use of LPVcore.conversionPlftss
is demonstrated in the following code snippet:
Delta = preal('p', 'ct', 'Range', [0, 9]);
A = [0 1; -1 -2];
B = [0 1;1 1];
C = [1 0; 2 0];
D = [0 1;1 2];
G = ss(A, B, C, D)
model = LPVcore.lpvlfr(Delta, G);
modelConverted = LPVcore.conversionPlftss(model);