×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Inductance Current

Inductance Current

Inductance Current

(OP)
The relation between voltage and current for an inductor is given by:
v = L . di/dt
I think this relation is valid only in steady state periodic cyclic operation and provided that the circuit contains a resistive element.
My question now :Why a resistive element should be contained in the circuit to make this relation valid ?

RE: Inductance Current

That relation (usually with a minus sign) is always valid. No exception.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

There have been many failed attempts to wind an induction coil without resistance.
There has been some success with super conductive magnet coils but although these coils are inductive and without resistance the nature of them is such that there is no variation in the current under normal operating conditions. Actually the only way to change the current is to introduce some resistance into the circuit by heating a small portion of the superconductive coil to drive it out of the superconducting region.  

Bill
--------------------
"Why not the best?"
Jimmy Carter

RE: Inductance Current

(OP)
Even the simulator doesn't work if pure inductance is connected across AC supply unless a resistor in series included.

RE: Inductance Current

That is a common problem with simulators. They need a finite resistance so you do not get a divide-by-zero error in the steady state solution.

It is about reality. Not that the relation doesn't hold.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

It doesn't work in the real world either.
But perhaps the simulator is working. Zero resistance would be expected to return a value of zero in many of your equations. You may get a few divide by zero errors also.  

Bill
--------------------
"Why not the best?"
Jimmy Carter

RE: Inductance Current

Total agreement there, Bill!

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

(OP)
So,why for a steady state cyclic operation we need a resistive load with the pure inductance to get a vlid relation between current and voltage according to the equation:
v = - L.di/dt  ???
What is the secret in that resistor ???

RE: Inductance Current

As you can see, the di/dt is a derivative and the relation that is responsible for the transient solution.

For the steady state solution, Ohm's law is valid and if you make R in the I=E/R equal to zero, you will get divide by zero.

Nothing to it. Just plain elementary physics and math.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

(OP)
That is ok,but at transient L has infinit impedance and at steady state has a finite impedance and not zero.

RE: Inductance Current

If you can switch your simulator to 'transient only', that would work. But all simulators I have worked with always deliver a complete solution. That means transient AND steady state.

You may need to study how simulators work.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

(OP)
Let us explain this phenomena in different way:
Suppose a voltage of train of square wave of pluses (with only positive polarity)applied to a pure inductance,and  according to the equation:
V = N.do/dt  , whare o is the flux
The flux wave form will start from zero and increases linearly to its positive peak and the decreases to zero again and and then back to its positive peak ,amd never goes to negative polarity.
But because of a resistor in the circuit the flux will swing between positive and negative peaks.
My question again ,why a resistor in the circuit makes that difference ?  

RE: Inductance Current

When you suddenly apply a periodic excitation, the solution has two components:
1 - a steady state solution
2 - a transient solution

I assume your square wave averages to zero (otherwise if you apply it to inductor alone, the solution would grow to infinity).  This problem then acts very similar to sinusoidal excitation

The transient solution has a dc component.  
When a resistor is present, the steady state solution does not have a dc component. When the transient component decays to zero with time constant L/R, all that is left is the steady state solution with no dc current.

The simulator is telling you the correct solution. Try to solve the problem yourself and compare. If the square wave problem is too hard, try it with sinusoidal source.

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

And going to your original question, I agree with the others.  v = L*di/dt describes the behavior of an ideal inductor under both steady state and transient conditions.  

By ideal inductor, I mean resistance neglected, saturation neglected, hystesis neglected etc.  When you make those assumptions what is left is the ideal inductor which follows v = L*di/dt under all circumstances by definition

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

(OP)
Yes,correct the square wave averages to zero - it is identical around the horizontal axis.

RE: Inductance Current

(OP)
electricpete,what is the transient response of a pure inductance to a square wave ? With no resistor included.  

RE: Inductance Current

Let's look at a simpler excitation. Just apply a single pulse with your voltage source and then turn your voltage source back to zero for the rest of eternity.

