Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #384067 > unrolled thread

SPICE simulation -- how to bias a crystal oscillatoir

Started bydakupoto@gmail.com
First post2015-11-06 19:31 -0800
Last post2015-11-07 15:36 -0700
Articles 20 on this page of 27 — 9 participants

Back to article view | Back to sci.electronics.design


Contents

  SPICE simulation -- how to bias a crystal oscillatoir dakupoto@gmail.com - 2015-11-06 19:31 -0800
    Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 07:38 -0700
      Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 08:34 -0700
        Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-11-07 10:40 -0500
          Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 08:59 -0700
            Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-11-07 11:47 -0500
              Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-11-07 12:28 -0500
                Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 11:38 -0700
                  Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhobbs@gmail.com> - 2015-11-07 11:21 -0800
              Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-11-07 12:30 -0500
              Re: SPICE simulation -- how to bias a crystal oscillatoir John Larkin <jjlarkin@highlandtechnology.com> - 2015-11-07 11:09 -0800
                Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-11-07 14:43 -0500
                  Re: SPICE simulation -- how to bias a crystal oscillatoir John Larkin <jjlarkin@highlandtechnology.com> - 2015-11-07 12:16 -0800
                    Re: SPICE simulation -- how to bias a crystal oscillatoir Phil Hobbs <pcdhobbs@gmail.com> - 2015-11-07 14:48 -0800
                      Re: SPICE simulation -- how to bias a crystal oscillatoir John Larkin <jjlarkin@highlandtechnology.com> - 2015-11-07 16:15 -0800
                      Re: SPICE simulation -- how to bias a crystal oscillatoir Gerhard Hoffmann <ghf@hoffmann-hochfrequenz.de> - 2015-11-08 15:48 +0100
                        Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-08 09:21 -0700
    Re: SPICE simulation -- how to bias a crystal oscillatoir upsidedown@downunder.com - 2015-11-07 17:09 +0200
      Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 08:36 -0700
      Re: SPICE simulation -- how to bias a crystal oscillatoir DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-11-07 18:42 +0000
    Re: SPICE simulation -- how to bias a crystal oscillatoir Tim Wescott <tim@seemywebsite.com> - 2015-11-07 12:17 -0600
      Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 11:20 -0700
        Re: SPICE simulation -- how to bias a crystal oscillatoir Tim Wescott <tim@seemywebsite.com> - 2015-11-07 13:08 -0600
          Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 12:31 -0700
        Re: SPICE simulation -- how to bias a crystal oscillatoir dakupoto@gmail.com - 2015-11-07 22:09 -0800
          Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-08 09:33 -0700
    Re: SPICE simulation -- how to bias a crystal oscillatoir Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-11-07 15:36 -0700

Page 1 of 2  [1] 2  Next page →


#384067 — SPICE simulation -- how to bias a crystal oscillatoir

Fromdakupoto@gmail.com
Date2015-11-06 19:31 -0800
SubjectSPICE simulation -- how to bias a crystal oscillatoir
Message-ID<4e44bcb3-a1e9-48dc-a358-cfb7dd171f42@googlegroups.com>
Could some electronics/SPICE guru please help ? I have a
simple model of a quartz crystal, as used in an oscillator.
With my SPICE simulation, I can measure both the parallel 
and series resonant frequencies of the "pure" crystal.
However, when I attach the same crystal to a biasing 
circuit, and run the simulation, the output is a flat DC
offset. The biasing circuit involves two CMOS(1.0u micron
gate length) inverters, as well as the large value feedback
resistor, capacitirs etc. Is there anything special I need
to do ? Any hints/suggestions would be helpful. Thanks in 
advance.

[toc] | [next] | [standalone]


#384090

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-11-07 07:38 -0700
Message-ID<vu2s3btj6plhblb1o9luc3k3uikbn2fag9@4ax.com>
In reply to#384067
On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:

>Could some electronics/SPICE guru please help ? I have a
>simple model of a quartz crystal, as used in an oscillator.
>With my SPICE simulation, I can measure both the parallel 
>and series resonant frequencies of the "pure" crystal.
>However, when I attach the same crystal to a biasing 
>circuit, and run the simulation, the output is a flat DC
>offset. The biasing circuit involves two CMOS(1.0u micron
>gate length) inverters, as well as the large value feedback
>resistor, capacitirs etc. Is there anything special I need
>to do ? Any hints/suggestions would be helpful. Thanks in 
>advance.

Crystal oscillators can be very tricky to simulate.

They _always_ need a "kick-start" of some sort to initiate the
oscillation.  This can be by inserting a current pulse or skewing the
normal bias with a .IC statement.

You will also need to set a very small timestep.

If you are using LTspice, be sure to use the "Alternate" solver... the
"Normal" solver takes simplification liberties that will produce false
results on most anything but switchers.
		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.

[toc] | [prev] | [next] | [standalone]


#384102

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-11-07 08:34 -0700
Message-ID<826s3b9bgoov8pc40eascnacfilibcic8t@4ax.com>
In reply to#384090
On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>
>>Could some electronics/SPICE guru please help ? I have a
>>simple model of a quartz crystal, as used in an oscillator.
>>With my SPICE simulation, I can measure both the parallel 
>>and series resonant frequencies of the "pure" crystal.
>>However, when I attach the same crystal to a biasing 
>>circuit, and run the simulation, the output is a flat DC
>>offset. The biasing circuit involves two CMOS(1.0u micron
>>gate length) inverters, as well as the large value feedback
>>resistor, capacitirs etc. Is there anything special I need
>>to do ? Any hints/suggestions would be helpful. Thanks in 
>>advance.
>
>Crystal oscillators can be very tricky to simulate.
>
>They _always_ need a "kick-start" of some sort to initiate the
>oscillation.  This can be by inserting a current pulse or skewing the
>normal bias with a .IC statement.
>
>You will also need to set a very small timestep.
>
>If you are using LTspice, be sure to use the "Alternate" solver... the
>"Normal" solver takes simplification liberties that will produce false
>results on most anything but switchers.
>		
>                                        ...Jim Thompson

