• 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. Custom IC Design
  3. HBAC and HBXF for Oscillator Sensitivities Simulation

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 127
  • Views 10316
  • 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

HBAC and HBXF for Oscillator Sensitivities Simulation

sgcad
sgcad over 2 years ago

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

  • Cancel
Parents
  • sgcad
    sgcad over 2 years ago

    Thanks very much for your responses. I've looked at the resources you mentioned, but so far they didn't fully clarify the issue for me. The page Shawn linked to shows the basic setup using the GUI, but doesn't compare HBXF with HBAC or convert the result in a standard supply pushing form (Hz/V). The RF workshop Andrew referred to suggests to use a modulated HBXF analysis. The directly accessible results from the modulated HBXF analysis, however, are the same as for a regular HBXF. So it's unclear to me what difference this should make. The "direct plot" form as suggested in the RF workshop makes use of an undocumented "_drplModHbxfVGain" function. If I divide the output of this function by 2*pi I get almost the same result as with a HBAC; but the difference seems higher than a numerical error, so perhaps that's just an accidental match. Also so far I've not been able to use the "direct plot" form for current sources as it complains that the '/PLUS' pin of the current source is not saved (it's saved as ':1', that's probably why it can't find it). As so far I haven't found further detailed documentation of the modulation analyses, I'm stuck here too.

    I've simplified the oscillator schematic so I can share more details:

    To directly simulate the frequency change with bias current (parameter 'xibis') or to use HBAC, the following Spectre commands are now used:

    sw sweep param=xibias start=145u stop=155u step=1u {
        hb ( vosc VSS ) hb oversample=[4] fundfreqs=[(xfreq)] \
            maxharms=[32] errpreset=moderate oscic=lin oscmethod=twotier \
            pinnode=vb annotate=status
       
        hbac hbac sweeptype=absolute start=1m stop=1M dec=5 maxsideband=2 \
            freqaxis=in annotate=status
    }

    For post-processing in ViVa, I'm using the commands below. First absolute frequency change:

    harmonicFreq(v("/vosc" ?result "hb_fd") 1 ) - value(harmonicFreq(v("/vosc" ?result "hb_fd") 1 ) 150u )

    Then the derivative of that to calculate the supply pushing:

    lshift(deriv(harmonicFreq(v("/vosc" ?result "hb_fd") 1 )) 0.5u )

    Then the calculation based on HBAC (in my first post I've just used one sideband and doubled it's magnitude, here I'm summing the -1 and +1 sideband which is physically more correct I think):

    (value(leafValue( mag(v("/vosc" ?result "hbac")) "harmonic" -1 ) 1m ) + value(leafValue( mag(v("/vosc" ?result "hbac")) "harmonic" 1 ) 1m ))*1m/harmonic(mag(v("/vosc" ?result "hb_fd")) 1 )

    This gives the following plot:

    As you can see, the direct method and the HBAC-based calculation match exactly. I can repeat this procedure for the 'VVCM' source and get matching results too:

    So this approach seems to be correct.

    Now for HBXF I'm using:

    hbxf ( vosc VSS ) hbxf sweeptype=relative relharmvec=[1] \
        start=1m stop=1M dec=5 maxsideband=2 freqaxis=out annotate=status

    But neither the shape nor the absolute magnitude of the resulting sidebands match to the HBAC (HBXF results are shifted in frequency such that the x-axis matches that of the HBAC):

    If I repeat for the 'VVCM' source, even the ratios between HBXF and HBAC change:

    So to me it seems that my previous understanding that the HBXF is imply a 'reversed' HBAC is not correct.

    Any ideas how to explain this or suggestions on how to make these sensitivity simulations with HBXF? Thanks very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • sgcad
    sgcad over 2 years ago

    Thanks very much for your responses. I've looked at the resources you mentioned, but so far they didn't fully clarify the issue for me. The page Shawn linked to shows the basic setup using the GUI, but doesn't compare HBXF with HBAC or convert the result in a standard supply pushing form (Hz/V). The RF workshop Andrew referred to suggests to use a modulated HBXF analysis. The directly accessible results from the modulated HBXF analysis, however, are the same as for a regular HBXF. So it's unclear to me what difference this should make. The "direct plot" form as suggested in the RF workshop makes use of an undocumented "_drplModHbxfVGain" function. If I divide the output of this function by 2*pi I get almost the same result as with a HBAC; but the difference seems higher than a numerical error, so perhaps that's just an accidental match. Also so far I've not been able to use the "direct plot" form for current sources as it complains that the '/PLUS' pin of the current source is not saved (it's saved as ':1', that's probably why it can't find it). As so far I haven't found further detailed documentation of the modulation analyses, I'm stuck here too.

    I've simplified the oscillator schematic so I can share more details:

    To directly simulate the frequency change with bias current (parameter 'xibis') or to use HBAC, the following Spectre commands are now used:

    sw sweep param=xibias start=145u stop=155u step=1u {
        hb ( vosc VSS ) hb oversample=[4] fundfreqs=[(xfreq)] \
            maxharms=[32] errpreset=moderate oscic=lin oscmethod=twotier \
            pinnode=vb annotate=status
       
        hbac hbac sweeptype=absolute start=1m stop=1M dec=5 maxsideband=2 \
            freqaxis=in annotate=status
    }

    For post-processing in ViVa, I'm using the commands below. First absolute frequency change:

    harmonicFreq(v("/vosc" ?result "hb_fd") 1 ) - value(harmonicFreq(v("/vosc" ?result "hb_fd") 1 ) 150u )

    Then the derivative of that to calculate the supply pushing:

    lshift(deriv(harmonicFreq(v("/vosc" ?result "hb_fd") 1 )) 0.5u )

    Then the calculation based on HBAC (in my first post I've just used one sideband and doubled it's magnitude, here I'm summing the -1 and +1 sideband which is physically more correct I think):

    (value(leafValue( mag(v("/vosc" ?result "hbac")) "harmonic" -1 ) 1m ) + value(leafValue( mag(v("/vosc" ?result "hbac")) "harmonic" 1 ) 1m ))*1m/harmonic(mag(v("/vosc" ?result "hb_fd")) 1 )

    This gives the following plot:

    As you can see, the direct method and the HBAC-based calculation match exactly. I can repeat this procedure for the 'VVCM' source and get matching results too:

    So this approach seems to be correct.

    Now for HBXF I'm using:

    hbxf ( vosc VSS ) hbxf sweeptype=relative relharmvec=[1] \
        start=1m stop=1M dec=5 maxsideband=2 freqaxis=out annotate=status

    But neither the shape nor the absolute magnitude of the resulting sidebands match to the HBAC (HBXF results are shifted in frequency such that the x-axis matches that of the HBAC):

    If I repeat for the 'VVCM' source, even the ratios between HBXF and HBAC change:

    So to me it seems that my previous understanding that the HBXF is imply a 'reversed' HBAC is not correct.

    Any ideas how to explain this or suggestions on how to make these sensitivity simulations with HBXF? Thanks very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Frank Wiedmann
    Frank Wiedmann over 2 years ago in reply to sgcad

    I don't have a lot of experience with hb (I mostly use pss), but I suggest you try sweeptype=absolute and freqaxis=in in your hbxf analysis, just like in your hbac analysis.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to Frank Wiedmann

    Dear Frank and sgcad,

    I've read over your thorough response sgcad - and your details are very helpful to me anyway!

    Frank Wiedmann said:
    but I suggest you try sweeptype=absolute and freqaxis=in in your hbxf analysis, just like in your hbac analysis.

    I second both of Frank's comments. This plays a bit into my initial comment regarding your use of the different values of parameter sidevec for the two analyses. Looking at the very first plot you provided in this post, you could conceive that the results are shifted for the lower values of offset frequency. Since you are not doing any up conversion or down conversion (essentially), I would think a direct comparison would be best if you keep the sweeptype, sidevec, and freqaxis parameters the same for both the HBAC and HBXF analyses.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sgcad
    sgcad over 2 years ago in reply to ShawnLogan

    Thank you for the further responses.

    There actually is frequency conversion involved; I'm interested in how baseband noise/interference/drift affects the frequency/phase of the oscillator. The source of the noise is at or near DC, the observed effect converted up as sideband around the fundamental frequency (and harmonics) of the oscillator.

    I've already played quite a bit with the 'sweeptype' and 'freqaxis' parameters before posting here and I believe my settings are correct. 'freqaxis' affects the x-axis of the output only. It's convenient to use 'in' for HBAC as this maps all sidebands to baseband (1 mHz to 1 MHz in my case). For HBXF, there's no setting that achieves this but 'out' at least maps all sidebands to the fundamental frequency (50 MHz plus 1 mHz to 1 MHz in my case). Other settings for these analyses map the sidebands to different frequencies os are inconvenient for plotting. And again: the y-axis values are not affected, so this setting cannot explain the difference between HBAC and HBXF.

    'sweeptype' essentially determines how the sidebands are numbered. For HBAC, the simulator analysis the path from current source to oscillator output, so the sweep is at the absolute baseband frequency. For HBXF, the simulator looks 'backward' from the oscillator output to the current source. The sweep is thus relative to the carrier. Using the 'absolute' setting for HBXF requires an inconvenient sweep definition for a log sweep (one has to manually set each value using 'values=[50.00001M 50.0001M 50.001M]' etc.) and as a result just has differently numbered sidebands (if I remember correctly, sideband -1 becomes 0, -2 becomes -1, et.c). Again the y-axis values remain unchanged, so this does not help to explain the difference between HBAC and HBXF.

    If I have time I'll see if I can run some PAC/PXF sims on the circuit. As the startup of the oscillator is slow, using PSS is not a practical solution here, though.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 2 years ago in reply to sgcad

    Have you ever tried running the hbxf analysis with sweeptype=absolute and the original logarithmic sweep? In the documentation of the hbxf analysis, sweeptype is defined as follows (emphasis is mine):

    sweeptype=unspecified

    Specifies if the sweep frequency range is the absolute frequency of input or if it is relative to the port harmonics. When the unspecified value is used, Spectre RF sweeps using relative when autonomous simulation is performed or when the analysis is PSP; for other cases Spectre RF sweeps the absolute value of the input. Possible values are absolute, relative, and unspecified.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sgcad
    sgcad over 2 years ago in reply to Frank Wiedmann

    Yes, I think I've done an exhaustive search on all possible combinations. sweeptype=absolute for the HBXF gives the baseband-to-baseband transfer function, which is--apart from minor shifts from the large-signal operation--equivalent to a regular AC analysis. The following plot illustrates this; other HBXF sidebands show negligible response so are omitted.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 2 years ago in reply to sgcad

    It's strange that all the other HBXF sidebands show negligible response, I would have expected similar results as in the HBAC sidebands if all parameters are the same. I suggest that you contact Cadence Customer Support to sort this out.

    • Cancel
    • Vote Up 0 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