Eslam Morsie
07/10/2021, 10:24 PMChristoph Maier
07/11/2021, 12:46 AMVern
07/11/2021, 2:47 AMStefan Schippers
07/13/2021, 5:03 PMEslam Morsie
07/14/2021, 10:59 AMStefan Schippers
07/14/2021, 8:55 PMVCC/2 * 100
(the derivative of tanh(x)
is 1-[tanh(x)]^2
, so the derivative of tanh(0) is 1). you can replace '100' with a GAIN parameter and set .param GAIN={100/VCC*2}
Simulation sweeps the PLUS voltage around 1.5V and keeping MINUS to 1.5V
Here the netlist for the example:
**.subckt test_bsource PLUS MINUS OUT
*.ipin PLUS
*.ipin MINUS
*.opin OUT
B2 OUT 0 V = 'VCC/2*(1+tanh(GAIN*(V(PLUS_I)-V(MINUS_I))))'
V1 PLUS PLUS_I 0
V2 MINUS MINUS_I 0
.param VCC=3
** set gain to 100. Divide by VCC/2 to cancel out the VCC/2 multiplier in Bsource expression
.param GAIN={100/VCC*2}
vminus minus 0 {VCC/2}
vplus plus 0 {VCC/2}
.control
save all
dc vplus 0 3 0.001
write test_bsource.raw
.endc
.end
Eslam Morsie
07/15/2021, 8:43 AMTom
08/07/2021, 4:36 PMopamp
, and one dominant pole compensated model opamp2