• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. Harmonic Balance Convergence Issue

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 63
  • Views 22173
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Harmonic Balance Convergence Issue

mmsaad66
mmsaad66 over 4 years ago

Hi

I'm running hb and hbnoise to plot the phase noise of a clock divider that divides a 4.5-GHz clock by 10, but the simulation doesn't converge.

I configured the oversample factor to 8 (and tried 16) as the input is a square wave, number of harmonics = 5 (read in the user guide that as the oversample factor increases, number of harmonics could be small and give correct results). The circuit runs successfully in transient analysis and the waveform is generated after less than 1ns yet I configured the hb to run tran first for 5ns and save initial results. I configured the fundamental freq. as 4.5G and Freqdivide ratio=10, and accuracy is moderate.

I read somewhere that fundamental freq should be the divided one (4.5G/10) as it's the least freq in the circuit but I think in this version (cds 6.1.7) I should put the input freq (4.5G) as the sim already asks for the division ratio.

I should also note that sometimes a warning appears in hb log says the transistor leaves the linearized region (meaning the MOS PN junctions became forward), yet when transient analysis is chosen, the warning doesn't appear and the results are correct! Meaning it's a measurement error.

Thanks in advance

  • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear mmsaad66,

    If your circuit is one that generates square waves (I.e., CMOS or MOS based), is there a reason you chose to use harmonic balance? This analysis is designed for sinusoidal based signals. The shooting algorithm is more appropriate for highly non-linear signals.

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • mmsaad66
    mmsaad66 over 4 years ago in reply to ShawnLogan

    Thanks ShawnLogan for your reply

    Actually I tried Harmonic Balance with oversample factor 8 and the user guide says that'd make it appropriate for square wave signals, but I also tried pss with shooting algorithm but it didn't converge either.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to mmsaad66

    OK, first of all, if you have a divide by 10, then it's important to be sure that this is not achieved by other division ratio and that the lowest frequency in the circuit truly is 4.5G/10 - if there's a lower frequency and the divide by 10 is achieved by some combination of higher divide ratios, then you'll need to define that somehow. Whether you enter the fundamental frequency as 4.5G/10 or specify it as 4.5G and specify the divide ratio doesn't alter the fact that the fundamental will be seen as 450MHz - so all frequencies in the circuit have to be harmonics of that.

    5 harmonics is never going to be enough - that's 5 harmonics of the true fundamental, which means you're not even covering the input frequency (it's only up to 2.25GHz). Maybe 5 harmonics of the input frequency could be enough (although I suspect not, as 4.5GHz is not that high), and so that means you'd need at least 50 harmonics - probably more.

    You cannot use oversample as a substitute for having sufficient harmonics. You need to have enough harmonics to be able to capture the Fourier series for each node in the circuit; the oversample just helps further by increasing the number of points where it converts back into the time domain from the frequency domain, and it just improves the accuracy and likelihood of convergence with switching circuits and is cheaper than adding more harmonics - but the harmonic number must be high enough to start off with. If you don't have enough harmonics to capture the waveforms, then it will be trying to squeeze the energy for the waveform into the harmonics you've asked for, and that will be a poor fit - and likely to not be a very stable representation of the Fourier series and likely to change between iterations and fail to converge. In my experience, if you find yourself setting the oversample factor above 4 then that normally indicates you should have used more harmonics.

    Shawn's question about why you are using harmonic balance rather than shooting is absolutely a fair one for a square-wave based system. Usually you might use hb for a divider if you have a divider driving the LO of a very linear mixer, say, and so want the dynamic range of harmonic balance for the main signal path - but it's definitely necessary to have plenty of harmonics for that tone. If simulating just a divider, you're likely to loose the benefits of harmonic balance pretty quickly and shooting would almost certainly perform better then.

    If shooting didn't converge either, it's quite possible you haven't identified the true fundamental (lowest frequency) in the circuit.

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Tawna
    Tawna over 4 years ago

    In addition to excellent information provided by Shawn and Andrew, if you have access to Cadence Online Support https://support.cadence.com , please check out this Article

    FAQ: Spectre RF Convergence Tips for Shooting PSS Analysis .   There is a similar one for Harmonic Balance.

    Also, Getting the Most Out of Spectre® APS RF 19.1: Maximizing Performance  is a collection of "best practices" when simulating with SpectreRF.

    There are a couple of Articles on simulating dividers in SpectreRF as well.

    best regards,

    Tawna

    • Cancel
    • Vote Up +2 Vote Down
    • Cancel
  • mmsaad66
    mmsaad66 over 4 years ago in reply to Andrew Beckett

    Thanks a lot, Andrew

    I'm checking all the notes you mentioned, but do I have to use ports at my I/O ports? it's a freq divider so I figured I only need a pulse source and the next stage's loading in my TB.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to mmsaad66

    There's no requirement to use ports with hb or pss analysis. The only reason to use ports is if you:

    • Want to have source or a load with a built-in impedance similar to a probe in the lab, or for matching reasons
    • Want to use any of the s-parameter analyses (these compute s-parameters between the ports)
    • Want a noisy source for the purposes of measuring noise factor/noise figure.

    So you can just use a pulse source.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mmsaad66
    mmsaad66 over 4 years ago in reply to Andrew Beckett

    well I don't know but I tried up to 130 harmonics now with shooting and I traced the internal nodes and found no signal with freq<4.5G/10. It's a FF-based divider so it's not expected to generate signals with freq<4.5G/10 actually.

    Is there a way to let the simulator detect the fundamental tone of the whole circuit in the initial transient for ex.? because it detects the inputs only so I have to manually adjust the fundamental tone to 4.5G/10 instead of 4.5G

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to mmsaad66

    The number of harmonics with shooting doesn't usually affect converge too much because it's mostly an output parameter (it has some impact on the number of time steps within the shooting interval, but usually not the convergence properties itself).

    No, you can't auto-detect the fundamental tone of a driven circuit.

    Note that the fundamental frequency isn't necessary the lowest frequency in the circuit - it's the lowest common frequency. Perhaps if you could explain the topology (or even the netlist) of your divider, that would help. I probably should have made that clear.

    For example, if your circuit contains a divide by 4 as part of the functionality, a fundamental frequency of 450MHz won't suffice, because 1.125G is not an integer multiple of 450MHz. In other words, all frequencies in the circuit need to be an integer multiple of the PSS (or HB) fundamental - that's because it needs to be able to do a Fourier analysis of the fundamental period, and you can't have fractional periods within that for any node in the circuit - it won't be able to represent the solution (or converge). So if there was a divide by 4, you'd need a fundamental of 225MHz to accommodate that.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information