Guidelines for the Proper Choice of Time Step
The accuracy of simulation results and performance of the simulator depend on the proper choice of minimum and maximum values for the simulation (integration) time steps (Hmin and Hmax). Smaller time step values yield more accurate results, but require longer processing times.
When specifying the minimum and maximum time step values, you must compromise between accuracy and time. The basic rule of measurement: “Not as precise as possible, but as precise as required.” is also valid for a simulation. The following guidelines will help you prevent elementary mistakes in choosing the proper integration step width.
For Hmin, consider:
- What is the smallest time constant of the electric circuit (for example, R*C or L/R) or of the block diagram?
- Which is the smallest cycle of oscillations that can be expected (natural frequencies of the system or oscillating time functions or smallest digital event)?
- What is the smallest controller sampling time?
- What is the fastest transient occurrence (for example, edge changes of time functions)?
For ramp (or trapezoidal) signals with rise/fall time, Hmin should be sufficiently low to sample them.
- When using models extracted from frequency sweeps (for example, for Maxwell Eddy or Q3D links), Hmin should be sufficiently low to sample the highest frequency of interest.
For Hmax, consider:
- What is the largest time constant of the electric circuit (for example, R*C or L/R) or of the block diagram?
- Which is the largest cycle of oscillations that can be expected (natural frequencies of the system or oscillating time functions)?
- What is the fastest transient occurrence (edge changes of time functions)?
For Tend, consider:
- What is the time interval to be simulated?
- Select the smallest of each estimated maximum and minimum time step for your simulation model.
- All values recommended above are based on numeric requirements and experience and do not guarantee a successful simulation. Consider the algorithm as a guideline.
- In case of doubt, decrease the maximum and minimum step size by dividing by 10. Repeat the simulation and compare the results. If the second set of results (with the step size decreased) shows conformity with the first results, then the step sizes chosen for the first simulation were appropriate (remember that smaller values increase the simulation time).