Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: Clipping a Universal op-amp
The UniversalOpamp2 has a reasonable method of output limiting already builtin. The parameter "rail", which is set to 0, by default, is the "closeness" the output is able to approach the rail. If you change it to, say, 300m, the output will swing between (+V - 300mV) and (-V + 300mV). Note also that the UniversalOpamp2 is only able to source/sink modest amounts of current.
There are plenty of alternatives to simulating clipping in behavioural models. Here are three: 1. Use a B source. V=limit(V(out),{Vclip+},{Vclip-}) 2. Use a table E source. (See LTspice Help for details.) 3. Use the undocumented OTA, which has a tanh transfer function, which approximates to a real bipolar differential amplifier. (See LTWiki for details.) Regards, Tony |
Re: Clipping a Universal op-amp
John Woodgate
In message <lm47ov+1h0laj6@...>, dated Wed, 28 May 2014, "sineysitch@... [LTspice]" <LTspice@...> writes:
Incidentally - Is there a nicer way of doing this than diode limiting? Is there some (perhaps non-linear) circuit (Vbe of bipolar etc) that looks at the error voltage and reacts when it exceeds say 100mV ?Diode limiting is quite 'soft'. If you want hard limiting, a push-pull emitter-follower stage using bipolars and a low-impedance (i.e. regulated) power supply is effective, as audio engineers know. -- 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 |
Clipping a Universal op-amp
The internal representation of the level.2 op-amp ("UniversalOpamps2.sub" ?) does not seem to use actual transistors, presumably for speed of simulation and to make it more generic. What external parts are best to make output-level clipping work more like a 'real' opamp?
In the file "test_o1.asc" are two sets of two circuits. Limiting the output swing with a diode does not speed up recovery in the first set. ? The second set uses a 'real' op-amp, and gives a result more like I hoped. - - - - - - - - - - P.S. Incidentally - Is there a nicer way of doing this than diode limiting? Is there some (perhaps non-linear) circuit (Vbe of bipolar etc) that looks at the error voltage and reacts when it exceeds say 100mV ? |
Re: LM2917 F/V Tachometer simulation problem
Hi Andy, "I am not so sure about that. Doing that would make the resistor between pins 11 and 12 unnecessary because it would be shorted out. I think they meant pin 12 to not be grounded in the Tach circuit. The use of the ground symbol inside the IC for pin 12 is misleading, I think. I like to think of it as on-chip VSS. Maybe I should use VEE since it is a bipolar circuit. The detailed chip schematic in Figure 2 unfortunately uses the ground symbol everywhere, basically to indicate that they are all the same net ... which happens to be connected to ground in MOST but not all applications circuits. Like I say, it's misleading" Yes, I agree. The ground symbols inside the IC were really meant to indicate an internal net that usually connects to an external ground. "What exactly do you mean by the "new" LM2917 component?" I meant the "modified version" of the Fig 2. schematic. I have block a symbol and working application circuit I'd like another pair of eyes to review. HT |
Re: Helmut - Question on Crystal.asc
Hello Mike,
Initial current in an inductor has the same meaning as initial voltage in a capacitor. You can think of it as a "charged" inductor like applied voltage to a capacitor which is a charged capacitor. IC=10 on a capacitor means 10V. IC=10 on an inductor means 10A. Energy = 1/2*L*I^2 Energy = 1/2*C*U^2 By the way in a LC resonant circuit, the charge walks from the capacitor to the inductor and vice versa. When charge is on the capacitor it's voltage. When it's on the inductor, it's current. Best regards, Helmut |
Re: Helmut - Question on Crystal.asc
Andy,? I can't figure out how? to quote your text with right brackets to separate it from my reply. Thank you very much for the detailed reply. One thing I didn't think of was to pick up the part and move it to see which inductor the .ic statement belongs to.
As far as how the initial current is applied, perhaps your best description is the current source is applied only to the inductor and terminates as soon as the transient analysis starts. I think I have to disgregard any concern about where the current goes after it leaves the inductor:) Thanks, Mike |
Re: analysis failed matrix is singular
Hello Patrick,
Your subcircuit was wrong. The correct syntax for your subcircuit should be as shown below. Compare every line to see what I have changed. *Pinbelegung *Pin 1: Input *Pin 2: Output *Pin 3: GND * .subckt Boost in out 0 .param Dq=1 L1=1m R1=1 C1=1m G1 0 OUT IN 0 =Laplace({Dq}*(1-(s*{L1}/({Dq*Dq*R1})))) R1 OUT 0 {R1} C1 OUT 0 {C1} .ends Nevertheless this circuit? will not be correctly simulated, because LTspice requires a high frequency roll off. Avoid Laplace. Your simple function can be replaced by a simple RLC circuit. Best regards, Helmut |
Re: Lock horizontal axis
OK, thanks Helmut,
Now I can get it to work at least, but it still seems awkward to use: I have to 1) Un-tick "Sync Horiz. axis". 2) Set Manual Limits 3) Re-tick "Sync Horiz. axis" (So, not what I'd expect - which would be: If Sync Horiz. axis checked, then manual Time Limits affects all plots in the same way). In fact - I have the 3 steps above to do each time. If I leave it checked (which seems to be the default), it does not work. I have to disable, set limits, enable... PS: I notice the "H" is underlined on the context-menu, but ALT-H is just "Help", so no apparent hot-key to speed the staeps (1..3) above up. Regards Stephen. |
Re: analysis failed matrix is singular
Patrick asked:
? ?"1) When I want to simulate the circuit I get the error "Analysis failed matrix is singular"
? ? ?? Where does it come from and how can I prevent it except the option to switch a resistor between?
? ? each node and GND which results in wrong bode plot?"
My somewhat lame explanation is this: ?One of the things that LTspice needs to do, is to invert the matrix of equations that describes the circuit. ?If that matrix is very close to singular (very "stiff" and not easy to manipulate), it means it is unable to successfully invert the matrix. ?In a very very crude sense that is like calculating the ratio between two numbers, both of which are vanishingly close to zero ... can't be done.
If the option you mention to put a resistor between each node and GND, is to add a GSHUNT, you can vary the size of GSHUNT to trade-off between getting it to work, and having it mess up the results. ?Make GSHUNT very small (RSHUNT very large) and see if it helps. ?Helmut is good about finding the right combinations and alternative methods.
By the way, I can't try your simulation because it refers to a model file in a Windows directory that does not exist on my computer. ?(That's why we recommend keeping models together with schematics, and never using absolute filespecs to refer to anything.)
In an .AC simulation, the first thing LTspice needs to do is find the DC operating point. ?After that, it can determine the small-signal equivalent circuit, from which it calculates the AC response. ?I noticed your DC power source has a DC voltage of zero. ?Is that realistic? ?You are asking for the AC response when no power is applied.
Regards,
Andy |
analysis failed matrix is singular
Hallo all together,
I want to make an AC - simulation of a Boost Converter by its Laplace transfer function. For that I have designed a subcircuit Boost.sub , a symbol Boost.asy and a circuit Control.asc which you can find in Files->Temp->AC-Analysis problem. 1) When I want to simulate the circuit I get the error "Analysis failed matrix is singular" Where does it come from and how can I prevent it except the option to switch a resistor between each node and GND which results in wrong bode plot? 2) Does anybody know a tutorial which shows how to design the boost converter as a subcircuit where I can make doubleclick on it and get displayed the inner circuit? Thank you very much!!! Best regards, Patrick |
Re: Rubbish email 2014/05/26 M_otauakil
John Woodgate
In message <lm20sr+1jfqvok@...>, dated Tue, 27 May 2014,
"basier.philippe@... [LTspice]" <LTspice@...> writes: As I live in Paris I phoned to "Lyc¨¦e Richelieu".But did you submit your 'wish list' for something extremely costly?(;-) -- 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: Ctrl_r to rotate an inductor
The end with the "dot" does make a difference. ?If you rotated or mirrored an inductor on the LTspice schematic so that the "dot" swapped locations with respect to the rest of the circuit, that would be the same as either (a) swapping the leads on that particular winding, or (b) winding it in the opposite direction (counter-clockwise rather than clockwise).
Of course, rotating an inductor while leaving its ends connected the same as before, changes nothing. ?Hopefully you knew that already.
The convention of using "dots" on transformer windings has been around for decades. ?You should find information about it going back a very long time ... probably to before any of us was born.
Andy |
Re: LM2917 F/V Tachometer simulation problem
hitec92407?wrote: ? ?"I was able to get?the macro model?working."
Excellent. ? ?"... There actually is a ground input on the schematic." ? ?"Its Pin 12 shown in the BIAS section. All ground points on the schematic should be tied together and connected to?Pin 12. Pin?12 then should be grounded externally in the application circuit."
I am not so sure about that. ?Doing that would make the resistor between pins 11 and 12 unnecessary because it would be shorted out. ?I think they meant pin 12 to not be grounded in the Tach circuit. ?The use of the ground symbol inside the IC for pin 12 is misleading, I think. ?I like to think of it as on-chip VSS. ?Maybe I should use VEE since it is a bipolar circuit.
The detailed chip schematic in Figure 2 unfortunately uses the ground symbol everywhere, basically to indicate that they are all the same net ... which happens to be connected to ground in MOST but not all applications circuits. ?Like I say, it's misleading.
? ?"What I did here is replace all diodes in the schematic, except the zener of course, with transistors. Once I did that, everything started working...:-)."
That is exactly what I was thinking of too! ?I'm glad that you tried that.
The place where I saw a problem, was between D5 and Q9, and D4 and Q10. ?It seemed that the diodes were preventing those transistors from ever turning on.
? ?"Can someone check the new LM2917 component?"
What exactly do you mean by the "new" LM2917 component? If you mean the other model that someone uploaded earlier, I haven't.
Sorry about my late reply; I was away for a few days. ?Also, your reply DID make it to the [LTspice] group just fine, so you don't need to start a new thread. Regards,
Andy |
Re: Helmut - Question on Crystal.asc
Mike wrote:
? ?"IC=-100.8u
? ?"I understand this is to establish an initial current. But how do we know which circuit it applies to, and how do we tell it is intended to set the current in L1?"
We know it's not a comment because it isn't in blue. ?It is an actual SPICE parameter or directive. ?Check for that first.
Use Ctrl-right-click on L1. ?You will see that "IC=-100.8u" is one of the parameters of that element. ?Alternatively, generate the SPICE Netlist for the schematic (View > SPICE Netlist) and then search it for "IC=-100.8u" and see which element it applies to. ?(Third method: Use the "Move" operation (F7) and momentarily "pick up" L1 and see which text moves with it. ?Then right-click to cancel the Move operation.)
L2 also has an IC parameter ("IC=0"), but that one was not set to be visible.
It would be 'nice' if LTspice had a way to display the attachments between text and the components they belong to. ?Someone could create a very messed up schematic by moving component values around.
? ?"When you set an initial condition in this manner, how do you make a mental image of what is happening? For example, if I imagine a current is going through L1, I would think it has to charge C1. This would create an initial voltage across C1, but I have no way to tell how much that voltage will be." Here is my take on the question: The initial condition was used in conjunction with "UIC" on the ".TRAN" statement. ?This instructs LTspice to use only the specified initial conditions as the complete initial operating point. ?In this case I(L1)=-100.8uA, and V(C1)=0 because it was not specified. ?In the instant AFTER t=0, the current through L1 would begin to charge C1. ?Right at t=0, C1 has zero voltage ... but note that this transient simulation does not start saving waveform data until 10us have passed, so you need to edit the .TRAN statement and remove that, to see what happened at the actual start of the simulation.
? ?"Do we consider the current is applied for zero time and terminates at the start of the transient analysis?"
Depending on what you're asking: ?Not exactly, because that would violate how inductors behave.??Its current can't drop to zero instantly.??We consider that somehow the inductor had 100.8uA flowing up until t=0; and then at t=0+, L1 starts behaving like a normal inductor.
But you might think of it as if a current source had been placed across only L1, and it is removed at t=0+. ?(Maybe that was what you meant.)
? ?"BTW, I think you have provided an outstanding service to tens of thousands of engineers through your steadfast dedication to the LTspice group. I don't know how you manage to maintain your sanity over such a long time, but I offer my heartfelt gratitude for what you have accomplished." Helmut is pretty amazing! ?He is one of the more valuable resources the LTspice community has.
Regards,
Andy |
Helmut - Question on Crystal.asc
Dear Helmut,
I thiink you uploaded this file so I'm sending the question to you. In crystal.asc, located at <https://groups.yahoo.com/neo/groups/LTspice/files/%20Examples/Educational/Transient%20analysis%20of%20a%20crystal/crystal.asc> there is a statement under L1: IC=-100.8u I understand this is to establish an initial current. But how do we know which circuit it applies to, and how do we tell it is intended to set the current in L1? Does it also apply to L2? It seems to, but L2 has a DC offset so the initial swing is from zero to 150uA whereas L1 has no offset. There is no offset in the voltage sources V1 and V2, so it is not clear how the initial offset is established in L2. When you set an initial condition in this manner, how do you make a mental image of what is happening? For example, if I imagine a current is going through L1, I would think it has to charge C1. This would create an initial voltage across C1, but I have no way to tell how much that voltage will be. The same problem happens with L2 and C3. Do we consider the current is applied for zero time and terminates at the start of the transient analysis? BTW, I think you have provided an outstanding service to tens of thousands of engineers through your steadfast dedication to the LTspice group. I don't know how you manage to maintain your sanity over such a long time, but I offer my heartfelt gratitude for what you have accomplished. Thanks, Mike |
Re: RE : Re: slow IGBT Simulation problem
I can see it, too, unfortunately. Vlad ______________________ -- holding, among others: a universal analog/digital filter, block-level models for power electronics (and not only), math blocks with a more stream-lined approach, some digital ADC, DAC, (synchronous-)counter, JKflop, etc. 2014-05-26 17:41 GMT+03:00 motauakil@... [LTspice] <LTspice@...>: > > ? > > Destinataire: motauakil@... > > Objet: [LTspice] Re: slow IGBT Simulation problem > > > Je vous rappelle que vous avez jusqu¡¯au vendredi 30 mai 2014 pour d¨¦poser au secr¨¦tariat enseignants votre fiche de v?ux pour la rentr¨¦e prochaine. KERVOILLARD Elise Secr¨¦tariat enseignants Lyc¨¦e Richelieu 64 rue George Sand 92501 RUEIL-MALMAISON T¨¦l : 01 58 83 20 17 Fax : 01 58 83 20 23 Courriel : > > |