- All the blocks in the model must have sample times that are integer multiples of the chosen fixed-step size of the solver. This can be done by double-clicking on the block and adjusting the sample time in the block parameters. If you are using a fixed-step size of 0.01, for example, valid sample times for all blocks would be 0.01, 0.02, 0.03, and so on.
- For differential models, consider using a fixed-step solver that is suitable for stiff or non-stiff differential equations, depending on the model’s characteristics. For non-stiff problems, ‘ode4’ (Runge-Kutta) or ‘ode3’ (Bogacki-Shampine) might be suitable. For stiff problems, ‘ode14x’ may be used.
- A smaller step size generally yields more accurate results for differential models because it captures the dynamics more precisely. However, this comes at the cost of an increased computational load. In the diff model used in your case, changing the step size from 0.1 to 0.01 significantly alters the simulation results, which indicates that the model is sensitive to the step size, and a smaller step size is likely necessary for accurate simulation.
- You may experiment with various fixed-step solvers available in Simulink and compare the results to choose the most accurate solver for your model.