This is the first of a series of Blogs to talk about how to fill out the forms for Harmonic Balance. I will include our suggested settings and some helpful hints. I will add to these over time as new things come up both from us and our customer base.
Harmonic Balance works in the frequency domain and is a very efficient way to describe systems operating in steady-state. HB is VERY efficient for systems that have sinusoidal tones. As the tones become more nonlinear, or more "square" in nature, HB requires more harmonics of each tone to describe the waveform. This will begin to slow down the simulation as more unknowns are added to the matrix. Luckily, in most RF systems, the tones are rounded off by parasitics at high frequencies, filtering, rise-times, etc. so harmonic balance remains a very efficient method to describe RF systems.
If you go to the ADE -> Choose -> Analysis form and select the QPSS button or if you have MMSIM71 or later, you will also see a new HB button. Choosing QPSS with the Harmonic Balance engine or choosing just the HB button will do the same thing. We are trying to simplify the interface for Harmonic Balance users who wish to only use HB by simplifying the choices and options.In the middle of the form, you should see something like...
Only Mxham, Ovsap and Tstab are editable. The rest of the parameters are read in from the sources.
Number of Harmonics (MxHam): This is the number of harmonics of currents at each node that the simulator will use find a "balanced" solution. The trick is to use enough harmonics to allow the simulator accurately create the waveforms. But, the more harmonics you have, the larger the number of unknowns and the more memory and simulation time required.
The number of harmonics is the primary parameter controlling accuracy for Harmonic Balance
- Setting Mxham correctly is important. Too little and you can get incorrect results and convergence problems. Too many increses simulation time and memory used.
- Start with 5-8 harms on large tones and 3 harms for linear tones
- For strongly nonlinear tones (I.E. square wave LO, VCO with divider), use more harms. Can improve convergence. 10-20 harms is recommended.
- For circuits with frequency divider, we suggest harms= 5 x divide_ratio for that tone.
- Periodically increase # of harms for key tones to see if answer changes. If not, it means the # of harmonics is sufficient.
Oversample (Ovsap): Oversample helps the simulator more accurately represent a nonlinear waveform by adding more samples or you can think of more time points to the waveform.
- For most cases, use Oversample = 1 (default)
- For strongly nonlinear tones, set Oversample = 2 and you can reduce the # of harms required
- Does a better job recovering the time domain waveform for IFFT.
Transient Assist (Tstab): Tstab runs an initial transient so that a better first guess can be computed for the steady-state response. For most circuits run with HB, the intial DC solution is good enough to get convergence. Only when there are strong initial start up conditions such as for a divider or VCO is a tstab necessary.
- For the most nonlinear tone in your circuit, set tstab=yes.
- The interface will only allow you to do this for 1 tone.
- Before MMSIM71, tstab is automatically run for HB simulations. You have to set tstab=0 to prevent the simulator from using an initial transient and to use the DC solution.
- After MMSIM71, setting tstab=yes will not run tstab unless you put a time into the tstab field lower in the form
- When s-parameter files are used, tstab forces a time-domain, convolution model to be created. Otherwise, HB uses the s-parameter data directly We will discuss TSTAB more in Part 2.