• 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. FFT of a signal

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 126
  • Views 18122
  • 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

FFT of a signal

Firdos
Firdos over 3 years ago

Hello,

I want to measure the FFT of a clock signal but during measurement I am getting some unwanted result. 

I am using a 3 MHz clock signal and perform fft by Measurement -> Spectrum. Sampling frequency = 48M, No of samples = 65536. When I plot it, then in the spectrum I have seen bunch of other spectral line around fundamental and other harmonic frequency with a spacing of 48M/65536 = 732 Hz. As a result the energy of signal is spreading over those spectral lines. Can anyone help me on that? Why do we have bunch of spectral lines with this specific frequency and how to avoid it? I have attached image for understanding of problem. First picture is zoom in picture while second picture is zoomed version of spectral lines at fundamental frequency. I am using "Hanning" window type.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Some of the side spurs will come about because of the fact that you're using a windowing function - that's inevitable - the idea of the windowing function is to correct for the interval being transformed not being a whole period - and so it removes the end effects, but it does mean that you see the windowing function having an effect). You also need to be very careful about the interval you simulate over, where the samples lie, and make sure that this all aligns with what you're doing in the spectrum form. In particular, if you are using "Calculate Sample Frequency" - small errors in this can lead to noticeable distortion.

    For example, with this very simple spectre testcase (so just a voltage pulse source):

    //
    
    parameters clkfreq=3M nsamp=65536 fsamp=48M tstop=nsamp/fsamp per=1/clkfreq
    Vclk (clk 0) vsource type=pulse val0=0 val1=1 rise=per/100 width=per/2 period=per
    R1 (clk 0) resistor r=1k
    
    tran tran stop=tstop strobeperiod=tstop/nsamp

    Notice that I am taking care to strobe the transient results on where I want the sample points to be. I then get this:

    The first two spectrum plots are using the "Calculate Sampling Frequency" which uses the start/stop time to figure out the sampling frequency - which sets it to 48.01M which is not quite right. If instead I use the "Calculate Stop Time" and specify the sampling frequency (which makes sense, because that's what I controlled the stop time and strobeperiod with in the simulation), I get much better results, although. you can still see that I have the spurs due to the hanning window. In this case it's very simple and I an arrange for everything to be completely periodic, so using rectangular is a viable option, but you still need to take care that you're really sampling in the right place.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Firdos
    Firdos over 3 years ago in reply to Andrew Beckett

    This problem gets solved. Thank you for the response. 
    But I have one more doubt related with FFT.
    Let's say I am spreading a clock frequency into two frequency by spread spectrum technique. A triangular signal is passed through a two level quantizer whose output is going to a Digital VCO. I am doing this by two different ways.

    In 1st case, quantizer output stays at a particular level for a longer time (T1). While in other case it stays at a particular level for a shorter time (T2 = T1/2).

    Should the FFT response of output clock in both technique have some different? Ideally it should not. It should be same But in my plot frequency spurs are more spread out in 2nd case. Is it some FFT measurement issue?

    1st plot is time domain plot of output of both quantizer. Quantizer level is same so VCO output will be same.

    2nd plot is FFT plot of spread spectrum clock signal coming as a result of both quantizer. Red plot (1st case) has less spur magnitude than yellow plot (2nd case).

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to Firdos
    Firdos said:
    Should the FFT response of output clock in both technique have some different? Ideally it should not. It should be same

    Are you sure?

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

    Dear Firdos,

    Firdos said:
    Should the FFT response of output clock in both technique have some different? Ideally it should not. It should be same But in my plot frequency spurs are more spread out in 2nd case. Is it some FFT measurement issue?

    I am afraid I must agree with Mr. Wiedmaan Firdos - the two spectra should not be the same as your two modulating signals differ in frequency by a factor 2.. You are describing a frequency-shift keying (FSK) modulator and comparing the DFT results for two different modulation rates. The separation of the two frequencies will be dependent on your modulation rate - which I believe is exactly one of the observations you when you stated:

    Firdos said:
    But in my plot frequency spurs are more spread out in 2nd case.

    FSK is a common modulation method used to encode digital information. You might study the spectrum of an FSK modulated signal to better understand the two spectrum you computed with the dft() function.

    I hope this helps Firdos, and thank you Frank!!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Firdos
    Firdos over 3 years ago in reply to ShawnLogan

    Thank you Frank and Shawn.
    I have not looked into this problem from that angle.  But yes it helps me.

    Thank you.

    • 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