| Electronics > Projects, Designs, and Technical Stuff |
| LTspice current injection |
| << < (3/5) > >> |
| Gaktyt:
--- Quote from: SiliconWizard on May 29, 2020, 10:36:23 pm ---As you saw, LTSpice in particular and Spice in general need explicit initial conditions in somes cases. In particular, if you don't do so, initial voltage across capacitors (and current through inductors) is not guaranteed to be zero. And yes, it can be confusing. --- End quote --- Yes I can understand that. But even with .ic I(L3)=0 I(L1)=0 the DC voltage level of the left circuit (with *2 current injected) is still equal to the initial capacitor voltage but with opposite sign, and I still can't understand why/how it is so, and I would very much like to learn which mechanism in the circuit that is responsible. I'm still guessing it has something to do with inductor BEMF though. |
| Jay_Diddy_B:
--- Quote from: Gaktyt on May 30, 2020, 07:57:14 am ---Yes I can understand that. But even with .ic I(L3)=0 I(L1)=0 the DC voltage level of the left circuit (with *2 current injected) is still equal to the initial capacitor voltage but with opposite sign, and I still can't understand why/how it is so, and I would very much like to learn which mechanism in the circuit that is responsible. I'm still guessing it has something to do with inductor BEMF though. --- End quote --- This is not really a SPICE or LTspic, it is an analog circuit design question. First you have to remember that a current source has infinite impedance. Obviously if the current is zero there is no movement of charge. Second CV=It In the master circuit the capacitor is discharged from 100V to zero. In the controlled circuit the current is double so the change in voltage is double. 200V instead of 100V since you start at 100V and the current direction is negative you end up at -100V. Consider this model: A parameter called multiplier is being stepped through the values 1, 2 and 3 These are the results: The change in voltage on C1 is equal to the change in voltage on C2 x the multiplier. Jay_Diddy_B with multiplier.asc (1.19 kB - downloaded 52 times.) |
| Gaktyt:
--- Quote from: Jay_Diddy_B on May 30, 2020, 11:18:34 am ---This is not really a SPICE or LTspic, it is an analog circuit design question. --- End quote --- Sorry about that, I was not sure what to call it. --- Quote from: Jay_Diddy_B on May 30, 2020, 11:18:34 am ---First you have to remember that a current source has infinite impedance. Obviously if the current is zero there is no movement of charge. --- End quote --- So a "B" source in LTspice has infinite impedance? Does that infer e.g. if I hypothetically made the circuit and injected the current with a BCI probe I would not see the same result as in the simulation? --- Quote from: Jay_Diddy_B on May 30, 2020, 11:18:34 am ---The change in voltage on C1 is equal to the change in voltage on C2 x the multiplier. --- End quote --- Check, got it, thank you very much for clearing that up for me. --- Quote from: Jay_Diddy_B on May 30, 2020, 11:18:34 am ---since you start at 100V and the current direction is negative you end up at -100V. --- End quote --- I'm sorry, I don't understand that part of negative current, I mean it do make sense to me, but it's negative in relation to what? I only put a (-) minus in front because otherwise the current wave form of the controlled circuit would be inverse, so my confusion is that in both circuits the current wave form is the same (except for amplitude obviously) but you talk about negative current? Could you please elaborate on that? |
| Jay_Diddy_B:
Hi, In SPICE a BI is a Behavioral current source. The current is described by an expression. It is not that it is behavioral or in SPICE, but any true current source has an infinite output impedance. Similarly any voltage source has zero impedance. Consider this: If you look at the current in R3 or L3 it is always equal to 1A. The current source I1 is forcing the current to be 1A The voltage across the current source is equal in value and opposite in sign to all the other voltage is in the loop. This is Kirchhoff's voltage law. Current flow has direction. Take a rechargeable battery, during discharge you can say you have positive current, current is flowing out of the battery. During charging you have current flowing into the battery you can call this negative current. You have positive and negative currents, just like you have positive and negative voltages. Regards, Jay_Diddy_B |
| SiliconWizard:
A related note regarding current sources in Spice. By default, they are ideal current sources. So the simulation will "force" the set current through the circuit, even if that would be physically impossible (in other words, it has no notion of voltage compliance). That can lead to very weird results in some cases. LTSpice has an interesting option for current sources: you can set them as "active loads". They will then act more or less as you would expect a current source in a real physical circuit. |
| Navigation |
| Message Index |
| Next page |
| Previous page |