Steven Bos
10/03/2022, 2:23 PM.measure
to average sample DAC output at the start (after it stabilized) and the very end. I then use those measurements to calculate two constants, the offset (zero scale) and gain (full scale) errors. The zero scale error is straightforward: averaging the sampled output for a short (100p) period after it stabilized and subtract it from the expected value. The full scale is a little more tricky. The averaged sampled output (duration 100p) at the end has correct values during the measurement period and has invalid value (=0) otherwise. Subtracting from start and 3 LSB to get the full scale error will results in incorrect calculation at all points except the end period. I tried to use del() (eg. start 19.9n del() end - 3 LSB * -
) but that didnt work. With another trigger signal, that is high when in the end period, I can create a correct FSE result shown in FSE*. Any suggestion how to the FSE calculation better?Stefan Schippers
10/03/2022, 3:22 PMravg()
function that takes a waveform , a time window and calculates the running average over that time window, that is from current time
to current time - time window
. Can this function be helpful?
"Ravg; v(out) 10n ravg()"
Stefan Schippers
10/03/2022, 3:24 PMSteven Bos
10/03/2022, 7:32 PM.measure tran end avg v(out) from=19.9n to=20.0n
.
All signals are (forcefully) sampled every 10ps using .options output initial interval=0.01e-9
so the average (should) range over 10 samples.
I need OutHeadAvg to calculate the Zero Scale error. I need both OutHeadAvg and OutTailAvg to calculate the Full Scale error (see https://www.analog.com/en/education/education-library/data-conversion-handbook.html)
I have not used ravg()
before, does it replace .measure avg
? So I can use it with from and to eg. OutTailAvg; v(out) 19.9n 20.n ravg()
Steven Bos
10/03/2022, 7:39 PMSteven Bos
10/03/2022, 7:43 PMStefan Schippers
10/03/2022, 8:26 PMStefan Schippers
10/03/2022, 8:29 PMStefan Schippers
10/03/2022, 9:09 PMStefan Schippers
10/03/2022, 9:11 PMSteven Bos
10/03/2022, 9:27 PMStefan Schippers
10/03/2022, 9:47 PM