To reduce the simulation time and make it more efficient, try out the following settings in the blocks and the model:
- Increase the “sample time” to reduce the number of computations.
- Use a “Fixed-Step Discrete Solver” that matches or is a multiple of the sample time of the model.
- Increase the “step size” to reduce the number of solver iterations.
Refer to the following MathWorks documentation links for more information of the abovementioned steps:
- https://www.mathworks.com/help/sps/powersys/ug/increasing-simulation-speed.html
- https://www.mathworks.com/help/simulink/ug/speed-up-simulation.html
Take help from the following example of “Writing and Reading Binary Files in Simulink” for detailed steps of performing reading and writing operations on binary files: https://www.mathworks.com/help/dsp/ug/write-and-read-binary-files-in-simulink.html
You can also utilize the "readData.slx" Simulink model of the example and add an “RMS” block inside it. Update the "File name" parameter in the "Binary File Reader" block to point to your “.bin” file and adjust other configuration settings as needed. Since this is a MathWorks documentation example model, it is already designed for optimal performance.
I hope this is beneficial!