The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> LC oscillations not matching calculated value
https://designers-guide.org/forum/YaBB.pl?num=1487694660

Message started by inqui123 on Feb 21st, 2017, 8:30am

Title: LC oscillations not matching calculated value
Post by inqui123 on Feb 21st, 2017, 8:30am

Hello

I am trying to simulate a simple LC circuit. Here L=10uH and C is 1nF. Initial condition is provided as shown in the image. The issue is the frequency of oscillation in the trans analysis does not match with 1/sqrt(LC). Also, the initial condition of 1V is not being satisfied.
I suspect that I am missing some analysis condition. Kindly provide your inputs on this.

Title: Re: LC oscillations not matching calculated value
Post by Andrew Beckett on Feb 21st, 2017, 10:14am

The frequency is correct. You've missed out the 2π (2pi). So it should be 1/(2pi*sqrt(LC)) - which is 1.587MHz.

As for the amplitude, I think that's just the rforce having an influence. If I set the rforce option to 100 (the default is 1 ohm). The impedance of the capacitor and inductor is 100ohms at this frequency.

Regards,

Andrew.

Title: Re: LC oscillations not matching calculated value
Post by Andrew Beckett on Feb 21st, 2017, 10:33am

BTW, there is a paragraph on page 198 of Ken's book: "The Designer's Guide to SPICE and Spectre" which covers the challenge of placing initial conditions on a parallel LC circuit.

Regards,

Andrew.

Title: Re: LC oscillations not matching calculated value
Post by Ken Kundert on Feb 21st, 2017, 10:45am

The initial condition problem is discussed in my book The Designer's Guide to SPICE and Spectre.

See section 4.3.5 on initial conditions and section 4.4.2 on oscillators.

-Ken

Title: Re: LC oscillations not matching calculated value
Post by inqui123 on Feb 22nd, 2017, 9:25am

Hi

Thanks for pointing out the frequency error.
I checked the rforce value, and it has been set to 1 ohm. I dont have access to the suggested book. Kindly explain how the sim results depend on rforce value.

Thanks

Title: Re: LC oscillations not matching calculated value
Post by Andrew Beckett on Feb 23rd, 2017, 3:27am

If you set the write parameter on the transient analysis to write out the DC solution at the beginning of the transient (with rforce at the default value), you'll see that it shows:

# CHECKPOINT_VERSION 1
# Generated by spectre (mode: Spectre) from circuit file `dg1.scs' during analys
is tran.
# 10:37:49 AM, Thur Feb 23, 2017
# Number of equations = 3
L0:1    1
osc     0


What is going on is that the inductor is a short at DC (and the capacitor is open). The initial condition is implemented as the norton equivalent of the desired voltage on the capacitor in series with 1 ohm (the rforce value). This is 1 amp in parallel with 1 ohm. So that's why you end up with 1Amp through the inductor.

Now, because at the resonant frequency, the impedance is 100 ohms, that will (V=IR) generate 100V at the resonant frequency.

If you set rforce=100, the norton equivalent is 0.01A with 100ohm in parallel to give 1V across the inductor. Again, because it's shorted at DC, you just get 0.01A through the inductor. So the checkpoint file contains:

# CHECKPOINT_VERSION 1
# Generated by spectre (mode: Spectre) from circuit file `dg1.scs' during analys
is tran.
# 11:26:30 AM, Thur Feb 23, 2017
# Number of equations = 3
L0:1    0.01
osc     0


Again, V=IR at the resonant frequency would then result in 1V at the resonant frequency (which is what you want).

Regards,

Andrew.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.