Enter LUT-breakpoints and LUT-table data with variable dimension in system mask of referenced model
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear all,
I am trying to setup a "referenced model" in simulink, which gets parameterized via a "system mask".
Inside of the referenced model, there is a 2D-LUT. I would like to enter the LUT breakpoint data and LUT table data via the system mask.
Reason for this is, that the referenced model is used 3 times inside a top model, but I need different parametrization for the LUTs (besides other parameters) and the input dimensions of the LUT-data (breakpoints, table data) varies for each referenced model (1,2,3).
Therefore, I added matlab variables, but I also tried simulink variables, in the referenced model workspace (set as argument).
But when I try to use them in the system mask, I have to predefine the parameters dimension (matlab variables as well as simulink parameters). SInce the dimension of the breakpoints changes, I am not able to predefine the dimension, so this approach does not work.
Is there any working approach, or do you have any tips how to solve such a problem?
Best regards
Jo
0 comentarios
Respuestas (1)
Sachin Lodhi
el 11 de Jun. de 2024
Hello JoRo,
I understand that you are trying to setup dynamic LUT-breakpoints and LUT-table data. To parameterize a 2D LUT in a referenced Simulink model with varying dimensions via a system mask, you can follow these steps:
1. Define Variables for LUT Data: In the base workspace, define variables for the breakpoints and table data for each instance of the referenced model.
2. Create a System Mask: On the referenced model, create a system mask with input fields for the variable names of the breakpoints and table data.
3. Configure the LUT Block: In the LUT block within the referenced model, set the breakpoint and table data to use the variables specified through the mask.
4. Specify Variable Names in Instances: For each instance of the referenced model in the top model, use the system mask to input the names of the variables(which were created in step 1) that contain the LUT data.
This method allows you to dynamically specify and vary the dimension of LUT data for each instance of the referenced model by simply changing the variable names in the system mask.
I would also recommend you to kindly go through the following MATLAB Answer post which has solution for similar problem : https://www.mathworks.com/matlabcentral/answers/2034264-dynamic-lut-in-hdl-coder?s_tid=answers_rc1-2_p2_MLT
I hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Author Block Masks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!