I am often asked for guidelines on maximizing speed vs. accuracy for
SpectreRF harmonic balance simulations.
Today, I'll discuss part 2 of the 3 part series consisting of:
Which Engine: Spectre or APS?Oversample vs Number of HarmonicsHarmonic Trimming
The first post in this series focused on the "which engine" question.
Another aspect of speed vs accuracy in Harmonic Balance Simulations is specifying the number of harmonics and the value of oversample.
Note: You may also want to look at Solution 11670194 Guidelines for setting "Oversample vs Number of Harmonics" in Harmonic Balance simulation. (http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11670194 )
Below are three scenarios I'll consider:
Circuit with sinusoidal voltage and current waveforms
Circuit with sinusoidal input but has some non-sinusoidal currents (for example) in the circuit
Circuit with square wave input or signals generated in the circuit are digital-like
If your circuit has sinusoidal voltage and current waveforms, start with setting oversample=1
Circuit has a sinusoidal input but currents are non-sinusoidal:
If your circuit has a sinusoidal input but currents (for example) in the circuit are non-sinusoidal -- say in the case of a diode mixer, you can still use harmonic balance, but you need to use considerably more harmonics.
Circuit contains square waves or digital-like signals
If your input is a square wave or signals generated in the circuit are digital (e.g. mixer + divider)... as mentioned above, see Solution 11670194 Guidelines for setting "Oversample vs Number of Harmonics" in Harmonic Balance simulation. (http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11670194 )
In general, the more non-sinusoidal the waveform, the higher you need to set oversample. Typically for "sharp" edges use oversample=8. For "rounded" edges, use oversample=4.
Finally, some circuits just do not play well with Harmonic Balance. Extremely nonlinear (but periodic) circuits may be better suited for the Shooting Newton engine.
For more tips like this, please visit http://support.cadence.com. Please note that you must be a Cadence Customer on Maintenance to access
this website .
Stay tuned....next time I'll talk about Knob 3....Harmonic Trimming!
Try using the fourier component in analogLib. This component accurately calculates the number of harmonics you request with no requirement to set up any analysis options, except for possibly a tighter reltol and vabstol if your accuracy needs to be better than that produced by the defaults. While many things can be implemented, in this case, there just hasn’t been customer demand for this feature. I suggest you submit an enhancement request from your account at http://support.cadence.com so the request can be considered.
For some guidelines on using the fourier component, please see Solution 11251190
I do not understand why these algorithms cannot be built into the algorithm. In other words, if one specified the "critical" signals in an analysis, it seems an FFT of the waveforms after the simulation is complete - or even better while it is running - would reveal the nature of the critical waveforms (I.e., number of harmonics). The simulation would be stopped and re-started if the number of harmonics was too small. This appears to be much more efficient (from a designer's perspective) as only a single simulation is submitted and the iterations are handled based on the waveforms of the critical nodes by the simulator itself.
If you are a Cadence Customer on Maintenance,
You may also want to look at Cadence Online Solution 11732744 "Guidelines for setting Pnoise/HBnoise sidebands to get accurate results"
or this blog posting:
Tip of the Week: Guidelines for getting accurate HB QPSS/QPNoise results (www.cadence.com/.../guidelines-for-getting-accurate-hb-qpss-qpnoise-results.aspx)
Very useful. In some older docs it is stated that more oversampling than 2 is not recommended, but your suggestions are perfect.
Maybe tell us also on the impact of #harmonics and pnoise, etc.