¿ªÔÆÌåÓý

Date

Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 
Edited

Bernt wrote:

The .sym files still have the old path from my other installation as in:

SYMATTR ModelFile %HOMEPATH%\Documents\LTspiceXVII\lib\sym\AutoGenerated\INA826.lib

I am confused now what that must change to for this to work and to work on different installations of LTspice

To be portable, the "ModelFile" attribute must NOT have any of the "path".? In MS-Windows, the path is the directory structure, leading up to the filename itself.? (Some would say that it includes the filename, but I'm ignoring that for purposes of this.)? Your ModelFile attributes should have ONLY the filename.ext, so in this case it should be "INA826.lib" and nothing else.

To change that, DO NOT open the symbol file in any text editor where you see lines starting with "SYMATTR".? Don't do that.? Instead, open that symbol file in LTspice itself.? If you double-click on the symbol file, it should open it directly in LTspice.? Once it is open in LTspice, then press Ctrl-A (hold down the Ctrl key and click the A key), and then edit only the ModelFile attribute, which is the bottom line.? Edit that line so that the contents have just the filename.ext (such as INA826.lib).? Then click OK, and then Save.

Tony offered another alternative, which is to delete the ModelFile attribute completely, and add a ".lib filename.ext" to each schematic that uses that symbol.? That works perfectly well too.? It is very slightly more complicated because you would need to edit the schematics to add the ".lib" command to every schematic that uses that symbol.

Either way, the purpose of the ".lib" command and of the ModelFile attribute are the same.? Both Either of them loads the model file into LTspice for the simulation.? Your schematic and symbol combination should use one or the other, not both.

Andy


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

I don't know if this was answered.? Bernt wrote, "However, what I do not understand is how to then place my symbols. In the Place component, it only shows stuff from the .lib (which includes Autogenerated) but nothing else so it is not possible to see other folders and components there."

When you first open the (Add) Component menu, it has things on the top half and the bottom half of its pop-up window.? At the very top of that pop-up menu, there is a choice for "Top Directory".? That is how you can select between the current directory (the one that holds the schematic you are editing), and LTspice's libraries.

Click that to change it to the current directory, and now the bottom half should show only the symbols in the current directory.? If you have not yet saved the current schematic, you may need to save it once first, so that LTspice knows what is the current directory.

Click that "Top Directory" choice at the top of the pop-up window again, when you want to change it back to LTspice's libraries.

The only choices for the "Top Directory" are LTspice's libraries, the user-defined library path that you optionally told LTspice about, and the current working directory with the schematic being edited.

Andy


Re: Issue: missing value for inductance

 

Elien,

It is also worth noting -

In your circuit, where you have a resistor in series with your inductors L1-LM and L2-LM, you can move the resistors into the inductors by setting Rser = 1.3 ohms on each of those two inductors.? And set LM's Rser to 0.? You don't have to do that, but it can make the simulation run a little faster, and perhaps slightly more accurately than having a separate inductor and resistor in series.

On the other hand, you might want to keep the inductance and the resistance separate on the schematic, especially if the schematic will be published for others to see.

Regarding Jerry Lee Marcel's note about simulating coupled inductors using the TEE (or T) equivalent circuit, I agree, but some people just need to do it the other way.? Some schools teach the TEE equivalent as if it is the way to analyze coupled inductors, without recognizing the fact that SPICE does not need to do that.? To each his/her own.

Andy


Re: Issue: missing value for inductance

 

Elien,

Unrelated to your question - Be aware of these things, which might affect your simulation's apparent accuracy:
  1. Non-coupled inductors in LTspice have a default series resistance of 1 m = 0.001 ohm.? If you want ideal inductors, right-click on each inductor and write "0" for the Series Resistance.
  2. LTspice uses waveform compression, which is a lossy compression (you can't restore the un-compressed original) but it can significantly reduce the size of the .RAW output file.? All results, including .MEAS command calculations, are affected by that.? If you don't want any impairment from that, disable waveform compression by adding ".options plotwinsize=0" to your schematics.

Footnote about waveform compression:? The .tran command in this simulation specified a Maximum Timestep of 1e-8 = 10 ns.? Yet LTspice compresses the saved waveforms with a larger effective timestep of around 250 ns.? If you really need the timestep to be 10 ns or less, always disable the waveform compression.? Internally, LTspice simulates the circuit with 10 ns or smaller timesteps, but it might not save the simulated waveforms with increments that small, unless you disable the compression.

Andy


Re: Issue: missing value for inductance

 

¿ªÔÆÌåÓý

When you define k<1, you don't need to define the mutual inductance, nor the leakage inductances. LTspice does it automatically.

Le 16/05/2024 ¨¤ 22:56, Elien a ¨¦crit?:

Hello,

I want to simulate a mutual inductance LM in function of a coupling factor k. The mutual inductance also depends on the self-inductances L1 and L2, which are constant values.
The T-circuit gives an error message due to a missing value for the inductance L1-LM.

Can someone help me find a solution to simulate this circuit??

Please see the files in the folder:
IPT_LM

Thanks in advance,
Elien


Re: Issue: missing value for inductance

 

Elien wrote about an error "Missing inductance value".? There were several other errors too.

Elien, the reason is simple, but might not be obvious.? You used parameters named L1 and L2, but you never defined them.? You are probably thinking, "But wait, I did define them."? Well, not exactly.? You had these two lines:
. param L1 = 159.2?
. param L2 = 159.2?
which LOOK as if they have the dot-commands ".param".? But they did not.? There is a space between the dot (period) and the word "param", so they were seen by LTspice as non-commands.

Edit both lines to get rid of that extra space, and all will be well.

Andy


Issue: missing value for inductance

 

Hello,

I want to simulate a mutual inductance LM in function of a coupling factor k. The mutual inductance also depends on the self-inductances L1 and L2, which are constant values.
The T-circuit gives an error message due to a missing value for the inductance L1-LM.

Can someone help me find a solution to simulate this circuit??

Please see the files in the folder:
IPT_LM

Thanks in advance,
Elien


Re: Stride in undocumented bus notation

 

¿ªÔÆÌåÓý

Please be advised that anyone can ask me for special access for this Undocumented page.? You have to have an account with ltwiki.org, then request this special access.? I had to limit this page because the late analogspiceman spent a lot of time getting this page right.? Thanks for supporting the wiki.

--

Lewis Lineberger



Re: How does one create a common mode choke with manufacturers information?

 

Got? it!? Thanks to all of you!


Re: How does one create a common mode choke with manufacturers information?

 

Right click on each of the common mode chokes.
The Value line should be blank.
Delete whatever you have typed on this line.
The file will run just fine.
Mike


Re: How does one create a common mode choke with manufacturers information?

 

I uploaded the .asc file to the temp directory.? ?Look for the file name Grid Filter 30m CMC BAL.asc.??
This is the WE-CMBNC.lib file:

* Manufacturer: ? ? ? ? ? Wurth Elektronik?
* Kinds: ? ? ? ? ? ? ? ? ?Common Mode Power Line Choke Nanocrystalline?
* Matchcode: ? ? ? ? ? ? ?WE-CMBNC?
* Library Type: ? ? ? ? ? Pspice
* Version: ? ? ? ? ? ? ? ?rev22a
* Created/modified by: ? ?Ella ? ? ?
* Date and Time: ? ? ? ? ?2022-05-26
* Team: ? ? ? ? ? ? ? ? ? eiSos EDA Service ?
* Contact: ? ? ? ? ? ? ? ?libraries@...

* Copyright(C) 2022 W¨¹rth Elektronik eiSos GmbH & Co. KG
* All Rights Reserved.

* Disclaimer: While W¨¹rth Elektronik eiSos has made every reasonable effort to ensure the accuracy
* of the simulation models provided, W¨¹rth Elektronik eiSos does not guarantee the exemption of error on
* the simulation models, nor does W¨¹rth Elektronik eiSos guarantee that the simulation model is current.
* W¨¹rth Elektronik eiSos reserves the right to make any adjustments at any time without notice.
* W¨¹rth Elektronik eiSos expressly disclaims all implied warranties regarding this simulation model.

***
.subckt CMBNC_S_7448021230_30m 1 2 3 4
X1 ?1 ?2 ?3 ?4 ?CMBNC ?PARAMS:
+ ?Rdc=0.28640000030398369
+ ?ck=2.01574164786085E-11
+ ?DC4=1.86840939855187E-13
+ ?DL4=1.59136141064664E-06
+ ?DR5=704.48291015625
+ ?DR6=6556.29541015625
+ ?DC3=3.03443589699803E-11
+ ?DL3=5.20691649519289E-12
+ ?DR3=18.1167163848877
+ ?DR4=766605248
+ ?L1=0.0208004059202671051
+ ?L2=0.00845833602175117
+ ?L3=0.00101479911245406
+ ?L4=0.00159177230671048
+ ?RS1=7904.43017578125
+ ?RS2=8743.3896484375
+ ?RS3=85064.4453125
+ ?RS4=19577.373046875
+ ?C1=0.92000004580825E-11
+ ?R2=0.104000002145767
+ ?C2=5.06184820501076E-07
+ ?L5=0.000372471375158057
+ ?RS5=302.954345703125
.ends CMBNC_S_7448021230_30m
***


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

Project schematics located in:
C:\Users\username\Documents\LTspiceXVII\Bernt_Projects\Force Sensor

symbols located:
C:\Users\username\Documents\LTspiceXVII\Bernt_Projects\Force Sensor\Lib

and then .lib dols located in separate folders under the above such as:
C:\Users\username\Documents\LTspiceXVII\Bernt_Projects\Force Sensor\Lib\INA826

The .sym files still have the old path from my other installation as in:

SYMATTR ModelFile %HOMEPATH%\Documents\LTspiceXVII\lib\sym\AutoGenerated\INA826.lib

I am confused now what that must change to for this to work and to work on different installations of LTspice


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

In addition to previous comment:
I have now created a subfolder inside my project (.asc) folder called "Lib" and placed all the components in there as in lib files and symbol files.
What should the path now become in each symbol file for the .lib file?



Regards
Bernt


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

I understand that.
However, what I do not understand is how to then place my symbols. In the Place component, it only shows stuff from the .lib (which includes Autogenerated) but nothing else so it is not possible to see other folders and components there.
?

Bernt


Re: Import LTspice simbol model of UCC5304 problem

 

john23,

I am uncertain how to answer this.

You referred to Figure 12 of a datasheet for the lower two transistors, which is a GaN RF power amp.? I downloaded the datasheet from alldatasheet.com that you referred to.? Figure 12 is a plot of LSG (large signal gain?) versus frequency and Vd.? What does that have to do with how you used it?? Is there a different figure that you meant to use?

I am somewhat uncomfortable replacing the two RF transistors with two 3 ohm resistors.? I think what you wish to simulate is the switching circuit that supplies switched power to the two RF transistors.? M1 (or M1 and M2) switches the DC power on and off to the RF transistors represented by M4 and M5, or by the 3 or 1.5 ohm resistors which are the effective DC load that the RF transistors present to M1.? I think it's likely that the effective DC load presented by the RF transistors can vary a lot, so 3 ohms would be a VERY rough approximation.? And of course you also have the filtering of the switched supply voltage.

So, if I assume that the source pin of M1 represents the switched "DC" power to the RF transistors, then I think I understand your connection from the "VSS" pin of the UCC5304 to the source of M1.? Now, everything on that half of the UCC5304 should be referenced to that pin and that net.? The power source to the UCC5304's "VDD" pin also should be referenced to its "VSS" pin.? If it is not, imagine what happens when your circuit drives M1 to switch ON.? Its source pin pulls up towards +45 V.? Now you have a problem, because the UCC5304's VSS pin is around +40 V, but its VDD pin is only at +10 V (relative to the same Ground), so it has backwards DC power and it doesn't work.

I don't know how well the UCC5304 functions when its two halves move up and down fast.? That's something you need to worry about, to make sure that it works.? Also, there is likely more to the RF part of the circuit, such as supply filtering and bypassing.

What is the question (the "riddle")?? Is there still a question?? In your earlier circuit, you did not have a connection or path from the UCC5304's "VSS" pin to ground.? But in the photo 11.png, it does.

Andy


Re: How does one create a common mode choke with manufacturers information?

 

Checking back through the messages, I think this question was about the Wurth S_7448021230_30m common-mode choke.

I threw together a dummy simulation with that choke in it, and it ran without error.? Definitely not the "Unknown subcircuit" error you say you had.

Just to be clear -- you did select the part number by right-clicking on the symbol, and then selecting it from the choices in the drop-down menu after SpiceModel -- right?

That is also what the part selector in LTspice tells you:

WE-CMBNC Common Mode Power Line Choke Nanocrystalline
After inserting, right-click on the symbol to select the part number.
Please note disclaimer in lib/sub/Contrib/Wurth/WE-CMBNC.lib.

If you edited the text line and typed in anything, that would be wrong, and likely would cause that error to occur.

You also wrote, "I do have the statement .lib WE-CMBNC.lib in the schematic."? ?Why did you do that?? Dis? someone suggest that you should do that?? It should not be there.? Delete it.? Wurth's symbol for the choke takes care of including the correct model file.

Andy


Re: How does one create a common mode choke with manufacturers information?

 

¿ªÔÆÌåÓý

Did you upload your .ASC? If not,we can't help much. There are already two .ASCs for common-mode chokes in the Temp folder. Search for 'common'.

On 2024-05-15 17:31, De Mattei, Robert T. J. via groups.io wrote:
Thanks for the info!? I did find the model and got the correct P/N in my circuit.? However, when I ran the sim, I got an error message saying "Unknown subcircuit called in" and referenced the part number of the Common Mode Choke.? I do have the statement .lib WE-CMBNC.lib in the schematic.
--
OOO - Own Opinions Only
Best wishes
John Woodgate, Rayleigh, Essex UK
Keep trying

Virus-free.


Re: How does one create a common mode choke with manufacturers information?

 

re: "Unknown subcircuit called in"

I guess that means you did something wrong.? Your subcircuit call (the netlist line starting with X) refers to a subcircuit name, which was never defined.? Maybe the names don't match.? Maybe the subcircuit definition is missing.

There is also some chance that the subcircuit call has a confusing arrangement of nodenames and parameters, so that it causes LTspice to use the wrong one as the subcircuit's name.

I don't recall if we had any information (or enough information) about what you are simulating, so that we can offer more advice.? We need to see what you tried to simulate, before we can see where your mistake is.? Can you upload it?? If you do, make sure to check the instructions for uploading simulations to the group's Files.

Andy


Re: How does one create a common mode choke with manufacturers information?

 

Thanks for the info!? I did find the model and got the correct P/N in my circuit.? However, when I ran the sim, I got an error message saying "Unknown subcircuit called in" and referenced the part number of the Common Mode Choke.? I do have the statement .lib WE-CMBNC.lib in the schematic.


Stride in undocumented bus notation

 

Hi,

I'm not sure if it is already known, and it is definitely not mentioned in the "Undocumented LTspice" Wiki page:

I have a 8x8 matrix of signals and wanted to split off a bus by column.
signal[0],signal[8]...signal[56]

As a wild stab in the dark, I tried signal[0:63:8] to add a "stride" to the matrix notation. And it worked!
The dialog box prompt is correct:
"signal[0:63:8]" is a the name of a BUS with 8 conductors: signal[0], signal[8], signal[16], signal[24], signal[32], signal[40],signal[48], and signal[56]. Is this what you want?
Is there anyone that has edit permissions and would like to add this to the wiki?

Kind regards,
Hendrik