Open alicenprzemek opened 1 month ago
Hello again, I see now that this problem exists only for longer time steps. As I decrease the time step I see that there is less "energy leaked" and at around 1ps (instead of 10ps) I see a solid agreement. (though the result from qucs is at 10ps time step still)
Hi, I’ll have a look and see whats causing this. It’s most likely that qucs dynamically adjusts the timestep to correct errors caused by larger timesteps. JoSIM only does this correction for JJs. Large timesteps could directly result in energy loss from the differentials in the capacitors and inductors.
Having had a look this is most definitely due to the differentials in the capacitor and inductor. Larger timesteps result in larger error and as a result incorrect simulation results.
The QUCS technical papers mention adjusting the timestep if the local truncation error is too high, in which case the time step is reduced.
Implementing this in JoSIM will take some time.
Hey, good to know that setting a small time step is enough to solve it. Thanks for looking into it.
Hello, I am trying to simulate frequency response of a filter with JoSIM by creating a Gaussian excitation and then doing Fourier analysis on the output. I saw that the S-parameters I calculate don't add up to 1 so I did the same time-domain based analysis using qucs-s and I can't get them matching. The results from qucs-s fit S-parameter simulation.
Here is a plot comparing the voltage at resistor P2:
And the power balance from JoSIM: (where we expect a flat line at 1)
I feel I did double check my calculations but nonetheless can't find where could be a problem. Therefore it is not clear to me if I am using JoSIM correctly?
and the only CLI option I use in Python:
cli = CliOptions(["./josim_minimal.cir"])
The files I am using are packed here: josim_minimal_filter.zip