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.
↧