The initial pulse will be enough to create some current in your R-L circuit.  Can that current continu flowing forever?

I hope you answer is No.  The resistor is dissipating energy and there is no input from the source, so the system loses energy and must eventually end in zero state.  Once the voltage is switched off, the current decays according to I(t) = I(t0)*exp(t-t0)

You can think of your square wave as superposition of a series of pulses.  The dc component is a characteristic of the initial startup transient and it decays to zero just like our single pulse. What is left after a long period of time is the steady state component which has no dc in an R-L circuit.

 

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Correction in bold:
Once the voltage is switched off, the current decays according to I(t) = I(t0)*exp(t-t0)
should've been:
Once the voltage is switched off, the current decays according to I(t) = I(t0)*exp((t-t0)*R/L)

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

(OP)
I am agree with you electricpete in the case of a resistor exists in circuit ,but what would be the behavior if no resistor is there, just only pure inductance.

RE: Inductance Current

Chezma,

Your 23 Jan 11 11:36 does not say anything new. It is the same question as before - simply because there is a linear and direct dependence between current and flux in an ideal coil.

So even if you try to make us understand, which you really do not need to, it would be much better if you tried to understand that what you have observed and what Pete, Bill and I are telling you is the truth.

Endless discussions like this one will only diffuse your field of view and are also rather tedious.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

(OP)
Well,until now i have not get any clear answer,if the current contains ac and dc component,then to block the dc current component then we need a capacitor not resistor !

RE: Inductance Current

You have 'get' very clear answers. But you have not cared to even try understanding the math and physics in this quite simple system. I will not try to help you any further.

What can you do, Pete?  

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

OP should browse Wikipedia. There's enough detail there to fully understand how an ideal inductor works. No need to derive it all again here.

RE: Inductance Current

Gunnar - I have the answer... Punt!  (like the Chicago Bears did almost every time they had the ball today).

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

chezma - fwiw I agree with the others. These seem very basic questions. From what you described 23 Jan 11 11:36, your circuit simulator is giving the correct response.  I would suggest to find a circuits book to study.  Use your simulator... if the answer doesn't look like you expect then try to understand it. If you really think it's wrong, then you can post a full problem statement and simulator solution here and explain why you think it's wrong... most of the time the simulators are right.

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Try iterating sample circuit calculations with the resistance cut in half at each iteration.
Tip. Long before you get near zero inductor resistance the source effective resistance will become significant in the real world.

Bill
--------------------
"Why not the best?"
Jimmy Carter

RE: Inductance Current

Chezma, In attempt to be helpful without being wordy, and to make sure we are all talking about the same thing, I have attached a solution of a series L/R circuit powered by a square wave voltage source Vs (see first plot for Vs(t)).  The inductance value is L=1. Solution plots are provided for three different values of R: R = 0, R=0.2, and R=10 (as shown in the plot titles. )
R=0 has a dc component that does not decay
R=0.2 has a very noticeable decaying dc component
R=10 has no noticeable dc component (it decays before the 1st peak)

Compare it against your own computer simulator and mental simulator.

Note there is a "phase angle" inherent in the definition of Vs(t) that affects the dc offset results. I think if Vs had started with a half-width pulse instead of a full-width pulse, there would have been no dc offset.

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

(OP)
Thanks pete,that is a perfect answer to my question.
May i ask you where i can get a copy of the simulator software you have ?

RE: Inductance Current

That software is a 10+ year old student version of Maple. It is currently around $99 for the student edition and $1,895 for the professional version.  If you can get your hands on the student version of Maple, I would say it is a great investment... not so much for the numerical simulation but for the symbolic solution capabilities which encourage you to tackle a problem symbolically rather than numerically.

I think Mathcad and Mathematica are similar although I've never used them.

