Interpolation between matrices in Simulink

2 ビュー (過去 30 日間)
Dogukan Aygun
Dogukan Aygun 2021 年 2 月 8 日
コメント済み: Dogukan Aygun 2021 年 2 月 8 日
Hello everyone,
I am having trouble about interpolating between matrices in Simulink. To explain detailly, I am forming a Flight Model for an aircraft, and I need to use given data sets in Engine Model of my simulation. I have got Thrust Coefficient values for 3 different RPM values and 4 different altitude values. Each of these 12 data sets are formed such that they are a 2D array where x direction is for different Advance Ratio values, and y direction is for different Power coefficient values. I tried to use the 2D and 3D Lookup Tables but they do not make interpolation between two matrices. What I need is for a given altitude and RPM value, interpolate the matrices and find a new matrix as in the image below. Then I can use a 2D Lookup Table for given CP and J values.

採用された回答

Andy Bartlett
Andy Bartlett 2021 年 2 月 8 日
It sounds like you have
3 by 4 by 23 by 6
data points corresponding to
3 rpms, 4 altitudes, 23 CPs, 6 Js
and you want to interpolate across this data using the four values, rpm, altitude, CP and J.
Have you tried using a 4D Lookup Table?
If the 4D Lookup Table does match your needs, then it can be a lot more efficient.
Assuming the four inputs are scalar:
A 4D lookup table internally requires 15 interpolation calculations.
A 2D interpolation across a 23 by 6 matrix would require 414 interpolations, then 3 more interpolations for the final 2D interpolation stage.
If you have reason to breakup the calculations, rather than use 4D Lookup, consider using the prelookup blocks as the first stage.
The prelookup will provide the interpolation factors and the indicies into the needed sections of your 3 by 4 by 23 by 6 data.
Using the indices, you could use a block like a selector to extract just the data for the current output calculations.
This would allow much fewer interpolation calculations than working on the full 23 by 6 matrices.
  2 件のコメント
Dogukan Aygun
Dogukan Aygun 2021 年 2 月 8 日
Thank you for your quick reply. A 4D Look up Table with proper matrices did my job. Maybe for a performance improvement I may involve Prelook-up blocks. For the people who struggle on my problem I am sharing the block and the inputs with the images below.
Dogukan Aygun
Dogukan Aygun 2021 年 2 月 8 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNonlinearity についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by