An example...

<http://www.analog-innovations.com/SED/XtalOscillatorExample.png>

Several things to note:

IKS is the "kick-start" current pulse.

MaxTimeStep is set at 100ps

SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
PSpice's default solver until they decided to take liberties to
speed-up simulation... not as bad as Mikey's "Normal", but loose
enough not to handle crystal oscillators).

What's with the Kiwi Semi?  I am the "ghost designer" for a number of
fabless design houses and they like their names on the drawings ;-)


		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.

[toc] | [prev] | [next] | [standalone]


#384107

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-11-07 10:40 -0500
Message-ID<PL6dnR1noZb0hqPLnZ2dnUU7-WednZ2d@supernews.com>
In reply to#384102
On 11/07/2015 10:34 AM, Jim Thompson wrote:
> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>
>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>
>>> Could some electronics/SPICE guru please help ? I have a
>>> simple model of a quartz crystal, as used in an oscillator.
>>> With my SPICE simulation, I can measure both the parallel
>>> and series resonant frequencies of the "pure" crystal.
>>> However, when I attach the same crystal to a biasing
>>> circuit, and run the simulation, the output is a flat DC
>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>> gate length) inverters, as well as the large value feedback
>>> resistor, capacitirs etc. Is there anything special I need
>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>> advance.
>>
>> Crystal oscillators can be very tricky to simulate.
>>
>> They _always_ need a "kick-start" of some sort to initiate the
>> oscillation.  This can be by inserting a current pulse or skewing the
>> normal bias with a .IC statement.
>>
>> You will also need to set a very small timestep.
>>
>> If you are using LTspice, be sure to use the "Alternate" solver... the
>> "Normal" solver takes simplification liberties that will produce false
>> results on most anything but switchers.
>> 		
>>                                         ...Jim Thompson
>
> An example...
>
> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>
> Several things to note:
>
> IKS is the "kick-start" current pulse.
>
> MaxTimeStep is set at 100ps
>
> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
> PSpice's default solver until they decided to take liberties to
> speed-up simulation... not as bad as Mikey's "Normal", but loose
> enough not to handle crystal oscillators).
>
> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
> fabless design houses and they like their names on the drawings ;-)
>
>
> 		
>                                          ...Jim Thompson
>
One caution is that the kickstart has to be _small_, not much more than 
rounding error.  A nanoamp is often a good value.  Putting the current 
source in parallel with the crystal inductance will make sure that it 
starts off ringing at its natural frequency, which helps a lot.

Cheers

Phil Hobbs

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

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#384108

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-11-07 08:59 -0700
Message-ID<2s7s3bpvvufcso8u37c0p4esttr4jrv5cn@4ax.com>
In reply to#384107
On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>On 11/07/2015 10:34 AM, Jim Thompson wrote:
>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>
>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>
>>>> Could some electronics/SPICE guru please help ? I have a
>>>> simple model of a quartz crystal, as used in an oscillator.
>>>> With my SPICE simulation, I can measure both the parallel
>>>> and series resonant frequencies of the "pure" crystal.
>>>> However, when I attach the same crystal to a biasing
>>>> circuit, and run the simulation, the output is a flat DC
>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>> gate length) inverters, as well as the large value feedback
>>>> resistor, capacitirs etc. Is there anything special I need
>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>> advance.
>>>
>>> Crystal oscillators can be very tricky to simulate.
>>>
>>> They _always_ need a "kick-start" of some sort to initiate the
>>> oscillation.  This can be by inserting a current pulse or skewing the
>>> normal bias with a .IC statement.
>>>
>>> You will also need to set a very small timestep.
>>>
>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>> "Normal" solver takes simplification liberties that will produce false
>>> results on most anything but switchers.
>>> 		
>>>                                         ...Jim Thompson
>>
>> An example...
>>
>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>
>> Several things to note:
>>
>> IKS is the "kick-start" current pulse.
>>
>> MaxTimeStep is set at 100ps
>>
>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>> PSpice's default solver until they decided to take liberties to
>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>> enough not to handle crystal oscillators).
>>
>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>> fabless design houses and they like their names on the drawings ;-)
>>
>>
>> 		
>>                                          ...Jim Thompson
>>
>One caution is that the kickstart has to be _small_, not much more than 
>rounding error.  A nanoamp is often a good value.  Putting the current 
>source in parallel with the crystal inductance will make sure that it 
>starts off ringing at its natural frequency, which helps a lot.
>
>Cheers
>
>Phil Hobbs

No.  It has to be sufficient enough to significantly perturb the
quiescent operating point.  The example has a 10ns wide x 1mA pulse.
		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.

[toc] | [prev] | [next] | [standalone]


#384111

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-11-07 11:47 -0500
Message-ID<FdGdnbU2L7WktqPLnZ2dnUU7-KGdnZ2d@supernews.com>
In reply to#384108
On 11/07/2015 10:59 AM, Jim Thompson wrote:
> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>
>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>
>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>
>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>> With my SPICE simulation, I can measure both the parallel
>>>>> and series resonant frequencies of the "pure" crystal.
>>>>> However, when I attach the same crystal to a biasing
>>>>> circuit, and run the simulation, the output is a flat DC
>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>> gate length) inverters, as well as the large value feedback
>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>> advance.
>>>>
>>>> Crystal oscillators can be very tricky to simulate.
>>>>
>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>> normal bias with a .IC statement.
>>>>
>>>> You will also need to set a very small timestep.
>>>>
>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>> "Normal" solver takes simplification liberties that will produce false
>>>> results on most anything but switchers.
>>>> 		
>>>>                                          ...Jim Thompson
>>>
>>> An example...
>>>
>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>
>>> Several things to note:
>>>
>>> IKS is the "kick-start" current pulse.
>>>
>>> MaxTimeStep is set at 100ps
>>>
>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>> PSpice's default solver until they decided to take liberties to
>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>> enough not to handle crystal oscillators).
>>>
>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>> fabless design houses and they like their names on the drawings ;-)
>>>
>>>
>>> 		
>>>                                           ...Jim Thompson
>>>
>> One caution is that the kickstart has to be _small_, not much more than
>> rounding error.  A nanoamp is often a good value.  Putting the current
>> source in parallel with the crystal inductance will make sure that it
>> starts off ringing at its natural frequency, which helps a lot.
>>
>> Cheers
>>
>> Phil Hobbs
>
> No.  It has to be sufficient enough to significantly perturb the
> quiescent operating point.  The example has a 10ns wide x 1mA pulse.