If simulation is what you're after, there are a lot of possibilities like Pspice, Matlab ODE routines like ODE45, free Matlab clones (Octave, Sci-lab) etc.   I'm partial to using a general ODE solver rather than circuit solver myself.   Maybe others will chime in on the simulator software question or direct you to a previous thread on that.

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Nice, Pete!

I assume that the student version of Maple (and probably also the 'pro' version) has a minimum default value for the first order term. Without it, you get lots of questions like the one that caused this thread. In pure circuit simulators, there's a nanoohm-microohm built into the reactive components so you do not get the divide-by-zero message.

Or does Maple have any other mechanism that catches that?

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

Chemza's post 23 Jan 11 11:36 described expected output for an R-L circuit.  His earlier posts were not clear but I assume when he said the simulator wouldn't work he meant that it just wasn't giving the results he expected.

Maple have a number of options for dsolve... if you want a specific numeric solution method there are extra arguments to dsolve, but if you don't use any it uses a symbolic method and the solution is symbolic:
i.e. dsolve({subs({L=1,R=10},DiffEqn),i(0)=0},i(t)) outputs the following exact algebraic solution, just as if you had solved it by hand:

CODE

i(t) = 1/10 Heaviside(t) - 1/5 Heaviside(t - 1)

     + 1/5 Heaviside(t - 2) - 1/5 Heaviside(t - 3)

     + 1/5 Heaviside(t - 4) - 1/5 exp(-10 t + 140) Heaviside(t - 14)

     - 1/5 Heaviside(t - 5) + 1/5 Heaviside(t - 6)

     - 1/5 Heaviside(t - 7) + 1/5 Heaviside(t - 8)

     - 1/5 exp(-10 t + 100) Heaviside(t - 10) - 1/5 Heaviside(t - 9)

     + 1/5 Heaviside(t - 10) - 1/5 Heaviside(t - 11)

     + 1/5 exp(-10 t + 10) Heaviside(t - 1)

     - 1/5 exp(-10 t + 200) Heaviside(t - 20)

     + 1/5 exp(-10 t + 190) Heaviside(t - 19)

     + 1/5 exp(-10 t + 70) Heaviside(t - 7)

     + 1/5 exp(-10 t + 130) Heaviside(t - 13)

     + 1/5 exp(-10 t + 50) Heaviside(t - 5)

     + 1/5 exp(-10 t + 30) Heaviside(t - 3)

     - 1/5 exp(-10 t + 40) Heaviside(t - 4)

     + 1/5 exp(-10 t + 110) Heaviside(t - 11)

     - 1/5 exp(-10 t + 60) Heaviside(t - 6) + 1/5 Heaviside(t - 12)

     - 1/5 Heaviside(t - 13) + 1/5 Heaviside(t - 14)

     - 1/5 Heaviside(t - 15) - 1/5 exp(-10 t + 120) Heaviside(t - 12)

     + 1/5 Heaviside(t - 16) - 1/5 Heaviside(t - 17)

     - 1/5 exp(-10 t + 160) Heaviside(t - 16) + 1/5 Heaviside(t - 18)

     - 1/5 Heaviside(t - 19) + 1/5 Heaviside(t - 20)

     + 1/5 exp(-10 t + 150) Heaviside(t - 15)

     + 1/5 exp(-10 t + 170) Heaviside(t - 17)

     + 1/5 exp(-10 t + 90) Heaviside(t - 9)

     - 1/5 exp(-10 t + 20) Heaviside(t - 2)

     - 1/10 exp(-10 t) Heaviside(t)

     - 1/5 exp(-10 t + 80) Heaviside(t - 8)

     - 1/5 exp(-10 t + 180) Heaviside(t - 18)
The problem is not particularly challenging for a numeric solution.  ODE solutions of d/dt(x(t),t) = f(x(t),t) fall into the categories of explicit and implicit.  
The forward Euler method is an example of explicit:
X(t+h) = X(t) + f(X(t))
It will not fail as long as there is a solution f(X(t)) which does not blow up.  An iterative explicit variable step size routine would decrease step size to the minimum around the step-changes in V(t), but wouldn't have any problems generating a solution.
Matlab's ode45 is a more common example of explicit method.

