* SPICE netlist
Bsrc N005 0 V={Usrc}*(sin(w1*time)+sin(w2*time))
R1 test 0 {Rload}
R2 N005 source {Rsrc}
B9 N001 0 V=(idt(v(test)*sin(wh*time)*v(gate))**2+idt(v(test)*cos(wh*time)*v(gate))**2)/((tstp-tsta)**2)
L9 N001 prod_h {L_lp} Rser=50
C9 prod_h 0 {C_lp}
B10 N002 0 V=(idt(v(test)*sin(wl*time)*v(gate))**2+idt(v(test)*cos(wl*time)*v(gate))**2)/((tstp-tsta)**2)
L10 N002 prod_l {L_lp} Rser=50
C10 prod_l 0 {C_lp}
B11 N003 0 V=(idt(v(test)*sin(w2*time)*v(gate))**2+idt(v(test)*cos(w2*time)*v(gate))**2)/((tstp-tsta)**2)
L11 N003 prod_2 {L_lp} Rser=50
C11 prod_2 0 {C_lp}
B12 N004 0 V=(idt(v(test)*sin(w1*time)*v(gate))**2+idt(v(test)*cos(w1*time)*v(gate))**2)/((tstp-tsta)**2)
L12 N004 prod_1 {L_lp} Rser=50
C12 prod_1 0 {C_lp}
B13 gate 0 V=u(time-tsta)*u(tstp-time)
B1 amp_hl 0 V=sqrt(2*max(v(prod_h), v(prod_l)))
B2 amp_12 0 V=sqrt(2*min(v(prod_2), v(prod_1)))
B3 ip3 0 V=u(time-tstp)*(30*log10(v(amp_12))-10*log10(v(amp_hl))+13.01)
.param f1 = 1.0Meg f2 = 1.1Meg
.param fh = (2*f2)-f1 fl = (2*f1)-f2
.param Usrc = 1.0V
.param Rsrc = 50
.para, Rload = 1G
.param L_lp = (3.979H * 0.2) / abs(f2-f1)
.param C_lp = (6.366m * 0.2) / abs(f2-f1)
.param w1=2*pi*f1 w2=2*pi*f2
.param wh=2*pi*fh wl=2*pi*fl
.param tsta=1/abs(f2-f1)
.param tstp=11*tsta

