Hi,
I understand that you want to generate same size output in a given amount of time from different Simulink models.
In Simulink, the number of rows of data generated by a scope depends on the simulation time step and the sample time of the signals being logged. If you want to ensure that you obtain the same amount of data for a fixed duration (e.g., 40 seconds) across different Simulink projects, you can adjust the simulation settings to achieve consistent data output.
Here are a few approaches that you can try:
- Adjust the simulation time step: By reducing the simulation time step, you can increase the number of data points generated within a fixed duration. In the Simulink model, go to the Configuration Parameters dialog, navigate to the Solver pane, and decrease the Fixed-step size or Solver step size settings. This will result in a finer time resolution and more data points within the same time duration.
- Modify the sample time of signals: If the sample time of the signals being logged is different between the projects, it can affect the number of data points generated. Ensure that the sample time of the signals is the same or adjusted accordingly to obtain consistent data. You can modify the sample time by selecting the signal line and adjusting the Sample time property in the Signal Properties dialog.
- Use a fixed-step solver: If your Simulink models use variable-step solvers, switching to a fixed-step solver can provide more control over the number of data points generated. In the Configuration Parameters dialog, select a fixed-step solver under the Solver pane. This will ensure a constant time step throughout the simulation and produce a consistent number of data points.
By adjusting the simulation time step, modifying the sample time of signals, or using a fixed-step solver, you can control the number of data points generated within a fixed duration in different Simulink projects. Experiment with these settings to achieve the desired consistency in data output.
For more information refer to documentation linked below.