Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: Tips on defining an LTSPICE VII .subckt block requested
Samudra Haque [TTLLC]
¿ªÔÆÌåÓýThanks Andy for your guidance. I should be able to proceed forward based upon your explanation. I¡¯ll also see about joining the group properly to discuss LTspice issues. ? Samudra Haque N3RDX ? From: LTspice@... <LTspice@...>
Sent: Tuesday, December 25, 2018 1:20 AM To: [LTspice] group <LTspice@...> Subject: Re: [LTspice] Tips on defining an LTSPICE VII .subckt block requested ? ? Hague, ? Against my better judgment, I left your message intact because I think it is necessary to understand your question and what was wrong. ? .
Disclaimer: The information contained in this communication may be privileged, and is intended for the use of the above named addressee(s). If you are not the intended recipient(s), do not use or rely upon it. Instead, please inform the sender and then delete it. Thank you. ? |
Re: Strange character in error log - "¡ì"
I experimented with the new IGBT model and found it to be very bad.? Unlike the VDMOS model, which works very well and can be adjusted to match the datasheet characteristics of most parts, the new IGBT model is not realistic, cannot be made to match a real part's datasheet and has serious convergence issues.? I would recommend that it not be used for any serious work. I think it was introduced for compatibility with PSpice.? I wonder if the PSpice model is just as bad?? (My guess would be yes.) Mike has shown no interest in fixing the model at all.? A much more realistic and robust model can be made by combining a VDMOS and PNP with a base-emitter resistor.? Trouble is that very few users have the ability to create such a model. ---In LTspice@..., <helmutsennewald@...> wrote : Thanks for sharing an example with .model NIGBT. We have seen only a very few so far. |
Re: Any method to convert LTspice schematic to autocad .dwg or .dxf format ?
¿ªÔÆÌåÓýA web search (Google) for 'convert emf to dwg'
shows a number of hits. You can export schematics from LTspice
as .emf files. Best wishes John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-12-25 10:07,
ericsson.sunshine@... [LTspice] wrote:
? |
Re: Strange character in error log - "¡ì"
Hello Carl, Thanks for sharing an example with .model NIGBT. We have seen only a very few so far. The ¡ì character will be added, if a device defined with .model has not the correct character in the first place of its reference designator. A NIGBT needs a Z for the first character, Z10 and Z11 instead of Q10 and Q11. Your circuit design needs two decoupling capacitors (to GND) in? a real circuit. After I added these to capacitors, the simulation will run without any "tricks". See my .TRAN. I wonder why you set your PULSE source with 10 pulses. I removed this number 10. Most people add here a number, because they think it's needed for the correct syntax. Standard SPICE doesn't have this parameter at all. That's whjy I highly recommend to ommit this number from PULSE(). Have you checked the primary ripple curernt of your output transformer? It's a decade too high, because the primary inductance with only a few micro-Henry is far too low. I have uploaded a new circuit with these changes - "_funny character in error log.asc". Best regards, Helmut |
Any method to convert LTspice schematic to autocad .dwg or .dxf format ?
Hi, : May I ask a question , is there any method to convert LTspice schematic to autocad .dwg or .dxf format ? I hope to convert those tasks, since sometimes after I spent time running simulations in LTspice, I will need those paper works to 'migrate' them to others format, one most popular is the autocad (which could support many manually adjustable features), I used to sketch the circuitry in an older software, but unfortunately , that software wasn't supported anymore and couldn't be ran in newer OS systems (eg: win10), and I didn't find any sketch circuitry software could plot higher resolution pixels yet, most of them have larger dots resolutions, which makes me couldn't put more components in a scaled size paper. Or could you give some clues of those kind of software which could plot beautiful (higher pixel resolution, dots density is high, eg: more wires could placed between 2 nearby components) diagram. Thank you very much. Have a nice day! |
Re: Strange character in error log - "¡ì"
Hi. Cshunt = 1pF solves the problem. This adds 1pF to each node. In this particular case, this can be done because There are no subcircuits that would damage it. See what happens in the power supply!I changed the circuit a little bit so that the input pulses would not be wasted (they were not full-fledged on the gates). ? Bordodynov. 25.12.2018, 08:15, "Andy ai.egrps@... [LTspice]" <ltspice@...>:
|
Re: Tips on defining an LTSPICE VII .subckt block requested
Hague, Against my better judgment, I left your message intact because I think it is necessary to understand your question and what was wrong. First off, you made some mistakes here because you attached files to your message to the group, which you should never do in this group.? Please read again the information on the group's main webpage, and in the email message you received when you joined the group.? The things you attached to your message should have been uploaded to the group's "Files" and "Photos" areas, instead of being attached to (or pasted into) your message.? Some of it survived intact.? Some of it did not.? It appears that you had two JPEG image files which were stripped off by Yahoo's servers and didn't go anywhere. Never attach or paste files, pictures, etc. to messages in this group.? (Well, very short pieces of SPICE Netlists are OK in some circumstances.) However, I also see that you joined this group via email -- and that presents a problem.? You don't have access to the group's Files and Photos areas.? You have to join the group from the webpage (click on "Join Group" button) in order to get web access to the group's features. But I digress. From what I see, it looks like you tried to treat an LTspice schematic file (*.ASC) itself as a subcircuit.? Schematic files are not subcircuits.? Schematic files describe how the schematic looks on your screen.? You can generate a SPICE subcircuit from a schematic -- but not by using the schematic file itself. As I understand it, you made a schematic of a DBM, and now you want to use it in another schematic and simulation.? You can create an LTspice symbol for the DBM schematic by clicking Hierarchy > "Open this Sheet's Symbol" while the schematic is open in LTspice.? I'm not sure where your other symbol "dib_balanced_mixer.asy" comes from, but you should not use that as a symbol for the schematic you have.? (By the way, the schematic shouldn't have a .TRAN statement on it, if you plan to use it in this manner.) Now, when you open another schematic (not this one!) in the same directory, press F2 or click the Add Component button.? At the top of the pop-up window there is a "Top Directory" with two choices.? One is LTspice's library.? The other is the current directory of the schematic you're editing.? Choose that one.? Now the newly-created symbol should be there, for you to add to the new schematic. The "Version 4" and "SHEET" lines are the first two lines of LTspice schematic files (*.asc).? They are not parts of subcircuits, and they make no sense there.? LTspice users rarely ever need to deal with the contents of the LTspice schematic files themselves. If you really need a subcircuit file from your schematic. one way to do that is to right-click in an open area of the schematic and choose View > SPICE Netlist.? Copy that to another file, edit out the things that don't belong (e.g., ".tran ...", ".backanno", and ".end"), and add ".SUBCKT ..." and ".ENDS" around it.? Most LTspice users do not need to do that because LTspice's schematic hierarchy makes it automatic.? But if you do make a subcircuit, you would use the .INCLUDE command to add it to another schematic.? Well, you could create a symbol for that subcircuit; but if you're going to do that, you might as well create the symbol from the schematic and avoid the intermediate subcircuit file that wasn't needed. By the way, there is no LTspice VII.? It's LTspice XVII.? That's 17, as in 2017, which is more or less when it was introduced (actually 2016 but who's counting).? Also, it's LTspice, not LTSPICE. Regards, Andy |
Re: Strange character in error log - "¡ì"
Carl, The special character "¡ì" is a character inserted by LTspice, one that is unlikely to be used by anyone.? There are places where LTspice needs to concatenate names together.? For example, when it "flattens" the netlist (expanding subcircuits down into individual components).? Also when it names some components, combining the component's "Prefix" with your chosen component name.? (The same thing would happen if you had a resistor with a name that doesn't begin with "R".)??In order to combine names like this, LTspice uses?the?"¡ì"?character to tell you that this is where they joined. In your circuit, "³ú¡ì±ç11" refers to Q11 which is actually a Z element.? If you right-click in an open area of the schematic and go to View > SPICE Netlist, you'll see that the two IGBTs are in these two lines: ? ? Z¡ìq10 N001 N003 N004 IXGH60N60C2 ? ? Z¡ìq11 N004 N013 N014 IXGH60N60C2 Very simply, you chose to name them Q10 and Q11, but their names in the Netlist MUST begin with a Z.? SPICE uses the first character to identify what kind of component it is.? So LTspice concatenates the prefix Z with the Q11, inserting the ¡ì between them to signify that this was something LTspice added. I did not get the error that you did at 24.4ps into the simulation.? However, when I ran it, the simulation got unreasonably slow around 16us into the simulation, and I eventually terminated it.? Are you sure this was the same schematic that had that error and that error message? I don't know where the "nint" or "m1" come from, in your error message.? They are nowhere in the Netlist.? Perhaps they are internal to LTspice. Regards, Andy |
Tips on defining an LTSPICE VII .subckt block requested
Samudra Haque [TTLLC]
Hello LTSPICE group , I am trying to define a necessary block for a generic double balanced mixer (.asc) file contents below. I tried to make a subcircuit block to use in a complex LTSPICE VII schematic on Windows 10, and can get the symbol and the block definition in the Autogenerated folder, to use in a new schematic. When I attach two sine wave voltage sources, I get a funny unhelpful error. But when I am running the original .asc file from which the .sub file was developed, all is fine as that circuit has all the voltage sources and connections properly (Schematic screenshot attached).
What am I doing wrong? Files and text content included here for review - thank you for your time. I'm thinking that there needs to be better documentation on this issue. Are the "Version 4" and "SHEET" lines in the subcircuit file needed for the .SUBCKT definition? Is this documented somewhere? This is my first attempt at creating blocks. Thanks and happy new year to you all, and also season's greetings. Haque In LTspiceXVII\lib\sub\TTLLC_dbm.sub ..SUBCKT dbl_balance_mixer LO RF IF Version 4 SHEET 1 880 680 WIRE -64 -16 -176 -16 WIRE 48 -16 0 -16 WIRE 128 -16 48 -16 WIRE -32 48 -80 48 WIRE 48 48 48 -16 WIRE 48 48 32 48 WIRE -416 64 -448 64 WIRE -272 64 -336 64 WIRE 256 64 224 64 WIRE 416 64 336 64 WIRE -176 80 -176 64 WIRE -144 80 -176 80 WIRE 128 80 128 64 WIRE 128 80 64 80 WIRE -272 96 -272 64 WIRE -176 96 -176 80 WIRE 128 96 128 80 WIRE 224 96 224 64 WIRE -64 128 -64 -16 WIRE -32 128 -64 128 WIRE 48 128 32 128 WIRE -80 176 -80 48 WIRE -80 176 -176 176 WIRE -64 176 -80 176 WIRE 48 176 48 128 WIRE 48 176 0 176 WIRE 128 176 48 176 WIRE -272 192 -272 176 WIRE 224 192 224 176 WIRE -144 256 -144 80 WIRE -144 256 -448 256 WIRE -112 256 -144 256 WIRE 64 256 64 80 WIRE 64 256 -32 256 WIRE 128 256 64 256 WIRE 128 288 128 256 FLAG 128 288 0 FLAG -272 192 0 FLAG 224 192 0 FLAG -448 64 LO IOPIN -448 64 In FLAG 416 64 RF IOPIN 416 64 In FLAG -448 256 IF IOPIN -448 256 Out SYMBOL ind2 -256 192 R180 WINDOW 0 36 80 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName L1 SYMATTR Value 10mH SYMATTR Type ind SYMBOL ind2 -160 80 R180 WINDOW 0 36 80 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName L2 SYMATTR Value 10mH SYMATTR Type ind SYMBOL ind2 -160 192 R180 WINDOW 0 36 80 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName L3 SYMATTR Value 10mH SYMATTR Type ind SYMBOL res -16 240 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R1 SYMATTR Value 50 SYMBOL schottky -64 0 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName D1 SYMATTR Value 1N5818 SYMBOL schottky -64 192 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName D2 SYMATTR Value 1N5818 SYMBOL schottky 32 32 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName D3 SYMATTR Value 1N5818 SYMBOL schottky 32 112 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName D4 SYMATTR Value 1N5818 SYMBOL ind2 144 80 R180 WINDOW 0 36 80 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName L4 SYMATTR Value 10mH SYMATTR Type ind SYMBOL ind2 144 192 R180 WINDOW 0 36 80 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName L5 SYMATTR Value 10mH SYMATTR Type ind SYMBOL ind2 240 192 R180 WINDOW 0 36 80 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName L6 SYMATTR Value 10mH SYMATTR Type ind SYMBOL res -320 48 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R2 SYMATTR Value 50 SYMBOL res 352 48 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 50 TEXT -312 -40 Left 2 !K1 L1 L2 L3 1 TEXT 80 -40 Left 2 !K2 L4 L5 L6 1 TEXT -456 272 Left 2 !.options plotwinsize=0 TEXT -456 304 Left 2 !.tran 0 .1ms 0 0.01us TEXT -136 -104 Left 2 ;Double Balanced Mixer ..ENDS In LTspiceXVII\lib\sym\AutoGenerated\dbl_balanced_mixer.asy Version 4 SymbolType BLOCK RECTANGLE Normal -48 -40 48 40 WINDOW 0 0 -40 Bottom 2 WINDOW 3 0 40 Top 2 SYMATTR Value dbl_balance_mixer SYMATTR Prefix X SYMATTR ModelFile TTLLC_dbm.sub SYMATTR Description TTLLC Double Balanced Mixer Block PIN -48 16 LEFT 8 PINATTR PinName LO PINATTR SpiceOrder 1 PIN -48 -16 LEFT 8 PINATTR PinName RF PINATTR SpiceOrder 2 PIN 48 0 RIGHT 8 PINATTR PinName IF PINATTR SpiceOrder 3 [cid:image001.jpg@...] [cid:image006.jpg@...] Disclaimer: The information contained in this communication may be privileged, and is intended for the use of the above named addressee(s). If you are not the intended recipient(s), do not use or rely upon it. Instead, please inform the sender and then delete it. Thank you. |
Strange character in error log - "¡ì"
I'm running a simulation with an IGBT.? I get an error log entry "Fatal Error: Analysis:? Time step too small; time = 2.44141e-011, timestep = 1.25e-019: trouble with nint:³ú¡ì±ç11-instance m1:³ú¡ì±ç11".? I'm trying to understand the special character (¡ì) in the error message.? I could not find this character in searches of the group messages.??I'll upload the file "funny character in error log.asc" in case anybody wants to see if they get the same error. I've added .options for cshunt and noopiter and am running the alternate solver. Any suggestions will be appreciated. thanks, |
Re: How to include component values in LTSpice trace formulas
Thanks a lot that seems to do the trick! (needs further testing, but probably works)
I've read the Func dot command page in the wiki several times, but didn't understand it correctly apparently... Just if anyone cares, I implemented the same functions (without curly braces) in b sources to evaluate the functions I was writing. So I was confused as why the same expression worked for I=... in b-sources but not for the Q=.... statement in C. Anyway thanks again! |
Re: How to include component values in LTSpice trace formulas
On 12/24/18 8:03 AM, hagaaar587plus7@... [LTspice] wrote:
?It is best to upload files to the temp directory of this group rather than externally. (and the code example could have just be placed as in-line text in the message. Have you read the description of the .func statement here: which says: To invoke parameter substitution and expression evaluation with these user-defined functions, enclose the expression in curly braces. The enclosed expression will be replaced with the floating-point value. Now, I am not sure that this will work for you case. -- Richard Damon |
Re: How to include component values in LTSpice trace formulas
First, sorry for "hijacking". In Message 3 (which led me here), John cited the help and the "general nonlinear capacitor" function of the C part in the schematic editor.
So again, my question is, if it's not possible to use .func statements inside the Q=... definition of a C part in the schematic editor. ("general nonlinear capacitance" according to help) I've uploaded pictures of a minimal example including the resulting error message ("No such function", although it is listed in the netlist) here: |
Re: Vout always 0 volts with negative input values
"Hello ? ? you know how the code was written so in ltspice ?? ? ? ?I'm grateful that you've helped me ? ? ?Thanks
On Monday, December 24, 2018, 1:51:48 AM GMT+3:30, analogspiceman@... [LTspice] wrote:
?
Think about what happens when the input exceeds the range of table values.? Read the Help file on the behavior of tables. ---In LTspice@..., wrote : Hello, I am trying to get a little deeper into LTSpice capabilities and I am having a problem? understanding why, when using a voltage dependent voltage source with Table values, the output plots 0 volts for negative values of input. I am using a 1Vpp sine wave as an input.? I have uploaded the spice value into the temp folder. Any help is appreciated. Thank you, Joe McCarron |
Re: FFT
"Hello
? ? you know how the code was written so in ltspice ?? ? ? ?I'm grateful that you've helped me ? ? ?Thanks
On Monday, December 24, 2018, 9:07:37 AM GMT+3:30, Andy ai.egrps@... [LTspice] wrote:
?
There may be some disagreement about the origins of LTspice, whether or not it was at all based on Berkeley's SPICE code, or if it is a complete write from scratch.? It's my understanding (based in part on something Mike Engelhardt wrote for Linear Tech) that LTspice/SwitcherCAD was not derived from Berkeley SPICE, but that the code was his own creation, based in part on the algorithms that Berkeley SPICE used, considerably enhanced by Mike's own algorithms and coding skills.? That's why it runs faster than other SPICE programs.? I think it's safe to say that so much of it has been written anew, that no or almost no Berkeley SPICE code remains. Mike uses whatever language(s) he found helpful.? In my opinion, it's highly unlikely that he ever used FORTRAN in LTspice.? In my opinion, it's probable that he uses (at least) C and Assembly.? Comparisons with the languages used by other SPICE programs (including Berkeley SPICE) are probably meaningless.? We also know that LTspice writes some code on-the-fly.? What might that be?? I don't know, but I'm guessing machine object code. The PC version of LTspice today appears to call some Microsoft runtime functions.? That observation is based on feedback about some of the errors that happen, as well as the numeric results one gets when numbers overflow (e.g., 1..#QNAN, 1.#IND, 1.#INF). LTspice's name originally did not even include the acronym "SPICE".? It was "SwitcherCAD" -- with "LTspice" becoming a nickname.? At some point, Mike gave in and officially renamed it to LTspice. Regards, Andy |
Re: How to include component values in LTSpice trace formulas
hagaaar587plus7 wrote: ? ? "I have a follow-up question" I'm not sure why this is a follow-up question.? It doesn't follow-up on a question you already asked, and it seems to be unrelated to the original question.??When you send a message, please use a Subject line that fits the question.? What you did is called "hijacking" another message thread.? (I'm leaving the subject line the same for now, so you can find this reply near your question.) ? ? "I'm trying to model a transistor equivalent circuit and would like to use a user defined function for the nonlinear capacitance Q=... definition." Which capacitance would that be? Looking at bipolar transistors, there are half a dozen capacitance parameters.? Looking at MOSFETs, the number is a little greater. ? ? "Either I'm really missing something or this is not possible at all!?" I don't know.? What did you try?? What was the result?? Are you trying to introduce a function into one of the parameters of a .MODEL statement?? Are you trying to add a nonlinear capacitor to a transistor's .SUBCKT, or just connected to the transistor on your schematic? I would guess that trying to make a .MODEL parameter voltage-dependent is probably futile.? I'm pretty sure that .MODEL statement parameters must be constants during a simulation (even though the underlying elements may vary according to their formulas).? I'm pretty sure that nonlinear capacitor elements, either within or not within subcircuits, ought to work fine. Consider uploading an example of what you tried that didn't work. Regards, Andy |
Re: Vout always 0 volts with negative input values
Joe, FYI, your uploaded schematic had nothing to do with the question you asked. ? ? "I have uploaded the spice value into the temp folder." Your schematic doesn't have comments either.? Your reply said there were comments.? I'm guessing you accidentally uploaded the wrong schematic file. Regards, Andy |
Re: FFT
There may be some disagreement about the origins of LTspice, whether or not it was at all based on Berkeley's SPICE code, or if it is a complete write from scratch.? It's my understanding (based in part on something Mike Engelhardt wrote for Linear Tech) that LTspice/SwitcherCAD was not derived from Berkeley SPICE, but that the code was his own creation, based in part on the algorithms that Berkeley SPICE used, considerably enhanced by Mike's own algorithms and coding skills.? That's why it runs faster than other SPICE programs.? I think it's safe to say that so much of it has been written anew, that no or almost no Berkeley SPICE code remains. Mike uses whatever language(s) he found helpful.? In my opinion, it's highly unlikely that he ever used FORTRAN in LTspice.? In my opinion, it's probable that he uses (at least) C and Assembly.? Comparisons with the languages used by other SPICE programs (including Berkeley SPICE) are probably meaningless.? We also know that LTspice writes some code on-the-fly.? What might that be?? I don't know, but I'm guessing machine object code. The PC version of LTspice today appears to call some Microsoft runtime functions.? That observation is based on feedback about some of the errors that happen, as well as the numeric results one gets when numbers overflow (e.g., 1.#QNAN, 1.#IND, 1.#INF). LTspice's name originally did not even include the acronym "SPICE".? It was "SwitcherCAD" -- with "LTspice" becoming a nickname.? At some point, Mike gave in and officially renamed it to LTspice. Regards, Andy |
Re: Vout always 0 volts with negative input values
Hello Jo, > table= ((0,0),(-0.25,0.5),(-0.5,0.75),(-0.75,0.90),(-1,1)) The input values have to be defined in increasing order and I miss the positive input-values in your table. I recommend to use a bv-source. Please try the following. V=table(V(vin),(-1,1),(-0.75,0.90),(-0.5,0.75),(-0.25,0.5),(0,0), 0.25,-0.5, 0.5,-0.75, 0.75,-0.9, 1,-1) Best regards, Helmut |