The danger with that approach is that you can easily mask startup 
problems.  I doubt that would happen to you very often, but as a piece 
of general advice to noobs it's not beneficial.

Setting the tank ringing gently, so that it the circuit starts up in the 
small signal limit, is the ticket.  A nanoamp is lots for that, if you 
put it in the right place, i.e. across the inductor.

Cheers

Phil Hobbs


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

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#384113

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-11-07 12:28 -0500
Message-ID<563E34B2.7010104@electrooptical.net>
In reply to#384111

[Multipart message — attachments visible in raw view] — view raw

On 11/07/2015 11:47 AM, Phil Hobbs wrote:
> On 11/07/2015 10:59 AM, Jim Thompson wrote:
>> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>
>>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>>
>>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>>
>>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>>> With my SPICE simulation, I can measure both the parallel
>>>>>> and series resonant frequencies of the "pure" crystal.
>>>>>> However, when I attach the same crystal to a biasing
>>>>>> circuit, and run the simulation, the output is a flat DC
>>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>>> gate length) inverters, as well as the large value feedback
>>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>>> advance.
>>>>>
>>>>> Crystal oscillators can be very tricky to simulate.
>>>>>
>>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>>> normal bias with a .IC statement.
>>>>>
>>>>> You will also need to set a very small timestep.
>>>>>
>>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>>> "Normal" solver takes simplification liberties that will produce false
>>>>> results on most anything but switchers.
>>>>>
>>>>>                                          ...Jim Thompson
>>>>
>>>> An example...
>>>>
>>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>>
>>>> Several things to note:
>>>>
>>>> IKS is the "kick-start" current pulse.
>>>>
>>>> MaxTimeStep is set at 100ps
>>>>
>>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>>> PSpice's default solver until they decided to take liberties to
>>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>>> enough not to handle crystal oscillators).
>>>>
>>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>>> fabless design houses and they like their names on the drawings ;-)
>>>>
>>>>
>>>>
>>>>                                           ...Jim Thompson
>>>>
>>> One caution is that the kickstart has to be _small_, not much more than
>>> rounding error.  A nanoamp is often a good value.  Putting the current
>>> source in parallel with the crystal inductance will make sure that it
>>> starts off ringing at its natural frequency, which helps a lot.
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>
>> No.  It has to be sufficient enough to significantly perturb the
>> quiescent operating point.  The example has a 10ns wide x 1mA pulse.
>
> The danger with that approach is that you can easily mask startup
> problems.  I doubt that would happen to you very often, but as a piece
> of general advice to noobs it's not beneficial.
>
> Setting the tank ringing gently, so that it the circuit starts up in the
> small signal limit, is the ticket.  A nanoamp is lots for that, if you
> put it in the right place, i.e. across the inductor.
>

Like so.

(Two posts, one with the schematic inline, the other as an attachment.)

Cheers

Phil Hobbs




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

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#384119

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-11-07 11:38 -0700
Message-ID<95hs3b9p8cqmcqr28200csciuuptqlv1ql@4ax.com>
In reply to#384113
On Sat, 7 Nov 2015 12:28:18 -0500, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>On 11/07/2015 11:47 AM, Phil Hobbs wrote:
>> On 11/07/2015 10:59 AM, Jim Thompson wrote:
>>> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
>>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>>
>>>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>>>
>>>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>>>
>>>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>>>> With my SPICE simulation, I can measure both the parallel
>>>>>>> and series resonant frequencies of the "pure" crystal.
>>>>>>> However, when I attach the same crystal to a biasing
>>>>>>> circuit, and run the simulation, the output is a flat DC
>>>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>>>> gate length) inverters, as well as the large value feedback
>>>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>>>> advance.
>>>>>>
>>>>>> Crystal oscillators can be very tricky to simulate.
>>>>>>
>>>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>>>> normal bias with a .IC statement.
>>>>>>
>>>>>> You will also need to set a very small timestep.
>>>>>>
>>>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>>>> "Normal" solver takes simplification liberties that will produce false
>>>>>> results on most anything but switchers.
>>>>>>
>>>>>>                                          ...Jim Thompson
>>>>>
>>>>> An example...
>>>>>
>>>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>>>
>>>>> Several things to note:
>>>>>
>>>>> IKS is the "kick-start" current pulse.
>>>>>
>>>>> MaxTimeStep is set at 100ps
>>>>>
>>>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>>>> PSpice's default solver until they decided to take liberties to
>>>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>>>> enough not to handle crystal oscillators).
>>>>>
>>>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>>>> fabless design houses and they like their names on the drawings ;-)
>>>>>
>>>>>
>>>>>
>>>>>                                           ...Jim Thompson
>>>>>
>>>> One caution is that the kickstart has to be _small_, not much more than
>>>> rounding error.  A nanoamp is often a good value.  Putting the current
>>>> source in parallel with the crystal inductance will make sure that it
>>>> starts off ringing at its natural frequency, which helps a lot.
>>>>
>>>> Cheers
>>>>
>>>> Phil Hobbs
>>>
>>> No.  It has to be sufficient enough to significantly perturb the
>>> quiescent operating point.  The example has a 10ns wide x 1mA pulse.
>>
>> The danger with that approach is that you can easily mask startup
>> problems.  I doubt that would happen to you very often, but as a piece
>> of general advice to noobs it's not beneficial.
>>
>> Setting the tank ringing gently, so that it the circuit starts up in the
>> small signal limit, is the ticket.  A nanoamp is lots for that, if you
>> put it in the right place, i.e. across the inductor.
>>
>
>Like so.
>
>(Two posts, one with the schematic inline, the other as an attachment.)
>
>Cheers
>
>Phil Hobbs

