LMP8481-S Spice model Import


 

Hi all,
 
I pulled the Pspice model for the LMP8481-S from TI's website. I know these models are normally encrypted, but it appears in this case the model is not. Please correct me if that's wrong.
 
I imported the model into LTSpice and I did move the pins around a bit in the Symbol to get the schematic diagram flow that I wanted.
 
However, I am having issues simulating with this circuit. I get all kinds of errors when I try to run a transient analysis and I'm not sure how to decode them.
 
Any help is appreciated.
 
Here are my files:
 
Thanks,
-May


 

May wrote:
I pulled the Pspice model for the LMP8481-S from TI's website. I know these models are normally encrypted, but it appears in this case the model is not. Please correct me if that's wrong.
 
You're not wrong - except that most of their models are not encrypted.  Only some of them are.
 
FYI, you can make things "better" if you edit the symbol's ModelFile attribute, to remove the whole path to the filename, leaving just the filename (lmp8481_S.lib) there.  That might not work for you, but it helps the rest of us.  None of us has the same file structure as you do on your computer, so we can't use your symbol the way it stands.
 
However, I am having issues simulating with this circuit. I get all kinds of errors when I try to run a transient analysis and I'm not sure how to decode them.
 
Can you give us a hint what "all kinds of errors" means?
 
I saw one about a shorted capacitor.  It's inside the part's SPICE model, so that would be their mistake.  It is really a warning, not an error; it's telling you that it was shorted so it was removed from the model.  Ignore it.
 
There were about 8 errors about floating pins connected to current sources.  That CAN be an issue, but it might not be.  These days, many SPICE models are created that way but with feedback that make it a non-issue.  It's a way to create things like noiseless resistors and similar elements.  I glanced at a couple of them in the netlist and I'd say they are OK.
 
Other than those, did you get the desired result?  It's quite possible that every one of the errors and warnings can be ignored because they are "expected".  Now, I say that without having actually examined this model carefully, so I could be wrong about it.  But on first glance, it looks like it might be OK.
 
You can modify their model to make those errors go away (e.g., adding big resistors here and there), but it is not likely to alter the waveforms if you do it right.
 
Andy
 
 


 

Two things I see at first:

1. Your V5 never turns on. Left-click on it and you will see Ton is set to 0.

2. The symbol has the original pathway coded into its model file. Open the .ASY in LTspice,  right-click and go to Attributes =>  Edit attributes and look at the Model File line. Delete everything except LMP8481_S. Save the symbol. Go to the .ASC, delete the symbol and insert the new version.

There may be other things wrong: it is not even quite clear where the output of the .ASC is, but I can't spend more time on it. Others may well help.

On 2024-10-28 20:52, May wrote:
Hi all,
 
I pulled the Pspice model for the LMP8481-S from TI's website. I know these models are normally encrypted, but it appears in this case the model is not. Please correct me if that's wrong.
 
I imported the model into LTSpice and I did move the pins around a bit in the Symbol to get the schematic diagram flow that I wanted.
 
However, I am having issues simulating with this circuit. I get all kinds of errors when I try to run a transient analysis and I'm not sure how to decode them.
 
Any help is appreciated.
 
Here are my files:
 
Thanks,
-May
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.www.avg.com


 

John Woodgate wrote:

1. Your V5 never turns on. Left-click on it and you will see Ton is set to 0.

 
No, that's OK.  Setting Ton = 0 is how to make a sawtooth or triangle wave.  Plot its waveform and you'll see.
 
But the other problem is that the current through S1 has nowhere to go.  It's switching on and off, but that doesn't really do anything because there isn't any current to switch.  I'm assuming that the circuit's designer either knows that already, or knows how to change it if it needs changing.
 
Andy
 


 

Andy-
 
Thanks for your help!
 
Here is the log of errors that I'm getting when I try to run the simulation on the file I included in my first post:
 
 
Thanks!
-M


 
Змінено

