Can I force Simulink integrator blocks to have very small time steps?

7 visualizaciones (últimos 30 días)
I am modeling a dynamic system governed by a 1-D PDE as an ODE state space system in Simulink. I tried increasing the number of states to a very large quantity, 256, in order to verify that the behavior is consistent with modeling with a smaller number of states and with the PDE solution. I need to make sure the time step is less than 75 microseconds to ensure the Fourier number is less than 0.5 for stability of the numeric method. I've been told that the integrator blocks in Simulink must use variable step ODE solvers, but after setting the maximum step size to 1 microsecond, I find that the smallest step size in the output timeseries is 300 microseconds. I directed the file sink to not use decimation. Is there still some decimation step that I am missing? Am I missing some other means of making integrator blocks use smaller time steps? Can it be done?
I've also tried several different ODE solvers, including fixed step solvers. I'm presently using ODE15s. The system is not actually implemented with Simulink's state space block, but an integrator block, a user-defined function block, and several matrix multiplier blocks.

Respuesta aceptada

Sebastian Castro
Sebastian Castro el 24 de En. de 2016
If you go to the Solver pane of the model's Configuration Parameters, there should be a "Max step size" option underneath the solver.
You could set this option to a number like 75e-6. This will prevent the variable-step solver from ever going above that sample time, which could mean slower simulations, but if you think this is necessary then try it out!
- Sebastian
  1 comentario
Daniel
Daniel el 25 de En. de 2016
Mr. Castro, Many thanks. I was using the preferences dialog box under the file menu in my model. I noticed this wasn't affecting the simulation speed or the steps in the timeseries output which puzzled me. I followed your instructions and the simulation is taking more time, which I take to mean it's taking the extra time steps I need.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre General Applications en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by