That's fine as long as you get inside the crystal model to "twang" the
inductor.  At the terminals you see real world impedances.
		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.

[toc] | [prev] | [next] | [standalone]


#384123

FromPhil Hobbs <pcdhobbs@gmail.com>
Date2015-11-07 11:21 -0800
Message-ID<987d3eea-b269-43dd-bb1f-c3ad7db8728a@googlegroups.com>
In reply to#384119
>That's fine as long as you get inside the crystal model to "twang" the 
>inductor.  At the terminals you see real world impedances. 

How hard is that? A crystal isn't like some super hush-hush encrypted foundry model. 

Cheers

Phil Hobbs

[toc] | [prev] | [next] | [standalone]


#384114

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-11-07 12:30 -0500
Message-ID<563E3526.5090501@electrooptical.net>
In reply to#384111
On 11/07/2015 11:47 AM, Phil Hobbs wrote:
> On 11/07/2015 10:59 AM, Jim Thompson wrote:
>> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>
>>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>>
>>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>>
>>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>>> With my SPICE simulation, I can measure both the parallel
>>>>>> and series resonant frequencies of the "pure" crystal.
>>>>>> However, when I attach the same crystal to a biasing
>>>>>> circuit, and run the simulation, the output is a flat DC
>>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>>> gate length) inverters, as well as the large value feedback
>>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>>> advance.
>>>>>
>>>>> Crystal oscillators can be very tricky to simulate.
>>>>>
>>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>>> normal bias with a .IC statement.
>>>>>
>>>>> You will also need to set a very small timestep.
>>>>>
>>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>>> "Normal" solver takes simplification liberties that will produce false
>>>>> results on most anything but switchers.
>>>>>
>>>>>                                          ...Jim Thompson
>>>>
>>>> An example...
>>>>
>>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>>
>>>> Several things to note:
>>>>
>>>> IKS is the "kick-start" current pulse.
>>>>
>>>> MaxTimeStep is set at 100ps
>>>>
>>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>>> PSpice's default solver until they decided to take liberties to
>>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>>> enough not to handle crystal oscillators).
>>>>
>>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>>> fabless design houses and they like their names on the drawings ;-)
>>>>
>>>>
>>>>
>>>>                                           ...Jim Thompson
>>>>
>>> One caution is that the kickstart has to be _small_, not much more than
>>> rounding error.  A nanoamp is often a good value.  Putting the current
>>> source in parallel with the crystal inductance will make sure that it
>>> starts off ringing at its natural frequency, which helps a lot.
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>
>> No.  It has to be sufficient enough to significantly perturb the
>> quiescent operating point.  The example has a 10ns wide x 1mA pulse.
>
> The danger with that approach is that you can easily mask startup
> problems.  I doubt that would happen to you very often, but as a piece
> of general advice to noobs it's not beneficial.
>
> Setting the tank ringing gently, so that it the circuit starts up in the
> small signal limit, is the ticket.  A nanoamp is lots for that, if you
> put it in the right place, i.e. across the inductor.
>

Like so.

(Two posts, one with the schematic inline, the other as an attachment.)

Cheers

Phil Hobbs

============
Version 4
SHEET 1 880 680
WIRE 640 -160 480 -160
WIRE 480 -144 480 -160
WIRE 224 -80 80 -80
WIRE 368 -80 224 -80
WIRE 432 -80 368 -80
WIRE 640 -80 640 -160
WIRE 80 0 80 -80
WIRE 80 0 32 0
WIRE 112 0 80 0
WIRE 224 0 224 -80
WIRE 32 16 32 0
WIRE 368 32 368 -80
WIRE 640 80 640 0
WIRE 32 112 32 96
WIRE 32 112 -112 112
WIRE -112 144 -112 112
WIRE 32 144 32 112
WIRE 224 144 224 80
WIRE 256 144 224 144
WIRE 368 144 368 96
WIRE 368 144 320 144
WIRE 480 144 480 -48
WIRE 480 144 368 144
WIRE 112 160 112 0
WIRE 480 192 480 144
WIRE 224 240 224 144
WIRE -112 256 -112 224
WIRE 32 256 32 224
WIRE 32 256 -112 256
WIRE 368 256 368 144
WIRE 32 272 32 256
WIRE 480 304 480 272
WIRE 32 352 32 336
WIRE 112 352 112 224
WIRE 112 352 32 352
WIRE 112 416 112 352
WIRE 224 416 224 320
WIRE 368 416 368 320
WIRE 480 416 480 384
FLAG 112 416 0
FLAG 480 416 0
FLAG 640 80 0
FLAG 224 416 0
FLAG 368 416 0
SYMBOL ind 48 240 R180
WINDOW 0 36 80 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName L1
SYMATTR Value 0.3
SYMBOL cap 16 272 R0
SYMATTR InstName C1
SYMATTR Value 1.3f
SYMBOL cap 96 160 R0
SYMATTR InstName C2
SYMATTR Value 2p
SYMBOL res 16 0 R0
SYMATTR InstName R1
SYMATTR Value 20
SYMBOL njf 432 -144 R0
SYMATTR InstName J1
SYMATTR Value 2N4416
SYMBOL res 464 176 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL cap 352 256 R0
WINDOW 3 28 58 Left 2
SYMATTR InstName C4
SYMATTR Value 39p
SYMBOL cap 352 32 R0
SYMATTR InstName C5
SYMATTR Value 10p
SYMBOL voltage 640 -96 R0
SYMATTR InstName V1
SYMATTR Value 3
SYMBOL res 208 -16 R0
SYMATTR InstName R3
SYMATTR Value 1meg
SYMBOL current -112 144 R0
WINDOW 3 -111 -199 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value PULSE({Ikick} 0 10n 1n)
SYMBOL res 208 224 R0
SYMATTR InstName R4
SYMATTR Value 1meg
SYMBOL cap 256 160 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C3
SYMATTR Value 1n
SYMBOL ind 464 288 R0
SYMATTR InstName L2
SYMATTR Value 1
TEXT -208 320 Left 2 !.tran 50m
TEXT -176 -200 Left 2 ;8 MHz Crystal Oscillator With/Without 
Small-Signal Kickstart
TEXT -280 400 Left 2 !.step param Ikick list 0.001f 1n
TEXT -168 -152 Left 2 ;Phil Hobbs, 2015-11-07
RECTANGLE Normal 176 368 -32 -32 2

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

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#384122

