Entering simulink 3D look-up table data from MATLAB

Click For Summary
SUMMARY

The discussion centers on the process of entering 3D look-up table data from MATLAB into Simulink. The user, Alex, has successfully generated a contour plot using MATLAB code that involves meshgrid and griddata functions for engine speed and brake mean effective pressure (BMEP) data. However, Alex seeks assistance in implementing a 3D look-up table in Simulink to retrieve a value for z based on inputs x and y. The need for clarity on utilizing 3D look-up tables in Simulink is emphasized.

PREREQUISITES
  • Familiarity with MATLAB functions such as meshgrid and griddata
  • Understanding of contour plots and their applications in data visualization
  • Basic knowledge of Simulink and its modeling capabilities
  • Experience with look-up tables and interpolation methods
NEXT STEPS
  • Explore the Simulink 3D Look-Up Table block documentation
  • Learn about MATLAB's interpolation functions for creating look-up tables
  • Investigate how to implement data from MATLAB into Simulink models
  • Study examples of 3D look-up tables in Simulink for practical implementation
USEFUL FOR

This discussion is beneficial for MATLAB users, Simulink modelers, and engineers involved in data visualization and simulation, particularly those looking to integrate complex data sets into their models.

Alex91
Messages
6
Reaction score
0
I have created a contour plot in MATLAB using the following code:

>> NP=40;
>> [RP TP]=meshgrid(linspace(min(RPM),max(RPM),NP),linspace(min(BMEP),max(BMEP),NP));
>> BSFC_IT=griddata(RPM,BMEP,BSFC,RP,TP);
>> NC=12;
>> Fig1=figure;
>> [CT HT]=contourf(RP,TP,BSFC_IT,round(logspace(log10(210),log10(400),NC)));
>> colorbar;
>> %clabel(CT,HT);
>> xlabel('Engine Speed (rpm)')
>> ylabel('BMEP (bar)')
>> title('Contours of BSFC (g/kWh)')

I would like to put all of my data in a 3D look-up table in Simulink, then when I insert a value for x and y it returns me a value for z.

Is there any way I can do this? I've been looking at how to use 3D look-up tables but I can't get my head around it.

Any help is much apreciated.

Cheers

Alex
 

Attachments

  • BSFC Plot.png
    BSFC Plot.png
    20.6 KB · Views: 963
Physics news on Phys.org
I'm sorry you are not finding help at the moment. Is there any additional information you can share with us?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
7K