Wrong simulation results - Page 1
Forum section: electronics / general

author: David_R
author_rank: Newbie
timestamp: March 28, 2016, 03:59:20 am
content: Hello, I'm trying to simulate a very simple LC circuit, with some initial conditions [ Vc1(0)=1V , Vc2(0)=4V ] but the results seems to be wrongThis is the circuitthose are the resultsI was expecting to get the ideal behavior of an LC oscillator, someone knows which is the mistake?Those are the handmade results:

author: amspire
author_rank: Super Contributor
timestamp: March 28, 2016, 05:16:49 am
content: Looks like the initial conditions were ignored and 1.5V was used across the capacitors instead. Perhaps the simulation couldn't cope with the lossless resonant LC circuit properly. You could add a small series resistor in the circuit - like 0.00001 ohms - just to see if it makes a difference.

author: David_R
author_rank: Newbie
timestamp: March 28, 2016, 05:54:36 am
content: I tried already with a 1u ohm resistor but it didn't work, I don't know if it just happens with my altium version

author: amspire
author_rank: Super Contributor
timestamp: March 28, 2016, 06:28:33 am
content: There is one more possibility. The circuit should ring with a 3V peak-to-peak sinewave or in other words, a 1.5V peak sinewave.If the plot for some weird reason is showing AC Peak voltage for the two lower curves, then those plots are correct.That still leaves the question about the zero amps in the top graph.

author: owiecc
author_rank: Frequent Contributor
timestamp: March 28, 2016, 07:44:44 am
content: I think this is due to how the circuit is solved. Try with more realistic parameter values or play with simulation parameters (increase step size, integration method). Maybe the default values do not work well with unrealistically high component values.

author: David_R
author_rank: Newbie
timestamp: March 28, 2016, 04:53:11 pm
content: But the results of simulation should be similar to the theory, so I think that no matter the values the simulation, it may work, one question, when you simulate the circuit on your computer, do you get the same result?

author: BMF
author_rank: Contributor
timestamp: March 28, 2016, 06:09:24 pm
content: What is the resistance of the inductor?

author: David_R
author_rank: Newbie
timestamp: March 28, 2016, 06:27:17 pm
content: It is an ideal inductor, you can find it in Miscellaneous Devices, it doesn't have an .mdl file or spice model

author: Fgrir
author_rank: Regular Contributor
timestamp: March 29, 2016, 03:09:59 pm
content: Try removing the "F" from the capacitor values - it seems like Altium is treating them as a femto suffix.

author: David_R
author_rank: Newbie
timestamp: March 30, 2016, 05:26:09 am
content: Fgrir thank you so much, finally it worksHow did you find out?

author: Fgrir
author_rank: Regular Contributor
timestamp: March 30, 2016, 02:52:08 pm
content: Glad I could help.Quote from: David_R on March 30, 2016, 05:26:09 amI think I've been burned by that same issue before - I vaguely remember spending an afternoon troubleshooting a simulation that had an ISRC set to 2A.I haven't really used the simulator since I upgraded to Altium from Protel so trying out your circuit seemed like a good way to see what had changed. Setting initial conditions is one thing that has changed so it took me a little time to figure that out. Once I got everything set I got the same result as you so I tried a simpler circuit with just one cap and a resistor, and that simulation made it pretty clear that the capacitor was not 4F, but actually 4fF