Home > Community > Forums > Custom IC Design > Design variables in FFT and THD measures

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Design variables in FFT and THD measures 

Last post Tue, Jan 22 2013 1:40 AM by baenischfau. 4 replies.
Started by baenischfau 07 Nov 2012 11:34 PM. Topic has 4 replies and 1342 views
Page 1 of 1 (5 items)
Sort Posts:
  • Wed, Nov 7 2012 11:34 PM

    Design variables in FFT and THD measures Reply

    Hello,

    I'm currently designing a Class-D output stage and I have come across some

    minor problems with the configuration with two of my measurement, namely FFT and THD.

    As I always know the frequency(s) of my input signal I wanted to configure the FFT and the

    THD measurement to always fit to the period of the output signal. So I defined two variables,

    one for the start of the interval and one for the stop, both are integer multiples of the period.

    I included those design variables into my measurements as discribed in a different post in this

    forum using the desVar() function. For THD this yields in

     

    thd(v("/outp" ?result "tran") desVar("startint") desVar("stopint")  16384 desVar("sigfreq")

     

    for FFT I used the same syntax.

    However both measurements do not work. I checked a lot of other measurements with the

    desVar() method, they all work fine.

     

    Anyone out there with some pointers ?

     

    Thank you 

     

    Best Regards

     

    Andi

     

    • Post Points: 20
  • Wed, Jan 2 2013 1:35 AM

    Re: Design variables in FFT and THD measures Reply

    Andi,

    You probably should use the VAR() function, not the desVar() function. desVar returns a string, and that's not what you want here... (I'm surprised it works elsewhere).

    Andrew.

    • Post Points: 20
  • Thu, Jan 17 2013 4:58 AM

    Re: Design variables in FFT and THD measures Reply

     Hi Andrew,

     

    Thanks for the hint, however it's still not working.

    What I have tried:

    I use the same set of three variables

    sigfreq = 256k

    startint = 5u

    stopint = startint+5*1/sigfreq 

    Staring from 

    thd(v(.....) 5u 24.531u 36000 256000)

    I replaced the frequeny setting 256k for the THD measurement with VAR("sigfreq") -> Measurement evaluates fine

    If I replace the starttime with VAR("startint") the measurement already fails,

    drForwardFFT: argument #2 should be a number

     

    What can I do now ?

     

    Best Regards

     

    Andi

     

    • Post Points: 20
  • Thu, Jan 17 2013 5:20 AM

    Re: Design variables in FFT and THD measures Reply

    Andi,

    You should report this to customer support. You shouldn't have to do this, but it may well fix it if you change your:

    thd(v(...) VAR("startint") 24.531u ...)

    to:

    famMap('thd v(...) VAR("startint") 24.531u ...)

    I have a CCR for a similar problem with another function, but not with thd. The idea is that famMap copes with unwrapping family data - and so if for some reason the v() is a family, and the VAR("startint") is a waveform (or family) rather than a number, it can sort it out. thd could do this itself.

    It's a bit of a guess, but a similar strategy has worked in other cases for me.

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Jan 22 2013 1:40 AM

    Re: Design variables in FFT and THD measures Reply

     Hi Andrew,

     

    Thanks for your assistance on the matter. I have tried the famMap() option but I still get the same

    error messages. As soon as our local contact for Cadence is back I'll ask him to bring this in to

    customer support.

     

    Best Regards

     

    Andi

     

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by baenischfau at 07 Nov 2012 11:34 PM. Topic has 4 replies.