FromJohn Larkin <jjlarkin@highlandtechnology.com>
Date2015-11-07 11:09 -0800
Message-ID<liis3b9d3sa9slttcs3smkbn20m5n62b0o@4ax.com>
In reply to#384111
On Sat, 7 Nov 2015 11:47:53 -0500, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>On 11/07/2015 10:59 AM, Jim Thompson wrote:
>> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>
>>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>>
>>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>>
>>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>>> With my SPICE simulation, I can measure both the parallel
>>>>>> and series resonant frequencies of the "pure" crystal.
>>>>>> However, when I attach the same crystal to a biasing
>>>>>> circuit, and run the simulation, the output is a flat DC
>>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>>> gate length) inverters, as well as the large value feedback
>>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>>> advance.
>>>>>
>>>>> Crystal oscillators can be very tricky to simulate.
>>>>>
>>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>>> normal bias with a .IC statement.
>>>>>
>>>>> You will also need to set a very small timestep.
>>>>>
>>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>>> "Normal" solver takes simplification liberties that will produce false
>>>>> results on most anything but switchers.
>>>>> 		
>>>>>                                          ...Jim Thompson
>>>>
>>>> An example...
>>>>
>>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>>
>>>> Several things to note:
>>>>
>>>> IKS is the "kick-start" current pulse.
>>>>
>>>> MaxTimeStep is set at 100ps
>>>>
>>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>>> PSpice's default solver until they decided to take liberties to
>>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>>> enough not to handle crystal oscillators).
>>>>
>>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>>> fabless design houses and they like their names on the drawings ;-)
>>>>
>>>>
>>>> 		
>>>>                                           ...Jim Thompson
>>>>
>>> One caution is that the kickstart has to be _small_, not much more than
>>> rounding error.  A nanoamp is often a good value.  Putting the current
>>> source in parallel with the crystal inductance will make sure that it
>>> starts off ringing at its natural frequency, which helps a lot.
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>
>> No.  It has to be sufficient enough to significantly perturb the
>> quiescent operating point.  The example has a 10ns wide x 1mA pulse.
>
>The danger with that approach is that you can easily mask startup 
>problems.  I doubt that would happen to you very often, but as a piece 
>of general advice to noobs it's not beneficial.
>
>Setting the tank ringing gently, so that it the circuit starts up in the 
>small signal limit, is the ticket.  A nanoamp is lots for that, if you 
>put it in the right place, i.e. across the inductor.
>
>Cheers
>
>Phil Hobbs

An XO can take millions of cycles to stabilize, so time domain sims
can run for days, and you can never expect the frequency to be PPM
accurate. I hate to simulate XOs, but when I do it's three different
runs:

1. Startup, as you say.

2. Start with the the resonator at full expected swing and zoom the
amplitude to see if it's increasing or decreasing, to get the ultimate
operating point fairly quick.

3. AC loop analysis to see the phase slopes and stuff, VCXO
sensitivities, things like that.

Nowadays, it's easier to buy an oscillator.


[toc] | [prev] | [next] | [standalone]


#384125

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2015-11-07 14:43 -0500
Message-ID<v82dnZHuy-PQyaPLnZ2dnUU7-b346u6z@supernews.com>
In reply to#384122
On 11/07/2015 02:09 PM, John Larkin wrote:
> On Sat, 7 Nov 2015 11:47:53 -0500, Phil Hobbs
> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>
>> On 11/07/2015 10:59 AM, Jim Thompson wrote:
>>> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
>>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>>
>>>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>>>
>>>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>>>
>>>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>>>> With my SPICE simulation, I can measure both the parallel
>>>>>>> and series resonant frequencies of the "pure" crystal.
>>>>>>> However, when I attach the same crystal to a biasing
>>>>>>> circuit, and run the simulation, the output is a flat DC
>>>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>>>> gate length) inverters, as well as the large value feedback
>>>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>>>> advance.
>>>>>>
>>>>>> Crystal oscillators can be very tricky to simulate.
>>>>>>
>>>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>>>> normal bias with a .IC statement.
>>>>>>
>>>>>> You will also need to set a very small timestep.
>>>>>>
>>>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>>>> "Normal" solver takes simplification liberties that will produce false
>>>>>> results on most anything but switchers.
>>>>>> 		
>>>>>>                                           ...Jim Thompson
>>>>>
>>>>> An example...
>>>>>
>>>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>>>
>>>>> Several things to note:
>>>>>
>>>>> IKS is the "kick-start" current pulse.
>>>>>
>>>>> MaxTimeStep is set at 100ps
>>>>>
>>>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>>>> PSpice's default solver until they decided to take liberties to
>>>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>>>> enough not to handle crystal oscillators).
>>>>>
>>>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>>>> fabless design houses and they like their names on the drawings ;-)
>>>>>
>>>>>
>>>>> 		
>>>>>                                            ...Jim Thompson
>>>>>
>>>> One caution is that the kickstart has to be _small_, not much more than
>>>> rounding error.  A nanoamp is often a good value.  Putting the current
>>>> source in parallel with the crystal inductance will make sure that it
>>>> starts off ringing at its natural frequency, which helps a lot.
>>>>
>>>> Cheers
>>>>
>>>> Phil Hobbs
>>>
>>> No.  It has to be sufficient enough to significantly perturb the
>>> quiescent operating point.  The example has a 10ns wide x 1mA pulse.
>>
>> The danger with that approach is that you can easily mask startup
>> problems.  I doubt that would happen to you very often, but as a piece
>> of general advice to noobs it's not beneficial.
>>
>> Setting the tank ringing gently, so that it the circuit starts up in the
>> small signal limit, is the ticket.  A nanoamp is lots for that, if you
>> put it in the right place, i.e. across the inductor.
>>
>> Cheers
>>
>> Phil Hobbs
>
> An XO can take millions of cycles to stabilize, so time domain sims
> can run for days, and you can never expect the frequency to be PPM
> accurate.

