Git Product home page Git Product logo

ra3xdh / qucs_s Goto Github PK

View Code? Open in Web Editor NEW
718.0 718.0 95.0 33.61 MB

Qucs-S is a circuit simulation program with Qt-based GUI

Home Page: https://ra3xdh.github.io/

License: GNU General Public License v2.0

CMake 1.33% Makefile 0.08% Perl 3.55% Shell 0.20% C++ 92.62% Roff 0.28% MATLAB 0.41% C 1.01% QMake 0.02% AMPL 0.19% Python 0.19% Batchfile 0.12%
circuit electronics modelling ngspice qt qt5 qt6 simulation xyce

qucs_s's People

Contributors

andresmmera avatar antohami avatar clemensfmn avatar constrictor avatar dsm avatar felix-salfelder avatar fransschreuder avatar galiumnitride avatar guitorri avatar gypsysattva avatar hvwyl avatar in3otd avatar iwbnwif avatar kagva avatar ldpgh avatar luzpaz avatar mikebrinson avatar nanoant avatar nvdl avatar partmedia avatar powerjungle avatar ra3xdh avatar radvall avatar spueblas avatar superman32432432 avatar tvrusso avatar wawuwo avatar yodalee avatar yrrapt avatar zergud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qucs_s's Issues

qucsator and unforking

(Not an issue, but an announcement)

I have moved Qucsator into a separate repository within the Qucs project. It should be shared between qucs-s and qucs.

You will need the equivalent of Qucs/qucs#1015, and perhaps check if there are any deviations that need to be considered. The rest of Qucs-s should be ported back to Qucs once Qt5 is working sufficiently.

Windows 0.0.20 with ngSPICE 27_QucsS error running simulation

Starting a simulation with ngSPICE selected as default simulator, I get the following preamble and error in the simulator window popup:

