Thank you for engaging with my problem, Eugene and Ken!
I must admit that I confused the authors, read so many papers in the last days...
Eugene, your hint was the right one! I changed my port temperature to 27 and now the deviation is almost zero (0.0002db). Thank you! I was guessing that it must be such an easy error.
For my IIP3-Deviation I will post a proper description of my setup:
Simulation Settings:port: prf = -40(dbm), frf1 = 1.9G, frf2 = 2.0G
LNA_PB: nf = 0, ip3 = -10, gain = 20
qpss settings: shooting
frf1 large 5 (harms)
frf2 moderate 3 (harms)
harmonics: default, <blank>
accuracy: conservative
sweep: prf, -40:5, step size 1
- additional stabilization time: 2n -> no change of results
- flexible balance -> no change
- interchanging moderate <-> large -> no change
- different settings for harms -> no change
- with pss (both signals large): -> huge difference for measured ip3, about 8db
Direct Plot Form: Differential Nets, 100M (Ohm), extrapolation point: -40 (must be linear region)
LNA_PB:without clamping for more conventional look of curves!
code below
Hope now it is clearer what I am doing (wrongly).
Thanks for your help in advance!
Jochen
Testbench:
----LNA_PB-------------------------------------------------------------------
Code:`include "constants.h"
`include "discipline.h"
module LNA_PB(I_in, I_out, Q_in, Q_out);
inout I_in, Q_in, I_out, Q_out;
electrical I_in, Q_in, I_out, Q_out, I_inn;
parameter real gain = 30; // Gain in dB.
parameter real ip3 = -20; // 3rd order intercept point in dBm.
parameter real rin = 50 from (0:inf); // Input resistance in Ohms.
parameter real rout = 50 from (0:inf); // Output resistance in Ohms.
parameter real nf = 10 from [0:inf]; // Noise figure in dB.
real a, c, ip, rho, rhooutmax, rhoinmax, rhoout, noise_voltage_squared, rnf;
analog begin
// Convert the input parameters from engineering units to implementation units.
@(initial_step) begin
a = pow(10,gain/20);
rnf = pow(10,nf/10);
c = a*(4/3)/(pow(10,ip3/10)*2*50*0.001); // 50 Ohm ref. assumed.
// Compute the critical point.
rhoinmax = sqrt(a/(3*c));
rhooutmax = (2*a/3)*rhoinmax;
noise_voltage_squared = 4*(rnf-1)*`P_K*$temperature*50;
$strobe("input_noise_pwr = %E", noise_voltage_squared); //display input_noise_pwr
end
// Assign the input voltage to the variable, rho
rho = V(I_inn, Q_in);
// Apply the third order non-linearity. Clamp the output for extreme inputs.
//if (abs(rho) < rhoinmax )
rhoout = (a - c*rho*rho)*rho; //for testing
//else if (rho >0) rhoout = rhooutmax;
//else rhoout = -rhooutmax;
// Load the input with the input resistance, rin.
I(I_inn, Q_in) <+ V(I_inn, Q_in)/rin;
// Apply the output signal to the output terminal through the output resistance, rout.
I(I_out, Q_out) <+ (-rhoout + V(I_out, Q_out))/rout;
// Apply the noise source. The noise source lies between the input resistance and
// rho definition to make the noise independent of the source resistance.
V(I_in, I_inn) <+ white_noise(noise_voltage_squared, "LNA_PB");
end
endmodule