* LTspice schematic (.asc)
Version 4
SHEET 1 1168 1072
WIRE -184 -536 -248 -536
WIRE -72 -536 -104 -536
WIRE -24 -536 -72 -536
WIRE -248 -504 -248 -536
WIRE -72 -504 -72 -536
WIRE 584 -440 536 -440
WIRE 536 -408 536 -440
WIRE -248 -392 -248 -424
WIRE -72 -392 -72 -440
WIRE -184 -328 -248 -328
WIRE -72 -328 -104 -328
WIRE -24 -328 -72 -328
WIRE -248 -296 -248 -328
WIRE -72 -296 -72 -328
WIRE 536 -296 536 -328
WIRE 584 -232 536 -232
WIRE -584 -200 -584 -232
WIRE 536 -200 536 -232
WIRE -248 -184 -248 -216
WIRE -72 -184 -72 -232
WIRE -184 -120 -248 -120
WIRE -72 -120 -104 -120
WIRE -24 -120 -72 -120
WIRE -584 -88 -584 -120
WIRE -248 -88 -248 -120
WIRE -72 -88 -72 -120
WIRE 536 -88 536 -120
WIRE -248 24 -248 -8
WIRE -72 24 -72 -24
WIRE 568 56 536 56
WIRE 536 88 536 56
WIRE -184 104 -248 104
WIRE -72 104 -104 104
WIRE -24 104 -72 104
WIRE -248 136 -248 104
WIRE -72 136 -72 104
WIRE 536 200 536 168
WIRE -248 248 -248 216
WIRE -72 248 -72 200
WIRE -344 392 -376 392
WIRE -152 392 -264 392
WIRE 248 392 152 392
WIRE -376 424 -376 392
WIRE 248 424 248 392
WIRE -376 536 -376 504
WIRE 248 536 248 504
FLAG -376 536 0
FLAG -152 392 source
IOPIN -704 416 Out
FLAG 248 536 0
FLAG 152 392 test
IOPIN -400 416 In
FLAG -248 -392 0
FLAG -72 -392 0
FLAG -24 -536 prod_h
IOPIN -576 -512 Out
FLAG -248 -184 0
FLAG -72 -184 0
FLAG -24 -328 prod_l
IOPIN -576 -304 Out
FLAG -248 24 0
FLAG -72 24 0
FLAG -24 -120 prod_2
IOPIN -576 -96 Out
FLAG -248 248 0
FLAG -72 248 0
FLAG -24 104 prod_1
IOPIN -576 128 Out
FLAG -584 -88 0
FLAG -584 -232 gate
FLAG 536 -296 0
FLAG 584 -440 amp_hl
IOPIN 32 -416 Out
FLAG 536 -88 0
FLAG 584 -232 amp_12
IOPIN 32 -208 Out
FLAG 536 200 0
FLAG 568 56 ip3
IOPIN 16 80 Out
SYMBOL bv -376 408 R0
SYMATTR InstName Bsrc
SYMATTR Value V={Usrc}*(sin(w1*time)+sin(w2*time))
SYMBOL Misc\\EuropeanResistor 232 408 R0
SYMATTR InstName R1
SYMATTR Value {Rload}
SYMBOL Misc\\EuropeanResistor -360 408 R270
SYMATTR InstName R2
SYMATTR Value {Rsrc}
SYMBOL bv -248 -520 R0
SYMATTR InstName B9
SYMATTR Value V=(idt(v(test)*sin(wh*time)*v(gate))**2+idt(v(test)*cos(wh*time)*v(gate))**2)/((tstp-tsta)**2)
SYMBOL ind -200 -520 R270
SYMATTR InstName L9
SYMATTR Value {L_lp}
SYMATTR SpiceLine Rser=50
SYMBOL cap -88 -504 R0
SYMATTR InstName C9
SYMATTR Value {C_lp}
SYMBOL bv -248 -312 R0
SYMATTR InstName B10
SYMATTR Value V=(idt(v(test)*sin(wl*time)*v(gate))**2+idt(v(test)*cos(wl*time)*v(gate))**2)/((tstp-tsta)**2)
SYMBOL ind -200 -312 R270
SYMATTR InstName L10
SYMATTR Value {L_lp}
SYMATTR SpiceLine Rser=50
SYMBOL cap -88 -296 R0
SYMATTR InstName C10
SYMATTR Value {C_lp}
SYMBOL bv -248 -104 R0
SYMATTR InstName B11
SYMATTR Value V=(idt(v(test)*sin(w2*time)*v(gate))**2+idt(v(test)*cos(w2*time)*v(gate))**2)/((tstp-tsta)**2)
SYMBOL ind -200 -104 R270
SYMATTR InstName L11
SYMATTR Value {L_lp}
SYMATTR SpiceLine Rser=50
SYMBOL cap -88 -88 R0
SYMATTR InstName C11
SYMATTR Value {C_lp}
SYMBOL bv -248 120 R0
SYMATTR InstName B12
SYMATTR Value V=(idt(v(test)*sin(w1*time)*v(gate))**2+idt(v(test)*cos(w1*time)*v(gate))**2)/((tstp-tsta)**2)
SYMBOL ind -200 120 R270
SYMATTR InstName L12
SYMATTR Value {L_lp}
SYMATTR SpiceLine Rser=50
SYMBOL cap -88 136 R0
SYMATTR InstName C12
SYMATTR Value {C_lp}
SYMBOL bv -584 -216 R0
SYMATTR InstName B13
SYMATTR Value V=u(time-tsta)*u(tstp-time)
SYMBOL bv 536 -424 R0
SYMATTR InstName B1
SYMATTR Value V=sqrt(2*max(v(prod_h), v(prod_l)))
SYMBOL bv 536 -216 R0
SYMATTR InstName B2
SYMATTR Value V=sqrt(2*min(v(prod_2), v(prod_1)))
SYMBOL bv 536 72 R0
SYMATTR InstName B3
SYMATTR Value V=u(time-tstp)*(30*log10(v(amp_12))-10*log10(v(amp_hl))+13.01)