Continue to Site

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.

How to simulate Crystal Oscillator in HSPICE?

Status
Not open for further replies.

jordan76

Full Member level 3
Joined
Mar 25, 2004
Messages
170
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
1,852
hspice oscillator

Does anyone have any idea about how to simulate crystal oscillator in HSPICE?

Any available spice model for crystal? Or do I have to create an equivalent spice model for it?

I heard it is very hard to simulate crystal oscillator in HSPICE,but some people did it successfully before. Could you share your experiences on it?

Thanks in advance!

regards,
jordan76
 

simulate crystal

XTAL is a mechanical device with several resonance frequency (and complicated behavior). it is possible and common to model it with RLC tank for a special resonance frequency, though this method does not model overtone modes it is usually sufficient if the model is available for the requred mode.

BEST!
 

hspice .options oscillator
 

crystal oscillator spice model

I also very interested in this topic. Crystal is a very complicated device in term of modelling. Is it possible to use only the L-R-C to model it?
 

how to simulate crystal oscillator

Hi
see INTUSOFT's model library for Generic Crystals spice model.
This crystal may be used in oscillator and filter applications. The
parameters that are passed to it are the frequency of oscillation
(FREQ), Q of the crystal (Q), series resistance (RS) and the
parallel capacitance (CP). By specifying the proper parameters,
virtually any crystal may be simulated.
Example: XOSC 1 2 XTAL {Q=10K RS=10 CP=20PF
+ FREQ=10KHZ}
X2 1 2 XT10


ynhe
 

crystal osc hspice

I suggest you simulating Crystal Oscillator by ADS or Spectre (PSS &PNOISE)
Because HSPICE can't simulate Phase Noise
ADS has PC edition.
 

crystal oscillator transient simulation

Thanks for the promt reply!

I just found in HSPICE manual the following:
For circuits with very high resonance factors(such as crystal tank circuits,and active filters), .OPTION DELMAX should be set to less than period/100.

Share with you!

(Other conservative simulation options also should be used in crystal simulation as mentioned by Fom's post.)

regards,
jordan76
 

pss resonant frequency of oscillator

It is possible to do a spice transient simulation of a crystal
oscillator by setting options, time varying the Q using ideal
switches, or using initial conditions, but simulation results will be
useless unless simulation time is extended by several thousand
cycles, far more than practical. Energy can not be put or taken
out of a high Q tank. ADS uses harmonic resonance methods,
and that makes possible to simulate several K cycles.
 

crystal simulation hspice option

MY SIM FILE:
vdd vdd gnd pwl(0u 0v 5000u 3v)
.option post=2
.tran 1u 200000u
.lib 'MYLIB.lib' tt

MP2 OSC2 OSC1 VDD VDD PCH L=2U W=400U
MN2 OSC2 OSC1 0 0 NCH L=2U W=200U

RF OSC1 OSC2 15000K

R1 OSC1 N1N13 30K
C1 N1N13 N1N55 0.003P
L1 N1N55 OSC2 7863H
CO OSC1 OSC2 1.5P

CL2 OSC2 0 8P
CL1 OSC1 0 8P
.END

IT HAS CORRECT FREQ, BUT VPP ONLY 1MV, WHO CAN HELP ME?
 

spice model crystal transiente

Set a reasonable initial condiction
 

oscillator hspice

Humungus said:
Set a reasonable initial condiction

What is reasonable initial conditions? Could you help me to sim the file? tks.
 

hspice crystal

Do I need to set ".OPTION METHOD=GEAR"?
 

crystal oscillator simulation in spice

Maybe you can try to make power ramp rate smaller. say about 100ns.

Good luck!
jordan76
 

hspice simulator conservative

ysz said:
MY SIM FILE:
vdd vdd gnd pwl(0u 0v 5000u 3v)
.option post=2
.tran 1u 200000u
.lib 'MYLIB.lib' tt

MP2 OSC2 OSC1 VDD VDD PCH L=2U W=400U
MN2 OSC2 OSC1 0 0 NCH L=2U W=200U

RF OSC1 OSC2 15000K

R1 OSC1 N1N13 30K
C1 N1N13 N1N55 0.003P
L1 N1N55 OSC2 7863H
CO OSC1 OSC2 1.5P

CL2 OSC2 0 8P
CL1 OSC1 0 8P
.END

IT HAS CORRECT FREQ, BUT VPP ONLY 1MV, WHO CAN HELP ME?

You may try to use a smaller step value in transient analysis, 100ns for example.
 

crystal library pspice

changing 1u to 100n in .tran 1u 200000u
will not help - it is "initial" sep size. Simulator will then change step size to anything. It is a good idea to limit step size in case you do not see any oscillation. This could be done by setting option (usually) maxstep=100n which obviously sets max step allowed.
If there IS a small oscillation then you need to wait for building it up - run overnight. To speed up startup you can initial current through L in its netlist definition Ic=1u - this will kick it up. Or you can set voltage on both L ends bu .IC (perhaps VCC/2). If oscillation dies you do not have good one. If it continues it will still take a long time to settle to its natural freq.
 

crystal oscillator rmax

U can try to use the .IC statement to set transient inital conditions.
 

crystal oscillator site:edaboard.com

r23718 said:
changing 1u to 100n in .tran 1u 200000u
will not help - it is "initial" sep size. Simulator will then change step size to anything.

Maybe you are right. But I have ever heard someone encountered the same problem -- the output swing is too small. He finally solved the problem by changing the transient step size to 0.1ns.
I don't know why.
 

crystal hspice model

r23718 said:
changing 1u to 100n in .tran 1u 200000u
will not help - it is "initial" sep size. Simulator will then change step size to anything. It is a good idea to limit step size in case you do not see any oscillation. This could be done by setting option (usually) maxstep=100n which obviously sets max step allowed.
If there IS a small oscillation then you need to wait for building it up - run overnight. To speed up startup you can initial current through L in its netlist definition Ic=1u - this will kick it up. Or you can set voltage on both L ends bu .IC (perhaps VCC/2). If oscillation dies you do not have good one. If it continues it will still take a long time to settle to its natural freq.
Accuracy and DELMAX
For maximum accuracy, .OPTION DELMAX should be set to (period/100). For
circuits with very high resonance factors (high Q circuits such as crystal
oscillators, tank circuits, and active filters) DELMAX should be set to less than (period/100).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top