Author Topic: Wrong simulation results  (Read 5025 times)

0 Members and 1 Guest are viewing this topic.

Offline David_RTopic starter

  • Newbie
  • Posts: 9
  • Country: co
Wrong simulation results
« on: March 28, 2016, 03:59:20 am »
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 wrong

This is the circuit


those are the results


I was expecting to get the ideal behavior of an LC oscillator, someone knows which is the mistake?

Those are the handmade results:
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Wrong simulation results
« Reply #1 on: March 28, 2016, 05:16:49 am »
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.
 

Offline David_RTopic starter

  • Newbie
  • Posts: 9
  • Country: co
Re: Wrong simulation results
« Reply #2 on: March 28, 2016, 05:54:36 am »
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
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Wrong simulation results
« Reply #3 on: March 28, 2016, 06:28:33 am »
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.
 

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: dk
    • Google scholar profile
Re: Wrong simulation results
« Reply #4 on: March 28, 2016, 07:44:44 am »
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.
 

Offline David_RTopic starter

  • Newbie
  • Posts: 9
  • Country: co
Re: Wrong simulation results
« Reply #5 on: March 28, 2016, 04:53:11 pm »
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?
« Last Edit: March 28, 2016, 05:00:02 pm by David_R »
 

Offline BMF

  • Contributor
  • Posts: 27
Re: Wrong simulation results
« Reply #6 on: March 28, 2016, 06:09:24 pm »
What is the resistance of the inductor?
 

Offline David_RTopic starter

  • Newbie
  • Posts: 9
  • Country: co
Re: Wrong simulation results
« Reply #7 on: March 28, 2016, 06:27:17 pm »
It is an ideal inductor, you can find it in Miscellaneous Devices, it doesn't have an .mdl file or spice model
 

Offline Fgrir

  • Regular Contributor
  • *
  • Posts: 164
  • Country: us
Re: Wrong simulation results
« Reply #8 on: March 29, 2016, 03:09:59 pm »
Try removing the "F" from the capacitor values - it seems like Altium is treating them as a femto suffix.
« Last Edit: March 29, 2016, 03:26:39 pm by Fgrir »
 
The following users thanked this post: David_R

Offline David_RTopic starter

  • Newbie
  • Posts: 9
  • Country: co
Re: Wrong simulation results
« Reply #9 on: March 30, 2016, 05:26:09 am »
 Fgrir thank you so much, finally it works


How did you find out?
« Last Edit: March 30, 2016, 05:40:12 am by David_R »
 

Offline Fgrir

  • Regular Contributor
  • *
  • Posts: 164
  • Country: us
Re: Wrong simulation results
« Reply #10 on: March 30, 2016, 02:52:08 pm »
Glad I could help.
How did you find out?
I 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  :o
 
The following users thanked this post: David_R


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf