How to implement a multi-dimensional lookup table in Simscape model?

6 views (last 30 days)
Hello everybody,
currently I am working on an emperical model of a continiously variable transmission. I modeled the hydraulic actuation system using sim hydraulics. Now i want to add some measurement data to the model using a lookup table. I started implementing only two relevant variables by using a 2-D lookup table using the PS lookup block (2D).
I want to expand the model by adding an additional variable, however there is no n-dimensional lookup block available in the simscape library. Therefore I wanted to use the lookup table block from the ordinary Simulink library and use converter blocks as input and output to convert the data from and to the physical domain.
My initial simulink model consisted out of a physical look up table as follows:
I tried using the following blocks instead: PS-Simulink converter --> n-D lookup table --> Simulink-PS converter however the solver reduces the step size in a way that the model is actually unusable. (Range of 1e-13)
Does anybody know if there is an equivalent way for implementing a multi dimensional look up table in the physcial domain? / are there specific solver settings which are recommended for my problem?
Thank you all in advance,
kind regards,
Wouter
Edit:
my solver settings + solver configuration block are set as follows:

Answers (1)

Sebastian Castro
Sebastian Castro on 9 Apr 2015
Currently, Simscape only supports up to 2-D Lookup Tables.
Your approach of using the Simulink n-d Lookup Table block is correct, although the Memory block is not recommended because it can drastically change your system dynamics and lead to errors.
I would recommend using a Transfer Fcn block and making a low-pass filter whose cutoff frequency is bigger than the rest of the dynamics in your model. This will break the algebraic loop and not impact any of your Simscape model's frequencies.
- Sebastian
  2 Comments
Wouter
Wouter on 9 Apr 2015
Hi Sebastian,
Thank you very much for thinking with me! I put the memory block in there because an algebraic loop occured when I didn't. (The lookup table imposes forces on two connected hydraulic cylinders, which are connected in a loop (hydraulic diagram)). I tried the low pass filter, and it did break the algebraic loop, unfortunately "an assertion was triggeredd at time 0.0000, the pressure fell below zero"-message popped up. Which is the the same error message as i had before with the memory block, so it didn't resolve my problem (yet).
I assume it is something solver related. In short a summary of my problem: The model works great with a PS 2D lookup table, stable results. When I replace the exact same PS 2D table by the converted 'ordinary' 2D simulink block and converter blocks, the pressure suddenly fell below the absolute zero.
Again, thank you very much for helping me out!
kind regards,
Wouter
Sebastian Castro
Sebastian Castro on 9 Apr 2015
Given that the assertion is triggered right at the beginning, maybe the solution is simply to change the initial condition of the low-pass filter to be something besides zero -- a value that "makes sense" for the beginning of your simulation.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!