MotivationsNext Discontinuity Event Time Estimator V2
Today, we always surround discontinuities by two points separated by the "min time step". This is to guarantee the accuracy of the discontinuity event. However the discontinuity event time of some events (like the PWM) is known accurately. If we discriminate the type of discontinuity event (accurate vs estimate), we can improve the performance (less simulated points) and the accuracy (discontinuity events exactly when they are supposed to happen).
Multi time step
Today, the control solver always iterates with the power solver. This is important because we have a variable time step and some power devices (like the controlled source) needs to be synchronized with the control solver. However, in many cases, the user wants to build a control loop that behaves like a real digital controller: fixed sampled time & no iteration.
Also, we can't model digital devices like a delay, or a THD calculation block and this will fix this.
To-DoNext Discontinuity Event Time Estimator V2
[x] Modify the discontinuous devices to discriminate the different types of discontinuity events (accurate / estimate)
[x] Update the NDETE algorithm to calculate a time point exactly at the accurate discontinuity event time
[x] Fix the issues related to the numerical precision and double number comparison
[x] Tests
Multi time step
[X] New sampling time setting on all control models
[X] When the sampling time is set to "auto", the model behaves as it does today: Calculated at each time step and iterates with the power solver. The default value is "auto".
[X] When the sampling time is set to a value, the model will be calculated at each sampling time and will not iterate with the power solver. It will be calculated at the end of a time step.
[X] All the devices, with an "auto" sampling time that are connected to the output of a model with a defined sampling time will share the same sampling time.
[x] All models with the same sampling time step will be attached to the same control solver.
[x] The predictive (master) time step solver calculates a point at each sample of the control solvers.
[x] Update the scopes to manage data with different time steps
[x] Check if this is possible to parallelize the power and control solvers
Motivations Next Discontinuity Event Time Estimator V2 Today, we always surround discontinuities by two points separated by the "min time step". This is to guarantee the accuracy of the discontinuity event. However the discontinuity event time of some events (like the PWM) is known accurately. If we discriminate the type of discontinuity event (accurate vs estimate), we can improve the performance (less simulated points) and the accuracy (discontinuity events exactly when they are supposed to happen).
Multi time step Today, the control solver always iterates with the power solver. This is important because we have a variable time step and some power devices (like the controlled source) needs to be synchronized with the control solver. However, in many cases, the user wants to build a control loop that behaves like a real digital controller: fixed sampled time & no iteration. Also, we can't model digital devices like a delay, or a THD calculation block and this will fix this.
To-Do Next Discontinuity Event Time Estimator V2
Multi time step