Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- LTspice
- Messages
Search
Re: subcircuit macromodel
--- In LTspice@..., Michael.Harris@... wrote:
Hello Mike, You should copy the model file into the folder of your schematic. Then add a .lib or .inc directive into your schematic. .lib name_of_model Please don't keep your own designs in any directory below the path C:\program files, because you don't have all the sometimes necessary permissions in this folder. Best regards, Helmut |
Re: LTspice Genealogy - The Heritage of Simulation Ubiquity
--- In LTspice@..., "analogspiceman" wrote:
Segueing back to the history of LTspice, I just found a very in-Here's the pertinent excerpt: "Free Downloadable Spice Tools Capture And Simulate Analog Circuits" by Don Tuite, Electronic Design, Oct. 23, 2012 (web edition). How Engelhardt Made LTspice Engelhardt is essentially the godfather of Linear Technology's freeware LTspice, and he has been supporting it and making it faster for 15 years. It all started because Bob Swanson and Bob Dobkin asked for a promotional tool. They got rather more than they bargained for because Engelhardt is the kind of engineer who obsesses about doing the job as thoroughly as possible. In this case, he wanted to make LTspice the world's fastest. He also wanted to give Linear's chip designers the opportunity to make the best models. He points to Linear's current-mode switching supplies as an example. "A current-mode switch-mode power supply is basically a glorified flip-flop," he begins. "Something sets the flop, turns on a power switch, and a current is monitored, and when a condition is met, the thing is reset." As long as the designer gets that flip-flop working correctly, gets the "reset" condition correctly, and has the right transfer function between the compensation of voltage and peak current, "basically everything else is a detail." This approach led Engelhardt to conclude that behavioral models are more useful than transistor-level models. "When we make analog models, we can avoid a bunch of numerical difficulties. When we get done setting up the system simultaneous equations that need to be solved, we have many fewer non-zero elements," he says. That makes it possible to solve the equations more rapidly. Sometimes, this comes down to a black-box approach. Returning to that switching-supply example, Engelhardt says, "The main flip-flop of current-mode switcher is basically about a dozen gates. That's because you have to accommodate a maximum duty cycle and you want to set it with an edge and reset it with an analog condition." In terms of a fine-granularity model, implementation typically takes about a dozen gates. Instead of modeling that, Linear has a native circuit element that does that, and its behavioral model simulates faster. "World's Fastest Spice" Engelhardt says his approach to accelerating Spice evolved in an interesting fashion, and it required breaking some rules. "In the '70s when you were writing a numerical solver, and you were being disciplined about it, you would always keep firmly in mind that the fastest way to complete something was to not compute it all but to put it in a lookup table," he says, but that wasn't for him. "That's the worst thing you can do. The computer CPU is hundreds of times faster than memory. Every time you use a lookup table, you have to fire those transistors in the RAM. You have to keep everything in cache," he says. Surprisingly for someone who is talking about designing a Spice to run on PCs, Engelhardt turned to Seymour Cray for inspiration. Engelhardt says that matrix solving is a classic application of parallel processing. "The Cray was about being able to take a row of a matrix, multiplying it all by one number and subtracting it from a number of rows," he says. Initially, in fact, Engelhardt had written a multi-threaded matrix solver and found it hundreds of times slower than a single-threaded matrix solver. So, he analyzed the actual time required to execute all of the instructions. He found that the timing of the different threads was, in a sense, chaotic. It turns out to be better to use one thread than multiple threads because the timing between threads means it's impossible to get any speed up from using multiple threads. That insight sent him to the literature about multi-threaded sparse-matrix solvers, which confirmed what he was finding out. "You can implement a multi-threaded solver that runs faster than a single-threaded solver if the matrix is exceedingly this sparse. But to solve the circuit matrix for a big IC, only a few parts out of a thousand are non-zero," he says. One problem was selling that concept in an engineering environment that expects a multi-threaded solver, so he told people that it was a multi-threaded solver, but the matrix itself was single threaded. That wasn't the end, though. He then thought he could write a faster matrix solver. Engelhardt's next discovery was related to the number of clock cycles it takes to perform a floating-point operation. Benchmarking the kind of 3-GHz processors that were in common use, he figured each clock was 300 ps, and three of them were required to execute one floating-point operation. "After the operation has been completed, if there's a long pipeline, you've got to wait to give the result to the processor at the end of the pipeline," he says. With Engelhardt's approach, the processor has to sit there and twiddle its thumbs for 900 ps before it can multiply two floating-point numbers to yield a 64-bit accurate result. He reckons that if you're counting floating-point operations, this makes a multithreaded architecture run at probably something like only 10% of its theoretical speed. So, he found a way to fix that—another technique based on the wise use of memory. The only important thing, he says, is how well you use the cache. "When you're coding in a high-level language, much of the time when we refer to `X,' it's not X, it's the address of X. And, the programming language doesn't know where X is stored. So you have to ping the transistors on the motherboard a few times to get the actual bit pattern that's your double-position number. And that's unavoidable," he explains. But here's the trick: "After you know where your data is, if you to look at all your addresses, at that point you could call an assembly language program that would access the data itself, keeping the pipeline full. And that's what LTspice does." Effectively, after it loads all the data, LTspice finds a strategy for pivoting the matrix and solving it. Then it accesses the assembly language program, assembles it, links it, and just calls each address to solve the matrix. "And that sped up the process by a factor of three," he says. When experienced circuit designers began to download LTspice and use it, they immediately noticed the difference from PSpice. They didn't see it immediately in terms of efficiency, but it was noticeably faster. However, Engelhardt also notes that LTspice is for circuit design. It's not intended to compete with an IC design tool such as Cadence's HSPICE. On the other hand, it's free, versus $1500. Of course, the implementation of the modeling is only part of the story. The other part is the models. Engelhardt says that modeling power MOSFETs is tricky. "Power MOSFETs are hard to simulate in most Spice programs because a power MOSFET is a vertical structure. It has a drain on the back of the die. In contrast, in modeling an IC, everything is lateral and on the same side of the silicon," he says. "We made a vertical MOSFET model where the gate and drain can be different sizes, and the channel is in between them, with the capacitance between the gate and the drain being dependent on whether the channel is enhancement or depletion. That charge model doesn't exist in other Spice programs," he says. He says it's important to have that capability. The need for it became obvious when it became clear that with other Spice programs, "Switching waveforms from power MOSFETs didn't match what you see on the bench, and that's because this gate-drain capacitance introduces a Miller effect that dominates the switching characteristics," he says. |
Re: LTspice Genealogy - The Heritage of Simulation Ubiquity
--- In LTspice@..., "Dick Benson" <w1qg@...> wrote:
The grandfather of all SPICE programs was a PhD thesis in oneA sincere thanks for your input, but most of what you write is only vaguely in the neighborhood of being factual (too bad you didn't bother to read the LTwiki page originally linked before posting so much misinformation). Your post may be a good example of how whisper circles are able to so quickly turn a true story into complete fantasy as it travels from person to person around the circle. For a bullet-list summary of the real facts, see: The *father* of all SPICE programs was called CANCER, Computer Analysis of Nonlinear Circuits, Excluding Radiation (SPICE was its immediate progeny). SPICE is an acronym for "Simulation Program with IC Emphasis." The first version of SPICE included built-in models for diodes, bipolar transistors, MOSFETs, and JFETs. MOSFET devices were not part of the original CANCER/SPICE code, but were only added to facilitate the teaching of a class. *Bipolar devices* were the original primary focus of SPICE. However, not too long after MOS devices were added to the mix, they did indeed take over the focus of device model development at Berkeley. SPICE was neither developed nor released in the mid to late 60s. CANCER began in 1969, but it was at least 1970 before the SPICE acronym was conceived and work on the code was started. (But thanks for playing.) Segueing back to the history of LTspice, I just found a very in- formative article that appeared in Electronic Design from October of last year. In the middle, it has a long section in which Mike Engelhardt recounts in a level of detail that I haven't seen elsewhere, the technical history of the development of LTspice. Amazingly, one of the links at the end of this article is to one of the first widely publicized announcements of LTspice (which was SwitcherCAD III back then) and which appeared in Electronic Design in May of 2001. (I'll have to link this from the wiki.) |
subcircuit macromodel
Hello.
I have recently downloaded Ltspice and am trying to run a simulation with a triode tube in but I get an error. I think this is because the triode needs a subcircuit macromodel that I need to load into the triode symbol. I am not sure how this is not and have looked in the help function but was unable to find anything. Does anyone know how I can add a triode subcircuit macromodel to my circuit or direct me to a help page where I can learn about it. Thanks for your help Kind Regards, Mike Harris |
Re: MPS4250
jean_claudeabeille
thank you, have a nice day;
toggle quoted message
Show quoted text
--- In LTspice@..., John Woodgate <jmw@...> wrote:
|
Re: POW(X,Y) doesn’t work in a function directive with the x**y syntax
Cadinot Didier
Thanks a lot Vlad.
Youve done a very good job Ive download your last update Your examples work now Didier De : LTspice@... [mailto:LTspice@...] De la part de imbvlad Envoy� : samedi 20 juillet 2013 07:48 � : LTspice@... Objet : [LTspice] Re: POW(X,Y) doesnt work in a function directive with the x**y syntax Hello Didier The reason for that is because of the syntax for .func, it should be by the book: .func f(x) {...} not f(x)=... There may also be some outdated symbols/libraries. I'll make the changes and update the files with the correct syntax later (but possibly much later). Vlad [Non-text portions of this message have been removed] |
Re: Adding INA105 psipce model into LTspice
Hi Helmut,
toggle quoted message
Show quoted text
I truly appreciate your help in resolving the problem. Thank you for attention in this matter and your kind co-operation. Best Regards, Shravan krishna --- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:
|
Re: MPS4250
John Woodgate
In message <ksikp7+rtse@...>, dated Mon, 22 Jul 2013, jean_claudeabeille <jean_claudeabeille@...> writes:
I read the first part of B. Cordell's book but didn't found there the explanations of the basic principles of the amp's operating mode. And that, after reading a lot in books and sites. Do you know where I can find this kind of information since everyboby here, like you, is saying it's off-topic - which I understand - while I realize that all these persons get the knowledge. I don't want to intrude any longer.This site is helpful, and the information is largely reliable: This one is mostly good, too: Unfortunately, there are many other sites that give much less reliable and useful information. -- OOO - Own Opinions Only. See www.jmwa.demon.co.uk Why is the stapler always empty just when you want it? John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK |
Re: MPS4250
jean_claudeabeille
Thank you, Andy, the answers were clear.
toggle quoted message
Show quoted text
I read the first part of B. Cordell's book but didn't found there the explanations of the basic principles of the amp's operating mode. And that, after reading a lot in books and sites. Do you know where I can find this kind of information since everyboby here, like you, is saying it's off-topic - which I understand - while I realize that all these persons get the knowledge. I don't want to intrude any longer. --- In LTspice@..., Andy <Andrew.Ingraham@...> wrote:
|
Re: Step Change to k of Coupled Inductors During Transient Analysis
Hi Bryan.
toggle quoted message
Show quoted text
Look Mutual_Inductance_K=F(V)_V2.zip in /TEMP In my case, made two related inductance of the four sub-schemes and four nonlinear resistors. The coupling coefficient is equal to inductance circuit voltage at node "K". The restriction 0 <K <1. I made "K" time dependent with PWL-source. "K" is changed from 0.9 to 0.1. Each consists of two inductor. Their sum remains constant, as shown by the current. Bordodynov. 20.07.2013, 11:06, "bryan.esteban@..." <bryan.esteban@...>: Greetings, |
Re: Step Change to k of Coupled Inductors During Transient Analysis
John,
toggle quoted message
Show quoted text
Thanks for the follow-up question. Bryan --- In LTspice@..., John Woodgate <jmw@...> wrote:
|
Re: Step Change to k of Coupled Inductors During Transient Analysis
Helmut,
toggle quoted message
Show quoted text
Thanks for your initial response and later addition on the possible alternative. Bryan --- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:
|
Re: MPS4250
jean_claudeabeille wrote:
I uploaded the new corrected one along with the missing components files : AmpJCA.zip.Still has errors. Still missing the LF353. LTspice is looking for the schematic symbol (.asy file). Needs a statement to include the special "standard.bjt" file. Meanwhile I received 2 models of mps4250. Simulations with one of them and with BC557 Probably both ... or neither. Remember all components have tolerances, which for some transistor parameters can be on the order of +/-100% or so (well, +100%, -50%, or more). In fact results are very dependent of model's parameters. That's unfortunate. A good amplifier design ought to make the results largely independent of model parameters, over a reasonable range. Besides, I don't know if it's important but on my amp, U2 is CNY17-4 whichAs long as you include a model for the CNY17-4, it's OK. What I woud like to understand is HOW to equilibrate the voltages at theHere's where the discussion becomes off-topic for this forum, because we are now talking about amplifier design, rather than circuit simulation. One would use the trimmer 1K resistor to set the quiescent (static) currents through R101 and R111. To get equal currents through R101 and R111, that should happen automatically. As long as no current goes out to the load, all the current through R101 flows through R111. To get no quiescent current to the load, trim the input offset voltage so that the output pin sits at 0V when the input is 0V. Regards, Andy |
Re: MPS4250
jean_claudeabeille
thank you Helmut for your patience and answers. Now, it's more clear in my mind.
toggle quoted message
Show quoted text
Besides, some answers didn't satisfy me : R4 and especially D4 and R12. How does my amp can work since it is in this configuration ? If I figure it out well, electronics can only be understood by practicing but certainly not by reading books like I do. Silly of me. --- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:
|
Re: MPS4250
Macy wrote:
.model PN4250 PNP(Is=6.734f Xti=3 Eg=1.11 Vaf=45.7 Bf=388.2 Ne=1.806 ... hmmm...don't need the parentheses anymore eh?Parentheses were never needed there. Unless I am mistaken, they are treated like whitespace. This goes back to the 1970s (Berkeley SPICE). There are some places where parentheses are mandatory, but a .MODEL statement is not one of them. They are harmless, so it can be useful to add them, to show that the entire enclosed text is a list of parameters. Andy |
Re: LTspice World Tour in Australia
John Woodgate
In message <kshfhj+al36@...>, dated Sun, 21 Jul 2013, Helmut <helmutsennewald@...> writes:
I want only remind that Mike is on tour in Australia this week.That will compensate them for losing the first two cricket Test Matches, but not 100%. (;-) -- OOO - Own Opinions Only. See www.jmwa.demon.co.uk Why is the stapler always empty just when you want it? John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK |
Re: MPS4250
Hello Jean,
My answers are below. --- In LTspice@..., "jean_claudeabeille" <jean_claudeabeille@...> wrote: R4 has to be ideally connected to the output as I did. Then the offset of the amplifier output will be only the offset of U1B. If we connect R4to the net "C5", the offset of U1B will be multiplied by the gain 25 of the amplifier. - D5 instead of Q5I don't have the model parameters for a Vbe breakdown. You also don't know what breakdown voltage you get. 7v, 8V, 9V? - D4 added1.5V of one LED is too less. - Q11 PNP instead of NPNYou had a NPN symbol but named it a PNP. That's a "foul play". :-) The simulation will simply not work as intended. I replaced it with a PNP to leave the PNP-type. Alternatively one could had rename the NPN with a NPN-type. - U1A output connected to I-I have shown the only correct usage of unused opamps. To make this even more save, connect a 10k resistor between GND and the +input of U1A. (I had forgot this resistor.) This is not the real schematic, the one I uploaded.You should look that the opamp output U1B is not at the rails. If this is the case and your circuit is correctly wired, you should try a slightly larger or lower value of R5 to bring the opamp output into its linear region. At very low frequency of a few Hz, this loop will cancel your AC audio signal. It will behave like having a highpass with a few Hz in the input. How do you worked to get this solution ? What is the trick ?I have 35 years experience with analog circuit design. At last, what is the job of D3/D107,It limits the input differential voltage during power-up and down or if somebody connects an AC-coupled pre-amplifier or the input voltage is faster than the amplifier can follow.. D102/D103.They avoid that you expensive amplifier will be destroyed due to reverse bias during power-up and down. I apologize wasting your time with so basic questions,You had made a mix of a few schematic drawing mistakes and a very few design errors. The combination makes it hard to get the first working simulation. Now it's working. PS: I like the idea with Q14. It limits the maximum current of Q8. Best regards, Helmut |
Re: LTspice Genealogy - The Heritage of Simulation Ubiquity
Simulation Program with Integrated Circuit Emphasis -----Original Message-----
From: LTspice@... [mailto:LTspice@...] On Behalf Of Henry McCall Sent: Saturday, July 20, 2013 1:27 PM To: LTspice@... Subject: Re: [LTspice] Re: LTspice Genealogy - The Heritage of Simulation Ubiquity The grandfather of all spice programs was a phd thesis in one of the California universities. it was even called spice which indicated a ( S? Program for Integrated Circuit Engineering.) it's primary purpose was mos circuits as I recall. It was mid to late 60's I think. On 7/20/2013 1:16 PM, John Woodgate wrote: In message <kseg1d+mptm@...>, dated Sat, 20 Jul 2013, ------------------------------------ Yahoo! Groups Links |
to navigate to use esc to dismiss