Author Topic: Better LTSpice TL072 model?  (Read 24175 times)

0 Members and 1 Guest are viewing this topic.

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Better LTSpice TL072 model?
« on: August 06, 2016, 07:26:57 pm »
I know the TL072's output doesn't include the positive rail, so I decided to add a current source to help pull up to +V. I wondered why this didn't work in the simulation but going by the internal TL072 schematic it should.

I decided to laboriously draw the entire TL072 schematic into LTSpice (I had to guess some of the resistor values) and used it with the pull-up current source and it worked fine. The output can reach the +V rail by nearly 30mV, which should be near enough for my application.

The TL072 model. The output still can only get to to +V-1.5V


Using the internal schematic, the output can get to +V-31mV


If there isn't a better model out there, is it possible to create one from the internal schematic?
« Last Edit: August 06, 2016, 07:29:40 pm by Hero999 »
 
The following users thanked this post: HackedFridgeMagnet

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Better LTSpice TL072 model?
« Reply #1 on: August 06, 2016, 10:46:05 pm »
Quote
Better LTSpice TL072 model?

Better in what sense?
================================
https://dannyelectronics.wordpress.com/
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2731
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #2 on: August 06, 2016, 10:53:40 pm »
Hi,
The TL072 is a Texas Instruments chip, where did the LTspice model come from? It is not supplied with LTspice.

Have you tried this in TINA-TI?

Regards,

Jay_Diddy_B

 

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #3 on: August 07, 2016, 05:51:47 pm »
Quote
Better LTSpice TL072 model?

Better in what sense?
More accurate.

Hi,
The TL072 is a Texas Instruments chip, where did the LTspice model come from? It is not supplied with LTspice.
Here:http://ltwiki.org/?title=Components_Library_and_Circuits#Opamps

Quote
Have you tried this in TINA-TI?

Regards,

Jay_Diddy_B
No, I don't have TINA but would have thought it's the model which matters.

Is there an easy way to create a model from the circuit I posted?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Better LTSpice TL072 model?
« Reply #4 on: August 07, 2016, 08:39:27 pm »
Often, a comparator or op-amp model has the output clamped to a reasonable range.  And, yes, I've seen models for e.g. LM339 where the output is active driven the whole way, as if a decomp LM358.

Manufacturers don't like using complete transistor-level models for a few reasons:
1. Hiding IP.
2. It runs faster (maybe, unless convergence errors screw it up worse).
3. If we can make one, and adjust the parameters to fit most of our product line, we don't have to waste time dicking around with more models.  (Hence, comparators sometimes lacking faithful open-collector outputs..)