unrecognized parameter (m) - ignored
Warning: Model issue on line 0 :
  .model xop1.xx1:xx1:jmod_j2 pjf(is=1.5e-11 beta=0.0002701 vt0=-1 n=1 lam ...
unrecognized parameter (n) - ignored
unrecognized parameter (m) - ignored
Note: can't find init file.

exit: no such command available in ngspice
Note: No ".plot", ".print", or ".fourier" lines; no simulations run

I got a similar error using ngSPICE 26_QucsS (which is still the recommended version for 0.0.20 on the main web page).

The same schematic runs flawlessly in Qucsator and somewhat flawlessly in Xyce (somewhat meaning DC offsets are above Vcc on output for some inexplicable reason in Xyce).

Attached, the project and screenshot
image

mixer test1.zip

Snap or appimage Support

I was wondering if you ever though about creating a snap or appimage of the project to make it easier to use on other distros.

Does AppImage include qucsator?

When trying to simulate using the AppImage I get the following error -

ERROR: Cannot start qucsator (No such file or directory)

I have installed ngspice but I thought qucsator is bundled with the appimage?

Cheers

PoC Flatpak packaging

This is an initial Flapak manifest for Qucs-S, not really tested except a basic simulation.
It definitely needs more work, testing, and cleanup.
This needs Qucs base app when building the app, so build and install it first.

I've followed the Arch Linux packaging and added every optional dependency for Qucs-S and its dependencies. So you have Ngspice, FreeHDL, GTKWave, and even also Qucs packaged.

I don't plan to publish this on Flathub myself, but I hope this might encourage you to choose Flatpak as a distribution channel.

BTW Qucs is also packaged here.

qucs-s subcircuit problem

I am trying to model a broadband amplifier using an old Plessey SL560 device..

Linux Mint 19.3 amd64, Qucs-S-0.0.22_x86_64.AppImage, qucsator-0.0.20 (from qucs-0.0.20-rc1 installation).

The type of BJTs is unspecified in the SL560 datasheet. I have chosen to use a 2N5179 model embedded in a subcircuit.

There are 3 BJTs in the SL560. Using 3 instances of the 2N5179 in a new schematic works well. I am getting values for voltage gain and input impedance which closely match real life.

So I thought I would embed the new SL560 schematic into a subcircuit, but the subcircuit does not work.

I get these errors when I press F2...

  • Format Error: Wrong 'component' line format!
  • ERROR: Cannot load subcircuit "sl560c.sch".
  • ERROR: Cannot simulate a text file!

Some models from qucs-s library not getting "normalized" parameters, either generate unparsable netlist line, or lose scale value

I just attempted to use some of the LED models in the Qucs library in a Qucs-s schematic with Xyce. These models all have spaces in the diode parameters between value and units, and a 50 MOhm leakage resistor. The specific LED model I tried to use was the green one.

Qucs-s is generating a netlist that doesn't squeeze out the space between parameter and units of the diode parameters, resulting in a parse error from Xyce (which uses space as a field separator, like the original SPICE does). Further, the "50 MOhm" is not converted to "50 Meg" as it seems it should be by the use of "spicecompat::normalize_value" in the resistor.cpp code.

The attached schematic and the netlist it produces are in this tar file:
led_prob.tar.gz

A quick glance at code makes it appear that when the parameter list for the diode is generated, nothing is calling "normalize_value". If I modify (by hand) the diode model in LEDs.lib to take out the spaces, that fixes the netlist so it runs. But the "50 MOhm" resistor becomes a 50 ohm resistor.

If I remove the space from the leakage resistor specifier in LEDs.lib, qucs-s emits "50MOhm" and not "50Meg".

But qucs/components/resistor.cpp does call spicecompat::normalize_value in its spice_netlist function, and still doesn't convert "50 MOhm" into "50Meg" as I would expect it to. I don't quite understand what's going wrong there.

qucs-s-0.0.22 - qucsator crashes using Component library devices

qucs-s-0.0.22 - qucsator crashes using Component library devices

PLATFORM NOTES

qucs-s-0.0.22 on Linux Mint 19.3 x64

$ which qucsator
/usr/local/bin/qucsator
$ /usr/local/bin/qucsator --version
Qucsator 0.0.18
Copyright (C) 2003-2009 Stefan Jahn [email protected]
Copyright (C) 2006 Helene Parruitte [email protected]
Copyright (C) 2006 Bastien Roucaries [email protected]

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

BRIEF DESCRIPTION

Models using active devices from Component Library crash qucsator.

STEPS TO REPRODUCE ERROR

Set Default simulator to ngspice.

Restart qucs-s.

Create a simple model using 1N4148 from Component library.

e.g.

R:R1 _net0 _net1 R="10k Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
Diode:D_1N4148_1 gnd _net0 Is="222p" N="1.65" Cj0="4p" M="0.333" Vj="0.7" Fc="0.5" Cp="0" Isr="0" Nr="2" Rs="68.6m" Tt="5.76n" Ikf="0" Kf="0" Af="1" Ffe="1" Bv="75" Ibv="1u" Temp="26.85" Xti="3.0" Eg="1.11" Tbv="0.0" Trs="0.0" Ttt1="0.0" Ttt2="0.0" Tm1="0.0" Tm2="0.0" Tnom="26.85" Area="1.0"
Vac:V1 _net1 gnd U="10 V" f="1 GHz" Phase="0" Theta="0"
.AC:AC1 Type="log" Start="1 kHz" Stop="10 MHz" Points="1000" Noise="no"

F8 - all OK
F2 - all OK.

Change Default simulator to qucsator.

Restart qucs-s.

F2 - checker error, no actions defined: nothing to do

Add DC simulation.

F2 - ERROR: Simulator crashed! Please report this error to [email protected]

Same problem with 2N2222A from Component library.

Diff says that library files in /usr/local/share/qucs/library and /usr/local/share/qucs-s/library folders are identical.

ISSUE

Can models be created in qucs-s-0.0.22 using devices from the Component library that will run using qucsator as the Default simulator?

Spice Opus not loading external libraries

When I simulate with Spice OPUS using the spice netlist file component I always get an error:

Error: Failed to open "/home/alex/.qucs/1_prj/c3d1p7060q.lib" in file spice4qucs.cir on line 33

I tried to remove the quotes and the simulator is not complaining anymore.
Does this works out of the box for you?
You can try with any spice model.

A side question: how to get a steady state response analysis ssse with qucs?

Warning on simulations

When running a simulation (ngspice) on the this schematic, the warning
[Warning!] <prefix>/share/qucs/xspice_cmlib/include/ngspice_mathfunc.inc file not found!
is thrown. The file in question exists at
<prefix>/share/qucs-s/xspice_cmlib/include/ngspice_mathfunc.inc.

Quickly looking through the code, I couldn't sort out all the QUCS_CORE and QUCSSHARE references, and am not entirely sure what to change to fix this.

Q(NPN) BJT parameters

Using qucs-s-0.0.22, ngspice revision 27, linux mint 19.3 x86_64.

If I place a Q(NPN) BJT and add a model to the Component Properties...

Q = Q2N5179
Q_Line 2 =
Q_Line 3 =
Q_Line 4 =
Q_Line 5 =

I can either use a .INCLUDE section to include a .lib file that contains the .model parameters, or a .MODEL section and set the parameters in the Component Properties...

Line_1 = .model Q2N5179 NPN(Is=69.28E-18 Xti=3 Eg=1.11 Vaf=100 Bf=282.1
Line_2 = + Ne=1.177 Ise=69.28E-18 Ikf=22.03m Xtb=1.5 Br=1.176 Nc=2 Isc=0 Ikr=0
Line_3 = + Rc=4 Cjc=893.1f Mjc=.3017 Vjc=.75 Fc=.5 Cje=939.8f Mje=.3453 Vje=.75
Line_4 = + Tr=1.588n Tf=141.1p Itf=.27 Vtf=10 Xtf=30 Rb=10)
Line_5 =

The netlist gets built correctly and ngspice runs.

But if I try to set the parameters in the Q(NPN) BJT Component Properties directly...

Q = .model Q2N5179 NPN(Is=69.28E-18 Xti=3 Eg=1.11 Vaf=100 Bf=282.1
Q_Line 2 = + Ne=1.177 Ise=69.28E-18 Ikf=22.03m Xtb=1.5 Br=1.176 Nc=2 Isc=0 Ikr=0
Q_Line 3 = + Rc=4 Cjc=893.1f Mjc=.3017 Vjc=.75 Fc=.5 Cje=939.8f Mje=.3453 Vje=.75
Q_Line 4 = + Tr=1.588n Tf=141.1p Itf=.27 Vtf=10 Xtf=30 Rb=10)
Q_Line 5 =

The netlist does not get built correctly and ngspice generates errors.

Is this a bug or is it me?

Problem with Paramter Sweep of multiple attribute devices

I'm having problems with performing a parameter sweep of devices with multiple attributes like an ideal AC voltage source. Sweeping devices with single attribute, e.g. DC voltage source, R, C, L.. works fine. I also tried to put an AC voltage source inside a sub-circuit having only one variable attribute to call from main circuit without success (Param = @sub[VAC]). Writing a Nutmeg script by looping the command "alter @vg[sin] [ -1 $&VAC 100MEG ] $ vector" seems to be an alternative but I failed in getting the simulation results back in a useful way to plot. Is there any trick in how this could work out?

Digital Components Missing

I can't find the digital components in the components tab. The original Qucs has them, as there are many guides online. I'm using Qucs-s because I need to integrate some digital gates with SPICE, but that seems impossible now.

W(CSW) is not working

Tried to use the spice switch W in a small circuit. And couldn't find a way to make it to work with both ngspice and xyce.

I used the format that is indicated in the Ngspice manual:

It=0.01 Ih=0 RON=100Ohm ROFF=10MOhm

But both xyce and ngspice complains about it.

screenshot from 2017-09-27 06-33-17
screenshot from 2017-09-26 17-34-01
screenshot from 2017-09-26 17-12-40

Relay.txt

Error: Unknown option: -b

Some examples can't run correctly!
I tried "Amp_Baseband_Low-noise.sch" with simulator "qucstor", the error like title shows happened: Error: Unknown option: -b ,and Itried simulator “ngspice” ,I got another different error:

Ngspice started...
ERROR: Cannot load subcircuit "Vnoise.sch".
Circuit: * qucs 0.0.21 d:/applications/qucs-s/share/qucs-s/examples/amp_baseband_low-noise.sch

Note: No ".plot", ".print", or ".fourier" lines; no simulations run

But I can run it correctly using "qucs-0.0.19-win32-mingw482-asco-freehdl-adms",is it a bug in qucs-S?

Getting Unknown Component errors with a fresh build

Hi, maybe I'm missing something dumb but I am having unknown component errors opening the supplied examples. The wilkinson.sch is one of the ones I can't open--it complains that Pac is an unknown component.

Could I get some guidance on what's going on?

I'm using v. 0.0.21 and I compiled it with Ubuntu 19.10, and installed it with a prefix of $HOME/qucs/

Simulation -> Show last netlist F6 doesn't show the last netlist

Hello. Using Qucs-s 0.0.22 with xyce/ngspice. I'm trying some simple schematic and I noticed that Qucs-s doesn't show the correct netlist file.

I changed the default simulator from xyce to ngspice and it still shows me the incorrect one (it is actually a netlist from another project, I have two projects in the Projects tree from the left menu).

I changed the default netlist and simulator output directory, restarted Qucs-s and again the same old netlist.

Last, I removed the project directory that the shown netlist should reside in and despite that F6 still shows me this old netlist and not the latest.

Otherwise the correct netlist file is %workdir%/spice4qucs.cir

spurious plot lines

Linux Mint 19.3 x86_64, qucs-s-0.0.22, ngspice revision 27.

Not sure if this is a qucs-s or ngspice issue. Come to think of it, never seen this with qucsator.

Anyone else seen this?

qucs_s_spurious_plot_lines

initialDC property default value

When doing a transient analysis the initialDC property is set to yes by default. This leads to a very confusing user interface for a user that's not aware of this option. Initial voltages and currents for capacitors and inductors can still be set but are by default ignored. I propose therefore to set this option to no by default.

Qucs seems to completely ignore this option, and always performs the simulations with the initial conditions supplied by the user.

Also, thanks for all the work put into this software, it's a big improvement of Qucs. Are there any plans to upstream this code?

ngspice op amp model clipping not working correctly

Hello! It looks like the op amp clipping isn't working correctly during saturation, at least using the ngspice backend. It seems to do this weird thing where the output gets stuck to the voltage rails instead of returning to normal operation. Also the op amp seems to saturate in the wrong direction somehow; when the clipping starts it jumps to the positive rail instead of saturating on the negative one. Oddly enough, the clipping seems to work correctly if I flip the positive and negative inputs, and the op amp works when it's not clipping with the inputs plugged in either way. Maybe the netlist generator has the two inputs mixed up or something? I've attached a simple test circuit below:

test.zip

SpiceLibComp saves full path to user libraries, making it difficult to share schematics

From @tvrusso on April 25, 2017 17:25

If a user creates a set of User Libraries by putting them into ~/.qucs/user_lib and then uses them in schematics, Qucs-s saves the full path to the library file in the metadata for the part.

If one bundles up one's schematic and libraries and shares them with someone else, they don't display properly, even if that user has dropped the library files into the correct ~/.qucs/user_lib directory. That's because the full path is no longer pointing at "~/.qucs/user_lib," but rather to "/home/firstuser/.qucs/user_lib." This can also bite a user who is running qucs-s on multiple machines with different home directory paths (/users/myname on one, /home/myname on another, for example). In fact, that's how I realized this was a problem. It's easy enough to fix by double clicking on the default symbol that shows up and fixing the path, or by hand-editing the .sch file, but for a large schematic with lots of user-library parts, it could become a problem.

It would be nice if qucs-s could recognize "~" as short-hand for "my home directory" and save this in the library path name in SpiceLibComp parts rather than the actual full path to that specific user's home directory on that specific machine.

Copied from original issue: ra3xdh/qucs#23

Voluminous Xyce simulator output can crash Qucs-s

From @tvrusso on April 25, 2017 19:42

The slotProcessOutput method of qucs/qucs/qucs/extsimkernels/xyce.cpp saves all console output from Xyce into a QString "output." All of the output of the run from beginning to end winds up stored in this one variable, so it can be displayed all at once when the run is complete.

This is normally OK for release builds of Xyce, but development builds are very verbose and can cause a huge amount of output in a long run. When this happens, eventually qucs-s gets a memory allocation error and simply crashes with a Qt error:

Warning: Qt has caught an exception thrown from an event handler. Throwing exceptions from an
event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all 
exceptions there.

The code then gets an abort trap (on the one system where I've seen it).

That's because the memory allocation error happens inside the slot handler, as it tries to grow the "output" variable.

One possible solution would be to wrap the "output += s" line in a try/catch, and do something graceful (perhaps discarding older output by clearing the string? Flushing the string to the dialog box and then clearing it?) rather than just relying on Qt's abort. Or maybe periodically send the data to the dialog box and clear the string again, to avoid it growing so much to begin with?

This is obviously not going to be a problem for most simulators (or even Xyce with release versions), but we did encounter it when running a verbose development build on a long-running circuit. Switching to a non-verbose version avoided it entirely.

Copied from original issue: ra3xdh/qucs#24

keeping qucsator and ngspice projects separate

Been using qucs here for about 5 years, mainly to simulate RF networks using S-parameters.

Recently installed qucs-s-0.0.22 (compiled on Linux Mint 19.3) and been getting to grips with ngspice.

As well as new ngspice models, I've accumulated a sizeable archive of models that only run using qucsator.

While it is very convenient to be able to switch between qucsator and ngspice inside qucs-s (albeit with a restart), at startup there's a huge flat list of all the models in ~/.qucs.

Thought about making new projects called QS_<project_name>, NG_<project_name> then copying all the files across manually to sort and separate them, but it seems like a kludge (and a lot of work).

Is there a more elegant way of separating the qucsator and ngspice models so I can pick them from inside qucs-s?

OpenSuse Tumbleweed package

Hi,
could you provide also an opensuse package?
The rpm works just fine, but it would be cool to add directly the repo.
Is it possible to enable the build of opensuse packages in OBS?

Parameter Sweep Failed

While doing parameter sweep the following simulation error are thrown:

line 8: checker error, extraneous property `SweepModel' is invalid in `SW:SW1' line 8: checker error, no such variable `false' used in a `SW:SW1' property

I am using QUCS 0.0.19 on Ubuntu 18.04.

I have attached my circuit for illustrating what i was doing.

qucs

Inductor & L Inductor

The Inductor symbol cannot be connected to other symbol vertically, for instance to Capacitor.
inductor
.
And the L Inductor symbol cannot be connected to other symbol horizontally, for instance to Capacitor
linductor

ngspice transient simulations

Using qucs-s-0.0.22, ngspice revision 27, linux mint 19.3 x86_64.

Although transient simulations are a lot faster using ngspice than qucsator, plotting them in qucs-s seems hit and miss.

As an example I have two .sch files with just an AC voltage source and a resistor. They have been pared back from two larger .sch files. Although they look identical test_trans_01,sch plots OK, but test_trans_02.sch does not.

ngspice simulates both files with identical output and no errors.

Please see attached netlists (.txt extensions for this forum).

test_trans_01.cir.txt

test_trans_02.cir.txt

The only differences I can see between the two netlists are reversed in the following two lines are reversed in test_trans_02.cir...

V2 Vsrc 0 DC 0 SIN(0 0.0075 10MEG 0 0 0) AC 0.0075
R1 0 Vsrc 1MEG

and

test_trans_01.cir contains the line...
write test_trans_01_tran.txt v(Vsrc)

whilst test_trans_02.contains the line...
write test_trans_02_tran.txt v(Vsrc)

The test_trans_0#.txt files are not on the system.

Because ngspice runs OK with no errors, ISTM that the problem must be in qucs-s?

Expired Keys in the build system

After following the instructions and installing the keys to use the package repositories as outlined in the instillation instructions requesting an update for the package lists on Ubuntu 18.04 yields the following warning.

It looks like the Release.key being uploaded has expired.

W: GPG error: http://download.opensuse.org/repositories/home:/ra3xdh/xUbuntu_18.04 ./ Release: The following signatures were invalid: EXPKEYSIG 184B98BE3E68CD11 home:ra3xdh OBS Project <home:[email protected]>
E: The repository 'http://download.opensuse.org/repositories/home:/ra3xdh/xUbuntu_18.04 ./ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Transient simulation parameter sweep outputting garbage

I am using Qucs-S + ngspice to simulate the transient response of a current source circuit. I want to sweep a parameter (the value of a resistor), but when that parameter sweep includes more than 2 points, the results are garbage (ridiculously high/low anomalous values).

When inputting these values for the swept parameter manually (without the Parameter Sweep box), or when using the Parameter Sweep box with only 1 or 2 points, the results are as expected.

I don't understand what's going on here... The schematic is as follows:

<Qucs Schematic 0.0.22>
<Properties>
  <View=128,39,1155,677,1.48538,0,52>
  <Grid=10,10,1>
  <DataSet=test2.dat>
  <DataDisplay=test2.dpl>
  <OpenDisplay=1>
  <Script=test2.m>
  <RunScript=0>
  <showFrame=0>
  <FrameText0=Title>
  <FrameText1=Drawn By:>
  <FrameText2=Date:>
  <FrameText3=Revision:>
</Properties>
<Symbol>
</Symbol>
<Components>
  <VProbe Vds 1 970 420 -16 28 0 3>
  <Lib T1 1 860 420 8 -26 0 0 "NMOSFETs" 0 "IRLZ34N" 0>
  <Diode D_1N4007_1 5 960 300 -13 -26 0 3 "76.9p" 0 "1.45" 0 "26.5p" 0 "0.333" 0 "0.7" 0 "0.5" 0 "0" 0 "0" 0 "2" 0 "42m" 0 "4.32u" 0 "0" 0 "0" 0 "1" 0 "1" 0 "1k" 0 "5u" 0 "26.85" 0 "3.0" 0 "1.11" 0 "0.0" 0 "0.0" 0 "0.0" 0 "0.0" 0 "0.0" 0 "0.0" 0 "26.85" 0 "1.0" 0 "normal" 0>
  <IProbe Ifw 1 910 360 -26 16 0 0>
  <VProbe Vsol 1 1080 300 -16 28 0 3>
  <L L1 1 860 320 10 -26 0 1 "100 mH" 1 "" 0>
  <Vdc V3 1 860 200 -63 -26 0 3 "12 V" 1>
  <GND * 1 860 170 0 0 0 2>
  <IProbe Ifb 1 800 360 -26 -35 0 2>
  <IProbe Is 1 780 530 -26 -35 0 2>
  <GND * 1 640 320 0 0 0 2>
  <Vdc V4 1 640 350 -63 -26 0 3 "5V" 1>
  <GND * 1 640 460 0 0 0 0>
  <R R4 1 480 460 15 -26 0 1 "330 Ohm" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
  <R R5 1 540 530 -26 -53 0 2 "1 Ohm" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
  <GND * 1 180 530 0 0 0 0>
  <R R1 1 300 400 -26 15 0 0 "4700 Ohm" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
  <Vrect V1 1 190 460 18 -26 0 1 "5 V" 0 "2 ms" 0 "2 ms" 0 "1 us" 0 "1 us" 0 "0 ns" 0>
  <C C2 1 380 460 17 -26 0 1 "10 uF" 1 "" 0 "neutral" 0>
  <Lib OP1 1 630 420 40 34 0 0 "SpiceOpamp" 0 "LM358" 0>
  <IProbe g 1 800 420 -26 16 0 0>
  <R R8 1 720 420 -26 15 0 0 "0 Ohm" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
  <R R7 1 770 390 15 -26 0 1 "1000 Ohm" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
  <R R6 1 860 260 15 -26 0 1 "0" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
  <.SW SW1 1 440 190 0 59 0 0 "TR1" 1 "list" 1 "R6" 1 "30" 0 "40" 0 "[30; 31, 32]" 1 "false" 0>
  <.TR TR1 1 210 200 0 59 0 0 "lin" 1 "0" 1 "25 ms" 1 "1000" 0 "Trapezoidal" 0 "2" 0 "1 ns" 0 "1e-16" 0 "150" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "26.85" 0 "1e-3" 0 "1e-6" 0 "1" 0 "CroutLU" 0 "no" 0 "yes" 0 "0.5 us" 0>
</Components>
<Wires>
  <860 450 950 450 "" 0 0 0 "">
  <950 430 950 450 "" 0 0 0 "">
  <860 390 950 390 "" 0 0 0 "">
  <950 390 950 410 "" 0 0 0 "">
  <860 350 860 360 "" 0 0 0 "">
  <860 360 860 390 "" 0 0 0 "">
  <860 360 880 360 "" 0 0 0 "">
  <960 330 960 360 "" 0 0 0 "">
  <940 360 960 360 "" 0 0 0 "">
  <960 360 1060 360 "" 0 0 0 "">
  <1060 310 1060 360 "" 0 0 0 "">
  <860 220 860 230 "" 0 0 0 "">
  <960 230 960 270 "" 0 0 0 "">
  <860 230 960 230 "" 0 0 0 "">
  <1060 230 1060 290 "" 0 0 0 "">
  <960 230 1060 230 "" 0 0 0 "">
  <830 360 860 360 "" 0 0 0 "">
  <860 450 860 530 "" 0 0 0 "">
  <810 530 860 530 "" 0 0 0 "">
  <330 400 380 400 "" 0 0 0 "">
  <380 400 380 430 "" 0 0 0 "">
  <380 400 480 400 "" 0 0 0 "">
  <480 400 480 430 "" 0 0 0 "">
  <190 400 270 400 "Vctrl" 280 370 67 "">
  <190 400 190 430 "" 0 0 0 "">
  <570 530 590 530 "" 0 0 0 "">
  <480 490 480 530 "" 0 0 0 "">
  <180 530 190 530 "" 0 0 0 "">
  <190 490 190 530 "" 0 0 0 "">
  <480 530 510 530 "" 0 0 0 "">
  <190 530 380 530 "" 0 0 0 "">
  <380 530 480 530 "" 0 0 0 "">
  <380 490 380 530 "" 0 0 0 "">
  <590 530 750 530 "" 0 0 0 "">
  <590 440 590 530 "Vinrev" 620 500 69 "">
  <480 400 590 400 "Vin" 570 370 91 "">
  <750 420 770 420 "Vout" 770 430 11 "">
</Wires>
<Diagrams>
</Diagrams>
<Paintings>
</Paintings>

Let me know if you need more info.

Qt5

There are any plans to switch from qt4 to qt5?

Version String Missing in .dat Files in Version 0.0.22

I observed that in 0.0.22, the <Qucs Dataset > tag is not complete. In particular, it is missing the version string (in this case 0.0.22) which makes e.g. qucsconv refuse working.

MWE

  • Create file (here single_coil.sch)
  • Place any simple setup in there (in my case: DC source, resistor, GND, connect them, add a DC Simulation)
  • Check the single_coil.dat file.

In 0.0.19, the first line reads

<Qucs Dataset 0.0.19>

In 0.0.22, the first line reads

<Qucs Dataset >

This makes qucsconv hickup and refuse to work in a on first sight rather cryptic error message (line 1: syntax error, unexpected '<', expecting Version).

Support specifying user-defined .spiceinit in the schematic.

Hi! I've been using your software, it's been really useful when simulating SPICE models.

I've run into issues when using PSPICE models. ngspice, in fact, supports PSPICE models, but it requires a setting in .spiceinit (namely "set ngbehavior=ps"). The ngspice simulator class seems to create an empty (when not using xspice) spiceinit each time it runs a simulation, so it does effectively prevent users from overriding ngbehavior.

One possible way would be to have a new component ("SPICEINIT") with a text property containing text to be included in the spiceinit file created by the simulator class. I think this solution fits nicely the use case, because enabling PSPICE behavior should be done on a per-schematic basis, as it depends on which models are included into it.

I'd like to send you a PR if you agree with the general approach. WDYT?

bug in linear sweep parameters

Hi,
there's a small bug in the linear sweep parameter conversion.
For example a sweep defined from -10 to 15 with a step of 1, 26 points gives the following in
spice4qucs.dc.cir : .dc v2 -10 15 0.961538, but should be .dc v2 -10 15 1

I'm running Qucs-S 0.0.20 with Xyce 6.8 and trying the diode clipper circuit from the Xyce user guide

the files are attached

bug_qucs-s_linear_sweep.tar.gz

thanks,
Bruno

Warning message from Qucs-s after ngspice simulation

After simulation (recent Qucs-s 020 on Windows 7) Qucs-s issues the following warning:

[Warning!] C:/Program Files (x86)/Qucs-S/share/qucs/xspice_cmlib/include/ngspice_mathfunc.inc file not found!

The file is there but the search path is wrong!

The correct path should be:

C:\Program Files (x86)\Qucs-S\share\qucs-s\xspice_cmlib\include

Holger

F5

Let's say there are two schematics open in two tabs.

The first schematic has a problem which prevents ngspice from producing any useful results.

Press F2 and the Statusbar says Ngspice Warnings in last simulation! Press F5. Correct.

The second schematic has no problem and is simulated without error. If I switch to the second tab the Statusbar still displays the warning from the first tab. Incorrect.

Now press F2 and the Statusbar says Ngspice no warnings. Correct.

Switch back to the first tab and the Statusbar still says Ngspice no warnings. Incorrect.

Should the warning message and log.txt somehow be local to each tab and preserved if another tab is simulated, so that F5 works correctly across tabs?

Heads up: Upcoming Xyce deployment changes

The Xyce team has decided to do away with the "runxyce" and "xmpirun" scripts it has been distributing with its release binaries. You might want to update Qucs-s so that it does not default to using these scripts to run Xyce.

The "runxyce" script did essentially nothing but take all the command line arguments it was given and pass them to the Xyce binary that lives in the same directory as the script. As such, it was pretty much a pointless vestige of very old releases that were not built with "-rpath" so they could find their shared libraries.

"xmpirun" was similarly a vestige of when Xyce needed "LD_LIBRARY_PATH" set in order to run, but clumsily attempted to tease apart its command line arguments to determine which were to be passed to "mpirun" and which to Xyce. This script was tedious to maintain, and could not handle some of the more esoteric options to mpirun.

Since neither script is particularly useful anymore, and both are maintenance headaches, as of Xyce release 6.8, these scripts will no longer be included with Xyce release binaries, and the correct way to run Xyce in serial will simply be to invoke it as "/path/Xyce" instead of "path/runxyce." In parallel, one will have to run it as "mpirun -np # [mpioptions] /path/Xyce [xyceoptions]" instead of "/path/xmpirun -np # [mpi and xyce options]".

It has always been possible to to run Xyce this way through Qucs-s by editing the default simulator settings. But after release 6.8, the defaults won't be usable. You might want to change them now, since the new way of running will work with older builds at least back to release 6.6 (when we started releasing binaries with RPATH set correctly).

Thank you for your continued work in making Qucs-s usable with Xyce. Qucs-s is an excellent choice as a schematic capture tool for use with Xyce, and we are encouraging our users to make use of it.

Qucs-S is blurry on macOS with retina screen

macOS Mojave 10.14.6
MacBook Pro 15" mid 2014
Qt 4.8.7_6
Qucs-S downloaded an hour ago and compiled

Hi I've just compiled Qucs-S, and it is blurry, but if I switch to another program (or the screenshot utility), it stops being blurry and is instead pixelated. Pixelated text and icons are something I can work with, but blurry text, buttons, window chrome, images, is hard on my eyes and is quite annoying, although ideally retina support would be best. In my cursory research, it appears Qt5 has better support for high dpi screens, but later versions of Qt4 backported some of that. I was unable to get anything to work to fix it, but I have yet to poke around in the code.

QUCS , PTM models

Hello People,

I have a doubt regarding QUCS, How to include PTM (available models with realistic parameters, http://ptm.asu.edu/latest.html ) models into circuits?
I am trying to download FINFET models and simulating IV characteristics of the transistor.

any help related to this will be appreciated. Thank you in advance.

F6

Using qucs-s-0.0.22, qucsator-0.0.20, ngspice revision 27, linux mint 19.3 x86_64.

If I do a qucsator simulation F6 shows the netlist for that simulation.

If I change the default simulator to ngspice, restart qucs-s and then simulate a different circuit F6 still shows the netlist for the previous qucsator simulation, not the one for the current ngspice simulation.

Is the only way to view a ngspice netlist to save the netlist and then open it with a text editor?

Is this a bug?

Export .csv file

Hi, I have a problem when exporting a signal to a .csv file.
The exporting .csv of files is a very useful feature of the qucs-s. It's possible to treat the signal and generate high-quality plots using, for example, the octave software.
At the exported csv file, the time column has six decimal places, which is not enough to represent the sample time (a sinusoidal signal with 60 Hz and a sample time of 0.0001 s). The problem occurs in the first eight lines:
1.00E-06
2.00E-06
4.00E-06
8.00E-06
1.60E-05
3.20E-05
6.40E-05
...

Is there a way to adjust the decimal places for the time column when I export a signal to a .csv file?

Below, are the parameters of the simulation:
Transient Simulation
Type=lin
Start=0
Stop=0.1
Points=1000
IntegrationMethod=trapezoidal
Order=2

Add qucsator in the AppImage

Do you think it would be possible to include also qucsator in the AppImage?
Compiling qucs core is quite convoluted and requires a bit of time, so I wonder if qucsator could be included to avoid the additional issue of having to build it.

Integrating qucsator

Hi,

My OS is Ubuntu 18.04 running on HP Zbook 17 G#. I have installed qucs_s 0.0.20 using the .deb file for Ubuntu 16.04. I am able to run ngspice, Xyce and opusspice simulations. In order to run qucsator I gave the executable path for qucsator installed by version 0.0.19 of qucs-spice, which is available in Ubuntu software. When I run the simulation I get the following error:

/snap/qucs-spice/4/usr/bin/qucsator: error while loading shared libraries: libqucs.so: cannot open shared object file: No such file or directory. This lib file is installed in /snap/qucs-spice/4/usr/lib/.

How can I integrate qucsator simulator in qucs_s?

Amir

No digital components

I'm using qucs-s 0.0.21 on Linux-64. I followed the instructions to install from the debian repo and successfully installed qucs-s. However when following the getting started guide section on digital simulation I'm unable to find an entry in the component combobox for digital components. I've installed freehdl (though not sure whether that should make any difference). Don't know if this is a bug or what, but any advice appreciated.

Measurement expressions and simulator expressions

I am trying to do some simulations with the Xyce backhanded and using the Time2Freq() function but I have understood that all the expressions are simulator expressions, therefore they are passed to the simulator using the spice command, for example .param.
Being used to ADS I feel like it could be nice to separate the simulator equations to the measurement expressions, which should be independent of the simulator and working without the need of simulating again the entire circuit.
For example, just taking the dc component of the output seems complicated, while in ADS it is for example vout[0]

Equation and Plots

Hi, first, I would like to congrats you for the great software!
I am trying to calculate and view the RMS and AVG value of a sinusoid waveform (va => given by a nodename).
I have already tried all the below equations:
rms(va.v)
rms(va)
rms(va.v, time)

I have used only "Transient Simulation".

Moreover, to view the result, I tried to use tabular/cartesian diagrams, however without success.
Is there any trick to do it?

Xyce script HB data post processing

Hello!

I'm trying to use Qucs-S with Xyce to do a HB simulation of an impedance of a diode. Attached is my schematic.
I'm following the manual, chapter "Xyce simulation output data post processing with the Xyce script component and SPICE .PRINT statements".
I can do the simulation (I found the HB output in C:\Users%user%.qucs\FILENAME.txt.HB.FD.txt)
However I can not plot anything from it after the simulation finishes.
Otherwise if I use AC simulation I can get the Xyce result in Qucs-s and to prepare some graphs.
Maybe I'm doing something wrong? Please point me how can I use the 'Xyce script' output directly.

Thank you!

Edit: to be more clear, actually the dataset file is empty (filename.dat.xyce)

image

EDIT from @ra3xdh on 20.03.2022

The following actions could be done to resolve this issue:

  • Don't convert variables names into Qucs notation like Node.Vb. Preserve SPICE notation V(node) instead.
  • The above action will break the backward compatibility. The examples in Qucs-S distribution need to be corrected to reflect this change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.