0.1) we constrain the numerical solver to adjust the integration time step as it needs but not above this value.īy clicking this button a new menu dialog appears. With this parameter set to 0 (default value), the numerical solver can increase automatically the integration step size (time) without any limit, with the purpose to decrease to simulation time. Be setting this parameter to a particular value (e.g. The solver selection is communicated through a text message displayed in the Scilab console.ĭetailed description of the characteristics of each solver will be provided in a future article. The default solever is Sundials/CVODE - BDF - NEWTON.ĭepending on the type of differential equation contained in the model, Xcos can automatically select the appropriate solver for the user. Using the drop-sown menu, the user can select the which numerical solver should be used for the model integration. It must be reduced if the error message “Too many calls” is encountered during a simulation. This is the maximum interval of time for each call to solver. This value represents the smallest interval of time for which the ODE (Ordinary Differential Equation) solver is used to update continuous states. The default value is 1.0E-10. 1.0E-08) but this will increase the duration of the simulation. In order to improve the accuracy of the simulation results, this value can be decreased (e.g. If the relative error exceeds this tolerance, the solver will reduce the time step size. The default value is 1.0E-06. Specifies the largest acceptable error of the numerical solver, relative to the size of each state during each time step. If the absolute error exceeds this tolerance, the solver will reduce the time step size. Specify the largest acceptable error of the numerical solver, as the value of the measured state approaches zero. The same principle applies for higher values, 3, 4, etc. Example, to run 10 s (final integration time), the user will have to wait 20 s. If set to 2 the simulation will be run 1/2 slower than real-time. With this setting ( 1) you will notice that, when using a Scope to plot data, the values will be plotted in real-time. In this case, if the simulation is set to 10 s (final integration time), the actual duration of the simulation will be also 10 s. This means that the actual duration of the simulation (how long it takes to calculate the model) is equal to the final integration time. If the value is set to 1, the simulation will be run in real-time. With this setting ( 0) you will notice that, when using a Scope to plot data, the values will be plotted very fast, as soon as they are available. In this case, even is the simulation is set to 10 s (final integration time), the actual duration of the simulation is much shorter (depending on the model complexity), can be run in 0.001 - 0.1 s. This means that the actual duration of the simulation (how long it takes to calculate the model) is only dependent on the speed of the numerical solver. The value 0 means that there is no real-time scaling. The values are written in exponential form by default, but, when changed, can be set in decimal format. This setting takes integer values, 0, 1, 2, etc. Take into account that the simulation will always start from 0 s, it is not possible to change the simulation start time. The value doesn’t necessarily needs to be in exponential format, it can be in decimal format (e.g. Make sure that you put the right value for you model. 10 5, which is equal to 100000 seconds. The value is in exponential form, 1.0E05 which means 1.0 This is the total duration of the simulation. Image: Xcos Simulation Set Parameters (default values)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |