[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: zener diode modeling



By component sizes do you mean the parameters in the model?

It might be instructive to compare the parameters in a "normal" diode
model with those in your zener model to see if there are any you could
add to see if they improve the behaviour.

The idea of using a V source with a series diode and an anti-parallel
diode across the lot might work best:

V1 intk a 5
D1 k intk D
D2 a k D
.model D D

This would give a zener voltage of about 5.6V.


An alternative which could be fun to try is a B voltage source in
series with a 0V source acting as a current monitor:

.param Vz=5.6 Vfwd=0.6 epsilon=1k
B1 intk anode V=(Vz+Vfwd)*tanh( Vfwd/(Vz+Vfwd)*exp(I(Vmon)*epsilon) )-Vfwd
Vmon kathode intk 0


This gives very well defined zener and forward drop voltages (defined
by the Vz and Vfwd parameters respectively).
The epsilon parameter determines the sharpness of the forward and
reverse conduction knees.

The model is not quite right in that if the "diode" is placed in
series with a resistor, as you would use with a zener, it does not
produce exactly 0V across - i.e. 0A through - the diode for 0V applied
to the overall series circuit of the diode and resistor. With a 1k
resistor in series with the "diode" and Vz = 2.7, Vfwd = 0.6 and
epsilon = 1k, the offset is around -4.1mV. The offset reduces for
higher Vz and epsilon values.

I haven't had time to work out what I've missed in the B source
expression that makes the offset non-zero but for your application it
may be good enough. You can always tweak the voltage of Vmon to take
out the residual offset for a given set of Vz, Vfwd and epsilon.

It is also possible to define the same function using a B current
source - which may converge better than a B voltage source - but I
can't see the wood for the trees on that version at present.

I'd be interested to hear how you get on if you - or anyone else - do try it.

:)

         Andy.

signality.co.uk



On 18 April 2011 23:27, yamazakir2 <yamazakir2@xxxxxxxxx> wrote:
> I have not used a parallel gig ohm resistor or series inductor, but I
> have tried tweaking component sizes and it is extremely hard to get
> zeners to not gag in the middle of a transient sim I was looking for a
> very generic all purpose model that won't yak. It doesn't haven't to
> be accurate, just work.
>
> On Mon, Apr 18, 2011 at 1:38 PM, Andy Fierman
> <andyfierman@xxxxxxxxxxxxxxx> wrote:
>> Hmmm.
>>
>> Tricky things zener, schottky and soft recovery diode models ...
>>
>> Try a different vendors model (check to see if it is actually a
>> different model)?
>>
>> You could try using a V (voltage) source in series with an ordinary
>> diode plus a second diode in anti-parallel with the series V and
>> diode.
>>
>> This will give you a high reverse drop and a forward drop of a normal
>> diode.  The V source is set to the zener voltage minus one diode drop.
>> So if you wanted a 5.6V zener, you set V to about 4.9V and assume
>> about a 0,7V forward drop in the diode. You can play about with the
>> value of V to set the overall drop to where you want it because you
>> don't know exactly what the diode drop will be as it will depend on
>> the diode model and of course the forward current.
>>
>> Or you can start with your existing zener model and play about with
>> the parameters to see if you can make it work.
>>
>> If you make yourself a simple test circuit such as a pulse source with
>> some series R driving the zener with maybe some C in parallel with the
>> diode you can run transient tests on it to make sure you've not set up
>> silly capacitance or transit times or messed up the forward or
>> breakdown voltage to much whilst still giving you something that
>> behaves like the diode you might expect.
>>
>> Beware stripping the model down too far though. If you take out too
>> much of the realistic diode, you may end up with an idealised device
>> that has inherent 2nd or even first order discontinuities that will
>> make your convergence problems even worse.
>>
>> Silly question though: have you tried putting a 1G resistor in
>> parallel with it? Or adding a few nH in series to model some lead
>> inductance?
>>
>> Often the more realistic the circuit is the better it converges.
>>
>> Cheers,
>>
>>          Andy.
>>
>> signality.co.uk
>>
>>
>>
>> On 18 April 2011 18:02, yamazakir2 <yamazakir2@xxxxxxxxx> wrote:
>>> Does anybody have a nice and simple zener diode model they would like
>>> to share? The model that I am using has trouble with convergence in
>>> context of a complicated switching circuit with ngspice.
>>>
>>>
>>> _______________________________________________
>>> geda-user mailing list
>>> geda-user@xxxxxxxxxxxxxx
>>> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>>>
>>
>>
>> _______________________________________________
>> geda-user mailing list
>> geda-user@xxxxxxxxxxxxxx
>> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>>
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user