EveryCircuit
Contact
Reviews
Home
bartoo
modified 11 years ago

Help LC oscillator

2
8
77
02:52:23
I took the this LC oscillator from the examples, and I simply changed the simulation speed. What I noticed is that both voltage and current amplitude decrease as the time goes by. Try to flip the switch and you will see. Can anybody explain me why; I didn't expect this behaviour from this circuit.
published 11 years ago
mewyn
11 years ago
The simulation is taking into account system losses. You can never have a perfect system where this oscillates forever because all components have some degree of energy loss to them.
bartoo
11 years ago
Thanks mewyn. Is there a place where I can find more about these losses (their amounts) that every circuit introduces?
Mamish
11 years ago
I think it's more to do with simulation inaccuracies. After all, these are meant to be ideal circuits, and an ideal LC would last forever. I you change the sim speed the rate of amplitude change goes with it (it goes disproportionately short or long compared to the change in sim speed), which leads me to think it's a consequence of too many periods on too slow a speed.
nwfenton
11 years ago
The curve doesn't look like a simulation error, but rather it looks like exponential decay due to simulated ohmic loss. The device models probably have a built in resistance to make the calculations work...
bartoo
11 years ago
Good point. I agree with nwfenton.
Mamish
11 years ago
It's the dependence of the decay on sim speed that has me convinced. If you use 10ms/s the waveform is severely decayed after about 20 periods, but on 1ms/s there's almost no loss at all after 100. Worth noting too that EC usually does ideal components. E.g. inductors without series resistors sometimes make circuits fail since the simulator considers it a short at startup.
bartoo
11 years ago
I tried what you said, Mamish. And, indeed, it's true. The rate of the dacay seems dependent on the speed of the simulation. At this point, I really don't know what to think. The question stays open.
Igor
11 years ago
EC has ideal L and C. Oscillation is damped because of the used numerical method. There is more damping with larger time step. So use smaller simulation speed for higher accuracy.

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy