Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A puzzle; AC or not?

Status
Not open for further replies.

alec_t

Well-Known Member
Most Helpful Member
Consider this simple circuit:
Parallel_R_L.gif
Simulation shows that current through the resistor is alternating, whereas current through the parallel inductor is unipolar. Why unipolar and not alternating?
 

Attachments

  • Parallel_R_L.asc
    551 bytes · Views: 260
Last edited:
It is still alternating current, but it is shifted ~330mA. Essentially the inductor "charges" up and discharges through the resistor. I imagine this is what forces it to stay on the positive side. I could do the math, if I could remember all the formulas :p

Anyway, it is still AC, it's just shifted to the positive side.
 
Actually with or without that resistor the results are the same. Also if you increase the resistance of the inductor the waferom slowly shifts toward being centered.
 
hi alec

You have to run the sim for a longer time for the inductor current to stabilise.

or
if you know the Inductors initial offset current, you can speed up your sim by setting the Inductors .IC.

E
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    39.4 KB · Views: 321
  • AAesp02.gif
    AAesp02.gif
    38.7 KB · Views: 327
  • AAesp04.gif
    AAesp04.gif
    41.4 KB · Views: 325
Last edited:
Anyway, it is still AC, it's just shifted to the positive side.
Presumably because the input AC starts off with a positive half cycle.
Actually with or without that resistor the results are the same.
Yes, I found that but I left the R there for comparison.

So, it's a 'gotcha' to watch out for when running sims.
Thanks guys.

@Eric
Edit: This thread was prompted by Heidi's sim problem in the 'power rating' thread. I see you and Mr Al have picked up on that now.
 
Last edited:
I posted a mathematical explanation for this phenomenon here.
Caveat: I am not a mathematician. I'm an engineer, and I learned my math about 50 years ago, so it's rusty.
 
Last edited:
Thanks for the explanation, Roff. My maths is >50 years old too and rustier than yours. I don't think I ever got to grips with integration by parts. :D
 
Thanks for the explanation, Roff. My maths is >50 years old too and rustier than yours. I don't think I ever got to grips with integration by parts. :D
I don't remember ever encountering integration by parts in my studies (although I may have). I ran across it while trying to figure out what was causing the DC current in the simulation.
 
which begs the question, what happens with the various solvers in LTSpice? it may just be a solver quirk.
 
Here is a blog at EDN comparing the various Spice simulators. He did have some comments on LTSpice. ...

**broken link removed**
 
It's pretty obvious some of you either didn't believe my explanation, or didn't understand it, or both.:D

Have a look at the attachment. Yeah, it's still LTspice, but this time there are no inductors involved, so you shouldn't get hung up on what we have been taught about them. Hopefully, you will believe that LTspice wouldn't screw up something as simple as an integral.

All we have this time is the integral of a sine wave that did not start at time=-∞. The start-up gives rise to the Dirac impulse function. The integral of the impulse is a step. Hence, the DC offset.
 

Attachments

  • sine wave integral.png
    sine wave integral.png
    31.5 KB · Views: 298
I'm convinced, Roff. Still not sure though where that leaves us when it comes to running sims which involve coils/transformers. Is it necessary to wait 'a long time' before conditons stabilise? Are the results in the first millisecs/secs unreliable re the real world?
 
The results are the same as they would be in real world, if you had those parts. The first rule is, if you want real-real-world resuls, use real world parts and circuits. You will never have an inductor with zero resistance and a voltage supply with zero output impedance, so you are unlikely to encounter this waveform. Now if you add some reasonalble resistance, the reuslts will settle much faster.
 
Now if you add some reasonalble resistance, the reuslts will settle much faster.
Yes, I'm finding that. One slight prob is selecting a 'reasonable' resistance. Not all inductive components have specs which include both inductance and (series) resistance, yet alone parallel resistance and parallel capacitance :(.
 
Another possibility to mimick the real world is to set the Initial condition of the inductor. If I run it with the IC=0, the simulation starts positive and slooowly settles. If I set the IC according to the final state, that is IC=-30mA for a 60mApp current, then simulation is where it "should be" from the beginning.
 
Another possibility to mimick the real world is to set the Initial condition of the inductor. If I run it with the IC=0, the simulation starts positive and slooowly settles. If I set the IC according to the final state, that is IC=-30mA for a 60mApp current, then simulation is where it "should be" from the beginning.

hi k,
Did that back in Post #5, image #3.

E.
 
Status
Not open for further replies.

Latest threads

Back
Top