ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
854 stars 110 forks source link

Simulation fails when ideal opamp is replaced by u741 model #268

Closed csrabak closed 1 year ago

csrabak commented 1 year ago

I'm attempting to understand what mishap I'm incurring. . .

If I do a simulation of a textbook BPF MFB implementation[^1] I get the expected results: BPF-MFB

However, if I replace the ideal opamp by the available in the library, the results come as:

BPF-MFB-u741

I perused documentation and could not find any hint if for use of the library models some additional directive is required, and I undertand this way of simulating is different of the ReadTheDocs documentation which shows a case of importing a specific model for an ad hoc simulation.

For the sake of completness I've tried the other library models available in the menu, but with no avail.

Any advice would be very wellcome!

[^1]: As a matter of fact, is the BPF of the DeMaw's, W1FB (SK) Pixie 2 version, that appeared in GQRP Sprat mag and aftewards in "The Pixie File" collection.

ra3xdh commented 1 year ago

I can see that you are using the model from Opamp.lib library. This library is designed for Qucsator and not compatible with Ngspice. It is blacklisted since v1.0.2 and not shown in the library manager if Ngspice is selected. How did you manage to insert it in the schematic? Use the IC from SpiceOpamps.lib library. It contains models for commonly used ICs like LM358 etc. See also #232

The Qucs equations are deprecated in Qucs-S too. Use Nutmeg equations instead. The application should propose it as default if Ngspice selected. See the tutorial to learn difference between Qucs and Qucs-S+Ngspice: https://ra3xdh.github.io/pdf/qucs_s_tutorial.pdf

csrabak commented 1 year ago

OK, so IIUC, by now we've only the SpiceOpamps.lib models available, which do not include the 741.

I'm affraid the person who sent me the "trouble" made the project with v1.0.1 and it opens as such with v1.0.2. I'll leave to you to see if this is a bug or a feature...

Thanks.

ra3xdh commented 1 year ago

Yes, it is possible to open old schematics containing devices from blacklisted library. But it is not possible to insert it in the new schematic. In the long perspective it will be needed to provide SPICE-compatible 741 IC model. You may use another popular IC LM358 instead.

ra3xdh commented 1 year ago

Closing as resolved.

csrabak commented 1 year ago

I would like to leava a comment, which if considered more pertaining to another thread, please migrate it to.

The symbols which get imported to the canvas of the [graphic] schematic editor for the opamps don't show the labels of the power supply pins, and some of the models have additional pins, like the LM311 and NE5534, and I cannot find documentation about this.

The blacklisted Opamp.lib models seem to have a graphic symbol which conveys this information (like the aforementioned 741 showing the Vcc and Vee pins).

Double clicking the symbol in the canvas does not help and browsing the SpiceOpamp.lib file is an exercise which seems to me excessive in order to ascertain this information.

ra3xdh commented 1 year ago

opamps don't show the labels of the power supply pins

The intentions was to make library device symbol compatible with ideal opamp device. That's why I didn't use a wide opamp symbol. Updating symbols in the Library now will result in backward compatibility lost. So, I don't consider a symbol update. But the pins has internal names that could be shown in the symbol preview. I will consider to implement this feature.

csrabak commented 1 year ago

Just to better understand this design decision. When you write "to make library device symbol compatible with ideal opamp device" you mean the inputs and outputs only or the backward compatibility also disconsiders the power supply to the opamps models?