vinique wrote on Feb 6th, 2007, 8:37am: diodecond1: if(vbe > -5.0*vt) use
diodebef: ibe == ((isat*(exp(vbe/vt)-1.0))+(gmin*vbe))/bf;
elsif(vbe <= -5.0*vt) use
diodeber: ibe == ((-1.0*isat)+(gmin*vbe))/bf;
end use;
The code above is pretty lousy in terms of continuity across the "if" statement. exp(-5*vt / vt) = 0.0067, which is treated as zero in the "elsif" block. So, not only is there a discontinuity in the derivative, there's a discontinuity in the VALUE!
With a simple model like this, I don't think you'd really notice the extra simulation time if you just compute
diodebef: ibe == ((isat*(exp(vbe/vt)-1.0))+(gmin*vbe))/bf;
regardless of the value of vbe.