Closed mbharat closed 6 years ago
if this truly is a bug
is there any evidence? what does the manual say?
Sorry if I was unclear. This circuit does have multiple solutions. QUCS computes only one.
Now, it may be the underlying algorithm is not designed to compute multiple solutions, in that case I could investigate why. I cannot find the particular manual that @felix-salfelder is referring to. I vaguely remember seeing an "internals" manual for QUCS, but cannot seem to find it.
If someone can point me to the correct manual, that would be a great starting point. Thx.
Bharath
I believe the solver is not that smart to find multiple DC solutions. It only implements simple variants of the Newton-Raphson method. You could try to provide different initial conditions with a node set, but does not seem to work in this case. For multiple DC solutions some sort o homotopy algorithm needs to be implemented.
The "Technical Manual" outlines the nonlinear DC algorithm. But to know what is indeed implemented you have to look on the code. See https://github.com/Qucs/qucs/blob/develop/qucs-core/src/dcsolver.cpp https://github.com/Qucs/qucs/blob/develop/qucs-core/src/nasolver.cpp and the corresponding header files.
Thx. so much @guitorri. I will start looking into the underlying algorithms.
So, should we refile this ticket as "Enhancement" and assign to me for working on this?
Bharath
dear @mbharat23, sure, you are welcome to work on enhancements. may i ask what your motivation is?
please also consider the difficulty of this task, implementation and complexity wise. and the fact that currently nobody else does this.
you might be interested in the gnucap project. in gnucap, algorithms are plugins. with this, you can share functional code without any review or forking requirements. (read: your DC analysis could be a userspace drop-in replacement, and everybody could try it).
@felix-salfelder: My motivation is from my upcoming book: http://www.springer.com/us/book/9783319673240 This circuit is one of the exercises and simulating in QUCS I realized multiple solutions were not found. But my overall motivation is more to understand concepts. So, I don't mind if the task is too difficult. Yes, I also know no one else does this :).
Hmm...I have looked at gnucap when I was searching for open-source simulators to use in my book. Honestly, QUCS beat them all out and in the process of writing the book, I found out why :D.
I will add Enhancement tag etc. and assign it to myself, will start working on it as time permits. This should also help me understand the internals of QUCS. I will also start looking through other bug reports and see if I can contribute.
Thx.
Bharath
NVM, looks like I can't change the Assignees, Labels etc. :).
Honestly, QUCS beat them all out and in the process of writing the book, I found out why :D.
gnucap does not replace qucs, it enhances qucs. or, to simplify a bit, think of qucs as a skyscraper with a campfire in the hallway. then gnucap is the central heating.
@felix-salfelder: Yes, I realized gnucap does enhance QUCS, as I started looking at the problem. Anyway, please assign this ticket as an enhancement with no particular milestone. I will work on it.
Thx.
Bharath
Hello all,
Please see attached screenshot. I have a 2 ohm resistor in series with a nonlinear resistor: i1=v1^2. For U = 6 V, there are two solutions that can be easily found by hand. If we consider the voltage across the nonlinear resistor, they are vR=1.5 V and -2 V. This is a classic example of a resistive nonlinear circuit having multiple solutions. QUCS reports only one solution of 1.5 V.
I also mentioned this as one of the to-do items I emailed a few days ago to the mailing list. Hence, if this truly is a bug, I do not mind being assigned to investigate it.
Thx.
Bharath