The backward Euler method is an example of implicit method:
X(t+h) = X(t) + f(X(t+h))
it is not a straightforward calc since X(t+h) is only implitly defined.
I think most circuit solvers use the trapezoidal method which is also an implicit method:
X(t+h) = X(t) + 0.5*(f(X(t) + f(X(t+h))
It is also an implicit technique since there is no explicit formula for X(t+h).
For an inductor
I(t+h) = I(t) + 0.5*(V(t) + V(t+h))/L
The problem is V(t+h) is not necessarily known without I(t)
If we solve for 2 variables I(t+h) and V(t+h) in terms of the variables I(t), V(t), we have a relationship between I(t+h) and V(t+h) in terms of known quantities (V(t), I(t), L). This resembles an impedance relationship in terms of h and can be collected together in an impedance matrix and inverted.  I assume the inversion step is where the problem occurs in circuit solvers which use an implicit integration method.  Again should be no problem for explicit methods.

Sorry if this is more than you wanted. If you have any insight on the error you were talking about I'd be interested to hear... I was guessing as to the cause (matrix inversion)

 

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Yes. A little bit more than I can digest. But I think it is about the matrix inversion with a zero involved that causes the problem.

Looks like Maple handles it well.

Thanks.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

From the LTSpice_IV introduction:

"Another benefit of these new simulation devices is that convergence problems are easier to avoid since they, like the board level component the model, have finite impedance at all frequencies."

I think that says it quite well. Making all components having finite impedance at all frequencies - also DC. That means that there are no zero ohm inductors, among other things.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

(OP)
Is the super conductor already available in the market in a wire form ?
What that material is?
What about the cost ?

RE: Inductance Current

It has been available for a long time, but not commercially and in usable wire form. At least not to my rather limited knowledge. I was involved in a study back in the sixties where the use of superconductors in generators was tried at ASEA. The problem then was to keep temperatures down in the 0 - 4 K region as well as stopping resistivity from leaving zero when the conductor was exposed to magnetic flux.

Same problems today. Only that temperature can now be a lot higher. But still quite cold. Sensitivity to magnetic flux still there. Not good in a coil supposed to produce a magnetic field.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

Superconducting motors (including coils) are supposed to be installed in some 'near-future' ships:

2009 news: "[successful] full-power testing of the world's first 36.5 megawatt (49,000 horsepower) high temperature superconductor (HTS) ship propulsion motor..."

See also: amsc.com

 

RE: Inductance Current

One of my good friends spent his career working with NMR machines. The magnetic field was so strong and so far past the saturation point of iron that air core magnets were used.
These units would withstand the intense magnetic field but an upset in the field would often drive part of the coil into the ohmic conduction range. This would instantly avalanche and the whole coil would go into ohmic conduction. The liquid helium would boil and often a part of the safety valve would become impaled in the ceiling. The scientific name for this event is a "Quench". NMRs for student use may have several holes in the ceiling from quenches.

Bill
--------------------
"Why not the best?"
Jimmy Carter

RE: Inductance Current

The more-modern HTS require only liquid nitrogen.

There's an installation at Holbrook substation on Long Island, New York, running "138kV at 2400A ~574MVA".

 

RE: Inductance Current

I was thinking about the difference between R-L circuit branch and L-only branch (driven by a sinusoidal voltage for example) to see what might be inherent in the circuit configuration that can create numerical difficulties.  We know what the exact solutions look like:  One important aspect is that any dc offset present on the L-only branch will remain forever whereas any offset present in the R-L branch will decay away.

Now what if we think about the computation error in one time-step as a dc offset for the next step...     In the case of the R-L system, the effect of an error at time t will be no longer evident after awhile... for example after 10 time constants..  But the effect of errors in the L-only circuit remain forever for the entire simulation.  So if I run the simulation for a very long time, the R-L circuit has only errors accumulated from the last 10 time constants for example, whereas the L circuit has errors accumulated from each step of the entire simulation.   

The errors at each step come from local truncation error (approximating Taylor series with some kind of truncation used by the algorithm) as well as rounding errors.  If the errors all tend to add in the same direction, then clearly the L-only case will accumualte more errors. But even if the errors vary randomly poisitive and negative, the standard deviation of the error will be much larger for the L-only case than for the R-L case  (if we run the experiment many times, the error averages to zero but the spread of errors is much larger for the L-only case).

I did a small experiment to check if this would cause a problem (attached).  It shows an L-only circuit driven by a 50hz sinusoid for 25 seconds (1250 cycles) using a 0.002 sec timestep.    The closing angle and magnitude are set up such that the magnitude of the ideal current waveform varies between 0 and 2 (dc offset of 1).     A Runge-Kutta 4th order method is used for simulation (see Runge-Kutta tab for equations from wiki... pretty simple).   You can view in tab "main"  the plot of the results between 24.5-25 seconds and the current magnitude is exactly between 0 and 2 as expected from ideal solution.  In fact if you look at the time 25.000, we expect the value is exactly zero and we read the numerical value from the spreadsheet to be 7E-13.   I think for most purposes it is not an error to concern ourselves with, even though we accumulated errors over a very long simulation.

Other than the above concern which is shown to be relatively minor, I can't see any other problems with this L-only configuration.

My best guess is that whatever reason Spice forbids this L-only configuration has more to do with the particular algorithm used by Spice than with problems inherent in the circuit configuration itself.  But I don't know anything about Spice.   
 

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

The thread has died down, so I hope it is not a problem if I take it over for my own tangent.

I don't know if you guys were surprised, but I was very surprised to get such a low number for "accuracy" in the my R-L simulation posted just above, especially considering I was using such a big step size  (my first reaction was: D*mn!.... that Runge-Kutta is amazing). Now I have studied it a little more and it turns out there is more to the story....

In general (from textbooks), there are 2 types of errors that can occur at a given step:
1 – Roundoff error – independent of step-size.   It is assumed to vary randomly from step to step (not correlated with previous steps).   Since it varies randomly, by the Central Limit theorem, we can predict that the standard deviation of the cumulative roundoff error after N steps is sqrt(N)*sigma where sigma is standard deviation of roundoff error for one step and N is number of steps (N assumed large for C.L.T.)
2 – "Local Truncation Error".  This is not "truncation" as in roundoff, but "truncation" as in truncating the infinite Taylor series associated with the exact differential equation/solution  down to a  finite Taylor series associated with our approximate algorithm/solution. The magnitude of this particular error  increases with step size.  In contrast to roundoff error, the variation in LTE between steps might not be random (in this case there is a definite non-random pattern as we will discuss.

Now let's analyze how these two errors might appear in our R-L simulation example:
1 - First roundoff error.  Excel uses double precision, where the relative error (of one step) will be on the order of 1E-15 to 1E-14.  Since the variable varies between 0 and 2, averaging about 1 that is also our absolute error.  For the previous example 25 seconds sampled every 0.002 seconds, it was 12,500 steps and (by Central Limit Theorem) we expect the standard deviation of the accumulated roundoff errors at the end to be 1E-15 to 1E-14 * (sqrt(12,500)) = 1E-13 to 1E-12.     So the observed value of 7E-13 that we saw at t=25.000 seconds was very reasonable considering accumulated roundoff error alone.   

2 - Next let's discuss Local Truncation Error.  It could probably be analyzed mathematically, but I took a different approach... attached I have modified my spreadsheet to add a plot labeled "Error" based on numerical comparison of the simulation output to the true known solution I(t) =1-cos(2*pi*50*t).    On the "Error" plot graph you see a sinusoid which varies from 0 to –0.0001.   The error plot is periodic at 50hz and it roughly reaches 0 whenever time t is an exact multiple of 1/50hz = 0.020 sec.   Also I made the step size an irrational number sqrt(3)/1000 to make sure relationship between step size and exciting frequency is not causing any irregularity (it is not).  However if you vary the step size (cell D7, labeled "dt"), you will see that the magnitude of the error plot goes up when you increase dt and goes down when you decrease dt.... which is an expected characteristic of Local Truncation Error.

The above facts lead us to the following conclusions about this particular R-L simulation:
A – The global truncation error (sum of accumulated local truncation errors) is many many order of magnitudes higher than the roundoff error for this simulation.
B – The global truncation error in this particular simulation is periodic at frequency 50hz, which implies the local truncation error is periodic at 60hz.   In retrospect, it is not surprising that the error associated with truncating a sin wave at a finite number of terms is itself periodic.
C – The periodicity of the truncation errors prevents them from accumulating to very high values during a very long simulations (global truncation error varies between 0 and some max number, but doesn't tend to increase without bound over time).   However we should not expect that to be the case for general excitations other than sinusoidal.    I am  envisioning I could create a problem using a sawtooth voltage wave where the rising edge is given by (t-tstart)^5 and the falling edge drops sharply, and we add a constant to make the average value of the voltage waveform zero... I think the local truncation errors will be all the same sign and the global truncation error will continually grow with time during a long simulation.  (If you see another post appear in this thread, it is probably me trying that idea out).
D – The previous post examined the error at a time t=25.000 sec, exactly divisible by 0.020 when the global truncation error happened to be zero, so results (1E-12 corresponding to accumulated roundoff) were a "little" misleading winky smile.  If we examined the error of the same simulation at a different "phase angle", we might have seen up to 1E-4 error (periodic, not increasing over time).   And as described in C there may be other non-sinusoidal exciting waveforms which whose global truncation error increase continuously over time to much higher values.
 

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Also I forgot to tie my recent discussion back to a topic more related original question.  The R-L circuit driven by periodic zero-average voltage source does not accumulate errors forever, it only accumulates them as long as it's memory will permit (roughly 10*L/R).  In contrast the L-only circuit accumulates those errors forever.   So if accumulation of truncation errors causes a problem, that might be the reason why the L-only circuit configuration is prohibited

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

(OP)
Thank you.  

RE: Inductance Current

There is a typo in my formula for slope K4.  For example, in cell G18
=(V_*SIN(W_*($B18+dt_))-R_*($C18+[b]dt_/2[]*F18))/L_
should have been:
=(V_*SIN(W_*($B18+dt_))-R_*($C18+dt_*F18))/L_

But it doesn't make any difference in the solution when R=0, which was the case for everything I discussed above.

Yes, the spreadsheet used a fixed-step size Runge-Kutta 4th order method shown here:
http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods

For circuits with more than one element, you have to put them into the form: d/dt(x(t)= f(x(t),t) where x is a vector of state variables. Generally that is easily done by making your inductor currents and capacitor voltages the state variables.  The extension from scalar to vector case should be fairly intuitive.  It does get a little cumbersome to do it in a spreadsheet which doesn't handle vector variables, so I use vba when I have more than one state variable.  Beyond the fixed-step size Runge-Kutta 4th order method, it is very common to use the Runge-Kutta Felhburg (spelling?) method which adjusts the step size to control the estimated local truncation error.  It determines the local truncation error of the 4th order RK by comparing it to a 5th order RK method.  That's what Matlab ODE45 uses.  I have a spreadsheet that does something like that using vba which I can post if you want, but if you don't know how to program vba (to define the slope function) it won't do you any good.

Any numerical analysis textbook will cover the above and a lot more about numerical solution of Ordinary Differential Equation initial value problems such as this.

I can't help you with Spice.

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Here are a couple of runs in LTSpice. Trying to run with zero ohms doesn't work. Adding one microohm helps. The simulation is with simplest possible data, all ones - except series R.

Driving waveform is a sinewave and phase shift is zero. That results in an initial DC component that seems never to die because of the hefty L/R time constant (1 megaseconds). If you let the simulation run long enough, you will see the DC component decaying.
 

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

Sorry. A 'divide by' missing.

(tolerance times maximum voltage divided by maximum current)10 (or 100)

shall read

(tolerance times maximum voltage divided by maximum current)/10 (or 100)

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

"Let's look at a simpler excitation. Just apply a single pulse with your voltage source and then turn your voltage source back to zero for the rest of eternity.

The initial pulse will be enough to create some current in your R-L circuit.  Can that current continu flowing forever"

I come late to the party, but excuse me, if you are talking a pure ideal inductor, the answer is yes, the current will go on for "the rest of eternity"

 

RE: Inductance Current

Did you notice that the clip you quoted says R-L circuit?

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

I only looked at your first line response after I saw

"electricpete,what is the transient response of a pure inductance to a square wave ? With no resistor included".  

    
YOUR ANSWER

"Let's look at a simpler excitation. Just apply a single pulse with your voltage source and then turn your voltage source back to zero for the rest of eternity.

The initial pulse will be enough to create some current in your R-L circuit.  Can that current continu flowing forever?

I hope you answer is No.........................."

I didn't look further and never noticed the R_L you tossed in.

No wonder why the OP was confused, especially  with all the extraneous irrelevant answers he was getting.

RE: Inductance Current

Zekeman

I do not think you are fair in that last comment.

The OP got lots of valid answers to his initial question. But he never bothered to try and understand what they said.

Did you read all those "extraneous irrelevant answers he was getting"? Your reading strategy ("I only looked at your first line" could perhaps benefit from a slight adjustment.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Inductance Current

Yes, this thread went a lot of places, including the OP stating: "My question again ,why a resistor in the circuit makes that difference ?"

To answer that question, you need to discuss both cases as I have done in this thread.

The question"electricpete,what is the transient response of a pure inductance to a square wave ? With no resistor included" was timestamped "23 Jan 11 12:09".

The post of mine addressing R-L circuit was timestamed  23 Jan 11 12:14.  I was probably typing while he was posting because this was followup to an earlier point and not direct response to that question which I never saw.

The OP understood exactly what the R in R-L meant as he followed up with "I am agree with you electricpete in the case of a resistor exists in circuit ,but what would be the behavior if no resistor is there, just only pure inductance. "  23 Jan 11 12:49

Later, the OP has later acknowledged by help "Thanks pete,that is a perfect answer to my question."

Time to move on imo. Unless you would like to talk about R-L circuits or why Spice makes you put a resistor in there.
 

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

OK, I see your point. I guess timing is everything.
Good answers by you.
But in all fairness, the 1st poster nailed the rather trivial question and it should have ended right there. A lot of wasted ink.

RE: Inductance Current

There were followup questions after that first question and the exact underlying question was not clear. One aspect of the question was the unique requirements of Spice which I think have still not been definitively answered.

In the shared interest of conserving electronic ink, may I suggest to move on? (unless there are other comments related to the questions raised in this thread).

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Quote (electricpete):

One aspect of the question was the unique requirements of Spice which I think have still not been definitively answered.
What I meant is that we still dont' know definitively why Spice requires a resistor in series with an inductor.  (I don't want to downplay the contributions of others who did a good job explaining what Spice requires.)

=====================================
(2B)+(2B)'  ?

RE: Inductance Current

Going back to zekeman's comment (wasted ink), I should point out for anyone that cares enough to read an entire completed thread aftewards that there was at least one question asked (28 Jan 11 21:46) which was later removed.  However I recognize I am not doing any myself any favors in my last 3 posts with respect to "wasted ink", so I will now adjourn and endeavor to proofread, be succinct, and avoid tangents.

=====================================
(2B)+(2B)'  ?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources