• 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. How to clip the calculator dft() output ?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 63
  • Views 17123
  • 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

How to clip the calculator dft() output ?

lahsivece
lahsivece over 10 years ago

Hi ,

I am trying to clip the calculator dft function output to extract dft peak value  in that frequency range. Is it possible ? If yes , how to go ahead with this .

How to get  y value at a particular frequency  in the dft plot in ocean?

Please advise.

Regards

Vishal

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Vishal,

    How about using the value() function if  you want to pick a particular frequency? Or using the clip function to find a range, and then ymax to find the peak?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • lahsivece
    lahsivece over 10 years ago

    Hi Andrew,

    Thanks for the hint.

    value() did not work . May be I am using it wrong.  I will look into the syntax and try it out again for dft() output.

    But using clip() on dft() output and ymax() search worked fine. ymax() can not handle complex numbers.

    dft()  output is a complex number and hence need to find peak in the real part and peak in the imaginary part.

    Then take the magnitude of two outputs.

    vop=value(getData("VOUT") 'vamp 10m)

    vop_dft=dft( vop 500n 1.9u 4096 "Rectangular")

    clip_vop_dft=clip(vop_dft 1.190G 1.192G) ;;; My peak is located at 1.191G

    ymax_real=ymax(real(clip_vop_dft))

    ymax_imag=ymax(imag(clip_vop_dft))

    ymax_tot=sqrt(ymax_real*ymax_real + ymax_imag*ymax_imag)

    Any comments on the above

    Regards,

    Vishal

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Vishal,

    Finding the ymax of the real and the ymax of the imaginary is definitely wrong. There's no guarantee they will be at the same frequency, so the result you get is potentially completely wrong.

    It would be batter to use:

    ymax_tot=ymax(mag(clip_vop_dft))

    However, I don't see why value shouldn't work (it does for me). I'd do:

    mag(value(vop_dft 1.191G))

    The mag function essentially the abs() - which does the sqrt(real**2+imag**2).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • lahsivece
    lahsivece over 10 years ago

    Hi Andrew ,


    Thanks for the correction and for solution to value() .

    I was trying to use value() from calculator function list !!

    Regards

    Vishal

    • 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