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.
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.
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.
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.
· 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.
· When the simulation finishes, select Results - Direct Plot - Main Form in the ADE Simulation window.
The Direct Plot Form appears.
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.
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:
· 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.
Plot the Oscillator Phase Noise
· Next, choose hbnoise in the Analysis section of the Direct Plot form.
· In the Function section, choose Phase Noise.
· and click the Plot button. The Phase Noise is plotted below:
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.
· Run the simulation.
In my next post, we’ll look at a new method to speed up transient analyses on crystal oscillators.
Hello, what is the expected accuracy in Hz of the frequency of oscillation of the XO if we use conservative? Is it realistic to try and obtain 10ppb (part per billion) accuracy from these type of PSS XO simulations, and how?
hi, i run the pss+pnoise sim and hb+hbnoise sim on the same crystal osc schematic, but the results have a 10dB difference, i do not know the reason and how to make them the same, thanks~
your post is really nice and knowledgeable you explain everything nicely and looking forward with this post. Great work..!!
For this, please contact Cadence Customer Support ( http://support.cadence.com ).
That way, we can dig into this in more detail, look at your circuit and setup, etc.
The community forum isn't always the best place to do this.
Thank you for this great post.
I have a problem with Flicker phase noise of a quartz crystal oscillator.
Indeed I simulate the phase noise of an oscilator such as the one described in your post with the method you describe but I include only Flicker noise in the feedback amplifier, and the phase noise shows white phase noise, f-2 and f-3 phase noises instead of only f-1 and f-3 phase noises!
Can you please help me solve this problem?
Unfortunately, these settings (points per period, tstab = 0, trap) in my experience do not produce valid results or converging results in high Q oscillator phase noise simulations. Missing, but critical elements to the accuracy of a "real" quartz based oscillator are important elements such as the bias circuits, finite ground and source impedance, coupling capacitors. All of these impact the convergence of the pss solution and the required number of points per waveform. Perhaps the settings provided in this example are good for simplified quartz based oscillator circuits, but I have found they do not provide the accuracy and convergence necessary for actual quartz based designs.