Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

crystal oscillator simulation

Status
Not open for further replies.

rampat

Member level 4
Joined
Jun 27, 2007
Messages
69
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Location
bangalore
Activity points
1,756
I am trying to model crystal oscillator for fs=26MHz.When I apply a step for open loopI can see underdamped oscillation of 26MHz,But once I put the loop in closed loop to get stable oscillation,the circuit is not converging at all which means i am not able to see sustained oscillation of 26MHz.somebody please tell me the reason for this ?


thanks
rampat
 

keith1200rs

Super Moderator
Staff member
Joined
Oct 9, 2009
Messages
10,877
Helped
2,064
Reputation
4,128
Reaction score
1,597
Trophy points
1,403
Location
Yorkshire, UK
Activity points
57,269
How long are you running the simulation for and what is the minimum time step? It can take a long time for oscillations to start - higher Q = longer start time. Sometimes the oscillations will seem to die away and then start to increase as the phase changes, so it may be that you aren't simulating for long enough.

Keith.
 

rampat

Member level 4
Joined
Jun 27, 2007
Messages
69
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Location
bangalore
Activity points
1,756
Hi Keith,

yes I was not running it for long time..I was giving a step of 1V with tr=1us and was running for 10us..and i also observed oscillations dying out even after+ve feedback..But how do I decide the run time and the time step for the simulation?

Thanks
rampat
 

LvW

Advanced Member level 5
Joined
May 7, 2008
Messages
5,858
Helped
1,746
Reputation
3,496
Reaction score
1,346
Trophy points
1,393
Location
Germany
Activity points
39,552
There is a rule of thumb for the absolute minimum of simulation time for a crystal oscillator: The simulation must run at least over Q cycles of the system with Q=quality factor of the crystal in the applied mode.
Then, to reach the steady state mode at least an additional time factor of 2 or 3 is recommended.
 

keith1200rs

Super Moderator
Staff member
Joined
Oct 9, 2009
Messages
10,877
Helped
2,064
Reputation
4,128
Reaction score
1,597
Trophy points
1,403
Location
Yorkshire, UK
Activity points
57,269
Rampat,

You need to make sure the time step is a lot smaller than the period of the oscillation. So for 26MHz I would suggest you make the maximum time step 2ns. There is an equation for the number of clock cycles for an oscillator to start and it is proportional to Q. I cannot remember the exact equation, but if you allow 10xQ you will be fairly certain of seeing it. So, if your Q is 20,000 allow 200,000 cycles = 7.7ms. You can probably get away with a bit less - I am not sure where to find the exact formula at the moment.

Keith.
 

LvW

Advanced Member level 5
Joined
May 7, 2008
Messages
5,858
Helped
1,746
Reputation
3,496
Reaction score
1,346
Trophy points
1,393
Location
Germany
Activity points
39,552
Yes, I completely agree with Keith - although he recommends a factor of 10*Q (my recommendation was only 2*Q...3*Q as a minimum). I doubt if there is an "exact formula" for this purpose.

However, perhaps you can try to speed-up this process by using something like a "kick-start". This was proposed in an "Idea for Design" contribution in Electronic Design, October 24th, 1996, page 86. This starting aid consists of a damped sinusoidal waveform which fades away with time and leaves the oscillator "alone".
This signal should have the expected frequency - as exact as possible.
If it is a voltage, it has to be connectet to a node which is normally grounded.
If you choose a current source it can be feeded into each node.
Good luck.
 

keith1200rs

Super Moderator
Staff member
Joined
Oct 9, 2009
Messages
10,877
Helped
2,064
Reputation
4,128
Reaction score
1,597
Trophy points
1,403
Location
Yorkshire, UK
Activity points
57,269
LvW said:
Yes, I completely agree with Keith - although he recommends a factor of 10*Q (my recommendation was only 2*Q...3*Q as a minimum). I doubt if there is an "exact formula" for this purpose.

I was only guessing! I was sure I had seen a formula somewhere with a pi() in it or something, but I am probably mixing it up with something else. You are right that there is unlikely to be an exact formula as it must depend in the nature of the starting "kick". I have seen crystal oscillators start with a rapidly dying oscillation following by a very long period where they seem to have a very low level signal which is almost stable in amplitude before the oscillation then rapidly builds up.

Keith.
 

E-design

Advanced Member level 5
Joined
Jun 1, 2002
Messages
2,014
Helped
507
Reputation
1,016
Reaction score
407
Trophy points
1,363
Activity points
14,193
A method I often use to verify circuit operation is to lower the Q initially by reducing the Ls and increasing Cs of the crystal in the same proportions. This allow for quicker simulation times to verify overall design. I will make Ls 100X smaller and Cs 100X larger. When I am satisfied I will do the final simulation.
 

dick_freebird

Advanced Member level 5
Joined
Mar 4, 2008
Messages
7,569
Helped
2,185
Reputation
4,376
Reaction score
2,079
Trophy points
1,393
Location
USA
Activity points
60,477
I've had generally poor luck with crystal oscillators but have
gotten advice that simulator settings and method can be key.

Particularly on startup, you need the accuracy to be high so
that the minuscule oscillatory component cannot be "ignored"
or lost inthe numerical residue. Trapezoidal method is going
to add a lot of garbage at low voltages, might try a Gear or
Euler method.

If your driver is resistive then its Q contribution (in a bad way)
may kill low level oscillation / startup. So will hysteresis.

It might be instructive to model with a controlled source
first, get the testbench going and then populate the real
circuitry. It's not improbable that you have multiple issues
which may make fixing any one of them more difficult.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top