Look-up table with changing table

2 次查看(过去 30 天)
I have two vectors with one row and 200 columns. The Torque vector is organised in an increasing way, while the velocity vector is not. This allows me to have the graph represented by the red line.
need to create a lookup table in simulink. I can't use the one in the library because I have to have the velocity vector organised in an increasing way. So I thought of creating this model in simulink. I sort the w_OOL data and use the sorted indexes to sort the T_OOL data. So with monotonically ordered vectors I can use the Lookup Table Dynamic block. The vector w_OOL is a vector of rpm ranging in an unordered fashion from 750 to 2479, whereas the vector T_OOL is ordered.
I don't understand why I get this error.
It is as if the sort block does not work. But if I replace the data with a vector xxx=rand(1,200) it works correctly. I don't understand how to get out of this problem. I repeat, I think the problem is between the w_OOL vector and the sort block, but I don't understand what the problem is.

回答(1 个)

Jayant Gangwar
Jayant Gangwar 2022-10-3
Hi Simone,
As the error specifies "xdat vector is the breakpoint, which must be strictly monotonically increasing.", which means that the w_OOL data should be increasing as well as should not have any repeating data for it to be classified as "strictly monotonically increasing".
From the graph you shared it is visible that w_OOL data which has the velocity vector has multiple data with same velocity values because of which this error is arising.
To overcome this error you can either create a look-up table with Torque vector as the "xdat" or find a way to eliminate the repeating values in the velocity vector.

类别

Help CenterFile Exchange 中查找有关 Lookup Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by