Well, getting ppm accuracy requires trimming anyway, so that's not such 
a huge issue, I don't think.  You just need your glasses to read the 
frequency off the crystal case. ;)

That 50 ms simulation using an 8-MHz crystal with a Q of a million took 
a few minutes on my desktop machine (16 Opteron cores, admittedly).

I hate to simulate XOs, but when I do it's three different
> runs:
>
> 1. Startup, as you say.
>
> 2. Start with the the resonator at full expected swing and zoom the
> amplitude to see if it's increasing or decreasing, to get the ultimate
> operating point fairly quick.
>
> 3. AC loop analysis to see the phase slopes and stuff, VCXO
> sensitivities, things like that.
>
> Nowadays, it's easier to buy an oscillator

I agree in general, but it's always worthwhile to know how to do stuff 
right--otherwise you don't know how much money to spend on the purchased 
part.  Besides, learning stuff is fun. ;)

Cheers

Phil Hobbs


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

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

[toc] | [prev] | [next] | [standalone]


#384127

FromJohn Larkin <jjlarkin@highlandtechnology.com>
Date2015-11-07 12:16 -0800
Message-ID<n1ms3b5gt4nq1ji3su3o2iq8hm2pq9tc7f@4ax.com>
In reply to#384125
On Sat, 7 Nov 2015 14:43:09 -0500, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>On 11/07/2015 02:09 PM, John Larkin wrote:
>> On Sat, 7 Nov 2015 11:47:53 -0500, Phil Hobbs
>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>
>>> On 11/07/2015 10:59 AM, Jim Thompson wrote:
>>>> On Sat, 7 Nov 2015 10:40:25 -0500, Phil Hobbs
>>>> <pcdhSpamMeSenseless@electrooptical.net> wrote:
>>>>
>>>>> On 11/07/2015 10:34 AM, Jim Thompson wrote:
>>>>>> On Sat, 07 Nov 2015 07:38:36 -0700, Jim Thompson
>>>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
>>>>>>
>>>>>>> On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>>>>>>>
>>>>>>>> Could some electronics/SPICE guru please help ? I have a
>>>>>>>> simple model of a quartz crystal, as used in an oscillator.
>>>>>>>> With my SPICE simulation, I can measure both the parallel
>>>>>>>> and series resonant frequencies of the "pure" crystal.
>>>>>>>> However, when I attach the same crystal to a biasing
>>>>>>>> circuit, and run the simulation, the output is a flat DC
>>>>>>>> offset. The biasing circuit involves two CMOS(1.0u micron
>>>>>>>> gate length) inverters, as well as the large value feedback
>>>>>>>> resistor, capacitirs etc. Is there anything special I need
>>>>>>>> to do ? Any hints/suggestions would be helpful. Thanks in
>>>>>>>> advance.
>>>>>>>
>>>>>>> Crystal oscillators can be very tricky to simulate.
>>>>>>>
>>>>>>> They _always_ need a "kick-start" of some sort to initiate the
>>>>>>> oscillation.  This can be by inserting a current pulse or skewing the
>>>>>>> normal bias with a .IC statement.
>>>>>>>
>>>>>>> You will also need to set a very small timestep.
>>>>>>>
>>>>>>> If you are using LTspice, be sure to use the "Alternate" solver... the
>>>>>>> "Normal" solver takes simplification liberties that will produce false
>>>>>>> results on most anything but switchers.
>>>>>>> 		
>>>>>>>                                           ...Jim Thompson
>>>>>>
>>>>>> An example...
>>>>>>
>>>>>> <http://www.analog-innovations.com/SED/XtalOscillatorExample.png>
>>>>>>
>>>>>> Several things to note:
>>>>>>
>>>>>> IKS is the "kick-start" current pulse.
>>>>>>
>>>>>> MaxTimeStep is set at 100ps
>>>>>>
>>>>>> SOLVER=0 is equivalent to LTspice's "Alternate" solver (Used to be
>>>>>> PSpice's default solver until they decided to take liberties to
>>>>>> speed-up simulation... not as bad as Mikey's "Normal", but loose
>>>>>> enough not to handle crystal oscillators).
>>>>>>
>>>>>> What's with the Kiwi Semi?  I am the "ghost designer" for a number of
>>>>>> fabless design houses and they like their names on the drawings ;-)
>>>>>>
>>>>>>
>>>>>> 		
>>>>>>                                            ...Jim Thompson
>>>>>>
>>>>> One caution is that the kickstart has to be _small_, not much more than
>>>>> rounding error.  A nanoamp is often a good value.  Putting the current
>>>>> source in parallel with the crystal inductance will make sure that it
>>>>> starts off ringing at its natural frequency, which helps a lot.
>>>>>
>>>>> Cheers
>>>>>
>>>>> Phil Hobbs
>>>>
>>>> No.  It has to be sufficient enough to significantly perturb the
>>>> quiescent operating point.  The example has a 10ns wide x 1mA pulse.
>>>
>>> The danger with that approach is that you can easily mask startup
>>> problems.  I doubt that would happen to you very often, but as a piece
>>> of general advice to noobs it's not beneficial.
>>>
>>> Setting the tank ringing gently, so that it the circuit starts up in the
>>> small signal limit, is the ticket.  A nanoamp is lots for that, if you
>>> put it in the right place, i.e. across the inductor.
>>>
>>> Cheers
>>>
>>> Phil Hobbs
>>
>> An XO can take millions of cycles to stabilize, so time domain sims
>> can run for days, and you can never expect the frequency to be PPM
>> accurate.
>
>Well, getting ppm accuracy requires trimming anyway, so that's not such 
>a huge issue, I don't think.  You just need your glasses to read the 
>frequency off the crystal case. ;)
>
>That 50 ms simulation using an 8-MHz crystal with a Q of a million took 
>a few minutes on my desktop machine (16 Opteron cores, admittedly).