Even in the olden days, when they provided equivalent circuits, they didn't say what kind of transistors were used, nor how large.  There are a couple tricks in monolithic design that can't be reproduced easily in SPICE, nor expressed easily on a schematic (which is part of the reason you see confusing things like transistors having multiple emitters or collectors: it doesn't make sense from working with discretes, but it makes a lot of sense on the monolithic level).

MOS capacitors are notable, because unlike metallic capacitors, the capacitance varies with voltage (it's a MOSFET gate, sans FET).  These are commonly used for compensation, so expect the fT and gain to vary with supply voltage and temperature.  Canceling out these effects is a tricky part of design, and may be easily missed in a transistor-level model; even being able to measure the effects, and adjust the parameters to match results to poorly-documented datasheet parameters (like gain and fT vs. VCC and TEMP, if they provide any of these at all), is tricky.

Obviously(?), such fine detail is normally missed, or just approximated, in a behavioral model.  But it's up to the model designer to determine if that's good enough or not.

And so, you often have the case where the output voltage is a fixed Thevenin source (often with a current limiting circuit as well), and so doesn't behave like a real device where the output can be pulled closer to a rail using a resistor or CCS.

This goes for most digital sims of TTL logic too, I think.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Zero999

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Better LTSpice TL072 model?
« Reply #5 on: August 07, 2016, 08:42:17 pm »
Quote
More accurate.

the simulation is very accurate until you get to the extremes.

If you want your simulation to follow the actual circuit at the extremes, you don't understand the purpose of simulation.
================================
https://dannyelectronics.wordpress.com/
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11534
  • Country: my
  • reassessing directives...
Re: Better LTSpice TL072 model?
« Reply #6 on: August 07, 2016, 09:03:22 pm »
this is the TINA's model for TL072. i'm no spice expert, just thinking it might help, fwiw...

Code: [Select]
* TL072 OPERATIONAL AMPLIFIER "MACROMODEL" SUBCIRCUIT
* CREATED USING PARTS RELEASE 4.01 ON 06/16/89 AT 13:08
* (REV N/A)      SUPPLY VOLTAGE: +/-15V
* ------------------------------------------------------------------------
*|(C) Copyright Texas Instruments Incorporated 2007. All rights reserved. |
*|                                                                        |
*|This Model is designed as an aid for customers of Texas Instruments.    |
*|No warranties, either expressed or implied, with respect to this Model  |
*|or its fitness for a particular purpose is claimed by Texas Instruments |
*|or the author.  The Model is licensed solely on an "as is" basis.  The  |
*|entire risk as to its quality and performance is with the customer.     |
* ------------------------------------------------------------------------
* CONNECTIONS:   NON-INVERTING INPUT
*                | INVERTING INPUT
*                | | POSITIVE POWER SUPPLY
*                | | | NEGATIVE POWER SUPPLY
*                | | | | OUTPUT
*                | | | | |
.SUBCKT TL072    1 2 3 4 5
*
C1   11 12 3.498E-12
C2    6  7 15.00E-12
DC    5 53 DX
DE   54  5 DX
DLP  90 91 DX
DLN  92 90 DX
DP    4  3 DX
EGND 99  0 POLY(2) (3,0) (4,0) 0 .5 .5
FB    7 99 POLY(5) VB VC VE VLP VLN 0 4.715E6 -5E6 5E6 5E6 -5E6
GA    6  0 11 12 282.8E-6
GCM   0  6 10 99 8.942E-9
ISS   3 10 DC 195.0E-6
HLIM 90  0 VLIM 1K
J1   11  2 10 JX
J2   12  1 10 JX
R2    6  9 100.0E3
RD1   4 11 3.536E3
RD2   4 12 3.536E3
RO1   8  5 150
RO2   7 99 150
RP    3  4 2.143E3
RSS  10 99 1.026E6
VB    9  0 DC 0
VC    3 53 DC 2.200
VE   54  4 DC 2.200
VLIM  7  8 DC 0
VLP  91  0 DC 25
VLN   0 92 DC 25
.MODEL DX D(IS=800.0E-18)
.MODEL JX PJF(IS=15.00E-12 BETA=270.1E-6 VTO=-1)
.ENDS
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #7 on: August 07, 2016, 09:43:19 pm »
Quote
More accurate.

the simulation is very accurate until you get to the extremes.

If you want your simulation to follow the actual circuit at the extremes, you don't understand the purpose of simulation.
I'm not getting into any extremes. I'm using the op-amp well within its intended operating parameters so it should give a reasonably accurate result.

this is the TINA's model for TL072. i'm no spice expert, just thinking it might help, fwiw...
Yes, it's the same.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Better LTSpice TL072 model?
« Reply #8 on: August 08, 2016, 12:44:31 am »
Quote
I'm not getting into any extremes.

if I read you right, you seem to be complaining about the simulation of the equivalent circuit swing too close to the rail vs. the real thing. To me, that's not an area of practical value for a simulator.

Quote
I'm using the op-amp well within its intended operating parameters so it should give a reasonably accurate result.

I guess it depends on your definition of "reasonably accurate", or "intended operating parameters". In my book, anyone pushing an opamp so close to its clipping point is a little bit nuts.
================================
https://dannyelectronics.wordpress.com/
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2731
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #9 on: August 08, 2016, 01:32:18 am »
Hi group,

I have constructed a LTspice model from the supplied model. This lets you probe the internal circuitry. You can see that the model supplied by TI has been simplified a lot. Only the input stage is modelled at the transistor level.
This level of simplification is bound to lead to some error in modeling outside of normal operation.

The positive clipping is done with the voltage source VC and the diode DC. The negative clipping is done with VE and DE.
With this arrangement a pullup or pulldown is also limited.

The positive output is limited to V+ minus VC plus 1 diode drop.


Here is the model:



And the test results:




I have attached the model for those playing along at home.

Regards,

Jay_Diddy_B
« Last Edit: August 08, 2016, 02:50:58 am by Jay_Diddy_B »
 
The following users thanked this post: Zero999, BravoV

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2731
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #10 on: August 08, 2016, 10:01:55 am »
Hi,

I have done a little research into this op-amp model.



The model is described in TI application note: sboa027

Link: http://www.ti.com/lit/an/sboa027/sboa027.pdf

This model was described by G. R. Boyle, D. O. Pederson, B. M. Cohn and J. E. Solomon    in 'Macromodeling of Integrated Circuit Operational Amplifiers' published in IEEE Journal of Solid-State Circuits, Vol. SC-9, # 6, December 1974.


The full version of this paper can be found here:

http://my.ece.msstate.edu/faculty/winton/classes/ece3434/supplements/OpampMacroModels.pdf


Most of the macromodels used are based on this approach.

Linear Technology AN48,  'Using the LTC Op Amp Macromodels' by Walt Jung,  gives more information (than you would ever want to know) into op-amp modeling.

Link: http://cds.linear.com/docs/en/application-note/an48.pdf

The Boyle model of the 741:



includes the same method for clamping the output voltage.


So it seems the use of this simple method for limiting the output voltage is wide spread, and not just limited to the TL072 model from TI.

It seems that the original poster has already created a better model, by making a transistor level model of the TL072.

By taking the model apart, it is easy to see why the standard macromodel did give the correct results in the OPs, application, trying to pull the output positive with a current source.

It worth pointing out that the supply currents on these macromodels is not accurate.

Regards,

Jay_Diddy_B



« Last Edit: August 08, 2016, 10:18:10 am by Jay_Diddy_B »
 
The following users thanked this post: Ian.M

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2731
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #11 on: August 08, 2016, 10:27:15 am »
Hi ,

Here is a test that will show some information about the op-amp model.

If I take the LT1013, supplied with LTspice and put in this simple test circuit:




And I look at the load current and the supply currents they are correct:




If I do the same simulation with the TI TL072 model:



I get the wrong answer:




This is one of the limitations of the Boyle macromodel.

Regards,

Jay_Diddy_B
 
The following users thanked this post: HackedFridgeMagnet

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #12 on: August 08, 2016, 09:27:56 pm »
Thanks for explaining to me the limitations of op-amp SPICE models. I didn't realize the output stage was simplified like that.

To those who don't think what I'm doing is a good idea: the LM358 does exactly the same thing to make the output stage go near the negative rail.
http://www.ti.com/lit/ds/symlink/lm158-n.pdf

Unfortunately there isn't a common, cheap op-amp which can run of 30V and work up to the positive rail, otherwise this wouldn't be necessary.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Better LTSpice TL072 model?
« Reply #13 on: August 08, 2016, 10:12:07 pm »
If you worry about going to the positive rail - something the tl0xx family can NOT do - put a npn on the output.
================================
https://dannyelectronics.wordpress.com/
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2731
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #14 on: August 08, 2016, 10:28:29 pm »
Hi,

Here is a little analysis on the current source proposed by Hero999.

LTspice Schematic:




Actually I have three almost identical circuits. The difference is the junction temperature of the output transistor.

Modelling Results




The modelling shows that the current value is dependent on the junction temperature of the transistors. This probably fine for this application, but it will not win any prizes for accuracy.

The current source has the ability to work very close to the rail, which is great here.

Regards,

Jay_Diddy_B

 

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #15 on: August 09, 2016, 08:05:02 am »
If you worry about going to the positive rail - something the tl0xx family can NOT do - put a npn on the output.
How would that help? Putting an NPN transistor on the output will only make it worse!

Hi,

Here is a little analysis on the current source proposed by Hero999.

Actually I have three almost identical circuits. The difference is the junction temperature of the output transistor.

The modelling shows that the current value is dependent on the junction temperature of the transistors. This probably fine for this application, but it will not win any prizes for accuracy.

The current source has the ability to work very close to the rail, which is great here.

Regards,

Jay_Diddy_B

Yes, I'm aware of the shortcomings of the current source I used and yes, being able to work close to the positive rail is the most important thing. The usual solutions such as emitter degradation resistors and adding a cascode will improve the stability but compromise on being able to work up to +V.
 

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #16 on: August 12, 2016, 10:41:02 pm »
It seems that the original poster has already created a better model, by making a transistor level model of the TL072.

The model I created may be fine at DC but it's not suitable for AC analysis. Here's the bode plot. I set Rin to 1R and Rf to 1Meg, to get the open loop response of the op-amp. The gain is much lower than that given on the data sheet, 49db vs 100dB and the roll-off and GBWP are wrong too.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2731
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #17 on: August 13, 2016, 12:42:25 am »
Hero999,

Can you post your model on the Forum?

The forum allows .asc files to be attached to the messages.

I will have a look to see if I can tell why the gain is low.

Regards,

Jay_Diddy_B


 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Better LTSpice TL072 model?
« Reply #18 on: August 13, 2016, 02:55:48 am »
Can your simulation of the TL07x and TL08x opamps show its input problem called "opamp phase inversion" where the output suddenly goes high if an input voltage gets within 3V or 4V from its negative supply voltage?
 

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #19 on: August 13, 2016, 01:18:00 pm »
Yes. the standard TL072 model does simulate phase inversion. I haven't tested my model though.

Another problem with going too near the negative rail is the bias currents increase dramatically, as the JFET gates become forward biased and many of people are unaware of this.

Hero999,

Can you post your model on the Forum?

The forum allows .asc files to be attached to the messages.

I will have a look to see if I can tell why the gain is low.

Regards,

Jay_Diddy_B
See attached.
 

Offline Zero999Topic starter

  • Super Contributor
  • ***
  • Posts: 19344
  • Country: gb
  • 0999
Re: Better LTSpice TL072 model?
« Reply #20 on: August 13, 2016, 05:13:23 pm »
Oh, I've realised where I went wrong. I used  ideal transistor models, rather than more realistic ones and there was no negative feedback at DC, so the op-amp amplified its own input offset and the output became saturated.

I've changed it to a non-inverting configuration, which is open loop at AC but unity gain at DC, due to the ridiculously high value of C2.

It's much closer to the values on the datasheet now.
« Last Edit: August 13, 2016, 05:16:39 pm by Hero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf