Accurately models supply current?

That was a pretty good quicky Genome came up with for modeling the supply current of an opamp - for the problem a hand. In case you missed it, here it is:

| | .-. I(D1) +---------(-->)-------------+ | '-' | | D1 | |\\| +----->|--+ | -|-\\ | | ___ | | >----+ +--|___|----+-----+ -|+/ | | | | |/| | | | | | +-----|)-------------+ | '-' I(D2) | created by Andy´s ASCII-Circuit v1.22.310103 Beta

formatting link

Works for modeling the current once the diode turns on but there's bad crossover distortion.

Take the circuit from the "strange amp - MVC-324X.JPG - T600amp.jpg" thread. Ok, don't take it. It's supposed to be an amp, not a switch. So using the diodes to separate source and sink currents works, but you get that distortion.

How can we model the supply current without the diode distortion?

--
Best Regards,
Mike
Reply to
Active8
Loading thread data ...

Use u(t). Its an ideal comparator.

Put a Ov voltage source in the output lead. Use the current from this to control current sources, with u(t), across the supplies. Don't forget to add quiescent current.

Kevin Aylward snipped-for-privacy@anasoft.co.uk

formatting link
SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design.

Reply to
Kevin Aylward

Hello Kevin, this is very similar to what I have implemented one year ago in example circuits uploaded to the LTSPICE-Yahoo user group.

Hello Active8, The other circuit with the diodes is a bad idea, because it adds a lot of distortion to the original opamp behaviour.

The load current circuit with 0V-voltage source and two load current sources can be downloaded from here. It also has a current source for the quiescent current.

formatting link

Files > Lib > Opamp Load Curr. From Supplies

There are some examples there how to use it with LTSPICE. There is also a nice symbol and a .SUBCKT model available in this folder.

Best Regards, Helmut

LTSPICE is free and unlimited SPICE with graphical user interface.

formatting link
LTSPICE/SwitcherCADIII

Reply to
Helmut Sennewald

"Active8" a écrit dans le message de news: snipped-for-privacy@news.individual.net...

Put a voltage source in series with each diode in order to have a small rest bias current. Also your diodes don't have to be real ones, then you can adjust their parameters at will to give you the desired transition behaviour.

--
Thanks,
Fred.
Reply to
Fred Bartoli

Properly biased Zeners?

Reply to
Mark Jones

That occured to me.

If I can make Vf zero - like adding an extra couple few diode drops to cancel it which effects the same result as the voltage source you suggest.

--
Best Regards,
Mike
Reply to
Active8

Hello. Thanks again.

--
Best Regards,
Mike
Reply to
Active8

Like this:

V+ | |nodeP .-. G1 +---------(-->)-------------+ | '-' | | | |\\| | -|-\\ + | | | - | | >---------||||||-----------)-----+ -|+/ | | | | | |/| | \\ | V1 0V | / LOAD | | \\ | .-. | | +---------(

Reply to
Jim Thompson

In LTspice you can model an ideal diode as described in the help files

D. Diode

Symbol Names: DIODE, ZENER, SCHOTTKY, VARACTOR.

Syntax: Dnnn anode cathode [area]

  • [off] [m=]

Examples:

D1 SW OUT MyIdealDiode ..model MyIdealDiode D(Ron=.1 Roff=1Meg Vfwd=.4)

D2 SW OUT dio2 ..model dio2 D(Is=1e-10)

A diode requires a .model card to specify its characteristics. There are two types of diodes available. One is a conduction region-wise linear model that yields a computationally light-weight representation of an idealized diode. It has three linear regions of conduction: on, off and reverse breakdown.

Below are the model parameters for this type of diode:

name parameter units default

----------------------------------------------------------- Ron resistance in forward conduction Ohm 1. Roff resistance when off Ohm 1/gmin Vfwd forward threshold voltage V 0. to enter conduction Vrev reverse breakdown voltage V infin. Rrev breakdown impedance Ohm Ron

This idealized model is used if any of Ron, Roff, Vfwd, Vrev or Rrev is specified in the model.

so

..model DID D(Ron=1u)

Gives you a diode with zero forward drop, 1u forward resistance, infinite breakdown etc

Don't know if Pspice can do this. Perhaps Jim can tell you if he is in the mood.

DNA

Reply to
Genome

As above is one way. I guess you could tamper with the model parameters, but why bother? You have to be careful with "ideal"... it can give you great convergence heartburn.

[snip C-crap :-]

What I gave is standard PSpice behavioral syntax ;-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson
[snip]

{(ABS(I(V1))+I(V1))/2}

Remove {} which simply designate, in PSpice notation, "containing an expression":

(ABS(I(V1))+I(V1))/2

Drop the Div2 (and associated parentheses):

ABS(I(V1))+I(V1)

ABS(I(V1)) is the absolute value of I(V1) and is always positive

When I(V1) is negative, the net expression value is ZERO

When I(V1) is positive, the net expression value is 2*I(V1)

Thus the need for Div2

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Yeah. I thought about ABS but didn't think to subtract out the current to get the cancellation. Thanks

--
Best Regards,
Mike
Reply to
Active8

Oh yes, and you know that's wrong.

What's the way of implementing ideal diode models in Pspice?

Otherwise you have to write....

Begin G1, G1 nodeP 0 Value select case MOD(I(V1)) Case MOD(I(V1))>0 G1.Value=I(V1) Case MOD(I(V1))

Reply to
Genome

OK, so I'm seriously licking my wounds here.

{(ABS(I(V1))+I(V1))/2}

I copy and paste that in LTspice and it works. I get a half wave rectified sine wave.

I am totally tub bolloxed.

ABS(I(V1))-I(V1)/2

NUH, I just deleted some pairs of parenthesises.

Gives me what I was moaning about.

Charb

Bluh,

Now then Jim!

As it were, as it were....

Just take us gently through the

{(ABS(I(V1))+I(V1))/2}

Function

DNA

Reply to
Genome

Oh shit.

After two hours of staring at it I just twigged it.

Now the above makes sense.

Thanks Jim, maybe.

DNA

Reply to
Genome

No, Burp.

That is truly monster.

DNA

Reply to
Genome

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.