I am running a harmonic balance simulation. I have a Parameter sweep of frequency (Fidx), which calls a MonteCarlo (MCidx) which then calls the Harmonic balance controller. I am measuring the Power at node Vout. Fidx goes from 0::x and
MCidx goes from 0::y
If I plot cdf(dBm(Vout[Fidx,MCidx,1])), I get a different answer then if I do
cdf(dBm(Vout[0,MCidx,1]))
cdf(dBm(Vout[1,MCidx,1]))
cdf(dBm(Vout[2,MCidx,1])) etc. on the same plot
I believe the latter case, I just don't understand why the first one doesn't give the same answer.
Lou
MCidx goes from 0::y
If I plot cdf(dBm(Vout[Fidx,MCidx,1])), I get a different answer then if I do
cdf(dBm(Vout[0,MCidx,1]))
cdf(dBm(Vout[1,MCidx,1]))
cdf(dBm(Vout[2,MCidx,1])) etc. on the same plot
I believe the latter case, I just don't understand why the first one doesn't give the same answer.
Lou
If you list dbm(Vout[Fidx,1]) or dbm(Vout[0::2,1]) you will get an array with three values, something like this:
Fidx dbm(Vout[0::2,1])
0 -5.481
1 -2.130
2 -1.077
If you then compute the cumulative distribution of the values using cdf of that array, you get this:
bin cdf(dbm(Vout[0::2,1]),11,-10,0)
-9.545 0.000
-8.636 0.000
-7.727 0.000
-6.818 0.000
-5.909 0.3333
-5.000 0.3333
-4.091 0.3333
-3.182 0.3333
-2.273 0.6667
-1.364 1.0000
-0.454 1.0000
Compare that with just looking at one frequency at the time:
dbm(Vout[0,1])
-5.481
If you plot the cumulative distribution of that single value then you get a totally different result since we now only look at one value, vs looking at the whole array of frequencies.
bin cdf(dbm(Vout[0]),11,-10,0)
-9.545 0.000
-8.636 0.000
-7.727 0.000
-6.818 0.000
-5.909 1.0000
-5.000 1.0000
-4.091 1.0000
-3.182 1.0000
-2.273 1.0000
-1.364 1.0000
-0.454 1.0000