Keyboard Shortcuts
Likes
Search
Mystery Circuit
开云体育Thanks, did not know that. ? Tim ? From: LTspice@... [mailto:LTspice@...]
Sent: Wednesday, May 23, 2018 8:42 AM To: LTspice@... Subject: [LTspice] Re: Mystery Circuit ? ? Greetings.. 1) A disconnected current source must be shorted. 2) otherwise Gmin and rparalel ?will terminate it and produce voltage spikes... Cheers AG |
Just for the record, I have now seen supposedly identical copies of the circuit behave in two different ways.? After AG's reply, I reopened the original circuit in? the original folder, and the unconnected current source did not add pulses to out.? Curious, I downloaded the copy I posted and executed it in place in the download folder - and it did add the suspicious pulses.
Then I closed my original file (in original folder) and retested - now it adds the pulses.? So has a wack-a-mole quality to it that I can't reproduce consistently. I was motivated to check again because of the results in the more complex circuits I was doing this in.? I had a bunch of current sources on a bus that I was switching in and out by just removing one side of the source. Of course, I will avoid the condition in the future but I wonder if anyone else sees the dual personality disorder and can reproduce it. TIm |
Tom,
Your "MysteryCircuit.asc" doesn't open because it has unique symbols that did not come with LTspice. Whenever you have a schematic with symbols or models that you've added to your LTspice library (thus making it non-standard), you have to include those symbols or models along with your schematic whenever you upload it, or send it to someone else. If I understand correctly, your circuit is supposed to have a current source with nothing connected to it. SPICE current sources are ideal, which means they force a current. If nothing is connected to carry that current, how much voltage is there? It would be infinite voltage. As AG notes, it isn't actually infinite, because SPICE imposes restrictions that may limit the voltage. One of them is Gshunt, but its normal value is 0 (infinite resistance), so that doesn't limit the voltage. Another one is Gmin, but that is placed only across PN junctions, and apparently your circuit doesn't have any. Another is Cshunt, which you set to 0.001pF, so probably the current source charges that tiny capacitance. I don't know how your circuit elements are connected (because you didn't include them). But there is every chance that the math "goes haywire", so to speak, under the conditions of a current source with nothing (but Cshunt) connected to it, resulting in unexpected voltages. Please upload a complete version of your "mystery" circuit. Regards, Andy |
开云体育I suspect that, faced with a singular matrix, LTspice falls down
to an alternate solver that uses a random algorithm. Le 23/05/2018 à 18:20, thutches@...
[LTspice] a écrit?:
? |
开云体育The parts I used were mini-symbols for the current and voltage. I generally use them but maybe I only thought they were standard parts – don’t remember moving them in when I installed XVII. ? I’ll upload the circuit with the big current and voltage symbols. ? Tim ? From: LTspice@... [mailto:LTspice@...]
Sent: Wednesday, May 23, 2018 11:34 AM To: LTspice@... Subject: [LTspice] Re: Mystery Circuit ? ? Oops --- Sorry "Tom". Yes, I meant Tim. My fat fingers strike again! |
A few more comments to add:
I see you uploaded a modified version of the circuit with the standard LTspice current and voltage source symbols. But you left the non-standard ones on the uploaded schematic -- which means I still can't run the same simulation as yours. I can open and save your second schematic, which deletes the references to your nonexistent symbols (and makes the errors go away), but now my schematic is definitely not the same as yours. But looking at the usable part of what you uploaded: Ideal current source I1 drives a PULSE waveform with a 10mA amplitude, even though one end of it is "floating". It's not really floating, because of your Cshunt=1e-15. If you remove that, then the simulation can't run at all, because the circuit matrix is singular (due to the ideal current source with no path for the current to go). So what's happening, is that a 10mA pulse is being sent into V1 with its Rser=1 ohm, meanwhile the other end of I1 charges Cshunt towards -50Megavolts. The pulsed current through V1's Rser causes V(out1) to wiggle. It switches between 1.000V and 1.010V. Now, depending on what scale you plot these with, you may or may not see the 10mV wiggle. It would be a Really Good Idea to disable waveform compression (.options plotwinsize=0). Without that, LTspice could decide that your voltage wiggles are too small to be "seen" and can be neglected. The default waveform compression setting is OK for eyeballing many signals on a waveform plot, unless you zoom in on the waveform, and then you notice something is missing. This kind of thing often depends on what is happening elsewhere on your schematic, which can make it LOOK as if something over here affects something else over there. There are other LTspice settings that can affect your results, which might help explain why the results differ. Your circuit pushes boundaries by having a current source that goes nowhere. Some of the settings in the Control Panel are remembered forever, while others are remembered as long as LTspice is open, and then they revert to default values again when you re-open LTspice. I wonder if you have different copies of your miniature current and voltage sources, in your working folders (with the schematics). If you do, there's the possibility that they are not all the same. If you installed LTspice XVII when you had a working copy of LTspice IV, it might have taken the symbols that you had added to your LTspice IV, and copied them to your LTspice XVII. FYI, it's not too bad to lift one end of a voltage source, but it's a real problem to lift one end of a current source. Regards, Andy |
开云体育Thanks for the analysis, Andy.? I think I get it now. Even though I1 is disconnected, there is a 1fF cshunt cap connected from the disconnected end to ground that provides the circuit for the quick (instantaneous) charging of the tiny shunt cap.? Because there is no return path it stays charged for the duration of the pulse until I1 switches to zero, instantly discharging it. ? The Cshunt was needed in the complex circuit this was derived from and induces the spike I see now in the simple example. ? Tim ? ? From: LTspice@... [mailto:LTspice@...]
Sent: Wednesday, May 23, 2018 12:29 PM To: LTspice@... Subject: RE: [LTspice] Re: Mystery Circuit ? ? A few more comments to add: |
A 100% norton or thevinin ideal never can exist in real life. Some small negligible dual loading is needed. And in software to do this invokes chewing on infinity I think if the model could be tweaked toward 100%. On Wed, May 23, 2018 at 6:42 AM, apparajanganesan@... [LTspice] <LTspice@...> wrote:
--
Ron Davison principle Efficient Electronic Solutions 760.505.4380 |
Going back a few replies, Tim wrote, "I had a bunch of current sources on a bus that I was switching in and out by just removing one side of the source."
It's not a good idea to do it that way. Here's why. A 10mA pulsed current source effectively says, "I WILL force 10mA pulses, no matter what!" If you lift one end but not the other, it is still going to force 10mA pulses at the other end (actually at both ends). If it can't, if the electrons spill out of either end with literally nowhere to go (Gshunt=0 and Cshunt=0), that's going to cause a simulation failure. Here are some better ways to do it: (1) Remove one end of the current source as you did, and put a short (a wire) across the current source. Adding the short keeps all the current source's current away from the bus. (In fact, LTspice sees the short and effectively removes the current source from the simulation.) (2) Remove the other end of the current source, the end that goes to the bus. Now it's no longer forcing current onto the bus. If the opposite end still goes to GND, it is still forcing current to/from GND, but we don't care about that. With one end disconnected, you do have electrons with nowhere to go except Gshunt and Cshunt, so you're likely to get some pretty hefty voltages across that current source. You may think that's OK, that it won't affect the rest of your circuit, and maybe it won't. But remember that SPICE handles your circuit as one big mathematical matrix, and tries to evaluate all the effects between every node and every other node. Thus, a node with a few megavolts or gigavolts rattling around on it, might not be trivial compared to signals elsewhere in the 1V range. It's always a good idea to try to keep all voltages in the same general range. I call this a "dynamic range" problem. Having both huge and small voltages or currents in the same simulation can degrade accuracy. (3) Remove both ends of the current source, leaving the whole current source "floating" on both ends. There will be errors in the SPICE Error Log, but the simulation might work in spite of them. This is still not a good solution (because of large voltages on the floating nodes, see above), but it might work anyway. It would be better to ground both ends of the disconnected current source. Lifting one end of a current source, is analogous to shorting a voltage source. The SPICE voltage source says, "I WILL force 10V across my terminals." The wire says, "I WILL make the voltage zero." Which wins? They both do, so neither does. In a real circuit, the wire probably wins and the voltage source and the wire get very hot, until one of them melts or lets out the "magic smoke". In the SPICE version, both are ideal and neither one "gives in" to the other (unless you added resistance). Regards, Andy |
Hi again Tim, you wrote:
"Even though I1 is disconnected, there is a 1fF cshunt cap connected from the disconnected end to ground that provides the circuit for the quick (instantaneous) charging of the tiny shunt cap. Because there is no return path it stays charged for the duration of the pulse until I1 switches to zero, instantly discharging it." A few small (or maybe not small) corrections. I1 linearly charges the small Cshunt cap during the 501ns that it is pulsed on, but there is nothing to discharge the cap when I1 switches to zero. Therefore, the cap never discharges. If you run the simulation for a longer time, then the voltage on the cap increases (negatively) without bounds. After 10s, it reaches -5TV, and would keep going. Remember that a current source can only force current (not voltage), so when it switches to 0, it's like an open circuit. An open circuit can't discharge a cap. Also, the charging is not instantaneous. Each time I1 switches on, it starts supplying electrons to the Cshunt cap, causing it to ramp up its charge and its negative voltage. "The Cshunt ... induces the spike I see now in the simple example." If you're talking about the pulses you saw on out or out1 or out2, then no, that's incorrect. Cshunt is not responsible for the pulses across the voltage source V1. The current source I1 was entirely responsible for that. Cshunt merely provided a current path for SPICE to be able to simulate the circuit. Without Cshunt, the circuit was impossible and could not be simulated. With or without Cshunt, I1 dumps current into the output node, where it causes a pulsed voltage drop across Rser. Regards, Andy |