May wrote:
Here is the log of errors that I'm getting when I try to run the simulation on the file I included in my first post:
...
 
That does look essentially the same as the error/warning messages I saw when I ran the simulation.  I had several more warnings at the bottom about "Ignoring empty pin currents", but I think you might not have enabled saving subcircuit voltages and currents in your LTspice.  That might come back to bite you some time later, so consider changing that.  (Settings / Control Panel > Save Defaults > Save Subcircuit Node Voltages and Save Subcircuit Device Currents.)
 
(Note for future use:  Screenshots of text are not particularly helpful.  The best, easiest way to show some text, is the text itself - not a picture of it.  Don't worry; I've seen worse, where someone used a 1+ Megabyte Microsoft Powerpoint (PPT) file with an embedded photograph of a few dozen text words.  Talk about extreme bloat, and misuse of computer tools!)
 
Consider your simulation's error messages, which all look like this:
    ERROR: Node U1:_U2:32 is floating and connected to current source G:U1:_U2:RGN2
Here are the devices leading to that error message, in the model library file:
    GRgn2         32         33         VALUE { V(32,33)/ 1E6}
    GRgnd3        31         32         VALUE { V(31,32)/ 1E6}
What are those?  Each one is a controlled current source, whose current equals the voltage across its own terminals divided by 1E6.  This is equivalent to a 1 Meg resistor.  It might as well be a 1 Meg resistor, except that resistors in SPICE have noise.  If they used a regular 1 Meg resistor and if you were to do a .NOISE analysis some day, you would see the noise added by this pseudo-resistor which is not a real resistor in the chip so it shouldn't add to the amp's noise.  That resistor (those resistors), like many other elements in the SPICE model, is part of the macromodel that models the amplifier's characteristics or behavior, while not being a physical part of the amplifier.  I am guessing that they (T.I.) did it this way so that they would not ruin the noise output for anyone who does a .NOISE analysis.  And probably for no other reason than that.
 
FYI, there is another way to make noiseless resistors in LTspice (and PSpice and some other SPICE programs), which is to add the undocumented keyword "noiseless" to the resistor element, like this:
    Rgn2        32         33         1E6    NOISELESS
    Rgnd3        31         32         1E6    NOISELESS
But the keyword "noiseless" might not work in all flavors of SPICE.  So the model's creator may have chosen to use the current source pseudo-resistor instead, because all flavors of SPICE have controlled current sources, making it usable in all SPICE variants.
 
So far, there is no cause for alarm, no reason to have an error.  But the next question is, where do those controlled current sources go?  Node 32 is the junction of the two current sources (or, the junction of two 1 Meg pseudo-resistors), and is used to control a controlled voltage source, and a capacitor to ground, and that's it.  That is a topology problem for SPICE.  The capacitor doesn't count for DC.  Technically, two current source should never be in series (just as two ideal voltage sources should never be in parallel) - except for the fact that these two represent resistors, so it is actually two pseudo-resistors in series.  Resistors in series are good, current sources in series are not.  But LTspice doesn't know they behave like linear resistors.  So it flags it as a possible error.  It is not a fatal error, and it proceeds with the simulation.
 
In other words, I am convinced we can ignore that ERROR.
 
That is one of the eight ERRORs listed there.  The other seven look just like it, so I'm guessing all eight are similar and can be ignored.  (But I did not visually check that.  Maybe that is an exercise left for the user.)
 
The two WARNINGS after it can also be ignored.  They have two voltage sources (E_E1 and E_E2) that generate new voltages, which go nowhere and are not used.  Perhaps they were diagnostic tools added by the model's creator.  In any event, it's not an error; it is only a warning that you had a node with nothing else connected to it.  LTspice reminds you in case it means you forgot something.
 
Regards,
Andy
 


 

D'oh! on the uploading an image of the errors, instead of just the text! Next time I will be more cognizant.
 
