Post Go back to editing

Bizarre bug with .net measurements

Thread Summary

The user reported a bug in LTspiceXVII where the .net statement incorrectly measures the input impedance (Zin) of a simple amplifier model with negative feedback when a dependent source (B1) is added to measure the noise current of the voltage source (V1). The issue occurs when Rser is specified on V1 and the current is probed. The workaround is to avoid probing the current or use a separate resistor instead of Rser. The bug will be fixed in the next release.
AI Generated Content
Category: Software
Product Number: LTspice
Software Version: 24.1.1

Short version: I believe I've come across a bug where .net measurements are broken.

Long version: I have a very simple model of an amplifier with negative feedback, which I want to analyze with both .noise and .ac simulations. E1 is the voltage gain of the amplifier, V1 is the source. Resistor Ra1 is the input-referred noise voltage while resistor RIa1 and source G1 are the input-referred noise current.

When doing the .ac sim, I use the .net statement to measure the network parameters of the circuit (all S and Z params are printed with .meas statements). The open loop gain is -100 and feedback impedance is 10kohm, so input impedance should be 99.0099ohms. And it was exactly that, until I added the dependent source B1 (intended to let me measure noise current in the source V1). After adding it, the value of Zin(V1) and Z11(V1) becomes 1.94137ohm (other Z21, S11, and S21 change as well), even though it does not feed back to the circuit in any way.

Removing B1 from the circuit or setting its value to zero or to I(V1)*0 causes the results to be correct. Interestingly, setting its value to I(V1)*1e-12 (or any other scaling factor) produces exactly the same results as when it's set to I(V1).

Attached are two circuits, with the only difference being the value of B1. It took me about a half hour of trial-and-error to find the dependency on B1, and I have no idea why that dependency exists. At the moment I can work around it, but since I have no idea why the simulation broke I'm really worried it's going to happen again at some point.

Regards,

Mike

strange_bug.zip

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.