I would need to use random function in my equation. How could you make it in ADS? In Excel it's easy for example RANDBETWEEN(1;10). Does anybody know how to make the random generator?

Regards

Erkki

Regards

Erkki

I would need to use random function in my equation. How could you make it in ADS? In Excel it's easy for example RANDBETWEEN(1;10). Does anybody know how to make the random generator?

Regards

Erkki

Regards

Erkki

- One way would be to write boolean equations which could check if a value was equal to one of the other frequencies and then change it slightly.

Something like this:- First randomize 10 frequencies:

F1 = 100 MHz stat { uniform 80 MHz to 120 MHz }

F2 = 87 MHz stat { uniform 80 MHz to 120 MHz }

.

. - Then make sure that all frequencies are unique:

MyFreq1 = if ( (F1 == F2 || F1 == F3 || F1 == F4 || F1 == F5 || F1 == F6 || F1 == F7 || F1 == F8 || F1 == F9 || F1 == F10 ) then F1 + offset1 else F1 endif

MyFreq2 = if ( (F2 == F1 || F2 == F3 || F2 == F4 || F2 == F5 || F2 == F6 || F2 == F7 || F2 == F8 || F2 == F9 || F2 == F10 ) then F2 + offset2 else F2 endif

.

.

There would be a lot of equations to write..

Another way to do this is to use a file based method. First you would have to come up with a file with a bunch of random frequency combinations. You can do that using Excel or some other tool. You can write the frequencies into a Discrete MDIF file. First column is the row index 0-N. Then you can add as many columns of data(freqs) as you like. This is a sample file with 10 freqs:

BEGIN DSCRDATA

% INDEX F1 F2 F3 F4 F5 F6 F7 F8 F9 F10

0 100 87 113 99 107 111 83 117 115 95

1 82 84 107 102 112 95 119 120 92 85

2 96 111 87 92 99 95 101 115 83 105

3 107 106 99 83 115 84 80 92 102 111

END

You could create a file with 1000 or more frequency combinations. Just make sure all freqs are unique for each combination.

Place this file in the ./data subfolder of the project.

In ADS you can then access the data in this file by using a DataAccessComponent. You can set it up to read this Discrete MDIF file, like this:

DAC1

File="myfile.txt"

Type=Discrete

InterpMode=Index Lookup

iVar1=0

iVal1=MyIndex

The variable MyIndex controls which row that is read from the file, 0-N. You can randomize that single variable:

VAR

MyIndex = 0 stat { discrete 0 to 1000 by 1 }

When you run a Yield or Monte Carlo simulation then the value of MyIndex is randomized. The value of MyIndex is used to control the DataAccessComponent which picks the corresponding row in the file.

You can use the values from the file in parameters/variables like this:

Source1

Freq = file{DAC1,"F1"}

Source2

Freq = file{DAC1,"F2"} - First randomize 10 frequencies:
- Hey Mats,

I tried following your example and found a couple problems that other forum readers may also encounter.

First, the Discrete data file must be ended with "end dscrdata". iVar1=1 or "index" to point to the first independent variable. This application note titled "unleashing the DAC" is very helpful for the process

https://edasupportweb.soco.agilent.com/ ... Slides.pdf

Thank you Mats for pointing me in the right direction.

Andrew

Here's a couple of Support Documents which describes two methods of doing this. With and without using Yield analysis:

-Mats