You need to use EasyEDA editor to create some projects before publishing
BI-source bug ? ngspice bug ? Or what ???
2084 1
Tommy 7 years ago
**BUG** Concise problem statement: Unexpected simulation aborts. There is no faulty circuit design. Steps to reproduce bug: https://easyeda.com/editor#id=fcb0d2315a044eb0a4d609b1a5eedaa6 Schematic "Test 1" gives the desired results, circuits work correctly. https://easyeda.com/editor#id=77dc8b3144534ff09f450e21ae40fd90 Schematic "Test 2" works correctly, both red framed BV-sources give the desired results. https://easyeda.com/editor#id=bf3c01ee128a4aa9af9bda67105a261c Schematic "Test 3" works correctly, red framed circuit gives desired results. https://easyeda.com/editor#id=67721689ede44830863408976b4de953 Schematic "Test 4" works correctly, red framed circuit gives desired results. https://easyeda.com/editor#id=ad8ce328fc994cfabf12a9eb0c677bf0 Schematic "Test 5" aborts simulation, though it had already worked correctly and given desired results. https://easyeda.com/editor#id=3fa197de5c574007b79632648d9e00bd Schematic "Test 6" aborts simulation, though it had already worked correctly and given desired results. Browser: Up-to-date FireFox Statement: It is extremely hard to understand why a simulation aborts which had worked correctly before, and no changes were made to the circuit layout. Why I need these circuits working just as correctly as they already did before: About two years ago I made a very small and simple modification of the electric charging system at my 1974 BMW motorbike which results in a fundamental improvement of battery charging. During these two years the reliabilty of my modification and its impact on all other components of the electrical system were heavily tested under all the hard circumstances of daily driving. Now I'm working on a detailled documentation about the differences in the behaviour of the regulators work and the consequences for the rotor current between a serial and a modified charging system. All of this work is for the benefit of thousands of other enthusiasts all over this planet who keep these old BMW motorbikes alive and running. Once my documentation is perfect and finished it will be available for free at the best of all places: http://forum.2-ventiler.de/vbboard/forum.php Scroll down this page just to "DB-Literatur" and you can see a picture of my bike. Somewhere in Finland, far north of the polar circle... I really hope someone gets this bug fixed. Thank you all in advance, Tommy
Comments
andyfierman 7 years ago
Hi Tommy, What you are reporting is not a bug. It is normal, expected behaviour for complex simulations. Getting a simulation to run in all possible conditions is not a simple task to accomplish. When you say things like: `Schematic "Test 5" aborts simulation, though it had already worked correctly and given desired results.` that is not actually true. For example, there are differences between your simulation schematic in Test 4 and Test 5 that are quite enough to cause a simulation that works in Test 4 to fail in Test 5. Your circuit is too complex to go into and debug verything that *could* be causing convergence failures to occur but I will list a few of the possible causes and then make a simple suggestion that seems to make your simulations much more robust. 1. Any two of Current Sources `US`, `VS` and `WS` are effectively series connected. It is not possible to connect ideal current sources in series. The only reason this works at all in your simulation is because you have carefully defined the signals such that the sum of the sources at net `WS is always zero, except of course that any tiny numerical error or rounding offset could cause that to no longer hold in which case the residual current can cause a numerically huge voltage to appear at net `WS`; 2. Net `WS` has no DC path to ground. Having a current source with an infinite resistance across it allows numerically 'infinite' voltages to be developed across the source; 3. You have resistances of only 5 uOhms in the same circuit as having very high resistances - in the order of 1 GOhms - represented by the reverse resistance of diodes. This is a classic situation for convergence failures to occur because you have a ratio of around 1e15 between the largest and smallest currents and voltages that the simulator has to deal with; 4. Several of the B sources implement switched functions based on IF, THEN, ELSE type structures. These are another classic source of convergence failure bcause they represent effectively instantaneous transitions requiring infinitely small timesteps to resolve. ##### Fortunately in your simulations, there is a simple modification that should get most of them running in a much more well behaved manner. Simply insert the following line as a spice directive: `.options RSHUNT = 1e12` This is explained in the ngspice manual: http://ngspice.sourceforge.net/docs/ngspice-manual.pdf#subsection.15.1.1 and section 15.1.2.1 in: http://ngspice.sourceforge.net/docs/ngspice-manual.pdf#subsection.15.1.2 * For more about how to get simulations running well in EasyEDA, please read: https://docs.google.com/document/u/1/d/1OWZVVFRAe_2NW3WratpkA_SGuHa5AcRow5ZRfvcoVTU/pub * For more background about convergence failures and how to avoid them, I can recommend reading: **Chapter 8: Convergence, Accuracy and Performance** in: http://www.simetrix.co.uk/Files/manuals/8.0/SimulatorReference.pdf and: http://www.intusoft.com/articles/converg.pdf
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice