When a simulation starts the initial values of all components are calculated for t=0. Hence, the first simulation step should calculate the results for the time $t=\Delta t$ because the results for $t=0$ are the initial values. However, this is not the case for the voltage sorces. In the first simulation step, voltage sources are stamping in the right side vector the value of $t=0$ and not for $t=\Delta t$ which introduces a one step delay between the voltage sources and all other components of DPsim. This behavior translates to transients in the first steps of the simulation. For examples, in a simple 3 phase RLC circuit (initialized with consistent values) we can observe transients in phase b and c of the current of the capacitor:
@dinkelbachjan @gnakti @m-mirz
When a simulation starts the initial values of all components are calculated for t=0. Hence, the first simulation step should calculate the results for the time $t=\Delta t$ because the results for $t=0$ are the initial values. However, this is not the case for the voltage sorces. In the first simulation step, voltage sources are stamping in the right side vector the value of $t=0$ and not for $t=\Delta t$ which introduces a one step delay between the voltage sources and all other components of DPsim. This behavior translates to transients in the first steps of the simulation. For examples, in a simple 3 phase RLC circuit (initialized with consistent values) we can observe transients in phase b and c of the current of the capacitor:
To fix this error, the parameter "time" of the functions EMT::Ph1::VoltageSource::updateVoltage(Real time) and EMT::Ph3::VoltageSource::updateVoltage(Real time) must be updated to
time = time + timestep
.