Get email delivery of the Cadence blog featured here
Simulating crystal oscillators got a lot easier in MMSIM12.1...We have made enhancements to both Harmonic Balance and transient analyses.
In Part 1, I discussed Improvements to the Harmonic Balance use model. With the new streamlined Choosing Analyses form, you now can focus on getting your simulation results, rather than the setup of the analysis.
Now, 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 2: Spectre Transient Analysis Enhancement
Here is the new method that you can use to speed up transient analyses of crystal oscillators.
First, we’ll simulate without using the new parameters…then we’ll add them in and show the difference.
· Set up a transient analysis in the Choosing Analyses form:
· Set the stop time to 10K periods of oscillation - in this case, 1m (1 millisecond).
· For crystal oscillators, I always use errpreset = conservative.
· Click on the Apply button. Then click on the Options button.
Set the following transient analysis options:
· Set the Time Step parameter maxstep to about 20 timepoints per period. Note that Spectre accepts expressions (see the form below), which simplifies things for you.
Set the following Algorithm Parameters:
· For Integration Method, select traponly. By default, when errpreset=conservative, the integration method is gear2only. However, gear2only can dampen oscillations and shouldn’t be used – you want your oscillator to oscillate! So, I recommend using either trap or traponly when simulating crystal oscillators.
· Set Accuracy Parameter relref to alllocal. Note that this is one of the options that are set by default when you select errpreset=conservative.
· Leave all of the other parameters at their default values.
For more information on the transient parameters, type spectre -h transient in an xterm window.
· OK the Transient Options form. OK the Transient analysis form.
· Run the analysis (Simulation->Run or green arrow ).
The transient analysis output is shown below. Access the results by selecting Results – Direct Plot – Main Form, select tran in the Analysis section, voltage in the Function section, and select the resonator net in the Schematic).
Note that in 10K cycles, this oscillator is still ramping up – it will take quite a while to start. The peak voltage is approximately 1.47V (yes, that is volts, not KV).
As a comparison: Since we know that harmonic balance solves for the periodic steady state solution, we can use this as a check. How far away from steady state are the above transient analysis results? We will look at the transient assisted (tstab) and steady state waveforms from a harmonic balance simulation. Below is the tstab waveform (Transient assisted waveform) from the harmonic balance analysis:
Note that the peak voltage is about 900V. Compare this to the transient output voltage from previous simulation where the voltage was on the order of 1.47V. This is quite a significant difference.
Harmonic balance simulates to convergence and the ifft (inverse fast Fourier transform) is plotted below.
Notice that the actual peak voltage at steady state is about 1.3KV. This is significantly larger in amplitude compared to the transient analysis. You can see that we have a ways to go before reaching steady state in the transient analysis.
Now, we’ll use the two new transient parameters linearic and oscfreq.
· In the transient options form, select the misc tab. At the bottom of the form in the Additional Parameters section, you see a type-in field called additionalParams.
· In that field, type linearic=yes oscfreq=<actual_oscillator_freq>. Here, the actual_osc_freq is 10M.
· Note the space between the two keyword=value pairs. This is needed to separate the statements.
· Now re-run the simulation for 10ms, and plot the transient waveform.
· The output of the transient analysis without specifying linearic and oscfreq is above in green. The voltage is at roughly 1.5 volts and is nowhere near steady state at 10ms.
· The output of the transient analysis using linearic=yes oscfreq=10M is in orange. Steady state was reached in approximately 3ms. Note that the voltage starts at about 900 Volts peak and at steady state is approximately 1.3kV.
We have enhanced transient analysis to improve convergence. When using the new transient options linearic and oscfreq, transient analysis starts with a solution closer to the steady state value, and the transient simulation converges much faster. Although you do need to do some typing (filling in of fields), in the end the time saving is well worth it.
Have fun simulating!