Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: matched transistor pair
Matched pairs are generally just two identical dies that share a common subtrate for tempco stabilizing. Normally they will be used in circuits such as current mirror emitter followers where balance is an all important perameter. ? Simply using two normal 5401 models on the schematic is not obviosuly an exact match for a matched pair model, but should in fact be at least as good or better in expected results since the tempco match will be exact which although very close is not the case in the actual part. ? So the answer is "maybe" it would be alright just to use the existing symbol twice to simulate a perfectly matched pair. Or, as an alternative you could set up some of the parameters of the model as globals and use Monte Carlo commands?to statistically "distribute" the tempco based variables. In order to do that effectively you will need to know the extent of effects on those varoiables, either from manufacturer supplied data points or from data sheets for the component. In any event, possibly?not an easy task in general and not what you may have hoped for if the simpler approach is too optimistic, but there you are. ? - Cordially - RC ? ? ? ? |
matched transistor pair
Hi!? I need to add a DMMT5401 matched transistor pair to a simulation.? Does anyone know if a symbol for a matched transistor exists?? I have not found one so any help would be appreciated.? I have the spice file for the part I just need a symbol to match it up with. ? thanks ? kc |
Stepped temperature and stepped/variable resister (potentiometer) representations in LTspice
This question comes up on a regularly repeating basis every few weeks or months, so lets review once again and hopefully this message can be referenced in the future as a response. ? Basically there are several instances where it is useful to have?one or more?"variable" resistances included in a circuit. ? A) Temperature effects on resistance as well as other circuit components. (Where not included in the model for that part, or when unusual circumstances exist). This is normally shown as a table or "resistance versus time" plot. ? B) Circuit performance over a range of resistance settings to simulate a potentiometer or a changing load for power supply testing such as regulation percentage or step response
effects of the control loop. ? C) Tolorance distribution/statistical effects. (Monte Carlo) ? ? I.?Temperature control - LTSpice .step commands ? For temperature effects the commands?must be?included on the schematic in one of several ways: ? Example a)? .temp 100??? (...sets single valued contant ambient operating temperature of +100 degrees C for simulation run.) ? Example b)? .step temp ?-40 50 10????? (...starts first simulation with ambient operating temperature set to -40 degrees C and steps through multiple simulations at each 10 degree step up to 50 degrees C.) ? Example c)? .step temp list -40 25 100??? (...starts first simulation at -40 degrees C, then steps temperature to 25 degrees for
second simulation, and finally steps to 100 degrees C for the final simulation run, following the listed temperatures. ? (Notes: -?As with all .step commands, steps can be nested three deep. ? - For stepped command cases integrated values cannot be determined over a range of plot values since there will be more than one trace per plot window.) ? ? ? II.?Resistance value control - LTspice resistance value statements ? For variable resistance statements one of the following forms must be entered in the resistance setting window for the component of interest and takes the place of the normal R value: ? Example a)? R=table(time,0,10,20m,2.35K)?? (...Resistance starts at 10 ohms at beginning of simulation run and ramps up to 2.35K ohms at t0+20
mSec. ? Example b)??R=table(time,0,100,30m,100,30.00001m,2.77K)??? (...Resistance starts at 100 ohms at the start of the simulation and steps to 2.77K at t0 = 30.00001mSec. ? Example c)??? R=table(time,0,0.869,10m,0.869,10.00001m,10,20m,10,60m,10K) (...Resistance starts at 0.869 ohms constant until t0+10.00001mSec, then at t0+10.00001mS?the Resistance?steps to 10 ohms constant until t0+20mSec, after which it ramps up to 10K by t0+60mSec over the next 40 mSec of simulation time. ? Example d)?? R=table(time,0,10,35m,11K,45m,1,60m,1,60.00001m,0.001) (...Resistance starts at 10 ohms at t0, ramps up to 11K ohms at t0+35 mSec, ramps back down to?1 ohm?by t0+45m, holds constant at 1 ohm until t0+60.00001 mSec, then steps to 0.001
ohm. ? (Notes: -?All resistance "changes" must be grouped as pairs withing the R statement. A pair is defined as a time point followed by a resistance value seperated by a comma. Any number of change pairs, or ramp form pairs, can be included in a resistance set statement in the component window, up to the limit of the hardware. ? - The R statement should always end in a resistance value, followed by a closing parenthesis. ? -? Time points must proceed in a positive direction. A successive time point value must be greater than a proceeding one in the list. ? - The first time value?must be set at t=0 as in the examples. ? - Any number of R values may be set to vary up to the limit of the hardware. R variable?statements do not result in multiple runs, but occur over the time base of a single simulation.
They do not count in the "three limit" for nested step spice?commands. ? - Generally you will want to set up a table of known?time points and resistance value pairs?in?the R?value set statement so you understand the time line and?resulting plots, such as would be the case when using this approach to test load current effects on regulated power?supplies for instance. ? -?As an added convienience one plot window can be set up to follow the change in Rx by simply plotting the Vnode/I(Rx) of that test point to which the varying resistance Rx?is attached. Thus the entire resistance contour of Rx over the simulation?can be traced. ? - The simulation card end run time should always be set to equal or exceed the highest time/resistance pair value, that is the last pair in the value statement,?so that step/change will be included in
the run. ? - Resistance values can follow any desired change, higher or lower in value with each ?successive time/resistance "pair". ? ? ***?For Monte Carlo statistic based runs see the mc command examples. ? *** As with other components one other possibility for the "R" value setting in a component window is the curly brackets form {R} which is used when setting "global" values. See the .param command examples. ? - Cordially - RC |
Re: Bug in Version 4.20d
File a bug report with him, at the address in the "About LTspice" dialog.
toggle quoted message
Show quoted text
Jim Wagner Oregon Research Electronics On Dec 12, 2013, at 7:29 AM, Peter Kapas wrote:
|
Bug in Version 4.20d
I updated LTspice yesterday. There is replacement of the jumper with 0 value of the resistor, but the Export Netlist is not working now properly. The values of the resistors are replaced with accidental characters in all types of netlists ... It is just for info, to wait for correction on Version 4.20e. I hope Mike will do it. Peter |
Re: XVAR specification
M.Rakesh sharma wrote, "
I haven't used the Potentiometer models so I can't say with certainty. ?But the one you picked is a subcircuit. ?(That might be true of all of them.) ?It is not only a symbol. ?You must also import or include the subcircuit definition. ?In the case above, it is looking for a subcircuit definition named "potentiometer", and it can't find it.
Check where you found the symbol and look for a subcircuit model that goes with it. ?The subcircuit model should begin with the line
.SUBCKT potentiometer ... followed by other stuff. ?You can either call it with an .INCLUDE statement, or paste it directly into your schematic. Regards, Andy |
Re: XVAR specification
Dear Mr Andy, Thanks for your suggestion. I chose one potentiometer from the all_files folder. But still I am unable to simulate my circuit if I use this component in my circuit. Same error message appears again - "Unknown sub-circuit called in: x001 n003 n008 nc_01 potentiometer rtot=50K wiper = 5" Do it change anything after placing ths component in my circuit? Thanks & Regards, M.Rakesh sharma. |
Reference Information
Some one or two months ago mention was made of a book ¡°The LTSPICE IV Simulator¡± written by Gilles Brocard, published by Wurth Electronik, ISBN 978-3-89929-258-9. I have used LTSPICE for about three years and probably simulated over 100 circuits for both my own and work purposes, but like many others I struggle to interpret the sparse help files and I knew that I had much to learn to improve my knowledge of the simulator. ?I decided to purchase a copy of the book even though it was $60 US here in Australia. I rationalised that since the simulator was free, this cost was reasonable if the book turned out to be of value. Until now I have been slowly improving my skills by keeping a notebook of tips gleaned mainly from this forum. I have also read several of the tutorials produced by universities and others to introduce LTSPICE to undergraduates. These all help but because the information is somewhat random in its coverage and no doubt because I have not taken the time to organise it properly, it can sometimes be of limited help. I also refer to examples in the files section and information gleaned from other web sites. No doubt this would be sufficient if I had the time to spend learning the simulator, however like many others I am time poor at present. The purpose of this post is to provide some feedback on the book. I am only about one third through it but I am able to report that I consider it as having been a good purchase. Sure the style of writing is very dry and some of the phrasing has that awkward feel that often occurs when technical books get translated to English, but the coverage of the subject appears to be thorough. Even though I would have liked a more comprehensive index, so far I have been able to locate all the information I have looked for. I thought this feedback may be of interest to others in a similar situation to myself. I have no association with the author or publisher. Finally, since I rarely post, let me take the time to say thanks for the effort made by Helmut and others who step in to answer questions and offer advice. It is appreciated, if rarely acknowledged, by the many followers of the site. |
Re: FFT Resolution
In any event the resultant "spectral accuracy", even if optimized for some set of conditions, resolution, and bandwidth of spectrum, will be directly dependent on the accuracy of represented distortion (read non-linear) effects. ? - In general large scale spectra will tend to more accurate representation, whereas the smaller the spectral component the more the sensitivity, and deviation, from the actual results in a real world circuit. This effect is exploited in so-called "Harmonic balance" type solvers to great success. ? - Cordially - RC On Tuesday, December 10, 2013 2:58 PM, John Woodgate
?
In message , dated Tue, 10 Dec 2013,
"skleiser@..." writes: > Given (in this case) a square wave of fixed frequency, fast but >non-zero rising & falling edges, 50% duty cycle, and an exact integer >number of cycles (etc.), what's the narrowest possible harmonic >bandwidth that ought to be expected? In other words, when is the >simulation as optimized as it can be? harmonic bandwidth doesn't depend on those things. Embedded in the Help on the B source is: "In LTspice, the impulse response is found from the FFT of a discrete set points in frequency domain response. This process is prone to the usual artifacts of FFT's such as spectral leakage and picket fencing that is common to discrete FFT's. LTspice uses a proprietary algorithm that exploits that it has an exact analytical expression for the frequency domain response and chooses points and windows to cause such artifacts to diffract precisely to zero. However, LTspice must guess an appropriate frequency range and resolution. It is recommended that the LTspice first be allowed to make a guess at this. The length of the window and number of FFT data points used will be reported in the .log file. You can then adjust the algorithm's choices by explicitly setting nfft and window length. The reciprocal of the value of the window is the frequency resolution. The value of nfft times this resolution is the highest frequency considered." The significant words are: "The reciprocal of the value of the window is the frequency resolution." Frequency resolution is the same as the observed 'harmonic bandwidth'. > > On a more general note, assuming artifacts of a non-ideal simulation >have been minimized, does the harmonic bandwidth provide useful >information, or do only the peak values matter? The harmonic energy is averaged over the bandwidth, so widening the bandwidth tends to reduce the observed amplitude. -- OOO - Own Opinions Only. With best wishes. See www.jmwa.demon.co.uk Nondum ex silvis sumus John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK |
Re: LDO LTC1844
There is a solution to LDO-s that work well enough using a level 2 switch that was described here on the forum. I did my? solution for a L4940 family regulator that works well enough. You won't be able to see the regulator's frequency dependence and why they are noisy at some frequencies, but for a normal operation in a normal circuit it is OK.
LTspice switches converge lightning-fast, so if you are not after some exotic features out of a regulator, it will do much better than a transistor level model. Do you want my solution so you can convert it for your application? |
Re: Determine phase and gain margin in filter/amp
monettsys
--- In LTspice@..., <frank_wiedmann@...> wrote:
I have uploaded to the Temp folder an example circuit from where I have included the .meas commands for the phase and gain margins. For further explanations, please see Measure_Margins.asc. I have also reduced the step size of the .ac simulation in order to get more precise results.Thanks again, Frank. I should mention your file is named "opamp stability 2.asc" for those who may be looking for it. To me, it is one of the most significant files that has ever been uploaded to this forum! When you have an amplifier with ringing and poor step response, plotting the open loop response may be the only way to find what is wrong and fix it. The ability to measure the phase margin means you can keep track of changes and keep the best ones. The excellent repeatability of the .measure commands eliminates human error and typical problems with manual adjustments, so you don't end up chasing your tail on self-induced problems. Very good work, Frank. Thanks! Mike |
Re: Determine phase and gain margin in filter/amp
---In LTspice@..., <405a82e5@...> wrote: Frank, that is absolutely spectacular! Thanks very much. Also thanks for the explanation of the second condition in the Omicron paper. It means we have no problems to use the Voltage Injection method for most practical circuits in LTspice. This is very good news. Thanks very much for the .measure commands. I would probably have had great trouble converting the Tian commands since they are so long. It is much easier to understand how the commands work when they are much shorter: .meas ac phase_margin find V(fb)/V(inm) when mag(V(fb)/V(inm))=1 .meas ac gain_margin find V(inm)/V(fb) when ph(V(inm)/V(fb))=0 In the second command for gain margin, why did you invert the ratio to V(inm)/V(fb)? Was that to give a positive result to the answer? Why is that needed? Yes, like I wrote in Measure_Margins.asc, I wanted to have positive values for stable circuits. Best regards, Frank |
Re: Determine phase and gain margin in filter/amp
monettsys
--- In LTspice@..., <sawreyrw@...> wrote:
Hi Rick, Thanks for the explanation. My version only works with left click. You really should take a look at Frank's solution. I extended the frequency range to .ac dec 1000 1m 10Meg Two runs gave the following results: phase_margin: v(fb)/v(inm)=(-8.38981e-007dB,55.9047) at 1.21103e+006 gain_margin: v(inm)/v(fb)=(15.3886dB,6.6374e-005) at 3.7333e+006 Date: Wed Dec 11 01:01:52 2013 Total elapsed time: 0.140 seconds. phase_margin: v(fb)/v(inm)=(-8.38981e-007dB,55.9047) at 1.21103e+006 gain_margin: v(inm)/v(fb)=(15.3886dB,6.6374e-005) at 3.7333e+006 Date: Wed Dec 11 01:02:33 2013 Total elapsed time: 0.130 seconds. As you can see, they are very repeatable. In fact, the second run was made with no graph, so you don't even need to plot the waveforms to get the answer! This fulfills my wish to have a method that gives the same result for everyone. My very sincere thanks to Frank for his work. Thanks for posting your original results. It led directly to this very excellent solution. Mike |
Re: Determine phase and gain margin in filter/amp
monettsys
--- In LTspice@..., <frank_wiedmann@...> wrote:
Frank, that is absolutely spectacular! Thanks very much. Also thanks for the explanation of the second condition in the Omicron paper. It means we have no problems to use the Voltage Injection method for most practical circuits in LTspice. This is very good news. Thanks very much for the .measure commands. I would probably have had great trouble converting the Tian commands since they are so long. It is much easier to understand how the commands work when they are much shorter: .meas ac phase_margin find V(fb)/V(inm) when mag(V(fb)/V(inm))=1 .meas ac gain_margin find V(inm)/V(fb) when ph(V(inm)/V(fb))=0 In the second command for gain margin, why did you invert the ratio to V(inm)/V(fb)? Was that to give a positive result to the answer? Why is that needed? For others who may be interested, I should mention you have an excellent set of articles on your home page at There is also a very good thread discussing open loop gain starting with your post in 2004: Thanks again, Mike |