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 ?
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 ...)
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.