How can I mesh the state-space matrix representation of LPV systems in Control Systems Toolbox R2023a?

조회 수: 6 (최근 30일)
I have a Linear Parameter-Varying (LPV) Model represented in its state-space form through a mesh matrix. This LPV model has "m" inputs, "p" outputs, and "n" states. It has been gridded across a parameter space that is "s1" x "s2". Then, the mesh size is [s1 s2] while the input, output, and state offsets are [m 1 s1 s2] [p 1 s1 s2] and [n 1 s1 s2], respectively. However, attempting to simulate the model fails with the following error message:
The value of state offset must be a real and finite vector of length or an array of size [x 1 s1*s2 1].
It seems like the 2D array might have been interpreted as a 1D array, and "x" seems unrelated to "m", "p", "n", "s1", and "s2". Therefore, how can I appropriately define and verify the meshing in LPV systems?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 8월 23일
The state-space representation of LPV systems keeps the shapes of its constitutive matrices, namely "A", "B", "C" and "D". These matrices keep their respective sizes related to the number of inputs "m", outputs "p", and states "n". The elements in the mesh produce several instances of these four constitutive matrices, and the number of instances is produced by the mesh size [s1 s2]. This generation of instances is represented in MATLAB by a third dimension in the state-space form of these systems. The example "Simulate a Linear Parameter-Varying System" illustrates this concept with an LPV system with 1 input, 1 output, and 2 states.
The following example expands this concept by generating state-space models with several inputs, outputs, states, and mesh sizes. 
The "size" function provides detailed insight into how LPV systems are defined in their state-space form. Using this command helps to verify the meshing of the system.
>> size(sys)
s1-by-s2 array of state-space models with 'p' outputs, 'm' inputs, and 'n' states.
If the "LPV System" block interprets a 2D array as a 1D grid because of inconsistent grid point values, the following steps are recommended to solve this issue:
  • Get the grid vectors x and y, then call the command "ndgrid" as follows:
[X,Y] = ndgrid(x,y)
  • Then, override the corresponding field values in the property "SamplingGrid" for the system "sys":
sys.SamplingGrid.x = X;
sys.SamplingGrid.y = Y;
  • The LPV block should now recognize the grid as 2D. Note that "x" and "y" are placeholders and should be replaced by the actual variable names.

추가 답변 (0개)

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by