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: monolithic mosfet
Mike,
It does help to see the schematics! Please take a look at twomos.asc and twonorbs.asc, and how the parameterization works, and how AD is calculated as an example. In twomos.asc, the L and W of each mosdevice come from .params L1 W1 L2 W2, and the area calculation is entered on the "Monolitic Mosfet" parameter menu. In twonorbs.asc the L and W are entered on the "Schematic Edit Block" menu, and the area calculation is done in the subcircuit for the norbmos4 block. Regards, Norbert. --twomos.asc-- Version 4 SHEET 1 880 680 WIRE -16 304 64 304 WIRE 336 288 336 304 WIRE 336 304 384 304 WIRE -64 288 -64 304 WIRE -64 304 -16 304 WIRE -16 256 64 256 WIRE 64 256 64 304 WIRE 64 304 80 304 WIRE 384 256 464 256 WIRE 464 256 464 304 WIRE 80 304 80 384 WIRE 80 304 208 304 WIRE 384 304 464 304 WIRE 208 304 208 240 WIRE 208 304 336 304 WIRE 208 160 -16 160 WIRE -16 160 -16 208 WIRE 208 160 384 160 WIRE 384 160 384 208 FLAG 80 384 0 SYMBOL nmos4 -64 208 R0 WINDOW 123 56 100 Left 0 SYMATTR Value2 l={L1} w={W1} ad={W1*LDIF} SYMATTR InstName M1 SYMBOL nmos4 336 208 R0 WINDOW 123 56 100 Left 0 SYMATTR Value2 l={L2} w={W2} ad={W2*LDIF} SYMATTR InstName M2 SYMBOL voltage 208 144 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 0 TEXT 176 376 Left 0 !.param L1=1u TEXT 176 408 Left 0 !.param W1=10u TEXT 176 440 Left 0 !.param L2=5u TEXT 176 472 Left 0 !.param W2=20u TEXT 176 504 Left 0 !.param LDIF=1u TEXT 176 352 Left 0 !.op --twonorbs.asc-- Version 4 SHEET 1 880 680 WIRE -64 304 -16 304 WIRE 336 288 336 304 WIRE 336 304 384 304 WIRE -64 288 -64 304 WIRE -16 256 64 256 WIRE 64 256 64 304 WIRE 64 304 80 304 WIRE 384 256 464 256 WIRE 464 256 464 304 WIRE 80 304 80 384 WIRE 80 304 208 304 WIRE 208 304 208 240 WIRE 208 304 336 304 WIRE 208 160 -16 160 WIRE -16 160 -16 208 WIRE 208 160 384 160 WIRE 384 160 384 208 WIRE -16 304 64 304 WIRE 384 304 464 304 FLAG 80 384 0 SYMBOL voltage 208 144 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 0 SYMBOL C:\Program\ Files\LTC\SwCADIII\norbmos4 -64 208 R0 WINDOW 39 56 60 Left 0 SYMATTR InstName X1 SYMATTR SpiceLine L=1u W=10u M=1 SYMBOL C:\Program\ Files\LTC\SwCADIII\norbmos4 336 208 R0 WINDOW 39 56 60 Left 0 SYMATTR InstName X2 SYMATTR SpiceLine L=5u W=20u M=1 TEXT 176 392 Left 0 !.param LDIF=1u TEXT 176 352 Left 0 !.op --norbmos4.asc-- Version 4 SHEET 1 1084 680 WIRE 80 192 80 128 WIRE 80 240 144 240 WIRE 80 288 80 368 WIRE 32 272 -32 272 FLAG 80 368 S FLAG -32 272 G FLAG 144 240 B FLAG 80 128 D SYMBOL nmos4 32 192 R0 WINDOW 123 56 100 Left 0 SYMATTR Value2 l={L} w={W} ad={LDIF*W} as={LDIF*W} m={M} SYMATTR InstName M1 --norbmos4.asy-- Version 4 SymbolType BLOCK LINE Normal 48 80 48 96 LINE Normal 16 80 48 80 LINE Normal 40 48 48 48 LINE Normal 16 48 40 44 LINE Normal 16 48 40 52 LINE Normal 40 44 40 52 LINE Normal 16 8 16 24 LINE Normal 16 40 16 56 LINE Normal 16 72 16 88 LINE Normal 0 80 8 80 LINE Normal 8 16 8 80 LINE Normal 48 16 16 16 LINE Normal 48 0 48 16 WINDOW 0 56 32 Left 0 WINDOW 3 56 72 Left 0 PIN 48 0 NONE 0 PINATTR PinName D PINATTR SpiceOrder 1 PIN 0 80 NONE 0 PINATTR PinName G PINATTR SpiceOrder 2 PIN 48 96 NONE 0 PINATTR PinName S PINATTR SpiceOrder 3 PIN 48 48 NONE 0 PINATTR PinName B PINATTR SpiceOrder 4 --twomos.net-- * C:\Program Files\LTC\SwCADIII\twomos.asc M1 N001 0 0 0 NMOS l={L1} w={W1} ad={W1*LDIF} M2 N001 0 0 0 NMOS l={L2} w={W2} ad={W2*LDIF} V1 N001 0 0 .model NMOS NMOS .model PMOS PMOS .lib C:\PROGRAM FILES\LTC\SWCADIII\lib\cmp\standard.mos .param L1=1u .param W1=10u .param L2=5u .param W2=20u .param LDIF=1u .op .backanno .end --twonorbs.net-- * C:\Program Files\LTC\SwCADIII\twonorbs.asc V1 N001 0 0 X1 N001 0 0 0 norbmos4 params: L=1u W=10u M=1 X2 N001 0 0 0 norbmos4 params: L=5u W=20u M=1 * block symbol definitions .subckt norbmos4 D G S B M1 D G S B NMOS l={L} w={W} ad={LDIF*W} as={LDIF*W} m={M} .ends norbmos4 .model NMOS NMOS .model PMOS PMOS .lib C:\PROGRAM FILES\LTC\SWCADIII\lib\cmp\standard.mos .param LDIF=1u .op .backanno .end |
Re: Personal Problem to Link OpAmp with SubCircuit
--- In LTspice@..., "Helmut Sennewald"
<helmutsennewald@y...> wrote: --- In LTspice@..., <Bernhard_Kraemer@w...> wrote:TL071.Hello, toFor that, I drawed a new symbol: TL071.asywhich can be found in the directory C:\Programme\LTSpice\lib\sub\. work.ModelThe error message tells:where the TL071 subcircuit is saved. But I don't know no way to to work?Sorry, the order of my instructions may be misleading. It should be that way: Make a copy of the LT1013.asy -> TL071.asy Replace the obvious text LT1013 with TL071. Replace the text ltc.lib with your library name, e.g. ti.lib. Save the symbol file tl071.asy. Move your library file, ti.lib in this case, into the folder sub. Hint: You can put as many models as you want into this library file. Then restart LTSPICE. Best Regards Helmut |
Re: monolithic mosfet
Norbert,
Thanks Mike, that does work - but then theI don't think I understand. Attached is circuit that scales two mosfets by one parameter. --Mike --- snip.asc --- Version 4 SHEET 1 880 680 WIRE 32 240 112 240 WIRE 320 240 368 240 WIRE 224 320 224 288 WIRE 224 208 224 160 WIRE 224 160 368 160 WIRE 368 160 368 192 WIRE 368 288 368 320 WIRE 32 320 32 288 WIRE 32 192 32 160 WIRE 32 160 224 160 WIRE -112 464 -112 432 WIRE -112 352 -112 272 WIRE -16 272 -112 272 WIRE -112 272 -112 112 WIRE -112 112 448 112 WIRE 448 112 448 272 WIRE 448 272 416 272 FLAG 112 240 0 FLAG 320 240 0 FLAG 368 320 0 FLAG 32 320 0 FLAG 224 320 0 FLAG -112 464 0 SYMBOL nmos4 -16 192 R0 WINDOW 123 56 100 Left 0 SYMATTR InstName M1 SYMATTR Value2 L={L} SYMBOL nmos4 416 192 M0 WINDOW 123 56 100 Left 0 SYMATTR InstName M2 SYMATTR Value2 L={2*L} SYMBOL voltage 224 192 R0 SYMATTR InstName V1 SYMATTR Value 0 SYMBOL voltage -112 336 R0 SYMATTR InstName V2 SYMATTR Value 0 TEXT 120 392 Left 0 !.param L=10u TEXT 96 472 Left 0 !.dc V1 0 3 1m V2 0 3 1 __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. |
Re: Personal Problem to Link OpAmp with SubCircuit
--- In LTspice@..., <Bernhard_Kraemer@w...> wrote:
Hello,which can be found in the directory C:\Programme\LTSpice\lib\sub\. In the file TL071.lib, I saved the subcircuit like this:work. The error message tells:where the TL071 subcircuit is saved. But I don't know no way to define a library in a schematics file. to work? Hello Bernhard, have you really drawn it new? Just make a copy of the LT1013.asy -> TL071.asy Replace the obvious LT1013 with TL071. Then restart LTSPICE. Replace the ltc.lib with your ti.lib. You can put as many models you want into this library file. Best Regards Helmut The adapted LT1013.asy file: Version 4 SymbolType CELL LINE Normal -32 32 32 64 LINE Normal -32 96 32 64 LINE Normal -32 32 -32 96 LINE Normal -28 48 -20 48 LINE Normal -28 80 -20 80 LINE Normal -24 84 -24 76 LINE Normal 0 32 0 48 LINE Normal 0 96 0 80 LINE Normal 4 44 12 44 LINE Normal 8 40 8 48 LINE Normal 4 84 12 84 WINDOW 0 16 32 Left 0 WINDOW 3 16 96 Left 0 SYMATTR Value TL071 SYMATTR Prefix X SYMATTR SpiceModel TI.lib SYMATTR Value2 TL071 SYMATTR Description Single Precision Operational Amplifier PIN -32 80 NONE 0 PINATTR PinName In+ PINATTR SpiceOrder 1 PIN -32 48 NONE 0 PINATTR PinName In- PINATTR SpiceOrder 2 PIN 0 32 NONE 0 PINATTR PinName V+ PINATTR SpiceOrder 3 PIN 0 96 NONE 0 PINATTR PinName V- PINATTR SpiceOrder 4 PIN 32 64 NONE 0 PINATTR PinName OUT PINATTR SpiceOrder 5 |
Personal Problem to Link OpAmp with SubCircuit
Hello,
I have a problem with new symbol designing! I'd like to design a simple amplifier circuit with the OpAmp TL071. For that, I drawed a new symbol: TL071.asy I set the attribute "Prefix : X" I also set the attribute "SpiceModel" to the filename TL071.lib, which can be found in the directory C:\Programme\LTSpice\lib\sub\. In the file TL071.lib, I saved the subcircuit like this: .SUBCKT TL071 1 2 3 4 5 C1 11 12 3.498E-12 C2 6 7 15.00E-12 DC 5 53 DX and so on... Unfortunately, I don't get no circuit with the so-defined TL071 to work. The error message tells: "Error: Unknown device type in: xu1 n004 n001 n002 0 n002 tl071" I think, it is because I didn't clearly define the library file where the TL071 subcircuit is saved. But I don't know no way to define a library in a schematics file. What could I do to get my circuit with my self-designed OpAmp-Model to work? Sincerely Yours, Bernhard ______________________________________________________________________________ UNICEF bittet um Spenden f¨¹r die Kinder im Irak! Hier online an UNICEF spenden: |
Re: monolithic mosfet
--- In LTspice@..., Panama Mike <panamatex@y...> wrote:
Norbert,theIf I were placing a MOSFET e.g. W=5u L=0.5u , and the length of MOSFET"source and drain implants might be LS=1u LD=1u. LS,LD could be popup attribute menu, but I can't pick up the device W for theYes. There's three ways to do it. Thanks Mike, that does work - but then the parameterization is valid only for the 1 instance. Every instance of the MOSFET symbol would need its own .PARAM statement, and the maths entered manually. In the end, the only way I could achieve what I wanted was to copy the 'nmos4' MOSFET symbol, and make it a hierarchical block 'norbmos4' I then created a schematic 'norbmos4' for the new symbol, instantiated an 'nmos4' in it with {L} {W} {M} for L W M and e.g. {LDIF*W} for AD etc. Now I can instantiate any number of 'norbmos4' devices, add PARAMS 'W=10u L=0.5u M=5' to this schematic block, and one .PARAM LDIF=1u directive. All I can say at the moment is that this netlists,and the simulator doesn't complain - whether it works or not for simulation I don't know yet. The downside is that every NMOS device on my schematic is now a 'norbmos' subcircuit containing an 'nmos4'. The upside is that the typical parasitics should be calculated for me. On to my second day of using LTSpice .... looks good so far! Regards, Norbert. |
Re: monolithic mosfet
Norbert,
If I were placing a MOSFET e.g. W=5u L=0.5u , and the length of theYes. There's three ways to do it. i) If using the nmos4 symbol you get the "Monolithic MOSFET" dialog box. For length, type in {L}. And then place a SPICE directive on the schematic such as .param L=10u or ".step param L list 5u 7u 8u" ii) How down the control key and right click on the body. Enter L={L} on one of the attributes, SpiceModel, Value, Value2, SpiceLine or SpiceLine2. These attribute names mean nothing. Their values are concatenated for the netlist. iii) Move the mouse to the value of the MOSFET and right click. Edit it to be something like "NM L={L} W={W}" --Mike __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. |
monolithic mosfet
If I were placing a MOSFET e.g. W=5u L=0.5u , and the length of the
source and drain implants might be LS=1u LD=1u. LS,LD could be defined with a .PARAM spice directive. In some netlisters, the parameters AD AD PD PS NRS NRD can be calculated automatically, e.g. AD=W*LD PD=2*LD+2*W NRS=LD/W. Can the LTSpice netlister do this? I can set .PARAM LD=1u, and I can use it in the "Monolithic MOSFET" popup attribute menu, but I can't pick up the device W for the equation {W*LD} to enter in the AD box. Regards, Norbert |
Re: Publications Dealing with Circuit Simulation & Spice?
Dale,
What are some good magazines or journals to watch for infoI don't know that there's much published in magazines/journals. Worldwide, there's very few people who work on SPICE internals these days. Books a largely a better source. I really like the 2nd Edition of _Semiconductor Device Modeling with SPICE_ by Giuseppe Massobrio and Paolo Antognetti. --Mike __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. |
Re: setting default Trise and Tfall for special function models
--- In LTspice@..., "Rose, Michael (Michael)"
<mrose2@a...> wrote: I just wanted to pass along a little tip when using DFLOP specialfunction models. The rise and fall times default to 0 which will cause incorrect switching when the flops are cascaded. You have to add a Trise=xx value to the flop's Spiceline. According to the help, Tfall will default to specified Trise so does not need to be explicitly specified. Hopefully this might help save a bit of head- sratching . Hello Michael, I always prefer to specify a delay time for each D-flipflop or any other digital gate. I don't think that Tr and Tf are necessary if you already have specified Td. Example: Td=1ns Best Regards Helmut |
setting default Trise and Tfall for special function models
Rose, Michael (Michael)
¿ªÔÆÌåÓýI just
wanted to pass along a little tip when using DFLOP special function models. The
rise and fall times default to 0 which will cause incorrect switching when the
flops are cascaded. You have to add a?Trise=xx value?to the flop's
Spiceline. According to the help, Tfall will default to specified Trise so does
not need to be explicitly specified. Hopefully this might help save a bit of
head-sratching.
?
Mike |
Re: A question about the modeling in LT Spice -- results <> theory?
--- In LTspice@..., Jonathan Kirwan <jkirwan@e...> wrote:
On Wed, 30 Apr 2003 19:41:15 -0000, you wrote:believeI tried my own math to get a new formula, because I couldn't Hello Jon,that your formula is correct.As I said, it seemed a little strange to me, too.Assume that your period is very long compared to the time Ton.No need for assumptions. Let's just do the math. Back to the be aware that this VnodeMEAN is not the necessary the average of the signal. It is the middle between the two peaks. I was too lazy to follow the whole math. If you put your Vp=V into my formula it would look like ton = R*C*dI/I Your factor ln((2-x)/(2+x)) can be very good approximted by ln((2-x)/(2+x)) = -x Even for x = 0.5, the error is only 2%. If I apply that to your formula, I will get: ton = R*C*dI/I So both formulas are very equal. Thanks for your exact calculation. Best Regards Helmut |
(No subject)
Arnold Esper
Hello Steve,
toggle quoted message
Show quoted text
thanks for this fine example of using the rand-function. Arnold * * Mike, I found your use of the RAND function for Monte Carlo a very |
Publications Dealing with Circuit Simulation & Spice?
Dale
What are some good magazines or journals to watch for info on circuit
simulation, modeling, and SPICE? I can't find any publication that seems to concentrate on these topics. For example, the IEEE Journal of Solid State Circuits published Boyle's paper on opamp macromodeling, but hasn't had a lot of info on the topic in recent years. What should I be reading to keep up? Thanks for your suggestions Dale |
Re: A question about the modeling in LT Spice -- results <> theory?
Jonathan Kirwan
On Wed, 30 Apr 2003 19:41:15 -0000, you wrote:
I tried my own math to get a new formula, because I couldn't believeAs I said, it seemed a little strange to me, too. Assume that your period is very long compared to the time Ton.No need for assumptions. Let's just do the math. Back to the example, with slightly changed names (taken from my sheet of notes): ,-- V | | / \ R1 / | Rp | PWM >---/\/\/---x [0..Vp] | | C ----- ----- | | gnd Some definitions are in order: V: Arbitrary DC voltage supply Vp: Arbitrary PWM high-side voltage (low-side assumed gnd) toff: PWM time within cycle, at gnd ton: PWM time within cycle, at Vp tcyc = ton + toff Va = (V * Rp + Vp * R1) / (R1 + Rp) Vb = V * Rp / (R1 + Rp) R = R1 * Rp / (R1 + Rp) k = 1 / (R*C) Vb - Va*e^(-k*tcyc) + (Va-Vb)*e^(-k*toff) VnodeLO = ----------------------------------------- 1 - e^(-k*tcyc) Va - Vb*e^(-k*tcyc) + (Vb-Va)*e^(-k*ton) VnodeHI = ---------------------------------------- 1 - e^(-k*tcyc) I think we are agreed already, up to this point. If not, let me know. Okay, now I want to compute the ripple (dI/I) in R1 in the above circuit. Right? Given: VnodeMEAN = (VnodeHI + VnodeLO) / 2 InodeLO = (V - VnodeLO) / R1 InodeHI = (V - VnodeHI) / R1 InodeMEAN = (V - VnodeMEAN) / R1 Then: dI/I = (InodeLO - InodeHI) / InodeMEAN (V - VnodeLO) / R1 - (V - VnodeHI) / R1 dI/I = --------------------------------------- (V - (VnodeHI+VnodeLO)/2) / R1 (V - VnodeLO) - (V - VnodeHI) dI/I = ----------------------------- V - (VnodeHI+VnodeLO)/2 VnodeHI - VnodeLO dI/I = ----------------------- V - (VnodeHI+VnodeLO)/2 2 * (VnodeHI - VnodeLO) dI/I = ------------------------- 2 * V - VnodeHI - VnodeLO Okay, that's my definition for dI/I. Now, what I'd like to do is to insist that this dI/I be under some threshold, as in: dI/I <= RIPPLE So, since I have exact expressions for VnodeHI and VnodeLO, let's substitute those exact expressions and solve. I'll proceed quickly, so I won't show all the work (too much typing, frankly.) But if you disagree with any, just yell at me: dV(R1) = VnodeHI - VnodeLO 1 + e^(-k*tcyc) - e^(-k*ton) - e^(-k*toff) = (Va - Vb) * ------------------------------------------ 1 - e^(-k*tcyc) Also, 2*Vmean = VnodeHI + VnodeLO (Va+Vb)*(1-e^(-k*tcyc))+(Va-Vb)*(e^(-k*toff)-e^(-k*ton)) = -------------------------------------------------------- 1 - e^(-k*tcyc) Before getting back to the dI/I equation, some short-hand might help keep this smaller: k0 = e^(-k*tcyc) k1 = e^(-k*ton) k2 = e^(-k*toff) and since tcyc = ton + toff: k2 = k0 / k1 So, substituting the above pieces: 1 + k0 - k1 - k0/k1 2 * (Va - Vb) * ------------------- 1 - k0 dI/I = ----------------------------------------------------- (Va + Vb)*(1 - k0) + (Va - Vb)*(k0/k1 - k1) 2 * V - ------------------------------------------- 1 - k0 2 * (Va - Vb) * (1 + k0 - k1 - k0/k1) dI/I = ------------------------------------------------- (2*V - Va - Vb)*(1 - k0) - (Va - Vb)*(k0/k1 - k1) Here's where the new twist comes in, which I didn't mention in my earlier post. It's simply that my V is set to the same value as my Vp. In this case, then, V = Vp = Va. So, we have: 2 * (Va - Vb) * (1 + k0 - k1 - k0/k1) dI/I = -------------------------------------------------- (2*Va - Va - Vb)*(1 - k0) - (Va - Vb)*(k0/k1 - k1) 2 * (Va - Vb) * (1 + k0 - k1 - k0/k1) dI/I = ------------------------------------------- (Va - Vb)*(1 - k0) - (Va - Vb)*(k0/k1 - k1) 2 * (Va - Vb) * (1 + k0 - k1 - k0/k1) dI/I = ------------------------------------- (Va - Vb) * (1 - k0 - k0/k1 + k1) 2 * (1 + k0 - k1 - k0/k1) dI/I = ------------------------- (1 - k0 - k0/k1 + k1) 2 * (k1 + k0*k1 - k1^2 - k0) dI/I = ---------------------------- k1 - k0*k1 - k0 + k1^2 2 * (k1 - 1) * (k0 - k1) dI/I = ------------------------ (-k1 - 1) * (k0 - k1) 2 * (1 - k1) dI/I = ------------ 1 + k1 That little assumption removes a lot from here. There's no k0!! It's gone! The solution for k1 is then this obvious result: 2 - dI/I k1 = -------- 2 + dI/I Of course, we can now substitute for k1, again: 2 - dI/I e^(-k*ton) = -------- 2 + dI/I Or, ton = -(1/k) * ln((2-dI/I)/(2+dI/I)) Or... ton = -R*C*ln((2-dI/I)/(2+dI/I)) Which was my original assertion. The PWM cycle time just disappears. Of course, all this assumes that V = Vp. A not-uncommon situation. Interesting? Jon |
Re: A question about the modeling in LT Spice -- results <> theory?
Jonathan Kirwan
On Wed, 30 Apr 2003 19:41:15 -0000, you wrote:
--- In LTspice@..., Jonathan Kirwan <jkirwan@e...> wrote:It's remained true in my explorations. I'll send you some BASICOn Sun, 27 Apr 2003 00:50:31 -0000, Helmut wrote:Hello Jon,Hi. I've played around with this on paper for a bit, this code, if you'd like, which doesn't rely on my development but uses numerical methods applied to basic principles. Neat. I think it's a matter of talking at cross-purposes, though. I don't have time, right now, to document my steps. But they are on paper and I can translate them, later on today. I'll also get a chance then to more carefully read your post and reply. This is just a quick one to say that I've seen what you've written. By the way, while the ton time remains set by the unitless ripple error and the RC time constant, independent of PWM cycle time, the minimum current allowed is still a function of both of these. I didn't mean to imply that. Thanks very much for your considerations in all this and I will get my calcs out, for you. Until later on (perhaps three or four hours from now), Jon |
Re: A question about the modeling in LT Spice -- results <> theory?
--- In LTspice@..., Jonathan Kirwan <jkirwan@e...> wrote:
On Sun, 27 Apr 2003 00:50:31 -0000, Helmut wrote:Hello Jon,Hi. I've played around with this on paper for a bit, this Hello Jon, I tried my own math to get a new formula, because I couldn't believe that your formula is correct. Assume that your period is very long compared to the time Ton. The capacitor will be charged to a voltage of dV=Ton*Vp*(R1/(R1+R2)/(R1*R2/(R1+R2)*C) = Ton*Vp/(R2*C). Now assume a very long period so that the capacitor will be discharged totally. I believe this is the worst case. The voltage dV is then the total ripple voltage too. Let's further assume the mean voltage drop V1 on R1: V1 = V*R1/(R1+R2). This is because I assumed a Ton/Tcyc << 1 is worst case. So we get: RIPPLE = dv/V1 = Ton*Vp/(R2*C) / (V*R1/(R1+R2)) RIPPLE = Vp/V * Ton/(R*C) Ton = R*C * RIPPLE * V/Vp ------------------------- or Ton <= R*C * RIPPLE * V/Vp as the upper limit Example: R*C=1ms Ripple=0.01 Vp=14, V=5 Ton < 0.001*0.01*5/14 = 3.6us Some comment to your formula: Ton = 1ms*0.01 = 10us My simulation shows that my 3.6us are correct. So your formula seems to be wrong. Anyway it was a nice exercise for me and still a surprising result. I always check formulas with simulations/numerical calculations. Best Regards Helmut |
Re: A question about the modeling in LT Spice -- results <> theory?
Jonathan Kirwan
On Sun, 27 Apr 2003 00:50:31 -0000, Helmut wrote:
Hello Jon,Hi. I've played around with this on paper for a bit, this morning. What came out is interesting, I think. Here's that circuit, again: ,-- V | | / \ R1 / | R2 | [Vnode] PWM >---/\/\/---x | | C1 ----- ----- | | gnd I'm actually looking at the ripple across R1 as a percentage of that voltage, ((VnodeHI-VnodeLO)/(V-VnodeMEAN)). What's important to me isn't (VnodeHI-VnodeLO)/VnodeMEAN or the absolute magnitude of (VnodeHI-VnodeLO). This is because I'm playing with a design for a PWM-driven two-quadrant current source/sink for a pin-driver. The important element is the current through R1 and I need to control the current noise below some arbitrary limit I set. Things get better for me as Vnode gets closer to ground. What's worrisome to me is what happens as I let Vnode get close to V, since although the ripple voltage is declining some as V is approached, the (V-VnodeMEAN) is also declining rapidly, as well. Your equation, which simplifies itself using the worst case situation for dV, could be used to estimate the largest ON time for the PWM. But it's overly aggressive for my use. It turns out that the exact solution, using full exponentials without approximations, yields a surprisingly simple resulting equation which is exact, as well as simple. If you remember, the exact form, before simplifying to yours is: 1+e^(-tcyc/(R*C))-e^(-ton/(R*C))-e^(-toff/(R*C)) dV = (Va-Vb) * ------------------------------------------------ 1 - e^(-tcyc/(R*C)) If I specify a maximum RIPPLE in (dV/V) [or (dI/I), I suppose], what I'd like to do is find the largest "ton" time, where: RIPPLE >= dV / (V - VnodeMEAN) It turns out that it is: ton <= -R*C*ln((2-RIPPLE)/(2+RIPPLE)) Quite a bizarre result, when I first saw it: It suggests that the on-time for my use is independent of the PWM cycle time! What?? Yes! For my needs, my limit on ripple amounts to specifying the longest possible on-time for the PWM, whatever the PWM period might be. This is true, as calculations appear to bear out. A shorter PWM period simply means that my ripple requirement will always be met, no matter the duty cycle. A longer PWM period means I need to be careful not to exceed this on-time. Frankly, I have to admit that my intuition didn't tell me this result, beforehand. Anyway, there it is. If you want to, see if you can derive this same result or else tell me why it should have been obvious to me without the math involved. I'd be happy to learn new intuitive viewpoints -- I'm still working this through my mind, this morning, and I expect at some point I'll see the "Ah, so that's why." But I wouldn't mind getting that point sooner, if you can point out the obvious path for me. (I'll also show my math work, if you'd like.) Jon |
to navigate to use esc to dismiss