I am new in ADE-XL , and I tried to simulate a mixer's conversion gain over a range of IF frequency. it all runs well in ADE-L
My variables are IF=1G , RF=6*IF and LO=5*IF . I then sweep in pss the IF from 0.8G to 1.2G and get a gain curve. From which I calculate the maximum and the ripple (max-min), using to output expressions. However, when I export this to ADE-XL the sweep doesn't work since the IF variables value is set by the global variable. and If I sweep using the global variable then : A. I cannot calculate the maximum gain or ripple automatically . B. I cannot run MC with the sweep on.
Any Ideas ?
I believe that currently an OCEAN measurement is required to do this. Something like:
axlAddOutputs( '( "maxGain" "gainRipple")) /* Define the output labels to be used in ADE-XL */ fif_sweep = sweepVarValues("fif" ?result "pss_fd") /* Get the list of IF freq sweep values */
frf_sweep = list() /* Initialize a list of RF freq sweep values */
/* Create list of RF freq sweep values, RF=6*IF relationship needs to be re-defined here */
for(i 1 length(fif_sweep)
frf_sweep = append(frf_sweep list(nthelem(i fif_sweep)*6)) ) gain_sweep = list() /* Initialize a list of gain measurements */
for(i 1 length(fif_sweep) /* For all the IF freq sweep values */
fif_value = nthelem(i fif_sweep) /* Get the IF freq */ frf_value = nthelem(i frf_sweep) /* Get the corresponding RF freq */
/* Calculate the gain */
gain_sweep = append(gain_sweep list(mag(value(famValue(v("/RFout" ?result "pss_fd") fif_value) fif_value) / value(famValue(v("/RFin" ?result "pss_fd") fif_value) frf_value)) ) ) ) xv = drCreateVec('double fif_sweep) /* X-axis - the IF freq sweep points */
yv = drCreateVec('double gain_sweep) /* Y-axis - the conversion gain values */
wave = drCreateWaveform(xv yv) /* Create a conversion gain waveform - can plot this */
axlOutputResult(ymax(wave) "maxGain") /* Export max gain measurement */ axlOutputResult(ymax(wave)-ymin(wave) "gainRipple") /* Export gain ripple measurement */
One caveat though - when you run Monte Carlo in ADE-XL, turn off "Save Data to Allow Family Plots". When that's enabled, you need additional indexing to pull the measurement value off of an individual conversion gain waveform.
In the ADE-XL test editor, under Outputs->Setup, set Measure Type to OCEAN and then point to a file containing a script similar to above.
Alan Whittaker CIC Proliferation Group Analog, RF and Mixed-Signal IC Melbourne, FL USA 321-674-2402 firstname.lastname@example.org