The dilemma is where to set the minimum time step. At 8 MHz, if you
want 1 PPM frequency accuracy, the time step might be 100 fs, and it
would run forever, and you might be pushing double-float accuracy
limits. And there's no way (that I know of) to measure the frequency
accurately from a time-domain sim.

OK, build it and trim it!



>
>I hate to simulate XOs, but when I do it's three different
>> runs:
>>
>> 1. Startup, as you say.
>>
>> 2. Start with the the resonator at full expected swing and zoom the
>> amplitude to see if it's increasing or decreasing, to get the ultimate
>> operating point fairly quick.
>>
>> 3. AC loop analysis to see the phase slopes and stuff, VCXO
>> sensitivities, things like that.
>>
>> Nowadays, it's easier to buy an oscillator
>
>I agree in general, but it's always worthwhile to know how to do stuff 
>right--otherwise you don't know how much money to spend on the purchased 
>part.  Besides, learning stuff is fun. ;)

BTDT, educational, but I wouldn't enjoy doing it again.

Here's an OCXO that I did a while back.

https://dl.dropboxusercontent.com/u/53724080/Circuits/Oscillators/X40_OCXO.jpg

https://dl.dropboxusercontent.com/u/53724080/Circuits/Oscillators/X40_OCXO.jpg

https://dl.dropboxusercontent.com/u/53724080/Circuits/Oscillators/Lap-Tech.JPG

At todays' prices for nice little OCXOs, we now buy them. 

[toc] | [prev] | [next] | [standalone]


#384133

FromPhil Hobbs <pcdhobbs@gmail.com>
Date2015-11-07 14:48 -0800
Message-ID<c40b98f5-6378-4726-815a-d327c6fe7f2d@googlegroups.com>
In reply to#384127
>The dilemma is where to set the minimum time step. At 8 MHz, if you 
>want 1 PPM frequency accuracy, the time step might be 100 fs, and it 
>would run forever, and you might be pushing double-float accuracy 
>limits. And there's no way (that I know of) to measure the frequency 
>accurately from a time-domain sim. 

Numerical discretizing schemes generally don't preserve exact eigenfrequencies anyway. For instance, in FDTD electromagnetic simulations, you have to dork the value of c to improve accuracy--the numerical c can differ from the real one by as much as a percent or so.  

In an adaptive solver like SPICE, I'd expect the eigenfrequencies to depend on all sorts of internal variables such as time step, solver algorithm, and a bunch of control panel parameters. 

Cheers

Phil Hobbs

[toc] | [prev] | [next] | [standalone]


#384136

FromJohn Larkin <jjlarkin@highlandtechnology.com>
Date2015-11-07 16:15 -0800
Message-ID<bi4t3bpoubol8a0ctk6gm1695ok07hka77@4ax.com>
In reply to#384133
On Sat, 7 Nov 2015 14:48:59 -0800 (PST), Phil Hobbs
<pcdhobbs@gmail.com> wrote:

>
>>The dilemma is where to set the minimum time step. At 8 MHz, if you 
>>want 1 PPM frequency accuracy, the time step might be 100 fs, and it 
>>would run forever, and you might be pushing double-float accuracy 
>>limits. And there's no way (that I know of) to measure the frequency 
>>accurately from a time-domain sim. 
>
>Numerical discretizing schemes generally don't preserve exact eigenfrequencies anyway. For instance, in FDTD electromagnetic simulations, you have to dork the value of c to improve accuracy--the numerical c can differ from the real one by as much as a percent or so.  
>
>In an adaptive solver like SPICE, I'd expect the eigenfrequencies to depend on all sorts of internal variables such as time step, solver algorithm, and a bunch of control panel parameters. 
>
>Cheers
>
>Phil Hobbs

In LT Spice, the default sim of a simple ringing LC runs about 0.8%
slow.




[toc] | [prev] | [next] | [standalone]


#384193

FromGerhard Hoffmann <ghf@hoffmann-hochfrequenz.de>
Date2015-11-08 15:48 +0100
Message-ID<da95meF3fg7U1@mid.individual.net>
In reply to#384133
Am 07.11.2015 um 23:48 schrieb Phil Hobbs:
>
>> The dilemma is where to set the minimum time step. At 8 MHz, if you
>> want 1 PPM frequency accuracy, the time step might be 100 fs, and it
>> would run forever, and you might be pushing double-float accuracy
>> limits. And there's no way (that I know of) to measure the frequency
>> accurately from a time-domain sim.
>
> Numerical discretizing schemes generally don't preserve exact eigenfrequencies
> anyway. For instance, in FDTD electromagnetic simulations, you have to dork
 > the value of c to improve accuracy--the numerical c can differ from 
the real
 > one by as much as a percent or so.
>
> In an adaptive solver like SPICE, I'd expect the eigenfrequencies to depend
 > on all sorts of internal variables such as time step, solver 
algorithm, and
 > a bunch of control panel parameters.

Xtal oscillators are easier analyzed in the ac domain and not with
integration over time. Cut the loop open and calculate the loop gain.
It will oscillate where the phase of the loop gain crosses 0.
You will also see if it will compress ( amplitude of loop gain @ phase 0
 >> 1) or not oscillate at all (amplitude there < 1.0)
