-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behavior trying to simulate Varactor #156
Comments
It seems this example cannot be ported directly to Ngspice. The SPICE has no single point simulation type. It is exclusively Qucsator invention. The SPICE standard supports only sweep simulation. As the simulation result Ngspice always produces not a single point but a vector. See chapter 17 of the Ngspice manual https://ngspice.sourceforge.io/docs/ngspice-html-manual/manual.xhtml#magicparlabel-23509 . The |
If you compare the two schematics, after I disabled some components, they are equivalent. Why does the first work and not the second? |
Disabling of parameter sweep doesn't work properly. If I delete it manually the capacitance is calculated fine. |
If start/stop are the same frequency or you sweep only 2 points, you only get data for the first point. You get Tabular data for 1 or more data points. You get a Cartesian plot for 3 or more data points. Could you not send ngspice the same freq twice (Start=Stop) when in Constant mode? Qucs puts "0 nan" if Start=Stop |
Vadim My goal was to make a generic varactor model with parasitics like done in Qucs/QucStudio. I was able to get ngspice to generate CV data in Tabular form but not as a plot of C versus V. The caveat was I was forced to put the varactor parameters (Cj0, M, Vj, Bv) directly into the diode model used in the subcircuit, Varactor_Model_mod.sch. I could not figure out a way to get Qucs-S to pass the parameters to the diode in the subcircuit, Varactor_Model.sch. Qucs-S makes Cj0=0 M=0 Vj=0 Bv=0 instead of the values required. Is there a reason Qucs/QucStudio will pass parameters to any device like semiconductors in a subcircuit but but Qucs-S won't? I realize this isn't something many would need. |
I found an online ngspice example for plotting varactor C versus V for a fixed AC frequency. https://sourceforge.net/p/ngspice/discussion/120972/thread/cd75976f/ |
It's a bug. Qucs-S cannot recognize variable in model parameter and substitutes zero. I will provide a fix soon. |
Will Qucs-S implement PlotVs? |
Is the CV plot blank due to the Auto ranging issue? Why is the DC sweep not 0, 1, 2...10? It's 0, .90909, 1.81818...10? |
No, is not related to auto-ranging issues of #133 Linux version is affected too. I need to make more investigations to determine the reason of blank plots. Look like inconsistent vector dimension of X/Y axis somewhere. |
See also my comments here: #161 (comment) The #161 is related to this. |
I updated my files to get around the known issues. I will update them as fixes are implemented. Did you discover why "V1" is 0, .909, 1.82.. instead of 0, 1, 2...? |
The step for netlist is computed as |
Look for the solution of the CV-curve plotting problem in #277. This currently may be resolved using some tricks with Nutmeg scripting. No application fix is required. I am closing this ticket. |
I'm getting weird results trying to "port" a Qucs Varactor simulation over to Qucs-S. I want to use "Varactor_Model.sch" in circuits. I used the built in varactor model for debugging. I want to plot CV and Z to confirm my model is working at operating frequency. I want to use 2 methods, AC current source and measurement of S11 to calculate C and Z.
Like for S-parameters, AC simulation for a "constant" fixed frequency doesn't work. Forced to have 2 frequencies.
As shown below, the data for "Component Impedance_I.sch" is as expected. Simple LCR meter.
The data for "Varactor_Impedance_I.sch" is garbage. I tried disabling various componenst
Varactor Model_prj.zip
The text was updated successfully, but these errors were encountered: