• Home
  • :
  • Community
  • :
  • Blogs
  • :
  • RF Design
  • :
  • Simulating Crystal Oscillators is Much Easier in MMSIM12…

RF Design Blogs

Tawna
Tawna
19 Dec 2012
Subscriptions

Get email delivery of the Cadence blog featured here

  • All Blog Categories
  • Breakfast Bytes
  • Cadence Academic Network
  • Cadence Support
  • Custom IC Design
  • カスタムIC/ミックスシグナル
  • 定制IC芯片设计
  • Digital Implementation
  • Functional Verification
  • IC Packaging and SiP Design
  • Life at Cadence
  • The India Circuit
  • Mixed-Signal Design
  • PCB Design
  • PCB設計/ICパッケージ設計
  • PCB、IC封装:设计与仿真分析
  • PCB解析/ICパッケージ解析
  • RF Design
  • RF /マイクロ波設計
  • Signal and Power Integrity (PCB/IC Packaging)
  • Silicon Signoff
  • Spotlight Taiwan
  • System Design and Verification
  • Tensilica and Design IP
  • Whiteboard Wednesdays
  • Archive
    • Cadence on the Beat
    • Industry Insights
    • Logic Design
    • Low Power
    • The Design Chronicles

Simulating Crystal Oscillators is Much Easier in MMSIM12.1 - Part 1

Greetings!

Simulating Crystal Oscillators got a lot easier in MMSIM12.1...We have made enhancments to both Harmonic Balance and Transient analyses.

In Part 1, I’ll cover Improvements to the Harmonic Balance use model. With a streamlined Choosing Analyses form you can now focus on the simulation results, rather than the setup of the analysis.

In Part 2, I'll cover Improvements  to transient analysis.  We’ve added a new feature to transient analysis that allows you to reach steady state more quickly should you decide to simulate your crystal oscillator using transient analysis.

Important:  Be sure to use IC615 ISR14 or later to see the new MMSIM12.1 features in the GUI.

Part 1:  MMSIM 12.1 SpectreRF Harmonic Balance simulations are more streamlined.

In MMSIM 12.1, we have a new harmonic balance streamlined analysis form.  This allows you to focus on simulation results instead of setup details.  In many cases for oscillators, the oscillator frequency and the output oscillator node are the only required parameters.

First, let's look at the schematic. Below is a standard Pierce CMOS 10MHz oscillator.

Pierce CMOS 10MHz oscillator schematic 

The crystal motional equivalent circuit is shown in the figure below.

I will show the junction of the cap and inductor in the motional equivalent circuit later, because this is the node with the longest settling time in the circuit.

crystal motional equivalent circuit

Below is the MMSIM12.1 Harmonic Balance Choosing Analyses form.

Note that the oscillator simulates out of the box with all default settings. All you need to enter is the approximate oscillator frequency and oscillator node.

 Harmonic Balance Choosing Analyses
SpectreRF now can automatically decide:
–       Whether to run transient (transient-aided tstab).
–       The number of harmonics of the oscillator fundamental frequency.
–       Transient stop time (tstab stop time).
–       To stop transient-assisted analysis when steady-state is reached.
To enable this, select Decide automatically (recommended for most cases) or Yes for the Run Transient selection in the Transient-Aided Options. This single action will cause a transient analysis to be run until steady-state is detected, and then from the transient analysis, the number of harmonics for Tone1 (when Frequencies is selected) or for the tone that has tstab enabled (when Names is selected).

In the Transient Aided Options section,

·        Set Run transient? to Decide Automatically

·        Set transient stop time (tstab) to auto.

·        Setting Save initial transient results (saveinit) =yes lets you see the startup waveform in the tstab interval.

In the Number of Tones section of the Choosing Analyses form:

·        Enter the fundamental frequency (10M in this case).

·        Set Number of Harmonics to auto.  Spectre calculates the oscillator’s harmonics on your behalf.  The calculation is based on Fourier analysis of transient steady-state waveforms

·        An Oversample Factor of 1 is fine for crystal oscillators (sinusoidal or nearly so).  For strongly nonlinear oscillators, you may want to increase oversample to a larger number.

·        For oscillators, I always set errpreset (Accuracy defaults) to conservative.

·        For the oscillator node, I select a node (at or near the resonator) in the crystal motional equivalent circuit.

·        Setting Calculate initial conditions automatically to yes causes an estimate of the oscillating frequency and amplitude to be used at the very beginning of the transient analysis that is used in the tstab interval of harmonic balance.  This is the recommended approach.  

If this approach fails for some reason, Spectre automatically switches to the probe-based solution method (formerly called the two-tier method in MMSIM 11.1.)  More information on this is found in the MMSIM12.1 SpectreRF User Guide.

·        Click on the Apply button at the bottom of the hb choosing analyses form.  

Set up the hbnoise Analysis:

·        Click on the hbnoise button in the Choosing Analyses form.  The form changes.   Set up the form as shown below. 

Setting up the hbnoise Analysis

·        Leave the Sweeptype set to relative and the Relative Harmonic set to the default value of 1.

·        In the Output Frequency Sweep Range (Hz), set the Start-Stop values as:  Start:  5m.   Stop:  5M.

·        Select Logarithmic Sweep Type with 5 Points Per Decade.

·        In the Sidebands section, leave Maximum sideband field blank.  When using the Harmonic Balance engine, the default value is the harmonics of the first tone in the hb analysis.

·        In the Output Section, select voltage (the default value) and select the Positive Output Node on the schematic as /osc_out.  You can leave the Negative Output Node blank.  It will default to gnd!

·        Leave the rest of the form set to the default values as shown in the previous screen shot.  Since you have set noisetype=sources, you will be looking at single sideband phase noise that is averaged over one period of the periodic steady state waveform.

·        OK the form.

Run the Simulation

·        Run the simulation by clicking on the green arrow button in the ADE Simulation window. Run simulation button

·        When the simulation finishes, select Results - Direct Plot - Main Form in the ADE Simulation window.

The Direct Plot Form appears. 

Setting the direct plot hb

From the hb Direct Plot form, you can view the output voltage spectrum.

·        In the Function section, select Voltage. 

·        In the Sweep section, select spectrum

·        Select rms for the Signal Level.

·        Choose dB20 as the Modifier.

·        Click on the Replot button.  The voltage spectrum plots.  You can place a marker (bindKey m) at the first harmonic to see the oscillator frequency and read the frequency off the graph.

hb results voltage spectrum plots

Plot the Transient Assisted Start-up Waveform

·        Next, plot the Transient Assisted start up waveform by selecting tstab in the analysis section.  The form changes:

direct plot tstab

·        Leave the values in the Direct Plot form at their default values and select a net in the schematic (osc_out).

·        Click on the Plot (or Replot) button.   The transient-assist waveform is shown below.  You can see that we are at steady state by the end of the tstab interval.

tstab waveform

Plot the Oscillator Phase Noise

·        Next, choose hbnoise in the Analysis section of the Direct Plot form.

·        In the Function section, choose Phase Noise.

direct plot phase noise

·        and click the Plot button.  The Phase Noise is plotted below:

Plotting the phase noise

Now is a good time to double check your results.  It's always a good idea to tighten tolerances and increase your harmonics just to double-check your results.

Summarizing Part 1:

You’ve run a simple simulation on a crystal oscillator circuit, looked at the transient startup waveform, viewed the output voltage spectrum, and plotted phase noise.  Note that you were able to do this by simply supplying the oscillator frequency, oscillator output node, and using default values on the forms.  

Using the Run Transient?  Option to speed up simulation

As a last tidbit of information....you can also use the Run Transient? option to speed up simulation.  A shorter transient analysis (tstab) may shorten simulation time.   To test this:

·        Open the hb Choosing Analyses form.

·        Set Run transient? To Yes.  Enter a Stop Time (tstab) of 10n.  Leave the rest of the form at the previous values as shown in the next figure.

Speeding up simulation with Run Transient

·        Run the simulation. Run simulation button

In my next post, we’ll look at a new method to speed up transient analyses on crystal oscillators.

Stay tuned!

best regards,

Tawna

Related Resources:

  • Spectre Circuit Simulator
  • Spectre Accelerated Parallel Simulator
Tags:
  • RF |
  • RF Simulation |
  • analog/RF |
  • 12.1 |
  • HB |
  • Spectre RF |
  • ADE-L |
  • Analog Simulation |
  • MMSIM |
  • MMSIM 12.1 |
  • analog |
  • RF spectre spectreRF |
  • Virtuoso Spectre Simulator XL |
  • spectreRF |
  • RF design |
  • Circuit Design |
  • harmonic balance |
  • VCO |
  • crystal oscillator |
  • Oscillator |