Many, many thanks for the behavioral models! With them one can whip up a pretty good model for a thermionic triode. One glitch though-- if I set the "Mu" to 4.2, the model works well. If I set it to 100, it works well. If I set it to 14, it works well. But if I set it to 18, the value for a good ol 12AU7, things go crazy on the DC sweep. Pls advise. |
by arduinohacker
May 09, 2012 |
FWIW, I think a very high resistance (1G resistor) in parallel with I3 will fix it. I tried it at Mu = 16, 17, 18, 19, 20 & 21V and they all worked. Not quite sure why and haven't time to see quite what's happening to the current through I3 at each point but I wonder if the current through I3 reverses for Mu > 18 or so and the voltage across it goes silly without some resistance to give it a defined value? |
by signality
May 09, 2012 |
Amazing, thanks, that fixes it, or at least moves the singularity to someplace where we don't notice it. |
by arduinohacker
May 09, 2012 |
I appreciate your sharing this. I've been frustrated by the lack of a way to set a "global" parameter that might be shared among multiple behavioral elements. Your simple solution here -- adding a voltage source and calling its output "mu" -- is so simple and obvious that I'm still reeling from the slap on my own forehead. THANKS |
by CarlSawtell
May 09, 2012 |
Hmmm. Maybe I should have made more of an effort to draw people's attention to this: which used the same idea. I did that and publicised it a few days after the behavioural sources were introduced because there's as yet no way to parameterise things in expressions. Sorry about that: I could have saved a bit of a headache for some people a few weeks ago. :( |
by signality
May 09, 2012 |
I think what's conceptually important in your triode model is that you parameterized "mu"; whereas in the older model you used voltage sources to represent voltage levels. The use the voltage of a named node to represent an arbitrary parameter (transconductance, gain, mismatch, pressure) is the leap that I think may not be obvious to people generating new models; this is a great example that illustrates how behavioral modeling can extend to include parameters beyond voltages and currents, even completely non-electrical parameters. |
by CarlSawtell
May 09, 2012 |
Good point. I've used sources many times to represent arbitrary parameters and quantities in SPICE - the turns ratio in a transformer for instance - but hadn't thought too much about how that may not be obvious to less experienced modellers and particularly newcomers to CL. In some ways using sources as parameters may be easier to use and visualise - and to plot - instead of trying to keep track of parameters assigned values simply in textual .param type statements. It also makes it possible to use the sweep features of CL to sweep a source used as a parameter which again sidesteps the lack of textual parameter support in CL. And of course, those sources can themselves be time dependent or behavioural sources and so on. OTOH, in complicated circuits all those sources are going to make the circuit very cluttered. A panel of text or an included file can remove much of the clutter. I have a behavioural transformer model (more advanced than the one I've publicised) but I've not publicised it because it is very unwieldy to use without parameters as text. Having said that and thinking about the visualisation help that using sources may offer, I might yet put it out into the wild. :) |
by signality
May 09, 2012 |
Please sign in or create an account to comment.
CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.