Thank you so much for the thorough analysis of the errors/warnings this simulation was throwing!
 
I didn't realize that it still completed the simulation in spite of the errors!
 
So, I'm trying to play around with that 3.5-Ohm resistor to adjust the amount of current through the sense resistor to verify that the LMP8481-S output tracks the input voltage.
 
No matter what I set that resistor to, the LMP8481-S gives ~4.5V on its output. : (
 
Any thoughts?


 

May wrote:
No matter what I set that resistor to, the LMP8481-S gives ~4.5V on its output. : (
 
Check to see if that amp is saturated.  It may be trying to drive high, and the output swings as high as it can go, which might be 4.5 V.  That is my first guess.
 
The -S version has a voltage gain of 60.  When R2 = 3.5 ohms, the sensed differential input voltage is 0.159 volts.  Multiplied by 60, that would be 9.54 volts, which is well beyond the capability of a 5v-powered amp to deliver, so its output probably saturates.  How that interacts with the two REF inputs, I don't know, because I haven't read the whole datasheet yet.
 
I think you need to make R2's value much larger, say 20 ohms or more, to see any difference.  At 50 ohms, the amp is out of saturation and the output voltage drops below 4.5 V.
 
Also, check to make sure that the part's input common-mode voltage range can exceed its power supply voltage.  Maybe it can.  Some amps fail to operate if you do that.
 
Andy
 


 

Also, I don't know if it's relevant, but why do you have a 150 ohm resistor in series with the VCC pin, and no bypass capacitor after it?  In many circuits, that could cause stability problems.
 
Andy
 
 


 

And also not relevant - but why are you trying to switch the current through an inductor?  Inductors try to keep their current constant.  If you try switching it OFF like that, they might try to generate megavolts until an arc forms across the switch.
 
But that's not the only problem with the stuff to the right of the LMP8481.
 
Fortunately there isn't any current flowing through L1, so there is nothing to switch ON and OFF.
 
Andy
 


 

Also, check to make sure that the part's input common-mode voltage range can exceed its power supply voltage.  Maybe it can.  Some amps fail to operate if you do that.
 
I found the following snippet in the datasheet:
The power supply range is 4.5 V to 76 V, and the common-mode input voltage range
is capable of 4.0-V to 76-V operation. The supply voltage and common-mode range are completely independent
of each other, which causes the LMP848x-Q1 supply voltage to be extremely flexible because the LMP848x-Q1
supply voltage can be greater than, equal to, or less than the load source voltage, and allows the device to be
powered from the system supply or the load supply voltage.
The LMP8480-Q1 and LMP8481-Q1 supply voltage does not have to be larger than the load source voltage. A
76-V load source voltage with a 5-V supply voltage is perfectly acceptable.
So I think it's okay to power this device off 5V with a 28V source?
 
I'm struggling to wrap my head around your comments regarding saturation. 
I think you need to make R2's value much larger, say 20 ohms or more, to see any difference.  At 50 ohms, the amp is out of saturation and the output voltage drops below 4.5 V.
 
If I set the 3.5ohm resistor to 7 ohms or even 14 ohms, I would expect the amplifier to be able to respond to that; the output voltage is not exceeded. What am I missing here??


 

May wrote:
I found the following snippet in the datasheet:
The power supply range is 4.5 V to 76 V, and the common-mode input voltage range
is capable of 4.0-V to 76-V operation. The supply voltage and common-mode range are completely independent
of each other, which causes the LMP848x-Q1 supply voltage to be extremely flexible because the LMP848x-Q1
supply voltage can be greater than, equal to, or less than the load source voltage, and allows the device to be
powered from the system supply or the load supply voltage.
The LMP8480-Q1 and LMP8481-Q1 supply voltage does not have to be larger than the load source voltage. A
76-V load source voltage with a 5-V supply voltage is perfectly acceptable.
So I think it's okay to power this device off 5V with a 28V source?
 
Because it has an unusual input stage, I think that it probably is.  But you need to carefully interpret what they wrote.  If there were conditions on the common-mode range, it would be different.  But its input stage is unconventional.
 
I'm struggling to wrap my head around your comments regarding saturation. 
I think you need to make R2's value much larger, say 20 ohms or more, to see any difference.  At 50 ohms, the amp is out of saturation and the output voltage drops below 4.5 V.
 
If I set the 3.5ohm resistor to 7 ohms or even 14 ohms, I would expect the amplifier to be able to respond to that; the output voltage is not exceeded. What am I missing here??
 
Let's look at that.
 
The ideal output voltage = 2.5 + 60 * (V(rsp) - V(rsn)), until it saturates (clips).  With a 5 V supply, the maximum output swing is 2.5 V in either direction.  But the output is not rail-to-rail and it might saturate at 2.0 V swing from nominal if the supply voltage is fixed at 5.000; even less if the supply voltage is low (which it will be half the time).
 
Working backwards from the output, a differential input voltage of 2.0 / 60 = 33 mV could saturate the output.
 
At the input, with R2 = 3.5 ohms, your differential input voltage was 150 mV which is much more than 33 mV.  150 mV times 60 = 9.55 V, plus the 2.5 V offset = 12.05 V.  The IC is incapable of driving +12.05 V from only a 5 V supply.
 
If the maximum differential input voltage for linearity is around 33 mV across R1 = 20 mOhm, and with V1 = 28 V, the smallest R2 that keeps it linear is about 16.8 ohms.  14 ohms can be too small.  R2 might be as small as 13.4 ohms, but only if the IC can swing fully to the rail.  The datasheet says it can't.  See Vomax.
 
Andy
 
 


 

you may use wrong model for simulation.
 
the model you shared has the information at the beginning of the file:
 
* Date:             2012-02-17
* Model Type:       ALL IN ONE
* Simulator:        PSPICE
* Simulator Version: 16.2.0.p001
* Datasheet:        SNVS829E –MARCH 1999–REVISED FEBRUARY 2017
* EVM Order Number: N/A 
* EVM Users Guide:  N/A
* Model Version:    2.0
 
 
so, it is a pspice model.
you can download the spice model at the download page shown below and give a try or just use TINA from TI


 

On Sat, Nov 2, 2024 at 09:47 AM, F.an wrote:
you may use wrong model for simulation.
...
so, it is a pspice model.
 
The vast majority of SPICE models on the web are labeled PSpice, because that is how they tested it.  LTspice is fully compatible with most SPICE models including those written for PSpice.
 
I think this was the correct model.  I saw nothing about it that would indicate it would not work in LTspice.  Parts of it were not made as well as they should have been (which is characteristic of the vast majority of vendor-provided SPICE models), but nothing was wrong for LTspice.
 
you can download the spice model at the download page shown below and give a try or just use TINA from TI
 
You tried to attach (embed) some sort of file or graphic within your message.  NEVER DO THAT!  Your attachment was stripped.  Please read again the instructions on this group's webpage.
 
At T.I.'s webpage for the part, they have two ZIP files containing SPICE models.  One is labeled for PSpice and the other is labeled for TINA-TI.  The models inside them are identical to one another.  (Aside from the Comments, but those don't matter.)
 
Some TINA-TI modes are actually SPICE models, but many are not, they are for TINA-TI only and can not be used by any other simulator.  Most "PSpice" models are fine in LTspice - except Encrypted ones.  This was not Encrypted.  (If it were, the simulation would have gotten nowhere.)
 
Andy
 


 

But the output is not rail-to-rail and it might saturate at 2.0 V swing from nominal if the supply voltage is fixed at 5.000; even less if the supply voltage is low (which it will be half the time).
 
The datasheet says it can't.  See Vomax.
 
Thank you SO MUCH, Andy! You are such a lifesaver. I was combing the datasheet to see whether it was rail-to-rail and could not find it!