Hi,
I'm working on a Pierce crystal oscillator and would like to simulate the sensitivity to bias current changes (how many Hz does the frequency change if the bias current changes by one uA?). The direct method is straight forward to do by explicitly sweeping the current for a HB analysis:sw sweep param=xibias start=95u stop=105u step=1u {
hb ( vosc VSS ) hb oversample=[1] fundfreqs=[(xfreq)] \
maxharms=[32] errpreset=moderate oscic=lin oscmethod=twotier \
pinnode=vosc annotate=status
}
Taking the derivative of the HB fundamental frequency gives me a sensitivity of 673 mHz/uA.
But I'd prefer to us a small-signal analysis for this, as it seems more elegant and computes faster. I'm setting 'PAC magnitude' of the (ideal) bias current source to '1', and running a HBAC as follows:
hbac hbac sweeptype=absolute start=1m stop=1M dec=5 sidevec=[1] freqaxis=in annotate=status
When looking at the low-frequency portion of this AC sweep (harmonic +1) at the oscillator node and relating it to the large-signal fundamental amplitude at the same node, I get the very same sensitivity of 673 mHz/uA.
Now it would actually be nice to use HBXF, as with one simulation run I could derive other sensitivities of interest such as supply pushing and tuning gain. I'm using:
hbxf ( vosc VSS ) hbxf sweeptype=relative relharmvec=[1] start=1m stop=1M dec=5 sidevec=[-1] annotate=status
Comparing this sweep (harmonic -1) to the HBAC result as above I see:
So at AC frequencies in the kHz region, the two simulations match. But at lower frequencies, they deviate by approximately an order of magnitude. To me it is not clear why this is the case; so far I've thought of the XF/HBXF/PXF analyses simply as "reversed" AC/HBAC/PAC analyses that should give exactly the same result if one picks the correct transfer function. Obviously I'm missing something here.
Any help to get me back on track? Thanks very much for your input.
PS: I'm using Spectre 21.1.0.582.isr14 64bit