Menu

#682 strange branch contribution since ngspice-43

v1.0 (example)
open
nobody
None
5
2024-07-23
2024-07-22
No

Since version 43 an strange branch value appears if alli is activated for save: q.x1.qnpn13g2#branch.
I can't classify this value. Older versions didn't show this value.
Test case and result file attached.

2 Attachments

Discussion

  • Holger Vogt

    Holger Vogt - 2024-07-22

    When I run your example with vc=1 and Vb=0.7, I get the following (command print all):

    ngspice-43

    @q.x1.qnpn13g2[ib] = 5.109590e-09
    @q.x1.qnpn13g2[ib] = 5.109590e-09
    @q.x1.qnpn13g2[ib] = 5.109590e-09
    @q.x1.qnpn13g2[ic] = 2.998785e-13
    @q.x1.qnpn13g2[ie] = -5.11019e-09
    @q.x1.qnpn13g2[is] = 1.001826e-12
    b = 7.000000e-01
    c = 1.000000e+00
    e = 0.000000e+00
    q.x1.qnpn13g2#branch = 3.694660e-06
    q.x1.qnpn13g2#collci = 9.996172e-01
    q.x1.qnpn13g2#substrate = 4.017325e-10
    q.x1.qnpn13g2#xf1 = 3.694660e-06
    q.x1.qnpn13g2#xf2 = 3.694660e-06
    s = 0.000000e+00
    t = 4.198190e-02
    vb#branch = -5.07615e-09
    vc#branch = -3.69469e-06
    ve#branch = 3.699770e-06
    vs#branch = 1.001826e-12
    x1.s1 = 4.007305e-10
    

    ngspice-42

    @q.x1.qnpn13g2[ib] = 5.076152e-09
    @q.x1.qnpn13g2[ib] = 5.076152e-09
    @q.x1.qnpn13g2[ib] = 5.076152e-09
    @q.x1.qnpn13g2[ic] = 3.694693e-06
    @q.x1.qnpn13g2[ie] = -3.69977e-06
    @q.x1.qnpn13g2[is] = 1.001826e-12
    b = 7.000000e-01
    c = 1.000000e+00
    e = 0.000000e+00
    q.x1.qnpn13g2#collci = 9.996172e-01
    q.x1.qnpn13g2#substrate = 4.017325e-10
    s = 0.000000e+00
    t = 4.198211e-02
    vb#branch = -5.07615e-09
    vc#branch = -3.69469e-06
    ve#branch = 3.699770e-06
    vs#branch = 1.001826e-12
    x1.s1 = 4.007305e-10
    

    The ngspice-43 values seem to be wrong (ic = 3e-13 ??). The q.x1.qnpn13g2#branch in question is nearly equal to -1*vc#branch. I will check what the origin for q.x1.qnpn13g2#branch might be, but there seems to be a more severe bug in the VBIC model (caused by the updates?).

     

    Last edit: Holger Vogt 2024-07-22
  • Holger Vogt

    Holger Vogt - 2024-07-22

    When I reset the pre-master-44 branch to commit
    16513beb4 ("Don't enable functions 'time' or 'getrusage' when OpenMP is selected", 2024-07-11)
    (before the second VBIC update on nqs starts) everything is o.k. (like in ngspice-42). When setting the branch to
    b84ac9ecd ("Options are now included", 2024-07-12)
    (right after the nqs commits), the bugs are there.

     
  • Dietmar Warning

    Dietmar Warning - 2024-07-23

    You are right - the introduced nqs effect destroying the op variables report, the results for network solution (vx#branch) seems OK. Switching off this effect by setting td=0 or commenting out the parameter show correct results too.
    Other what worries me is that @q.x1.qnpn13g2[ib] is reported 3 times. This was also the case in former versions.

     
  • Dietmar Warning

    Dietmar Warning - 2024-07-23

    Latest commit correct the op reporting discrepancy for activated excess phase in vbic model.
    The original problem and the 3x [ib] output still exist.

     
  • Holger Vogt

    Holger Vogt - 2024-07-23

    With your recent update (without save alli allv, but with collector and base voltages) I get

    b = 7.000000e-01
    c = 1.000000e+00
    e = 0.000000e+00
    q.x1.qnpn13g2#branch = 3.694660e-06
    q.x1.qnpn13g2#collci = 9.996172e-01
    q.x1.qnpn13g2#substrate = 4.017325e-10
    q.x1.qnpn13g2#xf1 = 3.694660e-06
    q.x1.qnpn13g2#xf2 = 3.694660e-06
    s = 0.000000e+00
    t = 4.198190e-02
    vb#branch = -5.07615e-09
    vc#branch = -3.69469e-06
    ve#branch = 3.699770e-06
    vs#branch = 1.001826e-12
    x1.s1 = 4.007305e-10
    

    There are three new entries

    q.x1.qnpn13g2#branch = 3.694660e-06
    q.x1.qnpn13g2#xf1 = 3.694660e-06
    q.x1.qnpn13g2#xf2 = 3.694660e-06
    

    corresponding to your code changes in vbicsetup.c, lines 510 ff.

    With save alli allv I still get

    @q.x1.qnpn13g2[ib] = 5.109590e-09
    @q.x1.qnpn13g2[ic] = 2.998785e-13
    @q.x1.qnpn13g2[ie] = -5.11019e-09
    @q.x1.qnpn13g2[is] = 1.001826e-12
    

    which does not correspond to

    vb#branch = -5.07615e-09
    vc#branch = -3.69469e-06
    ve#branch = 3.699770e-06
    vs#branch = 1.001826e-12
    
     
  • Dietmar Warning

    Dietmar Warning - 2024-07-23

    Thank you, Holger!
    Can you make an new attempt.

     
  • Holger Vogt

    Holger Vogt - 2024-07-23
    @q.x1.qnpn13g2[ic] = 3.694693e-06
    vc#branch = -3.69469e-06
    

    are equal now.

    Concerning triple @q.x1.qnpn13g2[ib]: You have three base nodes, base, baseBI, baseBP. According to outitf.c, line 323 all nodes containing 'base' in their names will get the same vector name.
    If you call the new nodes in vbicsetup.c for example basBI and basBP, everything seems to be o.k. Same probably with HICUM2.

    Unfortunately we then have 5 extra nodes printed, which are probably not of interest to the user:

    q.x1.qnpn13g2#branch = 3.694660e-06
    q.x1.qnpn13g2#collci = 9.996172e-01
    q.x1.qnpn13g2#substrate = 4.017325e-10
    q.x1.qnpn13g2#xf1 = 3.694660e-06
    q.x1.qnpn13g2#xf2 = 3.694660e-06
    

    save alli allv nosub
    may help then.

     

    Last edit: Holger Vogt 2024-07-23

Log in to post a comment.