```On 7/27/2015 3:01 AM, R wrote:
> On 7/26/2015 8:34 PM, John Larkin wrote:
>> TTCalc says the resonant frequency is
>> 0.999,999,999,422,604,576,498,614,831 Hz. My point was that the time
>> step matters, and the default LT Spice sim is way, way off.
> Hi,
>
> resonant frequency is calculated as: f = 1/(2*pi *sqrt(L*C)) your result
> is exact reciprocal value or 2*pi*sqrt(L*C).

Yup. Both John and I forgot to take the reciprocal.
```
```On 7/26/2015 8:34 PM, John Larkin wrote:
> TTCalc says the resonant frequency is
> 0.999,999,999,422,604,576,498,614,831 Hz. My point was that the time
> step matters, and the default LT Spice sim is way, way off.
Hi,

resonant frequency is calculated as: f = 1/(2*pi *sqrt(L*C)) your result
is exact reciprocal value or 2*pi*sqrt(L*C).
```
```On 26/07/2015 18:11, John Larkin wrote:
> On Sun, 26 Jul 2015 11:41:58 -0500, John S <Sophi.2@invalid.org>
> wrote:
>
>> On 7/26/2015 11:26 AM, John Larkin wrote:
>>>
>>>
>>> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
>>> it's low by about 1800 PPM. You have to crank the time step down to 10
>>> us to get the error down below 10 PPM, and the sim gets really slow.
>>> Which illustrates the futility of trying to do accurate sims of high-Q
>>> circuits in the time domain.
>>
>> Maybe I'm wrong, but your LC resonance is actually
>> 0.999999999422604576498614831 Hz.
>>
>> Would that not explain it?
>
> No, that's just the rounding error of my HP32 calculator, parts per
> billion. The default sim frequency is off by about 2 parts per
> thousand.
>
> I think there's an optimum time step, and smaller steps make things
> worse again. But it would take hours or days to prove that.

You are up against the limitations of numerical methods here. The matrix
formulation of the circuit coupled with the need to solve a pure second
order differential equation makes life tricky for the solver.

Computing numerical derivatives is the work of the devil - integrating
is easier but the sweet spot for the optimum result vs effort expended
is small.

You generally do best with ODE solvers when the timestep is somewhere
around sqrt(eps)*period where eps is the smallest machine representable
number although for a second order ODE solved crudely as consecutive
first order ones it might be nearer eps^(1/3)*period.

TBH I'm impressed that by default it is only 0.2% out in the time domain
given that it isn't really geared to solving resonance problems.

BTW Is some of the lower resonance frequency not coming from series
resistance, parasitic capacitance and lead inductance in the LTspice
model components or are you feeding it ideal perfect ones?

Again this unrealistic situation will make life harder for the solver.

--
Regards,
Martin Brown
```
```On Sun, 26 Jul 2015 12:53:02 -0500, John S <Sophi.2@invalid.org>
wrote:

>On 7/26/2015 12:44 PM, M Philbrook wrote:
>> In article <mp35ai\$d3i\$4@dont-email.me>, Sophi.2@invalid.org says...
>>>
>>> On 7/26/2015 12:27 PM, M Philbrook wrote:
>>>> In article <vh1ara9eijdef9r1eq9if6vq5nfnnn5ldl@4ax.com>,
>>>> jlarkin@highlandtechnology.com says...
>>>>>
>>>>> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
>>>>> it's low by about 1800 PPM. You have to crank the time step down to 10
>>>>> us to get the error down below 10 PPM, and the sim gets really slow.
>>>>> Which illustrates the futility of trying to do accurate sims of high-Q
>>>>> circuits in the time domain.
>>>>>
>>>>    LC comes out to 1.000507xxxx on my end..
>>>>
>>>>    That may explan it.
>>>>    done on a FX7400G
>>>> Jamie
>>>
>>> Maybe I'm missing something. His L is 0.159154943 and his C is
>>> 0.159154943. How does that come out to your number?
>>
>>   Well, maybe because I used short term 2*Pi. (6.28) Which is what
>> I generally use..
>>
>>   I just did it doing full PI and I get something on the order of
>>
>>   1.0000000001, I didn't count the zeros, but the last one was "1"
>>
>>   I guess that still does not come out to what you got.
>>
>> Jamie
>>
>
>Oh! I think I understand. You're saying 1/2/pi/sqrt(LC) is your number
>(1.00000....). Yes? Okay, I dig it.

TTCalc says the resonant frequency is

0.999,999,999,422,604,576,498,614,831

Hz. My point was that the time step matters, and the default LT Spice
sim is way, way off.

--

John Larkin         Highland Technology, Inc
lunatic fringe electronics

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com

```
```On 7/26/2015 12:44 PM, M Philbrook wrote:
> In article <mp35ai\$d3i\$4@dont-email.me>, Sophi.2@invalid.org says...
>>
>> On 7/26/2015 12:27 PM, M Philbrook wrote:
>>> In article <vh1ara9eijdef9r1eq9if6vq5nfnnn5ldl@4ax.com>,
>>> jlarkin@highlandtechnology.com says...
>>>>
>>>> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
>>>> it's low by about 1800 PPM. You have to crank the time step down to 10
>>>> us to get the error down below 10 PPM, and the sim gets really slow.
>>>> Which illustrates the futility of trying to do accurate sims of high-Q
>>>> circuits in the time domain.
>>>>
>>>    LC comes out to 1.000507xxxx on my end..
>>>
>>>    That may explan it.
>>>    done on a FX7400G
>>> Jamie
>>
>> Maybe I'm missing something. His L is 0.159154943 and his C is
>> 0.159154943. How does that come out to your number?
>
>   Well, maybe because I used short term 2*Pi. (6.28) Which is what
> I generally use..
>
>   I just did it doing full PI and I get something on the order of
>
>   1.0000000001, I didn't count the zeros, but the last one was "1"
>
>   I guess that still does not come out to what you got.
>
> Jamie
>

Oh! I think I understand. You're saying 1/2/pi/sqrt(LC) is your number
(1.00000....). Yes? Okay, I dig it.
```
```In article <mp35ai\$d3i\$4@dont-email.me>, Sophi.2@invalid.org says...
>
> On 7/26/2015 12:27 PM, M Philbrook wrote:
> > In article <vh1ara9eijdef9r1eq9if6vq5nfnnn5ldl@4ax.com>,
> > jlarkin@highlandtechnology.com says...
> >>
> >> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
> >> it's low by about 1800 PPM. You have to crank the time step down to 10
> >> us to get the error down below 10 PPM, and the sim gets really slow.
> >> Which illustrates the futility of trying to do accurate sims of high-Q
> >> circuits in the time domain.
> >>
> >   LC comes out to 1.000507xxxx on my end..
> >
> >   That may explan it.
> >   done on a FX7400G
> > Jamie
>
> Maybe I'm missing something. His L is 0.159154943 and his C is
> 0.159154943. How does that come out to your number?

Well, maybe because I used short term 2*Pi. (6.28) Which is what
I generally use..

I just did it doing full PI and I get something on the order of

1.0000000001, I didn't count the zeros, but the last one was "1"

I guess that still does not come out to what you got.

Jamie

```
```On 7/26/2015 1:11 PM, John Larkin wrote:
> On Sun, 26 Jul 2015 11:41:58 -0500, John S <Sophi.2@invalid.org>
> wrote:
>
>> On 7/26/2015 11:26 AM, John Larkin wrote:
>>>
>>>
>>> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
>>> it's low by about 1800 PPM. You have to crank the time step down to 10
>>> us to get the error down below 10 PPM, and the sim gets really slow.
>>> Which illustrates the futility of trying to do accurate sims of high-Q
>>> circuits in the time domain.
>>
>> Maybe I'm wrong, but your LC resonance is actually
>> 0.999999999422604576498614831 Hz.
>>
>> Would that not explain it?
>
> No, that's just the rounding error of my HP32 calculator, parts per
> billion. The default sim frequency is off by about 2 parts per
> thousand.
>
> I think there's an optimum time step, and smaller steps make things
> worse again. But it would take hours or days to prove that.

That's pretty typical for difference equation approximations to
continuous time.  In FDTD codes like my clusterized simulator, you have
to dork the value of c in order to get the results right.  Fortunately
the right value is easy to calculate.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
```
```On 7/26/2015 12:27 PM, M Philbrook wrote:
> In article <vh1ara9eijdef9r1eq9if6vq5nfnnn5ldl@4ax.com>,
> jlarkin@highlandtechnology.com says...
>>
>> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
>> it's low by about 1800 PPM. You have to crank the time step down to 10
>> us to get the error down below 10 PPM, and the sim gets really slow.
>> Which illustrates the futility of trying to do accurate sims of high-Q
>> circuits in the time domain.
>>
>   LC comes out to 1.000507xxxx on my end..
>
>   That may explan it.
>   done on a FX7400G
> Jamie

Maybe I'm missing something. His L is 0.159154943 and his C is
0.159154943. How does that come out to your number?

```
```In article <vh1ara9eijdef9r1eq9if6vq5nfnnn5ldl@4ax.com>,
jlarkin@highlandtechnology.com says...
>
> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
> it's low by about 1800 PPM. You have to crank the time step down to 10
> us to get the error down below 10 PPM, and the sim gets really slow.
> Which illustrates the futility of trying to do accurate sims of high-Q
> circuits in the time domain.
>
LC comes out to 1.000507xxxx on my end..

That may explan it.
done on a FX7400G
Jamie
```
```On 7/26/2015 12:11 PM, John Larkin wrote:
> On Sun, 26 Jul 2015 11:41:58 -0500, John S <Sophi.2@invalid.org>
> wrote:
>
>> On 7/26/2015 11:26 AM, John Larkin wrote:
>>>
>>>
>>> This is fun. The LC should ring at 1 Hz, but in the default Spice sim,
>>> it's low by about 1800 PPM. You have to crank the time step down to 10
>>> us to get the error down below 10 PPM, and the sim gets really slow.
>>> Which illustrates the futility of trying to do accurate sims of high-Q
>>> circuits in the time domain.
>>
>> Maybe I'm wrong, but your LC resonance is actually
>> 0.999999999422604576498614831 Hz.
>>
>> Would that not explain it?
>
> No, that's just the rounding error of my HP32 calculator, parts per
> billion. The default sim frequency is off by about 2 parts per
> thousand.

I guess so. I just plugged in 0.1591549430918953357688837634 for each of
your reactances and got pretty much the same display.

```