sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.32k stars 639 forks source link

Grounded transmission line spooky action at a distance #619

Open ormaaj opened 3 years ago

ormaaj commented 3 years ago

Requiring the ends of the shield to be connected through a worm hole isn't so great (unless the line is actually a closed loop). I wanted to simulate a proper locality-respecting t-line with neither end connected to the circuit ground. I think this does a decent job by using two of them, with a few workarounds:

But I think you'd get close to the same by just removing the grounded shield requirement. The shield nodes need to be free to simulate things like transmission line transformers, active shield drivers and other parasitic effects.

pfalstad commented 3 years ago

Ok I have no idea what's going on this circuit but basically what you're asking for is a transmission line which doesn't have to be grounded, right?

ormaaj commented 3 years ago

Ok I have no idea what's going on this circuit but basically what you're asking for is a transmission line which doesn't have to be grounded, right?

Right. Half of that circuit is unrelated (mostly). The left hand side shows a sort-of work around by using a 2nd line as as a simple analog delay that's terminated to damp reflections from propagating forever in a loop, I copy voltage in and current out, summing the termination current to cancel its influence and isolate the shield output from ground with all the currents accounted for. I'm not completely certain that accounts for everything though. Distributed capacitance and mutual inductance between the two lines aren't modelled of course so the 4 pin's currents and voltages are only be determined by the impedances of whatever they're connected to.

Your model looks pretty similar to the spice lossless transmission line with the grounded shield behaviour being an obvious difference.

pfalstad commented 3 years ago

The grounded shield behavior is an attempt to hide some flaws in the model.  It seems the spice model has these same flaws, unless I'm missing something.

Take the following circuit: https://tinyurl.com/yeda6mde

In my test version which has the ground requirement commented out, nothing happens; there's no current anywhere.

I tried it in spice and got the same result: tl0.txt

endolith commented 2 years ago

The shield nodes need to be free to simulate things like transmission line transformers, active shield drivers and other parasitic effects.

also https://www.youtube.com/watch?v=bHIhgxav9LY :)

ormaaj commented 2 years ago

Yep.

Even if RGLC parameters were given we'd need a 2-d model with a conductor spacing parameter. I've not seen that in a spice-like simulation. A lumped-element approximation with .k linked inductors probably wouldn't be suitable either.

Likely would have to step up to a proper field simulator for that because a 1m conductor gap isn't going to be very t-line like.

pfalstad commented 2 years ago

I'm not very happy with the end of that video. I mean, the light bulb would turn on, sure. But you don't even have to turn on the switch. You don't even need the battery; any random electromagnetic noise would cause current to flow and the light bulb to light up.

endolith commented 2 years ago

@pfalstad Yeah it would be a very small current and wouldn't light the bulb visibly regardless, as many comments have pointed out, but this is off topic. 😁

pfalstad commented 2 years ago

Back on topic, I realized I hadn't tried the spice lossy transmission line model. I tried 2 of the models in my copy of MacSpice with my test circuit above and they both gave me strange results that don't seem correct. The other model is just a LC ladder, which I'd rather not use because it would be a lot slower. If you want to use that, you could build your own.