LTspiceIV Models
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#46
Modified triodes library, simplified diode model for forward grid conduction, to better avoid bombing out on 'timestep too small' error (the more complex or 'real' diode model can do this quite often I've found)
All valves zip:
http://www.audio-talk.co.uk/phpBB2/view ... 1641#41641
All valves zip:
http://www.audio-talk.co.uk/phpBB2/view ... 1641#41641
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#47
I've started going through the tetrodes models in order to make the screen currents more realistic. Most have the same 'blanket' parameter number that derives screen current ('Kg2=4500'), I've found that in simulations this is most likely to cause unrealistically low voltage drops across screen resistors, when you know full well that it has to be much more than that. Makes it impossible to choose a resistor value that approximates to anything like real life.
The reason why this hasn't been gone into in any detail before (by anybody) is because there is no published data showing comprehensive screen current curves like you have for anodes, so I've adopted the compromise of going by the 'typical operating conditions' tables; i.e. literally simulate a test rig (like, a valve tester) with variable anode, screen and grid Voltages, set them up as per table and measure the currents. The Kg2 number can then be tweaked until the screen current is as per what the table says. Parallel to this the anode current has to be monitored simultaneously so it also stays within the limits.
The reason why this hasn't been gone into in any detail before (by anybody) is because there is no published data showing comprehensive screen current curves like you have for anodes, so I've adopted the compromise of going by the 'typical operating conditions' tables; i.e. literally simulate a test rig (like, a valve tester) with variable anode, screen and grid Voltages, set them up as per table and measure the currents. The Kg2 number can then be tweaked until the screen current is as per what the table says. Parallel to this the anode current has to be monitored simultaneously so it also stays within the limits.
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#51
Apparently uramp means:
uramp(x)
returns: x if x > 0, else 0
Might be done with if, like
I=if(V(1,3)+.5, 0.00396 * sqrt(V(1,3), 0)
Might it be easier to download SwitcherCAD (LTspice), don't cost nuffink
uramp(x)
returns: x if x > 0, else 0
Might be done with if, like
I=if(V(1,3)+.5, 0.00396 * sqrt(V(1,3), 0)
Might it be easier to download SwitcherCAD (LTspice), don't cost nuffink
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#52
Re: how to display DC operating point on the schematic instead of another window
From: yahoo LTspice group
> Here is short version of it again.
>
> Draw the schematic as usual.
>
> Run the simulation.
>
> Right mouse-click into an empty area.
> Choose View -> Place .op Data Label on the net where you
> want have the DC-voltage shown.
>
> See the text below if you are interested in a few more details.
>
> Best regards,
> Helmut
>
>
> > > Hello xuexucheng,
> > >
> > > If you have a newer version of LTspice IV, you can have the
> > > voltage of the DC-operating point on nets in the schematic.
> > > It works in .OP, .TRAN, .AC, .TF and .NOISE analysis.
> > >
> > > Run the simulation.
> > >
> > > Right mouse-click into an empty area.
> > > Choose View -> Place .op Data Label
> > >
> > > If you have only a .OP analysis,
> > > just clicking on a net is sufficient
> > > to place a Data Label.
The label text can be an expression. To get rid of fractions in the below I've got: int($) for the 337V & 170V, and int($*100)/100 for the 1.32V (thus keeping 2 decimal places)
From: yahoo LTspice group
> Here is short version of it again.
>
> Draw the schematic as usual.
>
> Run the simulation.
>
> Right mouse-click into an empty area.
> Choose View -> Place .op Data Label on the net where you
> want have the DC-voltage shown.
>
> See the text below if you are interested in a few more details.
>
> Best regards,
> Helmut
>
>
> > > Hello xuexucheng,
> > >
> > > If you have a newer version of LTspice IV, you can have the
> > > voltage of the DC-operating point on nets in the schematic.
> > > It works in .OP, .TRAN, .AC, .TF and .NOISE analysis.
> > >
> > > Run the simulation.
> > >
> > > Right mouse-click into an empty area.
> > > Choose View -> Place .op Data Label
> > >
> > > If you have only a .OP analysis,
> > > just clicking on a net is sufficient
> > > to place a Data Label.
The label text can be an expression. To get rid of fractions in the below I've got: int($) for the 337V & 170V, and int($*100)/100 for the 1.32V (thus keeping 2 decimal places)
- Attachments
-
- dc-op-points-demo.gif (6.36 KiB) Viewed 37162 times
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#54
From the Yahoo! LTspice group
Using the Voltage controlled switch element (component 'SW') as a Voltage regulator.
Yes really!
Expoiting the switch's feature to exhibit a variable resistance as opposed to the usual abrupt on/off resistance changes.
The original cited was for a 5V reg., I have modified it to operate as the adjustable IC type LM317, LM338
Schematic of model below:
Using the Voltage controlled switch element (component 'SW') as a Voltage regulator.
Yes really!
Expoiting the switch's feature to exhibit a variable resistance as opposed to the usual abrupt on/off resistance changes.
The original cited was for a 5V reg., I have modified it to operate as the adjustable IC type LM317, LM338
Schematic of model below:
- Attachments
-
- regulator_with_switch2_adjustable.gif (3.79 KiB) Viewed 36378 times
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#55
Model file (LM317.lib):
Only real difference is the current limit, Ilimit (2.2A for LM317, 6A for LM338), it will do that too.
Code: Select all
* Node 1 -> In
* Node 2 -> Adj
* Node 3 -> Out
.subckt LM317 1 2 3
S1 3 1 2 3 reg
I1 1 2 50µ load
.model reg sw level=2 Vt=-1.24 Vh=-4m Ron=.1 Roff=1G Ilimit=2.2 Vser=0.2
.ends
.subckt LM338 1 2 3
S1 3 1 2 3 reg
I1 1 2 50µ load
.model reg sw level=2 Vt=-1.24 Vh=-4m Ron=.1 Roff=1G Ilimit=6.0 Vser=0.2
.ends
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#56
The symbol looks like as attached:
node 1 = IN (left)
node 2 - GND (bottom)
node 3 = OUT (right)
Symbol Attribute Editor Window (Ctrl+A):
SpiceModel = LM317
Description = Adjustable Voltage Regulator.
ModelFile = LM317.lib
Attribute Add Window (Ctrl+W):
Select: SpiceModel to display which IC on the symbol.
Acknowledgement:
LTspice Yahoo group - A precise 5V voltage regulator after an idea from analogspiceman.
See message #59352. It's for simulation only.
node 1 = IN (left)
node 2 - GND (bottom)
node 3 = OUT (right)
Symbol Attribute Editor Window (Ctrl+A):
SpiceModel = LM317
Description = Adjustable Voltage Regulator.
ModelFile = LM317.lib
Attribute Add Window (Ctrl+W):
Select: SpiceModel to display which IC on the symbol.
Acknowledgement:
LTspice Yahoo group - A precise 5V voltage regulator after an idea from analogspiceman.
See message #59352. It's for simulation only.
- Attachments
-
- lm317-338_asy.gif (2.31 KiB) Viewed 36374 times
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#57
Appendix ~ I've been playing with this in a PSU design and it works really well. So far!
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#58
Modified Valves ZIP
Tweaks and things during the last year or so, includes Koren's original models list, and choice of valve symbol shapes, latest is all standardised on the lozenge pentode style.
Last update as edit date.
Tweaks and things during the last year or so, includes Koren's original models list, and choice of valve symbol shapes, latest is all standardised on the lozenge pentode style.
Last update as edit date.
- Attachments
-
- All_Valves2.zip
- (40.05 KiB) Downloaded 2392 times
Last edited by Mike H on Sun Mar 24, 2013 7:56 pm, edited 4 times in total.
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- Mike H
- Amstrad Tower of Power
- Posts: 20286
- Joined: Sat Oct 04, 2008 5:38 pm
- Location: The Fens
- Contact:
#59
Generic Op-Amp Models
Created from:
eCircuit Center - Op Amp Models for SPICE
http://www.ecircuitcenter.com/OpModels/OpampModels.htm
... and converted from SPICE to LTspice
Usage: plain symbol linking same name .asc schematic as a sub.
5 types -
1. base generic. Output swing is not limited.
2. as 1 with transistor LTP input. More closely resembles the typical models created by op-amp manufacturers.
3. as 2, output swing limited to 1.5V below supply rails.
4. as 3, plus output current limiting (10mA).
5. as 4, plus current drain on supply rails equal to output current sink. If this is important else is the slowest of the lot.
Includes NE5532 model based on 3 (only).
Created from:
eCircuit Center - Op Amp Models for SPICE
http://www.ecircuitcenter.com/OpModels/OpampModels.htm
... and converted from SPICE to LTspice
Usage: plain symbol linking same name .asc schematic as a sub.
5 types -
1. base generic. Output swing is not limited.
2. as 1 with transistor LTP input. More closely resembles the typical models created by op-amp manufacturers.
3. as 2, output swing limited to 1.5V below supply rails.
4. as 3, plus output current limiting (10mA).
5. as 4, plus current drain on supply rails equal to output current sink. If this is important else is the slowest of the lot.
Includes NE5532 model based on 3 (only).
- Attachments
-
- Generic Op-Amp Models.zip
- (14.66 KiB) Downloaded 2284 times
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
- IslandPink
- Amstrad Tower of Power
- Posts: 10041
- Joined: Tue May 29, 2007 7:01 pm
- Location: Denbigh, N.Wales
#60 Re: LTspiceIV Models
This thread has oodles of valve models, constantly being updated :
http://www.diyaudio.com/forums/tubes-va ... odels.html
http://www.diyaudio.com/forums/tubes-va ... odels.html
"Once you find out ... the Circumstances ; then you can go out"