Source and load impedance at the cut point may be very different, and
also different from 50 Ohms if you use s-params, so Randall-Hock
correction may be needed to make up for the missing self-termination.

BTW you get weird results with LTspice for steps < 5 Hz or so in a
100 MHz xtal osc. The resolution of f seems to hit the limit.


regards, Gerhard


< 
http://www.keysight.com/upload/cmc_upload/All/OscillatorDesignWebinar_AgilentEEsof_MWJ_16_Sep_2010.pdf 
 >

The book they mention is good.

[toc] | [prev] | [next] | [standalone]


#384203

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-11-08 09:21 -0700
Message-ID<6dtu3b12s1815qnmvr4j4v6djggop3o1i7@4ax.com>
In reply to#384193
On Sun, 8 Nov 2015 15:48:45 +0100, Gerhard Hoffmann
<ghf@hoffmann-hochfrequenz.de> wrote:

[snip]
>
>Xtal oscillators are easier analyzed in the ac domain and not with
>integration over time. Cut the loop open and calculate the loop gain.

Cutting the loop open is not necessary.  See...

<http://www.analog-innovations.com/LoopGain.zip>

>It will oscillate where the phase of the loop gain crosses 0.
>You will also see if it will compress ( amplitude of loop gain @ phase 0
> >> 1) or not oscillate at all (amplitude there < 1.0)
>Source and load impedance at the cut point may be very different, and
>also different from 50 Ohms if you use s-params, so Randall-Hock
>correction may be needed to make up for the missing self-termination.
>
>BTW you get weird results with LTspice for steps < 5 Hz or so in a
>100 MHz xtal osc. The resolution of f seems to hit the limit.

Try the "Alternate" solver... the "Normal" solver takes liberties.

>
>
>regards, Gerhard
>
>
>< 
>http://www.keysight.com/upload/cmc_upload/All/OscillatorDesignWebinar_AgilentEEsof_MWJ_16_Sep_2010.pdf 
> >
>
>The book they mention is good.
		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.

[toc] | [prev] | [next] | [standalone]


#384098

Fromupsidedown@downunder.com
Date2015-11-07 17:09 +0200
Message-ID<o54s3b9c50b0ut8b52kogdo1n210i9mmpu@4ax.com>
In reply to#384067
On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:

>Could some electronics/SPICE guru please help ? I have a
>simple model of a quartz crystal, as used in an oscillator.
>With my SPICE simulation, I can measure both the parallel 
>and series resonant frequencies of the "pure" crystal.
>However, when I attach the same crystal to a biasing 
>circuit, and run the simulation, the output is a flat DC
>offset. The biasing circuit involves two CMOS(1.0u micron
>gate length) inverters, as well as the large value feedback
>resistor, capacitirs etc. Is there anything special I need
>to do ? Any hints/suggestions would be helpful. Thanks in 
>advance.

Remember that an oscillator is just an noise amplification stage with
a frequency dependent feedback. 

When the oscillator active element works in Class-A/AB/B,  the thermal
noise of the active element is amplified and fed back through the
frequency selective network into the input. Doing this a few times,
the amplitude of the frequency selective network (in this case
crystal) is amplified and other frequencies severely attenuated each
time through. Finally the amplitude is limited by saturation of the
active device.

Look for the Barkhausen criterion.

For active elements working in Class-C. you need some kind of
kick-start, such as _rapid_ power application. This explains why the
oscillator starts well when battery powered, but fails when powered by
a mains power supply. In the first case, turning the power switch on,
will create a sharp power transient, while using mains, it takes some
time to charge the power supply capacitors.
  

[toc] | [prev] | [next] | [standalone]


#384103

FromJim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
Date2015-11-07 08:36 -0700
Message-ID<7h6s3b94k5qpf0j9gl4cvi363c6394pf0u@4ax.com>
In reply to#384098
On Sat, 07 Nov 2015 17:09:05 +0200, upsidedown@downunder.com wrote:

>On Fri, 6 Nov 2015 19:31:46 -0800 (PST), dakupoto@gmail.com wrote:
>
>>Could some electronics/SPICE guru please help ? I have a
>>simple model of a quartz crystal, as used in an oscillator.
>>With my SPICE simulation, I can measure both the parallel 
>>and series resonant frequencies of the "pure" crystal.
>>However, when I attach the same crystal to a biasing 
>>circuit, and run the simulation, the output is a flat DC
>>offset. The biasing circuit involves two CMOS(1.0u micron
>>gate length) inverters, as well as the large value feedback
>>resistor, capacitirs etc. Is there anything special I need
>>to do ? Any hints/suggestions would be helpful. Thanks in 
>>advance.
>
>Remember that an oscillator is just an noise amplification stage with
>a frequency dependent feedback. 
>
>When the oscillator active element works in Class-A/AB/B,  the thermal
>noise of the active element is amplified and fed back through the
>frequency selective network into the input. Doing this a few times,
>the amplitude of the frequency selective network (in this case
>crystal) is amplified and other frequencies severely attenuated each
>time through. Finally the amplitude is limited by saturation of the
>active device.
>
>Look for the Barkhausen criterion.
>
>For active elements working in Class-C. you need some kind of
>kick-start, such as _rapid_ power application. This explains why the
>oscillator starts well when battery powered, but fails when powered by
>a mains power supply. In the first case, turning the power switch on,
>will create a sharp power transient, while using mains, it takes some
>time to charge the power supply capacitors.
>  

Transient simulators don't know about noise starts... noise only
exists in AC analyses.
		
                                        ...Jim Thompson
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.

[toc] | [prev] | [next] | [standalone]


#384120

FromDecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org>
Date2015-11-07 18:42 +0000
Message-ID<n1lgmh$818$2@speranza.aioe.org>
In reply to#384098
On Sat, 07 Nov 2015 17:09:05 +0200, upsidedown wrote:

> Look for the Barkhausen criterion.

 Bow wow...   ruff ruff...

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | sci.electronics.design


csiph-web